vendor.js.map 843.0 KB
{"version":3,"sources":["webpack:///./node_modules/@dcloudio/uni-mp-weixin/dist/index.js","webpack:///G:/项目/program/tigerprogram/components/u-parse/libs/html2json.js","webpack:///G:/项目/program/tigerprogram/components/u-parse/libs/wxDiscode.js","webpack:///G:/项目/program/tigerprogram/components/u-parse/libs/htmlparser.js","webpack:///./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack:///./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js","webpack:///(webpack)/buildin/global.js","webpack:///G:/项目/program/tigerprogram/components/u-charts/u-charts.js","webpack:///G:/项目/program/tigerprogram/common/checker.js","webpack:///./node_modules/@dcloudio/uni-stat/dist/index.js","webpack:///G:/项目/program/tigerprogram/static/zan_icon@2x.png","webpack:///G:/项目/program/tigerprogram/static/img_03.png","webpack:///G:/项目/program/tigerprogram/static/banner_img@2x.png","webpack:///G:/项目/program/tigerprogram/pages.json"],"names":["_toString","Object","prototype","toString","hasOwnProperty","isFn","fn","isStr","str","isPlainObject","obj","call","hasOwn","key","noop","cached","cache","create","cachedFn","hit","camelizeRE","camelize","replace","_","c","toUpperCase","HOOKS","globalInterceptors","scopedInterceptors","mergeHook","parentVal","childVal","res","concat","Array","isArray","dedupeHooks","hooks","i","length","indexOf","push","removeHook","hook","index","splice","mergeInterceptorHook","interceptor","option","keys","forEach","removeInterceptorHook","addInterceptor","method","removeInterceptor","wrapperHook","data","isPromise","then","queue","promise","Promise","resolve","callback","wrapperOptions","options","name","oldCallback","callbackInterceptor","wrapperReturnValue","returnValue","returnValueHooks","getApiInterceptorHooks","slice","scopedInterceptor","invokeApi","api","params","invoke","promiseInterceptor","catch","SYNC_API_RE","CONTEXT_API_RE","CALLBACK_API_RE","isContextApi","test","isSyncApi","isCallbackApi","handlePromise","err","shouldPromise","promisify","promiseApi","success","fail","complete","reject","assign","finally","constructor","value","reason","EPS","BASE_DEVICE_WIDTH","isIOS","deviceWidth","deviceDPR","checkDeviceWidth","wx","getSystemInfoSync","platform","pixelRatio","windowWidth","upx2px","number","newDeviceWidth","Number","result","Math","floor","interceptors","baseApi","freeze","previewImage","args","fromArgs","currentIndex","parseInt","current","isNaN","urls","len","filter","item","indicator","loop","protocols","todos","canIUses","CALLBACKS","processCallback","methodName","processReturnValue","processArgs","argsOption","keepFromArgs","toArgs","keyOption","console","warn","keepReturnValue","wrapper","protocol","error","arg1","arg2","apply","todoApis","TODOS","createTodoApi","todoApi","errMsg","providers","oauth","share","payment","getProvider","service","provider","extraApi","getEmitter","getUniEmitter","Emitter","Vue","ctx","$on","arguments","$off","$once","$emit","eventApi","MPPage","Page","MPComponent","Component","customizeRE","customize","initTriggerEvent","mpInstance","canIUse","oldTriggerEvent","triggerEvent","event","initHook","oldHook","PAGE_EVENT_HOOKS","initMocks","vm","mocks","$mp","mpType","mock","hasHook","vueOptions","default","extendOptions","super","mixins","find","mixin","initHooks","mpOptions","$vm","__call_hook","initVueComponent","VueComponent","extend","initSlots","vueSlots","$slots","slotName","$scopedSlots","initVueIds","vueIds","split","_$vueId","_$vuePid","initData","context","methods","e","process","VUE_APP_DEBUG","JSON","parse","stringify","__lifecycle_hooks__","PROP_TYPES","String","Boolean","createObserver","observer","newVal","oldVal","initBehaviors","initBehavior","vueBehaviors","vueExtends","vueMixins","vueProps","behaviors","behavior","type","Date","props","properties","initProperties","vueMixin","parsePropType","defaultValue","file","isBehavior","vueId","setData","opts","wrapper$1","mp","stopPropagation","preventDefault","target","detail","getExtraValue","dataPathsArray","dataPathArray","dataPath","propPath","valuePath","vFor","__get_value","isInteger","vForItem","vForKey","processEventExtra","extra","extraObj","getObjByArray","arr","element","processEventArgs","isCustom","isCustomMPEvent","currentTarget","dataset","comType","__args__","ret","arg","ONCE","CUSTOM","isMatchEventType","eventType","optType","handleEvent","eventOpts","eventOpt","eventsArray","charAt","isOnce","eventArray","handlerCtx","$options","generic","$parent","handler","Error","once","parseBaseApp","initRefs","store","$store","mpHost","beforeCreate","$scope","appOptions","onLaunch","app","globalData","_isMounted","findVmByVueId","vuePid","$children","parentVm","childVm","Behavior","isPage","route","initRelation","defineProperty","get","$refs","components","selectAllComponents","component","ref","forComponents","handleLink","parent","parseApp","createApp","App","parseBaseComponent","vueComponentOptions","multipleSlots","addGlobalClass","componentOptions","__file","lifetimes","attached","propsData","$mount","ready","detached","$destroy","pageLifetimes","show","hide","resize","size","__l","__e","wxsCallMethods","callMethod","parseComponent","hooks$1","parseBasePage","vuePageOptions","pageOptions","onLoad","query","parsePage","createPage","createComponent","canIUseApi","apiName","uni","Proxy","set","uni$1","makeMap","items","block","inline","closeSelf","removeDOCTYPE","html","isDocument","RegExp","$1","trimHtml","getScreenInfo","screen","getSystemInfo","width","height","windowHeight","html2json","customHandler","imageProp","host","wxDiscode","strDiscode","bufArray","results","nodes","imageUrls","Node","tag","node","$screen","start","attrs","unary","undefined","tagType","attr","reduce","pre","classStr","styleStr","match","imgUrl","src","urlToHttpUrl","domain","href","fontSize","styleAttrs","color","face","source","unshift","end","shift","chars","text","trim","strNumDiscode","strGreeceDiscode","strcharacterDiscode","strOtherDiscode","url","startTag","endTag","empty","fillAttrs","HTMLParser","last","stack","parseEndTag","tagName","pos","toLowerCase","parseStartTag","rest","genAttr","matches","escaped","substring","config","yAxisWidth","yAxisSplit","xAxisHeight","xAxisLineHeight","legendHeight","yAxisTitleWidth","padding","rotate","columePadding","dataPointShape","colors","pieChartLinePadding","pieChartTextPadding","xAxisTextPadding","titleColor","titleFontSize","subtitleColor","subtitleFontSize","toolTipPadding","toolTipBackground","toolTipOpacity","toolTipLineHeight","radarLabelTextMargin","gaugeLabelTextMargin","varArgs","TypeError","deepAssign","obj1","obj2","val","util","toFixed","num","limit","isFloat","approximatelyEqual","num1","num2","abs","isSameSign","isSameXCoordinateArea","p1","p2","x","isCollision","y","flag","getH5Offset","changedTouches","offsetX","offsetY","hexToRgb","hexValue","opc","rgx","hex","m","r","g","b","rgb","exec","findRange","multiple","ceil","calCandleMA","dayArr","nameArr","colorArr","kdata","seriesTemp","k","seriesItem","sum","j","calValidDistance","self","distance","chartData","dataChartAreaWidth","area","dataChartWidth","eachSpacing","xAxisData","xAxisPoints","validDistance","trigger","isInAngleRange","angle","startAngle","endAngle","adjust","PI","calRotateTranslate","h","xv","yv","transX","sqrt","transY","createCurveControlPoints","points","isNotMiddlePoint","max","min","a","pAx","pAy","pBx","pBy","ctrA","ctrB","convertCoordinateOrigin","center","avoidCollision","fillSeries","series","map","pointShape","legendShape","getDataRange","minData","maxData","range","minRange","maxRange","measureText","dataCombine","dataCombineStack","getTouches","touches","clientX","pageY","offsetTop","getSeriesDataItem","style","disableLegend","format","getMaxTextListLength","list","lengthList","getRadarCoordinateSeries","eachAngle","CoordinateSeries","getToolTipData","seriesData","calPoints","categories","textList","titleText","validCalPoints","offset","round","getMixToolTipData","getCandleToolTipData","upColor","upFill","downColor","downFill","text0","text1","text2","text3","text4","filterSeries","tempSeries","findCurrentIndex","currentPoints","spacing","xAxis","boundaryGap","isInExactChartArea","findLegendIndex","legendData","isInExactLegendArea","findRadarChartCurrentIndex","radarData","count","eachAngleArea","isInExactPieChartArea","radius","fixAngle","atan2","angleList","rangeStart","rangeEnd","findFunnelChartCurrentIndex","funnelData","funnelArea","findWordChartCurrentIndex","wordData","findMapChartCurrentIndex","cData","mapData","tmp","pointToCoordinate","bounds","scale","xoffset","yoffset","poi","geometry","coordinates","isPoiWithinPoly","findPieChartCurrentIndex","pieData","_start_","_proportion_","pow","splitPoints","newPoints","calLegendData","wholeWidth","wholeHeight","widthArr","heightArr","legend","margin","shapeWidth","shapeRight","lineHeight","position","legendList","widthCount","widthCountArr","currentRow","itemWidth","itemGap","legendWidth","float","maxHeight","maxLength","lineNum","temp","maxWidth","calCategoriesData","categoriesTextLenth","maxTextLength","rotateLabel","sin","getXAxisTextList","sorted","subitem","rangeSpan","dataRange","eachRange","splitNumber","calXAxisData","ranges","rangesFormat","xAxisScaleValues","getXAxisPoints","textLength","disabled","getRadarDataPoints","radarOption","radar","each","listItem","proportion","cos","getPieDataPoints","_radius_","getFunnelDataPoints","sort","reverse","getRoseDataPoints","minRadius","dataArr","radiusLength","_rose_proportion_","getArcbarDataPoints","arcbarOption","totalAngle","getGaugeAxisPoints","tempStartAngle","_startAngle_","_endAngle_","getGaugeDataPoints","gaugeOption","pointer","_oldAngle_","oldAngle","oldData","getPieTextMaxLength","fixColumeData","columnLen","column","fixColumeMeterData","border","fixColumeStackData","indexn","spacingValid","dataCount","enableScroll","itemCount","startX","endX","getCandleDataPoints","validHeight","cPoints","indexs","point","getDataPoints","validWidth","xranges","xminRange","xmaxRange","pop","getStackDataPoints","seriesIndex","stackSeries","value0","height0","heightc","y0","getYAxisTextList","yAxis","calYAxisData","columnstyle","YLength","newSeries","rangesArr","rangesFormatArr","yAxisWidthArr","yData","yAxisFontSizes","calibration","yAxisFontSize","calTooltipYAxisData","yAxisData","minAxis","maxVal","minVal","calMarkLineData","yAxisIndex","contextRotate","rotateLock","translate","_rotate_","drawPointShape","shape","beginPath","dataPointShapeType","setStrokeStyle","setFillStyle","background","setLineWidth","moveTo","lineTo","arc","rect","closePath","fill","stroke","drawRingTitle","titlefontSize","title","subtitlefontSize","subtitle","titleFontColor","subtitleFontColor","titleHeight","subtitleHeight","textWidth","startY","setFontSize","fillText","_textWidth","_startX","_startY","drawPointText","textSize","textColor","formatVal","drawGaugeLabel","centerPosition","splitAngle","splitLine","totalNumber","endNumber","startNumber","nowAngle","nowNumber","labelText","labelFormat","labelColor","drawRadarLabel","posRelativeCanvas","drawPieText","lineRadius","textObjectCollection","lastTextObject","seriesConvert","orginX1","orginY1","orginX2","orginY2","orginX3","orginY3","textObject","lineStart","lineEnd","lineStartPoistion","lineEndPoistion","textPosition","curveStartX","textStartX","quadraticCurveTo","drawToolTipSplitLine","toolTipOption","tooltip","gridType","dashLength","endY","setLineDash","gridColor","xAxisLabel","textX","textY","labelBgColor","labelBgOpacity","labelFontColor","fontColor","drawMarkLine","markLineOption","markLine","lineColor","showLabel","bgStartX","bgEndX","bgWidth","drawToolTipHorizentalLine","yAxisLabel","tStartLeft","tStartRight","drawToolTipSplitArea","activeBgColor","activeBgOpacity","drawToolTip","showBox","bgColor","bgOpacity","legendMarginRight","arrowWidth","isOverRightBorder","toolTipWidth","toolTipHeight","_scrollDistance_","fillRect","drawYAxisTitle","save","restore","drawColumnDataPoints","columnOption","meter","fillColor","leftNum","rightNum","eachSeries","tooltipPoints","dataLabel","drawCandleDataPoints","seriesMA","candleOption","average","candle","upLine","downLine","day","leftSpace","rightSpace","splitPointList","startPoint","ctrlPoint","bezierCurveTo","drawAreaDataPoints","areaOption","opacity","addLine","gradient","createLinearGradient","addColorStop","firstPoint","lastPoint","lineType","drawLineDataPoints","lineOption","line","drawMixDataPoints","columnIndex","columnLength","addPoint","drawToolTipBridge","horizentalLine","drawXAxis","scrollShow","scrollY","scrollScreenWidth","scrollTotalWidth","scrollWidth","scrollLeft","setLineCap","scrollBackgroundColor","scrollColor","disableGrid","gridEval","maxXAxisListLength","labelCount","ratio","newCategories","cgLength","xAxisFontSize","_xAxisTextAngle_","scrollHeight","_calRotateTranslate","axisLine","axisLineColor","drawYAxisGrid","xAxiseachSpacing","TotalWidth","drawYAxis","fillEndY","showTitle","drawLegend","legendArea","borderWidth","borderColor","backgroundColor","itemList","listIndex","hiddenColor","fontTrans","drawPieDataPoints","pieOption","activeOpacity","activeRadius","offsetAngle","labelWidth","ringWidth","pie","_pieTextMaxLength_","lineJoin","innerPieWidth","valid","drawRoseDataPoints","roseOption","rose","drawArcbarDataPoints","gap","arcbar","drawGaugeDataPoints","fixRadius","childNumber","childWidth","gauge","innerRadius","pieRadius","childAngle","proc","pointerRadius","gradient3","eachCategories","childendX","drawRadarDataPoints","gridCount","coordinateAngle","_loop","startPos","radarDataPoints","normalInt","iter","random","collisionNew","isIn","getBoundingBox","coords","xMin","xMax","yMin","yMax","coorda","longitude","latitude","coordinateToPoint","pointY","pointX","isRayIntersectsSegment","s_poi","e_poi","xseg","poly","sinsc","epoly","drawMapDataPoints","mapOption","fillOpacity","activeBorderColor","activeFillColor","activeFillOpacity","xScale","yScale","clearRect","centerPoint","centroid","draw","getWordCloudPoint","tHeight","tWidth","breaknum","Spin","isSpin","areav","drawWordCloudDataPoints","wordOption","autoColors","word","wordCloudData","strokeText","drawFunnelDataPoints","funnelOption","activeWidth","labelAlign","funnel","drawFunnelText","drawCanvas","Timing","easeIn","easeOut","easeInOut","linear","Animation","isStop","duration","timing","delay","createAnimationFrame","setTimeout","step","timeStamp","requestAnimationFrame","animationFrame","startTimeStamp","_step","timestamp","onProcess","onAnimationFinish","timingFunction","bind","stop","drawCharts","_this","animation","animationInstance","_series_","_calLegendData","_calYAxisData","maxTitleHeight","rightIndex","leftIndex","_calCategoriesData","categoriesData","scrollAlign","offsetLeft","totalWidth","screenWidth","scrollOption","currentOffset","startTouchX","lastMoveTime","updateData","_drawLineDataPoints","enableMarkLine","_drawMixDataPoints","_drawColumnDataPoints","_drawAreaDataPoints","arcbarData","gaugeData","_drawCandleDataPoints","Event","events","addEventListener","listener","_len","_key","Charts","config$$1","tempWidth","tempHeight","$this","createCanvasContext","canvasId","scrollPosition","_getXAxisPoints0","zoom","log","centerLeft","MaxLeft","stopAnimation","getCurrentDataIndex","_touches$","getLegendDataIndex","touchLegend","showToolTip","_getToolTipData","_getMixToolTipData","scrollStart","scroll","now","Limit","touchMoveLimit","currMoveTime","_distance","scrollEnd","_scrollOption","module","exports","isJSON","isNumber","checkVal","reg","STAT_VERSION","version","STAT_URL","STAT_H5_URL","PAGE_PVER_TIME","APP_PVER_TIME","OPERATING_TIME","UUID_KEY","UUID_VALUE","getUuid","uuid","getPlatformName","plus","runtime","getDCloudId","getStorageSync","setStorageSync","getSgin","statData","sortArr","sgin","sginStr","sign","substr","getSplicing","getTime","platformList","getPackName","packName","getAccountInfoSync","miniProgram","appId","getVersion","getChannel","platformName","channel","getScene","scene","getLaunchOptionsSync","First__Visit__Time__KEY","Last__Visit__Time__KEY","getFirstVisitTime","timeStorge","time","removeStorageSync","getLastVisitTime","PAGE_RESIDENCE_TIME","First_Page_residence_time","Last_Page_residence_time","setPageResidenceTime","getPageResidenceTime","TOTAL__VISIT__COUNT","getTotalVisitCount","GetEncodeURIComponentOptions","prop","encodeURIComponent","Set__First__Time","Set__Last__Time","getFirstTime","getLastTime","getResidenceTime","residenceTime","overtime","getRoute","pages","getCurrentPages","page","_self","is","getPageRoute","_query","getPageTypes","eventName","PagesJson","require","statConfig","resultOptions","Util","_retry","_platform","_navigationBarTitle","report","lt","_operatingTime","_reportingRequestData","__prevent_triggering","__licationHide","__licationShow","_lastPageRoute","ut","mpn","ak","appid","usv","v","ch","cn","pn","ct","t","tt","p","brand","md","model","sv","system","mpsdk","SDKVersion","mpv","lang","language","pr","ww","wh","sw","sh","screenHeight","path","sc","_sendReportRequest","_sendHideRequest","urlref","urlref_ts","routepath","titleNView","navigationBarTitleText","_sendPageRequest","_sendEventRequest","fvts","lvts","tvc","getProperty","getNetworkInfo","opt","request","e_n","e_v","getNetworkType","net","networkType","getLocation","wgtinfo","geocode","address","country","province","city","lat","lng","ttn","ttpj","ttc","requestData","uniStatData","firstArr","contentArr","lastArr","rd","elm","newData","optionsData","requests","imageRequest","_sendRequest","image","Image","Stat","instance","addInterceptorInit","interceptLogin","interceptShare","interceptRequestPayment","_login","_share","_payment","_pageShow","_applicationShow","_pageHide","_applicationHide","em","info","emVal","message","stat","getInstance","isHide","lifecycle","onReady","load","onShareAppMessage","oldShareAppMessage","onShow","onHide","onUnload","onError","main"],"mappings":";;;;;;;;;;+LAAA,qE;;AAEA,IAAMA,SAAS,GAAGC,MAAM,CAACC,SAAP,CAAiBC,QAAnC;AACA,IAAMC,cAAc,GAAGH,MAAM,CAACC,SAAP,CAAiBE,cAAxC;;AAEA,SAASC,IAAT,CAAeC,EAAf,EAAmB;AACjB,SAAO,OAAOA,EAAP,KAAc,UAArB;AACD;;AAED,SAASC,KAAT,CAAgBC,GAAhB,EAAqB;AACnB,SAAO,OAAOA,G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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA,sBAAsB,+BAA+B;AACrD,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iCAAiC,EAAE;AACrF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,cAAc;;AAE3C;;AAEA;AACA;AACA;AACA,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,aAAoB;;AAErC;AACA;AACA;AACA,YAAY,aAAoB;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA,oCAAoC;AACpC;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA,iCAAiC;AACjC,uCAAuC,wBAAwB,EAAE;AACjE,0BAA0B;;AAE1B;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,wCAAwC,EAAE;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA,+BAA+B,oBAAoB,EAAE;AACrD;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,SAAS,qBAAqB;;AAExD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,KAAqC;AAC/C;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAqC;AACzC;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,uBAAuB;AACzD,iCAAiC,sBAAsB;AACvD;AACA,kBAAkB;AAClB,MAAM,IAAqC;AAC3C;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAoB;AACtC;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,OAAO,UAAU,IAAqC;AACtD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,GAAG,UAAU,IAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,mBAAmB,mBAAmB;AACtC,+BAA+B;AAC/B;AACA,GAAG;AACH;AACA;AACA;AACA,kBAAkB,YAAY;AAC9B,WAAW;AACX;AACA,GAAG,UAAU,IAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,oCAAoC;AACpC;AACA,qCAAqC;AACrC;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAEQ;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,6CAA6C,qCAAqC,EAAE;AACpF;;AAEA;AACA;AACA;;AAEA,oCAAoC,yCAAyC,EAAE;AAC/E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C;AACA;AACA,4BAA4B;AAC5B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAsD,EAAE;AACtF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iCAAiC;AACnE,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kCAAkC,iCAAiC;AACnE,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,yBAAyB;AAC1C,GAAG;AACH;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA;;AAEA;AACA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO,MAAM,EAEN;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,iBAAiB;AACpC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,IAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,sBAAsB,mBAAmB;AACzC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,UAAU,KAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,4CAA4C,eAAe;AAC3D,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA,KAAK;AACL,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA,KAAK,UAAU,KAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,qCAAqC,gEAAgE;AACrG;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,4BAA4B,+BAA+B;AAC3D,4BAA4B,+BAA+B;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C,kDAAkD;AAClD;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,uFAAuF;AAC5F;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C;AAC1C,iBAAiB,yBAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B;AAClC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,oBAAoB,oBAAoB;AACxC,sBAAsB,4BAA4B;AAClD;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,mBAAmB;AACnB,yBAAyB;AACzB;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,6CAA6C;AAC9E;AACA;AACA,6CAA6C,4CAA4C;;AAEzF;AACA;AACA;;AAEA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG,MAAM,EAGN;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,UAAU,KAAqC;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,KAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK,2CAA2C,8BAA8B,EAAE;;AAEhF;AACA,wCAAwC,OAAO;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAqC;AACrD;AACA,oBAAoB,SAAI;AACxB;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;;AAE1B,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0BAA0B;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB,EAAE;;AAEpD;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,KAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,KAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,oBAAoB;AACpB;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,oBAAoB,KAAqC;AACzD;AACA,MAAM,SAAE;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,qBAAqB,+BAA+B;AACpD;AACA;AACA,GAAG;AACH,yBAAyB;AACzB;AACA,sBAAsB,iCAAiC;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK,MAAM,EAEN;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,KAAqC;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,UAAU,IAAqC;AACpD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,8BAA8B;AAC9B,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,KAAqC;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA,KAAK,MAAM,EAEN;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA,kDAAkD;AAClD,0D;;AAEA;AACA,QAAQ,KAAqC;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,KAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;;AAEA;AACA,QAAQ,KAAqC;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,YAAY,KAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA,0CAA0C,2BAA2B,EAAE;AACvE,KAAK;AACL;AACA,0CAA0C,4BAA4B,EAAE;AACxE,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,yBAAyB;AACzB;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,gFAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,gCAAgC,EAAE;AAC5E;;AAEA;AACA;AACA;AACA;AACA,WAAW,gFAAW;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,WAAW,gFAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,0CAA0C;;AAE1C;AACA;AACA;AACA,GAAG;AACH;AACA,sCAAsC;AACtC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA,KAAK;AACL;AACA;AACA,UAAU,gFAAW;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,qDAAqD,EAAE,SAAS;AACtH;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAiC,OAAO;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;A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zH,EAAhrD,E;;;;;;;;;;;;sGAAA,EAAC,SAAQ,EAAT,E","file":"common/vendor.js","sourcesContent":["import Vue from 'vue';\r\n\r\nconst _toString = Object.prototype.toString;\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\n\r\nfunction isFn (fn) {\r\n  return typeof fn === 'function'\r\n}\r\n\r\nfunction isStr (str) {\r\n  return typeof str === 'string'\r\n}\r\n\r\nfunction isPlainObject (obj) {\r\n  return _toString.call(obj) === '[object Object]'\r\n}\r\n\r\nfunction hasOwn (obj, key) {\r\n  return hasOwnProperty.call(obj, key)\r\n}\r\n\r\nfunction noop () {}\r\n\r\n/**\r\n * Create a cached version of a pure function.\r\n */\r\nfunction cached (fn) {\r\n  const cache = Object.create(null);\r\n  return function cachedFn (str) {\r\n    const hit = cache[str];\r\n    return hit || (cache[str] = fn(str))\r\n  }\r\n}\r\n\r\n/**\r\n * Camelize a hyphen-delimited string.\r\n */\r\nconst camelizeRE = /-(\\w)/g;\r\nconst camelize = cached((str) => {\r\n  return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '')\r\n});\r\n\r\nconst HOOKS = [\r\n  'invoke',\r\n  'success',\r\n  'fail',\r\n  'complete',\r\n  'returnValue'\r\n];\r\n\r\nconst globalInterceptors = {};\r\nconst scopedInterceptors = {};\r\n\r\nfunction mergeHook (parentVal, childVal) {\r\n  const res = childVal\r\n    ? parentVal\r\n      ? parentVal.concat(childVal)\r\n      : Array.isArray(childVal)\r\n        ? childVal : [childVal]\r\n    : parentVal;\r\n  return res\r\n    ? dedupeHooks(res)\r\n    : res\r\n}\r\n\r\nfunction dedupeHooks (hooks) {\r\n  const res = [];\r\n  for (let i = 0; i < hooks.length; i++) {\r\n    if (res.indexOf(hooks[i]) === -1) {\r\n      res.push(hooks[i]);\r\n    }\r\n  }\r\n  return res\r\n}\r\n\r\nfunction removeHook (hooks, hook) {\r\n  const index = hooks.indexOf(hook);\r\n  if (index !== -1) {\r\n    hooks.splice(index, 1);\r\n  }\r\n}\r\n\r\nfunction mergeInterceptorHook (interceptor, option) {\r\n  Object.keys(option).forEach(hook => {\r\n    if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {\r\n      interceptor[hook] = mergeHook(interceptor[hook], option[hook]);\r\n    }\r\n  });\r\n}\r\n\r\nfunction removeInterceptorHook (interceptor, option) {\r\n  if (!interceptor || !option) {\r\n    return\r\n  }\r\n  Object.keys(option).forEach(hook => {\r\n    if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {\r\n      removeHook(interceptor[hook], option[hook]);\r\n    }\r\n  });\r\n}\r\n\r\nfunction addInterceptor (method, option) {\r\n  if (typeof method === 'string' && isPlainObject(option)) {\r\n    mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);\r\n  } else if (isPlainObject(method)) {\r\n    mergeInterceptorHook(globalInterceptors, method);\r\n  }\r\n}\r\n\r\nfunction removeInterceptor (method, option) {\r\n  if (typeof method === 'string') {\r\n    if (isPlainObject(option)) {\r\n      removeInterceptorHook(scopedInterceptors[method], option);\r\n    } else {\r\n      delete scopedInterceptors[method];\r\n    }\r\n  } else if (isPlainObject(method)) {\r\n    removeInterceptorHook(globalInterceptors, method);\r\n  }\r\n}\r\n\r\nfunction wrapperHook (hook) {\r\n  return function (data) {\r\n    return hook(data) || data\r\n  }\r\n}\r\n\r\nfunction isPromise (obj) {\r\n  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'\r\n}\r\n\r\nfunction queue (hooks, data) {\r\n  let promise = false;\r\n  for (let i = 0; i < hooks.length; i++) {\r\n    const hook = hooks[i];\r\n    if (promise) {\r\n      promise = Promise.then(wrapperHook(hook));\r\n    } else {\r\n      const res = hook(data);\r\n      if (isPromise(res)) {\r\n        promise = Promise.resolve(res);\r\n      }\r\n      if (res === false) {\r\n        return {\r\n          then () {}\r\n        }\r\n      }\r\n    }\r\n  }\r\n  return promise || {\r\n    then (callback) {\r\n      return callback(data)\r\n    }\r\n  }\r\n}\r\n\r\nfunction wrapperOptions (interceptor, options = {}) {\r\n  ['success', 'fail', 'complete'].forEach(name => {\r\n    if (Array.isArray(interceptor[name])) {\r\n      const oldCallback = options[name];\r\n      options[name] = function callbackInterceptor (res) {\r\n        queue(interceptor[name], res).then((res) => {\r\n          /* eslint-disable no-mixed-operators */\r\n          return isFn(oldCallback) && oldCallback(res) || res\r\n        });\r\n      };\r\n    }\r\n  });\r\n  return options\r\n}\r\n\r\nfunction wrapperReturnValue (method, returnValue) {\r\n  const returnValueHooks = [];\r\n  if (Array.isArray(globalInterceptors.returnValue)) {\r\n    returnValueHooks.push(...globalInterceptors.returnValue);\r\n  }\r\n  const interceptor = scopedInterceptors[method];\r\n  if (interceptor && Array.isArray(interceptor.returnValue)) {\r\n    returnValueHooks.push(...interceptor.returnValue);\r\n  }\r\n  returnValueHooks.forEach(hook => {\r\n    returnValue = hook(returnValue) || returnValue;\r\n  });\r\n  return returnValue\r\n}\r\n\r\nfunction getApiInterceptorHooks (method) {\r\n  const interceptor = Object.create(null);\r\n  Object.keys(globalInterceptors).forEach(hook => {\r\n    if (hook !== 'returnValue') {\r\n      interceptor[hook] = globalInterceptors[hook].slice();\r\n    }\r\n  });\r\n  const scopedInterceptor = scopedInterceptors[method];\r\n  if (scopedInterceptor) {\r\n    Object.keys(scopedInterceptor).forEach(hook => {\r\n      if (hook !== 'returnValue') {\r\n        interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);\r\n      }\r\n    });\r\n  }\r\n  return interceptor\r\n}\r\n\r\nfunction invokeApi (method, api, options, ...params) {\r\n  const interceptor = getApiInterceptorHooks(method);\r\n  if (interceptor && Object.keys(interceptor).length) {\r\n    if (Array.isArray(interceptor.invoke)) {\r\n      const res = queue(interceptor.invoke, options);\r\n      return res.then((options) => {\r\n        return api(wrapperOptions(interceptor, options), ...params)\r\n      })\r\n    } else {\r\n      return api(wrapperOptions(interceptor, options), ...params)\r\n    }\r\n  }\r\n  return api(options, ...params)\r\n}\r\n\r\nconst promiseInterceptor = {\r\n  returnValue (res) {\r\n    if (!isPromise(res)) {\r\n      return res\r\n    }\r\n    return res.then(res => {\r\n      return res[1]\r\n    }).catch(res => {\r\n      return res[0]\r\n    })\r\n  }\r\n};\r\n\r\nconst SYNC_API_RE =\r\n  /^\\$|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;\r\n\r\nconst CONTEXT_API_RE = /^create|Manager$/;\r\n\r\nconst CALLBACK_API_RE = /^on/;\r\n\r\nfunction isContextApi (name) {\r\n  return CONTEXT_API_RE.test(name)\r\n}\r\nfunction isSyncApi (name) {\r\n  return SYNC_API_RE.test(name)\r\n}\r\n\r\nfunction isCallbackApi (name) {\r\n  return CALLBACK_API_RE.test(name) && name !== 'onPush'\r\n}\r\n\r\nfunction handlePromise (promise) {\r\n  return promise.then(data => {\r\n    return [null, data]\r\n  })\r\n    .catch(err => [err])\r\n}\r\n\r\nfunction shouldPromise (name) {\r\n  if (\r\n    isContextApi(name) ||\r\n    isSyncApi(name) ||\r\n    isCallbackApi(name)\r\n  ) {\r\n    return false\r\n  }\r\n  return true\r\n}\r\n\r\nfunction promisify (name, api) {\r\n  if (!shouldPromise(name)) {\r\n    return api\r\n  }\r\n  return function promiseApi (options = {}, ...params) {\r\n    if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {\r\n      return wrapperReturnValue(name, invokeApi(name, api, options, ...params))\r\n    }\r\n    return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {\r\n      invokeApi(name, api, Object.assign({}, options, {\r\n        success: resolve,\r\n        fail: reject\r\n      }), ...params);\r\n      /* eslint-disable no-extend-native */\r\n      if (!Promise.prototype.finally) {\r\n        Promise.prototype.finally = function (callback) {\r\n          const promise = this.constructor;\r\n          return this.then(\r\n            value => promise.resolve(callback()).then(() => value),\r\n            reason => promise.resolve(callback()).then(() => {\r\n              throw reason\r\n            })\r\n          )\r\n        };\r\n      }\r\n    })))\r\n  }\r\n}\r\n\r\nconst EPS = 1e-4;\r\nconst BASE_DEVICE_WIDTH = 750;\r\nlet isIOS = false;\r\nlet deviceWidth = 0;\r\nlet deviceDPR = 0;\r\n\r\nfunction checkDeviceWidth () {\r\n  const {\r\n    platform,\r\n    pixelRatio,\r\n    windowWidth\r\n  } = wx.getSystemInfoSync(); // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni\r\n\r\n  deviceWidth = windowWidth;\r\n  deviceDPR = pixelRatio;\r\n  isIOS = platform === 'ios';\r\n}\r\n\r\nfunction upx2px (number, newDeviceWidth) {\r\n  if (deviceWidth === 0) {\r\n    checkDeviceWidth();\r\n  }\r\n\r\n  number = Number(number);\r\n  if (number === 0) {\r\n    return 0\r\n  }\r\n  let result = (number / BASE_DEVICE_WIDTH) * (newDeviceWidth || deviceWidth);\r\n  if (result < 0) {\r\n    result = -result;\r\n  }\r\n  result = Math.floor(result + EPS);\r\n  if (result === 0) {\r\n    if (deviceDPR === 1 || !isIOS) {\r\n      return 1\r\n    } else {\r\n      return 0.5\r\n    }\r\n  }\r\n  return number < 0 ? -result : result\r\n}\r\n\r\nconst interceptors = {\r\n  promiseInterceptor\r\n};\r\n\r\n\r\n\r\nvar baseApi = /*#__PURE__*/Object.freeze({\r\n  upx2px: upx2px,\r\n  interceptors: interceptors,\r\n  addInterceptor: addInterceptor,\r\n  removeInterceptor: removeInterceptor\r\n});\r\n\r\nvar previewImage = {\r\n  args (fromArgs) {\r\n    let currentIndex = parseInt(fromArgs.current);\r\n    if (isNaN(currentIndex)) {\r\n      return\r\n    }\r\n    const urls = fromArgs.urls;\r\n    if (!Array.isArray(urls)) {\r\n      return\r\n    }\r\n    const len = urls.length;\r\n    if (!len) {\r\n      return\r\n    }\r\n    if (currentIndex < 0) {\r\n      currentIndex = 0;\r\n    } else if (currentIndex >= len) {\r\n      currentIndex = len - 1;\r\n    }\r\n    if (currentIndex > 0) {\r\n      fromArgs.current = urls[currentIndex];\r\n      fromArgs.urls = urls.filter(\r\n        (item, index) => index < currentIndex ? item !== urls[currentIndex] : true\r\n      );\r\n    } else {\r\n      fromArgs.current = urls[0];\r\n    }\r\n    return {\r\n      indicator: false,\r\n      loop: false\r\n    }\r\n  }\r\n};\r\n\r\nconst protocols = {\r\n  previewImage\r\n};\r\nconst todos = [\r\n  'vibrate'\r\n];\r\nconst canIUses = [];\r\n\r\nconst CALLBACKS = ['success', 'fail', 'cancel', 'complete'];\r\n\r\nfunction processCallback (methodName, method, returnValue) {\r\n  return function (res) {\r\n    return method(processReturnValue(methodName, res, returnValue))\r\n  }\r\n}\r\n\r\nfunction processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {\r\n  if (isPlainObject(fromArgs)) { // 一般 api 的参数解析\r\n    const toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值\r\n    if (isFn(argsOption)) {\r\n      argsOption = argsOption(fromArgs, toArgs) || {};\r\n    }\r\n    for (let key in fromArgs) {\r\n      if (hasOwn(argsOption, key)) {\r\n        let keyOption = argsOption[key];\r\n        if (isFn(keyOption)) {\r\n          keyOption = keyOption(fromArgs[key], fromArgs, toArgs);\r\n        }\r\n        if (!keyOption) { // 不支持的参数\r\n          console.warn(`微信小程序 ${methodName}暂不支持${key}`);\r\n        } else if (isStr(keyOption)) { // 重写参数 key\r\n          toArgs[keyOption] = fromArgs[key];\r\n        } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value\r\n          toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;\r\n        }\r\n      } else if (CALLBACKS.indexOf(key) !== -1) {\r\n        toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);\r\n      } else {\r\n        if (!keepFromArgs) {\r\n          toArgs[key] = fromArgs[key];\r\n        }\r\n      }\r\n    }\r\n    return toArgs\r\n  } else if (isFn(fromArgs)) {\r\n    fromArgs = processCallback(methodName, fromArgs, returnValue);\r\n  }\r\n  return fromArgs\r\n}\r\n\r\nfunction processReturnValue (methodName, res, returnValue, keepReturnValue = false) {\r\n  if (isFn(protocols.returnValue)) { // 处理通用 returnValue\r\n    res = protocols.returnValue(methodName, res);\r\n  }\r\n  return processArgs(methodName, res, returnValue, {}, keepReturnValue)\r\n}\r\n\r\nfunction wrapper (methodName, method) {\r\n  if (hasOwn(protocols, methodName)) {\r\n    const protocol = protocols[methodName];\r\n    if (!protocol) { // 暂不支持的 api\r\n      return function () {\r\n        console.error(`微信小程序 暂不支持${methodName}`);\r\n      }\r\n    }\r\n    return function (arg1, arg2) { // 目前 api 最多两个参数\r\n      let options = protocol;\r\n      if (isFn(protocol)) {\r\n        options = protocol(arg1);\r\n      }\r\n\r\n      arg1 = processArgs(methodName, arg1, options.args, options.returnValue);\r\n\r\n      const args = [arg1];\r\n      if (typeof arg2 !== 'undefined') {\r\n        args.push(arg2);\r\n      }\r\n      const returnValue = wx[options.name || methodName].apply(wx, args);\r\n      if (isSyncApi(methodName)) { // 同步 api\r\n        return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName))\r\n      }\r\n      return returnValue\r\n    }\r\n  }\r\n  return method\r\n}\r\n\r\nconst todoApis = Object.create(null);\r\n\r\nconst TODOS = [\r\n  'onTabBarMidButtonTap',\r\n  'subscribePush',\r\n  'unsubscribePush',\r\n  'onPush',\r\n  'offPush',\r\n  'share'\r\n];\r\n\r\nfunction createTodoApi (name) {\r\n  return function todoApi ({\r\n    fail,\r\n    complete\r\n  }) {\r\n    const res = {\r\n      errMsg: `${name}:fail:暂不支持 ${name} 方法`\r\n    };\r\n    isFn(fail) && fail(res);\r\n    isFn(complete) && complete(res);\r\n  }\r\n}\r\n\r\nTODOS.forEach(function (name) {\r\n  todoApis[name] = createTodoApi(name);\r\n});\r\n\r\nvar providers = {\r\n  oauth: ['weixin'],\r\n  share: ['weixin'],\r\n  payment: ['wxpay'],\r\n  push: ['weixin']\r\n};\r\n\r\nfunction getProvider ({\r\n  service,\r\n  success,\r\n  fail,\r\n  complete\r\n}) {\r\n  let res = false;\r\n  if (providers[service]) {\r\n    res = {\r\n      errMsg: 'getProvider:ok',\r\n      service,\r\n      provider: providers[service]\r\n    };\r\n    isFn(success) && success(res);\r\n  } else {\r\n    res = {\r\n      errMsg: 'getProvider:fail:服务[' + service + ']不存在'\r\n    };\r\n    isFn(fail) && fail(res);\r\n  }\r\n  isFn(complete) && complete(res);\r\n}\r\n\r\nvar extraApi = /*#__PURE__*/Object.freeze({\r\n  getProvider: getProvider\r\n});\r\n\r\nconst getEmitter = (function () {\r\n  if (typeof getUniEmitter === 'function') {\r\n    /* eslint-disable no-undef */\r\n    return getUniEmitter\r\n  }\r\n  let Emitter;\r\n  return function getUniEmitter () {\r\n    if (!Emitter) {\r\n      Emitter = new Vue();\r\n    }\r\n    return Emitter\r\n  }\r\n})();\r\n\r\nfunction apply (ctx, method, args) {\r\n  return ctx[method].apply(ctx, args)\r\n}\r\n\r\nfunction $on () {\r\n  return apply(getEmitter(), '$on', [...arguments])\r\n}\r\nfunction $off () {\r\n  return apply(getEmitter(), '$off', [...arguments])\r\n}\r\nfunction $once () {\r\n  return apply(getEmitter(), '$once', [...arguments])\r\n}\r\nfunction $emit () {\r\n  return apply(getEmitter(), '$emit', [...arguments])\r\n}\r\n\r\nvar eventApi = /*#__PURE__*/Object.freeze({\r\n  $on: $on,\r\n  $off: $off,\r\n  $once: $once,\r\n  $emit: $emit\r\n});\r\n\r\n\r\n\r\nvar api = /*#__PURE__*/Object.freeze({\r\n\r\n});\r\n\r\nconst MPPage = Page;\r\nconst MPComponent = Component;\r\n\r\nconst customizeRE = /:/g;\r\n\r\nconst customize = cached((str) => {\r\n  return camelize(str.replace(customizeRE, '-'))\r\n});\r\n\r\nfunction initTriggerEvent (mpInstance) {\r\n  {\r\n    if (!wx.canIUse('nextTick')) {\r\n      return\r\n    }\r\n  }\r\n  const oldTriggerEvent = mpInstance.triggerEvent;\r\n  mpInstance.triggerEvent = function (event, ...args) {\r\n    return oldTriggerEvent.apply(mpInstance, [customize(event), ...args])\r\n  };\r\n}\r\n\r\nfunction initHook (name, options) {\r\n  const oldHook = options[name];\r\n  if (!oldHook) {\r\n    options[name] = function () {\r\n      initTriggerEvent(this);\r\n    };\r\n  } else {\r\n    options[name] = function (...args) {\r\n      initTriggerEvent(this);\r\n      return oldHook.apply(this, args)\r\n    };\r\n  }\r\n}\r\n\r\nPage = function (options = {}) {\r\n  initHook('onLoad', options);\r\n  return MPPage(options)\r\n};\r\n\r\nComponent = function (options = {}) {\r\n  initHook('created', options);\r\n  return MPComponent(options)\r\n};\r\n\r\nconst PAGE_EVENT_HOOKS = [\r\n  'onPullDownRefresh',\r\n  'onReachBottom',\r\n  'onShareAppMessage',\r\n  'onPageScroll',\r\n  'onResize',\r\n  'onTabItemTap'\r\n];\r\n\r\nfunction initMocks (vm, mocks) {\r\n  const mpInstance = vm.$mp[vm.mpType];\r\n  mocks.forEach(mock => {\r\n    if (hasOwn(mpInstance, mock)) {\r\n      vm[mock] = mpInstance[mock];\r\n    }\r\n  });\r\n}\r\n\r\nfunction hasHook (hook, vueOptions) {\r\n  if (!vueOptions) {\r\n    return true\r\n  }\r\n\r\n  if (Vue.options && Array.isArray(Vue.options[hook])) {\r\n    return true\r\n  }\r\n\r\n  vueOptions = vueOptions.default || vueOptions;\r\n\r\n  if (isFn(vueOptions)) {\r\n    if (isFn(vueOptions.extendOptions[hook])) {\r\n      return true\r\n    }\r\n    if (vueOptions.super &&\r\n      vueOptions.super.options &&\r\n      Array.isArray(vueOptions.super.options[hook])) {\r\n      return true\r\n    }\r\n    return false\r\n  }\r\n\r\n  if (isFn(vueOptions[hook])) {\r\n    return true\r\n  }\r\n  const mixins = vueOptions.mixins;\r\n  if (Array.isArray(mixins)) {\r\n    return !!mixins.find(mixin => hasHook(hook, mixin))\r\n  }\r\n}\r\n\r\nfunction initHooks (mpOptions, hooks, vueOptions) {\r\n  hooks.forEach(hook => {\r\n    if (hasHook(hook, vueOptions)) {\r\n      mpOptions[hook] = function (args) {\r\n        return this.$vm && this.$vm.__call_hook(hook, args)\r\n      };\r\n    }\r\n  });\r\n}\r\n\r\nfunction initVueComponent (Vue, vueOptions) {\r\n  vueOptions = vueOptions.default || vueOptions;\r\n  let VueComponent;\r\n  if (isFn(vueOptions)) {\r\n    VueComponent = vueOptions;\r\n    vueOptions = VueComponent.extendOptions;\r\n  } else {\r\n    VueComponent = Vue.extend(vueOptions);\r\n  }\r\n  return [VueComponent, vueOptions]\r\n}\r\n\r\nfunction initSlots (vm, vueSlots) {\r\n  if (Array.isArray(vueSlots) && vueSlots.length) {\r\n    const $slots = Object.create(null);\r\n    vueSlots.forEach(slotName => {\r\n      $slots[slotName] = true;\r\n    });\r\n    vm.$scopedSlots = vm.$slots = $slots;\r\n  }\r\n}\r\n\r\nfunction initVueIds (vueIds, mpInstance) {\r\n  vueIds = (vueIds || '').split(',');\r\n  const len = vueIds.length;\r\n\r\n  if (len === 1) {\r\n    mpInstance._$vueId = vueIds[0];\r\n  } else if (len === 2) {\r\n    mpInstance._$vueId = vueIds[0];\r\n    mpInstance._$vuePid = vueIds[1];\r\n  }\r\n}\r\n\r\nfunction initData (vueOptions, context) {\r\n  let data = vueOptions.data || {};\r\n  const methods = vueOptions.methods || {};\r\n\r\n  if (typeof data === 'function') {\r\n    try {\r\n      data = data.call(context); // 支持 Vue.prototype 上挂的数据\r\n    } catch (e) {\r\n      if (process.env.VUE_APP_DEBUG) {\r\n        console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);\r\n      }\r\n    }\r\n  } else {\r\n    try {\r\n      // 对 data 格式化\r\n      data = JSON.parse(JSON.stringify(data));\r\n    } catch (e) {}\r\n  }\r\n\r\n  if (!isPlainObject(data)) {\r\n    data = {};\r\n  }\r\n\r\n  Object.keys(methods).forEach(methodName => {\r\n    if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {\r\n      data[methodName] = methods[methodName];\r\n    }\r\n  });\r\n\r\n  return data\r\n}\r\n\r\nconst PROP_TYPES = [String, Number, Boolean, Object, Array, null];\r\n\r\nfunction createObserver (name) {\r\n  return function observer (newVal, oldVal) {\r\n    if (this.$vm) {\r\n      this.$vm[name] = newVal; // 为了触发其他非 render watcher\r\n    }\r\n  }\r\n}\r\n\r\nfunction initBehaviors (vueOptions, initBehavior) {\r\n  const vueBehaviors = vueOptions['behaviors'];\r\n  const vueExtends = vueOptions['extends'];\r\n  const vueMixins = vueOptions['mixins'];\r\n\r\n  let vueProps = vueOptions['props'];\r\n\r\n  if (!vueProps) {\r\n    vueOptions['props'] = vueProps = [];\r\n  }\r\n\r\n  const behaviors = [];\r\n  if (Array.isArray(vueBehaviors)) {\r\n    vueBehaviors.forEach(behavior => {\r\n      behaviors.push(behavior.replace('uni://', `${\"wx\"}://`));\r\n      if (behavior === 'uni://form-field') {\r\n        if (Array.isArray(vueProps)) {\r\n          vueProps.push('name');\r\n          vueProps.push('value');\r\n        } else {\r\n          vueProps['name'] = {\r\n            type: String,\r\n            default: ''\r\n          };\r\n          vueProps['value'] = {\r\n            type: [String, Number, Boolean, Array, Object, Date],\r\n            default: ''\r\n          };\r\n        }\r\n      }\r\n    });\r\n  }\r\n  if (isPlainObject(vueExtends) && vueExtends.props) {\r\n    behaviors.push(\r\n      initBehavior({\r\n        properties: initProperties(vueExtends.props, true)\r\n      })\r\n    );\r\n  }\r\n  if (Array.isArray(vueMixins)) {\r\n    vueMixins.forEach(vueMixin => {\r\n      if (isPlainObject(vueMixin) && vueMixin.props) {\r\n        behaviors.push(\r\n          initBehavior({\r\n            properties: initProperties(vueMixin.props, true)\r\n          })\r\n        );\r\n      }\r\n    });\r\n  }\r\n  return behaviors\r\n}\r\n\r\nfunction parsePropType (key, type, defaultValue, file) {\r\n  // [String]=>String\r\n  if (Array.isArray(type) && type.length === 1) {\r\n    return type[0]\r\n  }\r\n  return type\r\n}\r\n\r\nfunction initProperties (props, isBehavior = false, file = '') {\r\n  const properties = {};\r\n  if (!isBehavior) {\r\n    properties.vueId = {\r\n      type: String,\r\n      value: ''\r\n    };\r\n    properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots\r\n      type: null,\r\n      value: [],\r\n      observer: function (newVal, oldVal) {\r\n        const $slots = Object.create(null);\r\n        newVal.forEach(slotName => {\r\n          $slots[slotName] = true;\r\n        });\r\n        this.setData({\r\n          $slots\r\n        });\r\n      }\r\n    };\r\n  }\r\n  if (Array.isArray(props)) { // ['title']\r\n    props.forEach(key => {\r\n      properties[key] = {\r\n        type: null,\r\n        observer: createObserver(key)\r\n      };\r\n    });\r\n  } else if (isPlainObject(props)) { // {title:{type:String,default:''},content:String}\r\n    Object.keys(props).forEach(key => {\r\n      const opts = props[key];\r\n      if (isPlainObject(opts)) { // title:{type:String,default:''}\r\n        let value = opts['default'];\r\n        if (isFn(value)) {\r\n          value = value();\r\n        }\r\n\r\n        opts.type = parsePropType(key, opts.type);\r\n\r\n        properties[key] = {\r\n          type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,\r\n          value,\r\n          observer: createObserver(key)\r\n        };\r\n      } else { // content:String\r\n        const type = parsePropType(key, opts);\r\n        properties[key] = {\r\n          type: PROP_TYPES.indexOf(type) !== -1 ? type : null,\r\n          observer: createObserver(key)\r\n        };\r\n      }\r\n    });\r\n  }\r\n  return properties\r\n}\r\n\r\nfunction wrapper$1 (event) {\r\n  // TODO 又得兼容 mpvue 的 mp 对象\r\n  try {\r\n    event.mp = JSON.parse(JSON.stringify(event));\r\n  } catch (e) {}\r\n\r\n  event.stopPropagation = noop;\r\n  event.preventDefault = noop;\r\n\r\n  event.target = event.target || {};\r\n\r\n  if (!hasOwn(event, 'detail')) {\r\n    event.detail = {};\r\n  }\r\n\r\n  if (isPlainObject(event.detail)) {\r\n    event.target = Object.assign({}, event.target, event.detail);\r\n  }\r\n\r\n  return event\r\n}\r\n\r\nfunction getExtraValue (vm, dataPathsArray) {\r\n  let context = vm;\r\n  dataPathsArray.forEach(dataPathArray => {\r\n    const dataPath = dataPathArray[0];\r\n    const value = dataPathArray[2];\r\n    if (dataPath || typeof value !== 'undefined') { // ['','',index,'disable']\r\n      const propPath = dataPathArray[1];\r\n      const valuePath = dataPathArray[3];\r\n\r\n      const vFor = dataPath ? vm.__get_value(dataPath, context) : context;\r\n\r\n      if (Number.isInteger(vFor)) {\r\n        context = value;\r\n      } else if (!propPath) {\r\n        context = vFor[value];\r\n      } else {\r\n        if (Array.isArray(vFor)) {\r\n          context = vFor.find(vForItem => {\r\n            return vm.__get_value(propPath, vForItem) === value\r\n          });\r\n        } else if (isPlainObject(vFor)) {\r\n          context = Object.keys(vFor).find(vForKey => {\r\n            return vm.__get_value(propPath, vFor[vForKey]) === value\r\n          });\r\n        } else {\r\n          console.error('v-for 暂不支持循环数据:', vFor);\r\n        }\r\n      }\r\n\r\n      if (valuePath) {\r\n        context = vm.__get_value(valuePath, context);\r\n      }\r\n    }\r\n  });\r\n  return context\r\n}\r\n\r\nfunction processEventExtra (vm, extra, event) {\r\n  const extraObj = {};\r\n\r\n  if (Array.isArray(extra) && extra.length) {\r\n    /**\r\n     *[\r\n     *    ['data.items', 'data.id', item.data.id],\r\n     *    ['metas', 'id', meta.id]\r\n     *],\r\n     *[\r\n     *    ['data.items', 'data.id', item.data.id],\r\n     *    ['metas', 'id', meta.id]\r\n     *],\r\n     *'test'\r\n     */\r\n    extra.forEach((dataPath, index) => {\r\n      if (typeof dataPath === 'string') {\r\n        if (!dataPath) { // model,prop.sync\r\n          extraObj['$' + index] = vm;\r\n        } else {\r\n          if (dataPath === '$event') { // $event\r\n            extraObj['$' + index] = event;\r\n          } else if (dataPath.indexOf('$event.') === 0) { // $event.target.value\r\n            extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);\r\n          } else {\r\n            extraObj['$' + index] = vm.__get_value(dataPath);\r\n          }\r\n        }\r\n      } else {\r\n        extraObj['$' + index] = getExtraValue(vm, dataPath);\r\n      }\r\n    });\r\n  }\r\n\r\n  return extraObj\r\n}\r\n\r\nfunction getObjByArray (arr) {\r\n  const obj = {};\r\n  for (let i = 1; i < arr.length; i++) {\r\n    const element = arr[i];\r\n    obj[element[0]] = element[1];\r\n  }\r\n  return obj\r\n}\r\n\r\nfunction processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {\r\n  let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象\r\n  if (isCustom) { // 自定义事件\r\n    isCustomMPEvent = event.currentTarget &&\r\n      event.currentTarget.dataset &&\r\n      event.currentTarget.dataset.comType === 'wx';\r\n    if (!args.length) { // 无参数,直接传入 event 或 detail 数组\r\n      if (isCustomMPEvent) {\r\n        return [event]\r\n      }\r\n      return event.detail.__args__ || event.detail\r\n    }\r\n  }\r\n\r\n  const extraObj = processEventExtra(vm, extra, event);\r\n\r\n  const ret = [];\r\n  args.forEach(arg => {\r\n    if (arg === '$event') {\r\n      if (methodName === '__set_model' && !isCustom) { // input v-model value\r\n        ret.push(event.target.value);\r\n      } else {\r\n        if (isCustom && !isCustomMPEvent) {\r\n          ret.push(event.detail.__args__[0]);\r\n        } else { // wxcomponent 组件或内置组件\r\n          ret.push(event);\r\n        }\r\n      }\r\n    } else {\r\n      if (Array.isArray(arg) && arg[0] === 'o') {\r\n        ret.push(getObjByArray(arg));\r\n      } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {\r\n        ret.push(extraObj[arg]);\r\n      } else {\r\n        ret.push(arg);\r\n      }\r\n    }\r\n  });\r\n\r\n  return ret\r\n}\r\n\r\nconst ONCE = '~';\r\nconst CUSTOM = '^';\r\n\r\nfunction isMatchEventType (eventType, optType) {\r\n  return (eventType === optType) ||\r\n    (\r\n      optType === 'regionchange' &&\r\n      (\r\n        eventType === 'begin' ||\r\n        eventType === 'end'\r\n      )\r\n    )\r\n}\r\n\r\nfunction handleEvent (event) {\r\n  event = wrapper$1(event);\r\n\r\n  // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]\r\n  const dataset = (event.currentTarget || event.target).dataset;\r\n  if (!dataset) {\r\n    return console.warn(`事件信息不存在`)\r\n  }\r\n  const eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰\r\n  if (!eventOpts) {\r\n    return console.warn(`事件信息不存在`)\r\n  }\r\n\r\n  // [['handle',[1,2,a]],['handle1',[1,2,a]]]\r\n  const eventType = event.type;\r\n\r\n  const ret = [];\r\n\r\n  eventOpts.forEach(eventOpt => {\r\n    let type = eventOpt[0];\r\n    const eventsArray = eventOpt[1];\r\n\r\n    const isCustom = type.charAt(0) === CUSTOM;\r\n    type = isCustom ? type.slice(1) : type;\r\n    const isOnce = type.charAt(0) === ONCE;\r\n    type = isOnce ? type.slice(1) : type;\r\n\r\n    if (eventsArray && isMatchEventType(eventType, type)) {\r\n      eventsArray.forEach(eventArray => {\r\n        const methodName = eventArray[0];\r\n        if (methodName) {\r\n          let handlerCtx = this.$vm;\r\n          if (\r\n            handlerCtx.$options.generic &&\r\n            handlerCtx.$parent &&\r\n            handlerCtx.$parent.$parent\r\n          ) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots\r\n            handlerCtx = handlerCtx.$parent.$parent;\r\n          }\r\n          if (methodName === '$emit') {\r\n            handlerCtx.$emit.apply(handlerCtx,\r\n              processEventArgs(\r\n                this.$vm,\r\n                event,\r\n                eventArray[1],\r\n                eventArray[2],\r\n                isCustom,\r\n                methodName\r\n              ));\r\n            return\r\n          }\r\n          const handler = handlerCtx[methodName];\r\n          if (!isFn(handler)) {\r\n            throw new Error(` _vm.${methodName} is not a function`)\r\n          }\r\n          if (isOnce) {\r\n            if (handler.once) {\r\n              return\r\n            }\r\n            handler.once = true;\r\n          }\r\n          ret.push(handler.apply(handlerCtx, processEventArgs(\r\n            this.$vm,\r\n            event,\r\n            eventArray[1],\r\n            eventArray[2],\r\n            isCustom,\r\n            methodName\r\n          )));\r\n        }\r\n      });\r\n    }\r\n  });\r\n\r\n  if (\r\n    eventType === 'input' &&\r\n    ret.length === 1 &&\r\n    typeof ret[0] !== 'undefined'\r\n  ) {\r\n    return ret[0]\r\n  }\r\n}\r\n\r\nconst hooks = [\r\n  'onShow',\r\n  'onHide',\r\n  'onError',\r\n  'onPageNotFound'\r\n];\r\n\r\nfunction parseBaseApp (vm, {\r\n  mocks,\r\n  initRefs\r\n}) {\r\n  if (vm.$options.store) {\r\n    Vue.prototype.$store = vm.$options.store;\r\n  }\r\n\r\n  Vue.prototype.mpHost = \"mp-weixin\";\r\n\r\n  Vue.mixin({\r\n    beforeCreate () {\r\n      if (!this.$options.mpType) {\r\n        return\r\n      }\r\n\r\n      this.mpType = this.$options.mpType;\r\n\r\n      this.$mp = {\r\n        data: {},\r\n        [this.mpType]: this.$options.mpInstance\r\n      };\r\n\r\n      this.$scope = this.$options.mpInstance;\r\n\r\n      delete this.$options.mpType;\r\n      delete this.$options.mpInstance;\r\n\r\n      if (this.mpType !== 'app') {\r\n        initRefs(this);\r\n        initMocks(this, mocks);\r\n      }\r\n    }\r\n  });\r\n\r\n  const appOptions = {\r\n    onLaunch (args) {\r\n      if (this.$vm) { // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前\r\n        return\r\n      }\r\n      {\r\n        if (!wx.canIUse('nextTick')) { // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断\r\n          console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');\r\n        }\r\n      }\r\n\r\n      this.$vm = vm;\r\n\r\n      this.$vm.$mp = {\r\n        app: this\r\n      };\r\n\r\n      this.$vm.$scope = this;\r\n      // vm 上也挂载 globalData\r\n      this.$vm.globalData = this.globalData;\r\n\r\n      this.$vm._isMounted = true;\r\n      this.$vm.__call_hook('mounted', args);\r\n\r\n      this.$vm.__call_hook('onLaunch', args);\r\n    }\r\n  };\r\n\r\n  // 兼容旧版本 globalData\r\n  appOptions.globalData = vm.$options.globalData || {};\r\n  // 将 methods 中的方法挂在 getApp() 中\r\n  const methods = vm.$options.methods;\r\n  if (methods) {\r\n    Object.keys(methods).forEach(name => {\r\n      appOptions[name] = methods[name];\r\n    });\r\n  }\r\n\r\n  initHooks(appOptions, hooks);\r\n\r\n  return appOptions\r\n}\r\n\r\nconst mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];\r\n\r\nfunction findVmByVueId (vm, vuePid) {\r\n  const $children = vm.$children;\r\n  // 优先查找直属\r\n  let parentVm = $children.find(childVm => childVm.$scope._$vueId === vuePid);\r\n  if (parentVm) {\r\n    return parentVm\r\n  }\r\n  // 反向递归查找\r\n  for (let i = $children.length - 1; i >= 0; i--) {\r\n    parentVm = findVmByVueId($children[i], vuePid);\r\n    if (parentVm) {\r\n      return parentVm\r\n    }\r\n  }\r\n}\r\n\r\nfunction initBehavior (options) {\r\n  return Behavior(options)\r\n}\r\n\r\nfunction isPage () {\r\n  return !!this.route\r\n}\r\n\r\nfunction initRelation (detail) {\r\n  this.triggerEvent('__l', detail);\r\n}\r\n\r\nfunction initRefs (vm) {\r\n  const mpInstance = vm.$scope;\r\n  Object.defineProperty(vm, '$refs', {\r\n    get () {\r\n      const $refs = {};\r\n      const components = mpInstance.selectAllComponents('.vue-ref');\r\n      components.forEach(component => {\r\n        const ref = component.dataset.ref;\r\n        $refs[ref] = component.$vm || component;\r\n      });\r\n      const forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');\r\n      forComponents.forEach(component => {\r\n        const ref = component.dataset.ref;\r\n        if (!$refs[ref]) {\r\n          $refs[ref] = [];\r\n        }\r\n        $refs[ref].push(component.$vm || component);\r\n      });\r\n      return $refs\r\n    }\r\n  });\r\n}\r\n\r\nfunction handleLink (event) {\r\n  const {\r\n    vuePid,\r\n    vueOptions\r\n  } = event.detail || event.value; // detail 是微信,value 是百度(dipatch)\r\n\r\n  let parentVm;\r\n\r\n  if (vuePid) {\r\n    parentVm = findVmByVueId(this.$vm, vuePid);\r\n  }\r\n\r\n  if (!parentVm) {\r\n    parentVm = this.$vm;\r\n  }\r\n\r\n  vueOptions.parent = parentVm;\r\n}\r\n\r\nfunction parseApp (vm) {\r\n  return parseBaseApp(vm, {\r\n    mocks,\r\n    initRefs\r\n  })\r\n}\r\n\r\nfunction createApp (vm) {\r\n  App(parseApp(vm));\r\n  return vm\r\n}\r\n\r\nfunction parseBaseComponent (vueComponentOptions, {\r\n  isPage,\r\n  initRelation\r\n} = {}) {\r\n  let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions);\r\n\r\n  const options = {\r\n    multipleSlots: true,\r\n    addGlobalClass: true\r\n  };\r\n\r\n  {\r\n    // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项\r\n    if (vueOptions['mp-weixin'] && vueOptions['mp-weixin']['options']) {\r\n      Object.assign(options, vueOptions['mp-weixin']['options']);\r\n    }\r\n  }\r\n\r\n  const componentOptions = {\r\n    options,\r\n    data: initData(vueOptions, Vue.prototype),\r\n    behaviors: initBehaviors(vueOptions, initBehavior),\r\n    properties: initProperties(vueOptions.props, false, vueOptions.__file),\r\n    lifetimes: {\r\n      attached () {\r\n        const properties = this.properties;\r\n\r\n        const options = {\r\n          mpType: isPage.call(this) ? 'page' : 'component',\r\n          mpInstance: this,\r\n          propsData: properties\r\n        };\r\n\r\n        initVueIds(properties.vueId, this);\r\n\r\n        // 处理父子关系\r\n        initRelation.call(this, {\r\n          vuePid: this._$vuePid,\r\n          vueOptions: options\r\n        });\r\n\r\n        // 初始化 vue 实例\r\n        this.$vm = new VueComponent(options);\r\n\r\n        // 处理$slots,$scopedSlots(暂不支持动态变化$slots)\r\n        initSlots(this.$vm, properties.vueSlots);\r\n\r\n        // 触发首次 setData\r\n        this.$vm.$mount();\r\n      },\r\n      ready () {\r\n        // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发\r\n        // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800\r\n        if (this.$vm) {\r\n          this.$vm._isMounted = true;\r\n          this.$vm.__call_hook('mounted');\r\n          this.$vm.__call_hook('onReady');\r\n        }\r\n      },\r\n      detached () {\r\n        this.$vm.$destroy();\r\n      }\r\n    },\r\n    pageLifetimes: {\r\n      show (args) {\r\n        this.$vm && this.$vm.__call_hook('onPageShow', args);\r\n      },\r\n      hide () {\r\n        this.$vm && this.$vm.__call_hook('onPageHide');\r\n      },\r\n      resize (size) {\r\n        this.$vm && this.$vm.__call_hook('onPageResize', size);\r\n      }\r\n    },\r\n    methods: {\r\n      __l: handleLink,\r\n      __e: handleEvent\r\n    }\r\n  };\r\n\r\n  if (Array.isArray(vueOptions.wxsCallMethods)) {\r\n    vueOptions.wxsCallMethods.forEach(callMethod => {\r\n      componentOptions.methods[callMethod] = function (args) {\r\n        return this.$vm[callMethod](args)\r\n      };\r\n    });\r\n  }\r\n\r\n  if (isPage) {\r\n    return componentOptions\r\n  }\r\n  return [componentOptions, VueComponent]\r\n}\r\n\r\nfunction parseComponent (vueComponentOptions) {\r\n  return parseBaseComponent(vueComponentOptions, {\r\n    isPage,\r\n    initRelation\r\n  })\r\n}\r\n\r\nconst hooks$1 = [\r\n  'onShow',\r\n  'onHide',\r\n  'onUnload'\r\n];\r\n\r\nhooks$1.push(...PAGE_EVENT_HOOKS);\r\n\r\nfunction parseBasePage (vuePageOptions, {\r\n  isPage,\r\n  initRelation\r\n}) {\r\n  const pageOptions = parseComponent(vuePageOptions);\r\n\r\n  initHooks(pageOptions.methods, hooks$1, vuePageOptions);\r\n\r\n  pageOptions.methods.onLoad = function (args) {\r\n    this.$vm.$mp.query = args; // 兼容 mpvue\r\n    this.$vm.__call_hook('onLoad', args);\r\n  };\r\n\r\n  return pageOptions\r\n}\r\n\r\nfunction parsePage (vuePageOptions) {\r\n  return parseBasePage(vuePageOptions, {\r\n    isPage,\r\n    initRelation\r\n  })\r\n}\r\n\r\nfunction createPage (vuePageOptions) {\r\n  {\r\n    return Component(parsePage(vuePageOptions))\r\n  }\r\n}\r\n\r\nfunction createComponent (vueOptions) {\r\n  {\r\n    return Component(parseComponent(vueOptions))\r\n  }\r\n}\r\n\r\ntodos.forEach(todoApi => {\r\n  protocols[todoApi] = false;\r\n});\r\n\r\ncanIUses.forEach(canIUseApi => {\r\n  const apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name\r\n    : canIUseApi;\r\n  if (!wx.canIUse(apiName)) {\r\n    protocols[canIUseApi] = false;\r\n  }\r\n});\r\n\r\nlet uni = {};\r\n\r\nif (typeof Proxy !== 'undefined' && \"mp-weixin\" !== 'app-plus') {\r\n  uni = new Proxy({}, {\r\n    get (target, name) {\r\n      if (target[name]) {\r\n        return target[name]\r\n      }\r\n      if (baseApi[name]) {\r\n        return baseApi[name]\r\n      }\r\n      if (api[name]) {\r\n        return promisify(name, api[name])\r\n      }\r\n      {\r\n        if (extraApi[name]) {\r\n          return promisify(name, extraApi[name])\r\n        }\r\n        if (todoApis[name]) {\r\n          return promisify(name, todoApis[name])\r\n        }\r\n      }\r\n      if (eventApi[name]) {\r\n        return eventApi[name]\r\n      }\r\n      if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {\r\n        return\r\n      }\r\n      return promisify(name, wrapper(name, wx[name]))\r\n    },\r\n    set (target, name, value) {\r\n      target[name] = value;\r\n      return true\r\n    }\r\n  });\r\n} else {\r\n  Object.keys(baseApi).forEach(name => {\r\n    uni[name] = baseApi[name];\r\n  });\r\n\r\n  {\r\n    Object.keys(todoApis).forEach(name => {\r\n      uni[name] = promisify(name, todoApis[name]);\r\n    });\r\n    Object.keys(extraApi).forEach(name => {\r\n      uni[name] = promisify(name, todoApis[name]);\r\n    });\r\n  }\r\n\r\n  Object.keys(eventApi).forEach(name => {\r\n    uni[name] = eventApi[name];\r\n  });\r\n\r\n  Object.keys(api).forEach(name => {\r\n    uni[name] = promisify(name, api[name]);\r\n  });\r\n\r\n  Object.keys(wx).forEach(name => {\r\n    if (hasOwn(wx, name) || hasOwn(protocols, name)) {\r\n      uni[name] = promisify(name, wrapper(name, wx[name]));\r\n    }\r\n  });\r\n}\r\n\r\nwx.createApp = createApp;\r\nwx.createPage = createPage;\r\nwx.createComponent = createComponent;\r\n\r\nvar uni$1 = uni;\r\n\r\nexport default uni$1;\r\nexport { createApp, createComponent, createPage };\r\n","/**\r\n * html2Json 改造来自: https://github.com/Jxck/html2json\r\n *\r\n *\r\n * author: Di (微信小程序开发工程师)\r\n * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)\r\n *               垂直微信小程序开发交流社区\r\n *\r\n * github地址: https://github.com/icindy/wxParse\r\n *\r\n * for: 微信小程序富文本解析\r\n * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184\r\n */\r\n\r\nimport wxDiscode from './wxDiscode';\r\nimport HTMLParser from './htmlparser';\r\n\r\nfunction makeMap(str) {\r\n  const obj = {};\r\n  const items = str.split(',');\r\n  for (let i = 0; i < items.length; i += 1) obj[items[i]] = true;\r\n  return obj;\r\n}\r\n\r\n// Block Elements - HTML 5\r\nconst block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');\r\n\r\n// Inline Elements - HTML 5\r\nconst inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');\r\n\r\n// Elements that you can, intentionally, leave open\r\n// (and which close themselves)\r\nconst closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');\r\n\r\nfunction removeDOCTYPE(html) {\r\n  const isDocument = /<body.*>([^]*)<\\/body>/.test(html);\r\n  return isDocument ? RegExp.$1 : html;\r\n}\r\n\r\nfunction trimHtml(html) {\r\n  return html\r\n    .replace(/<!--.*?-->/gi, '')\r\n    .replace(/\\/\\*.*?\\*\\//gi, '')\r\n    .replace(/[ ]+</gi, '<')\r\n    .replace(/<script[^]*<\\/script>/gi, '')\r\n    .replace(/<style[^]*<\\/style>/gi, '');\r\n}\r\n\r\nfunction getScreenInfo() {\r\n  const screen = {};\r\n  wx.getSystemInfo({\r\n    success: (res) => {\r\n      screen.width = res.windowWidth;\r\n      screen.height = res.windowHeight;\r\n    },\r\n  });\r\n  return screen;\r\n}\r\n\r\nfunction html2json(html, customHandler, imageProp, host) {\r\n  // 处理字符串\r\n  html = removeDOCTYPE(html);\r\n  html = trimHtml(html);\r\n  html = wxDiscode.strDiscode(html);\r\n  // 生成node节点\r\n  const bufArray = [];\r\n  const results = {\r\n    nodes: [],\r\n    imageUrls: [],\r\n  };\r\n\r\n\tconst screen = getScreenInfo();\r\n  function Node(tag) {\r\n    this.node = 'element';\r\n    this.tag = tag;\r\n\t\t\r\n\t\tthis.$screen = screen;\r\n  }\r\n\r\n  HTMLParser(html, {\r\n    start(tag, attrs, unary) {\r\n      // node for this element\r\n      const node = new Node(tag);\r\n\r\n      if (bufArray.length !== 0) {\r\n        const parent = bufArray[0];\r\n        if (parent.nodes === undefined) {\r\n          parent.nodes = [];\r\n        }\r\n      }\r\n\r\n      if (block[tag]) {\r\n        node.tagType = 'block';\r\n      } else if (inline[tag]) {\r\n        node.tagType = 'inline';\r\n      } else if (closeSelf[tag]) {\r\n        node.tagType = 'closeSelf';\r\n      }\r\n\r\n      node.attr = attrs.reduce((pre, attr) => {\r\n        const { name } = attr;\r\n        let { value } = attr;\r\n        if (name === 'class') {\r\n          node.classStr = value;\r\n        }\r\n        // has multi attibutes\r\n        // make it array of attribute\r\n        if (name === 'style') {\r\n          node.styleStr = value;\r\n        }\r\n        if (value.match(/ /)) {\r\n          value = value.split(' ');\r\n        }\r\n\r\n        // if attr already exists\r\n        // merge it\r\n        if (pre[name]) {\r\n          if (Array.isArray(pre[name])) {\r\n            // already array, push to last\r\n            pre[name].push(value);\r\n          } else {\r\n            // single value, make it array\r\n            pre[name] = [pre[name], value];\r\n          }\r\n        } else {\r\n          // not exist, put it\r\n          pre[name] = value;\r\n        }\r\n\r\n        return pre;\r\n      }, {});\r\n\r\n      // 优化样式相关属性\r\n      if (node.classStr) {\r\n        node.classStr += ` ${node.tag}`;\r\n      } else {\r\n        node.classStr = node.tag;\r\n      }\r\n      if (node.tagType === 'inline') {\r\n        node.classStr += ' inline';\r\n      }\r\n\r\n      // 对img添加额外数据\r\n      if (node.tag === 'img') {\r\n        let imgUrl = node.attr.src;\r\n        imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain);\r\n        Object.assign(node.attr, imageProp, {\r\n          src: imgUrl || '',\r\n        });\r\n        if (imgUrl) {\r\n          results.imageUrls.push(imgUrl);\r\n        }\r\n      }\r\n\r\n      // 处理a标签属性\r\n      if (node.tag === 'a') {\r\n        node.attr.href = node.attr.href || '';\r\n      }\r\n\r\n      // 处理font标签样式属性\r\n      if (node.tag === 'font') {\r\n        const fontSize = [\r\n          'x-small',\r\n          'small',\r\n          'medium',\r\n          'large',\r\n          'x-large',\r\n          'xx-large',\r\n          '-webkit-xxx-large',\r\n        ];\r\n        const styleAttrs = {\r\n          color: 'color',\r\n          face: 'font-family',\r\n          size: 'font-size',\r\n        };\r\n        if (!node.styleStr) node.styleStr = '';\r\n        Object.keys(styleAttrs).forEach((key) => {\r\n          if (node.attr[key]) {\r\n            const value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key];\r\n            node.styleStr += `${styleAttrs[key]}: ${value};`;\r\n          }\r\n        });\r\n      }\r\n\r\n      // 临时记录source资源\r\n      if (node.tag === 'source') {\r\n        results.source = node.attr.src;\r\n      }\r\n\r\n      if (customHandler.start) {\r\n        customHandler.start(node, results);\r\n      }\r\n\r\n      if (unary) {\r\n        // if this tag doesn't have end tag\r\n        // like <img src=\"hoge.png\"/>\r\n        // add to parents\r\n        const parent = bufArray[0] || results;\r\n        if (parent.nodes === undefined) {\r\n          parent.nodes = [];\r\n        }\r\n        parent.nodes.push(node);\r\n      } else {\r\n        bufArray.unshift(node);\r\n      }\r\n    },\r\n    end(tag) {\r\n      // merge into parent tag\r\n      const node = bufArray.shift();\r\n      if (node.tag !== tag) {\r\n        console.error('invalid state: mismatch end tag');\r\n      }\r\n\r\n      // 当有缓存source资源时于于video补上src资源\r\n      if (node.tag === 'video' && results.source) {\r\n        node.attr.src = results.source;\r\n        delete results.source;\r\n      }\r\n\r\n      if (customHandler.end) {\r\n        customHandler.end(node, results);\r\n      }\r\n\r\n      if (bufArray.length === 0) {\r\n        results.nodes.push(node);\r\n      } else {\r\n        const parent = bufArray[0];\r\n        if (!parent.nodes) {\r\n          parent.nodes = [];\r\n        }\r\n        parent.nodes.push(node);\r\n      }\r\n    },\r\n    chars(text) {\r\n      if (!text.trim()) return;\r\n\r\n      const node = {\r\n        node: 'text',\r\n        text,\r\n      };\r\n\r\n      if (customHandler.chars) {\r\n        customHandler.chars(node, results);\r\n      }\r\n\r\n      if (bufArray.length === 0) {\r\n        results.nodes.push(node);\r\n      } else {\r\n        const parent = bufArray[0];\r\n        if (parent.nodes === undefined) {\r\n          parent.nodes = [];\r\n        }\r\n        parent.nodes.push(node);\r\n      }\r\n    },\r\n  });\r\n\r\n  return results;\r\n}\r\n\r\nexport default html2json;\r\n","// HTML 支持的数学符号\r\nfunction strNumDiscode(str) {\r\n  str = str.replace(/&forall;/g, '∀');\r\n  str = str.replace(/&part;/g, '∂');\r\n  str = str.replace(/&exist;/g, '∃');\r\n  str = str.replace(/&empty;/g, '∅');\r\n  str = str.replace(/&nabla;/g, '∇');\r\n  str = str.replace(/&isin;/g, '∈');\r\n  str = str.replace(/&notin;/g, '∉');\r\n  str = str.replace(/&ni;/g, '∋');\r\n  str = str.replace(/&prod;/g, '∏');\r\n  str = str.replace(/&sum;/g, '∑');\r\n  str = str.replace(/&minus;/g, '−');\r\n  str = str.replace(/&lowast;/g, '∗');\r\n  str = str.replace(/&radic;/g, '√');\r\n  str = str.replace(/&prop;/g, '∝');\r\n  str = str.replace(/&infin;/g, '∞');\r\n  str = str.replace(/&ang;/g, '∠');\r\n  str = str.replace(/&and;/g, '∧');\r\n  str = str.replace(/&or;/g, '∨');\r\n  str = str.replace(/&cap;/g, '∩');\r\n  str = str.replace(/&cup;/g, '∪');\r\n  str = str.replace(/&int;/g, '∫');\r\n  str = str.replace(/&there4;/g, '∴');\r\n  str = str.replace(/&sim;/g, '∼');\r\n  str = str.replace(/&cong;/g, '≅');\r\n  str = str.replace(/&asymp;/g, '≈');\r\n  str = str.replace(/&ne;/g, '≠');\r\n  str = str.replace(/&le;/g, '≤');\r\n  str = str.replace(/&ge;/g, '≥');\r\n  str = str.replace(/&sub;/g, '⊂');\r\n  str = str.replace(/&sup;/g, '⊃');\r\n  str = str.replace(/&nsub;/g, '⊄');\r\n  str = str.replace(/&sube;/g, '⊆');\r\n  str = str.replace(/&supe;/g, '⊇');\r\n  str = str.replace(/&oplus;/g, '⊕');\r\n  str = str.replace(/&otimes;/g, '⊗');\r\n  str = str.replace(/&perp;/g, '⊥');\r\n  str = str.replace(/&sdot;/g, '⋅');\r\n  return str;\r\n}\r\n\r\n// HTML 支持的希腊字母\r\nfunction strGreeceDiscode(str) {\r\n  str = str.replace(/&Alpha;/g, 'Α');\r\n  str = str.replace(/&Beta;/g, 'Β');\r\n  str = str.replace(/&Gamma;/g, 'Γ');\r\n  str = str.replace(/&Delta;/g, 'Δ');\r\n  str = str.replace(/&Epsilon;/g, 'Ε');\r\n  str = str.replace(/&Zeta;/g, 'Ζ');\r\n  str = str.replace(/&Eta;/g, 'Η');\r\n  str = str.replace(/&Theta;/g, 'Θ');\r\n  str = str.replace(/&Iota;/g, 'Ι');\r\n  str = str.replace(/&Kappa;/g, 'Κ');\r\n  str = str.replace(/&Lambda;/g, 'Λ');\r\n  str = str.replace(/&Mu;/g, 'Μ');\r\n  str = str.replace(/&Nu;/g, 'Ν');\r\n  str = str.replace(/&Xi;/g, 'Ν');\r\n  str = str.replace(/&Omicron;/g, 'Ο');\r\n  str = str.replace(/&Pi;/g, 'Π');\r\n  str = str.replace(/&Rho;/g, 'Ρ');\r\n  str = str.replace(/&Sigma;/g, 'Σ');\r\n  str = str.replace(/&Tau;/g, 'Τ');\r\n  str = str.replace(/&Upsilon;/g, 'Υ');\r\n  str = str.replace(/&Phi;/g, 'Φ');\r\n  str = str.replace(/&Chi;/g, 'Χ');\r\n  str = str.replace(/&Psi;/g, 'Ψ');\r\n  str = str.replace(/&Omega;/g, 'Ω');\r\n\r\n  str = str.replace(/&alpha;/g, 'α');\r\n  str = str.replace(/&beta;/g, 'β');\r\n  str = str.replace(/&gamma;/g, 'γ');\r\n  str = str.replace(/&delta;/g, 'δ');\r\n  str = str.replace(/&epsilon;/g, 'ε');\r\n  str = str.replace(/&zeta;/g, 'ζ');\r\n  str = str.replace(/&eta;/g, 'η');\r\n  str = str.replace(/&theta;/g, 'θ');\r\n  str = str.replace(/&iota;/g, 'ι');\r\n  str = str.replace(/&kappa;/g, 'κ');\r\n  str = str.replace(/&lambda;/g, 'λ');\r\n  str = str.replace(/&mu;/g, 'μ');\r\n  str = str.replace(/&nu;/g, 'ν');\r\n  str = str.replace(/&xi;/g, 'ξ');\r\n  str = str.replace(/&omicron;/g, 'ο');\r\n  str = str.replace(/&pi;/g, 'π');\r\n  str = str.replace(/&rho;/g, 'ρ');\r\n  str = str.replace(/&sigmaf;/g, 'ς');\r\n  str = str.replace(/&sigma;/g, 'σ');\r\n  str = str.replace(/&tau;/g, 'τ');\r\n  str = str.replace(/&upsilon;/g, 'υ');\r\n  str = str.replace(/&phi;/g, 'φ');\r\n  str = str.replace(/&chi;/g, 'χ');\r\n  str = str.replace(/&psi;/g, 'ψ');\r\n  str = str.replace(/&omega;/g, 'ω');\r\n  str = str.replace(/&thetasym;/g, 'ϑ');\r\n  str = str.replace(/&upsih;/g, 'ϒ');\r\n  str = str.replace(/&piv;/g, 'ϖ');\r\n  str = str.replace(/&middot;/g, '·');\r\n  return str;\r\n}\r\n\r\nfunction strcharacterDiscode(str) {\r\n  // 加入常用解析\r\n  str = str.replace(/&nbsp;/g, ' ');\r\n  str = str.replace(/&ensp;/g, ' ');\r\n  str = str.replace(/&emsp;/g, ' ');\r\n  str = str.replace(/&quot;/g, \"'\");\r\n  str = str.replace(/&amp;/g, '&');\r\n  str = str.replace(/&lt;/g, '<');\r\n  str = str.replace(/&gt;/g, '>');\r\n  str = str.replace(/&#8226;/g, '•');\r\n\r\n  return str;\r\n}\r\n\r\n// HTML 支持的其他实体\r\nfunction strOtherDiscode(str) {\r\n  str = str.replace(/&OElig;/g, 'Œ');\r\n  str = str.replace(/&oelig;/g, 'œ');\r\n  str = str.replace(/&Scaron;/g, 'Š');\r\n  str = str.replace(/&scaron;/g, 'š');\r\n  str = str.replace(/&Yuml;/g, 'Ÿ');\r\n  str = str.replace(/&fnof;/g, 'ƒ');\r\n  str = str.replace(/&circ;/g, 'ˆ');\r\n  str = str.replace(/&tilde;/g, '˜');\r\n  str = str.replace(/&ensp;/g, '');\r\n  str = str.replace(/&emsp;/g, '');\r\n  str = str.replace(/&thinsp;/g, '');\r\n  str = str.replace(/&zwnj;/g, '');\r\n  str = str.replace(/&zwj;/g, '');\r\n  str = str.replace(/&lrm;/g, '');\r\n  str = str.replace(/&rlm;/g, '');\r\n  str = str.replace(/&ndash;/g, '–');\r\n  str = str.replace(/&mdash;/g, '—');\r\n  str = str.replace(/&lsquo;/g, '‘');\r\n  str = str.replace(/&rsquo;/g, '’');\r\n  str = str.replace(/&sbquo;/g, '‚');\r\n  str = str.replace(/&ldquo;/g, '“');\r\n  str = str.replace(/&rdquo;/g, '”');\r\n  str = str.replace(/&bdquo;/g, '„');\r\n  str = str.replace(/&dagger;/g, '†');\r\n  str = str.replace(/&Dagger;/g, '‡');\r\n  str = str.replace(/&bull;/g, '•');\r\n  str = str.replace(/&hellip;/g, '…');\r\n  str = str.replace(/&permil;/g, '‰');\r\n  str = str.replace(/&prime;/g, '′');\r\n  str = str.replace(/&Prime;/g, '″');\r\n  str = str.replace(/&lsaquo;/g, '‹');\r\n  str = str.replace(/&rsaquo;/g, '›');\r\n  str = str.replace(/&oline;/g, '‾');\r\n  str = str.replace(/&euro;/g, '€');\r\n  str = str.replace(/&trade;/g, '™');\r\n\r\n  str = str.replace(/&larr;/g, '←');\r\n  str = str.replace(/&uarr;/g, '↑');\r\n  str = str.replace(/&rarr;/g, '→');\r\n  str = str.replace(/&darr;/g, '↓');\r\n  str = str.replace(/&harr;/g, '↔');\r\n  str = str.replace(/&crarr;/g, '↵');\r\n  str = str.replace(/&lceil;/g, '⌈');\r\n  str = str.replace(/&rceil;/g, '⌉');\r\n\r\n  str = str.replace(/&lfloor;/g, '⌊');\r\n  str = str.replace(/&rfloor;/g, '⌋');\r\n  str = str.replace(/&loz;/g, '◊');\r\n  str = str.replace(/&spades;/g, '♠');\r\n  str = str.replace(/&clubs;/g, '♣');\r\n  str = str.replace(/&hearts;/g, '♥');\r\n\r\n  str = str.replace(/&diams;/g, '♦');\r\n  str = str.replace(/&#39;/g, \"'\");\r\n  return str;\r\n}\r\n\r\nfunction strDiscode(str) {\r\n  str = strNumDiscode(str);\r\n  str = strGreeceDiscode(str);\r\n  str = strcharacterDiscode(str);\r\n  str = strOtherDiscode(str);\r\n  return str;\r\n}\r\n\r\nfunction urlToHttpUrl(url, domain) {\r\n  if (/^\\/\\//.test(url)) {\r\n    return `https:${url}`;\r\n  } else if (/^\\//.test(url)) {\r\n    return `https://${domain}${url}`;\r\n  }\r\n  return url;\r\n}\r\n\r\nexport default {\r\n  strDiscode,\r\n  urlToHttpUrl,\r\n};\r\n","/**\r\n *\r\n * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser\r\n *\r\n * author: Di (微信小程序开发工程师)\r\n * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)\r\n *               垂直微信小程序开发交流社区\r\n *\r\n * github地址: https://github.com/icindy/wxParse\r\n *\r\n * for: 微信小程序富文本解析\r\n * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184\r\n */\r\n// Regular Expressions for parsing tags and attributes\r\n\r\nconst startTag = /^<([-A-Za-z0-9_]+)((?:\\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)>/;\r\nconst endTag = /^<\\/([-A-Za-z0-9_]+)[^>]*>/;\r\nconst attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|([^>\\s]+)))?/g;\r\n\r\nfunction makeMap(str) {\r\n  const obj = {};\r\n  const items = str.split(',');\r\n  for (let i = 0; i < items.length; i += 1) obj[items[i]] = true;\r\n  return obj;\r\n}\r\n\r\n// Empty Elements - HTML 5\r\nconst empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr');\r\n\r\n// Block Elements - HTML 5\r\nconst block = makeMap('address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');\r\n\r\n// Inline Elements - HTML 5\r\nconst inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');\r\n\r\n// Elements that you can, intentionally, leave open\r\n// (and which close themselves)\r\nconst closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');\r\n\r\n// Attributes that have their values filled in disabled=\"disabled\"\r\nconst fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected');\r\n\r\nfunction HTMLParser(html, handler) {\r\n  let index;\r\n  let chars;\r\n  let match;\r\n  let last = html;\r\n  const stack = [];\r\n\r\n  stack.last = () => stack[stack.length - 1];\r\n\r\n  function parseEndTag(tag, tagName) {\r\n    // If no tag name is provided, clean shop\r\n    let pos;\r\n    if (!tagName) {\r\n      pos = 0;\r\n    } else {\r\n      // Find the closest opened tag of the same type\r\n      tagName = tagName.toLowerCase();\r\n      for (pos = stack.length - 1; pos >= 0; pos -= 1) {\r\n        if (stack[pos] === tagName) break;\r\n      }\r\n    }\r\n    if (pos >= 0) {\r\n      // Close all the open elements, up the stack\r\n      for (let i = stack.length - 1; i >= pos; i -= 1) {\r\n        if (handler.end) handler.end(stack[i]);\r\n      }\r\n\r\n      // Remove the open elements from the stack\r\n      stack.length = pos;\r\n    }\r\n  }\r\n\r\n  function parseStartTag(tag, tagName, rest, unary) {\r\n    tagName = tagName.toLowerCase();\r\n\r\n    if (block[tagName]) {\r\n      while (stack.last() && inline[stack.last()]) {\r\n        parseEndTag('', stack.last());\r\n      }\r\n    }\r\n\r\n    if (closeSelf[tagName] && stack.last() === tagName) {\r\n      parseEndTag('', tagName);\r\n    }\r\n\r\n    unary = empty[tagName] || !!unary;\r\n\r\n    if (!unary) stack.push(tagName);\r\n\r\n    if (handler.start) {\r\n      const attrs = [];\r\n\r\n      rest.replace(attr, function genAttr(matches, name) {\r\n        const value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : '');\r\n\r\n        attrs.push({\r\n          name,\r\n          value,\r\n          escaped: value.replace(/(^|[^\\\\])\"/g, '$1\\\\\"'), // \"\r\n        });\r\n      });\r\n\r\n      if (handler.start) {\r\n        handler.start(tagName, attrs, unary);\r\n      }\r\n    }\r\n  }\r\n\r\n  while (html) {\r\n    chars = true;\r\n\r\n    if (html.indexOf('</') === 0) {\r\n      match = html.match(endTag);\r\n\r\n      if (match) {\r\n        html = html.substring(match[0].length);\r\n        match[0].replace(endTag, parseEndTag);\r\n        chars = false;\r\n      }\r\n\r\n      // start tag\r\n    } else if (html.indexOf('<') === 0) {\r\n      match = html.match(startTag);\r\n\r\n      if (match) {\r\n        html = html.substring(match[0].length);\r\n        match[0].replace(startTag, parseStartTag);\r\n        chars = false;\r\n      }\r\n    }\r\n\r\n    if (chars) {\r\n      index = html.indexOf('<');\r\n      let text = '';\r\n      while (index === 0) {\r\n        text += '<';\r\n        html = html.substring(1);\r\n        index = html.indexOf('<');\r\n      }\r\n      text += index < 0 ? html : html.substring(0, index);\r\n      html = index < 0 ? '' : html.substring(index);\r\n\r\n      if (handler.chars) handler.chars(text);\r\n    }\r\n\r\n    if (html === last) throw new Error(`Parse Error: ${html}`);\r\n    last = html;\r\n  }\r\n\r\n  // Clean up any remaining tags\r\n  parseEndTag();\r\n}\r\n\r\nexport default HTMLParser;\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n  scriptExports,\n  render,\n  staticRenderFns,\n  functionalTemplate,\n  injectStyles,\n  scopeId,\n  moduleIdentifier, /* server only */\n  shadowMode /* vue-cli only */\n) {\n  // Vue.extend constructor export interop\n  var options = typeof scriptExports === 'function'\n    ? scriptExports.options\n    : scriptExports\n\n  // render functions\n  if (render) {\n    options.render = render\n    options.staticRenderFns = staticRenderFns\n    options._compiled = true\n  }\n\n  // functional template\n  if (functionalTemplate) {\n    options.functional = true\n  }\n\n  // scopedId\n  if (scopeId) {\n    options._scopeId = 'data-v-' + scopeId\n  }\n\n  var hook\n  if (moduleIdentifier) { // server build\n    hook = function (context) {\n      // 2.3 injection\n      context =\n        context || // cached call\n        (this.$vnode && this.$vnode.ssrContext) || // stateful\n        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n      // 2.2 with runInNewContext: true\n      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n        context = __VUE_SSR_CONTEXT__\n      }\n      // inject component styles\n      if (injectStyles) {\n        injectStyles.call(this, context)\n      }\n      // register component module identifier for async chunk inferrence\n      if (context && context._registeredComponents) {\n        context._registeredComponents.add(moduleIdentifier)\n      }\n    }\n    // used by ssr in case component is cached and beforeCreate\n    // never gets called\n    options._ssrRegister = hook\n  } else if (injectStyles) {\n    hook = shadowMode\n      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n      : injectStyles\n  }\n\n  if (hook) {\n    if (options.functional) {\n      // for template-only hot-reload because in that case the render fn doesn't\n      // go through the normalizer\n      options._injectStyles = hook\n      // register for functioal component in vue file\n      var originalRender = options.render\n      options.render = function renderWithStyleInjection (h, context) {\n        hook.call(context)\n        return originalRender(h, context)\n      }\n    } else {\n      // inject component registration as beforeCreate hook\n      var existing = options.beforeCreate\n      options.beforeCreate = existing\n        ? [].concat(existing, hook)\n        : [hook]\n    }\n  }\n\n  return {\n    exports: scriptExports,\n    options: options\n  }\n}\n","/*!\n * Vue.js v2.6.10\n * (c) 2014-2019 Evan You\n * Released under the MIT License.\n */\n/*  */\n\nvar emptyObject = Object.freeze({});\n\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef (v) {\n  return v === undefined || v === null\n}\n\nfunction isDef (v) {\n  return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n  return v === true\n}\n\nfunction isFalse (v) {\n  return v === false\n}\n\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive (value) {\n  return (\n    typeof value === 'string' ||\n    typeof value === 'number' ||\n    // $flow-disable-line\n    typeof value === 'symbol' ||\n    typeof value === 'boolean'\n  )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n  return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n  return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n  return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n  return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n  var n = parseFloat(String(val));\n  return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\nfunction isPromise (val) {\n  return (\n    isDef(val) &&\n    typeof val.then === 'function' &&\n    typeof val.catch === 'function'\n  )\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n  return val == null\n    ? ''\n    : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n      ? JSON.stringify(val, null, 2)\n      : String(val)\n}\n\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n  var n = parseFloat(val);\n  return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) { return map[val.toLowerCase()]; }\n    : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array.\n */\nfunction remove (arr, item) {\n  if (arr.length) {\n    var index = arr.indexOf(item);\n    if (index > -1) {\n      return arr.splice(index, 1)\n    }\n  }\n}\n\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n  return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n  var cache = Object.create(null);\n  return (function cachedFn (str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n  return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n  return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n  function boundFn (a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n\n  boundFn._length = fn.length;\n  return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n  return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n  ? nativeBind\n  : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n  start = start || 0;\n  var i = list.length - start;\n  var ret = new Array(i);\n  while (i--) {\n    ret[i] = list[i + start];\n  }\n  return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n  for (var key in _from) {\n    to[key] = _from[key];\n  }\n  return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n  var res = {};\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i]) {\n      extend(res, arr[i]);\n    }\n  }\n  return res\n}\n\n/* eslint-disable no-unused-vars */\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/* eslint-enable no-unused-vars */\n\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n  if (a === b) { return true }\n  var isObjectA = isObject(a);\n  var isObjectB = isObject(b);\n  if (isObjectA && isObjectB) {\n    try {\n      var isArrayA = Array.isArray(a);\n      var isArrayB = Array.isArray(b);\n      if (isArrayA && isArrayB) {\n        return a.length === b.length && a.every(function (e, i) {\n          return looseEqual(e, b[i])\n        })\n      } else if (a instanceof Date && b instanceof Date) {\n        return a.getTime() === b.getTime()\n      } else if (!isArrayA && !isArrayB) {\n        var keysA = Object.keys(a);\n        var keysB = Object.keys(b);\n        return keysA.length === keysB.length && keysA.every(function (key) {\n          return looseEqual(a[key], b[key])\n        })\n      } else {\n        /* istanbul ignore next */\n        return false\n      }\n    } catch (e) {\n      /* istanbul ignore next */\n      return false\n    }\n  } else if (!isObjectA && !isObjectB) {\n    return String(a) === String(b)\n  } else {\n    return false\n  }\n}\n\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf (arr, val) {\n  for (var i = 0; i < arr.length; i++) {\n    if (looseEqual(arr[i], val)) { return i }\n  }\n  return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n  var called = false;\n  return function () {\n    if (!called) {\n      called = true;\n      fn.apply(this, arguments);\n    }\n  }\n}\n\nvar ASSET_TYPES = [\n  'component',\n  'directive',\n  'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n  'beforeCreate',\n  'created',\n  'beforeMount',\n  'mounted',\n  'beforeUpdate',\n  'updated',\n  'beforeDestroy',\n  'destroyed',\n  'activated',\n  'deactivated',\n  'errorCaptured',\n  'serverPrefetch'\n];\n\n/*  */\n\n\n\nvar config = ({\n  /**\n   * Option merge strategies (used in core/util/options)\n   */\n  // $flow-disable-line\n  optionMergeStrategies: Object.create(null),\n\n  /**\n   * Whether to suppress warnings.\n   */\n  silent: false,\n\n  /**\n   * Show production mode tip message on boot?\n   */\n  productionTip: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to enable devtools\n   */\n  devtools: process.env.NODE_ENV !== 'production',\n\n  /**\n   * Whether to record perf\n   */\n  performance: false,\n\n  /**\n   * Error handler for watcher errors\n   */\n  errorHandler: null,\n\n  /**\n   * Warn handler for watcher warns\n   */\n  warnHandler: null,\n\n  /**\n   * Ignore certain custom elements\n   */\n  ignoredElements: [],\n\n  /**\n   * Custom user key aliases for v-on\n   */\n  // $flow-disable-line\n  keyCodes: Object.create(null),\n\n  /**\n   * Check if a tag is reserved so that it cannot be registered as a\n   * component. This is platform-dependent and may be overwritten.\n   */\n  isReservedTag: no,\n\n  /**\n   * Check if an attribute is reserved so that it cannot be used as a component\n   * prop. This is platform-dependent and may be overwritten.\n   */\n  isReservedAttr: no,\n\n  /**\n   * Check if a tag is an unknown element.\n   * Platform-dependent.\n   */\n  isUnknownElement: no,\n\n  /**\n   * Get the namespace of an element\n   */\n  getTagNamespace: noop,\n\n  /**\n   * Parse the real tag name for the specific platform.\n   */\n  parsePlatformTagName: identity,\n\n  /**\n   * Check if an attribute must be bound using property, e.g. value\n   * Platform-dependent.\n   */\n  mustUseProp: no,\n\n  /**\n   * Perform updates asynchronously. Intended to be used by Vue Test Utils\n   * This will significantly reduce performance if set to false.\n   */\n  async: true,\n\n  /**\n   * Exposed for legacy reasons\n   */\n  _lifecycleHooks: LIFECYCLE_HOOKS\n});\n\n/*  */\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n  var c = (str + '').charCodeAt(0);\n  return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n  Object.defineProperty(obj, key, {\n    value: val,\n    enumerable: !!enumerable,\n    writable: true,\n    configurable: true\n  });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp((\"[^\" + (unicodeRegExp.source) + \".$_\\\\d]\"));\nfunction parsePath (path) {\n  if (bailRE.test(path)) {\n    return\n  }\n  var segments = path.split('.');\n  return function (obj) {\n    for (var i = 0; i < segments.length; i++) {\n      if (!obj) { return }\n      obj = obj[segments[i]];\n    }\n    return obj\n  }\n}\n\n/*  */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\nvar isPhantomJS = UA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\nif (inBrowser) {\n  try {\n    var opts = {};\n    Object.defineProperty(opts, 'passive', ({\n      get: function get () {\n      }\n    })); // https://github.com/facebook/flow/issues/285\n    window.addEventListener('test-passive', null, opts);\n  } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n  if (_isServer === undefined) {\n    /* istanbul ignore if */\n    if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n      // detect presence of vue-server-renderer and avoid\n      // Webpack shimming the process\n      _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n    } else {\n      _isServer = false;\n    }\n  }\n  return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n  return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n  typeof Symbol !== 'undefined' && isNative(Symbol) &&\n  typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n  // use native Set when available.\n  _Set = Set;\n} else {\n  // a non-standard Set polyfill that only works with primitive keys.\n  _Set = /*@__PURE__*/(function () {\n    function Set () {\n      this.set = Object.create(null);\n    }\n    Set.prototype.has = function has (key) {\n      return this.set[key] === true\n    };\n    Set.prototype.add = function add (key) {\n      this.set[key] = true;\n    };\n    Set.prototype.clear = function clear () {\n      this.set = Object.create(null);\n    };\n\n    return Set;\n  }());\n}\n\n/*  */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (process.env.NODE_ENV !== 'production') {\n  var hasConsole = typeof console !== 'undefined';\n  var classifyRE = /(?:^|[-_])(\\w)/g;\n  var classify = function (str) { return str\n    .replace(classifyRE, function (c) { return c.toUpperCase(); })\n    .replace(/[-_]/g, ''); };\n\n  warn = function (msg, vm) {\n    var trace = vm ? generateComponentTrace(vm) : '';\n\n    if (config.warnHandler) {\n      config.warnHandler.call(null, msg, vm, trace);\n    } else if (hasConsole && (!config.silent)) {\n      console.error((\"[Vue warn]: \" + msg + trace));\n    }\n  };\n\n  tip = function (msg, vm) {\n    if (hasConsole && (!config.silent)) {\n      console.warn(\"[Vue tip]: \" + msg + (\n        vm ? generateComponentTrace(vm) : ''\n      ));\n    }\n  };\n\n  formatComponentName = function (vm, includeFile) {\n    {\n      if(vm.$scope && vm.$scope.is){\n        return vm.$scope.is\n      }\n    }\n    if (vm.$root === vm) {\n      return '<Root>'\n    }\n    var options = typeof vm === 'function' && vm.cid != null\n      ? vm.options\n      : vm._isVue\n        ? vm.$options || vm.constructor.options\n        : vm;\n    var name = options.name || options._componentTag;\n    var file = options.__file;\n    if (!name && file) {\n      var match = file.match(/([^/\\\\]+)\\.vue$/);\n      name = match && match[1];\n    }\n\n    return (\n      (name ? (\"<\" + (classify(name)) + \">\") : \"<Anonymous>\") +\n      (file && includeFile !== false ? (\" at \" + file) : '')\n    )\n  };\n\n  var repeat = function (str, n) {\n    var res = '';\n    while (n) {\n      if (n % 2 === 1) { res += str; }\n      if (n > 1) { str += str; }\n      n >>= 1;\n    }\n    return res\n  };\n\n  generateComponentTrace = function (vm) {\n    if (vm._isVue && vm.$parent) {\n      var tree = [];\n      var currentRecursiveSequence = 0;\n      while (vm) {\n        if (tree.length > 0) {\n          var last = tree[tree.length - 1];\n          if (last.constructor === vm.constructor) {\n            currentRecursiveSequence++;\n            vm = vm.$parent;\n            continue\n          } else if (currentRecursiveSequence > 0) {\n            tree[tree.length - 1] = [last, currentRecursiveSequence];\n            currentRecursiveSequence = 0;\n          }\n        }\n        tree.push(vm);\n        vm = vm.$parent;\n      }\n      return '\\n\\nfound in\\n\\n' + tree\n        .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n            ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n            : formatComponentName(vm))); })\n        .join('\\n')\n    } else {\n      return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n    }\n  };\n}\n\n/*  */\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n  this.id = uid++;\n  this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n  this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n  remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n  if (Dep.SharedObject.target) {\n    Dep.SharedObject.target.addDep(this);\n  }\n};\n\nDep.prototype.notify = function notify () {\n  // stabilize the subscriber list first\n  var subs = this.subs.slice();\n  if (process.env.NODE_ENV !== 'production' && !config.async) {\n    // subs aren't sorted in scheduler if not running async\n    // we need to sort them now to make sure they fire in correct\n    // order\n    subs.sort(function (a, b) { return a.id - b.id; });\n  }\n  for (var i = 0, l = subs.length; i < l; i++) {\n    subs[i].update();\n  }\n};\n\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\n// fixed by xxxxxx (nvue shared vuex)\n/* eslint-disable no-undef */\nDep.SharedObject = typeof SharedObject !== 'undefined' ? SharedObject : {};\nDep.SharedObject.target = null;\nDep.SharedObject.targetStack = [];\n\nfunction pushTarget (target) {\n  Dep.SharedObject.targetStack.push(target);\n  Dep.SharedObject.target = target;\n}\n\nfunction popTarget () {\n  Dep.SharedObject.targetStack.pop();\n  Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];\n}\n\n/*  */\n\nvar VNode = function VNode (\n  tag,\n  data,\n  children,\n  text,\n  elm,\n  context,\n  componentOptions,\n  asyncFactory\n) {\n  this.tag = tag;\n  this.data = data;\n  this.children = children;\n  this.text = text;\n  this.elm = elm;\n  this.ns = undefined;\n  this.context = context;\n  this.fnContext = undefined;\n  this.fnOptions = undefined;\n  this.fnScopeId = undefined;\n  this.key = data && data.key;\n  this.componentOptions = componentOptions;\n  this.componentInstance = undefined;\n  this.parent = undefined;\n  this.raw = false;\n  this.isStatic = false;\n  this.isRootInsert = true;\n  this.isComment = false;\n  this.isCloned = false;\n  this.isOnce = false;\n  this.asyncFactory = asyncFactory;\n  this.asyncMeta = undefined;\n  this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n  return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n  if ( text === void 0 ) text = '';\n\n  var node = new VNode();\n  node.text = text;\n  node.isComment = true;\n  return node\n};\n\nfunction createTextVNode (val) {\n  return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n  var cloned = new VNode(\n    vnode.tag,\n    vnode.data,\n    // #7975\n    // clone children array to avoid mutating original in case of cloning\n    // a child.\n    vnode.children && vnode.children.slice(),\n    vnode.text,\n    vnode.elm,\n    vnode.context,\n    vnode.componentOptions,\n    vnode.asyncFactory\n  );\n  cloned.ns = vnode.ns;\n  cloned.isStatic = vnode.isStatic;\n  cloned.key = vnode.key;\n  cloned.isComment = vnode.isComment;\n  cloned.fnContext = vnode.fnContext;\n  cloned.fnOptions = vnode.fnOptions;\n  cloned.fnScopeId = vnode.fnScopeId;\n  cloned.asyncMeta = vnode.asyncMeta;\n  cloned.isCloned = true;\n  return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n  'push',\n  'pop',\n  'shift',\n  'unshift',\n  'splice',\n  'sort',\n  'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n  // cache original method\n  var original = arrayProto[method];\n  def(arrayMethods, method, function mutator () {\n    var args = [], len = arguments.length;\n    while ( len-- ) args[ len ] = arguments[ len ];\n\n    var result = original.apply(this, args);\n    var ob = this.__ob__;\n    var inserted;\n    switch (method) {\n      case 'push':\n      case 'unshift':\n        inserted = args;\n        break\n      case 'splice':\n        inserted = args.slice(2);\n        break\n    }\n    if (inserted) { ob.observeArray(inserted); }\n    // notify change\n    ob.dep.notify();\n    return result\n  });\n});\n\n/*  */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n  shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n  this.value = value;\n  this.dep = new Dep();\n  this.vmCount = 0;\n  def(value, '__ob__', this);\n  if (Array.isArray(value)) {\n    if (hasProto) {\n      {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑\n        if(value.push !== value.__proto__.push){\n          copyAugment(value, arrayMethods, arrayKeys);\n        } else {\n          protoAugment(value, arrayMethods);\n        }\n      }\n    } else {\n      copyAugment(value, arrayMethods, arrayKeys);\n    }\n    this.observeArray(value);\n  } else {\n    this.walk(value);\n  }\n};\n\n/**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n  var keys = Object.keys(obj);\n  for (var i = 0; i < keys.length; i++) {\n    defineReactive$$1(obj, keys[i]);\n  }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n  for (var i = 0, l = items.length; i < l; i++) {\n    observe(items[i]);\n  }\n};\n\n// helpers\n\n/**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n  /* eslint-disable no-proto */\n  target.__proto__ = src;\n  /* eslint-enable no-proto */\n}\n\n/**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n  for (var i = 0, l = keys.length; i < l; i++) {\n    var key = keys[i];\n    def(target, key, src[key]);\n  }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n  if (!isObject(value) || value instanceof VNode) {\n    return\n  }\n  var ob;\n  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n    ob = value.__ob__;\n  } else if (\n    shouldObserve &&\n    !isServerRendering() &&\n    (Array.isArray(value) || isPlainObject(value)) &&\n    Object.isExtensible(value) &&\n    !value._isVue\n  ) {\n    ob = new Observer(value);\n  }\n  if (asRootData && ob) {\n    ob.vmCount++;\n  }\n  return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n  obj,\n  key,\n  val,\n  customSetter,\n  shallow\n) {\n  var dep = new Dep();\n\n  var property = Object.getOwnPropertyDescriptor(obj, key);\n  if (property && property.configurable === false) {\n    return\n  }\n\n  // cater for pre-defined getter/setters\n  var getter = property && property.get;\n  var setter = property && property.set;\n  if ((!getter || setter) && arguments.length === 2) {\n    val = obj[key];\n  }\n\n  var childOb = !shallow && observe(val);\n  Object.defineProperty(obj, key, {\n    enumerable: true,\n    configurable: true,\n    get: function reactiveGetter () {\n      var value = getter ? getter.call(obj) : val;\n      if (Dep.SharedObject.target) { // fixed by xxxxxx\n        dep.depend();\n        if (childOb) {\n          childOb.dep.depend();\n          if (Array.isArray(value)) {\n            dependArray(value);\n          }\n        }\n      }\n      return value\n    },\n    set: function reactiveSetter (newVal) {\n      var value = getter ? getter.call(obj) : val;\n      /* eslint-disable no-self-compare */\n      if (newVal === value || (newVal !== newVal && value !== value)) {\n        return\n      }\n      /* eslint-enable no-self-compare */\n      if (process.env.NODE_ENV !== 'production' && customSetter) {\n        customSetter();\n      }\n      // #7981: for accessor properties without setter\n      if (getter && !setter) { return }\n      if (setter) {\n        setter.call(obj, newVal);\n      } else {\n        val = newVal;\n      }\n      childOb = !shallow && observe(newVal);\n      dep.notify();\n    }\n  });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n  if (process.env.NODE_ENV !== 'production' &&\n    (isUndef(target) || isPrimitive(target))\n  ) {\n    warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n  }\n  if (Array.isArray(target) && isValidArrayIndex(key)) {\n    target.length = Math.max(target.length, key);\n    target.splice(key, 1, val);\n    return val\n  }\n  if (key in target && !(key in Object.prototype)) {\n    target[key] = val;\n    return val\n  }\n  var ob = (target).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid adding reactive properties to a Vue instance or its root $data ' +\n      'at runtime - declare it upfront in the data option.'\n    );\n    return val\n  }\n  if (!ob) {\n    target[key] = val;\n    return val\n  }\n  defineReactive$$1(ob.value, key, val);\n  ob.dep.notify();\n  return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n  if (process.env.NODE_ENV !== 'production' &&\n    (isUndef(target) || isPrimitive(target))\n  ) {\n    warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n  }\n  if (Array.isArray(target) && isValidArrayIndex(key)) {\n    target.splice(key, 1);\n    return\n  }\n  var ob = (target).__ob__;\n  if (target._isVue || (ob && ob.vmCount)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      'Avoid deleting properties on a Vue instance or its root $data ' +\n      '- just set it to null.'\n    );\n    return\n  }\n  if (!hasOwn(target, key)) {\n    return\n  }\n  delete target[key];\n  if (!ob) {\n    return\n  }\n  ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n  for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n    e = value[i];\n    e && e.__ob__ && e.__ob__.dep.depend();\n    if (Array.isArray(e)) {\n      dependArray(e);\n    }\n  }\n}\n\n/*  */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n  strats.el = strats.propsData = function (parent, child, vm, key) {\n    if (!vm) {\n      warn(\n        \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n        'creation with the `new` keyword.'\n      );\n    }\n    return defaultStrat(parent, child)\n  };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n  if (!from) { return to }\n  var key, toVal, fromVal;\n\n  var keys = hasSymbol\n    ? Reflect.ownKeys(from)\n    : Object.keys(from);\n\n  for (var i = 0; i < keys.length; i++) {\n    key = keys[i];\n    // in case the object is already observed...\n    if (key === '__ob__') { continue }\n    toVal = to[key];\n    fromVal = from[key];\n    if (!hasOwn(to, key)) {\n      set(to, key, fromVal);\n    } else if (\n      toVal !== fromVal &&\n      isPlainObject(toVal) &&\n      isPlainObject(fromVal)\n    ) {\n      mergeData(toVal, fromVal);\n    }\n  }\n  return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    // in a Vue.extend merge, both should be functions\n    if (!childVal) {\n      return parentVal\n    }\n    if (!parentVal) {\n      return childVal\n    }\n    // when parentVal & childVal are both present,\n    // we need to return a function that returns the\n    // merged result of both functions... no need to\n    // check if parentVal is a function here because\n    // it has to be a function to pass previous merges.\n    return function mergedDataFn () {\n      return mergeData(\n        typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n        typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n      )\n    }\n  } else {\n    return function mergedInstanceDataFn () {\n      // instance merge\n      var instanceData = typeof childVal === 'function'\n        ? childVal.call(vm, vm)\n        : childVal;\n      var defaultData = typeof parentVal === 'function'\n        ? parentVal.call(vm, vm)\n        : parentVal;\n      if (instanceData) {\n        return mergeData(instanceData, defaultData)\n      } else {\n        return defaultData\n      }\n    }\n  }\n}\n\nstrats.data = function (\n  parentVal,\n  childVal,\n  vm\n) {\n  if (!vm) {\n    if (childVal && typeof childVal !== 'function') {\n      process.env.NODE_ENV !== 'production' && warn(\n        'The \"data\" option should be a function ' +\n        'that returns a per-instance value in component ' +\n        'definitions.',\n        vm\n      );\n\n      return parentVal\n    }\n    return mergeDataOrFn(parentVal, childVal)\n  }\n\n  return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n  parentVal,\n  childVal\n) {\n  var res = childVal\n    ? parentVal\n      ? parentVal.concat(childVal)\n      : Array.isArray(childVal)\n        ? childVal\n        : [childVal]\n    : parentVal;\n  return res\n    ? dedupeHooks(res)\n    : res\n}\n\nfunction dedupeHooks (hooks) {\n  var res = [];\n  for (var i = 0; i < hooks.length; i++) {\n    if (res.indexOf(hooks[i]) === -1) {\n      res.push(hooks[i]);\n    }\n  }\n  return res\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n  strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n  parentVal,\n  childVal,\n  vm,\n  key\n) {\n  var res = Object.create(parentVal || null);\n  if (childVal) {\n    process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n    return extend(res, childVal)\n  } else {\n    return res\n  }\n}\n\nASSET_TYPES.forEach(function (type) {\n  strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n  parentVal,\n  childVal,\n  vm,\n  key\n) {\n  // work around Firefox's Object.prototype.watch...\n  if (parentVal === nativeWatch) { parentVal = undefined; }\n  if (childVal === nativeWatch) { childVal = undefined; }\n  /* istanbul ignore if */\n  if (!childVal) { return Object.create(parentVal || null) }\n  if (process.env.NODE_ENV !== 'production') {\n    assertObjectType(key, childVal, vm);\n  }\n  if (!parentVal) { return childVal }\n  var ret = {};\n  extend(ret, parentVal);\n  for (var key$1 in childVal) {\n    var parent = ret[key$1];\n    var child = childVal[key$1];\n    if (parent && !Array.isArray(parent)) {\n      parent = [parent];\n    }\n    ret[key$1] = parent\n      ? parent.concat(child)\n      : Array.isArray(child) ? child : [child];\n  }\n  return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n  parentVal,\n  childVal,\n  vm,\n  key\n) {\n  if (childVal && process.env.NODE_ENV !== 'production') {\n    assertObjectType(key, childVal, vm);\n  }\n  if (!parentVal) { return childVal }\n  var ret = Object.create(null);\n  extend(ret, parentVal);\n  if (childVal) { extend(ret, childVal); }\n  return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n  for (var key in options.components) {\n    validateComponentName(key);\n  }\n}\n\nfunction validateComponentName (name) {\n  if (!new RegExp((\"^[a-zA-Z][\\\\-\\\\.0-9_\" + (unicodeRegExp.source) + \"]*$\")).test(name)) {\n    warn(\n      'Invalid component name: \"' + name + '\". Component names ' +\n      'should conform to valid custom element name in html5 specification.'\n    );\n  }\n  if (isBuiltInTag(name) || config.isReservedTag(name)) {\n    warn(\n      'Do not use built-in or reserved HTML elements as component ' +\n      'id: ' + name\n    );\n  }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n  var props = options.props;\n  if (!props) { return }\n  var res = {};\n  var i, val, name;\n  if (Array.isArray(props)) {\n    i = props.length;\n    while (i--) {\n      val = props[i];\n      if (typeof val === 'string') {\n        name = camelize(val);\n        res[name] = { type: null };\n      } else if (process.env.NODE_ENV !== 'production') {\n        warn('props must be strings when using array syntax.');\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (var key in props) {\n      val = props[key];\n      name = camelize(key);\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val };\n    }\n  } else if (process.env.NODE_ENV !== 'production') {\n    warn(\n      \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n      \"but got \" + (toRawType(props)) + \".\",\n      vm\n    );\n  }\n  options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n  var inject = options.inject;\n  if (!inject) { return }\n  var normalized = options.inject = {};\n  if (Array.isArray(inject)) {\n    for (var i = 0; i < inject.length; i++) {\n      normalized[inject[i]] = { from: inject[i] };\n    }\n  } else if (isPlainObject(inject)) {\n    for (var key in inject) {\n      var val = inject[key];\n      normalized[key] = isPlainObject(val)\n        ? extend({ from: key }, val)\n        : { from: val };\n    }\n  } else if (process.env.NODE_ENV !== 'production') {\n    warn(\n      \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n      \"but got \" + (toRawType(inject)) + \".\",\n      vm\n    );\n  }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n  var dirs = options.directives;\n  if (dirs) {\n    for (var key in dirs) {\n      var def$$1 = dirs[key];\n      if (typeof def$$1 === 'function') {\n        dirs[key] = { bind: def$$1, update: def$$1 };\n      }\n    }\n  }\n}\n\nfunction assertObjectType (name, value, vm) {\n  if (!isPlainObject(value)) {\n    warn(\n      \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n      \"but got \" + (toRawType(value)) + \".\",\n      vm\n    );\n  }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n  parent,\n  child,\n  vm\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    checkComponents(child);\n  }\n\n  if (typeof child === 'function') {\n    child = child.options;\n  }\n\n  normalizeProps(child, vm);\n  normalizeInject(child, vm);\n  normalizeDirectives(child);\n\n  // Apply extends and mixins on the child options,\n  // but only if it is a raw options object that isn't\n  // the result of another mergeOptions call.\n  // Only merged options has the _base property.\n  if (!child._base) {\n    if (child.extends) {\n      parent = mergeOptions(parent, child.extends, vm);\n    }\n    if (child.mixins) {\n      for (var i = 0, l = child.mixins.length; i < l; i++) {\n        parent = mergeOptions(parent, child.mixins[i], vm);\n      }\n    }\n  }\n\n  var options = {};\n  var key;\n  for (key in parent) {\n    mergeField(key);\n  }\n  for (key in child) {\n    if (!hasOwn(parent, key)) {\n      mergeField(key);\n    }\n  }\n  function mergeField (key) {\n    var strat = strats[key] || defaultStrat;\n    options[key] = strat(parent[key], child[key], vm, key);\n  }\n  return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n  options,\n  type,\n  id,\n  warnMissing\n) {\n  /* istanbul ignore if */\n  if (typeof id !== 'string') {\n    return\n  }\n  var assets = options[type];\n  // check local registration variations first\n  if (hasOwn(assets, id)) { return assets[id] }\n  var camelizedId = camelize(id);\n  if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n  var PascalCaseId = capitalize(camelizedId);\n  if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n  // fallback to prototype chain\n  var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n  if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n    warn(\n      'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n      options\n    );\n  }\n  return res\n}\n\n/*  */\n\n\n\nfunction validateProp (\n  key,\n  propOptions,\n  propsData,\n  vm\n) {\n  var prop = propOptions[key];\n  var absent = !hasOwn(propsData, key);\n  var value = propsData[key];\n  // boolean casting\n  var booleanIndex = getTypeIndex(Boolean, prop.type);\n  if (booleanIndex > -1) {\n    if (absent && !hasOwn(prop, 'default')) {\n      value = false;\n    } else if (value === '' || value === hyphenate(key)) {\n      // only cast empty string / same name to boolean if\n      // boolean has higher priority\n      var stringIndex = getTypeIndex(String, prop.type);\n      if (stringIndex < 0 || booleanIndex < stringIndex) {\n        value = true;\n      }\n    }\n  }\n  // check default value\n  if (value === undefined) {\n    value = getPropDefaultValue(vm, prop, key);\n    // since the default value is a fresh copy,\n    // make sure to observe it.\n    var prevShouldObserve = shouldObserve;\n    toggleObserving(true);\n    observe(value);\n    toggleObserving(prevShouldObserve);\n  }\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    // skip validation for weex recycle-list child component props\n    !(false)\n  ) {\n    assertProp(prop, key, value, vm, absent);\n  }\n  return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n  // no default, return undefined\n  if (!hasOwn(prop, 'default')) {\n    return undefined\n  }\n  var def = prop.default;\n  // warn against non-factory defaults for Object & Array\n  if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n    warn(\n      'Invalid default value for prop \"' + key + '\": ' +\n      'Props with type Object/Array must use a factory function ' +\n      'to return the default value.',\n      vm\n    );\n  }\n  // the raw prop value was also undefined from previous render,\n  // return previous default value to avoid unnecessary watcher trigger\n  if (vm && vm.$options.propsData &&\n    vm.$options.propsData[key] === undefined &&\n    vm._props[key] !== undefined\n  ) {\n    return vm._props[key]\n  }\n  // call factory function for non-Function types\n  // a value is Function if its prototype is function even across different execution context\n  return typeof def === 'function' && getType(prop.type) !== 'Function'\n    ? def.call(vm)\n    : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n  prop,\n  name,\n  value,\n  vm,\n  absent\n) {\n  if (prop.required && absent) {\n    warn(\n      'Missing required prop: \"' + name + '\"',\n      vm\n    );\n    return\n  }\n  if (value == null && !prop.required) {\n    return\n  }\n  var type = prop.type;\n  var valid = !type || type === true;\n  var expectedTypes = [];\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type];\n    }\n    for (var i = 0; i < type.length && !valid; i++) {\n      var assertedType = assertType(value, type[i]);\n      expectedTypes.push(assertedType.expectedType || '');\n      valid = assertedType.valid;\n    }\n  }\n\n  if (!valid) {\n    warn(\n      getInvalidTypeMessage(name, value, expectedTypes),\n      vm\n    );\n    return\n  }\n  var validator = prop.validator;\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      );\n    }\n  }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n  var valid;\n  var expectedType = getType(type);\n  if (simpleCheckRE.test(expectedType)) {\n    var t = typeof value;\n    valid = t === expectedType.toLowerCase();\n    // for primitive wrapper objects\n    if (!valid && t === 'object') {\n      valid = value instanceof type;\n    }\n  } else if (expectedType === 'Object') {\n    valid = isPlainObject(value);\n  } else if (expectedType === 'Array') {\n    valid = Array.isArray(value);\n  } else {\n    valid = value instanceof type;\n  }\n  return {\n    valid: valid,\n    expectedType: expectedType\n  }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n  var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n  return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n  return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n  if (!Array.isArray(expectedTypes)) {\n    return isSameType(expectedTypes, type) ? 0 : -1\n  }\n  for (var i = 0, len = expectedTypes.length; i < len; i++) {\n    if (isSameType(expectedTypes[i], type)) {\n      return i\n    }\n  }\n  return -1\n}\n\nfunction getInvalidTypeMessage (name, value, expectedTypes) {\n  var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n    \" Expected \" + (expectedTypes.map(capitalize).join(', '));\n  var expectedType = expectedTypes[0];\n  var receivedType = toRawType(value);\n  var expectedValue = styleValue(value, expectedType);\n  var receivedValue = styleValue(value, receivedType);\n  // check if we need to specify expected value\n  if (expectedTypes.length === 1 &&\n      isExplicable(expectedType) &&\n      !isBoolean(expectedType, receivedType)) {\n    message += \" with value \" + expectedValue;\n  }\n  message += \", got \" + receivedType + \" \";\n  // check if we need to specify received value\n  if (isExplicable(receivedType)) {\n    message += \"with value \" + receivedValue + \".\";\n  }\n  return message\n}\n\nfunction styleValue (value, type) {\n  if (type === 'String') {\n    return (\"\\\"\" + value + \"\\\"\")\n  } else if (type === 'Number') {\n    return (\"\" + (Number(value)))\n  } else {\n    return (\"\" + value)\n  }\n}\n\nfunction isExplicable (value) {\n  var explicitTypes = ['string', 'number', 'boolean'];\n  return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })\n}\n\nfunction isBoolean () {\n  var args = [], len = arguments.length;\n  while ( len-- ) args[ len ] = arguments[ len ];\n\n  return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })\n}\n\n/*  */\n\nfunction handleError (err, vm, info) {\n  // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n  // See: https://github.com/vuejs/vuex/issues/1505\n  pushTarget();\n  try {\n    if (vm) {\n      var cur = vm;\n      while ((cur = cur.$parent)) {\n        var hooks = cur.$options.errorCaptured;\n        if (hooks) {\n          for (var i = 0; i < hooks.length; i++) {\n            try {\n              var capture = hooks[i].call(cur, err, vm, info) === false;\n              if (capture) { return }\n            } catch (e) {\n              globalHandleError(e, cur, 'errorCaptured hook');\n            }\n          }\n        }\n      }\n    }\n    globalHandleError(err, vm, info);\n  } finally {\n    popTarget();\n  }\n}\n\nfunction invokeWithErrorHandling (\n  handler,\n  context,\n  args,\n  vm,\n  info\n) {\n  var res;\n  try {\n    res = args ? handler.apply(context, args) : handler.call(context);\n    if (res && !res._isVue && isPromise(res) && !res._handled) {\n      res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n      // issue #9511\n      // avoid catch triggering multiple times when nested calls\n      res._handled = true;\n    }\n  } catch (e) {\n    handleError(e, vm, info);\n  }\n  return res\n}\n\nfunction globalHandleError (err, vm, info) {\n  if (config.errorHandler) {\n    try {\n      return config.errorHandler.call(null, err, vm, info)\n    } catch (e) {\n      // if the user intentionally throws the original error in the handler,\n      // do not log it twice\n      if (e !== err) {\n        logError(e, null, 'config.errorHandler');\n      }\n    }\n  }\n  logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n  if (process.env.NODE_ENV !== 'production') {\n    warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n  }\n  /* istanbul ignore else */\n  if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n    console.error(err);\n  } else {\n    throw err\n  }\n}\n\n/*  */\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n  pending = false;\n  var copies = callbacks.slice(0);\n  callbacks.length = 0;\n  for (var i = 0; i < copies.length; i++) {\n    copies[i]();\n  }\n}\n\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n  var p = Promise.resolve();\n  timerFunc = function () {\n    p.then(flushCallbacks);\n    // In problematic UIWebViews, Promise.then doesn't completely break, but\n    // it can get stuck in a weird state where callbacks are pushed into the\n    // microtask queue but the queue isn't being flushed, until the browser\n    // needs to do some other work, e.g. handle a timer. Therefore we can\n    // \"force\" the microtask queue to be flushed by adding an empty timer.\n    if (isIOS) { setTimeout(noop); }\n  };\n} else if (!isIE && typeof MutationObserver !== 'undefined' && (\n  isNative(MutationObserver) ||\n  // PhantomJS and iOS 7.x\n  MutationObserver.toString() === '[object MutationObserverConstructor]'\n)) {\n  // Use MutationObserver where native Promise is not available,\n  // e.g. PhantomJS, iOS7, Android 4.4\n  // (#6466 MutationObserver is unreliable in IE11)\n  var counter = 1;\n  var observer = new MutationObserver(flushCallbacks);\n  var textNode = document.createTextNode(String(counter));\n  observer.observe(textNode, {\n    characterData: true\n  });\n  timerFunc = function () {\n    counter = (counter + 1) % 2;\n    textNode.data = String(counter);\n  };\n} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n  // Fallback to setImmediate.\n  // Techinically it leverages the (macro) task queue,\n  // but it is still a better choice than setTimeout.\n  timerFunc = function () {\n    setImmediate(flushCallbacks);\n  };\n} else {\n  // Fallback to setTimeout.\n  timerFunc = function () {\n    setTimeout(flushCallbacks, 0);\n  };\n}\n\nfunction nextTick (cb, ctx) {\n  var _resolve;\n  callbacks.push(function () {\n    if (cb) {\n      try {\n        cb.call(ctx);\n      } catch (e) {\n        handleError(e, ctx, 'nextTick');\n      }\n    } else if (_resolve) {\n      _resolve(ctx);\n    }\n  });\n  if (!pending) {\n    pending = true;\n    timerFunc();\n  }\n  // $flow-disable-line\n  if (!cb && typeof Promise !== 'undefined') {\n    return new Promise(function (resolve) {\n      _resolve = resolve;\n    })\n  }\n}\n\n/*  */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n  var allowedGlobals = makeMap(\n    'Infinity,undefined,NaN,isFinite,isNaN,' +\n    'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n    'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n    'require' // for Webpack/Browserify\n  );\n\n  var warnNonPresent = function (target, key) {\n    warn(\n      \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n      'referenced during render. Make sure that this property is reactive, ' +\n      'either in the data option, or for class-based components, by ' +\n      'initializing the property. ' +\n      'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n      target\n    );\n  };\n\n  var warnReservedPrefix = function (target, key) {\n    warn(\n      \"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" +\n      'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n      'prevent conflicts with Vue internals' +\n      'See: https://vuejs.org/v2/api/#data',\n      target\n    );\n  };\n\n  var hasProxy =\n    typeof Proxy !== 'undefined' && isNative(Proxy);\n\n  if (hasProxy) {\n    var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n    config.keyCodes = new Proxy(config.keyCodes, {\n      set: function set (target, key, value) {\n        if (isBuiltInModifier(key)) {\n          warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n          return false\n        } else {\n          target[key] = value;\n          return true\n        }\n      }\n    });\n  }\n\n  var hasHandler = {\n    has: function has (target, key) {\n      var has = key in target;\n      var isAllowed = allowedGlobals(key) ||\n        (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));\n      if (!has && !isAllowed) {\n        if (key in target.$data) { warnReservedPrefix(target, key); }\n        else { warnNonPresent(target, key); }\n      }\n      return has || !isAllowed\n    }\n  };\n\n  var getHandler = {\n    get: function get (target, key) {\n      if (typeof key === 'string' && !(key in target)) {\n        if (key in target.$data) { warnReservedPrefix(target, key); }\n        else { warnNonPresent(target, key); }\n      }\n      return target[key]\n    }\n  };\n\n  initProxy = function initProxy (vm) {\n    if (hasProxy) {\n      // determine which proxy handler to use\n      var options = vm.$options;\n      var handlers = options.render && options.render._withStripped\n        ? getHandler\n        : hasHandler;\n      vm._renderProxy = new Proxy(vm, handlers);\n    } else {\n      vm._renderProxy = vm;\n    }\n  };\n}\n\n/*  */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n  _traverse(val, seenObjects);\n  seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n  var i, keys;\n  var isA = Array.isArray(val);\n  if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n    return\n  }\n  if (val.__ob__) {\n    var depId = val.__ob__.dep.id;\n    if (seen.has(depId)) {\n      return\n    }\n    seen.add(depId);\n  }\n  if (isA) {\n    i = val.length;\n    while (i--) { _traverse(val[i], seen); }\n  } else {\n    keys = Object.keys(val);\n    i = keys.length;\n    while (i--) { _traverse(val[keys[i]], seen); }\n  }\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n  var perf = inBrowser && window.performance;\n  /* istanbul ignore if */\n  if (\n    perf &&\n    perf.mark &&\n    perf.measure &&\n    perf.clearMarks &&\n    perf.clearMeasures\n  ) {\n    mark = function (tag) { return perf.mark(tag); };\n    measure = function (name, startTag, endTag) {\n      perf.measure(name, startTag, endTag);\n      perf.clearMarks(startTag);\n      perf.clearMarks(endTag);\n      // perf.clearMeasures(name)\n    };\n  }\n}\n\n/*  */\n\nvar normalizeEvent = cached(function (name) {\n  var passive = name.charAt(0) === '&';\n  name = passive ? name.slice(1) : name;\n  var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n  name = once$$1 ? name.slice(1) : name;\n  var capture = name.charAt(0) === '!';\n  name = capture ? name.slice(1) : name;\n  return {\n    name: name,\n    once: once$$1,\n    capture: capture,\n    passive: passive\n  }\n});\n\nfunction createFnInvoker (fns, vm) {\n  function invoker () {\n    var arguments$1 = arguments;\n\n    var fns = invoker.fns;\n    if (Array.isArray(fns)) {\n      var cloned = fns.slice();\n      for (var i = 0; i < cloned.length; i++) {\n        invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n      }\n    } else {\n      // return handler return value for single handlers\n      return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\")\n    }\n  }\n  invoker.fns = fns;\n  return invoker\n}\n\nfunction updateListeners (\n  on,\n  oldOn,\n  add,\n  remove$$1,\n  createOnceHandler,\n  vm\n) {\n  var name, def$$1, cur, old, event;\n  for (name in on) {\n    def$$1 = cur = on[name];\n    old = oldOn[name];\n    event = normalizeEvent(name);\n    if (isUndef(cur)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n        vm\n      );\n    } else if (isUndef(old)) {\n      if (isUndef(cur.fns)) {\n        cur = on[name] = createFnInvoker(cur, vm);\n      }\n      if (isTrue(event.once)) {\n        cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n      }\n      add(event.name, cur, event.capture, event.passive, event.params);\n    } else if (cur !== old) {\n      old.fns = cur;\n      on[name] = old;\n    }\n  }\n  for (name in oldOn) {\n    if (isUndef(on[name])) {\n      event = normalizeEvent(name);\n      remove$$1(event.name, oldOn[name], event.capture);\n    }\n  }\n}\n\n/*  */\n\n/*  */\n\nfunction extractPropsFromVNodeData (\n  data,\n  Ctor,\n  tag\n) {\n  // we are only extracting raw values here.\n  // validation and default values are handled in the child\n  // component itself.\n  var propOptions = Ctor.options.props;\n  if (isUndef(propOptions)) {\n    return\n  }\n  var res = {};\n  var attrs = data.attrs;\n  var props = data.props;\n  if (isDef(attrs) || isDef(props)) {\n    for (var key in propOptions) {\n      var altKey = hyphenate(key);\n      if (process.env.NODE_ENV !== 'production') {\n        var keyInLowerCase = key.toLowerCase();\n        if (\n          key !== keyInLowerCase &&\n          attrs && hasOwn(attrs, keyInLowerCase)\n        ) {\n          tip(\n            \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n            (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n            \" \\\"\" + key + \"\\\". \" +\n            \"Note that HTML attributes are case-insensitive and camelCased \" +\n            \"props need to use their kebab-case equivalents when using in-DOM \" +\n            \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n          );\n        }\n      }\n      checkProp(res, props, key, altKey, true) ||\n      checkProp(res, attrs, key, altKey, false);\n    }\n  }\n  return res\n}\n\nfunction checkProp (\n  res,\n  hash,\n  key,\n  altKey,\n  preserve\n) {\n  if (isDef(hash)) {\n    if (hasOwn(hash, key)) {\n      res[key] = hash[key];\n      if (!preserve) {\n        delete hash[key];\n      }\n      return true\n    } else if (hasOwn(hash, altKey)) {\n      res[key] = hash[altKey];\n      if (!preserve) {\n        delete hash[altKey];\n      }\n      return true\n    }\n  }\n  return false\n}\n\n/*  */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array<VNode>. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n  for (var i = 0; i < children.length; i++) {\n    if (Array.isArray(children[i])) {\n      return Array.prototype.concat.apply([], children)\n    }\n  }\n  return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g. <template>, <slot>, v-for, or when the children is provided by user\n// with hand-written render functions / JSX. In such cases a full normalization\n// is needed to cater to all possible types of children values.\nfunction normalizeChildren (children) {\n  return isPrimitive(children)\n    ? [createTextVNode(children)]\n    : Array.isArray(children)\n      ? normalizeArrayChildren(children)\n      : undefined\n}\n\nfunction isTextNode (node) {\n  return isDef(node) && isDef(node.text) && isFalse(node.isComment)\n}\n\nfunction normalizeArrayChildren (children, nestedIndex) {\n  var res = [];\n  var i, c, lastIndex, last;\n  for (i = 0; i < children.length; i++) {\n    c = children[i];\n    if (isUndef(c) || typeof c === 'boolean') { continue }\n    lastIndex = res.length - 1;\n    last = res[lastIndex];\n    //  nested\n    if (Array.isArray(c)) {\n      if (c.length > 0) {\n        c = normalizeArrayChildren(c, ((nestedIndex || '') + \"_\" + i));\n        // merge adjacent text nodes\n        if (isTextNode(c[0]) && isTextNode(last)) {\n          res[lastIndex] = createTextVNode(last.text + (c[0]).text);\n          c.shift();\n        }\n        res.push.apply(res, c);\n      }\n    } else if (isPrimitive(c)) {\n      if (isTextNode(last)) {\n        // merge adjacent text nodes\n        // this is necessary for SSR hydration because text nodes are\n        // essentially merged when rendered to HTML strings\n        res[lastIndex] = createTextVNode(last.text + c);\n      } else if (c !== '') {\n        // convert primitive to vnode\n        res.push(createTextVNode(c));\n      }\n    } else {\n      if (isTextNode(c) && isTextNode(last)) {\n        // merge adjacent text nodes\n        res[lastIndex] = createTextVNode(last.text + c.text);\n      } else {\n        // default key for nested array children (likely generated by v-for)\n        if (isTrue(children._isVList) &&\n          isDef(c.tag) &&\n          isUndef(c.key) &&\n          isDef(nestedIndex)) {\n          c.key = \"__vlist\" + nestedIndex + \"_\" + i + \"__\";\n        }\n        res.push(c);\n      }\n    }\n  }\n  return res\n}\n\n/*  */\n\nfunction initProvide (vm) {\n  var provide = vm.$options.provide;\n  if (provide) {\n    vm._provided = typeof provide === 'function'\n      ? provide.call(vm)\n      : provide;\n  }\n}\n\nfunction initInjections (vm) {\n  var result = resolveInject(vm.$options.inject, vm);\n  if (result) {\n    toggleObserving(false);\n    Object.keys(result).forEach(function (key) {\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production') {\n        defineReactive$$1(vm, key, result[key], function () {\n          warn(\n            \"Avoid mutating an injected value directly since the changes will be \" +\n            \"overwritten whenever the provided component re-renders. \" +\n            \"injection being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        });\n      } else {\n        defineReactive$$1(vm, key, result[key]);\n      }\n    });\n    toggleObserving(true);\n  }\n}\n\nfunction resolveInject (inject, vm) {\n  if (inject) {\n    // inject is :any because flow is not smart enough to figure out cached\n    var result = Object.create(null);\n    var keys = hasSymbol\n      ? Reflect.ownKeys(inject)\n      : Object.keys(inject);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n      // #6574 in case the inject object is observed...\n      if (key === '__ob__') { continue }\n      var provideKey = inject[key].from;\n      var source = vm;\n      while (source) {\n        if (source._provided && hasOwn(source._provided, provideKey)) {\n          result[key] = source._provided[provideKey];\n          break\n        }\n        source = source.$parent;\n      }\n      if (!source) {\n        if ('default' in inject[key]) {\n          var provideDefault = inject[key].default;\n          result[key] = typeof provideDefault === 'function'\n            ? provideDefault.call(vm)\n            : provideDefault;\n        } else if (process.env.NODE_ENV !== 'production') {\n          warn((\"Injection \\\"\" + key + \"\\\" not found\"), vm);\n        }\n      }\n    }\n    return result\n  }\n}\n\n/*  */\n\n\n\n/**\n * Runtime helper for resolving raw children VNodes into a slot object.\n */\nfunction resolveSlots (\n  children,\n  context\n) {\n  if (!children || !children.length) {\n    return {}\n  }\n  var slots = {};\n  for (var i = 0, l = children.length; i < l; i++) {\n    var child = children[i];\n    var data = child.data;\n    // remove slot attribute if the node is resolved as a Vue slot node\n    if (data && data.attrs && data.attrs.slot) {\n      delete data.attrs.slot;\n    }\n    // named slots should only be respected if the vnode was rendered in the\n    // same context.\n    if ((child.context === context || child.fnContext === context) &&\n      data && data.slot != null\n    ) {\n      var name = data.slot;\n      var slot = (slots[name] || (slots[name] = []));\n      if (child.tag === 'template') {\n        slot.push.apply(slot, child.children || []);\n      } else {\n        slot.push(child);\n      }\n    } else {\n      // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page\n      if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){\n        (slots['page'] || (slots['page'] = [])).push(child);\n      }else{\n        (slots.default || (slots.default = [])).push(child);\n      }\n    }\n  }\n  // ignore slots that contains only whitespace\n  for (var name$1 in slots) {\n    if (slots[name$1].every(isWhitespace)) {\n      delete slots[name$1];\n    }\n  }\n  return slots\n}\n\nfunction isWhitespace (node) {\n  return (node.isComment && !node.asyncFactory) || node.text === ' '\n}\n\n/*  */\n\nfunction normalizeScopedSlots (\n  slots,\n  normalSlots,\n  prevSlots\n) {\n  var res;\n  var hasNormalSlots = Object.keys(normalSlots).length > 0;\n  var isStable = slots ? !!slots.$stable : !hasNormalSlots;\n  var key = slots && slots.$key;\n  if (!slots) {\n    res = {};\n  } else if (slots._normalized) {\n    // fast path 1: child component re-render only, parent did not change\n    return slots._normalized\n  } else if (\n    isStable &&\n    prevSlots &&\n    prevSlots !== emptyObject &&\n    key === prevSlots.$key &&\n    !hasNormalSlots &&\n    !prevSlots.$hasNormal\n  ) {\n    // fast path 2: stable scoped slots w/ no normal slots to proxy,\n    // only need to normalize once\n    return prevSlots\n  } else {\n    res = {};\n    for (var key$1 in slots) {\n      if (slots[key$1] && key$1[0] !== '$') {\n        res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);\n      }\n    }\n  }\n  // expose normal slots on scopedSlots\n  for (var key$2 in normalSlots) {\n    if (!(key$2 in res)) {\n      res[key$2] = proxyNormalSlot(normalSlots, key$2);\n    }\n  }\n  // avoriaz seems to mock a non-extensible $scopedSlots object\n  // and when that is passed down this would cause an error\n  if (slots && Object.isExtensible(slots)) {\n    (slots)._normalized = res;\n  }\n  def(res, '$stable', isStable);\n  def(res, '$key', key);\n  def(res, '$hasNormal', hasNormalSlots);\n  return res\n}\n\nfunction normalizeScopedSlot(normalSlots, key, fn) {\n  var normalized = function () {\n    var res = arguments.length ? fn.apply(null, arguments) : fn({});\n    res = res && typeof res === 'object' && !Array.isArray(res)\n      ? [res] // single vnode\n      : normalizeChildren(res);\n    return res && (\n      res.length === 0 ||\n      (res.length === 1 && res[0].isComment) // #9658\n    ) ? undefined\n      : res\n  };\n  // this is a slot using the new v-slot syntax without scope. although it is\n  // compiled as a scoped slot, render fn users would expect it to be present\n  // on this.$slots because the usage is semantically a normal slot.\n  if (fn.proxy) {\n    Object.defineProperty(normalSlots, key, {\n      get: normalized,\n      enumerable: true,\n      configurable: true\n    });\n  }\n  return normalized\n}\n\nfunction proxyNormalSlot(slots, key) {\n  return function () { return slots[key]; }\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering v-for lists.\n */\nfunction renderList (\n  val,\n  render\n) {\n  var ret, i, l, keys, key;\n  if (Array.isArray(val) || typeof val === 'string') {\n    ret = new Array(val.length);\n    for (i = 0, l = val.length; i < l; i++) {\n      ret[i] = render(val[i], i);\n    }\n  } else if (typeof val === 'number') {\n    ret = new Array(val);\n    for (i = 0; i < val; i++) {\n      ret[i] = render(i + 1, i);\n    }\n  } else if (isObject(val)) {\n    if (hasSymbol && val[Symbol.iterator]) {\n      ret = [];\n      var iterator = val[Symbol.iterator]();\n      var result = iterator.next();\n      while (!result.done) {\n        ret.push(render(result.value, ret.length));\n        result = iterator.next();\n      }\n    } else {\n      keys = Object.keys(val);\n      ret = new Array(keys.length);\n      for (i = 0, l = keys.length; i < l; i++) {\n        key = keys[i];\n        ret[i] = render(val[key], key, i);\n      }\n    }\n  }\n  if (!isDef(ret)) {\n    ret = [];\n  }\n  (ret)._isVList = true;\n  return ret\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering <slot>\n */\nfunction renderSlot (\n  name,\n  fallback,\n  props,\n  bindObject\n) {\n  var scopedSlotFn = this.$scopedSlots[name];\n  var nodes;\n  if (scopedSlotFn) { // scoped slot\n    props = props || {};\n    if (bindObject) {\n      if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {\n        warn(\n          'slot v-bind without argument expects an Object',\n          this\n        );\n      }\n      props = extend(extend({}, bindObject), props);\n    }\n    nodes = scopedSlotFn(props) || fallback;\n  } else {\n    nodes = this.$slots[name] || fallback;\n  }\n\n  var target = props && props.slot;\n  if (target) {\n    return this.$createElement('template', { slot: target }, nodes)\n  } else {\n    return nodes\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for resolving filters\n */\nfunction resolveFilter (id) {\n  return resolveAsset(this.$options, 'filters', id, true) || identity\n}\n\n/*  */\n\nfunction isKeyNotMatch (expect, actual) {\n  if (Array.isArray(expect)) {\n    return expect.indexOf(actual) === -1\n  } else {\n    return expect !== actual\n  }\n}\n\n/**\n * Runtime helper for checking keyCodes from config.\n * exposed as Vue.prototype._k\n * passing in eventKeyName as last argument separately for backwards compat\n */\nfunction checkKeyCodes (\n  eventKeyCode,\n  key,\n  builtInKeyCode,\n  eventKeyName,\n  builtInKeyName\n) {\n  var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;\n  if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {\n    return isKeyNotMatch(builtInKeyName, eventKeyName)\n  } else if (mappedKeyCode) {\n    return isKeyNotMatch(mappedKeyCode, eventKeyCode)\n  } else if (eventKeyName) {\n    return hyphenate(eventKeyName) !== key\n  }\n}\n\n/*  */\n\n/**\n * Runtime helper for merging v-bind=\"object\" into a VNode's data.\n */\nfunction bindObjectProps (\n  data,\n  tag,\n  value,\n  asProp,\n  isSync\n) {\n  if (value) {\n    if (!isObject(value)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'v-bind without argument expects an Object or Array value',\n        this\n      );\n    } else {\n      if (Array.isArray(value)) {\n        value = toObject(value);\n      }\n      var hash;\n      var loop = function ( key ) {\n        if (\n          key === 'class' ||\n          key === 'style' ||\n          isReservedAttribute(key)\n        ) {\n          hash = data;\n        } else {\n          var type = data.attrs && data.attrs.type;\n          hash = asProp || config.mustUseProp(tag, type, key)\n            ? data.domProps || (data.domProps = {})\n            : data.attrs || (data.attrs = {});\n        }\n        var camelizedKey = camelize(key);\n        var hyphenatedKey = hyphenate(key);\n        if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {\n          hash[key] = value[key];\n\n          if (isSync) {\n            var on = data.on || (data.on = {});\n            on[(\"update:\" + key)] = function ($event) {\n              value[key] = $event;\n            };\n          }\n        }\n      };\n\n      for (var key in value) loop( key );\n    }\n  }\n  return data\n}\n\n/*  */\n\n/**\n * Runtime helper for rendering static trees.\n */\nfunction renderStatic (\n  index,\n  isInFor\n) {\n  var cached = this._staticTrees || (this._staticTrees = []);\n  var tree = cached[index];\n  // if has already-rendered static tree and not inside v-for,\n  // we can reuse the same tree.\n  if (tree && !isInFor) {\n    return tree\n  }\n  // otherwise, render a fresh tree.\n  tree = cached[index] = this.$options.staticRenderFns[index].call(\n    this._renderProxy,\n    null,\n    this // for render fns generated for functional component templates\n  );\n  markStatic(tree, (\"__static__\" + index), false);\n  return tree\n}\n\n/**\n * Runtime helper for v-once.\n * Effectively it means marking the node as static with a unique key.\n */\nfunction markOnce (\n  tree,\n  index,\n  key\n) {\n  markStatic(tree, (\"__once__\" + index + (key ? (\"_\" + key) : \"\")), true);\n  return tree\n}\n\nfunction markStatic (\n  tree,\n  key,\n  isOnce\n) {\n  if (Array.isArray(tree)) {\n    for (var i = 0; i < tree.length; i++) {\n      if (tree[i] && typeof tree[i] !== 'string') {\n        markStaticNode(tree[i], (key + \"_\" + i), isOnce);\n      }\n    }\n  } else {\n    markStaticNode(tree, key, isOnce);\n  }\n}\n\nfunction markStaticNode (node, key, isOnce) {\n  node.isStatic = true;\n  node.key = key;\n  node.isOnce = isOnce;\n}\n\n/*  */\n\nfunction bindObjectListeners (data, value) {\n  if (value) {\n    if (!isPlainObject(value)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        'v-on without argument expects an Object value',\n        this\n      );\n    } else {\n      var on = data.on = data.on ? extend({}, data.on) : {};\n      for (var key in value) {\n        var existing = on[key];\n        var ours = value[key];\n        on[key] = existing ? [].concat(existing, ours) : ours;\n      }\n    }\n  }\n  return data\n}\n\n/*  */\n\nfunction resolveScopedSlots (\n  fns, // see flow/vnode\n  res,\n  // the following are added in 2.6\n  hasDynamicKeys,\n  contentHashKey\n) {\n  res = res || { $stable: !hasDynamicKeys };\n  for (var i = 0; i < fns.length; i++) {\n    var slot = fns[i];\n    if (Array.isArray(slot)) {\n      resolveScopedSlots(slot, res, hasDynamicKeys);\n    } else if (slot) {\n      // marker for reverse proxying v-slot without scope on this.$slots\n      if (slot.proxy) {\n        slot.fn.proxy = true;\n      }\n      res[slot.key] = slot.fn;\n    }\n  }\n  if (contentHashKey) {\n    (res).$key = contentHashKey;\n  }\n  return res\n}\n\n/*  */\n\nfunction bindDynamicKeys (baseObj, values) {\n  for (var i = 0; i < values.length; i += 2) {\n    var key = values[i];\n    if (typeof key === 'string' && key) {\n      baseObj[values[i]] = values[i + 1];\n    } else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {\n      // null is a speical value for explicitly removing a binding\n      warn(\n        (\"Invalid value for dynamic directive argument (expected string or null): \" + key),\n        this\n      );\n    }\n  }\n  return baseObj\n}\n\n// helper to dynamically append modifier runtime markers to event names.\n// ensure only append when value is already string, otherwise it will be cast\n// to string and cause the type check to miss.\nfunction prependModifier (value, symbol) {\n  return typeof value === 'string' ? symbol + value : value\n}\n\n/*  */\n\nfunction installRenderHelpers (target) {\n  target._o = markOnce;\n  target._n = toNumber;\n  target._s = toString;\n  target._l = renderList;\n  target._t = renderSlot;\n  target._q = looseEqual;\n  target._i = looseIndexOf;\n  target._m = renderStatic;\n  target._f = resolveFilter;\n  target._k = checkKeyCodes;\n  target._b = bindObjectProps;\n  target._v = createTextVNode;\n  target._e = createEmptyVNode;\n  target._u = resolveScopedSlots;\n  target._g = bindObjectListeners;\n  target._d = bindDynamicKeys;\n  target._p = prependModifier;\n}\n\n/*  */\n\nfunction FunctionalRenderContext (\n  data,\n  props,\n  children,\n  parent,\n  Ctor\n) {\n  var this$1 = this;\n\n  var options = Ctor.options;\n  // ensure the createElement function in functional components\n  // gets a unique context - this is necessary for correct named slot check\n  var contextVm;\n  if (hasOwn(parent, '_uid')) {\n    contextVm = Object.create(parent);\n    // $flow-disable-line\n    contextVm._original = parent;\n  } else {\n    // the context vm passed in is a functional context as well.\n    // in this case we want to make sure we are able to get a hold to the\n    // real context instance.\n    contextVm = parent;\n    // $flow-disable-line\n    parent = parent._original;\n  }\n  var isCompiled = isTrue(options._compiled);\n  var needNormalization = !isCompiled;\n\n  this.data = data;\n  this.props = props;\n  this.children = children;\n  this.parent = parent;\n  this.listeners = data.on || emptyObject;\n  this.injections = resolveInject(options.inject, parent);\n  this.slots = function () {\n    if (!this$1.$slots) {\n      normalizeScopedSlots(\n        data.scopedSlots,\n        this$1.$slots = resolveSlots(children, parent)\n      );\n    }\n    return this$1.$slots\n  };\n\n  Object.defineProperty(this, 'scopedSlots', ({\n    enumerable: true,\n    get: function get () {\n      return normalizeScopedSlots(data.scopedSlots, this.slots())\n    }\n  }));\n\n  // support for compiled functional template\n  if (isCompiled) {\n    // exposing $options for renderStatic()\n    this.$options = options;\n    // pre-resolve slots for renderSlot()\n    this.$slots = this.slots();\n    this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);\n  }\n\n  if (options._scopeId) {\n    this._c = function (a, b, c, d) {\n      var vnode = createElement(contextVm, a, b, c, d, needNormalization);\n      if (vnode && !Array.isArray(vnode)) {\n        vnode.fnScopeId = options._scopeId;\n        vnode.fnContext = parent;\n      }\n      return vnode\n    };\n  } else {\n    this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };\n  }\n}\n\ninstallRenderHelpers(FunctionalRenderContext.prototype);\n\nfunction createFunctionalComponent (\n  Ctor,\n  propsData,\n  data,\n  contextVm,\n  children\n) {\n  var options = Ctor.options;\n  var props = {};\n  var propOptions = options.props;\n  if (isDef(propOptions)) {\n    for (var key in propOptions) {\n      props[key] = validateProp(key, propOptions, propsData || emptyObject);\n    }\n  } else {\n    if (isDef(data.attrs)) { mergeProps(props, data.attrs); }\n    if (isDef(data.props)) { mergeProps(props, data.props); }\n  }\n\n  var renderContext = new FunctionalRenderContext(\n    data,\n    props,\n    children,\n    contextVm,\n    Ctor\n  );\n\n  var vnode = options.render.call(null, renderContext._c, renderContext);\n\n  if (vnode instanceof VNode) {\n    return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)\n  } else if (Array.isArray(vnode)) {\n    var vnodes = normalizeChildren(vnode) || [];\n    var res = new Array(vnodes.length);\n    for (var i = 0; i < vnodes.length; i++) {\n      res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);\n    }\n    return res\n  }\n}\n\nfunction cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {\n  // #7817 clone node before setting fnContext, otherwise if the node is reused\n  // (e.g. it was from a cached normal slot) the fnContext causes named slots\n  // that should not be matched to match.\n  var clone = cloneVNode(vnode);\n  clone.fnContext = contextVm;\n  clone.fnOptions = options;\n  if (process.env.NODE_ENV !== 'production') {\n    (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;\n  }\n  if (data.slot) {\n    (clone.data || (clone.data = {})).slot = data.slot;\n  }\n  return clone\n}\n\nfunction mergeProps (to, from) {\n  for (var key in from) {\n    to[camelize(key)] = from[key];\n  }\n}\n\n/*  */\n\n/*  */\n\n/*  */\n\n/*  */\n\n// inline hooks to be invoked on component VNodes during patch\nvar componentVNodeHooks = {\n  init: function init (vnode, hydrating) {\n    if (\n      vnode.componentInstance &&\n      !vnode.componentInstance._isDestroyed &&\n      vnode.data.keepAlive\n    ) {\n      // kept-alive components, treat as a patch\n      var mountedNode = vnode; // work around flow\n      componentVNodeHooks.prepatch(mountedNode, mountedNode);\n    } else {\n      var child = vnode.componentInstance = createComponentInstanceForVnode(\n        vnode,\n        activeInstance\n      );\n      child.$mount(hydrating ? vnode.elm : undefined, hydrating);\n    }\n  },\n\n  prepatch: function prepatch (oldVnode, vnode) {\n    var options = vnode.componentOptions;\n    var child = vnode.componentInstance = oldVnode.componentInstance;\n    updateChildComponent(\n      child,\n      options.propsData, // updated props\n      options.listeners, // updated listeners\n      vnode, // new parent vnode\n      options.children // new children\n    );\n  },\n\n  insert: function insert (vnode) {\n    var context = vnode.context;\n    var componentInstance = vnode.componentInstance;\n    if (!componentInstance._isMounted) {\n      componentInstance._isMounted = true;\n      callHook(componentInstance, 'mounted');\n    }\n    if (vnode.data.keepAlive) {\n      if (context._isMounted) {\n        // vue-router#1212\n        // During updates, a kept-alive component's child components may\n        // change, so directly walking the tree here may call activated hooks\n        // on incorrect children. Instead we push them into a queue which will\n        // be processed after the whole patch process ended.\n        queueActivatedComponent(componentInstance);\n      } else {\n        activateChildComponent(componentInstance, true /* direct */);\n      }\n    }\n  },\n\n  destroy: function destroy (vnode) {\n    var componentInstance = vnode.componentInstance;\n    if (!componentInstance._isDestroyed) {\n      if (!vnode.data.keepAlive) {\n        componentInstance.$destroy();\n      } else {\n        deactivateChildComponent(componentInstance, true /* direct */);\n      }\n    }\n  }\n};\n\nvar hooksToMerge = Object.keys(componentVNodeHooks);\n\nfunction createComponent (\n  Ctor,\n  data,\n  context,\n  children,\n  tag\n) {\n  if (isUndef(Ctor)) {\n    return\n  }\n\n  var baseCtor = context.$options._base;\n\n  // plain options object: turn it into a constructor\n  if (isObject(Ctor)) {\n    Ctor = baseCtor.extend(Ctor);\n  }\n\n  // if at this stage it's not a constructor or an async component factory,\n  // reject.\n  if (typeof Ctor !== 'function') {\n    if (process.env.NODE_ENV !== 'production') {\n      warn((\"Invalid Component definition: \" + (String(Ctor))), context);\n    }\n    return\n  }\n\n  // async component\n  var asyncFactory;\n  if (isUndef(Ctor.cid)) {\n    asyncFactory = Ctor;\n    Ctor = resolveAsyncComponent(asyncFactory, baseCtor);\n    if (Ctor === undefined) {\n      // return a placeholder node for async component, which is rendered\n      // as a comment node but preserves all the raw information for the node.\n      // the information will be used for async server-rendering and hydration.\n      return createAsyncPlaceholder(\n        asyncFactory,\n        data,\n        context,\n        children,\n        tag\n      )\n    }\n  }\n\n  data = data || {};\n\n  // resolve constructor options in case global mixins are applied after\n  // component constructor creation\n  resolveConstructorOptions(Ctor);\n\n  // transform component v-model data into props & events\n  if (isDef(data.model)) {\n    transformModel(Ctor.options, data);\n  }\n\n  // extract props\n  var propsData = extractPropsFromVNodeData(data, Ctor, tag);\n\n  // functional component\n  if (isTrue(Ctor.options.functional)) {\n    return createFunctionalComponent(Ctor, propsData, data, context, children)\n  }\n\n  // extract listeners, since these needs to be treated as\n  // child component listeners instead of DOM listeners\n  var listeners = data.on;\n  // replace with listeners with .native modifier\n  // so it gets processed during parent component patch.\n  data.on = data.nativeOn;\n\n  if (isTrue(Ctor.options.abstract)) {\n    // abstract components do not keep anything\n    // other than props & listeners & slot\n\n    // work around flow\n    var slot = data.slot;\n    data = {};\n    if (slot) {\n      data.slot = slot;\n    }\n  }\n\n  // install component management hooks onto the placeholder node\n  installComponentHooks(data);\n\n  // return a placeholder vnode\n  var name = Ctor.options.name || tag;\n  var vnode = new VNode(\n    (\"vue-component-\" + (Ctor.cid) + (name ? (\"-\" + name) : '')),\n    data, undefined, undefined, undefined, context,\n    { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },\n    asyncFactory\n  );\n\n  return vnode\n}\n\nfunction createComponentInstanceForVnode (\n  vnode, // we know it's MountedComponentVNode but flow doesn't\n  parent // activeInstance in lifecycle state\n) {\n  var options = {\n    _isComponent: true,\n    _parentVnode: vnode,\n    parent: parent\n  };\n  // check inline-template render functions\n  var inlineTemplate = vnode.data.inlineTemplate;\n  if (isDef(inlineTemplate)) {\n    options.render = inlineTemplate.render;\n    options.staticRenderFns = inlineTemplate.staticRenderFns;\n  }\n  return new vnode.componentOptions.Ctor(options)\n}\n\nfunction installComponentHooks (data) {\n  var hooks = data.hook || (data.hook = {});\n  for (var i = 0; i < hooksToMerge.length; i++) {\n    var key = hooksToMerge[i];\n    var existing = hooks[key];\n    var toMerge = componentVNodeHooks[key];\n    if (existing !== toMerge && !(existing && existing._merged)) {\n      hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;\n    }\n  }\n}\n\nfunction mergeHook$1 (f1, f2) {\n  var merged = function (a, b) {\n    // flow complains about extra args which is why we use any\n    f1(a, b);\n    f2(a, b);\n  };\n  merged._merged = true;\n  return merged\n}\n\n// transform component v-model info (value and callback) into\n// prop and event handler respectively.\nfunction transformModel (options, data) {\n  var prop = (options.model && options.model.prop) || 'value';\n  var event = (options.model && options.model.event) || 'input'\n  ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;\n  var on = data.on || (data.on = {});\n  var existing = on[event];\n  var callback = data.model.callback;\n  if (isDef(existing)) {\n    if (\n      Array.isArray(existing)\n        ? existing.indexOf(callback) === -1\n        : existing !== callback\n    ) {\n      on[event] = [callback].concat(existing);\n    }\n  } else {\n    on[event] = callback;\n  }\n}\n\n/*  */\n\nvar SIMPLE_NORMALIZE = 1;\nvar ALWAYS_NORMALIZE = 2;\n\n// wrapper function for providing a more flexible interface\n// without getting yelled at by flow\nfunction createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType,\n  alwaysNormalize\n) {\n  if (Array.isArray(data) || isPrimitive(data)) {\n    normalizationType = children;\n    children = data;\n    data = undefined;\n  }\n  if (isTrue(alwaysNormalize)) {\n    normalizationType = ALWAYS_NORMALIZE;\n  }\n  return _createElement(context, tag, data, children, normalizationType)\n}\n\nfunction _createElement (\n  context,\n  tag,\n  data,\n  children,\n  normalizationType\n) {\n  if (isDef(data) && isDef((data).__ob__)) {\n    process.env.NODE_ENV !== 'production' && warn(\n      \"Avoid using observed data object as vnode data: \" + (JSON.stringify(data)) + \"\\n\" +\n      'Always create fresh vnode data objects in each render!',\n      context\n    );\n    return createEmptyVNode()\n  }\n  // object syntax in v-bind\n  if (isDef(data) && isDef(data.is)) {\n    tag = data.is;\n  }\n  if (!tag) {\n    // in case of component :is set to falsy value\n    return createEmptyVNode()\n  }\n  // warn against non-primitive key\n  if (process.env.NODE_ENV !== 'production' &&\n    isDef(data) && isDef(data.key) && !isPrimitive(data.key)\n  ) {\n    {\n      warn(\n        'Avoid using non-primitive value as key, ' +\n        'use string/number value instead.',\n        context\n      );\n    }\n  }\n  // support single function children as default scoped slot\n  if (Array.isArray(children) &&\n    typeof children[0] === 'function'\n  ) {\n    data = data || {};\n    data.scopedSlots = { default: children[0] };\n    children.length = 0;\n  }\n  if (normalizationType === ALWAYS_NORMALIZE) {\n    children = normalizeChildren(children);\n  } else if (normalizationType === SIMPLE_NORMALIZE) {\n    children = simpleNormalizeChildren(children);\n  }\n  var vnode, ns;\n  if (typeof tag === 'string') {\n    var Ctor;\n    ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);\n    if (config.isReservedTag(tag)) {\n      // platform built-in elements\n      vnode = new VNode(\n        config.parsePlatformTagName(tag), data, children,\n        undefined, undefined, context\n      );\n    } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {\n      // component\n      vnode = createComponent(Ctor, data, context, children, tag);\n    } else {\n      // unknown or unlisted namespaced elements\n      // check at runtime because it may get assigned a namespace when its\n      // parent normalizes children\n      vnode = new VNode(\n        tag, data, children,\n        undefined, undefined, context\n      );\n    }\n  } else {\n    // direct component options / constructor\n    vnode = createComponent(tag, data, context, children);\n  }\n  if (Array.isArray(vnode)) {\n    return vnode\n  } else if (isDef(vnode)) {\n    if (isDef(ns)) { applyNS(vnode, ns); }\n    if (isDef(data)) { registerDeepBindings(data); }\n    return vnode\n  } else {\n    return createEmptyVNode()\n  }\n}\n\nfunction applyNS (vnode, ns, force) {\n  vnode.ns = ns;\n  if (vnode.tag === 'foreignObject') {\n    // use default namespace inside foreignObject\n    ns = undefined;\n    force = true;\n  }\n  if (isDef(vnode.children)) {\n    for (var i = 0, l = vnode.children.length; i < l; i++) {\n      var child = vnode.children[i];\n      if (isDef(child.tag) && (\n        isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {\n        applyNS(child, ns, force);\n      }\n    }\n  }\n}\n\n// ref #5318\n// necessary to ensure parent re-render when deep bindings like :style and\n// :class are used on slot nodes\nfunction registerDeepBindings (data) {\n  if (isObject(data.style)) {\n    traverse(data.style);\n  }\n  if (isObject(data.class)) {\n    traverse(data.class);\n  }\n}\n\n/*  */\n\nfunction initRender (vm) {\n  vm._vnode = null; // the root of the child tree\n  vm._staticTrees = null; // v-once cached trees\n  var options = vm.$options;\n  var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree\n  var renderContext = parentVnode && parentVnode.context;\n  vm.$slots = resolveSlots(options._renderChildren, renderContext);\n  vm.$scopedSlots = emptyObject;\n  // bind the createElement fn to this instance\n  // so that we get proper render context inside it.\n  // args order: tag, data, children, normalizationType, alwaysNormalize\n  // internal version is used by render functions compiled from templates\n  vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\n  // normalization is always applied for the public version, used in\n  // user-written render functions.\n  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\n\n  // $attrs & $listeners are exposed for easier HOC creation.\n  // they need to be reactive so that HOCs using them are always updated\n  var parentData = parentVnode && parentVnode.data;\n\n  /* istanbul ignore else */\n  if (process.env.NODE_ENV !== 'production') {\n    defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {\n      !isUpdatingChildComponent && warn(\"$attrs is readonly.\", vm);\n    }, true);\n    defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {\n      !isUpdatingChildComponent && warn(\"$listeners is readonly.\", vm);\n    }, true);\n  } else {\n    defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true);\n    defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, null, true);\n  }\n}\n\nvar currentRenderingInstance = null;\n\nfunction renderMixin (Vue) {\n  // install runtime convenience helpers\n  installRenderHelpers(Vue.prototype);\n\n  Vue.prototype.$nextTick = function (fn) {\n    return nextTick(fn, this)\n  };\n\n  Vue.prototype._render = function () {\n    var vm = this;\n    var ref = vm.$options;\n    var render = ref.render;\n    var _parentVnode = ref._parentVnode;\n\n    if (_parentVnode) {\n      vm.$scopedSlots = normalizeScopedSlots(\n        _parentVnode.data.scopedSlots,\n        vm.$slots,\n        vm.$scopedSlots\n      );\n    }\n\n    // set parent vnode. this allows render functions to have access\n    // to the data on the placeholder node.\n    vm.$vnode = _parentVnode;\n    // render self\n    var vnode;\n    try {\n      // There's no need to maintain a stack becaues all render fns are called\n      // separately from one another. Nested component's render fns are called\n      // when parent component is patched.\n      currentRenderingInstance = vm;\n      vnode = render.call(vm._renderProxy, vm.$createElement);\n    } catch (e) {\n      handleError(e, vm, \"render\");\n      // return error render result,\n      // or previous vnode to prevent render error causing blank component\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production' && vm.$options.renderError) {\n        try {\n          vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);\n        } catch (e) {\n          handleError(e, vm, \"renderError\");\n          vnode = vm._vnode;\n        }\n      } else {\n        vnode = vm._vnode;\n      }\n    } finally {\n      currentRenderingInstance = null;\n    }\n    // if the returned array contains only a single node, allow it\n    if (Array.isArray(vnode) && vnode.length === 1) {\n      vnode = vnode[0];\n    }\n    // return empty vnode in case the render function errored out\n    if (!(vnode instanceof VNode)) {\n      if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {\n        warn(\n          'Multiple root nodes returned from render function. Render function ' +\n          'should return a single root node.',\n          vm\n        );\n      }\n      vnode = createEmptyVNode();\n    }\n    // set parent\n    vnode.parent = _parentVnode;\n    return vnode\n  };\n}\n\n/*  */\n\nfunction ensureCtor (comp, base) {\n  if (\n    comp.__esModule ||\n    (hasSymbol && comp[Symbol.toStringTag] === 'Module')\n  ) {\n    comp = comp.default;\n  }\n  return isObject(comp)\n    ? base.extend(comp)\n    : comp\n}\n\nfunction createAsyncPlaceholder (\n  factory,\n  data,\n  context,\n  children,\n  tag\n) {\n  var node = createEmptyVNode();\n  node.asyncFactory = factory;\n  node.asyncMeta = { data: data, context: context, children: children, tag: tag };\n  return node\n}\n\nfunction resolveAsyncComponent (\n  factory,\n  baseCtor\n) {\n  if (isTrue(factory.error) && isDef(factory.errorComp)) {\n    return factory.errorComp\n  }\n\n  if (isDef(factory.resolved)) {\n    return factory.resolved\n  }\n\n  var owner = currentRenderingInstance;\n  if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {\n    // already pending\n    factory.owners.push(owner);\n  }\n\n  if (isTrue(factory.loading) && isDef(factory.loadingComp)) {\n    return factory.loadingComp\n  }\n\n  if (owner && !isDef(factory.owners)) {\n    var owners = factory.owners = [owner];\n    var sync = true;\n    var timerLoading = null;\n    var timerTimeout = null\n\n    ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });\n\n    var forceRender = function (renderCompleted) {\n      for (var i = 0, l = owners.length; i < l; i++) {\n        (owners[i]).$forceUpdate();\n      }\n\n      if (renderCompleted) {\n        owners.length = 0;\n        if (timerLoading !== null) {\n          clearTimeout(timerLoading);\n          timerLoading = null;\n        }\n        if (timerTimeout !== null) {\n          clearTimeout(timerTimeout);\n          timerTimeout = null;\n        }\n      }\n    };\n\n    var resolve = once(function (res) {\n      // cache resolved\n      factory.resolved = ensureCtor(res, baseCtor);\n      // invoke callbacks only if this is not a synchronous resolve\n      // (async resolves are shimmed as synchronous during SSR)\n      if (!sync) {\n        forceRender(true);\n      } else {\n        owners.length = 0;\n      }\n    });\n\n    var reject = once(function (reason) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed to resolve async component: \" + (String(factory)) +\n        (reason ? (\"\\nReason: \" + reason) : '')\n      );\n      if (isDef(factory.errorComp)) {\n        factory.error = true;\n        forceRender(true);\n      }\n    });\n\n    var res = factory(resolve, reject);\n\n    if (isObject(res)) {\n      if (isPromise(res)) {\n        // () => Promise\n        if (isUndef(factory.resolved)) {\n          res.then(resolve, reject);\n        }\n      } else if (isPromise(res.component)) {\n        res.component.then(resolve, reject);\n\n        if (isDef(res.error)) {\n          factory.errorComp = ensureCtor(res.error, baseCtor);\n        }\n\n        if (isDef(res.loading)) {\n          factory.loadingComp = ensureCtor(res.loading, baseCtor);\n          if (res.delay === 0) {\n            factory.loading = true;\n          } else {\n            timerLoading = setTimeout(function () {\n              timerLoading = null;\n              if (isUndef(factory.resolved) && isUndef(factory.error)) {\n                factory.loading = true;\n                forceRender(false);\n              }\n            }, res.delay || 200);\n          }\n        }\n\n        if (isDef(res.timeout)) {\n          timerTimeout = setTimeout(function () {\n            timerTimeout = null;\n            if (isUndef(factory.resolved)) {\n              reject(\n                process.env.NODE_ENV !== 'production'\n                  ? (\"timeout (\" + (res.timeout) + \"ms)\")\n                  : null\n              );\n            }\n          }, res.timeout);\n        }\n      }\n    }\n\n    sync = false;\n    // return in case resolved synchronously\n    return factory.loading\n      ? factory.loadingComp\n      : factory.resolved\n  }\n}\n\n/*  */\n\nfunction isAsyncPlaceholder (node) {\n  return node.isComment && node.asyncFactory\n}\n\n/*  */\n\nfunction getFirstComponentChild (children) {\n  if (Array.isArray(children)) {\n    for (var i = 0; i < children.length; i++) {\n      var c = children[i];\n      if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {\n        return c\n      }\n    }\n  }\n}\n\n/*  */\n\n/*  */\n\nfunction initEvents (vm) {\n  vm._events = Object.create(null);\n  vm._hasHookEvent = false;\n  // init parent attached events\n  var listeners = vm.$options._parentListeners;\n  if (listeners) {\n    updateComponentListeners(vm, listeners);\n  }\n}\n\nvar target;\n\nfunction add (event, fn) {\n  target.$on(event, fn);\n}\n\nfunction remove$1 (event, fn) {\n  target.$off(event, fn);\n}\n\nfunction createOnceHandler (event, fn) {\n  var _target = target;\n  return function onceHandler () {\n    var res = fn.apply(null, arguments);\n    if (res !== null) {\n      _target.$off(event, onceHandler);\n    }\n  }\n}\n\nfunction updateComponentListeners (\n  vm,\n  listeners,\n  oldListeners\n) {\n  target = vm;\n  updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);\n  target = undefined;\n}\n\nfunction eventsMixin (Vue) {\n  var hookRE = /^hook:/;\n  Vue.prototype.$on = function (event, fn) {\n    var vm = this;\n    if (Array.isArray(event)) {\n      for (var i = 0, l = event.length; i < l; i++) {\n        vm.$on(event[i], fn);\n      }\n    } else {\n      (vm._events[event] || (vm._events[event] = [])).push(fn);\n      // optimize hook:event cost by using a boolean flag marked at registration\n      // instead of a hash lookup\n      if (hookRE.test(event)) {\n        vm._hasHookEvent = true;\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$once = function (event, fn) {\n    var vm = this;\n    function on () {\n      vm.$off(event, on);\n      fn.apply(vm, arguments);\n    }\n    on.fn = fn;\n    vm.$on(event, on);\n    return vm\n  };\n\n  Vue.prototype.$off = function (event, fn) {\n    var vm = this;\n    // all\n    if (!arguments.length) {\n      vm._events = Object.create(null);\n      return vm\n    }\n    // array of events\n    if (Array.isArray(event)) {\n      for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {\n        vm.$off(event[i$1], fn);\n      }\n      return vm\n    }\n    // specific event\n    var cbs = vm._events[event];\n    if (!cbs) {\n      return vm\n    }\n    if (!fn) {\n      vm._events[event] = null;\n      return vm\n    }\n    // specific handler\n    var cb;\n    var i = cbs.length;\n    while (i--) {\n      cb = cbs[i];\n      if (cb === fn || cb.fn === fn) {\n        cbs.splice(i, 1);\n        break\n      }\n    }\n    return vm\n  };\n\n  Vue.prototype.$emit = function (event) {\n    var vm = this;\n    if (process.env.NODE_ENV !== 'production') {\n      var lowerCaseEvent = event.toLowerCase();\n      if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {\n        tip(\n          \"Event \\\"\" + lowerCaseEvent + \"\\\" is emitted in component \" +\n          (formatComponentName(vm)) + \" but the handler is registered for \\\"\" + event + \"\\\". \" +\n          \"Note that HTML attributes are case-insensitive and you cannot use \" +\n          \"v-on to listen to camelCase events when using in-DOM templates. \" +\n          \"You should probably use \\\"\" + (hyphenate(event)) + \"\\\" instead of \\\"\" + event + \"\\\".\"\n        );\n      }\n    }\n    var cbs = vm._events[event];\n    if (cbs) {\n      cbs = cbs.length > 1 ? toArray(cbs) : cbs;\n      var args = toArray(arguments, 1);\n      var info = \"event handler for \\\"\" + event + \"\\\"\";\n      for (var i = 0, l = cbs.length; i < l; i++) {\n        invokeWithErrorHandling(cbs[i], vm, args, vm, info);\n      }\n    }\n    return vm\n  };\n}\n\n/*  */\n\nvar activeInstance = null;\nvar isUpdatingChildComponent = false;\n\nfunction setActiveInstance(vm) {\n  var prevActiveInstance = activeInstance;\n  activeInstance = vm;\n  return function () {\n    activeInstance = prevActiveInstance;\n  }\n}\n\nfunction initLifecycle (vm) {\n  var options = vm.$options;\n\n  // locate first non-abstract parent\n  var parent = options.parent;\n  if (parent && !options.abstract) {\n    while (parent.$options.abstract && parent.$parent) {\n      parent = parent.$parent;\n    }\n    parent.$children.push(vm);\n  }\n\n  vm.$parent = parent;\n  vm.$root = parent ? parent.$root : vm;\n\n  vm.$children = [];\n  vm.$refs = {};\n\n  vm._watcher = null;\n  vm._inactive = null;\n  vm._directInactive = false;\n  vm._isMounted = false;\n  vm._isDestroyed = false;\n  vm._isBeingDestroyed = false;\n}\n\nfunction lifecycleMixin (Vue) {\n  Vue.prototype._update = function (vnode, hydrating) {\n    var vm = this;\n    var prevEl = vm.$el;\n    var prevVnode = vm._vnode;\n    var restoreActiveInstance = setActiveInstance(vm);\n    vm._vnode = vnode;\n    // Vue.prototype.__patch__ is injected in entry points\n    // based on the rendering backend used.\n    if (!prevVnode) {\n      // initial render\n      vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);\n    } else {\n      // updates\n      vm.$el = vm.__patch__(prevVnode, vnode);\n    }\n    restoreActiveInstance();\n    // update __vue__ reference\n    if (prevEl) {\n      prevEl.__vue__ = null;\n    }\n    if (vm.$el) {\n      vm.$el.__vue__ = vm;\n    }\n    // if parent is an HOC, update its $el as well\n    if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\n      vm.$parent.$el = vm.$el;\n    }\n    // updated hook is called by the scheduler to ensure that children are\n    // updated in a parent's updated hook.\n  };\n\n  Vue.prototype.$forceUpdate = function () {\n    var vm = this;\n    if (vm._watcher) {\n      vm._watcher.update();\n    }\n  };\n\n  Vue.prototype.$destroy = function () {\n    var vm = this;\n    if (vm._isBeingDestroyed) {\n      return\n    }\n    callHook(vm, 'beforeDestroy');\n    vm._isBeingDestroyed = true;\n    // remove self from parent\n    var parent = vm.$parent;\n    if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\n      remove(parent.$children, vm);\n    }\n    // teardown watchers\n    if (vm._watcher) {\n      vm._watcher.teardown();\n    }\n    var i = vm._watchers.length;\n    while (i--) {\n      vm._watchers[i].teardown();\n    }\n    // remove reference from data ob\n    // frozen object may not have observer.\n    if (vm._data.__ob__) {\n      vm._data.__ob__.vmCount--;\n    }\n    // call the last hook...\n    vm._isDestroyed = true;\n    // invoke destroy hooks on current rendered tree\n    vm.__patch__(vm._vnode, null);\n    // fire destroyed hook\n    callHook(vm, 'destroyed');\n    // turn off all instance listeners.\n    vm.$off();\n    // remove __vue__ reference\n    if (vm.$el) {\n      vm.$el.__vue__ = null;\n    }\n    // release circular reference (#6759)\n    if (vm.$vnode) {\n      vm.$vnode.parent = null;\n    }\n  };\n}\n\nfunction updateChildComponent (\n  vm,\n  propsData,\n  listeners,\n  parentVnode,\n  renderChildren\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    isUpdatingChildComponent = true;\n  }\n\n  // determine whether component has slot children\n  // we need to do this before overwriting $options._renderChildren.\n\n  // check if there are dynamic scopedSlots (hand-written or compiled but with\n  // dynamic slot names). Static scoped slots compiled from template has the\n  // \"$stable\" marker.\n  var newScopedSlots = parentVnode.data.scopedSlots;\n  var oldScopedSlots = vm.$scopedSlots;\n  var hasDynamicScopedSlot = !!(\n    (newScopedSlots && !newScopedSlots.$stable) ||\n    (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||\n    (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)\n  );\n\n  // Any static slot children from the parent may have changed during parent's\n  // update. Dynamic scoped slots may also have changed. In such cases, a forced\n  // update is necessary to ensure correctness.\n  var needsForceUpdate = !!(\n    renderChildren ||               // has new static slots\n    vm.$options._renderChildren ||  // has old static slots\n    hasDynamicScopedSlot\n  );\n\n  vm.$options._parentVnode = parentVnode;\n  vm.$vnode = parentVnode; // update vm's placeholder node without re-render\n\n  if (vm._vnode) { // update child tree's parent\n    vm._vnode.parent = parentVnode;\n  }\n  vm.$options._renderChildren = renderChildren;\n\n  // update $attrs and $listeners hash\n  // these are also reactive so they may trigger child update if the child\n  // used them during render\n  vm.$attrs = parentVnode.data.attrs || emptyObject;\n  vm.$listeners = listeners || emptyObject;\n\n  // update props\n  if (propsData && vm.$options.props) {\n    toggleObserving(false);\n    var props = vm._props;\n    var propKeys = vm.$options._propKeys || [];\n    for (var i = 0; i < propKeys.length; i++) {\n      var key = propKeys[i];\n      var propOptions = vm.$options.props; // wtf flow?\n      props[key] = validateProp(key, propOptions, propsData, vm);\n    }\n    toggleObserving(true);\n    // keep a copy of raw propsData\n    vm.$options.propsData = propsData;\n  }\n\n  // update listeners\n  listeners = listeners || emptyObject;\n  var oldListeners = vm.$options._parentListeners;\n  vm.$options._parentListeners = listeners;\n  updateComponentListeners(vm, listeners, oldListeners);\n\n  // resolve slots + force update if has children\n  if (needsForceUpdate) {\n    vm.$slots = resolveSlots(renderChildren, parentVnode.context);\n    vm.$forceUpdate();\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    isUpdatingChildComponent = false;\n  }\n}\n\nfunction isInInactiveTree (vm) {\n  while (vm && (vm = vm.$parent)) {\n    if (vm._inactive) { return true }\n  }\n  return false\n}\n\nfunction activateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = false;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  } else if (vm._directInactive) {\n    return\n  }\n  if (vm._inactive || vm._inactive === null) {\n    vm._inactive = false;\n    for (var i = 0; i < vm.$children.length; i++) {\n      activateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'activated');\n  }\n}\n\nfunction deactivateChildComponent (vm, direct) {\n  if (direct) {\n    vm._directInactive = true;\n    if (isInInactiveTree(vm)) {\n      return\n    }\n  }\n  if (!vm._inactive) {\n    vm._inactive = true;\n    for (var i = 0; i < vm.$children.length; i++) {\n      deactivateChildComponent(vm.$children[i]);\n    }\n    callHook(vm, 'deactivated');\n  }\n}\n\nfunction callHook (vm, hook) {\n  // #7573 disable dep collection when invoking lifecycle hooks\n  pushTarget();\n  var handlers = vm.$options[hook];\n  var info = hook + \" hook\";\n  if (handlers) {\n    for (var i = 0, j = handlers.length; i < j; i++) {\n      invokeWithErrorHandling(handlers[i], vm, null, vm, info);\n    }\n  }\n  if (vm._hasHookEvent) {\n    vm.$emit('hook:' + hook);\n  }\n  popTarget();\n}\n\n/*  */\n\nvar MAX_UPDATE_COUNT = 100;\n\nvar queue = [];\nvar activatedChildren = [];\nvar has = {};\nvar circular = {};\nvar waiting = false;\nvar flushing = false;\nvar index = 0;\n\n/**\n * Reset the scheduler's state.\n */\nfunction resetSchedulerState () {\n  index = queue.length = activatedChildren.length = 0;\n  has = {};\n  if (process.env.NODE_ENV !== 'production') {\n    circular = {};\n  }\n  waiting = flushing = false;\n}\n\n// Async edge case #6566 requires saving the timestamp when event listeners are\n// attached. However, calling performance.now() has a perf overhead especially\n// if the page has thousands of event listeners. Instead, we take a timestamp\n// every time the scheduler flushes and use that for all event listeners\n// attached during that flush.\nvar currentFlushTimestamp = 0;\n\n// Async edge case fix requires storing an event listener's attach timestamp.\nvar getNow = Date.now;\n\n// Determine what event timestamp the browser is using. Annoyingly, the\n// timestamp can either be hi-res (relative to page load) or low-res\n// (relative to UNIX epoch), so in order to compare time we have to use the\n// same timestamp type when saving the flush timestamp.\n// All IE versions use low-res event timestamps, and have problematic clock\n// implementations (#9632)\nif (inBrowser && !isIE) {\n  var performance = window.performance;\n  if (\n    performance &&\n    typeof performance.now === 'function' &&\n    getNow() > document.createEvent('Event').timeStamp\n  ) {\n    // if the event timestamp, although evaluated AFTER the Date.now(), is\n    // smaller than it, it means the event is using a hi-res timestamp,\n    // and we need to use the hi-res version for event listener timestamps as\n    // well.\n    getNow = function () { return performance.now(); };\n  }\n}\n\n/**\n * Flush both queues and run the watchers.\n */\nfunction flushSchedulerQueue () {\n  currentFlushTimestamp = getNow();\n  flushing = true;\n  var watcher, id;\n\n  // Sort queue before flush.\n  // This ensures that:\n  // 1. Components are updated from parent to child. (because parent is always\n  //    created before the child)\n  // 2. A component's user watchers are run before its render watcher (because\n  //    user watchers are created before the render watcher)\n  // 3. If a component is destroyed during a parent component's watcher run,\n  //    its watchers can be skipped.\n  queue.sort(function (a, b) { return a.id - b.id; });\n\n  // do not cache length because more watchers might be pushed\n  // as we run existing watchers\n  for (index = 0; index < queue.length; index++) {\n    watcher = queue[index];\n    if (watcher.before) {\n      watcher.before();\n    }\n    id = watcher.id;\n    has[id] = null;\n    watcher.run();\n    // in dev build, check and stop circular updates.\n    if (process.env.NODE_ENV !== 'production' && has[id] != null) {\n      circular[id] = (circular[id] || 0) + 1;\n      if (circular[id] > MAX_UPDATE_COUNT) {\n        warn(\n          'You may have an infinite update loop ' + (\n            watcher.user\n              ? (\"in watcher with expression \\\"\" + (watcher.expression) + \"\\\"\")\n              : \"in a component render function.\"\n          ),\n          watcher.vm\n        );\n        break\n      }\n    }\n  }\n\n  // keep copies of post queues before resetting state\n  var activatedQueue = activatedChildren.slice();\n  var updatedQueue = queue.slice();\n\n  resetSchedulerState();\n\n  // call component updated and activated hooks\n  callActivatedHooks(activatedQueue);\n  callUpdatedHooks(updatedQueue);\n\n  // devtool hook\n  /* istanbul ignore if */\n  if (devtools && config.devtools) {\n    devtools.emit('flush');\n  }\n}\n\nfunction callUpdatedHooks (queue) {\n  var i = queue.length;\n  while (i--) {\n    var watcher = queue[i];\n    var vm = watcher.vm;\n    if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {\n      callHook(vm, 'updated');\n    }\n  }\n}\n\n/**\n * Queue a kept-alive component that was activated during patch.\n * The queue will be processed after the entire tree has been patched.\n */\nfunction queueActivatedComponent (vm) {\n  // setting _inactive to false here so that a render function can\n  // rely on checking whether it's in an inactive tree (e.g. router-view)\n  vm._inactive = false;\n  activatedChildren.push(vm);\n}\n\nfunction callActivatedHooks (queue) {\n  for (var i = 0; i < queue.length; i++) {\n    queue[i]._inactive = true;\n    activateChildComponent(queue[i], true /* true */);\n  }\n}\n\n/**\n * Push a watcher into the watcher queue.\n * Jobs with duplicate IDs will be skipped unless it's\n * pushed when the queue is being flushed.\n */\nfunction queueWatcher (watcher) {\n  var id = watcher.id;\n  if (has[id] == null) {\n    has[id] = true;\n    if (!flushing) {\n      queue.push(watcher);\n    } else {\n      // if already flushing, splice the watcher based on its id\n      // if already past its id, it will be run next immediately.\n      var i = queue.length - 1;\n      while (i > index && queue[i].id > watcher.id) {\n        i--;\n      }\n      queue.splice(i + 1, 0, watcher);\n    }\n    // queue the flush\n    if (!waiting) {\n      waiting = true;\n\n      if (process.env.NODE_ENV !== 'production' && !config.async) {\n        flushSchedulerQueue();\n        return\n      }\n      nextTick(flushSchedulerQueue);\n    }\n  }\n}\n\n/*  */\n\n\n\nvar uid$2 = 0;\n\n/**\n * A watcher parses an expression, collects dependencies,\n * and fires callback when the expression value changes.\n * This is used for both the $watch() api and directives.\n */\nvar Watcher = function Watcher (\n  vm,\n  expOrFn,\n  cb,\n  options,\n  isRenderWatcher\n) {\n  this.vm = vm;\n  if (isRenderWatcher) {\n    vm._watcher = this;\n  }\n  vm._watchers.push(this);\n  // options\n  if (options) {\n    this.deep = !!options.deep;\n    this.user = !!options.user;\n    this.lazy = !!options.lazy;\n    this.sync = !!options.sync;\n    this.before = options.before;\n  } else {\n    this.deep = this.user = this.lazy = this.sync = false;\n  }\n  this.cb = cb;\n  this.id = ++uid$2; // uid for batching\n  this.active = true;\n  this.dirty = this.lazy; // for lazy watchers\n  this.deps = [];\n  this.newDeps = [];\n  this.depIds = new _Set();\n  this.newDepIds = new _Set();\n  this.expression = process.env.NODE_ENV !== 'production'\n    ? expOrFn.toString()\n    : '';\n  // parse expression for getter\n  if (typeof expOrFn === 'function') {\n    this.getter = expOrFn;\n  } else {\n    this.getter = parsePath(expOrFn);\n    if (!this.getter) {\n      this.getter = noop;\n      process.env.NODE_ENV !== 'production' && warn(\n        \"Failed watching path: \\\"\" + expOrFn + \"\\\" \" +\n        'Watcher only accepts simple dot-delimited paths. ' +\n        'For full control, use a function instead.',\n        vm\n      );\n    }\n  }\n  this.value = this.lazy\n    ? undefined\n    : this.get();\n};\n\n/**\n * Evaluate the getter, and re-collect dependencies.\n */\nWatcher.prototype.get = function get () {\n  pushTarget(this);\n  var value;\n  var vm = this.vm;\n  try {\n    value = this.getter.call(vm, vm);\n  } catch (e) {\n    if (this.user) {\n      handleError(e, vm, (\"getter for watcher \\\"\" + (this.expression) + \"\\\"\"));\n    } else {\n      throw e\n    }\n  } finally {\n    // \"touch\" every property so they are all tracked as\n    // dependencies for deep watching\n    if (this.deep) {\n      traverse(value);\n    }\n    popTarget();\n    this.cleanupDeps();\n  }\n  return value\n};\n\n/**\n * Add a dependency to this directive.\n */\nWatcher.prototype.addDep = function addDep (dep) {\n  var id = dep.id;\n  if (!this.newDepIds.has(id)) {\n    this.newDepIds.add(id);\n    this.newDeps.push(dep);\n    if (!this.depIds.has(id)) {\n      dep.addSub(this);\n    }\n  }\n};\n\n/**\n * Clean up for dependency collection.\n */\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\n  var i = this.deps.length;\n  while (i--) {\n    var dep = this.deps[i];\n    if (!this.newDepIds.has(dep.id)) {\n      dep.removeSub(this);\n    }\n  }\n  var tmp = this.depIds;\n  this.depIds = this.newDepIds;\n  this.newDepIds = tmp;\n  this.newDepIds.clear();\n  tmp = this.deps;\n  this.deps = this.newDeps;\n  this.newDeps = tmp;\n  this.newDeps.length = 0;\n};\n\n/**\n * Subscriber interface.\n * Will be called when a dependency changes.\n */\nWatcher.prototype.update = function update () {\n  /* istanbul ignore else */\n  if (this.lazy) {\n    this.dirty = true;\n  } else if (this.sync) {\n    this.run();\n  } else {\n    queueWatcher(this);\n  }\n};\n\n/**\n * Scheduler job interface.\n * Will be called by the scheduler.\n */\nWatcher.prototype.run = function run () {\n  if (this.active) {\n    var value = this.get();\n    if (\n      value !== this.value ||\n      // Deep watchers and watchers on Object/Arrays should fire even\n      // when the value is the same, because the value may\n      // have mutated.\n      isObject(value) ||\n      this.deep\n    ) {\n      // set new value\n      var oldValue = this.value;\n      this.value = value;\n      if (this.user) {\n        try {\n          this.cb.call(this.vm, value, oldValue);\n        } catch (e) {\n          handleError(e, this.vm, (\"callback for watcher \\\"\" + (this.expression) + \"\\\"\"));\n        }\n      } else {\n        this.cb.call(this.vm, value, oldValue);\n      }\n    }\n  }\n};\n\n/**\n * Evaluate the value of the watcher.\n * This only gets called for lazy watchers.\n */\nWatcher.prototype.evaluate = function evaluate () {\n  this.value = this.get();\n  this.dirty = false;\n};\n\n/**\n * Depend on all deps collected by this watcher.\n */\nWatcher.prototype.depend = function depend () {\n  var i = this.deps.length;\n  while (i--) {\n    this.deps[i].depend();\n  }\n};\n\n/**\n * Remove self from all dependencies' subscriber list.\n */\nWatcher.prototype.teardown = function teardown () {\n  if (this.active) {\n    // remove self from vm's watcher list\n    // this is a somewhat expensive operation so we skip it\n    // if the vm is being destroyed.\n    if (!this.vm._isBeingDestroyed) {\n      remove(this.vm._watchers, this);\n    }\n    var i = this.deps.length;\n    while (i--) {\n      this.deps[i].removeSub(this);\n    }\n    this.active = false;\n  }\n};\n\n/*  */\n\nvar sharedPropertyDefinition = {\n  enumerable: true,\n  configurable: true,\n  get: noop,\n  set: noop\n};\n\nfunction proxy (target, sourceKey, key) {\n  sharedPropertyDefinition.get = function proxyGetter () {\n    return this[sourceKey][key]\n  };\n  sharedPropertyDefinition.set = function proxySetter (val) {\n    this[sourceKey][key] = val;\n  };\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction initState (vm) {\n  vm._watchers = [];\n  var opts = vm.$options;\n  if (opts.props) { initProps(vm, opts.props); }\n  if (opts.methods) { initMethods(vm, opts.methods); }\n  if (opts.data) {\n    initData(vm);\n  } else {\n    observe(vm._data = {}, true /* asRootData */);\n  }\n  if (opts.computed) { initComputed(vm, opts.computed); }\n  if (opts.watch && opts.watch !== nativeWatch) {\n    initWatch(vm, opts.watch);\n  }\n}\n\nfunction initProps (vm, propsOptions) {\n  var propsData = vm.$options.propsData || {};\n  var props = vm._props = {};\n  // cache prop keys so that future props updates can iterate using Array\n  // instead of dynamic object key enumeration.\n  var keys = vm.$options._propKeys = [];\n  var isRoot = !vm.$parent;\n  // root instance props should be converted\n  if (!isRoot) {\n    toggleObserving(false);\n  }\n  var loop = function ( key ) {\n    keys.push(key);\n    var value = validateProp(key, propsOptions, propsData, vm);\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      var hyphenatedKey = hyphenate(key);\n      if (isReservedAttribute(hyphenatedKey) ||\n          config.isReservedAttr(hyphenatedKey)) {\n        warn(\n          (\"\\\"\" + hyphenatedKey + \"\\\" is a reserved attribute and cannot be used as component prop.\"),\n          vm\n        );\n      }\n      defineReactive$$1(props, key, value, function () {\n        if (!isRoot && !isUpdatingChildComponent) {\n          {\n            if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn\n                return\n            }\n            //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警\n            if(\n                key === 'value' && \n                Array.isArray(vm.$options.behaviors) &&\n                vm.$options.behaviors.indexOf('uni://form-field') !== -1\n              ){\n              return\n            }\n            if(vm._getFormData){\n              return\n            }\n            var $parent = vm.$parent;\n            while($parent){\n              if($parent.__next_tick_pending){\n                return  \n              }\n              $parent = $parent.$parent;\n            }\n          }\n          warn(\n            \"Avoid mutating a prop directly since the value will be \" +\n            \"overwritten whenever the parent component re-renders. \" +\n            \"Instead, use a data or computed property based on the prop's \" +\n            \"value. Prop being mutated: \\\"\" + key + \"\\\"\",\n            vm\n          );\n        }\n      });\n    } else {\n      defineReactive$$1(props, key, value);\n    }\n    // static props are already proxied on the component's prototype\n    // during Vue.extend(). We only need to proxy props defined at\n    // instantiation here.\n    if (!(key in vm)) {\n      proxy(vm, \"_props\", key);\n    }\n  };\n\n  for (var key in propsOptions) loop( key );\n  toggleObserving(true);\n}\n\nfunction initData (vm) {\n  var data = vm.$options.data;\n  data = vm._data = typeof data === 'function'\n    ? getData(data, vm)\n    : data || {};\n  if (!isPlainObject(data)) {\n    data = {};\n    process.env.NODE_ENV !== 'production' && warn(\n      'data functions should return an object:\\n' +\n      'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\n      vm\n    );\n  }\n  // proxy data on instance\n  var keys = Object.keys(data);\n  var props = vm.$options.props;\n  var methods = vm.$options.methods;\n  var i = keys.length;\n  while (i--) {\n    var key = keys[i];\n    if (process.env.NODE_ENV !== 'production') {\n      if (methods && hasOwn(methods, key)) {\n        warn(\n          (\"Method \\\"\" + key + \"\\\" has already been defined as a data property.\"),\n          vm\n        );\n      }\n    }\n    if (props && hasOwn(props, key)) {\n      process.env.NODE_ENV !== 'production' && warn(\n        \"The data property \\\"\" + key + \"\\\" is already declared as a prop. \" +\n        \"Use prop default value instead.\",\n        vm\n      );\n    } else if (!isReserved(key)) {\n      proxy(vm, \"_data\", key);\n    }\n  }\n  // observe data\n  observe(data, true /* asRootData */);\n}\n\nfunction getData (data, vm) {\n  // #7573 disable dep collection when invoking data getters\n  pushTarget();\n  try {\n    return data.call(vm, vm)\n  } catch (e) {\n    handleError(e, vm, \"data()\");\n    return {}\n  } finally {\n    popTarget();\n  }\n}\n\nvar computedWatcherOptions = { lazy: true };\n\nfunction initComputed (vm, computed) {\n  // $flow-disable-line\n  var watchers = vm._computedWatchers = Object.create(null);\n  // computed properties are just getters during SSR\n  var isSSR = isServerRendering();\n\n  for (var key in computed) {\n    var userDef = computed[key];\n    var getter = typeof userDef === 'function' ? userDef : userDef.get;\n    if (process.env.NODE_ENV !== 'production' && getter == null) {\n      warn(\n        (\"Getter is missing for computed property \\\"\" + key + \"\\\".\"),\n        vm\n      );\n    }\n\n    if (!isSSR) {\n      // create internal watcher for the computed property.\n      watchers[key] = new Watcher(\n        vm,\n        getter || noop,\n        noop,\n        computedWatcherOptions\n      );\n    }\n\n    // component-defined computed properties are already defined on the\n    // component prototype. We only need to define computed properties defined\n    // at instantiation here.\n    if (!(key in vm)) {\n      defineComputed(vm, key, userDef);\n    } else if (process.env.NODE_ENV !== 'production') {\n      if (key in vm.$data) {\n        warn((\"The computed property \\\"\" + key + \"\\\" is already defined in data.\"), vm);\n      } else if (vm.$options.props && key in vm.$options.props) {\n        warn((\"The computed property \\\"\" + key + \"\\\" is already defined as a prop.\"), vm);\n      }\n    }\n  }\n}\n\nfunction defineComputed (\n  target,\n  key,\n  userDef\n) {\n  var shouldCache = !isServerRendering();\n  if (typeof userDef === 'function') {\n    sharedPropertyDefinition.get = shouldCache\n      ? createComputedGetter(key)\n      : createGetterInvoker(userDef);\n    sharedPropertyDefinition.set = noop;\n  } else {\n    sharedPropertyDefinition.get = userDef.get\n      ? shouldCache && userDef.cache !== false\n        ? createComputedGetter(key)\n        : createGetterInvoker(userDef.get)\n      : noop;\n    sharedPropertyDefinition.set = userDef.set || noop;\n  }\n  if (process.env.NODE_ENV !== 'production' &&\n      sharedPropertyDefinition.set === noop) {\n    sharedPropertyDefinition.set = function () {\n      warn(\n        (\"Computed property \\\"\" + key + \"\\\" was assigned to but it has no setter.\"),\n        this\n      );\n    };\n  }\n  Object.defineProperty(target, key, sharedPropertyDefinition);\n}\n\nfunction createComputedGetter (key) {\n  return function computedGetter () {\n    var watcher = this._computedWatchers && this._computedWatchers[key];\n    if (watcher) {\n      if (watcher.dirty) {\n        watcher.evaluate();\n      }\n      if (Dep.SharedObject.target) {// fixed by xxxxxx\n        watcher.depend();\n      }\n      return watcher.value\n    }\n  }\n}\n\nfunction createGetterInvoker(fn) {\n  return function computedGetter () {\n    return fn.call(this, this)\n  }\n}\n\nfunction initMethods (vm, methods) {\n  var props = vm.$options.props;\n  for (var key in methods) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (typeof methods[key] !== 'function') {\n        warn(\n          \"Method \\\"\" + key + \"\\\" has type \\\"\" + (typeof methods[key]) + \"\\\" in the component definition. \" +\n          \"Did you reference the function correctly?\",\n          vm\n        );\n      }\n      if (props && hasOwn(props, key)) {\n        warn(\n          (\"Method \\\"\" + key + \"\\\" has already been defined as a prop.\"),\n          vm\n        );\n      }\n      if ((key in vm) && isReserved(key)) {\n        warn(\n          \"Method \\\"\" + key + \"\\\" conflicts with an existing Vue instance method. \" +\n          \"Avoid defining component methods that start with _ or $.\"\n        );\n      }\n    }\n    vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);\n  }\n}\n\nfunction initWatch (vm, watch) {\n  for (var key in watch) {\n    var handler = watch[key];\n    if (Array.isArray(handler)) {\n      for (var i = 0; i < handler.length; i++) {\n        createWatcher(vm, key, handler[i]);\n      }\n    } else {\n      createWatcher(vm, key, handler);\n    }\n  }\n}\n\nfunction createWatcher (\n  vm,\n  expOrFn,\n  handler,\n  options\n) {\n  if (isPlainObject(handler)) {\n    options = handler;\n    handler = handler.handler;\n  }\n  if (typeof handler === 'string') {\n    handler = vm[handler];\n  }\n  return vm.$watch(expOrFn, handler, options)\n}\n\nfunction stateMixin (Vue) {\n  // flow somehow has problems with directly declared definition object\n  // when using Object.defineProperty, so we have to procedurally build up\n  // the object here.\n  var dataDef = {};\n  dataDef.get = function () { return this._data };\n  var propsDef = {};\n  propsDef.get = function () { return this._props };\n  if (process.env.NODE_ENV !== 'production') {\n    dataDef.set = function () {\n      warn(\n        'Avoid replacing instance root $data. ' +\n        'Use nested data properties instead.',\n        this\n      );\n    };\n    propsDef.set = function () {\n      warn(\"$props is readonly.\", this);\n    };\n  }\n  Object.defineProperty(Vue.prototype, '$data', dataDef);\n  Object.defineProperty(Vue.prototype, '$props', propsDef);\n\n  Vue.prototype.$set = set;\n  Vue.prototype.$delete = del;\n\n  Vue.prototype.$watch = function (\n    expOrFn,\n    cb,\n    options\n  ) {\n    var vm = this;\n    if (isPlainObject(cb)) {\n      return createWatcher(vm, expOrFn, cb, options)\n    }\n    options = options || {};\n    options.user = true;\n    var watcher = new Watcher(vm, expOrFn, cb, options);\n    if (options.immediate) {\n      try {\n        cb.call(vm, watcher.value);\n      } catch (error) {\n        handleError(error, vm, (\"callback for immediate watcher \\\"\" + (watcher.expression) + \"\\\"\"));\n      }\n    }\n    return function unwatchFn () {\n      watcher.teardown();\n    }\n  };\n}\n\n/*  */\n\nvar uid$3 = 0;\n\nfunction initMixin (Vue) {\n  Vue.prototype._init = function (options) {\n    var vm = this;\n    // a uid\n    vm._uid = uid$3++;\n\n    var startTag, endTag;\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      startTag = \"vue-perf-start:\" + (vm._uid);\n      endTag = \"vue-perf-end:\" + (vm._uid);\n      mark(startTag);\n    }\n\n    // a flag to avoid this being observed\n    vm._isVue = true;\n    // merge options\n    if (options && options._isComponent) {\n      // optimize internal component instantiation\n      // since dynamic options merging is pretty slow, and none of the\n      // internal component options needs special treatment.\n      initInternalComponent(vm, options);\n    } else {\n      vm.$options = mergeOptions(\n        resolveConstructorOptions(vm.constructor),\n        options || {},\n        vm\n      );\n    }\n    /* istanbul ignore else */\n    if (process.env.NODE_ENV !== 'production') {\n      initProxy(vm);\n    } else {\n      vm._renderProxy = vm;\n    }\n    // expose real self\n    vm._self = vm;\n    initLifecycle(vm);\n    initEvents(vm);\n    initRender(vm);\n    callHook(vm, 'beforeCreate');\n    vm.mpHost !== 'mp-toutiao' && initInjections(vm); // resolve injections before data/props  \n    initState(vm);\n    vm.mpHost !== 'mp-toutiao' && initProvide(vm); // resolve provide after data/props\n    vm.mpHost !== 'mp-toutiao' && callHook(vm, 'created');      \n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n      vm._name = formatComponentName(vm, false);\n      mark(endTag);\n      measure((\"vue \" + (vm._name) + \" init\"), startTag, endTag);\n    }\n\n    if (vm.$options.el) {\n      vm.$mount(vm.$options.el);\n    }\n  };\n}\n\nfunction initInternalComponent (vm, options) {\n  var opts = vm.$options = Object.create(vm.constructor.options);\n  // doing this because it's faster than dynamic enumeration.\n  var parentVnode = options._parentVnode;\n  opts.parent = options.parent;\n  opts._parentVnode = parentVnode;\n\n  var vnodeComponentOptions = parentVnode.componentOptions;\n  opts.propsData = vnodeComponentOptions.propsData;\n  opts._parentListeners = vnodeComponentOptions.listeners;\n  opts._renderChildren = vnodeComponentOptions.children;\n  opts._componentTag = vnodeComponentOptions.tag;\n\n  if (options.render) {\n    opts.render = options.render;\n    opts.staticRenderFns = options.staticRenderFns;\n  }\n}\n\nfunction resolveConstructorOptions (Ctor) {\n  var options = Ctor.options;\n  if (Ctor.super) {\n    var superOptions = resolveConstructorOptions(Ctor.super);\n    var cachedSuperOptions = Ctor.superOptions;\n    if (superOptions !== cachedSuperOptions) {\n      // super option changed,\n      // need to resolve new options.\n      Ctor.superOptions = superOptions;\n      // check if there are any late-modified/attached options (#4976)\n      var modifiedOptions = resolveModifiedOptions(Ctor);\n      // update base extend options\n      if (modifiedOptions) {\n        extend(Ctor.extendOptions, modifiedOptions);\n      }\n      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);\n      if (options.name) {\n        options.components[options.name] = Ctor;\n      }\n    }\n  }\n  return options\n}\n\nfunction resolveModifiedOptions (Ctor) {\n  var modified;\n  var latest = Ctor.options;\n  var sealed = Ctor.sealedOptions;\n  for (var key in latest) {\n    if (latest[key] !== sealed[key]) {\n      if (!modified) { modified = {}; }\n      modified[key] = latest[key];\n    }\n  }\n  return modified\n}\n\nfunction Vue (options) {\n  if (process.env.NODE_ENV !== 'production' &&\n    !(this instanceof Vue)\n  ) {\n    warn('Vue is a constructor and should be called with the `new` keyword');\n  }\n  this._init(options);\n}\n\ninitMixin(Vue);\nstateMixin(Vue);\neventsMixin(Vue);\nlifecycleMixin(Vue);\nrenderMixin(Vue);\n\n/*  */\n\nfunction initUse (Vue) {\n  Vue.use = function (plugin) {\n    var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));\n    if (installedPlugins.indexOf(plugin) > -1) {\n      return this\n    }\n\n    // additional parameters\n    var args = toArray(arguments, 1);\n    args.unshift(this);\n    if (typeof plugin.install === 'function') {\n      plugin.install.apply(plugin, args);\n    } else if (typeof plugin === 'function') {\n      plugin.apply(null, args);\n    }\n    installedPlugins.push(plugin);\n    return this\n  };\n}\n\n/*  */\n\nfunction initMixin$1 (Vue) {\n  Vue.mixin = function (mixin) {\n    this.options = mergeOptions(this.options, mixin);\n    return this\n  };\n}\n\n/*  */\n\nfunction initExtend (Vue) {\n  /**\n   * Each instance constructor, including Vue, has a unique\n   * cid. This enables us to create wrapped \"child\n   * constructors\" for prototypal inheritance and cache them.\n   */\n  Vue.cid = 0;\n  var cid = 1;\n\n  /**\n   * Class inheritance\n   */\n  Vue.extend = function (extendOptions) {\n    extendOptions = extendOptions || {};\n    var Super = this;\n    var SuperId = Super.cid;\n    var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\n    if (cachedCtors[SuperId]) {\n      return cachedCtors[SuperId]\n    }\n\n    var name = extendOptions.name || Super.options.name;\n    if (process.env.NODE_ENV !== 'production' && name) {\n      validateComponentName(name);\n    }\n\n    var Sub = function VueComponent (options) {\n      this._init(options);\n    };\n    Sub.prototype = Object.create(Super.prototype);\n    Sub.prototype.constructor = Sub;\n    Sub.cid = cid++;\n    Sub.options = mergeOptions(\n      Super.options,\n      extendOptions\n    );\n    Sub['super'] = Super;\n\n    // For props and computed properties, we define the proxy getters on\n    // the Vue instances at extension time, on the extended prototype. This\n    // avoids Object.defineProperty calls for each instance created.\n    if (Sub.options.props) {\n      initProps$1(Sub);\n    }\n    if (Sub.options.computed) {\n      initComputed$1(Sub);\n    }\n\n    // allow further extension/mixin/plugin usage\n    Sub.extend = Super.extend;\n    Sub.mixin = Super.mixin;\n    Sub.use = Super.use;\n\n    // create asset registers, so extended classes\n    // can have their private assets too.\n    ASSET_TYPES.forEach(function (type) {\n      Sub[type] = Super[type];\n    });\n    // enable recursive self-lookup\n    if (name) {\n      Sub.options.components[name] = Sub;\n    }\n\n    // keep a reference to the super options at extension time.\n    // later at instantiation we can check if Super's options have\n    // been updated.\n    Sub.superOptions = Super.options;\n    Sub.extendOptions = extendOptions;\n    Sub.sealedOptions = extend({}, Sub.options);\n\n    // cache constructor\n    cachedCtors[SuperId] = Sub;\n    return Sub\n  };\n}\n\nfunction initProps$1 (Comp) {\n  var props = Comp.options.props;\n  for (var key in props) {\n    proxy(Comp.prototype, \"_props\", key);\n  }\n}\n\nfunction initComputed$1 (Comp) {\n  var computed = Comp.options.computed;\n  for (var key in computed) {\n    defineComputed(Comp.prototype, key, computed[key]);\n  }\n}\n\n/*  */\n\nfunction initAssetRegisters (Vue) {\n  /**\n   * Create asset registration methods.\n   */\n  ASSET_TYPES.forEach(function (type) {\n    Vue[type] = function (\n      id,\n      definition\n    ) {\n      if (!definition) {\n        return this.options[type + 's'][id]\n      } else {\n        /* istanbul ignore if */\n        if (process.env.NODE_ENV !== 'production' && type === 'component') {\n          validateComponentName(id);\n        }\n        if (type === 'component' && isPlainObject(definition)) {\n          definition.name = definition.name || id;\n          definition = this.options._base.extend(definition);\n        }\n        if (type === 'directive' && typeof definition === 'function') {\n          definition = { bind: definition, update: definition };\n        }\n        this.options[type + 's'][id] = definition;\n        return definition\n      }\n    };\n  });\n}\n\n/*  */\n\n\n\nfunction getComponentName (opts) {\n  return opts && (opts.Ctor.options.name || opts.tag)\n}\n\nfunction matches (pattern, name) {\n  if (Array.isArray(pattern)) {\n    return pattern.indexOf(name) > -1\n  } else if (typeof pattern === 'string') {\n    return pattern.split(',').indexOf(name) > -1\n  } else if (isRegExp(pattern)) {\n    return pattern.test(name)\n  }\n  /* istanbul ignore next */\n  return false\n}\n\nfunction pruneCache (keepAliveInstance, filter) {\n  var cache = keepAliveInstance.cache;\n  var keys = keepAliveInstance.keys;\n  var _vnode = keepAliveInstance._vnode;\n  for (var key in cache) {\n    var cachedNode = cache[key];\n    if (cachedNode) {\n      var name = getComponentName(cachedNode.componentOptions);\n      if (name && !filter(name)) {\n        pruneCacheEntry(cache, key, keys, _vnode);\n      }\n    }\n  }\n}\n\nfunction pruneCacheEntry (\n  cache,\n  key,\n  keys,\n  current\n) {\n  var cached$$1 = cache[key];\n  if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {\n    cached$$1.componentInstance.$destroy();\n  }\n  cache[key] = null;\n  remove(keys, key);\n}\n\nvar patternTypes = [String, RegExp, Array];\n\nvar KeepAlive = {\n  name: 'keep-alive',\n  abstract: true,\n\n  props: {\n    include: patternTypes,\n    exclude: patternTypes,\n    max: [String, Number]\n  },\n\n  created: function created () {\n    this.cache = Object.create(null);\n    this.keys = [];\n  },\n\n  destroyed: function destroyed () {\n    for (var key in this.cache) {\n      pruneCacheEntry(this.cache, key, this.keys);\n    }\n  },\n\n  mounted: function mounted () {\n    var this$1 = this;\n\n    this.$watch('include', function (val) {\n      pruneCache(this$1, function (name) { return matches(val, name); });\n    });\n    this.$watch('exclude', function (val) {\n      pruneCache(this$1, function (name) { return !matches(val, name); });\n    });\n  },\n\n  render: function render () {\n    var slot = this.$slots.default;\n    var vnode = getFirstComponentChild(slot);\n    var componentOptions = vnode && vnode.componentOptions;\n    if (componentOptions) {\n      // check pattern\n      var name = getComponentName(componentOptions);\n      var ref = this;\n      var include = ref.include;\n      var exclude = ref.exclude;\n      if (\n        // not included\n        (include && (!name || !matches(include, name))) ||\n        // excluded\n        (exclude && name && matches(exclude, name))\n      ) {\n        return vnode\n      }\n\n      var ref$1 = this;\n      var cache = ref$1.cache;\n      var keys = ref$1.keys;\n      var key = vnode.key == null\n        // same constructor may get registered as different local components\n        // so cid alone is not enough (#3269)\n        ? componentOptions.Ctor.cid + (componentOptions.tag ? (\"::\" + (componentOptions.tag)) : '')\n        : vnode.key;\n      if (cache[key]) {\n        vnode.componentInstance = cache[key].componentInstance;\n        // make current key freshest\n        remove(keys, key);\n        keys.push(key);\n      } else {\n        cache[key] = vnode;\n        keys.push(key);\n        // prune oldest entry\n        if (this.max && keys.length > parseInt(this.max)) {\n          pruneCacheEntry(cache, keys[0], keys, this._vnode);\n        }\n      }\n\n      vnode.data.keepAlive = true;\n    }\n    return vnode || (slot && slot[0])\n  }\n};\n\nvar builtInComponents = {\n  KeepAlive: KeepAlive\n};\n\n/*  */\n\nfunction initGlobalAPI (Vue) {\n  // config\n  var configDef = {};\n  configDef.get = function () { return config; };\n  if (process.env.NODE_ENV !== 'production') {\n    configDef.set = function () {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      );\n    };\n  }\n  Object.defineProperty(Vue, 'config', configDef);\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn: warn,\n    extend: extend,\n    mergeOptions: mergeOptions,\n    defineReactive: defineReactive$$1\n  };\n\n  Vue.set = set;\n  Vue.delete = del;\n  Vue.nextTick = nextTick;\n\n  // 2.6 explicit observable API\n  Vue.observable = function (obj) {\n    observe(obj);\n    return obj\n  };\n\n  Vue.options = Object.create(null);\n  ASSET_TYPES.forEach(function (type) {\n    Vue.options[type + 's'] = Object.create(null);\n  });\n\n  // this is used to identify the \"base\" constructor to extend all plain-object\n  // components with in Weex's multi-instance scenarios.\n  Vue.options._base = Vue;\n\n  extend(Vue.options.components, builtInComponents);\n\n  initUse(Vue);\n  initMixin$1(Vue);\n  initExtend(Vue);\n  initAssetRegisters(Vue);\n}\n\ninitGlobalAPI(Vue);\n\nObject.defineProperty(Vue.prototype, '$isServer', {\n  get: isServerRendering\n});\n\nObject.defineProperty(Vue.prototype, '$ssrContext', {\n  get: function get () {\n    /* istanbul ignore next */\n    return this.$vnode && this.$vnode.ssrContext\n  }\n});\n\n// expose FunctionalRenderContext for ssr runtime helper installation\nObject.defineProperty(Vue, 'FunctionalRenderContext', {\n  value: FunctionalRenderContext\n});\n\nVue.version = '2.6.10';\n\n/**\n * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js\n */\nvar ARRAYTYPE = '[object Array]';\nvar OBJECTTYPE = '[object Object]';\n// const FUNCTIONTYPE = '[object Function]'\n\nfunction diff(current, pre) {\n    var result = {};\n    syncKeys(current, pre);\n    _diff(current, pre, '', result);\n    return result\n}\n\nfunction syncKeys(current, pre) {\n    if (current === pre) { return }\n    var rootCurrentType = type(current);\n    var rootPreType = type(pre);\n    if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {\n        if(Object.keys(current).length >= Object.keys(pre).length){\n            for (var key in pre) {\n                var currentValue = current[key];\n                if (currentValue === undefined) {\n                    current[key] = null;\n                } else {\n                    syncKeys(currentValue, pre[key]);\n                }\n            }\n        }\n    } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {\n        if (current.length >= pre.length) {\n            pre.forEach(function (item, index) {\n                syncKeys(current[index], item);\n            });\n        }\n    }\n}\n\nfunction _diff(current, pre, path, result) {\n    if (current === pre) { return }\n    var rootCurrentType = type(current);\n    var rootPreType = type(pre);\n    if (rootCurrentType == OBJECTTYPE) {\n        if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {\n            setResult(result, path, current);\n        } else {\n            var loop = function ( key ) {\n                var currentValue = current[key];\n                var preValue = pre[key];\n                var currentType = type(currentValue);\n                var preType = type(preValue);\n                if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {\n                    if (currentValue != pre[key]) {\n                        setResult(result, (path == '' ? '' : path + \".\") + key, currentValue);\n                    }\n                } else if (currentType == ARRAYTYPE) {\n                    if (preType != ARRAYTYPE) {\n                        setResult(result, (path == '' ? '' : path + \".\") + key, currentValue);\n                    } else {\n                        if (currentValue.length < preValue.length) {\n                            setResult(result, (path == '' ? '' : path + \".\") + key, currentValue);\n                        } else {\n                            currentValue.forEach(function (item, index) {\n                                _diff(item, preValue[index], (path == '' ? '' : path + \".\") + key + '[' + index + ']', result);\n                            });\n                        }\n                    }\n                } else if (currentType == OBJECTTYPE) {\n                    if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {\n                        setResult(result, (path == '' ? '' : path + \".\") + key, currentValue);\n                    } else {\n                        for (var subKey in currentValue) {\n                            _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + \".\") + key + '.' + subKey, result);\n                        }\n                    }\n                }\n            };\n\n            for (var key in current) loop( key );\n        }\n    } else if (rootCurrentType == ARRAYTYPE) {\n        if (rootPreType != ARRAYTYPE) {\n            setResult(result, path, current);\n        } else {\n            if (current.length < pre.length) {\n                setResult(result, path, current);\n            } else {\n                current.forEach(function (item, index) {\n                    _diff(item, pre[index], path + '[' + index + ']', result);\n                });\n            }\n        }\n    } else {\n        setResult(result, path, current);\n    }\n}\n\nfunction setResult(result, k, v) {\n    // if (type(v) != FUNCTIONTYPE) {\n        result[k] = v;\n    // }\n}\n\nfunction type(obj) {\n    return Object.prototype.toString.call(obj)\n}\n\n/*  */\r\n\r\nfunction flushCallbacks$1(vm) {\r\n    if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {\r\n        if (process.env.VUE_APP_DEBUG) {\r\n            var mpInstance = vm.$scope;\r\n            console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +\r\n                ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');\r\n        }\r\n        var copies = vm.__next_tick_callbacks.slice(0);\r\n        vm.__next_tick_callbacks.length = 0;\r\n        for (var i = 0; i < copies.length; i++) {\r\n            copies[i]();\r\n        }\r\n    }\r\n}\r\n\r\nfunction hasRenderWatcher(vm) {\r\n    return queue.find(function (watcher) { return vm._watcher === watcher; })\r\n}\r\n\r\nfunction nextTick$1(vm, cb) {\r\n    //1.nextTick 之前 已 setData 且 setData 还未回调完成\r\n    //2.nextTick 之前存在 render watcher\r\n    if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {\n        if(process.env.VUE_APP_DEBUG){\n            var mpInstance = vm.$scope;\n            console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +\n                ']:nextVueTick');\n        }\r\n        return nextTick(cb, vm)\r\n    }else{\n        if(process.env.VUE_APP_DEBUG){\n            var mpInstance$1 = vm.$scope;\n            console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +\n                ']:nextMPTick');\n        }\n    }\r\n    var _resolve;\r\n    if (!vm.__next_tick_callbacks) {\r\n        vm.__next_tick_callbacks = [];\r\n    }\r\n    vm.__next_tick_callbacks.push(function () {\r\n        if (cb) {\r\n            try {\r\n                cb.call(vm);\r\n            } catch (e) {\r\n                handleError(e, vm, 'nextTick');\r\n            }\r\n        } else if (_resolve) {\r\n            _resolve(vm);\r\n        }\r\n    });\r\n    // $flow-disable-line\r\n    if (!cb && typeof Promise !== 'undefined') {\r\n        return new Promise(function (resolve) {\r\n            _resolve = resolve;\r\n        })\r\n    }\r\n}\n\n/*  */\r\n\r\nfunction cloneWithData(vm) {\r\n  // 确保当前 vm 所有数据被同步\r\n  var ret = Object.create(null);\r\n  var dataKeys = [].concat(\r\n    Object.keys(vm._data || {}),\r\n    Object.keys(vm._computedWatchers || {}));\r\n\r\n  dataKeys.reduce(function(ret, key) {\r\n    ret[key] = vm[key];\r\n    return ret\r\n  }, ret);\r\n  //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据\r\n  Object.assign(ret, vm.$mp.data || {});\r\n  if (\r\n    Array.isArray(vm.$options.behaviors) &&\r\n    vm.$options.behaviors.indexOf('uni://form-field') !== -1\r\n  ) { //form-field\r\n    ret['name'] = vm.name;\r\n    ret['value'] = vm.value;\r\n  }\r\n\r\n  return JSON.parse(JSON.stringify(ret))\r\n}\r\n\r\nvar patch = function(oldVnode, vnode) {\n  var this$1 = this;\n\r\n  if (vnode === null) { //destroy\r\n    return\r\n  }\r\n  if (this.mpType === 'page' || this.mpType === 'component') {\r\n    var mpInstance = this.$scope;\r\n    var data = Object.create(null);\r\n    try {\r\n      data = cloneWithData(this);\r\n    } catch (err) {\r\n      console.error(err);\r\n    }\r\n    data.__webviewId__ = mpInstance.data.__webviewId__;\r\n    var mpData = Object.create(null);\r\n    Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据\r\n      mpData[key] = mpInstance.data[key];\r\n    });\r\n    var diffData = diff(data, mpData);\r\n    if (Object.keys(diffData).length) {\r\n      if (process.env.VUE_APP_DEBUG) {\r\n        console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +\r\n          ']差量更新',\r\n          JSON.stringify(diffData));\r\n      }\r\n      this.__next_tick_pending = true;\r\n      mpInstance.setData(diffData, function () {\r\n        this$1.__next_tick_pending = false;\r\n        flushCallbacks$1(this$1);\r\n      });\r\n    } else {\r\n      flushCallbacks$1(this);\r\n    }\r\n  }\r\n};\n\n/*  */\n\nfunction createEmptyRender() {\n\n}\n\nfunction mountComponent$1(\n  vm,\n  el,\n  hydrating\n) {\n  if (!vm.mpType) {//main.js 中的 new Vue\n    return vm\n  }\n  if (vm.mpType === 'app') {\n    vm.$options.render = createEmptyRender;\n  }\n  if (!vm.$options.render) {\n    vm.$options.render = createEmptyRender;\n    if (process.env.NODE_ENV !== 'production') {\n      /* istanbul ignore if */\n      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||\n        vm.$options.el || el) {\n        warn(\n          'You are using the runtime-only build of Vue where the template ' +\n          'compiler is not available. Either pre-compile the templates into ' +\n          'render functions, or use the compiler-included build.',\n          vm\n        );\n      } else {\n        warn(\n          'Failed to mount component: template or render function not defined.',\n          vm\n        );\n      }\n    }\n  }\n  \n  vm.mpHost !== 'mp-toutiao' && callHook(vm, 'beforeMount');\n\n  var updateComponent = function () {\n    vm._update(vm._render(), hydrating);\n  };\n\n  // we set this to vm._watcher inside the watcher's constructor\n  // since the watcher's initial patch may call $forceUpdate (e.g. inside child\n  // component's mounted hook), which relies on vm._watcher being already defined\n  new Watcher(vm, updateComponent, noop, {\n    before: function before() {\n      if (vm._isMounted && !vm._isDestroyed) {\n        callHook(vm, 'beforeUpdate');\n      }\n    }\n  }, true /* isRenderWatcher */);\n  hydrating = false;\n  return vm\n}\n\n/*  */\n\nfunction renderClass (\n  staticClass,\n  dynamicClass\n) {\n  if (isDef(staticClass) || isDef(dynamicClass)) {\n    return concat(staticClass, stringifyClass(dynamicClass))\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction concat (a, b) {\n  return a ? b ? (a + ' ' + b) : a : (b || '')\n}\n\nfunction stringifyClass (value) {\n  if (Array.isArray(value)) {\n    return stringifyArray(value)\n  }\n  if (isObject(value)) {\n    return stringifyObject(value)\n  }\n  if (typeof value === 'string') {\n    return value\n  }\n  /* istanbul ignore next */\n  return ''\n}\n\nfunction stringifyArray (value) {\n  var res = '';\n  var stringified;\n  for (var i = 0, l = value.length; i < l; i++) {\n    if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {\n      if (res) { res += ' '; }\n      res += stringified;\n    }\n  }\n  return res\n}\n\nfunction stringifyObject (value) {\n  var res = '';\n  for (var key in value) {\n    if (value[key]) {\n      if (res) { res += ' '; }\n      res += key;\n    }\n  }\n  return res\n}\n\n/*  */\n\nvar parseStyleText = cached(function (cssText) {\n  var res = {};\n  var listDelimiter = /;(?![^(]*\\))/g;\n  var propertyDelimiter = /:(.+)/;\n  cssText.split(listDelimiter).forEach(function (item) {\n    if (item) {\n      var tmp = item.split(propertyDelimiter);\n      tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return res\n});\n\n// normalize possible array / string values into Object\nfunction normalizeStyleBinding (bindingStyle) {\n  if (Array.isArray(bindingStyle)) {\n    return toObject(bindingStyle)\n  }\n  if (typeof bindingStyle === 'string') {\n    return parseStyleText(bindingStyle)\n  }\n  return bindingStyle\n}\n\n/*  */\r\n\r\nvar MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];\r\n\r\nfunction getTarget(obj, path) {\r\n  var parts = path.split('.');\r\n  var key = parts[0];\r\n  if (key.indexOf('__$n') === 0) { //number index\r\n    key = parseInt(key.replace('__$n', ''));\r\n  }\r\n  if (parts.length === 1) {\r\n    return obj[key]\r\n  }\r\n  return getTarget(obj[key], parts.slice(1).join('.'))\r\n}\r\n\r\nfunction internalMixin(Vue) {\r\n\r\n  Vue.config.errorHandler = function(err) {\r\n    console.error(err);\r\n  };\r\n\r\n  var oldEmit = Vue.prototype.$emit;\r\n\r\n  Vue.prototype.$emit = function(event) {\r\n    if (this.$scope && event) {\r\n      this.$scope['triggerEvent'](event, {\r\n        __args__: toArray(arguments, 1)\r\n      });\r\n    }\r\n    return oldEmit.apply(this, arguments)\r\n  };\r\n\r\n  Vue.prototype.$nextTick = function(fn) {\r\n    return nextTick$1(this, fn)\r\n  };\r\n\r\n  MP_METHODS.forEach(function (method) {\r\n    Vue.prototype[method] = function(args) {\r\n      if (this.$scope) {\r\n        return this.$scope[method](args)\r\n      }\r\n    };\r\n  });\r\n\r\n  Vue.prototype.__init_provide = initProvide;\r\n\r\n  Vue.prototype.__init_injections = initInjections;\r\n\r\n  Vue.prototype.__call_hook = function(hook, args) {\r\n    var vm = this;\r\n    // #7573 disable dep collection when invoking lifecycle hooks\r\n    pushTarget();\r\n    var handlers = vm.$options[hook];\r\n    var info = hook + \" hook\";\r\n    var ret;\r\n    if (handlers) {\r\n      for (var i = 0, j = handlers.length; i < j; i++) {\r\n        ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);\r\n      }\r\n    }\r\n    if (vm._hasHookEvent) {\r\n      vm.$emit('hook:' + hook);\r\n    }\r\n    popTarget();\r\n    return ret\r\n  };\r\n\r\n  Vue.prototype.__set_model = function(target, key, value, modifiers) {\r\n    if (Array.isArray(modifiers)) {\r\n      if (modifiers.indexOf('trim') !== -1) {\r\n        value = value.trim();\r\n      }\r\n      if (modifiers.indexOf('number') !== -1) {\r\n        value = this._n(value);\r\n      }\r\n    }\r\n    if (!target) {\r\n      target = this;\r\n    }\r\n    target[key] = value;\r\n  };\r\n\r\n  Vue.prototype.__set_sync = function(target, key, value) {\r\n    if (!target) {\r\n      target = this;\r\n    }\r\n    target[key] = value;\r\n  };\r\n\r\n  Vue.prototype.__get_orig = function(item) {\r\n    if (isPlainObject(item)) {\r\n      return item['$orig'] || item\r\n    }\r\n    return item\r\n  };\r\n\r\n  Vue.prototype.__get_value = function(dataPath, target) {\r\n    return getTarget(target || this, dataPath)\r\n  };\r\n\r\n\r\n  Vue.prototype.__get_class = function(dynamicClass, staticClass) {\r\n    return renderClass(staticClass, dynamicClass)\r\n  };\r\n\r\n  Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {\r\n    if (!dynamicStyle && !staticStyle) {\r\n      return ''\r\n    }\r\n    var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);\r\n    var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;\r\n    return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + \":\" + (styleObj[name])); }).join(';')\r\n  };\r\n\r\n  Vue.prototype.__map = function(val, iteratee) {\r\n    //TODO 暂不考虑 string,number\r\n    var ret, i, l, keys, key;\r\n    if (Array.isArray(val)) {\r\n      ret = new Array(val.length);\r\n      for (i = 0, l = val.length; i < l; i++) {\r\n        ret[i] = iteratee(val[i], i);\r\n      }\r\n      return ret\r\n    } else if (isObject(val)) {\r\n      keys = Object.keys(val);\r\n      ret = Object.create(null);\r\n      for (i = 0, l = keys.length; i < l; i++) {\r\n        key = keys[i];\r\n        ret[key] = iteratee(val[key], key, i);\r\n      }\r\n      return ret\r\n    }\r\n    return []\r\n  };\r\n\r\n}\n\n/*  */\r\n\r\nvar LIFECYCLE_HOOKS$1 = [\r\n    //App\r\n    'onLaunch',\r\n    'onShow',\r\n    'onHide',\r\n    'onUniNViewMessage',\n    'onError',\r\n    //Page\r\n    'onLoad',\r\n    // 'onShow',\r\n    'onReady',\r\n    // 'onHide',\r\n    'onUnload',\r\n    'onPullDownRefresh',\r\n    'onReachBottom',\r\n    'onTabItemTap',\r\n    'onShareAppMessage',\n    'onResize',\r\n    'onPageScroll',\r\n    'onNavigationBarButtonTap',\r\n    'onBackPress',\r\n    'onNavigationBarSearchInputChanged',\r\n    'onNavigationBarSearchInputConfirmed',\r\n    'onNavigationBarSearchInputClicked',\r\n    //Component\r\n    // 'onReady', // 兼容旧版本,应该移除该事件\r\n    'onPageShow',\r\n    'onPageHide',\r\n    'onPageResize'\r\n];\r\nfunction lifecycleMixin$1(Vue) {\r\n\r\n    //fixed vue-class-component\r\n    var oldExtend = Vue.extend;\r\n    Vue.extend = function(extendOptions) {\r\n        extendOptions = extendOptions || {};\r\n\r\n        var methods = extendOptions.methods;\r\n        if (methods) {\r\n            Object.keys(methods).forEach(function (methodName) {\r\n                if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {\r\n                    extendOptions[methodName] = methods[methodName];\r\n                    delete methods[methodName];\r\n                }\r\n            });\r\n        }\r\n\r\n        return oldExtend.call(this, extendOptions)\r\n    };\r\n\r\n    var strategies = Vue.config.optionMergeStrategies;\r\n    var mergeHook = strategies.created;\r\n    LIFECYCLE_HOOKS$1.forEach(function (hook) {\r\n        strategies[hook] = mergeHook;\r\n    });\r\n\r\n    Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;\r\n}\n\n/*  */\r\n\n// install platform patch function\r\nVue.prototype.__patch__ = patch;\r\n\r\n// public mount method\r\nVue.prototype.$mount = function(\r\n    el ,\r\n    hydrating \r\n) {\r\n    return mountComponent$1(this, el, hydrating)\r\n};\r\n\r\nlifecycleMixin$1(Vue);\r\ninternalMixin(Vue);\n\n/*  */\n\nexport default Vue;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/*\r\n * uCharts v1.9.3.20190922\r\n * uni-app平台高性能跨全端图表,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)\r\n * Copyright (c) 2019 QIUN秋云 https://www.ucharts.cn All rights reserved.\r\n * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )\r\n * \r\n * uCharts官方网站\r\n * https://www.uCharts.cn\r\n * \r\n * 开源地址:\r\n * https://gitee.com/uCharts/uCharts\r\n * \r\n * uni-app插件市场地址:\r\n * http://ext.dcloud.net.cn/plugin?id=271\r\n * \r\n */\r\n\r\n'use strict';\r\n\r\nvar config = {\r\n  yAxisWidth: 15,\r\n  yAxisSplit: 5,\r\n  xAxisHeight: 15,\r\n  xAxisLineHeight: 15,\r\n  legendHeight: 15,\r\n  yAxisTitleWidth: 15,\r\n  padding: [10, 10, 10, 10],\r\n  pixelRatio: 1,\r\n  rotate: false,\r\n  columePadding: 3,\r\n  fontSize: 13,\r\n  //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'],\r\n  dataPointShape: ['circle', 'circle', 'circle', 'circle'],\r\n  colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'],\r\n  pieChartLinePadding: 15,\r\n  pieChartTextPadding: 5,\r\n  xAxisTextPadding: 3,\r\n  titleColor: '#333333',\r\n  titleFontSize: 20,\r\n  subtitleColor: '#999999',\r\n  subtitleFontSize: 15,\r\n  toolTipPadding: 3,\r\n  toolTipBackground: '#000000',\r\n  toolTipOpacity: 0.7,\r\n  toolTipLineHeight: 20,\r\n  radarLabelTextMargin: 15,\r\n  gaugeLabelTextMargin: 15\r\n};\r\n\r\nlet assign = function (target, ...varArgs) {\r\n    if (target == null) {\r\n        throw new TypeError('Cannot convert undefined or null to object');\r\n    }\r\n    if (!varArgs || varArgs.length <= 0) {\r\n        return target;\r\n    }\r\n    // 深度合并对象\r\n    function deepAssign(obj1, obj2) {\r\n        for (let key in obj2) {\r\n            obj1[key] = obj1[key] && obj1[key].toString() === \"[object Object]\" ?\r\n                deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];\r\n        }\r\n        return obj1;\r\n    }\r\n\r\n    varArgs.forEach(val => {\r\n        target = deepAssign(target, val);\r\n    });\r\n    return target;\r\n};\r\n\r\nvar util = {\r\n  toFixed: function toFixed(num, limit) {\r\n    limit = limit || 2;\r\n    if (this.isFloat(num)) {\r\n      num = num.toFixed(limit);\r\n    }\r\n    return num;\r\n  },\r\n  isFloat: function isFloat(num) {\r\n    return num % 1 !== 0;\r\n  },\r\n  approximatelyEqual: function approximatelyEqual(num1, num2) {\r\n    return Math.abs(num1 - num2) < 1e-10;\r\n  },\r\n  isSameSign: function isSameSign(num1, num2) {\r\n    return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;\r\n  },\r\n  isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {\r\n    return this.isSameSign(p1.x, p2.x);\r\n  },\r\n  isCollision: function isCollision(obj1, obj2) {\r\n    obj1.end = {};\r\n    obj1.end.x = obj1.start.x + obj1.width;\r\n    obj1.end.y = obj1.start.y - obj1.height;\r\n    obj2.end = {};\r\n    obj2.end.x = obj2.start.x + obj2.width;\r\n    obj2.end.y = obj2.start.y - obj2.height;\r\n    var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;\r\n    return !flag;\r\n  }\r\n};\r\n\r\n//兼容H5点击事件\r\nfunction getH5Offset(e) {\r\n  e.mp = {\r\n    changedTouches: []\r\n  };\r\n  e.mp.changedTouches.push({\r\n    x: e.offsetX,\r\n    y: e.offsetY\r\n  });\r\n  return e;\r\n}\r\n\r\n// hex 转 rgba\r\nfunction hexToRgb(hexValue, opc) {\r\n  var rgx = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n  var hex = hexValue.replace(rgx, function(m, r, g, b) {\r\n    return r + r + g + g + b + b;\r\n  });\r\n  var rgb = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n  var r = parseInt(rgb[1], 16);\r\n  var g = parseInt(rgb[2], 16);\r\n  var b = parseInt(rgb[3], 16);\r\n  return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';\r\n}\r\n\r\nfunction findRange(num, type, limit) {\r\n  if (isNaN(num)) {\r\n    throw new Error('[uCharts] unvalid series data!');\r\n  }\r\n  limit = limit || 10;\r\n  type = type ? type : 'upper';\r\n  var multiple = 1;\r\n  while (limit < 1) {\r\n    limit *= 10;\r\n    multiple *= 10;\r\n  }\r\n  if (type === 'upper') {\r\n    num = Math.ceil(num * multiple);\r\n  } else {\r\n    num = Math.floor(num * multiple);\r\n  }\r\n  while (num % limit !== 0) {\r\n    if (type === 'upper') {\r\n      num++;\r\n    } else {\r\n      num--;\r\n    }\r\n  }\r\n  return num / multiple;\r\n}\r\n\r\nfunction calCandleMA(dayArr, nameArr, colorArr, kdata) {\r\n  let seriesTemp = [];\r\n  for (let k = 0; k < dayArr.length; k++) {\r\n    let seriesItem = {\r\n      data: [],\r\n      name: nameArr[k],\r\n      color: colorArr[k]\r\n    };\r\n    for (let i = 0, len = kdata.length; i < len; i++) {\r\n      if (i < dayArr[k]) {\r\n        seriesItem.data.push(null);\r\n        continue;\r\n      }\r\n      let sum = 0;\r\n      for (let j = 0; j < dayArr[k]; j++) {\r\n        sum += kdata[i - j][1];\r\n      }\r\n      seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));\r\n    }\r\n    seriesTemp.push(seriesItem);\r\n  }\r\n  return seriesTemp;\r\n}\r\n\r\nfunction calValidDistance(self,distance, chartData, config, opts) {\r\n  var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];\r\n  var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length-1);\r\n  var validDistance = distance;\r\n  if (distance >= 0) {\r\n    validDistance = 0;\r\n\t\tself.event.trigger('scrollLeft');\r\n  } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {\r\n    validDistance = dataChartAreaWidth - dataChartWidth;\r\n\t\tself.event.trigger('scrollRight');\r\n  }\r\n  return validDistance;\r\n}\r\n\r\nfunction isInAngleRange(angle, startAngle, endAngle) {\r\n  function adjust(angle) {\r\n    while (angle < 0) {\r\n      angle += 2 * Math.PI;\r\n    }\r\n    while (angle > 2 * Math.PI) {\r\n      angle -= 2 * Math.PI;\r\n    }\r\n    return angle;\r\n  }\r\n  angle = adjust(angle);\r\n  startAngle = adjust(startAngle);\r\n  endAngle = adjust(endAngle);\r\n  if (startAngle > endAngle) {\r\n    endAngle += 2 * Math.PI;\r\n    if (angle < startAngle) {\r\n      angle += 2 * Math.PI;\r\n    }\r\n  }\r\n  return angle >= startAngle && angle <= endAngle;\r\n}\r\n\r\nfunction calRotateTranslate(x, y, h) {\r\n  var xv = x;\r\n  var yv = h - y;\r\n  var transX = xv + (h - yv - xv) / Math.sqrt(2);\r\n  transX *= -1;\r\n  var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);\r\n  return {\r\n    transX: transX,\r\n    transY: transY\r\n  };\r\n}\r\n\r\nfunction createCurveControlPoints(points, i) {\r\n\r\n  function isNotMiddlePoint(points, i) {\r\n    if (points[i - 1] && points[i + 1]) {\r\n      return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y,\r\n        points[\r\n          i + 1].y);\r\n    } else {\r\n      return false;\r\n    }\r\n  }\r\n  var a = 0.2;\r\n  var b = 0.2;\r\n  var pAx = null;\r\n  var pAy = null;\r\n  var pBx = null;\r\n  var pBy = null;\r\n  if (i < 1) {\r\n    pAx = points[0].x + (points[1].x - points[0].x) * a;\r\n    pAy = points[0].y + (points[1].y - points[0].y) * a;\r\n  } else {\r\n    pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;\r\n    pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;\r\n  }\r\n\r\n  if (i > points.length - 3) {\r\n    var last = points.length - 1;\r\n    pBx = points[last].x - (points[last].x - points[last - 1].x) * b;\r\n    pBy = points[last].y - (points[last].y - points[last - 1].y) * b;\r\n  } else {\r\n    pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;\r\n    pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;\r\n  }\r\n  if (isNotMiddlePoint(points, i + 1)) {\r\n    pBy = points[i + 1].y;\r\n  }\r\n  if (isNotMiddlePoint(points, i)) {\r\n    pAy = points[i].y;\r\n  }\r\n\tif (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {\r\n\tpAy = points[i].y;\r\n\t}\r\n\tif (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {\r\n\tpBy = points[i + 1].y;\r\n\t}\r\n  return {\r\n    ctrA: {\r\n      x: pAx,\r\n      y: pAy\r\n    },\r\n    ctrB: {\r\n      x: pBx,\r\n      y: pBy\r\n    }\r\n  };\r\n}\r\n\r\nfunction convertCoordinateOrigin(x, y, center) {\r\n  return {\r\n    x: center.x + x,\r\n    y: center.y - y\r\n  };\r\n}\r\n\r\nfunction avoidCollision(obj, target) {\r\n  if (target) {\r\n    // is collision test\r\n    while (util.isCollision(obj, target)) {\r\n      if (obj.start.x > 0) {\r\n        obj.start.y--;\r\n      } else if (obj.start.x < 0) {\r\n        obj.start.y++;\r\n      } else {\r\n        if (obj.start.y > 0) {\r\n          obj.start.y++;\r\n        } else {\r\n          obj.start.y--;\r\n        }\r\n      }\r\n    }\r\n  }\r\n  return obj;\r\n}\r\n\r\nfunction fillSeries(series, opts, config) {\r\n  var index = 0;\r\n  return series.map(function(item) {\r\n    if (!item.color) {\r\n      item.color = config.colors[index];\r\n      index = (index + 1) % config.colors.length;\r\n    }\r\n    if (!item.index) {\r\n      item.index = 0;\r\n    }\r\n    if (!item.type) {\r\n      item.type = opts.type;\r\n    }\r\n    if (typeof item.show == \"undefined\") {\r\n      item.show = true;\r\n    }\r\n    if (!item.type) {\r\n      item.type = opts.type;\r\n    }\r\n    if (!item.pointShape) {\r\n      item.pointShape = \"circle\";\r\n    }\r\n    if (!item.legendShape) {\r\n      switch (item.type) {\r\n        case 'line':\r\n          item.legendShape = \"line\";\r\n          break;\r\n        case 'column':\r\n          item.legendShape = \"rect\";\r\n          break;\r\n        case 'area':\r\n          item.legendShape = \"triangle\";\r\n          break;\r\n        default:\r\n          item.legendShape = \"circle\";\r\n      }\r\n    }\r\n    return item;\r\n  });\r\n}\r\n\r\nfunction getDataRange(minData, maxData) {\r\n  var limit = 0;\r\n  var range = maxData - minData;\r\n  if (range >= 10000) {\r\n    limit = 1000;\r\n  } else if (range >= 1000) {\r\n    limit = 100;\r\n  } else if (range >= 100) {\r\n    limit = 10;\r\n  } else if (range >= 10) {\r\n    limit = 5;\r\n  } else if (range >= 1) {\r\n    limit = 1;\r\n  } else if (range >= 0.1) {\r\n    limit = 0.1;\r\n  } else if (range >= 0.01) {\r\n    limit = 0.01;\r\n  } else if (range >= 0.001) {\r\n    limit = 0.001;\r\n  } else if (range >= 0.0001) {\r\n    limit = 0.0001;\r\n  } else if (range >= 0.00001) {\r\n    limit = 0.00001;\r\n  } else {\r\n    limit = 0.000001;\r\n  }\r\n  return {\r\n    minRange: findRange(minData, 'lower', limit),\r\n    maxRange: findRange(maxData, 'upper', limit)\r\n  };\r\n}\r\n\r\nfunction measureText(text) {\r\n  var fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.fontSize;\r\n  text = String(text);\r\n  var text = text.split('');\r\n  var width = 0;\r\n  for (let i = 0; i < text.length; i++) {\r\n    let item = text[i];\r\n    if (/[a-zA-Z]/.test(item)) {\r\n      width += 7;\r\n    } else if (/[0-9]/.test(item)) {\r\n      width += 5.5;\r\n    } else if (/\\./.test(item)) {\r\n      width += 2.7;\r\n    } else if (/-/.test(item)) {\r\n      width += 3.25;\r\n    } else if (/[\\u4e00-\\u9fa5]/.test(item)) {\r\n      width += 10;\r\n    } else if (/\\(|\\)/.test(item)) {\r\n      width += 3.73;\r\n    } else if (/\\s/.test(item)) {\r\n      width += 2.5;\r\n    } else if (/%/.test(item)) {\r\n      width += 8;\r\n    } else {\r\n      width += 10;\r\n    }\r\n  }\r\n  return width * fontSize / 10;\r\n}\r\n\r\nfunction dataCombine(series) {\r\n  return series.reduce(function(a, b) {\r\n    return (a.data ? a.data : a).concat(b.data);\r\n  }, []);\r\n}\r\n\r\nfunction dataCombineStack(series, len) {\r\n  var sum = new Array(len);\r\n  for (var j = 0; j < sum.length; j++) {\r\n    sum[j] = 0;\r\n  }\r\n  for (var i = 0; i < series.length; i++) {\r\n    for (var j = 0; j < sum.length; j++) {\r\n      sum[j] += series[i].data[j];\r\n    }\r\n  }\r\n  return series.reduce(function(a, b) {\r\n    return (a.data ? a.data : a).concat(b.data).concat(sum);\r\n  }, []);\r\n}\r\n\r\nfunction getTouches(touches, opts, e) {\r\n  let x, y;\r\n  if (touches.clientX) {\r\n    if (opts.rotate) {\r\n      y = opts.height - touches.clientX * opts.pixelRatio;\r\n      x = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) *\r\n        opts.pixelRatio;\r\n    } else {\r\n      x = touches.clientX * opts.pixelRatio;\r\n      y = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) *\r\n        opts.pixelRatio;\r\n    }\r\n  } else {\r\n    if (opts.rotate) {\r\n      y = opts.height - touches.x * opts.pixelRatio;\r\n      x = touches.y * opts.pixelRatio;\r\n    } else {\r\n      x = touches.x * opts.pixelRatio;\r\n      y = touches.y * opts.pixelRatio;\r\n    }\r\n  }\r\n  return {\r\n    x: x,\r\n    y: y\r\n  }\r\n}\r\n\r\nfunction getSeriesDataItem(series, index) {\r\n  var data = [];\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    if (item.data[index] !== null && typeof item.data[index] !== 'undefined' && item.show) {\r\n      let seriesItem = {};\r\n      seriesItem.color = item.color;\r\n      seriesItem.type = item.type;\r\n      seriesItem.style = item.style;\r\n      seriesItem.pointShape = item.pointShape;\r\n      seriesItem.disableLegend = item.disableLegend;\r\n      seriesItem.name = item.name;\r\n      seriesItem.show = item.show;\r\n      seriesItem.data = item.format ? item.format(item.data[index]) : item.data[index];\r\n      data.push(seriesItem);\r\n    }\r\n  }\r\n  return data;\r\n}\r\n\r\nfunction getMaxTextListLength(list) {\r\n  var lengthList = list.map(function(item) {\r\n    return measureText(item);\r\n  });\r\n  return Math.max.apply(null, lengthList);\r\n}\r\n\r\nfunction getRadarCoordinateSeries(length) {\r\n  var eachAngle = 2 * Math.PI / length;\r\n  var CoordinateSeries = [];\r\n  for (var i = 0; i < length; i++) {\r\n    CoordinateSeries.push(eachAngle * i);\r\n  }\r\n\r\n  return CoordinateSeries.map(function(item) {\r\n    return -1 * item + Math.PI / 2;\r\n  });\r\n}\r\n\r\nfunction getToolTipData(seriesData, calPoints, index, categories) {\r\n  var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\r\n\r\n  var textList = seriesData.map(function(item) {\r\n\t\tlet titleText=[];\r\n\t\tif(categories){\r\n\t\t\ttitleText=categories;\r\n\t\t}else{\r\n\t\t\ttitleText=item.data;\r\n\t\t}\r\n    return {\r\n      text: option.format ? option.format(item, titleText[index]) : item.name + ': ' + item.data,\r\n      color: item.color\r\n    };\r\n  });\r\n  var validCalPoints = [];\r\n  var offset = {\r\n    x: 0,\r\n    y: 0\r\n  };\r\n  for (let i = 0; i < calPoints.length; i++) {\r\n    let points = calPoints[i];\r\n    if (typeof points[index] !== 'undefined' && points[index] !== null) {\r\n      validCalPoints.push(points[index]);\r\n    }\r\n  }\r\n  for (let i = 0; i < validCalPoints.length; i++) {\r\n    let item = validCalPoints[i];\r\n    offset.x = Math.round(item.x);\r\n    offset.y += item.y;\r\n  }\r\n  offset.y /= validCalPoints.length;\r\n  return {\r\n    textList: textList,\r\n    offset: offset\r\n  };\r\n}\r\n\r\nfunction getMixToolTipData(seriesData, calPoints, index, categories) {\r\n  var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\r\n  var textList = seriesData.map(function(item) {\r\n    return {\r\n      text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data,\r\n      color: item.color,\r\n      disableLegend: item.disableLegend ? true : false\r\n    };\r\n  });\r\n  textList = textList.filter(function(item) {\r\n    if (item.disableLegend !== true) {\r\n      return item;\r\n    }\r\n  });\r\n  var validCalPoints = [];\r\n  var offset = {\r\n    x: 0,\r\n    y: 0\r\n  };\r\n  for (let i = 0; i < calPoints.length; i++) {\r\n    let points = calPoints[i];\r\n    if (typeof points[index] !== 'undefined' && points[index] !== null) {\r\n      validCalPoints.push(points[index]);\r\n    }\r\n  }\r\n  for (let i = 0; i < validCalPoints.length; i++) {\r\n    let item = validCalPoints[i];\r\n    offset.x = Math.round(item.x);\r\n    offset.y += item.y;\r\n  }\r\n  offset.y /= validCalPoints.length;\r\n  return {\r\n    textList: textList,\r\n    offset: offset\r\n  };\r\n}\r\n\r\nfunction getCandleToolTipData(series, seriesData, calPoints, index, categories, extra) {\r\n  var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};\r\n  let upColor = extra.color.upFill;\r\n  let downColor = extra.color.downFill;\r\n  //颜色顺序为开盘,收盘,最低,最高\r\n  let color = [upColor, upColor, downColor, upColor];\r\n  var textList = [];\r\n  let text0 = {\r\n    text: categories[index],\r\n    color: null\r\n  };\r\n  textList.push(text0);\r\n  seriesData.map(function(item) {\r\n    if (index == 0 && item.data[1] - item.data[0] < 0) {\r\n      color[1] = downColor;\r\n    } else {\r\n      if (item.data[0] < series[index - 1][1]) {\r\n        color[0] = downColor;\r\n      }\r\n      if (item.data[1] < item.data[0]) {\r\n        color[1] = downColor;\r\n      }\r\n      if (item.data[2] > series[index - 1][1]) {\r\n        color[2] = upColor;\r\n      }\r\n      if (item.data[3] < series[index - 1][1]) {\r\n        color[3] = downColor;\r\n      }\r\n    }\r\n    let text1 = {\r\n      text: '开盘:' + item.data[0],\r\n      color: color[0]\r\n    };\r\n    let text2 = {\r\n      text: '收盘:' + item.data[1],\r\n      color: color[1]\r\n    };\r\n    let text3 = {\r\n      text: '最低:' + item.data[2],\r\n      color: color[2]\r\n    };\r\n    let text4 = {\r\n      text: '最高:' + item.data[3],\r\n      color: color[3]\r\n    };\r\n    textList.push(text1, text2, text3, text4);\r\n  });\r\n  var validCalPoints = [];\r\n  var offset = {\r\n    x: 0,\r\n    y: 0\r\n  };\r\n  for (let i = 0; i < calPoints.length; i++) {\r\n    let points = calPoints[i];\r\n    if (typeof points[index] !== 'undefined' && points[index] !== null) {\r\n      validCalPoints.push(points[index]);\r\n    }\r\n  }\r\n  offset.x = Math.round(validCalPoints[0][0].x);\r\n  return {\r\n    textList: textList,\r\n    offset: offset\r\n  };\r\n}\r\n\r\nfunction filterSeries(series) {\r\n  let tempSeries = [];\r\n  for (let i = 0; i < series.length; i++) {\r\n    if (series[i].show == true) {\r\n      tempSeries.push(series[i])\r\n    }\r\n  }\r\n  return tempSeries;\r\n}\r\n\r\nfunction findCurrentIndex(currentPoints, calPoints, opts, config) {\r\n  var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\r\n  var currentIndex = -1;\r\n  var spacing = 0;\r\n\tlet xAxisPoints=[];\r\n\tfor(let i=0;i<calPoints[0].length;i++){\r\n\t\txAxisPoints.push(calPoints[0][i].x)\r\n\t}\r\n  if((opts.type=='line' || opts.type=='area') && opts.xAxis.boundaryGap=='justify'){\r\n    spacing = opts.chartData.eachSpacing/2;\r\n  }\r\n\tif(!opts.categories){\r\n\t\tspacing=0\r\n\t}\r\n  if (isInExactChartArea(currentPoints, opts, config)) {\r\n    xAxisPoints.forEach(function(item, index) {\r\n      if (currentPoints.x + offset + spacing > item) {\r\n        currentIndex = index;\r\n      }\r\n    });\r\n  }\r\n  return currentIndex;\r\n}\r\n\r\nfunction findLegendIndex(currentPoints, legendData, opts) {\r\n  let currentIndex = -1;\r\n  if (isInExactLegendArea(currentPoints, legendData.area)) {\r\n    let points = legendData.points;\r\n    let index = -1;\r\n    for (let i = 0, len = points.length; i < len; i++) {\r\n      let item = points[i];\r\n      for (let j = 0; j < item.length; j++) {\r\n        index += 1;\r\n        let area = item[j]['area'];\r\n        if (currentPoints.x > area[0] && currentPoints.x < area[2] && currentPoints.y > area[1] && currentPoints.y < area[3]) {\r\n          currentIndex = index;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    return currentIndex;\r\n  }\r\n  return currentIndex;\r\n}\r\n\r\nfunction isInExactLegendArea(currentPoints, area) {\r\n  return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y &&\r\n    currentPoints.y < area.end.y;\r\n}\r\n\r\nfunction isInExactChartArea(currentPoints, opts, config) {\r\n  return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] -10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];\r\n}\r\n\r\nfunction findRadarChartCurrentIndex(currentPoints, radarData, count) {\r\n  var eachAngleArea = 2 * Math.PI / count;\r\n  var currentIndex = -1;\r\n  if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {\r\n    var fixAngle = function fixAngle(angle) {\r\n      if (angle < 0) {\r\n        angle += 2 * Math.PI;\r\n      }\r\n      if (angle > 2 * Math.PI) {\r\n        angle -= 2 * Math.PI;\r\n      }\r\n      return angle;\r\n    };\r\n\r\n    var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);\r\n    angle = -1 * angle;\r\n    if (angle < 0) {\r\n      angle += 2 * Math.PI;\r\n    }\r\n\r\n    var angleList = radarData.angleList.map(function(item) {\r\n      item = fixAngle(-1 * item);\r\n\r\n      return item;\r\n    });\r\n\r\n    angleList.forEach(function(item, index) {\r\n      var rangeStart = fixAngle(item - eachAngleArea / 2);\r\n      var rangeEnd = fixAngle(item + eachAngleArea / 2);\r\n      if (rangeEnd < rangeStart) {\r\n        rangeEnd += 2 * Math.PI;\r\n      }\r\n      if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <=\r\n        rangeEnd) {\r\n        currentIndex = index;\r\n      }\r\n    });\r\n  }\r\n\r\n  return currentIndex;\r\n}\r\n\r\nfunction findFunnelChartCurrentIndex(currentPoints, funnelData) {\r\n  var currentIndex = -1;\r\n  for (var i = 0, len = funnelData.series.length; i < len; i++) {\r\n    var item = funnelData.series[i];\r\n    if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {\r\n      currentIndex = i;\r\n      break;\r\n    }\r\n  }\r\n  return currentIndex;\r\n}\r\n\r\nfunction findWordChartCurrentIndex(currentPoints, wordData) {\r\n  var currentIndex = -1;\r\n  for (var i = 0, len = wordData.length; i < len; i++) {\r\n    var item = wordData[i];\r\n    if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {\r\n      currentIndex = i;\r\n      break;\r\n    }\r\n  }\r\n  return currentIndex;\r\n}\r\n\r\nfunction findMapChartCurrentIndex(currentPoints, opts) {\r\n  var currentIndex = -1;\r\n  var cData=opts.chartData.mapData;\r\n  var data=opts.series;\r\n  var tmp=pointToCoordinate(currentPoints.y, currentPoints.x,cData.bounds,cData.scale,cData.xoffset,cData.yoffset);\r\n  var poi=[tmp.x, tmp.y];\r\n  for (var i = 0, len = data.length; i < len; i++) {\r\n    var item = data[i].geometry.coordinates;\r\n    if(isPoiWithinPoly(poi,item)){\r\n      currentIndex = i;\r\n      break;\r\n    }\r\n  }\r\n  return currentIndex;\r\n}\r\n\r\nfunction findPieChartCurrentIndex(currentPoints, pieData) {\r\n  var currentIndex = -1;\r\n  if (isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {\r\n    var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);\r\n    angle = -angle;\r\n    for (var i = 0, len = pieData.series.length; i < len; i++) {\r\n      var item = pieData.series[i];\r\n      if (isInAngleRange(angle, item._start_, item._start_ + item._proportion_ * 2 * Math.PI)) {\r\n        currentIndex = i;\r\n        break;\r\n      }\r\n    }\r\n  }\r\n\r\n  return currentIndex;\r\n}\r\n\r\nfunction isInExactPieChartArea(currentPoints, center, radius) {\r\n  return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);\r\n}\r\n\r\nfunction splitPoints(points) {\r\n  var newPoints = [];\r\n  var items = [];\r\n  points.forEach(function(item, index) {\r\n    if (item !== null) {\r\n      items.push(item);\r\n    } else {\r\n      if (items.length) {\r\n        newPoints.push(items);\r\n      }\r\n      items = [];\r\n    }\r\n  });\r\n  if (items.length) {\r\n    newPoints.push(items);\r\n  }\r\n\r\n  return newPoints;\r\n}\r\n\r\nfunction calLegendData(series, opts, config, chartData) {\r\n  let legendData = {\r\n    area: {\r\n      start: {\r\n        x: 0,\r\n        y: 0\r\n      },\r\n      end: {\r\n        x: 0,\r\n        y: 0\r\n      },\r\n      width: 0,\r\n      height: 0,\r\n      wholeWidth: 0,\r\n      wholeHeight: 0\r\n    },\r\n    points: [],\r\n    widthArr: [],\r\n    heightArr: []\r\n  };\r\n  if (opts.legend.show === false) {\r\n    chartData.legendData = legendData;\r\n    return legendData;\r\n  }\r\n\r\n  let padding = opts.legend.padding;\r\n  let margin = opts.legend.margin;\r\n  let fontSize = opts.legend.fontSize;\r\n  let shapeWidth = 15 * opts.pixelRatio;\r\n  let shapeRight = 5 * opts.pixelRatio;\r\n  let lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);\r\n  if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {\r\n    let legendList = [];\r\n    let widthCount = 0;\r\n    let widthCountArr = [];\r\n    let currentRow = [];\r\n    for (let i = 0; i < series.length; i++) {\r\n      let item = series[i];\r\n      let itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize) + opts.legend.itemGap;\r\n      if (widthCount + itemWidth > opts.width - opts.padding[1] - opts.padding[3]) {\r\n        legendList.push(currentRow);\r\n        widthCountArr.push(widthCount - opts.legend.itemGap);\r\n        widthCount = itemWidth;\r\n        currentRow = [item];\r\n      } else {\r\n        widthCount += itemWidth;\r\n        currentRow.push(item);\r\n      }\r\n    }\r\n    if (currentRow.length) {\r\n      legendList.push(currentRow);\r\n      widthCountArr.push(widthCount - opts.legend.itemGap);\r\n      legendData.widthArr = widthCountArr;\r\n      let legendWidth = Math.max.apply(null, widthCountArr);\r\n      switch (opts.legend.float) {\r\n        case 'left':\r\n          legendData.area.start.x = opts.padding[3];\r\n          legendData.area.end.x = opts.padding[3] + 2 * padding;\r\n          break;\r\n        case 'right':\r\n          legendData.area.start.x = opts.width - opts.padding[1] - legendWidth - 2 * padding;\r\n          legendData.area.end.x = opts.width - opts.padding[1];\r\n          break;\r\n        default:\r\n          legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;\r\n          legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;\r\n      }\r\n      legendData.area.width = legendWidth + 2 * padding;\r\n      legendData.area.wholeWidth = legendWidth + 2 * padding;\r\n      legendData.area.height = legendList.length * lineHeight + 2 * padding;\r\n      legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;\r\n      legendData.points = legendList;\r\n    }\r\n  } else {\r\n    let len = series.length;\r\n    let maxHeight = opts.height - opts.padding[0] - opts.padding[2] - 2 * margin - 2 * padding;\r\n    let maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);\r\n    legendData.area.height = maxLength * lineHeight + padding * 2;\r\n    legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;\r\n    switch (opts.legend.float) {\r\n      case 'top':\r\n        legendData.area.start.y = opts.padding[0] + margin;\r\n        legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;\r\n        break;\r\n      case 'bottom':\r\n        legendData.area.start.y = opts.height - opts.padding[2] - margin - legendData.area.height;\r\n        legendData.area.end.y = opts.height - opts.padding[2] - margin;\r\n        break;\r\n      default:\r\n        legendData.area.start.y = (opts.height - legendData.area.height) / 2;\r\n        legendData.area.end.y = (opts.height + legendData.area.height) / 2;\r\n    }\r\n    let lineNum = len % maxLength === 0 ? len / maxLength : Math.floor((len / maxLength) + 1);\r\n    let currentRow = [];\r\n    for (let i = 0; i < lineNum; i++) {\r\n      let temp = series.slice(i * maxLength, i * maxLength + maxLength);\r\n      currentRow.push(temp);\r\n    }\r\n\r\n    legendData.points = currentRow;\r\n\r\n    if (currentRow.length) {\r\n      for (let i = 0; i < currentRow.length; i++) {\r\n        let item = currentRow[i];\r\n        let maxWidth = 0;\r\n        for (let j = 0; j < item.length; j++) {\r\n          let itemWidth = shapeWidth + shapeRight + measureText(item[j].name || 'undefined', fontSize) + opts.legend.itemGap;\r\n          if (itemWidth > maxWidth) {\r\n            maxWidth = itemWidth;\r\n          }\r\n        }\r\n        legendData.widthArr.push(maxWidth);\r\n        legendData.heightArr.push(item.length * lineHeight + padding * 2);\r\n      }\r\n      let legendWidth = 0\r\n      for (let i = 0; i < legendData.widthArr.length; i++) {\r\n        legendWidth += legendData.widthArr[i];\r\n      }\r\n      legendData.area.width = legendWidth - opts.legend.itemGap + 2 * padding;\r\n      legendData.area.wholeWidth = legendData.area.width + padding;\r\n    }\r\n  }\r\n\r\n  switch (opts.legend.position) {\r\n    case 'top':\r\n      legendData.area.start.y = opts.padding[0] + margin;\r\n      legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;\r\n      break;\r\n    case 'bottom':\r\n      legendData.area.start.y = opts.height - opts.padding[2] - legendData.area.height - margin;\r\n      legendData.area.end.y = opts.height - opts.padding[2] - margin;\r\n      break;\r\n    case 'left':\r\n      legendData.area.start.x = opts.padding[3];\r\n      legendData.area.end.x = opts.padding[3] + legendData.area.width;\r\n      break;\r\n    case 'right':\r\n      legendData.area.start.x = opts.width - opts.padding[1] - legendData.area.width;\r\n      legendData.area.end.x = opts.width - opts.padding[1];\r\n      break;\r\n  }\r\n  chartData.legendData = legendData;\r\n  return legendData;\r\n}\r\n\r\nfunction calCategoriesData(categories, opts, config, eachSpacing) {\r\n  var result = {\r\n    angle: 0,\r\n    xAxisHeight: config.xAxisHeight\r\n  };\r\n  var categoriesTextLenth = categories.map(function(item) {\r\n    return measureText(item,opts.xAxis.fontSize||config.fontSize);\r\n  });\r\n  var maxTextLength = Math.max.apply(this, categoriesTextLenth);\r\n\r\n  if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {\r\n    result.angle = 45 * Math.PI / 180;\r\n    result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);\r\n  }\r\n  return result;\r\n}\r\n\r\nfunction getXAxisTextList(series, opts, config) {\r\n  var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\r\n  var data = dataCombine(series);\r\n  var sorted = [];\r\n  // remove null from data\r\n  data = data.filter(function(item) {\r\n    //return item !== null;\r\n    if (typeof item === 'object' && item !== null) {\r\n      if (item.constructor == Array) {\r\n        return item !== null;\r\n      } else {\r\n        return item.value !== null;\r\n      }\r\n    } else {\r\n      return item !== null;\r\n    }\r\n  });\r\n  data.map(function(item) {\r\n    if (typeof item === 'object') {\r\n      if (item.constructor == Array) {\r\n\t\t\t\tif(opts.type=='candle'){\r\n\t\t\t\t\titem.map(function(subitem) {\r\n\t\t\t\t\t  sorted.push(subitem);\r\n\t\t\t\t\t})\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsorted.push(item[0]);\r\n\t\t\t\t}\r\n      } else {\r\n        sorted.push(item.value);\r\n      }\r\n    } else {\r\n      sorted.push(item);\r\n    }\r\n  })\r\n\t\r\n  var minData = 0;\r\n  var maxData = 0;\r\n  if (sorted.length > 0) {\r\n    minData = Math.min.apply(this, sorted);\r\n    maxData = Math.max.apply(this, sorted);\r\n  }\r\n  //为了兼容v1.9.0之前的项目\r\n  if(index>-1){\r\n    if (typeof opts.xAxis.data[index].min === 'number') {\r\n      minData = Math.min(opts.xAxis.data[index].min, minData);\r\n    }\r\n    if (typeof opts.xAxis.data[index].max === 'number') {\r\n      maxData = Math.max(opts.xAxis.data[index].max, maxData);\r\n    }\r\n  }else{\r\n    if (typeof opts.xAxis.min === 'number') {\r\n      minData = Math.min(opts.xAxis.min, minData);\r\n    }\r\n    if (typeof opts.xAxis.max === 'number') {\r\n      maxData = Math.max(opts.xAxis.max, maxData);\r\n    }\r\n  }\r\n  \r\n\r\n  if (minData === maxData) {\r\n    var rangeSpan = maxData || 10;\r\n    maxData += rangeSpan;\r\n  }\r\n\r\n  var dataRange = getDataRange(minData, maxData);\r\n  var minRange = dataRange.minRange;\r\n  var maxRange = dataRange.maxRange;\r\n\r\n  var range = [];\r\n  var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;\r\n\r\n  for (var i = 0; i <= opts.xAxis.splitNumber; i++) {\r\n    range.push(minRange + eachRange * i);\r\n  }\r\n  return range;\r\n}\r\n\r\nfunction calXAxisData(series, opts, config){\r\n    var result = {\r\n        angle: 0,\r\n        xAxisHeight: config.xAxisHeight\r\n    };\r\n\r\n    result.ranges = getXAxisTextList(series, opts, config);\r\n    result.rangesFormat = result.ranges.map(function(item){\r\n        item = opts.xAxis.format? opts.xAxis.format(item):util.toFixed(item, 2);\r\n        return item;\r\n    });\r\n    var xAxisScaleValues = result.ranges.map(function (item) {\r\n        // 如果刻度值是浮点数,则保留两位小数\r\n        item = util.toFixed(item, 2);\r\n        // 若有自定义格式则调用自定义的格式化函数\r\n        item = opts.xAxis.format ? opts.xAxis.format(Number(item)) : item;\r\n        return item;\r\n    });\r\n\r\n    result = Object.assign(result,getXAxisPoints(xAxisScaleValues, opts, config));\r\n    // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\\结束点以及总长\r\n    var eachSpacing = result.eachSpacing;\r\n\r\n    var textLength = xAxisScaleValues.map(function (item) {\r\n        return measureText(item);\r\n    });\r\n    \r\n    // get max length of categories text\r\n    var maxTextLength = Math.max.apply(this, textLength);\r\n\r\n    // 如果刻度值文本内容过长,则将其逆时针旋转45°\r\n    if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {\r\n        result.angle = 45 * Math.PI / 180;\r\n        result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);\r\n    }\r\n\r\n    if (opts.xAxis.disabled === true) {\r\n        result.xAxisHeight = 0;\r\n    }\r\n\r\n    return result;\r\n}\r\n\r\nfunction getRadarDataPoints(angleList, center, radius, series, opts) {\r\n  var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;\r\n\r\n  var radarOption = opts.extra.radar || {};\r\n  radarOption.max = radarOption.max || 0;\r\n  var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));\r\n\r\n  var data = [];\r\n  for (let i = 0; i < series.length; i++) {\r\n    let each = series[i];\r\n    let listItem = {};\r\n    listItem.color = each.color;\r\n\t\tlistItem.legendShape = each.legendShape;\r\n\t\tlistItem.pointShape = each.pointShape;\r\n    listItem.data = [];\r\n    each.data.forEach(function(item, index) {\r\n      let tmp = {};\r\n      tmp.angle = angleList[index];\r\n\r\n      tmp.proportion = item / maxData;\r\n      tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion *\r\n        process * Math.sin(tmp.angle), center);\r\n      listItem.data.push(tmp);\r\n    });\r\n\r\n    data.push(listItem);\r\n  }\r\n\r\n  return data;\r\n}\r\n\r\nfunction getPieDataPoints(series, radius) {\r\n  var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\r\n\r\n  var count = 0;\r\n  var _start_ = 0;\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item.data = item.data === null ? 0 : item.data;\r\n    count += item.data;\r\n  }\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item.data = item.data === null ? 0 : item.data;\r\n    if (count === 0) {\r\n      item._proportion_ = 1 / series.length * process;\r\n    } else {\r\n      item._proportion_ = item.data / count * process;\r\n    }\r\n    item._radius_ = radius;\r\n  }\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item._start_ = _start_;\r\n    _start_ += 2 * item._proportion_ * Math.PI;\r\n  }\r\n\r\n  return series;\r\n}\r\n\r\nfunction getFunnelDataPoints(series, radius) {\r\n  var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\r\n  series = series.sort(function(a,b){return parseInt(b.data)-parseInt(a.data);});\r\n  for (let i = 0; i < series.length; i++) {\r\n    series[i].radius = series[i].data/series[0].data*radius*process;\r\n    series[i]._proportion_ = series[i].data/series[0].data;\r\n  }\r\n  return series.reverse();\r\n}\r\n\r\nfunction getRoseDataPoints(series, type, minRadius, radius) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var count = 0;\r\n  var _start_ = 0;\r\n\r\n  var dataArr = [];\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item.data = item.data === null ? 0 : item.data;\r\n    count += item.data;\r\n    dataArr.push(item.data);\r\n  }\r\n  \r\n  var minData = Math.min.apply(null, dataArr);\r\n  var maxData = Math.max.apply(null, dataArr);\r\n  var radiusLength = radius - minRadius;\r\n  \r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item.data = item.data === null ? 0 : item.data;\r\n    if (count === 0 || type == 'area') {\r\n      item._proportion_ = item.data / count * process;\r\n      item._rose_proportion_ = 1 / series.length * process;\r\n    } else {\r\n      item._proportion_ = item.data / count * process;\r\n      item._rose_proportion_ = item.data / count * process;\r\n    }\r\n    item._radius_ = minRadius + radiusLength * ((item.data - minData) / (maxData - minData));\r\n  }\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item._start_ = _start_;\r\n    _start_ += 2 * item._rose_proportion_ * Math.PI;\r\n  }\r\n\r\n  return series;\r\n}\r\n\r\nfunction getArcbarDataPoints(series, arcbarOption) {\r\n  var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\r\n  if (process == 1) {\r\n    process = 0.999999;\r\n  }\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item.data = item.data === null ? 0 : item.data;\r\n    let totalAngle;\r\n    if (arcbarOption.type == 'circle') {\r\n      totalAngle = 2;\r\n    } else {\r\n\t\t\tif (arcbarOption.endAngle < arcbarOption.startAngle) {\r\n\t\t\t  totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;\r\n\t\t\t} else{\r\n\t\t\t  totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;\r\n\t\t\t}\r\n    }\r\n    item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;\r\n    if (item._proportion_ >= 2) {\r\n      item._proportion_ = item._proportion_ % 2;\r\n    }\r\n  }\r\n  return series;\r\n}\r\n\r\nfunction getGaugeAxisPoints(categories, startAngle, endAngle) {\r\n  let totalAngle = startAngle - endAngle + 1;\r\n  let tempStartAngle = startAngle;\r\n  for (let i = 0; i < categories.length; i++) {\r\n    categories[i].value = categories[i].value === null ? 0 : categories[i].value;\r\n    categories[i]._startAngle_ = tempStartAngle;\r\n    categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;\r\n    if (categories[i]._endAngle_ >= 2) {\r\n      categories[i]._endAngle_ = categories[i]._endAngle_ % 2;\r\n    }\r\n    tempStartAngle = categories[i]._endAngle_;\r\n  }\r\n  return categories;\r\n}\r\n\r\nfunction getGaugeDataPoints(series, categories, gaugeOption) {\r\n  let process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    item.data = item.data === null ? 0 : item.data;\r\n    if (gaugeOption.pointer.color == 'auto') {\r\n      for (let i = 0; i < categories.length; i++) {\r\n        if (item.data <= categories[i].value) {\r\n          item.color = categories[i].color;\r\n          break;\r\n        }\r\n      }\r\n    } else {\r\n      item.color = gaugeOption.pointer.color;\r\n    }\r\n    let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;\r\n    item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;\r\n    item._oldAngle_ = gaugeOption.oldAngle;\r\n    if (gaugeOption.oldAngle < gaugeOption.endAngle) {\r\n      item._oldAngle_ += 2;\r\n    }\r\n    if (item.data >= gaugeOption.oldData) {\r\n      item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;\r\n    } else {\r\n      item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;\r\n    }\r\n    if (item._proportion_ >= 2) {\r\n      item._proportion_ = item._proportion_ % 2;\r\n    }\r\n  }\r\n  return series;\r\n}\r\n\r\nfunction getPieTextMaxLength(series) {\r\n  series = getPieDataPoints(series);\r\n  let maxLength = 0;\r\n  for (let i = 0; i < series.length; i++) {\r\n    let item = series[i];\r\n    let text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';\r\n    maxLength = Math.max(maxLength, measureText(text));\r\n  }\r\n\r\n  return maxLength;\r\n}\r\n\r\nfunction fixColumeData(points, eachSpacing, columnLen, index, config, opts) {\r\n  return points.map(function(item) {\r\n    if (item === null) {\r\n      return null;\r\n    }\r\n    item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / columnLen);\r\n\r\n    if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {\r\n      item.width = Math.min(item.width, +opts.extra.column.width);\r\n    }\r\n    if (item.width <= 0) {\r\n      item.width = 1;\r\n    }\r\n    item.x += (index + 0.5 - columnLen / 2) * item.width;\r\n    return item;\r\n  });\r\n}\r\n\r\nfunction fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {\r\n  return points.map(function(item) {\r\n    if (item === null) {\r\n      return null;\r\n    }\r\n    item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);\r\n\r\n    if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {\r\n      item.width = Math.min(item.width, +opts.extra.column.width);\r\n    }\r\n\r\n    if (index > 0) {\r\n      item.width -= 2 * border;\r\n    }\r\n    return item;\r\n  });\r\n}\r\n\r\nfunction fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {\r\n\r\n  return points.map(function(item, indexn) {\r\n\r\n    if (item === null) {\r\n      return null;\r\n    }\r\n    item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);\r\n\r\n    if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {\r\n      item.width = Math.min(item.width, +opts.extra.column.width);\r\n    }\r\n    return item;\r\n  });\r\n}\r\n\r\nfunction getXAxisPoints(categories, opts, config) {\r\n  var spacingValid = opts.width - opts.area[1] - opts.area[3];\r\n  var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;\r\n  if((opts.type=='line' || opts.type=='area') && dataCount>1 && opts.xAxis.boundaryGap=='justify'){\r\n    dataCount -=1;\r\n  }\r\n  var eachSpacing = spacingValid / dataCount;\r\n\r\n  var xAxisPoints = [];\r\n  var startX = opts.area[3];\r\n  var endX = opts.width - opts.area[1];\r\n  categories.forEach(function(item, index) {\r\n    xAxisPoints.push(startX + index * eachSpacing);\r\n  });\r\n  if(opts.xAxis.boundaryGap !=='justify'){\r\n    if (opts.enableScroll === true) {\r\n      xAxisPoints.push(startX + categories.length * eachSpacing);\r\n    } else {\r\n      xAxisPoints.push(endX);\r\n    }\r\n  }\r\n  return {\r\n    xAxisPoints: xAxisPoints,\r\n    startX: startX,\r\n    endX: endX,\r\n    eachSpacing: eachSpacing\r\n  };\r\n}\r\n\r\nfunction getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {\r\n  var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;\r\n  var points = [];\r\n  var validHeight = opts.height - opts.area[0] - opts.area[2];\r\n  data.forEach(function(item, index) {\r\n    if (item === null) {\r\n      points.push(null);\r\n    } else {\r\n      var cPoints = [];\r\n      item.forEach(function(items, indexs) {\r\n        var point = {};\r\n        point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);\r\n        var value = items.value || items;\r\n        var height = validHeight * (value - minRange) / (maxRange - minRange);\r\n        height *= process;\r\n        point.y = opts.height - Math.round(height) - opts.area[2];\r\n        cPoints.push(point);\r\n      });\r\n      points.push(cPoints);\r\n    }\r\n  });\r\n\r\n  return points;\r\n}\r\n\r\nfunction getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {\r\n  var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;\r\n  var boundaryGap='center';\r\n  if (opts.type == 'line'||opts.type == 'area'){\r\n    boundaryGap=opts.xAxis.boundaryGap;\r\n  }\r\n  var points = [];\r\n  var validHeight = opts.height - opts.area[0] - opts.area[2];\r\n\tvar validWidth = opts.width - opts.area[1] - opts.area[3];\r\n  data.forEach(function(item, index) {\r\n    if (item === null) {\r\n      points.push(null);\r\n    } else {\r\n      var point = {};\r\n      point.color = item.color;\r\n      point.x = xAxisPoints[index];\r\n      var value = item;\r\n      if (typeof item === 'object' && item !== null) {\r\n\t\t\t\tif (item.constructor == Array) {\r\n\t\t\t\t\tlet xranges,xminRange,xmaxRange;\r\n\t\t\t\t\txranges = [].concat(opts.chartData.xAxisData.ranges);\r\n\t\t\t\t\t\r\n\t\t\t\t\txminRange = xranges.shift();\r\n\t\t\t\t\txmaxRange = xranges.pop();\r\n\t\t\t\t  value = item[1];\r\n\t\t\t\t\tpoint.x = opts.area[3]+ validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);\r\n\t\t\t\t} else {\r\n\t\t\t\t  value = item.value;\r\n\t\t\t\t}\r\n      }\r\n\t\t\tif(boundaryGap=='center'){\r\n\t\t\t  point.x += Math.round(eachSpacing / 2);\r\n\t\t\t}\r\n      var height = validHeight * (value - minRange) / (maxRange - minRange);\r\n      height *= process;\r\n      point.y = opts.height - Math.round(height) - opts.area[2];\r\n      points.push(point);\r\n    }\r\n  });\r\n\r\n  return points;\r\n}\r\n\r\nfunction getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {\r\n  var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;\r\n  var points = [];\r\n  var validHeight = opts.height - opts.area[0] - opts.area[2];\r\n\r\n  data.forEach(function(item, index) {\r\n    if (item === null) {\r\n      points.push(null);\r\n    } else {\r\n      var point = {};\r\n      point.color = item.color;\r\n      point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);\r\n\r\n      if (seriesIndex > 0) {\r\n        var value = 0;\r\n        for (let i = 0; i <= seriesIndex; i++) {\r\n          value += stackSeries[i].data[index];\r\n        }\r\n        var value0 = value - item;\r\n        var height = validHeight * (value - minRange) / (maxRange - minRange);\r\n        var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);\r\n      } else {\r\n        var value = item;\r\n        var height = validHeight * (value - minRange) / (maxRange - minRange);\r\n        var height0 = 0;\r\n      }\r\n      var heightc = height0;\r\n      height *= process;\r\n      heightc *= process;\r\n      point.y = opts.height - Math.round(height) - opts.area[2];\r\n      point.y0 = opts.height - Math.round(heightc) - opts.area[2];\r\n      points.push(point);\r\n    }\r\n  });\r\n\r\n  return points;\r\n}\r\n\r\nfunction getYAxisTextList(series, opts, config, stack) {\r\n  var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\r\n  var data;\r\n  if (stack == 'stack') {\r\n    data = dataCombineStack(series, opts.categories.length);\r\n  } else {\r\n    data = dataCombine(series);\r\n  }\r\n  var sorted = [];\r\n  // remove null from data\r\n  data = data.filter(function(item) {\r\n    //return item !== null;\r\n    if (typeof item === 'object' && item !== null) {\r\n      if (item.constructor == Array) {\r\n        return item !== null;\r\n      } else {\r\n        return item.value !== null;\r\n      }\r\n    } else {\r\n      return item !== null;\r\n    }\r\n  });\r\n  data.map(function(item) {\r\n    if (typeof item === 'object') {\r\n      if (item.constructor == Array) {\r\n\t\t\t\tif(opts.type=='candle'){\r\n\t\t\t\t\titem.map(function(subitem) {\r\n\t\t\t\t\t  sorted.push(subitem);\r\n\t\t\t\t\t})\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsorted.push(item[1]);\r\n\t\t\t\t}\r\n      } else {\r\n        sorted.push(item.value);\r\n      }\r\n    } else {\r\n      sorted.push(item);\r\n    }\r\n  })\r\n\t\r\n  var minData = 0;\r\n  var maxData = 0;\r\n  if (sorted.length > 0) {\r\n    minData = Math.min.apply(this, sorted);\r\n    maxData = Math.max.apply(this, sorted);\r\n  }\r\n  //为了兼容v1.9.0之前的项目\r\n  if(index>-1){\r\n    if (typeof opts.yAxis.data[index].min === 'number') {\r\n      minData = Math.min(opts.yAxis.data[index].min, minData);\r\n    }\r\n    if (typeof opts.yAxis.data[index].max === 'number') {\r\n      maxData = Math.max(opts.yAxis.data[index].max, maxData);\r\n    }\r\n  }else{\r\n    if (typeof opts.yAxis.min === 'number') {\r\n      minData = Math.min(opts.yAxis.min, minData);\r\n    }\r\n    if (typeof opts.yAxis.max === 'number') {\r\n      maxData = Math.max(opts.yAxis.max, maxData);\r\n    }\r\n  }\r\n  \r\n\r\n  if (minData === maxData) {\r\n    var rangeSpan = maxData || 10;\r\n    maxData += rangeSpan;\r\n  }\r\n\r\n  var dataRange = getDataRange(minData, maxData);\r\n  var minRange = dataRange.minRange;\r\n  var maxRange = dataRange.maxRange;\r\n\r\n  var range = [];\r\n  var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;\r\n\r\n  for (var i = 0; i <= opts.yAxis.splitNumber; i++) {\r\n    range.push(minRange + eachRange * i);\r\n  }\r\n  return range.reverse();\r\n}\r\n\r\nfunction calYAxisData(series, opts, config) {\r\n  //堆叠图重算Y轴\r\n  var columnstyle = assign({}, {\r\n    type: \"\"\r\n  }, opts.extra.column);\r\n  //如果是多Y轴,重新计算\r\n  var YLength = opts.yAxis.data.length;\r\n  var newSeries=new Array(YLength);\r\n  if(YLength>0){\r\n    for(let i=0;i<YLength;i++){\r\n      newSeries[i]=[];\r\n      for(let j=0;j<series.length;j++){\r\n        if(series[j].index == i){\r\n          newSeries[i].push(series[j]);\r\n        }\r\n      }\r\n    }\r\n    var rangesArr =new Array(YLength);\r\n    var rangesFormatArr = new Array(YLength);\r\n    var yAxisWidthArr =new Array(YLength);\r\n\t\t\r\n    for(let i=0;i<YLength;i++){\r\n      let yData = opts.yAxis.data[i];\r\n\t\t\t//如果总开关不显示,强制每个Y轴为不显示\r\n\t\t\tif(opts.yAxis.disabled == true){\r\n\t\t\t\tyData.disabled = true;\r\n\t\t\t}\r\n\t\t\trangesArr[i]=getYAxisTextList(newSeries[i], opts, config, columnstyle.type,i);\r\n\t\t\tlet yAxisFontSizes = yData.fontSize || config.fontSize;\r\n\t\t\tyAxisWidthArr[i] = {position:yData.position?yData.position:'left',width:0};\r\n\t\t\trangesFormatArr[i]= rangesArr[i].map(function(items) {\r\n\t\t\t\titems = util.toFixed(items, 6);\r\n\t\t\t\titems = yData.format ? yData.format(Number(items)) : items;\r\n\t\t\t\tyAxisWidthArr[i].width = Math.max(yAxisWidthArr[i].width, measureText(items, yAxisFontSizes) + 5);\r\n\t\t\t\treturn items;\r\n\t\t\t});\r\n\t\t\tlet calibration= yData.calibration? 4*opts.pixelRatio : 0 ;\r\n\t\t\tyAxisWidthArr[i].width += calibration +3*opts.pixelRatio;\r\n      if (yData.disabled === true) {\r\n        yAxisWidthArr[i].width=0;\r\n      }\r\n    }\r\n    \r\n  }else{\r\n    var rangesArr =new Array(1);\r\n    var rangesFormatArr = new Array(1);\r\n    var yAxisWidthArr =new Array(1);\r\n\t\trangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type);\r\n\t\tyAxisWidthArr[0] = {position:'left',width:0};\r\n\t\tvar yAxisFontSize = opts.yAxis.fontSize || config.fontSize;\r\n\t\trangesFormatArr[0] = rangesArr[0].map(function(item) {\r\n\t\t\titem = util.toFixed(item, 6);\r\n\t\t\titem = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item;\r\n\t\t\tyAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize) + 5);\r\n\t\t\treturn item;\r\n\t\t});\r\n\t\tyAxisWidthArr[0].width += 3*opts.pixelRatio;\r\n\t\tif (opts.yAxis.disabled === true) {\r\n\t\t  yAxisWidthArr[0] = {position:'left',width:0};\r\n\t\t  opts.yAxis.data[0]={disabled:true};\r\n\t\t}else{\r\n\t\t\topts.yAxis.data[0]={disabled:false,position:'left',max:opts.yAxis.max,min:opts.yAxis.min,format:opts.yAxis.format};\r\n\t\t}\r\n    \r\n  }\r\n\r\n  return {\r\n    rangesFormat: rangesFormatArr,\r\n    ranges: rangesArr,\r\n    yAxisWidth: yAxisWidthArr\r\n  };\r\n  \r\n}\r\n\r\nfunction calTooltipYAxisData(point, series, opts, config, eachSpacing) {\r\n  let ranges = [].concat(opts.chartData.yAxisData.ranges);\r\n  let spacingValid = opts.height - opts.area[0] - opts.area[2];\r\n  let minAxis = opts.area[0];\r\n  let items=[];\r\n  for(let i=0;i<ranges.length;i++){\r\n    let maxVal = ranges[i].shift();\r\n    let minVal = ranges[i].pop();\r\n    let item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;\r\n    item = opts.yAxis.data[i].format ? opts.yAxis.data[i].format(Number(item)) : item.toFixed(0);\r\n    items.push(String(item))\r\n  }\r\n  return items;\r\n}\r\n\r\nfunction calMarkLineData(points, opts) {\r\n  let minRange, maxRange;\r\n  let spacingValid = opts.height - opts.area[0] - opts.area[2];\r\n  for (let i = 0; i < points.length; i++) {\r\n    points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex:0;\r\n    let range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);\r\n    minRange = range.pop();\r\n    maxRange = range.shift();\r\n    let height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);\r\n    points[i].y = opts.height - Math.round(height) - opts.area[2];\r\n  }\r\n  return points;\r\n}\r\n\r\nfunction contextRotate(context, opts) {\r\n  if (opts.rotateLock !== true) {\r\n    context.translate(opts.height, 0);\r\n    context.rotate(90 * Math.PI / 180);\r\n  } else if (opts._rotate_ !== true) {\r\n    context.translate(opts.height, 0);\r\n    context.rotate(90 * Math.PI / 180);\r\n    opts._rotate_ = true;\r\n  }\r\n}\r\n\r\nfunction drawPointShape(points, color, shape, context, opts) {\r\n  context.beginPath();\r\n\tif(opts.dataPointShapeType == 'hollow'){\r\n\t\tcontext.setStrokeStyle(color);\r\n\t\tcontext.setFillStyle(opts.background);\r\n\t\tcontext.setLineWidth(2 * opts.pixelRatio);\r\n\t}else{\r\n\t\tcontext.setStrokeStyle(\"#ffffff\");\r\n\t\tcontext.setFillStyle(color);\r\n\t\tcontext.setLineWidth(1 * opts.pixelRatio);\r\n\t}\r\n  if (shape === 'diamond') {\r\n    points.forEach(function(item, index) {\r\n      if (item !== null) {\r\n        context.moveTo(item.x, item.y - 4.5);\r\n        context.lineTo(item.x - 4.5, item.y);\r\n        context.lineTo(item.x, item.y + 4.5);\r\n        context.lineTo(item.x + 4.5, item.y);\r\n        context.lineTo(item.x, item.y - 4.5);\r\n      }\r\n    });\r\n  } else if (shape === 'circle') {\r\n    points.forEach(function(item, index) {\r\n      if (item !== null) {\r\n        context.moveTo(item.x + 2.5 * opts.pixelRatio, item.y);\r\n        context.arc(item.x, item.y, 3 * opts.pixelRatio, 0, 2 * Math.PI, false);\r\n      }\r\n    });\r\n  } else if (shape === 'rect') {\r\n    points.forEach(function(item, index) {\r\n      if (item !== null) {\r\n        context.moveTo(item.x - 3.5, item.y - 3.5);\r\n        context.rect(item.x - 3.5, item.y - 3.5, 7, 7);\r\n      }\r\n    });\r\n  } else if (shape === 'triangle') {\r\n    points.forEach(function(item, index) {\r\n      if (item !== null) {\r\n        context.moveTo(item.x, item.y - 4.5);\r\n        context.lineTo(item.x - 4.5, item.y + 4.5);\r\n        context.lineTo(item.x + 4.5, item.y + 4.5);\r\n        context.lineTo(item.x, item.y - 4.5);\r\n      }\r\n    });\r\n  }\r\n  context.closePath();\r\n  context.fill();\r\n  context.stroke();\r\n}\r\n\r\nfunction drawRingTitle(opts, config, context, center) {\r\n  var titlefontSize = opts.title.fontSize || config.titleFontSize;\r\n  var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;\r\n  var title = opts.title.name || '';\r\n  var subtitle = opts.subtitle.name || '';\r\n  var titleFontColor = opts.title.color || config.titleColor;\r\n  var subtitleFontColor = opts.subtitle.color || config.subtitleColor;\r\n  var titleHeight = title ? titlefontSize : 0;\r\n  var subtitleHeight = subtitle ? subtitlefontSize : 0;\r\n  var margin = 5;\r\n\r\n  if (subtitle) {\r\n    var textWidth = measureText(subtitle, subtitlefontSize);\r\n    var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0);\r\n    var startY = center.y + subtitlefontSize / 2 + (opts.subtitle.offsetY || 0);\r\n    if (title) {\r\n      startY += (titleHeight + margin) / 2;\r\n    }\r\n    context.beginPath();\r\n    context.setFontSize(subtitlefontSize);\r\n    context.setFillStyle(subtitleFontColor);\r\n    context.fillText(subtitle, startX, startY);\r\n    context.closePath();\r\n    context.stroke();\r\n  }\r\n  if (title) {\r\n    var _textWidth = measureText(title, titlefontSize);\r\n    var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);\r\n    var _startY = center.y + titlefontSize / 2 + (opts.title.offsetY || 0);\r\n    if (subtitle) {\r\n      _startY -= (subtitleHeight + margin) / 2;\r\n    }\r\n    context.beginPath();\r\n    context.setFontSize(titlefontSize);\r\n    context.setFillStyle(titleFontColor);\r\n    context.fillText(title, _startX, _startY);\r\n    context.closePath();\r\n    context.stroke();\r\n  }\r\n}\r\n\r\nfunction drawPointText(points, series, config, context) {\r\n  // 绘制数据文案\r\n  var data = series.data;\r\n  points.forEach(function(item, index) {\r\n    if (item !== null) {\r\n      //var formatVal = series.format ? series.format(data[index]) : data[index];\r\n      context.beginPath();\r\n      context.setFontSize(series.textSize || config.fontSize);\r\n      context.setFillStyle(series.textColor || '#666666');\r\n      var value = data[index]\r\n      if (typeof data[index] === 'object' && data[index] !== null) {\r\n\t\t\t\tif (data[index].constructor == Array) {\r\n\t\t\t\t\tvalue = data[index][1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvalue = data[index].value\r\n\t\t\t\t}\r\n      }\r\n      var formatVal = series.format ? series.format(value) : value;\r\n      context.fillText(String(formatVal), item.x - measureText(formatVal, series.textSize || config.fontSize) / 2, item.y -4);\r\n      context.closePath();\r\n      context.stroke();\r\n    }\r\n  });\r\n\r\n}\r\n\r\nfunction drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {\r\n  radius -= gaugeOption.width / 2 + config.gaugeLabelTextMargin;\r\n\r\n  let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;\r\n  let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;\r\n  let totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;\r\n  let splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;\r\n  let nowAngle = gaugeOption.startAngle;\r\n  let nowNumber = gaugeOption.startNumber;\r\n  for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {\r\n    var pos = {\r\n      x: radius * Math.cos(nowAngle * Math.PI),\r\n      y: radius * Math.sin(nowAngle * Math.PI)\r\n    };\r\n    var labelText = gaugeOption.labelFormat ? gaugeOption.labelFormat(nowNumber) : nowNumber;\r\n    pos.x += centerPosition.x - measureText(labelText) / 2;\r\n    pos.y += centerPosition.y;\r\n    var startX = pos.x;\r\n    var startY = pos.y;\r\n    context.beginPath();\r\n    context.setFontSize(config.fontSize);\r\n    context.setFillStyle(gaugeOption.labelColor || '#666666');\r\n    context.fillText(labelText, startX, startY + config.fontSize / 2);\r\n    context.closePath();\r\n    context.stroke();\r\n\r\n    nowAngle += splitAngle;\r\n    if (nowAngle >= 2) {\r\n      nowAngle = nowAngle % 2;\r\n    }\r\n    nowNumber += splitNumber;\r\n  }\r\n\r\n}\r\n\r\nfunction drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {\r\n  var radarOption = opts.extra.radar || {};\r\n  radius += config.radarLabelTextMargin;\r\n\r\n  angleList.forEach(function(angle, index) {\r\n    var pos = {\r\n      x: radius * Math.cos(angle),\r\n      y: radius * Math.sin(angle)\r\n    };\r\n    var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);\r\n    var startX = posRelativeCanvas.x;\r\n    var startY = posRelativeCanvas.y;\r\n    if (util.approximatelyEqual(pos.x, 0)) {\r\n      startX -= measureText(opts.categories[index] || '') / 2;\r\n    } else if (pos.x < 0) {\r\n      startX -= measureText(opts.categories[index] || '');\r\n    }\r\n    context.beginPath();\r\n    context.setFontSize(config.fontSize);\r\n    context.setFillStyle(radarOption.labelColor || '#666666');\r\n    context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);\r\n    context.closePath();\r\n    context.stroke();\r\n  });\r\n\r\n}\r\n\r\nfunction drawPieText(series, opts, config, context, radius, center) {\r\n  var lineRadius = config.pieChartLinePadding;\r\n  var textObjectCollection = [];\r\n  var lastTextObject = null;\r\n\r\n  var seriesConvert = series.map(function(item) {\r\n    var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_.toFixed(4) * 100) +'%';\r\n    if(item._rose_proportion_) item._proportion_=item._rose_proportion_;\r\n    var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);\r\n    var color = item.color;\r\n    var radius = item._radius_;\r\n    return {\r\n      arc: arc,\r\n      text: text,\r\n      color: color,\r\n      radius: radius,\r\n      textColor: item.textColor,\r\n      textSize: item.textSize,\r\n    };\r\n  });\r\n  for (let i = 0; i < seriesConvert.length; i++) {\r\n    let item = seriesConvert[i];\r\n    // line end\r\n    let orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);\r\n    let orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);\r\n\r\n    // line start\r\n    let orginX2 = Math.cos(item.arc) * item.radius;\r\n    let orginY2 = Math.sin(item.arc) * item.radius;\r\n\r\n    // text start\r\n    let orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;\r\n    let orginY3 = orginY1;\r\n    let textWidth = measureText(item.text,item.textSize||config.fontSize);\r\n    let startY = orginY3;\r\n\r\n    if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {\r\n        x: orginX3\r\n      })) {\r\n      if (orginX3 > 0) {\r\n        startY = Math.min(orginY3, lastTextObject.start.y);\r\n      } else if (orginX1 < 0) {\r\n        startY = Math.max(orginY3, lastTextObject.start.y);\r\n      } else {\r\n        if (orginY3 > 0) {\r\n          startY = Math.max(orginY3, lastTextObject.start.y);\r\n        } else {\r\n          startY = Math.min(orginY3, lastTextObject.start.y);\r\n        }\r\n      }\r\n    }\r\n    if (orginX3 < 0) {\r\n      orginX3 -= textWidth;\r\n    }\r\n\r\n    let textObject = {\r\n      lineStart: {\r\n        x: orginX2,\r\n        y: orginY2\r\n      },\r\n      lineEnd: {\r\n        x: orginX1,\r\n        y: orginY1\r\n      },\r\n      start: {\r\n        x: orginX3,\r\n        y: startY\r\n      },\r\n      width: textWidth,\r\n      height: config.fontSize,\r\n      text: item.text,\r\n      color: item.color,\r\n      textColor: item.textColor,\r\n      textSize: item.textSize\r\n    };\r\n    lastTextObject = avoidCollision(textObject, lastTextObject);\r\n    textObjectCollection.push(lastTextObject);\r\n  }\r\n\r\n  for (let i = 0; i < textObjectCollection.length; i++) {\r\n    let item = textObjectCollection[i];\r\n    let lineStartPoistion = convertCoordinateOrigin(item.lineStart.x, item.lineStart.y, center);\r\n    let lineEndPoistion = convertCoordinateOrigin(item.lineEnd.x, item.lineEnd.y, center);\r\n    let textPosition = convertCoordinateOrigin(item.start.x, item.start.y, center);\r\n    context.setLineWidth(1 * opts.pixelRatio);\r\n    context.setFontSize(config.fontSize);\r\n    context.beginPath();\r\n    context.setStrokeStyle(item.color);\r\n    context.setFillStyle(item.color);\r\n    context.moveTo(lineStartPoistion.x, lineStartPoistion.y);\r\n    let curveStartX = item.start.x < 0 ? textPosition.x + item.width : textPosition.x;\r\n    let textStartX = item.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;\r\n    context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);\r\n    context.moveTo(lineStartPoistion.x, lineStartPoistion.y);\r\n    context.stroke();\r\n    context.closePath();\r\n    context.beginPath();\r\n    context.moveTo(textPosition.x + item.width, textPosition.y);\r\n    context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);\r\n    context.closePath();\r\n    context.fill();\r\n    context.beginPath();\r\n    context.setFontSize(item.textSize || config.fontSize);\r\n    context.setFillStyle(item.textColor || '#666666');\r\n    context.fillText(item.text, textStartX, textPosition.y + 3);\r\n    context.closePath();\r\n    context.stroke();\r\n    context.closePath();\r\n  }\r\n}\r\n\r\nfunction drawToolTipSplitLine(offsetX, opts, config, context) {\r\n  var toolTipOption = opts.extra.tooltip || {};\r\n  toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;\r\n  toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;\r\n  var startY = opts.area[0];\r\n  var endY = opts.height - opts.area[2];\r\n\r\n  if (toolTipOption.gridType == 'dash') {\r\n    context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);\r\n  }\r\n  context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');\r\n  context.setLineWidth(1 * opts.pixelRatio);\r\n  context.beginPath();\r\n  context.moveTo(offsetX, startY);\r\n  context.lineTo(offsetX, endY);\r\n  context.stroke();\r\n  context.setLineDash([]);\r\n\r\n  if (toolTipOption.xAxisLabel) {\r\n    let labelText = opts.categories[opts.tooltip.index];\r\n    context.setFontSize(config.fontSize);\r\n    let textWidth = measureText(labelText, config.fontSize);\r\n\r\n    let textX = offsetX - 0.5 * textWidth;\r\n    let textY = endY;\r\n    context.beginPath();\r\n    context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));\r\n    context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);\r\n    context.setLineWidth(1 * opts.pixelRatio);\r\n    context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);\r\n    context.closePath();\r\n    context.stroke();\r\n    context.fill();\r\n\r\n    context.beginPath();\r\n    context.setFontSize(config.fontSize);\r\n    context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);\r\n    context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);\r\n    context.closePath();\r\n    context.stroke();\r\n  }\r\n}\r\n\r\nfunction drawMarkLine(opts, config, context) {\r\n  let markLineOption = assign({}, {\r\n    type: 'solid',\r\n    dashLength: 4,\r\n    data: []\r\n  }, opts.extra.markLine);\r\n  let startX = opts.area[3];\r\n  let endX = opts.width - opts.area[1];\r\n  let points = calMarkLineData(markLineOption.data, opts);\r\n\r\n  for (let i = 0; i < points.length; i++) {\r\n    let item = assign({}, {\r\n      lineColor: '#DE4A42',\r\n      showLabel: false,\r\n      labelFontColor: '#666666',\r\n      labelBgColor: '#DFE8FF',\r\n      labelBgOpacity: 0.8,\r\n      yAxisIndex: 0\r\n    }, points[i]);\r\n\r\n    if (markLineOption.type == 'dash') {\r\n      context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);\r\n    }\r\n    context.setStrokeStyle(item.lineColor);\r\n    context.setLineWidth(1 * opts.pixelRatio);\r\n    context.beginPath();\r\n    context.moveTo(startX, item.y);\r\n    context.lineTo(endX, item.y);\r\n    context.stroke();\r\n    context.setLineDash([]);\r\n    if (item.showLabel) {\r\n      let labelText = opts.yAxis.format ? opts.yAxis.format(Number(item.value)) : item.value;\r\n      context.setFontSize(config.fontSize);\r\n      let textWidth = measureText(labelText, config.fontSize);\r\n      let bgStartX = opts.padding[3] + config.yAxisTitleWidth - config.toolTipPadding;\r\n      let bgEndX = Math.max(opts.area[3], textWidth + config.toolTipPadding * 2);\r\n      let bgWidth = bgEndX - bgStartX;\r\n\r\n      let textX = bgStartX + (bgWidth - textWidth) / 2;\r\n      let textY = item.y;\r\n      context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));\r\n      context.setStrokeStyle(item.labelBgColor);\r\n      context.setLineWidth(1 * opts.pixelRatio);\r\n      context.beginPath();\r\n      context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);\r\n      context.closePath();\r\n      context.stroke();\r\n      context.fill();\r\n\r\n      context.beginPath();\r\n      context.setFontSize(config.fontSize);\r\n      context.setFillStyle(item.labelFontColor);\r\n      context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);\r\n      context.stroke();\r\n    }\r\n  }\r\n}\r\n\r\nfunction drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {\r\n  var toolTipOption = assign({}, {\r\n    gridType: 'solid',\r\n    dashLength: 4\r\n  }, opts.extra.tooltip);\r\n\r\n  var startX = opts.area[3];\r\n  var endX = opts.width - opts.area[1];\r\n\r\n  if (toolTipOption.gridType == 'dash') {\r\n    context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);\r\n  }\r\n  context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');\r\n  context.setLineWidth(1 * opts.pixelRatio);\r\n  context.beginPath();\r\n  context.moveTo(startX, opts.tooltip.offset.y);\r\n  context.lineTo(endX, opts.tooltip.offset.y);\r\n  context.stroke();\r\n  context.setLineDash([]);\r\n\r\n  if (toolTipOption.yAxisLabel) {\r\n    let labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);\r\n    let widthArr = opts.chartData.yAxisData.yAxisWidth;\r\n    let tStartLeft=opts.area[3];\r\n    let tStartRight=opts.width-opts.area[1];\r\n    for(let i=0;i<labelText.length;i++){\r\n      context.setFontSize(config.fontSize);\r\n      let textWidth = measureText(labelText[i], config.fontSize);\r\n      let bgStartX,bgEndX,bgWidth;\r\n      if(widthArr[i].position == 'left'){\r\n        bgStartX = tStartLeft - widthArr[i].width;\r\n        bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);\r\n      }else{\r\n        bgStartX = tStartRight;\r\n        bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);\r\n      }\r\n      bgWidth = bgEndX - bgStartX;\r\n      \r\n      let textX = bgStartX + (bgWidth - textWidth) / 2;\r\n      let textY = opts.tooltip.offset.y;\r\n      context.beginPath();\r\n      context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));\r\n      context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);\r\n      context.setLineWidth(1 * opts.pixelRatio);\r\n      context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);\r\n      context.closePath();\r\n      context.stroke();\r\n      context.fill();\r\n      \r\n      context.beginPath();\r\n      context.setFontSize(config.fontSize);\r\n      context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);\r\n      context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);\r\n      context.closePath();\r\n      context.stroke();\r\n      if(widthArr[i].position == 'left'){\r\n        tStartLeft -=(widthArr[i].width + opts.yAxis.padding);\r\n      }else{\r\n        tStartRight +=widthArr[i].width+ opts.yAxis.padding;\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\nfunction drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {\r\n  var toolTipOption = assign({}, {\r\n    activeBgColor: '#000000',\r\n    activeBgOpacity: 0.08\r\n  }, opts.extra.tooltip);\r\n  var startY = opts.area[0];\r\n  var endY = opts.height - opts.area[2];\r\n  context.beginPath();\r\n  context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));\r\n  context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);\r\n  context.closePath();\r\n  context.fill();\r\n}\r\n\r\nfunction drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {\r\n  var toolTipOption = assign({}, {\r\n\t\tshowBox:true,\r\n    bgColor: '#000000',\r\n    bgOpacity: 0.7,\r\n    fontColor: '#FFFFFF'\r\n  }, opts.extra.tooltip);\r\n  var legendWidth = 4 * opts.pixelRatio;\r\n  var legendMarginRight = 5 * opts.pixelRatio;\r\n  var arrowWidth = 8 * opts.pixelRatio;\r\n  var isOverRightBorder = false;\r\n  if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {\r\n    drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);\r\n  }\r\n\r\n  offset = assign({\r\n    x: 0,\r\n    y: 0\r\n  }, offset);\r\n  offset.y -= 8 * opts.pixelRatio;\r\n  var textWidth = textList.map(function(item) {\r\n    return measureText(item.text, config.fontSize);\r\n  });\r\n  var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);\r\n  var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;\r\n\r\n\tif(toolTipOption.showBox == false){ return }\r\n  // if beyond the right border\r\n  if (offset.x - Math.abs(opts._scrollDistance_) + arrowWidth + toolTipWidth > opts.width) {\r\n    isOverRightBorder = true;\r\n  }\r\n  if (toolTipHeight + offset.y > opts.height) {\r\n    offset.y = opts.height - toolTipHeight;\r\n  }\r\n  // draw background rect\r\n  context.beginPath();\r\n  context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));\r\n  if (isOverRightBorder) {\r\n    context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);\r\n    context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);\r\n    context.lineTo(offset.x - arrowWidth, offset.y);\r\n    context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y);\r\n    context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y + toolTipHeight);\r\n    context.lineTo(offset.x - arrowWidth, offset.y + toolTipHeight);\r\n    context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);\r\n    context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);\r\n  } else {\r\n    context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);\r\n    context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);\r\n    context.lineTo(offset.x + arrowWidth, offset.y);\r\n    context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y);\r\n    context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y + toolTipHeight);\r\n    context.lineTo(offset.x + arrowWidth, offset.y + toolTipHeight);\r\n    context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);\r\n    context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);\r\n  }\r\n\r\n  context.closePath();\r\n  context.fill();\r\n\r\n  // draw legend\r\n  textList.forEach(function(item, index) {\r\n    if (item.color !== null) {\r\n      context.beginPath();\r\n      context.setFillStyle(item.color);\r\n      var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;\r\n      var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index +\r\n        config.toolTipPadding + 1;\r\n      if (isOverRightBorder) {\r\n        startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;\r\n      }\r\n      context.fillRect(startX, startY, legendWidth, config.fontSize);\r\n      context.closePath();\r\n    }\r\n  });\r\n\r\n  // draw text list\r\n\r\n  textList.forEach(function(item, index) {\r\n    var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;\r\n    if (isOverRightBorder) {\r\n      startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;\r\n    }\r\n    var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index +\r\n      config.toolTipPadding;\r\n    context.beginPath();\r\n    context.setFontSize(config.fontSize);\r\n    context.setFillStyle(toolTipOption.fontColor);\r\n    context.fillText(item.text, startX, startY + config.fontSize);\r\n    context.closePath();\r\n    context.stroke();\r\n  });\r\n}\r\n\r\nfunction drawYAxisTitle(title, opts, config, context) {\r\n  var startX = config.xAxisHeight + (opts.height - config.xAxisHeight - measureText(title)) / 2;\r\n  context.save();\r\n  context.beginPath();\r\n  context.setFontSize(config.fontSize);\r\n  context.setFillStyle(opts.yAxis.titleFontColor || '#333333');\r\n  context.translate(0, opts.height);\r\n  context.rotate(-90 * Math.PI / 180);\r\n  context.fillText(title, startX, opts.padding[3] + 0.5 * config.fontSize);\r\n  context.closePath();\r\n  context.stroke();\r\n  context.restore();\r\n}\r\n\r\nfunction drawColumnDataPoints(series, opts, config, context) {\r\n  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  let xAxisData = opts.chartData.xAxisData,\r\n    xAxisPoints = xAxisData.xAxisPoints,\r\n    eachSpacing = xAxisData.eachSpacing;\r\n  let columnOption = assign({}, {\r\n    type: 'group',\r\n    width: eachSpacing / 2,\r\n    meter: {\r\n      border: 4,\r\n      fillColor: '#FFFFFF'\r\n    }\r\n  }, opts.extra.column);\r\n  \r\n  let calPoints = [];\r\n  context.save();\r\n\t\r\n\tlet leftNum=-2;\r\n\tlet rightNum=xAxisPoints.length+2;\r\n\t\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n\t\tleftNum=Math.floor(-opts._scrollDistance_/eachSpacing)-2;\r\n\t\trightNum=leftNum+opts.xAxis.itemCount+4;\r\n  }\r\n  if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {\r\n    drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);\r\n  }\r\n\t\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    let ranges,minRange,maxRange;\r\n    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n    minRange = ranges.pop();\r\n    maxRange = ranges.shift();\r\n    \r\n    var data = eachSeries.data;\r\n    switch (columnOption.type) {\r\n      case 'group':\r\n        var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n        var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);\r\n        calPoints.push(tooltipPoints);\r\n        points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);\r\n\t\t\t\tfor(let i=0;i<points.length;i++){\r\n\t\t\t\t\tlet item=points[i];\r\n          if (item !== null && i>leftNum && i<rightNum) {\r\n            context.beginPath();\r\n            context.setStrokeStyle(item.color || eachSeries.color);\r\n            context.setLineWidth(1)\r\n            context.setFillStyle(item.color || eachSeries.color);\r\n            var startX = item.x - item.width / 2;\r\n            var height = opts.height - item.y - opts.area[2];\r\n            context.moveTo(startX-1, item.y);\r\n            context.lineTo(startX+item.width-2,item.y);\r\n            context.lineTo(startX+item.width-2,opts.height - opts.area[2]);\r\n            context.lineTo(startX,opts.height - opts.area[2]);\r\n            context.lineTo(startX,item.y);\r\n            context.closePath();\r\n            context.stroke();\r\n            context.fill();\r\n          }\r\n        };\r\n        break;\r\n      case 'stack':\r\n        // 绘制堆叠数据图\r\n        var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);\r\n        calPoints.push(points);\r\n        points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);\r\n\r\n        for(let i=0;i<points.length;i++){\r\n        \tlet item=points[i];\r\n          if (item !== null && i>leftNum && i<rightNum) {\r\n            context.beginPath();\r\n            context.setFillStyle(item.color || eachSeries.color);\r\n            var startX = item.x - item.width / 2 + 1;\r\n            var height = opts.height - item.y - opts.area[2];\r\n            var height0 = opts.height - item.y0 - opts.area[2];\r\n            if (seriesIndex > 0) {\r\n              height -= height0;\r\n            }\r\n            context.moveTo(startX, item.y);\r\n            context.fillRect(startX, item.y, item.width - 2, height);\r\n            context.closePath();\r\n            context.fill();\r\n          }\r\n        };\r\n        break;\r\n      case 'meter':\r\n        // 绘制温度计数据图\r\n        var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n        calPoints.push(points);\r\n        points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meter.border);\r\n        if (seriesIndex == 0) {\r\n          for(let i=0;i<points.length;i++){\r\n          \tlet item=points[i];\r\n            if (item !== null && i>leftNum && i<rightNum) {\r\n              //画背景颜色\r\n              context.beginPath();\r\n              context.setFillStyle(columnOption.meter.fillColor);\r\n              var startX = item.x - item.width / 2;\r\n              var height = opts.height - item.y - opts.area[2];\r\n              context.moveTo(startX, item.y);\r\n              context.fillRect(startX, item.y, item.width, height);\r\n              context.closePath();\r\n              context.fill();\r\n              //画边框线\r\n              if (columnOption.meter.border > 0) {\r\n                context.beginPath();\r\n                context.setStrokeStyle(eachSeries.color);\r\n                context.setLineWidth(columnOption.meter.border * opts.pixelRatio);\r\n                context.moveTo(startX + columnOption.meter.border * 0.5, item.y + height);\r\n                context.lineTo(startX + columnOption.meter.border * 0.5, item.y + columnOption.meter.border * 0.5);\r\n                context.lineTo(startX + item.width - columnOption.meter.border * 0.5, item.y + columnOption.meter.border * 0.5);\r\n                context.lineTo(startX + item.width - columnOption.meter.border * 0.5, item.y + height);\r\n                context.stroke();\r\n              }\r\n            }\r\n          };\r\n        } else {\r\n          for(let i=0;i<points.length;i++){\r\n          \tlet item=points[i];\r\n            if (item !== null && i>leftNum && i<rightNum) {\r\n              context.beginPath();\r\n              context.setFillStyle(item.color || eachSeries.color);\r\n              var startX = item.x - item.width / 2;\r\n              var height = opts.height - item.y - opts.area[2];\r\n              context.moveTo(startX, item.y);\r\n              context.fillRect(startX, item.y, item.width, height);\r\n              context.closePath();\r\n              context.fill();\r\n            }\r\n          };\r\n        }\r\n        break;\r\n    }\r\n  });\r\n\r\n  if (opts.dataLabel !== false && process === 1) {\r\n    series.forEach(function(eachSeries, seriesIndex) {\r\n      let ranges,minRange,maxRange;\r\n        ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n        minRange = ranges.pop();\r\n        maxRange = ranges.shift();\r\n      var data = eachSeries.data;\r\n      switch (columnOption.type) {\r\n        case 'group':\r\n          var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n          points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);\r\n          drawPointText(points, eachSeries, config, context);\r\n          break;\r\n        case 'stack':\r\n          var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);\r\n          drawPointText(points, eachSeries, config, context);\r\n          break;\r\n        case 'meter':\r\n          var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n          drawPointText(points, eachSeries, config, context);\r\n          break;\r\n      }\r\n    });\r\n  }\r\n\r\n  context.restore();\r\n\r\n  return {\r\n    xAxisPoints: xAxisPoints,\r\n    calPoints: calPoints,\r\n    eachSpacing: eachSpacing\r\n  };\r\n}\r\n\r\nfunction drawCandleDataPoints(series, seriesMA, opts, config, context) {\r\n  var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;\r\n  var candleOption = assign({}, {\r\n    color: {},\r\n    average: {}\r\n  }, opts.extra.candle);\r\n  candleOption.color = assign({}, {\r\n    upLine: '#f04864',\r\n    upFill: '#f04864',\r\n    downLine: '#2fc25b',\r\n    downFill: '#2fc25b'\r\n  }, candleOption.color);\r\n  candleOption.average = assign({}, {\r\n    show: false,\r\n    name: [],\r\n    day: [],\r\n    color: config.colors\r\n  }, candleOption.average);\r\n  opts.extra.candle = candleOption;\r\n\r\n  let xAxisData = opts.chartData.xAxisData,\r\n    xAxisPoints = xAxisData.xAxisPoints,\r\n    eachSpacing = xAxisData.eachSpacing;\r\n\r\n  let calPoints = [];\r\n\r\n  context.save();\r\n\t\r\n\tlet leftNum=-2;\r\n\tlet rightNum=xAxisPoints.length+2;\r\n\tlet leftSpace=0;\r\n\tlet rightSpace=opts.width+eachSpacing;\r\n\t\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n\t\tleftNum=Math.floor(-opts._scrollDistance_/eachSpacing)-2;\r\n\t\trightNum=leftNum+opts.xAxis.itemCount+4;\r\n\t\tleftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];\r\n\t\trightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;\r\n  }\r\n\r\n  //画均线\r\n  if (candleOption.average.show) {\r\n    seriesMA.forEach(function(eachSeries, seriesIndex) {\r\n      let ranges,minRange,maxRange;\r\n      ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n      minRange = ranges.pop();\r\n      maxRange = ranges.shift();\r\n\r\n      var data = eachSeries.data;\r\n      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n      var splitPointList = splitPoints(points);\r\n\t\t\t\r\n\t\t\tfor(let i=0;i<splitPointList.length;i++){\r\n\t\t\t\tlet points=splitPointList[i];\r\n\t\t\t\tcontext.beginPath();\r\n\t\t\t\tcontext.setStrokeStyle(eachSeries.color);\r\n\t\t\t\tcontext.setLineWidth(1);\r\n\t\t\t\tif (points.length === 1) {\r\n\t\t\t\t\tcontext.moveTo(points[0].x, points[0].y);\r\n\t\t\t\t\tcontext.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontext.moveTo(points[0].x, points[0].y);\r\n\t\t\t\t\tlet startPoint=0;\r\n\t\t\t\t\tfor(let j=0;j<points.length;j++){\r\n\t\t\t\t\t\tlet item=points[j];\r\n\t\t\t\t\t\tif(startPoint==0 && item.x > leftSpace){\r\n\t\t\t\t\t\t\tcontext.moveTo(item.x, item.y);\r\n\t\t\t\t\t\t\tstartPoint=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n\t\t\t\t\t\t\tvar ctrlPoint = createCurveControlPoints(points, j - 1);\r\n\t\t\t\t\t\t\tcontext.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontext.moveTo(points[0].x, points[0].y);\r\n\t\t\t\t}\r\n\t\t\t\tcontext.closePath();\r\n\t\t\t\tcontext.stroke();\r\n      }\r\n    });\r\n  }\r\n  //画K线\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    let ranges,minRange,maxRange;\r\n    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n    minRange = ranges.pop();\r\n    maxRange = ranges.shift();\r\n    var data = eachSeries.data;\r\n    var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n    calPoints.push(points);\r\n    var splitPointList = splitPoints(points);\r\n\r\n\t\tfor(let i=0;i<splitPointList[0].length;i++){\r\n\t\t\tif(i>leftNum && i<rightNum){\r\n\t\t\t\tlet item=splitPointList[0][i];\r\n\t\t\t\tcontext.beginPath();\r\n\t\t\t\t//如果上涨\r\n\t\t\t\tif (data[i][1] - data[i][0] > 0) {\r\n\t\t\t\t\tcontext.setStrokeStyle(candleOption.color.upLine);\r\n\t\t\t\t\tcontext.setFillStyle(candleOption.color.upFill);\r\n\t\t\t\t\tcontext.setLineWidth(1 * opts.pixelRatio);\r\n\t\t\t\t\tcontext.moveTo(item[3].x, item[3].y); //顶点\r\n\t\t\t\t\tcontext.lineTo(item[1].x, item[1].y); //收盘中间点\r\n\t\t\t\t\tcontext.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点\r\n\t\t\t\t\tcontext.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点\r\n\t\t\t\t\tcontext.lineTo(item[0].x, item[0].y); //开盘中间点\r\n\t\t\t\t\tcontext.lineTo(item[2].x, item[2].y); //底点\r\n\t\t\t\t\tcontext.lineTo(item[0].x, item[0].y); //开盘中间点\r\n\t\t\t\t\tcontext.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点\r\n\t\t\t\t\tcontext.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点\r\n\t\t\t\t\tcontext.lineTo(item[1].x, item[1].y); //收盘中间点\r\n\t\t\t\t\tcontext.moveTo(item[3].x, item[3].y); //顶点\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontext.setStrokeStyle(candleOption.color.downLine);\r\n\t\t\t\t\tcontext.setFillStyle(candleOption.color.downFill);\r\n\t\t\t\t\tcontext.setLineWidth(1 * opts.pixelRatio);\r\n\t\t\t\t\tcontext.moveTo(item[3].x, item[3].y); //顶点\r\n\t\t\t\t\tcontext.lineTo(item[0].x, item[0].y); //开盘中间点\r\n\t\t\t\t\tcontext.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点\r\n\t\t\t\t\tcontext.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点\r\n\t\t\t\t\tcontext.lineTo(item[1].x, item[1].y); //收盘中间点\r\n\t\t\t\t\tcontext.lineTo(item[2].x, item[2].y); //底点\r\n\t\t\t\t\tcontext.lineTo(item[1].x, item[1].y); //收盘中间点\r\n\t\t\t\t\tcontext.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点\r\n\t\t\t\t\tcontext.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点\r\n\t\t\t\t\tcontext.lineTo(item[0].x, item[0].y); //开盘中间点\r\n\t\t\t\t\tcontext.moveTo(item[3].x, item[3].y); //顶点\r\n\t\t\t\t}\r\n\t\t\t\tcontext.closePath();\r\n\t\t\t\tcontext.fill();\r\n\t\t\t\tcontext.stroke();\r\n\t\t\t}\r\n    }\r\n  });\r\n\r\n  context.restore();\r\n\r\n  return {\r\n    xAxisPoints: xAxisPoints,\r\n    calPoints: calPoints,\r\n    eachSpacing: eachSpacing\r\n  };\r\n}\r\n\r\nfunction drawAreaDataPoints(series, opts, config, context) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var areaOption = assign({},{\r\n    type: 'straight',\r\n    opacity: 0.2,\r\n    addLine: false,\r\n    width: 2,\r\n\t\tgradient:false\r\n  },opts.extra.area);\r\n\r\n  let xAxisData = opts.chartData.xAxisData,\r\n    xAxisPoints = xAxisData.xAxisPoints,\r\n    eachSpacing = xAxisData.eachSpacing;\r\n\r\n  let endY = opts.height - opts.area[2];\r\n  let calPoints = [];\r\n\r\n  context.save();\r\n\tlet leftSpace=0;\r\n\tlet rightSpace=opts.width+eachSpacing;\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n\t\tleftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];\r\n\t\trightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;\r\n  }\r\n\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    let ranges,minRange,maxRange;\r\n    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n    minRange = ranges.pop();\r\n    maxRange = ranges.shift();\r\n    let data = eachSeries.data;\r\n    let points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n    calPoints.push(points);\r\n\r\n    let splitPointList = splitPoints(points);\r\n    for (let i = 0; i < splitPointList.length; i++) {\r\n      let points = splitPointList[i];\r\n      // 绘制区域数\r\n      context.beginPath();\r\n      context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));\r\n\t\t\tif(areaOption.gradient){\r\n\t\t\t\tlet gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height-opts.area[2]);\r\n\t\t\t\tgradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));\r\n\t\t\t\tgradient.addColorStop('1.0',hexToRgb(\"#FFFFFF\", 0.1));\r\n\t\t\t\tcontext.setFillStyle(gradient);\r\n\t\t\t}else{\r\n\t\t\t\tcontext.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));\r\n\t\t\t}\r\n      context.setLineWidth(areaOption.width * opts.pixelRatio);\r\n      if (points.length > 1) {\r\n        let firstPoint = points[0];\r\n        let lastPoint = points[points.length - 1];\r\n        context.moveTo(firstPoint.x, firstPoint.y);\r\n\t\t\t\tlet startPoint=0;\r\n        if (areaOption.type === 'curve') {\r\n\t\t\t\t\tfor(let j=0;j<points.length;j++){\r\n\t\t\t\t\t\tlet item=points[j];\r\n\t\t\t\t\t\tif(startPoint==0 && item.x > leftSpace){\r\n\t\t\t\t\t\t\tcontext.moveTo(item.x, item.y);\r\n\t\t\t\t\t\t\tstartPoint=1;\r\n\t\t\t\t\t\t}\r\n            if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n              let ctrlPoint = createCurveControlPoints(points, j - 1);\r\n              context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y);\r\n            }\r\n          };\r\n        } else {\r\n\t\t\t\t\tfor(let j=0;j<points.length;j++){\r\n\t\t\t\t\t\tlet item=points[j];\r\n\t\t\t\t\t\tif(startPoint==0 && item.x > leftSpace){\r\n\t\t\t\t\t\t\tcontext.moveTo(item.x, item.y);\r\n\t\t\t\t\t\t\tstartPoint=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t  if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n              context.lineTo(item.x, item.y);\r\n            }\r\n          };\r\n        }\r\n\r\n        context.lineTo(lastPoint.x, endY);\r\n        context.lineTo(firstPoint.x, endY);\r\n        context.lineTo(firstPoint.x, firstPoint.y);\r\n      } else {\r\n        let item = points[0];\r\n        context.moveTo(item.x - eachSpacing / 2, item.y);\r\n        context.lineTo(item.x + eachSpacing / 2, item.y);\r\n        context.lineTo(item.x + eachSpacing / 2, endY);\r\n        context.lineTo(item.x - eachSpacing / 2, endY);\r\n        context.moveTo(item.x - eachSpacing / 2, item.y);\r\n      }\r\n      context.closePath();\r\n      context.fill();\r\n\r\n      //画连线\r\n      if (areaOption.addLine) {\r\n\t\t\t\tif (eachSeries.lineType == 'dash') {\r\n\t\t\t\t\tlet dashLength = eachSeries.dashLength?eachSeries.dashLength:8;\r\n\t\t\t\t\tdashLength *= opts.pixelRatio;\r\n\t\t\t\t  context.setLineDash([dashLength, dashLength]);\r\n\t\t\t\t}\r\n        context.beginPath();\r\n        context.setStrokeStyle(eachSeries.color);\r\n        context.setLineWidth(areaOption.width * opts.pixelRatio);\r\n        if (points.length === 1) {\r\n          context.moveTo(points[0].x, points[0].y);\r\n          context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);\r\n        } else {\r\n          context.moveTo(points[0].x, points[0].y);\r\n\t\t\t\t\tlet startPoint=0;\r\n          if (areaOption.type === 'curve') {\r\n            for(let j=0;j<points.length;j++){\r\n            \tlet item=points[j];\r\n            \tif(startPoint==0 && item.x > leftSpace){\r\n            \t\tcontext.moveTo(item.x, item.y);\r\n            \t\tstartPoint=1;\r\n            \t}\r\n              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n                let ctrlPoint = createCurveControlPoints(points, j - 1);\r\n                context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x,item.y);\r\n              }\r\n            };\r\n          } else {\r\n            for(let j=0;j<points.length;j++){\r\n            \tlet item=points[j];\r\n            \tif(startPoint==0 && item.x > leftSpace){\r\n            \t\tcontext.moveTo(item.x, item.y);\r\n            \t\tstartPoint=1;\r\n            \t}\r\n              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n                context.lineTo(item.x, item.y);\r\n              }\r\n            };\r\n          }\r\n          context.moveTo(points[0].x, points[0].y);\r\n        }\r\n        context.stroke();\r\n\t\t\t\tcontext.setLineDash([]);\r\n      }\r\n    }\r\n\r\n    //画点\r\n    if (opts.dataPointShape !== false) {\r\n      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);\r\n    }\r\n\r\n  });\r\n\r\n  if (opts.dataLabel !== false && process === 1) {\r\n    series.forEach(function(eachSeries, seriesIndex) {\r\n      let ranges,minRange,maxRange;\r\n      ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n      minRange = ranges.pop();\r\n      maxRange = ranges.shift();\r\n      var data = eachSeries.data;\r\n      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n      drawPointText(points, eachSeries, config, context);\r\n    });\r\n  }\r\n\r\n  context.restore();\r\n\r\n  return {\r\n    xAxisPoints: xAxisPoints,\r\n    calPoints: calPoints,\r\n    eachSpacing: eachSpacing\r\n  };\r\n}\r\n\r\nfunction drawLineDataPoints(series, opts, config, context) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var lineOption = assign({},{\r\n\t\ttype: 'straight',\r\n\t\twidth: 2\r\n\t},opts.extra.line);\r\n\tlineOption.width *=opts.pixelRatio;\r\n\t\r\n  let xAxisData = opts.chartData.xAxisData,\r\n    xAxisPoints = xAxisData.xAxisPoints,\r\n    eachSpacing = xAxisData.eachSpacing;\r\n  var calPoints = [];\r\n\r\n  context.save();\r\n\tlet leftSpace=0;\r\n\tlet rightSpace=opts.width+eachSpacing;\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n\t\tleftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];\r\n\t\trightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;\r\n  }\r\n\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    let ranges,minRange,maxRange;\r\n    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n    minRange = ranges.pop();\r\n    maxRange = ranges.shift();\r\n    var data = eachSeries.data;\r\n    var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n    calPoints.push(points);\r\n    var splitPointList = splitPoints(points);\r\n\t\t\r\n\t\tif (eachSeries.lineType == 'dash') {\r\n\t\t\tlet dashLength = eachSeries.dashLength?eachSeries.dashLength:8;\r\n\t\t\tdashLength *= opts.pixelRatio;\r\n\t\t  context.setLineDash([dashLength, dashLength]);\r\n\t\t}\r\n\t\tcontext.beginPath();\r\n\t\tcontext.setStrokeStyle(eachSeries.color);\r\n\t\tcontext.setLineWidth(lineOption.width);\r\n\t\t\r\n    splitPointList.forEach(function(points, index) {\r\n\t\t\t\r\n      if (points.length === 1) {\r\n        context.moveTo(points[0].x, points[0].y);\r\n        context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);\r\n      } else {\r\n        context.moveTo(points[0].x, points[0].y);\r\n\t\t\t\tlet startPoint=0;\r\n        if (lineOption.type === 'curve') {\r\n          for(let j=0;j<points.length;j++){\r\n          \tlet item=points[j];\r\n          \tif(startPoint==0 && item.x > leftSpace){\r\n          \t\tcontext.moveTo(item.x, item.y);\r\n          \t\tstartPoint=1;\r\n          \t}\r\n            if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n              var ctrlPoint = createCurveControlPoints(points, j - 1);\r\n              context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y);\r\n            }\r\n          };\r\n        } else {\r\n          for(let j=0;j<points.length;j++){\r\n          \tlet item=points[j];\r\n          \tif(startPoint==0 && item.x > leftSpace){\r\n          \t\tcontext.moveTo(item.x, item.y);\r\n          \t\tstartPoint=1;\r\n          \t}\r\n            if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n              context.lineTo(item.x, item.y);\r\n            }\r\n          };\r\n        }\r\n        context.moveTo(points[0].x, points[0].y);\r\n      }\r\n      \r\n    });\r\n\t\t\r\n\t\tcontext.stroke();\r\n\t\tcontext.setLineDash([]);\r\n\t\t\r\n    if (opts.dataPointShape !== false) {\r\n      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);\r\n    }\r\n  });\r\n\r\n  if (opts.dataLabel !== false && process === 1) {\r\n    series.forEach(function(eachSeries, seriesIndex) {\r\n      let ranges,minRange,maxRange;\r\n      ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n      minRange = ranges.pop();\r\n      maxRange = ranges.shift();\r\n      var data = eachSeries.data;\r\n      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n      drawPointText(points, eachSeries, config, context);\r\n    });\r\n  }\r\n\r\n  context.restore();\r\n\r\n  return {\r\n    xAxisPoints: xAxisPoints,\r\n    calPoints: calPoints,\r\n    eachSpacing: eachSpacing\r\n  };\r\n}\r\n\r\nfunction drawMixDataPoints(series, opts, config, context) {\r\n  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  \r\n  let xAxisData = opts.chartData.xAxisData,\r\n    xAxisPoints = xAxisData.xAxisPoints,\r\n    eachSpacing = xAxisData.eachSpacing;\r\n\r\n  let endY = opts.height - opts.area[2];\r\n  let calPoints = [];\r\n\r\n  var columnIndex = 0;\r\n  var columnLength = 0;\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    if (eachSeries.type == 'column') {\r\n      columnLength += 1;\r\n    }\r\n  });\r\n  context.save();\r\n\tlet leftNum=-2;\r\n\tlet rightNum=xAxisPoints.length+2;\r\n\tlet leftSpace=0;\r\n\tlet rightSpace=opts.width+eachSpacing;\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n\t\tleftNum=Math.floor(-opts._scrollDistance_/eachSpacing)-2;\r\n\t\trightNum=leftNum+opts.xAxis.itemCount+4;\r\n\t\tleftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];\r\n\t\trightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;\r\n  }\r\n\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    let ranges,minRange,maxRange;\r\n    \r\n\t\tranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n\t\tminRange = ranges.pop();\r\n\t\tmaxRange = ranges.shift();\r\n\r\n    var data = eachSeries.data;\r\n    var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n    calPoints.push(points);\r\n\r\n    // 绘制柱状数据图\r\n    if (eachSeries.type == 'column') {\r\n      points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);\r\n      for(let i=0;i<points.length;i++){\r\n      \tlet item=points[i];\r\n        if (item !== null && i>leftNum && i<rightNum) {\r\n          context.beginPath();\r\n          context.setStrokeStyle(item.color || eachSeries.color);\r\n          context.setLineWidth(1)\r\n          context.setFillStyle(item.color || eachSeries.color);\r\n          var startX = item.x - item.width / 2;\r\n          var height = opts.height - item.y - opts.area[2];\r\n          context.moveTo(startX, item.y);\r\n          context.moveTo(startX-1, item.y);\r\n          context.lineTo(startX+item.width-2,item.y);\r\n          context.lineTo(startX+item.width-2,opts.height - opts.area[2]);\r\n          context.lineTo(startX,opts.height - opts.area[2]);\r\n          context.lineTo(startX,item.y);\r\n          context.closePath();\r\n          context.stroke();\r\n          context.fill();\r\n          context.closePath();\r\n          context.fill();\r\n        }\r\n      }\r\n      columnIndex += 1;\r\n    }\r\n\r\n    //绘制区域图数据\r\n\r\n    if (eachSeries.type == 'area') {\r\n      let splitPointList = splitPoints(points);\r\n      for (let i = 0; i < splitPointList.length; i++) {\r\n        let points = splitPointList[i];\r\n        // 绘制区域数据\r\n        context.beginPath();\r\n        context.setStrokeStyle(eachSeries.color);\r\n        context.setFillStyle(hexToRgb(eachSeries.color, 0.2));\r\n        context.setLineWidth(2 * opts.pixelRatio);\r\n        if (points.length > 1) {\r\n          var firstPoint = points[0];\r\n          let lastPoint = points[points.length - 1];\r\n          context.moveTo(firstPoint.x, firstPoint.y);\r\n\t\t\t\t\tlet startPoint=0;\r\n          if (eachSeries.style === 'curve') {\r\n            for(let j=0;j<points.length;j++){\r\n            \tlet item=points[j];\r\n            \tif(startPoint==0 && item.x > leftSpace){\r\n            \t\tcontext.moveTo(item.x, item.y);\r\n            \t\tstartPoint=1;\r\n            \t}\r\n              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n                var ctrlPoint = createCurveControlPoints(points, j - 1);\r\n                context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);\r\n              }\r\n            };\r\n          } else {\r\n            for(let j=0;j<points.length;j++){\r\n            \tlet item=points[j];\r\n            \tif(startPoint==0 && item.x > leftSpace){\r\n            \t\tcontext.moveTo(item.x, item.y);\r\n            \t\tstartPoint=1;\r\n            \t}\r\n              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n                context.lineTo(item.x, item.y);\r\n              }\r\n            };\r\n          }\r\n          context.lineTo(lastPoint.x, endY);\r\n          context.lineTo(firstPoint.x, endY);\r\n          context.lineTo(firstPoint.x, firstPoint.y);\r\n        } else {\r\n          let item = points[0];\r\n          context.moveTo(item.x - eachSpacing / 2, item.y);\r\n          context.lineTo(item.x + eachSpacing / 2, item.y);\r\n          context.lineTo(item.x + eachSpacing / 2, endY);\r\n          context.lineTo(item.x - eachSpacing / 2, endY);\r\n          context.moveTo(item.x - eachSpacing / 2, item.y);\r\n        }\r\n        context.closePath();\r\n        context.fill();\r\n      }\r\n    }\r\n\r\n    // 绘制折线数据图\r\n    if (eachSeries.type == 'line') {\r\n      var splitPointList = splitPoints(points);\r\n      splitPointList.forEach(function(points, index) {\r\n\t\t\t\tif (eachSeries.lineType == 'dash') {\r\n\t\t\t\t\tlet dashLength = eachSeries.dashLength?eachSeries.dashLength:8;\r\n\t\t\t\t\tdashLength *= opts.pixelRatio;\r\n\t\t\t\t  context.setLineDash([dashLength, dashLength]);\r\n\t\t\t\t}\r\n        context.beginPath();\r\n        context.setStrokeStyle(eachSeries.color);\r\n        context.setLineWidth(2 * opts.pixelRatio);\r\n        if (points.length === 1) {\r\n          context.moveTo(points[0].x, points[0].y);\r\n          context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);\r\n        } else {\r\n          context.moveTo(points[0].x, points[0].y);\r\n\t\t\t\t\tlet startPoint=0;\r\n          if (eachSeries.style == 'curve') {\r\n            for(let j=0;j<points.length;j++){\r\n            \tlet item=points[j];\r\n            \tif(startPoint==0 && item.x > leftSpace){\r\n            \t\tcontext.moveTo(item.x, item.y);\r\n            \t\tstartPoint=1;\r\n            \t}\r\n              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n                var ctrlPoint = createCurveControlPoints(points, j - 1);\r\n                context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x,item.y);\r\n              }\r\n            }\r\n          } else {\r\n            for(let j=0;j<points.length;j++){\r\n            \tlet item=points[j];\r\n            \tif(startPoint==0 && item.x > leftSpace){\r\n            \t\tcontext.moveTo(item.x, item.y);\r\n            \t\tstartPoint=1;\r\n            \t}\r\n              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {\r\n                context.lineTo(item.x, item.y);\r\n              }\r\n            }\r\n          }\r\n          context.moveTo(points[0].x, points[0].y);\r\n        }\r\n        context.stroke();\r\n\t\t\t\tcontext.setLineDash([]);\r\n      });\r\n    }\r\n\r\n    // 绘制点数据图\r\n    if (eachSeries.type == 'point') {\r\n\t\t\teachSeries.addPoint = true;\r\n    }\r\n\r\n    if (eachSeries.addPoint == true && eachSeries.type !== 'column' ) {\r\n      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);\r\n    }\r\n  });\r\n  if (opts.dataLabel !== false && process === 1) {\r\n    var columnIndex = 0;\r\n    series.forEach(function(eachSeries, seriesIndex) {\r\n      let ranges,minRange,maxRange;\r\n      \r\n\t\t\tranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);\r\n\t\t\tminRange = ranges.pop();\r\n\t\t\tmaxRange = ranges.shift();\r\n\t\t\t\t\r\n      var data = eachSeries.data;\r\n      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);\r\n      if (eachSeries.type !== 'column') {\r\n        drawPointText(points, eachSeries, config, context);\r\n      } else {\r\n        points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);\r\n        drawPointText(points, eachSeries, config, context);\r\n        columnIndex += 1;\r\n      }\r\n\r\n    });\r\n  }\r\n\r\n  context.restore();\r\n\r\n  return {\r\n    xAxisPoints: xAxisPoints,\r\n    calPoints: calPoints,\r\n    eachSpacing: eachSpacing,\r\n  }\r\n}\r\n\r\nfunction drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {\r\n  var toolTipOption = opts.extra.tooltip || {};\r\n  if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {\r\n    drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints)\r\n  }\r\n  context.save();\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n  }\r\n  if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {\r\n    drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);\r\n  }\r\n  context.restore();\r\n\r\n}\r\n\r\nfunction drawXAxis(categories, opts, config, context) {\r\n\r\n  let xAxisData = opts.chartData.xAxisData,\r\n    xAxisPoints = xAxisData.xAxisPoints,\r\n    startX = xAxisData.startX,\r\n    endX = xAxisData.endX,\r\n    eachSpacing = xAxisData.eachSpacing;\r\n  var boundaryGap='center';\r\n  if (opts.type == 'line'||opts.type == 'area'){\r\n    boundaryGap=opts.xAxis.boundaryGap;\r\n  }\r\n  var startY = opts.height - opts.area[2];\r\n  var endY = opts.area[0];\r\n\r\n  //绘制滚动条\r\n  if (opts.enableScroll && opts.xAxis.scrollShow) {\r\n    var scrollY = opts.height - opts.area[2] + config.xAxisHeight;\r\n    var scrollScreenWidth = endX - startX;\r\n    var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);\r\n    var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;\r\n    var scrollLeft = 0;\r\n    if (opts._scrollDistance_) {\r\n      scrollLeft = -opts._scrollDistance_ * (scrollScreenWidth) / scrollTotalWidth;\r\n    }\r\n    context.beginPath();\r\n    context.setLineCap('round');\r\n    context.setLineWidth(6 * opts.pixelRatio);\r\n    context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || \"#EFEBEF\");\r\n    context.moveTo(startX, scrollY);\r\n    context.lineTo(endX, scrollY);\r\n    context.stroke();\r\n    context.closePath();\r\n    context.beginPath();\r\n    context.setLineCap('round');\r\n    context.setLineWidth(6 * opts.pixelRatio);\r\n    context.setStrokeStyle(opts.xAxis.scrollColor || \"#A6A6A6\");\r\n    context.moveTo(startX + scrollLeft, scrollY);\r\n    context.lineTo(startX + scrollLeft + scrollWidth, scrollY);\r\n    context.stroke();\r\n    context.closePath();\r\n    context.setLineCap('butt');\r\n  }\r\n\r\n  context.save();\r\n\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n  }\r\n\t\r\n\t//绘制X轴刻度线\r\n\tif (opts.xAxis.calibration === true) {\r\n\t\tcontext.setStrokeStyle(opts.xAxis.gridColor || \"#cccccc\");\r\n\t\tcontext.setLineCap('butt');\r\n\t\tcontext.setLineWidth(1 * opts.pixelRatio);\r\n\t  xAxisPoints.forEach(function(item, index) {\r\n\t    if (index > 0) {\r\n\t      context.beginPath();\r\n\t      context.moveTo(item - eachSpacing / 2, startY);\r\n\t      context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pixelRatio);\r\n\t      context.closePath();\r\n\t      context.stroke();\r\n\t    }\r\n\t  });\r\n\t}\r\n\t//绘制X轴网格\r\n  if (opts.xAxis.disableGrid !== true) {\r\n    context.setStrokeStyle(opts.xAxis.gridColor || \"#cccccc\");\r\n    context.setLineCap('butt');\r\n    context.setLineWidth(1 * opts.pixelRatio);\r\n    if (opts.xAxis.gridType == 'dash') {\r\n      context.setLineDash([opts.xAxis.dashLength, opts.xAxis.dashLength]);\r\n    }\r\n\t\topts.xAxis.gridEval = opts.xAxis.gridEval || 1;\r\n\t\txAxisPoints.forEach(function(item, index) {\r\n\t\t\tif (index % opts.xAxis.gridEval == 0) {\r\n\t\t\t\tcontext.beginPath();\r\n\t\t\t\tcontext.moveTo(item, startY);\r\n\t\t\t\tcontext.lineTo(item, endY);\r\n\t\t\t\tcontext.stroke();\r\n\t\t\t}\r\n\t\t});\r\n    context.setLineDash([]);\r\n  }\r\n  \r\n\r\n  //绘制X轴文案\r\n  if (opts.xAxis.disabled !== true) {\r\n    // 对X轴列表做抽稀处理\r\n    //默认全部显示X轴标签\r\n    let maxXAxisListLength = categories.length;\r\n    //如果设置了X轴单屏数量\r\n    if (opts.xAxis.labelCount) {\r\n      //如果设置X轴密度\r\n      if (opts.xAxis.itemCount) {\r\n        maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);\r\n      } else {\r\n        maxXAxisListLength = opts.xAxis.labelCount;\r\n      }\r\n      maxXAxisListLength -= 1;\r\n    }\r\n\r\n    let ratio = Math.ceil(categories.length / maxXAxisListLength);\r\n\r\n    let newCategories = [];\r\n    let cgLength = categories.length;\r\n    for (let i = 0; i < cgLength; i++) {\r\n      if (i % ratio !== 0) {\r\n        newCategories.push(\"\");\r\n      } else {\r\n        newCategories.push(categories[i]);\r\n      }\r\n    }\r\n    newCategories[cgLength - 1] = categories[cgLength - 1];\r\n\r\n    var xAxisFontSize = opts.xAxis.fontSize || config.fontSize;\r\n    if (config._xAxisTextAngle_ === 0) {\r\n      newCategories.forEach(function(item, index) {\r\n        var offset = - measureText(String(item), xAxisFontSize) / 2;\r\n        if(boundaryGap == 'center'){\r\n          offset+=eachSpacing / 2;\r\n        }\r\n        var scrollHeight=0;\r\n        if(opts.xAxis.scrollShow){\r\n          scrollHeight=6*opts.pixelRatio;\r\n        }\r\n        context.beginPath();\r\n        context.setFontSize(xAxisFontSize);\r\n        context.setFillStyle(opts.xAxis.fontColor || '#666666');\r\n        context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);\r\n        context.closePath();\r\n        context.stroke();\r\n      });\r\n\r\n    } else {\r\n      newCategories.forEach(function(item, index) {\r\n        context.save();\r\n        context.beginPath();\r\n        context.setFontSize(xAxisFontSize);\r\n        context.setFillStyle(opts.xAxis.fontColor || '#666666');\r\n        var textWidth = measureText(String(item),xAxisFontSize);\r\n        var offset = - textWidth;\r\n        if(boundaryGap == 'center'){\r\n          offset+=eachSpacing / 2;\r\n        }\r\n        var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),\r\n          transX = _calRotateTranslate.transX,\r\n          transY = _calRotateTranslate.transY;\r\n\r\n        context.rotate(-1 * config._xAxisTextAngle_);\r\n        context.translate(transX, transY);\r\n        context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);\r\n        context.closePath();\r\n        context.stroke();\r\n        context.restore();\r\n      });\r\n    }\r\n  }\r\n  context.restore();\r\n\t\r\n\t//绘制X轴轴线\r\n  if(opts.xAxis.axisLine){\r\n    context.beginPath();\r\n    context.setStrokeStyle(opts.xAxis.axisLineColor);\r\n    context.setLineWidth(1 * opts.pixelRatio);\r\n    context.moveTo(startX,opts.height-opts.area[2]);\r\n    context.lineTo(endX,opts.height-opts.area[2]);\r\n    context.stroke();\r\n  }\r\n}\r\n\r\nfunction drawYAxisGrid(categories, opts, config, context) {\r\n  if (opts.yAxis.disableGrid === true) {\r\n    return;\r\n  }\r\n  let spacingValid = opts.height - opts.area[0] - opts.area[2];\r\n  let eachSpacing = spacingValid / opts.yAxis.splitNumber;\r\n  let startX = opts.area[3];\r\n  let xAxisPoints = opts.chartData.xAxisData.xAxisPoints,\r\n    xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;\r\n  let TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);\r\n  let endX = startX + TotalWidth;\r\n\r\n  let points = [];\r\n  for (let i = 0; i < opts.yAxis.splitNumber + 1; i++) {\r\n    points.push(opts.height - opts.area[2] - eachSpacing * i);\r\n  }\r\n\r\n  context.save();\r\n  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {\r\n    context.translate(opts._scrollDistance_, 0);\r\n  }\r\n\r\n  if (opts.yAxis.gridType == 'dash') {\r\n    context.setLineDash([opts.yAxis.dashLength, opts.yAxis.dashLength]);\r\n  }\r\n  context.setStrokeStyle(opts.yAxis.gridColor);\r\n  context.setLineWidth(1 * opts.pixelRatio);\r\n  points.forEach(function(item, index) {\r\n    context.beginPath();\r\n    context.moveTo(startX, item);\r\n    context.lineTo(endX, item);\r\n    context.stroke();\r\n  });\r\n  context.setLineDash([]);\r\n\r\n  context.restore();\r\n}\r\n\r\nfunction drawYAxis(series, opts, config, context) {\r\n  if (opts.yAxis.disabled === true) {\r\n    return;\r\n  }\r\n  var spacingValid = opts.height - opts.area[0] - opts.area[2];\r\n  var eachSpacing = spacingValid / opts.yAxis.splitNumber;\r\n  var startX = opts.area[3];\r\n  var endX = opts.width - opts.area[1];\r\n  var endY = opts.height - opts.area[2];\r\n  var fillEndY = endY + config.xAxisHeight;\r\n  if (opts.xAxis.scrollShow) {\r\n    fillEndY -= 3 * opts.pixelRatio;\r\n  }\r\n\tif (opts.xAxis.rotateLabel){\r\n\t\tfillEndY = opts.height - opts.area[2]+3;\r\n\t}\r\n  // set YAxis background\r\n  context.beginPath();\r\n  context.setFillStyle(opts.background || '#ffffff');\r\n  if (opts._scrollDistance_ < 0) {\r\n    context.fillRect(0, 0, startX, fillEndY);\r\n  }\r\n  if(opts.enableScroll == true){\r\n    context.fillRect(endX, 0, opts.width, fillEndY);\r\n  }\r\n  context.closePath();\r\n  context.stroke();\r\n\r\n  var points = [];\r\n  for (let i = 0; i <= opts.yAxis.splitNumber; i++) {\r\n    points.push(opts.area[0] + eachSpacing * i);\r\n  }\r\n\r\n  let tStartLeft=opts.area[3];\r\n  let tStartRight=opts.width-opts.area[1];\r\n\r\n  for (let i = 0; i < opts.yAxis.data.length; i++) {\r\n    let yData = opts.yAxis.data[i];\r\n    if(yData.disabled !== true){\r\n      let rangesFormat = opts.chartData.yAxisData.rangesFormat[i];\r\n      let yAxisFontSize = yData.fontSize || config.fontSize;\r\n      let yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];\r\n      //画Y轴刻度及文案\r\n      rangesFormat.forEach(function(item, index) {\r\n        var pos = points[index] ? points[index] : endY;\r\n        context.beginPath();\r\n        context.setFontSize(yAxisFontSize);\r\n        context.setLineWidth(1*opts.pixelRatio);\r\n        context.setStrokeStyle(yData.axisLineColor||'#cccccc');\r\n        context.setFillStyle(yData.fontColor|| '#666666');\r\n        if(yAxisWidth.position=='left'){\r\n          context.fillText(String(item), tStartLeft - yAxisWidth.width , pos + yAxisFontSize / 2);\r\n          //画刻度线\r\n          if(yData.calibration==true){\r\n            context.moveTo(tStartLeft,pos);\r\n            context.lineTo(tStartLeft - 3*opts.pixelRatio,pos);\r\n          }\r\n        }else{\r\n          context.fillText(String(item), tStartRight + 4*opts.pixelRatio, pos + yAxisFontSize / 2);\r\n          //画刻度线\r\n          if(yData.calibration==true){\r\n            context.moveTo(tStartRight,pos);\r\n            context.lineTo(tStartRight + 3*opts.pixelRatio,pos);\r\n          }\r\n        }\r\n        context.closePath();\r\n        context.stroke();\r\n      });\r\n      //画Y轴轴线\r\n      if (yData.axisLine!==false) {\r\n        context.beginPath();\r\n        context.setStrokeStyle(yData.axisLineColor||'#cccccc');\r\n        context.setLineWidth(1 * opts.pixelRatio);\r\n        if(yAxisWidth.position=='left'){\r\n          context.moveTo(tStartLeft,opts.height-opts.area[2]);\r\n          context.lineTo(tStartLeft,opts.area[0]);\r\n        }else{\r\n          context.moveTo(tStartRight,opts.height-opts.area[2]);\r\n          context.lineTo(tStartRight,opts.area[0]);\r\n        }\r\n        context.stroke();\r\n      }\r\n\t\t\t\r\n      //画Y轴标题\r\n      if (opts.yAxis.showTitle) {\r\n\t\t\t\t\r\n        let titleFontSize = yData.titleFontSize || config.fontSize;\r\n        let title = yData.title;\r\n        context.beginPath();\r\n        context.setFontSize(titleFontSize);\r\n        context.setFillStyle(yData.titleFontColor || '#666666');\r\n        if(yAxisWidth.position=='left'){\r\n          context.fillText(title, tStartLeft - measureText(title,titleFontSize)/2, opts.area[0]-10*opts.pixelRatio);\r\n        }else{\r\n          context.fillText(title,tStartRight - measureText(title,titleFontSize)/2, opts.area[0]-10*opts.pixelRatio);\r\n        }\r\n        context.closePath();\r\n        context.stroke();\r\n      }\r\n      if(yAxisWidth.position=='left'){\r\n        tStartLeft -=(yAxisWidth.width + opts.yAxis.padding);\r\n      }else{\r\n        tStartRight +=yAxisWidth.width+ opts.yAxis.padding;\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\nfunction drawLegend(series, opts, config, context, chartData) {\r\n  if (opts.legend.show === false) {\r\n    return;\r\n  }\r\n  let legendData = chartData.legendData;\r\n  let legendList = legendData.points;\r\n  let legendArea = legendData.area;\r\n  let padding = opts.legend.padding;\r\n  let fontSize = opts.legend.fontSize;\r\n  let shapeWidth = 15 * opts.pixelRatio;\r\n  let shapeRight = 5 * opts.pixelRatio;\r\n  let itemGap = opts.legend.itemGap;\r\n  let lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);\r\n\r\n  //画背景及边框\r\n  context.beginPath();\r\n  context.setLineWidth(opts.legend.borderWidth);\r\n  context.setStrokeStyle(opts.legend.borderColor);\r\n  context.setFillStyle(opts.legend.backgroundColor);\r\n  context.moveTo(legendArea.start.x, legendArea.start.y);\r\n  context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);\r\n  context.closePath();\r\n  context.fill();\r\n  context.stroke();\r\n\r\n  legendList.forEach(function(itemList, listIndex) {\r\n    let width = 0;\r\n    let height = 0;\r\n    width = legendData.widthArr[listIndex];\r\n    height = legendData.heightArr[listIndex];\r\n    let startX = 0;\r\n    let startY = 0;\r\n    if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {\r\n      startX = legendArea.start.x + (legendArea.width - width) / 2;\r\n      startY = legendArea.start.y + padding + listIndex * lineHeight;\r\n    } else {\r\n      if (listIndex == 0) {\r\n        width = 0;\r\n      } else {\r\n        width = legendData.widthArr[listIndex - 1];\r\n      }\r\n      startX = legendArea.start.x + padding + width;\r\n      startY = legendArea.start.y + padding + (legendArea.height - height) / 2;\r\n    }\r\n\r\n    context.setFontSize(config.fontSize);\r\n    for (let i = 0; i < itemList.length; i++) {\r\n      let item = itemList[i];\r\n      item.area = [0, 0, 0, 0];\r\n      item.area[0] = startX;\r\n      item.area[1] = startY;\r\n      item.area[3] = startY + lineHeight;\r\n      context.beginPath();\r\n      context.setLineWidth(1 * opts.pixelRatio);\r\n      context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);\r\n      context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);\r\n      switch (item.legendShape) {\r\n        case 'line':\r\n          context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio);\r\n          context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio, 15 * opts.pixelRatio, 4 * opts.pixelRatio);\r\n          break;\r\n        case 'triangle':\r\n          context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);\r\n          context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);\r\n          context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);\r\n          context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);\r\n          break;\r\n        case 'diamond':\r\n          context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);\r\n          context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight);\r\n          context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);\r\n          context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight);\r\n          context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);\r\n          break;\r\n        case 'circle':\r\n          context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight);\r\n          context.arc(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight, 5 * opts.pixelRatio, 0, 2 * Math.PI);\r\n          break;\r\n        case 'rect':\r\n          context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);\r\n          context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);\r\n          break;\r\n        default:\r\n          context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);\r\n          context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);\r\n      }\r\n      context.closePath();\r\n      context.fill();\r\n      context.stroke();\r\n\r\n      startX += shapeWidth + shapeRight;\r\n      let fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;\r\n      context.beginPath();\r\n      context.setFontSize(fontSize);\r\n      context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);\r\n      context.fillText(item.name, startX, startY + fontTrans);\r\n      context.closePath();\r\n      context.stroke();\r\n      if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {\r\n        startX += measureText(item.name, fontSize) + itemGap;\r\n        item.area[2] = startX;\r\n      } else {\r\n        item.area[2] = startX + measureText(item.name, fontSize) + itemGap;;\r\n        startX -= shapeWidth + shapeRight;\r\n        startY += lineHeight;\r\n      }\r\n    }\r\n  });\r\n}\r\n\r\nfunction drawPieDataPoints(series, opts, config, context) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var pieOption = assign({}, {\r\n    activeOpacity: 0.5,\r\n    activeRadius: 10 * opts.pixelRatio,\r\n    offsetAngle: 0,\r\n    labelWidth: 15 * opts.pixelRatio,\r\n    ringWidth: 0,\r\n    border:false,\r\n    borderWidth:2,\r\n    borderColor:'#FFFFFF'\r\n  }, opts.extra.pie);\r\n  var centerPosition = {\r\n    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,\r\n    y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2\r\n  };\r\n  if (config.pieChartLinePadding == 0) {\r\n    config.pieChartLinePadding = pieOption.activeRadius;\r\n  }\r\n\r\n  var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);\r\n\r\n  series = getPieDataPoints(series, radius, process);\r\n\r\n  var activeRadius = pieOption.activeRadius;\r\n\r\n  series = series.map(function(eachSeries) {\r\n    eachSeries._start_ += (pieOption.offsetAngle) * Math.PI / 180;\r\n    return eachSeries;\r\n  });\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    if (opts.tooltip) {\r\n      if (opts.tooltip.index == seriesIndex) {\r\n        context.beginPath();\r\n        context.setFillStyle(hexToRgb(eachSeries.color, opts.extra.pie.activeOpacity || 0.5));\r\n        context.moveTo(centerPosition.x, centerPosition.y);\r\n        context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_,\r\n          eachSeries._start_ + 2 *\r\n          eachSeries._proportion_ * Math.PI);\r\n        context.closePath();\r\n        context.fill();\r\n      }\r\n    }\r\n    context.beginPath();\r\n    context.setLineWidth(pieOption.borderWidth * opts.pixelRatio);\r\n    context.lineJoin = \"round\";\r\n    context.setStrokeStyle(pieOption.borderColor);\r\n    context.setFillStyle(eachSeries.color);\r\n    context.moveTo(centerPosition.x, centerPosition.y);\r\n    context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);\r\n    context.closePath();\r\n    context.fill();\r\n    if (pieOption.border == true) {\r\n      context.stroke();\r\n    }\r\n  });\r\n\r\n  if (opts.type === 'ring') {\r\n    var innerPieWidth = radius * 0.6;\r\n    if (typeof opts.extra.pie.ringWidth === 'number' && opts.extra.pie.ringWidth > 0) {\r\n      innerPieWidth = Math.max(0, radius - opts.extra.pie.ringWidth);\r\n    }\r\n    context.beginPath();\r\n    context.setFillStyle(opts.background || '#ffffff');\r\n    context.moveTo(centerPosition.x, centerPosition.y);\r\n    context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);\r\n    context.closePath();\r\n    context.fill();\r\n  }\r\n\r\n  if (opts.dataLabel !== false && process === 1) {\r\n    var valid = false;\r\n    for (var i = 0, len = series.length; i < len; i++) {\r\n      if (series[i].data > 0) {\r\n        valid = true;\r\n        break;\r\n      }\r\n    }\r\n\r\n    if (valid) {\r\n      drawPieText(series, opts, config, context, radius, centerPosition);\r\n    }\r\n  }\r\n\r\n  if (process === 1 && opts.type === 'ring') {\r\n    drawRingTitle(opts, config, context, centerPosition);\r\n  }\r\n\r\n  return {\r\n    center: centerPosition,\r\n    radius: radius,\r\n    series: series\r\n  };\r\n}\r\n\r\nfunction drawRoseDataPoints(series, opts, config, context) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var roseOption = assign({}, {\r\n    type: 'area',\r\n    activeOpacity: 0.5,\r\n    activeRadius: 10 * opts.pixelRatio,\r\n    offsetAngle: 0,\r\n    labelWidth: 15 * opts.pixelRatio,\r\n    border:false,\r\n    borderWidth:2,\r\n    borderColor:'#FFFFFF'\r\n  }, opts.extra.rose);\r\n  if (config.pieChartLinePadding == 0) {\r\n    config.pieChartLinePadding = roseOption.activeRadius;\r\n  }\r\n  var centerPosition = {\r\n    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,\r\n    y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2\r\n  };\r\n   var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);\r\n  var minRadius = roseOption.minRadius || radius * 0.5;\r\n\r\n  series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);\r\n\r\n  var activeRadius = roseOption.activeRadius;\r\n\r\n  series = series.map(function(eachSeries) {\r\n    eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;\r\n    return eachSeries;\r\n  });\r\n\r\n  series.forEach(function(eachSeries, seriesIndex) {\r\n    if (opts.tooltip) {\r\n      if (opts.tooltip.index == seriesIndex) {\r\n        context.beginPath();\r\n        context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));\r\n        context.moveTo(centerPosition.x, centerPosition.y);\r\n        context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_,\r\n          eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);\r\n        context.closePath();\r\n        context.fill();\r\n      }\r\n    }\r\n    context.beginPath();\r\n    context.setLineWidth(roseOption.borderWidth * opts.pixelRatio);\r\n    context.lineJoin = \"round\";\r\n    context.setStrokeStyle(roseOption.borderColor);\r\n    context.setFillStyle(eachSeries.color);\r\n    context.moveTo(centerPosition.x, centerPosition.y);\r\n    context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 *\r\n      eachSeries._rose_proportion_ * Math.PI);\r\n    context.closePath();\r\n    context.fill();\r\n    if (roseOption.border == true) {\r\n      context.stroke();\r\n    }\r\n  });\r\n\r\n  if (opts.dataLabel !== false && process === 1) {\r\n    var valid = false;\r\n    for (var i = 0, len = series.length; i < len; i++) {\r\n      if (series[i].data > 0) {\r\n        valid = true;\r\n        break;\r\n      }\r\n    }\r\n\r\n    if (valid) {\r\n      drawPieText(series, opts, config, context, radius, centerPosition);\r\n    }\r\n  }\r\n\r\n  return {\r\n    center: centerPosition,\r\n    radius: radius,\r\n    series: series\r\n  };\r\n}\r\n\r\nfunction drawArcbarDataPoints(series, opts, config, context) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var arcbarOption = assign({}, {\r\n    startAngle: 0.75,\r\n    endAngle: 0.25,\r\n    type: 'default',\r\n    width: 12 * opts.pixelRatio,\r\n\t\tgap:2 * opts.pixelRatio\r\n  }, opts.extra.arcbar);\r\n\r\n  series = getArcbarDataPoints(series, arcbarOption, process);\r\n\t\r\n  var centerPosition;\r\n\tif(arcbarOption.center){\r\n\t\tcenterPosition=arcbarOption.center;\r\n\t}else{\r\n\t\tcenterPosition= {\r\n\t\t  x: opts.width / 2,\r\n\t\t  y: opts.height / 2\r\n\t\t};\r\n\t}\r\n\t\r\n  var radius;\r\n\tif(arcbarOption.radius){\r\n\t\tradius=arcbarOption.radius;\r\n\t}else{\r\n\t\tradius = Math.min(centerPosition.x, centerPosition.y);\r\n\t\tradius -= 5 * opts.pixelRatio;\r\n\t\tradius -= arcbarOption.width / 2;\r\n\t}\r\n\t\r\n  for (let i = 0; i < series.length; i++) {\r\n    let eachSeries = series[i];\r\n\t\t//背景颜色\r\n\t\tcontext.setLineWidth(arcbarOption.width);\r\n\t\tcontext.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');\r\n\t\tcontext.setLineCap('round');\r\n\t\tcontext.beginPath();\r\n\t\tif (arcbarOption.type == 'default') {\r\n\t\t  context.arc(centerPosition.x, centerPosition.y, radius-(arcbarOption.width+arcbarOption.gap)*i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);\r\n\t\t} else {\r\n\t\t  context.arc(centerPosition.x, centerPosition.y, radius-(arcbarOption.width+arcbarOption.gap)*i, 0, 2 * Math.PI, false);\r\n\t\t}\r\n\t\tcontext.stroke();\r\n\t\t//进度条\r\n    context.setLineWidth(arcbarOption.width);\r\n    context.setStrokeStyle(eachSeries.color);\r\n    context.setLineCap('round');\r\n    context.beginPath();\r\n    context.arc(centerPosition.x, centerPosition.y, radius-(arcbarOption.width+arcbarOption.gap)*i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);\r\n    context.stroke();\r\n  }\r\n\r\n  drawRingTitle(opts, config, context, centerPosition);\r\n\r\n  return {\r\n    center: centerPosition,\r\n    radius: radius,\r\n    series: series\r\n  };\r\n}\r\n\r\nfunction drawGaugeDataPoints(categories, series, opts, config, context) {\r\n  var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;\r\n  var gaugeOption = assign({}, {\r\n\t\ttype:'default',\r\n    startAngle: 0.75,\r\n    endAngle: 0.25,\r\n    width: 15,\r\n    splitLine: {\r\n      fixRadius: 0,\r\n      splitNumber: 10,\r\n      width: 15,\r\n      color: '#FFFFFF',\r\n      childNumber: 5,\r\n      childWidth: 5\r\n    },\r\n    pointer: {\r\n      width: 15,\r\n      color: 'auto'\r\n    }\r\n  }, opts.extra.gauge);\r\n\r\n  if (gaugeOption.oldAngle == undefined) {\r\n    gaugeOption.oldAngle = gaugeOption.startAngle;\r\n  }\r\n  if (gaugeOption.oldData == undefined) {\r\n    gaugeOption.oldData = 0;\r\n  }\r\n  categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);\r\n\r\n  var centerPosition = {\r\n    x: opts.width / 2,\r\n    y: opts.height / 2\r\n  };\r\n  var radius = Math.min(centerPosition.x, centerPosition.y);\r\n  radius -= 5 * opts.pixelRatio;\r\n  radius -= gaugeOption.width / 2;\r\n  var innerRadius = radius - gaugeOption.width;\r\n\tvar totalAngle=0;\r\n\t\r\n\t//判断仪表盘的样式:default百度样式,progress新样式\r\n\tif(gaugeOption.type == 'progress'){\r\n\t\t\r\n\t\t//## 第一步画中心圆形背景和进度条背景\r\n\t\t//中心圆形背景\r\n\t\tvar pieRadius = radius - gaugeOption.width*3;\r\n\t\tcontext.beginPath();\r\n\t\tlet gradient = context.createLinearGradient(centerPosition.x, centerPosition.y-pieRadius, centerPosition.x , centerPosition.y+pieRadius);\r\n\t\t//配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)\r\n\t\tgradient.addColorStop('0', hexToRgb(series[0].color, 0.3));\r\n\t\tgradient.addColorStop('1.0',hexToRgb(\"#FFFFFF\", 0.1));\r\n\t\tcontext.setFillStyle(gradient);\r\n\t\tcontext.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2*Math.PI, false);\r\n\t\tcontext.fill();\r\n\t\t//画进度条背景\r\n\t\tcontext.setLineWidth(gaugeOption.width);\r\n\t\tcontext.setStrokeStyle(hexToRgb(series[0].color, 0.3));\r\n\t\tcontext.setLineCap('round');\r\n\t\tcontext.beginPath();\r\n\t\tcontext.arc(centerPosition.x, centerPosition.y, innerRadius , gaugeOption.startAngle * Math.PI, gaugeOption.endAngle *Math.PI, false);\r\n\t\tcontext.stroke();\r\n\t\t\r\n\t\t//## 第二步画刻度线\r\n\t\ttotalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;\r\n\t\tlet splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;\r\n\t\tlet childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;\r\n\t\tlet startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;\r\n\t\tlet endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;\r\n\t\tcontext.save();\r\n\t\tcontext.translate(centerPosition.x, centerPosition.y);\r\n\t\tcontext.rotate((gaugeOption.startAngle - 1) * Math.PI);\r\n\t\tlet len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;\r\n\t\tlet proc = series[0].data * process;\r\n\t\tfor (let i = 0; i < len; i++) {\r\n\t\t  context.beginPath();\r\n\t\t\t//刻度线随进度变色\r\n\t\t\tif(proc>(i/len)){\r\n\t\t\t\tcontext.setStrokeStyle(hexToRgb(series[0].color, 1));\r\n\t\t\t}else{\r\n\t\t\t\tcontext.setStrokeStyle(hexToRgb(series[0].color, 0.3));\r\n\t\t\t}\r\n\t\t  context.setLineWidth(3 * opts.pixelRatio);\r\n\t\t  context.moveTo(startX, 0);\r\n\t\t  context.lineTo(endX, 0);\r\n\t\t  context.stroke();\r\n\t\t  context.rotate(childAngle * Math.PI);\r\n\t\t}\r\n\t\tcontext.restore();\r\n\t\t\r\n\t\t//## 第三步画进度条\r\n\t\tseries = getArcbarDataPoints(series, gaugeOption, process);\r\n\t\tcontext.setLineWidth(gaugeOption.width);\r\n\t\tcontext.setStrokeStyle(series[0].color);\r\n\t\tcontext.setLineCap('round');\r\n\t\tcontext.beginPath();\r\n\t\tcontext.arc(centerPosition.x, centerPosition.y, innerRadius , gaugeOption.startAngle * Math.PI, series[0]._proportion_ *Math.PI, false);\r\n\t\tcontext.stroke();\r\n\t\t\r\n\t\t//## 第四步画指针\r\n\t\tlet pointerRadius = radius - gaugeOption.width*2.5;\r\n\t\tcontext.save();\r\n\t\tcontext.translate(centerPosition.x, centerPosition.y);\r\n\t\tcontext.rotate((series[0]._proportion_ - 1) * Math.PI);\r\n\t\tcontext.beginPath();\r\n\t\tcontext.setLineWidth(gaugeOption.width/3);\r\n\t\tlet gradient3 = context.createLinearGradient(0, -pointerRadius*0.6, 0 , pointerRadius*0.6);\r\n\t\tgradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));\r\n\t\tgradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));\r\n\t\tgradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));\r\n\t\tcontext.setStrokeStyle(gradient3);\r\n\t\tcontext.arc(0, 0, pointerRadius , 0.85* Math.PI, 1.15 * Math.PI, false);\r\n\t\tcontext.stroke();\r\n\t\tcontext.beginPath();\r\n\t\tcontext.setLineWidth(1);\r\n\t\tcontext.setStrokeStyle(series[0].color);\r\n\t\tcontext.setFillStyle(series[0].color);\r\n\t\tcontext.moveTo(-pointerRadius-gaugeOption.width/3/2,-4);\r\n\t\tcontext.lineTo(-pointerRadius-gaugeOption.width/3/2-4,0);\r\n\t\tcontext.lineTo(-pointerRadius-gaugeOption.width/3/2,4);\r\n\t\tcontext.lineTo(-pointerRadius-gaugeOption.width/3/2,-4);\r\n\t\tcontext.stroke();\r\n\t\tcontext.fill();\r\n\t\tcontext.restore();\r\n\t\t\r\n\t//default百度样式\r\n\t}else{\r\n\t\t//画背景\r\n\t\tcontext.setLineWidth(gaugeOption.width);\r\n\t\tcontext.setLineCap('butt');\r\n\t\tfor (let i = 0; i < categories.length; i++) {\r\n\t\t  let eachCategories = categories[i];\r\n\t\t  context.beginPath();\r\n\t\t  context.setStrokeStyle(eachCategories.color);\r\n\t\t  context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ *Math.PI, false);\r\n\t\t  context.stroke();\r\n\t\t}\r\n\t\tcontext.save();\r\n\t\t\r\n\t\t//画刻度线\r\n\t\ttotalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;\r\n\t\tlet splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;\r\n\t\tlet childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;\r\n\t\tlet startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;\r\n\t\tlet endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;\r\n\t\tlet childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;\r\n\t\t\r\n\t\tcontext.translate(centerPosition.x, centerPosition.y);\r\n\t\tcontext.rotate((gaugeOption.startAngle - 1) * Math.PI);\r\n\t\t\r\n\t\tfor (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {\r\n\t\t  context.beginPath();\r\n\t\t  context.setStrokeStyle(gaugeOption.splitLine.color);\r\n\t\t  context.setLineWidth(2 * opts.pixelRatio);\r\n\t\t  context.moveTo(startX, 0);\r\n\t\t  context.lineTo(endX, 0);\r\n\t\t  context.stroke();\r\n\t\t  context.rotate(splitAngle * Math.PI);\r\n\t\t}\r\n\t\tcontext.restore();\r\n\t\t\r\n\t\tcontext.save();\r\n\t\tcontext.translate(centerPosition.x, centerPosition.y);\r\n\t\tcontext.rotate((gaugeOption.startAngle - 1) * Math.PI);\r\n\t\t\r\n\t\tfor (let i = 0; i < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; i++) {\r\n\t\t  context.beginPath();\r\n\t\t  context.setStrokeStyle(gaugeOption.splitLine.color);\r\n\t\t  context.setLineWidth(1 * opts.pixelRatio);\r\n\t\t  context.moveTo(startX, 0);\r\n\t\t  context.lineTo(childendX, 0);\r\n\t\t  context.stroke();\r\n\t\t  context.rotate(childAngle * Math.PI);\r\n\t\t}\r\n\t\tcontext.restore();\r\n\t\t\r\n\t\t//画指针\r\n\t\tseries = getGaugeDataPoints(series, categories, gaugeOption, process);\r\n\t\t\r\n\t\tfor (let i = 0; i < series.length; i++) {\r\n\t\t  let eachSeries = series[i];\r\n\t\t  context.save();\r\n\t\t  context.translate(centerPosition.x, centerPosition.y);\r\n\t\t  context.rotate((eachSeries._proportion_ - 1) * Math.PI);\r\n\t\t  context.beginPath();\r\n\t\t  context.setFillStyle(eachSeries.color);\r\n\t\t  context.moveTo(gaugeOption.pointer.width, 0);\r\n\t\t  context.lineTo(0, -gaugeOption.pointer.width / 2);\r\n\t\t  context.lineTo(-innerRadius, 0);\r\n\t\t  context.lineTo(0, gaugeOption.pointer.width / 2);\r\n\t\t  context.lineTo(gaugeOption.pointer.width, 0);\r\n\t\t  context.closePath();\r\n\t\t  context.fill();\r\n\t\t  context.beginPath();\r\n\t\t  context.setFillStyle('#FFFFFF');\r\n\t\t  context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);\r\n\t\t  context.fill();\r\n\t\t  context.restore();\r\n\t\t}\r\n\t\t\r\n\t\tif (opts.dataLabel !== false) {\r\n\t\t  drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);\r\n\t\t}\r\n\t}\r\n\t\r\n\t//画仪表盘标题,副标题\r\n  drawRingTitle(opts, config, context, centerPosition);\r\n\r\n  if (process === 1 && opts.type === 'gauge') {\r\n    opts.extra.gauge.oldAngle = series[0]._proportion_;\r\n    opts.extra.gauge.oldData = series[0].data;\r\n  }\r\n  return {\r\n    center: centerPosition,\r\n    radius: radius,\r\n    innerRadius: innerRadius,\r\n    categories: categories,\r\n    totalAngle: totalAngle\r\n  };\r\n}\r\n\r\nfunction drawRadarDataPoints(series, opts, config, context) {\r\n  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  var radarOption = assign({},{\r\n    gridColor: '#cccccc',\r\n    labelColor: '#666666',\r\n    opacity: 0.2,\r\n\t\tgridCount:3\r\n  },opts.extra.radar);\r\n  \r\n  var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);\r\n  \r\n  var centerPosition = {\r\n    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,\r\n    y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2\r\n  };\r\n\r\n  var radius = Math.min(centerPosition.x - (getMaxTextListLength(opts.categories) + config.radarLabelTextMargin),\r\n    centerPosition.y - config.radarLabelTextMargin);\r\n  //TODO逻辑不对\r\n  radius -= opts.padding[1];\r\n\r\n  // draw grid\r\n  context.beginPath();\r\n  context.setLineWidth(1 * opts.pixelRatio);\r\n  context.setStrokeStyle(radarOption.gridColor);\r\n  coordinateAngle.forEach(function(angle) {\r\n    var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);\r\n    context.moveTo(centerPosition.x, centerPosition.y);\r\n    context.lineTo(pos.x, pos.y);\r\n  });\r\n  context.stroke();\r\n  context.closePath();\r\n  // draw split line grid\r\n\r\n  var _loop = function _loop(i) {\r\n    var startPos = {};\r\n    context.beginPath();\r\n    context.setLineWidth(1 * opts.pixelRatio);\r\n    context.setStrokeStyle(radarOption.gridColor);\r\n    coordinateAngle.forEach(function(angle, index) {\r\n      var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);\r\n      if (index === 0) {\r\n        startPos = pos;\r\n        context.moveTo(pos.x, pos.y);\r\n      } else {\r\n        context.lineTo(pos.x, pos.y);\r\n      }\r\n    });\r\n    context.lineTo(startPos.x, startPos.y);\r\n    context.stroke();\r\n    context.closePath();\r\n  };\r\n\r\n  for (var i = 1; i <= radarOption.gridCount; i++) {\r\n    _loop(i);\r\n  }\r\n\r\n  var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);\r\n\r\n  radarDataPoints.forEach(function(eachSeries, seriesIndex) {\r\n    // 绘制区域数据\r\n    context.beginPath();\r\n    context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));\r\n    eachSeries.data.forEach(function(item, index) {\r\n      if (index === 0) {\r\n        context.moveTo(item.position.x, item.position.y);\r\n      } else {\r\n        context.lineTo(item.position.x, item.position.y);\r\n      }\r\n    });\r\n    context.closePath();\r\n    context.fill();\r\n\r\n    if (opts.dataPointShape !== false) {\r\n      var points = eachSeries.data.map(function(item) {\r\n        return item.position;\r\n      });\r\n      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);\r\n    }\r\n  });\r\n  // draw label text\r\n  drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);\r\n\r\n  return {\r\n    center: centerPosition,\r\n    radius: radius,\r\n    angleList: coordinateAngle\r\n  };\r\n}\r\n\r\nfunction normalInt(min, max, iter) {\r\n    iter = iter==0?1:iter;\r\n    var arr = [];\r\n    for (var i = 0; i < iter; i++) {\r\n        arr[i] = Math.random();\r\n    };\r\n    return  Math.floor(arr.reduce(function(i,j){return i+j})/iter*(max-min))+min;  \r\n};\r\n\r\nfunction collisionNew(area,points,width,height){\r\n    var isIn=false;\r\n    for(let i=0;i<points.length;i++){\r\n      if(points[i].area){\r\n        if(area[3]<points[i].area[1]||area[0]>points[i].area[2]||area[1]>points[i].area[3]||area[2]<points[i].area[0]){\r\n          if(area[0]<0 || area[1]<0 || area[2]>width || area[3]>height){\r\n            isIn=true;\r\n            break;\r\n          }else{\r\n            isIn=false;\r\n          }\r\n        }else{\r\n          isIn=true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    return isIn;\r\n};\r\n\r\nfunction getBoundingBox(data) {\r\n  var bounds = {}, coords;\r\n  bounds.xMin = 180;\r\n  bounds.xMax = 0;\r\n  bounds.yMin = 90;\r\n  bounds.yMax = 0\r\n  for (var i = 0; i < data.length; i++) {\r\n      var coorda = data[i].geometry.coordinates\r\n      for (var k = 0; k < coorda.length; k++) {\r\n          coords = coorda[k];\r\n          if (coords.length == 1) {\r\n              coords = coords[0]\r\n          }\r\n          for (var j = 0; j < coords.length; j++) {\r\n              var longitude = coords[j][0];\r\n              var latitude = coords[j][1];\r\n              var point = {\r\n                  x: longitude, \r\n                  y: latitude \r\n              }\r\n              bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;\r\n              bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;\r\n              bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;\r\n              bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;\r\n          }\r\n      }\r\n  }\r\n  return bounds;\r\n}\r\n\r\nfunction coordinateToPoint(latitude, longitude,bounds,scale,xoffset,yoffset) {\r\n  return {\r\n      x: (longitude - bounds.xMin) * scale+xoffset,\r\n      y: (bounds.yMax - latitude) * scale+yoffset\r\n  };\r\n}\r\n\r\nfunction pointToCoordinate(pointY, pointX,bounds,scale,xoffset,yoffset) {\r\n  return {\r\n      x: (pointX-xoffset)/scale+bounds.xMin,\r\n      y: bounds.yMax - (pointY-yoffset)/scale\r\n  };\r\n}\r\n\r\nfunction isRayIntersectsSegment(poi,s_poi,e_poi){\r\n      if (s_poi[1]==e_poi[1]){return false;} \r\n      if (s_poi[1]>poi[1] && e_poi[1]>poi[1]){return false;}\r\n      if (s_poi[1]<poi[1] && e_poi[1]<poi[1]){return false;}\r\n      if (s_poi[1]==poi[1] && e_poi[1]>poi[1]){return false;}\r\n      if (e_poi[1]==poi[1] && s_poi[1]>poi[1]){return false;}\r\n      if (s_poi[0]<poi[0] && e_poi[1]<poi[1]){return false;}\r\n      let xseg=e_poi[0]-(e_poi[0]-s_poi[0])*(e_poi[1]-poi[1])/(e_poi[1]-s_poi[1]); \r\n      if (xseg<poi[0]){\r\n        return false;\r\n      }else{\r\n        return true;\r\n      }\r\n} \r\n\r\nfunction isPoiWithinPoly(poi,poly){\r\n  let sinsc=0;\r\n  for (let i=0;i<poly.length;i++){\r\n    let epoly=poly[i][0];\r\n    if (poly.length == 1) {\r\n      epoly = poly[i][0]\r\n    }\r\n    for(let j=0;j<epoly.length-1;j++){\r\n      let s_poi=epoly[j];\r\n      let e_poi=epoly[j+1];\r\n      if (isRayIntersectsSegment(poi,s_poi,e_poi)){\r\n        sinsc+=1;\r\n      }\r\n    }\r\n  }\r\n  \r\n  if(sinsc%2==1){\r\n    return true;\r\n  }else{\r\n    return false;\r\n  }\r\n}\r\n\r\n\r\nfunction drawMapDataPoints(series, opts, config, context) {\r\n  var mapOption=assign({},{\r\n    border:true,\r\n    borderWidth:1,\r\n    borderColor:'#666666',\r\n    fillOpacity:0.6,\r\n    activeBorderColor:'#f04864',\r\n    activeFillColor:'#facc14',\r\n    activeFillOpacity:1\r\n  },opts.extra.map);\r\n  var coords, point;\r\n  var data = series;\r\n  var bounds= getBoundingBox(data);\r\n  var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);\r\n  var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);\r\n  var scale = xScale < yScale ? xScale : yScale;\r\n  var xoffset=opts.width/2-Math.abs(bounds.xMax - bounds.xMin)/2*scale;\r\n  var yoffset=opts.height/2-Math.abs(bounds.yMax - bounds.yMin)/2*scale;\r\n  context.beginPath();\r\n  context.clearRect(0, 0, opts.width, opts.height);\r\n  context.setFillStyle(opts.background||'#FFFFFF');\r\n  context.rect(0,0,opts.width,opts.height);\r\n  context.fill();\r\n  for (var i = 0; i < data.length; i++) {\r\n    context.beginPath();\r\n    context.setLineWidth(mapOption.borderWidth * opts.pixelRatio);\r\n    context.setStrokeStyle(mapOption.borderColor);\r\n    context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));\r\n    if (opts.tooltip) {\r\n      if (opts.tooltip.index == i ) {\r\n        context.setStrokeStyle(mapOption.activeBorderColor);\r\n        context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));\r\n      }\r\n    }\r\n    var coorda = data[i].geometry.coordinates\r\n    for (var k = 0; k < coorda.length; k++) {\r\n      coords = coorda[k];\r\n      if (coords.length == 1) {\r\n        coords = coords[0]\r\n      }\r\n      for (var j = 0; j < coords.length; j++) {\r\n        point = coordinateToPoint(coords[j][1], coords[j][0],bounds,scale,xoffset,yoffset)\r\n        if (j === 0) {\r\n          context.beginPath();\r\n          context.moveTo(point.x, point.y);\r\n        } else {\r\n          context.lineTo(point.x, point.y);\r\n        }\r\n      }\r\n      context.fill();\r\n      if(mapOption.border == true){\r\n        context.stroke();\r\n      }\r\n    }\r\n    if(opts.dataLabel == true){\r\n      var centerPoint = data[i].properties.centroid;\r\n      if(centerPoint){\r\n        point = coordinateToPoint(centerPoint[1], centerPoint[0],bounds,scale,xoffset,yoffset);\r\n        let fontSize=data[i].textSize||config.fontSize;\r\n        let text=data[i].properties.name;\r\n        context.beginPath();\r\n        context.setFontSize(fontSize)\r\n        context.setFillStyle(data[i].textColor||'#666666')\r\n        context.fillText(text, point.x-measureText(text,fontSize)/2, point.y+fontSize/2);\r\n        context.closePath();\r\n        context.stroke();\r\n      }\r\n    }\r\n  }\r\n  opts.chartData.mapData={\r\n    bounds:bounds,\r\n    scale:scale,\r\n    xoffset:xoffset,\r\n    yoffset:yoffset\r\n  }\r\n  drawToolTipBridge(opts, config, context,1);\r\n  context.draw();\r\n}\r\n\r\nfunction getWordCloudPoint(opts,type){\r\n  let points = opts.series.sort(function(a,b){return parseInt(b.textSize)-parseInt(a.textSize);});\r\n  switch (type) {\r\n    case 'normal':\r\n      for (let i = 0; i < points.length; i++) {\r\n        let text = points[i].name;\r\n        let tHeight = points[i].textSize;\r\n        let tWidth = measureText(text,tHeight);\r\n        let x,y;\r\n        let area;\r\n        let breaknum=0;\r\n        while(true) {\r\n            breaknum++;\r\n            x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2;\r\n            y = normalInt(-opts.height/2, opts.height/2,5) + tHeight/2;\r\n            area=[x-5+opts.width/2,y-5-tHeight+opts.height/2,x+tWidth+5+opts.width/2,y+5+opts.height/2];\r\n            let isCollision = collisionNew(area,points,opts.width,opts.height);\r\n            if (!isCollision) break;\r\n            if (breaknum==1000){\r\n              area=[-100,-100,-100,-100];\r\n              break;\r\n            }\r\n        };\r\n        points[i].area=area;\r\n      }\r\n    break;\r\n    case 'vertical':\r\n      function Spin(){\r\n        //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)\r\n        if (Math.random()>0.7) {\r\n            return true;\r\n        }else {return false};\r\n      };\r\n      for (let i = 0; i < points.length; i++) { \r\n        let text = points[i].name;\r\n        let tHeight = points[i].textSize;\r\n        let tWidth = measureText(text,tHeight);\r\n        let isSpin = Spin(); \r\n        let x,y,area,areav;\r\n        let breaknum=0;\r\n        while(true) {\r\n          breaknum++;\r\n          let isCollision;\r\n          if (isSpin) {\r\n              x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2;\r\n              y = normalInt(-opts.height/2, opts.height/2,5)+tHeight/2;\r\n              area=[y-5-tWidth+opts.width/2,(-x-5+opts.height/2),y+5+opts.width/2,(-x+tHeight+5+opts.height/2)];\r\n              areav=[opts.width-(opts.width/2-opts.height/2)-(-x+tHeight+5+opts.height/2)-5,(opts.height/2-opts.width/2)+(y-5-tWidth+opts.width/2)-5,opts.width-(opts.width/2-opts.height/2)-(-x+tHeight+5+opts.height/2)+tHeight,(opts.height/2-opts.width/2)+(y-5-tWidth+opts.width/2)+tWidth+5];\r\n              isCollision = collisionNew(areav,points,opts.height,opts.width);\r\n          }else{\r\n            x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2;\r\n            y = normalInt(-opts.height/2, opts.height/2,5)+tHeight/2;\r\n            area=[x-5+opts.width/2,y-5-tHeight+opts.height/2,x+tWidth+5+opts.width/2,y+5+opts.height/2];\r\n            isCollision = collisionNew(area,points,opts.width,opts.height);\r\n          } \r\n          if (!isCollision) break;\r\n          if (breaknum==1000){\r\n            area=[-1000,-1000,-1000,-1000];\r\n            break;\r\n          }\r\n        };\r\n        if (isSpin) {\r\n          points[i].area=areav;\r\n          points[i].areav=area;\r\n        }else{\r\n          points[i].area=area;\r\n        }\r\n        points[i].rotate=isSpin;\r\n      };\r\n    break;\r\n  }\r\n  return points;\r\n}\r\n\r\n\r\nfunction drawWordCloudDataPoints(series, opts, config, context) {\r\n  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  let wordOption = assign({},{\r\n    type: 'normal',\r\n    autoColors: true\r\n  },opts.extra.word);\r\n  \r\n  context.beginPath();\r\n  context.setFillStyle(opts.background||'#FFFFFF');\r\n  context.rect(0,0,opts.width,opts.height);\r\n  context.fill();\r\n  context.save();\r\n  let points = opts.chartData.wordCloudData;\r\n  context.translate(opts.width/2,opts.height/2);\r\n  \r\n  for(let i=0;i<points.length;i++){\r\n      context.save();\r\n      if(points[i].rotate){\r\n        context.rotate(90 * Math.PI / 180);\r\n      }\r\n      let text = points[i].name;\r\n      let tHeight = points[i].textSize;\r\n      let tWidth = measureText(text,tHeight);\r\n      context.beginPath();\r\n      context.setStrokeStyle(points[i].color);\r\n      context.setFillStyle(points[i].color);\r\n      context.setFontSize(tHeight);\r\n      if(points[i].rotate){\r\n        if(points[i].areav[0]>0){\r\n          if (opts.tooltip) {\r\n            if (opts.tooltip.index == i) {\r\n              context.strokeText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process);\r\n              }else{\r\n                context.fillText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process);\r\n              }\r\n          }else{\r\n            context.fillText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process);\r\n          } \r\n        }\r\n      }else{\r\n        if(points[i].area[0]>0){\r\n          if (opts.tooltip) {\r\n            if (opts.tooltip.index == i) {\r\n              context.strokeText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process);\r\n            }else{\r\n              context.fillText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process);\r\n            }\r\n          }else{\r\n            context.fillText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process);\r\n          }\r\n            \r\n        }\r\n      }\r\n      \r\n      context.stroke();\r\n      context.restore();\r\n  }\r\n  context.restore();\r\n}\r\n\r\nfunction drawFunnelDataPoints(series, opts, config, context) {\r\n  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\r\n  let funnelOption = assign({},{\r\n    activeWidth:10,\r\n    activeOpacity:0.3,\r\n    border:false,\r\n    borderWidth:2,\r\n    borderColor:'#FFFFFF',\r\n    fillOpacity:1,\r\n    labelAlign:'right'\r\n  },opts.extra.funnel);\r\n  let eachSpacing = (opts.height - opts.area[0] - opts.area[2])/series.length;\r\n  let centerPosition = {\r\n    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,\r\n    y: opts.height-opts.area[2]\r\n  };\r\n  let activeWidth = funnelOption.activeWidth;\r\n  let radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);\r\n  series = getFunnelDataPoints(series, radius, process);\r\n  context.save();\r\n  context.translate(centerPosition.x,centerPosition.y);\r\n  for(let i=0;i<series.length;i++){\r\n    if(i==0){\r\n      if (opts.tooltip) {\r\n        if (opts.tooltip.index == i) {\r\n          context.beginPath();\r\n          context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));\r\n          context.moveTo(-activeWidth, 0);\r\n          context.lineTo(-series[i].radius-activeWidth, -eachSpacing);\r\n          context.lineTo(series[i].radius+activeWidth, -eachSpacing);\r\n          context.lineTo(activeWidth, 0);\r\n          context.lineTo(-activeWidth, 0);\r\n          context.closePath();\r\n          context.fill();\r\n        }\r\n      }\r\n      series[i].funnelArea=[centerPosition.x-series[i].radius,centerPosition.y-eachSpacing,centerPosition.x+series[i].radius,centerPosition.y];\r\n      context.beginPath();\r\n      context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);\r\n      context.setStrokeStyle(funnelOption.borderColor);\r\n      context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));\r\n      context.moveTo(0, 0);\r\n      context.lineTo(-series[i].radius, -eachSpacing);\r\n      context.lineTo(series[i].radius, -eachSpacing);\r\n      context.lineTo(0, 0);\r\n      context.closePath();\r\n      context.fill();\r\n      if(funnelOption.border == true){\r\n        context.stroke();\r\n      }\r\n    }else{\r\n      if (opts.tooltip) {\r\n        if (opts.tooltip.index == i) {\r\n          context.beginPath();\r\n          context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));\r\n          context.moveTo(0, 0);\r\n          context.lineTo(-series[i-1].radius-activeWidth, 0);\r\n          context.lineTo(-series[i].radius-activeWidth, -eachSpacing);\r\n          context.lineTo(series[i].radius+activeWidth, -eachSpacing);\r\n          context.lineTo(series[i-1].radius+activeWidth, 0);\r\n          context.lineTo(0, 0);\r\n          context.closePath();\r\n          context.fill();\r\n        }\r\n      }\r\n      series[i].funnelArea=[centerPosition.x-series[i].radius,centerPosition.y-eachSpacing*(i+1),centerPosition.x+series[i].radius,centerPosition.y-eachSpacing*i];\r\n      context.beginPath();\r\n      context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);\r\n      context.setStrokeStyle(funnelOption.borderColor);\r\n      context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));\r\n      context.moveTo(0, 0);\r\n      context.lineTo(-series[i-1].radius, 0);\r\n      context.lineTo(-series[i].radius, -eachSpacing);\r\n      context.lineTo(series[i].radius, -eachSpacing);\r\n      context.lineTo(series[i-1].radius, 0);\r\n      context.lineTo(0, 0);\r\n      context.closePath();\r\n      context.fill();\r\n      if(funnelOption.border == true){\r\n        context.stroke();\r\n      }\r\n    }\r\n    context.translate(0,-eachSpacing)\r\n  }\r\n  context.restore();\r\n  \r\n  if (opts.dataLabel !== false && process === 1) {\r\n    drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);\r\n  }\r\n  \r\n  return {\r\n    center: centerPosition,\r\n    radius: radius,\r\n    series: series\r\n  };\r\n}\r\n\r\nfunction drawFunnelText(series, opts, context, eachSpacing, labelAlign,activeWidth, centerPosition){\r\n  for(let i=0;i<series.length;i++){\r\n    let item = series[i];\r\n    let startX,endX,startY,fontSize;\r\n    let text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) +'%';\r\n    if(labelAlign == 'right'){\r\n      if(i==0){\r\n        startX=(item.funnelArea[2]+centerPosition.x)/2;\r\n      }else{\r\n        startX=(item.funnelArea[2]+series[i-1].funnelArea[2])/2;\r\n      }\r\n      endX=startX+activeWidth*2;\r\n      startY=item.funnelArea[1]+eachSpacing/2;\r\n      fontSize = item.textSize || opts.fontSize;\r\n      context.setLineWidth(1 * opts.pixelRatio);\r\n      context.setStrokeStyle(item.color);\r\n      context.setFillStyle(item.color);\r\n      context.beginPath();\r\n      context.moveTo(startX,startY );\r\n      context.lineTo(endX,startY);\r\n      context.stroke();\r\n      context.closePath();\r\n      context.beginPath();\r\n      context.moveTo(endX, startY);\r\n      context.arc(endX, startY, 2, 0, 2 * Math.PI);\r\n      context.closePath();\r\n      context.fill();\r\n      context.beginPath();\r\n      context.setFontSize(fontSize);\r\n      context.setFillStyle(item.textColor || '#666666');\r\n      context.fillText(text, endX+5, startY + fontSize/2 -2);\r\n      context.closePath();\r\n      context.stroke();\r\n      context.closePath();\r\n    }else{\r\n      if(i==0){\r\n        startX=(item.funnelArea[0]+centerPosition.x)/2;\r\n      }else{\r\n        startX=(item.funnelArea[0]+series[i-1].funnelArea[0])/2;\r\n      }\r\n      endX=startX-activeWidth*2;\r\n      startY=item.funnelArea[1]+eachSpacing/2;\r\n      fontSize = item.textSize || opts.fontSize;\r\n      context.setLineWidth(1 * opts.pixelRatio);\r\n      context.setStrokeStyle(item.color);\r\n      context.setFillStyle(item.color);\r\n      context.beginPath();\r\n      context.moveTo(startX,startY );\r\n      context.lineTo(endX,startY);\r\n      context.stroke();\r\n      context.closePath();\r\n      context.beginPath();\r\n      context.moveTo(endX, startY);\r\n      context.arc(endX, startY, 2, 0, 2 * Math.PI);\r\n      context.closePath();\r\n      context.fill();\r\n      context.beginPath();\r\n      context.setFontSize(fontSize);\r\n      context.setFillStyle(item.textColor || '#666666');\r\n      context.fillText(text, endX-5-measureText(text), startY + fontSize/2 -2);\r\n      context.closePath();\r\n      context.stroke();\r\n      context.closePath();\r\n    }\r\n    \r\n  }\r\n}\r\n\r\n\r\nfunction drawCanvas(opts, context) {\r\n  context.draw();\r\n}\r\n\r\nvar Timing = {\r\n  easeIn: function easeIn(pos) {\r\n    return Math.pow(pos, 3);\r\n  },\r\n  easeOut: function easeOut(pos) {\r\n    return Math.pow(pos - 1, 3) + 1;\r\n  },\r\n  easeInOut: function easeInOut(pos) {\r\n    if ((pos /= 0.5) < 1) {\r\n      return 0.5 * Math.pow(pos, 3);\r\n    } else {\r\n      return 0.5 * (Math.pow(pos - 2, 3) + 2);\r\n    }\r\n  },\r\n  linear: function linear(pos) {\r\n    return pos;\r\n  }\r\n};\r\n\r\nfunction Animation(opts) {\r\n  this.isStop = false;\r\n  opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;\r\n  opts.timing = opts.timing || 'linear';\r\n  var delay = 17;\r\n\r\n  function createAnimationFrame() {\r\n    if (typeof setTimeout !== 'undefined') {\r\n      return function(step, delay) {\r\n        setTimeout(function() {\r\n          var timeStamp = +new Date();\r\n          step(timeStamp);\r\n        }, delay);\r\n      };\r\n    } else if (typeof requestAnimationFrame !== 'undefined') {\r\n      return requestAnimationFrame;\r\n    } else {\r\n      return function(step) {\r\n        step(null);\r\n      };\r\n    }\r\n  };\r\n  var animationFrame = createAnimationFrame();\r\n  var startTimeStamp = null;\r\n  var _step = function step(timestamp) {\r\n    if (timestamp === null || this.isStop === true) {\r\n      opts.onProcess && opts.onProcess(1);\r\n      opts.onAnimationFinish && opts.onAnimationFinish();\r\n      return;\r\n    }\r\n    if (startTimeStamp === null) {\r\n      startTimeStamp = timestamp;\r\n    }\r\n    if (timestamp - startTimeStamp < opts.duration) {\r\n      var process = (timestamp - startTimeStamp) / opts.duration;\r\n      var timingFunction = Timing[opts.timing];\r\n      process = timingFunction(process);\r\n\r\n      opts.onProcess && opts.onProcess(process);\r\n      animationFrame(_step, delay);\r\n    } else {\r\n      opts.onProcess && opts.onProcess(1);\r\n      opts.onAnimationFinish && opts.onAnimationFinish();\r\n    }\r\n  };\r\n  _step = _step.bind(this);\r\n  animationFrame(_step, delay);\r\n}\r\n\r\n// stop animation immediately\r\n// and tigger onAnimationFinish\r\nAnimation.prototype.stop = function() {\r\n  this.isStop = true;\r\n};\r\n\r\nfunction drawCharts(type, opts, config, context) {\r\n  var _this = this;\r\n  var series = opts.series;\r\n  var categories = opts.categories;\r\n  series = fillSeries(series, opts, config);\r\n  var duration = opts.animation ? opts.duration : 0;\r\n  _this.animationInstance && _this.animationInstance.stop();\r\n  var seriesMA = null;\r\n  if (type == 'candle') {\r\n    let average = assign({}, opts.extra.candle.average);\r\n    if (average.show) {\r\n      seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);\r\n      seriesMA = fillSeries(seriesMA, opts, config);\r\n      opts.seriesMA = seriesMA;\r\n    } else if (opts.seriesMA) {\r\n      seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);\r\n    } else {\r\n      seriesMA = series;\r\n    }\r\n  } else {\r\n    seriesMA = series;\r\n  }\r\n\r\n  /* 过滤掉show=false的series */\r\n  opts._series_ = series = filterSeries(series);\r\n\r\n  //重新计算图表区域\r\n\r\n  opts.area = new Array(4);\r\n  //复位绘图区域\r\n  for (let j = 0; j < 4; j++) {\r\n    opts.area[j] = opts.padding[j];\r\n  }\r\n\r\n  //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域\r\n  var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData),\r\n    legendHeight = _calLegendData.area.wholeHeight,\r\n    legendWidth = _calLegendData.area.wholeWidth;\r\n    \r\n  switch (opts.legend.position) {\r\n    case 'top':\r\n      opts.area[0] += legendHeight;\r\n      break;\r\n    case 'bottom':\r\n      opts.area[2] += legendHeight;\r\n      break;\r\n    case 'left':\r\n      opts.area[3] += legendWidth;\r\n      break;\r\n    case 'right':\r\n      opts.area[1] += legendWidth;\r\n      break;\r\n  }\r\n\r\n  let _calYAxisData = {},yAxisWidth = 0;\r\n  if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle') {\r\n    _calYAxisData = calYAxisData(series, opts, config);\r\n    yAxisWidth = _calYAxisData.yAxisWidth;\r\n    //如果显示Y轴标题\r\n    if(opts.yAxis.showTitle){\r\n      let maxTitleHeight=0;\r\n      for(let i=0;i<opts.yAxis.data.length;i++){\r\n        maxTitleHeight = Math.max(maxTitleHeight,opts.yAxis.data[i].titleFontSize?opts.yAxis.data[i].titleFontSize:config.fontSize)\r\n      }\r\n      opts.area[0] += (maxTitleHeight+6)*opts.pixelRatio;\r\n    }\r\n    let rightIndex=0,leftIndex=0;\r\n    //计算主绘图区域左右位置\r\n    for(let i=0;i<yAxisWidth.length;i++){\r\n      if(yAxisWidth[i].position=='left'){\r\n        if(leftIndex>0){\r\n          opts.area[3] += yAxisWidth[i].width + opts.yAxis.padding;\r\n        }else{\r\n          opts.area[3] += yAxisWidth[i].width;\r\n        }\r\n        leftIndex +=1;\r\n      }else{\r\n        if(rightIndex>0){\r\n          opts.area[1] += yAxisWidth[i].width + opts.yAxis.padding;\r\n        }else{\r\n          opts.area[1] += yAxisWidth[i].width;\r\n        }\r\n        rightIndex +=1;\r\n      }\r\n    }\r\n  }else{\r\n    config.yAxisWidth = yAxisWidth;\r\n  }\r\n  opts.chartData.yAxisData = _calYAxisData;\r\n\r\n  if (opts.categories && opts.categories.length) {\r\n    opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);\r\n    let _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing),\r\n      xAxisHeight = _calCategoriesData.xAxisHeight,\r\n      angle = _calCategoriesData.angle;\r\n    config.xAxisHeight = xAxisHeight;\r\n    config._xAxisTextAngle_ = angle;\r\n    opts.area[2] += xAxisHeight;\r\n    opts.chartData.categoriesData = _calCategoriesData;\r\n  }else{\r\n\t\tif (opts.type === 'line' || opts.type === 'area' || opts.type === 'points') {\r\n\t\t\topts.chartData.xAxisData = calXAxisData(series, opts, config);\r\n\t\t\tcategories=opts.chartData.xAxisData.rangesFormat;\r\n\t\t\tlet _calCategoriesData = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing),\r\n\t\t\t  xAxisHeight = _calCategoriesData.xAxisHeight,\r\n\t\t\t  angle = _calCategoriesData.angle;\r\n\t\t\tconfig.xAxisHeight = xAxisHeight;\r\n\t\t\tconfig._xAxisTextAngle_ = angle;\r\n\t\t\topts.area[2] += xAxisHeight;\r\n\t\t\topts.chartData.categoriesData = _calCategoriesData;\r\n\t\t}else{\r\n\t\t\topts.chartData.xAxisData={\r\n\t\t\t\txAxisPoints: []\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n  //计算右对齐偏移距离\r\n  if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {\r\n    let offsetLeft = 0,\r\n      xAxisPoints = opts.chartData.xAxisData.xAxisPoints,\r\n      startX = opts.chartData.xAxisData.startX,\r\n      endX = opts.chartData.xAxisData.endX,\r\n      eachSpacing = opts.chartData.xAxisData.eachSpacing;\r\n    let totalWidth = eachSpacing * (xAxisPoints.length - 1);\r\n    let screenWidth = endX - startX;\r\n    offsetLeft = screenWidth - totalWidth;\r\n    _this.scrollOption = {\r\n      currentOffset: offsetLeft,\r\n      startTouchX: offsetLeft,\r\n      distance: 0,\r\n      lastMoveTime: 0\r\n    };\r\n    opts._scrollDistance_ = offsetLeft;\r\n  }\r\n\r\n  if (type === 'pie' || type === 'ring' || type === 'rose') {\r\n    config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA);\r\n  }\r\n\r\n  switch (type) {\r\n    case 'word':\r\n      let wordOption = assign({},{\r\n        type: 'normal',\r\n        autoColors: true\r\n      },opts.extra.word);\r\n      if(opts.updateData==true || opts.updateData==undefined){\r\n        opts.chartData.wordCloudData=getWordCloudPoint(opts,wordOption.type);\r\n      }\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          drawWordCloudDataPoints(series, opts, config, context,process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n    break;\r\n    case 'map':\r\n      context.clearRect(0, 0, opts.width, opts.height);\r\n      drawMapDataPoints(series, opts, config, context);\r\n    break;\r\n    case 'funnel':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n    break;\r\n    case 'line':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeIn',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          drawYAxisGrid(categories, opts, config, context);\r\n          drawXAxis(categories, opts, config, context);\r\n          var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),\r\n            xAxisPoints = _drawLineDataPoints.xAxisPoints,\r\n            calPoints = _drawLineDataPoints.calPoints,\r\n            eachSpacing = _drawLineDataPoints.eachSpacing;\r\n          opts.chartData.xAxisPoints = xAxisPoints;\r\n          opts.chartData.calPoints = calPoints;\r\n          opts.chartData.eachSpacing = eachSpacing;\r\n          drawYAxis(series, opts, config, context);\r\n          if (opts.enableMarkLine !== false && process === 1) {\r\n            drawMarkLine(opts, config, context);\r\n          }\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);\r\n          drawCanvas(opts, context);\r\n\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'mix':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeIn',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          drawYAxisGrid(categories, opts, config, context);\r\n          drawXAxis(categories, opts, config, context);\r\n          var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),\r\n            xAxisPoints = _drawMixDataPoints.xAxisPoints,\r\n            calPoints = _drawMixDataPoints.calPoints,\r\n            eachSpacing = _drawMixDataPoints.eachSpacing;\r\n          opts.chartData.xAxisPoints = xAxisPoints;\r\n          opts.chartData.calPoints = calPoints;\r\n          opts.chartData.eachSpacing = eachSpacing;\r\n          drawYAxis(series, opts, config, context);\r\n          if (opts.enableMarkLine !== false && process === 1) {\r\n            drawMarkLine(opts, config, context);\r\n          }\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'column':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeIn',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          drawYAxisGrid(categories, opts, config, context);\r\n          drawXAxis(categories, opts, config, context);\r\n          var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),\r\n            xAxisPoints = _drawColumnDataPoints.xAxisPoints,\r\n            calPoints = _drawColumnDataPoints.calPoints,\r\n            eachSpacing = _drawColumnDataPoints.eachSpacing;\r\n          opts.chartData.xAxisPoints = xAxisPoints;\r\n          opts.chartData.calPoints = calPoints;\r\n          opts.chartData.eachSpacing = eachSpacing;\r\n          drawYAxis(series, opts, config, context);\r\n          if (opts.enableMarkLine !== false && process === 1) {\r\n            drawMarkLine(opts, config, context);\r\n          }\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'area':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeIn',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          drawYAxisGrid(categories, opts, config, context);\r\n          drawXAxis(categories, opts, config, context);\r\n          var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),\r\n            xAxisPoints = _drawAreaDataPoints.xAxisPoints,\r\n            calPoints = _drawAreaDataPoints.calPoints,\r\n            eachSpacing = _drawAreaDataPoints.eachSpacing;\r\n          opts.chartData.xAxisPoints = xAxisPoints;\r\n          opts.chartData.calPoints = calPoints;\r\n          opts.chartData.eachSpacing = eachSpacing;\r\n          drawYAxis(series, opts, config, context);\r\n          if (opts.enableMarkLine !== false && process === 1) {\r\n            drawMarkLine(opts, config, context);\r\n          }\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'ring':\r\n    case 'pie':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'rose':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'radar':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);\r\n          drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          drawToolTipBridge(opts, config, context, process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'arcbar':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'gauge':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeInOut',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n    case 'candle':\r\n      this.animationInstance = new Animation({\r\n        timing: 'easeIn',\r\n        duration: duration,\r\n        onProcess: function onProcess(process) {\r\n          context.clearRect(0, 0, opts.width, opts.height);\r\n          if (opts.rotate) {\r\n            contextRotate(context, opts);\r\n          }\r\n          drawYAxisGrid(categories, opts, config, context);\r\n          drawXAxis(categories, opts, config, context);\r\n          var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),\r\n            xAxisPoints = _drawCandleDataPoints.xAxisPoints,\r\n            calPoints = _drawCandleDataPoints.calPoints,\r\n            eachSpacing = _drawCandleDataPoints.eachSpacing;\r\n          opts.chartData.xAxisPoints = xAxisPoints;\r\n          opts.chartData.calPoints = calPoints;\r\n          opts.chartData.eachSpacing = eachSpacing;\r\n          drawYAxis(series, opts, config, context);\r\n          if (opts.enableMarkLine !== false && process === 1) {\r\n            drawMarkLine(opts, config, context);\r\n          }\r\n          if (seriesMA) {\r\n            drawLegend(seriesMA, opts, config, context, opts.chartData);\r\n          } else {\r\n            drawLegend(opts.series, opts, config, context, opts.chartData);\r\n          }\r\n          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);\r\n          drawCanvas(opts, context);\r\n        },\r\n        onAnimationFinish: function onAnimationFinish() {\r\n          _this.event.trigger('renderComplete');\r\n        }\r\n      });\r\n      break;\r\n  }\r\n}\r\n\r\n// simple event implement\r\n\r\nfunction Event() {\r\n  this.events = {};\r\n}\r\n\r\nEvent.prototype.addEventListener = function(type, listener) {\r\n  this.events[type] = this.events[type] || [];\r\n  this.events[type].push(listener);\r\n};\r\n\r\nEvent.prototype.trigger = function() {\r\n  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\r\n    args[_key] = arguments[_key];\r\n  }\r\n\r\n  var type = args[0];\r\n  var params = args.slice(1);\r\n  if (!!this.events[type]) {\r\n    this.events[type].forEach(function(listener) {\r\n      try {\r\n        listener.apply(null, params);\r\n      } catch (e) {\r\n        console.error(e);\r\n      }\r\n    });\r\n  }\r\n};\r\n\r\nvar Charts = function Charts(opts) {\r\n  opts.pixelRatio = opts.pixelRatio ? opts.pixelRatio : 1;\r\n  opts.fontSize = opts.fontSize ? opts.fontSize * opts.pixelRatio : 13 * opts.pixelRatio;\r\n  opts.title = assign({}, opts.title);\r\n  opts.subtitle = assign({}, opts.subtitle);\r\n  opts.duration = opts.duration ? opts.duration : 1000;\r\n  opts.yAxis = assign({}, {\r\n    data:[],\r\n    showTitle:false,\r\n    disabled:false,\r\n    disableGrid:false,\r\n    splitNumber:5,\r\n    gridType: 'solid',\r\n    dashLength: 4 * opts.pixelRatio,\r\n    gridColor:'#cccccc',\r\n    padding:10,\r\n    fontColor:'#666666'\r\n  }, opts.yAxis);\r\n  opts.yAxis.dashLength *= opts.pixelRatio;\r\n  opts.yAxis.padding *= opts.pixelRatio;\r\n  opts.xAxis = assign({}, {\r\n    rotateLabel: false,\r\n    type: 'calibration',\r\n    gridType: 'solid',\r\n    dashLength: 4,\r\n    scrollAlign: 'left',\r\n    boundaryGap:'center',\r\n    axisLine:true,\r\n    axisLineColor:'#cccccc'\r\n  }, opts.xAxis);\r\n  opts.xAxis.dashLength *= opts.pixelRatio;\r\n  opts.legend = assign({}, {\r\n    show: true,\r\n    position: 'bottom',\r\n    float: 'center',\r\n    backgroundColor: 'rgba(0,0,0,0)',\r\n    borderColor: 'rgba(0,0,0,0)',\r\n    borderWidth: 0,\r\n    padding: 5,\r\n    margin: 5,\r\n    itemGap: 10,\r\n    fontSize: opts.fontSize,\r\n    lineHeight: opts.fontSize,\r\n    fontColor: '#333333',\r\n    format: {},\r\n    hiddenColor: '#CECECE'\r\n  }, opts.legend);\r\n  opts.legend.borderWidth = opts.legend.borderWidth * opts.pixelRatio;\r\n  opts.legend.itemGap = opts.legend.itemGap * opts.pixelRatio;\r\n  opts.legend.padding = opts.legend.padding * opts.pixelRatio;\r\n  opts.legend.margin = opts.legend.margin * opts.pixelRatio;\r\n  opts.extra = assign({}, opts.extra);\r\n  opts.rotate = opts.rotate ? true : false;\r\n  opts.animation = opts.animation ? true : false;\r\n\topts.rotate = opts.rotate ? true : false;\r\n\r\n  let config$$1 = JSON.parse(JSON.stringify(config));\r\n  config$$1.colors = opts.colors ? opts.colors : config$$1.colors;\r\n  config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;\r\n  if (opts.type == 'pie' || opts.type == 'ring') {\r\n    config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;\r\n  }\r\n  if (opts.type == 'rose') {\r\n    config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;\r\n  }\r\n  config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pixelRatio;\r\n  config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;\r\n\r\n  //屏幕旋转\r\n  config$$1.rotate = opts.rotate;\r\n  if (opts.rotate) {\r\n    let tempWidth = opts.width;\r\n    let tempHeight = opts.height;\r\n    opts.width = tempHeight;\r\n    opts.height = tempWidth;\r\n  }\r\n\r\n  //适配高分屏\r\n  opts.padding = opts.padding ? opts.padding : config$$1.padding;\r\n  for (let i = 0; i < 4; i++) {\r\n    opts.padding[i] *= opts.pixelRatio;\r\n  }\r\n  config$$1.yAxisWidth = config.yAxisWidth * opts.pixelRatio;\r\n  config$$1.xAxisHeight = config.xAxisHeight * opts.pixelRatio;\r\n  if (opts.enableScroll && opts.xAxis.scrollShow) {\r\n    config$$1.xAxisHeight += 6 * opts.pixelRatio;\r\n  }\r\n  config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pixelRatio;\r\n  config$$1.fontSize = opts.fontSize;\r\n  config$$1.titleFontSize = config.titleFontSize * opts.pixelRatio;\r\n  config$$1.subtitleFontSize = config.subtitleFontSize * opts.pixelRatio;\r\n  config$$1.toolTipPadding = config.toolTipPadding * opts.pixelRatio;\r\n  config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pixelRatio;\r\n  config$$1.columePadding = config.columePadding * opts.pixelRatio;\r\n  opts.$this = opts.$this ? opts.$this : this;\r\n  \r\n  this.context = uni.createCanvasContext(opts.canvasId, opts.$this);\r\n  /* 兼容原生H5\r\n  this.context = document.getElementById(opts.canvasId).getContext(\"2d\");\r\n  this.context.setStrokeStyle = function(e){ return this.strokeStyle=e; }\r\n  this.context.setLineWidth = function(e){ return this.lineWidth=e; }\r\n  this.context.setLineCap = function(e){ return this.lineCap=e; }\r\n  this.context.setFontSize = function(e){ return this.font=e+\"px sans-serif\"; }\r\n  this.context.setFillStyle = function(e){ return this.fillStyle=e; }\r\n  this.context.draw = function(){ }\r\n  */\r\n\r\n  opts.chartData = {};\r\n  this.event = new Event();\r\n  this.scrollOption = {\r\n    currentOffset: 0,\r\n    startTouchX: 0,\r\n    distance: 0,\r\n    lastMoveTime: 0\r\n  };\r\n\r\n  this.opts = opts;\r\n  this.config = config$$1;\r\n\r\n  drawCharts.call(this, opts.type, opts, config$$1, this.context);\r\n};\r\n\r\nCharts.prototype.updateData = function() {\r\n  let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\r\n  this.opts = assign({}, this.opts, data);\r\n  this.opts.updateData = true;\r\n  let scrollPosition = data.scrollPosition || 'current';\r\n  switch (scrollPosition) {\r\n    case 'current':\r\n      this.opts._scrollDistance_ = this.scrollOption.currentOffset;\r\n      break;\r\n    case 'left':\r\n      this.opts._scrollDistance_ = 0;\r\n      this.scrollOption = {\r\n        currentOffset: 0,\r\n        startTouchX: 0,\r\n        distance: 0,\r\n        lastMoveTime: 0\r\n      };\r\n      break;\r\n    case 'right':\r\n      let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),\r\n        yAxisWidth = _calYAxisData.yAxisWidth;\r\n      this.config.yAxisWidth = yAxisWidth;\r\n      let offsetLeft = 0;\r\n      let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),\r\n        xAxisPoints = _getXAxisPoints0.xAxisPoints,\r\n        startX = _getXAxisPoints0.startX,\r\n        endX = _getXAxisPoints0.endX,\r\n        eachSpacing = _getXAxisPoints0.eachSpacing;\r\n      let totalWidth = eachSpacing * (xAxisPoints.length - 1);\r\n      let screenWidth = endX - startX;\r\n      offsetLeft = screenWidth - totalWidth;\r\n      this.scrollOption = {\r\n        currentOffset: offsetLeft,\r\n        startTouchX: offsetLeft,\r\n        distance: 0,\r\n        lastMoveTime: 0\r\n      };\r\n      this.opts._scrollDistance_ = offsetLeft;\r\n      break;\r\n  }\r\n  drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);\r\n};\r\n\r\nCharts.prototype.zoom = function() {\r\n  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;\r\n  if (this.opts.enableScroll !== true) {\r\n    console.log('请启用滚动条后使用!')\r\n    return;\r\n  }\r\n  //当前屏幕中间点\r\n  let centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(\r\n    this.opts.xAxis.itemCount / 2);\r\n  this.opts.animation = false;\r\n  this.opts.xAxis.itemCount = val.itemCount;\r\n  //重新计算x轴偏移距离\r\n  let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),\r\n    yAxisWidth = _calYAxisData.yAxisWidth;\r\n  this.config.yAxisWidth = yAxisWidth;\r\n  let offsetLeft = 0;\r\n  let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),\r\n    xAxisPoints = _getXAxisPoints0.xAxisPoints,\r\n    startX = _getXAxisPoints0.startX,\r\n    endX = _getXAxisPoints0.endX,\r\n    eachSpacing = _getXAxisPoints0.eachSpacing;\r\n  let centerLeft = eachSpacing * centerPoint;\r\n  let screenWidth = endX - startX;\r\n  let MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);\r\n  offsetLeft = screenWidth / 2 - centerLeft;\r\n  if (offsetLeft > 0) {\r\n    offsetLeft = 0;\r\n  }\r\n  if (offsetLeft < MaxLeft) {\r\n    offsetLeft = MaxLeft;\r\n  }\r\n  this.scrollOption = {\r\n    currentOffset: offsetLeft,\r\n    startTouchX: offsetLeft,\r\n    distance: 0,\r\n    lastMoveTime: 0\r\n  };\r\n  this.opts._scrollDistance_ = offsetLeft;\r\n  drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);\r\n};\r\n\r\nCharts.prototype.stopAnimation = function() {\r\n  this.animationInstance && this.animationInstance.stop();\r\n};\r\n\r\nCharts.prototype.addEventListener = function(type, listener) {\r\n  this.event.addEventListener(type, listener);\r\n};\r\n\r\nCharts.prototype.getCurrentDataIndex = function(e) {\r\n  var touches = null;\r\n  if (e.changedTouches) {\r\n    touches = e.changedTouches[0];\r\n  } else {\r\n    touches = e.mp.changedTouches[0];\r\n  }\r\n  if (touches) {\r\n    let _touches$ = getTouches(touches, this.opts, e);\r\n    if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') {\r\n      return findPieChartCurrentIndex({\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      }, this.opts.chartData.pieData);\r\n    } else if (this.opts.type === 'radar') {\r\n      return findRadarChartCurrentIndex({\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      }, this.opts.chartData.radarData, this.opts.categories.length);\r\n    } else if (this.opts.type === 'funnel') {\r\n      return findFunnelChartCurrentIndex({\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      }, this.opts.chartData.funnelData);\r\n    } else if (this.opts.type === 'map') {\r\n      return findMapChartCurrentIndex({\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      }, this.opts);\r\n    }else if (this.opts.type === 'word') {\r\n      return findWordChartCurrentIndex({\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      }, this.opts.chartData.wordCloudData);\r\n    } else {\r\n      return findCurrentIndex({\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));\r\n    }\r\n  }\r\n  return -1;\r\n};\r\n\r\nCharts.prototype.getLegendDataIndex = function(e) {\r\n  var touches = null;\r\n  if (e.changedTouches) {\r\n    touches = e.changedTouches[0];\r\n  } else {\r\n    touches = e.mp.changedTouches[0];\r\n  }\r\n  if (touches) {\r\n    let _touches$ = getTouches(touches, this.opts, e);\r\n    return findLegendIndex({\r\n      x: _touches$.x,\r\n      y: _touches$.y\r\n    }, this.opts.chartData.legendData);\r\n  }\r\n  return -1;\r\n};\r\n\r\nCharts.prototype.touchLegend = function(e) {\r\n  var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n  var touches = null;\r\n  if (e.changedTouches) {\r\n    touches = e.changedTouches[0];\r\n  } else {\r\n    touches = e.mp.changedTouches[0];\r\n  }\r\n  if (touches) {\r\n    var _touches$ = getTouches(touches, this.opts, e);\r\n    var index = this.getLegendDataIndex(e);\r\n    if (index >= 0) {\r\n      this.opts.series[index].show = !this.opts.series[index].show;\r\n      this.opts.animation = option.animation ? true : false;\r\n\t\t\tthis.opts._scrollDistance_= this.scrollOption.currentOffset;\r\n      drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);\r\n    }\r\n  }\r\n\r\n};\r\n\r\nCharts.prototype.showToolTip = function(e) {\r\n  var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n  var touches = null;\r\n  if (e.changedTouches) {\r\n    touches = e.changedTouches[0];\r\n  } else {\r\n    touches = e.mp.changedTouches[0];\r\n  }\r\n  if (!touches) {\r\n    console.log(\"touchError\");\r\n  }\r\n  var _touches$ = getTouches(touches, this.opts, e);\r\n  var currentOffset = this.scrollOption.currentOffset;\r\n  var opts = assign({}, this.opts, {\r\n    _scrollDistance_: currentOffset,\r\n    animation: false\r\n  });\r\n  if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column') {\r\n    var index = this.getCurrentDataIndex(e);\r\n    if (index > -1) {\r\n      var seriesData = getSeriesDataItem(this.opts.series, index);\r\n      if (seriesData.length !== 0) {\r\n        var _getToolTipData = getToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories,option),\r\n          textList = _getToolTipData.textList,\r\n          offset = _getToolTipData.offset;\r\n        offset.y = _touches$.y;\r\n        opts.tooltip = {\r\n          textList: textList,\r\n          offset: offset,\r\n          option: option,\r\n          index: index\r\n        };\r\n      }\r\n    }\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n  }\r\n  if (this.opts.type === 'mix') {\r\n    var index = this.getCurrentDataIndex(e);\r\n    if (index > -1) {\r\n      var currentOffset = this.scrollOption.currentOffset;\r\n      var opts = assign({}, this.opts, {\r\n        _scrollDistance_: currentOffset,\r\n        animation: false\r\n      });\r\n      var seriesData = getSeriesDataItem(this.opts.series, index);\r\n      if (seriesData.length !== 0) {\r\n        var _getMixToolTipData = getMixToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories,option),\r\n          textList = _getMixToolTipData.textList,\r\n          offset = _getMixToolTipData.offset;\r\n        offset.y = _touches$.y;\r\n        opts.tooltip = {\r\n          textList: textList,\r\n          offset: offset,\r\n          option: option,\r\n          index: index\r\n        };\r\n      }\r\n    }\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n  }\r\n  if (this.opts.type === 'candle') {\r\n    var index = this.getCurrentDataIndex(e);\r\n    if (index > -1) {\r\n      var currentOffset = this.scrollOption.currentOffset;\r\n      var opts = assign({}, this.opts, {\r\n        _scrollDistance_: currentOffset,\r\n        animation: false\r\n      });\r\n      var seriesData = getSeriesDataItem(this.opts.series, index);\r\n      if (seriesData.length !== 0) {\r\n        var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts.chartData.calPoints,\r\n            index, this.opts.categories, this.opts.extra.candle, option),\r\n          textList = _getToolTipData.textList,\r\n          offset = _getToolTipData.offset;\r\n        offset.y = _touches$.y;\r\n        opts.tooltip = {\r\n          textList: textList,\r\n          offset: offset,\r\n          option: option,\r\n          index: index\r\n        };\r\n      }\r\n    }\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n  }\r\n  if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose'||this.opts.type === 'funnel' ) {\r\n    var index = this.getCurrentDataIndex(e);\r\n    if (index > -1) {\r\n      var currentOffset = this.scrollOption.currentOffset;\r\n      var opts = assign({}, this.opts, {\r\n        _scrollDistance_: currentOffset,\r\n        animation: false\r\n      });\r\n      var seriesData = this.opts._series_[index];\r\n      var textList = [{\r\n        text: option.format ? option.format(seriesData) : seriesData.name + ': ' + seriesData.data,\r\n        color: seriesData.color\r\n      }];\r\n      var offset = {\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      };\r\n      opts.tooltip = {\r\n        textList: textList,\r\n        offset: offset,\r\n        option: option,\r\n        index: index\r\n      };\r\n    }\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n  }\r\n  if (this.opts.type === 'map'||this.opts.type === 'word') {\r\n    var index = this.getCurrentDataIndex(e);\r\n    if (index > -1) {\r\n      var currentOffset = this.scrollOption.currentOffset;\r\n      var opts = assign({}, this.opts, {\r\n        _scrollDistance_: currentOffset,\r\n        animation: false\r\n      });\r\n      var seriesData = this.opts._series_[index];\r\n      var textList = [{\r\n        text: option.format ? option.format(seriesData) : seriesData.properties.name ,\r\n        color: seriesData.color\r\n      }];\r\n      var offset = {\r\n        x: _touches$.x,\r\n        y: _touches$.y\r\n      };\r\n      opts.tooltip = {\r\n        textList: textList,\r\n        offset: offset,\r\n        option: option,\r\n        index: index\r\n      };\r\n    }\r\n    opts.updateData = false;\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n  }\r\n  if (this.opts.type === 'radar') {\r\n    var index = this.getCurrentDataIndex(e);\r\n    if (index > -1) {\r\n      var currentOffset = this.scrollOption.currentOffset;\r\n      var opts = assign({}, this.opts, {\r\n        _scrollDistance_: currentOffset,\r\n        animation: false\r\n      });\r\n      var seriesData = getSeriesDataItem(this.opts.series, index);\r\n      if (seriesData.length !== 0) {\r\n        var textList = seriesData.map(function(item) {\r\n          return {\r\n            text: option.format ? option.format(item) : item.name + ': ' + item.data,\r\n            color: item.color\r\n          };\r\n        });\r\n        var offset = {\r\n          x: _touches$.x,\r\n          y: _touches$.y\r\n        };\r\n        opts.tooltip = {\r\n          textList: textList,\r\n          offset: offset,\r\n          option: option,\r\n          index: index\r\n        };\r\n      }\r\n    }\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n  }\r\n};\r\n\r\nCharts.prototype.translate = function(distance) {\r\n  this.scrollOption = {\r\n    currentOffset: distance,\r\n    startTouchX: distance,\r\n    distance: 0,\r\n    lastMoveTime: 0\r\n  };\r\n  let opts = assign({}, this.opts, {\r\n    _scrollDistance_: distance,\r\n    animation: false\r\n  });\r\n  drawCharts.call(this, this.opts.type, opts, this.config, this.context);\r\n};\r\n\r\nCharts.prototype.scrollStart = function(e) {\r\n  var touches = null;\r\n  if (e.changedTouches) {\r\n    touches = e.changedTouches[0];\r\n  } else {\r\n    touches = e.mp.changedTouches[0];\r\n  }\r\n  var _touches$ = getTouches(touches, this.opts, e);\r\n  if (touches && this.opts.enableScroll === true) {\r\n    this.scrollOption.startTouchX = _touches$.x;\r\n  }\r\n};\r\n\r\nCharts.prototype.scroll = function(e) {\r\n  if (this.scrollOption.lastMoveTime === 0) {\r\n    this.scrollOption.lastMoveTime = Date.now();\r\n  }\r\n  let Limit = this.opts.extra.touchMoveLimit || 20;\r\n  let currMoveTime = Date.now();\r\n  let duration = currMoveTime - this.scrollOption.lastMoveTime;\r\n  if (duration < Math.floor(1000 / Limit)) return;\r\n  this.scrollOption.lastMoveTime = currMoveTime;\r\n  var touches = null;\r\n  if (e.changedTouches) {\r\n    touches = e.changedTouches[0];\r\n  } else {\r\n    touches = e.mp.changedTouches[0];\r\n  }\r\n  if (touches && this.opts.enableScroll === true) {\r\n    var _touches$ = getTouches(touches, this.opts, e);\r\n    var _distance;\r\n    _distance = _touches$.x - this.scrollOption.startTouchX;\r\n    var currentOffset = this.scrollOption.currentOffset;\r\n    var validDistance = calValidDistance(this,currentOffset + _distance, this.opts.chartData, this.config, this.opts);\r\n    this.scrollOption.distance = _distance = validDistance - currentOffset;\r\n    var opts = assign({}, this.opts, {\r\n      _scrollDistance_: currentOffset + _distance,\r\n      animation: false\r\n    });\r\n    drawCharts.call(this, opts.type, opts, this.config, this.context);\r\n    return currentOffset + _distance;\r\n  }\r\n};\r\n\r\nCharts.prototype.scrollEnd = function(e) {\r\n  if (this.opts.enableScroll === true) {\r\n    var _scrollOption = this.scrollOption,\r\n      currentOffset = _scrollOption.currentOffset,\r\n      distance = _scrollOption.distance;\r\n    this.scrollOption.currentOffset = currentOffset + distance;\r\n    this.scrollOption.distance = 0;\r\n  }\r\n};\r\nif (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n  module.exports = Charts;\r\n  //export default Charts;//建议使用nodejs的module导出方式,如报错请使用export方式导出\r\n}\r\n","module.exports = {\r\n\terror:'',\r\n\tisJSON : function (str){\r\n\t\tif (typeof str == 'string') {\r\n\t\t\ttry {\r\n\t\t\t\tvar obj=JSON.parse(str);\r\n\t\t\t\tif(typeof obj == 'object' && obj ){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} catch(e) {\r\n\t\t\t\tconsole.log('error:'+str+'!!!'+e);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tisNumber : function (checkVal){\r\n\t\tvar reg = /^-?[1-9][0-9]?.?[0-9]*$/;\r\n\t\treturn reg.test(checkVal);\r\n\t}\r\n}","import { version } from '../package.json';\r\n\r\nconst STAT_VERSION = version;\r\nconst STAT_URL = 'https://tongji.dcloud.io/uni/stat';\r\nconst STAT_H5_URL = 'https://tongji.dcloud.io/uni/stat.gif'; \r\nconst PAGE_PVER_TIME = 1800;\r\nconst APP_PVER_TIME = 300;\r\nconst OPERATING_TIME = 10;\r\n\r\nconst UUID_KEY = '__DC_STAT_UUID';\r\nconst UUID_VALUE = '__DC_UUID_VALUE';\r\n\r\nfunction getUuid() {\r\n  let uuid = '';\r\n  if (getPlatformName() === 'n') {\r\n    try {\r\n      uuid = plus.runtime.getDCloudId();\r\n    } catch (e) {\r\n      uuid = '';\r\n    }\r\n    return uuid\r\n  }\r\n\r\n  try {\r\n    uuid = uni.getStorageSync(UUID_KEY);\r\n  } catch (e) {\r\n    uuid = UUID_VALUE;\r\n  }\r\n\r\n  if (!uuid) {\r\n    uuid = Date.now() + '' + Math.floor(Math.random() * 1e7);\r\n    try {\r\n      uni.setStorageSync(UUID_KEY, uuid);\r\n    } catch (e) {\r\n      uni.setStorageSync(UUID_KEY, UUID_VALUE);\r\n    }\r\n  }\r\n  return uuid;\r\n}\r\n\r\nconst getSgin = (statData) => {\r\n  let arr = Object.keys(statData);\r\n  let sortArr = arr.sort();\r\n  let sgin = {};\r\n  let sginStr = '';\r\n  for (var i in sortArr) {\r\n    sgin[sortArr[i]] = statData[sortArr[i]];\r\n    sginStr += sortArr[i] + '=' + statData[sortArr[i]] + '&';\r\n  }\r\n  // const options = sginStr.substr(0, sginStr.length - 1)\r\n  // sginStr = sginStr.substr(0, sginStr.length - 1) + '&key=' + STAT_KEY;\r\n  // const si = crypto.createHash('md5').update(sginStr).digest('hex');\r\n  return {\r\n    sign: '',\r\n    options: sginStr.substr(0, sginStr.length - 1)\r\n  };\r\n};\r\n\r\nconst getSplicing = (data) => {\r\n  let str = '';\r\n  for (var i in data) {\r\n    str += i + '=' + data[i] + '&';\r\n  }\r\n  return str.substr(0, str.length - 1)\r\n};\r\n\r\nconst getTime = () => {\r\n  return parseInt(new Date().getTime() / 1000);\r\n};\r\n\r\nconst getPlatformName = () => {\r\n  const platformList = {\r\n    'app-plus': 'n',\r\n    'h5': 'h5',\r\n    'mp-weixin': 'wx',\r\n    'mp-alipay': 'ali',\r\n    'mp-baidu': 'bd',\r\n    'mp-toutiao': 'tt',\r\n    'mp-qq': 'qq'\r\n  };\r\n  return platformList[process.env.VUE_APP_PLATFORM];\r\n};\r\n\r\nconst getPackName = () => {\r\n  let packName = '';\r\n  if (getPlatformName() === 'wx' || getPlatformName() === 'qq') {\r\n    // 兼容微信小程序低版本基础库\r\n    if(uni.canIUse('getAccountInfoSync')){\r\n      packName = uni.getAccountInfoSync().miniProgram.appId || '';\r\n    }\r\n  }\r\n  return packName\r\n};\r\n\r\nconst getVersion = () => {\r\n  return getPlatformName() === 'n' ? plus.runtime.version : '';\r\n};\r\n\r\nconst getChannel = () => {\r\n  const platformName = getPlatformName();\r\n  let channel = '';\r\n  if (platformName === 'n') {\r\n    channel = plus.runtime.channel;\r\n  }\r\n  return channel;\r\n};\r\n\r\nconst getScene = (options) => {\r\n  const platformName = getPlatformName();\r\n  let scene = '';\r\n  if (options) {\r\n    return options;\r\n  }\r\n  if (platformName === 'wx') {\r\n    scene = uni.getLaunchOptionsSync().scene;\r\n  }\r\n  return scene;\r\n};\r\nconst First__Visit__Time__KEY = 'First__Visit__Time';\r\nconst Last__Visit__Time__KEY = 'Last__Visit__Time';\r\n\r\nconst getFirstVisitTime = () => {\r\n  const timeStorge = uni.getStorageSync(First__Visit__Time__KEY);\r\n  let time = 0;\r\n  if (timeStorge) {\r\n    time = timeStorge;\r\n  } else {\r\n    time = getTime();\r\n    uni.setStorageSync(First__Visit__Time__KEY, time);\r\n    uni.removeStorageSync(Last__Visit__Time__KEY);\r\n  }\r\n  return time;\r\n};\r\n\r\nconst getLastVisitTime = () => {\r\n  const timeStorge = uni.getStorageSync(Last__Visit__Time__KEY);\r\n  let time = 0;\r\n  if (timeStorge) {\r\n    time = timeStorge;\r\n  } else {\r\n    time = '';\r\n  }\r\n  uni.setStorageSync(Last__Visit__Time__KEY, getTime());\r\n  return time;\r\n};\r\n\r\n\r\nconst PAGE_RESIDENCE_TIME = '__page__residence__time';\r\nlet First_Page_residence_time = 0;\r\nlet Last_Page_residence_time = 0;\r\n\r\n\r\nconst setPageResidenceTime = () => {\r\n  First_Page_residence_time = getTime();\r\n  if (getPlatformName() === 'n') {\r\n    uni.setStorageSync(PAGE_RESIDENCE_TIME, getTime());\r\n  }\r\n  return First_Page_residence_time\r\n};\r\n\r\nconst getPageResidenceTime = () => {\r\n  Last_Page_residence_time = getTime();\r\n  if (getPlatformName() === 'n') {\r\n    First_Page_residence_time = uni.getStorageSync(PAGE_RESIDENCE_TIME);\r\n  }\r\n  return Last_Page_residence_time - First_Page_residence_time\r\n};\r\nconst TOTAL__VISIT__COUNT = 'Total__Visit__Count';\r\nconst getTotalVisitCount = () => {\r\n  const timeStorge = uni.getStorageSync(TOTAL__VISIT__COUNT);\r\n  let count = 1;\r\n  if (timeStorge) {\r\n    count = timeStorge;\r\n    count++;\r\n  }\r\n  uni.setStorageSync(TOTAL__VISIT__COUNT, count);\r\n  return count;\r\n};\r\n\r\nconst GetEncodeURIComponentOptions = (statData) => {\r\n  let data = {};\r\n  for (let prop in statData) {\r\n    data[prop] = encodeURIComponent(statData[prop]);\r\n  }\r\n  return data;\r\n};\r\n\r\nlet Set__First__Time = 0;\r\nlet Set__Last__Time = 0;\r\n\r\nconst getFirstTime = () => {\r\n  let time = new Date().getTime();\r\n  Set__First__Time = time;\r\n  Set__Last__Time = 0;\r\n  return time;\r\n};\r\n\r\n\r\nconst getLastTime = () => {\r\n  let time = new Date().getTime();\r\n  Set__Last__Time = time;\r\n  return time;\r\n};\r\n\r\n\r\nconst getResidenceTime = (type) => {\r\n  let residenceTime = 0;\r\n  if (Set__First__Time !== 0) {\r\n    residenceTime = Set__Last__Time - Set__First__Time;\r\n  }\r\n\r\n  residenceTime = parseInt(residenceTime / 1000);\r\n  residenceTime = residenceTime < 1 ? 1 : residenceTime;\r\n  if (type === 'app') {\r\n    let overtime = residenceTime > APP_PVER_TIME ? true : false;\r\n    return {\r\n      residenceTime,\r\n      overtime\r\n    };\r\n  }\r\n  if (type === 'page') {\r\n    let overtime = residenceTime > PAGE_PVER_TIME ? true : false;\r\n    return {\r\n      residenceTime,\r\n      overtime\r\n    };\r\n  }\r\n\r\n  return {\r\n    residenceTime\r\n  };\r\n\r\n};\r\n\r\nconst getRoute = () => {\r\n  var pages = getCurrentPages();\r\n  var page = pages[pages.length - 1];\r\n  let _self = page.$vm;\r\n\r\n  if (getPlatformName() === 'bd') {\r\n    return _self.$mp && _self.$mp.page.is;\r\n  } else {\r\n    return (_self.$scope && _self.$scope.route) || (_self.$mp && _self.$mp.page.route);\r\n  }\r\n};\r\n\r\nconst getPageRoute = (self) => {\r\n  var pages = getCurrentPages();\r\n  var page = pages[pages.length - 1];\r\n  let _self = page.$vm;\r\n  let query = self._query;\r\n  let str = query && JSON.stringify(query) !== '{}' ? '?' + JSON.stringify(query) : '';\r\n  // clear\r\n  self._query = '';\r\n  if (getPlatformName() === 'bd') {\r\n    return _self.$mp && _self.$mp.page.is + str;\r\n  } else {\r\n    return (_self.$scope && _self.$scope.route + str )|| (_self.$mp && _self.$mp.page.route + str);\r\n  }\r\n};\r\n\r\nconst getPageTypes = (self) => {\r\n  if (self.mpType === 'page' || (self.$mp && self.$mp.mpType === 'page') || self.$options.mpType === 'page') {\r\n    return true;\r\n  }\r\n  return false;\r\n};\r\n\r\nconst calibration = (eventName, options) => {\r\n  //  login 、 share 、pay_success 、pay_fail 、register 、title\r\n  if(!eventName){\r\n    console.error(`uni.report 缺少 [eventName] 参数`);\r\n    return true\r\n  }\r\n  if (typeof eventName !== 'string') {\r\n    console.error(`uni.report [eventName] 参数类型错误,只能为 String 类型`);\r\n    return true\r\n  }\r\n  if (eventName.length > 255) {\r\n    console.error(`uni.report [eventName] 参数长度不能大于 255`);\r\n    return true\r\n  }\r\n\r\n  if (typeof options !== 'string' && typeof options !== 'object') {\r\n    console.error(`uni.report [options] 参数类型错误,只能为 String 或 Object 类型`);\r\n    return true\r\n  }\r\n\r\n  if (typeof options === 'string' && options.length > 255) {\r\n    console.error(`uni.report [options] 参数长度不能大于 255`);\r\n    return true\r\n  }\r\n\r\n  if (eventName === 'title' && typeof options !== 'string') {\r\n    console.error('uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型');\r\n    return true\r\n  }\r\n};\r\n\r\nconst PagesJson = require('uni-pages?{\"type\":\"style\"}').default;\r\nconst statConfig = require('uni-stat-config').default || require('uni-stat-config');\r\n\r\nconst resultOptions = uni.getSystemInfoSync();\r\n\r\nclass Util {\r\n  constructor() {\r\n    this.self = '';\r\n    this._retry = 0;\r\n    this._platform = '';\r\n    this._query = {};\r\n    this._navigationBarTitle = {\r\n      config: '',\r\n      page: '',\r\n      report: '',\r\n      lt: ''\r\n    };\r\n    this._operatingTime = 0;\r\n    this._reportingRequestData = {\r\n      '1': [],\r\n      '11': []\r\n    };\r\n    this.__prevent_triggering = false;\r\n\r\n    this.__licationHide = false;\r\n    this.__licationShow = false;\r\n    this._lastPageRoute = '';\r\n    this.statData = {\r\n      uuid: getUuid(),\r\n      ut: getPlatformName(),\r\n      mpn: getPackName(),\r\n      ak: statConfig.appid,\r\n      usv: STAT_VERSION,\r\n      v: getVersion(),\r\n      ch: getChannel(),\r\n      cn: '',\r\n      pn: '',\r\n      ct: '',\r\n      t: getTime(),\r\n      tt: '',\r\n      p: resultOptions.platform === 'android' ? 'a' : 'i',\r\n      brand: resultOptions.brand || '',\r\n      md: resultOptions.model,\r\n      sv: resultOptions.system.replace(/(Android|iOS)\\s/, ''),\r\n      mpsdk: resultOptions.SDKVersion || '',\r\n      mpv: resultOptions.version || '',\r\n      lang: resultOptions.language,\r\n      pr: resultOptions.pixelRatio,\r\n      ww: resultOptions.windowWidth,\r\n      wh: resultOptions.windowHeight,\r\n      sw: resultOptions.screenWidth,\r\n      sh: resultOptions.screenHeight\r\n    };\r\n\r\n  }\r\n\r\n  _applicationShow() {\r\n    if (this.__licationHide) {\r\n      getLastTime();\r\n      const time = getResidenceTime('app');\r\n      if (time.overtime) {\r\n        let options = {\r\n          path: this._lastPageRoute,\r\n          scene: this.statData.sc\r\n        };\r\n        this._sendReportRequest(options);\r\n      }\r\n      this.__licationHide = false;\r\n    }\r\n  }\r\n\r\n  _applicationHide(self, type) {\r\n\r\n    this.__licationHide = true;\r\n    getLastTime();\r\n    const time = getResidenceTime();\r\n    getFirstTime();\r\n    const route = getPageRoute(this);\r\n    this._sendHideRequest({\r\n      urlref: route,\r\n      urlref_ts: time.residenceTime\r\n    }, type);\r\n  }\r\n\r\n  _pageShow() {\r\n    const route = getPageRoute(this);\r\n    const routepath = getRoute();\r\n    this._navigationBarTitle.config = PagesJson &&\r\n      PagesJson.pages[routepath] &&\r\n      PagesJson.pages[routepath].titleNView &&\r\n      PagesJson.pages[routepath].titleNView.titleText ||\r\n      PagesJson &&\r\n      PagesJson.pages[routepath] &&\r\n      PagesJson.pages[routepath].navigationBarTitleText || '';\r\n\r\n    if (this.__licationShow) {\r\n      getFirstTime();\r\n      this.__licationShow = false;\r\n      // console.log('这是 onLauch 之后执行的第一次 pageShow ,为下次记录时间做准备');\r\n      this._lastPageRoute = route;\r\n      return;\r\n    }\r\n\r\n    getLastTime();\r\n    this._lastPageRoute = route;\r\n    const time = getResidenceTime('page');\r\n    if (time.overtime) {\r\n      let options = {\r\n        path: this._lastPageRoute,\r\n        scene: this.statData.sc\r\n      };\r\n      this._sendReportRequest(options);\r\n    }\r\n    getFirstTime();\r\n  }\r\n\r\n  _pageHide() {\r\n    if (!this.__licationHide) {\r\n      getLastTime();\r\n      const time = getResidenceTime('page');\r\n      this._sendPageRequest({\r\n        url: this._lastPageRoute,\r\n        urlref: this._lastPageRoute,\r\n        urlref_ts: time.residenceTime\r\n      });\r\n      this._navigationBarTitle = {\r\n        config: '',\r\n        page: '',\r\n        report: '',\r\n        lt: ''\r\n      };\r\n      return;\r\n    }\r\n  }\r\n\r\n  _login() {\r\n    this._sendEventRequest({\r\n      key: 'login'\r\n    }, 0);\r\n  }\r\n\r\n  _share() {\r\n    this._sendEventRequest({\r\n      key: 'share'\r\n    }, 0);\r\n  }\r\n  _payment(key) {\r\n    this._sendEventRequest({\r\n      key\r\n    }, 0);\r\n  }\r\n  _sendReportRequest(options) {\r\n\r\n    this._navigationBarTitle.lt = '1';\r\n    let query = options.query && JSON.stringify(options.query) !== '{}' ? '?' + JSON.stringify(options.query) : '';\r\n    this.statData.lt = '1';\r\n    this.statData.url = (options.path + query) || '';\r\n    this.statData.t = getTime();\r\n    this.statData.sc = getScene(options.scene);\r\n    this.statData.fvts = getFirstVisitTime();\r\n    this.statData.lvts = getLastVisitTime();\r\n    this.statData.tvc = getTotalVisitCount();\r\n    if (getPlatformName() === 'n') {\r\n      this.getProperty();\r\n    } else {\r\n      this.getNetworkInfo();\r\n    }\r\n  }\r\n\r\n  _sendPageRequest(opt) {\r\n    let {\r\n      url,\r\n      urlref,\r\n      urlref_ts\r\n    } = opt;\r\n    this._navigationBarTitle.lt = '11';\r\n    let options = {\r\n      ak: this.statData.ak,\r\n      uuid: this.statData.uuid,\r\n      lt: '11',\r\n      ut: this.statData.ut,\r\n      url,\r\n      tt: this.statData.tt,\r\n      urlref,\r\n      urlref_ts,\r\n      ch: this.statData.ch,\r\n      usv: this.statData.usv,\r\n      t: getTime(),\r\n      p: this.statData.p\r\n    };\r\n    this.request(options);\r\n  }\r\n\r\n  _sendHideRequest(opt, type) {\r\n    let {\r\n      urlref,\r\n      urlref_ts\r\n    } = opt;\r\n    let options = {\r\n      ak: this.statData.ak,\r\n      uuid: this.statData.uuid,\r\n      lt: '3',\r\n      ut: this.statData.ut,\r\n      urlref,\r\n      urlref_ts,\r\n      ch: this.statData.ch,\r\n      usv: this.statData.usv,\r\n      t: getTime(),\r\n      p: this.statData.p\r\n    };\r\n    this.request(options, type);\r\n  }\r\n  _sendEventRequest({\r\n    key = '',\r\n    value = \"\"\r\n  } = {}) {\r\n    const route = this._lastPageRoute;\r\n    let options = {\r\n      ak: this.statData.ak,\r\n      uuid: this.statData.uuid,\r\n      lt: '21',\r\n      ut: this.statData.ut,\r\n      url: route,\r\n      ch: this.statData.ch,\r\n      e_n: key,\r\n      e_v: typeof(value) === 'object' ? JSON.stringify(value) : value.toString(),\r\n      usv: this.statData.usv,\r\n      t: getTime(),\r\n      p: this.statData.p\r\n    };\r\n    this.request(options);\r\n  }\r\n\r\n  getNetworkInfo() {\r\n    uni.getNetworkType({\r\n      success: (result) => {\r\n        this.statData.net = result.networkType;\r\n        this.getLocation();\r\n      }\r\n    });\r\n  }\r\n\r\n  getProperty() {\r\n    plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {\r\n      this.statData.v = wgtinfo.version || '';\r\n      this.getNetworkInfo();\r\n    });\r\n  }\r\n\r\n  getLocation() {\r\n    if (statConfig.getLocation) {\r\n      uni.getLocation({\r\n        type: 'wgs84',\r\n        geocode: true,\r\n        success: (result) => {\r\n          if (result.address) {\r\n            this.statData.cn = result.address.country;\r\n            this.statData.pn = result.address.province;\r\n            this.statData.ct = result.address.city;\r\n          }\r\n\r\n          this.statData.lat = result.latitude;\r\n          this.statData.lng = result.longitude;\r\n          this.request(this.statData);\r\n        }\r\n      });\r\n    } else {\r\n      this.statData.lat = 0;\r\n      this.statData.lng = 0;\r\n      this.request(this.statData);\r\n    }\r\n  }\r\n\r\n  request(data, type) {\r\n    let time = getTime();\r\n    const title = this._navigationBarTitle;\r\n    data.ttn = title.page;\r\n    data.ttpj = title.config;\r\n    data.ttc = title.report;\r\n\r\n    let requestData = this._reportingRequestData;\r\n    if (getPlatformName() === 'n') {\r\n      requestData = uni.getStorageSync('__UNI__STAT__DATA') || {};\r\n    }\r\n    if (!requestData[data.lt]) {\r\n      requestData[data.lt] = [];\r\n    }\r\n    requestData[data.lt].push(data);\r\n\r\n    if (getPlatformName() === 'n') {\r\n      uni.setStorageSync('__UNI__STAT__DATA', requestData);\r\n    }\r\n    if (getPageResidenceTime() < OPERATING_TIME && !type) {\r\n      return\r\n    }\r\n    let uniStatData = this._reportingRequestData;\r\n    if (getPlatformName() === 'n') {\r\n      uniStatData = uni.getStorageSync('__UNI__STAT__DATA');\r\n    }\r\n    // 时间超过,重新获取时间戳\r\n    setPageResidenceTime();\r\n    let firstArr = [];\r\n    let contentArr = [];\r\n    let lastArr = [];\r\n\r\n    for (let i in uniStatData) {\r\n      const rd = uniStatData[i];\r\n      rd.forEach((elm) => {\r\n        const newData = getSplicing(elm);\r\n        if (i === 0) {\r\n          firstArr.push(newData);\r\n        } else if (i === 3) {\r\n          lastArr.push(newData);\r\n        } else {\r\n          contentArr.push(newData);\r\n        }\r\n      });\r\n    }\r\n\r\n    firstArr.push(...contentArr, ...lastArr);\r\n    let optionsData = {\r\n      usv: STAT_VERSION, //统计 SDK 版本号\r\n      t: time, //发送请求时的时间戮\r\n      requests: JSON.stringify(firstArr),\r\n    };\r\n\r\n    this._reportingRequestData = {};\r\n    if (getPlatformName() === 'n') {\r\n      uni.removeStorageSync('__UNI__STAT__DATA');\r\n    }\r\n\r\n    if (data.ut === 'h5') {\r\n      this.imageRequest(optionsData);\r\n      return\r\n    }\r\n\r\n    if (getPlatformName() === 'n' && this.statData.p === 'a') {\r\n      setTimeout(() => {\r\n        this._sendRequest(optionsData);\r\n      }, 200);\r\n      return\r\n    }\r\n    this._sendRequest(optionsData);\r\n  }\r\n  _sendRequest(optionsData) {\r\n    uni.request({\r\n      url: STAT_URL,\r\n      method: 'POST',\r\n      // header: {\r\n      //   'content-type': 'application/json' // 默认值\r\n      // },\r\n      data: optionsData,\r\n      success: () => {\r\n        // if (process.env.NODE_ENV === 'development') {\r\n        //   console.log('stat request success');\r\n        // }\r\n      },\r\n      fail: (e) => {\r\n        if (++this._retry < 3) {\r\n          setTimeout(() => {\r\n            this._sendRequest(optionsData);\r\n          }, 1000);\r\n        }\r\n      }\r\n    });\r\n  }\r\n  /**\r\n   * h5 请求\r\n   */\r\n  imageRequest(data) {\r\n    let image = new Image();\r\n    let options = getSgin(GetEncodeURIComponentOptions(data)).options;\r\n    image.src = STAT_H5_URL + '?' + options;\r\n  }\r\n\r\n  sendEvent(key, value) {\r\n    // 校验 type 参数\r\n    if (calibration(key, value)) return\r\n\r\n    if (key === 'title') {\r\n      this._navigationBarTitle.report = value;\r\n      return\r\n    }\r\n    this._sendEventRequest({\r\n      key,\r\n      value: typeof(value) === 'object' ? JSON.stringify(value) : value\r\n    }, 1);\r\n  }\r\n}\r\n\r\n\r\nclass Stat extends Util {\r\n  static getInstance() {\r\n    if (!this.instance) {\r\n      this.instance = new Stat();\r\n    }\r\n    return this.instance;\r\n  }\r\n  constructor() {\r\n    super();\r\n    this.instance = null;\r\n    // 注册拦截器\r\n    if (typeof uni.addInterceptor === 'function' && process.env.NODE_ENV !== 'development') {\r\n      this.addInterceptorInit();\r\n      this.interceptLogin();\r\n      this.interceptShare(true);\r\n      this.interceptRequestPayment();\r\n    }\r\n  }\r\n\r\n  addInterceptorInit() {\r\n    let self = this;\r\n    uni.addInterceptor('setNavigationBarTitle', {\r\n      invoke(args) {\r\n        self._navigationBarTitle.page = args.title;\r\n      }\r\n    });\r\n  }\r\n\r\n  interceptLogin() {\r\n    let self = this;\r\n    uni.addInterceptor('login', {\r\n      complete() {\r\n        self._login();\r\n      }\r\n    });\r\n  }\r\n\r\n  interceptShare(type) {\r\n    let self = this;\r\n    if (!type) {\r\n      self._share();\r\n      return\r\n    }\r\n    uni.addInterceptor('share', {\r\n      success() {\r\n        self._share();\r\n      },\r\n      fail() {\r\n        self._share();\r\n      }\r\n    });\r\n  }\r\n\r\n  interceptRequestPayment() {\r\n    let self = this;\r\n    uni.addInterceptor('requestPayment', {\r\n      success() {\r\n        self._payment('pay_success');\r\n      },\r\n      fail() {\r\n        self._payment('pay_fail');\r\n      }\r\n    });\r\n  }\r\n\r\n  report(options, self) {\r\n    this.self = self;\r\n    // if (process.env.NODE_ENV === 'development') {\r\n    //   console.log('report init');\r\n    // }\r\n    setPageResidenceTime();\r\n    this.__licationShow = true;\r\n    this._sendReportRequest(options, true);\r\n  }\r\n\r\n  load(options, self) {\r\n    if (!self.$scope && !self.$mp) {\r\n      const page = getCurrentPages();\r\n      self.$scope = page[page.length - 1];\r\n    }\r\n    this.self = self;\r\n    this._query = options;\r\n  }\r\n\r\n  show(self) {\r\n    this.self = self;\r\n    if (getPageTypes(self)) {\r\n      this._pageShow(self);\r\n    } else {\r\n      this._applicationShow(self);\r\n    }\r\n  }\r\n\r\n  ready(self) {\r\n    // this.self = self;\r\n    // if (getPageTypes(self)) {\r\n    //   this._pageShow(self);\r\n    // }\r\n  }\r\n  hide(self) {\r\n    this.self = self;\r\n    if (getPageTypes(self)) {\r\n      this._pageHide(self);\r\n    } else {\r\n      this._applicationHide(self, true);\r\n    }\r\n  }\r\n  error(em) {\r\n    if (this._platform === 'devtools') {\r\n      if (process.env.NODE_ENV === 'development') {\r\n        console.info('当前运行环境为开发者工具,不上报数据。');\r\n      }\r\n      // return;\r\n    }\r\n    let emVal = '';\r\n    if (!em.message) {\r\n      emVal = JSON.stringify(em);\r\n    } else {\r\n      emVal = em.stack;\r\n    }\r\n    let options = {\r\n      ak: this.statData.ak,\r\n      uuid: this.statData.uuid,\r\n      lt: '31',\r\n      ut: this.statData.ut,\r\n      ch: this.statData.ch,\r\n      mpsdk: this.statData.mpsdk,\r\n      mpv: this.statData.mpv,\r\n      v: this.statData.v,\r\n      em: emVal,\r\n      usv: this.statData.usv,\r\n      t: getTime(),\r\n      p: this.statData.p\r\n    };\r\n    this.request(options);\r\n  }\r\n}\r\n\r\nconst stat = Stat.getInstance();\r\nlet isHide = false;\r\nconst lifecycle = {\r\n  onLaunch(options) {\r\n    stat.report(options, this);\r\n  },\r\n  onReady() {\r\n    stat.ready(this);\r\n  },\r\n  onLoad(options) {\r\n    stat.load(options, this);\r\n    // 重写分享,获取分享上报事件\r\n    if (this.$scope && this.$scope.onShareAppMessage) {\r\n      let oldShareAppMessage = this.$scope.onShareAppMessage;\r\n      this.$scope.onShareAppMessage = function(options) {\r\n        stat.interceptShare(false);\r\n        return oldShareAppMessage.call(this, options)\r\n      };\r\n    }\r\n  },\r\n  onShow() {\r\n    isHide = false;\r\n    stat.show(this);\r\n  },\r\n  onHide() {\r\n    isHide = true;\r\n    stat.hide(this);\r\n  },\r\n  onUnload() {\r\n    if (isHide) {\r\n      isHide = false;\r\n      return\r\n    }\r\n    stat.hide(this);\r\n  },\r\n  onError(e) {\r\n    stat.error(e);\r\n  }\r\n};\r\n\r\nfunction main() {\r\n  if (process.env.NODE_ENV === 'development') {\r\n    uni.report = function(type, options) {};\r\n  }else{\r\n    const Vue = require('vue');\r\n    (Vue.default || Vue).mixin(lifecycle);\r\n    uni.report = function(type, options) {\r\n      stat.sendEvent(type, options);\r\n    };\r\n  }\r\n}\r\n\r\nmain();\r\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADMUlEQVRYR8WXT0gUURzHv79RIWkPCUIeDBI6dMhDUGBQUIegQKhDEUFQkeFMa84Ozvinwp6ZlM3YzlC5IxkFXYSCAg95COwQFHQx6BAUZORBMLBiKWvd94sxd1Hb/EPu7Bzf/N58P++93+/7fkMo8EMF1seqADierzNzHYEqQHiGomLTbKj7uJzF/TeA4/Y1gdgJxBiYImANgNHkZLpaiGhyKYhVAPA/MLiSWW7//nXibaSs4gGAWmbUWTH1Tl4BHKevHCU8wcCIpatbA7Fr8cQJRaG7BBJNen1HXgGuuYlahWgQ4H5T104HYj1eX5TBN5nQajWq3XkFsD3fJsCUUp5uNs70B2KZMQYftXRtIG8AQtyKRMqUdwBVpKd+bWhpaRwLxBzPHwxyQMr01mYjOpI3AMdL3AaoDqABU68/mhGyPf8TAZXJyfFSIcTUq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2MgUVJPMAXOO0uvpxMu141xKq/Bgkh7HSppKOACxphZQDNQxJcP0LQHvn32cMIXQsUVW+uRlDgd3LZPWIbGmF1A6iQPRwMrnWG38HNl0G+X/EhJyoTsMnvRC3T5veM10C7pke//4wRG4BenNLfJ5mk33GyFwXfjb93bAMuSpuv4IUlnvTf5C9jJrHRebte2txQ24/S4tRgG+2F4+M+QmOXeTDixPTIGsgphbqhtGw1Qf4F6oIK2w/DcZ6QaOz3gkzun693U7WM5okpS7YQYMMYEV2DFRtjtcE9IqnZfIC0XMvdZ7kFJLe4LbC+F9Vssd7OkO+4LFLXA4njLjZPkrF93g7DmBoTNH5LkLAV3BULCoLbDMh9LSnBfIHoplLRZrs2G2e4LrE2H3ArLbZB0zH2BjHxIz7PcfEmj6d69IMyrhlUpViBZ0gP3R6D8EkQsstxwSR/dFRhLwV2SNvluGMGfgtWpkH3EuwumSbIfLqPFX8Aeo6t40wtDPt8US9Z4Pjr6nvzbbhgVZxOP95lx54DJpiAWuAfY30CUn8BdoF6S/wlpYib0Eo0xIYGgB+VQGggx33f8Bo6wSzBuKjHIAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/img/banner_img@2x.9d88767f.png\";","export default {\"appid\":\"\"}"],"sourceRoot":""}