index.js 171 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["SockJS"] = factory();
  8. else
  9. root["SockJS"] = factory();
  10. })((typeof self !== 'undefined' ? self : this), function() {
  11. return /******/ (function() { // webpackBootstrap
  12. /******/ var __webpack_modules__ = ({
  13. /***/ "./node_modules/inherits/inherits_browser.js":
  14. /*!***************************************************!*\
  15. !*** ./node_modules/inherits/inherits_browser.js ***!
  16. \***************************************************/
  17. /***/ (function(module) {
  18. if (typeof Object.create === 'function') {
  19. // implementation from standard node.js 'util' module
  20. module.exports = function inherits(ctor, superCtor) {
  21. if (superCtor) {
  22. ctor.super_ = superCtor;
  23. ctor.prototype = Object.create(superCtor.prototype, {
  24. constructor: {
  25. value: ctor,
  26. enumerable: false,
  27. writable: true,
  28. configurable: true
  29. }
  30. });
  31. }
  32. };
  33. } else {
  34. // old school shim for old browsers
  35. module.exports = function inherits(ctor, superCtor) {
  36. if (superCtor) {
  37. ctor.super_ = superCtor;
  38. var TempCtor = function TempCtor() {};
  39. TempCtor.prototype = superCtor.prototype;
  40. ctor.prototype = new TempCtor();
  41. ctor.prototype.constructor = ctor;
  42. }
  43. };
  44. }
  45. /***/ }),
  46. /***/ "./node_modules/ms/index.js":
  47. /*!**********************************!*\
  48. !*** ./node_modules/ms/index.js ***!
  49. \**********************************/
  50. /***/ (function(module) {
  51. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  52. /**
  53. * Helpers.
  54. */
  55. var s = 1000;
  56. var m = s * 60;
  57. var h = m * 60;
  58. var d = h * 24;
  59. var w = d * 7;
  60. var y = d * 365.25;
  61. /**
  62. * Parse or format the given `val`.
  63. *
  64. * Options:
  65. *
  66. * - `long` verbose formatting [false]
  67. *
  68. * @param {String|Number} val
  69. * @param {Object} [options]
  70. * @throws {Error} throw an error if val is not a non-empty string or a number
  71. * @return {String|Number}
  72. * @api public
  73. */
  74. module.exports = function (val, options) {
  75. options = options || {};
  76. var type = _typeof(val);
  77. if (type === 'string' && val.length > 0) {
  78. return parse(val);
  79. } else if (type === 'number' && isFinite(val)) {
  80. return options.long ? fmtLong(val) : fmtShort(val);
  81. }
  82. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  83. };
  84. /**
  85. * Parse the given `str` and return milliseconds.
  86. *
  87. * @param {String} str
  88. * @return {Number}
  89. * @api private
  90. */
  91. function parse(str) {
  92. str = String(str);
  93. if (str.length > 100) {
  94. return;
  95. }
  96. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
  97. if (!match) {
  98. return;
  99. }
  100. var n = parseFloat(match[1]);
  101. var type = (match[2] || 'ms').toLowerCase();
  102. switch (type) {
  103. case 'years':
  104. case 'year':
  105. case 'yrs':
  106. case 'yr':
  107. case 'y':
  108. return n * y;
  109. case 'weeks':
  110. case 'week':
  111. case 'w':
  112. return n * w;
  113. case 'days':
  114. case 'day':
  115. case 'd':
  116. return n * d;
  117. case 'hours':
  118. case 'hour':
  119. case 'hrs':
  120. case 'hr':
  121. case 'h':
  122. return n * h;
  123. case 'minutes':
  124. case 'minute':
  125. case 'mins':
  126. case 'min':
  127. case 'm':
  128. return n * m;
  129. case 'seconds':
  130. case 'second':
  131. case 'secs':
  132. case 'sec':
  133. case 's':
  134. return n * s;
  135. case 'milliseconds':
  136. case 'millisecond':
  137. case 'msecs':
  138. case 'msec':
  139. case 'ms':
  140. return n;
  141. default:
  142. return undefined;
  143. }
  144. }
  145. /**
  146. * Short format for `ms`.
  147. *
  148. * @param {Number} ms
  149. * @return {String}
  150. * @api private
  151. */
  152. function fmtShort(ms) {
  153. var msAbs = Math.abs(ms);
  154. if (msAbs >= d) {
  155. return Math.round(ms / d) + 'd';
  156. }
  157. if (msAbs >= h) {
  158. return Math.round(ms / h) + 'h';
  159. }
  160. if (msAbs >= m) {
  161. return Math.round(ms / m) + 'm';
  162. }
  163. if (msAbs >= s) {
  164. return Math.round(ms / s) + 's';
  165. }
  166. return ms + 'ms';
  167. }
  168. /**
  169. * Long format for `ms`.
  170. *
  171. * @param {Number} ms
  172. * @return {String}
  173. * @api private
  174. */
  175. function fmtLong(ms) {
  176. var msAbs = Math.abs(ms);
  177. if (msAbs >= d) {
  178. return plural(ms, msAbs, d, 'day');
  179. }
  180. if (msAbs >= h) {
  181. return plural(ms, msAbs, h, 'hour');
  182. }
  183. if (msAbs >= m) {
  184. return plural(ms, msAbs, m, 'minute');
  185. }
  186. if (msAbs >= s) {
  187. return plural(ms, msAbs, s, 'second');
  188. }
  189. return ms + ' ms';
  190. }
  191. /**
  192. * Pluralization helper.
  193. */
  194. function plural(ms, msAbs, n, name) {
  195. var isPlural = msAbs >= n * 1.5;
  196. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  197. }
  198. /***/ }),
  199. /***/ "./node_modules/querystringify/index.js":
  200. /*!**********************************************!*\
  201. !*** ./node_modules/querystringify/index.js ***!
  202. \**********************************************/
  203. /***/ (function(__unused_webpack_module, exports) {
  204. "use strict";
  205. var has = Object.prototype.hasOwnProperty,
  206. undef;
  207. /**
  208. * Decode a URI encoded string.
  209. *
  210. * @param {String} input The URI encoded string.
  211. * @returns {String|Null} The decoded string.
  212. * @api private
  213. */
  214. function decode(input) {
  215. try {
  216. return decodeURIComponent(input.replace(/\+/g, ' '));
  217. } catch (e) {
  218. return null;
  219. }
  220. }
  221. /**
  222. * Attempts to encode a given input.
  223. *
  224. * @param {String} input The string that needs to be encoded.
  225. * @returns {String|Null} The encoded string.
  226. * @api private
  227. */
  228. function encode(input) {
  229. try {
  230. return encodeURIComponent(input);
  231. } catch (e) {
  232. return null;
  233. }
  234. }
  235. /**
  236. * Simple query string parser.
  237. *
  238. * @param {String} query The query string that needs to be parsed.
  239. * @returns {Object}
  240. * @api public
  241. */
  242. function querystring(query) {
  243. var parser = /([^=?#&]+)=?([^&]*)/g,
  244. result = {},
  245. part;
  246. while (part = parser.exec(query)) {
  247. var key = decode(part[1]),
  248. value = decode(part[2]);
  249. //
  250. // Prevent overriding of existing properties. This ensures that build-in
  251. // methods like `toString` or __proto__ are not overriden by malicious
  252. // querystrings.
  253. //
  254. // In the case if failed decoding, we want to omit the key/value pairs
  255. // from the result.
  256. //
  257. if (key === null || value === null || key in result) continue;
  258. result[key] = value;
  259. }
  260. return result;
  261. }
  262. /**
  263. * Transform a query string to an object.
  264. *
  265. * @param {Object} obj Object that should be transformed.
  266. * @param {String} prefix Optional prefix.
  267. * @returns {String}
  268. * @api public
  269. */
  270. function querystringify(obj, prefix) {
  271. prefix = prefix || '';
  272. var pairs = [],
  273. value,
  274. key;
  275. //
  276. // Optionally prefix with a '?' if needed
  277. //
  278. if ('string' !== typeof prefix) prefix = '?';
  279. for (key in obj) {
  280. if (has.call(obj, key)) {
  281. value = obj[key];
  282. //
  283. // Edge cases where we actually want to encode the value to an empty
  284. // string instead of the stringified value.
  285. //
  286. if (!value && (value === null || value === undef || isNaN(value))) {
  287. value = '';
  288. }
  289. key = encode(key);
  290. value = encode(value);
  291. //
  292. // If we failed to encode the strings, we should bail out as we don't
  293. // want to add invalid strings to the query.
  294. //
  295. if (key === null || value === null) continue;
  296. pairs.push(key + '=' + value);
  297. }
  298. }
  299. return pairs.length ? prefix + pairs.join('&') : '';
  300. }
  301. //
  302. // Expose the module.
  303. //
  304. exports.stringify = querystringify;
  305. exports.parse = querystring;
  306. /***/ }),
  307. /***/ "./node_modules/requires-port/index.js":
  308. /*!*********************************************!*\
  309. !*** ./node_modules/requires-port/index.js ***!
  310. \*********************************************/
  311. /***/ (function(module) {
  312. "use strict";
  313. /**
  314. * Check if we're required to add a port number.
  315. *
  316. * @see https://url.spec.whatwg.org/#default-port
  317. * @param {Number|String} port Port number we need to check
  318. * @param {String} protocol Protocol we need to check against.
  319. * @returns {Boolean} Is it a default port for the given protocol
  320. * @api private
  321. */
  322. module.exports = function required(port, protocol) {
  323. protocol = protocol.split(':')[0];
  324. port = +port;
  325. if (!port) return false;
  326. switch (protocol) {
  327. case 'http':
  328. case 'ws':
  329. return port !== 80;
  330. case 'https':
  331. case 'wss':
  332. return port !== 443;
  333. case 'ftp':
  334. return port !== 21;
  335. case 'gopher':
  336. return port !== 70;
  337. case 'file':
  338. return false;
  339. }
  340. return port !== 0;
  341. };
  342. /***/ }),
  343. /***/ "./node_modules/sockjs-client/lib/entry.js":
  344. /*!*************************************************!*\
  345. !*** ./node_modules/sockjs-client/lib/entry.js ***!
  346. \*************************************************/
  347. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  348. "use strict";
  349. var transportList = __webpack_require__(/*! ./transport-list */ "./node_modules/sockjs-client/lib/transport-list.js");
  350. module.exports = __webpack_require__(/*! ./main */ "./node_modules/sockjs-client/lib/main.js")(transportList);
  351. // TODO can't get rid of this until all servers do
  352. if ('_sockjs_onload' in __webpack_require__.g) {
  353. setTimeout(__webpack_require__.g._sockjs_onload, 1);
  354. }
  355. /***/ }),
  356. /***/ "./node_modules/sockjs-client/lib/event/close.js":
  357. /*!*******************************************************!*\
  358. !*** ./node_modules/sockjs-client/lib/event/close.js ***!
  359. \*******************************************************/
  360. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  361. "use strict";
  362. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  363. Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js");
  364. function CloseEvent() {
  365. Event.call(this);
  366. this.initEvent('close', false, false);
  367. this.wasClean = false;
  368. this.code = 0;
  369. this.reason = '';
  370. }
  371. inherits(CloseEvent, Event);
  372. module.exports = CloseEvent;
  373. /***/ }),
  374. /***/ "./node_modules/sockjs-client/lib/event/emitter.js":
  375. /*!*********************************************************!*\
  376. !*** ./node_modules/sockjs-client/lib/event/emitter.js ***!
  377. \*********************************************************/
  378. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  379. "use strict";
  380. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  381. EventTarget = __webpack_require__(/*! ./eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js");
  382. function EventEmitter() {
  383. EventTarget.call(this);
  384. }
  385. inherits(EventEmitter, EventTarget);
  386. EventEmitter.prototype.removeAllListeners = function (type) {
  387. if (type) {
  388. delete this._listeners[type];
  389. } else {
  390. this._listeners = {};
  391. }
  392. };
  393. EventEmitter.prototype.once = function (type, listener) {
  394. var self = this,
  395. fired = false;
  396. function g() {
  397. self.removeListener(type, g);
  398. if (!fired) {
  399. fired = true;
  400. listener.apply(this, arguments);
  401. }
  402. }
  403. this.on(type, g);
  404. };
  405. EventEmitter.prototype.emit = function () {
  406. var type = arguments[0];
  407. var listeners = this._listeners[type];
  408. if (!listeners) {
  409. return;
  410. }
  411. // equivalent of Array.prototype.slice.call(arguments, 1);
  412. var l = arguments.length;
  413. var args = new Array(l - 1);
  414. for (var ai = 1; ai < l; ai++) {
  415. args[ai - 1] = arguments[ai];
  416. }
  417. for (var i = 0; i < listeners.length; i++) {
  418. listeners[i].apply(this, args);
  419. }
  420. };
  421. EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;
  422. EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;
  423. module.exports.EventEmitter = EventEmitter;
  424. /***/ }),
  425. /***/ "./node_modules/sockjs-client/lib/event/event.js":
  426. /*!*******************************************************!*\
  427. !*** ./node_modules/sockjs-client/lib/event/event.js ***!
  428. \*******************************************************/
  429. /***/ (function(module) {
  430. "use strict";
  431. function Event(eventType) {
  432. this.type = eventType;
  433. }
  434. Event.prototype.initEvent = function (eventType, canBubble, cancelable) {
  435. this.type = eventType;
  436. this.bubbles = canBubble;
  437. this.cancelable = cancelable;
  438. this.timeStamp = +new Date();
  439. return this;
  440. };
  441. Event.prototype.stopPropagation = function () {};
  442. Event.prototype.preventDefault = function () {};
  443. Event.CAPTURING_PHASE = 1;
  444. Event.AT_TARGET = 2;
  445. Event.BUBBLING_PHASE = 3;
  446. module.exports = Event;
  447. /***/ }),
  448. /***/ "./node_modules/sockjs-client/lib/event/eventtarget.js":
  449. /*!*************************************************************!*\
  450. !*** ./node_modules/sockjs-client/lib/event/eventtarget.js ***!
  451. \*************************************************************/
  452. /***/ (function(module) {
  453. "use strict";
  454. /* Simplified implementation of DOM2 EventTarget.
  455. * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
  456. */
  457. function EventTarget() {
  458. this._listeners = {};
  459. }
  460. EventTarget.prototype.addEventListener = function (eventType, listener) {
  461. if (!(eventType in this._listeners)) {
  462. this._listeners[eventType] = [];
  463. }
  464. var arr = this._listeners[eventType];
  465. // #4
  466. if (arr.indexOf(listener) === -1) {
  467. // Make a copy so as not to interfere with a current dispatchEvent.
  468. arr = arr.concat([listener]);
  469. }
  470. this._listeners[eventType] = arr;
  471. };
  472. EventTarget.prototype.removeEventListener = function (eventType, listener) {
  473. var arr = this._listeners[eventType];
  474. if (!arr) {
  475. return;
  476. }
  477. var idx = arr.indexOf(listener);
  478. if (idx !== -1) {
  479. if (arr.length > 1) {
  480. // Make a copy so as not to interfere with a current dispatchEvent.
  481. this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));
  482. } else {
  483. delete this._listeners[eventType];
  484. }
  485. return;
  486. }
  487. };
  488. EventTarget.prototype.dispatchEvent = function () {
  489. var event = arguments[0];
  490. var t = event.type;
  491. // equivalent of Array.prototype.slice.call(arguments, 0);
  492. var args = arguments.length === 1 ? [event] : Array.apply(null, arguments);
  493. // TODO: This doesn't match the real behavior; per spec, onfoo get
  494. // their place in line from the /first/ time they're set from
  495. // non-null. Although WebKit bumps it to the end every time it's
  496. // set.
  497. if (this['on' + t]) {
  498. this['on' + t].apply(this, args);
  499. }
  500. if (t in this._listeners) {
  501. // Grab a reference to the listeners list. removeEventListener may alter the list.
  502. var listeners = this._listeners[t];
  503. for (var i = 0; i < listeners.length; i++) {
  504. listeners[i].apply(this, args);
  505. }
  506. }
  507. };
  508. module.exports = EventTarget;
  509. /***/ }),
  510. /***/ "./node_modules/sockjs-client/lib/event/trans-message.js":
  511. /*!***************************************************************!*\
  512. !*** ./node_modules/sockjs-client/lib/event/trans-message.js ***!
  513. \***************************************************************/
  514. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  515. "use strict";
  516. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  517. Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js");
  518. function TransportMessageEvent(data) {
  519. Event.call(this);
  520. this.initEvent('message', false, false);
  521. this.data = data;
  522. }
  523. inherits(TransportMessageEvent, Event);
  524. module.exports = TransportMessageEvent;
  525. /***/ }),
  526. /***/ "./node_modules/sockjs-client/lib/facade.js":
  527. /*!**************************************************!*\
  528. !*** ./node_modules/sockjs-client/lib/facade.js ***!
  529. \**************************************************/
  530. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  531. "use strict";
  532. var iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js");
  533. function FacadeJS(transport) {
  534. this._transport = transport;
  535. transport.on('message', this._transportMessage.bind(this));
  536. transport.on('close', this._transportClose.bind(this));
  537. }
  538. FacadeJS.prototype._transportClose = function (code, reason) {
  539. iframeUtils.postMessage('c', JSON.stringify([code, reason]));
  540. };
  541. FacadeJS.prototype._transportMessage = function (frame) {
  542. iframeUtils.postMessage('t', frame);
  543. };
  544. FacadeJS.prototype._send = function (data) {
  545. this._transport.send(data);
  546. };
  547. FacadeJS.prototype._close = function () {
  548. this._transport.close();
  549. this._transport.removeAllListeners();
  550. };
  551. module.exports = FacadeJS;
  552. /***/ }),
  553. /***/ "./node_modules/sockjs-client/lib/iframe-bootstrap.js":
  554. /*!************************************************************!*\
  555. !*** ./node_modules/sockjs-client/lib/iframe-bootstrap.js ***!
  556. \************************************************************/
  557. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  558. "use strict";
  559. var urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  560. eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  561. FacadeJS = __webpack_require__(/*! ./facade */ "./node_modules/sockjs-client/lib/facade.js"),
  562. InfoIframeReceiver = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js"),
  563. iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  564. loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js");
  565. var debug = function debug() {};
  566. if (true) {
  567. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:iframe-bootstrap');
  568. }
  569. module.exports = function (SockJS, availableTransports) {
  570. var transportMap = {};
  571. availableTransports.forEach(function (at) {
  572. if (at.facadeTransport) {
  573. transportMap[at.facadeTransport.transportName] = at.facadeTransport;
  574. }
  575. });
  576. // hard-coded for the info iframe
  577. // TODO see if we can make this more dynamic
  578. transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;
  579. var parentOrigin;
  580. /* eslint-disable camelcase */
  581. SockJS.bootstrap_iframe = function () {
  582. /* eslint-enable camelcase */
  583. var facade;
  584. iframeUtils.currentWindowId = loc.hash.slice(1);
  585. var onMessage = function onMessage(e) {
  586. if (e.source !== parent) {
  587. return;
  588. }
  589. if (typeof parentOrigin === 'undefined') {
  590. parentOrigin = e.origin;
  591. }
  592. if (e.origin !== parentOrigin) {
  593. return;
  594. }
  595. var iframeMessage;
  596. try {
  597. iframeMessage = JSON.parse(e.data);
  598. } catch (ignored) {
  599. debug('bad json', e.data);
  600. return;
  601. }
  602. if (iframeMessage.windowId !== iframeUtils.currentWindowId) {
  603. return;
  604. }
  605. switch (iframeMessage.type) {
  606. case 's':
  607. var p;
  608. try {
  609. p = JSON.parse(iframeMessage.data);
  610. } catch (ignored) {
  611. debug('bad json', iframeMessage.data);
  612. break;
  613. }
  614. var version = p[0];
  615. var transport = p[1];
  616. var transUrl = p[2];
  617. var baseUrl = p[3];
  618. debug(version, transport, transUrl, baseUrl);
  619. // change this to semver logic
  620. if (version !== SockJS.version) {
  621. throw new Error('Incompatible SockJS! Main site uses:' + ' "' + version + '", the iframe:' + ' "' + SockJS.version + '".');
  622. }
  623. if (!urlUtils.isOriginEqual(transUrl, loc.href) || !urlUtils.isOriginEqual(baseUrl, loc.href)) {
  624. throw new Error('Can\'t connect to different domain from within an ' + 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');
  625. }
  626. facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));
  627. break;
  628. case 'm':
  629. facade._send(iframeMessage.data);
  630. break;
  631. case 'c':
  632. if (facade) {
  633. facade._close();
  634. }
  635. facade = null;
  636. break;
  637. }
  638. };
  639. eventUtils.attachEvent('message', onMessage);
  640. // Start
  641. iframeUtils.postMessage('s');
  642. };
  643. };
  644. /***/ }),
  645. /***/ "./node_modules/sockjs-client/lib/info-ajax.js":
  646. /*!*****************************************************!*\
  647. !*** ./node_modules/sockjs-client/lib/info-ajax.js ***!
  648. \*****************************************************/
  649. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  650. "use strict";
  651. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  652. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  653. objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
  654. var debug = function debug() {};
  655. if (true) {
  656. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-ajax');
  657. }
  658. function InfoAjax(url, AjaxObject) {
  659. EventEmitter.call(this);
  660. var self = this;
  661. var t0 = +new Date();
  662. this.xo = new AjaxObject('GET', url);
  663. this.xo.once('finish', function (status, text) {
  664. var info, rtt;
  665. if (status === 200) {
  666. rtt = +new Date() - t0;
  667. if (text) {
  668. try {
  669. info = JSON.parse(text);
  670. } catch (e) {
  671. debug('bad json', text);
  672. }
  673. }
  674. if (!objectUtils.isObject(info)) {
  675. info = {};
  676. }
  677. }
  678. self.emit('finish', info, rtt);
  679. self.removeAllListeners();
  680. });
  681. }
  682. inherits(InfoAjax, EventEmitter);
  683. InfoAjax.prototype.close = function () {
  684. this.removeAllListeners();
  685. this.xo.close();
  686. };
  687. module.exports = InfoAjax;
  688. /***/ }),
  689. /***/ "./node_modules/sockjs-client/lib/info-iframe-receiver.js":
  690. /*!****************************************************************!*\
  691. !*** ./node_modules/sockjs-client/lib/info-iframe-receiver.js ***!
  692. \****************************************************************/
  693. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  694. "use strict";
  695. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  696. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  697. XHRLocalObject = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  698. InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
  699. function InfoReceiverIframe(transUrl) {
  700. var self = this;
  701. EventEmitter.call(this);
  702. this.ir = new InfoAjax(transUrl, XHRLocalObject);
  703. this.ir.once('finish', function (info, rtt) {
  704. self.ir = null;
  705. self.emit('message', JSON.stringify([info, rtt]));
  706. });
  707. }
  708. inherits(InfoReceiverIframe, EventEmitter);
  709. InfoReceiverIframe.transportName = 'iframe-info-receiver';
  710. InfoReceiverIframe.prototype.close = function () {
  711. if (this.ir) {
  712. this.ir.close();
  713. this.ir = null;
  714. }
  715. this.removeAllListeners();
  716. };
  717. module.exports = InfoReceiverIframe;
  718. /***/ }),
  719. /***/ "./node_modules/sockjs-client/lib/info-iframe.js":
  720. /*!*******************************************************!*\
  721. !*** ./node_modules/sockjs-client/lib/info-iframe.js ***!
  722. \*******************************************************/
  723. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  724. "use strict";
  725. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  726. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  727. utils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  728. IframeTransport = __webpack_require__(/*! ./transport/iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js"),
  729. InfoReceiverIframe = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js");
  730. var debug = function debug() {};
  731. if (true) {
  732. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-iframe');
  733. }
  734. function InfoIframe(baseUrl, url) {
  735. var self = this;
  736. EventEmitter.call(this);
  737. var go = function go() {
  738. var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
  739. ifr.once('message', function (msg) {
  740. if (msg) {
  741. var d;
  742. try {
  743. d = JSON.parse(msg);
  744. } catch (e) {
  745. debug('bad json', msg);
  746. self.emit('finish');
  747. self.close();
  748. return;
  749. }
  750. var info = d[0],
  751. rtt = d[1];
  752. self.emit('finish', info, rtt);
  753. }
  754. self.close();
  755. });
  756. ifr.once('close', function () {
  757. self.emit('finish');
  758. self.close();
  759. });
  760. };
  761. // TODO this seems the same as the 'needBody' from transports
  762. if (!__webpack_require__.g.document.body) {
  763. utils.attachEvent('load', go);
  764. } else {
  765. go();
  766. }
  767. }
  768. inherits(InfoIframe, EventEmitter);
  769. InfoIframe.enabled = function () {
  770. return IframeTransport.enabled();
  771. };
  772. InfoIframe.prototype.close = function () {
  773. if (this.ifr) {
  774. this.ifr.close();
  775. }
  776. this.removeAllListeners();
  777. this.ifr = null;
  778. };
  779. module.exports = InfoIframe;
  780. /***/ }),
  781. /***/ "./node_modules/sockjs-client/lib/info-receiver.js":
  782. /*!*********************************************************!*\
  783. !*** ./node_modules/sockjs-client/lib/info-receiver.js ***!
  784. \*********************************************************/
  785. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  786. "use strict";
  787. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  788. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  789. urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  790. XDR = __webpack_require__(/*! ./transport/sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js"),
  791. XHRCors = __webpack_require__(/*! ./transport/sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  792. XHRLocal = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  793. XHRFake = __webpack_require__(/*! ./transport/sender/xhr-fake */ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js"),
  794. InfoIframe = __webpack_require__(/*! ./info-iframe */ "./node_modules/sockjs-client/lib/info-iframe.js"),
  795. InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
  796. var debug = function debug() {};
  797. if (true) {
  798. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-receiver');
  799. }
  800. function InfoReceiver(baseUrl, urlInfo) {
  801. debug(baseUrl);
  802. var self = this;
  803. EventEmitter.call(this);
  804. setTimeout(function () {
  805. self.doXhr(baseUrl, urlInfo);
  806. }, 0);
  807. }
  808. inherits(InfoReceiver, EventEmitter);
  809. // TODO this is currently ignoring the list of available transports and the whitelist
  810. InfoReceiver._getReceiver = function (baseUrl, url, urlInfo) {
  811. // determine method of CORS support (if needed)
  812. if (urlInfo.sameOrigin) {
  813. return new InfoAjax(url, XHRLocal);
  814. }
  815. if (XHRCors.enabled) {
  816. return new InfoAjax(url, XHRCors);
  817. }
  818. if (XDR.enabled && urlInfo.sameScheme) {
  819. return new InfoAjax(url, XDR);
  820. }
  821. if (InfoIframe.enabled()) {
  822. return new InfoIframe(baseUrl, url);
  823. }
  824. return new InfoAjax(url, XHRFake);
  825. };
  826. InfoReceiver.prototype.doXhr = function (baseUrl, urlInfo) {
  827. var self = this,
  828. url = urlUtils.addPath(baseUrl, '/info');
  829. debug('doXhr', url);
  830. this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
  831. this.timeoutRef = setTimeout(function () {
  832. debug('timeout');
  833. self._cleanup(false);
  834. self.emit('finish');
  835. }, InfoReceiver.timeout);
  836. this.xo.once('finish', function (info, rtt) {
  837. debug('finish', info, rtt);
  838. self._cleanup(true);
  839. self.emit('finish', info, rtt);
  840. });
  841. };
  842. InfoReceiver.prototype._cleanup = function (wasClean) {
  843. debug('_cleanup');
  844. clearTimeout(this.timeoutRef);
  845. this.timeoutRef = null;
  846. if (!wasClean && this.xo) {
  847. this.xo.close();
  848. }
  849. this.xo = null;
  850. };
  851. InfoReceiver.prototype.close = function () {
  852. debug('close');
  853. this.removeAllListeners();
  854. this._cleanup(false);
  855. };
  856. InfoReceiver.timeout = 8000;
  857. module.exports = InfoReceiver;
  858. /***/ }),
  859. /***/ "./node_modules/sockjs-client/lib/location.js":
  860. /*!****************************************************!*\
  861. !*** ./node_modules/sockjs-client/lib/location.js ***!
  862. \****************************************************/
  863. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  864. "use strict";
  865. module.exports = __webpack_require__.g.location || {
  866. origin: 'http://localhost:80',
  867. protocol: 'http:',
  868. host: 'localhost',
  869. port: 80,
  870. href: 'http://localhost/',
  871. hash: ''
  872. };
  873. /***/ }),
  874. /***/ "./node_modules/sockjs-client/lib/main.js":
  875. /*!************************************************!*\
  876. !*** ./node_modules/sockjs-client/lib/main.js ***!
  877. \************************************************/
  878. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  879. "use strict";
  880. __webpack_require__(/*! ./shims */ "./node_modules/sockjs-client/lib/shims.js");
  881. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js"),
  882. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  883. random = __webpack_require__(/*! ./utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  884. escape = __webpack_require__(/*! ./utils/escape */ "./node_modules/sockjs-client/lib/utils/escape.js"),
  885. urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  886. eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  887. transport = __webpack_require__(/*! ./utils/transport */ "./node_modules/sockjs-client/lib/utils/transport.js"),
  888. objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js"),
  889. browser = __webpack_require__(/*! ./utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  890. log = __webpack_require__(/*! ./utils/log */ "./node_modules/sockjs-client/lib/utils/log.js"),
  891. Event = __webpack_require__(/*! ./event/event */ "./node_modules/sockjs-client/lib/event/event.js"),
  892. EventTarget = __webpack_require__(/*! ./event/eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js"),
  893. loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js"),
  894. CloseEvent = __webpack_require__(/*! ./event/close */ "./node_modules/sockjs-client/lib/event/close.js"),
  895. TransportMessageEvent = __webpack_require__(/*! ./event/trans-message */ "./node_modules/sockjs-client/lib/event/trans-message.js"),
  896. InfoReceiver = __webpack_require__(/*! ./info-receiver */ "./node_modules/sockjs-client/lib/info-receiver.js");
  897. var debug = function debug() {};
  898. if (true) {
  899. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:main');
  900. }
  901. var transports;
  902. // follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface
  903. function SockJS(url, protocols, options) {
  904. if (!(this instanceof SockJS)) {
  905. return new SockJS(url, protocols, options);
  906. }
  907. if (arguments.length < 1) {
  908. throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
  909. }
  910. EventTarget.call(this);
  911. this.readyState = SockJS.CONNECTING;
  912. this.extensions = '';
  913. this.protocol = '';
  914. // non-standard extension
  915. options = options || {};
  916. if (options.protocols_whitelist) {
  917. log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
  918. }
  919. this._transportsWhitelist = options.transports;
  920. this._transportOptions = options.transportOptions || {};
  921. this._timeout = options.timeout || 0;
  922. var sessionId = options.sessionId || 8;
  923. if (typeof sessionId === 'function') {
  924. this._generateSessionId = sessionId;
  925. } else if (typeof sessionId === 'number') {
  926. this._generateSessionId = function () {
  927. return random.string(sessionId);
  928. };
  929. } else {
  930. throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');
  931. }
  932. this._server = options.server || random.numberString(1000);
  933. // Step 1 of WS spec - parse and validate the url. Issue #8
  934. var parsedUrl = new URL(url);
  935. if (!parsedUrl.host || !parsedUrl.protocol) {
  936. throw new SyntaxError("The URL '" + url + "' is invalid");
  937. } else if (parsedUrl.hash) {
  938. throw new SyntaxError('The URL must not contain a fragment');
  939. } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
  940. throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
  941. }
  942. var secure = parsedUrl.protocol === 'https:';
  943. // Step 2 - don't allow secure origin with an insecure protocol
  944. if (loc.protocol === 'https:' && !secure) {
  945. // exception is 127.0.0.0/8 and ::1 urls
  946. if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) {
  947. throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
  948. }
  949. }
  950. // Step 3 - check port access - no need here
  951. // Step 4 - parse protocols argument
  952. if (!protocols) {
  953. protocols = [];
  954. } else if (!Array.isArray(protocols)) {
  955. protocols = [protocols];
  956. }
  957. // Step 5 - check protocols argument
  958. var sortedProtocols = protocols.sort();
  959. sortedProtocols.forEach(function (proto, i) {
  960. if (!proto) {
  961. throw new SyntaxError("The protocols entry '" + proto + "' is invalid.");
  962. }
  963. if (i < sortedProtocols.length - 1 && proto === sortedProtocols[i + 1]) {
  964. throw new SyntaxError("The protocols entry '" + proto + "' is duplicated.");
  965. }
  966. });
  967. // Step 6 - convert origin
  968. var o = urlUtils.getOrigin(loc.href);
  969. this._origin = o ? o.toLowerCase() : null;
  970. // remove the trailing slash
  971. parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, ''));
  972. // store the sanitized url
  973. this.url = parsedUrl.href;
  974. debug('using url', this.url);
  975. // Step 7 - start connection in background
  976. // obtain server info
  977. // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26
  978. this._urlInfo = {
  979. nullOrigin: !browser.hasDomain(),
  980. sameOrigin: urlUtils.isOriginEqual(this.url, loc.href),
  981. sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)
  982. };
  983. this._ir = new InfoReceiver(this.url, this._urlInfo);
  984. this._ir.once('finish', this._receiveInfo.bind(this));
  985. }
  986. inherits(SockJS, EventTarget);
  987. function userSetCode(code) {
  988. return code === 1000 || code >= 3000 && code <= 4999;
  989. }
  990. SockJS.prototype.close = function (code, reason) {
  991. // Step 1
  992. if (code && !userSetCode(code)) {
  993. throw new Error('InvalidAccessError: Invalid code');
  994. }
  995. // Step 2.4 states the max is 123 bytes, but we are just checking length
  996. if (reason && reason.length > 123) {
  997. throw new SyntaxError('reason argument has an invalid length');
  998. }
  999. // Step 3.1
  1000. if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {
  1001. return;
  1002. }
  1003. // TODO look at docs to determine how to set this
  1004. var wasClean = true;
  1005. this._close(code || 1000, reason || 'Normal closure', wasClean);
  1006. };
  1007. SockJS.prototype.send = function (data) {
  1008. // #13 - convert anything non-string to string
  1009. // TODO this currently turns objects into [object Object]
  1010. if (typeof data !== 'string') {
  1011. data = '' + data;
  1012. }
  1013. if (this.readyState === SockJS.CONNECTING) {
  1014. throw new Error('InvalidStateError: The connection has not been established yet');
  1015. }
  1016. if (this.readyState !== SockJS.OPEN) {
  1017. return;
  1018. }
  1019. this._transport.send(escape.quote(data));
  1020. };
  1021. SockJS.version = __webpack_require__(/*! ./version */ "./node_modules/sockjs-client/lib/version.js");
  1022. SockJS.CONNECTING = 0;
  1023. SockJS.OPEN = 1;
  1024. SockJS.CLOSING = 2;
  1025. SockJS.CLOSED = 3;
  1026. SockJS.prototype._receiveInfo = function (info, rtt) {
  1027. debug('_receiveInfo', rtt);
  1028. this._ir = null;
  1029. if (!info) {
  1030. this._close(1002, 'Cannot connect to server');
  1031. return;
  1032. }
  1033. // establish a round-trip timeout (RTO) based on the
  1034. // round-trip time (RTT)
  1035. this._rto = this.countRTO(rtt);
  1036. // allow server to override url used for the actual transport
  1037. this._transUrl = info.base_url ? info.base_url : this.url;
  1038. info = objectUtils.extend(info, this._urlInfo);
  1039. debug('info', info);
  1040. // determine list of desired and supported transports
  1041. var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);
  1042. this._transports = enabledTransports.main;
  1043. debug(this._transports.length + ' enabled transports');
  1044. this._connect();
  1045. };
  1046. SockJS.prototype._connect = function () {
  1047. for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {
  1048. debug('attempt', Transport.transportName);
  1049. if (Transport.needBody) {
  1050. if (!__webpack_require__.g.document.body || typeof __webpack_require__.g.document.readyState !== 'undefined' && __webpack_require__.g.document.readyState !== 'complete' && __webpack_require__.g.document.readyState !== 'interactive') {
  1051. debug('waiting for body');
  1052. this._transports.unshift(Transport);
  1053. eventUtils.attachEvent('load', this._connect.bind(this));
  1054. return;
  1055. }
  1056. }
  1057. // calculate timeout based on RTO and round trips. Default to 5s
  1058. var timeoutMs = Math.max(this._timeout, this._rto * Transport.roundTrips || 5000);
  1059. this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);
  1060. debug('using timeout', timeoutMs);
  1061. var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());
  1062. var options = this._transportOptions[Transport.transportName];
  1063. debug('transport url', transportUrl);
  1064. var transportObj = new Transport(transportUrl, this._transUrl, options);
  1065. transportObj.on('message', this._transportMessage.bind(this));
  1066. transportObj.once('close', this._transportClose.bind(this));
  1067. transportObj.transportName = Transport.transportName;
  1068. this._transport = transportObj;
  1069. return;
  1070. }
  1071. this._close(2000, 'All transports failed', false);
  1072. };
  1073. SockJS.prototype._transportTimeout = function () {
  1074. debug('_transportTimeout');
  1075. if (this.readyState === SockJS.CONNECTING) {
  1076. if (this._transport) {
  1077. this._transport.close();
  1078. }
  1079. this._transportClose(2007, 'Transport timed out');
  1080. }
  1081. };
  1082. SockJS.prototype._transportMessage = function (msg) {
  1083. debug('_transportMessage', msg);
  1084. var self = this,
  1085. type = msg.slice(0, 1),
  1086. content = msg.slice(1),
  1087. payload;
  1088. // first check for messages that don't need a payload
  1089. switch (type) {
  1090. case 'o':
  1091. this._open();
  1092. return;
  1093. case 'h':
  1094. this.dispatchEvent(new Event('heartbeat'));
  1095. debug('heartbeat', this.transport);
  1096. return;
  1097. }
  1098. if (content) {
  1099. try {
  1100. payload = JSON.parse(content);
  1101. } catch (e) {
  1102. debug('bad json', content);
  1103. }
  1104. }
  1105. if (typeof payload === 'undefined') {
  1106. debug('empty payload', content);
  1107. return;
  1108. }
  1109. switch (type) {
  1110. case 'a':
  1111. if (Array.isArray(payload)) {
  1112. payload.forEach(function (p) {
  1113. debug('message', self.transport, p);
  1114. self.dispatchEvent(new TransportMessageEvent(p));
  1115. });
  1116. }
  1117. break;
  1118. case 'm':
  1119. debug('message', this.transport, payload);
  1120. this.dispatchEvent(new TransportMessageEvent(payload));
  1121. break;
  1122. case 'c':
  1123. if (Array.isArray(payload) && payload.length === 2) {
  1124. this._close(payload[0], payload[1], true);
  1125. }
  1126. break;
  1127. }
  1128. };
  1129. SockJS.prototype._transportClose = function (code, reason) {
  1130. debug('_transportClose', this.transport, code, reason);
  1131. if (this._transport) {
  1132. this._transport.removeAllListeners();
  1133. this._transport = null;
  1134. this.transport = null;
  1135. }
  1136. if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {
  1137. this._connect();
  1138. return;
  1139. }
  1140. this._close(code, reason);
  1141. };
  1142. SockJS.prototype._open = function () {
  1143. debug('_open', this._transport && this._transport.transportName, this.readyState);
  1144. if (this.readyState === SockJS.CONNECTING) {
  1145. if (this._transportTimeoutId) {
  1146. clearTimeout(this._transportTimeoutId);
  1147. this._transportTimeoutId = null;
  1148. }
  1149. this.readyState = SockJS.OPEN;
  1150. this.transport = this._transport.transportName;
  1151. this.dispatchEvent(new Event('open'));
  1152. debug('connected', this.transport);
  1153. } else {
  1154. // The server might have been restarted, and lost track of our
  1155. // connection.
  1156. this._close(1006, 'Server lost session');
  1157. }
  1158. };
  1159. SockJS.prototype._close = function (code, reason, wasClean) {
  1160. debug('_close', this.transport, code, reason, wasClean, this.readyState);
  1161. var forceFail = false;
  1162. if (this._ir) {
  1163. forceFail = true;
  1164. this._ir.close();
  1165. this._ir = null;
  1166. }
  1167. if (this._transport) {
  1168. this._transport.close();
  1169. this._transport = null;
  1170. this.transport = null;
  1171. }
  1172. if (this.readyState === SockJS.CLOSED) {
  1173. throw new Error('InvalidStateError: SockJS has already been closed');
  1174. }
  1175. this.readyState = SockJS.CLOSING;
  1176. setTimeout(function () {
  1177. this.readyState = SockJS.CLOSED;
  1178. if (forceFail) {
  1179. this.dispatchEvent(new Event('error'));
  1180. }
  1181. var e = new CloseEvent('close');
  1182. e.wasClean = wasClean || false;
  1183. e.code = code || 1000;
  1184. e.reason = reason;
  1185. this.dispatchEvent(e);
  1186. this.onmessage = this.onclose = this.onerror = null;
  1187. debug('disconnected');
  1188. }.bind(this), 0);
  1189. };
  1190. // See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
  1191. // and RFC 2988.
  1192. SockJS.prototype.countRTO = function (rtt) {
  1193. // In a local environment, when using IE8/9 and the `jsonp-polling`
  1194. // transport the time needed to establish a connection (the time that pass
  1195. // from the opening of the transport to the call of `_dispatchOpen`) is
  1196. // around 200msec (the lower bound used in the article above) and this
  1197. // causes spurious timeouts. For this reason we calculate a value slightly
  1198. // larger than that used in the article.
  1199. if (rtt > 100) {
  1200. return 4 * rtt; // rto > 400msec
  1201. }
  1202. return 300 + rtt; // 300msec < rto <= 400msec
  1203. };
  1204. module.exports = function (availableTransports) {
  1205. transports = transport(availableTransports);
  1206. __webpack_require__(/*! ./iframe-bootstrap */ "./node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
  1207. return SockJS;
  1208. };
  1209. /***/ }),
  1210. /***/ "./node_modules/sockjs-client/lib/shims.js":
  1211. /*!*************************************************!*\
  1212. !*** ./node_modules/sockjs-client/lib/shims.js ***!
  1213. \*************************************************/
  1214. /***/ (function() {
  1215. "use strict";
  1216. /* eslint-disable */
  1217. /* jscs: disable */
  1218. // pulled specific shims from https://github.com/es-shims/es5-shim
  1219. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  1220. var ArrayPrototype = Array.prototype;
  1221. var ObjectPrototype = Object.prototype;
  1222. var FunctionPrototype = Function.prototype;
  1223. var StringPrototype = String.prototype;
  1224. var array_slice = ArrayPrototype.slice;
  1225. var _toString = ObjectPrototype.toString;
  1226. var isFunction = function isFunction(val) {
  1227. return ObjectPrototype.toString.call(val) === '[object Function]';
  1228. };
  1229. var isArray = function isArray(obj) {
  1230. return _toString.call(obj) === '[object Array]';
  1231. };
  1232. var isString = function isString(obj) {
  1233. return _toString.call(obj) === '[object String]';
  1234. };
  1235. var supportsDescriptors = Object.defineProperty && function () {
  1236. try {
  1237. Object.defineProperty({}, 'x', {});
  1238. return true;
  1239. } catch (e) {
  1240. /* this is ES3 */
  1241. return false;
  1242. }
  1243. }();
  1244. // Define configurable, writable and non-enumerable props
  1245. // if they don't exist.
  1246. var defineProperty;
  1247. if (supportsDescriptors) {
  1248. defineProperty = function defineProperty(object, name, method, forceAssign) {
  1249. if (!forceAssign && name in object) {
  1250. return;
  1251. }
  1252. Object.defineProperty(object, name, {
  1253. configurable: true,
  1254. enumerable: false,
  1255. writable: true,
  1256. value: method
  1257. });
  1258. };
  1259. } else {
  1260. defineProperty = function defineProperty(object, name, method, forceAssign) {
  1261. if (!forceAssign && name in object) {
  1262. return;
  1263. }
  1264. object[name] = method;
  1265. };
  1266. }
  1267. var defineProperties = function defineProperties(object, map, forceAssign) {
  1268. for (var name in map) {
  1269. if (ObjectPrototype.hasOwnProperty.call(map, name)) {
  1270. defineProperty(object, name, map[name], forceAssign);
  1271. }
  1272. }
  1273. };
  1274. var toObject = function toObject(o) {
  1275. if (o == null) {
  1276. // this matches both null and undefined
  1277. throw new TypeError("can't convert " + o + ' to object');
  1278. }
  1279. return Object(o);
  1280. };
  1281. //
  1282. // Util
  1283. // ======
  1284. //
  1285. // ES5 9.4
  1286. // http://es5.github.com/#x9.4
  1287. // http://jsperf.com/to-integer
  1288. function toInteger(num) {
  1289. var n = +num;
  1290. if (n !== n) {
  1291. // isNaN
  1292. n = 0;
  1293. } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) {
  1294. n = (n > 0 || -1) * Math.floor(Math.abs(n));
  1295. }
  1296. return n;
  1297. }
  1298. function ToUint32(x) {
  1299. return x >>> 0;
  1300. }
  1301. //
  1302. // Function
  1303. // ========
  1304. //
  1305. // ES-5 15.3.4.5
  1306. // http://es5.github.com/#x15.3.4.5
  1307. function Empty() {}
  1308. defineProperties(FunctionPrototype, {
  1309. bind: function bind(that) {
  1310. // .length is 1
  1311. // 1. Let Target be the this value.
  1312. var target = this;
  1313. // 2. If IsCallable(Target) is false, throw a TypeError exception.
  1314. if (!isFunction(target)) {
  1315. throw new TypeError('Function.prototype.bind called on incompatible ' + target);
  1316. }
  1317. // 3. Let A be a new (possibly empty) internal list of all of the
  1318. // argument values provided after thisArg (arg1, arg2 etc), in order.
  1319. // XXX slicedArgs will stand in for "A" if used
  1320. var args = array_slice.call(arguments, 1); // for normal call
  1321. // 4. Let F be a new native ECMAScript object.
  1322. // 11. Set the [[Prototype]] internal property of F to the standard
  1323. // built-in Function prototype object as specified in 15.3.3.1.
  1324. // 12. Set the [[Call]] internal property of F as described in
  1325. // 15.3.4.5.1.
  1326. // 13. Set the [[Construct]] internal property of F as described in
  1327. // 15.3.4.5.2.
  1328. // 14. Set the [[HasInstance]] internal property of F as described in
  1329. // 15.3.4.5.3.
  1330. var binder = function binder() {
  1331. if (this instanceof bound) {
  1332. // 15.3.4.5.2 [[Construct]]
  1333. // When the [[Construct]] internal method of a function object,
  1334. // F that was created using the bind function is called with a
  1335. // list of arguments ExtraArgs, the following steps are taken:
  1336. // 1. Let target be the value of F's [[TargetFunction]]
  1337. // internal property.
  1338. // 2. If target has no [[Construct]] internal method, a
  1339. // TypeError exception is thrown.
  1340. // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
  1341. // property.
  1342. // 4. Let args be a new list containing the same values as the
  1343. // list boundArgs in the same order followed by the same
  1344. // values as the list ExtraArgs in the same order.
  1345. // 5. Return the result of calling the [[Construct]] internal
  1346. // method of target providing args as the arguments.
  1347. var result = target.apply(this, args.concat(array_slice.call(arguments)));
  1348. if (Object(result) === result) {
  1349. return result;
  1350. }
  1351. return this;
  1352. } else {
  1353. // 15.3.4.5.1 [[Call]]
  1354. // When the [[Call]] internal method of a function object, F,
  1355. // which was created using the bind function is called with a
  1356. // this value and a list of arguments ExtraArgs, the following
  1357. // steps are taken:
  1358. // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
  1359. // property.
  1360. // 2. Let boundThis be the value of F's [[BoundThis]] internal
  1361. // property.
  1362. // 3. Let target be the value of F's [[TargetFunction]] internal
  1363. // property.
  1364. // 4. Let args be a new list containing the same values as the
  1365. // list boundArgs in the same order followed by the same
  1366. // values as the list ExtraArgs in the same order.
  1367. // 5. Return the result of calling the [[Call]] internal method
  1368. // of target providing boundThis as the this value and
  1369. // providing args as the arguments.
  1370. // equiv: target.call(this, ...boundArgs, ...args)
  1371. return target.apply(that, args.concat(array_slice.call(arguments)));
  1372. }
  1373. };
  1374. // 15. If the [[Class]] internal property of Target is "Function", then
  1375. // a. Let L be the length property of Target minus the length of A.
  1376. // b. Set the length own property of F to either 0 or L, whichever is
  1377. // larger.
  1378. // 16. Else set the length own property of F to 0.
  1379. var boundLength = Math.max(0, target.length - args.length);
  1380. // 17. Set the attributes of the length own property of F to the values
  1381. // specified in 15.3.5.1.
  1382. var boundArgs = [];
  1383. for (var i = 0; i < boundLength; i++) {
  1384. boundArgs.push('$' + i);
  1385. }
  1386. // XXX Build a dynamic function with desired amount of arguments is the only
  1387. // way to set the length property of a function.
  1388. // In environments where Content Security Policies enabled (Chrome extensions,
  1389. // for ex.) all use of eval or Function costructor throws an exception.
  1390. // However in all of these environments Function.prototype.bind exists
  1391. // and so this code will never be executed.
  1392. var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
  1393. if (target.prototype) {
  1394. Empty.prototype = target.prototype;
  1395. bound.prototype = new Empty();
  1396. // Clean up dangling references.
  1397. Empty.prototype = null;
  1398. }
  1399. // TODO
  1400. // 18. Set the [[Extensible]] internal property of F to true.
  1401. // TODO
  1402. // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
  1403. // 20. Call the [[DefineOwnProperty]] internal method of F with
  1404. // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
  1405. // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
  1406. // false.
  1407. // 21. Call the [[DefineOwnProperty]] internal method of F with
  1408. // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
  1409. // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
  1410. // and false.
  1411. // TODO
  1412. // NOTE Function objects created using Function.prototype.bind do not
  1413. // have a prototype property or the [[Code]], [[FormalParameters]], and
  1414. // [[Scope]] internal properties.
  1415. // XXX can't delete prototype in pure-js.
  1416. // 22. Return F.
  1417. return bound;
  1418. }
  1419. });
  1420. //
  1421. // Array
  1422. // =====
  1423. //
  1424. // ES5 15.4.3.2
  1425. // http://es5.github.com/#x15.4.3.2
  1426. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
  1427. defineProperties(Array, {
  1428. isArray: isArray
  1429. });
  1430. var boxedString = Object('a');
  1431. var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
  1432. var properlyBoxesContext = function properlyBoxed(method) {
  1433. // Check node 0.6.21 bug where third parameter is not boxed
  1434. var properlyBoxesNonStrict = true;
  1435. var properlyBoxesStrict = true;
  1436. if (method) {
  1437. method.call('foo', function (_, __, context) {
  1438. if (_typeof(context) !== 'object') {
  1439. properlyBoxesNonStrict = false;
  1440. }
  1441. });
  1442. method.call([1], function () {
  1443. 'use strict';
  1444. properlyBoxesStrict = typeof this === 'string';
  1445. }, 'x');
  1446. }
  1447. return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
  1448. };
  1449. defineProperties(ArrayPrototype, {
  1450. forEach: function forEach(fun /*, thisp*/) {
  1451. var object = toObject(this),
  1452. self = splitString && isString(this) ? this.split('') : object,
  1453. thisp = arguments[1],
  1454. i = -1,
  1455. length = self.length >>> 0;
  1456. // If no callback function or if callback is not a callable function
  1457. if (!isFunction(fun)) {
  1458. throw new TypeError(); // TODO message
  1459. }
  1460. while (++i < length) {
  1461. if (i in self) {
  1462. // Invoke the callback function with call, passing arguments:
  1463. // context, property value, property key, thisArg object
  1464. // context
  1465. fun.call(thisp, self[i], i, object);
  1466. }
  1467. }
  1468. }
  1469. }, !properlyBoxesContext(ArrayPrototype.forEach));
  1470. // ES5 15.4.4.14
  1471. // http://es5.github.com/#x15.4.4.14
  1472. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
  1473. var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
  1474. defineProperties(ArrayPrototype, {
  1475. indexOf: function indexOf(sought /*, fromIndex */) {
  1476. var self = splitString && isString(this) ? this.split('') : toObject(this),
  1477. length = self.length >>> 0;
  1478. if (!length) {
  1479. return -1;
  1480. }
  1481. var i = 0;
  1482. if (arguments.length > 1) {
  1483. i = toInteger(arguments[1]);
  1484. }
  1485. // handle negative indices
  1486. i = i >= 0 ? i : Math.max(0, length + i);
  1487. for (; i < length; i++) {
  1488. if (i in self && self[i] === sought) {
  1489. return i;
  1490. }
  1491. }
  1492. return -1;
  1493. }
  1494. }, hasFirefox2IndexOfBug);
  1495. //
  1496. // String
  1497. // ======
  1498. //
  1499. // ES5 15.5.4.14
  1500. // http://es5.github.com/#x15.5.4.14
  1501. // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
  1502. // Many browsers do not split properly with regular expressions or they
  1503. // do not perform the split correctly under obscure conditions.
  1504. // See http://blog.stevenlevithan.com/archives/cross-browser-split
  1505. // I've tested in many browsers and this seems to cover the deviant ones:
  1506. // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
  1507. // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
  1508. // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
  1509. // [undefined, "t", undefined, "e", ...]
  1510. // ''.split(/.?/) should be [], not [""]
  1511. // '.'.split(/()()/) should be ["."], not ["", "", "."]
  1512. var string_split = StringPrototype.split;
  1513. if ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || 'tesst'.split(/(s)*/)[1] === 't' || 'test'.split(/(?:)/, -1).length !== 4 || ''.split(/.?/).length || '.'.split(/()()/).length > 1) {
  1514. (function () {
  1515. var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group
  1516. StringPrototype.split = function (separator, limit) {
  1517. var string = this;
  1518. if (separator === void 0 && limit === 0) {
  1519. return [];
  1520. }
  1521. // If `separator` is not a regex, use native split
  1522. if (_toString.call(separator) !== '[object RegExp]') {
  1523. return string_split.call(this, separator, limit);
  1524. }
  1525. var output = [],
  1526. flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.extended ? 'x' : '') + (
  1527. // Proposed for ES6
  1528. separator.sticky ? 'y' : ''),
  1529. // Firefox 3+
  1530. lastLastIndex = 0,
  1531. // Make `global` and avoid `lastIndex` issues by working with a copy
  1532. separator2,
  1533. match,
  1534. lastIndex,
  1535. lastLength;
  1536. separator = new RegExp(separator.source, flags + 'g');
  1537. string += ''; // Type-convert
  1538. if (!compliantExecNpcg) {
  1539. // Doesn't need flags gy, but they don't hurt
  1540. separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags);
  1541. }
  1542. /* Values for `limit`, per the spec:
  1543. * If undefined: 4294967295 // Math.pow(2, 32) - 1
  1544. * If 0, Infinity, or NaN: 0
  1545. * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
  1546. * If negative number: 4294967296 - Math.floor(Math.abs(limit))
  1547. * If other: Type-convert, then use the above rules
  1548. */
  1549. limit = limit === void 0 ? -1 >>> 0 :
  1550. // Math.pow(2, 32) - 1
  1551. ToUint32(limit);
  1552. while (match = separator.exec(string)) {
  1553. // `separator.lastIndex` is not reliable cross-browser
  1554. lastIndex = match.index + match[0].length;
  1555. if (lastIndex > lastLastIndex) {
  1556. output.push(string.slice(lastLastIndex, match.index));
  1557. // Fix browsers whose `exec` methods don't consistently return `undefined` for
  1558. // nonparticipating capturing groups
  1559. if (!compliantExecNpcg && match.length > 1) {
  1560. match[0].replace(separator2, function () {
  1561. for (var i = 1; i < arguments.length - 2; i++) {
  1562. if (arguments[i] === void 0) {
  1563. match[i] = void 0;
  1564. }
  1565. }
  1566. });
  1567. }
  1568. if (match.length > 1 && match.index < string.length) {
  1569. ArrayPrototype.push.apply(output, match.slice(1));
  1570. }
  1571. lastLength = match[0].length;
  1572. lastLastIndex = lastIndex;
  1573. if (output.length >= limit) {
  1574. break;
  1575. }
  1576. }
  1577. if (separator.lastIndex === match.index) {
  1578. separator.lastIndex++; // Avoid an infinite loop
  1579. }
  1580. }
  1581. if (lastLastIndex === string.length) {
  1582. if (lastLength || !separator.test('')) {
  1583. output.push('');
  1584. }
  1585. } else {
  1586. output.push(string.slice(lastLastIndex));
  1587. }
  1588. return output.length > limit ? output.slice(0, limit) : output;
  1589. };
  1590. })();
  1591. // [bugfix, chrome]
  1592. // If separator is undefined, then the result array contains just one String,
  1593. // which is the this value (converted to a String). If limit is not undefined,
  1594. // then the output array is truncated so that it contains no more than limit
  1595. // elements.
  1596. // "0".split(undefined, 0) -> []
  1597. } else if ('0'.split(void 0, 0).length) {
  1598. StringPrototype.split = function split(separator, limit) {
  1599. if (separator === void 0 && limit === 0) {
  1600. return [];
  1601. }
  1602. return string_split.call(this, separator, limit);
  1603. };
  1604. }
  1605. // ECMA-262, 3rd B.2.3
  1606. // Not an ECMAScript standard, although ECMAScript 3rd Edition has a
  1607. // non-normative section suggesting uniform semantics and it should be
  1608. // normalized across all browsers
  1609. // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
  1610. var string_substr = StringPrototype.substr;
  1611. var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
  1612. defineProperties(StringPrototype, {
  1613. substr: function substr(start, length) {
  1614. return string_substr.call(this, start < 0 ? (start = this.length + start) < 0 ? 0 : start : start, length);
  1615. }
  1616. }, hasNegativeSubstrBug);
  1617. /***/ }),
  1618. /***/ "./node_modules/sockjs-client/lib/transport-list.js":
  1619. /*!**********************************************************!*\
  1620. !*** ./node_modules/sockjs-client/lib/transport-list.js ***!
  1621. \**********************************************************/
  1622. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1623. "use strict";
  1624. module.exports = [
  1625. // streaming transports
  1626. __webpack_require__(/*! ./transport/websocket */ "./node_modules/sockjs-client/lib/transport/websocket.js"), __webpack_require__(/*! ./transport/xhr-streaming */ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js"), __webpack_require__(/*! ./transport/xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js"), __webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"))
  1627. // polling transports
  1628. , __webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js")), __webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js"), __webpack_require__(/*! ./transport/xdr-polling */ "./node_modules/sockjs-client/lib/transport/xdr-polling.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js")), __webpack_require__(/*! ./transport/jsonp-polling */ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js")];
  1629. /***/ }),
  1630. /***/ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js":
  1631. /*!**************************************************************************!*\
  1632. !*** ./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js ***!
  1633. \**************************************************************************/
  1634. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1635. "use strict";
  1636. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  1637. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1638. utils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  1639. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1640. XHR = __webpack_require__.g.XMLHttpRequest;
  1641. var debug = function debug() {};
  1642. if (true) {
  1643. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:browser:xhr');
  1644. }
  1645. function AbstractXHRObject(method, url, payload, opts) {
  1646. debug(method, url);
  1647. var self = this;
  1648. EventEmitter.call(this);
  1649. setTimeout(function () {
  1650. self._start(method, url, payload, opts);
  1651. }, 0);
  1652. }
  1653. inherits(AbstractXHRObject, EventEmitter);
  1654. AbstractXHRObject.prototype._start = function (method, url, payload, opts) {
  1655. var self = this;
  1656. try {
  1657. this.xhr = new XHR();
  1658. } catch (x) {
  1659. // intentionally empty
  1660. }
  1661. if (!this.xhr) {
  1662. debug('no xhr');
  1663. this.emit('finish', 0, 'no xhr support');
  1664. this._cleanup();
  1665. return;
  1666. }
  1667. // several browsers cache POSTs
  1668. url = urlUtils.addQuery(url, 't=' + +new Date());
  1669. // Explorer tends to keep connection open, even after the
  1670. // tab gets closed: http://bugs.jquery.com/ticket/5280
  1671. this.unloadRef = utils.unloadAdd(function () {
  1672. debug('unload cleanup');
  1673. self._cleanup(true);
  1674. });
  1675. try {
  1676. this.xhr.open(method, url, true);
  1677. if (this.timeout && 'timeout' in this.xhr) {
  1678. this.xhr.timeout = this.timeout;
  1679. this.xhr.ontimeout = function () {
  1680. debug('xhr timeout');
  1681. self.emit('finish', 0, '');
  1682. self._cleanup(false);
  1683. };
  1684. }
  1685. } catch (e) {
  1686. debug('exception', e);
  1687. // IE raises an exception on wrong port.
  1688. this.emit('finish', 0, '');
  1689. this._cleanup(false);
  1690. return;
  1691. }
  1692. if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {
  1693. debug('withCredentials');
  1694. // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :
  1695. // "This never affects same-site requests."
  1696. this.xhr.withCredentials = true;
  1697. }
  1698. if (opts && opts.headers) {
  1699. for (var key in opts.headers) {
  1700. this.xhr.setRequestHeader(key, opts.headers[key]);
  1701. }
  1702. }
  1703. this.xhr.onreadystatechange = function () {
  1704. if (self.xhr) {
  1705. var x = self.xhr;
  1706. var text, status;
  1707. debug('readyState', x.readyState);
  1708. switch (x.readyState) {
  1709. case 3:
  1710. // IE doesn't like peeking into responseText or status
  1711. // on Microsoft.XMLHTTP and readystate=3
  1712. try {
  1713. status = x.status;
  1714. text = x.responseText;
  1715. } catch (e) {
  1716. // intentionally empty
  1717. }
  1718. debug('status', status);
  1719. // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  1720. if (status === 1223) {
  1721. status = 204;
  1722. }
  1723. // IE does return readystate == 3 for 404 answers.
  1724. if (status === 200 && text && text.length > 0) {
  1725. debug('chunk');
  1726. self.emit('chunk', status, text);
  1727. }
  1728. break;
  1729. case 4:
  1730. status = x.status;
  1731. debug('status', status);
  1732. // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  1733. if (status === 1223) {
  1734. status = 204;
  1735. }
  1736. // IE returns this for a bad port
  1737. // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx
  1738. if (status === 12005 || status === 12029) {
  1739. status = 0;
  1740. }
  1741. debug('finish', status, x.responseText);
  1742. self.emit('finish', status, x.responseText);
  1743. self._cleanup(false);
  1744. break;
  1745. }
  1746. }
  1747. };
  1748. try {
  1749. self.xhr.send(payload);
  1750. } catch (e) {
  1751. self.emit('finish', 0, '');
  1752. self._cleanup(false);
  1753. }
  1754. };
  1755. AbstractXHRObject.prototype._cleanup = function (abort) {
  1756. debug('cleanup');
  1757. if (!this.xhr) {
  1758. return;
  1759. }
  1760. this.removeAllListeners();
  1761. utils.unloadDel(this.unloadRef);
  1762. // IE needs this field to be a function
  1763. this.xhr.onreadystatechange = function () {};
  1764. if (this.xhr.ontimeout) {
  1765. this.xhr.ontimeout = null;
  1766. }
  1767. if (abort) {
  1768. try {
  1769. this.xhr.abort();
  1770. } catch (x) {
  1771. // intentionally empty
  1772. }
  1773. }
  1774. this.unloadRef = this.xhr = null;
  1775. };
  1776. AbstractXHRObject.prototype.close = function () {
  1777. debug('close');
  1778. this._cleanup(true);
  1779. };
  1780. AbstractXHRObject.enabled = !!XHR;
  1781. // override XMLHttpRequest for IE6/7
  1782. // obfuscate to avoid firewalls
  1783. var axo = ['Active'].concat('Object').join('X');
  1784. if (!AbstractXHRObject.enabled && axo in __webpack_require__.g) {
  1785. debug('overriding xmlhttprequest');
  1786. XHR = function XHR() {
  1787. try {
  1788. return new __webpack_require__.g[axo]('Microsoft.XMLHTTP');
  1789. } catch (e) {
  1790. return null;
  1791. }
  1792. };
  1793. AbstractXHRObject.enabled = !!new XHR();
  1794. }
  1795. var cors = false;
  1796. try {
  1797. cors = 'withCredentials' in new XHR();
  1798. } catch (ignored) {
  1799. // intentionally empty
  1800. }
  1801. AbstractXHRObject.supportsCORS = cors;
  1802. module.exports = AbstractXHRObject;
  1803. /***/ }),
  1804. /***/ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js":
  1805. /*!*************************************************************************!*\
  1806. !*** ./node_modules/sockjs-client/lib/transport/browser/eventsource.js ***!
  1807. \*************************************************************************/
  1808. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1809. module.exports = __webpack_require__.g.EventSource;
  1810. /***/ }),
  1811. /***/ "./node_modules/sockjs-client/lib/transport/browser/websocket.js":
  1812. /*!***********************************************************************!*\
  1813. !*** ./node_modules/sockjs-client/lib/transport/browser/websocket.js ***!
  1814. \***********************************************************************/
  1815. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1816. "use strict";
  1817. var Driver = __webpack_require__.g.WebSocket || __webpack_require__.g.MozWebSocket;
  1818. if (Driver) {
  1819. module.exports = function WebSocketBrowserDriver(url) {
  1820. return new Driver(url);
  1821. };
  1822. } else {
  1823. module.exports = undefined;
  1824. }
  1825. /***/ }),
  1826. /***/ "./node_modules/sockjs-client/lib/transport/eventsource.js":
  1827. /*!*****************************************************************!*\
  1828. !*** ./node_modules/sockjs-client/lib/transport/eventsource.js ***!
  1829. \*****************************************************************/
  1830. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1831. "use strict";
  1832. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1833. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  1834. EventSourceReceiver = __webpack_require__(/*! ./receiver/eventsource */ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js"),
  1835. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  1836. EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
  1837. function EventSourceTransport(transUrl) {
  1838. if (!EventSourceTransport.enabled()) {
  1839. throw new Error('Transport created when disabled');
  1840. }
  1841. AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
  1842. }
  1843. inherits(EventSourceTransport, AjaxBasedTransport);
  1844. EventSourceTransport.enabled = function () {
  1845. return !!EventSourceDriver;
  1846. };
  1847. EventSourceTransport.transportName = 'eventsource';
  1848. EventSourceTransport.roundTrips = 2;
  1849. module.exports = EventSourceTransport;
  1850. /***/ }),
  1851. /***/ "./node_modules/sockjs-client/lib/transport/htmlfile.js":
  1852. /*!**************************************************************!*\
  1853. !*** ./node_modules/sockjs-client/lib/transport/htmlfile.js ***!
  1854. \**************************************************************/
  1855. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1856. "use strict";
  1857. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1858. HtmlfileReceiver = __webpack_require__(/*! ./receiver/htmlfile */ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js"),
  1859. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  1860. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js");
  1861. function HtmlFileTransport(transUrl) {
  1862. if (!HtmlfileReceiver.enabled) {
  1863. throw new Error('Transport created when disabled');
  1864. }
  1865. AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
  1866. }
  1867. inherits(HtmlFileTransport, AjaxBasedTransport);
  1868. HtmlFileTransport.enabled = function (info) {
  1869. return HtmlfileReceiver.enabled && info.sameOrigin;
  1870. };
  1871. HtmlFileTransport.transportName = 'htmlfile';
  1872. HtmlFileTransport.roundTrips = 2;
  1873. module.exports = HtmlFileTransport;
  1874. /***/ }),
  1875. /***/ "./node_modules/sockjs-client/lib/transport/iframe.js":
  1876. /*!************************************************************!*\
  1877. !*** ./node_modules/sockjs-client/lib/transport/iframe.js ***!
  1878. \************************************************************/
  1879. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1880. "use strict";
  1881. // Few cool transports do work only for same-origin. In order to make
  1882. // them work cross-domain we shall use iframe, served from the
  1883. // remote domain. New browsers have capabilities to communicate with
  1884. // cross domain iframe using postMessage(). In IE it was implemented
  1885. // from IE 8+, but of course, IE got some details wrong:
  1886. // http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
  1887. // http://stevesouders.com/misc/test-postmessage.php
  1888. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1889. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  1890. version = __webpack_require__(/*! ../version */ "./node_modules/sockjs-client/lib/version.js"),
  1891. urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1892. iframeUtils = __webpack_require__(/*! ../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  1893. eventUtils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  1894. random = __webpack_require__(/*! ../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
  1895. var debug = function debug() {};
  1896. if (true) {
  1897. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:transport:iframe');
  1898. }
  1899. function IframeTransport(transport, transUrl, baseUrl) {
  1900. if (!IframeTransport.enabled()) {
  1901. throw new Error('Transport created when disabled');
  1902. }
  1903. EventEmitter.call(this);
  1904. var self = this;
  1905. this.origin = urlUtils.getOrigin(baseUrl);
  1906. this.baseUrl = baseUrl;
  1907. this.transUrl = transUrl;
  1908. this.transport = transport;
  1909. this.windowId = random.string(8);
  1910. var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;
  1911. debug(transport, transUrl, iframeUrl);
  1912. this.iframeObj = iframeUtils.createIframe(iframeUrl, function (r) {
  1913. debug('err callback');
  1914. self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');
  1915. self.close();
  1916. });
  1917. this.onmessageCallback = this._message.bind(this);
  1918. eventUtils.attachEvent('message', this.onmessageCallback);
  1919. }
  1920. inherits(IframeTransport, EventEmitter);
  1921. IframeTransport.prototype.close = function () {
  1922. debug('close');
  1923. this.removeAllListeners();
  1924. if (this.iframeObj) {
  1925. eventUtils.detachEvent('message', this.onmessageCallback);
  1926. try {
  1927. // When the iframe is not loaded, IE raises an exception
  1928. // on 'contentWindow'.
  1929. this.postMessage('c');
  1930. } catch (x) {
  1931. // intentionally empty
  1932. }
  1933. this.iframeObj.cleanup();
  1934. this.iframeObj = null;
  1935. this.onmessageCallback = this.iframeObj = null;
  1936. }
  1937. };
  1938. IframeTransport.prototype._message = function (e) {
  1939. debug('message', e.data);
  1940. if (!urlUtils.isOriginEqual(e.origin, this.origin)) {
  1941. debug('not same origin', e.origin, this.origin);
  1942. return;
  1943. }
  1944. var iframeMessage;
  1945. try {
  1946. iframeMessage = JSON.parse(e.data);
  1947. } catch (ignored) {
  1948. debug('bad json', e.data);
  1949. return;
  1950. }
  1951. if (iframeMessage.windowId !== this.windowId) {
  1952. debug('mismatched window id', iframeMessage.windowId, this.windowId);
  1953. return;
  1954. }
  1955. switch (iframeMessage.type) {
  1956. case 's':
  1957. this.iframeObj.loaded();
  1958. // window global dependency
  1959. this.postMessage('s', JSON.stringify([version, this.transport, this.transUrl, this.baseUrl]));
  1960. break;
  1961. case 't':
  1962. this.emit('message', iframeMessage.data);
  1963. break;
  1964. case 'c':
  1965. var cdata;
  1966. try {
  1967. cdata = JSON.parse(iframeMessage.data);
  1968. } catch (ignored) {
  1969. debug('bad json', iframeMessage.data);
  1970. return;
  1971. }
  1972. this.emit('close', cdata[0], cdata[1]);
  1973. this.close();
  1974. break;
  1975. }
  1976. };
  1977. IframeTransport.prototype.postMessage = function (type, data) {
  1978. debug('postMessage', type, data);
  1979. this.iframeObj.post(JSON.stringify({
  1980. windowId: this.windowId,
  1981. type: type,
  1982. data: data || ''
  1983. }), this.origin);
  1984. };
  1985. IframeTransport.prototype.send = function (message) {
  1986. debug('send', message);
  1987. this.postMessage('m', message);
  1988. };
  1989. IframeTransport.enabled = function () {
  1990. return iframeUtils.iframeEnabled;
  1991. };
  1992. IframeTransport.transportName = 'iframe';
  1993. IframeTransport.roundTrips = 2;
  1994. module.exports = IframeTransport;
  1995. /***/ }),
  1996. /***/ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js":
  1997. /*!*******************************************************************!*\
  1998. !*** ./node_modules/sockjs-client/lib/transport/jsonp-polling.js ***!
  1999. \*******************************************************************/
  2000. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2001. "use strict";
  2002. // The simplest and most robust transport, using the well-know cross
  2003. // domain hack - JSONP. This transport is quite inefficient - one
  2004. // message could use up to one http request. But at least it works almost
  2005. // everywhere.
  2006. // Known limitations:
  2007. // o you will get a spinning cursor
  2008. // o for Konqueror a dumb timer is needed to detect errors
  2009. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2010. SenderReceiver = __webpack_require__(/*! ./lib/sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js"),
  2011. JsonpReceiver = __webpack_require__(/*! ./receiver/jsonp */ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js"),
  2012. jsonpSender = __webpack_require__(/*! ./sender/jsonp */ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js");
  2013. function JsonPTransport(transUrl) {
  2014. if (!JsonPTransport.enabled()) {
  2015. throw new Error('Transport created when disabled');
  2016. }
  2017. SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
  2018. }
  2019. inherits(JsonPTransport, SenderReceiver);
  2020. JsonPTransport.enabled = function () {
  2021. return !!__webpack_require__.g.document;
  2022. };
  2023. JsonPTransport.transportName = 'jsonp-polling';
  2024. JsonPTransport.roundTrips = 1;
  2025. JsonPTransport.needBody = true;
  2026. module.exports = JsonPTransport;
  2027. /***/ }),
  2028. /***/ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js":
  2029. /*!********************************************************************!*\
  2030. !*** ./node_modules/sockjs-client/lib/transport/lib/ajax-based.js ***!
  2031. \********************************************************************/
  2032. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2033. "use strict";
  2034. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2035. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2036. SenderReceiver = __webpack_require__(/*! ./sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js");
  2037. var debug = function debug() {};
  2038. if (true) {
  2039. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:ajax-based');
  2040. }
  2041. function createAjaxSender(AjaxObject) {
  2042. return function (url, payload, callback) {
  2043. debug('create ajax sender', url, payload);
  2044. var opt = {};
  2045. if (typeof payload === 'string') {
  2046. opt.headers = {
  2047. 'Content-type': 'text/plain'
  2048. };
  2049. }
  2050. var ajaxUrl = urlUtils.addPath(url, '/xhr_send');
  2051. var xo = new AjaxObject('POST', ajaxUrl, payload, opt);
  2052. xo.once('finish', function (status) {
  2053. debug('finish', status);
  2054. xo = null;
  2055. if (status !== 200 && status !== 204) {
  2056. return callback(new Error('http status ' + status));
  2057. }
  2058. callback();
  2059. });
  2060. return function () {
  2061. debug('abort');
  2062. xo.close();
  2063. xo = null;
  2064. var err = new Error('Aborted');
  2065. err.code = 1000;
  2066. callback(err);
  2067. };
  2068. };
  2069. }
  2070. function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
  2071. SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
  2072. }
  2073. inherits(AjaxBasedTransport, SenderReceiver);
  2074. module.exports = AjaxBasedTransport;
  2075. /***/ }),
  2076. /***/ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js":
  2077. /*!*************************************************************************!*\
  2078. !*** ./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js ***!
  2079. \*************************************************************************/
  2080. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2081. "use strict";
  2082. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2083. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2084. var debug = function debug() {};
  2085. if (true) {
  2086. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:buffered-sender');
  2087. }
  2088. function BufferedSender(url, sender) {
  2089. debug(url);
  2090. EventEmitter.call(this);
  2091. this.sendBuffer = [];
  2092. this.sender = sender;
  2093. this.url = url;
  2094. }
  2095. inherits(BufferedSender, EventEmitter);
  2096. BufferedSender.prototype.send = function (message) {
  2097. debug('send', message);
  2098. this.sendBuffer.push(message);
  2099. if (!this.sendStop) {
  2100. this.sendSchedule();
  2101. }
  2102. };
  2103. // For polling transports in a situation when in the message callback,
  2104. // new message is being send. If the sending connection was started
  2105. // before receiving one, it is possible to saturate the network and
  2106. // timeout due to the lack of receiving socket. To avoid that we delay
  2107. // sending messages by some small time, in order to let receiving
  2108. // connection be started beforehand. This is only a halfmeasure and
  2109. // does not fix the big problem, but it does make the tests go more
  2110. // stable on slow networks.
  2111. BufferedSender.prototype.sendScheduleWait = function () {
  2112. debug('sendScheduleWait');
  2113. var self = this;
  2114. var tref;
  2115. this.sendStop = function () {
  2116. debug('sendStop');
  2117. self.sendStop = null;
  2118. clearTimeout(tref);
  2119. };
  2120. tref = setTimeout(function () {
  2121. debug('timeout');
  2122. self.sendStop = null;
  2123. self.sendSchedule();
  2124. }, 25);
  2125. };
  2126. BufferedSender.prototype.sendSchedule = function () {
  2127. debug('sendSchedule', this.sendBuffer.length);
  2128. var self = this;
  2129. if (this.sendBuffer.length > 0) {
  2130. var payload = '[' + this.sendBuffer.join(',') + ']';
  2131. this.sendStop = this.sender(this.url, payload, function (err) {
  2132. self.sendStop = null;
  2133. if (err) {
  2134. debug('error', err);
  2135. self.emit('close', err.code || 1006, 'Sending error: ' + err);
  2136. self.close();
  2137. } else {
  2138. self.sendScheduleWait();
  2139. }
  2140. });
  2141. this.sendBuffer = [];
  2142. }
  2143. };
  2144. BufferedSender.prototype._cleanup = function () {
  2145. debug('_cleanup');
  2146. this.removeAllListeners();
  2147. };
  2148. BufferedSender.prototype.close = function () {
  2149. debug('close');
  2150. this._cleanup();
  2151. if (this.sendStop) {
  2152. this.sendStop();
  2153. this.sendStop = null;
  2154. }
  2155. };
  2156. module.exports = BufferedSender;
  2157. /***/ }),
  2158. /***/ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js":
  2159. /*!*********************************************************************!*\
  2160. !*** ./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js ***!
  2161. \*********************************************************************/
  2162. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2163. "use strict";
  2164. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2165. IframeTransport = __webpack_require__(/*! ../iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js"),
  2166. objectUtils = __webpack_require__(/*! ../../utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
  2167. module.exports = function (transport) {
  2168. function IframeWrapTransport(transUrl, baseUrl) {
  2169. IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
  2170. }
  2171. inherits(IframeWrapTransport, IframeTransport);
  2172. IframeWrapTransport.enabled = function (url, info) {
  2173. if (!__webpack_require__.g.document) {
  2174. return false;
  2175. }
  2176. var iframeInfo = objectUtils.extend({}, info);
  2177. iframeInfo.sameOrigin = true;
  2178. return transport.enabled(iframeInfo) && IframeTransport.enabled();
  2179. };
  2180. IframeWrapTransport.transportName = 'iframe-' + transport.transportName;
  2181. IframeWrapTransport.needBody = true;
  2182. IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)
  2183. IframeWrapTransport.facadeTransport = transport;
  2184. return IframeWrapTransport;
  2185. };
  2186. /***/ }),
  2187. /***/ "./node_modules/sockjs-client/lib/transport/lib/polling.js":
  2188. /*!*****************************************************************!*\
  2189. !*** ./node_modules/sockjs-client/lib/transport/lib/polling.js ***!
  2190. \*****************************************************************/
  2191. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2192. "use strict";
  2193. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2194. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2195. var debug = function debug() {};
  2196. if (true) {
  2197. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:polling');
  2198. }
  2199. function Polling(Receiver, receiveUrl, AjaxObject) {
  2200. debug(receiveUrl);
  2201. EventEmitter.call(this);
  2202. this.Receiver = Receiver;
  2203. this.receiveUrl = receiveUrl;
  2204. this.AjaxObject = AjaxObject;
  2205. this._scheduleReceiver();
  2206. }
  2207. inherits(Polling, EventEmitter);
  2208. Polling.prototype._scheduleReceiver = function () {
  2209. debug('_scheduleReceiver');
  2210. var self = this;
  2211. var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
  2212. poll.on('message', function (msg) {
  2213. debug('message', msg);
  2214. self.emit('message', msg);
  2215. });
  2216. poll.once('close', function (code, reason) {
  2217. debug('close', code, reason, self.pollIsClosing);
  2218. self.poll = poll = null;
  2219. if (!self.pollIsClosing) {
  2220. if (reason === 'network') {
  2221. self._scheduleReceiver();
  2222. } else {
  2223. self.emit('close', code || 1006, reason);
  2224. self.removeAllListeners();
  2225. }
  2226. }
  2227. });
  2228. };
  2229. Polling.prototype.abort = function () {
  2230. debug('abort');
  2231. this.removeAllListeners();
  2232. this.pollIsClosing = true;
  2233. if (this.poll) {
  2234. this.poll.abort();
  2235. }
  2236. };
  2237. module.exports = Polling;
  2238. /***/ }),
  2239. /***/ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js":
  2240. /*!*************************************************************************!*\
  2241. !*** ./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js ***!
  2242. \*************************************************************************/
  2243. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2244. "use strict";
  2245. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2246. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2247. BufferedSender = __webpack_require__(/*! ./buffered-sender */ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js"),
  2248. Polling = __webpack_require__(/*! ./polling */ "./node_modules/sockjs-client/lib/transport/lib/polling.js");
  2249. var debug = function debug() {};
  2250. if (true) {
  2251. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender-receiver');
  2252. }
  2253. function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
  2254. var pollUrl = urlUtils.addPath(transUrl, urlSuffix);
  2255. debug(pollUrl);
  2256. var self = this;
  2257. BufferedSender.call(this, transUrl, senderFunc);
  2258. this.poll = new Polling(Receiver, pollUrl, AjaxObject);
  2259. this.poll.on('message', function (msg) {
  2260. debug('poll message', msg);
  2261. self.emit('message', msg);
  2262. });
  2263. this.poll.once('close', function (code, reason) {
  2264. debug('poll close', code, reason);
  2265. self.poll = null;
  2266. self.emit('close', code, reason);
  2267. self.close();
  2268. });
  2269. }
  2270. inherits(SenderReceiver, BufferedSender);
  2271. SenderReceiver.prototype.close = function () {
  2272. BufferedSender.prototype.close.call(this);
  2273. debug('close');
  2274. this.removeAllListeners();
  2275. if (this.poll) {
  2276. this.poll.abort();
  2277. this.poll = null;
  2278. }
  2279. };
  2280. module.exports = SenderReceiver;
  2281. /***/ }),
  2282. /***/ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js":
  2283. /*!**************************************************************************!*\
  2284. !*** ./node_modules/sockjs-client/lib/transport/receiver/eventsource.js ***!
  2285. \**************************************************************************/
  2286. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2287. "use strict";
  2288. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2289. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2290. EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
  2291. var debug = function debug() {};
  2292. if (true) {
  2293. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:eventsource');
  2294. }
  2295. function EventSourceReceiver(url) {
  2296. debug(url);
  2297. EventEmitter.call(this);
  2298. var self = this;
  2299. var es = this.es = new EventSourceDriver(url);
  2300. es.onmessage = function (e) {
  2301. debug('message', e.data);
  2302. self.emit('message', decodeURI(e.data));
  2303. };
  2304. es.onerror = function (e) {
  2305. debug('error', es.readyState, e);
  2306. // ES on reconnection has readyState = 0 or 1.
  2307. // on network error it's CLOSED = 2
  2308. var reason = es.readyState !== 2 ? 'network' : 'permanent';
  2309. self._cleanup();
  2310. self._close(reason);
  2311. };
  2312. }
  2313. inherits(EventSourceReceiver, EventEmitter);
  2314. EventSourceReceiver.prototype.abort = function () {
  2315. debug('abort');
  2316. this._cleanup();
  2317. this._close('user');
  2318. };
  2319. EventSourceReceiver.prototype._cleanup = function () {
  2320. debug('cleanup');
  2321. var es = this.es;
  2322. if (es) {
  2323. es.onmessage = es.onerror = null;
  2324. es.close();
  2325. this.es = null;
  2326. }
  2327. };
  2328. EventSourceReceiver.prototype._close = function (reason) {
  2329. debug('close', reason);
  2330. var self = this;
  2331. // Safari and chrome < 15 crash if we close window before
  2332. // waiting for ES cleanup. See:
  2333. // https://code.google.com/p/chromium/issues/detail?id=89155
  2334. setTimeout(function () {
  2335. self.emit('close', null, reason);
  2336. self.removeAllListeners();
  2337. }, 200);
  2338. };
  2339. module.exports = EventSourceReceiver;
  2340. /***/ }),
  2341. /***/ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js":
  2342. /*!***********************************************************************!*\
  2343. !*** ./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js ***!
  2344. \***********************************************************************/
  2345. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2346. "use strict";
  2347. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2348. iframeUtils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  2349. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2350. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2351. random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
  2352. var debug = function debug() {};
  2353. if (true) {
  2354. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:htmlfile');
  2355. }
  2356. function HtmlfileReceiver(url) {
  2357. debug(url);
  2358. EventEmitter.call(this);
  2359. var self = this;
  2360. iframeUtils.polluteGlobalNamespace();
  2361. this.id = 'a' + random.string(6);
  2362. url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));
  2363. debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);
  2364. var constructFunc = HtmlfileReceiver.htmlfileEnabled ? iframeUtils.createHtmlfile : iframeUtils.createIframe;
  2365. __webpack_require__.g[iframeUtils.WPrefix][this.id] = {
  2366. start: function start() {
  2367. debug('start');
  2368. self.iframeObj.loaded();
  2369. },
  2370. message: function message(data) {
  2371. debug('message', data);
  2372. self.emit('message', data);
  2373. },
  2374. stop: function stop() {
  2375. debug('stop');
  2376. self._cleanup();
  2377. self._close('network');
  2378. }
  2379. };
  2380. this.iframeObj = constructFunc(url, function () {
  2381. debug('callback');
  2382. self._cleanup();
  2383. self._close('permanent');
  2384. });
  2385. }
  2386. inherits(HtmlfileReceiver, EventEmitter);
  2387. HtmlfileReceiver.prototype.abort = function () {
  2388. debug('abort');
  2389. this._cleanup();
  2390. this._close('user');
  2391. };
  2392. HtmlfileReceiver.prototype._cleanup = function () {
  2393. debug('_cleanup');
  2394. if (this.iframeObj) {
  2395. this.iframeObj.cleanup();
  2396. this.iframeObj = null;
  2397. }
  2398. delete __webpack_require__.g[iframeUtils.WPrefix][this.id];
  2399. };
  2400. HtmlfileReceiver.prototype._close = function (reason) {
  2401. debug('_close', reason);
  2402. this.emit('close', null, reason);
  2403. this.removeAllListeners();
  2404. };
  2405. HtmlfileReceiver.htmlfileEnabled = false;
  2406. // obfuscate to avoid firewalls
  2407. var axo = ['Active'].concat('Object').join('X');
  2408. if (axo in __webpack_require__.g) {
  2409. try {
  2410. HtmlfileReceiver.htmlfileEnabled = !!new __webpack_require__.g[axo]('htmlfile');
  2411. } catch (x) {
  2412. // intentionally empty
  2413. }
  2414. }
  2415. HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;
  2416. module.exports = HtmlfileReceiver;
  2417. /***/ }),
  2418. /***/ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js":
  2419. /*!********************************************************************!*\
  2420. !*** ./node_modules/sockjs-client/lib/transport/receiver/jsonp.js ***!
  2421. \********************************************************************/
  2422. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2423. "use strict";
  2424. var utils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  2425. random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  2426. browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  2427. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2428. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2429. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2430. var debug = function debug() {};
  2431. if (true) {
  2432. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:jsonp');
  2433. }
  2434. function JsonpReceiver(url) {
  2435. debug(url);
  2436. var self = this;
  2437. EventEmitter.call(this);
  2438. utils.polluteGlobalNamespace();
  2439. this.id = 'a' + random.string(6);
  2440. var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));
  2441. __webpack_require__.g[utils.WPrefix][this.id] = this._callback.bind(this);
  2442. this._createScript(urlWithId);
  2443. // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.
  2444. this.timeoutId = setTimeout(function () {
  2445. debug('timeout');
  2446. self._abort(new Error('JSONP script loaded abnormally (timeout)'));
  2447. }, JsonpReceiver.timeout);
  2448. }
  2449. inherits(JsonpReceiver, EventEmitter);
  2450. JsonpReceiver.prototype.abort = function () {
  2451. debug('abort');
  2452. if (__webpack_require__.g[utils.WPrefix][this.id]) {
  2453. var err = new Error('JSONP user aborted read');
  2454. err.code = 1000;
  2455. this._abort(err);
  2456. }
  2457. };
  2458. JsonpReceiver.timeout = 35000;
  2459. JsonpReceiver.scriptErrorTimeout = 1000;
  2460. JsonpReceiver.prototype._callback = function (data) {
  2461. debug('_callback', data);
  2462. this._cleanup();
  2463. if (this.aborting) {
  2464. return;
  2465. }
  2466. if (data) {
  2467. debug('message', data);
  2468. this.emit('message', data);
  2469. }
  2470. this.emit('close', null, 'network');
  2471. this.removeAllListeners();
  2472. };
  2473. JsonpReceiver.prototype._abort = function (err) {
  2474. debug('_abort', err);
  2475. this._cleanup();
  2476. this.aborting = true;
  2477. this.emit('close', err.code, err.message);
  2478. this.removeAllListeners();
  2479. };
  2480. JsonpReceiver.prototype._cleanup = function () {
  2481. debug('_cleanup');
  2482. clearTimeout(this.timeoutId);
  2483. if (this.script2) {
  2484. this.script2.parentNode.removeChild(this.script2);
  2485. this.script2 = null;
  2486. }
  2487. if (this.script) {
  2488. var script = this.script;
  2489. // Unfortunately, you can't really abort script loading of
  2490. // the script.
  2491. script.parentNode.removeChild(script);
  2492. script.onreadystatechange = script.onerror = script.onload = script.onclick = null;
  2493. this.script = null;
  2494. }
  2495. delete __webpack_require__.g[utils.WPrefix][this.id];
  2496. };
  2497. JsonpReceiver.prototype._scriptError = function () {
  2498. debug('_scriptError');
  2499. var self = this;
  2500. if (this.errorTimer) {
  2501. return;
  2502. }
  2503. this.errorTimer = setTimeout(function () {
  2504. if (!self.loadedOkay) {
  2505. self._abort(new Error('JSONP script loaded abnormally (onerror)'));
  2506. }
  2507. }, JsonpReceiver.scriptErrorTimeout);
  2508. };
  2509. JsonpReceiver.prototype._createScript = function (url) {
  2510. debug('_createScript', url);
  2511. var self = this;
  2512. var script = this.script = __webpack_require__.g.document.createElement('script');
  2513. var script2; // Opera synchronous load trick.
  2514. script.id = 'a' + random.string(8);
  2515. script.src = url;
  2516. script.type = 'text/javascript';
  2517. script.charset = 'UTF-8';
  2518. script.onerror = this._scriptError.bind(this);
  2519. script.onload = function () {
  2520. debug('onload');
  2521. self._abort(new Error('JSONP script loaded abnormally (onload)'));
  2522. };
  2523. // IE9 fires 'error' event after onreadystatechange or before, in random order.
  2524. // Use loadedOkay to determine if actually errored
  2525. script.onreadystatechange = function () {
  2526. debug('onreadystatechange', script.readyState);
  2527. if (/loaded|closed/.test(script.readyState)) {
  2528. if (script && script.htmlFor && script.onclick) {
  2529. self.loadedOkay = true;
  2530. try {
  2531. // In IE, actually execute the script.
  2532. script.onclick();
  2533. } catch (x) {
  2534. // intentionally empty
  2535. }
  2536. }
  2537. if (script) {
  2538. self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));
  2539. }
  2540. }
  2541. };
  2542. // IE: event/htmlFor/onclick trick.
  2543. // One can't rely on proper order for onreadystatechange. In order to
  2544. // make sure, set a 'htmlFor' and 'event' properties, so that
  2545. // script code will be installed as 'onclick' handler for the
  2546. // script object. Later, onreadystatechange, manually execute this
  2547. // code. FF and Chrome doesn't work with 'event' and 'htmlFor'
  2548. // set. For reference see:
  2549. // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html
  2550. // Also, read on that about script ordering:
  2551. // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
  2552. if (typeof script.async === 'undefined' && __webpack_require__.g.document.attachEvent) {
  2553. // According to mozilla docs, in recent browsers script.async defaults
  2554. // to 'true', so we may use it to detect a good browser:
  2555. // https://developer.mozilla.org/en/HTML/Element/script
  2556. if (!browser.isOpera()) {
  2557. // Naively assume we're in IE
  2558. try {
  2559. script.htmlFor = script.id;
  2560. script.event = 'onclick';
  2561. } catch (x) {
  2562. // intentionally empty
  2563. }
  2564. script.async = true;
  2565. } else {
  2566. // Opera, second sync script hack
  2567. script2 = this.script2 = __webpack_require__.g.document.createElement('script');
  2568. script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};";
  2569. script.async = script2.async = false;
  2570. }
  2571. }
  2572. if (typeof script.async !== 'undefined') {
  2573. script.async = true;
  2574. }
  2575. var head = __webpack_require__.g.document.getElementsByTagName('head')[0];
  2576. head.insertBefore(script, head.firstChild);
  2577. if (script2) {
  2578. head.insertBefore(script2, head.firstChild);
  2579. }
  2580. };
  2581. module.exports = JsonpReceiver;
  2582. /***/ }),
  2583. /***/ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js":
  2584. /*!******************************************************************!*\
  2585. !*** ./node_modules/sockjs-client/lib/transport/receiver/xhr.js ***!
  2586. \******************************************************************/
  2587. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2588. "use strict";
  2589. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2590. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2591. var debug = function debug() {};
  2592. if (true) {
  2593. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:xhr');
  2594. }
  2595. function XhrReceiver(url, AjaxObject) {
  2596. debug(url);
  2597. EventEmitter.call(this);
  2598. var self = this;
  2599. this.bufferPosition = 0;
  2600. this.xo = new AjaxObject('POST', url, null);
  2601. this.xo.on('chunk', this._chunkHandler.bind(this));
  2602. this.xo.once('finish', function (status, text) {
  2603. debug('finish', status, text);
  2604. self._chunkHandler(status, text);
  2605. self.xo = null;
  2606. var reason = status === 200 ? 'network' : 'permanent';
  2607. debug('close', reason);
  2608. self.emit('close', null, reason);
  2609. self._cleanup();
  2610. });
  2611. }
  2612. inherits(XhrReceiver, EventEmitter);
  2613. XhrReceiver.prototype._chunkHandler = function (status, text) {
  2614. debug('_chunkHandler', status);
  2615. if (status !== 200 || !text) {
  2616. return;
  2617. }
  2618. for (var idx = -1;; this.bufferPosition += idx + 1) {
  2619. var buf = text.slice(this.bufferPosition);
  2620. idx = buf.indexOf('\n');
  2621. if (idx === -1) {
  2622. break;
  2623. }
  2624. var msg = buf.slice(0, idx);
  2625. if (msg) {
  2626. debug('message', msg);
  2627. this.emit('message', msg);
  2628. }
  2629. }
  2630. };
  2631. XhrReceiver.prototype._cleanup = function () {
  2632. debug('_cleanup');
  2633. this.removeAllListeners();
  2634. };
  2635. XhrReceiver.prototype.abort = function () {
  2636. debug('abort');
  2637. if (this.xo) {
  2638. this.xo.close();
  2639. debug('close');
  2640. this.emit('close', null, 'user');
  2641. this.xo = null;
  2642. }
  2643. this._cleanup();
  2644. };
  2645. module.exports = XhrReceiver;
  2646. /***/ }),
  2647. /***/ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js":
  2648. /*!******************************************************************!*\
  2649. !*** ./node_modules/sockjs-client/lib/transport/sender/jsonp.js ***!
  2650. \******************************************************************/
  2651. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2652. "use strict";
  2653. var random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  2654. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js");
  2655. var debug = function debug() {};
  2656. if (true) {
  2657. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender:jsonp');
  2658. }
  2659. var form, area;
  2660. function createIframe(id) {
  2661. debug('createIframe', id);
  2662. try {
  2663. // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
  2664. return __webpack_require__.g.document.createElement('<iframe name="' + id + '">');
  2665. } catch (x) {
  2666. var iframe = __webpack_require__.g.document.createElement('iframe');
  2667. iframe.name = id;
  2668. return iframe;
  2669. }
  2670. }
  2671. function createForm() {
  2672. debug('createForm');
  2673. form = __webpack_require__.g.document.createElement('form');
  2674. form.style.display = 'none';
  2675. form.style.position = 'absolute';
  2676. form.method = 'POST';
  2677. form.enctype = 'application/x-www-form-urlencoded';
  2678. form.acceptCharset = 'UTF-8';
  2679. area = __webpack_require__.g.document.createElement('textarea');
  2680. area.name = 'd';
  2681. form.appendChild(area);
  2682. __webpack_require__.g.document.body.appendChild(form);
  2683. }
  2684. module.exports = function (url, payload, callback) {
  2685. debug(url, payload);
  2686. if (!form) {
  2687. createForm();
  2688. }
  2689. var id = 'a' + random.string(8);
  2690. form.target = id;
  2691. form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);
  2692. var iframe = createIframe(id);
  2693. iframe.id = id;
  2694. iframe.style.display = 'none';
  2695. form.appendChild(iframe);
  2696. try {
  2697. area.value = payload;
  2698. } catch (e) {
  2699. // seriously broken browsers get here
  2700. }
  2701. form.submit();
  2702. var completed = function completed(err) {
  2703. debug('completed', id, err);
  2704. if (!iframe.onerror) {
  2705. return;
  2706. }
  2707. iframe.onreadystatechange = iframe.onerror = iframe.onload = null;
  2708. // Opera mini doesn't like if we GC iframe
  2709. // immediately, thus this timeout.
  2710. setTimeout(function () {
  2711. debug('cleaning up', id);
  2712. iframe.parentNode.removeChild(iframe);
  2713. iframe = null;
  2714. }, 500);
  2715. area.value = '';
  2716. // It is not possible to detect if the iframe succeeded or
  2717. // failed to submit our form.
  2718. callback(err);
  2719. };
  2720. iframe.onerror = function () {
  2721. debug('onerror', id);
  2722. completed();
  2723. };
  2724. iframe.onload = function () {
  2725. debug('onload', id);
  2726. completed();
  2727. };
  2728. iframe.onreadystatechange = function (e) {
  2729. debug('onreadystatechange', id, iframe.readyState, e);
  2730. if (iframe.readyState === 'complete') {
  2731. completed();
  2732. }
  2733. };
  2734. return function () {
  2735. debug('aborted', id);
  2736. completed(new Error('Aborted'));
  2737. };
  2738. };
  2739. /***/ }),
  2740. /***/ "./node_modules/sockjs-client/lib/transport/sender/xdr.js":
  2741. /*!****************************************************************!*\
  2742. !*** ./node_modules/sockjs-client/lib/transport/sender/xdr.js ***!
  2743. \****************************************************************/
  2744. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2745. "use strict";
  2746. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2747. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2748. eventUtils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  2749. browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  2750. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js");
  2751. var debug = function debug() {};
  2752. if (true) {
  2753. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender:xdr');
  2754. }
  2755. // References:
  2756. // http://ajaxian.com/archives/100-line-ajax-wrapper
  2757. // http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx
  2758. function XDRObject(method, url, payload) {
  2759. debug(method, url);
  2760. var self = this;
  2761. EventEmitter.call(this);
  2762. setTimeout(function () {
  2763. self._start(method, url, payload);
  2764. }, 0);
  2765. }
  2766. inherits(XDRObject, EventEmitter);
  2767. XDRObject.prototype._start = function (method, url, payload) {
  2768. debug('_start');
  2769. var self = this;
  2770. var xdr = new __webpack_require__.g.XDomainRequest();
  2771. // IE caches even POSTs
  2772. url = urlUtils.addQuery(url, 't=' + +new Date());
  2773. xdr.onerror = function () {
  2774. debug('onerror');
  2775. self._error();
  2776. };
  2777. xdr.ontimeout = function () {
  2778. debug('ontimeout');
  2779. self._error();
  2780. };
  2781. xdr.onprogress = function () {
  2782. debug('progress', xdr.responseText);
  2783. self.emit('chunk', 200, xdr.responseText);
  2784. };
  2785. xdr.onload = function () {
  2786. debug('load');
  2787. self.emit('finish', 200, xdr.responseText);
  2788. self._cleanup(false);
  2789. };
  2790. this.xdr = xdr;
  2791. this.unloadRef = eventUtils.unloadAdd(function () {
  2792. self._cleanup(true);
  2793. });
  2794. try {
  2795. // Fails with AccessDenied if port number is bogus
  2796. this.xdr.open(method, url);
  2797. if (this.timeout) {
  2798. this.xdr.timeout = this.timeout;
  2799. }
  2800. this.xdr.send(payload);
  2801. } catch (x) {
  2802. this._error();
  2803. }
  2804. };
  2805. XDRObject.prototype._error = function () {
  2806. this.emit('finish', 0, '');
  2807. this._cleanup(false);
  2808. };
  2809. XDRObject.prototype._cleanup = function (abort) {
  2810. debug('cleanup', abort);
  2811. if (!this.xdr) {
  2812. return;
  2813. }
  2814. this.removeAllListeners();
  2815. eventUtils.unloadDel(this.unloadRef);
  2816. this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;
  2817. if (abort) {
  2818. try {
  2819. this.xdr.abort();
  2820. } catch (x) {
  2821. // intentionally empty
  2822. }
  2823. }
  2824. this.unloadRef = this.xdr = null;
  2825. };
  2826. XDRObject.prototype.close = function () {
  2827. debug('close');
  2828. this._cleanup(true);
  2829. };
  2830. // IE 8/9 if the request target uses the same scheme - #79
  2831. XDRObject.enabled = !!(__webpack_require__.g.XDomainRequest && browser.hasDomain());
  2832. module.exports = XDRObject;
  2833. /***/ }),
  2834. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js":
  2835. /*!*********************************************************************!*\
  2836. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js ***!
  2837. \*********************************************************************/
  2838. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2839. "use strict";
  2840. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2841. XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
  2842. function XHRCorsObject(method, url, payload, opts) {
  2843. XhrDriver.call(this, method, url, payload, opts);
  2844. }
  2845. inherits(XHRCorsObject, XhrDriver);
  2846. XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
  2847. module.exports = XHRCorsObject;
  2848. /***/ }),
  2849. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js":
  2850. /*!*********************************************************************!*\
  2851. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js ***!
  2852. \*********************************************************************/
  2853. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2854. "use strict";
  2855. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2856. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  2857. function XHRFake(/* method, url, payload, opts */
  2858. ) {
  2859. var self = this;
  2860. EventEmitter.call(this);
  2861. this.to = setTimeout(function () {
  2862. self.emit('finish', 200, '{}');
  2863. }, XHRFake.timeout);
  2864. }
  2865. inherits(XHRFake, EventEmitter);
  2866. XHRFake.prototype.close = function () {
  2867. clearTimeout(this.to);
  2868. };
  2869. XHRFake.timeout = 2000;
  2870. module.exports = XHRFake;
  2871. /***/ }),
  2872. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js":
  2873. /*!**********************************************************************!*\
  2874. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-local.js ***!
  2875. \**********************************************************************/
  2876. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2877. "use strict";
  2878. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2879. XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
  2880. function XHRLocalObject(method, url, payload /*, opts */) {
  2881. XhrDriver.call(this, method, url, payload, {
  2882. noCredentials: true
  2883. });
  2884. }
  2885. inherits(XHRLocalObject, XhrDriver);
  2886. XHRLocalObject.enabled = XhrDriver.enabled;
  2887. module.exports = XHRLocalObject;
  2888. /***/ }),
  2889. /***/ "./node_modules/sockjs-client/lib/transport/websocket.js":
  2890. /*!***************************************************************!*\
  2891. !*** ./node_modules/sockjs-client/lib/transport/websocket.js ***!
  2892. \***************************************************************/
  2893. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2894. "use strict";
  2895. var utils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  2896. urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2897. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2898. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2899. WebsocketDriver = __webpack_require__(/*! ./driver/websocket */ "./node_modules/sockjs-client/lib/transport/browser/websocket.js");
  2900. var debug = function debug() {};
  2901. if (true) {
  2902. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:websocket');
  2903. }
  2904. function WebSocketTransport(transUrl, ignore, options) {
  2905. if (!WebSocketTransport.enabled()) {
  2906. throw new Error('Transport created when disabled');
  2907. }
  2908. EventEmitter.call(this);
  2909. debug('constructor', transUrl);
  2910. var self = this;
  2911. var url = urlUtils.addPath(transUrl, '/websocket');
  2912. if (url.slice(0, 5) === 'https') {
  2913. url = 'wss' + url.slice(5);
  2914. } else {
  2915. url = 'ws' + url.slice(4);
  2916. }
  2917. this.url = url;
  2918. this.ws = new WebsocketDriver(this.url, [], options);
  2919. this.ws.onmessage = function (e) {
  2920. debug('message event', e.data);
  2921. self.emit('message', e.data);
  2922. };
  2923. // Firefox has an interesting bug. If a websocket connection is
  2924. // created after onunload, it stays alive even when user
  2925. // navigates away from the page. In such situation let's lie -
  2926. // let's not open the ws connection at all. See:
  2927. // https://github.com/sockjs/sockjs-client/issues/28
  2928. // https://bugzilla.mozilla.org/show_bug.cgi?id=696085
  2929. this.unloadRef = utils.unloadAdd(function () {
  2930. debug('unload');
  2931. self.ws.close();
  2932. });
  2933. this.ws.onclose = function (e) {
  2934. debug('close event', e.code, e.reason);
  2935. self.emit('close', e.code, e.reason);
  2936. self._cleanup();
  2937. };
  2938. this.ws.onerror = function (e) {
  2939. debug('error event', e);
  2940. self.emit('close', 1006, 'WebSocket connection broken');
  2941. self._cleanup();
  2942. };
  2943. }
  2944. inherits(WebSocketTransport, EventEmitter);
  2945. WebSocketTransport.prototype.send = function (data) {
  2946. var msg = '[' + data + ']';
  2947. debug('send', msg);
  2948. this.ws.send(msg);
  2949. };
  2950. WebSocketTransport.prototype.close = function () {
  2951. debug('close');
  2952. var ws = this.ws;
  2953. this._cleanup();
  2954. if (ws) {
  2955. ws.close();
  2956. }
  2957. };
  2958. WebSocketTransport.prototype._cleanup = function () {
  2959. debug('_cleanup');
  2960. var ws = this.ws;
  2961. if (ws) {
  2962. ws.onmessage = ws.onclose = ws.onerror = null;
  2963. }
  2964. utils.unloadDel(this.unloadRef);
  2965. this.unloadRef = this.ws = null;
  2966. this.removeAllListeners();
  2967. };
  2968. WebSocketTransport.enabled = function () {
  2969. debug('enabled');
  2970. return !!WebsocketDriver;
  2971. };
  2972. WebSocketTransport.transportName = 'websocket';
  2973. // In theory, ws should require 1 round trip. But in chrome, this is
  2974. // not very stable over SSL. Most likely a ws connection requires a
  2975. // separate SSL connection, in which case 2 round trips are an
  2976. // absolute minumum.
  2977. WebSocketTransport.roundTrips = 2;
  2978. module.exports = WebSocketTransport;
  2979. /***/ }),
  2980. /***/ "./node_modules/sockjs-client/lib/transport/xdr-polling.js":
  2981. /*!*****************************************************************!*\
  2982. !*** ./node_modules/sockjs-client/lib/transport/xdr-polling.js ***!
  2983. \*****************************************************************/
  2984. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2985. "use strict";
  2986. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2987. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  2988. XdrStreamingTransport = __webpack_require__(/*! ./xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js"),
  2989. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  2990. XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js");
  2991. function XdrPollingTransport(transUrl) {
  2992. if (!XDRObject.enabled) {
  2993. throw new Error('Transport created when disabled');
  2994. }
  2995. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
  2996. }
  2997. inherits(XdrPollingTransport, AjaxBasedTransport);
  2998. XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
  2999. XdrPollingTransport.transportName = 'xdr-polling';
  3000. XdrPollingTransport.roundTrips = 2; // preflight, ajax
  3001. module.exports = XdrPollingTransport;
  3002. /***/ }),
  3003. /***/ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js":
  3004. /*!*******************************************************************!*\
  3005. !*** ./node_modules/sockjs-client/lib/transport/xdr-streaming.js ***!
  3006. \*******************************************************************/
  3007. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3008. "use strict";
  3009. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  3010. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  3011. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  3012. XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js");
  3013. // According to:
  3014. // http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
  3015. // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
  3016. function XdrStreamingTransport(transUrl) {
  3017. if (!XDRObject.enabled) {
  3018. throw new Error('Transport created when disabled');
  3019. }
  3020. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
  3021. }
  3022. inherits(XdrStreamingTransport, AjaxBasedTransport);
  3023. XdrStreamingTransport.enabled = function (info) {
  3024. if (info.cookie_needed || info.nullOrigin) {
  3025. return false;
  3026. }
  3027. return XDRObject.enabled && info.sameScheme;
  3028. };
  3029. XdrStreamingTransport.transportName = 'xdr-streaming';
  3030. XdrStreamingTransport.roundTrips = 2; // preflight, ajax
  3031. module.exports = XdrStreamingTransport;
  3032. /***/ }),
  3033. /***/ "./node_modules/sockjs-client/lib/transport/xhr-polling.js":
  3034. /*!*****************************************************************!*\
  3035. !*** ./node_modules/sockjs-client/lib/transport/xhr-polling.js ***!
  3036. \*****************************************************************/
  3037. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3038. "use strict";
  3039. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  3040. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  3041. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  3042. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  3043. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js");
  3044. function XhrPollingTransport(transUrl) {
  3045. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  3046. throw new Error('Transport created when disabled');
  3047. }
  3048. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
  3049. }
  3050. inherits(XhrPollingTransport, AjaxBasedTransport);
  3051. XhrPollingTransport.enabled = function (info) {
  3052. if (info.nullOrigin) {
  3053. return false;
  3054. }
  3055. if (XHRLocalObject.enabled && info.sameOrigin) {
  3056. return true;
  3057. }
  3058. return XHRCorsObject.enabled;
  3059. };
  3060. XhrPollingTransport.transportName = 'xhr-polling';
  3061. XhrPollingTransport.roundTrips = 2; // preflight, ajax
  3062. module.exports = XhrPollingTransport;
  3063. /***/ }),
  3064. /***/ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js":
  3065. /*!*******************************************************************!*\
  3066. !*** ./node_modules/sockjs-client/lib/transport/xhr-streaming.js ***!
  3067. \*******************************************************************/
  3068. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3069. "use strict";
  3070. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  3071. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  3072. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  3073. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  3074. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  3075. browser = __webpack_require__(/*! ../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js");
  3076. function XhrStreamingTransport(transUrl) {
  3077. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  3078. throw new Error('Transport created when disabled');
  3079. }
  3080. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
  3081. }
  3082. inherits(XhrStreamingTransport, AjaxBasedTransport);
  3083. XhrStreamingTransport.enabled = function (info) {
  3084. if (info.nullOrigin) {
  3085. return false;
  3086. }
  3087. // Opera doesn't support xhr-streaming #60
  3088. // But it might be able to #92
  3089. if (browser.isOpera()) {
  3090. return false;
  3091. }
  3092. return XHRCorsObject.enabled;
  3093. };
  3094. XhrStreamingTransport.transportName = 'xhr-streaming';
  3095. XhrStreamingTransport.roundTrips = 2; // preflight, ajax
  3096. // Safari gets confused when a streaming ajax request is started
  3097. // before onload. This causes the load indicator to spin indefinetely.
  3098. // Only require body when used in a browser
  3099. XhrStreamingTransport.needBody = !!__webpack_require__.g.document;
  3100. module.exports = XhrStreamingTransport;
  3101. /***/ }),
  3102. /***/ "./node_modules/sockjs-client/lib/utils/browser-crypto.js":
  3103. /*!****************************************************************!*\
  3104. !*** ./node_modules/sockjs-client/lib/utils/browser-crypto.js ***!
  3105. \****************************************************************/
  3106. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3107. "use strict";
  3108. if (__webpack_require__.g.crypto && __webpack_require__.g.crypto.getRandomValues) {
  3109. module.exports.randomBytes = function (length) {
  3110. var bytes = new Uint8Array(length);
  3111. __webpack_require__.g.crypto.getRandomValues(bytes);
  3112. return bytes;
  3113. };
  3114. } else {
  3115. module.exports.randomBytes = function (length) {
  3116. var bytes = new Array(length);
  3117. for (var i = 0; i < length; i++) {
  3118. bytes[i] = Math.floor(Math.random() * 256);
  3119. }
  3120. return bytes;
  3121. };
  3122. }
  3123. /***/ }),
  3124. /***/ "./node_modules/sockjs-client/lib/utils/browser.js":
  3125. /*!*********************************************************!*\
  3126. !*** ./node_modules/sockjs-client/lib/utils/browser.js ***!
  3127. \*********************************************************/
  3128. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3129. "use strict";
  3130. module.exports = {
  3131. isOpera: function isOpera() {
  3132. return __webpack_require__.g.navigator && /opera/i.test(__webpack_require__.g.navigator.userAgent);
  3133. },
  3134. isKonqueror: function isKonqueror() {
  3135. return __webpack_require__.g.navigator && /konqueror/i.test(__webpack_require__.g.navigator.userAgent);
  3136. }
  3137. // #187 wrap document.domain in try/catch because of WP8 from file:///
  3138. ,
  3139. hasDomain: function hasDomain() {
  3140. // non-browser client always has a domain
  3141. if (!__webpack_require__.g.document) {
  3142. return true;
  3143. }
  3144. try {
  3145. return !!__webpack_require__.g.document.domain;
  3146. } catch (e) {
  3147. return false;
  3148. }
  3149. }
  3150. };
  3151. /***/ }),
  3152. /***/ "./node_modules/sockjs-client/lib/utils/escape.js":
  3153. /*!********************************************************!*\
  3154. !*** ./node_modules/sockjs-client/lib/utils/escape.js ***!
  3155. \********************************************************/
  3156. /***/ (function(module) {
  3157. "use strict";
  3158. // Some extra characters that Chrome gets wrong, and substitutes with
  3159. // something else on the wire.
  3160. // eslint-disable-next-line no-control-regex, no-misleading-character-class
  3161. var extraEscapable = /[\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,
  3162. extraLookup;
  3163. // This may be quite slow, so let's delay until user actually uses bad
  3164. // characters.
  3165. var unrollLookup = function unrollLookup(escapable) {
  3166. var i;
  3167. var unrolled = {};
  3168. var c = [];
  3169. for (i = 0; i < 65536; i++) {
  3170. c.push(String.fromCharCode(i));
  3171. }
  3172. escapable.lastIndex = 0;
  3173. c.join('').replace(escapable, function (a) {
  3174. unrolled[a] = "\\u" + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
  3175. return '';
  3176. });
  3177. escapable.lastIndex = 0;
  3178. return unrolled;
  3179. };
  3180. // Quote string, also taking care of unicode characters that browsers
  3181. // often break. Especially, take care of unicode surrogates:
  3182. // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
  3183. module.exports = {
  3184. quote: function quote(string) {
  3185. var quoted = JSON.stringify(string);
  3186. // In most cases this should be very fast and good enough.
  3187. extraEscapable.lastIndex = 0;
  3188. if (!extraEscapable.test(quoted)) {
  3189. return quoted;
  3190. }
  3191. if (!extraLookup) {
  3192. extraLookup = unrollLookup(extraEscapable);
  3193. }
  3194. return quoted.replace(extraEscapable, function (a) {
  3195. return extraLookup[a];
  3196. });
  3197. }
  3198. };
  3199. /***/ }),
  3200. /***/ "./node_modules/sockjs-client/lib/utils/event.js":
  3201. /*!*******************************************************!*\
  3202. !*** ./node_modules/sockjs-client/lib/utils/event.js ***!
  3203. \*******************************************************/
  3204. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3205. "use strict";
  3206. var random = __webpack_require__(/*! ./random */ "./node_modules/sockjs-client/lib/utils/random.js");
  3207. var onUnload = {},
  3208. afterUnload = false
  3209. // detect google chrome packaged apps because they don't allow the 'unload' event
  3210. ,
  3211. isChromePackagedApp = __webpack_require__.g.chrome && __webpack_require__.g.chrome.app && __webpack_require__.g.chrome.app.runtime;
  3212. module.exports = {
  3213. attachEvent: function attachEvent(event, listener) {
  3214. if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
  3215. __webpack_require__.g.addEventListener(event, listener, false);
  3216. } else if (__webpack_require__.g.document && __webpack_require__.g.attachEvent) {
  3217. // IE quirks.
  3218. // According to: http://stevesouders.com/misc/test-postmessage.php
  3219. // the message gets delivered only to 'document', not 'window'.
  3220. __webpack_require__.g.document.attachEvent('on' + event, listener);
  3221. // I get 'window' for ie8.
  3222. __webpack_require__.g.attachEvent('on' + event, listener);
  3223. }
  3224. },
  3225. detachEvent: function detachEvent(event, listener) {
  3226. if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
  3227. __webpack_require__.g.removeEventListener(event, listener, false);
  3228. } else if (__webpack_require__.g.document && __webpack_require__.g.detachEvent) {
  3229. __webpack_require__.g.document.detachEvent('on' + event, listener);
  3230. __webpack_require__.g.detachEvent('on' + event, listener);
  3231. }
  3232. },
  3233. unloadAdd: function unloadAdd(listener) {
  3234. if (isChromePackagedApp) {
  3235. return null;
  3236. }
  3237. var ref = random.string(8);
  3238. onUnload[ref] = listener;
  3239. if (afterUnload) {
  3240. setTimeout(this.triggerUnloadCallbacks, 0);
  3241. }
  3242. return ref;
  3243. },
  3244. unloadDel: function unloadDel(ref) {
  3245. if (ref in onUnload) {
  3246. delete onUnload[ref];
  3247. }
  3248. },
  3249. triggerUnloadCallbacks: function triggerUnloadCallbacks() {
  3250. for (var ref in onUnload) {
  3251. onUnload[ref]();
  3252. delete onUnload[ref];
  3253. }
  3254. }
  3255. };
  3256. var unloadTriggered = function unloadTriggered() {
  3257. if (afterUnload) {
  3258. return;
  3259. }
  3260. afterUnload = true;
  3261. module.exports.triggerUnloadCallbacks();
  3262. };
  3263. // 'unload' alone is not reliable in opera within an iframe, but we
  3264. // can't use `beforeunload` as IE fires it on javascript: links.
  3265. if (!isChromePackagedApp) {
  3266. module.exports.attachEvent('unload', unloadTriggered);
  3267. }
  3268. /***/ }),
  3269. /***/ "./node_modules/sockjs-client/lib/utils/iframe.js":
  3270. /*!********************************************************!*\
  3271. !*** ./node_modules/sockjs-client/lib/utils/iframe.js ***!
  3272. \********************************************************/
  3273. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3274. "use strict";
  3275. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  3276. var eventUtils = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  3277. browser = __webpack_require__(/*! ./browser */ "./node_modules/sockjs-client/lib/utils/browser.js");
  3278. var debug = function debug() {};
  3279. if (true) {
  3280. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:iframe');
  3281. }
  3282. module.exports = {
  3283. WPrefix: '_jp',
  3284. currentWindowId: null,
  3285. polluteGlobalNamespace: function polluteGlobalNamespace() {
  3286. if (!(module.exports.WPrefix in __webpack_require__.g)) {
  3287. __webpack_require__.g[module.exports.WPrefix] = {};
  3288. }
  3289. },
  3290. postMessage: function postMessage(type, data) {
  3291. if (__webpack_require__.g.parent !== __webpack_require__.g) {
  3292. __webpack_require__.g.parent.postMessage(JSON.stringify({
  3293. windowId: module.exports.currentWindowId,
  3294. type: type,
  3295. data: data || ''
  3296. }), '*');
  3297. } else {
  3298. debug('Cannot postMessage, no parent window.', type, data);
  3299. }
  3300. },
  3301. createIframe: function createIframe(iframeUrl, errorCallback) {
  3302. var iframe = __webpack_require__.g.document.createElement('iframe');
  3303. var tref, unloadRef;
  3304. var unattach = function unattach() {
  3305. debug('unattach');
  3306. clearTimeout(tref);
  3307. // Explorer had problems with that.
  3308. try {
  3309. iframe.onload = null;
  3310. } catch (x) {
  3311. // intentionally empty
  3312. }
  3313. iframe.onerror = null;
  3314. };
  3315. var cleanup = function cleanup() {
  3316. debug('cleanup');
  3317. if (iframe) {
  3318. unattach();
  3319. // This timeout makes chrome fire onbeforeunload event
  3320. // within iframe. Without the timeout it goes straight to
  3321. // onunload.
  3322. setTimeout(function () {
  3323. if (iframe) {
  3324. iframe.parentNode.removeChild(iframe);
  3325. }
  3326. iframe = null;
  3327. }, 0);
  3328. eventUtils.unloadDel(unloadRef);
  3329. }
  3330. };
  3331. var onerror = function onerror(err) {
  3332. debug('onerror', err);
  3333. if (iframe) {
  3334. cleanup();
  3335. errorCallback(err);
  3336. }
  3337. };
  3338. var post = function post(msg, origin) {
  3339. debug('post', msg, origin);
  3340. setTimeout(function () {
  3341. try {
  3342. // When the iframe is not loaded, IE raises an exception
  3343. // on 'contentWindow'.
  3344. if (iframe && iframe.contentWindow) {
  3345. iframe.contentWindow.postMessage(msg, origin);
  3346. }
  3347. } catch (x) {
  3348. // intentionally empty
  3349. }
  3350. }, 0);
  3351. };
  3352. iframe.src = iframeUrl;
  3353. iframe.style.display = 'none';
  3354. iframe.style.position = 'absolute';
  3355. iframe.onerror = function () {
  3356. onerror('onerror');
  3357. };
  3358. iframe.onload = function () {
  3359. debug('onload');
  3360. // `onload` is triggered before scripts on the iframe are
  3361. // executed. Give it few seconds to actually load stuff.
  3362. clearTimeout(tref);
  3363. tref = setTimeout(function () {
  3364. onerror('onload timeout');
  3365. }, 2000);
  3366. };
  3367. __webpack_require__.g.document.body.appendChild(iframe);
  3368. tref = setTimeout(function () {
  3369. onerror('timeout');
  3370. }, 15000);
  3371. unloadRef = eventUtils.unloadAdd(cleanup);
  3372. return {
  3373. post: post,
  3374. cleanup: cleanup,
  3375. loaded: unattach
  3376. };
  3377. }
  3378. /* eslint no-undef: "off", new-cap: "off" */,
  3379. createHtmlfile: function createHtmlfile(iframeUrl, errorCallback) {
  3380. var axo = ['Active'].concat('Object').join('X');
  3381. var doc = new __webpack_require__.g[axo]('htmlfile');
  3382. var tref, unloadRef;
  3383. var iframe;
  3384. var unattach = function unattach() {
  3385. clearTimeout(tref);
  3386. iframe.onerror = null;
  3387. };
  3388. var cleanup = function cleanup() {
  3389. if (doc) {
  3390. unattach();
  3391. eventUtils.unloadDel(unloadRef);
  3392. iframe.parentNode.removeChild(iframe);
  3393. iframe = doc = null;
  3394. CollectGarbage();
  3395. }
  3396. };
  3397. var onerror = function onerror(r) {
  3398. debug('onerror', r);
  3399. if (doc) {
  3400. cleanup();
  3401. errorCallback(r);
  3402. }
  3403. };
  3404. var post = function post(msg, origin) {
  3405. try {
  3406. // When the iframe is not loaded, IE raises an exception
  3407. // on 'contentWindow'.
  3408. setTimeout(function () {
  3409. if (iframe && iframe.contentWindow) {
  3410. iframe.contentWindow.postMessage(msg, origin);
  3411. }
  3412. }, 0);
  3413. } catch (x) {
  3414. // intentionally empty
  3415. }
  3416. };
  3417. doc.open();
  3418. doc.write('<html><s' + 'cript>' + 'document.domain="' + __webpack_require__.g.document.domain + '";' + '</s' + 'cript></html>');
  3419. doc.close();
  3420. doc.parentWindow[module.exports.WPrefix] = __webpack_require__.g[module.exports.WPrefix];
  3421. var c = doc.createElement('div');
  3422. doc.body.appendChild(c);
  3423. iframe = doc.createElement('iframe');
  3424. c.appendChild(iframe);
  3425. iframe.src = iframeUrl;
  3426. iframe.onerror = function () {
  3427. onerror('onerror');
  3428. };
  3429. tref = setTimeout(function () {
  3430. onerror('timeout');
  3431. }, 15000);
  3432. unloadRef = eventUtils.unloadAdd(cleanup);
  3433. return {
  3434. post: post,
  3435. cleanup: cleanup,
  3436. loaded: unattach
  3437. };
  3438. }
  3439. };
  3440. module.exports.iframeEnabled = false;
  3441. if (__webpack_require__.g.document) {
  3442. // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with
  3443. // huge delay, or not at all.
  3444. module.exports.iframeEnabled = (typeof __webpack_require__.g.postMessage === 'function' || _typeof(__webpack_require__.g.postMessage) === 'object') && !browser.isKonqueror();
  3445. }
  3446. /***/ }),
  3447. /***/ "./node_modules/sockjs-client/lib/utils/log.js":
  3448. /*!*****************************************************!*\
  3449. !*** ./node_modules/sockjs-client/lib/utils/log.js ***!
  3450. \*****************************************************/
  3451. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3452. "use strict";
  3453. var logObject = {};
  3454. ['log', 'debug', 'warn'].forEach(function (level) {
  3455. var levelExists;
  3456. try {
  3457. levelExists = __webpack_require__.g.console && __webpack_require__.g.console[level] && __webpack_require__.g.console[level].apply;
  3458. } catch (e) {
  3459. // do nothing
  3460. }
  3461. logObject[level] = levelExists ? function () {
  3462. return __webpack_require__.g.console[level].apply(__webpack_require__.g.console, arguments);
  3463. } : level === 'log' ? function () {} : logObject.log;
  3464. });
  3465. module.exports = logObject;
  3466. /***/ }),
  3467. /***/ "./node_modules/sockjs-client/lib/utils/object.js":
  3468. /*!********************************************************!*\
  3469. !*** ./node_modules/sockjs-client/lib/utils/object.js ***!
  3470. \********************************************************/
  3471. /***/ (function(module) {
  3472. "use strict";
  3473. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  3474. module.exports = {
  3475. isObject: function isObject(obj) {
  3476. var type = _typeof(obj);
  3477. return type === 'function' || type === 'object' && !!obj;
  3478. },
  3479. extend: function extend(obj) {
  3480. if (!this.isObject(obj)) {
  3481. return obj;
  3482. }
  3483. var source, prop;
  3484. for (var i = 1, length = arguments.length; i < length; i++) {
  3485. source = arguments[i];
  3486. for (prop in source) {
  3487. if (Object.prototype.hasOwnProperty.call(source, prop)) {
  3488. obj[prop] = source[prop];
  3489. }
  3490. }
  3491. }
  3492. return obj;
  3493. }
  3494. };
  3495. /***/ }),
  3496. /***/ "./node_modules/sockjs-client/lib/utils/random.js":
  3497. /*!********************************************************!*\
  3498. !*** ./node_modules/sockjs-client/lib/utils/random.js ***!
  3499. \********************************************************/
  3500. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3501. "use strict";
  3502. var crypto = __webpack_require__(/*! crypto */ "./node_modules/sockjs-client/lib/utils/browser-crypto.js");
  3503. // This string has length 32, a power of 2, so the modulus doesn't introduce a
  3504. // bias.
  3505. var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';
  3506. module.exports = {
  3507. string: function string(length) {
  3508. var max = _randomStringChars.length;
  3509. var bytes = crypto.randomBytes(length);
  3510. var ret = [];
  3511. for (var i = 0; i < length; i++) {
  3512. ret.push(_randomStringChars.substr(bytes[i] % max, 1));
  3513. }
  3514. return ret.join('');
  3515. },
  3516. number: function number(max) {
  3517. return Math.floor(Math.random() * max);
  3518. },
  3519. numberString: function numberString(max) {
  3520. var t = ('' + (max - 1)).length;
  3521. var p = new Array(t + 1).join('0');
  3522. return (p + this.number(max)).slice(-t);
  3523. }
  3524. };
  3525. /***/ }),
  3526. /***/ "./node_modules/sockjs-client/lib/utils/transport.js":
  3527. /*!***********************************************************!*\
  3528. !*** ./node_modules/sockjs-client/lib/utils/transport.js ***!
  3529. \***********************************************************/
  3530. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3531. "use strict";
  3532. var debug = function debug() {};
  3533. if (true) {
  3534. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:transport');
  3535. }
  3536. module.exports = function (availableTransports) {
  3537. return {
  3538. filterToEnabled: function filterToEnabled(transportsWhitelist, info) {
  3539. var transports = {
  3540. main: [],
  3541. facade: []
  3542. };
  3543. if (!transportsWhitelist) {
  3544. transportsWhitelist = [];
  3545. } else if (typeof transportsWhitelist === 'string') {
  3546. transportsWhitelist = [transportsWhitelist];
  3547. }
  3548. availableTransports.forEach(function (trans) {
  3549. if (!trans) {
  3550. return;
  3551. }
  3552. if (trans.transportName === 'websocket' && info.websocket === false) {
  3553. debug('disabled from server', 'websocket');
  3554. return;
  3555. }
  3556. if (transportsWhitelist.length && transportsWhitelist.indexOf(trans.transportName) === -1) {
  3557. debug('not in whitelist', trans.transportName);
  3558. return;
  3559. }
  3560. if (trans.enabled(info)) {
  3561. debug('enabled', trans.transportName);
  3562. transports.main.push(trans);
  3563. if (trans.facadeTransport) {
  3564. transports.facade.push(trans.facadeTransport);
  3565. }
  3566. } else {
  3567. debug('disabled', trans.transportName);
  3568. }
  3569. });
  3570. return transports;
  3571. }
  3572. };
  3573. };
  3574. /***/ }),
  3575. /***/ "./node_modules/sockjs-client/lib/utils/url.js":
  3576. /*!*****************************************************!*\
  3577. !*** ./node_modules/sockjs-client/lib/utils/url.js ***!
  3578. \*****************************************************/
  3579. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3580. "use strict";
  3581. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js");
  3582. var debug = function debug() {};
  3583. if (true) {
  3584. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:url');
  3585. }
  3586. module.exports = {
  3587. getOrigin: function getOrigin(url) {
  3588. if (!url) {
  3589. return null;
  3590. }
  3591. var p = new URL(url);
  3592. if (p.protocol === 'file:') {
  3593. return null;
  3594. }
  3595. var port = p.port;
  3596. if (!port) {
  3597. port = p.protocol === 'https:' ? '443' : '80';
  3598. }
  3599. return p.protocol + '//' + p.hostname + ':' + port;
  3600. },
  3601. isOriginEqual: function isOriginEqual(a, b) {
  3602. var res = this.getOrigin(a) === this.getOrigin(b);
  3603. debug('same', a, b, res);
  3604. return res;
  3605. },
  3606. isSchemeEqual: function isSchemeEqual(a, b) {
  3607. return a.split(':')[0] === b.split(':')[0];
  3608. },
  3609. addPath: function addPath(url, path) {
  3610. var qs = url.split('?');
  3611. return qs[0] + path + (qs[1] ? '?' + qs[1] : '');
  3612. },
  3613. addQuery: function addQuery(url, q) {
  3614. return url + (url.indexOf('?') === -1 ? '?' + q : '&' + q);
  3615. },
  3616. isLoopbackAddr: function isLoopbackAddr(addr) {
  3617. return /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^\[::1\]$/.test(addr);
  3618. }
  3619. };
  3620. /***/ }),
  3621. /***/ "./node_modules/sockjs-client/lib/version.js":
  3622. /*!***************************************************!*\
  3623. !*** ./node_modules/sockjs-client/lib/version.js ***!
  3624. \***************************************************/
  3625. /***/ (function(module) {
  3626. module.exports = '1.6.1';
  3627. /***/ }),
  3628. /***/ "./node_modules/sockjs-client/node_modules/debug/src/browser.js":
  3629. /*!**********************************************************************!*\
  3630. !*** ./node_modules/sockjs-client/node_modules/debug/src/browser.js ***!
  3631. \**********************************************************************/
  3632. /***/ (function(module, exports, __webpack_require__) {
  3633. "use strict";
  3634. function _typeof2(o) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof2(o); }
  3635. function _typeof(obj) {
  3636. if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
  3637. _typeof = function _typeof(obj) {
  3638. return _typeof2(obj);
  3639. };
  3640. } else {
  3641. _typeof = function _typeof(obj) {
  3642. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
  3643. };
  3644. }
  3645. return _typeof(obj);
  3646. }
  3647. /* eslint-env browser */
  3648. /**
  3649. * This is the web browser implementation of `debug()`.
  3650. */
  3651. exports.log = log;
  3652. exports.formatArgs = formatArgs;
  3653. exports.save = save;
  3654. exports.load = load;
  3655. exports.useColors = useColors;
  3656. exports.storage = localstorage();
  3657. /**
  3658. * Colors.
  3659. */
  3660. exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
  3661. /**
  3662. * Currently only WebKit-based Web Inspectors, Firefox >= v31,
  3663. * and the Firebug extension (any Firefox version) are known
  3664. * to support "%c" CSS customizations.
  3665. *
  3666. * TODO: add a `localStorage` variable to explicitly enable/disable colors
  3667. */
  3668. // eslint-disable-next-line complexity
  3669. function useColors() {
  3670. // NB: In an Electron preload script, document will be defined but not fully
  3671. // initialized. Since we know we're in Chrome, we'll just detect this case
  3672. // explicitly
  3673. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  3674. return true;
  3675. } // Internet Explorer and Edge do not support colors.
  3676. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  3677. return false;
  3678. } // Is webkit? http://stackoverflow.com/a/16459606/376773
  3679. // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
  3680. return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
  3681. // Is firebug? http://stackoverflow.com/a/398120/376773
  3682. typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||
  3683. // Is firefox >= v31?
  3684. // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  3685. typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||
  3686. // Double check webkit in userAgent just in case we are in a worker
  3687. typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  3688. }
  3689. /**
  3690. * Colorize log arguments if enabled.
  3691. *
  3692. * @api public
  3693. */
  3694. function formatArgs(args) {
  3695. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  3696. if (!this.useColors) {
  3697. return;
  3698. }
  3699. var c = 'color: ' + this.color;
  3700. args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
  3701. // arguments passed either before or after the %c, so we need to
  3702. // figure out the correct index to insert the CSS into
  3703. var index = 0;
  3704. var lastC = 0;
  3705. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  3706. if (match === '%%') {
  3707. return;
  3708. }
  3709. index++;
  3710. if (match === '%c') {
  3711. // We only are interested in the *last* %c
  3712. // (the user may have provided their own)
  3713. lastC = index;
  3714. }
  3715. });
  3716. args.splice(lastC, 0, c);
  3717. }
  3718. /**
  3719. * Invokes `console.log()` when available.
  3720. * No-op when `console.log` is not a "function".
  3721. *
  3722. * @api public
  3723. */
  3724. function log() {
  3725. var _console;
  3726. // This hackery is required for IE8/9, where
  3727. // the `console.log` function doesn't have 'apply'
  3728. return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
  3729. }
  3730. /**
  3731. * Save `namespaces`.
  3732. *
  3733. * @param {String} namespaces
  3734. * @api private
  3735. */
  3736. function save(namespaces) {
  3737. try {
  3738. if (namespaces) {
  3739. exports.storage.setItem('debug', namespaces);
  3740. } else {
  3741. exports.storage.removeItem('debug');
  3742. }
  3743. } catch (error) {// Swallow
  3744. // XXX (@Qix-) should we be logging these?
  3745. }
  3746. }
  3747. /**
  3748. * Load `namespaces`.
  3749. *
  3750. * @return {String} returns the previously persisted debug modes
  3751. * @api private
  3752. */
  3753. function load() {
  3754. var r;
  3755. try {
  3756. r = exports.storage.getItem('debug');
  3757. } catch (error) {} // Swallow
  3758. // XXX (@Qix-) should we be logging these?
  3759. // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
  3760. if (!r && typeof process !== 'undefined' && 'env' in process) {
  3761. r = process.env.DEBUG;
  3762. }
  3763. return r;
  3764. }
  3765. /**
  3766. * Localstorage attempts to return the localstorage.
  3767. *
  3768. * This is necessary because safari throws
  3769. * when a user disables cookies/localstorage
  3770. * and you attempt to access it.
  3771. *
  3772. * @return {LocalStorage}
  3773. * @api private
  3774. */
  3775. function localstorage() {
  3776. try {
  3777. // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
  3778. // The Browser also has localStorage in the global context.
  3779. return localStorage;
  3780. } catch (error) {// Swallow
  3781. // XXX (@Qix-) should we be logging these?
  3782. }
  3783. }
  3784. module.exports = __webpack_require__(/*! ./common */ "./node_modules/sockjs-client/node_modules/debug/src/common.js")(exports);
  3785. var formatters = module.exports.formatters;
  3786. /**
  3787. * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
  3788. */
  3789. formatters.j = function (v) {
  3790. try {
  3791. return JSON.stringify(v);
  3792. } catch (error) {
  3793. return '[UnexpectedJSONParseError]: ' + error.message;
  3794. }
  3795. };
  3796. /***/ }),
  3797. /***/ "./node_modules/sockjs-client/node_modules/debug/src/common.js":
  3798. /*!*********************************************************************!*\
  3799. !*** ./node_modules/sockjs-client/node_modules/debug/src/common.js ***!
  3800. \*********************************************************************/
  3801. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3802. "use strict";
  3803. /**
  3804. * This is the common logic for both the Node.js and web browser
  3805. * implementations of `debug()`.
  3806. */
  3807. function setup(env) {
  3808. createDebug.debug = createDebug;
  3809. createDebug.default = createDebug;
  3810. createDebug.coerce = coerce;
  3811. createDebug.disable = disable;
  3812. createDebug.enable = enable;
  3813. createDebug.enabled = enabled;
  3814. createDebug.humanize = __webpack_require__(/*! ms */ "./node_modules/ms/index.js");
  3815. Object.keys(env).forEach(function (key) {
  3816. createDebug[key] = env[key];
  3817. });
  3818. /**
  3819. * Active `debug` instances.
  3820. */
  3821. createDebug.instances = [];
  3822. /**
  3823. * The currently active debug mode names, and names to skip.
  3824. */
  3825. createDebug.names = [];
  3826. createDebug.skips = [];
  3827. /**
  3828. * Map of special "%n" handling functions, for the debug "format" argument.
  3829. *
  3830. * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
  3831. */
  3832. createDebug.formatters = {};
  3833. /**
  3834. * Selects a color for a debug namespace
  3835. * @param {String} namespace The namespace string for the for the debug instance to be colored
  3836. * @return {Number|String} An ANSI color code for the given namespace
  3837. * @api private
  3838. */
  3839. function selectColor(namespace) {
  3840. var hash = 0;
  3841. for (var i = 0; i < namespace.length; i++) {
  3842. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  3843. hash |= 0; // Convert to 32bit integer
  3844. }
  3845. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  3846. }
  3847. createDebug.selectColor = selectColor;
  3848. /**
  3849. * Create a debugger with the given `namespace`.
  3850. *
  3851. * @param {String} namespace
  3852. * @return {Function}
  3853. * @api public
  3854. */
  3855. function createDebug(namespace) {
  3856. var prevTime;
  3857. function debug() {
  3858. // Disabled?
  3859. if (!debug.enabled) {
  3860. return;
  3861. }
  3862. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3863. args[_key] = arguments[_key];
  3864. }
  3865. var self = debug; // Set `diff` timestamp
  3866. var curr = Number(new Date());
  3867. var ms = curr - (prevTime || curr);
  3868. self.diff = ms;
  3869. self.prev = prevTime;
  3870. self.curr = curr;
  3871. prevTime = curr;
  3872. args[0] = createDebug.coerce(args[0]);
  3873. if (typeof args[0] !== 'string') {
  3874. // Anything else let's inspect with %O
  3875. args.unshift('%O');
  3876. } // Apply any `formatters` transformations
  3877. var index = 0;
  3878. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  3879. // If we encounter an escaped % then don't increase the array index
  3880. if (match === '%%') {
  3881. return match;
  3882. }
  3883. index++;
  3884. var formatter = createDebug.formatters[format];
  3885. if (typeof formatter === 'function') {
  3886. var val = args[index];
  3887. match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
  3888. args.splice(index, 1);
  3889. index--;
  3890. }
  3891. return match;
  3892. }); // Apply env-specific formatting (colors, etc.)
  3893. createDebug.formatArgs.call(self, args);
  3894. var logFn = self.log || createDebug.log;
  3895. logFn.apply(self, args);
  3896. }
  3897. debug.namespace = namespace;
  3898. debug.enabled = createDebug.enabled(namespace);
  3899. debug.useColors = createDebug.useColors();
  3900. debug.color = selectColor(namespace);
  3901. debug.destroy = destroy;
  3902. debug.extend = extend; // Debug.formatArgs = formatArgs;
  3903. // debug.rawLog = rawLog;
  3904. // env-specific initialization logic for debug instances
  3905. if (typeof createDebug.init === 'function') {
  3906. createDebug.init(debug);
  3907. }
  3908. createDebug.instances.push(debug);
  3909. return debug;
  3910. }
  3911. function destroy() {
  3912. var index = createDebug.instances.indexOf(this);
  3913. if (index !== -1) {
  3914. createDebug.instances.splice(index, 1);
  3915. return true;
  3916. }
  3917. return false;
  3918. }
  3919. function extend(namespace, delimiter) {
  3920. return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  3921. }
  3922. /**
  3923. * Enables a debug mode by namespaces. This can include modes
  3924. * separated by a colon and wildcards.
  3925. *
  3926. * @param {String} namespaces
  3927. * @api public
  3928. */
  3929. function enable(namespaces) {
  3930. createDebug.save(namespaces);
  3931. createDebug.names = [];
  3932. createDebug.skips = [];
  3933. var i;
  3934. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  3935. var len = split.length;
  3936. for (i = 0; i < len; i++) {
  3937. if (!split[i]) {
  3938. // ignore empty strings
  3939. continue;
  3940. }
  3941. namespaces = split[i].replace(/\*/g, '.*?');
  3942. if (namespaces[0] === '-') {
  3943. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  3944. } else {
  3945. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  3946. }
  3947. }
  3948. for (i = 0; i < createDebug.instances.length; i++) {
  3949. var instance = createDebug.instances[i];
  3950. instance.enabled = createDebug.enabled(instance.namespace);
  3951. }
  3952. }
  3953. /**
  3954. * Disable debug output.
  3955. *
  3956. * @api public
  3957. */
  3958. function disable() {
  3959. createDebug.enable('');
  3960. }
  3961. /**
  3962. * Returns true if the given mode name is enabled, false otherwise.
  3963. *
  3964. * @param {String} name
  3965. * @return {Boolean}
  3966. * @api public
  3967. */
  3968. function enabled(name) {
  3969. if (name[name.length - 1] === '*') {
  3970. return true;
  3971. }
  3972. var i;
  3973. var len;
  3974. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  3975. if (createDebug.skips[i].test(name)) {
  3976. return false;
  3977. }
  3978. }
  3979. for (i = 0, len = createDebug.names.length; i < len; i++) {
  3980. if (createDebug.names[i].test(name)) {
  3981. return true;
  3982. }
  3983. }
  3984. return false;
  3985. }
  3986. /**
  3987. * Coerce `val`.
  3988. *
  3989. * @param {Mixed} val
  3990. * @return {Mixed}
  3991. * @api private
  3992. */
  3993. function coerce(val) {
  3994. if (val instanceof Error) {
  3995. return val.stack || val.message;
  3996. }
  3997. return val;
  3998. }
  3999. createDebug.enable(createDebug.load());
  4000. return createDebug;
  4001. }
  4002. module.exports = setup;
  4003. /***/ }),
  4004. /***/ "./node_modules/url-parse/index.js":
  4005. /*!*****************************************!*\
  4006. !*** ./node_modules/url-parse/index.js ***!
  4007. \*****************************************/
  4008. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4009. "use strict";
  4010. function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
  4011. var required = __webpack_require__(/*! requires-port */ "./node_modules/requires-port/index.js"),
  4012. qs = __webpack_require__(/*! querystringify */ "./node_modules/querystringify/index.js"),
  4013. controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,
  4014. CRHTLF = /[\n\r\t]/g,
  4015. slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//,
  4016. port = /:\d+$/,
  4017. protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,
  4018. windowsDriveLetter = /^[a-zA-Z]:/;
  4019. /**
  4020. * Remove control characters and whitespace from the beginning of a string.
  4021. *
  4022. * @param {Object|String} str String to trim.
  4023. * @returns {String} A new string representing `str` stripped of control
  4024. * characters and whitespace from its beginning.
  4025. * @public
  4026. */
  4027. function trimLeft(str) {
  4028. return (str ? str : '').toString().replace(controlOrWhitespace, '');
  4029. }
  4030. /**
  4031. * These are the parse rules for the URL parser, it informs the parser
  4032. * about:
  4033. *
  4034. * 0. The char it Needs to parse, if it's a string it should be done using
  4035. * indexOf, RegExp using exec and NaN means set as current value.
  4036. * 1. The property we should set when parsing this value.
  4037. * 2. Indication if it's backwards or forward parsing, when set as number it's
  4038. * the value of extra chars that should be split off.
  4039. * 3. Inherit from location if non existing in the parser.
  4040. * 4. `toLowerCase` the resulting value.
  4041. */
  4042. var rules = [['#', 'hash'],
  4043. // Extract from the back.
  4044. ['?', 'query'],
  4045. // Extract from the back.
  4046. function sanitize(address, url) {
  4047. // Sanitize what is left of the address
  4048. return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
  4049. }, ['/', 'pathname'],
  4050. // Extract from the back.
  4051. ['@', 'auth', 1],
  4052. // Extract from the front.
  4053. [NaN, 'host', undefined, 1, 1],
  4054. // Set left over value.
  4055. [/:(\d*)$/, 'port', undefined, 1],
  4056. // RegExp the back.
  4057. [NaN, 'hostname', undefined, 1, 1] // Set left over.
  4058. ];
  4059. /**
  4060. * These properties should not be copied or inherited from. This is only needed
  4061. * for all non blob URL's as a blob URL does not include a hash, only the
  4062. * origin.
  4063. *
  4064. * @type {Object}
  4065. * @private
  4066. */
  4067. var ignore = {
  4068. hash: 1,
  4069. query: 1
  4070. };
  4071. /**
  4072. * The location object differs when your code is loaded through a normal page,
  4073. * Worker or through a worker using a blob. And with the blobble begins the
  4074. * trouble as the location object will contain the URL of the blob, not the
  4075. * location of the page where our code is loaded in. The actual origin is
  4076. * encoded in the `pathname` so we can thankfully generate a good "default"
  4077. * location from it so we can generate proper relative URL's again.
  4078. *
  4079. * @param {Object|String} loc Optional default location object.
  4080. * @returns {Object} lolcation object.
  4081. * @public
  4082. */
  4083. function lolcation(loc) {
  4084. var globalVar;
  4085. if (typeof window !== 'undefined') globalVar = window;else if (typeof __webpack_require__.g !== 'undefined') globalVar = __webpack_require__.g;else if (typeof self !== 'undefined') globalVar = self;else globalVar = {};
  4086. var location = globalVar.location || {};
  4087. loc = loc || location;
  4088. var finaldestination = {},
  4089. type = _typeof(loc),
  4090. key;
  4091. if ('blob:' === loc.protocol) {
  4092. finaldestination = new Url(unescape(loc.pathname), {});
  4093. } else if ('string' === type) {
  4094. finaldestination = new Url(loc, {});
  4095. for (key in ignore) delete finaldestination[key];
  4096. } else if ('object' === type) {
  4097. for (key in loc) {
  4098. if (key in ignore) continue;
  4099. finaldestination[key] = loc[key];
  4100. }
  4101. if (finaldestination.slashes === undefined) {
  4102. finaldestination.slashes = slashes.test(loc.href);
  4103. }
  4104. }
  4105. return finaldestination;
  4106. }
  4107. /**
  4108. * Check whether a protocol scheme is special.
  4109. *
  4110. * @param {String} The protocol scheme of the URL
  4111. * @return {Boolean} `true` if the protocol scheme is special, else `false`
  4112. * @private
  4113. */
  4114. function isSpecial(scheme) {
  4115. return scheme === 'file:' || scheme === 'ftp:' || scheme === 'http:' || scheme === 'https:' || scheme === 'ws:' || scheme === 'wss:';
  4116. }
  4117. /**
  4118. * @typedef ProtocolExtract
  4119. * @type Object
  4120. * @property {String} protocol Protocol matched in the URL, in lowercase.
  4121. * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
  4122. * @property {String} rest Rest of the URL that is not part of the protocol.
  4123. */
  4124. /**
  4125. * Extract protocol information from a URL with/without double slash ("//").
  4126. *
  4127. * @param {String} address URL we want to extract from.
  4128. * @param {Object} location
  4129. * @return {ProtocolExtract} Extracted information.
  4130. * @private
  4131. */
  4132. function extractProtocol(address, location) {
  4133. address = trimLeft(address);
  4134. address = address.replace(CRHTLF, '');
  4135. location = location || {};
  4136. var match = protocolre.exec(address);
  4137. var protocol = match[1] ? match[1].toLowerCase() : '';
  4138. var forwardSlashes = !!match[2];
  4139. var otherSlashes = !!match[3];
  4140. var slashesCount = 0;
  4141. var rest;
  4142. if (forwardSlashes) {
  4143. if (otherSlashes) {
  4144. rest = match[2] + match[3] + match[4];
  4145. slashesCount = match[2].length + match[3].length;
  4146. } else {
  4147. rest = match[2] + match[4];
  4148. slashesCount = match[2].length;
  4149. }
  4150. } else {
  4151. if (otherSlashes) {
  4152. rest = match[3] + match[4];
  4153. slashesCount = match[3].length;
  4154. } else {
  4155. rest = match[4];
  4156. }
  4157. }
  4158. if (protocol === 'file:') {
  4159. if (slashesCount >= 2) {
  4160. rest = rest.slice(2);
  4161. }
  4162. } else if (isSpecial(protocol)) {
  4163. rest = match[4];
  4164. } else if (protocol) {
  4165. if (forwardSlashes) {
  4166. rest = rest.slice(2);
  4167. }
  4168. } else if (slashesCount >= 2 && isSpecial(location.protocol)) {
  4169. rest = match[4];
  4170. }
  4171. return {
  4172. protocol: protocol,
  4173. slashes: forwardSlashes || isSpecial(protocol),
  4174. slashesCount: slashesCount,
  4175. rest: rest
  4176. };
  4177. }
  4178. /**
  4179. * Resolve a relative URL pathname against a base URL pathname.
  4180. *
  4181. * @param {String} relative Pathname of the relative URL.
  4182. * @param {String} base Pathname of the base URL.
  4183. * @return {String} Resolved pathname.
  4184. * @private
  4185. */
  4186. function resolve(relative, base) {
  4187. if (relative === '') return base;
  4188. var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')),
  4189. i = path.length,
  4190. last = path[i - 1],
  4191. unshift = false,
  4192. up = 0;
  4193. while (i--) {
  4194. if (path[i] === '.') {
  4195. path.splice(i, 1);
  4196. } else if (path[i] === '..') {
  4197. path.splice(i, 1);
  4198. up++;
  4199. } else if (up) {
  4200. if (i === 0) unshift = true;
  4201. path.splice(i, 1);
  4202. up--;
  4203. }
  4204. }
  4205. if (unshift) path.unshift('');
  4206. if (last === '.' || last === '..') path.push('');
  4207. return path.join('/');
  4208. }
  4209. /**
  4210. * The actual URL instance. Instead of returning an object we've opted-in to
  4211. * create an actual constructor as it's much more memory efficient and
  4212. * faster and it pleases my OCD.
  4213. *
  4214. * It is worth noting that we should not use `URL` as class name to prevent
  4215. * clashes with the global URL instance that got introduced in browsers.
  4216. *
  4217. * @constructor
  4218. * @param {String} address URL we want to parse.
  4219. * @param {Object|String} [location] Location defaults for relative paths.
  4220. * @param {Boolean|Function} [parser] Parser for the query string.
  4221. * @private
  4222. */
  4223. function Url(address, location, parser) {
  4224. address = trimLeft(address);
  4225. address = address.replace(CRHTLF, '');
  4226. if (!(this instanceof Url)) {
  4227. return new Url(address, location, parser);
  4228. }
  4229. var relative,
  4230. extracted,
  4231. parse,
  4232. instruction,
  4233. index,
  4234. key,
  4235. instructions = rules.slice(),
  4236. type = _typeof(location),
  4237. url = this,
  4238. i = 0;
  4239. //
  4240. // The following if statements allows this module two have compatibility with
  4241. // 2 different API:
  4242. //
  4243. // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
  4244. // where the boolean indicates that the query string should also be parsed.
  4245. //
  4246. // 2. The `URL` interface of the browser which accepts a URL, object as
  4247. // arguments. The supplied object will be used as default values / fall-back
  4248. // for relative paths.
  4249. //
  4250. if ('object' !== type && 'string' !== type) {
  4251. parser = location;
  4252. location = null;
  4253. }
  4254. if (parser && 'function' !== typeof parser) parser = qs.parse;
  4255. location = lolcation(location);
  4256. //
  4257. // Extract protocol information before running the instructions.
  4258. //
  4259. extracted = extractProtocol(address || '', location);
  4260. relative = !extracted.protocol && !extracted.slashes;
  4261. url.slashes = extracted.slashes || relative && location.slashes;
  4262. url.protocol = extracted.protocol || location.protocol || '';
  4263. address = extracted.rest;
  4264. //
  4265. // When the authority component is absent the URL starts with a path
  4266. // component.
  4267. //
  4268. if (extracted.protocol === 'file:' && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) {
  4269. instructions[3] = [/(.*)/, 'pathname'];
  4270. }
  4271. for (; i < instructions.length; i++) {
  4272. instruction = instructions[i];
  4273. if (typeof instruction === 'function') {
  4274. address = instruction(address, url);
  4275. continue;
  4276. }
  4277. parse = instruction[0];
  4278. key = instruction[1];
  4279. if (parse !== parse) {
  4280. url[key] = address;
  4281. } else if ('string' === typeof parse) {
  4282. index = parse === '@' ? address.lastIndexOf(parse) : address.indexOf(parse);
  4283. if (~index) {
  4284. if ('number' === typeof instruction[2]) {
  4285. url[key] = address.slice(0, index);
  4286. address = address.slice(index + instruction[2]);
  4287. } else {
  4288. url[key] = address.slice(index);
  4289. address = address.slice(0, index);
  4290. }
  4291. }
  4292. } else if (index = parse.exec(address)) {
  4293. url[key] = index[1];
  4294. address = address.slice(0, index.index);
  4295. }
  4296. url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : '');
  4297. //
  4298. // Hostname, host and protocol should be lowercased so they can be used to
  4299. // create a proper `origin`.
  4300. //
  4301. if (instruction[4]) url[key] = url[key].toLowerCase();
  4302. }
  4303. //
  4304. // Also parse the supplied query string in to an object. If we're supplied
  4305. // with a custom parser as function use that instead of the default build-in
  4306. // parser.
  4307. //
  4308. if (parser) url.query = parser(url.query);
  4309. //
  4310. // If the URL is relative, resolve the pathname against the base URL.
  4311. //
  4312. if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) {
  4313. url.pathname = resolve(url.pathname, location.pathname);
  4314. }
  4315. //
  4316. // Default to a / for pathname if none exists. This normalizes the URL
  4317. // to always have a /
  4318. //
  4319. if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
  4320. url.pathname = '/' + url.pathname;
  4321. }
  4322. //
  4323. // We should not add port numbers if they are already the default port number
  4324. // for a given protocol. As the host also contains the port number we're going
  4325. // override it with the hostname which contains no port number.
  4326. //
  4327. if (!required(url.port, url.protocol)) {
  4328. url.host = url.hostname;
  4329. url.port = '';
  4330. }
  4331. //
  4332. // Parse down the `auth` for the username and password.
  4333. //
  4334. url.username = url.password = '';
  4335. if (url.auth) {
  4336. index = url.auth.indexOf(':');
  4337. if (~index) {
  4338. url.username = url.auth.slice(0, index);
  4339. url.username = encodeURIComponent(decodeURIComponent(url.username));
  4340. url.password = url.auth.slice(index + 1);
  4341. url.password = encodeURIComponent(decodeURIComponent(url.password));
  4342. } else {
  4343. url.username = encodeURIComponent(decodeURIComponent(url.auth));
  4344. }
  4345. url.auth = url.password ? url.username + ':' + url.password : url.username;
  4346. }
  4347. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
  4348. //
  4349. // The href is just the compiled result.
  4350. //
  4351. url.href = url.toString();
  4352. }
  4353. /**
  4354. * This is convenience method for changing properties in the URL instance to
  4355. * insure that they all propagate correctly.
  4356. *
  4357. * @param {String} part Property we need to adjust.
  4358. * @param {Mixed} value The newly assigned value.
  4359. * @param {Boolean|Function} fn When setting the query, it will be the function
  4360. * used to parse the query.
  4361. * When setting the protocol, double slash will be
  4362. * removed from the final url if it is true.
  4363. * @returns {URL} URL instance for chaining.
  4364. * @public
  4365. */
  4366. function set(part, value, fn) {
  4367. var url = this;
  4368. switch (part) {
  4369. case 'query':
  4370. if ('string' === typeof value && value.length) {
  4371. value = (fn || qs.parse)(value);
  4372. }
  4373. url[part] = value;
  4374. break;
  4375. case 'port':
  4376. url[part] = value;
  4377. if (!required(value, url.protocol)) {
  4378. url.host = url.hostname;
  4379. url[part] = '';
  4380. } else if (value) {
  4381. url.host = url.hostname + ':' + value;
  4382. }
  4383. break;
  4384. case 'hostname':
  4385. url[part] = value;
  4386. if (url.port) value += ':' + url.port;
  4387. url.host = value;
  4388. break;
  4389. case 'host':
  4390. url[part] = value;
  4391. if (port.test(value)) {
  4392. value = value.split(':');
  4393. url.port = value.pop();
  4394. url.hostname = value.join(':');
  4395. } else {
  4396. url.hostname = value;
  4397. url.port = '';
  4398. }
  4399. break;
  4400. case 'protocol':
  4401. url.protocol = value.toLowerCase();
  4402. url.slashes = !fn;
  4403. break;
  4404. case 'pathname':
  4405. case 'hash':
  4406. if (value) {
  4407. var char = part === 'pathname' ? '/' : '#';
  4408. url[part] = value.charAt(0) !== char ? char + value : value;
  4409. } else {
  4410. url[part] = value;
  4411. }
  4412. break;
  4413. case 'username':
  4414. case 'password':
  4415. url[part] = encodeURIComponent(value);
  4416. break;
  4417. case 'auth':
  4418. var index = value.indexOf(':');
  4419. if (~index) {
  4420. url.username = value.slice(0, index);
  4421. url.username = encodeURIComponent(decodeURIComponent(url.username));
  4422. url.password = value.slice(index + 1);
  4423. url.password = encodeURIComponent(decodeURIComponent(url.password));
  4424. } else {
  4425. url.username = encodeURIComponent(decodeURIComponent(value));
  4426. }
  4427. }
  4428. for (var i = 0; i < rules.length; i++) {
  4429. var ins = rules[i];
  4430. if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
  4431. }
  4432. url.auth = url.password ? url.username + ':' + url.password : url.username;
  4433. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
  4434. url.href = url.toString();
  4435. return url;
  4436. }
  4437. /**
  4438. * Transform the properties back in to a valid and full URL string.
  4439. *
  4440. * @param {Function} stringify Optional query stringify function.
  4441. * @returns {String} Compiled version of the URL.
  4442. * @public
  4443. */
  4444. function toString(stringify) {
  4445. if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
  4446. var query,
  4447. url = this,
  4448. host = url.host,
  4449. protocol = url.protocol;
  4450. if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
  4451. var result = protocol + (url.protocol && url.slashes || isSpecial(url.protocol) ? '//' : '');
  4452. if (url.username) {
  4453. result += url.username;
  4454. if (url.password) result += ':' + url.password;
  4455. result += '@';
  4456. } else if (url.password) {
  4457. result += ':' + url.password;
  4458. result += '@';
  4459. } else if (url.protocol !== 'file:' && isSpecial(url.protocol) && !host && url.pathname !== '/') {
  4460. //
  4461. // Add back the empty userinfo, otherwise the original invalid URL
  4462. // might be transformed into a valid one with `url.pathname` as host.
  4463. //
  4464. result += '@';
  4465. }
  4466. //
  4467. // Trailing colon is removed from `url.host` when it is parsed. If it still
  4468. // ends with a colon, then add back the trailing colon that was removed. This
  4469. // prevents an invalid URL from being transformed into a valid one.
  4470. //
  4471. if (host[host.length - 1] === ':' || port.test(url.hostname) && !url.port) {
  4472. host += ':';
  4473. }
  4474. result += host + url.pathname;
  4475. query = 'object' === _typeof(url.query) ? stringify(url.query) : url.query;
  4476. if (query) result += '?' !== query.charAt(0) ? '?' + query : query;
  4477. if (url.hash) result += url.hash;
  4478. return result;
  4479. }
  4480. Url.prototype = {
  4481. set: set,
  4482. toString: toString
  4483. };
  4484. //
  4485. // Expose the URL parser and some additional properties that might be useful for
  4486. // others or testing.
  4487. //
  4488. Url.extractProtocol = extractProtocol;
  4489. Url.location = lolcation;
  4490. Url.trimLeft = trimLeft;
  4491. Url.qs = qs;
  4492. module.exports = Url;
  4493. /***/ })
  4494. /******/ });
  4495. /************************************************************************/
  4496. /******/ // The module cache
  4497. /******/ var __webpack_module_cache__ = {};
  4498. /******/
  4499. /******/ // The require function
  4500. /******/ function __webpack_require__(moduleId) {
  4501. /******/ // Check if module is in cache
  4502. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  4503. /******/ if (cachedModule !== undefined) {
  4504. /******/ return cachedModule.exports;
  4505. /******/ }
  4506. /******/ // Create a new module (and put it into the cache)
  4507. /******/ var module = __webpack_module_cache__[moduleId] = {
  4508. /******/ // no module.id needed
  4509. /******/ // no module.loaded needed
  4510. /******/ exports: {}
  4511. /******/ };
  4512. /******/
  4513. /******/ // Execute the module function
  4514. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  4515. /******/
  4516. /******/ // Return the exports of the module
  4517. /******/ return module.exports;
  4518. /******/ }
  4519. /******/
  4520. /************************************************************************/
  4521. /******/ /* webpack/runtime/compat get default export */
  4522. /******/ !function() {
  4523. /******/ // getDefaultExport function for compatibility with non-harmony modules
  4524. /******/ __webpack_require__.n = function(module) {
  4525. /******/ var getter = module && module.__esModule ?
  4526. /******/ function() { return module['default']; } :
  4527. /******/ function() { return module; };
  4528. /******/ __webpack_require__.d(getter, { a: getter });
  4529. /******/ return getter;
  4530. /******/ };
  4531. /******/ }();
  4532. /******/
  4533. /******/ /* webpack/runtime/define property getters */
  4534. /******/ !function() {
  4535. /******/ // define getter functions for harmony exports
  4536. /******/ __webpack_require__.d = function(exports, definition) {
  4537. /******/ for(var key in definition) {
  4538. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  4539. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  4540. /******/ }
  4541. /******/ }
  4542. /******/ };
  4543. /******/ }();
  4544. /******/
  4545. /******/ /* webpack/runtime/global */
  4546. /******/ !function() {
  4547. /******/ __webpack_require__.g = (function() {
  4548. /******/ if (typeof globalThis === 'object') return globalThis;
  4549. /******/ try {
  4550. /******/ return this || new Function('return this')();
  4551. /******/ } catch (e) {
  4552. /******/ if (typeof window === 'object') return window;
  4553. /******/ }
  4554. /******/ })();
  4555. /******/ }();
  4556. /******/
  4557. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  4558. /******/ !function() {
  4559. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  4560. /******/ }();
  4561. /******/
  4562. /******/ /* webpack/runtime/make namespace object */
  4563. /******/ !function() {
  4564. /******/ // define __esModule on exports
  4565. /******/ __webpack_require__.r = function(exports) {
  4566. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  4567. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  4568. /******/ }
  4569. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  4570. /******/ };
  4571. /******/ }();
  4572. /******/
  4573. /************************************************************************/
  4574. var __webpack_exports__ = {};
  4575. // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
  4576. !function() {
  4577. "use strict";
  4578. /*!***************************************************!*\
  4579. !*** ./client-src/modules/sockjs-client/index.js ***!
  4580. \***************************************************/
  4581. __webpack_require__.r(__webpack_exports__);
  4582. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4583. /* harmony export */ "default": function() { return /* reexport default from dynamic */ sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a; }
  4584. /* harmony export */ });
  4585. /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sockjs-client */ "./node_modules/sockjs-client/lib/entry.js");
  4586. /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
  4587. // eslint-disable-next-line import/no-extraneous-dependencies
  4588. }();
  4589. /******/ return __webpack_exports__;
  4590. /******/ })()
  4591. ;
  4592. });