r?r:o.activeWidth;var a=t.area[0],s=t.height-t.area[2];i.beginPath(),i.setFillStyle(h(o.activeBgColor,o.activeBgOpacity)),i.rect(e-o.activeWidth/2,a,o.activeWidth,s-a),i.closePath(),i.fill(),i.setFillStyle("#FFFFFF")}function Re(e,t,n,i,r){var o=u({},{activeBgColor:"#000000",activeBgOpacity:.08},t.extra.bar),a=t.area[3],s=t.width-t.area[1];i.beginPath(),i.setFillStyle(h(o.activeBgColor,o.activeBgOpacity)),i.rect(a,e-r/2,s-a,r),i.closePath(),i.fill(),i.setFillStyle("#FFFFFF")}function je(e,t,n,i,r,o,a){var s=u({},{showBox:!0,showArrow:!0,showCategory:!1,bgColor:"#000000",bgOpacity:.7,borderColor:"#000000",borderWidth:0,borderRadius:0,borderOpacity:.7,fontColor:"#FFFFFF",splitLine:!0},n.extra.tooltip);1==s.showCategory&&n.categories&&e.unshift({text:n.categories[n.tooltip.index],color:null});var c=4*n.pix,l=5*n.pix,d=s.showArrow?8*n.pix:0,f=!1;"line"!=n.type&&"mount"!=n.type&&"area"!=n.type&&"candle"!=n.type&&"mix"!=n.type||1==s.splitLine&&Me(n.tooltip.offset.x,n,i,r),t=u({x:0,y:0},t),t.y-=8*n.pix;var p=e.map((function(e){return S(e.text,i.fontSize,r)})),g=c+l+4*i.toolTipPadding+Math.max.apply(null,p),v=2*i.toolTipPadding+e.length*i.toolTipLineHeight;if(0!=s.showBox){t.x-Math.abs(n._scrollDistance_||0)+d+g>n.width&&(f=!0),v+t.y>n.height&&(t.y=n.height-v),r.beginPath(),r.setFillStyle(h(s.bgColor||i.toolTipBackground,s.bgOpacity||i.toolTipOpacity)),r.setLineWidth(s.borderWidth*n.pix),r.setStrokeStyle(h(s.borderColor,s.borderOpacity));var y=s.borderRadius;f?(s.showArrow&&(r.moveTo(t.x,t.y+10*n.pix),r.lineTo(t.x-d,t.y+10*n.pix+5*n.pix)),r.arc(t.x-d-y,t.y+v-y,y,0,Math.PI/2,!1),r.arc(t.x-d-Math.round(g)+y,t.y+v-y,y,Math.PI/2,Math.PI,!1),r.arc(t.x-d-Math.round(g)+y,t.y+y,y,-Math.PI,-Math.PI/2,!1),r.arc(t.x-d-y,t.y+y,y,-Math.PI/2,0,!1),s.showArrow&&(r.lineTo(t.x-d,t.y+10*n.pix-5*n.pix),r.lineTo(t.x,t.y+10*n.pix))):(s.showArrow&&(r.moveTo(t.x,t.y+10*n.pix),r.lineTo(t.x+d,t.y+10*n.pix-5*n.pix)),r.arc(t.x+d+y,t.y+y,y,-Math.PI,-Math.PI/2,!1),r.arc(t.x+d+Math.round(g)-y,t.y+y,y,-Math.PI/2,0,!1),r.arc(t.x+d+Math.round(g)-y,t.y+v-y,y,0,Math.PI/2,!1),r.arc(t.x+d+y,t.y+v-y,y,Math.PI/2,Math.PI,!1),s.showArrow&&(r.lineTo(t.x+d,t.y+10*n.pix+5*n.pix),r.lineTo(t.x,t.y+10*n.pix))),r.closePath(),r.fill(),s.borderWidth>0&&r.stroke(),e.forEach((function(e,n){if(null!==e.color){r.beginPath(),r.setFillStyle(e.color);var o=t.x+d+2*i.toolTipPadding,a=t.y+(i.toolTipLineHeight-i.fontSize)/2+i.toolTipLineHeight*n+i.toolTipPadding+1;f&&(o=t.x-g-d+2*i.toolTipPadding),r.fillRect(o,a,c,i.fontSize),r.closePath()}})),e.forEach((function(e,n){var o=t.x+d+2*i.toolTipPadding+c+l;f&&(o=t.x-g-d+2*i.toolTipPadding+ +c+l);var a=t.y+(i.toolTipLineHeight-i.fontSize)/2+i.toolTipLineHeight*n+i.toolTipPadding;r.beginPath(),r.setFontSize(i.fontSize),r.setFillStyle(s.fontColor),r.fillText(e.text,o,a+i.fontSize),r.closePath(),r.stroke()}))}}function Ke(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=u({},{type:"group",width:c/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.column),d=[];r.save();var f=-2,p=s.length+2;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),f=Math.floor(-t._scrollDistance_/c)-2,p=f+t.xAxis.itemCount+4),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===o&&Ie(t.tooltip.offset.x,t,n,r,c),l.customColor=w(l.linearType,l.customColor,e,n),e.forEach((function(a,u){var g,v,y;g=[].concat(t.chartData.yAxisData.ranges[a.index]),v=g.pop(),y=g.shift();var m=a.data;switch(l.type){case"group":var x=pe(m,v,y,s,c,t,n,o),A=ye(m,v,y,s,c,t,n,u,e,o);d.push(A),x=se(x,c,e.length,u,n,t);for(var b=0;bf&&bj?j:E,L=L>j?j:L,I=I>j?j:I,R=R>j?j:R,E=E<0?0:E,L=L<0?0:L,I=I<0?0:I,R=R<0?0:R,r.arc(C+E,D+E,E,-Math.PI,-Math.PI/2),r.arc(C+_-L,D+L,L,-Math.PI/2,0),r.arc(C+_-I,D+F-I,I,0,Math.PI/2),r.arc(C+R,D+F-R,R,Math.PI/2,Math.PI)}else r.moveTo(k,w.y),r.lineTo(k+w.width,w.y),r.lineTo(k+w.width,t.height-t.area[2]),r.lineTo(k,t.height-t.area[2]),r.lineTo(k,w.y),r.setLineWidth(1),r.setStrokeStyle(O);r.setFillStyle(T),r.closePath(),r.fill()}}break;case"stack":x=ye(m,v,y,s,c,t,n,u,e,o);d.push(x),x=ue(x,c,e.length,u,n,t,e);for(var K=0;Kf&&K0&&(S-=B),r.setFillStyle(T),r.moveTo(k,z.y),r.fillRect(k,z.y,z.width,S),r.closePath(),r.fill()}}break;case"meter":x=pe(m,v,y,s,c,t,n,o);d.push(x),x=le(x,c,e.length,u,n,t,l.meterBorder);for(var U=0;Uf&&U0&&(r.setStrokeStyle(a.color),r.setLineWidth(l.meterBorder*t.pix)),0==u?r.setFillStyle(l.meterFillColor):r.setFillStyle(N.color||a.color);k=N.x-N.width/2,S=t.height-N.y-t.area[2];if(l.barBorderRadius&&4===l.barBorderRadius.length||!0===l.barBorderCircle){var H=k,W=N.y,Z=N.width,G=t.height-t.area[2]-N.y;l.barBorderCircle&&(l.barBorderRadius=[Z/2,Z/2,0,0]);var X=i(l.barBorderRadius,4),V=X[0],q=X[1],Q=X[2],J=X[3],Y=Math.min(Z/2,G/2);V=V>Y?Y:V,q=q>Y?Y:q,Q=Q>Y?Y:Q,J=J>Y?Y:J,V=V<0?0:V,q=q<0?0:q,Q=Q<0?0:Q,J=J<0?0:J,r.arc(H+V,W+V,V,-Math.PI,-Math.PI/2),r.arc(H+Z-q,W+q,q,-Math.PI/2,0),r.arc(H+Z-Q,W+G-Q,Q,0,Math.PI/2),r.arc(H+J,W+G-J,J,Math.PI/2,Math.PI),r.fill()}else r.moveTo(k,N.y),r.lineTo(k+N.width,N.y),r.lineTo(k+N.width,t.height-t.area[2]),r.lineTo(k,t.height-t.area[2]),r.lineTo(k,N.y),r.fill();0==u&&l.meterBorder>0&&(r.closePath(),r.stroke())}}break}})),!1!==t.dataLabel&&1===o&&e.forEach((function(i,a){var u,d,h;u=[].concat(t.chartData.yAxisData.ranges[i.index]),d=u.pop(),h=u.shift();var f=i.data;switch(l.type){case"group":var p=pe(f,d,h,s,c,t,n,o);p=se(p,c,e.length,a,n,t),Oe(p,i,n,r,t);break;case"stack":p=ye(f,d,h,s,c,t,n,a,e,o);Oe(p,i,n,r,t);break;case"meter":p=pe(f,d,h,s,c,t,n,o);Oe(p,i,n,r,t);break}})),r.restore(),{xAxisPoints:s,calPoints:d,eachSpacing:c}}function ze(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=u({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:!1,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mount);l.widthRatio=l.widthRatio<=0?0:l.widthRatio,l.widthRatio=l.widthRatio>=2?2:l.widthRatio;r.save();var d,f,p,g=-2,v=s.length+2;t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),g=Math.floor(-t._scrollDistance_/c)-2,v=g+t.xAxis.itemCount+4),l.customColor=w(l.linearType,l.customColor,e,n),d=[].concat(t.chartData.yAxisData.ranges[0]),f=d.pop(),p=d.shift();var y=ge(e,f,p,s,c,t,l,o);switch(l.type){case"bar":for(var m=0;mg&&mI?I:F,M=M>I?I:M,E=E>I?I:E,L=L>I?I:L,F=F<0?0:F,M=M<0?0:M,E=E<0?0:E,L=L<0?0:L,r.arc(O+F,P+F,F,-Math.PI,-Math.PI/2),r.arc(O+C-M,P+M,M,-Math.PI/2,0),r.arc(O+C-E,P+D-E,E,0,Math.PI/2),r.arc(O+L,P+D-L,L,Math.PI/2,Math.PI)}else r.moveTo(A,x.y),r.lineTo(A+x.width,x.y),r.lineTo(A+x.width,t.height-t.area[2]),r.lineTo(A,t.height-t.area[2]),r.lineTo(A,x.y);r.setStrokeStyle(S),r.setFillStyle(k),l.borderWidth>0&&(r.setLineWidth(l.borderWidth*t.pix),r.closePath(),r.stroke()),r.fill()}}break;case"triangle":for(var R=0;Rg&&R0&&(r.setLineWidth(l.borderWidth*t.pix),r.stroke()),r.fill()}}break;case"mount":for(var K=0;Kg&&K0&&(r.setLineWidth(l.borderWidth*t.pix),r.stroke()),r.fill()}}break;case"sharp":for(var B=0;Bg&&B0&&(r.setLineWidth(l.borderWidth*t.pix),r.stroke()),r.fill()}}break}if(!1!==t.dataLabel&&1===o){var N,H,W;N=[].concat(t.chartData.yAxisData.ranges[0]),H=N.pop(),W=N.shift();y=ge(e,H,W,s,c,t,l,o);Pe(y,e,n,r,t)}return r.restore(),{xAxisPoints:s,calPoints:y,eachSpacing:c}}function Be(e,t,n,r){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=[],s=(t.height-t.area[0]-t.area[2])/t.categories.length,c=0;cf&&bj?j:E,L=L>j?j:L,I=I>j?j:I,R=R>j?j:R,E=E<0?0:E,L=L<0?0:L,I=I<0?0:I,R=R<0?0:R,r.arc(C+R,_+R,R,-Math.PI,-Math.PI/2),r.arc(w.x-E,_+E,E,-Math.PI/2,0),r.arc(w.x-L,_+D-L,L,0,Math.PI/2),r.arc(C+I,_+D-I,I,Math.PI/2,Math.PI)}else r.moveTo(k,S),r.lineTo(w.x,S),r.lineTo(w.x,S+w.width),r.lineTo(k,S+w.width),r.lineTo(k,S),r.setLineWidth(1),r.setStrokeStyle(O);r.setFillStyle(T),r.closePath(),r.fill()}}break;case"stack":x=me(m,v,y,a,s,t,n,u,e,o);d.push(x),x=de(x,s,e.length,u,n,t,e);for(var K=0;Kf&&K5&&void 0!==arguments[5]?arguments[5]:1,a=u({},{color:{},average:{}},n.extra.candle);a.color=u({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},a.color),a.average=u({},{show:!1,name:[],day:[],color:i.color},a.average),n.extra.candle=a;var s=n.chartData.xAxisData,c=s.xAxisPoints,l=s.eachSpacing,d=[];r.save();var h=-2,f=c.length+2,p=0,g=n.width+l;return n._scrollDistance_&&0!==n._scrollDistance_&&!0===n.enableScroll&&(r.translate(n._scrollDistance_,0),h=Math.floor(-n._scrollDistance_/l)-2,f=h+n.xAxis.itemCount+4,p=-n._scrollDistance_-2*l+n.area[3],g=p+(n.xAxis.itemCount+4)*l),(a.average.show||t)&&t.forEach((function(e,t){var a,s,u;a=[].concat(n.chartData.yAxisData.ranges[e.index]),s=a.pop(),u=a.shift();for(var d=e.data,h=pe(d,s,u,c,l,n,i,o),f=X(h,e),v=0;vp&&(r.moveTo(b.x,b.y),x=1),A>0&&b.x>p&&b.xh&&m0?(r.setStrokeStyle(a.color.upLine),r.setFillStyle(a.color.upFill),r.setLineWidth(1*n.pix),r.moveTo(x[3].x,x[3].y),r.lineTo(x[1].x,x[1].y),r.lineTo(x[1].x-l/4,x[1].y),r.lineTo(x[0].x-l/4,x[0].y),r.lineTo(x[0].x,x[0].y),r.lineTo(x[2].x,x[2].y),r.lineTo(x[0].x,x[0].y),r.lineTo(x[0].x+l/4,x[0].y),r.lineTo(x[1].x+l/4,x[1].y),r.lineTo(x[1].x,x[1].y),r.moveTo(x[3].x,x[3].y)):(r.setStrokeStyle(a.color.downLine),r.setFillStyle(a.color.downFill),r.setLineWidth(1*n.pix),r.moveTo(x[3].x,x[3].y),r.lineTo(x[0].x,x[0].y),r.lineTo(x[0].x-l/4,x[0].y),r.lineTo(x[1].x-l/4,x[1].y),r.lineTo(x[1].x,x[1].y),r.lineTo(x[2].x,x[2].y),r.lineTo(x[1].x,x[1].y),r.lineTo(x[1].x+l/4,x[1].y),r.lineTo(x[0].x+l/4,x[0].y),r.lineTo(x[0].x,x[0].y),r.moveTo(x[3].x,x[3].y)),r.closePath(),r.fill(),r.stroke()}})),r.restore(),{xAxisPoints:c,calPoints:d,eachSpacing:l}}function Ne(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},t.extra.area),a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=t.height-t.area[2],d=[];i.save();var f=0,p=t.width+c;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),f=-t._scrollDistance_-2*c+t.area[3],p=f+(t.xAxis.itemCount+4)*c),e.forEach((function(e,a){var u,g,v;u=[].concat(t.chartData.yAxisData.ranges[e.index]),g=u.pop(),v=u.shift();var m=e.data,x=pe(m,g,v,s,c,t,n,r);d.push(x);for(var A=X(x,e),b=0;b1){var S=w[0],T=w[w.length-1];i.moveTo(S.x,S.y);var O=0;if("curve"===o.type)for(var P=0;Pf&&(i.moveTo(C.x,C.y),O=1),P>0&&C.x>f&&C.xf&&(i.moveTo(F.x,F.y),O=1),_>0&&F.x>f&&F.x
f&&(i.moveTo(E.x,E.y),O=1),M>0&&E.x>f&&E.x
f&&(i.moveTo(K.x,K.y),R=1),j>0&&K.x>f&&K.x
f&&(i.moveTo(U.x,U.y),R=1),B>0&&U.x>f&&U.x
f&&(i.moveTo(H.x,H.y),R=1),N>0&&H.x>f&&H.x
4&&void 0!==arguments[4]?arguments[4]:1,o=(u({},{type:"circle"},t.extra.scatter),t.chartData.xAxisData),a=o.xAxisPoints,s=o.eachSpacing,c=[];i.save();var l=0;t.width;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),l=-t._scrollDistance_-2*s+t.area[3],l+(t.xAxis.itemCount+4)*s),e.forEach((function(e,o){var c,l,u;c=[].concat(t.chartData.yAxisData.ranges[e.index]),l=c.pop(),u=c.shift();var d=e.data,h=pe(d,l,u,a,s,t,n,r);i.beginPath(),i.setStrokeStyle(e.color),i.setFillStyle(e.color),i.setLineWidth(1*t.pix);var f=e.pointShape;if("diamond"===f)h.forEach((function(e,t){null!==e&&(i.moveTo(e.x,e.y-4.5),i.lineTo(e.x-4.5,e.y),i.lineTo(e.x,e.y+4.5),i.lineTo(e.x+4.5,e.y),i.lineTo(e.x,e.y-4.5))}));else if("circle"===f)h.forEach((function(e,n){null!==e&&(i.moveTo(e.x+2.5*t.pix,e.y),i.arc(e.x,e.y,3*t.pix,0,2*Math.PI,!1))}));else if("square"===f)h.forEach((function(e,t){null!==e&&(i.moveTo(e.x-3.5,e.y-3.5),i.rect(e.x-3.5,e.y-3.5,7,7))}));else if("triangle"===f)h.forEach((function(e,t){null!==e&&(i.moveTo(e.x,e.y-4.5),i.lineTo(e.x-4.5,e.y+4.5),i.lineTo(e.x+4.5,e.y+4.5),i.lineTo(e.x,e.y-4.5))}));else if("triangle"===f)return;i.closePath(),i.fill(),i.stroke()})),!1!==t.dataLabel&&1===r&&e.forEach((function(e,o){var c,l,u;c=[].concat(t.chartData.yAxisData.ranges[e.index]),l=c.pop(),u=c.shift();var d=e.data,h=pe(d,l,u,a,s,t,n,r);Oe(h,e,n,i,t)})),i.restore(),{xAxisPoints:a,calPoints:c,eachSpacing:s}}function We(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{opacity:1,border:2},t.extra.bubble),a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=[];i.save();var d=0;t.width;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),d=-t._scrollDistance_-2*c+t.area[3],d+(t.xAxis.itemCount+4)*c),e.forEach((function(a,l){var u,d,f;u=[].concat(t.chartData.yAxisData.ranges[a.index]),d=u.pop(),f=u.shift();var p=a.data,g=pe(p,d,f,s,c,t,n,r);i.beginPath(),i.setStrokeStyle(a.color),i.setLineWidth(o.border*t.pix),i.setFillStyle(h(a.color,o.opacity)),g.forEach((function(e,n){i.moveTo(e.x+e.r,e.y),i.arc(e.x,e.y,e.r*t.pix,0,2*Math.PI,!1)})),i.closePath(),i.fill(),i.stroke(),!1!==t.dataLabel&&1===r&&g.forEach((function(r,o){i.beginPath();var a=e.textSize*t.pix||n.fontSize;i.setFontSize(a),i.setFillStyle(e.textColor||"#FFFFFF"),i.setTextAlign("center"),i.fillText(String(r.t),r.x,r.y+a/2),i.closePath(),i.stroke(),i.setTextAlign("left")}))})),i.restore(),{xAxisPoints:s,calPoints:l,eachSpacing:c}}function Ze(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"straight",width:2},t.extra.line);o.width*=t.pix;var a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=[];i.save();var d=0,h=t.width+c;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),d=-t._scrollDistance_-2*c+t.area[3],h=d+(t.xAxis.itemCount+4)*c),e.forEach((function(e,a){var u,f,p;u=[].concat(t.chartData.yAxisData.ranges[e.index]),f=u.pop(),p=u.shift();var g=e.data,v=pe(g,f,p,s,c,t,n,r);l.push(v);var m=X(v,e);if("dash"==e.lineType){var x=e.dashLength?e.dashLength:8;x*=t.pix,i.setLineDash([x,x])}i.beginPath(),i.setStrokeStyle(e.color),i.setLineWidth(o.width),m.forEach((function(e,t){if(1===e.length)i.moveTo(e[0].x,e[0].y),i.arc(e[0].x,e[0].y,1,0,2*Math.PI);else{i.moveTo(e[0].x,e[0].y);var n=0;if("curve"===o.type)for(var r=0;rd&&(i.moveTo(a.x,a.y),n=1),r>0&&a.x>d&&a.xd&&(i.moveTo(l.x,l.y),n=1),c>0&&l.x>d&&l.xd&&(i.moveTo(f.x,f.y),n=1),u>0&&f.x>d&&f.x4&&void 0!==arguments[4]?arguments[4]:1,a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=u({},{width:c/2,barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mix.column),d=u({},{opacity:.2,gradient:!1},t.extra.mix.area),f=t.height-t.area[2],p=[],g=0,v=0;e.forEach((function(e,t){"column"==e.type&&(v+=1)})),r.save();var m=-2,x=s.length+2,A=0,b=t.width+c;if(t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),m=Math.floor(-t._scrollDistance_/c)-2,x=m+t.xAxis.itemCount+4,A=-t._scrollDistance_-2*c+t.area[3],b=A+(t.xAxis.itemCount+4)*c),l.customColor=w(l.linearType,l.customColor,e,n),e.forEach((function(e,a){var u,w,k;u=[].concat(t.chartData.yAxisData.ranges[e.index]),w=u.pop(),k=u.shift();var S=e.data,T=pe(S,w,k,s,c,t,n,o);if(p.push(T),"column"==e.type){T=se(T,c,v,g,n,t);for(var O=0;Om&&OU?U:j,K=K>U?U:K,z=z>U?U:z,B=B>U?U:B,j=j<0?0:j,K=K<0?0:K,z=z<0?0:z,B=B<0?0:B,r.arc(M+j,E+j,j,-Math.PI,-Math.PI/2),r.arc(M+L-K,E+K,K,-Math.PI/2,0),r.arc(M+L-z,E+I-z,z,0,Math.PI/2),r.arc(M+B,E+I-B,B,Math.PI/2,Math.PI)}else r.moveTo(C,P.y),r.lineTo(C+P.width,P.y),r.lineTo(C+P.width,t.height-t.area[2]),r.lineTo(C,t.height-t.area[2]),r.lineTo(C,P.y),r.setLineWidth(1),r.setStrokeStyle(_);r.setFillStyle(D),r.closePath(),r.fill()}}g+=1}if("area"==e.type)for(var N=X(T,e),H=0;H1){var G=W[0],V=W[W.length-1];r.moveTo(G.x,G.y);var q=0;if("curve"===e.style)for(var Q=0;QA&&(r.moveTo(J.x,J.y),q=1),Q>0&&J.x>A&&J.xA&&(r.moveTo(ee.x,ee.y),q=1),$>0&&ee.x>A&&ee.xA&&(r.moveTo(c.x,c.y),a=1),s>0&&c.x>A&&c.xA&&(r.moveTo(d.x,d.y),a=1),u>0&&d.x>A&&d.x1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),p+=(t.extra.mount.widthRatio-1)*c);var g=f*f/p,v=0;t._scrollDistance_&&(v=-t._scrollDistance_*f/p),i.beginPath(),i.setLineCap("round"),i.setLineWidth(6*t.pix),i.setStrokeStyle(t.xAxis.scrollBackgroundColor||"#EFEBEF"),i.moveTo(a,h),i.lineTo(s,h),i.stroke(),i.closePath(),i.beginPath(),i.setLineCap("round"),i.setLineWidth(6*t.pix),i.setStrokeStyle(t.xAxis.scrollColor||"#A6A6A6"),i.moveTo(a+v,h),i.lineTo(a+v+g,h),i.stroke(),i.closePath(),i.setLineCap("butt")}if(i.save(),t._scrollDistance_&&0!==t._scrollDistance_&&i.translate(t._scrollDistance_,0),!0===t.xAxis.calibration&&(i.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),i.setLineCap("butt"),i.setLineWidth(1*t.pix),o.forEach((function(e,n){n>0&&(i.beginPath(),i.moveTo(e-c/2,u),i.lineTo(e-c/2,u+3*t.pix),i.closePath(),i.stroke())}))),!0!==t.xAxis.disableGrid&&(i.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),i.setLineCap("butt"),i.setLineWidth(1*t.pix),"dash"==t.xAxis.gridType&&i.setLineDash([t.xAxis.dashLength*t.pix,t.xAxis.dashLength*t.pix]),t.xAxis.gridEval=t.xAxis.gridEval||1,o.forEach((function(e,n){n%t.xAxis.gridEval==0&&(i.beginPath(),i.moveTo(e,u),i.lineTo(e,d),i.stroke())})),i.setLineDash([])),!0!==t.xAxis.disabled){var y=e.length;t.xAxis.labelCount&&(y=t.xAxis.itemCount?Math.ceil(e.length/t.xAxis.itemCount*t.xAxis.labelCount):t.xAxis.labelCount,y-=1);for(var m=Math.ceil(e.length/y),x=[],A=e.length,b=0;b1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),l+=(t.extra.mount.widthRatio-1)*c);var u=a+l,d=[],h=1;!1===t.xAxis.axisLine&&(h=0);for(var f=h;f4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:!1,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},"pie"==t.type?t.extra.pie:t.extra.ring),a={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2};0==n.pieChartLinePadding&&(n.pieChartLinePadding=o.activeRadius*t.pix);var s=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);s=s<10?10:s,o.customRadius>0&&(s=o.customRadius*t.pix),e=$(e,s,r);var c=o.activeRadius*t.pix;if(o.customColor=w(o.linearType,o.customColor,e,n),e=e.map((function(e){return e._start_+=o.offsetAngle*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(i.beginPath(),i.setFillStyle(h(e.color,o.activeOpacity||.5)),i.moveTo(a.x,a.y),i.arc(a.x,a.y,e._radius_+c,e._start_,e._start_+2*e._proportion_*Math.PI),i.closePath(),i.fill()),i.beginPath(),i.setLineWidth(o.borderWidth*t.pix),i.lineJoin="round",i.setStrokeStyle(o.borderColor);var r,s=e.color;"custom"==o.linearType&&(r=i.createCircularGradient?i.createCircularGradient(a.x,a.y,e._radius_):i.createRadialGradient(a.x,a.y,0,a.x,a.y,e._radius_),r.addColorStop(0,h(o.customColor[e.linearIndex],1)),r.addColorStop(1,h(e.color,1)),s=r);i.setFillStyle(s),i.moveTo(a.x,a.y),i.arc(a.x,a.y,e._radius_,e._start_,e._start_+2*e._proportion_*Math.PI),i.closePath(),i.fill(),1==o.border&&i.stroke()})),"ring"===t.type){var l=.6*s;"number"===typeof o.ringWidth&&o.ringWidth>0&&(l=Math.max(0,s-o.ringWidth*t.pix)),i.beginPath(),i.setFillStyle(o.centerColor),i.moveTo(a.x,a.y),i.arc(a.x,a.y,l,0,2*Math.PI),i.closePath(),i.fill()}return!1!==t.dataLabel&&1===r&&Fe(e,t,n,i,s,a),1===r&&"ring"===t.type&&Te(t,n,i,a),{center:a,radius:s,series:e}}function $e(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},t.extra.rose);0==n.pieChartLinePadding&&(n.pieChartLinePadding=o.activeRadius*t.pix);var a={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},s=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);s=s<10?10:s;var c=o.minRadius||.5*s;e=te(e,o.type,c,s,r);var l=o.activeRadius*t.pix;return o.customColor=w(o.linearType,o.customColor,e,n),e=e.map((function(e){return e._start_+=(o.offsetAngle||0)*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(i.beginPath(),i.setFillStyle(h(e.color,o.activeOpacity||.5)),i.moveTo(a.x,a.y),i.arc(a.x,a.y,l+e._radius_,e._start_,e._start_+2*e._rose_proportion_*Math.PI),i.closePath(),i.fill()),i.beginPath(),i.setLineWidth(o.borderWidth*t.pix),i.lineJoin="round",i.setStrokeStyle(o.borderColor);var r,s=e.color;"custom"==o.linearType&&(r=i.createCircularGradient?i.createCircularGradient(a.x,a.y,e._radius_):i.createRadialGradient(a.x,a.y,0,a.x,a.y,e._radius_),r.addColorStop(0,h(o.customColor[e.linearIndex],1)),r.addColorStop(1,h(e.color,1)),s=r);i.setFillStyle(s),i.moveTo(a.x,a.y),i.arc(a.x,a.y,e._radius_,e._start_,e._start_+2*e._rose_proportion_*Math.PI),i.closePath(),i.fill(),1==o.border&&i.stroke()})),!1!==t.dataLabel&&1===r&&Fe(e,t,n,i,s,a),{center:a,radius:s,series:e}}function et(e,t,n,i){var r,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=u({},{startAngle:.75,endAngle:.25,type:"default",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},t.extra.arcbar);e=ne(e,s,a),r=s.centerX||s.centerY?{x:s.centerX?s.centerX:t.width/2,y:s.centerY?s.centerY:t.height/2}:{x:t.width/2,y:t.height/2},s.radius?o=s.radius:(o=Math.min(r.x,r.y),o-=5*t.pix,o-=s.width/2),o=o<10?10:o,s.customColor=w(s.linearType,s.customColor,e,n);for(var c=0;c5&&void 0!==arguments[5]?arguments[5]:1,a=u({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},n.extra.gauge);void 0==a.oldAngle&&(a.oldAngle=a.startAngle),void 0==a.oldData&&(a.oldData=0),e=re(e,a.startAngle,a.endAngle);var s={x:n.width/2,y:n.height/2},c=Math.min(s.x,s.y);c-=5*n.pix,c-=a.width/2,c=c<10?10:c;var l=c-a.width,d=0;if("progress"==a.type){var f=c-3*a.width;r.beginPath();var p=r.createLinearGradient(s.x,s.y-f,s.x,s.y+f);p.addColorStop("0",h(t[0].color,.3)),p.addColorStop("1.0",h("#FFFFFF",.1)),r.setFillStyle(p),r.arc(s.x,s.y,f,0,2*Math.PI,!1),r.fill(),r.setLineWidth(a.width),r.setStrokeStyle(h(t[0].color,.3)),r.setLineCap("round"),r.beginPath(),r.arc(s.x,s.y,l,a.startAngle*Math.PI,a.endAngle*Math.PI,!1),r.stroke(),d=a.startAngle-a.endAngle+1;a.splitLine.splitNumber;var g=d/a.splitLine.splitNumber/a.splitLine.childNumber,v=-c-.5*a.width-a.splitLine.fixRadius,y=-c-a.width-a.splitLine.fixRadius+a.splitLine.width;r.save(),r.translate(s.x,s.y),r.rotate((a.startAngle-1)*Math.PI);for(var m=a.splitLine.splitNumber*a.splitLine.childNumber+1,x=t[0].data*o,A=0;AA/m?r.setStrokeStyle(h(t[0].color,1)):r.setStrokeStyle(h(t[0].color,.3)),r.setLineWidth(3*n.pix),r.moveTo(v,0),r.lineTo(y,0),r.stroke(),r.rotate(g*Math.PI);r.restore(),t=ie(t,a,o),r.setLineWidth(a.width),r.setStrokeStyle(t[0].color),r.setLineCap("round"),r.beginPath(),r.arc(s.x,s.y,l,a.startAngle*Math.PI,t[0]._proportion_*Math.PI,!1),r.stroke();var b=c-2.5*a.width;r.save(),r.translate(s.x,s.y),r.rotate((t[0]._proportion_-1)*Math.PI),r.beginPath(),r.setLineWidth(a.width/3);var w=r.createLinearGradient(0,.6*-b,0,.6*b);w.addColorStop("0",h("#FFFFFF",0)),w.addColorStop("0.5",h(t[0].color,1)),w.addColorStop("1.0",h("#FFFFFF",0)),r.setStrokeStyle(w),r.arc(0,0,b,.85*Math.PI,1.15*Math.PI,!1),r.stroke(),r.beginPath(),r.setLineWidth(1),r.setStrokeStyle(t[0].color),r.setFillStyle(t[0].color),r.moveTo(-b-a.width/3/2,-4),r.lineTo(-b-a.width/3/2-4,0),r.lineTo(-b-a.width/3/2,4),r.lineTo(-b-a.width/3/2,-4),r.stroke(),r.fill(),r.restore()}else{r.setLineWidth(a.width),r.setLineCap("butt");for(var k=0;k4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:!1,axisLabelTofix:0,labelColor:"#666666",labelPointShow:!1,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:!1,borderWidth:2,linearType:"none",customColor:[]},t.extra.radar),a=_(t.categories.length),s={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},c=(t.width-t.area[1]-t.area[3])/2,l=(t.height-t.area[0]-t.area[2])/2,d=Math.min(c-(D(t.categories,n.fontSize,i)+n.radarLabelTextMargin),l-n.radarLabelTextMargin);d-=n.radarLabelTextMargin*t.pix,d=d<10?10:d,i.beginPath(),i.setLineWidth(1*t.pix),i.setStrokeStyle(o.gridColor),a.forEach((function(e,t){var n=m(d*Math.cos(e),d*Math.sin(e),s);i.moveTo(s.x,s.y),t%o.gridEval==0&&i.lineTo(n.x,n.y)})),i.stroke(),i.closePath();for(var f=function(e){var n={};if(i.beginPath(),i.setLineWidth(1*t.pix),i.setStrokeStyle(o.gridColor),"radar"==o.gridType)a.forEach((function(t,r){var a=m(d/o.gridCount*e*Math.cos(t),d/o.gridCount*e*Math.sin(t),s);0===r?(n=a,i.moveTo(a.x,a.y)):i.lineTo(a.x,a.y)})),i.lineTo(n.x,n.y);else{var r=m(d/o.gridCount*e*Math.cos(1.5),d/o.gridCount*e*Math.sin(1.5),s);i.arc(s.x,s.y,s.y-r.y,0,2*Math.PI,!1)}i.stroke(),i.closePath()},p=1;p<=o.gridCount;p++)f(p);o.customColor=w(o.linearType,o.customColor,e,n);var g=Y(a,s,d,e,t,r);if(g.forEach((function(n,r){i.beginPath(),i.setLineWidth(o.borderWidth*t.pix),i.setStrokeStyle(n.color);var a,c=h(n.color,o.opacity);"custom"==o.linearType&&(a=i.createCircularGradient?i.createCircularGradient(s.x,s.y,d):i.createRadialGradient(s.x,s.y,0,s.x,s.y,d),a.addColorStop(0,h(o.customColor[e[r].linearIndex],o.opacity)),a.addColorStop(1,h(n.color,o.opacity)),c=a);if(i.setFillStyle(c),n.data.forEach((function(e,t){0===t?i.moveTo(e.position.x,e.position.y):i.lineTo(e.position.x,e.position.y)})),i.closePath(),i.fill(),!0===o.border&&i.stroke(),i.closePath(),!1!==t.dataPointShape){var l=n.data.map((function(e){return e.position}));Se(l,n.color,n.pointShape,i,t)}})),!0===o.axisLabel){var v=Math.max(o.max,Math.max.apply(null,T(e))),y=d/o.gridCount,x=t.fontSize*t.pix;i.setFontSize(x),i.setFillStyle(t.fontColor),i.setTextAlign("left");for(p=0;pl.x?n.xMax:l.x,n.yMin=n.yMinl.y?n.yMax:l.y}}return n}function ot(e,t,n,i,r,o){return{x:(t-n.xMin)*i+r,y:(n.yMax-e)*i+o}}function at(e,t,n,i,r,o){return{x:(t-r)/i+n.xMin,y:n.yMax-(e-o)/i}}function st(e,t,n){if(t[1]==n[1])return!1;if(t[1]>e[1]&&n[1]>e[1])return!1;if(t[1]e[1])return!1;if(n[1]==e[1]&&t[1]>e[1])return!1;if(t[0]t[o].area[2]||e[1]>t[o].area[3]||e[2]n||e[3]>i){r=!0;break}r=!1}return r}function ht(e,t,n){var i=e.series;switch(t){case"normal":for(var r=0;r.7},p=0;p4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"normal",autoColors:!0},t.extra.word);t.chartData.wordCloudData||(t.chartData.wordCloudData=ht(t,o.type,i)),i.beginPath(),i.setFillStyle(t.background),i.rect(0,0,t.width,t.height),i.fill(),i.save();var a=t.chartData.wordCloudData;i.translate(t.width/2,t.height/2);for(var s=0;s0&&(t.tooltip&&t.tooltip.index==s?i.strokeText(c,(a[s].areav[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].areav[1]+5+l-t.height/2)*r):i.fillText(c,(a[s].areav[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].areav[1]+5+l-t.height/2)*r)):a[s].area[0]>0&&(t.tooltip&&t.tooltip.index==s?i.strokeText(c,(a[s].area[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].area[1]+5+l-t.height/2)*r):i.fillText(c,(a[s].area[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].area[1]+5+l-t.height/2)*r)),i.stroke(),i.restore()}i.restore()}function pt(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right",linearType:"none",customColor:[]},t.extra.funnel),a=(t.height-t.area[0]-t.area[2])/e.length,s={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.height-t.area[2]},c=o.activeWidth*t.pix,l=Math.min((t.width-t.area[1]-t.area[3])/2-c,(t.height-t.area[0]-t.area[2])/2-c);if(e=ee(e,l,o.type,a,r),i.save(),i.translate(s.x,s.y),o.customColor=w(o.linearType,o.customColor,e,n),"pyramid"==o.type)for(var d=0;d0?m[T].width+t.yAxis.padding*t.pix:m[T].width,S+=1):"right"==m[T].position&&(t.area[1]+=k>0?m[T].width+t.yAxis.padding*t.pix:m[T].width,k+=1)}else n.yAxisWidth=m;if(t.chartData.yAxisData=y,t.categories&&t.categories.length&&"radar"!==t.type&&"gauge"!==t.type&&"bar"!==t.type){t.chartData.xAxisData=he(t.categories,t,n);var O=q(t.categories,t,n,t.chartData.xAxisData.eachSpacing,i),P=O.xAxisHeight,C=O.angle;n.xAxisHeight=P,n._xAxisTextAngle_=C,t.area[2]+=P,t.chartData.categoriesData=O}else if("line"===t.type||"area"===t.type||"scatter"===t.type||"bubble"===t.type||"bar"===t.type){t.chartData.xAxisData=J(o,t,n,i),a=t.chartData.xAxisData.rangesFormat;var D=q(a,t,n,t.chartData.xAxisData.eachSpacing,i),_=D.xAxisHeight,F=D.angle;n.xAxisHeight=_,n._xAxisTextAngle_=F,t.area[2]+=_,t.chartData.categoriesData=D}else t.chartData.xAxisData={xAxisPoints:[]};if(t.enableScroll&&"right"==t.xAxis.scrollAlign&&void 0===t._scrollDistance_){var M=0,E=t.chartData.xAxisData.xAxisPoints,I=t.chartData.xAxisData.startX,R=t.chartData.xAxisData.endX,j=t.chartData.xAxisData.eachSpacing,K=j*(E.length-1),z=R-I;M=z-K,r.scrollOption.currentOffset=M,r.scrollOption.startTouchX=M,r.scrollOption.distance=0,r.scrollOption.lastMoveTime=0,t._scrollDistance_=M}switch("pie"!==e&&"ring"!==e&&"rose"!==e||(n._pieTextMaxLength_=!1===t.dataLabel?0:ae(l,n,i,t)),e){case"word":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),ft(o,t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"map":i.clearRect(0,0,t.width,t.height),lt(o,t,n,i);break;case"funnel":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.funnelData=pt(o,t,n,i,e),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=Ze(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"scatter":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=He(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=We(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=Ge(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"column":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=Ke(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"mount":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=ze(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"bar":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Ve(a,t,n,i);var r=Be(o,t,n,i,e),s=r.yAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.yAxisPoints=s,t.chartData.xAxisPoints=t.chartData.xAxisData.xAxisPoints,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"area":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=Ne(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"ring":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.pieData=Ye(o,t,n,i,e),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"pie":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.pieData=Ye(o,t,n,i,e),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"rose":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.pieData=$e(o,t,n,i,e),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"radar":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.radarData=nt(o,t,n,i,e),Je(t.series,t,n,i,t.chartData),Xe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.arcbarData=et(o,t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.gaugeData=tt(a,o,t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"candle":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),qe(a,t,n,i),Ve(a,t,n,i);var r=Ue(o,l,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,u=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=u,Qe(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Ee(t,n,i),Je(l||t.series,t,n,i,t.chartData),Xe(t,n,i,e,u,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break}}function At(){this.events={}}mt.prototype.stop=function(){this.isStop=!0},At.prototype.addEventListener=function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)},At.prototype.delEventListener=function(e){this.events[e]=[]},At.prototype.trigger=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.opts=u({},this.opts,e),this.opts.updateData=!0;var t=e.scrollPosition||"current";switch(t){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":var n=Ae(this.opts.series,this.opts,this.config,this.context),i=n.yAxisWidth;this.config.yAxisWidth=i;var r=0,o=he(this.opts.categories,this.opts,this.config),a=o.xAxisPoints,s=o.startX,c=o.endX,l=o.eachSpacing,d=l*(a.length-1),h=c-s;r=h-d,this.scrollOption={currentOffset:r,startTouchX:r,distance:0,lastMoveTime:0},this.opts._scrollDistance_=r;break}xt.call(this,this.opts.type,this.opts,this.config,this.context)},bt.prototype.zoom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var t=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=e.itemCount;var n=Ae(this.opts.series,this.opts,this.config,this.context),i=n.yAxisWidth;this.config.yAxisWidth=i;var r=0,o=he(this.opts.categories,this.opts,this.config),a=o.xAxisPoints,s=o.startX,c=o.endX,l=o.eachSpacing,u=l*t,d=c-s,h=d-l*(a.length-1);r=d/2-u,r>0&&(r=0),r=this.opts.categories.length?this.opts.categories.length:d,this.opts.animation=!1,this.opts.xAxis.itemCount=d;var h=0,f=he(this.opts.categories,this.opts,this.config),p=f.xAxisPoints,v=f.startX,y=f.endX,m=f.eachSpacing,x=m*this.scrollOption.moveCurrent1,A=y-v,b=A-m*(p.length-1);h=-x+Math.min(i[0].x,i[1].x)-this.opts.area[3]-m,h>0&&(h=0),h1&&void 0!==arguments[1]?arguments[1]:{},n=null;if(n=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],n){P(n,this.opts,e);var i=this.getLegendDataIndex(e);i>=0&&("candle"==this.opts.type?this.opts.seriesMA[i].show=!this.opts.seriesMA[i].show:this.opts.series[i].show=!this.opts.series[i].show,this.opts.animation=!!t.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,xt.call(this,this.opts.type,this.opts,this.config,this.context))}},bt.prototype.showToolTip=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;i=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],i||console.log("[uCharts] 未获取到event坐标信息");var r=P(i,this.opts,e),o=this.scrollOption.currentOffset,a=u({},this.opts,{_scrollDistance_:o,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type||"scatter"===this.opts.type||"bubble"===this.opts.type){var s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1||c.length>0){var l=C(this.opts.series,c,s.group);if(0!==l.length){var d=F(l,this.opts,c,s.group,this.opts.categories,n),h=d.textList,f=d.offset;f.y=r.y,a.tooltip={textList:void 0!==n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("mount"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e).index:n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},a._series_[c]),h=[{text:n.formatter?n.formatter(l,void 0,c,a):l.name+": "+l.data,color:l.color}],f={x:a.chartData.calPoints[c].x,y:r.y};a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}xt.call(this,a.type,a,this.config,this.context)}if("bar"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1||c.length>0){l=C(this.opts.series,c,s.group);if(0!==l.length){d=F(l,this.opts,c,s.group,this.opts.categories,n),h=d.textList,f=d.offset;f.x=r.x,a.tooltip={textList:void 0!==n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("mix"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1){o=this.scrollOption.currentOffset,a=u({},this.opts,{_scrollDistance_:o,animation:!1}),l=C(this.opts.series,c);if(0!==l.length){var p=M(l,this.opts,c,this.opts.categories,n);h=p.textList,f=p.offset;f.y=r.y,a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("candle"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1){o=this.scrollOption.currentOffset,a=u({},this.opts,{_scrollDistance_:o,animation:!1}),l=C(this.opts.series,c);if(0!==l.length){d=E(this.opts.series[0].data,l,this.opts,c,this.opts.categories,this.opts.extra.candle,n),h=d.textList,f=d.offset;f.y=r.y,a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},a._series_[c]),h=[{text:n.formatter?n.formatter(l,void 0,c,a):l.name+": "+l.data,color:l.color}],f={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}xt.call(this,a.type,a,this.config,this.context)}if("map"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},this.opts.series[c]);l.name=l.properties.name;h=[{text:n.formatter?n.formatter(l,void 0,c,this.opts):l.name,color:l.color}],f={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}a.updateData=!1,xt.call(this,a.type,a,this.config,this.context)}if("word"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},this.opts.series[c]),h=[{text:n.formatter?n.formatter(l,void 0,c,this.opts):l.name,color:l.color}],f={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}a.updateData=!1,xt.call(this,a.type,a,this.config,this.context)}if("radar"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=C(this.opts.series,c);if(0!==l.length){h=l.map((function(e){return{text:n.formatter?n.formatter(e,t.opts.categories[c],c,t.opts):e.name+": "+e.data,color:e.color}})),f={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:h,offset:void 0!==n.offset?n.offset:f,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}},bt.prototype.translate=function(e){this.scrollOption={currentOffset:e,startTouchX:e,distance:0,lastMoveTime:0};var t=u({},this.opts,{_scrollDistance_:e,animation:!1});xt.call(this,this.opts.type,t,this.config,this.context)},bt.prototype.scrollStart=function(e){var t=null;t=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0];var n=P(t,this.opts,e);t&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=n.x)},bt.prototype.scroll=function(e){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var t=this.opts.touchMoveLimit||60,n=Date.now(),i=n-this.scrollOption.lastMoveTime;if(!(ie.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1},e.prototype.uniIDHasPermission=function(e){var t=k(),n=t.permission;return this.uniIDHasRole("admin")||n.indexOf(e)>-1},e.prototype.uniIDTokenValid=function(){var e=k(),t=e.tokenExpired;return t>Date.now()}}i="function"!==typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!b.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,i,r="",o=0;o>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}:atob;var T=Object.prototype.toString,O=Object.prototype.hasOwnProperty;function P(e){return"function"===typeof e}function C(e){return"string"===typeof e}function D(e){return"[object Object]"===T.call(e)}function _(e,t){return O.call(e,t)}function F(){}function M(e){var t=Object.create(null);return function(n){var i=t[n];return i||(t[n]=e(n))}}var E=/-(\w)/g,L=M((function(e){return e.replace(E,(function(e,t){return t?t.toUpperCase():""}))}));function I(e){var t={};return D(e)&&Object.keys(e).sort().forEach((function(n){t[n]=e[n]})),Object.keys(t)?t:e}var R=["invoke","success","fail","complete","returnValue"],j={},K={};function z(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?B(n):n}function B(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(e[n])){var i=t[n];t[n]=function(t){V(e[n],t).then((function(e){return P(i)&&i(e)||e}))}}})),t}function Q(e,t){var n=[];Array.isArray(j.returnValue)&&n.push.apply(n,p(j.returnValue));var i=K[e];return i&&Array.isArray(i.returnValue)&&n.push.apply(n,p(i.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function J(e){var t=Object.create(null);Object.keys(j).forEach((function(e){"returnValue"!==e&&(t[e]=j[e].slice())}));var n=K[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Y(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length,r=new Array(i>1?i-1:0),o=1;o-1?xe:e.indexOf("-hant")>-1||_e(e,["-tw","-hk","-mo","-cht"])?Ae:xe;var n=Fe(e,[be,we,ke]);return n||void 0}}function Ee(){var e=getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:Me(wx.getSystemInfoSync().language)||be}function Le(e){var t=getApp();if(!t)return!1;var n=t.$vm.$locale;return n!==e&&(t.$vm.$locale=e,Ie.forEach((function(t){return t({locale:e})})),!0)}var Ie=[];function Re(e){-1===Ie.indexOf(e)&&Ie.push(e)}"undefined"!==typeof e&&(e.getLocale=Ee);var je={promiseInterceptor:$},Ke=Object.freeze({__proto__:null,upx2px:ye,getLocale:Ee,setLocale:Le,onLocaleChange:Re,addInterceptor:W,removeInterceptor:Z,interceptors:je});function ze(e){var t=getCurrentPages(),n=t.length;while(n--){var i=t[n];if(i.$page&&i.$page.fullPath===e)return n}return-1}var Be,Ue={name:function(e){return"back"===e.exists&&e.delta?"navigateBack":"redirectTo"},args:function(e){if("back"===e.exists&&e.url){var t=ze(e.url);if(-1!==t){var n=getCurrentPages().length-1-t;n>0&&(e.delta=n)}}}},Ne={args:function(e){var t=parseInt(e.current);if(!isNaN(t)){var n=e.urls;if(Array.isArray(n)){var i=n.length;if(i)return t<0?t=0:t>=i&&(t=i-1),t>0?(e.current=n[t],e.urls=n.filter((function(e,i){return!(i2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(D(t)){var o=!0===r?t:{};for(var a in P(n)&&(n=n(t,o)||{}),t)if(_(n,a)){var s=n[a];P(s)&&(s=s(t[a],t,o)),s?C(s)?o[s]=t[a]:D(s)&&(o[s.name?s.name:a]=s.value):console.warn("The '".concat(e,"' method of platform '微信小程序' does not support option '").concat(a,"'"))}else-1!==at.indexOf(a)?P(t[a])&&(o[a]=st(e,t[a],i)):r||(o[a]=t[a]);return o}return P(t)&&(t=st(e,t,i)),t}function lt(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return P(it.returnValue)&&(t=it.returnValue(e,t)),ct(e,t,n,{},i)}function ut(e,t){if(_(it,e)){var n=it[e];return n?function(t,i){var r=n;P(n)&&(r=n(t)),t=ct(e,t,r.args,r.returnValue);var o=[t];"undefined"!==typeof i&&o.push(i),P(r.name)?e=r.name(t):C(r.name)&&(e=r.name);var a=wx[e].apply(wx,o);return ae(e)?lt(e,a,r.returnValue,oe(e)):a}:function(){console.error("Platform '微信小程序' does not support '".concat(e,"'."))}}return t}var dt=Object.create(null),ht=["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"];function ft(e){return function(t){var n=t.fail,i=t.complete,r={errMsg:"".concat(e,":fail method '").concat(e,"' not supported")};P(n)&&n(r),P(i)&&i(r)}}ht.forEach((function(e){dt[e]=ft(e)}));var pt={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};function gt(e){var t=e.service,n=e.success,i=e.fail,r=e.complete,o=!1;pt[t]?(o={errMsg:"getProvider:ok",service:t,provider:pt[t]},P(n)&&n(o)):(o={errMsg:"getProvider:fail service not found"},P(i)&&i(o)),P(r)&&r(o)}var vt=Object.freeze({__proto__:null,getProvider:gt}),yt=function(){var e;return function(){return e||(e=new o.default),e}}();function mt(e,t,n){return e[t].apply(e,n)}function xt(){return mt(yt(),"$on",Array.prototype.slice.call(arguments))}function At(){return mt(yt(),"$off",Array.prototype.slice.call(arguments))}function bt(){return mt(yt(),"$once",Array.prototype.slice.call(arguments))}function wt(){return mt(yt(),"$emit",Array.prototype.slice.call(arguments))}var kt,St,Tt,Ot=Object.freeze({__proto__:null,$on:xt,$off:At,$once:bt,$emit:wt});function Pt(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}function Ct(e){var t={};for(var n in e){var i=e[n];P(i)&&(t[n]=Pt(i),delete e[n])}return t}function Dt(e){try{return JSON.parse(e)}catch(t){}return e}function _t(e){if("enabled"===e.type)Tt=!0;else if("clientId"===e.type)kt=e.cid,St=e.errMsg,Mt(kt,e.errMsg);else if("pushMsg"===e.type)for(var t={type:"receive",data:Dt(e.message)},n=0;n-1&&Lt.splice(t,1)}else Lt.length=0},jt=Object.freeze({__proto__:null,getPushClientId:Et,onPushMessage:It,offPushMessage:Rt,invokePushCallback:_t}),Kt=Page,zt=Component,Bt=/:/g,Ut=M((function(e){return L(e.replace(Bt,"-"))}));function Nt(e){var t=e.triggerEvent,n=function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return Ht("onLoad",e),Kt(e)},Page.after=Kt.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ht("created",e),zt(e)});var Wt=["onPullDownRefresh","onReachBottom","onAddToFavorites","onShareTimeline","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function Zt(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){_(n,t)&&(e[t]=n[t])}))}function Gt(e,t){if(!t)return!0;if(o.default.options&&Array.isArray(o.default.options[e]))return!0;if(t=t.default||t,P(t))return!!P(t.extendOptions[e])||!!(t.super&&t.super.options&&Array.isArray(t.super.options[e]));if(P(t[e]))return!0;var n=t.mixins;return Array.isArray(n)?!!n.find((function(t){return Gt(e,t)})):void 0}function Xt(e,t,n){t.forEach((function(t){Gt(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function Vt(e,t){var n;return t=t.default||t,n=P(t)?t:e.extend(t),t=n.options,[n,t]}function qt(e,t){if(Array.isArray(t)&&t.length){var n=Object.create(null);t.forEach((function(e){n[e]=!0})),e.$scopedSlots=e.$slots=n}}function Qt(e,t){e=(e||"").split(",");var n=e.length;1===n?t._$vueId=e[0]:2===n&&(t._$vueId=e[0],t._$vuePid=e[1])}function Jt(e,t){var n=e.data||{},i=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(r){Object({VUE_APP_NAME:"Jinan_app",VUE_APP_PLATFORM:"mp-weixin",NODE_ENV:"development",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(r){}return D(n)||(n={}),Object.keys(i).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||_(n,e)||(n[e]=i[e])})),n}var Yt=[String,Number,Boolean,Object,Array,null];function $t(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function en(e,t){var n=e.behaviors,i=e.extends,r=e.mixins,o=e.props;o||(e.props=o=[]);var a=[];return Array.isArray(n)&&n.forEach((function(e){a.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(o)?(o.push("name"),o.push("value")):(o.name={type:String,default:""},o.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),D(i)&&i.props&&a.push(t({properties:nn(i.props,!0)})),Array.isArray(r)&&r.forEach((function(e){D(e)&&e.props&&a.push(t({properties:nn(e.props,!0)}))})),a}function tn(e,t,n,i){return Array.isArray(t)&&1===t.length?t[0]:t}function nn(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>3?arguments[3]:void 0,i={};return t||(i.vueId={type:String,value:""},n.virtualHost&&(i.virtualHostStyle={type:null,value:""},i.virtualHostClass={type:null,value:""}),i.scopedSlotsCompiler={type:String,value:""},i.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){i[e]={type:null,observer:$t(e)}})):D(e)&&Object.keys(e).forEach((function(t){var n=e[t];if(D(n)){var r=n.default;P(r)&&(r=r()),n.type=tn(t,n.type),i[t]={type:-1!==Yt.indexOf(n.type)?n.type:null,value:r,observer:$t(t)}}else{var o=tn(t,n);i[t]={type:-1!==Yt.indexOf(o)?o:null,observer:$t(t)}}})),i}function rn(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=F,e.preventDefault=F,e.target=e.target||{},_(e,"detail")||(e.detail={}),_(e,"markerId")&&(e.detail="object"===typeof e.detail?e.detail:{},e.detail.markerId=e.markerId),D(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}function on(e,t){var n=e;return t.forEach((function(t){var i=t[0],r=t[2];if(i||"undefined"!==typeof r){var o,a=t[1],s=t[3];Number.isInteger(i)?o=i:i?"string"===typeof i&&i&&(o=0===i.indexOf("#s#")?i.substr(3):e.__get_value(i,n)):o=n,Number.isInteger(o)?n=r:a?Array.isArray(o)?n=o.find((function(t){return e.__get_value(a,t)===r})):D(o)?n=Object.keys(o).find((function(t){return e.__get_value(a,o[t])===r})):console.error("v-for 暂不支持循环数据:",o):n=o[r],s&&(n=e.__get_value(s,n))}})),n}function an(e,t,n){var i={};return Array.isArray(t)&&t.length&&t.forEach((function(t,r){"string"===typeof t?t?"$event"===t?i["$"+r]=n:"arguments"===t?n.detail&&n.detail.__args__?i["$"+r]=n.detail.__args__:i["$"+r]=[n]:0===t.indexOf("$event.")?i["$"+r]=e.__get_value(t.replace("$event.",""),n):i["$"+r]=e.__get_value(t):i["$"+r]=e:i["$"+r]=on(e,t)})),i}function sn(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=!1;if(r&&(a=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return a?[t]:t.detail.__args__||t.detail;var s=an(e,i,t),c=[];return n.forEach((function(e){"$event"===e?"__set_model"!==o||r?r&&!a?c.push(t.detail.__args__[0]):c.push(t):c.push(t.target.value):Array.isArray(e)&&"o"===e[0]?c.push(sn(e)):"string"===typeof e&&_(s,e)?c.push(s[e]):c.push(e)})),c}var ln="~",un="^";function dn(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}function hn(e){var t=e.$parent;while(t&&t.$parent&&(t.$options.generic||t.$parent.$options.generic||t.$scope._$vuePid))t=t.$parent;return t&&t.$parent}function fn(e){var t=this;e=rn(e);var n=(e.currentTarget||e.target).dataset;if(!n)return console.warn("事件信息不存在");var i=n.eventOpts||n["event-opts"];if(!i)return console.warn("事件信息不存在");var r=e.type,o=[];return i.forEach((function(n){var i=n[0],a=n[1],s=i.charAt(0)===un;i=s?i.slice(1):i;var c=i.charAt(0)===ln;i=c?i.slice(1):i,a&&dn(r,i)&&a.forEach((function(n){var i=n[0];if(i){var r=t.$vm;if(r.$options.generic&&(r=hn(r)||r),"$emit"===i)return void r.$emit.apply(r,cn(t.$vm,e,n[1],n[2],s,i));var a=r[i];if(!P(a)){var l="page"===t.$vm.mpType?"Page":"Component",u=t.route||t.is;throw new Error("".concat(l,' "').concat(u,'" does not have a method "').concat(i,'"'))}if(c){if(a.once)return;a.once=!0}var d=cn(t.$vm,e,n[1],n[2],s,i);d=Array.isArray(d)?d:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(a.toString())&&(d=d.concat([,,,,,,,,,,e])),o.push(a.apply(r,d))}}))})),"input"===r&&1===o.length&&"undefined"!==typeof o[0]?o[0]:void 0}var pn={},gn=[];function vn(e){if(e){var t=pn[e];return delete pn[e],t}return gn.shift()}var yn=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function mn(){o.default.prototype.getOpenerEventChannel=function(){return this.$scope.getOpenerEventChannel()};var e=o.default.prototype.__call_hook;o.default.prototype.__call_hook=function(t,n){return"onLoad"===t&&n&&n.__id__&&(this.__eventChannel__=vn(n.__id__),delete n.__id__),e.call(this,t,n)}}function xn(){var e={},t={};o.default.prototype.$hasScopedSlotsParams=function(n){var i=e[n];return i||(t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))),i},o.default.prototype.$getScopedSlotsParams=function(n,i,r){var o=e[n];if(o){var a=o[i]||{};return r?a[r]:a}t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))},o.default.prototype.$setScopedSlotsParams=function(n,i){var r=this.$options.propsData.vueId;if(r){var o=r.split(",")[0],a=e[o]=e[o]||{};a[n]=i,t[o]&&t[o].$forceUpdate()}},o.default.mixin({destroyed:function(){var n=this.$options.propsData,i=n&&n.vueId;i&&(delete e[i],delete t[i])}})}function An(e,t){var n=t.mocks,i=t.initRefs;mn(),xn(),e.$options.store&&(o.default.prototype.$store=e.$options.store),S(o.default),o.default.prototype.mpHost="mp-weixin",o.default.mixin({beforeCreate:function(){if(this.$options.mpType){if(this.mpType=this.$options.mpType,this.$mp=f({data:{}},this.mpType,this.$options.mpInstance),this.$scope=this.$options.mpInstance,delete this.$options.mpType,delete this.$options.mpInstance,"page"===this.mpType&&"function"===typeof getApp){var e=getApp();e.$vm&&e.$vm.$i18n&&(this._i18n=e.$vm.$i18n)}"app"!==this.mpType&&(i(this),Zt(this,n))}}});var r={onLaunch:function(t){this.$vm||(wx.canIUse&&!wx.canIUse("nextTick")&&console.error("当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上"),this.$vm=e,this.$vm.$mp={app:this},this.$vm.$scope=this,this.$vm.globalData=this.globalData,this.$vm._isMounted=!0,this.$vm.__call_hook("mounted",t),this.$vm.__call_hook("onLaunch",t))}};r.globalData=e.$options.globalData||{};var a=e.$options.methods;return a&&Object.keys(a).forEach((function(e){r[e]=a[e]})),Ce(o.default,e,Me(wx.getSystemInfoSync().language)||be),Xt(r,yn),r}var bn=["__route__","__wxExparserNodeId__","__wxWebviewId__"];function wn(e,t){for(var n,i=e.$children,r=i.length-1;r>=0;r--){var o=i[r];if(o.$scope._$vueId===t)return o}for(var a=i.length-1;a>=0;a--)if(n=wn(i[a],t),n)return n}function kn(e){return Behavior(e)}function Sn(){return!!this.route}function Tn(e){this.triggerEvent("__l",e)}function On(e,t,n){var i=e.selectAllComponents(t);i.forEach((function(e){var i=e.dataset.ref;n[i]=e.$vm||e,"scoped"===e.dataset.vueGeneric&&e.selectAllComponents(".scoped-ref").forEach((function(e){On(e,t,n)}))}))}function Pn(e){var t=e.$scope;Object.defineProperty(e,"$refs",{get:function(){var e={};On(t,".vue-ref",e);var n=t.selectAllComponents(".vue-ref-in-for");return n.forEach((function(t){var n=t.dataset.ref;e[n]||(e[n]=[]),e[n].push(t.$vm||t)})),e}})}function Cn(e){var t,n=e.detail||e.value,i=n.vuePid,r=n.vueOptions;i&&(t=wn(this.$vm,i)),t||(t=this.$vm),r.parent=t}function Dn(e){return An(e,{mocks:bn,initRefs:Pn})}function _n(e){return App(Dn(e)),e}var Fn=/[!'()*]/g,Mn=function(e){return"%"+e.charCodeAt(0).toString(16)},En=/%2C/g,Ln=function(e){return encodeURIComponent(e).replace(Fn,Mn).replace(En,",")};function In(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ln,n=e?Object.keys(e).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return t(n);if(Array.isArray(i)){var r=[];return i.forEach((function(e){void 0!==e&&(null===e?r.push(t(n)):r.push(t(n)+"="+t(e)))})),r.join("&")}return t(n)+"="+t(i)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,i=t.initRelation,r=Vt(o.default,e),a=l(r,2),s=a[0],u=a[1],d=c({multipleSlots:!0,addGlobalClass:!0},u.options||{});u["mp-weixin"]&&u["mp-weixin"].options&&Object.assign(d,u["mp-weixin"].options);var h={options:d,data:Jt(u,o.default.prototype),behaviors:en(u,kn),properties:nn(u.props,!1,u.__file,d),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};Qt(e.vueId,this),i.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new s(t),qt(this.$vm,e.vueSlots),this.$vm.$mount()},ready:function(){this.$vm&&(this.$vm._isMounted=!0,this.$vm.__call_hook("mounted"),this.$vm.__call_hook("onReady"))},detached:function(){this.$vm&&this.$vm.$destroy()}},pageLifetimes:{show:function(e){this.$vm&&this.$vm.__call_hook("onPageShow",e)},hide:function(){this.$vm&&this.$vm.__call_hook("onPageHide")},resize:function(e){this.$vm&&this.$vm.__call_hook("onPageResize",e)}},methods:{__l:Cn,__e:fn}};return u.externalClasses&&(h.externalClasses=u.externalClasses),Array.isArray(u.wxsCallMethods)&&u.wxsCallMethods.forEach((function(e){h.methods[e]=function(t){return this.$vm[e](t)}})),n?h:[h,s]}function jn(e){return Rn(e,{isPage:Sn,initRelation:Tn})}var Kn=["onShow","onHide","onUnload"];function zn(e,t){t.isPage,t.initRelation;var n=jn(e);return Xt(n.methods,Kn,e),n.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+In(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},n}function Bn(e){return zn(e,{isPage:Sn,initRelation:Tn})}function Un(e){return Component(Bn(e))}function Nn(e){return Component(jn(e))}function Hn(e){var t=Dn(e),n=getApp({allowDefault:!0});e.$scope=n;var i=n.globalData;if(i&&Object.keys(t.globalData).forEach((function(e){_(i,e)||(i[e]=t.globalData[e])})),Object.keys(t).forEach((function(e){_(n,e)||(n[e]=t[e])})),P(t.onShow)&&wx.onAppShow&&wx.onAppShow((function(){for(var t=arguments.length,n=new Array(t),i=0;i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function g(e,t){if(e){if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n>>2]>>>24-o%4*8&255;t[i+o>>>2]|=a<<24-(i+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,i=[],r=function(t){t=t;var n=987654321,i=4294967295;return function(){var r=((n=36969*(65535&n)+(n>>16)&i)<<16)+(t=18e3*(65535&t)+(t>>16)&i)&i;return r/=4294967296,(r+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new a.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,o=this.blockSize,s=r/(4*o),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.min(4*c,r);if(c){for(var u=0;u>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],f=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],m=e[t+7],x=e[t+8],A=e[t+9],b=e[t+10],w=e[t+11],k=e[t+12],S=e[t+13],T=e[t+14],O=e[t+15],P=o[0],C=o[1],D=o[2],_=o[3];P=l(P,C,D,_,a,7,s[0]),_=l(_,P,C,D,c,12,s[1]),D=l(D,_,P,C,f,17,s[2]),C=l(C,D,_,P,p,22,s[3]),P=l(P,C,D,_,g,7,s[4]),_=l(_,P,C,D,v,12,s[5]),D=l(D,_,P,C,y,17,s[6]),C=l(C,D,_,P,m,22,s[7]),P=l(P,C,D,_,x,7,s[8]),_=l(_,P,C,D,A,12,s[9]),D=l(D,_,P,C,b,17,s[10]),C=l(C,D,_,P,w,22,s[11]),P=l(P,C,D,_,k,7,s[12]),_=l(_,P,C,D,S,12,s[13]),D=l(D,_,P,C,T,17,s[14]),P=u(P,C=l(C,D,_,P,O,22,s[15]),D,_,c,5,s[16]),_=u(_,P,C,D,y,9,s[17]),D=u(D,_,P,C,w,14,s[18]),C=u(C,D,_,P,a,20,s[19]),P=u(P,C,D,_,v,5,s[20]),_=u(_,P,C,D,b,9,s[21]),D=u(D,_,P,C,O,14,s[22]),C=u(C,D,_,P,g,20,s[23]),P=u(P,C,D,_,A,5,s[24]),_=u(_,P,C,D,T,9,s[25]),D=u(D,_,P,C,p,14,s[26]),C=u(C,D,_,P,x,20,s[27]),P=u(P,C,D,_,S,5,s[28]),_=u(_,P,C,D,f,9,s[29]),D=u(D,_,P,C,m,14,s[30]),P=d(P,C=u(C,D,_,P,k,20,s[31]),D,_,v,4,s[32]),_=d(_,P,C,D,x,11,s[33]),D=d(D,_,P,C,w,16,s[34]),C=d(C,D,_,P,T,23,s[35]),P=d(P,C,D,_,c,4,s[36]),_=d(_,P,C,D,g,11,s[37]),D=d(D,_,P,C,m,16,s[38]),C=d(C,D,_,P,b,23,s[39]),P=d(P,C,D,_,S,4,s[40]),_=d(_,P,C,D,a,11,s[41]),D=d(D,_,P,C,p,16,s[42]),C=d(C,D,_,P,y,23,s[43]),P=d(P,C,D,_,A,4,s[44]),_=d(_,P,C,D,k,11,s[45]),D=d(D,_,P,C,O,16,s[46]),P=h(P,C=d(C,D,_,P,f,23,s[47]),D,_,a,6,s[48]),_=h(_,P,C,D,m,10,s[49]),D=h(D,_,P,C,T,15,s[50]),C=h(C,D,_,P,v,21,s[51]),P=h(P,C,D,_,k,6,s[52]),_=h(_,P,C,D,p,10,s[53]),D=h(D,_,P,C,b,15,s[54]),C=h(C,D,_,P,c,21,s[55]),P=h(P,C,D,_,x,6,s[56]),_=h(_,P,C,D,O,10,s[57]),D=h(D,_,P,C,y,15,s[58]),C=h(C,D,_,P,S,21,s[59]),P=h(P,C,D,_,g,6,s[60]),_=h(_,P,C,D,w,10,s[61]),D=h(D,_,P,C,f,15,s[62]),C=h(C,D,_,P,A,21,s[63]),o[0]=o[0]+P|0,o[1]=o[1]+C|0,o[2]=o[2]+D|0,o[3]=o[3]+_|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var o=e.floor(i/4294967296),a=i;n[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,i,r,o,a){var s=e+(t&n|~t&i)+r+a;return(s<>>32-o)+t}function u(e,t,n,i,r,o,a){var s=e+(t&i|n&~i)+r+a;return(s<>>32-o)+t}function d(e,t,n,i,r,o,a){var s=e+(t^n^i)+r+a;return(s<>>32-o)+t}function h(e,t,n,i,r,o,a){var s=e+(n^(t|~i))+r+a;return(s<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)})),L((function(e,t){var n,i,r;e.exports=(i=(n=I).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t=J,n=e,Object.prototype.hasOwnProperty.call(t,n)||(J[e]=i),J[e]}"app"===H&&(J=i._globalUniCloudObj?i._globalUniCloudObj:i._globalUniCloudObj={});var $=["invoke","success","fail","complete"],ee=Y("_globalUniCloudInterceptor");function te(e,t){ee[e]||(ee[e]={}),U(t)&&Object.keys(t).forEach((function(n){$.indexOf(n)>-1&&function(e,t,n){var i=ee[e][t];i||(i=ee[e][t]=[]),-1===i.indexOf(n)&&"function"==typeof n&&i.push(n)}(e,n,t[n])}))}function ne(e,t){ee[e]||(ee[e]={}),U(t)?Object.keys(t).forEach((function(n){$.indexOf(n)>-1&&function(e,t,n){var i=ee[e][t];if(i){var r=i.indexOf(n);r>-1&&i.splice(r,1)}}(e,n,t[n])})):delete ee[e]}function ie(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function re(e,t){return ee[e]&&ee[e][t]||[]}var oe=Y("_globalUniCloudListener"),ae="response",se="needLogin",ce="refreshToken",le="clientdb",ue="cloudfunction",de="cloudobject";function he(e){return oe[e]||(oe[e]=[]),oe[e]}function fe(e,t){var n=he(e);n.includes(t)||n.push(t)}function pe(e,t){var n=he(e),i=n.indexOf(t);-1!==i&&n.splice(i,1)}function ge(e,t){for(var n=he(e),i=0;i-1)return;var n=i.getLaunchOptionsSync(),r=n.scene,o=n.channel;e=o,t=r}}catch(e){}return{channel:e,scene:t}}function Ae(){var e=i.getLocale&&i.getLocale()||"en";if(ye)return A(A({},ye),{},{locale:e,LOCALE:e});for(var t=i.getSystemInfoSync(),n=t.deviceId,r=t.osName,o=t.uniPlatform,a=t.appId,s=["pixelRatio","brand","model","system","language","version","platform","host","SDKVersion","swanNativeVersion","app","AppPlatform","fontSizeSetting"],c=0;c=400)return i(new me({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var r=e.data;if(r.error)return i(new me({code:r.error.code,message:r.error.message,requestId:t}));r.result=r.data,r.requestId=t,delete r.data,n(r)}}))}))}},ke={request:function(e){return i.request(e)},uploadFile:function(e){return i.uploadFile(e)},setStorageSync:function(e,t){return i.setStorageSync(e,t)},getStorageSync:function(e){return i.getStorageSync(e)},removeStorageSync:function(e){return i.removeStorageSync(e)},clearStorageSync:function(){return i.clearStorageSync()}},Se={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},Te=(0,o.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:Se,fr:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},es:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ja:Se},"zh-Hans"),Oe=Te.t,Pe=function(){function e(t){w(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(Oe("uniCloud.init.paramRequired",{param:e}))})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=ke,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return m(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return we.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return Promise.resolve().then((function(){return n.hasAccessToken?t?n.requestWrapped(e):n.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):n.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=we.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),i={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,i["x-basement-token"]=this.accessToken),i["x-serverless-sign"]=we.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:i}}},{key:"getAccessToken",value:function(){var e=this;return"pending"===this._getAccessTokenPromiseStatus||(this._getAccessTokenPromiseStatus="pending",this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(t){return new Promise((function(n,i){t.result&&t.result.accessToken?(e.setAccessToken(t.result.accessToken),e._getAccessTokenPromiseStatus="fulfilled",n(e.accessToken)):(e._getAccessTokenPromiseStatus="rejected",i(new me({code:"AUTH_FAILED",message:"获取accessToken失败"})))}))}),(function(t){return e._getAccessTokenPromiseStatus="rejected",Promise.reject(t)}))),this._getAccessTokenPromise}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,i=e.formData,r=e.name,o=e.filePath,a=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:i,name:r,filePath:o,fileType:a,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):c(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new me({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(e){var t=this,n=e.filePath,i=e.cloudPath,r=e.fileType,o=void 0===r?"image":r,a=e.onUploadProgress,s=e.config;if("string"!==B(i))throw new me({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(i=i.trim()))throw new me({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});if(/:\/\//.test(i))throw new me({code:"INVALID_PARAM",message:"cloudPath不合法"});var c,l,u=s&&s.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:u,filename:i}).then((function(e){var i=e.result;c=i.id,l="https://"+i.cdnDomain+"/"+i.ossPath;var r={url:"https://"+i.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:i.accessKeyId,Signature:i.signature,host:i.host,id:c,key:i.ossPath,policy:i.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:o};return t.uploadFileToOSS(Object.assign({},r,{onUploadProgress:a}))})).then((function(){return t.reportOSSUpload({id:c})})).then((function(e){return new Promise((function(t,i){e.success?t({success:!0,filePath:n,fileID:l}):i(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:t[0]})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new me({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),Ce={init:function(e){var t=new Pe(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},De="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(be||(be={}));var _e,Fe=function(){},Me=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new me({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,i){return e?n(e):t(i)}}));return e.promise=n,e};function Ee(e){return void 0===e}function Le(e){return"[object Null]"===Object.prototype.toString.call(e)}function Ie(e){var t,n,i=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),r=p(i);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=o.isMatch,s=o.genAdapter,c=o.runtime;if(a())return{adapter:s(),runtime:c}}}catch(l){r.e(l)}finally{r.f()}}!function(e){e.WEB="web",e.WX_MP="wx_mp"}(_e||(_e={}));var Re={adapter:null,runtime:void 0},je=["anonymousUuidKey"],Ke=function(e){k(n,e);var t=S(n);function n(){var e;return w(this,n),e=t.call(this),Re.adapter.root.tcbObject||(Re.adapter.root.tcbObject={}),e}return m(n,[{key:"setItem",value:function(e,t){Re.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return Re.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete Re.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete Re.adapter.root.tcbObject}}]),n}(Fe);function ze(e,t){switch(e){case"local":return t.localStorage||new Ke;case"none":return new Ke;default:return t.sessionStorage||new Ke}}var Be=function(){function e(t){if(w(this,e),!this._storage){this._persistence=Re.adapter.primaryStorage||t.persistence,this._storage=ze(this._persistence,Re.adapter);var n="access_token_".concat(t.env),i="access_token_expire_".concat(t.env),r="refresh_token_".concat(t.env),o="anonymous_uuid_".concat(t.env),a="login_type_".concat(t.env),s="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:i,refreshTokenKey:r,anonymousUuidKey:o,loginTypeKey:a,userInfoKey:s}}}return m(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=ze(e,Re.adapter);for(var i in this.keys){var r=this.keys[i];if(!t||!je.includes(i)){var o=this._storage.getItem(r);Ee(o)||Le(o)||(n.setItem(r,o),this._storage.removeItem(r))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var i={version:n||"localCachev1",content:t},r=JSON.stringify(i);try{this._storage.setItem(e,r)}catch(e){throw e}}}},{key:"getStore",value:function(e,t){try{if(!this._storage)return}catch(e){return""}t=t||"localCachev1";var n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}},{key:"removeStore",value:function(e){this._storage.removeItem(e)}}]),e}(),Ue={},Ne={};function He(e){return Ue[e]}var We=function e(t,n){w(this,e),this.data=n||null,this.name=t},Ze=function(e){k(n,e);var t=S(n);function n(e,i){var r;return w(this,n),r=t.call(this,"error",{error:e,data:i}),r.error=e,r}return n}(We),Ge=new(function(){function e(){w(this,e),this._listeners={}}return m(e,[{key:"on",value:function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}},{key:"off",value:function(e,t){return function(e,t,n){if(n&&n[e]){var i=n[e].indexOf(t);-1!==i&&n[e].splice(i,1)}}(e,t,this._listeners),this}},{key:"fire",value:function(e,t){if(e instanceof Ze)return console.error(e.error),this;var n="string"==typeof e?new We(e,t||{}):e,i=n.name;if(this._listens(i)){n.target=this;var r,o=this._listeners[i]?u(this._listeners[i]):[],a=p(o);try{for(a.s();!(r=a.n()).done;){var s=r.value;s.call(this,n)}}catch(c){a.e(c)}finally{a.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function Xe(e,t){Ge.on(e,t)}function Ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ge.fire(e,t)}function qe(e,t){Ge.off(e,t)}var Qe,Je="loginStateChanged",Ye="loginStateExpire",$e="loginTypeChanged",et="anonymousConverted",tt="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Qe||(Qe={}));var nt=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],it={"X-SDK-Version":"1.3.5"};function rt(e,t,n){var i=e[t];e[t]=function(t){var r={},o={};n.forEach((function(n){var i=n.call(e,t),a=i.data,s=i.headers;Object.assign(r,a),Object.assign(o,s)}));var a=t.data;return a&&function(){var e;if(e=a,"[object FormData]"!==Object.prototype.toString.call(e))t.data=A(A({},a),r);else for(var n in r)a.append(n,r[n])}(),t.headers=A(A({},t.headers||{}),o),i.call(e,t)}}function ot(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:A(A({},it),{},{"x-seqid":e})}}var at=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,e),this.config=n,this._reqClass=new Re.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=He(this.config.env),this._localCache=(t=this.config.env,Ne[t]),rt(this._reqClass,"post",[ot]),rt(this._reqClass,"upload",[ot]),rt(this._reqClass,"download",[ot])}return m(e,[{key:"post",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.post(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"upload",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.upload(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"download",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.download(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refreshAccessToken",value:function(){var e=l(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),e.prev=1,e.next=4,this._refreshAccessTokenPromise;case 4:t=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),n=e.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!n){e.next=12;break}throw n;case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"_refreshAccessToken",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s,c,l,u,d,h,f,p;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,o=t.refreshTokenKey,a=t.loginTypeKey,s=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(i),c=this._cache.getStore(o),c){e.next=5;break}throw new me({message:"未登录CloudBase"});case 5:return l={refresh_token:c},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",l);case 8:if(u=e.sent,!u.data.code){e.next=21;break}if(d=u.data.code,"SIGN_PARAM_INVALID"!==d&&"REFRESH_TOKEN_EXPIRED"!==d&&"INVALID_REFRESH_TOKEN"!==d){e.next=20;break}if(this._cache.getStore(a)!==Qe.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==d){e.next=19;break}return h=this._cache.getStore(s),f=this._cache.getStore(o),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:h,refresh_token:f});case 17:return p=e.sent,e.abrupt("return",(this.setRefreshToken(p.refresh_token),this._refreshAccessToken()));case 19:Ve(Ye),this._cache.removeStore(o);case 20:throw new me({code:u.data.code,message:"刷新access token失败:".concat(u.data.code)});case 21:if(!u.data.access_token){e.next=23;break}return e.abrupt("return",(Ve(tt),this._cache.setStore(n,u.data.access_token),this._cache.setStore(i,u.data.access_token_expire+Date.now()),{accessToken:u.data.access_token,accessTokenExpire:u.data.access_token_expire}));case 23:u.data.refresh_token&&(this._cache.removeStore(o),this._cache.setStore(o,u.data.refresh_token),this._refreshAccessToken());case 24:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAccessToken",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,o=t.refreshTokenKey,this._cache.getStore(o)){e.next=3;break}throw new me({message:"refresh token不存在,登录状态异常"});case 3:if(a=this._cache.getStore(n),s=this._cache.getStore(i),c=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(a,s);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}c=!1;case 12:return e.abrupt("return",(!a||!s||s2&&void 0!==arguments[2]?arguments[2]:{},i=/\?/.test(t),r="";for(var o in n)""===r?!i&&(t+="?"):r+="&",r+="".concat(o,"=").concat(encodeURIComponent(n[o]));return/^http(s)?\:\/\//.test(t+=r)?t:"".concat(e).concat(t)}(De,"//tcb-api.tencentcloudapi.com/web",y),v&&(m+=v),e.next=22,this.post(A({url:m,data:l},h));case 22:if(x=e.sent,b=x.header&&x.header["x-tcb-trace"],b&&this._localCache.setStore(o,b),(200===Number(x.status)||200===Number(x.statusCode))&&x.data){e.next=26;break}throw new me({code:"NETWORK_ERROR",message:"network request error"});case 26:return e.abrupt("return",x);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,i){return e.apply(this,arguments)}return t}()},{key:"send",value:function(){var e=l(r.default.mark((function e(t){var n,i,o,a=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 3:if(i=e.sent,"ACCESS_TOKEN_EXPIRED"!==i.data.code||-1!==nt.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(o=e.sent,!o.data.code){e.next=12;break}throw new me({code:o.data.code,message:o.data.message});case 12:return e.abrupt("return",o.data);case 13:if(!i.data.code){e.next=15;break}throw new me({code:i.data.code,message:i.data.message});case 15:return e.abrupt("return",i.data);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,r=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(i),this._cache.setStore(r,e)}}]),e}(),st={};function ct(e){return st[e]}var lt=function(){function e(t){w(this,e),this.config=t,this._cache=He(t.env),this._request=ct(t.env)}return m(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,r=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(i),this._cache.setStore(r,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,i=n.accessTokenKey,r=n.accessTokenExpireKey;this._cache.setStore(i,e),this._cache.setStore(r,t)}},{key:"refreshUserInfo",value:function(){var e=l(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e)}}]),e}(),ut=function(){function e(t){if(w(this,e),!t)throw new me({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=t,this._cache=He(this._envId),this._request=ct(this._envId),this.setUserInfo()}return m(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new me({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new me({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,i=!1,o=n.users,e.abrupt("return",(o.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(i=!0)})),{users:o,hasPrimaryUid:i}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setPrimaryUid",value:function(e){return this._request.send("auth.setPrimaryUid",{uid:e})}},{key:"unlink",value:function(e){return this._request.send("auth.unlink",{platform:e})}},{key:"update",value:function(){var e=l(r.default.mark((function e(t){var n,i,o,a,s,c,l,u;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,i=t.gender,o=t.avatarUrl,a=t.province,s=t.country,c=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:i,avatarUrl:o,province:a,country:s,city:c});case 8:l=e.sent,u=l.data,this.setLocalUserInfo(u);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refresh",value:function(){var e=l(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setUserInfo",value:function(){var e=this,t=this._cache.keys.userInfoKey,n=this._cache.getStore(t);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(t){e[t]=n[t]})),this.location={country:n.country,province:n.province,city:n.city}}},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e),this.setUserInfo()}}]),e}(),dt=function(){function e(t){if(w(this,e),!t)throw new me({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=He(t);var n=this._cache.keys,i=n.refreshTokenKey,r=n.accessTokenKey,o=n.accessTokenExpireKey,a=this._cache.getStore(i),s=this._cache.getStore(r),c=this._cache.getStore(o);this.credential={refreshToken:a,accessToken:s,accessTokenExpire:c},this.user=new ut(t)}return m(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===Qe.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===Qe.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===Qe.WECHAT||this.loginType===Qe.WECHAT_OPEN||this.loginType===Qe.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),ht=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,i=t.refreshTokenKey,o=this._cache.getStore(n)||void 0,a=this._cache.getStore(i)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:o,refresh_token:a});case 8:if(s=e.sent,!s.uuid||!s.refresh_token){e.next=20;break}return this._setAnonymousUUID(s.uuid),this.setRefreshToken(s.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return Ve(Je),Ve($e,{env:this.config.env,loginType:Qe.ANONYMOUS,persistence:"local"}),c=new dt(this.config.env),e.next=19,c.user.refresh();case 19:return e.abrupt("return",c);case 20:throw new me({message:"匿名登录失败"});case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=l(r.default.mark((function e(t){var n,i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,i=n.anonymousUuidKey,o=n.refreshTokenKey,a=this._cache.getStore(i),s=this._cache.getStore(o),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:a,refresh_token:s,ticket:t});case 7:if(c=e.sent,!c.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(c.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return Ve(et,{env:this.config.env}),Ve($e,{loginType:Qe.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:c.refresh_token}});case 16:throw new me({message:"匿名转化失败"});case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_setAnonymousUUID",value:function(e){var t=this._cache.keys,n=t.anonymousUuidKey,i=t.loginTypeKey;this._cache.removeStore(n),this._cache.setStore(n,e),this._cache.setStore(i,Qe.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(lt),ft=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({param:"PARAM_ERROR",message:"ticket must be a string"});case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(i=e.sent,!i.refresh_token){e.next=15;break}return this.setRefreshToken(i.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return Ve(Je),Ve($e,{env:this.config.env,loginType:Qe.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new dt(this.config.env));case 15:throw new me({message:"自定义登录失败"});case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),n}(lt),pt=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(t,n){var i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({code:"PARAM_ERROR",message:"email must be a string"});case 2:return i=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(i)||""});case 5:if(o=e.sent,a=o.refresh_token,s=o.access_token,c=o.access_token_expire,!a){e.next=22;break}if(this.setRefreshToken(a),!s||!c){e.next=15;break}this.setAccessToken(s,c),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return Ve(Je),Ve($e,{env:this.config.env,loginType:Qe.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new dt(this.config.env));case 22:throw o.code?new me({code:o.code,message:"邮箱登录失败: ".concat(o.message)}):new me({message:"邮箱登录失败"});case 23:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"activate",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.activateEndUserMail",{token:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetPasswordWithToken",value:function(){var e=l(r.default.mark((function e(t,n){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:t,newPassword:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(lt),gt=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(t,n){var i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({code:"PARAM_ERROR",message:"username must be a string"});case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),i=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:Qe.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(i)||""});case 6:if(o=e.sent,a=o.refresh_token,s=o.access_token_expire,c=o.access_token,!a){e.next=23;break}if(this.setRefreshToken(a),!c||!s){e.next=16;break}this.setAccessToken(c,s),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return Ve(Je),Ve($e,{env:this.config.env,loginType:Qe.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new dt(this.config.env));case 23:throw o.code?new me({code:o.code,message:"用户名密码登录失败: ".concat(o.message)}):new me({message:"用户名密码登录失败"});case 24:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(lt),vt=function(){function e(t){w(this,e),this.config=t,this._cache=He(t.env),this._request=ct(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),Xe($e,this._onLoginTypeChanged)}return m(e,[{key:"anonymousAuthProvider",value:function(){return new ht(this.config)}},{key:"customAuthProvider",value:function(){return new ft(this.config)}},{key:"emailAuthProvider",value:function(){return new pt(this.config)}},{key:"usernameAuthProvider",value:function(){return new gt(this.config)}},{key:"signInAnonymously",value:function(){var e=l(r.default.mark((function e(){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new ht(this.config).signIn());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signInWithEmailAndPassword",value:function(){var e=l(r.default.mark((function e(t,n){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new pt(this.config).signIn(t,n));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"signInWithUsernameAndPassword",value:function(e,t){return new gt(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new ht(this.config)),Xe(et,this._onAnonymousConverted),e.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"signOut",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==Qe.ANONYMOUS){e.next=2;break}throw new me({message:"匿名用户不支持登出操作"});case 2:if(t=this._cache.keys,n=t.refreshTokenKey,i=t.accessTokenKey,o=t.accessTokenExpireKey,a=this._cache.getStore(n),a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this._request.send("auth.logout",{refresh_token:a});case 7:return s=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(i),this._cache.removeStore(o),Ve(Je),Ve($e,{env:this.config.env,loginType:Qe.NULL,persistence:this.config.persistence}),s));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signUpWithEmailAndPassword",value:function(){var e=l(r.default.mark((function e(t,n){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:t,password:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"sendPasswordResetEmail",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onLoginStateChanged",value:function(e){var t=this;Xe(Je,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){Xe(Ye,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){Xe(tt,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){Xe(et,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;Xe($e,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=l(r.default.mark((function e(){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.getAccessToken();case 2:return e.t0=e.sent.accessToken,e.t1=this.config.env,e.abrupt("return",{accessToken:e.t0,env:e.t1});case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"hasLoginState",value:function(){var e=this._cache.keys.refreshTokenKey;return this._cache.getStore(e)?new dt(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=l(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({code:"PARAM_ERROR",message:"username must be a string"});case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,i=n.data,e.abrupt("return",i&&i.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new ft(this.config).signIn(t));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"shouldRefreshAccessToken",value:function(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(e){return e.code?e:A(A({},e.data),{},{requestId:e.seqId})}))}},{key:"getAuthHeader",value:function(){var e=this._cache.keys,t=e.refreshTokenKey,n=e.accessTokenKey,i=this._cache.getStore(t);return{"x-cloudbase-credentials":this._cache.getStore(n)+"/@@/"+i}}},{key:"_onAnonymousConverted",value:function(e){var t=e.data.env;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(e){var t=e.data,n=t.loginType,i=t.persistence,r=t.env;r===this.config.env&&(this._cache.updatePersistence(i),this._cache.setStore(this._cache.keys.loginTypeKey,n))}},{key:"currentUser",get:function(){var e=this.hasLoginState();return e&&e.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),yt=function(e,t){t=t||Me();var n=ct(this.config.env),i=e.cloudPath,r=e.filePath,o=e.onUploadProgress,a=e.fileType,s=void 0===a?"image":a;return n.send("storage.getUploadMetadata",{path:i}).then((function(e){var a=e.data,c=a.url,l=a.authorization,u=a.token,d=a.fileId,h=a.cosFileId,f=e.requestId,p={key:i,signature:l,"x-cos-meta-fileid":h,success_action_status:"201","x-cos-security-token":u};n.upload({url:c,data:p,file:r,name:i,fileType:s,onUploadProgress:o}).then((function(e){201===e.statusCode?t(null,{fileID:d,requestId:f}):t(new me({code:"STORAGE_REQUEST_FAIL",message:"STORAGE_REQUEST_FAIL: ".concat(e.data)}))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},mt=function(e,t){t=t||Me();var n=ct(this.config.env),i=e.cloudPath;return n.send("storage.getUploadMetadata",{path:i}).then((function(e){t(null,e)})).catch((function(e){t(e)})),t.promise},xt=function(e,t){var n=e.fileList;if(t=t||Me(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var i,r=p(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(!o||"string"!=typeof o)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(s){r.e(s)}finally{r.f()}var a={fileid_list:n};return ct(this.config.env).send("storage.batchDeleteFile",a).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},At=function(e,t){var n=e.fileList;t=t||Me(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var i,r=[],o=p(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;"object"==typeof a?(a.hasOwnProperty("fileID")&&a.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),r.push({fileid:a.fileID,max_age:a.maxAge})):"string"==typeof a?r.push({fileid:a}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(c){o.e(c)}finally{o.f()}var s={file_list:r};return ct(this.config.env).send("storage.batchGetDownloadUrl",s).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},bt=function(){var e=l(r.default.mark((function e(t,n){var i,o,a,s;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.fileID,e.next=3,At.call(this,{fileList:[{fileID:i,maxAge:600}]});case 3:if(o=e.sent.fileList[0],"SUCCESS"===o.code){e.next=6;break}return e.abrupt("return",n?n(o):new Promise((function(e){e(o)})));case 6:if(a=ct(this.config.env),s=o.download_url,s=encodeURI(s),n){e.next=10;break}return e.abrupt("return",a.download({url:s}));case 10:return e.t0=n,e.next=13,a.download({url:s});case 13:e.t1=e.sent,(0,e.t0)(e.t1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),wt=function(e,t){var n,i=e.name,r=e.data,o=e.query,a=e.parse,s=e.search,c=t||Me();try{n=r?JSON.stringify(r):""}catch(i){return Promise.reject(i)}if(!i)return Promise.reject(new me({code:"PARAM_ERROR",message:"函数名不能为空"}));var l={inQuery:o,parse:a,search:s,function_name:i,request_data:n};return ct(this.config.env).send("functions.invokeFunction",l).then((function(e){if(e.code)c(null,e);else{var t=e.data.response_data;if(a)c(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),c(null,{result:t,requestId:e.requestId})}catch(e){c(new me({message:"response data must be json"}))}}return c.promise})).catch((function(e){c(e)})),c.promise},kt={timeout:15e3,persistence:"session"},St={},Tt=function(){function e(t){w(this,e),this.config=t||this.config,this.authObj=void 0}return m(e,[{key:"init",value:function(t){switch(Re.adapter||(this.requestClient=new Re.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=A(A({},kt),t),!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new e(this.config)}},{key:"auth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.persistence;if(this.authObj)return this.authObj;var n,i=t||Re.adapter.primaryStorage||kt.persistence;return i!==this.config.persistence&&(this.config.persistence=i),function(e){var t=e.env;Ue[t]=new Be(e),Ne[t]=new Be(A(A({},e),{},{persistence:"local"}))}(this.config),n=this.config,st[n.env]=new at(n),this.authObj=new vt(this.config),this.authObj}},{key:"on",value:function(e,t){return Xe.apply(this,[e,t])}},{key:"off",value:function(e,t){return qe.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return wt.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return xt.apply(this,[e,t])}},{key:"getTempFileURL",value:function(e,t){return At.apply(this,[e,t])}},{key:"downloadFile",value:function(e,t){return bt.apply(this,[e,t])}},{key:"uploadFile",value:function(e,t){return yt.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return mt.apply(this,[e,t])}},{key:"registerExtension",value:function(e){St[e.name]=e}},{key:"invokeExtension",value:function(){var e=l(r.default.mark((function e(t,n){var i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=St[t],i){e.next=3;break}throw new me({message:"扩展".concat(t," 必须先注册")});case 3:return e.next=5,i.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"useAdapters",value:function(e){var t=Ie(e)||{},n=t.adapter,i=t.runtime;n&&(Re.adapter=n),i&&(Re.runtime=i)}}]),e}(),Ot=new Tt;function Pt(e,t,n){void 0===n&&(n={});var i=/\?/.test(t),r="";for(var o in n)""===r?!i&&(t+="?"):r+="&",r+=o+"="+encodeURIComponent(n[o]);return/^http(s)?:\/\//.test(t+=r)?t:""+e+t}var Ct=function(){function e(){w(this,e)}return m(e,[{key:"post",value:function(e){var t=e.url,n=e.data,i=e.headers;return new Promise((function(e,r){ke.request({url:Pt("https:",t),data:n,method:"POST",header:i,success:function(t){e(t)},fail:function(e){r(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var i=e.url,r=e.file,o=e.data,a=e.headers,s=e.fileType,c=ke.uploadFile({url:Pt("https:",i),name:"file",formData:Object.assign({},o),filePath:r,fileType:s,header:a,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&o.success_action_status&&(n.statusCode=parseInt(o.success_action_status,10)),t(n)},fail:function(e){W&&"mp-alipay"===H&&console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"),n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),Dt={setItem:function(e,t){ke.setStorageSync(e,t)},getItem:function(e){return ke.getStorageSync(e)},removeItem:function(e){ke.removeStorageSync(e)},clear:function(){ke.clearStorageSync()}},_t={genAdapter:function(){return{root:{},reqClass:Ct,localStorage:Dt,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};Ot.useAdapters(_t);var Ft=Ot,Mt=Ft.init;Ft.init=function(e){e.env=e.spaceId;var t=Mt.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;var n=t.auth;return t.auth=function(e){var t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(e){t[e]=ve(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var Et=Ft;function Lt(){return{token:ke.getStorageSync("uni_id_token")||ke.getStorageSync("uniIdToken"),tokenExpired:ke.getStorageSync("uni_id_token_expired")}}function It(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&ke.setStorageSync("uni_id_token",t),n&&ke.setStorageSync("uni_id_token_expired",n)}function Rt(){W&&"web"===H&&i.getStorageSync("__LAST_DCLOUD_APPID")!==q&&(i.setStorageSync("__LAST_DCLOUD_APPID",q),console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"),ke.removeStorageSync("uni_id_token"),ke.removeStorageSync("uniIdToken"),ke.removeStorageSync("uni_id_token_expired"))}var jt=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"getAccessToken",value:function(){var e=this;return new Promise((function(t,n){var i="Anonymous_Access_token";e.setAccessToken(i),t(i)}))}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),i={"Content-Type":"application/json"};"auth"!==t&&(n.token=this.accessToken,i["x-basement-token"]=this.accessToken),i["x-serverless-sign"]=we.sign(n,this.config.clientSecret);var r=Ae();i["x-client-info"]=encodeURIComponent(JSON.stringify(r));var o=Lt(),a=o.token;return i["x-client-token"]=a,{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:JSON.parse(JSON.stringify(i))}}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,i=e.formData,r=e.name,o=e.filePath,a=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:i,name:r,filePath:o,fileType:a,success:function(t){t&&t.statusCode<400?e(t):c(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new me({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,i=e.filePath,r=e.cloudPath,o=e.fileType,a=void 0===o?"image":o,s=e.onUploadProgress;if(!r)throw new me({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:r}).then((function(e){var r=e.result,o=r.url,c=r.formData,l=r.name;t=e.result.fileUrl;var u={url:o,formData:c,name:l,filePath:i,fileType:a};return n.uploadFileToOSS(Object.assign({},u,{onUploadProgress:s}))})).then((function(){return n.reportOSSUpload({cloudPath:r})})).then((function(e){return new Promise((function(n,r){e.success?n({success:!0,filePath:i,fileID:t}):r(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList,n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}}]),n}(Pe),Kt={init:function(e){var t=new jt(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function zt(e){var t,n=e.data;t=Ae();var i=JSON.parse(JSON.stringify(n||{}));if(Object.assign(i,{clientInfo:t}),!i.uniIdToken){var r=Lt(),o=r.token;o&&(i.uniIdToken=o)}return i}function Bt(e){var t=this,n=e.name,i=e.data,r=this.localAddress,o=this.localPort,a={aliyun:"aliyun",tencent:"tcb"}[this.config.provider],s=this.config.spaceId,c="http://".concat(r,":").concat(o,"/system/check-function"),l="http://".concat(r,":").concat(o,"/cloudfunctions/").concat(n);return new Promise((function(e,t){ke.request({method:"POST",url:c,data:{name:n,platform:H,provider:a,spaceId:s},timeout:3e3,success:function(t){e(t)},fail:function(){e({data:{code:"NETWORK_ERROR",message:"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"}})}})})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data,n=t||{},i=n.code,r=n.message;return{code:0===i?0:i||"SYS_ERR",message:r||"SYS_ERR"}})).then((function(e){var r=e.code,o=e.message;if(0!==r){switch(r){case"MODULE_ENCRYPTED":console.error("此云函数(".concat(n,")依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数"));break;case"FUNCTION_ENCRYPTED":console.error("此云函数(".concat(n,")已加密不可本地调试,自动切换为云端已部署的云函数"));break;case"ACTION_ENCRYPTED":console.error(o||"需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case"NETWORK_ERROR":var s="连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(s),new Error(s);case"SWITCH_TO_CLOUD":break;default:var c="检测本地调试服务出现错误:".concat(o,",请检查网络环境或重启客户端再试");throw console.error(c),new Error(c)}return t._originCallFunction({name:n,data:i})}return new Promise((function(e,n){var r=zt.call(t,{data:i});ke.request({method:"POST",url:l,data:{provider:a,platform:H,param:r},success:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.statusCode,r=t.data;return!i||i>=400?n(new me({code:r.code||"SYS_ERR",message:r.message||"request:fail"})):e({result:r})},fail:function(e){n(new me({code:e.code||e.errCode||"SYS_ERR",message:e.message||e.errMsg||"request:fail"}))}})}))}))}var Ut=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],Nt=/[\\^$.*+?()[\]{}|]/g,Ht=RegExp(Nt.source);function Wt(e,t,n){return e.replace(new RegExp((i=t)&&Ht.test(i)?i.replace(Nt,"\\$&"):i,"g"),n);var i}function Zt(e){var t=e.functionName,n=e.result,i=e.logPvd;if(this.config.debugLog&&n&&n.requestId){var r=JSON.stringify({spaceId:this.config.spaceId,functionName:t,requestId:n.requestId});console.log("[".concat(i,"-request]").concat(r,"[/").concat(i,"-request]"))}}function Gt(e){var t=e.callFunction,n=function(n){var i=this,r=n.name;n.data=zt.call(e,{data:n.data});var o={aliyun:"aliyun",tencent:"tcb",tcb:"tcb"}[this.config.provider];return t.call(this,n).then((function(e){return e.errCode=0,Zt.call(i,{functionName:r,result:e,logPvd:o}),Promise.resolve(e)}),(function(e){return Zt.call(i,{functionName:r,result:e,logPvd:o}),e&&e.message&&(e.message=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=void 0===t?"":t,i=e.extraInfo,r=void 0===i?{}:i,o=e.formatter,a=void 0===o?[]:o,s=0;s-1||e[t].push(n)},off:function(t,n){e[t]=e[t]||[];var i=e[t].indexOf(n);-1!==i&&e[t].splice(i,1)}}}var Qt=["db.Geo","db.command","command.aggregate"];function Jt(e,t){return Qt.indexOf("".concat(e,".").concat(t))>-1}function Yt(e){switch(B(e)){case"array":return e.map((function(e){return Yt(e)}));case"object":return e._internalType===Xt||Object.keys(e).forEach((function(t){e[t]=Yt(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function $t(e){return e&&e.content&&e.content.$method}var en=function(){function e(t,n,i){w(this,e),this.content=t,this.prevStage=n||null,this.udb=null,this._database=i}return m(e,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:Yt(e.$param)}}))}}},{key:"getAction",value:function(){var e=this.toJSON().$db.find((function(e){return"action"===e.$method}));return e&&e.$param&&e.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(e){return"action"!==e.$method}))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",value:function(){return this._send("add",Array.from(arguments))}},{key:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"_send",value:function(e,t){var n=this.getAction(),i=this.getCommand();if(i.$db.push({$method:e,$param:Yt(t)}),W){var r=i.$db.find((function(e){return"collection"===e.$method})),o=r&&r.$param;o&&1===o.length&&"string"==typeof r.$param[0]&&r.$param[0].indexOf(",")>-1&&console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。")}return this._database._callCloudFunction({action:n,command:i})}},{key:"isAggregate",get:function(){for(var e=this;e;){var t=$t(e),n=$t(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}},{key:"isCommand",get:function(){for(var e=this;e;){if("command"===$t(e))return!0;e=e.prevStage}return!1}},{key:"isAggregateCommand",get:function(){for(var e=this;e;){var t=$t(e),n=$t(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}},{key:"count",get:function(){if(!this.isAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return tn({$method:"count",$param:Yt(Array.from(arguments))},e,this._database)}}},{key:"remove",get:function(){if(!this.isCommand)return function(){return this._send("remove",Array.from(arguments))};var e=this;return function(){return tn({$method:"remove",$param:Yt(Array.from(arguments))},e,this._database)}}},{key:"set",get:function(){if(!this.isCommand)return function(){throw new Error("JQL禁止使用set方法")};var e=this;return function(){return tn({$method:"set",$param:Yt(Array.from(arguments))},e,this._database)}}}]),e}();function tn(e,t,n){return Vt(new en(e,t,n),{get:function(e,t){var i="db";return e&&e.content&&(i=e.content.$method),Jt(i,t)?tn({$method:t},e,n):function(){return tn({$method:t,$param:Yt(Array.from(arguments))},e,n)}}})}function nn(e){var t=e.path,n=e.method;return function(){function e(){w(this,e),this.param=Array.from(arguments)}return m(e,[{key:"toJSON",value:function(){return{$newDb:[].concat(u(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}}]),e}()}var rn=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,i=e.command,r=e.multiCommand,o=e.queryList;function a(e,t){if(r&&o)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,i=void 0===n?{}:n;w(this,e),this._uniClient=i,this._authCallBacks={},this._dbCallBacks={},i.isDefault&&(this._dbCallBacks=Y("_globalUniCloudDatabaseCallback")),this.auth=qt(this._authCallBacks),Object.assign(this,qt(this._dbCallBacks)),this.env=Vt({},{get:function(e,t){return{$env:t}}}),this.Geo=Vt({},{get:function(e,t){return nn({path:["Geo"],method:t})}}),this.serverDate=nn({path:[],method:"serverDate"}),this.RegExp=nn({path:[],method:"RegExp"})}return m(e,[{key:"getCloudEnv",value:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}},{key:"_callback",value:function(e,t){var n=this._dbCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,u(t))}))}},{key:"_callbackAuth",value:function(e,t){var n=this._authCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,u(t))}))}},{key:"multiSend",value:function(){var e=Array.from(arguments),t=e.map((function(e){var t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}]),e}());function on(e){e.database=function(t){if(t&&Object.keys(t).length>0)return e.init(t).database();if(this._database)return this._database;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Vt(new e(t),{get:function(e,t){return Jt("db",t)?tn({$method:t},null,e):function(){return tn({$method:t,$param:Yt(Array.from(arguments))},null,e)}}})}(rn,{uniClient:e});return this._database=n,n}}var an="token无效,跳转登录页面",sn="token过期,跳转登录页面",cn={TOKEN_INVALID_TOKEN_EXPIRED:sn,TOKEN_INVALID_INVALID_CLIENTID:an,TOKEN_INVALID:an,TOKEN_INVALID_WRONG_TOKEN:an,TOKEN_INVALID_ANONYMOUS_USER:an},ln={"uni-id-token-expired":sn,"uni-id-check-token-failed":an,"uni-id-token-not-exist":an,"uni-id-check-device-feature-failed":an};function un(e,t){var n="";return n=e?"".concat(e,"/").concat(t):t,n.replace(/^\//,"")}function dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],i=[];return e.forEach((function(e){!0===e.needLogin?n.push(un(t,e.path)):!1===e.needLogin&&i.push(un(t,e.path))})),{needLoginPage:n,notNeedLoginPage:i}}function hn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;var n=t.list,i=e.split("?")[0].replace(/^\//,"");return n.some((function(e){return e.pagePath===i}))}var fn,pn=!!a.default.uniIdRouter,gn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.default,t=e.pages,n=void 0===t?[]:t,i=e.subPackages,r=void 0===i?[]:i,o=e.uniIdRouter,s=void 0===o?{}:o,c=e.tabBar,l=void 0===c?{}:c,d=s.loginPage,h=s.needLogin,f=void 0===h?[]:h,p=s.resToLogin,g=void 0===p||p,v=dn(n),y=v.needLoginPage,m=v.notNeedLoginPage,x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=[];return e.forEach((function(e){var i=e.root,r=e.pages,o=void 0===r?[]:r,a=dn(o,i),s=a.needLoginPage,c=a.notNeedLoginPage;t.push.apply(t,u(s)),n.push.apply(n,u(c))})),{needLoginPage:t,notNeedLoginPage:n}}(r),A=x.needLoginPage,b=x.notNeedLoginPage;return{loginPage:d,routerNeedLogin:f,resToLogin:g,needLoginPage:[].concat(u(y),u(A)),notNeedLoginPage:[].concat(u(m),u(b)),loginPageInTabBar:hn(d,l)}}(),vn=gn.loginPage,yn=gn.routerNeedLogin,mn=gn.resToLogin,xn=gn.needLoginPage,An=gn.notNeedLoginPage,bn=gn.loginPageInTabBar;function wn(e){var t=function(e){var t=getCurrentPages(),n=t[t.length-1].route,i=e.charAt(0),r=e.split("?")[0];if("/"===i)return r;var o=r.replace(/^\//,"").split("/"),a=n.split("/");a.pop();for(var s=0;s-1)&&(xn.indexOf(t)>-1||yn.some((function(t){return function(e,t){return new RegExp(t).test(e)}(e,t)})))}function kn(e,t){return"/"!==e.charAt(0)&&(e="/"+e),t?e.indexOf("?")>-1?e+"&uniIdRedirectUrl=".concat(encodeURIComponent(t)):e+"?uniIdRedirectUrl=".concat(encodeURIComponent(t)):e}function Sn(){for(var e=["navigateTo","redirectTo","reLaunch","switchTab"],t=function(t){var n=e[t];i.addInterceptor(n,{invoke:function(e){var t,r=Lt(),o=r.token,a=r.tokenExpired;if(o){if(a0)return setTimeout((function(){ge(se,t)}),0),e.url="",!1;if(!vn)return e;var l=kn(vn,t.uniIdRedirectUrl);if(bn){if("navigateTo"===n||"redirectTo"===n)return setTimeout((function(){i.switchTab({url:l})})),!1}else if("switchTab"===n)return setTimeout((function(){i.navigateTo({url:l})})),!1;e.url=l}return e}})},n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=he(se),n=getCurrentPages(),r=n[n.length-1],o=r&&r.$page&&r.$page.fullPath;if(t.length>0)return ge(se,Object.assign({uniIdRedirectUrl:o},e));vn&&i.navigateTo({url:kn(vn,o)})}(n)}))}function On(e){e.onNeedLogin=function(e){fe(se,e)},e.offNeedLogin=function(e){pe(se,e)},pn&&(Y("uni-cloud-status").needLoginInit||(Y("uni-cloud-status").needLoginInit=!0,function t(){var n=getCurrentPages();n&&n[0]?Sn.call(e):setTimeout((function(){t()}),30)}(),mn&&Tn.call(e)))}function Pn(e){!function(e){e.onResponse=function(e){fe(ae,e)},e.offResponse=function(e){pe(ae,e)}}(e),On(e),function(e){e.onRefreshToken=function(e){fe(ce,e)},e.offRefreshToken=function(e){pe(ce,e)}}(e)}var Cn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Dn=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function _n(){var e,t,n=Lt().token||"",i=n.split(".");if(!n||3!==i.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=i[1],decodeURIComponent(fn(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}return e.tokenExpired=1e3*e.exp,delete e.exp,delete e.iat,e}fn="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Dn.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,i,r="",o=0;o>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}:atob;var Fn=L((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",r="chooseAndUploadFile:fail";function o(e,t){return e.tempFiles.forEach((function(e,n){e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((function(e){return e.path}))),e}function a(e,t,i){var r=i.onChooseFile,o=i.onUploadProgress;return t.then((function(e){if(r){var t=r(e);if(void 0!==t)return Promise.resolve(t).then((function(t){return void 0===t?e:t}))}return e})).then((function(t){return!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var o=t.tempFiles,a=o.length,s=0;return new Promise((function(n){for(;s=a)!o.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var l=o[i];e.uploadFile({filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,onUploadProgress:function(e){e.index=i,e.tempFile=l,e.tempFilePath=l.path,r&&r(e)}}).then((function(e){l.url=e.fileID,i0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?a(e,function(e){var t=e.count,n=e.sizeType,a=e.sourceType,s=void 0===a?["album","camera"]:a,c=e.extension;return new Promise((function(e,a){i.chooseImage({count:t,sizeType:n,sourceType:s,extension:c,success:function(t){e(o(t,"image"))},fail:function(e){a({errMsg:e.errMsg.replace("chooseImage:fail",r)})}})}))}(t),t):"video"===t.type?a(e,function(e){var t=e.camera,n=e.compressed,a=e.maxDuration,s=e.sourceType,c=void 0===s?["album","camera"]:s,l=e.extension;return new Promise((function(e,s){i.chooseVideo({camera:t,compressed:n,maxDuration:a,sourceType:c,extension:l,success:function(t){var n=t.tempFilePath,i=t.duration,r=t.size,a=t.height,s=t.width;e(o({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:r,type:t.tempFile&&t.tempFile.type||"",width:s,height:a,duration:i,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){s({errMsg:e.errMsg.replace("chooseVideo:fail",r)})}})}))}(t),t):a(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,a){var s=i.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(s=wx.chooseMessageFile),"function"!=typeof s)return a({errMsg:r+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});s({type:"all",count:t,extension:n,success:function(t){e(o(t))},fail:function(e){a({errMsg:e.errMsg.replace("chooseFile:fail",r)})}})}))}(t),t)}}})),Mn=E(Fn),En="manual";function Ln(e){return{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},spaceInfo:{type:Object,default:function(){return{}}},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){if(e.loadtime!==En){for(var i=!1,r=[],o=2;o0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,i=void 0!==n&&n,r=t.success,o=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,o=n.data,a=n.count;e.getcount&&(e.mixinDatacomPage.count=a),e.mixinDatacomHasMore=o.length0&&void 0!==arguments[0]?arguments[0]:{},i=e.database(this.spaceInfo),r=n.action||this.action;r&&(i=i.action(r));var o=n.collection||this.collection;i=Array.isArray(o)?(t=i).collection.apply(t,u(o)):i.collection(o);var a=n.where||this.where;a&&Object.keys(a).length&&(i=i.where(a));var s=n.field||this.field;s&&(i=i.field(s));var c=n.foreignKey||this.foreignKey;c&&(i=i.foreignKey(c));var l=n.groupby||this.groupby;l&&(i=i.groupBy(l));var d=n.groupField||this.groupField;d&&(i=i.groupField(d)),!0===(void 0!==n.distinct?n.distinct:this.distinct)&&(i=i.distinct());var h=n.orderby||this.orderby;h&&(i=i.orderBy(h));var f=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,p=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,g=void 0!==n.getcount?n.getcount:this.getcount,v=void 0!==n.gettree?n.gettree:this.gettree,y=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,m={getCount:g},x={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return v&&(m.getTree=x),y&&(m.getTreePath=x),i=i.skip(p*(f-1)).limit(p).get(m),i}}}}function In(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.customUI=t.customUI||e.customUI,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);var o=n,a=o.customUI,s=o.loadingOptions,c=o.errorOptions,u=!a;return new Proxy({},{get:function(n,o){return function(){var n=l(r.default.mark((function n(){var d,h,f,p,g,v,y,m,x,b,w,k=arguments;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:for(u&&i.showLoading({title:s.title,mask:s.mask}),h=k.length,f=new Array(h),p=0;p0&&void 0!==l[0]?l[0]:{},n=t.title,o=t.content,a=t.showCancel,s=t.cancelText,c=t.confirmText,e.abrupt("return",new Promise((function(e,t){i.showModal({title:n,content:o,showCancel:a,cancelText:s,confirmText:c,success:function(t){e(t)},fail:function(){e({confirm:!1,cancel:!0})}})})));case 2:case"end":return e.stop()}}),e)})))({title:"提示",content:y,showCancel:c.retry,cancelText:"取消",confirmText:c.retry?"重试":"确定"});case 22:if(x=n.sent,b=x.confirm,!c.retry||!b){n.next=26;break}return n.abrupt("return",a.apply(void 0,f));case 26:throw w=new me({code:v,message:y,requestId:d.requestId}),w.detail=d.result,ge(ae,{type:de,content:w}),w;case 28:return n.abrupt("return",(ge(ae,{type:de,content:d.result}),d.result));case 29:case"end":return n.stop()}}),n,null,[[2,8]])})));function a(){return n.apply(this,arguments)}return a}()}})}}function Rn(e,t){return jn.apply(this,arguments)}function jn(){return jn=l(r.default.mark((function e(t,n){var i,o,a;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i="http://".concat(t,":").concat(n,"/system/ping"),e.prev=1,e.next=4,a={url:i,timeout:500},new Promise((function(e,t){ke.request(A(A({},a),{},{success:function(t){e(t)},fail:function(e){t(e)}}))}));case 4:return o=e.sent,e.abrupt("return",!(!o.data||0!==o.data.code));case 8:return e.prev=8,e.t0=e["catch"](1),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),jn.apply(this,arguments)}function Kn(e){if(!e.initUniCloudStatus||"rejected"===e.initUniCloudStatus){var t,n=Promise.resolve();t=1,n=new Promise((function(e,n){setTimeout((function(){e()}),t)})),e.isReady=!1,e.isDefault=!1;var o=e.auth();e.initUniCloudStatus="pending",e.initUniCloud=n.then((function(){return o.getLoginState()})).then((function(e){return e?Promise.resolve():o.signInAnonymously()})).then((function(){if(!W)return Promise.resolve();if("app"===H&&"ios"===i.getSystemInfoSync().osName){var t=i.getSystemInfoSync(),n=t.osName,o=t.osVersion;"ios"===n&&function(e){if(!e||"string"!=typeof e)return 0;var t=e.match(/^(\d+)./);return t&&t[1]?parseInt(t[1]):0}(o)>=14&&console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)")}if(W&&e.debugInfo){var a=e.debugInfo,s=a.address,c=a.servePort;return function(){var e=l(r.default.mark((function e(t,n){var i,o,a;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o=0;case 1:if(!(o0&&void 0!==arguments[0]?arguments[0]:{},n=t.address,i=t.port;if(!W)return Promise.resolve();var r=console["app"===H?"error":"warn"];if(n)e.localAddress=n,e.localPort=i;else if(e.debugInfo){var o="";"remote"===e.debugInfo.initialLaunchType?(e.debugInfo.forceRemote=!0,o="当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs"):o="无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs","web"===H&&(o+="\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"),0===H.indexOf("mp-")&&(o+="\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"),r(o)}})).then((function(){Rt(),e.isReady=!0,e.initUniCloudStatus="fulfilled"})).catch((function(t){console.error(t),e.initUniCloudStatus="rejected"}))}}var zn=new(function(){function e(){w(this,e)}return m(e,[{key:"init",value:function(e){var t={},n=W&&("web"===H&&navigator.userAgent.indexOf("HBuilderX")>0||"app"===H);switch(e.provider){case"tcb":case"tencent":t=Et.init(Object.assign(e,{debugLog:n}));break;case"aliyun":t=Ce.init(Object.assign(e,{debugLog:n}));break;case"private":t=Kt.init(Object.assign(e,{debugLog:n}));break;default:throw new Error("未提供正确的provider参数")}var i=G;return W&&i&&!i.code&&(t.debugInfo=i),Kn(t),t.reInit=function(){Kn(this)},Gt(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),on(t),function(e){e.getCurrentUserInfo=_n,e.chooseAndUploadFile=Mn.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Ln(e)}}),e.importObject=In(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(e){if(t[e]){var n=t[e];t[e]=function(){return t.reInit(),n.apply(t,Array.from(arguments))},t[e]=ve(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=X,t={};if(1===e.length)t=e[0],zn=zn.init(t),zn.isDefault=!0;else{var n,i=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":V?"应用未关联服务空间,请在uniCloud目录右键关联服务空间":"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间",i.forEach((function(e){zn[e]=function(){return console.error(n),Promise.reject(new me({code:"SYS_ERR",message:n}))}}))}Object.assign(zn,{get mixinDatacom(){return Ln(zn)}}),Pn(zn),zn.addInterceptor=te,zn.removeInterceptor=ne,W&&"web"===H&&(window.uniCloud=zn)})();var Bn=zn;t.default=Bn}).call(this,n(2),n(1)["default"])},131:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={pages:[{path:"pages/login/login",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/rescue/task_implement/implement",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/changePassword/changePassword",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/rescue/task_implement/details",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/tabbar/three",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/tabbar/index",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/tabbar/user",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"",navigationBarTextStyle:"white"}},{path:"pages/dadui/jiancha/jiancha",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/dadui/jiuyuan/jiuyuan",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/tabbar/tow",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},tabBar:{custom:!0,color:"#353535",selectedColor:"#5187FF",list:[{pagePath:"pages/tabbar/index"},{pagePath:"pages/tabbar/tow"},{pagePath:"pages/tabbar/three"},{pagePath:"pages/tabbar/user"}]}};t.default=i},132:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={appid:"__UNI__915967A"};t.default=i},133:function(e,t,n){"use strict";function i(e,t){return c(e)||s(e,t)||o(e,t)||r()}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),i=1;ie.end.x||t.end.xe.start.y||t.start.y1&&(r.extra.mount.widthRatio>2&&(r.extra.mount.widthRatio=2),a+=(r.extra.mount.widthRatio-1)*n.eachSpacing);var s=t;return t>=0?(s=0,e.uevent.trigger("scrollLeft"),e.scrollOption.position="left",r.xAxis.scrollPosition="left"):Math.abs(t)>=a-o?(s=o-a,e.uevent.trigger("scrollRight"),e.scrollOption.position="right",r.xAxis.scrollPosition="right"):(e.scrollOption.position=t,r.xAxis.scrollPosition=t),s}function v(e,t,n){function i(e){while(e<0)e+=2*Math.PI;while(e>2*Math.PI)e-=2*Math.PI;return e}return e=i(e),t=i(t),n=i(n),t>n&&(n+=2*Math.PI,e=t&&e<=n}function y(e,t){function n(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].y>=Math.max(e[t-1].y,e[t+1].y)||e[t].y<=Math.min(e[t-1].y,e[t+1].y))}function i(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].x>=Math.max(e[t-1].x,e[t+1].x)||e[t].x<=Math.min(e[t-1].x,e[t+1].x))}var r=.2,o=.2,a=null,s=null,c=null,l=null;if(t<1?(a=e[0].x+(e[1].x-e[0].x)*r,s=e[0].y+(e[1].y-e[0].y)*r):(a=e[t].x+(e[t+1].x-e[t-1].x)*r,s=e[t].y+(e[t+1].y-e[t-1].y)*r),t>e.length-3){var u=e.length-1;c=e[u].x-(e[u].x-e[u-1].x)*o,l=e[u].y-(e[u].y-e[u-1].y)*o}else c=e[t+1].x-(e[t+2].x-e[t].x)*o,l=e[t+1].y-(e[t+2].y-e[t].y)*o;return n(e,t+1)&&(l=e[t+1].y),n(e,t)&&(s=e[t].y),i(e,t+1)&&(c=e[t+1].x),i(e,t)&&(a=e[t].x),(s>=Math.max(e[t].y,e[t+1].y)||s<=Math.min(e[t].y,e[t+1].y))&&(s=e[t].y),(l>=Math.max(e[t].y,e[t+1].y)||l<=Math.min(e[t].y,e[t+1].y))&&(l=e[t+1].y),(a>=Math.max(e[t].x,e[t+1].x)||a<=Math.min(e[t].x,e[t+1].x))&&(a=e[t].x),(c>=Math.max(e[t].x,e[t+1].x)||c<=Math.min(e[t].x,e[t+1].x))&&(c=e[t+1].x),{ctrA:{x:a,y:s},ctrB:{x:c,y:l}}}function m(e,t,n){return{x:n.x+e,y:n.y-t}}function x(e,t){if(t)while(d.isCollision(e,t))e.start.x>0?e.start.y--:e.start.x<0||e.start.y>0?e.start.y++:e.start.y--;return e}function A(e,t,n){var i=[];if(e.length>0&&e[0].data.constructor.toString().indexOf("Array")>-1){t._pieSeries_=e;for(var r=e[0].data,o=0;o=1e4?1e3:i>=1e3?100:i>=100?10:i>=10?5:i>=1?1:i>=.1?.1:i>=.01?.01:i>=.001?.001:i>=1e-4?1e-4:i>=1e-5?1e-5:1e-6,{minRange:f(e,"lower",n),maxRange:f(t,"upper",n)}}function S(e,t,n){var i=0;if(e=String(e),!1!==n&&void 0!==n&&n.setFontSize&&n.measureText)return n.setFontSize(t),n.measureText(e).width;e=e.split("");for(var r=0;r-1;if(o)for(var a=L(e),s=0;s5&&void 0!==arguments[5]?arguments[5]:{},a=t.chartData.calPoints?t.chartData.calPoints:[],s={};if(i.length>0){for(var c=[],l=0;l0&&(i=r[n]),{text:o.formatter?o.formatter(e,i,n,t):e.name+": "+e.data,color:e.color}})),h={x:Math.round(s.x),y:Math.round(s.y)};return{textList:d,offset:h}}function M(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.chartData.xAxisPoints[n]+t.chartData.eachSpacing/2,a=e.map((function(e){return{text:r.formatter?r.formatter(e,i[n],n,t):e.name+": "+e.data,color:e.color,disableLegend:!!e.disableLegend}}));a=a.filter((function(e){if(!0!==e.disableLegend)return e}));var s={x:Math.round(o),y:0};return{textList:a,offset:s}}function E(e,t,n,i,r,o){var a=n.chartData.calPoints,s=o.color.upFill,c=o.color.downFill,l=[s,s,c,s],u=[];t.map((function(t){0==i?t.data[1]-t.data[0]<0?l[1]=c:l[1]=s:(t.data[0]e[i-1][1]&&(l[2]=s),t.data[3]4&&void 0!==arguments[4]?arguments[4]:0,o={index:-1,group:[]},a=n.chartData.eachSpacing/2,s=[];if(t&&t.length>0){if(n.categories){for(var c=1;ct&&(o.index=n)}));else{for(var l=Array(t.length),u=0;u4&&void 0!==arguments[4]?arguments[4]:0,o={index:-1,group:[]},a=n.chartData.eachSpacing/2,s=n.chartData.yAxisPoints;return t&&t.length>0&&z(e,n,i)&&s.forEach((function(t,n){e.y+r+a>t&&(o.index=n)})),o}function j(e,t,n){var i=-1,r=0;if(K(e,t.area)){for(var o=t.points,a=-1,s=0,c=o.length;sd[0]-r&&e.xd[1]-r&&e.yt.start.x&&e.xt.start.y&&e.y=t.area[3]-10&&e.y>=t.area[0]&&e.y<=t.height-t.area[2]}function B(e,t,n){var i=2*Math.PI/n,r=-1;if(G(e,t.center,t.radius)){var o=function(e){return e<0&&(e+=2*Math.PI),e>2*Math.PI&&(e-=2*Math.PI),e},a=Math.atan2(t.center.y-e.y,e.x-t.center.x);a*=-1,a<0&&(a+=2*Math.PI);var s=t.angleList.map((function(e){return e=o(-1*e),e}));s.forEach((function(e,t){var n=o(e-i/2),s=o(e+i/2);s