!function(e){function t(t){for(var o,s,i=t[0],u=t[1],c=t[2],g=0,v=[];g<i.length;g++)s=i[g],Object.prototype.hasOwnProperty.call(n,s)&&n[s]&&v.push(n[s][0]),n[s]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(e[o]=u[o]);for(l&&l(t);v.length;)v.shift()();return a.push.apply(a,c||[]),r()}function r(){for(var e,t=0;t<a.length;t++){for(var r=a[t],o=!0,i=1;i<r.length;i++){var u=r[i];0!==n[u]&&(o=!1)}o&&(a.splice(t--,1),e=s(s.s=r[0]))}return e}var o={},n={21:0},a=[];function s(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,s),r.l=!0,r.exports}s.m=e,s.c=o,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)s.d(r,o,function(t){return e[t]}.bind(null,o));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="./";var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var c=0;c<i.length;c++)t(i[c]);var l=u;a.push([1447,0]),r()}({10:function(e,t,r){"use strict";var o=r(7),n=r.n(o),a=r(26),s=r.n(a);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}var u=s.a.getApiHost(),c=s.a.getWsApiHost(),l={fixData:u+"/server/fixData",login:u+"/server/login",refreshValidateCode:u+"/server/refreshValidateCode",getValidateCode:u+"/server/getValidateCode",getUserList:u+"/server/getUserList",getUserListByAdmin:u+"/server/getUserListByAdmin",activeRegisterMember:u+"/server/activeRegisterMember",deleteRegisterMember:u+"/server/deleteRegisterMember",forGetPwd:u+"/server/forGetPwd",pushInfo:u+"/server/pushInfo",updateInfo:u+"/server/updateInfo",jsList:"//www.webfunny.cn/webfunny/manifest.json",sendRegisterEmail:u+"/server/sendRegisterEmail",register:u+"/server/register",resetPwd:u+"/server/resetPwd",registerCheck:u+"/server/registerCheck",registerForAdmin:u+"/server/registerForAdmin",userList:u+"/server/user/list",projectList:u+"/server/project/list",projectDetail:u+"/server/project/detail",updateStartList:u+"/server/project/updateStartList",updateMonitorCode:u+"/server/project/updateMonitorCode",allProjectList:u+"/server/project/list/all",getProjectDetailList:u+"/server/project/detailList",getProjectInfoInRealTime:u+"/server/project/getProjectInfoInRealTime",getTodayFlowDataByTenMin:u+"/server/getTodayFlowDataByTenMin",getTodayFlowData:u+"/server/getTodayFlowData",getErrorInfo:u+"/server/getErrorInfo",getWarningMsg:u+"/server/getWarningMsg",getWarningList:u+"/server/getWarningList",getJsErrorCountByDay:u+"/server/getJavascriptErrorInfoListByDay",getConsoleErrorCountByDay:u+"/server/getConsoleErrorInfoListByDay",getJavascriptErrorCountListByHour:u+"/server/getJavascriptErrorCountListByHour",getJsErrorCountByHour:u+"/server/getJsErrorCountByHour",getJsConsoleErrorCountByHour:u+"/server/getJavascriptConsoleErrorInfoListByHour",getJsErrorSort:u+"/server/getJavascriptErrorSort",getJsErrorSortInfo:u+"/server/getJavascriptErrorSortInfo",getConsoleErrorSort:u+"/server/getConsoleErrorSort",getJavascriptErrorCountByOs:u+"/server/getJavascriptErrorCountByOs",getJavascriptErrorCountByType:u+"/server/getJavascriptErrorCountByType",getJavascriptErrorListByMsg:u+"/server/getJavascriptErrorListByMsg",getJavascriptErrorAboutInfo:u+"/server/getJavascriptErrorAboutInfo",getJavascriptErrorDetail:function(e){return u+"/server/javascriptErrorInfo/"+e},getJavascriptErrorStackCode:u+"/server/getJavascriptErrorStackCode",getJavascriptErrorStackCodeForSource:u+"/server/getJavascriptErrorStackCodeForSource",getJavascriptErrorStackCodeForUrl:u+"/server/getJavascriptErrorStackCodeForUrl",getJavascriptErrorListByPage:u+"/server/getJavascriptErrorListByPage",setIgnoreJavascriptError:u+"/server/ignoreError",ignoreErrorByApplication:u+"/server/ignoreErrorByApplication",searchUserBehaviors:u+"/server/searchCustomerBehaviors",searchCustomerInfo:u+"/server/searchCustomerInfo",searchUserBehaviorsForExample:"http://47.105.132.73:8011/server/searchUserBehaviorsForExample",searchCustomerInfoForExample:"http://47.105.132.73:8011/server/searchCustomerInfoForExample",getScreenShotInfoListByPage:u+"/server/getScreenShotInfoListByPage",getCustomerCountByTime:u+"/server/getCustomerCountByTime",getPageLoadTimeByDate:u+"/server/getPageLoadTimeByDate",getResourceLoadInfoListByDay:u+"/server/getResourceLoadInfoListByDay",getResourceErrorCountByDay:u+"/server/getResourceErrorCountByDay",getResourceErrorCountByHour:u+"/server/getResourceErrorCountByHour",getHttpErrorCountByHour:u+"/server/getHttpErrorCountByHour",getHttpErrorCountByDay:u+"/server/getHttpErrorCountByDay",getHttpErrorListByDay:u+"/server/getHttpErrorListByDay",getHttpErrorListByUrl:u+"/server/getHttpErrorListByUrl",getHttpCountForLoadTimeGroupByDay:u+"/server/getHttpCountForLoadTimeGroupByDay",getHttpUrlCountListByHour:u+"/server/getHttpUrlCountListByHour",getHttpUrlCountForHourByMinutes:u+"/server/getHttpUrlCountForHourByMinutes",getPageCountForLoadTimeGroupByDay:u+"/server/getPageCountForLoadTimeGroupByDay",getPageCountForLoadTimeByDay:u+"/server/getPageCountForLoadTimeByDay",getHttpUrlListForLoadTime:u+"/server/getHttpUrlListForLoadTime",getPageUrlListForLoadTime:u+"/server/getPageUrlListForLoadTime",getHttpUrlUserCount:u+"/server/getHttpUrlUserCount",getDifferentKindAvgLoadTimeListByHour:u+"/server/getDifferentKindAvgLoadTimeListByHour",getDifferentKindAvgLoadTimeByHourForPageUrl:u+"/server/getDifferentKindAvgLoadTimeByHourForPageUrl",getPageUrlUserCount:u+"/server/getPageUrlUserCount",getPagesByHttpUrl:u+"/server/getPagesByHttpUrl",getPageUrlCountListByHour:u+"/server/getPageUrlCountListByHour",getPageUrlCountForHourByMinutes:u+"/server/getPageUrlCountForHourByMinutes",getPvCountByHour:u+"/server/getPvCountByHour",getNewCustomerCountByHour:u+"/server/getNewCustomerCountByHour",getCusLeavePercentByHour:u+"/server/getCusLeavePercentByHour",getInstallCountByHour:u+"/server/getInstallCountByHour",uvCountForMonth:u+"/server/uvCountForMonth",getUvCountByHour:u+"/server/getUvCountByHour",getAliveCusInRealTime:u+"/server/getAliveCusInRealTime",getConcurrencyByMinuteInHour:u+"/server/getConcurrencyByMinuteInHour",getUserCountByHour:u+"/server/getUserCountByHour",getVersionCountOrderByCount:u+"/server/getVersionCountOrderByCount",getCityCountOrderByCount:u+"/server/getCityCountOrderByCount",getCityCountOrderByCountTop20:u+"/server/getCityCountOrderByCountTop20",getDeviceCountOrderByCount:u+"/server/getDeviceCountOrderByCount",getOsCountOrderByCount:u+"/server/getOsCountOrderByCount",getProvinceCountBySeconds:u+"/server/getProvinceCountBySeconds",getLocationDataForMap:u+"/server/getLocationDataForMap",getTagsPercent:u+"/server/getTagsPercent",getPvCountBySecond:u+"/server/getPvUvCountBySecond",getPvCountByMinute:u+"/server/getPvCountByMinute",getHttpCountByMinute:u+"/server/getHttpCountByMinute",getJavascriptErrorCountByMinute:u+"/server/getJavascriptErrorCountByMinute",getPvListByPage:u+"/server/getPvListByPage",getPvListTotalCountByTime:u+"/server/getPvListTotalCountByTime",getSevenDaysLeftCount:u+"/server/getSevenDaysLeftCount",getYesterdayLeftPercent:u+"/server/getYesterdayLeftPercent",getStayTimeForEveryDay:u+"/server/getStayTimeForEveryDay",getVideosEvent:u+"/server/getVideosEvent",createConfig:u+"/server/createConfig",changeLogServerStatus:u+"/server/changeLogServerStatus",changeLogServerStatusByWebMonitorId:u+"/server/changeLogServerStatusByWebMonitorId",changeWaitCounts:u+"/server/changeWaitCounts",changeSaveDays:u+"/server/changeSaveDays",saveMysqlConfigs:u+"/server/saveMysqlConfigsForNew",getLogServerStatus:u+"/server/getLogServerStatusForNew",getStopWebMonitorIdList:u+"/server/getStopWebMonitorIdList",getTeamList:u+"/server/getTeamList",addTeamMember:u+"/server/addTeamMember",getAllTeamList:u+"/server/getAllTeamList",createNewTeam:u+"/server/createNewTeam",deleteTeam:u+"/server/deleteTeam",moveProToTeam:u+"/server/moveProToTeam",updateTeamProjects:u+"/server/updateTeamProjects",createNewProject:u+"/server/createNewProject",checkProjectCount:u+"/server/checkProjectCount",getUserTags:u+"/server/getUserTags",saveUserTags:u+"/server/saveUserTags",deleteProject:u+"/server/deleteProject",sendEmailCode:"//www.webfunny.cn/server/sendEmailCode",getPurchaseCodeDetail:"//www.webfunny.cn/server/getPurchaseCodeDetail",connectUser:u+"/server/connectUser",disconnectUser:u+"/server/disconnectUser",connectUserRecord:u+"/server/connectUserRecord",getDebugInfos:u+"/server/getDebugInfos",getHistoryDebugInfos:u+"/server/getHistoryDebugInfos",getDebugInfosForPage:u+"/server/getDebugInfosForPage",getDebugInfoForLocalInfo:u+"/server/getDebugInfoForLocalInfo",clearLocalInfo:u+"/server/clearLocalInfo",getDebugInfoForVideo:u+"/server/getDebugInfoForVideo",createLocationPointGroup:u+"/server/createLocationPointGroup",getGroupNameList:u+"/server/getGroupNameList",getLocationPointGroupList:u+"/server/getLocationPointGroupList",deleteLocationPointGroup:u+"/server/deleteLocationPointGroup",createLocationPointType:u+"/server/createLocationPointType",getLocationPointTypeList:u+"/server/getLocationPointTypeList",deleteLocationPointType:u+"/server/deleteLocationPointType",locationPointCountForMonth:u+"/server/locationPointCountForMonth",createFunnelType:u+"/server/createFunnelType",getFunnelList:u+"/server/getFunnelList",deleteFunnel:u+"/server/deleteFunnel",getLocationPointForDay:u+"/server/getLocationPointForDay",getFunnelLeftCountForDay:u+"/server/getFunnelLeftCountForDay",getCheckTime:u+"/server/getCheckTime",changeCheckTime:u+"/server/changeCheckTime",getJsErrorConfig:u+"/server/getJsErrorConfig",changeJsErrorConfig:u+"/server/changeJsErrorConfig",getConsoleErrorConfig:u+"/server/getConsoleErrorConfig",changeConsoleErrorConfig:u+"/server/changeConsoleErrorConfig",getHttpErrorConfig:u+"/server/getHttpErrorConfig",changeHttpErrorConfig:u+"/server/changeHttpErrorConfig",getResourceErrorConfig:u+"/server/getResourceErrorConfig",changeResourceErrorConfig:u+"/server/changeResourceErrorConfig",mysqlStatus:u+"/server/mysqlStatus",getSysInfo:u+"/server/getSysInfo",createPurchaseCode:u+"/server/createPurchaseCode",checkTableCreateCommand:u+"/server/checkTableCreateCommand",testBehaviors:u+"/server/testBehaviors",upLog:u+"/server/upLog"},g={wsGetProvinceCountBySeconds:c+"/socket/wsGetProvinceCountBySeconds",wsGetDebugInfo:c+"/socket/wsGetDebugInfo"};t.a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(r,!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},l,{},{},{},g)},1414:function(e,t,r){},1447:function(e,t,r){"use strict";r.r(t);var o=r(7),n=r.n(o),a=r(5),s=r.n(a),i=r(6),u=r.n(i),c=r(15),l=r.n(c),g=r(16),v=r.n(g),p=r(12),d=r.n(p),f=r(17),y=r.n(f),h=(r(1414),r(0)),m=r.n(h),w=r(21),C=r.n(w),b=r(1453),S=r(9),E=r(10),L=r(4);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}var T=function(e){function t(e){var r;return s()(this,t),(r=l()(this,v()(t).call(this,e))).initState={name:"",email:"",emailCode:"",password:""},r.state=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(r,!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({registerType:0,emailCodeLoading:!1,timeCount:0},r.initState),r.sendAble=!0,r.resetAble=!0,r.resetPwd=r.resetPwd.bind(d()(r)),r}return y()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=L.a.parseQs().type;this.setState({registerType:1*e})}},{key:"render",value:function(){var e=this,t=this.state,r=t.email,o=t.emailCode,n=t.password,a=t.timeCount,s=t.registerType;return m.a.createElement("div",{className:"resetPwd-container"},m.a.createElement("header",null,m.a.createElement("span",{className:"home-icon",onClick:function(){window.location.href="./home.html"}},m.a.createElement("img",{style:{width:"100%"},src:"/webfunny/logos/logo.png"}))),m.a.createElement("section",{className:"signup-content"},m.a.createElement("h1",null,"重置密码"),m.a.createElement("div",{className:"register account tab-pane fade in active",id:"signupByPhone"},m.a.createElement("div",{className:"input-set phone"},m.a.createElement("span",{className:"input-title"},"邮箱（登录名）"),m.a.createElement("input",{type:"email",placeholder:"请输入邮箱","data-growing-track":"true",maxLength:50,value:r,onChange:function(t){e.setState({email:t.target.value})}}),m.a.createElement("span",{id:"emessage-mobile",className:"emessage"})),1===s?null:m.a.createElement("div",{className:"input-set phone-verif"},m.a.createElement("span",{className:"input-title"},"邮箱验证码"),m.a.createElement("input",{name:"verifyCode",placeholder:"请输入邮箱验证码",style:{width:165},value:o,onChange:function(t){e.setState({emailCode:t.target.value})}}),m.a.createElement("button",{id:"captcha","data-button-clicked":"true",className:a>0?"captcha captcha-phone captcha-disable":"captcha captcha-phone",type:"button",onClick:this.getEmailCode.bind(this)},a>0?"重新发送(".concat(a,"s)"):"获取验证码"),m.a.createElement("span",{id:"emessage-verifyCode",className:"emessage"})),m.a.createElement("div",{className:"input-set phone"},m.a.createElement("span",{className:"input-title"},"新的登录密码"),m.a.createElement("input",{placeholder:"请输入新密码","data-growing-track":"true",maxLength:30,value:n,onChange:function(t){e.setState({password:t.target.value})}}),m.a.createElement("span",{id:"emessage-pwd",className:"emessage"})),m.a.createElement("button",{className:"active login-btn",onClick:this.resetPwd},"重置密码"))))}},{key:"getEmailCode",value:function(){var e=this,t=this.state.email;if(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t)){if(this.sendAble){this.sendAble=!1;var r,o,n=120,a=setInterval((function(){0===n&&(clearInterval(a),e.sendAble=!0),e.setState({timeCount:n}),n--}),1e3);r={email:t},o=function(){b.a.success("验证码已经发送，请注意查收"),e.setState({emailCodeLoading:!1})},S.a.postWithoutToken(E.a.sendRegisterEmail,r).then((function(e){o(e.data)})).catch((function(e){console.error(e)}))}}else b.a.error("请输入正确的邮箱地址！")}},{key:"resetPwd",value:function(){var e=this;if(this.resetAble){var t=this.state,r=t.email,o=t.emailCode,n=t.password;if(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(r))if(o)if(n){this.resetAble=!1;var a,s,i,u=L.a.b64EncodeUnicode(n.split("").reverse().join(""));a={email:r,emailCode:o,password:u},s=function(t){0===t.data?(b.a.success("密码重置成功，即将跳转到登录页。",3),setTimeout((function(){window.location.href="./login.html?userEmail="+r+"&password="+n}),5e3)):(b.a.error(m.a.createElement("span",null,t.msg),5),e.resetAble=!0)},i=function(){e.resetAble=!0},S.a.getWithoutToken(E.a.resetPwd,a).then((function(e){s(e)})).catch((function(e){i(),console.error(e)}))}else b.a.error("请输入新密码！");else b.a.error("请输入邮箱验证码！");else b.a.error("请输入正确的邮箱地址！")}}},{key:"registerForAdmin",value:function(){var e=this;if(this.resetAble){var t=this.state,r=t.email,o=t.emailCode,n=t.password;/^[a-zA-Z0-9._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(r)?n?(this.resetAble=!1,(void 0)({name:"管理员",email:r,emailCode:o,password:n,userType:"admin"},(function(t){0===t.data?(b.a.success("管理员账号设置成功。即将跳转到登录页",3),setTimeout((function(){window.location.href="./login.html?userEmail="+r+"&password="+n}),3e3)):(b.a.error(t.msg),e.resetAble=!0)}))):b.a.error("请输入密码！"):b.a.error("请输入正确的邮箱地址！")}}},{key:"goLogin",value:function(){fetch("http://localhost:3000/api/v1/user/list",(function(){}))}}]),t}(h.Component);C.a.render(m.a.createElement(T,null),document.getElementById("app"))},26:function(e,t){var r={local:{apiServerUrl:"http://localhost:8011",nodeApiServerUrl:"http://localhost:8011",uri:"//localhost",wsApiServerUrl:("http:"===window.location.protocol?"ws://":"wss://")+"localhost:8011"},dev:{apiServerUrl:"https://www.webfunny.cn",nodeApiServerUrl:"https://www.webfunny.cn",assetsUrl:"https://local.webfunny.cn",uri:"https://local.webfunny.cn:9100"},backup:{apiServerUrl:"http://www.webfunny.cn",nodeApiServerUrl:"http://www.webfunny.cn",assetsUrl:"",uri:""},qa:{apiServerUrl:"https://www.webfunny.cn",assetsUrl:"https://www.webfunny.cn",nodeApiServerUrl:"https://www.webfunny.cn",uri:"https://www.webfunny.cn"},publish:{apiServerUrl:"default_api_server_url",nodeApiServerUrl:"default_api_server_url",assetsUrl:"default_assets_url",uri:"default_assets_url",wsApiServerUrl:("http:"===window.location.protocol?"ws:":"wss:")+"default_api_server_url"},demo:{apiServerUrl:"http://47.105.132.73:8011",assetsUrl:"http://47.105.132.73:8011",nodeApiServerUrl:"http://47.105.132.73:8011",uri:"http://47.105.132.73:8011",wsApiServerUrl:("http:"===window.location.protocol?"ws://":"wss://")+"47.105.132.73:8011"},prod:{apiServerUrl:"http://www.webfunny.cn",assetsUrl:"http://www.webfunny.cn",nodeApiServerUrl:"http://www.webfunny.cn",uri:"http://www.webfunny.cn",wsApiServerUrl:("http:"===window.location.protocol?"ws://":"wss://")+"www.webfunny.cn"}};e.exports={getApiHost:function(){return r.publish.apiServerUrl},getNodeApiHost:function(){return r.publish.nodeApiServerUrl},getAssetsUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publish",t=arguments.length>1?arguments[1]:void 0,o=r[e].assetsUrl||"",n="local"===e?"/webfunny/":t;return o+n},getUri:function(){return r.publish.uri},getWsApiHost:function(){return r.publish.wsApiServerUrl}}},39:function(e,t){if(String.prototype.format||(String.prototype.format=function(){var e=this,t=Array.prototype.slice.call(arguments);return e.replace(/(\{(\d+)\})/g,(function(e,r,o){return void 0===t[o]?e:t[o]}))}),!String.prototype.trim){var r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(r,"")}}Date.prototype.Format||(Date.prototype.Format=function(e){var t=e,r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var o in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}),Number.prototype.toFixed=function(e){var t=Math.pow(10,e),r=this*t+.5;return(r=parseInt(r,10)/t)+""}},4:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var o=r(36),n=r.n(o),a=r(5),s=r.n(a),i=r(6),u=r.n(i),c=r(7),l=r.n(c),g=function(){function e(){s()(this,e)}return u()(e,null,[{key:"isArray",value:function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"randomNumber",value:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)}},{key:"b64EncodeUnicode",value:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})))}},{key:"b64DecodeUnicode",value:function(t){try{return decodeURIComponent(atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}catch(r){return e.b64DecodeUnicodeWithSpace(t)}}},{key:"b64DecodeUnicodeWithSpace",value:function(e){if(!e)return"";var t="";try{return t=e.replace(/ /g,"+"),decodeURIComponent(atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}catch(e){return t}}},{key:"b64DecodeUnicodeBehavior",value:function(e){if(!e)return"";var t=e.replace(/ /g,"+");try{return decodeURIComponent(atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}catch(t){return e}}},{key:"qs",value:function(t,r){var o=[];return function t(r,a){var s=function(n){if(!r.hasOwnProperty(n))return{v:void 0};var s=r[n];e.isArray(s)?s.forEach((function(e){o.push(encodeURIComponent((a?a+".":"")+n+"[]")+"="+encodeURIComponent(e||""))})):e.isObject(s)?t(s,a?a+"."+n:n):o.push(encodeURIComponent((a?a+".":"")+n)+"="+encodeURIComponent(s||""))};for(var i in r){var u=s(i);if("object"===n()(u))return u.v}}(t,""),r&&!t._&&o.push("_="+encodeURIComponent(BUILD_NO)),o.length?"?"+o.join("&"):""}},{key:"parseQs",value:function(){var e=window.location.search,t=e.indexOf("?"),r={};return-1===t?r:(e.substr(t+1).split("&").forEach((function(e){var t=e.split("="),o=decodeURIComponent(t[0]),n=decodeURIComponent(t[1]||""),a=0,s=o.split("."),i=s.length;o=s[i-1];var u=r;if(i>1)for(;a<i-1;a++)u[s[a]]&&CommonTool.isObject(u[s[a]])||(u[s[a]]={}),u=u[s[a]];"[]"!==o.substr(-2)?u[o]=n:u[o=o.substr(0,o.length-2)]?u[o].push(n):u[o]=[n]})),r)}},{key:"quickSort",value:function(t){if(t.length<=1)return t;for(var r=Math.floor(t.length/2),o=t.splice(r,1)[0],n=[],a=[],s=0;s<t.length;s++)t[s]<=o?n.push(t[s]):a.push(t[s]);return e.quickSort(n).concat([o],e.quickSort(a))}},{key:"showLoading",value:function(){}},{key:"get24HoursArray",value:function(){for(var e=(new Date).getTime(),t=[],r=0;r<24;r++){var o=new Date(e-60*r*60*1e3).Format("MM-dd hh");t.push(o)}return t}},{key:"getHoursArrayByTimeSize",value:function(t){if(0===t){for(var r=(new Date).getTime()-t*e.DAY_TIME,o=[],n=0;n<=24;n++){var a=r-n*e.HOUR_TIME,s=new Date(a).Format("MM-dd hh");o.push(s)}return o}for(var i=(new Date).getTime()-t*e.DAY_TIME,u=new Date(i).Format("MM-dd"),c=[],l=0;l<24;l++){var g=u+" "+(l<10?"0"+l:l);c.push(g)}return c.reverse()}},{key:"getSevenDaysAgoHoursArrayByTimeSize",value:function(t){if(0===t){for(var r=(new Date).getTime()-(7+t)*e.DAY_TIME,o=[],n=0;n<=24;n++){var a=r-n*e.HOUR_TIME,s=new Date(a).Format("MM-dd hh");o.push(s)}return o}for(var i=(new Date).getTime()-(7+t)*e.DAY_TIME,u=new Date(i).Format("MM-dd"),c=[],l=0;l<24;l++){var g=u+" "+(l<10?"0"+l:l);c.push(g)}return c.reverse()}},{key:"getSevenDaysAgo24HoursArray",value:function(){for(var e=(new Date).getTime()-6048e5,t=[],r=0;r<24;r++){var o=new Date(e-60*r*60*1e3).Format("MM-dd hh");t.push(o)}return t}},{key:"analysisInfoData",value:function(e,t){for(var r=[],o=[],n=0,a=0;a<t.length-1;a++){for(var s=!1,i=0;i<e.length;i++)if(e[i].hour===t[a]){var u=t[a],c=e[i].count;r.push(u),o.push(c),n+=parseInt(e[i].count,10),s=!0;break}!1===s&&(r.push(t[a]),o.push(0))}return{infoTotalCount:n,dateArray:r,infoArray:o,usefulArray:e.filter((function(e){return e.count>0}))}}},{key:"loadJs",value:function(e,t){var r=document.createElement("script");r.async=1,r.onload="function"==typeof t?t:function(){},r.src=e;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}},{key:"deepCopy",value:function(e){if(e instanceof Array){for(var t=[],r=0;r<e.length;++r)t[r]=this.deepCopy(e[r]);return t}if(e instanceof Object){var o={};for(var n in e)o[n]=this.deepCopy(e[n]);return o}return e}},{key:"addDays",value:function(e){var t="",r=new Date,o=new Date(r.getTime()+24*e*60*60*1e3),n=o.getFullYear(),a=o.getMonth()+1,s=o.getDate();return t=n+"-",t=a>=10?t+a+"-":t+"0"+a+"-",s>=10?t+=s:t=t+"0"+s,t}},{key:"toFixed",value:function(e,t){var r=e,o=Math.pow(10,t);if(r<0)return r=Math.abs(r),-(parseInt(r*o+.5,10)/o);var n=parseInt(r*o+.5,10)/o,a=n,s=n+"";if(-1!==s.indexOf(".")){var i=s.split(".")[0],u=s.split(".")[1];u.length>t&&(u=u.substring(0,2)),a=i+"."+u}return 1*a}},{key:"getCookie",value:function(e){var t,r=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return document.cookie.match(r)?(t=document.cookie.match(r),unescape(t[2])):""}},{key:"setCookie",value:function(e,t,r){var o=new Date;o.setTime(o.getTime()+r);var n=window.location.hostname;document.cookie=e+"="+t+";Path=/;domain="+n+";expires="+o.toGMTString()}},{key:"removeDuplicateForString",value:function(e){var t=e.split(""),r=new Set(t);return Array.from(r).join("")}},{key:"quickSortForObject",value:function(t,r,o,n){if(!(o>n)){for(var a=t[o][r],s=t[o],i=o,u=n;i!==u;){for(;t[u][r]>=a&&u>i;)u--;for(;t[i][r]<=a&&u>i;)i++;if(u>i){var c=t[i];t[i]=t[u],t[u]=c}}t[o]=t[i],t[i]=s,e.quickSortForObject(t,r,o,i-1),e.quickSortForObject(t,r,i+1,n)}}},{key:"handleTimeScope",value:function(e){return Math.floor(((new Date).getTime()-new Date(e+" 00:00:00").getTime())/864e5)}},{key:"ajax",value:function(e,t,r,o,n){try{var a=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");a.open(e,t,!0),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onreadystatechange=function(){if(4===a.readyState){var e={};try{e=a.responseText?JSON.parse(a.responseText):{}}catch(t){console.error(a.responseText),e={}}"function"==typeof o&&o(e)}else"function"==typeof n&&n()},a.onerror=function(){"function"==typeof n&&n()};var s=JSON.stringify(r||{});a.send("data="+s)}catch(e){console.warn(e)}}}]),e}();l()(g,"DAY_TIME",864e5),l()(g,"HOUR_TIME",36e5)},9:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return g}));var o=r(7),n=r.n(o),a=r(5),s=r.n(a),i=r(6),u=r.n(i),c=r(4);r(183),r(39);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}var g=function(){function t(){s()(this,t)}return u()(t,null,[{key:"get",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isHandleResult:!0,isShowLoading:!0},n="GET";r.webMonitorId||(r.webMonitorId=window.localStorage.chooseWebMonitorId);var a=e+c.a.qs(r),s=Object.assign({},{method:n},this.getHeaders());return t.handleFetchData(a,s,o)}},{key:"getWithoutToken",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isHandleResult:!0,isShowLoading:!0},n="GET";r.webMonitorId||(r.webMonitorId=window.localStorage.chooseWebMonitorId);var a=e+c.a.qs(r),s=Object.assign({},{method:n});return t.handleFetchData(a,s,o)}},{key:"post",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isHandleResult:!0,isShowLoading:!0},n="POST";r.webMonitorId||(r.webMonitorId=window.localStorage.chooseWebMonitorId);var a=JSON.stringify(r),s=Object.assign({},{method:n,body:a},this.getHeaders());return t.handleFetchData(e,s,o)}},{key:"postWithoutToken",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isHandleResult:!0,isShowLoading:!0},n="POST";r.webMonitorId||(r.webMonitorId=window.localStorage.chooseWebMonitorId);var a=JSON.stringify(r),s=Object.assign({},{method:n,body:a});return t.handleFetchData(e,s,o)}},{key:"put",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isHandleResult:!0,isShowLoading:!0},n="PUT";r.webMonitorId=window.localStorage.chooseWebMonitorId;var a=JSON.stringify(r),s=Object.assign({},{method:n,body:a},this.getHeaders());return t.handleFetchData(e,s,o)}},{key:"handleFetchData",value:function(e,r,o){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(r,!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r);a.body&&a.body.length>1024&&(a.body=a.body.substr(0,1024)+"...");var s=o.isShowLoading;if(s&&t.showLoading(),o.isFetched=!1,o.isAbort=!1,o.hasOwnProperty("customHead")){var i=o.customHead;r.headers=Object.assign({},r.headers,i)}var u=new Promise((function(n,a){fetch(e,r).then((function(e){o.isAbort||(s&&t.hideLoading(),o.isFetched=!0,e.json().then((function(r){if(e.ok){if(401===r.code){var s=window.location.href;return void(window.location.href="./login.html?target="+encodeURIComponent(s))}n(t.handleResult(r,o))}else{var i="当前服务繁忙，请稍后再试";404===e.status&&(i="您访问的内容走丢了…"),console.error(i),a(t.handleResult({fetchStatus:"error",netStatus:e.status},o))}})).catch((function(r){var n=r.name+" "+r.message;a(t.handleResult({fetchStatus:"error",error:n,netStatus:e.status},o))})))})).catch((function(e){var r=e.name+" "+e.message;o.isAbort||(s&&t.hideLoading(),o.isFetched=!0,!0===o.isHandleResult&&console.error("网络开小差了，稍后再试吧",2),a(t.handleResult({fetchStatus:"error",error:r},o)))}))}));return Promise.race([u,t.fetchTimeout(o)])}},{key:"handleResult",value:function(e,t){if(e.status&&!0===t.isHandleResult){var r=e.msg||e.message||"服务器开小差了，稍后再试吧";console.error("".concat(r,"（").concat(e.status,"）"),2)}return e}},{key:"fetchTimeout",value:function(e){var r=e.isShowLoading;return new Promise((function(o,n){setTimeout((function(){e.isFetched||(e.isAbort=!0,r&&t.hideLoading(),console.error("网络开小差了，稍后再试吧",2),n({fetchStatus:"timeout"}))}),e.timeout||3e5)}))}},{key:"getHeaders",value:function(){var e={"access-token":localStorage.webfunny_authorization||""};return Object.assign({},{},{headers:e})}},{key:"showLoading",value:function(){}},{key:"hideLoading",value:function(){}},{key:"wsGet",value:function(e,t,r,o,n,a){if(window.WebSocket=window.WebSocket||window.MozWebSocket,window.WebSocket){var s=new WebSocket(e);s.onmessage=function(e){r&&r(e)},s.onopen=function(r){console.log(e+" 连接成功"),o&&o(r),t&&t(s)},s.onclose=function(t){n&&n(t),s.close(),s=null,console.log(e+" 断开连接")},s.onerror=function(e){console.log(e),a&&a(e)}}else console.error("错误: 浏览器不支持websocket")}},{key:"ajax",value:function(t,r,o,n,a){var s={url:r,type:t,data:JSON.stringify(o),Accept:"*/*",contentType:"application/json;charset=utf-8",dataType:"json",traditional:!0,timeout:1e4,success:function(e,t,r){if(e.code){var o=e.msg||"服务器开小差了，稍后再试吧";return a&&"function"==typeof a&&a(o),void console.error(o)}try{n(e,r)}catch(e){console.error(e)}},error:function(e,t){var r,o="服务繁忙，稍后再试吧";switch(e.status){case 404:o="您访问的内容走丢了…";break;default:switch(t){case"timeout":o="网络开小差了，稍后再试吧";break;case"abort":o="服务繁忙，休息一下再说吧";break;case"error":o="当前服务繁忙，请稍后再试";break;default:o=(r=e.responseText?JSON.parse(e.responseText):{}).msg||(r.error||{}).message||"服务繁忙，稍后再试吧"}}a&&"function"==typeof a&&a(o),console.error(o)}};e.ajax(s)}},{key:"getApiDataFromCache",value:function(e){return"caches"in window?(console.log(window.caches),caches.match(e).then((function(e){return console.log(3,e),e?e.json():null}))):Promise.resolve()}}]),t}()}).call(this,r(13))}});