| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207 |
- /* sockjs-client v1.6.1 | http://sockjs.org | MIT license */
- !(function (e) {
- if ('object' == typeof exports && 'undefined' != typeof module) module.exports = e()
- else if ('function' == typeof define && define.amd) define([], e)
- else {
- ;('undefined' != typeof window
- ? window
- : 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : this
- ).SockJS = e()
- }
- })(function () {
- return (function i(s, a, l) {
- function u(t, e) {
- if (!a[t]) {
- if (!s[t]) {
- var n = 'function' == typeof require && require
- if (!e && n) return n(t, !0)
- if (c) return c(t, !0)
- var r = new Error("Cannot find module '" + t + "'")
- throw ((r.code = 'MODULE_NOT_FOUND'), r)
- }
- var o = (a[t] = { exports: {} })
- s[t][0].call(
- o.exports,
- function (e) {
- return u(s[t][1][e] || e)
- },
- o,
- o.exports,
- i,
- s,
- a,
- l
- )
- }
- return a[t].exports
- }
- for (var c = 'function' == typeof require && require, e = 0; e < l.length; e++)
- u(l[e])
- return u
- })(
- {
- 1: [
- function (n, r, e) {
- ;(function (t) {
- ;(function () {
- var e = n('./transport-list')
- ;(r.exports = n('./main')(e)),
- '_sockjs_onload' in t && setTimeout(t._sockjs_onload, 1)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- { './main': 14, './transport-list': 16 }
- ],
- 2: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./event')
- function i() {
- o.call(this),
- this.initEvent('close', !1, !1),
- (this.wasClean = !1),
- (this.code = 0),
- (this.reason = '')
- }
- r(i, o), (t.exports = i)
- },
- { './event': 4, inherits: 54 }
- ],
- 3: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./eventtarget')
- function i() {
- o.call(this)
- }
- r(i, o),
- (i.prototype.removeAllListeners = function (e) {
- e ? delete this._listeners[e] : (this._listeners = {})
- }),
- (i.prototype.once = function (t, n) {
- var r = this,
- o = !1
- this.on(t, function e() {
- r.removeListener(t, e), o || ((o = !0), n.apply(this, arguments))
- })
- }),
- (i.prototype.emit = function () {
- var e = arguments[0],
- t = this._listeners[e]
- if (t) {
- for (var n = arguments.length, r = new Array(n - 1), o = 1; o < n; o++)
- r[o - 1] = arguments[o]
- for (var i = 0; i < t.length; i++) t[i].apply(this, r)
- }
- }),
- (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) {
- function r(e) {
- this.type = e
- }
- ;(r.prototype.initEvent = function (e, t, n) {
- return (
- (this.type = e),
- (this.bubbles = t),
- (this.cancelable = n),
- (this.timeStamp = +new Date()),
- this
- )
- }),
- (r.prototype.stopPropagation = function () {}),
- (r.prototype.preventDefault = function () {}),
- (r.CAPTURING_PHASE = 1),
- (r.AT_TARGET = 2),
- (r.BUBBLING_PHASE = 3),
- (t.exports = r)
- },
- {}
- ],
- 5: [
- function (e, t, n) {
- function r() {
- this._listeners = {}
- }
- ;(r.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)
- }),
- (r.prototype.removeEventListener = function (e, t) {
- var n = this._listeners[e]
- if (n) {
- var r = n.indexOf(t)
- ;-1 === r ||
- (1 < n.length
- ? (this._listeners[e] = n.slice(0, r).concat(n.slice(r + 1)))
- : delete this._listeners[e])
- }
- }),
- (r.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 r = this._listeners[t], o = 0; o < r.length; o++)
- r[o].apply(this, n)
- }),
- (t.exports = r)
- },
- {}
- ],
- 6: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./event')
- function i(e) {
- o.call(this), this.initEvent('message', !1, !1), (this.data = e)
- }
- r(i, o), (t.exports = i)
- },
- { './event': 4, inherits: 54 }
- ],
- 7: [
- function (e, t, n) {
- var r = e('./utils/iframe')
- function o(e) {
- ;(this._transport = e).on('message', this._transportMessage.bind(this)),
- e.on('close', this._transportClose.bind(this))
- }
- ;(o.prototype._transportClose = function (e, t) {
- r.postMessage('c', JSON.stringify([e, t]))
- }),
- (o.prototype._transportMessage = function (e) {
- r.postMessage('t', e)
- }),
- (o.prototype._send = function (e) {
- this._transport.send(e)
- }),
- (o.prototype._close = function () {
- this._transport.close(), this._transport.removeAllListeners()
- }),
- (t.exports = o)
- },
- { './utils/iframe': 47 }
- ],
- 8: [
- function (e, t, n) {
- var f = e('./utils/url'),
- r = e('./utils/event'),
- h = e('./facade'),
- o = e('./info-iframe-receiver'),
- d = e('./utils/iframe'),
- p = e('./location'),
- m = function () {}
- t.exports = function (l, e) {
- var u,
- c = {}
- e.forEach(function (e) {
- e.facadeTransport &&
- (c[e.facadeTransport.transportName] = e.facadeTransport)
- }),
- (c[o.transportName] = o),
- (l.bootstrap_iframe = function () {
- var a
- d.currentWindowId = p.hash.slice(1)
- r.attachEvent('message', function (t) {
- if (
- t.source === parent &&
- (void 0 === u && (u = t.origin), t.origin === u)
- ) {
- var n
- try {
- n = JSON.parse(t.data)
- } catch (e) {
- return void m('bad json', t.data)
- }
- if (n.windowId === d.currentWindowId)
- switch (n.type) {
- case 's':
- var e
- try {
- e = JSON.parse(n.data)
- } catch (e) {
- m('bad json', n.data)
- break
- }
- var r = e[0],
- o = e[1],
- i = e[2],
- s = e[3]
- if ((m(r, o, i, s), r !== l.version))
- throw new Error(
- 'Incompatible SockJS! Main site uses: "' +
- r +
- '", the iframe: "' +
- l.version +
- '".'
- )
- if (!f.isOriginEqual(i, p.href) || !f.isOriginEqual(s, p.href))
- throw new Error(
- "Can't connect to different domain from within an iframe. (" +
- p.href +
- ', ' +
- i +
- ', ' +
- s +
- ')'
- )
- a = new h(new c[o](i, s))
- break
- case 'm':
- a._send(n.data)
- break
- case 'c':
- a && a._close(), (a = null)
- }
- }
- }),
- d.postMessage('s')
- })
- }
- },
- {
- './facade': 7,
- './info-iframe-receiver': 10,
- './location': 13,
- './utils/event': 46,
- './utils/iframe': 47,
- './utils/url': 52,
- debug: void 0
- }
- ],
- 9: [
- function (e, t, n) {
- var r = e('events').EventEmitter,
- o = e('inherits'),
- s = e('./utils/object'),
- a = function () {}
- function i(e, t) {
- r.call(this)
- var o = this,
- i = +new Date()
- ;(this.xo = new t('GET', e)),
- this.xo.once('finish', function (e, t) {
- var n, r
- if (200 === e) {
- if (((r = +new Date() - i), t))
- try {
- n = JSON.parse(t)
- } catch (e) {
- a('bad json', t)
- }
- s.isObject(n) || (n = {})
- }
- o.emit('finish', n, r), o.removeAllListeners()
- })
- }
- 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 }
- ],
- 10: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('events').EventEmitter,
- i = e('./transport/sender/xhr-local'),
- s = e('./info-ajax')
- function a(e) {
- var n = this
- o.call(this),
- (this.ir = new s(e, i)),
- this.ir.once('finish', function (e, t) {
- ;(n.ir = null), n.emit('message', JSON.stringify([e, t]))
- })
- }
- r(a, o),
- (a.transportName = 'iframe-info-receiver'),
- (a.prototype.close = function () {
- this.ir && (this.ir.close(), (this.ir = null)), this.removeAllListeners()
- }),
- (t.exports = a)
- },
- { './info-ajax': 9, './transport/sender/xhr-local': 37, events: 3, inherits: 54 }
- ],
- 11: [
- function (n, o, e) {
- ;(function (u) {
- ;(function () {
- var r = n('events').EventEmitter,
- e = n('inherits'),
- i = n('./utils/event'),
- s = n('./transport/iframe'),
- a = n('./info-iframe-receiver'),
- l = function () {}
- function t(t, n) {
- var o = this
- r.call(this)
- function e() {
- var e = (o.ifr = new s(a.transportName, n, t))
- e.once('message', function (t) {
- if (t) {
- var e
- try {
- e = JSON.parse(t)
- } catch (e) {
- return l('bad json', t), o.emit('finish'), void o.close()
- }
- var n = e[0],
- r = e[1]
- o.emit('finish', n, r)
- }
- o.close()
- }),
- e.once('close', function () {
- o.emit('finish'), o.close()
- })
- }
- u.document.body ? e() : i.attachEvent('load', e)
- }
- e(t, r),
- (t.enabled = function () {
- return s.enabled()
- }),
- (t.prototype.close = function () {
- this.ifr && this.ifr.close(),
- this.removeAllListeners(),
- (this.ifr = null)
- }),
- (o.exports = t)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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
- }
- ],
- 12: [
- function (e, t, n) {
- var r = e('events').EventEmitter,
- o = e('inherits'),
- i = e('./utils/url'),
- s = e('./transport/sender/xdr'),
- a = e('./transport/sender/xhr-cors'),
- l = e('./transport/sender/xhr-local'),
- u = e('./transport/sender/xhr-fake'),
- c = e('./info-iframe'),
- f = e('./info-ajax'),
- h = function () {}
- function d(e, t) {
- h(e)
- var n = this
- r.call(this),
- setTimeout(function () {
- n.doXhr(e, t)
- }, 0)
- }
- o(d, r),
- (d._getReceiver = function (e, t, n) {
- return n.sameOrigin
- ? new f(t, l)
- : a.enabled
- ? new f(t, a)
- : s.enabled && n.sameScheme
- ? new f(t, s)
- : c.enabled()
- ? new c(e, t)
- : new f(t, u)
- }),
- (d.prototype.doXhr = function (e, t) {
- var n = this,
- r = i.addPath(e, '/info')
- h('doXhr', r),
- (this.xo = d._getReceiver(e, r, t)),
- (this.timeoutRef = setTimeout(function () {
- h('timeout'), n._cleanup(!1), n.emit('finish')
- }, d.timeout)),
- this.xo.once('finish', function (e, t) {
- h('finish', e, t), n._cleanup(!0), n.emit('finish', e, t)
- })
- }),
- (d.prototype._cleanup = function (e) {
- h('_cleanup'),
- clearTimeout(this.timeoutRef),
- (this.timeoutRef = null),
- !e && this.xo && this.xo.close(),
- (this.xo = null)
- }),
- (d.prototype.close = function () {
- h('close'), this.removeAllListeners(), this._cleanup(!1)
- }),
- (d.timeout = 8e3),
- (t.exports = d)
- },
- {
- './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) {
- ;(function () {
- t.exports = e.location || {
- origin: 'http://localhost:80',
- protocol: 'http:',
- host: 'localhost',
- port: 80,
- href: 'http://localhost/',
- hash: ''
- }
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- {}
- ],
- 14: [
- function (x, _, e) {
- ;(function (w) {
- ;(function () {
- x('./shims')
- var r,
- l = x('url-parse'),
- e = x('inherits'),
- u = x('./utils/random'),
- t = x('./utils/escape'),
- c = x('./utils/url'),
- i = x('./utils/event'),
- n = x('./utils/transport'),
- o = x('./utils/object'),
- f = x('./utils/browser'),
- h = x('./utils/log'),
- s = x('./event/event'),
- d = x('./event/eventtarget'),
- p = x('./location'),
- a = x('./event/close'),
- m = x('./event/trans-message'),
- v = x('./info-receiver'),
- b = function () {}
- function y(e, t, n) {
- if (!(this instanceof y)) return new y(e, t, n)
- if (arguments.length < 1)
- throw new TypeError(
- "Failed to construct 'SockJS: 1 argument required, but only 0 present"
- )
- d.call(this),
- (this.readyState = y.CONNECTING),
- (this.extensions = ''),
- (this.protocol = ''),
- (n = n || {}).protocols_whitelist &&
- h.warn(
- "'protocols_whitelist' is DEPRECATED. Use 'transports' instead."
- ),
- (this._transportsWhitelist = n.transports),
- (this._transportOptions = n.transportOptions || {}),
- (this._timeout = n.timeout || 0)
- 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 l(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 i = 'https:' === o.protocol
- if ('https:' === p.protocol && !i && !c.isLoopbackAddr(o.hostname))
- 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 s = t.sort()
- s.forEach(function (e, t) {
- if (!e)
- throw new SyntaxError("The protocols entry '" + e + "' is invalid.")
- if (t < s.length - 1 && e === s[t + 1])
- throw new SyntaxError(
- "The protocols entry '" + e + "' is duplicated."
- )
- })
- var a = c.getOrigin(p.href)
- ;(this._origin = a ? a.toLowerCase() : null),
- o.set('pathname', o.pathname.replace(/\/+$/, '')),
- (this.url = o.href),
- b('using url', this.url),
- (this._urlInfo = {
- nullOrigin: !f.hasDomain(),
- sameOrigin: c.isOriginEqual(this.url, p.href),
- sameScheme: c.isSchemeEqual(this.url, p.href)
- }),
- (this._ir = new v(this.url, this._urlInfo)),
- this._ir.once('finish', this._receiveInfo.bind(this))
- }
- function g(e) {
- return 1e3 === e || (3e3 <= e && e <= 4999)
- }
- e(y, d),
- (y.prototype.close = function (e, t) {
- if (e && !g(e)) throw new Error('InvalidAccessError: Invalid code')
- if (t && 123 < t.length)
- throw new SyntaxError('reason argument has an invalid length')
- if (this.readyState !== y.CLOSING && this.readyState !== y.CLOSED) {
- this._close(e || 1e3, t || 'Normal closure', !0)
- }
- }),
- (y.prototype.send = function (e) {
- if (
- ('string' != typeof e && (e = '' + e),
- this.readyState === y.CONNECTING)
- )
- throw new Error(
- 'InvalidStateError: The connection has not been established yet'
- )
- this.readyState === y.OPEN && this._transport.send(t.quote(e))
- }),
- (y.version = x('./version')),
- (y.CONNECTING = 0),
- (y.OPEN = 1),
- (y.CLOSING = 2),
- (y.CLOSED = 3),
- (y.prototype._receiveInfo = function (e, t) {
- if ((b('_receiveInfo', t), (this._ir = null), e)) {
- ;(this._rto = this.countRTO(t)),
- (this._transUrl = e.base_url ? e.base_url : this.url),
- (e = o.extend(e, this._urlInfo)),
- b('info', e)
- var n = r.filterToEnabled(this._transportsWhitelist, e)
- ;(this._transports = n.main),
- b(this._transports.length + ' enabled transports'),
- this._connect()
- } else this._close(1002, 'Cannot connect to server')
- }),
- (y.prototype._connect = function () {
- for (
- var e = this._transports.shift();
- e;
- e = this._transports.shift()
- ) {
- if (
- (b('attempt', e.transportName),
- e.needBody &&
- (!w.document.body ||
- (void 0 !== w.document.readyState &&
- 'complete' !== w.document.readyState &&
- 'interactive' !== w.document.readyState)))
- )
- return (
- b('waiting for body'),
- this._transports.unshift(e),
- void i.attachEvent('load', this._connect.bind(this))
- )
- var t = Math.max(this._timeout, this._rto * e.roundTrips || 5e3)
- ;(this._transportTimeoutId = setTimeout(
- this._transportTimeout.bind(this),
- t
- )),
- b('using timeout', t)
- var n = c.addPath(
- this._transUrl,
- '/' + this._server + '/' + this._generateSessionId()
- ),
- r = this._transportOptions[e.transportName]
- b('transport url', n)
- var o = new e(n, 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)
- }),
- (y.prototype._transportTimeout = function () {
- b('_transportTimeout'),
- this.readyState === y.CONNECTING &&
- (this._transport && this._transport.close(),
- this._transportClose(2007, 'Transport timed out'))
- }),
- (y.prototype._transportMessage = function (e) {
- b('_transportMessage', e)
- var t,
- n = this,
- r = e.slice(0, 1),
- o = e.slice(1)
- switch (r) {
- case 'o':
- return void this._open()
- case 'h':
- return (
- this.dispatchEvent(new s('heartbeat')),
- void b('heartbeat', this.transport)
- )
- }
- if (o)
- try {
- t = JSON.parse(o)
- } catch (e) {
- b('bad json', o)
- }
- if (void 0 !== t)
- switch (r) {
- case 'a':
- Array.isArray(t) &&
- t.forEach(function (e) {
- b('message', n.transport, e), n.dispatchEvent(new m(e))
- })
- break
- case 'm':
- b('message', this.transport, t), this.dispatchEvent(new m(t))
- break
- case 'c':
- Array.isArray(t) && 2 === t.length && this._close(t[0], t[1], !0)
- }
- else b('empty payload', o)
- }),
- (y.prototype._transportClose = function (e, t) {
- b('_transportClose', this.transport, e, t),
- this._transport &&
- (this._transport.removeAllListeners(),
- (this._transport = null),
- (this.transport = null)),
- g(e) || 2e3 === e || this.readyState !== y.CONNECTING
- ? this._close(e, t)
- : this._connect()
- }),
- (y.prototype._open = function () {
- b(
- '_open',
- this._transport && this._transport.transportName,
- this.readyState
- ),
- this.readyState === y.CONNECTING
- ? (this._transportTimeoutId &&
- (clearTimeout(this._transportTimeoutId),
- (this._transportTimeoutId = null)),
- (this.readyState = y.OPEN),
- (this.transport = this._transport.transportName),
- this.dispatchEvent(new s('open')),
- b('connected', this.transport))
- : this._close(1006, 'Server lost session')
- }),
- (y.prototype._close = function (t, n, r) {
- b('_close', this.transport, t, n, r, this.readyState)
- var o = !1
- if (
- (this._ir && ((o = !0), this._ir.close(), (this._ir = null)),
- this._transport &&
- (this._transport.close(),
- (this._transport = null),
- (this.transport = null)),
- this.readyState === y.CLOSED)
- )
- throw new Error('InvalidStateError: SockJS has already been closed')
- ;(this.readyState = y.CLOSING),
- setTimeout(
- function () {
- ;(this.readyState = y.CLOSED),
- o && this.dispatchEvent(new s('error'))
- var e = new a('close')
- ;(e.wasClean = r || !1),
- (e.code = t || 1e3),
- (e.reason = n),
- this.dispatchEvent(e),
- (this.onmessage = this.onclose = this.onerror = null),
- b('disconnected')
- }.bind(this),
- 0
- )
- }),
- (y.prototype.countRTO = function (e) {
- return 100 < e ? 4 * e : 300 + e
- }),
- (_.exports = function (e) {
- return (r = n(e)), x('./iframe-bootstrap')(y, e), y
- })
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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,
- 'url-parse': 57
- }
- ],
- 15: [
- function (e, t, n) {
- function a(e) {
- return '[object Function]' === i.toString.call(e)
- }
- function l(e) {
- return '[object String]' === f.call(e)
- }
- var o,
- c = Array.prototype,
- i = Object.prototype,
- r = Function.prototype,
- s = String.prototype,
- u = c.slice,
- f = i.toString,
- h =
- Object.defineProperty &&
- (function () {
- try {
- return Object.defineProperty({}, 'x', {}), !0
- } catch (e) {
- return !1
- }
- })()
- o = h
- ? function (e, t, n, r) {
- ;(!r && t in e) ||
- Object.defineProperty(e, t, {
- configurable: !0,
- enumerable: !1,
- writable: !0,
- value: n
- })
- }
- : function (e, t, n, r) {
- ;(!r && t in e) || (e[t] = n)
- }
- function d(e, t, n) {
- for (var r in t) i.hasOwnProperty.call(t, r) && o(e, r, t[r], n)
- }
- function p(e) {
- if (null == e) throw new TypeError("can't convert " + e + ' to object')
- return Object(e)
- }
- function m() {}
- d(r, {
- bind: function (t) {
- var n = this
- if (!a(n))
- throw new TypeError('Function.prototype.bind called on incompatible ' + n)
- for (
- var r = u.call(arguments, 1),
- e = Math.max(0, n.length - r.length),
- o = [],
- i = 0;
- i < e;
- i++
- )
- o.push('$' + i)
- var s = Function(
- 'binder',
- 'return function (' +
- o.join(',') +
- '){ return binder.apply(this, arguments); }'
- )(function () {
- if (this instanceof s) {
- var e = n.apply(this, r.concat(u.call(arguments)))
- return Object(e) === e ? e : this
- }
- return n.apply(t, r.concat(u.call(arguments)))
- })
- return (
- n.prototype &&
- ((m.prototype = n.prototype),
- (s.prototype = new m()),
- (m.prototype = null)),
- s
- )
- }
- }),
- d(Array, {
- isArray: function (e) {
- return '[object Array]' === f.call(e)
- }
- })
- var v,
- b,
- y,
- g = Object('a'),
- w = 'a' !== g[0] || !(0 in g)
- d(
- c,
- {
- forEach: function (e, t) {
- var n = p(this),
- r = w && l(this) ? this.split('') : n,
- o = t,
- i = -1,
- s = r.length >>> 0
- if (!a(e)) throw new TypeError()
- for (; ++i < s; ) i in r && e.call(o, r[i], i, n)
- }
- },
- ((v = c.forEach),
- (y = b = !0),
- v &&
- (v.call('foo', function (e, t, n) {
- 'object' != typeof n && (b = !1)
- }),
- v.call(
- [1],
- function () {
- y = 'string' == typeof this
- },
- 'x'
- )),
- !(v && b && y))
- )
- var x = Array.prototype.indexOf && -1 !== [0, 1].indexOf(1, 2)
- d(
- c,
- {
- indexOf: function (e, t) {
- var n = w && l(this) ? this.split('') : p(this),
- r = n.length >>> 0
- if (!r) return -1
- var o = 0
- for (
- 1 < arguments.length &&
- (o = (function (e) {
- var t = +e
- return (
- t != t
- ? (t = 0)
- : 0 !== t &&
- t !== 1 / 0 &&
- t !== -1 / 0 &&
- (t = (0 < t || -1) * Math.floor(Math.abs(t))),
- t
- )
- })(t)),
- o = 0 <= o ? o : Math.max(0, r + o);
- o < r;
- o++
- )
- if (o in n && n[o] === e) return o
- return -1
- }
- },
- x
- )
- var _,
- E = s.split
- 2 !== 'ab'.split(/(?:ab)*/).length ||
- 4 !== '.'.split(/(.?)(.?)/).length ||
- 't' === 'tesst'.split(/(s)*/)[1] ||
- 4 !== 'test'.split(/(?:)/, -1).length ||
- ''.split(/.?/).length ||
- 1 < '.'.split(/()()/).length
- ? ((_ = void 0 === /()??/.exec('')[1]),
- (s.split = function (e, t) {
- var n = this
- if (void 0 === e && 0 === t) return []
- if ('[object RegExp]' !== f.call(e)) return E.call(this, e, t)
- var r,
- o,
- i,
- s,
- a = [],
- l =
- (e.ignoreCase ? 'i' : '') +
- (e.multiline ? 'm' : '') +
- (e.extended ? 'x' : '') +
- (e.sticky ? 'y' : ''),
- u = 0
- for (
- e = new RegExp(e.source, l + 'g'),
- n += '',
- _ || (r = new RegExp('^' + e.source + '$(?!\\s)', l)),
- t =
- void 0 === t
- ? -1 >>> 0
- : (function (e) {
- return e >>> 0
- })(t);
- (o = e.exec(n)) &&
- !(
- u < (i = o.index + o[0].length) &&
- (a.push(n.slice(u, o.index)),
- !_ &&
- 1 < o.length &&
- o[0].replace(r, function () {
- for (var e = 1; e < arguments.length - 2; e++)
- void 0 === arguments[e] && (o[e] = void 0)
- }),
- 1 < o.length && o.index < n.length && c.push.apply(a, o.slice(1)),
- (s = o[0].length),
- (u = i),
- a.length >= t)
- );
- )
- e.lastIndex === o.index && e.lastIndex++
- return (
- u === n.length ? (!s && e.test('')) || a.push('') : a.push(n.slice(u)),
- a.length > t ? a.slice(0, t) : a
- )
- }))
- : '0'.split(void 0, 0).length &&
- (s.split = function (e, t) {
- return void 0 === e && 0 === t ? [] : E.call(this, e, t)
- })
- var S = s.substr,
- O = ''.substr && 'b' !== '0b'.substr(-1)
- d(
- s,
- {
- substr: function (e, t) {
- return S.call(this, e < 0 && (e = this.length + e) < 0 ? 0 : e, t)
- }
- },
- O
- )
- },
- {}
- ],
- 16: [
- function (e, t, n) {
- 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 (o, f, e) {
- ;(function (r) {
- ;(function () {
- var i = o('events').EventEmitter,
- e = o('inherits'),
- s = o('../../utils/event'),
- a = o('../../utils/url'),
- l = r.XMLHttpRequest,
- u = function () {}
- function c(e, t, n, r) {
- u(e, t)
- var o = this
- i.call(this),
- setTimeout(function () {
- o._start(e, t, n, r)
- }, 0)
- }
- e(c, i),
- (c.prototype._start = function (e, t, n, r) {
- var o = this
- try {
- this.xhr = new l()
- } catch (e) {}
- if (!this.xhr)
- return (
- u('no xhr'),
- this.emit('finish', 0, 'no xhr support'),
- void this._cleanup()
- )
- ;(t = a.addQuery(t, 't=' + +new Date())),
- (this.unloadRef = s.unloadAdd(function () {
- u('unload cleanup'), 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 () {
- u('xhr timeout'), o.emit('finish', 0, ''), o._cleanup(!1)
- }))
- } catch (e) {
- return (
- u('exception', e),
- this.emit('finish', 0, ''),
- void this._cleanup(!1)
- )
- }
- if (
- ((r && r.noCredentials) ||
- !c.supportsCORS ||
- (u('withCredentials'), (this.xhr.withCredentials = !0)),
- r && r.headers)
- )
- for (var i in r.headers) this.xhr.setRequestHeader(i, r.headers[i])
- this.xhr.onreadystatechange = function () {
- if (o.xhr) {
- var e,
- t,
- n = o.xhr
- switch ((u('readyState', n.readyState), n.readyState)) {
- case 3:
- try {
- ;(t = n.status), (e = n.responseText)
- } catch (e) {}
- u('status', t),
- 1223 === t && (t = 204),
- 200 === t &&
- e &&
- 0 < e.length &&
- (u('chunk'), o.emit('chunk', t, e))
- break
- case 4:
- ;(t = n.status),
- u('status', t),
- 1223 === t && (t = 204),
- (12005 !== t && 12029 !== t) || (t = 0),
- u('finish', t, 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)
- }
- }),
- (c.prototype._cleanup = function (e) {
- if ((u('cleanup'), 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
- }
- }),
- (c.prototype.close = function () {
- u('close'), this._cleanup(!0)
- }),
- (c.enabled = !!l)
- var t = ['Active'].concat('Object').join('X')
- !c.enabled &&
- t in r &&
- (u('overriding xmlhttprequest'),
- (c.enabled = !!new (l = function () {
- try {
- return new r[t]('Microsoft.XMLHTTP')
- } catch (e) {
- return null
- }
- })()))
- var n = !1
- try {
- n = 'withCredentials' in new l()
- } catch (e) {}
- ;(c.supportsCORS = n), (f.exports = c)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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) {
- ;(function () {
- t.exports = e.EventSource
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- {}
- ],
- 19: [
- function (e, n, t) {
- ;(function (e) {
- ;(function () {
- var t = e.WebSocket || e.MozWebSocket
- n.exports = t
- ? function (e) {
- return new t(e)
- }
- : void 0
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- {}
- ],
- 20: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./lib/ajax-based'),
- i = e('./receiver/eventsource'),
- s = e('./sender/xhr-cors'),
- a = e('eventsource')
- function l(e) {
- if (!l.enabled()) throw new Error('Transport created when disabled')
- o.call(this, e, '/eventsource', i, s)
- }
- r(l, o),
- (l.enabled = function () {
- return !!a
- }),
- (l.transportName = 'eventsource'),
- (l.roundTrips = 2),
- (t.exports = l)
- },
- {
- './lib/ajax-based': 24,
- './receiver/eventsource': 29,
- './sender/xhr-cors': 35,
- eventsource: 18,
- inherits: 54
- }
- ],
- 21: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./receiver/htmlfile'),
- i = e('./sender/xhr-local'),
- s = e('./lib/ajax-based')
- function a(e) {
- if (!o.enabled) throw new Error('Transport created when disabled')
- s.call(this, e, '/htmlfile', o, i)
- }
- r(a, s),
- (a.enabled = function (e) {
- return o.enabled && e.sameOrigin
- }),
- (a.transportName = 'htmlfile'),
- (a.roundTrips = 2),
- (t.exports = a)
- },
- {
- './lib/ajax-based': 24,
- './receiver/htmlfile': 30,
- './sender/xhr-local': 37,
- inherits: 54
- }
- ],
- 22: [
- function (e, t, n) {
- var r = e('inherits'),
- i = e('events').EventEmitter,
- o = e('../version'),
- s = e('../utils/url'),
- a = e('../utils/iframe'),
- l = e('../utils/event'),
- u = e('../utils/random'),
- c = function () {}
- function f(e, t, n) {
- if (!f.enabled()) throw new Error('Transport created when disabled')
- i.call(this)
- var r = this
- ;(this.origin = s.getOrigin(n)),
- (this.baseUrl = n),
- (this.transUrl = t),
- (this.transport = e),
- (this.windowId = u.string(8))
- var o = s.addPath(n, '/iframe.html') + '#' + this.windowId
- c(e, t, o),
- (this.iframeObj = a.createIframe(o, function (e) {
- c('err callback'),
- r.emit('close', 1006, 'Unable to load an iframe (' + e + ')'),
- r.close()
- })),
- (this.onmessageCallback = this._message.bind(this)),
- l.attachEvent('message', this.onmessageCallback)
- }
- r(f, i),
- (f.prototype.close = function () {
- if ((c('close'), 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)
- }
- }),
- (f.prototype._message = function (t) {
- if ((c('message', t.data), s.isOriginEqual(t.origin, this.origin))) {
- var n
- try {
- n = JSON.parse(t.data)
- } catch (e) {
- return void c('bad json', t.data)
- }
- if (n.windowId === this.windowId)
- switch (n.type) {
- case 's':
- this.iframeObj.loaded(),
- this.postMessage(
- 's',
- JSON.stringify([o, this.transport, this.transUrl, this.baseUrl])
- )
- break
- case 't':
- this.emit('message', n.data)
- break
- case 'c':
- var e
- try {
- e = JSON.parse(n.data)
- } catch (e) {
- return void c('bad json', n.data)
- }
- this.emit('close', e[0], e[1]), this.close()
- }
- else c('mismatched window id', n.windowId, this.windowId)
- } else c('not same origin', t.origin, this.origin)
- }),
- (f.prototype.postMessage = function (e, t) {
- c('postMessage', e, t),
- this.iframeObj.post(
- JSON.stringify({ windowId: this.windowId, type: e, data: t || '' }),
- this.origin
- )
- }),
- (f.prototype.send = function (e) {
- c('send', e), this.postMessage('m', e)
- }),
- (f.enabled = function () {
- return a.iframeEnabled
- }),
- (f.transportName = 'iframe'),
- (f.roundTrips = 2),
- (t.exports = f)
- },
- {
- '../utils/event': 46,
- '../utils/iframe': 47,
- '../utils/random': 50,
- '../utils/url': 52,
- '../version': 53,
- debug: void 0,
- events: 3,
- inherits: 54
- }
- ],
- 23: [
- function (s, a, e) {
- ;(function (i) {
- ;(function () {
- var e = s('inherits'),
- t = s('./lib/sender-receiver'),
- n = s('./receiver/jsonp'),
- r = s('./sender/jsonp')
- function o(e) {
- if (!o.enabled()) throw new Error('Transport created when disabled')
- t.call(this, e, '/jsonp', r, n)
- }
- e(o, t),
- (o.enabled = function () {
- return !!i.document
- }),
- (o.transportName = 'jsonp-polling'),
- (o.roundTrips = 1),
- (o.needBody = !0),
- (a.exports = o)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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) {
- var r = e('inherits'),
- a = e('../../utils/url'),
- o = e('./sender-receiver'),
- l = function () {}
- function i(e, t, n, r) {
- o.call(
- this,
- e,
- t,
- (function (s) {
- return function (e, t, n) {
- l('create ajax sender', e, t)
- var r = {}
- 'string' == typeof t && (r.headers = { 'Content-type': 'text/plain' })
- var o = a.addPath(e, '/xhr_send'),
- i = new s('POST', o, t, r)
- return (
- i.once('finish', function (e) {
- if ((l('finish', e), (i = null), 200 !== e && 204 !== e))
- return n(new Error('http status ' + e))
- n()
- }),
- function () {
- l('abort'), i.close(), (i = null)
- var e = new Error('Aborted')
- ;(e.code = 1e3), n(e)
- }
- )
- }
- })(r),
- n,
- r
- )
- }
- r(i, o), (t.exports = i)
- },
- { '../../utils/url': 52, './sender-receiver': 28, debug: void 0, inherits: 54 }
- ],
- 25: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('events').EventEmitter,
- i = function () {}
- function s(e, t) {
- i(e), o.call(this), (this.sendBuffer = []), (this.sender = t), (this.url = e)
- }
- r(s, o),
- (s.prototype.send = function (e) {
- i('send', e), this.sendBuffer.push(e), this.sendStop || this.sendSchedule()
- }),
- (s.prototype.sendScheduleWait = function () {
- i('sendScheduleWait')
- var e,
- t = this
- ;(this.sendStop = function () {
- i('sendStop'), (t.sendStop = null), clearTimeout(e)
- }),
- (e = setTimeout(function () {
- i('timeout'), (t.sendStop = null), t.sendSchedule()
- }, 25))
- }),
- (s.prototype.sendSchedule = function () {
- i('sendSchedule', this.sendBuffer.length)
- var t = this
- if (0 < this.sendBuffer.length) {
- var e = '[' + this.sendBuffer.join(',') + ']'
- ;(this.sendStop = this.sender(this.url, e, function (e) {
- ;(t.sendStop = null),
- e
- ? (i('error', e),
- t.emit('close', e.code || 1006, 'Sending error: ' + e),
- t.close())
- : t.sendScheduleWait()
- })),
- (this.sendBuffer = [])
- }
- }),
- (s.prototype._cleanup = function () {
- i('_cleanup'), this.removeAllListeners()
- }),
- (s.prototype.close = function () {
- i('close'),
- this._cleanup(),
- this.sendStop && (this.sendStop(), (this.sendStop = null))
- }),
- (t.exports = s)
- },
- { debug: void 0, events: 3, inherits: 54 }
- ],
- 26: [
- function (e, n, t) {
- ;(function (s) {
- ;(function () {
- var t = e('inherits'),
- o = e('../iframe'),
- i = e('../../utils/object')
- n.exports = function (r) {
- function e(e, t) {
- o.call(this, r.transportName, e, t)
- }
- return (
- t(e, o),
- (e.enabled = function (e, t) {
- if (!s.document) return !1
- var n = i.extend({}, t)
- return (n.sameOrigin = !0), r.enabled(n) && o.enabled()
- }),
- (e.transportName = 'iframe-' + r.transportName),
- (e.needBody = !0),
- (e.roundTrips = o.roundTrips + r.roundTrips - 1),
- (e.facadeTransport = r),
- e
- )
- }
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- { '../../utils/object': 49, '../iframe': 22, inherits: 54 }
- ],
- 27: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('events').EventEmitter,
- i = function () {}
- function s(e, t, n) {
- i(t),
- o.call(this),
- (this.Receiver = e),
- (this.receiveUrl = t),
- (this.AjaxObject = n),
- this._scheduleReceiver()
- }
- r(s, o),
- (s.prototype._scheduleReceiver = function () {
- i('_scheduleReceiver')
- var n = this,
- r = (this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject))
- r.on('message', function (e) {
- i('message', e), n.emit('message', e)
- }),
- r.once('close', function (e, t) {
- i('close', e, t, n.pollIsClosing),
- (n.poll = r = null),
- n.pollIsClosing ||
- ('network' === t
- ? n._scheduleReceiver()
- : (n.emit('close', e || 1006, t), n.removeAllListeners()))
- })
- }),
- (s.prototype.abort = function () {
- i('abort'),
- this.removeAllListeners(),
- (this.pollIsClosing = !0),
- this.poll && this.poll.abort()
- }),
- (t.exports = s)
- },
- { debug: void 0, events: 3, inherits: 54 }
- ],
- 28: [
- function (e, t, n) {
- var r = e('inherits'),
- a = e('../../utils/url'),
- l = e('./buffered-sender'),
- u = e('./polling'),
- c = function () {}
- function o(e, t, n, r, o) {
- var i = a.addPath(e, t)
- c(i)
- var s = this
- l.call(this, e, n),
- (this.poll = new u(r, i, o)),
- this.poll.on('message', function (e) {
- c('poll message', e), s.emit('message', e)
- }),
- this.poll.once('close', function (e, t) {
- c('poll close', e, t), (s.poll = null), s.emit('close', e, t), s.close()
- })
- }
- r(o, l),
- (o.prototype.close = function () {
- l.prototype.close.call(this),
- c('close'),
- this.removeAllListeners(),
- this.poll && (this.poll.abort(), (this.poll = null))
- }),
- (t.exports = o)
- },
- {
- '../../utils/url': 52,
- './buffered-sender': 25,
- './polling': 27,
- debug: void 0,
- inherits: 54
- }
- ],
- 29: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('events').EventEmitter,
- i = e('eventsource'),
- s = function () {}
- function a(e) {
- s(e), o.call(this)
- var n = this,
- r = (this.es = new i(e))
- ;(r.onmessage = function (e) {
- s('message', e.data), n.emit('message', decodeURI(e.data))
- }),
- (r.onerror = function (e) {
- s('error', r.readyState, e)
- var t = 2 !== r.readyState ? 'network' : 'permanent'
- n._cleanup(), n._close(t)
- })
- }
- r(a, o),
- (a.prototype.abort = function () {
- s('abort'), this._cleanup(), this._close('user')
- }),
- (a.prototype._cleanup = function () {
- s('cleanup')
- var e = this.es
- e && ((e.onmessage = e.onerror = null), e.close(), (this.es = null))
- }),
- (a.prototype._close = function (e) {
- s('close', e)
- var t = this
- setTimeout(function () {
- t.emit('close', null, e), t.removeAllListeners()
- }, 200)
- }),
- (t.exports = a)
- },
- { debug: void 0, events: 3, eventsource: 18, inherits: 54 }
- ],
- 30: [
- function (n, c, e) {
- ;(function (u) {
- ;(function () {
- var e = n('inherits'),
- r = n('../../utils/iframe'),
- o = n('../../utils/url'),
- i = n('events').EventEmitter,
- s = n('../../utils/random'),
- a = function () {}
- function l(e) {
- a(e), i.call(this)
- var t = this
- r.polluteGlobalNamespace(),
- (this.id = 'a' + s.string(6)),
- (e = o.addQuery(
- e,
- 'c=' + decodeURIComponent(r.WPrefix + '.' + this.id)
- )),
- a('using htmlfile', l.htmlfileEnabled)
- var n = l.htmlfileEnabled ? r.createHtmlfile : r.createIframe
- ;(u[r.WPrefix][this.id] = {
- start: function () {
- a('start'), t.iframeObj.loaded()
- },
- message: function (e) {
- a('message', e), t.emit('message', e)
- },
- stop: function () {
- a('stop'), t._cleanup(), t._close('network')
- }
- }),
- (this.iframeObj = n(e, function () {
- a('callback'), t._cleanup(), t._close('permanent')
- }))
- }
- e(l, i),
- (l.prototype.abort = function () {
- a('abort'), this._cleanup(), this._close('user')
- }),
- (l.prototype._cleanup = function () {
- a('_cleanup'),
- this.iframeObj && (this.iframeObj.cleanup(), (this.iframeObj = null)),
- delete u[r.WPrefix][this.id]
- }),
- (l.prototype._close = function (e) {
- a('_close', e), this.emit('close', null, e), this.removeAllListeners()
- }),
- (l.htmlfileEnabled = !1)
- var t = ['Active'].concat('Object').join('X')
- if (t in u)
- try {
- l.htmlfileEnabled = !!new u[t]('htmlfile')
- } catch (e) {}
- ;(l.enabled = l.htmlfileEnabled || r.iframeEnabled), (c.exports = l)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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 (t, n, e) {
- ;(function (c) {
- ;(function () {
- var r = t('../../utils/iframe'),
- i = t('../../utils/random'),
- s = t('../../utils/browser'),
- o = t('../../utils/url'),
- e = t('inherits'),
- a = t('events').EventEmitter,
- l = function () {}
- function u(e) {
- l(e)
- var t = this
- a.call(this), r.polluteGlobalNamespace(), (this.id = 'a' + i.string(6))
- var n = o.addQuery(
- e,
- 'c=' + encodeURIComponent(r.WPrefix + '.' + this.id)
- )
- ;(c[r.WPrefix][this.id] = this._callback.bind(this)),
- this._createScript(n),
- (this.timeoutId = setTimeout(function () {
- l('timeout'),
- t._abort(new Error('JSONP script loaded abnormally (timeout)'))
- }, u.timeout))
- }
- e(u, a),
- (u.prototype.abort = function () {
- if ((l('abort'), c[r.WPrefix][this.id])) {
- var e = new Error('JSONP user aborted read')
- ;(e.code = 1e3), this._abort(e)
- }
- }),
- (u.timeout = 35e3),
- (u.scriptErrorTimeout = 1e3),
- (u.prototype._callback = function (e) {
- l('_callback', e),
- this._cleanup(),
- this.aborting ||
- (e && (l('message', e), this.emit('message', e)),
- this.emit('close', null, 'network'),
- this.removeAllListeners())
- }),
- (u.prototype._abort = function (e) {
- l('_abort', e),
- this._cleanup(),
- (this.aborting = !0),
- this.emit('close', e.code, e.message),
- this.removeAllListeners()
- }),
- (u.prototype._cleanup = function () {
- if (
- (l('_cleanup'),
- 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 c[r.WPrefix][this.id]
- }),
- (u.prototype._scriptError = function () {
- l('_scriptError')
- var e = this
- this.errorTimer ||
- (this.errorTimer = setTimeout(function () {
- e.loadedOkay ||
- e._abort(new Error('JSONP script loaded abnormally (onerror)'))
- }, u.scriptErrorTimeout))
- }),
- (u.prototype._createScript = function (e) {
- l('_createScript', e)
- var t,
- n = this,
- r = (this.script = c.document.createElement('script'))
- if (
- ((r.id = 'a' + i.string(8)),
- (r.src = e),
- (r.type = 'text/javascript'),
- (r.charset = 'UTF-8'),
- (r.onerror = this._scriptError.bind(this)),
- (r.onload = function () {
- l('onload'),
- n._abort(new Error('JSONP script loaded abnormally (onload)'))
- }),
- (r.onreadystatechange = function () {
- if (
- (l('onreadystatechange', r.readyState),
- /loaded|closed/.test(r.readyState))
- ) {
- if (r && r.htmlFor && r.onclick) {
- n.loadedOkay = !0
- try {
- r.onclick()
- } catch (e) {}
- }
- r &&
- n._abort(
- new Error(
- 'JSONP script loaded abnormally (onreadystatechange)'
- )
- )
- }
- }),
- void 0 === r.async && c.document.attachEvent)
- )
- if (s.isOpera())
- ((t = this.script2 = c.document.createElement('script')).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 o = c.document.getElementsByTagName('head')[0]
- o.insertBefore(r, o.firstChild), t && o.insertBefore(t, o.firstChild)
- }),
- (n.exports = u)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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) {
- var r = e('inherits'),
- o = e('events').EventEmitter,
- i = function () {}
- function s(e, t) {
- i(e), o.call(this)
- var r = 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) {
- i('finish', e, t), r._chunkHandler(e, t), (r.xo = null)
- var n = 200 === e ? 'network' : 'permanent'
- i('close', n), r.emit('close', null, n), r._cleanup()
- })
- }
- r(s, o),
- (s.prototype._chunkHandler = function (e, t) {
- if ((i('_chunkHandler', e), 200 === e && t))
- for (var n = -1; ; this.bufferPosition += n + 1) {
- var r = t.slice(this.bufferPosition)
- if (-1 === (n = r.indexOf('\n'))) break
- var o = r.slice(0, n)
- o && (i('message', o), this.emit('message', o))
- }
- }),
- (s.prototype._cleanup = function () {
- i('_cleanup'), this.removeAllListeners()
- }),
- (s.prototype.abort = function () {
- i('abort'),
- this.xo &&
- (this.xo.close(),
- i('close'),
- this.emit('close', null, 'user'),
- (this.xo = null)),
- this._cleanup()
- }),
- (t.exports = s)
- },
- { debug: void 0, events: 3, inherits: 54 }
- ],
- 33: [
- function (e, t, n) {
- ;(function (f) {
- ;(function () {
- var s,
- a,
- l = e('../../utils/random'),
- u = e('../../utils/url'),
- c = function () {}
- t.exports = function (e, t, n) {
- c(e, t),
- s ||
- (c('createForm'),
- ((s = f.document.createElement('form')).style.display = 'none'),
- (s.style.position = 'absolute'),
- (s.method = 'POST'),
- (s.enctype = 'application/x-www-form-urlencoded'),
- (s.acceptCharset = 'UTF-8'),
- ((a = f.document.createElement('textarea')).name = 'd'),
- s.appendChild(a),
- f.document.body.appendChild(s))
- var r = 'a' + l.string(8)
- ;(s.target = r),
- (s.action = u.addQuery(u.addPath(e, '/jsonp_send'), 'i=' + r))
- var o = (function (t) {
- c('createIframe', t)
- try {
- return f.document.createElement('<iframe name="' + t + '">')
- } catch (e) {
- var n = f.document.createElement('iframe')
- return (n.name = t), n
- }
- })(r)
- ;(o.id = r), (o.style.display = 'none'), s.appendChild(o)
- try {
- a.value = t
- } catch (e) {}
- s.submit()
- function i(e) {
- c('completed', r, e),
- o.onerror &&
- ((o.onreadystatechange = o.onerror = o.onload = null),
- setTimeout(function () {
- c('cleaning up', r), o.parentNode.removeChild(o), (o = null)
- }, 500),
- (a.value = ''),
- n(e))
- }
- return (
- (o.onerror = function () {
- c('onerror', r), i()
- }),
- (o.onload = function () {
- c('onload', r), i()
- }),
- (o.onreadystatechange = function (e) {
- c('onreadystatechange', r, o.readyState, e),
- 'complete' === o.readyState && i()
- }),
- function () {
- c('aborted', r), i(new Error('Aborted'))
- }
- )
- }
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- { '../../utils/random': 50, '../../utils/url': 52, debug: void 0 }
- ],
- 34: [
- function (r, u, e) {
- ;(function (l) {
- ;(function () {
- var o = r('events').EventEmitter,
- e = r('inherits'),
- i = r('../../utils/event'),
- t = r('../../utils/browser'),
- s = r('../../utils/url'),
- a = function () {}
- function n(e, t, n) {
- a(e, t)
- var r = this
- o.call(this),
- setTimeout(function () {
- r._start(e, t, n)
- }, 0)
- }
- e(n, o),
- (n.prototype._start = function (e, t, n) {
- a('_start')
- var r = this,
- o = new l.XDomainRequest()
- ;(t = s.addQuery(t, 't=' + +new Date())),
- (o.onerror = function () {
- a('onerror'), r._error()
- }),
- (o.ontimeout = function () {
- a('ontimeout'), r._error()
- }),
- (o.onprogress = function () {
- a('progress', o.responseText), r.emit('chunk', 200, o.responseText)
- }),
- (o.onload = function () {
- a('load'), r.emit('finish', 200, o.responseText), r._cleanup(!1)
- }),
- (this.xdr = o),
- (this.unloadRef = i.unloadAdd(function () {
- r._cleanup(!0)
- }))
- try {
- this.xdr.open(e, t),
- this.timeout && (this.xdr.timeout = this.timeout),
- this.xdr.send(n)
- } catch (e) {
- this._error()
- }
- }),
- (n.prototype._error = function () {
- this.emit('finish', 0, ''), this._cleanup(!1)
- }),
- (n.prototype._cleanup = function (e) {
- if ((a('cleanup', e), this.xdr)) {
- if (
- (this.removeAllListeners(),
- i.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
- }
- }),
- (n.prototype.close = function () {
- a('close'), this._cleanup(!0)
- }),
- (n.enabled = !(!l.XDomainRequest || !t.hasDomain())),
- (u.exports = n)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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) {
- var r = e('inherits'),
- o = e('../driver/xhr')
- function i(e, t, n, r) {
- o.call(this, e, t, n, r)
- }
- r(i, o), (i.enabled = o.enabled && o.supportsCORS), (t.exports = i)
- },
- { '../driver/xhr': 17, inherits: 54 }
- ],
- 36: [
- function (e, t, n) {
- var r = e('events').EventEmitter
- function o() {
- var e = this
- r.call(this),
- (this.to = setTimeout(function () {
- e.emit('finish', 200, '{}')
- }, o.timeout))
- }
- e('inherits')(o, r),
- (o.prototype.close = function () {
- clearTimeout(this.to)
- }),
- (o.timeout = 2e3),
- (t.exports = o)
- },
- { events: 3, inherits: 54 }
- ],
- 37: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('../driver/xhr')
- function i(e, t, n) {
- o.call(this, e, t, n, { noCredentials: !0 })
- }
- r(i, o), (i.enabled = o.enabled), (t.exports = i)
- },
- { '../driver/xhr': 17, inherits: 54 }
- ],
- 38: [
- function (e, t, n) {
- var i = e('../utils/event'),
- s = e('../utils/url'),
- r = e('inherits'),
- a = e('events').EventEmitter,
- l = e('./driver/websocket'),
- u = function () {}
- function c(e, t, n) {
- if (!c.enabled()) throw new Error('Transport created when disabled')
- a.call(this), u('constructor', e)
- var r = this,
- o = s.addPath(e, '/websocket')
- ;(o = 'https' === o.slice(0, 5) ? 'wss' + o.slice(5) : 'ws' + o.slice(4)),
- (this.url = o),
- (this.ws = new l(this.url, [], n)),
- (this.ws.onmessage = function (e) {
- u('message event', e.data), r.emit('message', e.data)
- }),
- (this.unloadRef = i.unloadAdd(function () {
- u('unload'), r.ws.close()
- })),
- (this.ws.onclose = function (e) {
- u('close event', e.code, e.reason),
- r.emit('close', e.code, e.reason),
- r._cleanup()
- }),
- (this.ws.onerror = function (e) {
- u('error event', e),
- r.emit('close', 1006, 'WebSocket connection broken'),
- r._cleanup()
- })
- }
- r(c, a),
- (c.prototype.send = function (e) {
- var t = '[' + e + ']'
- u('send', t), this.ws.send(t)
- }),
- (c.prototype.close = function () {
- u('close')
- var e = this.ws
- this._cleanup(), e && e.close()
- }),
- (c.prototype._cleanup = function () {
- u('_cleanup')
- var e = this.ws
- e && (e.onmessage = e.onclose = e.onerror = null),
- i.unloadDel(this.unloadRef),
- (this.unloadRef = this.ws = null),
- this.removeAllListeners()
- }),
- (c.enabled = function () {
- return u('enabled'), !!l
- }),
- (c.transportName = 'websocket'),
- (c.roundTrips = 2),
- (t.exports = c)
- },
- {
- '../utils/event': 46,
- '../utils/url': 52,
- './driver/websocket': 19,
- debug: void 0,
- events: 3,
- inherits: 54
- }
- ],
- 39: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./lib/ajax-based'),
- i = e('./xdr-streaming'),
- s = e('./receiver/xhr'),
- a = e('./sender/xdr')
- function l(e) {
- if (!a.enabled) throw new Error('Transport created when disabled')
- o.call(this, e, '/xhr', s, a)
- }
- r(l, o),
- (l.enabled = i.enabled),
- (l.transportName = 'xdr-polling'),
- (l.roundTrips = 2),
- (t.exports = l)
- },
- {
- './lib/ajax-based': 24,
- './receiver/xhr': 32,
- './sender/xdr': 34,
- './xdr-streaming': 40,
- inherits: 54
- }
- ],
- 40: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./lib/ajax-based'),
- i = e('./receiver/xhr'),
- s = e('./sender/xdr')
- function a(e) {
- if (!s.enabled) throw new Error('Transport created when disabled')
- o.call(this, e, '/xhr_streaming', i, s)
- }
- r(a, o),
- (a.enabled = function (e) {
- return !e.cookie_needed && !e.nullOrigin && s.enabled && e.sameScheme
- }),
- (a.transportName = 'xdr-streaming'),
- (a.roundTrips = 2),
- (t.exports = a)
- },
- { './lib/ajax-based': 24, './receiver/xhr': 32, './sender/xdr': 34, inherits: 54 }
- ],
- 41: [
- function (e, t, n) {
- var r = e('inherits'),
- o = e('./lib/ajax-based'),
- i = e('./receiver/xhr'),
- s = e('./sender/xhr-cors'),
- a = e('./sender/xhr-local')
- function l(e) {
- if (!a.enabled && !s.enabled)
- throw new Error('Transport created when disabled')
- o.call(this, e, '/xhr', i, s)
- }
- r(l, o),
- (l.enabled = function (e) {
- return !e.nullOrigin && (!(!a.enabled || !e.sameOrigin) || s.enabled)
- }),
- (l.transportName = 'xhr-polling'),
- (l.roundTrips = 2),
- (t.exports = l)
- },
- {
- './lib/ajax-based': 24,
- './receiver/xhr': 32,
- './sender/xhr-cors': 35,
- './sender/xhr-local': 37,
- inherits: 54
- }
- ],
- 42: [
- function (l, u, e) {
- ;(function (a) {
- ;(function () {
- var e = l('inherits'),
- t = l('./lib/ajax-based'),
- n = l('./receiver/xhr'),
- r = l('./sender/xhr-cors'),
- o = l('./sender/xhr-local'),
- i = l('../utils/browser')
- function s(e) {
- if (!o.enabled && !r.enabled)
- throw new Error('Transport created when disabled')
- t.call(this, e, '/xhr_streaming', n, r)
- }
- e(s, t),
- (s.enabled = function (e) {
- return !e.nullOrigin && !i.isOpera() && r.enabled
- }),
- (s.transportName = 'xhr-streaming'),
- (s.roundTrips = 2),
- (s.needBody = !!a.document),
- (u.exports = s)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : '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 (n) {
- ;(function () {
- n.crypto && n.crypto.getRandomValues
- ? (t.exports.randomBytes = function (e) {
- var t = new Uint8Array(e)
- return n.crypto.getRandomValues(t), t
- })
- : (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)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- {}
- ],
- 44: [
- function (e, t, n) {
- ;(function (e) {
- ;(function () {
- 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)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- {}
- ],
- 45: [
- function (e, t, n) {
- var r,
- 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 = JSON.stringify(e)
- return (
- (o.lastIndex = 0),
- o.test(t)
- ? ((r =
- r ||
- (function (e) {
- var t,
- n = {},
- r = []
- for (t = 0; t < 65536; t++) r.push(String.fromCharCode(t))
- return (
- (e.lastIndex = 0),
- r.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 r[e]
- }))
- : t
- )
- }
- }
- },
- {}
- ],
- 46: [
- function (e, t, n) {
- ;(function (s) {
- ;(function () {
- var n = e('./random'),
- r = {},
- o = !1,
- i = s.chrome && s.chrome.app && s.chrome.app.runtime
- t.exports = {
- attachEvent: function (e, t) {
- void 0 !== s.addEventListener
- ? s.addEventListener(e, t, !1)
- : s.document &&
- s.attachEvent &&
- (s.document.attachEvent('on' + e, t), s.attachEvent('on' + e, t))
- },
- detachEvent: function (e, t) {
- void 0 !== s.addEventListener
- ? s.removeEventListener(e, t, !1)
- : s.document &&
- s.detachEvent &&
- (s.document.detachEvent('on' + e, t), s.detachEvent('on' + e, t))
- },
- unloadAdd: function (e) {
- if (i) return null
- var t = n.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]
- }
- }
- i ||
- t.exports.attachEvent('unload', function () {
- o || ((o = !0), t.exports.triggerUnloadCallbacks())
- })
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- { './random': 50 }
- ],
- 47: [
- function (t, p, e) {
- ;(function (d) {
- ;(function () {
- var f = t('./event'),
- e = t('./browser'),
- h = function () {}
- ;(p.exports = {
- WPrefix: '_jp',
- currentWindowId: null,
- polluteGlobalNamespace: function () {
- p.exports.WPrefix in d || (d[p.exports.WPrefix] = {})
- },
- postMessage: function (e, t) {
- d.parent !== d
- ? d.parent.postMessage(
- JSON.stringify({
- windowId: p.exports.currentWindowId,
- type: e,
- data: t || ''
- }),
- '*'
- )
- : h('Cannot postMessage, no parent window.', e, t)
- },
- createIframe: function (e, t) {
- function n() {
- h('unattach'), clearTimeout(i)
- try {
- a.onload = null
- } catch (e) {}
- a.onerror = null
- }
- function r() {
- h('cleanup'),
- a &&
- (n(),
- setTimeout(function () {
- a && a.parentNode.removeChild(a), (a = null)
- }, 0),
- f.unloadDel(s))
- }
- function o(e) {
- h('onerror', e), a && (r(), t(e))
- }
- var i,
- s,
- a = d.document.createElement('iframe')
- return (
- (a.src = e),
- (a.style.display = 'none'),
- (a.style.position = 'absolute'),
- (a.onerror = function () {
- o('onerror')
- }),
- (a.onload = function () {
- h('onload'),
- clearTimeout(i),
- (i = setTimeout(function () {
- o('onload timeout')
- }, 2e3))
- }),
- d.document.body.appendChild(a),
- (i = setTimeout(function () {
- o('timeout')
- }, 15e3)),
- (s = f.unloadAdd(r)),
- {
- post: function (e, t) {
- h('post', e, t),
- setTimeout(function () {
- try {
- a && a.contentWindow && a.contentWindow.postMessage(e, t)
- } catch (e) {}
- }, 0)
- },
- cleanup: r,
- loaded: n
- }
- )
- },
- createHtmlfile: function (e, t) {
- function n() {
- clearTimeout(i), (a.onerror = null)
- }
- function r() {
- u &&
- (n(),
- f.unloadDel(s),
- a.parentNode.removeChild(a),
- (a = u = null),
- CollectGarbage())
- }
- function o(e) {
- h('onerror', e), u && (r(), t(e))
- }
- var i,
- s,
- a,
- l = ['Active'].concat('Object').join('X'),
- u = new d[l]('htmlfile')
- u.open(),
- u.write(
- '<html><script>document.domain="' +
- d.document.domain +
- '";</script></html>'
- ),
- u.close(),
- (u.parentWindow[p.exports.WPrefix] = d[p.exports.WPrefix])
- var c = u.createElement('div')
- return (
- u.body.appendChild(c),
- (a = u.createElement('iframe')),
- c.appendChild(a),
- (a.src = e),
- (a.onerror = function () {
- o('onerror')
- }),
- (i = setTimeout(function () {
- o('timeout')
- }, 15e3)),
- (s = f.unloadAdd(r)),
- {
- post: function (e, t) {
- try {
- setTimeout(function () {
- a && a.contentWindow && a.contentWindow.postMessage(e, t)
- }, 0)
- } catch (e) {}
- },
- cleanup: r,
- loaded: n
- }
- )
- }
- }),
- (p.exports.iframeEnabled = !1),
- d.document &&
- (p.exports.iframeEnabled =
- ('function' == typeof d.postMessage ||
- 'object' == typeof d.postMessage) &&
- !e.isKonqueror())
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- { './browser': 44, './event': 46, debug: void 0 }
- ],
- 48: [
- function (e, t, n) {
- ;(function (r) {
- ;(function () {
- var n = {}
- ;['log', 'debug', 'warn'].forEach(function (e) {
- var t
- try {
- t = r.console && r.console[e] && r.console[e].apply
- } catch (e) {}
- n[e] = t
- ? function () {
- return r.console[e].apply(r.console, arguments)
- }
- : 'log' === e
- ? function () {}
- : n.log
- }),
- (t.exports = n)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- {}
- ],
- 49: [
- function (e, t, n) {
- t.exports = {
- isObject: function (e) {
- var t = typeof e
- return 'function' == t || ('object' == t && !!e)
- },
- extend: function (e) {
- if (!this.isObject(e)) return e
- for (var t, n, r = 1, o = arguments.length; r < o; r++)
- for (n in (t = arguments[r]))
- Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n])
- return e
- }
- }
- },
- {}
- ],
- 50: [
- function (e, t, n) {
- var i = e('crypto'),
- s = 'abcdefghijklmnopqrstuvwxyz012345'
- t.exports = {
- string: function (e) {
- for (var t = s.length, n = i.randomBytes(e), r = [], o = 0; o < e; o++)
- r.push(s.substr(n[o] % t, 1))
- return r.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) {
- var o = function () {}
- t.exports = function (e) {
- return {
- filterToEnabled: function (t, n) {
- var r = { main: [], facade: [] }
- return (
- t ? 'string' == typeof t && (t = [t]) : (t = []),
- e.forEach(function (e) {
- e &&
- ('websocket' !== e.transportName || !1 !== n.websocket
- ? t.length && -1 === t.indexOf(e.transportName)
- ? o('not in whitelist', e.transportName)
- : e.enabled(n)
- ? (o('enabled', e.transportName),
- r.main.push(e),
- e.facadeTransport && r.facade.push(e.facadeTransport))
- : o('disabled', e.transportName)
- : o('disabled from server', 'websocket'))
- }),
- r
- )
- }
- }
- }
- },
- { debug: void 0 }
- ],
- 52: [
- function (e, t, n) {
- var r = e('url-parse'),
- o = function () {}
- t.exports = {
- getOrigin: function (e) {
- if (!e) return null
- var t = new r(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 o('same', e, t, n), 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)
- },
- isLoopbackAddr: function (e) {
- return (
- /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e) ||
- /^\[::1\]$/.test(e)
- )
- }
- }
- },
- { debug: void 0, 'url-parse': 57 }
- ],
- 53: [
- function (e, t, n) {
- t.exports = '1.6.1'
- },
- {}
- ],
- 54: [
- function (e, t, n) {
- 'function' == typeof Object.create
- ? (t.exports = function (e, t) {
- t &&
- ((e.super_ = t),
- (e.prototype = Object.create(t.prototype, {
- constructor: {
- value: e,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- })))
- })
- : (t.exports = function (e, t) {
- if (t) {
- e.super_ = t
- function n() {}
- ;(n.prototype = t.prototype),
- (e.prototype = new n()),
- (e.prototype.constructor = e)
- }
- })
- },
- {}
- ],
- 55: [
- function (e, t, n) {
- var i = Object.prototype.hasOwnProperty
- function s(e) {
- try {
- return decodeURIComponent(e.replace(/\+/g, ' '))
- } catch (e) {
- return null
- }
- }
- ;(n.stringify = function (e, t) {
- t = t || ''
- var n,
- r,
- o = []
- for (r in ('string' != typeof t && (t = '?'), e))
- if (i.call(e, r)) {
- if (
- ((n = e[r]) || (null != n && !isNaN(n)) || (n = ''),
- (r = encodeURIComponent(r)),
- (n = encodeURIComponent(n)),
- null === r || null === n)
- )
- continue
- o.push(r + '=' + n)
- }
- return o.length ? t + o.join('&') : ''
- }),
- (n.parse = function (e) {
- for (var t, n = /([^=?&]+)=?([^&]*)/g, r = {}; (t = n.exec(e)); ) {
- var o = s(t[1]),
- i = s(t[2])
- null === o || null === i || o in r || (r[o] = i)
- }
- return r
- })
- },
- {}
- ],
- 56: [
- function (e, t, n) {
- 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
- }
- },
- {}
- ],
- 57: [
- function (e, n, t) {
- ;(function (a) {
- ;(function () {
- var d = e('requires-port'),
- p = e('querystringify'),
- t =
- /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,
- m = /[\n\r\t]/g,
- i = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//,
- l = /:\d+$/,
- u = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,
- v = /^[a-zA-Z]:/
- function b(e) {
- return (e || '').toString().replace(t, '')
- }
- var y = [
- ['#', 'hash'],
- ['?', 'query'],
- function (e, t) {
- return w(t.protocol) ? e.replace(/\\/g, '/') : e
- },
- ['/', 'pathname'],
- ['@', 'auth', 1],
- [NaN, 'host', void 0, 1, 1],
- [/:(\d*)$/, 'port', void 0, 1],
- [NaN, 'hostname', void 0, 1, 1]
- ],
- s = { hash: 1, query: 1 }
- function g(e) {
- var t,
- n =
- ('undefined' != typeof window
- ? window
- : void 0 !== a
- ? a
- : 'undefined' != typeof self
- ? self
- : {}
- ).location || {},
- r = {},
- o = typeof (e = e || n)
- if ('blob:' === e.protocol) r = new _(unescape(e.pathname), {})
- else if ('string' == o) for (t in ((r = new _(e, {})), s)) delete r[t]
- else if ('object' == o) {
- for (t in e) t in s || (r[t] = e[t])
- void 0 === r.slashes && (r.slashes = i.test(e.href))
- }
- return r
- }
- function w(e) {
- return (
- 'file:' === e ||
- 'ftp:' === e ||
- 'http:' === e ||
- 'https:' === e ||
- 'ws:' === e ||
- 'wss:' === e
- )
- }
- function x(e, t) {
- ;(e = (e = b(e)).replace(m, '')), (t = t || {})
- var n,
- r = u.exec(e),
- o = r[1] ? r[1].toLowerCase() : '',
- i = !!r[2],
- s = !!r[3],
- a = 0
- return (
- i
- ? (a = s
- ? ((n = r[2] + r[3] + r[4]), r[2].length + r[3].length)
- : ((n = r[2] + r[4]), r[2].length))
- : s
- ? ((n = r[3] + r[4]), (a = r[3].length))
- : (n = r[4]),
- 'file:' === o
- ? 2 <= a && (n = n.slice(2))
- : w(o)
- ? (n = r[4])
- : o
- ? i && (n = n.slice(2))
- : 2 <= a && w(t.protocol) && (n = r[4]),
- { protocol: o, slashes: i || w(o), slashesCount: a, rest: n }
- )
- }
- function _(e, t, n) {
- if (((e = (e = b(e)).replace(m, '')), !(this instanceof _)))
- return new _(e, t, n)
- var r,
- o,
- i,
- s,
- a,
- l,
- u = y.slice(),
- c = typeof t,
- f = this,
- h = 0
- for (
- 'object' != c && 'string' != c && ((n = t), (t = null)),
- n && 'function' != typeof n && (n = p.parse),
- r = !(o = x(e || '', (t = g(t)))).protocol && !o.slashes,
- f.slashes = o.slashes || (r && t.slashes),
- f.protocol = o.protocol || t.protocol || '',
- e = o.rest,
- (('file:' === o.protocol && (2 !== o.slashesCount || v.test(e))) ||
- (!o.slashes &&
- (o.protocol || o.slashesCount < 2 || !w(f.protocol)))) &&
- (u[3] = [/(.*)/, 'pathname']);
- h < u.length;
- h++
- )
- 'function' != typeof (s = u[h])
- ? ((i = s[0]),
- (l = s[1]),
- i != i
- ? (f[l] = e)
- : 'string' == typeof i
- ? ~(a = '@' === i ? e.lastIndexOf(i) : e.indexOf(i)) &&
- (e =
- 'number' == typeof s[2]
- ? ((f[l] = e.slice(0, a)), e.slice(a + s[2]))
- : ((f[l] = e.slice(a)), e.slice(0, a)))
- : (a = i.exec(e)) && ((f[l] = a[1]), (e = e.slice(0, a.index))),
- (f[l] = f[l] || (r && s[3] && t[l]) || ''),
- s[4] && (f[l] = f[l].toLowerCase()))
- : (e = s(e, f))
- n && (f.query = n(f.query)),
- r &&
- t.slashes &&
- '/' !== f.pathname.charAt(0) &&
- ('' !== f.pathname || '' !== t.pathname) &&
- (f.pathname = (function (e, t) {
- if ('' === e) return t
- for (
- var n = (t || '/').split('/').slice(0, -1).concat(e.split('/')),
- r = n.length,
- o = n[r - 1],
- i = !1,
- s = 0;
- r--;
- )
- '.' === n[r]
- ? n.splice(r, 1)
- : '..' === n[r]
- ? (n.splice(r, 1), s++)
- : s && (0 === r && (i = !0), n.splice(r, 1), s--)
- return (
- i && n.unshift(''),
- ('.' !== o && '..' !== o) || n.push(''),
- n.join('/')
- )
- })(f.pathname, t.pathname)),
- '/' !== f.pathname.charAt(0) &&
- w(f.protocol) &&
- (f.pathname = '/' + f.pathname),
- d(f.port, f.protocol) || ((f.host = f.hostname), (f.port = '')),
- (f.username = f.password = ''),
- f.auth &&
- (~(a = f.auth.indexOf(':'))
- ? ((f.username = f.auth.slice(0, a)),
- (f.username = encodeURIComponent(decodeURIComponent(f.username))),
- (f.password = f.auth.slice(a + 1)),
- (f.password = encodeURIComponent(decodeURIComponent(f.password))))
- : (f.username = encodeURIComponent(decodeURIComponent(f.auth))),
- (f.auth = f.password ? f.username + ':' + f.password : f.username)),
- (f.origin =
- 'file:' !== f.protocol && w(f.protocol) && f.host
- ? f.protocol + '//' + f.host
- : 'null'),
- (f.href = f.toString())
- }
- ;(_.prototype = {
- set: function (e, t, n) {
- var r = this
- switch (e) {
- case 'query':
- 'string' == typeof t && t.length && (t = (n || p.parse)(t)),
- (r[e] = t)
- break
- case 'port':
- ;(r[e] = t),
- d(t, r.protocol)
- ? t && (r.host = r.hostname + ':' + t)
- : ((r.host = r.hostname), (r[e] = ''))
- break
- case 'hostname':
- ;(r[e] = t), r.port && (t += ':' + r.port), (r.host = t)
- break
- case 'host':
- ;(r[e] = t),
- l.test(t)
- ? ((t = t.split(':')),
- (r.port = t.pop()),
- (r.hostname = t.join(':')))
- : ((r.hostname = t), (r.port = ''))
- break
- case 'protocol':
- ;(r.protocol = t.toLowerCase()), (r.slashes = !n)
- break
- case 'pathname':
- case 'hash':
- if (t) {
- var o = 'pathname' === e ? '/' : '#'
- r[e] = t.charAt(0) !== o ? o + t : t
- } else r[e] = t
- break
- case 'username':
- case 'password':
- r[e] = encodeURIComponent(t)
- break
- case 'auth':
- var i = t.indexOf(':')
- ~i
- ? ((r.username = t.slice(0, i)),
- (r.username = encodeURIComponent(
- decodeURIComponent(r.username)
- )),
- (r.password = t.slice(i + 1)),
- (r.password = encodeURIComponent(
- decodeURIComponent(r.password)
- )))
- : (r.username = encodeURIComponent(decodeURIComponent(t)))
- }
- for (var s = 0; s < y.length; s++) {
- var a = y[s]
- a[4] && (r[a[1]] = r[a[1]].toLowerCase())
- }
- return (
- (r.auth = r.password ? r.username + ':' + r.password : r.username),
- (r.origin =
- 'file:' !== r.protocol && w(r.protocol) && r.host
- ? r.protocol + '//' + r.host
- : 'null'),
- (r.href = r.toString()),
- r
- )
- },
- toString: function (e) {
- ;(e && 'function' == typeof e) || (e = p.stringify)
- var t,
- n = this,
- r = n.host,
- o = n.protocol
- o && ':' !== o.charAt(o.length - 1) && (o += ':')
- var i = o + ((n.protocol && n.slashes) || w(n.protocol) ? '//' : '')
- return (
- n.username
- ? ((i += n.username),
- n.password && (i += ':' + n.password),
- (i += '@'))
- : n.password
- ? ((i += ':' + n.password), (i += '@'))
- : 'file:' !== n.protocol &&
- w(n.protocol) &&
- !r &&
- '/' !== n.pathname &&
- (i += '@'),
- (':' === r[r.length - 1] || (l.test(n.hostname) && !n.port)) &&
- (r += ':'),
- (i += r + n.pathname),
- (t = 'object' == typeof n.query ? e(n.query) : n.query) &&
- (i += '?' !== t.charAt(0) ? '?' + t : t),
- n.hash && (i += n.hash),
- i
- )
- }
- }),
- (_.extractProtocol = x),
- (_.location = g),
- (_.trimLeft = b),
- (_.qs = p),
- (n.exports = _)
- }).call(this)
- }).call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- )
- },
- { querystringify: 55, 'requires-port': 56 }
- ]
- },
- {},
- [1]
- )(1)
- })
- //# sourceMappingURL=sockjs.min.js.map
|