pages-order-distribution~pages-public-poster-index.cd0d469e.js
43.7 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-distribution~pages-public-poster-index"],{"18d7":function(e,t,r){"use strict";(function(t){var n=r("4ea4");r("cb29"),r("4160"),r("4e82"),r("a9e3"),r("b680"),r("542d"),r("d3b7"),r("ac1f"),r("1276"),r("498a"),r("159b");var a=n(r("2909")),o=n(r("5530"));r("96cf");var i=n(r("1da1")),l=n(r("2a27")),u=n(r("51a0")),s=r("a872"),f="QSSHAREPOSTER_IDKEY",c=1;function d(e){return new Promise(function(){var r=(0,i.default)(regeneratorRuntime.mark((function r(n,a){var o,i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,g(e);case 3:o=r.sent,n(o),r.next=21;break;case 7:return r.prev=7,r.t0=r["catch"](0),r.prev=9,e.bgScale?e.bgScale=Number(e.bgScale)-.1:c-=.1,t.log("------------清除缓存后, 开始第二次尝试------------"),r.next=14,g(e);case 14:i=r.sent,n(i),r.next=21;break;case 18:r.prev=18,r.t1=r["catch"](9),a(r.t1);case 21:case"end":return r.stop()}}),r,null,[[0,7],[9,18]])})));return function(e,t){return r.apply(this,arguments)}}())}function g(e){var r=e.type,n=e.formData,u=e.background,s=e.posterCanvasId,d=e.backgroundImage,g=e.reserve,m=e.textArray,b=e.drawArray,p=e.qrCodeArray,y=e.imagesArray,w=e.setCanvasWH,x=e.setCanvasToTempFilePath,k=e.setDraw,N=e.bgScale,P=e.Context,T=e._this,A=e.delayTimeScale,L=e.drawDelayTime;return new Promise(function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(i,C){var F,O,I,R,E,B,D,j,J,M,z,H,W;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,l.default.showLoading("正在准备海报数据"),P||(l.default.log("没有画布对象,创建画布对象"),P=uni.createCanvasContext(s,T||null)),!(u&&u.width&&u.height)){e.next=7;break}F=u,e.next=10;break;case 7:return e.next=9,_({backgroundImage:d,type:r,formData:n});case 9:F=e.sent;case 10:if(N=N||c,F.width=F.width*N,F.height=F.height*N,l.default.log("获取背景图信息对象成功:"+JSON.stringify(F)),O={bgObj:F,type:r,bgScale:N,getBgObj:function(){return O.bgObj},setBgObj:function(e){var t=(0,o.default)((0,o.default)({},O.bgObj),e);O.bgObj=t,F=t}},!y){e.next=23;break}return"function"==typeof y&&(y=y(O)),l.default.showLoading("正在生成需绘制图片的临时路径"),l.default.log("准备设置图片"),e.next=21,S(y);case 21:y=e.sent,l.default.hideLoading();case 23:if(m&&("function"==typeof m&&(m=m(O)),m=v(P,m)),!p){e.next=38;break}"function"==typeof p&&(p=p(O)),l.default.showLoading("正在生成需绘制图片的临时路径"),I=0;case 28:if(!(I<p.length)){e.next=37;break}if(l.default.log(I),!p[I].image){e.next=34;break}return e.next=33,l.default.downloadFile_PromiseFc(p[I].image);case 33:p[I].image=e.sent;case 34:I++,e.next=28;break;case 37:l.default.hideLoading();case 38:if(!b){e.next=99;break}if("function"==typeof b&&(b=b(O)),!l.default.isPromise(b)){e.next=44;break}return e.next=43,b;case 43:b=e.sent;case 44:if(!(l.default.isArray(b)&&b.length>0)){e.next=99;break}R=!1,E=0;case 47:if(!(E<b.length)){e.next=79;break}B=b[E],l.default.isFn(B.allInfoCallback)&&!R&&(R=!0),B[f]=E,D=void 0,e.t0=B.type,e.next="image"===e.t0?55:"text"===e.t0?59:"qrcode"===e.t0?61:"custom"===e.t0?67:"fillrect"===e.t0?68:"strokeRect"===e.t0?69:"roundStrokeRect"===e.t0?70:"roundFillRect"===e.t0?71:72;break;case 55:return e.next=57,S(B);case 57:return D=e.sent,e.abrupt("break",74);case 59:return D=v(P,B),e.abrupt("break",74);case 61:if(!B.image){e.next=66;break}return e.next=64,l.default.downloadFile_PromiseFc(B.image);case 64:e.t1=e.sent,D={image:e.t1};case 66:return e.abrupt("break",74);case 67:return e.abrupt("break",74);case 68:return e.abrupt("break",74);case 69:return e.abrupt("break",74);case 70:return e.abrupt("break",74);case 71:return e.abrupt("break",74);case 72:return l.default.log("未识别的类型"),e.abrupt("break",74);case 74:D&&l.default.isObject(D)&&(b[E]=(0,o.default)((0,o.default)({},B),D));case 76:E++,e.next=47;break;case 79:if(!R){e.next=99;break}l.default.log("----------------hasAllInfoCallback----------------"),j=(0,a.default)(b),j.sort((function(e,t){var r=l.default.isUndef(e.serialNum)||l.default.isNull(e.serialNum)?Number.NEGATIVE_INFINITY:Number(e.serialNum),n=l.default.isUndef(t.serialNum)||l.default.isNull(t.serialNum)?Number.NEGATIVE_INFINITY:Number(t.serialNum);return r-n})),l.default.log("开始for循环"),J=0;case 85:if(!(J<j.length)){e.next=98;break}if(M=(0,o.default)({},j[J]),!l.default.isFn(M.allInfoCallback)){e.next=95;break}if(z=M.allInfoCallback({drawArray:b}),!l.default.isPromise(z)){e.next=93;break}return e.next=92,z;case 92:z=e.sent;case 93:H=M[f],l.default.isUndef(H)?t.log("程序错误 找不到idKey!!!\t...这不应该啊"):b[M[f]]=(0,o.default)((0,o.default)({},M),z);case 95:J++,e.next=85;break;case 98:l.default.log("for循环结束");case 99:if(t.log("params:"+JSON.stringify(O)),!w||"function"!=typeof w){e.next=103;break}return e.next=103,new Promise((function(e,t){w(O),setTimeout((function(){e()}),50)}));case 103:return e.next=105,h({Context:P,type:r,posterCanvasId:s,reserve:g,drawArray:b,textArray:m,imagesArray:y,bgObj:F,qrCodeArray:p,setCanvasToTempFilePath:x,setDraw:k,bgScale:N,_this:T,delayTimeScale:A,drawDelayTime:L});case 105:W=e.sent,l.default.hideLoading(),i({bgObj:F,poster:W,type:r}),e.next=113;break;case 110:e.prev=110,e.t2=e["catch"](0),C(e.t2);case 113:case"end":return e.stop()}}),e,null,[[0,110]])})));return function(t,r){return e.apply(this,arguments)}}())}function h(e){var r=e.Context,n=e.type,a=e.posterCanvasId,i=e.reserve,u=e.bgObj,s=e.drawArray,f=e.textArray,c=e.qrCodeArray,d=e.imagesArray,g=e.setCanvasToTempFilePath,h=e.setDraw,v=e.bgScale,w=e._this,x=e.delayTimeScale,k=e.drawDelayTime,S={Context:r,bgObj:u,type:n,bgScale:v};return x=void 0!==x?x:15,k=void 0!==k?k:100,new Promise((function(e,v){try{if(l.default.showLoading("正在绘制海报"),l.default.log("背景对象:"+JSON.stringify(u)),u&&u.path?(l.default.log("背景有图片路径"),r.drawImage(u.path,0,0,u.width,u.height)):(l.default.log("背景没有图片路径"),u.backgroundColor?(l.default.log("背景有背景颜色:"+u.backgroundColor),r.setFillStyle(u.backgroundColor),r.fillRect(0,0,u.width,u.height)):l.default.log("背景没有背景颜色")),l.default.showLoading("绘制图片"),d&&d.length>0&&F(r,d),l.default.showLoading("绘制自定义内容"),h&&"function"==typeof h&&h(S),l.default.showLoading("绘制文本"),f&&f.length>0&&T(r,f,u),l.default.showLoading("绘制二维码"),c&&c.length>0)for(var N=0;N<c.length;N++)B(r,c[N]);if(l.default.showLoading("绘制可控层级序列"),s&&s.length>0)for(var P=0;P<s.length;P++){var A=s[P];switch(l.default.log("绘制可控层级序列, drawArrayItem:"+JSON.stringify(A)),A.type){case"image":l.default.log("绘制可控层级序列, 绘制图片"),F(r,A);break;case"text":l.default.log("绘制可控层级序列, 绘制文本"),T(r,A,u);break;case"qrcode":l.default.log("绘制可控层级序列, 绘制二维码"),B(r,A);break;case"custom":l.default.log("绘制可控层级序列, 绘制自定义内容"),A.setDraw&&"function"===typeof A.setDraw&&A.setDraw(r);break;case"fillRect":l.default.log("绘制可控层级序列, 绘制填充直角矩形"),m(r,A);break;case"strokeRect":l.default.log("绘制可控层级序列, 绘制线条直角矩形"),b(r,A);break;case"roundStrokeRect":l.default.log("绘制可控层级序列, 绘制线条圆角矩形"),p(r,A);break;case"roundFillRect":l.default.log("绘制可控层级序列, 绘制填充圆角矩形"),y(r,A);break;default:l.default.log("未识别的类型");break}}l.default.showLoading("绘制中"),setTimeout((function(){l.default.log("准备执行draw方法"),l.default.log("Context:"+r);var h=function(){l.default.showLoading("正在输出图片");var r,i=g||{};i&&"function"==typeof i&&(i=g(u,n));var h=(0,o.default)({x:0,y:0,width:Number(u.width),height:Number(u.height),destWidth:Number(u.width),destHeight:Number(u.height),quality:.8,fileType:"jpg"},i);t.log("canvasToTempFilePath的data对象:"+JSON.stringify(h)),r=function(){var r=(0,o.default)((0,o.default)({},h),{},{canvasId:a,success:function(t){l.default.hideLoading(),e(t)},fail:function(e){l.default.hideLoading(),t.log("输出图片失败"),l.default.log("输出图片失败:"+JSON.stringify(e)),v("输出图片失败:"+JSON.stringify(e))}});uni.canvasToTempFilePath(r,w||null)};var m=0;c&&c.forEach((function(e){e.text&&(m+=Number(e.text.length))})),d&&d.forEach((function(){m+=x})),f&&f.forEach((function(){m+=x})),s&&s.forEach((function(e){switch(e.type){case"text":e.text&&(m+=e.text.length);break;default:m+=x;break}})),l.default.log("延时系数:"+x),l.default.log("总计延时:"+m),setTimeout(r,m)};r.draw("boolean"==typeof i&&i,h)}),k)}catch(L){l.default.hideLoading(),v(L)}}))}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l.default.log("进入绘制填充直角矩形方法, drawArrayItem:"+JSON.stringify(t)),e.setFillStyle(t.backgroundColor||"black"),e.setGlobalAlpha(t.alpha||1),e.fillRect(t.dx||0,t.dy||0,t.width||0,t.height||0),e.setGlobalAlpha(1)}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.setStrokeStyle(t.color||"black"),e.setLineWidth(t.lineWidth||1),e.strokeRect(t.dx,t.dy,t.width,t.height)}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.dx,n=t.dy,a=t.width,o=t.height,i=t.r,l=t.lineWidth,u=t.color;i=i||.1*a,a<2*i&&(i=a/2),a<2*i&&(i=a/2),e.beginPath(),e.moveTo(r+i,n),e.arcTo(r+a,n,r+a,n+o,i),e.arcTo(r+a,n+o,r,n+o,i),e.arcTo(r,n+o,r,n,i),e.arcTo(r,n,r+a,n,i),e.closePath(),e.setLineWidth(l||1),e.setStrokeStyle(u||"black"),e.stroke()}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.dx,n=t.dy,a=t.width,o=t.height,i=t.r,l=t.backgroundColor;i=i||.1*a,a<2*i&&(i=a/2),a<2*i&&(i=a/2),e.beginPath(),e.moveTo(r+i,n),e.arcTo(r+a,n,r+a,n+o,i),e.arcTo(r+a,n+o,r,n+o,i),e.arcTo(r,n+o,r,n,i),e.arcTo(r,n,r+a,n,i),e.closePath(),e.setFillStyle(l),e.fill()}function v(e,t){if(l.default.log("进入设置文字方法, texts:"+JSON.stringify(t)),t&&l.default.isArray(t)){if(l.default.log("texts是数组"),t.length>0)for(var r=0;r<t.length;r++)l.default.log("字符串信息-初始化之前:"+JSON.stringify(t[r])),t[r]=w(e,t[r])}else l.default.log("texts是对象"),t=w(e,t);return l.default.log("返回texts:"+JSON.stringify(t)),t}function w(e,t){if(l.default.log("进入设置文字方法, textItem:"+JSON.stringify(t)),l.default.isNotNull_string(t.text)){t.text=String(t.text),t.alpha=void 0!==t.alpha?Number(t.alpha):1,t.color=t.color||"black",t.size=void 0!==t.size?Number(t.size):10,t.textAlign=t.textAlign||"left",t.textBaseline=t.textBaseline||"middle",t.dx=Number(t.dx)||0,t.dy=Number(t.dy)||0,t.size=Math.ceil(Number(t.size)),l.default.log("字符串信息-初始化默认值后:"+JSON.stringify(t));var r=x(e,{text:t.text,size:t.size});l.default.log("字符串信息-初始化时的文本长度:"+r);var n={};t.infoCallBack&&"function"===typeof t.infoCallBack&&(n=t.infoCallBack(r)),t=(0,o.default)((0,o.default)({},t),{},{textLength:r},n),l.default.log("字符串信息-infoCallBack后:"+JSON.stringify(t))}return t}function x(e,t){l.default.log("计算文字长度, obj:"+JSON.stringify(t));var r,n=t.text,a=t.size;e.setFontSize(a);try{r=e.measureText(n)}catch(f){r={}}if(r={},l.default.log("measureText计算文字长度, textLength:"+JSON.stringify(r)),r=r&&r.width?r.width:0,!r){for(var o=0,i=0;i<n.length;i++){var u=n.substr(i,1),s=k(u);l.default.log("计算文字宽度系数:"+s),o+=s}l.default.log("文字宽度总系数:"+o),r=o*a}return r}function k(e){var t;return t=/a/.test(e)?.552734375:/b/.test(e)?.638671875:/c/.test(e)?.50146484375:/d/.test(e)?.6396484375:/e/.test(e)?.5673828125:/f/.test(e)?.3466796875:/g/.test(e)?.6396484375:/h/.test(e)?.61572265625:/i/.test(e)?.26611328125:/j/.test(e)?.26708984375:/k/.test(e)?.54443359375:/l/.test(e)?.26611328125:/m/.test(e)?.93701171875:/n/.test(e)?.6162109375:/o/.test(e)?.6357421875:/p/.test(e)?.638671875:/q/.test(e)?.6396484375:/r/.test(e)?.3818359375:/s/.test(e)?.462890625:/t/.test(e)?.37255859375:/u/.test(e)?.6162109375:/v/.test(e)?.52490234375:/w/.test(e)?.78955078125:/x/.test(e)?.5068359375:/y/.test(e)?.529296875:/z/.test(e)?.49169921875:/A/.test(e)?.70361328125:/B/.test(e)?.62744140625:/C/.test(e)?.6689453125:/D/.test(e)?.76171875:/E/.test(e)?.5498046875:/F/.test(e)?.53125:/G/.test(e)?.74365234375:/H/.test(e)?.7734375:/I/.test(e)?.2939453125:/J/.test(e)?.39599609375:/K/.test(e)?.634765625:/L/.test(e)?.51318359375:/M/.test(e)?.97705078125:/N/.test(e)?.81298828125:/O/.test(e)?.81494140625:/P/.test(e)?.61181640625:/Q/.test(e)?.81494140625:/R/.test(e)?.65283203125:/S/.test(e)?.5771484375:/T/.test(e)?.5732421875:/U/.test(e)?.74658203125:/V/.test(e)?.67626953125:/W/.test(e)?1.017578125:/X/.test(e)?.64501953125:/Y/.test(e)?.603515625:/Z/.test(e)?.6201171875:/[0-9]/.test(e)?.58642578125:/[\u4e00-\u9fa5]/.test(e)?1:/ /.test(e)?.2958984375:/\`/.test(e)?.294921875:/\~/.test(e)?.74169921875:/\!/.test(e)?.3125:/\@/.test(e)?1.03125:/\#/.test(e)?.63818359375:/\$/.test(e)?.58642578125:/\%/.test(e)?.8896484375:/\^/.test(e)?.74169921875:/\&/.test(e)?.8701171875:/\*/.test(e)?.455078125:/\(/.test(e)||/\)/.test(e)?.333984375:/\_/.test(e)?.4482421875:/\-/.test(e)?.4326171875:/\+/.test(e)||/\=/.test(e)?.74169921875:/\|/.test(e)?.26904296875:/\\/.test(e)?.416015625:/\[/.test(e)||/\]/.test(e)?.333984375:/\;/.test(e)?.24072265625:/\'/.test(e)?.25634765625:/\,/.test(e)||/\./.test(e)?.24072265625:/\//.test(e)?.42724609375:/\{/.test(e)||/\}/.test(e)?.333984375:/\:/.test(e)?.24072265625:/\"/.test(e)?.435546875:/\</.test(e)||/\>/.test(e)?.74169921875:/\?/.test(e)?.48291015625:1,t}function S(e){return l.default.log("进入设置图片数据方法"),new Promise(function(){var t=(0,i.default)(regeneratorRuntime.mark((function t(r,n){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e||!l.default.isArray(e)){t.next=14;break}l.default.log("images是一个数组"),a=0;case 4:if(!(a<e.length)){t.next=12;break}return l.default.log("设置图片数据循环中:"+a),t.next=8,P(e[a]);case 8:e[a]=t.sent;case 9:a++,t.next=4;break;case 12:t.next=18;break;case 14:return l.default.log("images是一个对象"),t.next=17,P(e);case 17:e=t.sent;case 18:r(e),t.next=24;break;case 21:t.prev=21,t.t0=t["catch"](0),n(t.t0);case 24:case"end":return t.stop()}}),t,null,[[0,21]])})));return function(e,r){return t.apply(this,arguments)}}())}function N(e){var t=/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*?)\s*$/i;return t.test(e)?(0,s.base64ToPath)(e):Promise.resolve(e)}function P(e){return new Promise(function(){var t=(0,i.default)(regeneratorRuntime.mark((function t(r,n){var a,i,u;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.url){t.next=20;break}return t.next=3,N(e.url);case 3:return e.url=t.sent,a=e.url,t.next=7,l.default.downloadFile_PromiseFc(a);case 7:return a=t.sent,e.url=a,i=e.infoCallBack&&"function"===typeof e.infoCallBack,u={},t.next=13,l.default.getImageInfo_PromiseFc(a);case 13:u=t.sent,i&&(e=(0,o.default)((0,o.default)({},e),e.infoCallBack(u))),e.dx=Number(e.dx)||0,e.dy=Number(e.dy)||0,e.dWidth=Number(e.dWidth||u.width),e.dHeight=Number(e.dHeight||u.height),e=(0,o.default)((0,o.default)({},e),{},{imageInfo:u});case 20:r(e);case 21:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}())}function T(e,t,r){l.default.isArray(t)?l.default.log("遍历文本方法, 是数组"):(l.default.log("遍历文本方法, 不是数组"),t=[t]),l.default.log("遍历文本方法, textArray:"+JSON.stringify(t));var n=[];if(t&&t.length>0)for(var a=0;a<t.length;a++){var i=t[a];if(i.text&&i.lineFeed){var u=-1,s=r.width,f=i.size,c=i.dx;if(l.default.isObject(i.lineFeed)){var d=i.lineFeed;u=void 0!==d.lineNum&&"number"===typeof d.lineNum&&d.lineNum>=0?d.lineNum:u,s=void 0!==d.maxWidth&&"number"===typeof d.maxWidth?d.maxWidth:s,f=void 0!==d.lineHeight&&"number"===typeof d.lineHeight?d.lineHeight:f,c=void 0!==d.dx&&"number"===typeof d.dx?d.dx:c}for(var g=i.text.split(""),h="",m=[],b=0,p=g.length;b<p;b++)x(e,{text:h,size:i.size})<=s&&x(e,{text:h+g[b],size:i.size})<=s?(h+=g[b],b==g.length-1&&m.push(h)):(m.push(h),h=g[b]);l.default.log("循环出的文本数组:"+JSON.stringify(m));for(var y=u>=0&&u<m.length?u:m.length,v=0;v<y;v++){var w=m[v];v==y-1&&y<m.length&&(w=w.substring(0,w.length-1)+"...");var k=(0,o.default)((0,o.default)({},i),{},{text:w,dx:0===v?i.dx:c>=0?c:i.dx,dy:i.dy+v*f,textLength:x(e,{text:w,size:i.size})});l.default.log("重新组成的文本对象:"+JSON.stringify(k)),n.push(k)}}else n.push(i)}l.default.log("绘制文本新数组:"+JSON.stringify(n)),L(e,n)}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.font&&"string"===typeof e.font)return l.default.log(e.font),e.font;var t="normal",r="normal",n="normal",a=e.size||10,o="sans-serif";return a=Math.ceil(Number(a)),e.fontStyle&&"string"===typeof e.fontStyle&&(t=e.fontStyle.trim()),e.fontVariant&&"string"===typeof e.fontVariant&&(r=e.fontVariant.trim()),!e.fontWeight||"string"!==typeof e.fontWeight&&"number"!==typeof e.fontWeight||(n=e.fontWeight.trim()),e.fontFamily&&"string"===typeof e.fontFamily&&(o=e.fontFamily.trim()),t+" "+r+" "+n+" "+a+"px "+o}function L(e,t){if(l.default.log("准备绘制文本方法, texts:"+JSON.stringify(t)),t&&l.default.isArray(t)){if(l.default.log("准备绘制文本方法, 是数组"),t.length>0)for(var r=0;r<t.length;r++)C(e,t[r])}else l.default.log("准备绘制文本方法, 不是数组"),C(e,t)}function C(e,t){if(l.default.log("进入绘制文本方法, textItem:"+JSON.stringify(t)),t&&l.default.isObject(t)&&t.text){if(e.font=A(t),e.setFillStyle(t.color),e.setGlobalAlpha(t.alpha),e.setTextAlign(t.textAlign),e.setTextBaseline(t.textBaseline),e.fillText(t.text,t.dx,t.dy),t.lineThrough&&l.default.isObject(t.lineThrough)){l.default.log("有删除线");var r,n,a=t.lineThrough;switch(a.alpha=void 0!==a.alpha?a.alpha:t.alpha,a.style=a.style||t.color,a.width=void 0!==a.width?a.width:t.size/10,a.cap=void 0!==a.cap?a.cap:"butt",l.default.log("删除线对象:"+JSON.stringify(a)),e.setGlobalAlpha(a.alpha),e.setStrokeStyle(a.style),e.setLineWidth(a.width),e.setLineCap(a.cap),t.textAlign){case"left":r=t.dx;break;case"center":r=t.dx-t.textLength/2;break;default:r=t.dx-t.textLength;break}switch(t.textBaseline){case"top":n=t.dy+.5*t.size;break;case"middle":n=t.dy;break;default:n=t.dy-.5*t.size;break}e.beginPath(),e.moveTo(r,n),e.lineTo(r+t.textLength,n),e.stroke(),e.closePath(),l.default.log("删除线完毕")}e.setGlobalAlpha(1),e.font="10px sans-serif"}}function F(e,t){if(l.default.log("判断图片数据类型:"+JSON.stringify(t)),t&&l.default.isArray(t)){if(t.length>0)for(var r=0;r<t.length;r++)O(e,t[r])}else O(e,t)}function O(e,t){l.default.log("判断绘制图片形状, img:"+JSON.stringify(t)),t.url&&(t.circleSet?R(e,t):t.roundRectSet?E(e,t):I(e,t))}function I(e,t){if(l.default.log("进入绘制默认图片方法, img:"+JSON.stringify(t)),t.url){var r=!l.default.isUndef(t.alpha);t.alpha=Number(l.default.isUndef(t.alpha)?1:t.alpha),e.setGlobalAlpha(t.alpha),l.default.log("绘制默认图片方法, 有url"),t.dWidth&&t.dHeight&&t.sx&&t.sy&&t.sWidth&&t.sHeight?(l.default.log("绘制默认图片方法, 绘制第一种方案"),e.drawImage(t.url,Number(t.sx)||!1,Number(t.sy)||!1,Number(t.sWidth)||!1,Number(t.sHeight)||!1,Number(t.dx||0),Number(t.dy||0),Number(t.dWidth)||!1,Number(t.dHeight)||!1)):t.dWidth&&t.dHeight?(l.default.log("绘制默认图片方法, 绘制第二种方案"),e.drawImage(t.url,Number(t.dx||0),Number(t.dy||0),Number(t.dWidth)||!1,Number(t.dHeight)||!1)):(l.default.log("绘制默认图片方法, 绘制第三种方案"),e.drawImage(t.url,Number(t.dx||0),Number(t.dy||0))),r&&e.setGlobalAlpha(1)}l.default.log("绘制默认图片方法, 绘制完毕")}function R(e,t){l.default.log("进入绘制圆形图片方法, obj:"+JSON.stringify(t));var r,n,a,o,i=t.dx,u=t.dy,s=t.dWidth,f=t.dHeight,c=t.circleSet;t.imageInfo;("object"===typeof c&&(r=c.x,n=c.y,a=c.r),a)||(o=s>f?f:s,a=o/2);r=r?i+r:(i||0)+a,n=n?u+n:(u||0)+a,e.save(),e.beginPath(),e.arc(r,n,a,0,2*Math.PI,!1),e.closePath(),e.setGlobalAlpha(0),e.fillStyle="#FFFFFF",e.fill(),e.setGlobalAlpha(1),e.clip(),I(e,t),l.default.log("默认图片绘制完毕"),e.restore()}function E(e,t){l.default.log("进入绘制矩形图片方法, obj:"+JSON.stringify(t)),e.save();var r,n=t.dx,a=t.dy,o=t.dWidth,i=t.dHeight,u=t.roundRectSet;t.imageInfo;"object"===typeof u&&(r=u.r),r=r||.1*o,o<2*r&&(r=o/2),i<2*r&&(r=i/2),e.beginPath(),e.moveTo(n+r,a),e.arcTo(n+o,a,n+o,a+i,r),e.arcTo(n+o,a+i,n,a+i,r),e.arcTo(n,a+i,n,a,r),e.arcTo(n,a,n+o,a,r),e.closePath(),e.setGlobalAlpha(0),e.fillStyle="#FFFFFF",e.fill(),e.setGlobalAlpha(1),e.clip(),I(e,t),e.restore(),l.default.log("进入绘制矩形图片方法, 绘制完毕")}function B(e,t){l.default.log("进入绘制二维码方法"),l.default.showLoading("正在生成二维码");for(var r=[],n={text:String(t.text||"")||"",size:Number(t.size||0)||200,background:String(t.background||"")||"#ffffff",foreground:String(t.foreground||"")||"#000000",pdground:String(t.pdground||"")||"#000000",correctLevel:Number(t.correctLevel||0)||3,image:String(t.image||"")||"",imageSize:Number(t.imageSize||0)||40,dx:Number(t.dx||0)||0,dy:Number(t.dy||0)||0},a=null,o=0,i=0,s=r.length;i<s;i++)if(o=i,r[i].text==n.text&&r[i].text.correctLevel==n.correctLevel){a=r[i].obj;break}o==s&&(a=new u.default(n.text,n.correctLevel),r.push({text:n.text,correctLevel:n.correctLevel,obj:a}));for(var f=function(e){var t=e.options;return t.pdground&&(e.row>1&&e.row<5&&e.col>1&&e.col<5||e.row>e.count-6&&e.row<e.count-2&&e.col>1&&e.col<5||e.row>1&&e.row<5&&e.col>e.count-6&&e.col<e.count-2)?t.pdground:t.foreground},c=a.getModuleCount(),d=n.size,g=n.imageSize,h=(d/c).toPrecision(4),m=(d/c).toPrecision(4),b=0;b<c;b++)for(var p=0;p<c;p++){var y=Math.ceil((p+1)*h)-Math.floor(p*h),v=Math.ceil((b+1)*h)-Math.floor(b*h),w=f({row:b,col:p,count:c,options:n});e.setFillStyle(a.modules[b][p]?w:n.background),e.fillRect(n.dx+Math.round(p*h),n.dy+Math.round(b*m),y,v)}if(n.image){var x=function(e,t,r,a,o,i,l,u,s){e.setLineWidth(l),e.setFillStyle(n.background),e.setStrokeStyle(n.background),e.beginPath(),e.moveTo(t+i,r),e.arcTo(t+a,r,t+a,r+i,i),e.arcTo(t+a,r+o,t+a-i,r+o,i),e.arcTo(t,r+o,t,r+o-i,i),e.arcTo(t,r,t+i,r,i),e.closePath(),u&&e.fill(),s&&e.stroke()},k=n.dx+Number(((d-g)/2).toFixed(2)),S=n.dy+Number(((d-g)/2).toFixed(2));x(e,k,S,g,g,2,6,!0,!0),e.drawImage(n.image,k,S,g,g)}l.default.log("进入绘制二维码方法完毕"),l.default.hideLoading()}function _(e){e.backgroundImage,e.type;return new Promise(function(){var t=(0,i.default)(regeneratorRuntime.mark((function t(r,n){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,l.default.showLoading("正在获取海报背景图"),t.next=4,D(e);case 4:a=t.sent,l.default.hideLoading(),r(a),t.next=15;break;case 9:t.prev=9,t.t0=t["catch"](0),l.default.hideLoading(),l.default.showToast("获取分享用户背景图失败:"+JSON.stringify(t.t0)),l.default.log(JSON.stringify(t.t0)),n(t.t0);case 15:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,r){return t.apply(this,arguments)}}())}function D(e,t){var r=e.backgroundImage;e.type;return l.default.log("获取分享背景图, 尝试清空本地数据"),new Promise(function(){var t=(0,i.default)(regeneratorRuntime.mark((function t(n,a){var i,u,s,f;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,l.default.showLoading("正在下载海报背景图"),l.default.log("没有从后端获取的背景图片路径, 尝试从后端获取背景图片路径"),!r){t.next=7;break}t.t0=r,t.next=10;break;case 7:return t.next=9,l.default.getPosterUrl(e);case 9:t.t0=t.sent;case 10:return i=t.t0,t.next=13,N(i);case 13:return i=t.sent,l.default.log("尝试下载并保存背景图:"+i),t.next=17,l.default.downLoadAndSaveFile_PromiseFc(i);case 17:if(u=t.sent,!u){t.next=31;break}return l.default.log("下载并保存背景图成功:"+u),t.next=22,l.default.getImageInfo_PromiseFc(u);case 22:s=t.sent,l.default.log("获取图片信息成功"),f={path:u,width:s.width,height:s.height,name:l.default.fileNameInPath(i)},l.default.log("拼接背景图信息对象成功:"+JSON.stringify(f)),l.default.hideLoading(),l.default.log("返回背景图信息对象"),n((0,o.default)({},f)),t.next=33;break;case 31:l.default.hideLoading(),a("not find savedFilePath");case 33:t.next=38;break;case 35:t.prev=35,t.t1=t["catch"](0),a(t.t1);case 38:case"end":return t.stop()}}),t,null,[[0,35]])})));return function(e,r){return t.apply(this,arguments)}}())}e.exports={getSharePoster:d,setText:v,setImage:S,drawText:T,drawImage:F,drawQrCode:B,drawFillRect:m,drawStrokeRect:b,drawRoundStrokeRect:p,drawRoundFillRect:y}}).call(this,r("5a52")["default"])},"2a27":function(e,t,r){(function(t){r("c740"),r("d3b7"),r("ac1f"),r("25f0"),r("1276");var n=t.log;n=function(){};var a={log:function(e){n(e)},showLoading:function(e,t){uni.showLoading({title:e,mask:t||!1})},hideLoading:function(){uni.hideLoading()},showToast:function(e,t){uni.showToast({title:e,icon:t||"none"})},getPosterUrl:function(e){var t=e.backgroundImage,r=e.type;e.formData;return new Promise((function(e,n){var a;if(t)a=t;else switch(r){case 1:a="";break;default:a="";break}a?e(a):n("背景图片路径不存在")}))},shareTypeListSheetArray:{array:[0,1,2,3,4,5]},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},isObject:function(e){return"[object Object]"===Object.prototype.toString.call(e)},isPromise:function(e){return!!e&&("object"===typeof e||"function"===typeof e)&&"function"===typeof e.then},isNull:function(e){return null===e},isUndefined:function(e){return void 0===e},isUndef:function(e){return void 0===e},isNotNull_string:function(e){return null!==e&&void 0!==e&&""!==e},isFn:function(e){return e&&"function"===typeof e},getStorage:function(e,t,r){uni.getStorage({key:e,success:function(e){e.data&&""!=e.data?t&&t(e.data):r&&r()},fail:function(){r&&r()}})},setStorage:function(e,t){n("设置缓存"),n("key:"+e),n("data:"+JSON.stringify(t)),uni.setStorage({key:e,data:t})},setStorageSync:function(e,t){uni.setStorageSync(e,t)},getStorageSync:function(e){return uni.getStorageSync(e)},clearStorageSync:function(){uni.clearStorageSync()},removeStorageSync:function(e){uni.removeStorageSync(e)},getImageInfo:function(e,t,r){e=o(e),uni.getImageInfo({src:e,success:function(e){t&&"function"==typeof t&&t(e)},fail:function(e){r&&"function"==typeof r&&r(e)}})},downloadFile:function(e,t){e=o(e),uni.downloadFile({url:e,success:function(e){t&&"function"==typeof t&&t(e)}})},downloadFile_PromiseFc:function(e){return new Promise((function(t,r){"http"!==e.substring(0,4)?t(e):(e=o(e),n("url:"+e),uni.downloadFile({url:e,success:function(e){e&&e.tempFilePath?t(e.tempFilePath):r("not find tempFilePath")},fail:function(e){r(e)}}))}))},saveFile:function(e){uni.saveFile({tempFilePath:e,success:function(e){n("保存成功:"+JSON.stringify(e))}})},downLoadAndSaveFile_PromiseFc:function(e){return new Promise((function(t,r){n("准备下载并保存图片:"+e),"http"===e.substring(0,4)?(e=o(e),uni.downloadFile({url:e,success:function(e){n("下载背景图成功:"+JSON.stringify(e)),e&&e.tempFilePath?t(e.tempFilePath):r("not find tempFilePath")},fail:function(e){r(e)}})):t(e)}))},checkFile_PromiseFc:function(e){return new Promise((function(t,r){uni.getSavedFileList({success:function(r){var n=r.fileList,a=n.findIndex((function(t){return t.filePath===e}));t(a)},fail:function(e){r(e)}})}))},removeSavedFile:function(e){uni.getSavedFileList({success:function(t){var r=t.fileList,n=r.findIndex((function(t){return t.filePath===e}));n>=0&&uni.removeSavedFile({filePath:e})}})},fileNameInPath:function(e){var t=e.split("/");return t[t.length-1]},getImageInfo_PromiseFc:function(e){return new Promise((function(t,r){n("准备获取图片信息:"+e),e=o(e),uni.getImageInfo({src:e,success:function(e){n("获取图片信息成功:"+JSON.stringify(e)),t(e)},fail:function(e){n("获取图片信息失败:"+JSON.stringify(e)),r(e)}})}))},previewImage:function(e){"string"==typeof e&&(e=[e]),uni.previewImage({urls:e})},actionSheet:function(e,t){for(var r=[],n=0;n<e.array.length;n++)switch(e.array[n]){case"sinaweibo":r[n]="新浪微博";break;case"qq":r[n]="QQ";break;case"weixin":r[n]="微信";break;case"WXSceneSession":r[n]="微信好友";break;case"WXSenceTimeline":r[n]="微信朋友圈";break;case"WXSceneFavorite":r[n]="微信收藏";break;case 0:r[n]="图文链接";break;case 1:r[n]="纯文字";break;case 2:r[n]="纯图片";break;case 3:r[n]="音乐";break;case 4:r[n]="视频";break;case 5:r[n]="小程序";break;default:break}this.showActionSheet(r,t)},showActionSheet:function(e,t){uni.showActionSheet({itemList:e,success:function(e){t&&"function"==typeof t&&t(e.tapIndex)}})},getProvider:function(e,t,r){var n=this;uni.getProvider({service:e,success:function(a){if(r){var o={};o.array=a.provider,n.actionSheet(o,(function(e){t&&"function"==typeof t&&t(a.provider[e])}))}else if("payment"==e){for(var i=a.provider,l=[],u=0;u<i.length;u++)"wxpay"==i[u]?l[u]={name:"微信支付",value:i[u],img:"/static/image/wei.png"}:"alipay"==i[u]&&(l[u]={name:"支付宝支付",value:i[u],img:"/static/image/ali.png"});t&&"function"==typeof t&&t(l)}else t&&"function"==typeof t&&t(a)}})}};function o(e){return e}e.exports=a}).call(this,r("5a52")["default"])},"51a0":function(e,t,r){"use strict";function n(e){var t,r,n;return e<128?[e]:e<2048?(t=192+(e>>6),r=128+(63&e),[t,r]):(t=224+(e>>12),r=128+(e>>6&63),n=128+(63&e),[t,r,n])}function a(e){for(var t=[],r=0;r<e.length;r++)for(var a=e.charCodeAt(r),o=n(a),i=0;i<o.length;i++)t.push(o[i]);return t}function o(e,t){this.typeNumber=-1,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.rsBlocks=null,this.totalDataCount=-1,this.data=e,this.utf8bytes=a(e),this.make()}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,o.prototype={constructor:o,getModuleCount:function(){return this.moduleCount},make:function(){this.getRightType(),this.dataCache=this.createData(),this.createQrcode()},makeImpl:function(e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++)this.modules[t]=new Array(this.moduleCount);this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(!0,e),this.typeNumber>=7&&this.setupTypeNumber(!0),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},createQrcode:function(){for(var e=0,t=0,r=null,n=0;n<8;n++){this.makeImpl(n);var a=u.getLostPoint(this);(0==n||e>a)&&(e=a,t=n,r=this.modules)}this.modules=r,this.setupTypeInfo(!1,t),this.typeNumber>=7&&this.setupTypeNumber(!1)},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0,null==this.modules[6][e]&&(this.modules[6][e]=e%2==0))},setupPositionAdjustPattern:function(){for(var e=u.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],a=e[r];if(null==this.modules[n][a])for(var o=-2;o<=2;o++)for(var i=-2;i<=2;i++)this.modules[n+o][a+i]=-2==o||2==o||-2==i||2==i||0==o&&0==i}},setupTypeNumber:function(e){for(var t=u.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&1==(t>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n,this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=i[this.errorCorrectLevel]<<3|t,n=u.getBCHTypeInfo(r),a=0;a<15;a++){var o=!e&&1==(n>>a&1);a<6?this.modules[a][8]=o:a<8?this.modules[a+1][8]=o:this.modules[this.moduleCount-15+a][8]=o;o=!e&&1==(n>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=o:a<9?this.modules[8][15-a-1+1]=o:this.modules[8][15-a-1]=o}this.modules[this.moduleCount-8][8]=!e},createData:function(){var e=new g,t=this.typeNumber>9?16:8;e.put(4,4),e.put(this.utf8bytes.length,t);for(var r=0,n=this.utf8bytes.length;r<n;r++)e.put(this.utf8bytes[r],8);e.length+4<=8*this.totalDataCount&&e.put(0,4);while(e.length%8!=0)e.putBit(!1);while(1){if(e.length>=8*this.totalDataCount)break;if(e.put(o.PAD0,8),e.length>=8*this.totalDataCount)break;e.put(o.PAD1,8)}return this.createBytes(e)},createBytes:function(e){for(var t=0,r=0,n=0,a=this.rsBlock.length/3,o=new Array,i=0;i<a;i++)for(var l=this.rsBlock[3*i+0],s=this.rsBlock[3*i+1],f=this.rsBlock[3*i+2],d=0;d<l;d++)o.push([f,s]);for(var g=new Array(o.length),h=new Array(o.length),m=0;m<o.length;m++){var b=o[m][0],p=o[m][1]-b;r=Math.max(r,b),n=Math.max(n,p),g[m]=new Array(b);for(i=0;i<g[m].length;i++)g[m][i]=255&e.buffer[i+t];t+=b;var y=u.getErrorCorrectPolynomial(p),v=new c(g[m],y.getLength()-1),w=v.mod(y);h[m]=new Array(y.getLength()-1);for(i=0;i<h[m].length;i++){var x=i+w.getLength()-h[m].length;h[m][i]=x>=0?w.get(x):0}}var k=new Array(this.totalDataCount),S=0;for(i=0;i<r;i++)for(m=0;m<o.length;m++)i<g[m].length&&(k[S++]=g[m][i]);for(i=0;i<n;i++)for(m=0;m<o.length;m++)i<h[m].length&&(k[S++]=h[m][i]);return k},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,a=7,o=0,i=this.moduleCount-1;i>0;i-=2){6==i&&i--;while(1){for(var l=0;l<2;l++)if(null==this.modules[n][i-l]){var s=!1;o<e.length&&(s=1==(e[o]>>>a&1));var f=u.getMask(t,n,i-l);f&&(s=!s),this.modules[n][i-l]=s,a--,-1==a&&(o++,a=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}}},o.PAD0=236,o.PAD1=17;for(var i=[1,0,3,2],l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},u={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){var t=e<<10;while(u.getBCHDigit(t)-u.getBCHDigit(u.G15)>=0)t^=u.G15<<u.getBCHDigit(t)-u.getBCHDigit(u.G15);return(e<<10|t)^u.G15_MASK},getBCHTypeNumber:function(e){var t=e<<12;while(u.getBCHDigit(t)-u.getBCHDigit(u.G18)>=0)t^=u.G18<<u.getBCHDigit(t)-u.getBCHDigit(u.G18);return e<<12|t},getBCHDigit:function(e){var t=0;while(0!=e)t++,e>>>=1;return t},getPatternPosition:function(e){return u.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case l.PATTERN000:return(t+r)%2==0;case l.PATTERN001:return t%2==0;case l.PATTERN010:return r%3==0;case l.PATTERN011:return(t+r)%3==0;case l.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case l.PATTERN101:return t*r%2+t*r%3==0;case l.PATTERN110:return(t*r%2+t*r%3)%2==0;case l.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new c([1],0),r=0;r<e;r++)t=t.multiply(new c([1,s.gexp(r)],0));return t},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0,a=0;a<t;a++)for(var o=0,i=e.modules[a][0],l=0;l<t;l++){var u=e.modules[a][l];if(l<t-6&&u&&!e.modules[a][l+1]&&e.modules[a][l+2]&&e.modules[a][l+3]&&e.modules[a][l+4]&&!e.modules[a][l+5]&&e.modules[a][l+6]&&(l<t-10?e.modules[a][l+7]&&e.modules[a][l+8]&&e.modules[a][l+9]&&e.modules[a][l+10]&&(r+=40):l>3&&e.modules[a][l-1]&&e.modules[a][l-2]&&e.modules[a][l-3]&&e.modules[a][l-4]&&(r+=40)),a<t-1&&l<t-1){var s=0;u&&s++,e.modules[a+1][l]&&s++,e.modules[a][l+1]&&s++,e.modules[a+1][l+1]&&s++,0!=s&&4!=s||(r+=3)}i^u?o++:(i=u,o>=5&&(r+=3+o-5),o=1),u&&n++}for(l=0;l<t;l++)for(o=0,i=e.modules[0][l],a=0;a<t;a++){u=e.modules[a][l];a<t-6&&u&&!e.modules[a+1][l]&&e.modules[a+2][l]&&e.modules[a+3][l]&&e.modules[a+4][l]&&!e.modules[a+5][l]&&e.modules[a+6][l]&&(a<t-10?e.modules[a+7][l]&&e.modules[a+8][l]&&e.modules[a+9][l]&&e.modules[a+10][l]&&(r+=40):a>3&&e.modules[a-1][l]&&e.modules[a-2][l]&&e.modules[a-3][l]&&e.modules[a-4][l]&&(r+=40)),i^u?o++:(i=u,o>=5&&(r+=3+o-5),o=1)}var f=Math.abs(100*n/t/t-50)/5;return r+=10*f,r}},s={glog:function(e){if(e<1)throw new Error("glog("+e+")");return s.LOG_TABLE[e]},gexp:function(e){while(e<0)e+=255;while(e>=256)e-=255;return s.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;f<8;f++)s.EXP_TABLE[f]=1<<f;for(f=8;f<256;f++)s.EXP_TABLE[f]=s.EXP_TABLE[f-4]^s.EXP_TABLE[f-5]^s.EXP_TABLE[f-6]^s.EXP_TABLE[f-8];for(f=0;f<255;f++)s.LOG_TABLE[s.EXP_TABLE[f]]=f;function c(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);var r=0;while(r<e.length&&0==e[r])r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}c.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=s.gexp(s.glog(this.get(r))+s.glog(e.get(n)));return new c(t,0)},mod:function(e){var t=this.getLength(),r=e.getLength();if(t-r<0)return this;for(var n=new Array(t),a=0;a<t;a++)n[a]=this.get(a);while(n.length>=r){var o=s.glog(n[0])-s.glog(e.get(0));for(a=0;a<e.getLength();a++)n[a]^=s.gexp(s.glog(e.get(a))+o);while(0==n[0])n.shift()}return new c(n,0)}};var d=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];function g(){this.buffer=new Array,this.length=0}o.prototype.getRightType=function(){for(var e=1;e<41;e++){var t=d[4*(e-1)+this.errorCorrectLevel];if(void 0==t)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+this.errorCorrectLevel);for(var r=t.length/3,n=0,a=0;a<r;a++){var o=t[3*a+0],i=t[3*a+2];n+=i*o}var l=e>9?2:1;if(this.utf8bytes.length+l<n||40==e){this.typeNumber=e,this.rsBlock=t,this.totalDataCount=n;break}}},g.prototype={get:function(e){var t=Math.floor(e/8);return this.buffer[t]>>>7-e%8&1},put:function(e,t){for(var r=0;r<t;r++)this.putBit(e>>>t-r-1&1)},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}},"542d":function(e,t,r){"use strict";var n=r("23e7"),a=r("d039"),o=r("408a"),i=1..toPrecision,l=a((function(){return"1"!==i.call(1,void 0)}))||!a((function(){i.call({})}));n({target:"Number",proto:!0,forced:l},{toPrecision:function(e){return void 0===e?i.call(o(this)):i.call(o(this),e)}})},a872:function(e,t,r){"use strict";function n(e){if(0===e.indexOf("_www")||0===e.indexOf("_doc")||0===e.indexOf("_documents")||0===e.indexOf("_downloads"))return e;if(0===e.indexOf("file://"))return e;if(0===e.indexOf("/storage/emulated/0/"))return e;if(0===e.indexOf("/")){var t=plus.io.convertAbsoluteFileSystem(e);if(t!==e)return t;e=e.substr(1)}return"_www/"+e}function a(e){return new Promise((function(t,r){if("object"===typeof window&&"document"in window){if("function"===typeof FileReader){var a=new XMLHttpRequest;return a.open("GET",e,!0),a.responseType="blob",a.onload=function(){if(200===this.status){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=r,e.readAsDataURL(this.response)}},a.onerror=r,void a.send()}var o=document.createElement("canvas"),i=o.getContext("2d"),l=new Image;return l.onload=function(){o.width=l.width,o.height=l.height,i.drawImage(l,0,0),t(o.toDataURL()),o.height=o.width=0},l.onerror=r,void(l.src=e)}"object"!==typeof plus?"object"===typeof wx&&wx.canIUse("getFileSystemManager")?wx.getFileSystemManager().readFile({filePath:e,encoding:"base64",success:function(e){t("data:image/png;base64,"+e.data)},fail:function(e){r(e)}}):r(new Error("not support")):plus.io.resolveLocalFileSystemURL(n(e),(function(e){e.file((function(e){var n=new plus.io.FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e)},n.readAsDataURL(e)}),(function(e){r(e)}))}),(function(e){r(e)}))}))}function o(e){return new Promise((function(t,r){if("object"===typeof window&&"document"in window){e=e.split(",");var n=e[0].match(/:(.*?);/)[1],a=atob(e[1]),o=a.length,i=new Uint8Array(o);while(o--)i[o]=a.charCodeAt(o);return t((window.URL||window.webkitURL).createObjectURL(new Blob([i],{type:n})))}var l=e.match(/data\:\S+\/(\S+);/);l?l=l[1]:r(new Error("base64 error"));var u=Date.now()+"."+l;if("object"!==typeof plus)if("object"===typeof wx&&wx.canIUse("getFileSystemManager")){var s=wx.env.USER_DATA_PATH+"/"+u;wx.getFileSystemManager().writeFile({filePath:s,data:e.replace(/^data:\S+\/\S+;base64,/,""),encoding:"base64",success:function(){t(s)},fail:function(e){r(e)}})}else r(new Error("not support"));else{var f=new plus.nativeObj.Bitmap("bitmap"+Date.now());f.loadBase64Data(e,(function(){var e="_doc/uniapp_temp/"+u;f.save(e,{},(function(){f.clear(),t(e)}),(function(e){f.clear(),r(e)}))}),(function(e){f.clear(),r(e)}))}}))}r("c975"),r("ace4"),r("d3b7"),r("ac1f"),r("3ca3"),r("466d"),r("5319"),r("1276"),r("5cc6"),r("9a8c"),r("a975"),r("735e"),r("c1ac"),r("d139"),r("3a7b"),r("d5d6"),r("82f8"),r("e91f"),r("60bd"),r("5f96"),r("3280"),r("3fcc"),r("ca91"),r("25a1"),r("cd26"),r("3c5d"),r("2954"),r("649e"),r("219c"),r("170b"),r("b39a"),r("72f7"),r("ddb0"),r("2b3d"),Object.defineProperty(t,"__esModule",{value:!0}),t.pathToBase64=a,t.base64ToPath=o},cb29:function(e,t,r){var n=r("23e7"),a=r("81d5"),o=r("44d2");n({target:"Array",proto:!0},{fill:a}),o("fill")}}]);