4 lines
61 KiB
JavaScript
4 lines
61 KiB
JavaScript
|
// [AIV_SHORT] Build version: 1.0.17 - Tuesday, June 16th, 2020, 1:45:48 PM
|
||
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GoEasy=e():t.GoEasy=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(){if(g()&&uni.overrideShowHideAlready!==!0&&"undefined"!=typeof getApp().$options){uni.overrideShowHideAlready=!0;var t=getApp().$options,e=t.onShow[0],n=t.onHide[0];t.onShow[0]=function(){getApp().uniAppRunningBackend=!1,e.call(getApp())},t.onHide[0]=function(){getApp().uniAppRunningBackend=!0,n.call(getApp())}}}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=n(1),s=n(35),c=[],a=!1,u=function(t){if(a){var e=(new Date).formatDate("yy-MM-dd hh:mm:ss.S");c.push(e+" "+t+"\n")}},p=function(){this.currentNumber=this.initialCurrentNumber()};p.prototype={maxNumber:parseInt("10"),number:function(){return this.currentNumber},initialCurrentNumber:function(){var t=this;return k()?t.currentNumber=parseInt(f("goeasyNode")):t.currentNumber||(t.currentNumber=m(1,parseInt("10"))),t.currentNumber>0&&t.currentNumber<this.maxNumber?t.currentNumber=t.currentNumber+1:t.currentNumber==this.maxNumber?t.currentNumber=1:t.currentNumber=Math.floor(Math.random()*this.maxNumber+1),k()&&l("goeasyNode",t.currentNumber),t.currentNumber}};var h=function(t){var e,n=new RegExp("(^| )"+t+"=([^;]*)(;|$)");return(e=document.cookie.match(n))?unescape(e[2]):null},f=function(t){return window.localStorage?window.localStorage.getItem(t):h(t)},d=function(t,e){var n=30,o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),document.cookie=t+"="+escape(e)+";expires="+o.toGMTString()},l=function(t,e){window.localStorage?window.localStorage.setItem(t,e):d(t,e)},y=function(){Array.apply(this)},m=function(t,e){return Math.floor(Math.random()*(t-e)+e)},b=function(){return!("undefined"==typeof wx||!wx.getLocation)&&("function"!=typeof WebSocket||"function"!=typeof XMLHttpRequest)},g=function(){return!("object"!==("undefined"==typeof uni?"undefined":i(uni))||!uni.getSystemInfo)},v=function(){return!("object"!==("undefined"==typeof tt?"undefined":i(tt))||!tt.getSystemInfo)},k=function(){return g()?"function"==typeof WebSocket&&"function"==typeof XMLHttpRequest:!(S()||b()||v())},S=function(){return"undefined"!=typeof navigator&&"ReactNative"==navigator.product},w=new p,x=function(t){if(u("GoEasy() Create GoEasy object:"+JSON.stringify(t)),this._isEmpty(t.appkey))return void("undefined"!=typeof t.onConnectFailed&&t.onConnectFailed({code:400,content:"appkey is required"}));if(this._copyConfig(t),"undefined"==typeof t.host)return void t.onConnectFailed({code:400,content:"host is required"});var e="://"+w.number()+t.host,n="";k()?(n=t.forceTLS===!1?"http"+e+":80":"https"+e+":443",this.socket=r.connect(n,{transports:["polling","websocket"],timeout:1500})):(n="https://wx-"+t.host+":443",this.socket=r(n,{transports:["websocket"],reconnectionDelayMax:3e3})),this._callbackEvents(t)};x.goEasyDomainNumber=w,"undefined"!=typeof window&&(window._GoEasy_=x),Date.prototype.formatDate=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in e)e.hasOwnProperty(n)&&new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t},y.prototype=new Array,y.prototype.indexOfGuid=function(t){for(var e=0;e<this.length;e++)if(this[e]==t)return e;return-1},y.prototype.unshiftGuid=function(t){var e=!1,n=this.indexOfGuid(t);for(n>-1&&(e=!0,this.splice(n,1)),this.unshift(t);this.length>300;)this.pop();r
|
||
|
perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative});return o},o.prototype.open=function(){var t;if(this.rememberUpgrade&&o.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},o.prototype.setTransport=function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},o.prototype.probe=function(t){function e(){if(h.onlyBinaryUpgrades){var t=!this.supportsBinary&&h.transport.supportsBinary;p=p||t}p||(u.send([{type:"ping",data:"probe"}]),u.once("packet",function(t){if(!p)if("pong"===t.type&&"probe"===t.data){if(h.upgrading=!0,h.emit("upgrading",u),!u)return;o.priorWebsocketSuccess="websocket"===u.name,h.transport.pause(function(){p||"closed"!==h.readyState&&(a(),h.setTransport(u),u.send([{type:"upgrade"}]),h.emit("upgrade",u),u=null,h.upgrading=!1,h.flush())})}else{var e=new Error("probe error");e.transport=u.name,h.emit("upgradeError",e)}}))}function n(){p||(p=!0,a(),u.close(),u=null)}function i(t){var e=new Error("probe error: "+t);e.transport=u.name,n(),h.emit("upgradeError",e)}function r(){i("transport closed")}function s(){i("socket closed")}function c(t){u&&t.name!==u.name&&n()}function a(){u.removeListener("open",e),u.removeListener("error",i),u.removeListener("close",r),h.removeListener("close",s),h.removeListener("upgrading",c)}var u=this.createTransport(t,{probe:1}),p=!1,h=this;o.priorWebsocketSuccess=!1,u.once("open",e),u.once("error",i),u.once("close",r),this.once("close",s),this.once("upgrading",c),u.open()},o.prototype.onOpen=function(){if(this.readyState="open",o.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])},o.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}},o.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},o.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},o.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},o.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},o.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},o.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(this.transport.send(this.writeBuffer),this.pre
|
||
|
var h,f,d,l=String.fromCharCode;t.exports={version:"2.1.2",encode:c,decode:p}},function(t,e){function n(t){return t.map(function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var n=new Uint8Array(t.byteLength);n.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=n.buffer}return e}return t})}function o(t,e){e=e||{};var o=new r;return n(t).forEach(function(t){o.append(t)}),e.type?o.getBlob(e.type):o.getBlob()}function i(t,e){return new Blob(n(t),e||{})}var r="undefined"!=typeof r?r:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(t){return!1}}(),c=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(t){return!1}}(),a=r&&r.prototype.append&&r.prototype.getBlob;"undefined"!=typeof Blob&&(o.prototype=Blob.prototype,i.prototype=Blob.prototype),t.exports=function(){return s?c?Blob:i:a?o:void 0}()},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),o=0,i=n.length;o<i;o++){var r=n[o].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){"use strict";function n(t){var e="";do e=s[t%c]+e,t=Math.floor(t/c);while(t>0);return e}function o(t){var e=0;for(p=0;p<t.length;p++)e=e*c+a[t.charAt(p)];return e}function i(){var t=n(+new Date);return t!==r?(u=0,r=t):t+"."+n(u++)}for(var r,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),c=64,a={},u=0,p=0;p<c;p++)a[s[p]]=p;i.encode=n,i.decode=o,t.exports=i},function(t,e,n){"use strict";var o=n(26);t.exports=function(t){var e=t.xdomain,n=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||o))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(t){}if(!e)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){"use strict";function o(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),("undefined"==typeof uni&&"undefined"==typeof wx||"undefined"!=typeof WebSocket)&&(this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=i&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(f=r)),c.call(this,t)}var i,r,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=n(14),a=n(15),u=n(22),p=n(23),h=n(24);n(4)("engine.io-client:websocket");if("undefined"==typeof uni&&"undefined"==typeof wx||"undefined"!=typeof WebSocket)if("undefined"!=typeof WebSocket)i=WebSocket;else if("undefined"!=typeof self)i=self.WebSocket||self.MozWebSocket;else try{r=n(28)}catch(t){}var f=i||r;"undefined"==typeof uni&&"undefined"==typeof wx||"undefined"!=typeof WebSocket||(f=function(t){var e=this;if(e.onopen=function(){},e.onclose=function(){},e.onmessage=function(t){},e.onerror=function(t){},"object"===("undefined"==typeof tt?"undefined":s(tt))&&tt.getSystemInfo){var n=tt.connectSocket({url:t});e.send=function(t){n.send({data:t})},e.close=function(){n.close()},n.onOpen(function(){e.onopen()}),n.onError(function(t){e.onerror(t)}),n.onMessage(function(t){e.onmessage(t)}),n.onClose(function(){e.onclose()})}else"undefined"!=typeof uni?(e.send=function(t){uni.sendSocketMessage({data:t})},e.close=function(){uni.closeSocket()},uni.onSocketOpen(function(t){e.onopen()}),uni.onSocketError(function(t){e.onerror(t)}),uni.onSocketMessage(function(t){e.onmessage(t)}),uni.onSocketClose(function(t){e.onclose()}),uni.connect
|