仓库第一部分
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
94 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-course-detail-detail"],{"023a":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var i={uniPopup:n("24ec").default,mpHtml:n("a914").default,uniLoadMore:n("11a4").default,uniIcons:n("9966").default},r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"cflex main-box"},[n("v-uni-view",{staticClass:"video-box w100"},[n("v-uni-video",{ref:"videoDom",attrs:{controls:!0,"page-gesture":!0,autoplay:!1,"enable-play-gesture":!0,direction:e.video.direction,src:e.currentChapter?e.currentChapter.videoUrl:"",id:"videoDom"},on:{timeupdate:function(t){arguments[0]=t=e.$handleEvent(t),e.videoFunc(t)},fullscreenchange:function(t){arguments[0]=t=e.$handleEvent(t),e.fullScreen(t)},seeking:function(t){arguments[0]=t=e.$handleEvent(t),e.paruseVideo()},seeked:function(t){arguments[0]=t=e.$handleEvent(t),e.playVideo()},play:function(t){arguments[0]=t=e.$handleEvent(t),e.playVideo.apply(void 0,arguments)},pause:function(t){arguments[0]=t=e.$handleEvent(t),e.stopVideo.apply(void 0,arguments)},ended:function(t){arguments[0]=t=e.$handleEvent(t),e.stopVideo.apply(void 0,arguments)}}}),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:!e.video.playStatus,expression:"!video.playStatus"}]},[n("v-uni-view",{staticClass:"uni-video-cover",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.playVideo()}}},[n("div",{staticClass:"uni-video-cover-play-button"})])],1)],1),n("v-uni-view",{staticClass:"content-box w100"},[n("v-uni-view",{staticClass:"tab-list rflex jcsb w100"},[e._l(e.tab.list,(function(t,i){return[n("v-uni-view",{staticClass:"tab-item",class:{"tab-select":i==e.tab.index},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.changeTab(i)}}},[n("v-uni-text",[e._v(e._s(t))])],1)]}))],2),n("v-uni-view",{staticClass:"line"}),n("v-uni-view",{staticClass:"tab-content"},[n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:0==e.tab.index,expression:"tab.index == 0"}]},[n("v-uni-view",{staticClass:"course-info cflex jcfs"},[n("v-uni-view",{staticClass:"w100 course-title"},[e._v(e._s(e.course.courseName?e.course.courseName:""))]),n("v-uni-view",{staticClass:"rflex jcsb w100"},[n("v-uni-view",{staticClass:"rflex jcsb course-score"},[n("v-uni-view",{staticClass:"rflex aic"},[n("i",{staticClass:"icon icon-stime-26"}),n("v-uni-text",[e._v(e._s(e.course.credit?e.course.credit:"")+"学时")])],1),n("v-uni-view",{staticClass:"rflex aic ml25"},[n("i",{staticClass:"icon icon-course-score"}),n("v-uni-text",[e._v(e._s(e.course.score)+"分")])],1)],1),n("v-uni-view",[n("v-uni-button",{staticClass:"rate-btn",attrs:{type:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handlePop("ratePopup")}}},[e._v("评分")]),n("uni-popup",{ref:"ratePopup",attrs:{type:"center","mask-click":!1}},[n("v-uni-view",{staticClass:"rate-box p30 cflex aic"},[n("v-uni-view",{staticClass:"rate-input border"},[n("v-uni-input",{attrs:{type:"text",value:"",placeholder:"请输入分数(1-10分)"},model:{value:e.rateData.score,callback:function(t){e.$set(e.rateData,"score",t)},expression:"rateData.score"}})],1),n("v-uni-view",{staticClass:"rflex jcc"},[n("v-uni-button",{attrs:{type:"warn",size:"mini"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handlePop("ratePopup",!1)}}},[e._v("取消")]),n("v-uni-button",{staticClass:"ml25",attrs:{type:"primary",size:"mini"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submitRate.apply(void 0,arguments)}}},[e._v("确认")])],1)],1)],1)],1)],1),n("v-uni-view",{staticClass:"w100 info-item"},[n("v-uni-text",[e._v("学习类型:"+e._s(e.course.studyTypeName?e.course.studyTypeName:""))])],1),n("v-uni-view",{staticClass:"w100 info-item f-time"},[n("v-uni-text",[e._v("发布时间:"+e._s(e.course.createTime?e.course.createTime:""))])],1)],1),n("v-uni-view",{staticClass:"line"}),n("v-uni-view",{staticClass:"course-dec cflex aifs w100"},[n("v-uni-view",{staticClass:"dec-title"},[n("v-uni-text",[e._v("课程简介:")])],1),n("v-uni-view",{staticClass:"dec-content"},[n("mp-html",{attrs:{content:e.course.description}})],1)],1)],1),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:1==e.tab.index,expression:"tab.index == 1"}],staticClass:"chapter-box"},[e.chapter.list.length>0?[e._l(e.chapter.list,(function(t){return[n("v-uni-view",{staticClass:"chapter-item rflex aic jcfs w100",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.selectChapter(t)}}},[n("i",{staticClass:"icon icon-video"}),n("v-uni-text",{staticClass:"chapter-name"},[e._v(e._s(t.chapterName))]),n("v-uni-text",{staticClass:"chapter-status"},[e._v(e._s(t.studyStatus))])],1)]}))]:[n("v-uni-view",{staticClass:"chapter-item rflex aic jcfs w100"},[n("v-uni-text",[e._v("当前课程暂无章节信息")])],1)],"-1"!=e.exam.id?n("v-uni-view",{staticClass:"chapter-item rflex aic jcsb w100"},[n("v-uni-view",{staticClass:"rflex jcfs"},[n("i",{staticClass:"icon icon-exam"}),n("v-uni-text",{staticClass:"chapter-name"},[e._v("课后考试")])],1),2==e.exam.type?[n("v-uni-button",{staticClass:"exam-btn",attrs:{type:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toAnswer()}}},[e._v("考试")])]:3==e.exam.type?[n("v-uni-button",{staticClass:"exam-btn",attrs:{type:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toAnswer()}}},[e._v("重考")])]:4==e.exam.type?[n("v-uni-button",{staticClass:"exam-btn",attrs:{type:"default"}},[e._v("已通过")])]:e._e()],2):e._e()],2),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:2==e.tab.index,expression:"tab.index == 2"}],staticClass:"comment-box"},[n("v-uni-view",{staticClass:"comment-main-box"},[e.comment.length>0?[e._l(e.comment,(function(t){return[n("v-uni-view",{staticClass:"comment-item cflex jcfs aifs w100"},[n("v-uni-view",{staticClass:"rflex w100 jcfs aifs"},[n("v-uni-view",{staticClass:"headimg"},[n("v-uni-image",{attrs:{src:t.photoUrl,mode:""}})],1),n("v-uni-view",{staticClass:"people-info cflex jcfs aifs"},[n("v-uni-view",{staticClass:"rflex"},[n("v-uni-text",{staticClass:"nickname"},[e._v(e._s(t.userName.length>0?t.userName:"网友"))]),n("v-uni-text",{staticClass:"comment-time"},[e._v(e._s(t.time))])],1),n("v-uni-view",{staticClass:"comment-content"},[n("v-uni-text",[e._v(e._s(t.description))])],1)],1)],1),n("v-uni-view",{staticClass:"rflex w100 jcfe zan-box aic"},[n("v-uni-text",[e._v(e._s(t.number<0?0:t.number))]),n("i",{staticClass:"icon",class:{"icon-zan":1==t.isLike,"icon-zand":0==t.isLike},on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.commentZan(t)}}})],1)],1)]})),n("uni-load-more",{attrs:{status:e.comment.loadStatus}})]:[n("v-uni-view",{staticClass:"w100 cflex"},[e._v("暂无相关评论")])]],2)],1),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:3==e.tab.index,expression:"tab.index == 3"}],staticClass:"file-box cflex"},[e.couseware.length>0?[e._l(e.couseware,(function(t){return[n("v-uni-view",{staticClass:" file-item rflex jcsb w100",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.downLoad(t)}}},[n("v-uni-view",{staticClass:"w100 rflex jcfs"},[n("i",{staticClass:"icon icon-pdf"}),n("v-uni-text",{staticClass:"file-title"},[e._v(e._s(t.coursewareName))])],1),n("uni-icons",{attrs:{type:"download",size:"30px",color:"#999"}})],1)]}))]:[n("v-uni-view",[e._v("暂无相关课件")])]],2)],1)],1),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:2==e.tab.index,expression:"tab.index == 2"}],staticClass:"send-comment-box rflex aic jcfs w100"},[n("v-uni-input",{staticClass:"input-comment",attrs:{type:"text"},model:{value:e.commentPage.description,callback:function(t){e.$set(e.commentPage,"description",t)},expression:"commentPage.description"}}),n("v-uni-button",{staticClass:"send-comment-btn",attrs:{type:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.addComment()}}},[e._v("发送")])],1)],1)},o=[]},"15b9":function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("e25e"),n("99af"),n("d3b7"),n("159b"),n("b64b"),n("a4d3"),n("e01a"),n("e9c4");i(n("67bd"));var r=i(n("a491")),o=i(n("99ee")),s=(i(n("bc54")),i(n("0e59"))),a={onLoad:function(e){if(e&&e.id){var t=this.$common.getUserInfo();t&&t.user_id&&(this.userInfo=t,o.default.connect(this.userInfo.nick_name)),this.getDetail(e.id)}else console.error("缺少课程必要参数")},onShow:function(){console.log(">>>进入页面")},onHide:function(){console.log(">>>切换页面"),this.paruseVideo()},onReady:function(e){this.video.videoContext=uni.createVideoContext("videoDom")},data:function(){return{userInfo:{},courseId:"",exam:{id:"-1"},video:{videoProgess:0,currentTimeStr:"",currentTime:0,duration:"",totalDuration:0,videoContext:"",direction:0,intervalObj:null,playStatus:!0},tab:{index:0,list:["课程简介","课程章节","评论区","课件"]},course:{courseName:"",credit:"",parment:"",createTime:"",description:"",score:0},chapter:{status:!1,list:[]},currentChapter:{},commentPage:{current:1,size:15,hasMore:!0,loadStatus:"more",description:"",latestLength:0},comment:[],couseware:[],rateData:{courseId:"",score:""}}},methods:{videoFunc:function(e){var t=e.detail.duration;if(!isNaN(t)){this.video.totalDuration=t;var n=parseInt(e.detail.currentTime);if(this.video.videoProgess=Math.floor(100*(n/t).toFixed(4)),0==this.video.duration){var i=this.$common.getTime(t);this.video.duration=i[0].length>0?"".concat(i[0],":").concat(i[1],":").concat(i[2]):"".concat(i[1],":").concat(i[1])}var r=this.$common.getTime(Math.floor(n));this.video.currentTimeStr=this.video.duration.length>5?"".concat(r[0],":").concat(r[1],":").concat(r[2]):"".concat(r[1],":").concat(r[1]),n-this.video.currentTime>3?(this.$common.tips("视频不支持快进",{icon:"none",duration:2e3}),this.video.videoContext.seek(this.video.currentTime)):this.video.currentTime=n}},paruseVideo:function(){this.video.videoContext.pause()},fullScreen:function(e){var t=e.detail.fullScreen;this.video.direction=t?-90:0},changeTab:function(e){switch(this.tab.index=e,e){case 1:if("-1"!=this.exam.id)return;this.getExam();break;case 2:if(this.comment.length>0)return;this.getCourseCommont();break;case 3:}},getDetail:function(e){var t=this;this.$common.loading(),s.default.dictionaryDetail({code:"study_type"},(function(n){r.default.getCourseDetail({id:e},(function(i){200==i.code?(Object.keys(n.data).forEach((function(e){var t=n.data[e];t.dictKey==i.data.isType&&(i.data.studyTypeName=t.dictValue)})),t.course=i.data,t.courseId=e,t.getChapter((function(){t.getAwar()}))):(t.$common.loading(!1),t.$common.tips(i.msg))}))}))},getChapter:function(e){var t=this;this.chapter.status||0==this.courseId.length?this.$common.loading(!1):(this.chapter.status=!0,r.default.getChapter({examId:this.course.examId,courseId:this.courseId,current:1,size:99999,userId:this.userInfo.user_id},(function(n){200==n.code?(t.chapter.list=n.data.records,t.chapter.list.length>0&&(t.currentChapter=t.chapter.list[0],t.video.currentTime=t.currentChapter.studyDuration,t.$nextTick((function(){t.video.videoContext.seek(t.currentChapter.studyDuration)})))):t.$common.tips(n.msg),e()})))},getExam:function(){var e=this;this.$common.loading(),"-1"!=this.course.examId?r.default.getExam({examId:this.course.examId,userId:this.userInfo.user_id},(function(t){e.$common.loading(!1),200==t.code?e.exam=t.data:e.$common.tips(t.msg)})):this.$common.loading(!1)},getCourseCommont:function(){var e=this;if(null!=this.courseId&&0!=this.courseId.length){var t=Object.assign(this.commentPage,{courseId:this.courseId});r.default.getCourseComment(t,(function(t){200==t.code&&(Object.keys(t.data.records).forEach((function(e){t.data.records[e].zan_status=!1})),e.$common.pushArray(e.comment,t.data.records),e.commentPage.latestLength=t.data.records.length)}))}},addComment:function(){var e=this,t={courseId:this.courseId,description:this.commentPage.description};r.default.addComment(t,(function(t){200==t.code?(e.commentPage.description="",e.$common.tips("评论成功"),e.commentPage.latestLength==e.commentPage.size&&e.commentPage.current++,e.getCourseCommont()):e.$common.tips(t.msg)}))},commentZan:function(e){var t=this;r.default.commentZan({userDiscussId:e.id},(function(n){200==n.code?(0==e.isLike?e.number--:e.number++,e.isLike=1==e.isLike?0:1):t.$common.tips(n.msg)}))},toAnswer:function(){var e={examId:this.exam.id,testPaperId:this.exam.testPaperId};this.$common.redirect("/pages/course/answer/answer?param="+encodeURIComponent(JSON.stringify(e)))},sendPlayTime:function(){if(this.userInfo.user_id){var e={courseInfoId:this.currentChapter.id,studyDuration:this.video.currentTime,userId:this.userInfo.user_id};o.default.sendMessage(e),console.log("socket发送时间成功,最新时间----"+this.video.currentTime)}},selectChapter:function(e){this.currentChapter=e,this.video.videoContext.seek(0)},playVideo:function(){var e=this;if(this.userInfo&&this.userInfo.user_id){this.video.currentTime==Math.floor(this.video.totalDuration)&&(this.video.currentTime=0,this.video.videoContext.seek(0)),this.video.videoContext.play(),this.video.playStatus=!0,this.video.intervalObj||(this.video.intervalObj=setInterval((function(){e.sendPlayTime()}),3e3))}else this.$common.tips("请先登录"),setTimeout((function(){e.$common.redirect("/pages/ucenter/login/login")}),1500)},stopVideo:function(){this.sendPlayTime(),this.video.playStatus=!1,clearInterval(this.video.intervalObj)},getAwar:function(){var e=this;this.currentChapter.id&&this.currentChapter.id.length>0?r.default.getAwar({courseInfoId:this.currentChapter.id},(function(t){e.$common.loading(!1),e.couseware=t.data})):(this.$common.loading(!1),console.warn("附件查询失败,缺少章节ID"))},downLoad:function(e){window.location.href=e.coursewareUrl},handlePop:function(e,t){null!=this.$refs[e]&&(null==t||t?this.$refs[e].open():this.$refs[e].close())},submitRate:function(){var e=this;this.rateData.courseId=this.courseId,0!=this.rateData.length?parseInt(this.rateData.score)>10||parseInt(this.rateData.score)<0?this.$common.tips("只能是1-10分"):(this.$common.loading(),r.default.courseRate(this.rateData,(function(t){e.$common.loading(!1),200==t.code?(e.$common.tips("评分成功"),setTimeout((function(){e.handlePop("ratePopup",!1),e.getDetail()}),1500)):e.$common.tips(t.msg)}))):this.$common.tips("请对课程进行评分")}}};t.default=a},"374a":function(e,t,n){(function(i){var r,o,s,a=n("7037").default;n("d9e2"),n("d401"),n("c975"),n("99af"),n("fb6a"),n("d3b7"),n("159b"),n("4e82"),n("ac1f"),n("5319"),n("3c65"),n("25f0"),n("7a82"),n("14d9"),n("1276"),n("2c3e"),n("4d63"),n("c607"),n("00b4"),n("ace4"),n("5cc6"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("986a"),n("1d02"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("b39a"),n("72f7"),n("f4b3"),n("bf19"),n("a434"),function(n){"object"==a(t)&&"undefined"!=typeof e?e.exports=n():(o=[],r=n,s="function"===typeof r?r.apply(t,o):r,void 0===s||(e.exports=s))}((function(){return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){var n=t[s][1][e];return r(n||e)}),u,u.exports,e,t,n,i)}return n[s].exports}for(var o=!1,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(e,t,n){(function(n){"use strict";var i=e("./transport-list");t.exports=e("./main")(i),"_sockjs_onload"in n&&setTimeout(n._sockjs_onload,1)}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./main":14,"./transport-list":16}],2:[function(e,t,n){"use strict";function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}var r=e("inherits"),o=e("./event");r(i,o),t.exports=i},{"./event":4,inherits:54}],3:[function(e,t,n){"use strict";function i(){o.call(this)}var r=e("inherits"),o=e("./eventtarget");r(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var n=this,i=!1;this.on(e,(function r(){n.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}))},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var n=arguments.length,i=new Array(n-1),r=1;r<n;r++)i[r-1]=arguments[r];for(var o=0;o<t.length;o++)t[o].apply(this,i)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,t.exports.EventEmitter=i},{"./eventtarget":5,inherits:54}],4:[function(e,t,n){"use strict";function i(e){this.type=e}i.prototype.initEvent=function(e,t,n){return this.type=e,this.bubbles=t,this.cancelable=n,this.timeStamp=+new Date,this},i.prototype.stopPropagation=function(){},i.prototype.preventDefault=function(){},i.CAPTURING_PHASE=1,i.AT_TARGET=2,i.BUBBLING_PHASE=3,t.exports=i},{}],5:[function(e,t,n){"use strict";function i(){this._listeners={}}i.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var n=this._listeners[e];-1===n.indexOf(t)&&(n=n.concat([t])),this._listeners[e]=n},i.prototype.removeEventListener=function(e,t){var n=this._listeners[e];if(n){var i=n.indexOf(t);return-1!==i?void(n.length>1?this._listeners[e]=n.slice(0,i).concat(n.slice(i+1)):delete this._listeners[e]):void 0}},i.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,n=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,n),t in this._listeners)for(var i=this._listeners[t],r=0;r<i.length;r++)i[r].apply(this,n)},t.exports=i},{}],6:[function(e,t,n){"use strict";function i(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}var r=e("inherits"),o=e("./event");r(i,o),t.exports=i},{"./event":4,inherits:54}],7:[function(e,t,n){"use strict";function i(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}var r=e("json3"),o=e("./utils/iframe");i.prototype._transportClose=function(e,t){o.postMessage("c",r.stringify([e,t]))},i.prototype._transportMessage=function(e){o.postMessage("t",e)},i.prototype._send=function(e){this._transport.send(e)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=i},{"./utils/iframe":47,json3:55}],8:[function(e,t,n){"use strict";var i=e("./utils/url"),r=e("./utils/event"),o=e("json3"),s=e("./facade"),a=e("./info-iframe-receiver"),c=e("./utils/iframe"),u=e("./location");t.exports=function(e,t){var n,l={};t.forEach((function(e){e.facadeTransport&&(l[e.facadeTransport.transportName]=e.facadeTransport)})),l[a.transportName]=a,e.bootstrap_iframe=function(){var t;c.currentWindowId=u.hash.slice(1);r.attachEvent("message",(function(r){if(r.source===parent&&(void 0===n&&(n=r.origin),r.origin===n)){var a;try{a=o.parse(r.data)}catch(e){return void r.data}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var f;try{f=o.parse(a.data)}catch(e){a.data;break}var d=f[0],h=f[1],p=f[2],v=f[3];if(d!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+d+'", the iframe: "'+e.version+'".');if(!i.isOriginEqual(p,u.href)||!i.isOriginEqual(v,u.href))throw new Error("Can't connect to different domain from within an iframe. ("+u.href+", "+p+", "+v+")");t=new s(new l[h](p,v));break;case"m":t._send(a.data);break;case"c":t&&t._close(),t=null}}})),c.postMessage("s")}}},{"./facade":7,"./info-iframe-receiver":10,"./location":13,"./utils/event":46,"./utils/iframe":47,"./utils/url":52,debug:void 0,json3:55}],9:[function(e,t,n){"use strict";function i(e,t){r.call(this);var n=this,i=+new Date;this.xo=new t("GET",e),this.xo.once("finish",(function(e,t){var r,o;if(200===e){if(o=+new Date-i,t)try{r=s.parse(t)}catch(e){}a.isObject(r)||(r={})}n.emit("finish",r,o),n.removeAllListeners()}))}var r=e("events").EventEmitter,o=e("inherits"),s=e("json3"),a=e("./utils/object");o(i,r),i.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=i},{"./utils/object":49,debug:void 0,events:3,inherits:54,json3:55}],10:[function(e,t,n){"use strict";function i(e){var t=this;o.call(this),this.ir=new c(e,a),this.ir.once("finish",(function(e,n){t.ir=null,t.emit("message",s.stringify([e,n]))}))}var r=e("inherits"),o=e("events").EventEmitter,s=e("json3"),a=e("./transport/sender/xhr-local"),c=e("./info-ajax");r(i,o),i.transportName="iframe-info-receiver",i.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=i},{"./info-ajax":9,"./transport/sender/xhr-local":37,events:3,inherits:54,json3:55}],11:[function(e,t,n){(function(n){"use strict";function i(e,t){var i=this;r.call(this);var o=function(){var n=i.ifr=new c(u.transportName,t,e);n.once("message",(function(e){if(e){var t;try{t=s.parse(e)}catch(e){return i.emit("finish"),void i.close()}var n=t[0],r=t[1];i.emit("finish",n,r)}i.close()})),n.once("close",(function(){i.emit("finish"),i.close()}))};n.document.body?o():a.attachEvent("load",o)}var r=e("events").EventEmitter,o=e("inherits"),s=e("json3"),a=e("./utils/event"),c=e("./transport/iframe"),u=e("./info-iframe-receiver");o(i,r),i.enabled=function(){return c.enabled()},i.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./info-iframe-receiver":10,"./transport/iframe":22,"./utils/event":46,debug:void 0,events:3,inherits:54,json3:55}],12:[function(e,t,n){"use strict";function i(e,t){var n=this;r.call(this),setTimeout((function(){n.doXhr(e,t)}),0)}var r=e("events").EventEmitter,o=e("inherits"),s=e("./utils/url"),a=e("./transport/sender/xdr"),c=e("./transport/sender/xhr-cors"),u=e("./transport/sender/xhr-local"),l=e("./transport/sender/xhr-fake"),f=e("./info-iframe"),d=e("./info-ajax");o(i,r),i._getReceiver=function(e,t,n){return n.sameOrigin?new d(t,u):c.enabled?new d(t,c):a.enabled&&n.sameScheme?new d(t,a):f.enabled()?new f(e,t):new d(t,l)},i.prototype.doXhr=function(e,t){var n=this,r=s.addPath(e,"/info");this.xo=i._getReceiver(e,r,t),this.timeoutRef=setTimeout((function(){n._cleanup(!1),n.emit("finish")}),i.timeout),this.xo.once("finish",(function(e,t){n._cleanup(!0),n.emit("finish",e,t)}))},i.prototype._cleanup=function(e){clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},i.prototype.close=function(){this.removeAllListeners(),this._cleanup(!1)},i.timeout=8e3,t.exports=i},{"./info-ajax":9,"./info-iframe":11,"./transport/sender/xdr":34,"./transport/sender/xhr-cors":35,"./transport/sender/xhr-fake":36,"./transport/sender/xhr-local":37,"./utils/url":52,debug:void 0,events:3,inherits:54}],13:[function(e,t,n){(function(e){"use strict";t.exports=e.location||{origin:"http://localhost:80",protocol:"http",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,t,n){(function(n){"use strict";function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");g.call(this),this.readyState=i.CONNECTING,this.extensions="",this.protocol="",n=n||{},n.protocols_whitelist&&m.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{};var r=n.sessionId||8;if("function"==typeof r)this._generateSessionId=r;else{if("number"!=typeof r)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return u.string(r)}}this._server=n.server||u.numberString(1e3);var o=new s(e);if(!o.host||!o.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(o.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==o.protocol&&"https:"!==o.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.");var a="https:"===o.protocol;if("https"===w.protocol&&!a)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var c=t.sort();c.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<c.length-1&&e===c[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")}));var l=f.getOrigin(w.href);this._origin=l?l.toLowerCase():null,o.set("pathname",o.pathname.replace(/\/+$/,"")),this.url=o.href,this.url,this._urlInfo={nullOrigin:!v.hasDomain(),sameOrigin:f.isOriginEqual(this.url,w.href),sameScheme:f.isSchemeEqual(this.url,w.href)},this._ir=new _(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function r(e){return 1e3===e||e>=3e3&&e<=4999}e("./shims");var o,s=e("url-parse"),a=e("inherits"),c=e("json3"),u=e("./utils/random"),l=e("./utils/escape"),f=e("./utils/url"),d=e("./utils/event"),h=e("./utils/transport"),p=e("./utils/object"),v=e("./utils/browser"),m=e("./utils/log"),b=e("./event/event"),g=e("./event/eventtarget"),w=e("./location"),y=e("./event/close"),x=e("./event/trans-message"),_=e("./info-receiver");a(i,g),i.prototype.close=function(e,t){if(e&&!r(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==i.CLOSING&&this.readyState!==i.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},i.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===i.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===i.OPEN&&this._transport.send(l.quote(e))},i.version=e("./version"),i.CONNECTING=0,i.OPEN=1,i.CLOSING=2,i.CLOSED=3,i.prototype._receiveInfo=function(e,t){if(this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=p.extend(e,this._urlInfo);var n=o.filterToEnabled(this._transportsWhitelist,e);this._transports=n.main,this._transports.length,this._connect()}else this._close(1002,"Cannot connect to server")},i.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(e.transportName,e.needBody&&(!n.document.body||void 0!==n.document.readyState&&"complete"!==n.document.readyState&&"interactive"!==n.document.readyState))return this._transports.unshift(e),void d.attachEvent("load",this._connect.bind(this));var t=this._rto*e.roundTrips||5e3;this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t);var i=f.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),r=this._transportOptions[e.transportName],o=new e(i,this._transUrl,r);return o.on("message",this._transportMessage.bind(this)),o.once("close",this._transportClose.bind(this)),o.transportName=e.transportName,void(this._transport=o)}this._close(2e3,"All transports failed",!1)},i.prototype._transportTimeout=function(){this.readyState===i.CONNECTING&&this._transportClose(2007,"Transport timed out")},i.prototype._transportMessage=function(e){var t,n=this,i=e.slice(0,1),r=e.slice(1);switch(i){case"o":return void this._open();case"h":return this.dispatchEvent(new b("heartbeat")),void this.transport}if(r)try{t=c.parse(r)}catch(e){}if(void 0!==t)switch(i){case"a":Array.isArray(t)&&t.forEach((function(e){n.transport,n.dispatchEvent(new x(e))}));break;case"m":this.transport,this.dispatchEvent(new x(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},i.prototype._transportClose=function(e,t){this.transport,this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),r(e)||2e3===e||this.readyState!==i.CONNECTING?this._close(e,t):this._connect()},i.prototype._open=function(){this._transport.transportName,this.readyState,this.readyState===i.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=i.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new b("open")),this.transport):this._close(1006,"Server lost session")},i.prototype._close=function(e,t,n){this.transport,this.readyState;var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===i.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=i.CLOSING,setTimeout(function(){this.readyState=i.CLOSED,r&&this.dispatchEvent(new b("error"));var o=new y("close");o.wasClean=n||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null}.bind(this),0)},i.prototype.countRTO=function(e){return e>100?4*e:300+e},t.exports=function(t){return o=h(t),e("./iframe-bootstrap")(i,t),i}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./event/close":2,"./event/event":4,"./event/eventtarget":5,"./event/trans-message":6,"./iframe-bootstrap":8,"./info-receiver":12,"./location":13,"./shims":15,"./utils/browser":44,"./utils/escape":45,"./utils/event":46,"./utils/log":48,"./utils/object":49,"./utils/random":50,"./utils/transport":51,"./utils/url":52,"./version":53,debug:void 0,inherits:54,json3:55,"url-parse":58}],15:[function(e,t,n){"use strict";function i(e){var t=+e;return t!==t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function r(){}var o,s=Array.prototype,c=Object.prototype,u=Function.prototype,l=String.prototype,f=s.slice,d=c.toString,h=function(e){return"[object Function]"===c.toString.call(e)},p=function(e){return"[object String]"===d.call(e)},v=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();o=v?function(e,t,n,i){!i&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,i){!i&&t in e||(e[t]=n)};var m=function(e,t,n){for(var i in t)c.hasOwnProperty.call(t,i)&&o(e,i,t[i],n)},b=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};m(u,{bind:function(e){var t=this;if(!h(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n=f.call(arguments,1),i=function(){if(this instanceof c){var i=t.apply(this,n.concat(f.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(f.call(arguments)))},o=Math.max(0,t.length-n.length),s=[],a=0;a<o;a++)s.push("$"+a);var c=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this, arguments); }")(i);return t.prototype&&(r.prototype=t.prototype,c.prototype=new r,r.prototype=null),c}}),m(Array,{isArray:function(e){return"[object Array]"===d.call(e)}});var g=Object("a"),w="a"!==g[0]||!(0 in g);m(s,{forEach:function(e){var t=b(this),n=w&&p(this)?this.split(""):t,i=arguments[1],r=-1,o=n.length>>>0;if(!h(e))throw new TypeError;for(;++r<o;)r in n&&e.call(i,n[r],r,t)}},!function(e){var t=!0,n=!0;return e&&(e.call("foo",(function(e,n,i){"object"!=a(i)&&(t=!1)})),e.call([1],(function(){n="string"==typeof this}),"x")),!!e&&t&&n}(s.forEach));var y=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);m(s,{indexOf:function(e){var t=w&&p(this)?this.split(""):b(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=i(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}},y);var x=l.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?function(){var e=void 0===/()??/.exec("")[1];l.split=function(t,n){var i=this;if(void 0===t&&0===n)return[];if("[object RegExp]"!==d.call(t))return x.call(this,t,n);var r,o,a,c,u=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":""),f=0;for(t=new RegExp(t.source,l+"g"),i+="",e||(r=new RegExp("^"+t.source+"$(?!\\s)",l)),n=void 0===n?-1>>>0:function(e){return e>>>0}(n);(o=t.exec(i))&&!((a=o.index+o[0].length)>f&&(u.push(i.slice(f,o.index)),!e&&o.length>1&&o[0].replace(r,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(o[e]=void 0)})),o.length>1&&o.index<i.length&&s.push.apply(u,o.slice(1)),c=o[0].length,f=a,u.length>=n));)t.lastIndex===o.index&&t.lastIndex++;return f===i.length?!c&&t.test("")||u.push(""):u.push(i.slice(f)),u.length>n?u.slice(0,n):u}}():"0".split(void 0,0).length&&(l.split=function(e,t){return void 0===e&&0===t?[]:x.call(this,e,t)});var _=l.substr,C="".substr&&"b"!=="0b".substr(-1);m(l,{substr:function(e,t){return _.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},C)},{}],16:[function(e,t,n){"use strict";t.exports=[e("./transport/websocket"),e("./transport/xhr-streaming"),e("./transport/xdr-streaming"),e("./transport/eventsource"),e("./transport/lib/iframe-wrap")(e("./transport/eventsource")),e("./transport/htmlfile"),e("./transport/lib/iframe-wrap")(e("./transport/htmlfile")),e("./transport/xhr-polling"),e("./transport/xdr-polling"),e("./transport/lib/iframe-wrap")(e("./transport/xhr-polling")),e("./transport/jsonp-polling")]},{"./transport/eventsource":20,"./transport/htmlfile":21,"./transport/jsonp-polling":23,"./transport/lib/iframe-wrap":26,"./transport/websocket":38,"./transport/xdr-polling":39,"./transport/xdr-streaming":40,"./transport/xhr-polling":41,"./transport/xhr-streaming":42}],17:[function(e,t,n){(function(n){"use strict";function i(e,t,n,i){var o=this;r.call(this),setTimeout((function(){o._start(e,t,n,i)}),0)}var r=e("events").EventEmitter,o=e("inherits"),s=e("../../utils/event"),a=e("../../utils/url"),c=n.XMLHttpRequest;o(i,r),i.prototype._start=function(e,t,n,r){var o=this;try{this.xhr=new c}catch(e){}if(!this.xhr)return this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=s.unloadAdd((function(){o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!i.supportsCORS||(this.xhr.withCredentials="true"),r&&r.headers)for(var u in r.headers)this.xhr.setRequestHeader(u,r.headers[u]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,n=o.xhr;switch(n.readyState,n.readyState){case 3:try{t=n.status,e=n.responseText}catch(e){}1223===t&&(t=204),200===t&&e&&e.length>0&&o.emit("chunk",t,e);break;case 4:t=n.status,1223===t&&(t=204),12005!==t&&12029!==t||(t=0),n.responseText,o.emit("finish",t,n.responseText),o._cleanup(!1)}}};try{o.xhr.send(n)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},i.prototype._cleanup=function(e){if(this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},i.prototype.close=function(){this._cleanup(!0)},i.enabled=!!c;var u=["Active"].concat("Object").join("X");!i.enabled&&u in n&&(c=function(){try{return new n[u]("Microsoft.XMLHTTP")}catch(e){return null}},i.enabled=!!new c);var l=!1;try{l="withCredentials"in new c}catch(e){}i.supportsCORS=l,t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/event":46,"../../utils/url":52,debug:void 0,events:3,inherits:54}],18:[function(e,t,n){(function(e){t.exports=e.EventSource}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,t,n){(function(e){"use strict";var n=e.WebSocket||e.MozWebSocket;t.exports=n?function(e){return new n(e)}:void 0}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,n){"use strict";function i(e){if(!i.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",s,a)}var r=e("inherits"),o=e("./lib/ajax-based"),s=e("./receiver/eventsource"),a=e("./sender/xhr-cors"),c=e("eventsource");r(i,o),i.enabled=function(){return!!c},i.transportName="eventsource",i.roundTrips=2,t.exports=i},{"./lib/ajax-based":24,"./receiver/eventsource":29,"./sender/xhr-cors":35,eventsource:18,inherits:54}],21:[function(e,t,n){"use strict";function i(e){if(!o.enabled)throw new Error("Transport created when disabled");a.call(this,e,"/htmlfile",o,s)}var r=e("inherits"),o=e("./receiver/htmlfile"),s=e("./sender/xhr-local"),a=e("./lib/ajax-based");r(i,a),i.enabled=function(e){return o.enabled&&e.sameOrigin},i.transportName="htmlfile",i.roundTrips=2,t.exports=i},{"./lib/ajax-based":24,"./receiver/htmlfile":30,"./sender/xhr-local":37,inherits:54}],22:[function(e,t,n){"use strict";function i(e,t,n){if(!i.enabled())throw new Error("Transport created when disabled");s.call(this);var r=this;this.origin=c.getOrigin(n),this.baseUrl=n,this.transUrl=t,this.transport=e,this.windowId=f.string(8);var o=c.addPath(n,"/iframe.html")+"#"+this.windowId;this.iframeObj=u.createIframe(o,(function(e){r.emit("close",1006,"Unable to load an iframe ("+e+")"),r.close()})),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}var r=e("inherits"),o=e("json3"),s=e("events").EventEmitter,a=e("../version"),c=e("../utils/url"),u=e("../utils/iframe"),l=e("../utils/event"),f=e("../utils/random");r(i,s),i.prototype.close=function(){if(this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},i.prototype._message=function(e){if(e.data,!c.isOriginEqual(e.origin,this.origin))return e.origin,void this.origin;var t;try{t=o.parse(e.data)}catch(t){return void e.data}if(t.windowId!==this.windowId)return t.windowId,void this.windowId;switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",o.stringify([a,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var n;try{n=o.parse(t.data)}catch(e){return void t.data}this.emit("close",n[0],n[1]),this.close()}},i.prototype.postMessage=function(e,t){this.iframeObj.post(o.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},i.prototype.send=function(e){this.postMessage("m",e)},i.enabled=function(){return u.iframeEnabled},i.transportName="iframe",i.roundTrips=2,t.exports=i},{"../utils/event":46,"../utils/iframe":47,"../utils/random":50,"../utils/url":52,"../version":53,debug:void 0,events:3,inherits:54,json3:55}],23:[function(e,t,n){(function(n){"use strict";function i(e){if(!i.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",a,s)}var r=e("inherits"),o=e("./lib/sender-receiver"),s=e("./receiver/jsonp"),a=e("./sender/jsonp");r(i,o),i.enabled=function(){return!!n.document},i.transportName="jsonp-polling",i.roundTrips=1,i.needBody=!0,t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/sender-receiver":28,"./receiver/jsonp":31,"./sender/jsonp":33,inherits:54}],24:[function(e,t,n){"use strict";function i(e,t,n,i){s.call(this,e,t,function(e){return function(t,n,i){var r={};"string"==typeof n&&(r.headers={"Content-type":"text/plain"});var s=o.addPath(t,"/xhr_send"),a=new e("POST",s,n,r);return a.once("finish",(function(e){if(a=null,200!==e&&204!==e)return i(new Error("http status "+e));i()})),function(){a.close(),a=null;var e=new Error("Aborted");e.code=1e3,i(e)}}}(i),n,i)}var r=e("inherits"),o=e("../../utils/url"),s=e("./sender-receiver");r(i,s),t.exports=i},{"../../utils/url":52,"./sender-receiver":28,debug:void 0,inherits:54}],25:[function(e,t,n){"use strict";function i(e,t){o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}var r=e("inherits"),o=e("events").EventEmitter;r(i,o),i.prototype.send=function(e){this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},i.prototype.sendScheduleWait=function(){var e,t=this;this.sendStop=function(){t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){t.sendStop=null,t.sendSchedule()}),25)},i.prototype.sendSchedule=function(){this.sendBuffer.length;var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.close=function(){this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=i},{debug:void 0,events:3,inherits:54}],26:[function(e,t,n){(function(n){"use strict";var i=e("inherits"),r=e("../iframe"),o=e("../../utils/object");t.exports=function(e){function t(t,n){r.call(this,e.transportName,t,n)}return i(t,r),t.enabled=function(t,i){if(!n.document)return!1;var s=o.extend({},i);return s.sameOrigin=!0,e.enabled(s)&&r.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=r.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/object":49,"../iframe":22,inherits:54}],27:[function(e,t,n){"use strict";function i(e,t,n){o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=n,this._scheduleReceiver()}var r=e("inherits"),o=e("events").EventEmitter;r(i,o),i.prototype._scheduleReceiver=function(){var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){e.emit("message",t)})),t.once("close",(function(n,i){e.pollIsClosing,e.poll=t=null,e.pollIsClosing||("network"===i?e._scheduleReceiver():(e.emit("close",n||1006,i),e.removeAllListeners()))}))},i.prototype.abort=function(){this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=i},{debug:void 0,events:3,inherits:54}],28:[function(e,t,n){"use strict";function i(e,t,n,i,r){var c=o.addPath(e,t),u=this;s.call(this,e,n),this.poll=new a(i,c,r),this.poll.on("message",(function(e){u.emit("message",e)})),this.poll.once("close",(function(e,t){u.poll=null,u.emit("close",e,t),u.close()}))}var r=e("inherits"),o=e("../../utils/url"),s=e("./buffered-sender"),a=e("./polling");r(i,s),i.prototype.close=function(){s.prototype.close.call(this),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},t.exports=i},{"../../utils/url":52,"./buffered-sender":25,"./polling":27,debug:void 0,inherits:54}],29:[function(e,t,n){"use strict";function i(e){o.call(this);var t=this,n=this.es=new s(e);n.onmessage=function(e){e.data,t.emit("message",decodeURI(e.data))},n.onerror=function(e){n.readyState;var i=2!==n.readyState?"network":"permanent";t._cleanup(),t._close(i)}}var r=e("inherits"),o=e("events").EventEmitter,s=e("eventsource");r(i,o),i.prototype.abort=function(){this._cleanup(),this._close("user")},i.prototype._cleanup=function(){var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},i.prototype._close=function(e){var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},t.exports=i},{debug:void 0,events:3,eventsource:18,inherits:54}],30:[function(e,t,n){(function(n){"use strict";function i(e){a.call(this);var t=this;o.polluteGlobalNamespace(),this.id="a"+c.string(6),e=s.addQuery(e,"c="+decodeURIComponent(o.WPrefix+"."+this.id)),i.htmlfileEnabled;var r=i.htmlfileEnabled?o.createHtmlfile:o.createIframe;n[o.WPrefix][this.id]={start:function(){t.iframeObj.loaded()},message:function(e){t.emit("message",e)},stop:function(){t._cleanup(),t._close("network")}},this.iframeObj=r(e,(function(){t._cleanup(),t._close("permanent")}))}var r=e("inherits"),o=e("../../utils/iframe"),s=e("../../utils/url"),a=e("events").EventEmitter,c=e("../../utils/random");r(i,a),i.prototype.abort=function(){this._cleanup(),this._close("user")},i.prototype._cleanup=function(){this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete n[o.WPrefix][this.id]},i.prototype._close=function(e){this.emit("close",null,e),this.removeAllListeners()},i.htmlfileEnabled=!1;var u=["Active"].concat("Object").join("X");if(u in n)try{i.htmlfileEnabled=!!new n[u]("htmlfile")}catch(e){}i.enabled=i.htmlfileEnabled||o.iframeEnabled,t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:void 0,events:3,inherits:54}],31:[function(e,t,n){(function(n){"use strict";function i(e){var t=this;u.call(this),r.polluteGlobalNamespace(),this.id="a"+o.string(6);var s=a.addQuery(e,"c="+encodeURIComponent(r.WPrefix+"."+this.id));n[r.WPrefix][this.id]=this._callback.bind(this),this._createScript(s),this.timeoutId=setTimeout((function(){t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),i.timeout)}var r=e("../../utils/iframe"),o=e("../../utils/random"),s=e("../../utils/browser"),a=e("../../utils/url"),c=e("inherits"),u=e("events").EventEmitter;c(i,u),i.prototype.abort=function(){if(n[r.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},i.timeout=35e3,i.scriptErrorTimeout=1e3,i.prototype._callback=function(e){this._cleanup(),this.aborting||(e&&this.emit("message",e),this.emit("close",null,"network"),this.removeAllListeners())},i.prototype._abort=function(e){this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},i.prototype._cleanup=function(){if(clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete n[r.WPrefix][this.id]},i.prototype._scriptError=function(){var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),i.scriptErrorTimeout))},i.prototype._createScript=function(e){var t,i=this,r=this.script=n.document.createElement("script");if(r.id="a"+o.string(8),r.src=e,r.type="text/javascript",r.charset="UTF-8",r.onerror=this._scriptError.bind(this),r.onload=function(){i._abort(new Error("JSONP script loaded abnormally (onload)"))},r.onreadystatechange=function(){if(r.readyState,/loaded|closed/.test(r.readyState)){if(r&&r.htmlFor&&r.onclick){i.loadedOkay=!0;try{r.onclick()}catch(e){}}r&&i._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===r.async&&n.document.attachEvent)if(s.isOpera())t=this.script2=n.document.createElement("script"),t.text="try{var a = document.getElementById('"+r.id+"'); if(a)a.onerror();}catch(x){};",r.async=t.async=!1;else{try{r.htmlFor=r.id,r.event="onclick"}catch(e){}r.async=!0}void 0!==r.async&&(r.async=!0);var a=n.document.getElementsByTagName("head")[0];a.insertBefore(r,a.firstChild),t&&a.insertBefore(t,a.firstChild)},t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:void 0,events:3,inherits:54}],32:[function(e,t,n){"use strict";function i(e,t){o.call(this);var n=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){n._chunkHandler(e,t),n.xo=null;var i=200===e?"network":"permanent";n.emit("close",null,i),n._cleanup()}))}var r=e("inherits"),o=e("events").EventEmitter;r(i,o),i.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var n=-1;;this.bufferPosition+=n+1){var i=t.slice(this.bufferPosition);if(-1===(n=i.indexOf("\n")))break;var r=i.slice(0,n);r&&this.emit("message",r)}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=i},{debug:void 0,events:3,inherits:54}],33:[function(e,t,n){(function(n){"use strict";function i(e){try{return n.document.createElement('<iframe name="'+e+'">')}catch(i){var t=n.document.createElement("iframe");return t.name=e,t}}function r(){o=n.document.createElement("form"),o.style.display="none",o.style.position="absolute",o.method="POST",o.enctype="application/x-www-form-urlencoded",o.acceptCharset="UTF-8",s=n.document.createElement("textarea"),s.name="d",o.appendChild(s),n.document.body.appendChild(o)}var o,s,a=e("../../utils/random"),c=e("../../utils/url");t.exports=function(e,t,n){o||r();var u="a"+a.string(8);o.target=u,o.action=c.addQuery(c.addPath(e,"/jsonp_send"),"i="+u);var l=i(u);l.id=u,l.style.display="none",o.appendChild(l);try{s.value=t}catch(e){}o.submit();var f=function(e){l.onerror&&(l.onreadystatechange=l.onerror=l.onload=null,setTimeout((function(){l.parentNode.removeChild(l),l=null}),500),s.value="",n(e))};return l.onerror=function(){f()},l.onload=function(){f()},l.onreadystatechange=function(e){l.readyState,"complete"===l.readyState&&f()},function(){f(new Error("Aborted"))}}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/random":50,"../../utils/url":52,debug:void 0}],34:[function(e,t,n){(function(n){"use strict";function i(e,t,n){var i=this;r.call(this),setTimeout((function(){i._start(e,t,n)}),0)}var r=e("events").EventEmitter,o=e("inherits"),s=e("../../utils/event"),a=e("../../utils/browser"),c=e("../../utils/url");o(i,r),i.prototype._start=function(e,t,i){var r=this,o=new n.XDomainRequest;t=c.addQuery(t,"t="+ +new Date),o.onerror=function(){r._error()},o.ontimeout=function(){r._error()},o.onprogress=function(){o.responseText,r.emit("chunk",200,o.responseText)},o.onload=function(){r.emit("finish",200,o.responseText),r._cleanup(!1)},this.xdr=o,this.unloadRef=s.unloadAdd((function(){r._cleanup(!0)}));try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(i)}catch(e){this._error()}},i.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},i.prototype._cleanup=function(e){if(this.xdr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},i.prototype.close=function(){this._cleanup(!0)},i.enabled=!(!n.XDomainRequest||!a.hasDomain()),t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/event":46,"../../utils/url":52,debug:void 0,events:3,inherits:54}],35:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e,t,n,i)}var r=e("inherits"),o=e("../driver/xhr");r(i,o),i.enabled=o.enabled&&o.supportsCORS,t.exports=i},{"../driver/xhr":17,inherits:54}],36:[function(e,t,n){"use strict";function i(){var e=this;r.call(this),this.to=setTimeout((function(){e.emit("finish",200,"{}")}),i.timeout)}var r=e("events").EventEmitter;e("inherits")(i,r),i.prototype.close=function(){clearTimeout(this.to)},i.timeout=2e3,t.exports=i},{events:3,inherits:54}],37:[function(e,t,n){"use strict";function i(e,t,n){o.call(this,e,t,n,{noCredentials:!0})}var r=e("inherits"),o=e("../driver/xhr");r(i,o),i.enabled=o.enabled,t.exports=i},{"../driver/xhr":17,inherits:54}],38:[function(e,t,n){"use strict";function i(e,t,n){if(!i.enabled())throw new Error("Transport created when disabled");a.call(this);var s=this,u=o.addPath(e,"/websocket");u="https"===u.slice(0,5)?"wss"+u.slice(5):"ws"+u.slice(4),this.url=u,this.ws=new c(this.url,[],n),this.ws.onmessage=function(e){e.data,s.emit("message",e.data)},this.unloadRef=r.unloadAdd((function(){s.ws.close()})),this.ws.onclose=function(e){e.code,e.reason,s.emit("close",e.code,e.reason),s._cleanup()},this.ws.onerror=function(e){s.emit("close",1006,"WebSocket connection broken"),s._cleanup()}}var r=e("../utils/event"),o=e("../utils/url"),s=e("inherits"),a=e("events").EventEmitter,c=e("./driver/websocket");s(i,a),i.prototype.send=function(e){var t="["+e+"]";this.ws.send(t)},i.prototype.close=function(){var e=this.ws;this._cleanup(),e&&e.close()},i.prototype._cleanup=function(){var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),r.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},i.enabled=function(){return!!c},i.transportName="websocket",i.roundTrips=2,t.exports=i},{"../utils/event":46,"../utils/url":52,"./driver/websocket":19,debug:void 0,events:3,inherits:54}],39:[function(e,t,n){"use strict";function i(e){if(!c.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",a,c)}var r=e("inherits"),o=e("./lib/ajax-based"),s=e("./xdr-streaming"),a=e("./receiver/xhr"),c=e("./sender/xdr");r(i,o),i.enabled=s.enabled,i.transportName="xdr-polling",i.roundTrips=2,t.exports=i},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,"./xdr-streaming":40,inherits:54}],40:[function(e,t,n){"use strict";function i(e){if(!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",s,a)}var r=e("inherits"),o=e("./lib/ajax-based"),s=e("./receiver/xhr"),a=e("./sender/xdr");r(i,o),i.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&a.enabled&&e.sameScheme},i.transportName="xdr-streaming",i.roundTrips=2,t.exports=i},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,inherits:54}],41:[function(e,t,n){"use strict";function i(e){if(!c.enabled&&!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",s,a)}var r=e("inherits"),o=e("./lib/ajax-based"),s=e("./receiver/xhr"),a=e("./sender/xhr-cors"),c=e("./sender/xhr-local");r(i,o),i.enabled=function(e){return!e.nullOrigin&&(!(!c.enabled||!e.sameOrigin)||a.enabled)},i.transportName="xhr-polling",i.roundTrips=2,t.exports=i},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xhr-cors":35,"./sender/xhr-local":37,inherits:54}],42:[function(e,t,n){(function(n){"use strict";function i(e){if(!c.enabled&&!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",s,a)}var r=e("inherits"),o=e("./lib/ajax-based"),s=e("./receiver/xhr"),a=e("./sender/xhr-cors"),c=e("./sender/xhr-local"),u=e("../utils/browser");r(i,o),i.enabled=function(e){return!e.nullOrigin&&!u.isOpera()&&a.enabled},i.transportName="xhr-streaming",i.roundTrips=2,i.needBody=!!n.document,t.exports=i}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/browser":44,"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xhr-cors":35,"./sender/xhr-local":37,inherits:54}],43:[function(e,t,n){(function(e){"use strict";e.crypto&&e.crypto.getRandomValues?t.exports.randomBytes=function(t){var n=new Uint8Array(t);return e.crypto.getRandomValues(n),n}:t.exports.randomBytes=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(e,t,n){(function(e){"use strict";t.exports={isOpera:function(){return e.navigator&&/opera/i.test(e.navigator.userAgent)},isKonqueror:function(){return e.navigator&&/konqueror/i.test(e.navigator.userAgent)},hasDomain:function(){if(!e.document)return!0;try{return!!e.document.domain}catch(e){return!1}}}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,t,n){"use strict";var i,r=e("json3"),o=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g;t.exports={quote:function(e){var t=r.stringify(e);return o.lastIndex=0,o.test(t)?(i||(i=function(e){var t,n={},i=[];for(t=0;t<65536;t++)i.push(String.fromCharCode(t));return e.lastIndex=0,i.join("").replace(e,(function(e){return n[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""})),e.lastIndex=0,n}(o)),t.replace(o,(function(e){return i[e]}))):t}}},{json3:55}],46:[function(e,t,n){(function(n){"use strict";var i=e("./random"),r={},o=!1,s=n.chrome&&n.chrome.app&&n.chrome.app.runtime;t.exports={attachEvent:function(e,t){void 0!==n.addEventListener?n.addEventListener(e,t,!1):n.document&&n.attachEvent&&(n.document.attachEvent("on"+e,t),n.attachEvent("on"+e,t))},detachEvent:function(e,t){void 0!==n.addEventListener?n.removeEventListener(e,t,!1):n.document&&n.detachEvent&&(n.document.detachEvent("on"+e,t),n.detachEvent("on"+e,t))},unloadAdd:function(e){if(s)return null;var t=i.string(8);return r[t]=e,o&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in r&&delete r[e]},triggerUnloadCallbacks:function(){for(var e in r)r[e](),delete r[e]}};s||t.exports.attachEvent("unload",(function(){o||(o=!0,t.exports.triggerUnloadCallbacks())}))}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./random":50}],47:[function(e,t,n){(function(n){"use strict";var i=e("./event"),r=e("json3"),o=e("./browser");t.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){t.exports.WPrefix in n||(n[t.exports.WPrefix]={})},postMessage:function(e,i){n.parent!==n&&n.parent.postMessage(r.stringify({windowId:t.exports.currentWindowId,type:e,data:i||""}),"*")},createIframe:function(e,t){var r,o,s=n.document.createElement("iframe"),a=function(){clearTimeout(r);try{s.onload=null}catch(e){}s.onerror=null},c=function(){s&&(a(),setTimeout((function(){s&&s.parentNode.removeChild(s),s=null}),0),i.unloadDel(o))},u=function(e){s&&(c(),t(e))};return s.src=e,s.style.display="none",s.style.position="absolute",s.onerror=function(){u("onerror")},s.onload=function(){clearTimeout(r),r=setTimeout((function(){u("onload timeout")}),2e3)},n.document.body.appendChild(s),r=setTimeout((function(){u("timeout")}),15e3),o=i.unloadAdd(c),{post:function(e,t){try{setTimeout((function(){s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:c,loaded:a}},createHtmlfile:function(e,r){var o,s,a,c=["Active"].concat("Object").join("X"),u=new n[c]("htmlfile"),l=function(){clearTimeout(o),a.onerror=null},f=function(){u&&(l(),i.unloadDel(s),a.parentNode.removeChild(a),a=u=null,CollectGarbage())},d=function(e){u&&(f(),r(e))};u.open(),u.write('<html><script>document.domain="'+n.document.domain+'";<\/script></html>'),u.close(),u.parentWindow[t.exports.WPrefix]=n[t.exports.WPrefix];var h=u.createElement("div");return u.body.appendChild(h),a=u.createElement("iframe"),h.appendChild(a),a.src=e,a.onerror=function(){d("onerror")},o=setTimeout((function(){d("timeout")}),15e3),s=i.unloadAdd(f),{post:function(e,t){try{setTimeout((function(){a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:f,loaded:l}}},t.exports.iframeEnabled=!1,n.document&&(t.exports.iframeEnabled=("function"==typeof n.postMessage||"object"==a(n.postMessage))&&!o.isKonqueror())}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./browser":44,"./event":46,debug:void 0,json3:55}],48:[function(e,t,n){(function(e){"use strict";var n={};["log","debug","warn"].forEach((function(t){var i;try{i=e.console&&e.console[t]&&e.console[t].apply}catch(e){}n[t]=i?function(){return e.console[t].apply(e.console,arguments)}:"log"===t?function(){}:n.log})),t.exports=n}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(e,t,n){"use strict";t.exports={isObject:function(e){var t=a(e);return"function"===t||"object"===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,n,i=1,r=arguments.length;i<r;i++)for(n in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}}},{}],50:[function(e,t,n){"use strict";var i=e("crypto"),r="abcdefghijklmnopqrstuvwxyz012345";t.exports={string:function(e){for(var t=r.length,n=i.randomBytes(e),o=[],s=0;s<e;s++)o.push(r.substr(n[s]%t,1));return o.join("")},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(""+(e-1)).length;return(new Array(t+1).join("0")+this.number(e)).slice(-t)}}},{crypto:43}],51:[function(e,t,n){"use strict";t.exports=function(e){return{filterToEnabled:function(t,n){var i={main:[],facade:[]};return t?"string"==typeof t&&(t=[t]):t=[],e.forEach((function(e){if(e&&("websocket"!==e.transportName||!1!==n.websocket))return t.length&&-1===t.indexOf(e.transportName)?void e.transportName:void(e.enabled(n)?(e.transportName,i.main.push(e),e.facadeTransport&&i.facade.push(e.facadeTransport)):e.transportName)})),i}}}},{debug:void 0}],52:[function(e,t,n){"use strict";var i=e("url-parse");t.exports={getOrigin:function(e){if(!e)return null;var t=new i(e);if("file:"===t.protocol)return null;var n=t.port;return n||(n="https:"===t.protocol?"443":"80"),t.protocol+"//"+t.hostname+":"+n},isOriginEqual:function(e,t){var n=this.getOrigin(e)===this.getOrigin(t);return n},isSchemeEqual:function(e,t){return e.split(":")[0]===t.split(":")[0]},addPath:function(e,t){var n=e.split("?");return n[0]+t+(n[1]?"?"+n[1]:"")},addQuery:function(e,t){return e+(-1===e.indexOf("?")?"?"+t:"&"+t)}}},{debug:void 0,"url-parse":58}],53:[function(e,t,n){t.exports="1.1.4"},{}],54:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],55:[function(e,t,n){(function(e){(function(){function i(e,t){function n(e){if(n[e]!==b)return n[e];var i;if("bug-string-char-index"==e)i="a"!="a"[0];else if("json"==e)i=n("json-stringify")&&n("json-parse");else{var r,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var a=t.stringify,u="function"==typeof a&&y;if(u){(r=function(){return 1}).toJSON=r;try{u="0"===a(0)&&"0"===a(new o)&&'""'==a(new c)&&a(w)===b&&a(b)===b&&a()===b&&"1"===a(r)&&"[1]"==a([r])&&"[null]"==a([b])&&"null"==a(null)&&"[null,null,null]"==a([b,w,null])&&a({a:[r,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===a(null,r)&&"[\n 1,\n 2\n]"==a([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==a(new l(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==a(new l(864e13))&&'"-000001-01-01T00:00:00.000Z"'==a(new l(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==a(new l(-1))}catch(e){u=!1}}i=u}if("json-parse"==e){var f=t.parse;if("function"==typeof f)try{if(0===f("0")&&!f(!1)){r=f(s);var d=5==r.a.length&&1===r.a[0];if(d){try{d=!f('"\t"')}catch(e){}if(d)try{d=1!==f("01")}catch(e){}if(d)try{d=1!==f("1.")}catch(e){}}}}catch(e){d=!1}i=d}}return n[e]=!!i}e||(e=s.Object()),t||(t=s.Object());var o=e.Number||s.Number,c=e.String||s.String,u=e.Object||s.Object,l=e.Date||s.Date,f=e.SyntaxError||s.SyntaxError,d=e.TypeError||s.TypeError,h=e.Math||s.Math,p=e.JSON||s.JSON;"object"==a(p)&&p&&(t.stringify=p.stringify,t.parse=p.parse);var v,m,b,g=u.prototype,w=g.toString,y=new l(-0xc782b5b800cec);try{y=-109252==y.getUTCFullYear()&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(e){}if(!n("json")){var x=n("bug-string-char-index");if(!y)var _=h.floor,C=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(e,t){return C[t]+365*(e-1970)+_((e-1969+(t=+(t>1)))/4)-_((e-1901+t)/100)+_((e-1601+t)/400)};if((v=g.hasOwnProperty)||(v=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=w?v=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,v=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,v.call(this,e)}),m=function(e,t){var n,i,o,s=0;for(o in(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n,i)v.call(i,o)&&s++;return n=i=null,s?m=2==s?function(e,t){var n,i={},r="[object Function]"==w.call(e);for(n in e)r&&"prototype"==n||v.call(i,n)||!(i[n]=1)||!v.call(e,n)||t(n)}:function(e,t){var n,i,r="[object Function]"==w.call(e);for(n in e)r&&"prototype"==n||!v.call(e,n)||(i="constructor"===n)||t(n);(i||v.call(e,n="constructor"))&&t(n)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(e,t){var n,o,s="[object Function]"==w.call(e),c=!s&&"function"!=typeof e.constructor&&r[a(e.hasOwnProperty)]&&e.hasOwnProperty||v;for(n in e)s&&"prototype"==n||!c.call(e,n)||t(n);for(o=i.length;n=i[--o];c.call(e,n)&&t(n));}),m(e,t)},!n("json-stringify")){var S={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j=function(e,t){return("000000"+(t||0)).slice(-e)},T=function(e){for(var t='"',n=0,i=e.length,r=!x||i>10,o=r&&(x?e.split(""):e);n<i;n++){var s=e.charCodeAt(n);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=S[s];break;default:if(s<32){t+="\\u00"+j(2,s.toString(16));break}t+=r?o[n]:e.charAt(n)}}return t+'"'};t.stringify=function(e,t,n){var i,o,s,c;if(r[a(t)]&&t)if("[object Function]"==(c=w.call(t)))o=t;else if("[object Array]"==c){s={};for(var u,l=0,f=t.length;l<f;u=t[l++],("[object String]"==(c=w.call(u))||"[object Number]"==c)&&(s[u]=1));}if(n)if("[object Number]"==(c=w.call(n))){if((n-=n%1)>0)for(i="",n>10&&(n=10);i.length<n;i+=" ");}else"[object String]"==c&&(i=n.length<=10?n:n.slice(0,10));return function e(t,n,i,r,o,s,c){var u,l,f,h,p,g,y,x,C,S,k,O,N,I,A,P;try{u=n[t]}catch(t){}if("object"==a(u)&&u)if("[object Date]"!=(l=w.call(u))||v.call(u,"toJSON"))"function"==typeof u.toJSON&&("[object Number]"!=l&&"[object String]"!=l&&"[object Array]"!=l||v.call(u,"toJSON"))&&(u=u.toJSON(t));else if(u>-1/0&&u<1/0){if(E){for(p=_(u/864e5),f=_(p/365.2425)+1970-1;E(f+1,0)<=p;f++);for(h=_((p-E(f,0))/30.42);E(f,h+1)<=p;h++);p=1+p-E(f,h),g=(u%864e5+864e5)%864e5,y=_(g/36e5)%24,x=_(g/6e4)%60,C=_(g/1e3)%60,S=g%1e3}else f=u.getUTCFullYear(),h=u.getUTCMonth(),p=u.getUTCDate(),y=u.getUTCHours(),x=u.getUTCMinutes(),C=u.getUTCSeconds(),S=u.getUTCMilliseconds();u=(f<=0||f>=1e4?(f<0?"-":"+")+j(6,f<0?-f:f):j(4,f))+"-"+j(2,h+1)+"-"+j(2,p)+"T"+j(2,y)+":"+j(2,x)+":"+j(2,C)+"."+j(3,S)+"Z"}else u=null;if(i&&(u=i.call(n,t,u)),null===u)return"null";if("[object Boolean]"==(l=w.call(u)))return""+u;if("[object Number]"==l)return u>-1/0&&u<1/0?""+u:"null";if("[object String]"==l)return T(""+u);if("object"==a(u)){for(I=c.length;I--;)if(c[I]===u)throw d();if(c.push(u),k=[],A=s,s+=o,"[object Array]"==l){for(N=0,I=u.length;N<I;N++)O=e(N,u,i,r,o,s,c),k.push(O===b?"null":O);P=k.length?o?"[\n"+s+k.join(",\n"+s)+"\n"+A+"]":"["+k.join(",")+"]":"[]"}else m(r||u,(function(t){var n=e(t,u,i,r,o,s,c);n!==b&&k.push(T(t)+":"+(o?" ":"")+n)})),P=k.length?o?"{\n"+s+k.join(",\n"+s)+"\n"+A+"}":"{"+k.join(",")+"}":"{}";return c.pop(),P}}("",(u={},u[""]=e,u),o,s,i,"",[])}}if(!n("json-parse")){var k,O,N=c.fromCharCode,I={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},A=function(){throw k=O=null,f()},P=function(){for(var e,t,n,i,r,o=O,s=o.length;k<s;)switch(r=o.charCodeAt(k)){case 9:case 10:case 13:case 32:k++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=x?o.charAt(k):o[k],k++,e;case 34:for(e="@",k++;k<s;)if((r=o.charCodeAt(k))<32)A();else if(92==r)switch(r=o.charCodeAt(++k)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=I[r],k++;break;case 117:for(t=++k,n=k+4;k<n;k++)(r=o.charCodeAt(k))>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||A();e+=N("0x"+o.slice(t,k));break;default:A()}else{if(34==r)break;for(r=o.charCodeAt(k),t=k;r>=32&&92!=r&&34!=r;)r=o.charCodeAt(++k);e+=o.slice(t,k)}if(34==o.charCodeAt(k))return k++,e;A();default:if(t=k,45==r&&(i=!0,r=o.charCodeAt(++k)),r>=48&&r<=57){for(48==r&&(r=o.charCodeAt(k+1))>=48&&r<=57&&A(),i=!1;k<s&&(r=o.charCodeAt(k))>=48&&r<=57;k++);if(46==o.charCodeAt(k)){for(n=++k;n<s&&(r=o.charCodeAt(n))>=48&&r<=57;n++);n==k&&A(),k=n}if(101==(r=o.charCodeAt(k))||69==r){for(r=o.charCodeAt(++k),43!=r&&45!=r||k++,n=k;n<s&&(r=o.charCodeAt(n))>=48&&r<=57;n++);n==k&&A(),k=n}return+o.slice(t,k)}if(i&&A(),"true"==o.slice(k,k+4))return k+=4,!0;if("false"==o.slice(k,k+5))return k+=5,!1;if("null"==o.slice(k,k+4))return k+=4,null;A()}return"$"},L=function(e,t,n){var i=D(e,t,n);i===b?delete e[t]:e[t]=i},D=function(e,t,n){var i,r=e[t];if("object"==a(r)&&r)if("[object Array]"==w.call(r))for(i=r.length;i--;)L(r,i,n);else m(r,(function(e){L(r,e,n)}));return n.call(e,t,r)};t.parse=function(e,t){var n,i;return k=0,O=""+e,n=function e(t){var n,i;if("$"==t&&A(),"string"==typeof t){if("@"==(x?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(n=[];"]"!=(t=P());i||(i=!0))i&&(","==t?"]"==(t=P())&&A():A()),","==t&&A(),n.push(e(t));return n}if("{"==t){for(n={};"}"!=(t=P());i||(i=!0))i&&(","==t?"}"==(t=P())&&A():A()),","!=t&&"string"==typeof t&&"@"==(x?t.charAt(0):t[0])&&":"==P()||A(),n[t.slice(1)]=e(P());return n}A()}return t}(P()),"$"!=P()&&A(),k=O=null,t&&"[object Function]"==w.call(t)?D((i={},i[""]=n,i),"",t):n}}}return t.runInContext=i,t}var r={function:!0,object:!0},o=r[a(n)]&&n&&!n.nodeType&&n,s=r["undefined"===typeof window?"undefined":a(window)]&&window||this,c=o&&r[a(t)]&&t&&!t.nodeType&&"object"==a(e)&&e;if(!c||c.global!==c&&c.window!==c&&c.self!==c||(s=c),o)i(s,o);else{var u=s.JSON,l=s.JSON3,f=!1,d=i(s,s.JSON3={noConflict:function(){return f||(f=!0,s.JSON=u,s.JSON3=l,u=l=null),d}});s.JSON={parse:d.parse,stringify:d.stringify}}}).call(this)}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],56:[function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty;n.stringify=function(e,t){t=t||"";var n=[];for(var r in"string"!=typeof t&&(t="?"),e)i.call(e,r)&&n.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return n.length?t+n.join("&"):""},n.parse=function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,i={};t=n.exec(e);i[decodeURIComponent(t[1])]=decodeURIComponent(t[2]));return i}},{}],57:[function(e,t,n){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],58:[function(e,t,n){"use strict";function i(e){var t=u.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var u,f,d,h,p,v,m=l.slice(),b=a(t),g=this,w=0;for("object"!==b&&"string"!==b&&(n=t,t=null),n&&"function"!=typeof n&&(n=c.parse),t=s(t),f=i(e||""),u=!f.protocol&&!f.slashes,g.slashes=f.slashes||u&&t.slashes,g.protocol=f.protocol||t.protocol||"",e=f.rest,f.slashes||(m[2]=[/(.*)/,"pathname"]);w<m.length;w++)h=m[w],d=h[0],v=h[1],d!==d?g[v]=e:"string"==typeof d?~(p=e.indexOf(d))&&("number"==typeof h[2]?(g[v]=e.slice(0,p),e=e.slice(p+h[2])):(g[v]=e.slice(p),e=e.slice(0,p))):(p=d.exec(e))&&(g[v]=p[1],e=e.slice(0,p.index)),g[v]=g[v]||u&&h[3]&&t[v]||"",h[4]&&(g[v]=g[v].toLowerCase());n&&(g.query=n(g.query)),u&&t.slashes&&"/"!==g.pathname.charAt(0)&&(""!==g.pathname||""!==t.pathname)&&(g.pathname=function(e,t){for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),i=n.length,r=n[i-1],o=!1,s=0;i--;)"."===n[i]?n.splice(i,1):".."===n[i]?(n.splice(i,1),s++):s&&(0===i&&(o=!0),n.splice(i,1),s--);return o&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(g.pathname,t.pathname)),o(g.port,g.protocol)||(g.host=g.hostname,g.port=""),g.username=g.password="",g.auth&&(h=g.auth.split(":"),g.username=h[0]||"",g.password=h[1]||""),g.origin=g.protocol&&g.host&&"file:"!==g.protocol?g.protocol+"//"+g.host:"null",g.href=g.toString()}var o=e("requires-port"),s=e("./lolcation"),c=e("querystringify"),u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,l=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];r.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||c.parse)(t)),i[e]=t;break;case"port":i[e]=t,o(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":i.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:i[e]=t}for(var r=0;r<l.length;r++){var s=l[r];s[4]&&(i[s[1]]=i[s[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=c.stringify);var t,n=this,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var r=i+(n.slashes?"//":"");return n.username&&(r+=n.username,n.password&&(r+=":"+n.password),r+="@"),r+=n.host+n.pathname,t="object"==a(n.query)?e(n.query):n.query,t&&(r+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(r+=n.hash),r}},r.extractProtocol=i,r.location=s,r.qs=c,t.exports=r},{"./lolcation":59,querystringify:56,"requires-port":57}],59:[function(e,t,n){(function(n){"use strict";var i,r=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,o={hash:1,query:1};t.exports=function(t){t=t||n.location||{},i=i||e("./");var s,c={},u=a(t);if("blob:"===t.protocol)c=new i(unescape(t.pathname),{});else if("string"===u)for(s in c=new i(t,{}),o)delete c[s];else if("object"===u){for(s in t)s in o||(c[s]=t[s]);void 0===c.slashes&&(c.slashes=r.test(t.href))}return c}}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./":58}]},{},[1])(1)}))}).call(this,n("c8ba"))},4039:function(e,t,n){n("fb6a"),n("d401"),n("d3b7"),n("25f0"),n("14d9"),n("ac1f"),n("466d"),n("841c"),n("4d63"),n("c607"),n("2c3e"),n("1276"),n("5319"),n("26e9"),n("c975"),n("e25e"),n("c19f"),n("ace4"),n("5cc6"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("986a"),n("1d02"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("b39a"),n("72f7"),function(){var e,n,i,r,o={}.hasOwnProperty,s=[].slice;e={LF:"\n",NULL:"\0"},i=function(){var t;function n(e,t,n){this.command=e,this.headers=null!=t?t:{},this.body=null!=n?n:""}return n.prototype.toString=function(){var t,i,r,s,a;for(i in t=[this.command],r=!1===this.headers["content-length"],r&&delete this.headers["content-length"],a=this.headers,a)o.call(a,i)&&(s=a[i],t.push(i+":"+s));return this.body&&!r&&t.push("content-length:"+n.sizeOfUTF8(this.body)),t.push(e.LF+this.body),t.join(e.LF)},n.sizeOfUTF8=function(e){return e?encodeURI(e).match(/%..|./g).length:0},t=function(t){var i,r,o,s,a,c,u,l,f,d,h,p,v,m,b,g,w;for(s=t.search(RegExp(""+e.LF+e.LF)),a=t.substring(0,s).split(e.LF),o=a.shift(),c={},p=function(e){return e.replace(/^\s+|\s+$/g,"")},g=a.reverse(),v=0,b=g.length;v<b;v++)d=g[v],l=d.indexOf(":"),c[p(d.substring(0,l))]=p(d.substring(l+1));if(i="",h=s+2,c["content-length"])f=parseInt(c["content-length"]),i=(""+t).substring(h,h+f);else for(r=null,u=m=h,w=t.length;h<=w?m<w:m>w;u=h<=w?++m:--m){if(r=t.charAt(u),r===e.NULL)break;i+=r}return new n(o,c,i)},n.unmarshall=function(n){var i;return function(){var r,o,s,a;for(s=n.split(RegExp(""+e.NULL+e.LF+"*")),a=[],r=0,o=s.length;r<o;r++)i=s[r],(null!=i?i.length:void 0)>0&&a.push(t(i));return a}()},n.marshall=function(t,i,r){var o;return o=new n(t,i,r),o.toString()+e.NULL},n}(),n=function(){var t;function n(e){this.ws=e,this.ws.binaryType="arraybuffer",this.counter=0,this.connected=!1,this.heartbeat={outgoing:1e4,incoming:1e4},this.maxWebSocketFrameSize=16384,this.subscriptions={}}return n.prototype.debug=function(e){var t;return"undefined"!==typeof window&&null!==window&&null!=(t=window.console)?t.log(e):void 0},t=function(){return Date.now?Date.now():(new Date).valueOf},n.prototype._transmit=function(e,t,n){var r;r=i.marshall(e,t,n),"function"===typeof this.debug&&this.debug(">>> "+r);while(1){if(!(r.length>this.maxWebSocketFrameSize))return this.ws.send(r);this.ws.send(r.substring(0,this.maxWebSocketFrameSize)),r=r.substring(this.maxWebSocketFrameSize),"function"===typeof this.debug&&this.debug("remaining = "+r.length)}},n.prototype._setupHeartbeat=function(n){var i,o,s,a,c,u;if((c=n.version)===r.VERSIONS.V1_1||c===r.VERSIONS.V1_2)return u=function(){var e,t,i,r;for(i=n["heart-beat"].split(","),r=[],e=0,t=i.length;e<t;e++)a=i[e],r.push(parseInt(a));return r}(),o=u[0],i=u[1],0!==this.heartbeat.outgoing&&0!==i&&(s=Math.max(this.heartbeat.outgoing,i),"function"===typeof this.debug&&this.debug("send PING every "+s+"ms"),this.pinger=r.setInterval(s,function(t){return function(){return t.ws.send(e.LF),"function"===typeof t.debug?t.debug(">>> PING"):void 0}}(this))),0!==this.heartbeat.incoming&&0!==o?(s=Math.max(this.heartbeat.incoming,o),"function"===typeof this.debug&&this.debug("check PONG every "+s+"ms"),this.ponger=r.setInterval(s,function(e){return function(){var n;if(n=t()-e.serverActivity,n>2*s)return"function"===typeof e.debug&&e.debug("did not receive server activity for the last "+n+"ms"),e.ws.close()}}(this))):void 0},n.prototype._parseConnect=function(){var e,t,n,i;switch(e=1<=arguments.length?s.call(arguments,0):[],i={},e.length){case 2:i=e[0],t=e[1];break;case 3:e[1]instanceof Function?(i=e[0],t=e[1],n=e[2]):(i.login=e[0],i.passcode=e[1],t=e[2]);break;case 4:i.login=e[0],i.passcode=e[1],t=e[2],n=e[3];break;default:i.login=e[0],i.passcode=e[1],t=e[2],n=e[3],i.host=e[4]}return[i,t,n]},n.prototype.connect=function(){var n,o,a,c;return n=1<=arguments.length?s.call(arguments,0):[],c=this._parseConnect.apply(this,n),a=c[0],this.connectCallback=c[1],o=c[2],"function"===typeof this.debug&&this.debug("Opening Web Socket..."),this.ws.onmessage=function(n){return function(r){var s,a,c,u,l,f,d,h,p,v,m,b;if(u="undefined"!==typeof ArrayBuffer&&r.data instanceof ArrayBuffer?(s=new Uint8Array(r.data),"function"===typeof n.debug&&n.debug("--- got data length: "+s.length),function(){var e,t,n;for(n=[],e=0,t=s.length;e<t;e++)a=s[e],n.push(String.fromCharCode(a));return n}().join("")):r.data,n.serverActivity=t(),u!==e.LF){for("function"===typeof n.debug&&n.debug("<<< "+u),m=i.unmarshall(u),b=[],p=0,v=m.length;p<v;p++)switch(l=m[p],l.command){case"CONNECTED":"function"===typeof n.debug&&n.debug("connected to server "+l.headers.server),n.connected=!0,n._setupHeartbeat(l.headers),b.push("function"===typeof n.connectCallback?n.connectCallback(l):void 0);break;case"MESSAGE":h=l.headers.subscription,d=n.subscriptions[h]||n.onreceive,d?(c=n,f=l.headers["message-id"],l.ack=function(e){return null==e&&(e={}),c.ack(f,h,e)},l.nack=function(e){return null==e&&(e={}),c.nack(f,h,e)},b.push(d(l))):b.push("function"===typeof n.debug?n.debug("Unhandled received MESSAGE: "+l):void 0);break;case"RECEIPT":b.push("function"===typeof n.onreceipt?n.onreceipt(l):void 0);break;case"ERROR":b.push("function"===typeof o?o(l):void 0);break;default:b.push("function"===typeof n.debug?n.debug("Unhandled frame: "+l):void 0)}return b}"function"===typeof n.debug&&n.debug("<<< PONG")}}(this),this.ws.onclose=function(e){return function(){var t;return t="Whoops! Lost connection to "+e.ws.url,"function"===typeof e.debug&&e.debug(t),e._cleanUp(),"function"===typeof o?o(t):void 0}}(this),this.ws.onopen=function(e){return function(){return"function"===typeof e.debug&&e.debug("Web Socket Opened..."),a["accept-version"]=r.VERSIONS.supportedVersions(),a["heart-beat"]=[e.heartbeat.outgoing,e.heartbeat.incoming].join(","),e._transmit("CONNECT",a)}}(this)},n.prototype.disconnect=function(e,t){return null==t&&(t={}),this._transmit("DISCONNECT",t),this.ws.onclose=null,this.ws.close(),this._cleanUp(),"function"===typeof e?e():void 0},n.prototype._cleanUp=function(){if(this.connected=!1,this.pinger&&r.clearInterval(this.pinger),this.ponger)return r.clearInterval(this.ponger)},n.prototype.send=function(e,t,n){return null==t&&(t={}),null==n&&(n=""),t.destination=e,this._transmit("SEND",t,n)},n.prototype.subscribe=function(e,t,n){var i;return null==n&&(n={}),n.id||(n.id="sub-"+this.counter++),n.destination=e,this.subscriptions[n.id]=t,this._transmit("SUBSCRIBE",n),i=this,{id:n.id,unsubscribe:function(){return i.unsubscribe(n.id)}}},n.prototype.unsubscribe=function(e){return delete this.subscriptions[e],this._transmit("UNSUBSCRIBE",{id:e})},n.prototype.begin=function(e){var t,n;return n=e||"tx-"+this.counter++,this._transmit("BEGIN",{transaction:n}),t=this,{id:n,commit:function(){return t.commit(n)},abort:function(){return t.abort(n)}}},n.prototype.commit=function(e){return this._transmit("COMMIT",{transaction:e})},n.prototype.abort=function(e){return this._transmit("ABORT",{transaction:e})},n.prototype.ack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("ACK",n)},n.prototype.nack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("NACK",n)},n}(),r={VERSIONS:{V1_0:"1.0",V1_1:"1.1",V1_2:"1.2",supportedVersions:function(){return"1.1,1.0"}},client:function(e,t){var i,o;return null==t&&(t=["v10.stomp","v11.stomp"]),i=r.WebSocketClass||WebSocket,o=new i(e,t),new n(o)},over:function(e){return new n(e)},Frame:i},null!==t&&(t.Stomp=r),"undefined"!==typeof window&&null!==window?(r.setInterval=function(e,t){return window.setInterval(t,e)},r.clearInterval=function(e){return window.clearInterval(e)},window.Stomp=r):t||(self.Stomp=r)}.call(this)},"523b":function(e,t,n){var i=n("53525");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=n("4f06").default;r("4c0784bc",i,!0,{sourceMap:!1,shadowMode:!1})},53525:function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'uni-page-body[data-v-e8398964]{color:#707070;background-color:#fff}body.?%PAGE?%[data-v-e8398964]{background-color:#fff}.main-box[data-v-e8398964]{position:relative\r\n\t/* height: 100%; */}.video-box[data-v-e8398964]{height:%?420?%;position:relative}[data-v-e8398964] uni-video{width:100%;height:100%}.content-box[data-v-e8398964]{padding:0 %?30?% %?30?% %?30?%}.course-score[data-v-e8398964]{width:40%;margin-top:%?45?%;margin-bottom:%?55?%;white-space:nowrap}.info-item[data-v-e8398964]{font-size:%?26?%;font-family:Source Han Sans CN;font-weight:500}.f-time[data-v-e8398964]{margin-top:%?30?%}.course-info .icon[data-v-e8398964]{margin-right:%?10?%}.course-info[data-v-e8398964]{font-size:%?28?%;font-family:Source Han Sans CN;font-weight:500;color:#745739;line-height:%?53?%;padding:%?35?% 0}.course-title[data-v-e8398964]{font-size:%?40?%;font-family:Source Han Sans CN;font-weight:600;color:#212121;line-height:%?48?%}.tab-list[data-v-e8398964]{padding:%?35?% 0;font-size:%?30?%;font-family:Source Han Sans CN;font-weight:500;color:#707070}.line[data-v-e8398964]{width:100%;height:%?10?%;background-color:#f2f4fd}.rate-btn[data-v-e8398964]{width:%?140?%;height:%?60?%;background:#ffeddf;border-radius:%?10?%;font-size:%?26?%;font-family:Source Han Sans CN;font-weight:500;color:#c97625}.tab-item[data-v-e8398964]{position:relative}.tab-select[data-v-e8398964]{font-size:%?30?%;font-family:Source Han Sans CN;font-weight:600;color:#212121}.tab-select[data-v-e8398964]::after{position:absolute;content:"";top:%?50?%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:%?30?%;height:%?6?%;background:#c63520}.dec-title[data-v-e8398964]{font-size:%?32?%;font-family:PingFang SC;font-weight:700;color:#1a1a1a;line-height:%?50?%}.course-dec[data-v-e8398964]{margin-top:%?60?%;margin-bottom:%?110?%}.dec-content[data-v-e8398964]{margin-top:%?45?%;font-size:%?28?%;font-family:PingFang SC;font-weight:500;color:#333;line-height:%?50?%}\r\n\r\n/* 课程章节 */.chapter-item[data-v-e8398964]{height:%?120?%;background:#f5f6fa;border-radius:%?10?%;margin-bottom:%?35?%;padding:0 %?25?%;position:relative;font-size:%?30?%}.chapter-box[data-v-e8398964]{margin-top:%?25?%}.chapter-box .icon[data-v-e8398964]{margin-right:%?25?%}.chapter-status[data-v-e8398964]{position:absolute;contain:"";top:%?15?%;right:%?15?%;background-color:#ffeddf;border-radius:%?6?%;padding:%?8?% %?13?%;font-size:%?22?%;font-family:Source Han Sans CN;font-weight:500;color:#c97625;line-height:%?30?%}.chapter-name[data-v-e8398964]{flex:0;white-space:nowrap;font-weight:600}.exam-btn[data-v-e8398964]{width:%?140?%;height:%?60?%;background:#ffa664;border-radius:%?30?%;font-size:%?28?%;font-family:Source Han Sans CN;font-weight:500;color:#fff;line-height:%?30?%;padding:%?17?% %?40?%;margin-right:unset}\r\n\r\n/* 评论区 */.comment-box[data-v-e8398964]{margin-top:%?25?%;margin-bottom:%?120?%}.comment-main-box[data-v-e8398964]{font-size:%?30?%;font-weight:500}.headimg[data-v-e8398964]{width:%?62?%;height:%?62?%;border-radius:50%;flex-shrink:0}.people-info[data-v-e8398964]{margin-left:%?25?%;font-size:%?24?%;font-family:PingFang SC;color:#1a1a1a;line-height:%?52?%}.nickname[data-v-e8398964]{font-weight:700;flex:0;white-space:nowrap}.comment-time[data-v-e8398964]{color:#999;margin-left:%?50?%}.comment-content[data-v-e8398964]{margin-top:%?30?%;font-size:%?30?%}.zan-box[data-v-e8398964]{margin-top:%?40?%}.send-comment-box[data-v-e8398964]{position:absolute;bottom:0;left:0;height:%?120?%;background:#fff;box-shadow:0 %?5?% %?29?% %?3?% hsla(0,0%,56.5%,.21);padding:0 %?40?%}.input-comment[data-v-e8398964]{width:%?480?%;height:%?70?%;background-color:#f7f7f7;border-radius:%?35?%;padding:0 %?20?%}.send-comment-btn[data-v-e8398964]{width:%?160?%;height:%?70?%;background:#c63520;border-radius:%?35?%;font-size:%?30?%;font-family:Source Han Sans CN;font-weight:600;color:#fff;line-height:%?30?%;padding:%?20?% %?50?%;margin-left:%?30?%;white-space:nowrap}\r\n\r\n/* 附件列表 */.file-box[data-v-e8398964]{margin-top:%?25?%;font-size:%?30?%}.file-item[data-v-e8398964]{background-color:#f5f6fa;border-radius:%?10?%;padding-left:%?35?%;margin-bottom:%?24?%;padding:%?20?% %?35?%}.file-title[data-v-e8398964]{font-size:%?30?%;font-family:Source Han Sans CN;font-weight:500;color:#333;line-height:%?48?%;margin-left:%?35?%;flex:0;white-space:nowrap}.zan-box .icon[data-v-e8398964]{margin-left:%?10?%}.rate-box[data-v-e8398964]{width:70vw;height:%?300?%;background-color:#fff}.rate-input[data-v-e8398964]{padding:%?10?% %?20?%;border-radius:10px;margin-bottom:%?50?%}',""]),e.exports=t},"564c":function(e,t,n){"use strict";n.r(t);var i=n("023a"),r=n("a5b0");for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("5ab4");var s=n("f0c5"),a=Object(s["a"])(r["default"],i["b"],i["c"],!1,null,"e8398964",null,!1,i["a"],void 0);t["default"]=a.exports},"5ab4":function(e,t,n){"use strict";var i=n("523b"),r=n.n(i);r.a},"99ee":function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("53ca"));n("e9c4");var o=i(n("374a")),s=n("4039"),a=null,c="游客~~";function u(e){console.log(e)}function l(e){a.subscribe("/topic/public",f),a.send("/app/chat.sendMessage",{},JSON.stringify({sender:c,type:"JOIN"}))}function f(e){JSON.parse(e.body)}var d={connect:function(e){e&&(c=e);var t=new o.default("http://221.10.90.184:8183/ws");a=s.Stomp.over(t),a.heartbeat.incoming=0,a.connect({},l,u)},closeConnect:function(e){console.log(">>>socket连接关闭"),a.disconnect((function(){e&&e()}))},onConnected:l,sendMessage:function(e){if(e&&a){var t={sender:c,content:"",type:"CHAT"};"object"==(0,r.default)(e)&&(t=Object.assign(t,e)),console.log(">>>发送消息:JSON.stringify(chatMessage)"),a.send("/app/chat.sendMessage",{},JSON.stringify(t)),e=""}},onMessageReceived:f};t.default=d},a491:function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("d3b7"),n("159b"),n("b64b"),n("e25e");var r,o=i(n("ade3")),s=i(n("c7eb")),a=i(n("1da1")),c=i(n("67bd")),u=i(n("bc54")),l=(r={getBannerList:function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.bannerPage,e,t);case 3:case"end":return n.stop()}}),n)})))()},getKnowledgeList:function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.knowledgePage,e,t);case 3:case"end":return n.stop()}}),n)})))()}},(0,o.default)(r,"getKnowledgeList",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.knowledgePage,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getKnowledgeDetail",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.knowledgeDetail,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getKnowledgeDownload",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.getKnowledgeDownload,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getNewsList",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.newsPage,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getNewsDetail",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.newsDetail,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getMessageList",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.newsPage,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getMessageDetail",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.newsDetail,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getCourseList",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.coursePage,e,(function(e){200==e.code?(e.data&&e.data.records&&Object.keys(e.data.records).forEach((function(t){e.data.records[t].credit&&(e.data.records[t].credit=parseInt(e.data.records[t].credit))})),t(e)):console.error("请求出错")}));case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getCourseDetail",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.courseDetail,e,(function(e){200==e.code&&(e.data&&e.data.credit&&(e.data.credit=parseInt(e.data.credit)),e.data.score&&e.data.score<0&&(e.data.score=4)),t(e)}));case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getChapter",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.chapterPage,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getAwar",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.awarList,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getCourseComment",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.commentPage,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"addComment",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.addComment,e,t,"POST");case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"commentZan",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.commentZan,e,t,"POST");case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getExam",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.getExam,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getAnswer",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.getAnswerPage,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"addPaper",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.addPaper,e,t,"POST");case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"addStudyTime",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.addStudyTime,e,t,"POST");case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"getAnalysis",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.getAnalysis,e,t);case 3:case"end":return n.stop()}}),n)})))()})),(0,o.default)(r,"courseRate",(function(e,t){return(0,a.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return null==e&&(e={}),n.next=3,c.default.request(u.default.service.courseRate,e,t,"POST");case 3:case"end":return n.stop()}}),n)})))()})),r);t.default=l},a5b0:function(e,t,n){"use strict";n.r(t);var i=n("15b9"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a}}]);