polyfills.bundle.js 198 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132
  1. webpackJsonp(["polyfills"],{
  2. /***/ "./node_modules/core-js/es7/reflect.js":
  3. /***/ (function(module, exports, __webpack_require__) {
  4. __webpack_require__("./node_modules/core-js/modules/es7.reflect.define-metadata.js");
  5. __webpack_require__("./node_modules/core-js/modules/es7.reflect.delete-metadata.js");
  6. __webpack_require__("./node_modules/core-js/modules/es7.reflect.get-metadata.js");
  7. __webpack_require__("./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js");
  8. __webpack_require__("./node_modules/core-js/modules/es7.reflect.get-own-metadata.js");
  9. __webpack_require__("./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js");
  10. __webpack_require__("./node_modules/core-js/modules/es7.reflect.has-metadata.js");
  11. __webpack_require__("./node_modules/core-js/modules/es7.reflect.has-own-metadata.js");
  12. __webpack_require__("./node_modules/core-js/modules/es7.reflect.metadata.js");
  13. module.exports = __webpack_require__("./node_modules/core-js/modules/_core.js").Reflect;
  14. /***/ }),
  15. /***/ "./node_modules/core-js/modules/_a-function.js":
  16. /***/ (function(module, exports) {
  17. module.exports = function (it) {
  18. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  19. return it;
  20. };
  21. /***/ }),
  22. /***/ "./node_modules/core-js/modules/_an-instance.js":
  23. /***/ (function(module, exports) {
  24. module.exports = function (it, Constructor, name, forbiddenField) {
  25. if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
  26. throw TypeError(name + ': incorrect invocation!');
  27. } return it;
  28. };
  29. /***/ }),
  30. /***/ "./node_modules/core-js/modules/_an-object.js":
  31. /***/ (function(module, exports, __webpack_require__) {
  32. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  33. module.exports = function (it) {
  34. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  35. return it;
  36. };
  37. /***/ }),
  38. /***/ "./node_modules/core-js/modules/_array-from-iterable.js":
  39. /***/ (function(module, exports, __webpack_require__) {
  40. var forOf = __webpack_require__("./node_modules/core-js/modules/_for-of.js");
  41. module.exports = function (iter, ITERATOR) {
  42. var result = [];
  43. forOf(iter, false, result.push, result, ITERATOR);
  44. return result;
  45. };
  46. /***/ }),
  47. /***/ "./node_modules/core-js/modules/_array-includes.js":
  48. /***/ (function(module, exports, __webpack_require__) {
  49. // false -> Array#indexOf
  50. // true -> Array#includes
  51. var toIObject = __webpack_require__("./node_modules/core-js/modules/_to-iobject.js");
  52. var toLength = __webpack_require__("./node_modules/core-js/modules/_to-length.js");
  53. var toAbsoluteIndex = __webpack_require__("./node_modules/core-js/modules/_to-absolute-index.js");
  54. module.exports = function (IS_INCLUDES) {
  55. return function ($this, el, fromIndex) {
  56. var O = toIObject($this);
  57. var length = toLength(O.length);
  58. var index = toAbsoluteIndex(fromIndex, length);
  59. var value;
  60. // Array#includes uses SameValueZero equality algorithm
  61. // eslint-disable-next-line no-self-compare
  62. if (IS_INCLUDES && el != el) while (length > index) {
  63. value = O[index++];
  64. // eslint-disable-next-line no-self-compare
  65. if (value != value) return true;
  66. // Array#indexOf ignores holes, Array#includes - not
  67. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  68. if (O[index] === el) return IS_INCLUDES || index || 0;
  69. } return !IS_INCLUDES && -1;
  70. };
  71. };
  72. /***/ }),
  73. /***/ "./node_modules/core-js/modules/_array-methods.js":
  74. /***/ (function(module, exports, __webpack_require__) {
  75. // 0 -> Array#forEach
  76. // 1 -> Array#map
  77. // 2 -> Array#filter
  78. // 3 -> Array#some
  79. // 4 -> Array#every
  80. // 5 -> Array#find
  81. // 6 -> Array#findIndex
  82. var ctx = __webpack_require__("./node_modules/core-js/modules/_ctx.js");
  83. var IObject = __webpack_require__("./node_modules/core-js/modules/_iobject.js");
  84. var toObject = __webpack_require__("./node_modules/core-js/modules/_to-object.js");
  85. var toLength = __webpack_require__("./node_modules/core-js/modules/_to-length.js");
  86. var asc = __webpack_require__("./node_modules/core-js/modules/_array-species-create.js");
  87. module.exports = function (TYPE, $create) {
  88. var IS_MAP = TYPE == 1;
  89. var IS_FILTER = TYPE == 2;
  90. var IS_SOME = TYPE == 3;
  91. var IS_EVERY = TYPE == 4;
  92. var IS_FIND_INDEX = TYPE == 6;
  93. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  94. var create = $create || asc;
  95. return function ($this, callbackfn, that) {
  96. var O = toObject($this);
  97. var self = IObject(O);
  98. var f = ctx(callbackfn, that, 3);
  99. var length = toLength(self.length);
  100. var index = 0;
  101. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  102. var val, res;
  103. for (;length > index; index++) if (NO_HOLES || index in self) {
  104. val = self[index];
  105. res = f(val, index, O);
  106. if (TYPE) {
  107. if (IS_MAP) result[index] = res; // map
  108. else if (res) switch (TYPE) {
  109. case 3: return true; // some
  110. case 5: return val; // find
  111. case 6: return index; // findIndex
  112. case 2: result.push(val); // filter
  113. } else if (IS_EVERY) return false; // every
  114. }
  115. }
  116. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  117. };
  118. };
  119. /***/ }),
  120. /***/ "./node_modules/core-js/modules/_array-species-constructor.js":
  121. /***/ (function(module, exports, __webpack_require__) {
  122. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  123. var isArray = __webpack_require__("./node_modules/core-js/modules/_is-array.js");
  124. var SPECIES = __webpack_require__("./node_modules/core-js/modules/_wks.js")('species');
  125. module.exports = function (original) {
  126. var C;
  127. if (isArray(original)) {
  128. C = original.constructor;
  129. // cross-realm fallback
  130. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  131. if (isObject(C)) {
  132. C = C[SPECIES];
  133. if (C === null) C = undefined;
  134. }
  135. } return C === undefined ? Array : C;
  136. };
  137. /***/ }),
  138. /***/ "./node_modules/core-js/modules/_array-species-create.js":
  139. /***/ (function(module, exports, __webpack_require__) {
  140. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  141. var speciesConstructor = __webpack_require__("./node_modules/core-js/modules/_array-species-constructor.js");
  142. module.exports = function (original, length) {
  143. return new (speciesConstructor(original))(length);
  144. };
  145. /***/ }),
  146. /***/ "./node_modules/core-js/modules/_classof.js":
  147. /***/ (function(module, exports, __webpack_require__) {
  148. // getting tag from 19.1.3.6 Object.prototype.toString()
  149. var cof = __webpack_require__("./node_modules/core-js/modules/_cof.js");
  150. var TAG = __webpack_require__("./node_modules/core-js/modules/_wks.js")('toStringTag');
  151. // ES3 wrong here
  152. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  153. // fallback for IE11 Script Access Denied error
  154. var tryGet = function (it, key) {
  155. try {
  156. return it[key];
  157. } catch (e) { /* empty */ }
  158. };
  159. module.exports = function (it) {
  160. var O, T, B;
  161. return it === undefined ? 'Undefined' : it === null ? 'Null'
  162. // @@toStringTag case
  163. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  164. // builtinTag case
  165. : ARG ? cof(O)
  166. // ES3 arguments fallback
  167. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  168. };
  169. /***/ }),
  170. /***/ "./node_modules/core-js/modules/_cof.js":
  171. /***/ (function(module, exports) {
  172. var toString = {}.toString;
  173. module.exports = function (it) {
  174. return toString.call(it).slice(8, -1);
  175. };
  176. /***/ }),
  177. /***/ "./node_modules/core-js/modules/_collection-strong.js":
  178. /***/ (function(module, exports, __webpack_require__) {
  179. "use strict";
  180. var dP = __webpack_require__("./node_modules/core-js/modules/_object-dp.js").f;
  181. var create = __webpack_require__("./node_modules/core-js/modules/_object-create.js");
  182. var redefineAll = __webpack_require__("./node_modules/core-js/modules/_redefine-all.js");
  183. var ctx = __webpack_require__("./node_modules/core-js/modules/_ctx.js");
  184. var anInstance = __webpack_require__("./node_modules/core-js/modules/_an-instance.js");
  185. var forOf = __webpack_require__("./node_modules/core-js/modules/_for-of.js");
  186. var $iterDefine = __webpack_require__("./node_modules/core-js/modules/_iter-define.js");
  187. var step = __webpack_require__("./node_modules/core-js/modules/_iter-step.js");
  188. var setSpecies = __webpack_require__("./node_modules/core-js/modules/_set-species.js");
  189. var DESCRIPTORS = __webpack_require__("./node_modules/core-js/modules/_descriptors.js");
  190. var fastKey = __webpack_require__("./node_modules/core-js/modules/_meta.js").fastKey;
  191. var validate = __webpack_require__("./node_modules/core-js/modules/_validate-collection.js");
  192. var SIZE = DESCRIPTORS ? '_s' : 'size';
  193. var getEntry = function (that, key) {
  194. // fast case
  195. var index = fastKey(key);
  196. var entry;
  197. if (index !== 'F') return that._i[index];
  198. // frozen object case
  199. for (entry = that._f; entry; entry = entry.n) {
  200. if (entry.k == key) return entry;
  201. }
  202. };
  203. module.exports = {
  204. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  205. var C = wrapper(function (that, iterable) {
  206. anInstance(that, C, NAME, '_i');
  207. that._t = NAME; // collection type
  208. that._i = create(null); // index
  209. that._f = undefined; // first entry
  210. that._l = undefined; // last entry
  211. that[SIZE] = 0; // size
  212. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  213. });
  214. redefineAll(C.prototype, {
  215. // 23.1.3.1 Map.prototype.clear()
  216. // 23.2.3.2 Set.prototype.clear()
  217. clear: function clear() {
  218. for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  219. entry.r = true;
  220. if (entry.p) entry.p = entry.p.n = undefined;
  221. delete data[entry.i];
  222. }
  223. that._f = that._l = undefined;
  224. that[SIZE] = 0;
  225. },
  226. // 23.1.3.3 Map.prototype.delete(key)
  227. // 23.2.3.4 Set.prototype.delete(value)
  228. 'delete': function (key) {
  229. var that = validate(this, NAME);
  230. var entry = getEntry(that, key);
  231. if (entry) {
  232. var next = entry.n;
  233. var prev = entry.p;
  234. delete that._i[entry.i];
  235. entry.r = true;
  236. if (prev) prev.n = next;
  237. if (next) next.p = prev;
  238. if (that._f == entry) that._f = next;
  239. if (that._l == entry) that._l = prev;
  240. that[SIZE]--;
  241. } return !!entry;
  242. },
  243. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  244. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  245. forEach: function forEach(callbackfn /* , that = undefined */) {
  246. validate(this, NAME);
  247. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  248. var entry;
  249. while (entry = entry ? entry.n : this._f) {
  250. f(entry.v, entry.k, this);
  251. // revert to the last existing entry
  252. while (entry && entry.r) entry = entry.p;
  253. }
  254. },
  255. // 23.1.3.7 Map.prototype.has(key)
  256. // 23.2.3.7 Set.prototype.has(value)
  257. has: function has(key) {
  258. return !!getEntry(validate(this, NAME), key);
  259. }
  260. });
  261. if (DESCRIPTORS) dP(C.prototype, 'size', {
  262. get: function () {
  263. return validate(this, NAME)[SIZE];
  264. }
  265. });
  266. return C;
  267. },
  268. def: function (that, key, value) {
  269. var entry = getEntry(that, key);
  270. var prev, index;
  271. // change existing entry
  272. if (entry) {
  273. entry.v = value;
  274. // create new entry
  275. } else {
  276. that._l = entry = {
  277. i: index = fastKey(key, true), // <- index
  278. k: key, // <- key
  279. v: value, // <- value
  280. p: prev = that._l, // <- previous entry
  281. n: undefined, // <- next entry
  282. r: false // <- removed
  283. };
  284. if (!that._f) that._f = entry;
  285. if (prev) prev.n = entry;
  286. that[SIZE]++;
  287. // add to index
  288. if (index !== 'F') that._i[index] = entry;
  289. } return that;
  290. },
  291. getEntry: getEntry,
  292. setStrong: function (C, NAME, IS_MAP) {
  293. // add .keys, .values, .entries, [@@iterator]
  294. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  295. $iterDefine(C, NAME, function (iterated, kind) {
  296. this._t = validate(iterated, NAME); // target
  297. this._k = kind; // kind
  298. this._l = undefined; // previous
  299. }, function () {
  300. var that = this;
  301. var kind = that._k;
  302. var entry = that._l;
  303. // revert to the last existing entry
  304. while (entry && entry.r) entry = entry.p;
  305. // get next entry
  306. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  307. // or finish the iteration
  308. that._t = undefined;
  309. return step(1);
  310. }
  311. // return step by kind
  312. if (kind == 'keys') return step(0, entry.k);
  313. if (kind == 'values') return step(0, entry.v);
  314. return step(0, [entry.k, entry.v]);
  315. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  316. // add [@@species], 23.1.2.2, 23.2.2.2
  317. setSpecies(NAME);
  318. }
  319. };
  320. /***/ }),
  321. /***/ "./node_modules/core-js/modules/_collection-weak.js":
  322. /***/ (function(module, exports, __webpack_require__) {
  323. "use strict";
  324. var redefineAll = __webpack_require__("./node_modules/core-js/modules/_redefine-all.js");
  325. var getWeak = __webpack_require__("./node_modules/core-js/modules/_meta.js").getWeak;
  326. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  327. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  328. var anInstance = __webpack_require__("./node_modules/core-js/modules/_an-instance.js");
  329. var forOf = __webpack_require__("./node_modules/core-js/modules/_for-of.js");
  330. var createArrayMethod = __webpack_require__("./node_modules/core-js/modules/_array-methods.js");
  331. var $has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  332. var validate = __webpack_require__("./node_modules/core-js/modules/_validate-collection.js");
  333. var arrayFind = createArrayMethod(5);
  334. var arrayFindIndex = createArrayMethod(6);
  335. var id = 0;
  336. // fallback for uncaught frozen keys
  337. var uncaughtFrozenStore = function (that) {
  338. return that._l || (that._l = new UncaughtFrozenStore());
  339. };
  340. var UncaughtFrozenStore = function () {
  341. this.a = [];
  342. };
  343. var findUncaughtFrozen = function (store, key) {
  344. return arrayFind(store.a, function (it) {
  345. return it[0] === key;
  346. });
  347. };
  348. UncaughtFrozenStore.prototype = {
  349. get: function (key) {
  350. var entry = findUncaughtFrozen(this, key);
  351. if (entry) return entry[1];
  352. },
  353. has: function (key) {
  354. return !!findUncaughtFrozen(this, key);
  355. },
  356. set: function (key, value) {
  357. var entry = findUncaughtFrozen(this, key);
  358. if (entry) entry[1] = value;
  359. else this.a.push([key, value]);
  360. },
  361. 'delete': function (key) {
  362. var index = arrayFindIndex(this.a, function (it) {
  363. return it[0] === key;
  364. });
  365. if (~index) this.a.splice(index, 1);
  366. return !!~index;
  367. }
  368. };
  369. module.exports = {
  370. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  371. var C = wrapper(function (that, iterable) {
  372. anInstance(that, C, NAME, '_i');
  373. that._t = NAME; // collection type
  374. that._i = id++; // collection id
  375. that._l = undefined; // leak store for uncaught frozen objects
  376. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  377. });
  378. redefineAll(C.prototype, {
  379. // 23.3.3.2 WeakMap.prototype.delete(key)
  380. // 23.4.3.3 WeakSet.prototype.delete(value)
  381. 'delete': function (key) {
  382. if (!isObject(key)) return false;
  383. var data = getWeak(key);
  384. if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
  385. return data && $has(data, this._i) && delete data[this._i];
  386. },
  387. // 23.3.3.4 WeakMap.prototype.has(key)
  388. // 23.4.3.4 WeakSet.prototype.has(value)
  389. has: function has(key) {
  390. if (!isObject(key)) return false;
  391. var data = getWeak(key);
  392. if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
  393. return data && $has(data, this._i);
  394. }
  395. });
  396. return C;
  397. },
  398. def: function (that, key, value) {
  399. var data = getWeak(anObject(key), true);
  400. if (data === true) uncaughtFrozenStore(that).set(key, value);
  401. else data[that._i] = value;
  402. return that;
  403. },
  404. ufstore: uncaughtFrozenStore
  405. };
  406. /***/ }),
  407. /***/ "./node_modules/core-js/modules/_collection.js":
  408. /***/ (function(module, exports, __webpack_require__) {
  409. "use strict";
  410. var global = __webpack_require__("./node_modules/core-js/modules/_global.js");
  411. var $export = __webpack_require__("./node_modules/core-js/modules/_export.js");
  412. var redefine = __webpack_require__("./node_modules/core-js/modules/_redefine.js");
  413. var redefineAll = __webpack_require__("./node_modules/core-js/modules/_redefine-all.js");
  414. var meta = __webpack_require__("./node_modules/core-js/modules/_meta.js");
  415. var forOf = __webpack_require__("./node_modules/core-js/modules/_for-of.js");
  416. var anInstance = __webpack_require__("./node_modules/core-js/modules/_an-instance.js");
  417. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  418. var fails = __webpack_require__("./node_modules/core-js/modules/_fails.js");
  419. var $iterDetect = __webpack_require__("./node_modules/core-js/modules/_iter-detect.js");
  420. var setToStringTag = __webpack_require__("./node_modules/core-js/modules/_set-to-string-tag.js");
  421. var inheritIfRequired = __webpack_require__("./node_modules/core-js/modules/_inherit-if-required.js");
  422. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  423. var Base = global[NAME];
  424. var C = Base;
  425. var ADDER = IS_MAP ? 'set' : 'add';
  426. var proto = C && C.prototype;
  427. var O = {};
  428. var fixMethod = function (KEY) {
  429. var fn = proto[KEY];
  430. redefine(proto, KEY,
  431. KEY == 'delete' ? function (a) {
  432. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  433. } : KEY == 'has' ? function has(a) {
  434. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  435. } : KEY == 'get' ? function get(a) {
  436. return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  437. } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
  438. : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
  439. );
  440. };
  441. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  442. new C().entries().next();
  443. }))) {
  444. // create collection constructor
  445. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  446. redefineAll(C.prototype, methods);
  447. meta.NEED = true;
  448. } else {
  449. var instance = new C();
  450. // early implementations not supports chaining
  451. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  452. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  453. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  454. // most early implementations doesn't supports iterables, most modern - not close it correctly
  455. var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
  456. // for early implementations -0 and +0 not the same
  457. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  458. // V8 ~ Chromium 42- fails only with 5+ elements
  459. var $instance = new C();
  460. var index = 5;
  461. while (index--) $instance[ADDER](index, index);
  462. return !$instance.has(-0);
  463. });
  464. if (!ACCEPT_ITERABLES) {
  465. C = wrapper(function (target, iterable) {
  466. anInstance(target, C, NAME);
  467. var that = inheritIfRequired(new Base(), target, C);
  468. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  469. return that;
  470. });
  471. C.prototype = proto;
  472. proto.constructor = C;
  473. }
  474. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  475. fixMethod('delete');
  476. fixMethod('has');
  477. IS_MAP && fixMethod('get');
  478. }
  479. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  480. // weak collections should not contains .clear method
  481. if (IS_WEAK && proto.clear) delete proto.clear;
  482. }
  483. setToStringTag(C, NAME);
  484. O[NAME] = C;
  485. $export($export.G + $export.W + $export.F * (C != Base), O);
  486. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  487. return C;
  488. };
  489. /***/ }),
  490. /***/ "./node_modules/core-js/modules/_core.js":
  491. /***/ (function(module, exports) {
  492. var core = module.exports = { version: '2.5.3' };
  493. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  494. /***/ }),
  495. /***/ "./node_modules/core-js/modules/_ctx.js":
  496. /***/ (function(module, exports, __webpack_require__) {
  497. // optional / simple context binding
  498. var aFunction = __webpack_require__("./node_modules/core-js/modules/_a-function.js");
  499. module.exports = function (fn, that, length) {
  500. aFunction(fn);
  501. if (that === undefined) return fn;
  502. switch (length) {
  503. case 1: return function (a) {
  504. return fn.call(that, a);
  505. };
  506. case 2: return function (a, b) {
  507. return fn.call(that, a, b);
  508. };
  509. case 3: return function (a, b, c) {
  510. return fn.call(that, a, b, c);
  511. };
  512. }
  513. return function (/* ...args */) {
  514. return fn.apply(that, arguments);
  515. };
  516. };
  517. /***/ }),
  518. /***/ "./node_modules/core-js/modules/_defined.js":
  519. /***/ (function(module, exports) {
  520. // 7.2.1 RequireObjectCoercible(argument)
  521. module.exports = function (it) {
  522. if (it == undefined) throw TypeError("Can't call method on " + it);
  523. return it;
  524. };
  525. /***/ }),
  526. /***/ "./node_modules/core-js/modules/_descriptors.js":
  527. /***/ (function(module, exports, __webpack_require__) {
  528. // Thank's IE8 for his funny defineProperty
  529. module.exports = !__webpack_require__("./node_modules/core-js/modules/_fails.js")(function () {
  530. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  531. });
  532. /***/ }),
  533. /***/ "./node_modules/core-js/modules/_dom-create.js":
  534. /***/ (function(module, exports, __webpack_require__) {
  535. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  536. var document = __webpack_require__("./node_modules/core-js/modules/_global.js").document;
  537. // typeof document.createElement is 'object' in old IE
  538. var is = isObject(document) && isObject(document.createElement);
  539. module.exports = function (it) {
  540. return is ? document.createElement(it) : {};
  541. };
  542. /***/ }),
  543. /***/ "./node_modules/core-js/modules/_enum-bug-keys.js":
  544. /***/ (function(module, exports) {
  545. // IE 8- don't enum bug keys
  546. module.exports = (
  547. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  548. ).split(',');
  549. /***/ }),
  550. /***/ "./node_modules/core-js/modules/_export.js":
  551. /***/ (function(module, exports, __webpack_require__) {
  552. var global = __webpack_require__("./node_modules/core-js/modules/_global.js");
  553. var core = __webpack_require__("./node_modules/core-js/modules/_core.js");
  554. var hide = __webpack_require__("./node_modules/core-js/modules/_hide.js");
  555. var redefine = __webpack_require__("./node_modules/core-js/modules/_redefine.js");
  556. var ctx = __webpack_require__("./node_modules/core-js/modules/_ctx.js");
  557. var PROTOTYPE = 'prototype';
  558. var $export = function (type, name, source) {
  559. var IS_FORCED = type & $export.F;
  560. var IS_GLOBAL = type & $export.G;
  561. var IS_STATIC = type & $export.S;
  562. var IS_PROTO = type & $export.P;
  563. var IS_BIND = type & $export.B;
  564. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  565. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  566. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  567. var key, own, out, exp;
  568. if (IS_GLOBAL) source = name;
  569. for (key in source) {
  570. // contains in native
  571. own = !IS_FORCED && target && target[key] !== undefined;
  572. // export native or passed
  573. out = (own ? target : source)[key];
  574. // bind timers to global for call from export context
  575. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  576. // extend global
  577. if (target) redefine(target, key, out, type & $export.U);
  578. // export
  579. if (exports[key] != out) hide(exports, key, exp);
  580. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  581. }
  582. };
  583. global.core = core;
  584. // type bitmap
  585. $export.F = 1; // forced
  586. $export.G = 2; // global
  587. $export.S = 4; // static
  588. $export.P = 8; // proto
  589. $export.B = 16; // bind
  590. $export.W = 32; // wrap
  591. $export.U = 64; // safe
  592. $export.R = 128; // real proto method for `library`
  593. module.exports = $export;
  594. /***/ }),
  595. /***/ "./node_modules/core-js/modules/_fails.js":
  596. /***/ (function(module, exports) {
  597. module.exports = function (exec) {
  598. try {
  599. return !!exec();
  600. } catch (e) {
  601. return true;
  602. }
  603. };
  604. /***/ }),
  605. /***/ "./node_modules/core-js/modules/_for-of.js":
  606. /***/ (function(module, exports, __webpack_require__) {
  607. var ctx = __webpack_require__("./node_modules/core-js/modules/_ctx.js");
  608. var call = __webpack_require__("./node_modules/core-js/modules/_iter-call.js");
  609. var isArrayIter = __webpack_require__("./node_modules/core-js/modules/_is-array-iter.js");
  610. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  611. var toLength = __webpack_require__("./node_modules/core-js/modules/_to-length.js");
  612. var getIterFn = __webpack_require__("./node_modules/core-js/modules/core.get-iterator-method.js");
  613. var BREAK = {};
  614. var RETURN = {};
  615. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  616. var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  617. var f = ctx(fn, that, entries ? 2 : 1);
  618. var index = 0;
  619. var length, step, iterator, result;
  620. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  621. // fast case for arrays with default iterator
  622. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  623. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  624. if (result === BREAK || result === RETURN) return result;
  625. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  626. result = call(iterator, f, step.value, entries);
  627. if (result === BREAK || result === RETURN) return result;
  628. }
  629. };
  630. exports.BREAK = BREAK;
  631. exports.RETURN = RETURN;
  632. /***/ }),
  633. /***/ "./node_modules/core-js/modules/_global.js":
  634. /***/ (function(module, exports) {
  635. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  636. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  637. ? window : typeof self != 'undefined' && self.Math == Math ? self
  638. // eslint-disable-next-line no-new-func
  639. : Function('return this')();
  640. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  641. /***/ }),
  642. /***/ "./node_modules/core-js/modules/_has.js":
  643. /***/ (function(module, exports) {
  644. var hasOwnProperty = {}.hasOwnProperty;
  645. module.exports = function (it, key) {
  646. return hasOwnProperty.call(it, key);
  647. };
  648. /***/ }),
  649. /***/ "./node_modules/core-js/modules/_hide.js":
  650. /***/ (function(module, exports, __webpack_require__) {
  651. var dP = __webpack_require__("./node_modules/core-js/modules/_object-dp.js");
  652. var createDesc = __webpack_require__("./node_modules/core-js/modules/_property-desc.js");
  653. module.exports = __webpack_require__("./node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) {
  654. return dP.f(object, key, createDesc(1, value));
  655. } : function (object, key, value) {
  656. object[key] = value;
  657. return object;
  658. };
  659. /***/ }),
  660. /***/ "./node_modules/core-js/modules/_html.js":
  661. /***/ (function(module, exports, __webpack_require__) {
  662. var document = __webpack_require__("./node_modules/core-js/modules/_global.js").document;
  663. module.exports = document && document.documentElement;
  664. /***/ }),
  665. /***/ "./node_modules/core-js/modules/_ie8-dom-define.js":
  666. /***/ (function(module, exports, __webpack_require__) {
  667. module.exports = !__webpack_require__("./node_modules/core-js/modules/_descriptors.js") && !__webpack_require__("./node_modules/core-js/modules/_fails.js")(function () {
  668. return Object.defineProperty(__webpack_require__("./node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
  669. });
  670. /***/ }),
  671. /***/ "./node_modules/core-js/modules/_inherit-if-required.js":
  672. /***/ (function(module, exports, __webpack_require__) {
  673. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  674. var setPrototypeOf = __webpack_require__("./node_modules/core-js/modules/_set-proto.js").set;
  675. module.exports = function (that, target, C) {
  676. var S = target.constructor;
  677. var P;
  678. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  679. setPrototypeOf(that, P);
  680. } return that;
  681. };
  682. /***/ }),
  683. /***/ "./node_modules/core-js/modules/_iobject.js":
  684. /***/ (function(module, exports, __webpack_require__) {
  685. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  686. var cof = __webpack_require__("./node_modules/core-js/modules/_cof.js");
  687. // eslint-disable-next-line no-prototype-builtins
  688. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  689. return cof(it) == 'String' ? it.split('') : Object(it);
  690. };
  691. /***/ }),
  692. /***/ "./node_modules/core-js/modules/_is-array-iter.js":
  693. /***/ (function(module, exports, __webpack_require__) {
  694. // check on default Array iterator
  695. var Iterators = __webpack_require__("./node_modules/core-js/modules/_iterators.js");
  696. var ITERATOR = __webpack_require__("./node_modules/core-js/modules/_wks.js")('iterator');
  697. var ArrayProto = Array.prototype;
  698. module.exports = function (it) {
  699. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  700. };
  701. /***/ }),
  702. /***/ "./node_modules/core-js/modules/_is-array.js":
  703. /***/ (function(module, exports, __webpack_require__) {
  704. // 7.2.2 IsArray(argument)
  705. var cof = __webpack_require__("./node_modules/core-js/modules/_cof.js");
  706. module.exports = Array.isArray || function isArray(arg) {
  707. return cof(arg) == 'Array';
  708. };
  709. /***/ }),
  710. /***/ "./node_modules/core-js/modules/_is-object.js":
  711. /***/ (function(module, exports) {
  712. module.exports = function (it) {
  713. return typeof it === 'object' ? it !== null : typeof it === 'function';
  714. };
  715. /***/ }),
  716. /***/ "./node_modules/core-js/modules/_iter-call.js":
  717. /***/ (function(module, exports, __webpack_require__) {
  718. // call something on iterator step with safe closing on error
  719. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  720. module.exports = function (iterator, fn, value, entries) {
  721. try {
  722. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  723. // 7.4.6 IteratorClose(iterator, completion)
  724. } catch (e) {
  725. var ret = iterator['return'];
  726. if (ret !== undefined) anObject(ret.call(iterator));
  727. throw e;
  728. }
  729. };
  730. /***/ }),
  731. /***/ "./node_modules/core-js/modules/_iter-create.js":
  732. /***/ (function(module, exports, __webpack_require__) {
  733. "use strict";
  734. var create = __webpack_require__("./node_modules/core-js/modules/_object-create.js");
  735. var descriptor = __webpack_require__("./node_modules/core-js/modules/_property-desc.js");
  736. var setToStringTag = __webpack_require__("./node_modules/core-js/modules/_set-to-string-tag.js");
  737. var IteratorPrototype = {};
  738. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  739. __webpack_require__("./node_modules/core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__("./node_modules/core-js/modules/_wks.js")('iterator'), function () { return this; });
  740. module.exports = function (Constructor, NAME, next) {
  741. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  742. setToStringTag(Constructor, NAME + ' Iterator');
  743. };
  744. /***/ }),
  745. /***/ "./node_modules/core-js/modules/_iter-define.js":
  746. /***/ (function(module, exports, __webpack_require__) {
  747. "use strict";
  748. var LIBRARY = __webpack_require__("./node_modules/core-js/modules/_library.js");
  749. var $export = __webpack_require__("./node_modules/core-js/modules/_export.js");
  750. var redefine = __webpack_require__("./node_modules/core-js/modules/_redefine.js");
  751. var hide = __webpack_require__("./node_modules/core-js/modules/_hide.js");
  752. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  753. var Iterators = __webpack_require__("./node_modules/core-js/modules/_iterators.js");
  754. var $iterCreate = __webpack_require__("./node_modules/core-js/modules/_iter-create.js");
  755. var setToStringTag = __webpack_require__("./node_modules/core-js/modules/_set-to-string-tag.js");
  756. var getPrototypeOf = __webpack_require__("./node_modules/core-js/modules/_object-gpo.js");
  757. var ITERATOR = __webpack_require__("./node_modules/core-js/modules/_wks.js")('iterator');
  758. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  759. var FF_ITERATOR = '@@iterator';
  760. var KEYS = 'keys';
  761. var VALUES = 'values';
  762. var returnThis = function () { return this; };
  763. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  764. $iterCreate(Constructor, NAME, next);
  765. var getMethod = function (kind) {
  766. if (!BUGGY && kind in proto) return proto[kind];
  767. switch (kind) {
  768. case KEYS: return function keys() { return new Constructor(this, kind); };
  769. case VALUES: return function values() { return new Constructor(this, kind); };
  770. } return function entries() { return new Constructor(this, kind); };
  771. };
  772. var TAG = NAME + ' Iterator';
  773. var DEF_VALUES = DEFAULT == VALUES;
  774. var VALUES_BUG = false;
  775. var proto = Base.prototype;
  776. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  777. var $default = (!BUGGY && $native) || getMethod(DEFAULT);
  778. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  779. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  780. var methods, key, IteratorPrototype;
  781. // Fix native
  782. if ($anyNative) {
  783. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  784. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  785. // Set @@toStringTag to native iterators
  786. setToStringTag(IteratorPrototype, TAG, true);
  787. // fix for some old engines
  788. if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
  789. }
  790. }
  791. // fix Array#{values, @@iterator}.name in V8 / FF
  792. if (DEF_VALUES && $native && $native.name !== VALUES) {
  793. VALUES_BUG = true;
  794. $default = function values() { return $native.call(this); };
  795. }
  796. // Define iterator
  797. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  798. hide(proto, ITERATOR, $default);
  799. }
  800. // Plug for library
  801. Iterators[NAME] = $default;
  802. Iterators[TAG] = returnThis;
  803. if (DEFAULT) {
  804. methods = {
  805. values: DEF_VALUES ? $default : getMethod(VALUES),
  806. keys: IS_SET ? $default : getMethod(KEYS),
  807. entries: $entries
  808. };
  809. if (FORCED) for (key in methods) {
  810. if (!(key in proto)) redefine(proto, key, methods[key]);
  811. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  812. }
  813. return methods;
  814. };
  815. /***/ }),
  816. /***/ "./node_modules/core-js/modules/_iter-detect.js":
  817. /***/ (function(module, exports, __webpack_require__) {
  818. var ITERATOR = __webpack_require__("./node_modules/core-js/modules/_wks.js")('iterator');
  819. var SAFE_CLOSING = false;
  820. try {
  821. var riter = [7][ITERATOR]();
  822. riter['return'] = function () { SAFE_CLOSING = true; };
  823. // eslint-disable-next-line no-throw-literal
  824. Array.from(riter, function () { throw 2; });
  825. } catch (e) { /* empty */ }
  826. module.exports = function (exec, skipClosing) {
  827. if (!skipClosing && !SAFE_CLOSING) return false;
  828. var safe = false;
  829. try {
  830. var arr = [7];
  831. var iter = arr[ITERATOR]();
  832. iter.next = function () { return { done: safe = true }; };
  833. arr[ITERATOR] = function () { return iter; };
  834. exec(arr);
  835. } catch (e) { /* empty */ }
  836. return safe;
  837. };
  838. /***/ }),
  839. /***/ "./node_modules/core-js/modules/_iter-step.js":
  840. /***/ (function(module, exports) {
  841. module.exports = function (done, value) {
  842. return { value: value, done: !!done };
  843. };
  844. /***/ }),
  845. /***/ "./node_modules/core-js/modules/_iterators.js":
  846. /***/ (function(module, exports) {
  847. module.exports = {};
  848. /***/ }),
  849. /***/ "./node_modules/core-js/modules/_library.js":
  850. /***/ (function(module, exports) {
  851. module.exports = false;
  852. /***/ }),
  853. /***/ "./node_modules/core-js/modules/_meta.js":
  854. /***/ (function(module, exports, __webpack_require__) {
  855. var META = __webpack_require__("./node_modules/core-js/modules/_uid.js")('meta');
  856. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  857. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  858. var setDesc = __webpack_require__("./node_modules/core-js/modules/_object-dp.js").f;
  859. var id = 0;
  860. var isExtensible = Object.isExtensible || function () {
  861. return true;
  862. };
  863. var FREEZE = !__webpack_require__("./node_modules/core-js/modules/_fails.js")(function () {
  864. return isExtensible(Object.preventExtensions({}));
  865. });
  866. var setMeta = function (it) {
  867. setDesc(it, META, { value: {
  868. i: 'O' + ++id, // object ID
  869. w: {} // weak collections IDs
  870. } });
  871. };
  872. var fastKey = function (it, create) {
  873. // return primitive with prefix
  874. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  875. if (!has(it, META)) {
  876. // can't set metadata to uncaught frozen object
  877. if (!isExtensible(it)) return 'F';
  878. // not necessary to add metadata
  879. if (!create) return 'E';
  880. // add missing metadata
  881. setMeta(it);
  882. // return object ID
  883. } return it[META].i;
  884. };
  885. var getWeak = function (it, create) {
  886. if (!has(it, META)) {
  887. // can't set metadata to uncaught frozen object
  888. if (!isExtensible(it)) return true;
  889. // not necessary to add metadata
  890. if (!create) return false;
  891. // add missing metadata
  892. setMeta(it);
  893. // return hash weak collections IDs
  894. } return it[META].w;
  895. };
  896. // add metadata on freeze-family methods calling
  897. var onFreeze = function (it) {
  898. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  899. return it;
  900. };
  901. var meta = module.exports = {
  902. KEY: META,
  903. NEED: false,
  904. fastKey: fastKey,
  905. getWeak: getWeak,
  906. onFreeze: onFreeze
  907. };
  908. /***/ }),
  909. /***/ "./node_modules/core-js/modules/_metadata.js":
  910. /***/ (function(module, exports, __webpack_require__) {
  911. var Map = __webpack_require__("./node_modules/core-js/modules/es6.map.js");
  912. var $export = __webpack_require__("./node_modules/core-js/modules/_export.js");
  913. var shared = __webpack_require__("./node_modules/core-js/modules/_shared.js")('metadata');
  914. var store = shared.store || (shared.store = new (__webpack_require__("./node_modules/core-js/modules/es6.weak-map.js"))());
  915. var getOrCreateMetadataMap = function (target, targetKey, create) {
  916. var targetMetadata = store.get(target);
  917. if (!targetMetadata) {
  918. if (!create) return undefined;
  919. store.set(target, targetMetadata = new Map());
  920. }
  921. var keyMetadata = targetMetadata.get(targetKey);
  922. if (!keyMetadata) {
  923. if (!create) return undefined;
  924. targetMetadata.set(targetKey, keyMetadata = new Map());
  925. } return keyMetadata;
  926. };
  927. var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
  928. var metadataMap = getOrCreateMetadataMap(O, P, false);
  929. return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
  930. };
  931. var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
  932. var metadataMap = getOrCreateMetadataMap(O, P, false);
  933. return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
  934. };
  935. var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
  936. getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
  937. };
  938. var ordinaryOwnMetadataKeys = function (target, targetKey) {
  939. var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
  940. var keys = [];
  941. if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
  942. return keys;
  943. };
  944. var toMetaKey = function (it) {
  945. return it === undefined || typeof it == 'symbol' ? it : String(it);
  946. };
  947. var exp = function (O) {
  948. $export($export.S, 'Reflect', O);
  949. };
  950. module.exports = {
  951. store: store,
  952. map: getOrCreateMetadataMap,
  953. has: ordinaryHasOwnMetadata,
  954. get: ordinaryGetOwnMetadata,
  955. set: ordinaryDefineOwnMetadata,
  956. keys: ordinaryOwnMetadataKeys,
  957. key: toMetaKey,
  958. exp: exp
  959. };
  960. /***/ }),
  961. /***/ "./node_modules/core-js/modules/_object-assign.js":
  962. /***/ (function(module, exports, __webpack_require__) {
  963. "use strict";
  964. // 19.1.2.1 Object.assign(target, source, ...)
  965. var getKeys = __webpack_require__("./node_modules/core-js/modules/_object-keys.js");
  966. var gOPS = __webpack_require__("./node_modules/core-js/modules/_object-gops.js");
  967. var pIE = __webpack_require__("./node_modules/core-js/modules/_object-pie.js");
  968. var toObject = __webpack_require__("./node_modules/core-js/modules/_to-object.js");
  969. var IObject = __webpack_require__("./node_modules/core-js/modules/_iobject.js");
  970. var $assign = Object.assign;
  971. // should work with symbols and should have deterministic property order (V8 bug)
  972. module.exports = !$assign || __webpack_require__("./node_modules/core-js/modules/_fails.js")(function () {
  973. var A = {};
  974. var B = {};
  975. // eslint-disable-next-line no-undef
  976. var S = Symbol();
  977. var K = 'abcdefghijklmnopqrst';
  978. A[S] = 7;
  979. K.split('').forEach(function (k) { B[k] = k; });
  980. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  981. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  982. var T = toObject(target);
  983. var aLen = arguments.length;
  984. var index = 1;
  985. var getSymbols = gOPS.f;
  986. var isEnum = pIE.f;
  987. while (aLen > index) {
  988. var S = IObject(arguments[index++]);
  989. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  990. var length = keys.length;
  991. var j = 0;
  992. var key;
  993. while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  994. } return T;
  995. } : $assign;
  996. /***/ }),
  997. /***/ "./node_modules/core-js/modules/_object-create.js":
  998. /***/ (function(module, exports, __webpack_require__) {
  999. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  1000. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1001. var dPs = __webpack_require__("./node_modules/core-js/modules/_object-dps.js");
  1002. var enumBugKeys = __webpack_require__("./node_modules/core-js/modules/_enum-bug-keys.js");
  1003. var IE_PROTO = __webpack_require__("./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
  1004. var Empty = function () { /* empty */ };
  1005. var PROTOTYPE = 'prototype';
  1006. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1007. var createDict = function () {
  1008. // Thrash, waste and sodomy: IE GC bug
  1009. var iframe = __webpack_require__("./node_modules/core-js/modules/_dom-create.js")('iframe');
  1010. var i = enumBugKeys.length;
  1011. var lt = '<';
  1012. var gt = '>';
  1013. var iframeDocument;
  1014. iframe.style.display = 'none';
  1015. __webpack_require__("./node_modules/core-js/modules/_html.js").appendChild(iframe);
  1016. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  1017. // createDict = iframe.contentWindow.Object;
  1018. // html.removeChild(iframe);
  1019. iframeDocument = iframe.contentWindow.document;
  1020. iframeDocument.open();
  1021. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  1022. iframeDocument.close();
  1023. createDict = iframeDocument.F;
  1024. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  1025. return createDict();
  1026. };
  1027. module.exports = Object.create || function create(O, Properties) {
  1028. var result;
  1029. if (O !== null) {
  1030. Empty[PROTOTYPE] = anObject(O);
  1031. result = new Empty();
  1032. Empty[PROTOTYPE] = null;
  1033. // add "__proto__" for Object.getPrototypeOf polyfill
  1034. result[IE_PROTO] = O;
  1035. } else result = createDict();
  1036. return Properties === undefined ? result : dPs(result, Properties);
  1037. };
  1038. /***/ }),
  1039. /***/ "./node_modules/core-js/modules/_object-dp.js":
  1040. /***/ (function(module, exports, __webpack_require__) {
  1041. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1042. var IE8_DOM_DEFINE = __webpack_require__("./node_modules/core-js/modules/_ie8-dom-define.js");
  1043. var toPrimitive = __webpack_require__("./node_modules/core-js/modules/_to-primitive.js");
  1044. var dP = Object.defineProperty;
  1045. exports.f = __webpack_require__("./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  1046. anObject(O);
  1047. P = toPrimitive(P, true);
  1048. anObject(Attributes);
  1049. if (IE8_DOM_DEFINE) try {
  1050. return dP(O, P, Attributes);
  1051. } catch (e) { /* empty */ }
  1052. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  1053. if ('value' in Attributes) O[P] = Attributes.value;
  1054. return O;
  1055. };
  1056. /***/ }),
  1057. /***/ "./node_modules/core-js/modules/_object-dps.js":
  1058. /***/ (function(module, exports, __webpack_require__) {
  1059. var dP = __webpack_require__("./node_modules/core-js/modules/_object-dp.js");
  1060. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1061. var getKeys = __webpack_require__("./node_modules/core-js/modules/_object-keys.js");
  1062. module.exports = __webpack_require__("./node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
  1063. anObject(O);
  1064. var keys = getKeys(Properties);
  1065. var length = keys.length;
  1066. var i = 0;
  1067. var P;
  1068. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  1069. return O;
  1070. };
  1071. /***/ }),
  1072. /***/ "./node_modules/core-js/modules/_object-gopd.js":
  1073. /***/ (function(module, exports, __webpack_require__) {
  1074. var pIE = __webpack_require__("./node_modules/core-js/modules/_object-pie.js");
  1075. var createDesc = __webpack_require__("./node_modules/core-js/modules/_property-desc.js");
  1076. var toIObject = __webpack_require__("./node_modules/core-js/modules/_to-iobject.js");
  1077. var toPrimitive = __webpack_require__("./node_modules/core-js/modules/_to-primitive.js");
  1078. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  1079. var IE8_DOM_DEFINE = __webpack_require__("./node_modules/core-js/modules/_ie8-dom-define.js");
  1080. var gOPD = Object.getOwnPropertyDescriptor;
  1081. exports.f = __webpack_require__("./node_modules/core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
  1082. O = toIObject(O);
  1083. P = toPrimitive(P, true);
  1084. if (IE8_DOM_DEFINE) try {
  1085. return gOPD(O, P);
  1086. } catch (e) { /* empty */ }
  1087. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  1088. };
  1089. /***/ }),
  1090. /***/ "./node_modules/core-js/modules/_object-gops.js":
  1091. /***/ (function(module, exports) {
  1092. exports.f = Object.getOwnPropertySymbols;
  1093. /***/ }),
  1094. /***/ "./node_modules/core-js/modules/_object-gpo.js":
  1095. /***/ (function(module, exports, __webpack_require__) {
  1096. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  1097. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  1098. var toObject = __webpack_require__("./node_modules/core-js/modules/_to-object.js");
  1099. var IE_PROTO = __webpack_require__("./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
  1100. var ObjectProto = Object.prototype;
  1101. module.exports = Object.getPrototypeOf || function (O) {
  1102. O = toObject(O);
  1103. if (has(O, IE_PROTO)) return O[IE_PROTO];
  1104. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  1105. return O.constructor.prototype;
  1106. } return O instanceof Object ? ObjectProto : null;
  1107. };
  1108. /***/ }),
  1109. /***/ "./node_modules/core-js/modules/_object-keys-internal.js":
  1110. /***/ (function(module, exports, __webpack_require__) {
  1111. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  1112. var toIObject = __webpack_require__("./node_modules/core-js/modules/_to-iobject.js");
  1113. var arrayIndexOf = __webpack_require__("./node_modules/core-js/modules/_array-includes.js")(false);
  1114. var IE_PROTO = __webpack_require__("./node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
  1115. module.exports = function (object, names) {
  1116. var O = toIObject(object);
  1117. var i = 0;
  1118. var result = [];
  1119. var key;
  1120. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  1121. // Don't enum bug & hidden keys
  1122. while (names.length > i) if (has(O, key = names[i++])) {
  1123. ~arrayIndexOf(result, key) || result.push(key);
  1124. }
  1125. return result;
  1126. };
  1127. /***/ }),
  1128. /***/ "./node_modules/core-js/modules/_object-keys.js":
  1129. /***/ (function(module, exports, __webpack_require__) {
  1130. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  1131. var $keys = __webpack_require__("./node_modules/core-js/modules/_object-keys-internal.js");
  1132. var enumBugKeys = __webpack_require__("./node_modules/core-js/modules/_enum-bug-keys.js");
  1133. module.exports = Object.keys || function keys(O) {
  1134. return $keys(O, enumBugKeys);
  1135. };
  1136. /***/ }),
  1137. /***/ "./node_modules/core-js/modules/_object-pie.js":
  1138. /***/ (function(module, exports) {
  1139. exports.f = {}.propertyIsEnumerable;
  1140. /***/ }),
  1141. /***/ "./node_modules/core-js/modules/_property-desc.js":
  1142. /***/ (function(module, exports) {
  1143. module.exports = function (bitmap, value) {
  1144. return {
  1145. enumerable: !(bitmap & 1),
  1146. configurable: !(bitmap & 2),
  1147. writable: !(bitmap & 4),
  1148. value: value
  1149. };
  1150. };
  1151. /***/ }),
  1152. /***/ "./node_modules/core-js/modules/_redefine-all.js":
  1153. /***/ (function(module, exports, __webpack_require__) {
  1154. var redefine = __webpack_require__("./node_modules/core-js/modules/_redefine.js");
  1155. module.exports = function (target, src, safe) {
  1156. for (var key in src) redefine(target, key, src[key], safe);
  1157. return target;
  1158. };
  1159. /***/ }),
  1160. /***/ "./node_modules/core-js/modules/_redefine.js":
  1161. /***/ (function(module, exports, __webpack_require__) {
  1162. var global = __webpack_require__("./node_modules/core-js/modules/_global.js");
  1163. var hide = __webpack_require__("./node_modules/core-js/modules/_hide.js");
  1164. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  1165. var SRC = __webpack_require__("./node_modules/core-js/modules/_uid.js")('src');
  1166. var TO_STRING = 'toString';
  1167. var $toString = Function[TO_STRING];
  1168. var TPL = ('' + $toString).split(TO_STRING);
  1169. __webpack_require__("./node_modules/core-js/modules/_core.js").inspectSource = function (it) {
  1170. return $toString.call(it);
  1171. };
  1172. (module.exports = function (O, key, val, safe) {
  1173. var isFunction = typeof val == 'function';
  1174. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  1175. if (O[key] === val) return;
  1176. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  1177. if (O === global) {
  1178. O[key] = val;
  1179. } else if (!safe) {
  1180. delete O[key];
  1181. hide(O, key, val);
  1182. } else if (O[key]) {
  1183. O[key] = val;
  1184. } else {
  1185. hide(O, key, val);
  1186. }
  1187. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  1188. })(Function.prototype, TO_STRING, function toString() {
  1189. return typeof this == 'function' && this[SRC] || $toString.call(this);
  1190. });
  1191. /***/ }),
  1192. /***/ "./node_modules/core-js/modules/_set-proto.js":
  1193. /***/ (function(module, exports, __webpack_require__) {
  1194. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1195. /* eslint-disable no-proto */
  1196. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  1197. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1198. var check = function (O, proto) {
  1199. anObject(O);
  1200. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  1201. };
  1202. module.exports = {
  1203. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  1204. function (test, buggy, set) {
  1205. try {
  1206. set = __webpack_require__("./node_modules/core-js/modules/_ctx.js")(Function.call, __webpack_require__("./node_modules/core-js/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2);
  1207. set(test, []);
  1208. buggy = !(test instanceof Array);
  1209. } catch (e) { buggy = true; }
  1210. return function setPrototypeOf(O, proto) {
  1211. check(O, proto);
  1212. if (buggy) O.__proto__ = proto;
  1213. else set(O, proto);
  1214. return O;
  1215. };
  1216. }({}, false) : undefined),
  1217. check: check
  1218. };
  1219. /***/ }),
  1220. /***/ "./node_modules/core-js/modules/_set-species.js":
  1221. /***/ (function(module, exports, __webpack_require__) {
  1222. "use strict";
  1223. var global = __webpack_require__("./node_modules/core-js/modules/_global.js");
  1224. var dP = __webpack_require__("./node_modules/core-js/modules/_object-dp.js");
  1225. var DESCRIPTORS = __webpack_require__("./node_modules/core-js/modules/_descriptors.js");
  1226. var SPECIES = __webpack_require__("./node_modules/core-js/modules/_wks.js")('species');
  1227. module.exports = function (KEY) {
  1228. var C = global[KEY];
  1229. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  1230. configurable: true,
  1231. get: function () { return this; }
  1232. });
  1233. };
  1234. /***/ }),
  1235. /***/ "./node_modules/core-js/modules/_set-to-string-tag.js":
  1236. /***/ (function(module, exports, __webpack_require__) {
  1237. var def = __webpack_require__("./node_modules/core-js/modules/_object-dp.js").f;
  1238. var has = __webpack_require__("./node_modules/core-js/modules/_has.js");
  1239. var TAG = __webpack_require__("./node_modules/core-js/modules/_wks.js")('toStringTag');
  1240. module.exports = function (it, tag, stat) {
  1241. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  1242. };
  1243. /***/ }),
  1244. /***/ "./node_modules/core-js/modules/_shared-key.js":
  1245. /***/ (function(module, exports, __webpack_require__) {
  1246. var shared = __webpack_require__("./node_modules/core-js/modules/_shared.js")('keys');
  1247. var uid = __webpack_require__("./node_modules/core-js/modules/_uid.js");
  1248. module.exports = function (key) {
  1249. return shared[key] || (shared[key] = uid(key));
  1250. };
  1251. /***/ }),
  1252. /***/ "./node_modules/core-js/modules/_shared.js":
  1253. /***/ (function(module, exports, __webpack_require__) {
  1254. var global = __webpack_require__("./node_modules/core-js/modules/_global.js");
  1255. var SHARED = '__core-js_shared__';
  1256. var store = global[SHARED] || (global[SHARED] = {});
  1257. module.exports = function (key) {
  1258. return store[key] || (store[key] = {});
  1259. };
  1260. /***/ }),
  1261. /***/ "./node_modules/core-js/modules/_to-absolute-index.js":
  1262. /***/ (function(module, exports, __webpack_require__) {
  1263. var toInteger = __webpack_require__("./node_modules/core-js/modules/_to-integer.js");
  1264. var max = Math.max;
  1265. var min = Math.min;
  1266. module.exports = function (index, length) {
  1267. index = toInteger(index);
  1268. return index < 0 ? max(index + length, 0) : min(index, length);
  1269. };
  1270. /***/ }),
  1271. /***/ "./node_modules/core-js/modules/_to-integer.js":
  1272. /***/ (function(module, exports) {
  1273. // 7.1.4 ToInteger
  1274. var ceil = Math.ceil;
  1275. var floor = Math.floor;
  1276. module.exports = function (it) {
  1277. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  1278. };
  1279. /***/ }),
  1280. /***/ "./node_modules/core-js/modules/_to-iobject.js":
  1281. /***/ (function(module, exports, __webpack_require__) {
  1282. // to indexed object, toObject with fallback for non-array-like ES3 strings
  1283. var IObject = __webpack_require__("./node_modules/core-js/modules/_iobject.js");
  1284. var defined = __webpack_require__("./node_modules/core-js/modules/_defined.js");
  1285. module.exports = function (it) {
  1286. return IObject(defined(it));
  1287. };
  1288. /***/ }),
  1289. /***/ "./node_modules/core-js/modules/_to-length.js":
  1290. /***/ (function(module, exports, __webpack_require__) {
  1291. // 7.1.15 ToLength
  1292. var toInteger = __webpack_require__("./node_modules/core-js/modules/_to-integer.js");
  1293. var min = Math.min;
  1294. module.exports = function (it) {
  1295. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  1296. };
  1297. /***/ }),
  1298. /***/ "./node_modules/core-js/modules/_to-object.js":
  1299. /***/ (function(module, exports, __webpack_require__) {
  1300. // 7.1.13 ToObject(argument)
  1301. var defined = __webpack_require__("./node_modules/core-js/modules/_defined.js");
  1302. module.exports = function (it) {
  1303. return Object(defined(it));
  1304. };
  1305. /***/ }),
  1306. /***/ "./node_modules/core-js/modules/_to-primitive.js":
  1307. /***/ (function(module, exports, __webpack_require__) {
  1308. // 7.1.1 ToPrimitive(input [, PreferredType])
  1309. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  1310. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  1311. // and the second argument - flag - preferred type is a string
  1312. module.exports = function (it, S) {
  1313. if (!isObject(it)) return it;
  1314. var fn, val;
  1315. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  1316. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  1317. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  1318. throw TypeError("Can't convert object to primitive value");
  1319. };
  1320. /***/ }),
  1321. /***/ "./node_modules/core-js/modules/_uid.js":
  1322. /***/ (function(module, exports) {
  1323. var id = 0;
  1324. var px = Math.random();
  1325. module.exports = function (key) {
  1326. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  1327. };
  1328. /***/ }),
  1329. /***/ "./node_modules/core-js/modules/_validate-collection.js":
  1330. /***/ (function(module, exports, __webpack_require__) {
  1331. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  1332. module.exports = function (it, TYPE) {
  1333. if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  1334. return it;
  1335. };
  1336. /***/ }),
  1337. /***/ "./node_modules/core-js/modules/_wks.js":
  1338. /***/ (function(module, exports, __webpack_require__) {
  1339. var store = __webpack_require__("./node_modules/core-js/modules/_shared.js")('wks');
  1340. var uid = __webpack_require__("./node_modules/core-js/modules/_uid.js");
  1341. var Symbol = __webpack_require__("./node_modules/core-js/modules/_global.js").Symbol;
  1342. var USE_SYMBOL = typeof Symbol == 'function';
  1343. var $exports = module.exports = function (name) {
  1344. return store[name] || (store[name] =
  1345. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  1346. };
  1347. $exports.store = store;
  1348. /***/ }),
  1349. /***/ "./node_modules/core-js/modules/core.get-iterator-method.js":
  1350. /***/ (function(module, exports, __webpack_require__) {
  1351. var classof = __webpack_require__("./node_modules/core-js/modules/_classof.js");
  1352. var ITERATOR = __webpack_require__("./node_modules/core-js/modules/_wks.js")('iterator');
  1353. var Iterators = __webpack_require__("./node_modules/core-js/modules/_iterators.js");
  1354. module.exports = __webpack_require__("./node_modules/core-js/modules/_core.js").getIteratorMethod = function (it) {
  1355. if (it != undefined) return it[ITERATOR]
  1356. || it['@@iterator']
  1357. || Iterators[classof(it)];
  1358. };
  1359. /***/ }),
  1360. /***/ "./node_modules/core-js/modules/es6.map.js":
  1361. /***/ (function(module, exports, __webpack_require__) {
  1362. "use strict";
  1363. var strong = __webpack_require__("./node_modules/core-js/modules/_collection-strong.js");
  1364. var validate = __webpack_require__("./node_modules/core-js/modules/_validate-collection.js");
  1365. var MAP = 'Map';
  1366. // 23.1 Map Objects
  1367. module.exports = __webpack_require__("./node_modules/core-js/modules/_collection.js")(MAP, function (get) {
  1368. return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  1369. }, {
  1370. // 23.1.3.6 Map.prototype.get(key)
  1371. get: function get(key) {
  1372. var entry = strong.getEntry(validate(this, MAP), key);
  1373. return entry && entry.v;
  1374. },
  1375. // 23.1.3.9 Map.prototype.set(key, value)
  1376. set: function set(key, value) {
  1377. return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  1378. }
  1379. }, strong, true);
  1380. /***/ }),
  1381. /***/ "./node_modules/core-js/modules/es6.set.js":
  1382. /***/ (function(module, exports, __webpack_require__) {
  1383. "use strict";
  1384. var strong = __webpack_require__("./node_modules/core-js/modules/_collection-strong.js");
  1385. var validate = __webpack_require__("./node_modules/core-js/modules/_validate-collection.js");
  1386. var SET = 'Set';
  1387. // 23.2 Set Objects
  1388. module.exports = __webpack_require__("./node_modules/core-js/modules/_collection.js")(SET, function (get) {
  1389. return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  1390. }, {
  1391. // 23.2.3.1 Set.prototype.add(value)
  1392. add: function add(value) {
  1393. return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  1394. }
  1395. }, strong);
  1396. /***/ }),
  1397. /***/ "./node_modules/core-js/modules/es6.weak-map.js":
  1398. /***/ (function(module, exports, __webpack_require__) {
  1399. "use strict";
  1400. var each = __webpack_require__("./node_modules/core-js/modules/_array-methods.js")(0);
  1401. var redefine = __webpack_require__("./node_modules/core-js/modules/_redefine.js");
  1402. var meta = __webpack_require__("./node_modules/core-js/modules/_meta.js");
  1403. var assign = __webpack_require__("./node_modules/core-js/modules/_object-assign.js");
  1404. var weak = __webpack_require__("./node_modules/core-js/modules/_collection-weak.js");
  1405. var isObject = __webpack_require__("./node_modules/core-js/modules/_is-object.js");
  1406. var fails = __webpack_require__("./node_modules/core-js/modules/_fails.js");
  1407. var validate = __webpack_require__("./node_modules/core-js/modules/_validate-collection.js");
  1408. var WEAK_MAP = 'WeakMap';
  1409. var getWeak = meta.getWeak;
  1410. var isExtensible = Object.isExtensible;
  1411. var uncaughtFrozenStore = weak.ufstore;
  1412. var tmp = {};
  1413. var InternalMap;
  1414. var wrapper = function (get) {
  1415. return function WeakMap() {
  1416. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  1417. };
  1418. };
  1419. var methods = {
  1420. // 23.3.3.3 WeakMap.prototype.get(key)
  1421. get: function get(key) {
  1422. if (isObject(key)) {
  1423. var data = getWeak(key);
  1424. if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
  1425. return data ? data[this._i] : undefined;
  1426. }
  1427. },
  1428. // 23.3.3.5 WeakMap.prototype.set(key, value)
  1429. set: function set(key, value) {
  1430. return weak.def(validate(this, WEAK_MAP), key, value);
  1431. }
  1432. };
  1433. // 23.3 WeakMap Objects
  1434. var $WeakMap = module.exports = __webpack_require__("./node_modules/core-js/modules/_collection.js")(WEAK_MAP, wrapper, methods, weak, true, true);
  1435. // IE11 WeakMap frozen keys fix
  1436. if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
  1437. InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  1438. assign(InternalMap.prototype, methods);
  1439. meta.NEED = true;
  1440. each(['delete', 'has', 'get', 'set'], function (key) {
  1441. var proto = $WeakMap.prototype;
  1442. var method = proto[key];
  1443. redefine(proto, key, function (a, b) {
  1444. // store frozen objects on internal weakmap shim
  1445. if (isObject(a) && !isExtensible(a)) {
  1446. if (!this._f) this._f = new InternalMap();
  1447. var result = this._f[key](a, b);
  1448. return key == 'set' ? this : result;
  1449. // store all the rest on native weakmap
  1450. } return method.call(this, a, b);
  1451. });
  1452. });
  1453. }
  1454. /***/ }),
  1455. /***/ "./node_modules/core-js/modules/es7.reflect.define-metadata.js":
  1456. /***/ (function(module, exports, __webpack_require__) {
  1457. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1458. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1459. var toMetaKey = metadata.key;
  1460. var ordinaryDefineOwnMetadata = metadata.set;
  1461. metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
  1462. ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
  1463. } });
  1464. /***/ }),
  1465. /***/ "./node_modules/core-js/modules/es7.reflect.delete-metadata.js":
  1466. /***/ (function(module, exports, __webpack_require__) {
  1467. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1468. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1469. var toMetaKey = metadata.key;
  1470. var getOrCreateMetadataMap = metadata.map;
  1471. var store = metadata.store;
  1472. metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
  1473. var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
  1474. var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
  1475. if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
  1476. if (metadataMap.size) return true;
  1477. var targetMetadata = store.get(target);
  1478. targetMetadata['delete'](targetKey);
  1479. return !!targetMetadata.size || store['delete'](target);
  1480. } });
  1481. /***/ }),
  1482. /***/ "./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js":
  1483. /***/ (function(module, exports, __webpack_require__) {
  1484. var Set = __webpack_require__("./node_modules/core-js/modules/es6.set.js");
  1485. var from = __webpack_require__("./node_modules/core-js/modules/_array-from-iterable.js");
  1486. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1487. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1488. var getPrototypeOf = __webpack_require__("./node_modules/core-js/modules/_object-gpo.js");
  1489. var ordinaryOwnMetadataKeys = metadata.keys;
  1490. var toMetaKey = metadata.key;
  1491. var ordinaryMetadataKeys = function (O, P) {
  1492. var oKeys = ordinaryOwnMetadataKeys(O, P);
  1493. var parent = getPrototypeOf(O);
  1494. if (parent === null) return oKeys;
  1495. var pKeys = ordinaryMetadataKeys(parent, P);
  1496. return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
  1497. };
  1498. metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
  1499. return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
  1500. } });
  1501. /***/ }),
  1502. /***/ "./node_modules/core-js/modules/es7.reflect.get-metadata.js":
  1503. /***/ (function(module, exports, __webpack_require__) {
  1504. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1505. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1506. var getPrototypeOf = __webpack_require__("./node_modules/core-js/modules/_object-gpo.js");
  1507. var ordinaryHasOwnMetadata = metadata.has;
  1508. var ordinaryGetOwnMetadata = metadata.get;
  1509. var toMetaKey = metadata.key;
  1510. var ordinaryGetMetadata = function (MetadataKey, O, P) {
  1511. var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  1512. if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
  1513. var parent = getPrototypeOf(O);
  1514. return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
  1515. };
  1516. metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
  1517. return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  1518. } });
  1519. /***/ }),
  1520. /***/ "./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js":
  1521. /***/ (function(module, exports, __webpack_require__) {
  1522. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1523. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1524. var ordinaryOwnMetadataKeys = metadata.keys;
  1525. var toMetaKey = metadata.key;
  1526. metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
  1527. return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
  1528. } });
  1529. /***/ }),
  1530. /***/ "./node_modules/core-js/modules/es7.reflect.get-own-metadata.js":
  1531. /***/ (function(module, exports, __webpack_require__) {
  1532. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1533. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1534. var ordinaryGetOwnMetadata = metadata.get;
  1535. var toMetaKey = metadata.key;
  1536. metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
  1537. return ordinaryGetOwnMetadata(metadataKey, anObject(target)
  1538. , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  1539. } });
  1540. /***/ }),
  1541. /***/ "./node_modules/core-js/modules/es7.reflect.has-metadata.js":
  1542. /***/ (function(module, exports, __webpack_require__) {
  1543. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1544. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1545. var getPrototypeOf = __webpack_require__("./node_modules/core-js/modules/_object-gpo.js");
  1546. var ordinaryHasOwnMetadata = metadata.has;
  1547. var toMetaKey = metadata.key;
  1548. var ordinaryHasMetadata = function (MetadataKey, O, P) {
  1549. var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  1550. if (hasOwn) return true;
  1551. var parent = getPrototypeOf(O);
  1552. return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
  1553. };
  1554. metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
  1555. return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  1556. } });
  1557. /***/ }),
  1558. /***/ "./node_modules/core-js/modules/es7.reflect.has-own-metadata.js":
  1559. /***/ (function(module, exports, __webpack_require__) {
  1560. var metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1561. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1562. var ordinaryHasOwnMetadata = metadata.has;
  1563. var toMetaKey = metadata.key;
  1564. metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
  1565. return ordinaryHasOwnMetadata(metadataKey, anObject(target)
  1566. , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  1567. } });
  1568. /***/ }),
  1569. /***/ "./node_modules/core-js/modules/es7.reflect.metadata.js":
  1570. /***/ (function(module, exports, __webpack_require__) {
  1571. var $metadata = __webpack_require__("./node_modules/core-js/modules/_metadata.js");
  1572. var anObject = __webpack_require__("./node_modules/core-js/modules/_an-object.js");
  1573. var aFunction = __webpack_require__("./node_modules/core-js/modules/_a-function.js");
  1574. var toMetaKey = $metadata.key;
  1575. var ordinaryDefineOwnMetadata = $metadata.set;
  1576. $metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
  1577. return function decorator(target, targetKey) {
  1578. ordinaryDefineOwnMetadata(
  1579. metadataKey, metadataValue,
  1580. (targetKey !== undefined ? anObject : aFunction)(target),
  1581. toMetaKey(targetKey)
  1582. );
  1583. };
  1584. } });
  1585. /***/ }),
  1586. /***/ "./node_modules/webpack/buildin/global.js":
  1587. /***/ (function(module, exports) {
  1588. var g;
  1589. // This works in non-strict mode
  1590. g = (function() {
  1591. return this;
  1592. })();
  1593. try {
  1594. // This works if eval is allowed (see CSP)
  1595. g = g || Function("return this")() || (1,eval)("this");
  1596. } catch(e) {
  1597. // This works if the window reference is available
  1598. if(typeof window === "object")
  1599. g = window;
  1600. }
  1601. // g can still be undefined, but nothing to do about it...
  1602. // We return undefined, instead of nothing here, so it's
  1603. // easier to handle this case. if(!global) { ...}
  1604. module.exports = g;
  1605. /***/ }),
  1606. /***/ "./node_modules/zone.js/dist/zone.js":
  1607. /***/ (function(module, exports, __webpack_require__) {
  1608. /* WEBPACK VAR INJECTION */(function(global) {/**
  1609. * @license
  1610. * Copyright Google Inc. All Rights Reserved.
  1611. *
  1612. * Use of this source code is governed by an MIT-style license that can be
  1613. * found in the LICENSE file at https://angular.io/license
  1614. */
  1615. (function (global, factory) {
  1616. true ? factory() :
  1617. typeof define === 'function' && define.amd ? define(factory) :
  1618. (factory());
  1619. }(this, (function () { 'use strict';
  1620. /**
  1621. * @license
  1622. * Copyright Google Inc. All Rights Reserved.
  1623. *
  1624. * Use of this source code is governed by an MIT-style license that can be
  1625. * found in the LICENSE file at https://angular.io/license
  1626. */
  1627. var Zone$1 = (function (global) {
  1628. var FUNCTION = 'function';
  1629. var performance = global['performance'];
  1630. function mark(name) {
  1631. performance && performance['mark'] && performance['mark'](name);
  1632. }
  1633. function performanceMeasure(name, label) {
  1634. performance && performance['measure'] && performance['measure'](name, label);
  1635. }
  1636. mark('Zone');
  1637. if (global['Zone']) {
  1638. throw new Error('Zone already loaded.');
  1639. }
  1640. var Zone = (function () {
  1641. function Zone(parent, zoneSpec) {
  1642. this._properties = null;
  1643. this._parent = parent;
  1644. this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';
  1645. this._properties = zoneSpec && zoneSpec.properties || {};
  1646. this._zoneDelegate =
  1647. new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);
  1648. }
  1649. Zone.assertZonePatched = function () {
  1650. if (global['Promise'] !== patches['ZoneAwarePromise']) {
  1651. throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +
  1652. 'has been overwritten.\n' +
  1653. 'Most likely cause is that a Promise polyfill has been loaded ' +
  1654. 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +
  1655. 'If you must load one, do so before loading zone.js.)');
  1656. }
  1657. };
  1658. Object.defineProperty(Zone, "root", {
  1659. get: function () {
  1660. var zone = Zone.current;
  1661. while (zone.parent) {
  1662. zone = zone.parent;
  1663. }
  1664. return zone;
  1665. },
  1666. enumerable: true,
  1667. configurable: true
  1668. });
  1669. Object.defineProperty(Zone, "current", {
  1670. get: function () {
  1671. return _currentZoneFrame.zone;
  1672. },
  1673. enumerable: true,
  1674. configurable: true
  1675. });
  1676. Object.defineProperty(Zone, "currentTask", {
  1677. get: function () {
  1678. return _currentTask;
  1679. },
  1680. enumerable: true,
  1681. configurable: true
  1682. });
  1683. Zone.__load_patch = function (name, fn) {
  1684. if (patches.hasOwnProperty(name)) {
  1685. throw Error('Already loaded patch: ' + name);
  1686. }
  1687. else if (!global['__Zone_disable_' + name]) {
  1688. var perfName = 'Zone:' + name;
  1689. mark(perfName);
  1690. patches[name] = fn(global, Zone, _api);
  1691. performanceMeasure(perfName, perfName);
  1692. }
  1693. };
  1694. Object.defineProperty(Zone.prototype, "parent", {
  1695. get: function () {
  1696. return this._parent;
  1697. },
  1698. enumerable: true,
  1699. configurable: true
  1700. });
  1701. Object.defineProperty(Zone.prototype, "name", {
  1702. get: function () {
  1703. return this._name;
  1704. },
  1705. enumerable: true,
  1706. configurable: true
  1707. });
  1708. Zone.prototype.get = function (key) {
  1709. var zone = this.getZoneWith(key);
  1710. if (zone)
  1711. return zone._properties[key];
  1712. };
  1713. Zone.prototype.getZoneWith = function (key) {
  1714. var current = this;
  1715. while (current) {
  1716. if (current._properties.hasOwnProperty(key)) {
  1717. return current;
  1718. }
  1719. current = current._parent;
  1720. }
  1721. return null;
  1722. };
  1723. Zone.prototype.fork = function (zoneSpec) {
  1724. if (!zoneSpec)
  1725. throw new Error('ZoneSpec required!');
  1726. return this._zoneDelegate.fork(this, zoneSpec);
  1727. };
  1728. Zone.prototype.wrap = function (callback, source) {
  1729. if (typeof callback !== FUNCTION) {
  1730. throw new Error('Expecting function got: ' + callback);
  1731. }
  1732. var _callback = this._zoneDelegate.intercept(this, callback, source);
  1733. var zone = this;
  1734. return function () {
  1735. return zone.runGuarded(_callback, this, arguments, source);
  1736. };
  1737. };
  1738. Zone.prototype.run = function (callback, applyThis, applyArgs, source) {
  1739. if (applyThis === void 0) { applyThis = undefined; }
  1740. if (applyArgs === void 0) { applyArgs = null; }
  1741. if (source === void 0) { source = null; }
  1742. _currentZoneFrame = { parent: _currentZoneFrame, zone: this };
  1743. try {
  1744. return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
  1745. }
  1746. finally {
  1747. _currentZoneFrame = _currentZoneFrame.parent;
  1748. }
  1749. };
  1750. Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {
  1751. if (applyThis === void 0) { applyThis = null; }
  1752. if (applyArgs === void 0) { applyArgs = null; }
  1753. if (source === void 0) { source = null; }
  1754. _currentZoneFrame = { parent: _currentZoneFrame, zone: this };
  1755. try {
  1756. try {
  1757. return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
  1758. }
  1759. catch (error) {
  1760. if (this._zoneDelegate.handleError(this, error)) {
  1761. throw error;
  1762. }
  1763. }
  1764. }
  1765. finally {
  1766. _currentZoneFrame = _currentZoneFrame.parent;
  1767. }
  1768. };
  1769. Zone.prototype.runTask = function (task, applyThis, applyArgs) {
  1770. if (task.zone != this) {
  1771. throw new Error('A task can only be run in the zone of creation! (Creation: ' +
  1772. (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
  1773. }
  1774. // https://github.com/angular/zone.js/issues/778, sometimes eventTask
  1775. // will run in notScheduled(canceled) state, we should not try to
  1776. // run such kind of task but just return
  1777. // we have to define an variable here, if not
  1778. // typescript compiler will complain below
  1779. var isNotScheduled = task.state === notScheduled;
  1780. if (isNotScheduled && task.type === eventTask) {
  1781. return;
  1782. }
  1783. var reEntryGuard = task.state != running;
  1784. reEntryGuard && task._transitionTo(running, scheduled);
  1785. task.runCount++;
  1786. var previousTask = _currentTask;
  1787. _currentTask = task;
  1788. _currentZoneFrame = { parent: _currentZoneFrame, zone: this };
  1789. try {
  1790. if (task.type == macroTask && task.data && !task.data.isPeriodic) {
  1791. task.cancelFn = null;
  1792. }
  1793. try {
  1794. return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
  1795. }
  1796. catch (error) {
  1797. if (this._zoneDelegate.handleError(this, error)) {
  1798. throw error;
  1799. }
  1800. }
  1801. }
  1802. finally {
  1803. // if the task's state is notScheduled or unknown, then it has already been cancelled
  1804. // we should not reset the state to scheduled
  1805. if (task.state !== notScheduled && task.state !== unknown) {
  1806. if (task.type == eventTask || (task.data && task.data.isPeriodic)) {
  1807. reEntryGuard && task._transitionTo(scheduled, running);
  1808. }
  1809. else {
  1810. task.runCount = 0;
  1811. this._updateTaskCount(task, -1);
  1812. reEntryGuard &&
  1813. task._transitionTo(notScheduled, running, notScheduled);
  1814. }
  1815. }
  1816. _currentZoneFrame = _currentZoneFrame.parent;
  1817. _currentTask = previousTask;
  1818. }
  1819. };
  1820. Zone.prototype.scheduleTask = function (task) {
  1821. if (task.zone && task.zone !== this) {
  1822. // check if the task was rescheduled, the newZone
  1823. // should not be the children of the original zone
  1824. var newZone = this;
  1825. while (newZone) {
  1826. if (newZone === task.zone) {
  1827. throw Error("can not reschedule task to " + this
  1828. .name + " which is descendants of the original zone " + task.zone.name);
  1829. }
  1830. newZone = newZone.parent;
  1831. }
  1832. }
  1833. task._transitionTo(scheduling, notScheduled);
  1834. var zoneDelegates = [];
  1835. task._zoneDelegates = zoneDelegates;
  1836. task._zone = this;
  1837. try {
  1838. task = this._zoneDelegate.scheduleTask(this, task);
  1839. }
  1840. catch (err) {
  1841. // should set task's state to unknown when scheduleTask throw error
  1842. // because the err may from reschedule, so the fromState maybe notScheduled
  1843. task._transitionTo(unknown, scheduling, notScheduled);
  1844. // TODO: @JiaLiPassion, should we check the result from handleError?
  1845. this._zoneDelegate.handleError(this, err);
  1846. throw err;
  1847. }
  1848. if (task._zoneDelegates === zoneDelegates) {
  1849. // we have to check because internally the delegate can reschedule the task.
  1850. this._updateTaskCount(task, 1);
  1851. }
  1852. if (task.state == scheduling) {
  1853. task._transitionTo(scheduled, scheduling);
  1854. }
  1855. return task;
  1856. };
  1857. Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {
  1858. return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, null));
  1859. };
  1860. Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {
  1861. return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));
  1862. };
  1863. Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {
  1864. return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));
  1865. };
  1866. Zone.prototype.cancelTask = function (task) {
  1867. if (task.zone != this)
  1868. throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +
  1869. (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');
  1870. task._transitionTo(canceling, scheduled, running);
  1871. try {
  1872. this._zoneDelegate.cancelTask(this, task);
  1873. }
  1874. catch (err) {
  1875. // if error occurs when cancelTask, transit the state to unknown
  1876. task._transitionTo(unknown, canceling);
  1877. this._zoneDelegate.handleError(this, err);
  1878. throw err;
  1879. }
  1880. this._updateTaskCount(task, -1);
  1881. task._transitionTo(notScheduled, canceling);
  1882. task.runCount = 0;
  1883. return task;
  1884. };
  1885. Zone.prototype._updateTaskCount = function (task, count) {
  1886. var zoneDelegates = task._zoneDelegates;
  1887. if (count == -1) {
  1888. task._zoneDelegates = null;
  1889. }
  1890. for (var i = 0; i < zoneDelegates.length; i++) {
  1891. zoneDelegates[i]._updateTaskCount(task.type, count);
  1892. }
  1893. };
  1894. return Zone;
  1895. }());
  1896. Zone.__symbol__ = __symbol__;
  1897. var DELEGATE_ZS = {
  1898. name: '',
  1899. onHasTask: function (delegate, _, target, hasTaskState) {
  1900. return delegate.hasTask(target, hasTaskState);
  1901. },
  1902. onScheduleTask: function (delegate, _, target, task) {
  1903. return delegate.scheduleTask(target, task);
  1904. },
  1905. onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); },
  1906. onCancelTask: function (delegate, _, target, task) {
  1907. return delegate.cancelTask(target, task);
  1908. }
  1909. };
  1910. var ZoneDelegate = (function () {
  1911. function ZoneDelegate(zone, parentDelegate, zoneSpec) {
  1912. this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };
  1913. this.zone = zone;
  1914. this._parentDelegate = parentDelegate;
  1915. this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);
  1916. this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
  1917. this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate.zone);
  1918. this._interceptZS =
  1919. zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
  1920. this._interceptDlgt =
  1921. zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);
  1922. this._interceptCurrZone =
  1923. zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate.zone);
  1924. this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
  1925. this._invokeDlgt =
  1926. zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);
  1927. this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate.zone);
  1928. this._handleErrorZS =
  1929. zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);
  1930. this._handleErrorDlgt =
  1931. zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);
  1932. this._handleErrorCurrZone =
  1933. zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate.zone);
  1934. this._scheduleTaskZS =
  1935. zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);
  1936. this._scheduleTaskDlgt =
  1937. zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);
  1938. this._scheduleTaskCurrZone =
  1939. zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate.zone);
  1940. this._invokeTaskZS =
  1941. zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);
  1942. this._invokeTaskDlgt =
  1943. zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);
  1944. this._invokeTaskCurrZone =
  1945. zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate.zone);
  1946. this._cancelTaskZS =
  1947. zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);
  1948. this._cancelTaskDlgt =
  1949. zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);
  1950. this._cancelTaskCurrZone =
  1951. zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate.zone);
  1952. this._hasTaskZS = null;
  1953. this._hasTaskDlgt = null;
  1954. this._hasTaskDlgtOwner = null;
  1955. this._hasTaskCurrZone = null;
  1956. var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;
  1957. var parentHasTask = parentDelegate && parentDelegate._hasTaskZS;
  1958. if (zoneSpecHasTask || parentHasTask) {
  1959. // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such
  1960. // a case all task related interceptors must go through this ZD. We can't short circuit it.
  1961. this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;
  1962. this._hasTaskDlgt = parentDelegate;
  1963. this._hasTaskDlgtOwner = this;
  1964. this._hasTaskCurrZone = zone;
  1965. if (!zoneSpec.onScheduleTask) {
  1966. this._scheduleTaskZS = DELEGATE_ZS;
  1967. this._scheduleTaskDlgt = parentDelegate;
  1968. this._scheduleTaskCurrZone = this.zone;
  1969. }
  1970. if (!zoneSpec.onInvokeTask) {
  1971. this._invokeTaskZS = DELEGATE_ZS;
  1972. this._invokeTaskDlgt = parentDelegate;
  1973. this._invokeTaskCurrZone = this.zone;
  1974. }
  1975. if (!zoneSpec.onCancelTask) {
  1976. this._cancelTaskZS = DELEGATE_ZS;
  1977. this._cancelTaskDlgt = parentDelegate;
  1978. this._cancelTaskCurrZone = this.zone;
  1979. }
  1980. }
  1981. }
  1982. ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {
  1983. return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :
  1984. new Zone(targetZone, zoneSpec);
  1985. };
  1986. ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {
  1987. return this._interceptZS ?
  1988. this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :
  1989. callback;
  1990. };
  1991. ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {
  1992. return this._invokeZS ?
  1993. this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :
  1994. callback.apply(applyThis, applyArgs);
  1995. };
  1996. ZoneDelegate.prototype.handleError = function (targetZone, error) {
  1997. return this._handleErrorZS ?
  1998. this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :
  1999. true;
  2000. };
  2001. ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {
  2002. var returnTask = task;
  2003. if (this._scheduleTaskZS) {
  2004. if (this._hasTaskZS) {
  2005. returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);
  2006. }
  2007. returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);
  2008. if (!returnTask)
  2009. returnTask = task;
  2010. }
  2011. else {
  2012. if (task.scheduleFn) {
  2013. task.scheduleFn(task);
  2014. }
  2015. else if (task.type == microTask) {
  2016. scheduleMicroTask(task);
  2017. }
  2018. else {
  2019. throw new Error('Task is missing scheduleFn.');
  2020. }
  2021. }
  2022. return returnTask;
  2023. };
  2024. ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {
  2025. return this._invokeTaskZS ?
  2026. this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :
  2027. task.callback.apply(applyThis, applyArgs);
  2028. };
  2029. ZoneDelegate.prototype.cancelTask = function (targetZone, task) {
  2030. var value;
  2031. if (this._cancelTaskZS) {
  2032. value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);
  2033. }
  2034. else {
  2035. if (!task.cancelFn) {
  2036. throw Error('Task is not cancelable');
  2037. }
  2038. value = task.cancelFn(task);
  2039. }
  2040. return value;
  2041. };
  2042. ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
  2043. // hasTask should not throw error so other ZoneDelegate
  2044. // can still trigger hasTask callback
  2045. try {
  2046. return this._hasTaskZS &&
  2047. this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
  2048. }
  2049. catch (err) {
  2050. this.handleError(targetZone, err);
  2051. }
  2052. };
  2053. ZoneDelegate.prototype._updateTaskCount = function (type, count) {
  2054. var counts = this._taskCounts;
  2055. var prev = counts[type];
  2056. var next = counts[type] = prev + count;
  2057. if (next < 0) {
  2058. throw new Error('More tasks executed then were scheduled.');
  2059. }
  2060. if (prev == 0 || next == 0) {
  2061. var isEmpty = {
  2062. microTask: counts['microTask'] > 0,
  2063. macroTask: counts['macroTask'] > 0,
  2064. eventTask: counts['eventTask'] > 0,
  2065. change: type
  2066. };
  2067. this.hasTask(this.zone, isEmpty);
  2068. }
  2069. };
  2070. return ZoneDelegate;
  2071. }());
  2072. var ZoneTask = (function () {
  2073. function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) {
  2074. this._zone = null;
  2075. this.runCount = 0;
  2076. this._zoneDelegates = null;
  2077. this._state = 'notScheduled';
  2078. this.type = type;
  2079. this.source = source;
  2080. this.data = options;
  2081. this.scheduleFn = scheduleFn;
  2082. this.cancelFn = cancelFn;
  2083. this.callback = callback;
  2084. var self = this;
  2085. // TODO: @JiaLiPassion options should have interface
  2086. if (type === eventTask && options && options.useG) {
  2087. this.invoke = ZoneTask.invokeTask;
  2088. }
  2089. else {
  2090. this.invoke = function () {
  2091. return ZoneTask.invokeTask.call(global, self, this, arguments);
  2092. };
  2093. }
  2094. }
  2095. ZoneTask.invokeTask = function (task, target, args) {
  2096. if (!task) {
  2097. task = this;
  2098. }
  2099. _numberOfNestedTaskFrames++;
  2100. try {
  2101. task.runCount++;
  2102. return task.zone.runTask(task, target, args);
  2103. }
  2104. finally {
  2105. if (_numberOfNestedTaskFrames == 1) {
  2106. drainMicroTaskQueue();
  2107. }
  2108. _numberOfNestedTaskFrames--;
  2109. }
  2110. };
  2111. Object.defineProperty(ZoneTask.prototype, "zone", {
  2112. get: function () {
  2113. return this._zone;
  2114. },
  2115. enumerable: true,
  2116. configurable: true
  2117. });
  2118. Object.defineProperty(ZoneTask.prototype, "state", {
  2119. get: function () {
  2120. return this._state;
  2121. },
  2122. enumerable: true,
  2123. configurable: true
  2124. });
  2125. ZoneTask.prototype.cancelScheduleRequest = function () {
  2126. this._transitionTo(notScheduled, scheduling);
  2127. };
  2128. ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) {
  2129. if (this._state === fromState1 || this._state === fromState2) {
  2130. this._state = toState;
  2131. if (toState == notScheduled) {
  2132. this._zoneDelegates = null;
  2133. }
  2134. }
  2135. else {
  2136. throw new Error(this.type + " '" + this.source + "': can not transition to '" + toState + "', expecting state '" + fromState1 + "'" + (fromState2 ?
  2137. ' or \'' + fromState2 + '\'' :
  2138. '') + ", was '" + this._state + "'.");
  2139. }
  2140. };
  2141. ZoneTask.prototype.toString = function () {
  2142. if (this.data && typeof this.data.handleId !== 'undefined') {
  2143. return this.data.handleId;
  2144. }
  2145. else {
  2146. return Object.prototype.toString.call(this);
  2147. }
  2148. };
  2149. // add toJSON method to prevent cyclic error when
  2150. // call JSON.stringify(zoneTask)
  2151. ZoneTask.prototype.toJSON = function () {
  2152. return {
  2153. type: this.type,
  2154. state: this.state,
  2155. source: this.source,
  2156. zone: this.zone.name,
  2157. runCount: this.runCount
  2158. };
  2159. };
  2160. return ZoneTask;
  2161. }());
  2162. //////////////////////////////////////////////////////
  2163. //////////////////////////////////////////////////////
  2164. /// MICROTASK QUEUE
  2165. //////////////////////////////////////////////////////
  2166. //////////////////////////////////////////////////////
  2167. var symbolSetTimeout = __symbol__('setTimeout');
  2168. var symbolPromise = __symbol__('Promise');
  2169. var symbolThen = __symbol__('then');
  2170. var _microTaskQueue = [];
  2171. var _isDrainingMicrotaskQueue = false;
  2172. var nativeMicroTaskQueuePromise;
  2173. function scheduleMicroTask(task) {
  2174. // if we are not running in any task, and there has not been anything scheduled
  2175. // we must bootstrap the initial task creation by manually scheduling the drain
  2176. if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {
  2177. // We are not running in Task, so we need to kickstart the microtask queue.
  2178. if (!nativeMicroTaskQueuePromise) {
  2179. if (global[symbolPromise]) {
  2180. nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);
  2181. }
  2182. }
  2183. if (nativeMicroTaskQueuePromise) {
  2184. nativeMicroTaskQueuePromise[symbolThen](drainMicroTaskQueue);
  2185. }
  2186. else {
  2187. global[symbolSetTimeout](drainMicroTaskQueue, 0);
  2188. }
  2189. }
  2190. task && _microTaskQueue.push(task);
  2191. }
  2192. function drainMicroTaskQueue() {
  2193. if (!_isDrainingMicrotaskQueue) {
  2194. _isDrainingMicrotaskQueue = true;
  2195. while (_microTaskQueue.length) {
  2196. var queue = _microTaskQueue;
  2197. _microTaskQueue = [];
  2198. for (var i = 0; i < queue.length; i++) {
  2199. var task = queue[i];
  2200. try {
  2201. task.zone.runTask(task, null, null);
  2202. }
  2203. catch (error) {
  2204. _api.onUnhandledError(error);
  2205. }
  2206. }
  2207. }
  2208. _api.microtaskDrainDone();
  2209. _isDrainingMicrotaskQueue = false;
  2210. }
  2211. }
  2212. //////////////////////////////////////////////////////
  2213. //////////////////////////////////////////////////////
  2214. /// BOOTSTRAP
  2215. //////////////////////////////////////////////////////
  2216. //////////////////////////////////////////////////////
  2217. var NO_ZONE = { name: 'NO ZONE' };
  2218. var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';
  2219. var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';
  2220. var patches = {};
  2221. var _api = {
  2222. symbol: __symbol__,
  2223. currentZoneFrame: function () { return _currentZoneFrame; },
  2224. onUnhandledError: noop,
  2225. microtaskDrainDone: noop,
  2226. scheduleMicroTask: scheduleMicroTask,
  2227. showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; },
  2228. patchEventTarget: function () { return []; },
  2229. patchOnProperties: noop,
  2230. patchMethod: function () { return noop; },
  2231. bindArguments: function () { return null; },
  2232. setNativePromise: function (NativePromise) {
  2233. // sometimes NativePromise.resolve static function
  2234. // is not ready yet, (such as core-js/es6.promise)
  2235. // so we need to check here.
  2236. if (NativePromise && typeof NativePromise.resolve === FUNCTION) {
  2237. nativeMicroTaskQueuePromise = NativePromise.resolve(0);
  2238. }
  2239. },
  2240. };
  2241. var _currentZoneFrame = { parent: null, zone: new Zone(null, null) };
  2242. var _currentTask = null;
  2243. var _numberOfNestedTaskFrames = 0;
  2244. function noop() { }
  2245. function __symbol__(name) {
  2246. return '__zone_symbol__' + name;
  2247. }
  2248. performanceMeasure('Zone', 'Zone');
  2249. return global['Zone'] = Zone;
  2250. })(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);
  2251. /**
  2252. * @license
  2253. * Copyright Google Inc. All Rights Reserved.
  2254. *
  2255. * Use of this source code is governed by an MIT-style license that can be
  2256. * found in the LICENSE file at https://angular.io/license
  2257. */
  2258. Zone.__load_patch('ZoneAwarePromise', function (global, Zone, api) {
  2259. var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2260. var ObjectDefineProperty = Object.defineProperty;
  2261. function readableObjectToString(obj) {
  2262. if (obj && obj.toString === Object.prototype.toString) {
  2263. var className = obj.constructor && obj.constructor.name;
  2264. return (className ? className : '') + ': ' + JSON.stringify(obj);
  2265. }
  2266. return obj ? obj.toString() : Object.prototype.toString.call(obj);
  2267. }
  2268. var __symbol__ = api.symbol;
  2269. var _uncaughtPromiseErrors = [];
  2270. var symbolPromise = __symbol__('Promise');
  2271. var symbolThen = __symbol__('then');
  2272. var creationTrace = '__creationTrace__';
  2273. api.onUnhandledError = function (e) {
  2274. if (api.showUncaughtError()) {
  2275. var rejection = e && e.rejection;
  2276. if (rejection) {
  2277. console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);
  2278. }
  2279. else {
  2280. console.error(e);
  2281. }
  2282. }
  2283. };
  2284. api.microtaskDrainDone = function () {
  2285. while (_uncaughtPromiseErrors.length) {
  2286. var _loop_1 = function () {
  2287. var uncaughtPromiseError = _uncaughtPromiseErrors.shift();
  2288. try {
  2289. uncaughtPromiseError.zone.runGuarded(function () {
  2290. throw uncaughtPromiseError;
  2291. });
  2292. }
  2293. catch (error) {
  2294. handleUnhandledRejection(error);
  2295. }
  2296. };
  2297. while (_uncaughtPromiseErrors.length) {
  2298. _loop_1();
  2299. }
  2300. }
  2301. };
  2302. var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');
  2303. function handleUnhandledRejection(e) {
  2304. api.onUnhandledError(e);
  2305. try {
  2306. var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];
  2307. if (handler && typeof handler === 'function') {
  2308. handler.call(this, e);
  2309. }
  2310. }
  2311. catch (err) {
  2312. }
  2313. }
  2314. function isThenable(value) {
  2315. return value && value.then;
  2316. }
  2317. function forwardResolution(value) {
  2318. return value;
  2319. }
  2320. function forwardRejection(rejection) {
  2321. return ZoneAwarePromise.reject(rejection);
  2322. }
  2323. var symbolState = __symbol__('state');
  2324. var symbolValue = __symbol__('value');
  2325. var source = 'Promise.then';
  2326. var UNRESOLVED = null;
  2327. var RESOLVED = true;
  2328. var REJECTED = false;
  2329. var REJECTED_NO_CATCH = 0;
  2330. function makeResolver(promise, state) {
  2331. return function (v) {
  2332. try {
  2333. resolvePromise(promise, state, v);
  2334. }
  2335. catch (err) {
  2336. resolvePromise(promise, false, err);
  2337. }
  2338. // Do not return value or you will break the Promise spec.
  2339. };
  2340. }
  2341. var once = function () {
  2342. var wasCalled = false;
  2343. return function wrapper(wrappedFunction) {
  2344. return function () {
  2345. if (wasCalled) {
  2346. return;
  2347. }
  2348. wasCalled = true;
  2349. wrappedFunction.apply(null, arguments);
  2350. };
  2351. };
  2352. };
  2353. var TYPE_ERROR = 'Promise resolved with itself';
  2354. var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');
  2355. // Promise Resolution
  2356. function resolvePromise(promise, state, value) {
  2357. var onceWrapper = once();
  2358. if (promise === value) {
  2359. throw new TypeError(TYPE_ERROR);
  2360. }
  2361. if (promise[symbolState] === UNRESOLVED) {
  2362. // should only get value.then once based on promise spec.
  2363. var then = null;
  2364. try {
  2365. if (typeof value === 'object' || typeof value === 'function') {
  2366. then = value && value.then;
  2367. }
  2368. }
  2369. catch (err) {
  2370. onceWrapper(function () {
  2371. resolvePromise(promise, false, err);
  2372. })();
  2373. return promise;
  2374. }
  2375. // if (value instanceof ZoneAwarePromise) {
  2376. if (state !== REJECTED && value instanceof ZoneAwarePromise &&
  2377. value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&
  2378. value[symbolState] !== UNRESOLVED) {
  2379. clearRejectedNoCatch(value);
  2380. resolvePromise(promise, value[symbolState], value[symbolValue]);
  2381. }
  2382. else if (state !== REJECTED && typeof then === 'function') {
  2383. try {
  2384. then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));
  2385. }
  2386. catch (err) {
  2387. onceWrapper(function () {
  2388. resolvePromise(promise, false, err);
  2389. })();
  2390. }
  2391. }
  2392. else {
  2393. promise[symbolState] = state;
  2394. var queue = promise[symbolValue];
  2395. promise[symbolValue] = value;
  2396. // record task information in value when error occurs, so we can
  2397. // do some additional work such as render longStackTrace
  2398. if (state === REJECTED && value instanceof Error) {
  2399. // check if longStackTraceZone is here
  2400. var trace = Zone.currentTask && Zone.currentTask.data &&
  2401. Zone.currentTask.data[creationTrace];
  2402. if (trace) {
  2403. // only keep the long stack trace into error when in longStackTraceZone
  2404. ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });
  2405. }
  2406. }
  2407. for (var i = 0; i < queue.length;) {
  2408. scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
  2409. }
  2410. if (queue.length == 0 && state == REJECTED) {
  2411. promise[symbolState] = REJECTED_NO_CATCH;
  2412. try {
  2413. // try to print more readable error log
  2414. throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +
  2415. (value && value.stack ? '\n' + value.stack : ''));
  2416. }
  2417. catch (err) {
  2418. var error_1 = err;
  2419. error_1.rejection = value;
  2420. error_1.promise = promise;
  2421. error_1.zone = Zone.current;
  2422. error_1.task = Zone.currentTask;
  2423. _uncaughtPromiseErrors.push(error_1);
  2424. api.scheduleMicroTask(); // to make sure that it is running
  2425. }
  2426. }
  2427. }
  2428. }
  2429. // Resolving an already resolved promise is a noop.
  2430. return promise;
  2431. }
  2432. var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');
  2433. function clearRejectedNoCatch(promise) {
  2434. if (promise[symbolState] === REJECTED_NO_CATCH) {
  2435. // if the promise is rejected no catch status
  2436. // and queue.length > 0, means there is a error handler
  2437. // here to handle the rejected promise, we should trigger
  2438. // windows.rejectionhandled eventHandler or nodejs rejectionHandled
  2439. // eventHandler
  2440. try {
  2441. var handler = Zone[REJECTION_HANDLED_HANDLER];
  2442. if (handler && typeof handler === 'function') {
  2443. handler.call(this, { rejection: promise[symbolValue], promise: promise });
  2444. }
  2445. }
  2446. catch (err) {
  2447. }
  2448. promise[symbolState] = REJECTED;
  2449. for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {
  2450. if (promise === _uncaughtPromiseErrors[i].promise) {
  2451. _uncaughtPromiseErrors.splice(i, 1);
  2452. }
  2453. }
  2454. }
  2455. }
  2456. function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {
  2457. clearRejectedNoCatch(promise);
  2458. var delegate = promise[symbolState] ?
  2459. (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :
  2460. (typeof onRejected === 'function') ? onRejected : forwardRejection;
  2461. zone.scheduleMicroTask(source, function () {
  2462. try {
  2463. resolvePromise(chainPromise, true, zone.run(delegate, undefined, [promise[symbolValue]]));
  2464. }
  2465. catch (error) {
  2466. resolvePromise(chainPromise, false, error);
  2467. }
  2468. });
  2469. }
  2470. var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';
  2471. var ZoneAwarePromise = (function () {
  2472. function ZoneAwarePromise(executor) {
  2473. var promise = this;
  2474. if (!(promise instanceof ZoneAwarePromise)) {
  2475. throw new Error('Must be an instanceof Promise.');
  2476. }
  2477. promise[symbolState] = UNRESOLVED;
  2478. promise[symbolValue] = []; // queue;
  2479. try {
  2480. executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));
  2481. }
  2482. catch (error) {
  2483. resolvePromise(promise, false, error);
  2484. }
  2485. }
  2486. ZoneAwarePromise.toString = function () {
  2487. return ZONE_AWARE_PROMISE_TO_STRING;
  2488. };
  2489. ZoneAwarePromise.resolve = function (value) {
  2490. return resolvePromise(new this(null), RESOLVED, value);
  2491. };
  2492. ZoneAwarePromise.reject = function (error) {
  2493. return resolvePromise(new this(null), REJECTED, error);
  2494. };
  2495. ZoneAwarePromise.race = function (values) {
  2496. var resolve;
  2497. var reject;
  2498. var promise = new this(function (res, rej) {
  2499. resolve = res;
  2500. reject = rej;
  2501. });
  2502. function onResolve(value) {
  2503. promise && (promise = null || resolve(value));
  2504. }
  2505. function onReject(error) {
  2506. promise && (promise = null || reject(error));
  2507. }
  2508. for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
  2509. var value = values_1[_i];
  2510. if (!isThenable(value)) {
  2511. value = this.resolve(value);
  2512. }
  2513. value.then(onResolve, onReject);
  2514. }
  2515. return promise;
  2516. };
  2517. ZoneAwarePromise.all = function (values) {
  2518. var resolve;
  2519. var reject;
  2520. var promise = new this(function (res, rej) {
  2521. resolve = res;
  2522. reject = rej;
  2523. });
  2524. var count = 0;
  2525. var resolvedValues = [];
  2526. for (var _i = 0, values_2 = values; _i < values_2.length; _i++) {
  2527. var value = values_2[_i];
  2528. if (!isThenable(value)) {
  2529. value = this.resolve(value);
  2530. }
  2531. value.then((function (index) { return function (value) {
  2532. resolvedValues[index] = value;
  2533. count--;
  2534. if (!count) {
  2535. resolve(resolvedValues);
  2536. }
  2537. }; })(count), reject);
  2538. count++;
  2539. }
  2540. if (!count)
  2541. resolve(resolvedValues);
  2542. return promise;
  2543. };
  2544. ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {
  2545. var chainPromise = new this.constructor(null);
  2546. var zone = Zone.current;
  2547. if (this[symbolState] == UNRESOLVED) {
  2548. this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);
  2549. }
  2550. else {
  2551. scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);
  2552. }
  2553. return chainPromise;
  2554. };
  2555. ZoneAwarePromise.prototype.catch = function (onRejected) {
  2556. return this.then(null, onRejected);
  2557. };
  2558. return ZoneAwarePromise;
  2559. }());
  2560. // Protect against aggressive optimizers dropping seemingly unused properties.
  2561. // E.g. Closure Compiler in advanced mode.
  2562. ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;
  2563. ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;
  2564. ZoneAwarePromise['race'] = ZoneAwarePromise.race;
  2565. ZoneAwarePromise['all'] = ZoneAwarePromise.all;
  2566. var NativePromise = global[symbolPromise] = global['Promise'];
  2567. var ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise');
  2568. var desc = ObjectGetOwnPropertyDescriptor(global, 'Promise');
  2569. if (!desc || desc.configurable) {
  2570. desc && delete desc.writable;
  2571. desc && delete desc.value;
  2572. if (!desc) {
  2573. desc = { configurable: true, enumerable: true };
  2574. }
  2575. desc.get = function () {
  2576. // if we already set ZoneAwarePromise, use patched one
  2577. // otherwise return native one.
  2578. return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise];
  2579. };
  2580. desc.set = function (NewNativePromise) {
  2581. if (NewNativePromise === ZoneAwarePromise) {
  2582. // if the NewNativePromise is ZoneAwarePromise
  2583. // save to global
  2584. global[ZONE_AWARE_PROMISE] = NewNativePromise;
  2585. }
  2586. else {
  2587. // if the NewNativePromise is not ZoneAwarePromise
  2588. // for example: after load zone.js, some library just
  2589. // set es6-promise to global, if we set it to global
  2590. // directly, assertZonePatched will fail and angular
  2591. // will not loaded, so we just set the NewNativePromise
  2592. // to global[symbolPromise], so the result is just like
  2593. // we load ES6 Promise before zone.js
  2594. global[symbolPromise] = NewNativePromise;
  2595. if (!NewNativePromise.prototype[symbolThen]) {
  2596. patchThen(NewNativePromise);
  2597. }
  2598. api.setNativePromise(NewNativePromise);
  2599. }
  2600. };
  2601. ObjectDefineProperty(global, 'Promise', desc);
  2602. }
  2603. global['Promise'] = ZoneAwarePromise;
  2604. var symbolThenPatched = __symbol__('thenPatched');
  2605. function patchThen(Ctor) {
  2606. var proto = Ctor.prototype;
  2607. var originalThen = proto.then;
  2608. // Keep a reference to the original method.
  2609. proto[symbolThen] = originalThen;
  2610. // check Ctor.prototype.then propertyDescriptor is writable or not
  2611. // in meteor env, writable is false, we have to make it to be true.
  2612. var prop = ObjectGetOwnPropertyDescriptor(Ctor.prototype, 'then');
  2613. if (prop && prop.writable === false && prop.configurable) {
  2614. ObjectDefineProperty(Ctor.prototype, 'then', { writable: true });
  2615. }
  2616. Ctor.prototype.then = function (onResolve, onReject) {
  2617. var _this = this;
  2618. var wrapped = new ZoneAwarePromise(function (resolve, reject) {
  2619. originalThen.call(_this, resolve, reject);
  2620. });
  2621. return wrapped.then(onResolve, onReject);
  2622. };
  2623. Ctor[symbolThenPatched] = true;
  2624. }
  2625. function zoneify(fn) {
  2626. return function () {
  2627. var resultPromise = fn.apply(this, arguments);
  2628. if (resultPromise instanceof ZoneAwarePromise) {
  2629. return resultPromise;
  2630. }
  2631. var ctor = resultPromise.constructor;
  2632. if (!ctor[symbolThenPatched]) {
  2633. patchThen(ctor);
  2634. }
  2635. return resultPromise;
  2636. };
  2637. }
  2638. if (NativePromise) {
  2639. patchThen(NativePromise);
  2640. var fetch_1 = global['fetch'];
  2641. if (typeof fetch_1 == 'function') {
  2642. global['fetch'] = zoneify(fetch_1);
  2643. }
  2644. }
  2645. // This is not part of public API, but it is useful for tests, so we expose it.
  2646. Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;
  2647. return ZoneAwarePromise;
  2648. });
  2649. /**
  2650. * @license
  2651. * Copyright Google Inc. All Rights Reserved.
  2652. *
  2653. * Use of this source code is governed by an MIT-style license that can be
  2654. * found in the LICENSE file at https://angular.io/license
  2655. */
  2656. /**
  2657. * Suppress closure compiler errors about unknown 'Zone' variable
  2658. * @fileoverview
  2659. * @suppress {undefinedVars,globalThis,missingRequire}
  2660. */
  2661. // issue #989, to reduce bundle size, use short name
  2662. /** Object.getOwnPropertyDescriptor */
  2663. /**
  2664. * @license
  2665. * Copyright Google Inc. All Rights Reserved.
  2666. *
  2667. * Use of this source code is governed by an MIT-style license that can be
  2668. * found in the LICENSE file at https://angular.io/license
  2669. */ var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2670. /** Object.defineProperty */
  2671. var ObjectDefineProperty = Object.defineProperty;
  2672. /** Object.getPrototypeOf */
  2673. var ObjectGetPrototypeOf = Object.getPrototypeOf;
  2674. /** Object.create */
  2675. var ObjectCreate = Object.create;
  2676. /** Array.prototype.slice */
  2677. var ArraySlice = Array.prototype.slice;
  2678. /** addEventListener string const */
  2679. var ADD_EVENT_LISTENER_STR = 'addEventListener';
  2680. /** removeEventListener string const */
  2681. var REMOVE_EVENT_LISTENER_STR = 'removeEventListener';
  2682. /** zoneSymbol addEventListener */
  2683. var ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);
  2684. /** zoneSymbol removeEventListener */
  2685. var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);
  2686. /** true string const */
  2687. var TRUE_STR = 'true';
  2688. /** false string const */
  2689. var FALSE_STR = 'false';
  2690. /** __zone_symbol__ string const */
  2691. var ZONE_SYMBOL_PREFIX = '__zone_symbol__';
  2692. function wrapWithCurrentZone(callback, source) {
  2693. return Zone.current.wrap(callback, source);
  2694. }
  2695. function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {
  2696. return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);
  2697. }
  2698. var zoneSymbol = Zone.__symbol__;
  2699. var isWindowExists = typeof window !== 'undefined';
  2700. var internalWindow = isWindowExists ? window : undefined;
  2701. var _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;
  2702. var REMOVE_ATTRIBUTE = 'removeAttribute';
  2703. var NULL_ON_PROP_VALUE = [null];
  2704. function bindArguments(args, source) {
  2705. for (var i = args.length - 1; i >= 0; i--) {
  2706. if (typeof args[i] === 'function') {
  2707. args[i] = wrapWithCurrentZone(args[i], source + '_' + i);
  2708. }
  2709. }
  2710. return args;
  2711. }
  2712. function patchPrototype(prototype, fnNames) {
  2713. var source = prototype.constructor['name'];
  2714. var _loop_1 = function (i) {
  2715. var name_1 = fnNames[i];
  2716. var delegate = prototype[name_1];
  2717. if (delegate) {
  2718. var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1);
  2719. if (!isPropertyWritable(prototypeDesc)) {
  2720. return "continue";
  2721. }
  2722. prototype[name_1] = (function (delegate) {
  2723. var patched = function () {
  2724. return delegate.apply(this, bindArguments(arguments, source + '.' + name_1));
  2725. };
  2726. attachOriginToPatched(patched, delegate);
  2727. return patched;
  2728. })(delegate);
  2729. }
  2730. };
  2731. for (var i = 0; i < fnNames.length; i++) {
  2732. _loop_1(i);
  2733. }
  2734. }
  2735. function isPropertyWritable(propertyDesc) {
  2736. if (!propertyDesc) {
  2737. return true;
  2738. }
  2739. if (propertyDesc.writable === false) {
  2740. return false;
  2741. }
  2742. return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');
  2743. }
  2744. var isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);
  2745. // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
  2746. // this code.
  2747. var isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&
  2748. {}.toString.call(_global.process) === '[object process]');
  2749. var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);
  2750. // we are in electron of nw, so we are both browser and nodejs
  2751. // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
  2752. // this code.
  2753. var isMix = typeof _global.process !== 'undefined' &&
  2754. {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&
  2755. !!(isWindowExists && internalWindow['HTMLElement']);
  2756. var zoneSymbolEventNames = {};
  2757. var wrapFn = function (event) {
  2758. // https://github.com/angular/zone.js/issues/911, in IE, sometimes
  2759. // event will be undefined, so we need to use window.event
  2760. event = event || _global.event;
  2761. if (!event) {
  2762. return;
  2763. }
  2764. var eventNameSymbol = zoneSymbolEventNames[event.type];
  2765. if (!eventNameSymbol) {
  2766. eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);
  2767. }
  2768. var target = this || event.target || _global;
  2769. var listener = target[eventNameSymbol];
  2770. var result = listener && listener.apply(this, arguments);
  2771. if (result != undefined && !result) {
  2772. event.preventDefault();
  2773. }
  2774. return result;
  2775. };
  2776. function patchProperty(obj, prop, prototype) {
  2777. var desc = ObjectGetOwnPropertyDescriptor(obj, prop);
  2778. if (!desc && prototype) {
  2779. // when patch window object, use prototype to check prop exist or not
  2780. var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);
  2781. if (prototypeDesc) {
  2782. desc = { enumerable: true, configurable: true };
  2783. }
  2784. }
  2785. // if the descriptor not exists or is not configurable
  2786. // just return
  2787. if (!desc || !desc.configurable) {
  2788. return;
  2789. }
  2790. // A property descriptor cannot have getter/setter and be writable
  2791. // deleting the writable and value properties avoids this error:
  2792. //
  2793. // TypeError: property descriptors must not specify a value or be writable when a
  2794. // getter or setter has been specified
  2795. delete desc.writable;
  2796. delete desc.value;
  2797. var originalDescGet = desc.get;
  2798. var originalDescSet = desc.set;
  2799. // substr(2) cuz 'onclick' -> 'click', etc
  2800. var eventName = prop.substr(2);
  2801. var eventNameSymbol = zoneSymbolEventNames[eventName];
  2802. if (!eventNameSymbol) {
  2803. eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);
  2804. }
  2805. desc.set = function (newValue) {
  2806. // in some of windows's onproperty callback, this is undefined
  2807. // so we need to check it
  2808. var target = this;
  2809. if (!target && obj === _global) {
  2810. target = _global;
  2811. }
  2812. if (!target) {
  2813. return;
  2814. }
  2815. var previousValue = target[eventNameSymbol];
  2816. if (previousValue) {
  2817. target.removeEventListener(eventName, wrapFn);
  2818. }
  2819. // issue #978, when onload handler was added before loading zone.js
  2820. // we should remove it with originalDescSet
  2821. if (originalDescSet) {
  2822. originalDescSet.apply(target, NULL_ON_PROP_VALUE);
  2823. }
  2824. if (typeof newValue === 'function') {
  2825. target[eventNameSymbol] = newValue;
  2826. target.addEventListener(eventName, wrapFn, false);
  2827. }
  2828. else {
  2829. target[eventNameSymbol] = null;
  2830. }
  2831. };
  2832. // The getter would return undefined for unassigned properties but the default value of an
  2833. // unassigned property is null
  2834. desc.get = function () {
  2835. // in some of windows's onproperty callback, this is undefined
  2836. // so we need to check it
  2837. var target = this;
  2838. if (!target && obj === _global) {
  2839. target = _global;
  2840. }
  2841. if (!target) {
  2842. return null;
  2843. }
  2844. var listener = target[eventNameSymbol];
  2845. if (listener) {
  2846. return listener;
  2847. }
  2848. else if (originalDescGet) {
  2849. // result will be null when use inline event attribute,
  2850. // such as <button onclick="func();">OK</button>
  2851. // because the onclick function is internal raw uncompiled handler
  2852. // the onclick will be evaluated when first time event was triggered or
  2853. // the property is accessed, https://github.com/angular/zone.js/issues/525
  2854. // so we should use original native get to retrieve the handler
  2855. var value = originalDescGet && originalDescGet.call(this);
  2856. if (value) {
  2857. desc.set.call(this, value);
  2858. if (typeof target[REMOVE_ATTRIBUTE] === 'function') {
  2859. target.removeAttribute(prop);
  2860. }
  2861. return value;
  2862. }
  2863. }
  2864. return null;
  2865. };
  2866. ObjectDefineProperty(obj, prop, desc);
  2867. }
  2868. function patchOnProperties(obj, properties, prototype) {
  2869. if (properties) {
  2870. for (var i = 0; i < properties.length; i++) {
  2871. patchProperty(obj, 'on' + properties[i], prototype);
  2872. }
  2873. }
  2874. else {
  2875. var onProperties = [];
  2876. for (var prop in obj) {
  2877. if (prop.substr(0, 2) == 'on') {
  2878. onProperties.push(prop);
  2879. }
  2880. }
  2881. for (var j = 0; j < onProperties.length; j++) {
  2882. patchProperty(obj, onProperties[j], prototype);
  2883. }
  2884. }
  2885. }
  2886. var originalInstanceKey = zoneSymbol('originalInstance');
  2887. // wrap some native API on `window`
  2888. function patchClass(className) {
  2889. var OriginalClass = _global[className];
  2890. if (!OriginalClass)
  2891. return;
  2892. // keep original class in global
  2893. _global[zoneSymbol(className)] = OriginalClass;
  2894. _global[className] = function () {
  2895. var a = bindArguments(arguments, className);
  2896. switch (a.length) {
  2897. case 0:
  2898. this[originalInstanceKey] = new OriginalClass();
  2899. break;
  2900. case 1:
  2901. this[originalInstanceKey] = new OriginalClass(a[0]);
  2902. break;
  2903. case 2:
  2904. this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
  2905. break;
  2906. case 3:
  2907. this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
  2908. break;
  2909. case 4:
  2910. this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);
  2911. break;
  2912. default:
  2913. throw new Error('Arg list too long.');
  2914. }
  2915. };
  2916. // attach original delegate to patched function
  2917. attachOriginToPatched(_global[className], OriginalClass);
  2918. var instance = new OriginalClass(function () { });
  2919. var prop;
  2920. for (prop in instance) {
  2921. // https://bugs.webkit.org/show_bug.cgi?id=44721
  2922. if (className === 'XMLHttpRequest' && prop === 'responseBlob')
  2923. continue;
  2924. (function (prop) {
  2925. if (typeof instance[prop] === 'function') {
  2926. _global[className].prototype[prop] = function () {
  2927. return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
  2928. };
  2929. }
  2930. else {
  2931. ObjectDefineProperty(_global[className].prototype, prop, {
  2932. set: function (fn) {
  2933. if (typeof fn === 'function') {
  2934. this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);
  2935. // keep callback in wrapped function so we can
  2936. // use it in Function.prototype.toString to return
  2937. // the native one.
  2938. attachOriginToPatched(this[originalInstanceKey][prop], fn);
  2939. }
  2940. else {
  2941. this[originalInstanceKey][prop] = fn;
  2942. }
  2943. },
  2944. get: function () {
  2945. return this[originalInstanceKey][prop];
  2946. }
  2947. });
  2948. }
  2949. }(prop));
  2950. }
  2951. for (prop in OriginalClass) {
  2952. if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {
  2953. _global[className][prop] = OriginalClass[prop];
  2954. }
  2955. }
  2956. }
  2957. function patchMethod(target, name, patchFn) {
  2958. var proto = target;
  2959. while (proto && !proto.hasOwnProperty(name)) {
  2960. proto = ObjectGetPrototypeOf(proto);
  2961. }
  2962. if (!proto && target[name]) {
  2963. // somehow we did not find it, but we can see it. This happens on IE for Window properties.
  2964. proto = target;
  2965. }
  2966. var delegateName = zoneSymbol(name);
  2967. var delegate;
  2968. if (proto && !(delegate = proto[delegateName])) {
  2969. delegate = proto[delegateName] = proto[name];
  2970. // check whether proto[name] is writable
  2971. // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob
  2972. var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);
  2973. if (isPropertyWritable(desc)) {
  2974. var patchDelegate_1 = patchFn(delegate, delegateName, name);
  2975. proto[name] = function () {
  2976. return patchDelegate_1(this, arguments);
  2977. };
  2978. attachOriginToPatched(proto[name], delegate);
  2979. }
  2980. }
  2981. return delegate;
  2982. }
  2983. // TODO: @JiaLiPassion, support cancel task later if necessary
  2984. function patchMacroTask(obj, funcName, metaCreator) {
  2985. var setNative = null;
  2986. function scheduleTask(task) {
  2987. var data = task.data;
  2988. data.args[data.cbIdx] = function () {
  2989. task.invoke.apply(this, arguments);
  2990. };
  2991. setNative.apply(data.target, data.args);
  2992. return task;
  2993. }
  2994. setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) {
  2995. var meta = metaCreator(self, args);
  2996. if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {
  2997. return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask, null);
  2998. }
  2999. else {
  3000. // cause an error by calling it directly.
  3001. return delegate.apply(self, args);
  3002. }
  3003. }; });
  3004. }
  3005. function attachOriginToPatched(patched, original) {
  3006. patched[zoneSymbol('OriginalDelegate')] = original;
  3007. }
  3008. var isDetectedIEOrEdge = false;
  3009. var ieOrEdge = false;
  3010. function isIEOrEdge() {
  3011. if (isDetectedIEOrEdge) {
  3012. return ieOrEdge;
  3013. }
  3014. isDetectedIEOrEdge = true;
  3015. try {
  3016. var ua = internalWindow.navigator.userAgent;
  3017. if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {
  3018. ieOrEdge = true;
  3019. }
  3020. return ieOrEdge;
  3021. }
  3022. catch (error) {
  3023. }
  3024. }
  3025. /**
  3026. * @license
  3027. * Copyright Google Inc. All Rights Reserved.
  3028. *
  3029. * Use of this source code is governed by an MIT-style license that can be
  3030. * found in the LICENSE file at https://angular.io/license
  3031. */
  3032. // override Function.prototype.toString to make zone.js patched function
  3033. // look like native function
  3034. Zone.__load_patch('toString', function (global, Zone) {
  3035. // patch Func.prototype.toString to let them look like native
  3036. var originalFunctionToString = Zone['__zone_symbol__originalToString'] =
  3037. Function.prototype.toString;
  3038. var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');
  3039. var PROMISE_SYMBOL = zoneSymbol('Promise');
  3040. var ERROR_SYMBOL = zoneSymbol('Error');
  3041. Function.prototype.toString = function () {
  3042. if (typeof this === 'function') {
  3043. var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];
  3044. if (originalDelegate) {
  3045. if (typeof originalDelegate === 'function') {
  3046. return originalFunctionToString.apply(this[ORIGINAL_DELEGATE_SYMBOL], arguments);
  3047. }
  3048. else {
  3049. return Object.prototype.toString.call(originalDelegate);
  3050. }
  3051. }
  3052. if (this === Promise) {
  3053. var nativePromise = global[PROMISE_SYMBOL];
  3054. if (nativePromise) {
  3055. return originalFunctionToString.apply(nativePromise, arguments);
  3056. }
  3057. }
  3058. if (this === Error) {
  3059. var nativeError = global[ERROR_SYMBOL];
  3060. if (nativeError) {
  3061. return originalFunctionToString.apply(nativeError, arguments);
  3062. }
  3063. }
  3064. }
  3065. return originalFunctionToString.apply(this, arguments);
  3066. };
  3067. // patch Object.prototype.toString to let them look like native
  3068. var originalObjectToString = Object.prototype.toString;
  3069. var PROMISE_OBJECT_TO_STRING = '[object Promise]';
  3070. Object.prototype.toString = function () {
  3071. if (this instanceof Promise) {
  3072. return PROMISE_OBJECT_TO_STRING;
  3073. }
  3074. return originalObjectToString.apply(this, arguments);
  3075. };
  3076. });
  3077. /**
  3078. * @license
  3079. * Copyright Google Inc. All Rights Reserved.
  3080. *
  3081. * Use of this source code is governed by an MIT-style license that can be
  3082. * found in the LICENSE file at https://angular.io/license
  3083. */
  3084. /**
  3085. * @fileoverview
  3086. * @suppress {missingRequire}
  3087. */
  3088. // an identifier to tell ZoneTask do not create a new invoke closure
  3089. var OPTIMIZED_ZONE_EVENT_TASK_DATA = {
  3090. useG: true
  3091. };
  3092. var zoneSymbolEventNames$1 = {};
  3093. var globalSources = {};
  3094. var EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\w+)(true|false)$/;
  3095. var IMMEDIATE_PROPAGATION_SYMBOL = ('__zone_symbol__propagationStopped');
  3096. function patchEventTarget(_global, apis, patchOptions) {
  3097. var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;
  3098. var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;
  3099. var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';
  3100. var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';
  3101. var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);
  3102. var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';
  3103. var PREPEND_EVENT_LISTENER = 'prependListener';
  3104. var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';
  3105. var invokeTask = function (task, target, event) {
  3106. // for better performance, check isRemoved which is set
  3107. // by removeEventListener
  3108. if (task.isRemoved) {
  3109. return;
  3110. }
  3111. var delegate = task.callback;
  3112. if (typeof delegate === 'object' && delegate.handleEvent) {
  3113. // create the bind version of handleEvent when invoke
  3114. task.callback = function (event) { return delegate.handleEvent(event); };
  3115. task.originalDelegate = delegate;
  3116. }
  3117. // invoke static task.invoke
  3118. task.invoke(task, target, [event]);
  3119. var options = task.options;
  3120. if (options && typeof options === 'object' && options.once) {
  3121. // if options.once is true, after invoke once remove listener here
  3122. // only browser need to do this, nodejs eventEmitter will cal removeListener
  3123. // inside EventEmitter.once
  3124. var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback;
  3125. target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options);
  3126. }
  3127. };
  3128. // global shared zoneAwareCallback to handle all event callback with capture = false
  3129. var globalZoneAwareCallback = function (event) {
  3130. // https://github.com/angular/zone.js/issues/911, in IE, sometimes
  3131. // event will be undefined, so we need to use window.event
  3132. event = event || _global.event;
  3133. if (!event) {
  3134. return;
  3135. }
  3136. // event.target is needed for Samsung TV and SourceBuffer
  3137. // || global is needed https://github.com/angular/zone.js/issues/190
  3138. var target = this || event.target || _global;
  3139. var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];
  3140. if (tasks) {
  3141. // invoke all tasks which attached to current target with given event.type and capture = false
  3142. // for performance concern, if task.length === 1, just invoke
  3143. if (tasks.length === 1) {
  3144. invokeTask(tasks[0], target, event);
  3145. }
  3146. else {
  3147. // https://github.com/angular/zone.js/issues/836
  3148. // copy the tasks array before invoke, to avoid
  3149. // the callback will remove itself or other listener
  3150. var copyTasks = tasks.slice();
  3151. for (var i = 0; i < copyTasks.length; i++) {
  3152. if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
  3153. break;
  3154. }
  3155. invokeTask(copyTasks[i], target, event);
  3156. }
  3157. }
  3158. }
  3159. };
  3160. // global shared zoneAwareCallback to handle all event callback with capture = true
  3161. var globalZoneAwareCaptureCallback = function (event) {
  3162. // https://github.com/angular/zone.js/issues/911, in IE, sometimes
  3163. // event will be undefined, so we need to use window.event
  3164. event = event || _global.event;
  3165. if (!event) {
  3166. return;
  3167. }
  3168. // event.target is needed for Samsung TV and SourceBuffer
  3169. // || global is needed https://github.com/angular/zone.js/issues/190
  3170. var target = this || event.target || _global;
  3171. var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];
  3172. if (tasks) {
  3173. // invoke all tasks which attached to current target with given event.type and capture = false
  3174. // for performance concern, if task.length === 1, just invoke
  3175. if (tasks.length === 1) {
  3176. invokeTask(tasks[0], target, event);
  3177. }
  3178. else {
  3179. // https://github.com/angular/zone.js/issues/836
  3180. // copy the tasks array before invoke, to avoid
  3181. // the callback will remove itself or other listener
  3182. var copyTasks = tasks.slice();
  3183. for (var i = 0; i < copyTasks.length; i++) {
  3184. if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
  3185. break;
  3186. }
  3187. invokeTask(copyTasks[i], target, event);
  3188. }
  3189. }
  3190. }
  3191. };
  3192. function patchEventTargetMethods(obj, patchOptions) {
  3193. if (!obj) {
  3194. return false;
  3195. }
  3196. var useGlobalCallback = true;
  3197. if (patchOptions && patchOptions.useG !== undefined) {
  3198. useGlobalCallback = patchOptions.useG;
  3199. }
  3200. var validateHandler = patchOptions && patchOptions.vh;
  3201. var checkDuplicate = true;
  3202. if (patchOptions && patchOptions.chkDup !== undefined) {
  3203. checkDuplicate = patchOptions.chkDup;
  3204. }
  3205. var returnTarget = false;
  3206. if (patchOptions && patchOptions.rt !== undefined) {
  3207. returnTarget = patchOptions.rt;
  3208. }
  3209. var proto = obj;
  3210. while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {
  3211. proto = ObjectGetPrototypeOf(proto);
  3212. }
  3213. if (!proto && obj[ADD_EVENT_LISTENER]) {
  3214. // somehow we did not find it, but we can see it. This happens on IE for Window properties.
  3215. proto = obj;
  3216. }
  3217. if (!proto) {
  3218. return false;
  3219. }
  3220. if (proto[zoneSymbolAddEventListener]) {
  3221. return false;
  3222. }
  3223. // a shared global taskData to pass data for scheduleEventTask
  3224. // so we do not need to create a new object just for pass some data
  3225. var taskData = {};
  3226. var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];
  3227. var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =
  3228. proto[REMOVE_EVENT_LISTENER];
  3229. var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =
  3230. proto[LISTENERS_EVENT_LISTENER];
  3231. var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =
  3232. proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];
  3233. var nativePrependEventListener;
  3234. if (patchOptions && patchOptions.prepend) {
  3235. nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =
  3236. proto[patchOptions.prepend];
  3237. }
  3238. var customScheduleGlobal = function () {
  3239. // if there is already a task for the eventName + capture,
  3240. // just return, because we use the shared globalZoneAwareCallback here.
  3241. if (taskData.isExisting) {
  3242. return;
  3243. }
  3244. return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);
  3245. };
  3246. var customCancelGlobal = function (task) {
  3247. // if task is not marked as isRemoved, this call is directly
  3248. // from Zone.prototype.cancelTask, we should remove the task
  3249. // from tasksList of target first
  3250. if (!task.isRemoved) {
  3251. var symbolEventNames = zoneSymbolEventNames$1[task.eventName];
  3252. var symbolEventName = void 0;
  3253. if (symbolEventNames) {
  3254. symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];
  3255. }
  3256. var existingTasks = symbolEventName && task.target[symbolEventName];
  3257. if (existingTasks) {
  3258. for (var i = 0; i < existingTasks.length; i++) {
  3259. var existingTask = existingTasks[i];
  3260. if (existingTask === task) {
  3261. existingTasks.splice(i, 1);
  3262. // set isRemoved to data for faster invokeTask check
  3263. task.isRemoved = true;
  3264. if (existingTasks.length === 0) {
  3265. // all tasks for the eventName + capture have gone,
  3266. // remove globalZoneAwareCallback and remove the task cache from target
  3267. task.allRemoved = true;
  3268. task.target[symbolEventName] = null;
  3269. }
  3270. break;
  3271. }
  3272. }
  3273. }
  3274. }
  3275. // if all tasks for the eventName + capture have gone,
  3276. // we will really remove the global event callback,
  3277. // if not, return
  3278. if (!task.allRemoved) {
  3279. return;
  3280. }
  3281. return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);
  3282. };
  3283. var customScheduleNonGlobal = function (task) {
  3284. return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
  3285. };
  3286. var customSchedulePrepend = function (task) {
  3287. return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);
  3288. };
  3289. var customCancelNonGlobal = function (task) {
  3290. return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);
  3291. };
  3292. var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;
  3293. var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;
  3294. var compareTaskCallbackVsDelegate = function (task, delegate) {
  3295. var typeOfDelegate = typeof delegate;
  3296. return (typeOfDelegate === 'function' && task.callback === delegate) ||
  3297. (typeOfDelegate === 'object' && task.originalDelegate === delegate);
  3298. };
  3299. var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;
  3300. var blackListedEvents = Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')];
  3301. var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) {
  3302. if (returnTarget === void 0) { returnTarget = false; }
  3303. if (prepend === void 0) { prepend = false; }
  3304. return function () {
  3305. var target = this || _global;
  3306. var delegate = arguments[1];
  3307. if (!delegate) {
  3308. return nativeListener.apply(this, arguments);
  3309. }
  3310. // don't create the bind delegate function for handleEvent
  3311. // case here to improve addEventListener performance
  3312. // we will create the bind delegate when invoke
  3313. var isHandleEvent = false;
  3314. if (typeof delegate !== 'function') {
  3315. if (!delegate.handleEvent) {
  3316. return nativeListener.apply(this, arguments);
  3317. }
  3318. isHandleEvent = true;
  3319. }
  3320. if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {
  3321. return;
  3322. }
  3323. var eventName = arguments[0];
  3324. var options = arguments[2];
  3325. if (blackListedEvents) {
  3326. // check black list
  3327. for (var i = 0; i < blackListedEvents.length; i++) {
  3328. if (eventName === blackListedEvents[i]) {
  3329. return nativeListener.apply(this, arguments);
  3330. }
  3331. }
  3332. }
  3333. var capture;
  3334. var once = false;
  3335. if (options === undefined) {
  3336. capture = false;
  3337. }
  3338. else if (options === true) {
  3339. capture = true;
  3340. }
  3341. else if (options === false) {
  3342. capture = false;
  3343. }
  3344. else {
  3345. capture = options ? !!options.capture : false;
  3346. once = options ? !!options.once : false;
  3347. }
  3348. var zone = Zone.current;
  3349. var symbolEventNames = zoneSymbolEventNames$1[eventName];
  3350. var symbolEventName;
  3351. if (!symbolEventNames) {
  3352. // the code is duplicate, but I just want to get some better performance
  3353. var falseEventName = eventName + FALSE_STR;
  3354. var trueEventName = eventName + TRUE_STR;
  3355. var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
  3356. var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
  3357. zoneSymbolEventNames$1[eventName] = {};
  3358. zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;
  3359. zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;
  3360. symbolEventName = capture ? symbolCapture : symbol;
  3361. }
  3362. else {
  3363. symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
  3364. }
  3365. var existingTasks = target[symbolEventName];
  3366. var isExisting = false;
  3367. if (existingTasks) {
  3368. // already have task registered
  3369. isExisting = true;
  3370. if (checkDuplicate) {
  3371. for (var i = 0; i < existingTasks.length; i++) {
  3372. if (compare(existingTasks[i], delegate)) {
  3373. // same callback, same capture, same event name, just return
  3374. return;
  3375. }
  3376. }
  3377. }
  3378. }
  3379. else {
  3380. existingTasks = target[symbolEventName] = [];
  3381. }
  3382. var source;
  3383. var constructorName = target.constructor['name'];
  3384. var targetSource = globalSources[constructorName];
  3385. if (targetSource) {
  3386. source = targetSource[eventName];
  3387. }
  3388. if (!source) {
  3389. source = constructorName + addSource + eventName;
  3390. }
  3391. // do not create a new object as task.data to pass those things
  3392. // just use the global shared one
  3393. taskData.options = options;
  3394. if (once) {
  3395. // if addEventListener with once options, we don't pass it to
  3396. // native addEventListener, instead we keep the once setting
  3397. // and handle ourselves.
  3398. taskData.options.once = false;
  3399. }
  3400. taskData.target = target;
  3401. taskData.capture = capture;
  3402. taskData.eventName = eventName;
  3403. taskData.isExisting = isExisting;
  3404. var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : null;
  3405. // keep taskData into data to allow onScheduleEventTask to access the task information
  3406. if (data) {
  3407. data.taskData = taskData;
  3408. }
  3409. var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);
  3410. // should clear taskData.target to avoid memory leak
  3411. // issue, https://github.com/angular/angular/issues/20442
  3412. taskData.target = null;
  3413. // need to clear up taskData because it is a global object
  3414. if (data) {
  3415. data.taskData = null;
  3416. }
  3417. // have to save those information to task in case
  3418. // application may call task.zone.cancelTask() directly
  3419. if (once) {
  3420. options.once = true;
  3421. }
  3422. task.options = options;
  3423. task.target = target;
  3424. task.capture = capture;
  3425. task.eventName = eventName;
  3426. if (isHandleEvent) {
  3427. // save original delegate for compare to check duplicate
  3428. task.originalDelegate = delegate;
  3429. }
  3430. if (!prepend) {
  3431. existingTasks.push(task);
  3432. }
  3433. else {
  3434. existingTasks.unshift(task);
  3435. }
  3436. if (returnTarget) {
  3437. return target;
  3438. }
  3439. };
  3440. };
  3441. proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);
  3442. if (nativePrependEventListener) {
  3443. proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);
  3444. }
  3445. proto[REMOVE_EVENT_LISTENER] = function () {
  3446. var target = this || _global;
  3447. var eventName = arguments[0];
  3448. var options = arguments[2];
  3449. var capture;
  3450. if (options === undefined) {
  3451. capture = false;
  3452. }
  3453. else if (options === true) {
  3454. capture = true;
  3455. }
  3456. else if (options === false) {
  3457. capture = false;
  3458. }
  3459. else {
  3460. capture = options ? !!options.capture : false;
  3461. }
  3462. var delegate = arguments[1];
  3463. if (!delegate) {
  3464. return nativeRemoveEventListener.apply(this, arguments);
  3465. }
  3466. if (validateHandler &&
  3467. !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {
  3468. return;
  3469. }
  3470. var symbolEventNames = zoneSymbolEventNames$1[eventName];
  3471. var symbolEventName;
  3472. if (symbolEventNames) {
  3473. symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];
  3474. }
  3475. var existingTasks = symbolEventName && target[symbolEventName];
  3476. if (existingTasks) {
  3477. for (var i = 0; i < existingTasks.length; i++) {
  3478. var existingTask = existingTasks[i];
  3479. if (compare(existingTask, delegate)) {
  3480. existingTasks.splice(i, 1);
  3481. // set isRemoved to data for faster invokeTask check
  3482. existingTask.isRemoved = true;
  3483. if (existingTasks.length === 0) {
  3484. // all tasks for the eventName + capture have gone,
  3485. // remove globalZoneAwareCallback and remove the task cache from target
  3486. existingTask.allRemoved = true;
  3487. target[symbolEventName] = null;
  3488. }
  3489. existingTask.zone.cancelTask(existingTask);
  3490. return;
  3491. }
  3492. }
  3493. }
  3494. // issue 930, didn't find the event name or callback
  3495. // from zone kept existingTasks, the callback maybe
  3496. // added outside of zone, we need to call native removeEventListener
  3497. // to try to remove it.
  3498. return nativeRemoveEventListener.apply(this, arguments);
  3499. };
  3500. proto[LISTENERS_EVENT_LISTENER] = function () {
  3501. var target = this || _global;
  3502. var eventName = arguments[0];
  3503. var listeners = [];
  3504. var tasks = findEventTasks(target, eventName);
  3505. for (var i = 0; i < tasks.length; i++) {
  3506. var task = tasks[i];
  3507. var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
  3508. listeners.push(delegate);
  3509. }
  3510. return listeners;
  3511. };
  3512. proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {
  3513. var target = this || _global;
  3514. var eventName = arguments[0];
  3515. if (!eventName) {
  3516. var keys = Object.keys(target);
  3517. for (var i = 0; i < keys.length; i++) {
  3518. var prop = keys[i];
  3519. var match = EVENT_NAME_SYMBOL_REGX.exec(prop);
  3520. var evtName = match && match[1];
  3521. // in nodejs EventEmitter, removeListener event is
  3522. // used for monitoring the removeListener call,
  3523. // so just keep removeListener eventListener until
  3524. // all other eventListeners are removed
  3525. if (evtName && evtName !== 'removeListener') {
  3526. this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);
  3527. }
  3528. }
  3529. // remove removeListener listener finally
  3530. this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');
  3531. }
  3532. else {
  3533. var symbolEventNames = zoneSymbolEventNames$1[eventName];
  3534. if (symbolEventNames) {
  3535. var symbolEventName = symbolEventNames[FALSE_STR];
  3536. var symbolCaptureEventName = symbolEventNames[TRUE_STR];
  3537. var tasks = target[symbolEventName];
  3538. var captureTasks = target[symbolCaptureEventName];
  3539. if (tasks) {
  3540. var removeTasks = tasks.slice();
  3541. for (var i = 0; i < removeTasks.length; i++) {
  3542. var task = removeTasks[i];
  3543. var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
  3544. this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
  3545. }
  3546. }
  3547. if (captureTasks) {
  3548. var removeTasks = captureTasks.slice();
  3549. for (var i = 0; i < removeTasks.length; i++) {
  3550. var task = removeTasks[i];
  3551. var delegate = task.originalDelegate ? task.originalDelegate : task.callback;
  3552. this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);
  3553. }
  3554. }
  3555. }
  3556. }
  3557. };
  3558. // for native toString patch
  3559. attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);
  3560. attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);
  3561. if (nativeRemoveAllListeners) {
  3562. attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);
  3563. }
  3564. if (nativeListeners) {
  3565. attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);
  3566. }
  3567. return true;
  3568. }
  3569. var results = [];
  3570. for (var i = 0; i < apis.length; i++) {
  3571. results[i] = patchEventTargetMethods(apis[i], patchOptions);
  3572. }
  3573. return results;
  3574. }
  3575. function findEventTasks(target, eventName) {
  3576. var foundTasks = [];
  3577. for (var prop in target) {
  3578. var match = EVENT_NAME_SYMBOL_REGX.exec(prop);
  3579. var evtName = match && match[1];
  3580. if (evtName && (!eventName || evtName === eventName)) {
  3581. var tasks = target[prop];
  3582. if (tasks) {
  3583. for (var i = 0; i < tasks.length; i++) {
  3584. foundTasks.push(tasks[i]);
  3585. }
  3586. }
  3587. }
  3588. }
  3589. return foundTasks;
  3590. }
  3591. function patchEventPrototype(global, api) {
  3592. var Event = global['Event'];
  3593. if (Event && Event.prototype) {
  3594. api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) {
  3595. self[IMMEDIATE_PROPAGATION_SYMBOL] = true;
  3596. // we need to call the native stopImmediatePropagation
  3597. // in case in some hybrid application, some part of
  3598. // application will be controlled by zone, some are not
  3599. delegate && delegate.apply(self, args);
  3600. }; });
  3601. }
  3602. }
  3603. /**
  3604. * @license
  3605. * Copyright Google Inc. All Rights Reserved.
  3606. *
  3607. * Use of this source code is governed by an MIT-style license that can be
  3608. * found in the LICENSE file at https://angular.io/license
  3609. */
  3610. /**
  3611. * @fileoverview
  3612. * @suppress {missingRequire}
  3613. */
  3614. var taskSymbol = zoneSymbol('zoneTask');
  3615. function patchTimer(window, setName, cancelName, nameSuffix) {
  3616. var setNative = null;
  3617. var clearNative = null;
  3618. setName += nameSuffix;
  3619. cancelName += nameSuffix;
  3620. var tasksByHandleId = {};
  3621. function scheduleTask(task) {
  3622. var data = task.data;
  3623. function timer() {
  3624. try {
  3625. task.invoke.apply(this, arguments);
  3626. }
  3627. finally {
  3628. // issue-934, task will be cancelled
  3629. // even it is a periodic task such as
  3630. // setInterval
  3631. if (!(task.data && task.data.isPeriodic)) {
  3632. if (typeof data.handleId === 'number') {
  3633. // in non-nodejs env, we remove timerId
  3634. // from local cache
  3635. delete tasksByHandleId[data.handleId];
  3636. }
  3637. else if (data.handleId) {
  3638. // Node returns complex objects as handleIds
  3639. // we remove task reference from timer object
  3640. data.handleId[taskSymbol] = null;
  3641. }
  3642. }
  3643. }
  3644. }
  3645. data.args[0] = timer;
  3646. data.handleId = setNative.apply(window, data.args);
  3647. return task;
  3648. }
  3649. function clearTask(task) {
  3650. return clearNative(task.data.handleId);
  3651. }
  3652. setNative =
  3653. patchMethod(window, setName, function (delegate) { return function (self, args) {
  3654. if (typeof args[0] === 'function') {
  3655. var options = {
  3656. handleId: null,
  3657. isPeriodic: nameSuffix === 'Interval',
  3658. delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : null,
  3659. args: args
  3660. };
  3661. var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);
  3662. if (!task) {
  3663. return task;
  3664. }
  3665. // Node.js must additionally support the ref and unref functions.
  3666. var handle = task.data.handleId;
  3667. if (typeof handle === 'number') {
  3668. // for non nodejs env, we save handleId: task
  3669. // mapping in local cache for clearTimeout
  3670. tasksByHandleId[handle] = task;
  3671. }
  3672. else if (handle) {
  3673. // for nodejs env, we save task
  3674. // reference in timerId Object for clearTimeout
  3675. handle[taskSymbol] = task;
  3676. }
  3677. // check whether handle is null, because some polyfill or browser
  3678. // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame
  3679. if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&
  3680. typeof handle.unref === 'function') {
  3681. task.ref = handle.ref.bind(handle);
  3682. task.unref = handle.unref.bind(handle);
  3683. }
  3684. if (typeof handle === 'number' || handle) {
  3685. return handle;
  3686. }
  3687. return task;
  3688. }
  3689. else {
  3690. // cause an error by calling it directly.
  3691. return delegate.apply(window, args);
  3692. }
  3693. }; });
  3694. clearNative =
  3695. patchMethod(window, cancelName, function (delegate) { return function (self, args) {
  3696. var id = args[0];
  3697. var task;
  3698. if (typeof id === 'number') {
  3699. // non nodejs env.
  3700. task = tasksByHandleId[id];
  3701. }
  3702. else {
  3703. // nodejs env.
  3704. task = id && id[taskSymbol];
  3705. // other environments.
  3706. if (!task) {
  3707. task = id;
  3708. }
  3709. }
  3710. if (task && typeof task.type === 'string') {
  3711. if (task.state !== 'notScheduled' &&
  3712. (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {
  3713. if (typeof id === 'number') {
  3714. delete tasksByHandleId[id];
  3715. }
  3716. else if (id) {
  3717. id[taskSymbol] = null;
  3718. }
  3719. // Do not cancel already canceled functions
  3720. task.zone.cancelTask(task);
  3721. }
  3722. }
  3723. else {
  3724. // cause an error by calling it directly.
  3725. delegate.apply(window, args);
  3726. }
  3727. }; });
  3728. }
  3729. /**
  3730. * @license
  3731. * Copyright Google Inc. All Rights Reserved.
  3732. *
  3733. * Use of this source code is governed by an MIT-style license that can be
  3734. * found in the LICENSE file at https://angular.io/license
  3735. */
  3736. /*
  3737. * This is necessary for Chrome and Chrome mobile, to enable
  3738. * things like redefining `createdCallback` on an element.
  3739. */
  3740. var _defineProperty = Object[zoneSymbol('defineProperty')] = Object.defineProperty;
  3741. var _getOwnPropertyDescriptor = Object[zoneSymbol('getOwnPropertyDescriptor')] =
  3742. Object.getOwnPropertyDescriptor;
  3743. var _create = Object.create;
  3744. var unconfigurablesKey = zoneSymbol('unconfigurables');
  3745. function propertyPatch() {
  3746. Object.defineProperty = function (obj, prop, desc) {
  3747. if (isUnconfigurable(obj, prop)) {
  3748. throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
  3749. }
  3750. var originalConfigurableFlag = desc.configurable;
  3751. if (prop !== 'prototype') {
  3752. desc = rewriteDescriptor(obj, prop, desc);
  3753. }
  3754. return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
  3755. };
  3756. Object.defineProperties = function (obj, props) {
  3757. Object.keys(props).forEach(function (prop) {
  3758. Object.defineProperty(obj, prop, props[prop]);
  3759. });
  3760. return obj;
  3761. };
  3762. Object.create = function (obj, proto) {
  3763. if (typeof proto === 'object' && !Object.isFrozen(proto)) {
  3764. Object.keys(proto).forEach(function (prop) {
  3765. proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);
  3766. });
  3767. }
  3768. return _create(obj, proto);
  3769. };
  3770. Object.getOwnPropertyDescriptor = function (obj, prop) {
  3771. var desc = _getOwnPropertyDescriptor(obj, prop);
  3772. if (isUnconfigurable(obj, prop)) {
  3773. desc.configurable = false;
  3774. }
  3775. return desc;
  3776. };
  3777. }
  3778. function _redefineProperty(obj, prop, desc) {
  3779. var originalConfigurableFlag = desc.configurable;
  3780. desc = rewriteDescriptor(obj, prop, desc);
  3781. return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);
  3782. }
  3783. function isUnconfigurable(obj, prop) {
  3784. return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
  3785. }
  3786. function rewriteDescriptor(obj, prop, desc) {
  3787. // issue-927, if the desc is frozen, don't try to change the desc
  3788. if (!Object.isFrozen(desc)) {
  3789. desc.configurable = true;
  3790. }
  3791. if (!desc.configurable) {
  3792. // issue-927, if the obj is frozen, don't try to set the desc to obj
  3793. if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {
  3794. _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
  3795. }
  3796. if (obj[unconfigurablesKey]) {
  3797. obj[unconfigurablesKey][prop] = true;
  3798. }
  3799. }
  3800. return desc;
  3801. }
  3802. function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {
  3803. try {
  3804. return _defineProperty(obj, prop, desc);
  3805. }
  3806. catch (error) {
  3807. if (desc.configurable) {
  3808. // In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's
  3809. // retry with the original flag value
  3810. if (typeof originalConfigurableFlag == 'undefined') {
  3811. delete desc.configurable;
  3812. }
  3813. else {
  3814. desc.configurable = originalConfigurableFlag;
  3815. }
  3816. try {
  3817. return _defineProperty(obj, prop, desc);
  3818. }
  3819. catch (error) {
  3820. var descJson = null;
  3821. try {
  3822. descJson = JSON.stringify(desc);
  3823. }
  3824. catch (error) {
  3825. descJson = desc.toString();
  3826. }
  3827. console.log("Attempting to configure '" + prop + "' with descriptor '" + descJson + "' on object '" + obj + "' and got error, giving up: " + error);
  3828. }
  3829. }
  3830. else {
  3831. throw error;
  3832. }
  3833. }
  3834. }
  3835. /**
  3836. * @license
  3837. * Copyright Google Inc. All Rights Reserved.
  3838. *
  3839. * Use of this source code is governed by an MIT-style license that can be
  3840. * found in the LICENSE file at https://angular.io/license
  3841. */
  3842. // we have to patch the instance since the proto is non-configurable
  3843. function apply(api, _global) {
  3844. var WS = _global.WebSocket;
  3845. // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
  3846. // On older Chrome, no need since EventTarget was already patched
  3847. if (!_global.EventTarget) {
  3848. patchEventTarget(_global, [WS.prototype]);
  3849. }
  3850. _global.WebSocket = function (x, y) {
  3851. var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);
  3852. var proxySocket;
  3853. var proxySocketProto;
  3854. // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
  3855. var onmessageDesc = ObjectGetOwnPropertyDescriptor(socket, 'onmessage');
  3856. if (onmessageDesc && onmessageDesc.configurable === false) {
  3857. proxySocket = ObjectCreate(socket);
  3858. // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'
  3859. // but proxySocket not, so we will keep socket as prototype and pass it to
  3860. // patchOnProperties method
  3861. proxySocketProto = socket;
  3862. [ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {
  3863. proxySocket[propName] = function () {
  3864. var args = ArraySlice.call(arguments);
  3865. if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {
  3866. var eventName = args.length > 0 ? args[0] : undefined;
  3867. if (eventName) {
  3868. var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);
  3869. socket[propertySymbol] = proxySocket[propertySymbol];
  3870. }
  3871. }
  3872. return socket[propName].apply(socket, args);
  3873. };
  3874. });
  3875. }
  3876. else {
  3877. // we can patch the real socket
  3878. proxySocket = socket;
  3879. }
  3880. patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);
  3881. return proxySocket;
  3882. };
  3883. var globalWebSocket = _global['WebSocket'];
  3884. for (var prop in WS) {
  3885. globalWebSocket[prop] = WS[prop];
  3886. }
  3887. }
  3888. /**
  3889. * @license
  3890. * Copyright Google Inc. All Rights Reserved.
  3891. *
  3892. * Use of this source code is governed by an MIT-style license that can be
  3893. * found in the LICENSE file at https://angular.io/license
  3894. */
  3895. /**
  3896. * @fileoverview
  3897. * @suppress {globalThis}
  3898. */
  3899. var globalEventHandlersEventNames = [
  3900. 'abort',
  3901. 'animationcancel',
  3902. 'animationend',
  3903. 'animationiteration',
  3904. 'auxclick',
  3905. 'beforeinput',
  3906. 'blur',
  3907. 'cancel',
  3908. 'canplay',
  3909. 'canplaythrough',
  3910. 'change',
  3911. 'compositionstart',
  3912. 'compositionupdate',
  3913. 'compositionend',
  3914. 'cuechange',
  3915. 'click',
  3916. 'close',
  3917. 'contextmenu',
  3918. 'curechange',
  3919. 'dblclick',
  3920. 'drag',
  3921. 'dragend',
  3922. 'dragenter',
  3923. 'dragexit',
  3924. 'dragleave',
  3925. 'dragover',
  3926. 'drop',
  3927. 'durationchange',
  3928. 'emptied',
  3929. 'ended',
  3930. 'error',
  3931. 'focus',
  3932. 'focusin',
  3933. 'focusout',
  3934. 'gotpointercapture',
  3935. 'input',
  3936. 'invalid',
  3937. 'keydown',
  3938. 'keypress',
  3939. 'keyup',
  3940. 'load',
  3941. 'loadstart',
  3942. 'loadeddata',
  3943. 'loadedmetadata',
  3944. 'lostpointercapture',
  3945. 'mousedown',
  3946. 'mouseenter',
  3947. 'mouseleave',
  3948. 'mousemove',
  3949. 'mouseout',
  3950. 'mouseover',
  3951. 'mouseup',
  3952. 'mousewheel',
  3953. 'orientationchange',
  3954. 'pause',
  3955. 'play',
  3956. 'playing',
  3957. 'pointercancel',
  3958. 'pointerdown',
  3959. 'pointerenter',
  3960. 'pointerleave',
  3961. 'pointerlockchange',
  3962. 'mozpointerlockchange',
  3963. 'webkitpointerlockerchange',
  3964. 'pointerlockerror',
  3965. 'mozpointerlockerror',
  3966. 'webkitpointerlockerror',
  3967. 'pointermove',
  3968. 'pointout',
  3969. 'pointerover',
  3970. 'pointerup',
  3971. 'progress',
  3972. 'ratechange',
  3973. 'reset',
  3974. 'resize',
  3975. 'scroll',
  3976. 'seeked',
  3977. 'seeking',
  3978. 'select',
  3979. 'selectionchange',
  3980. 'selectstart',
  3981. 'show',
  3982. 'sort',
  3983. 'stalled',
  3984. 'submit',
  3985. 'suspend',
  3986. 'timeupdate',
  3987. 'volumechange',
  3988. 'touchcancel',
  3989. 'touchmove',
  3990. 'touchstart',
  3991. 'touchend',
  3992. 'transitioncancel',
  3993. 'transitionend',
  3994. 'waiting',
  3995. 'wheel'
  3996. ];
  3997. var documentEventNames = [
  3998. 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'fullscreenchange',
  3999. 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',
  4000. 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',
  4001. 'visibilitychange'
  4002. ];
  4003. var windowEventNames = [
  4004. 'absolutedeviceorientation',
  4005. 'afterinput',
  4006. 'afterprint',
  4007. 'appinstalled',
  4008. 'beforeinstallprompt',
  4009. 'beforeprint',
  4010. 'beforeunload',
  4011. 'devicelight',
  4012. 'devicemotion',
  4013. 'deviceorientation',
  4014. 'deviceorientationabsolute',
  4015. 'deviceproximity',
  4016. 'hashchange',
  4017. 'languagechange',
  4018. 'message',
  4019. 'mozbeforepaint',
  4020. 'offline',
  4021. 'online',
  4022. 'paint',
  4023. 'pageshow',
  4024. 'pagehide',
  4025. 'popstate',
  4026. 'rejectionhandled',
  4027. 'storage',
  4028. 'unhandledrejection',
  4029. 'unload',
  4030. 'userproximity',
  4031. 'vrdisplyconnected',
  4032. 'vrdisplaydisconnected',
  4033. 'vrdisplaypresentchange'
  4034. ];
  4035. var htmlElementEventNames = [
  4036. 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',
  4037. 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',
  4038. 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'
  4039. ];
  4040. var mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];
  4041. var ieElementEventNames = [
  4042. 'activate',
  4043. 'afterupdate',
  4044. 'ariarequest',
  4045. 'beforeactivate',
  4046. 'beforedeactivate',
  4047. 'beforeeditfocus',
  4048. 'beforeupdate',
  4049. 'cellchange',
  4050. 'controlselect',
  4051. 'dataavailable',
  4052. 'datasetchanged',
  4053. 'datasetcomplete',
  4054. 'errorupdate',
  4055. 'filterchange',
  4056. 'layoutcomplete',
  4057. 'losecapture',
  4058. 'move',
  4059. 'moveend',
  4060. 'movestart',
  4061. 'propertychange',
  4062. 'resizeend',
  4063. 'resizestart',
  4064. 'rowenter',
  4065. 'rowexit',
  4066. 'rowsdelete',
  4067. 'rowsinserted',
  4068. 'command',
  4069. 'compassneedscalibration',
  4070. 'deactivate',
  4071. 'help',
  4072. 'mscontentzoom',
  4073. 'msmanipulationstatechanged',
  4074. 'msgesturechange',
  4075. 'msgesturedoubletap',
  4076. 'msgestureend',
  4077. 'msgesturehold',
  4078. 'msgesturestart',
  4079. 'msgesturetap',
  4080. 'msgotpointercapture',
  4081. 'msinertiastart',
  4082. 'mslostpointercapture',
  4083. 'mspointercancel',
  4084. 'mspointerdown',
  4085. 'mspointerenter',
  4086. 'mspointerhover',
  4087. 'mspointerleave',
  4088. 'mspointermove',
  4089. 'mspointerout',
  4090. 'mspointerover',
  4091. 'mspointerup',
  4092. 'pointerout',
  4093. 'mssitemodejumplistitemremoved',
  4094. 'msthumbnailclick',
  4095. 'stop',
  4096. 'storagecommit'
  4097. ];
  4098. var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];
  4099. var formEventNames = ['autocomplete', 'autocompleteerror'];
  4100. var detailEventNames = ['toggle'];
  4101. var frameEventNames = ['load'];
  4102. var frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];
  4103. var marqueeEventNames = ['bounce', 'finish', 'start'];
  4104. var XMLHttpRequestEventNames = [
  4105. 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',
  4106. 'readystatechange'
  4107. ];
  4108. var IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];
  4109. var websocketEventNames = ['close', 'error', 'open', 'message'];
  4110. var workerEventNames = ['error', 'message'];
  4111. var eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);
  4112. function filterProperties(target, onProperties, ignoreProperties) {
  4113. if (!ignoreProperties) {
  4114. return onProperties;
  4115. }
  4116. var tip = ignoreProperties.filter(function (ip) { return ip.target === target; });
  4117. if (!tip || tip.length === 0) {
  4118. return onProperties;
  4119. }
  4120. var targetIgnoreProperties = tip[0].ignoreProperties;
  4121. return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; });
  4122. }
  4123. function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {
  4124. var filteredProperties = filterProperties(target, onProperties, ignoreProperties);
  4125. patchOnProperties(target, filteredProperties, prototype);
  4126. }
  4127. function propertyDescriptorPatch(api, _global) {
  4128. if (isNode && !isMix) {
  4129. return;
  4130. }
  4131. var supportsWebSocket = typeof WebSocket !== 'undefined';
  4132. if (canPatchViaPropertyDescriptor()) {
  4133. var ignoreProperties = _global.__Zone_ignore_on_properties;
  4134. // for browsers that we can patch the descriptor: Chrome & Firefox
  4135. if (isBrowser) {
  4136. var internalWindow = window;
  4137. // in IE/Edge, onProp not exist in window object, but in WindowPrototype
  4138. // so we need to pass WindowPrototype to check onProp exist or not
  4139. patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties, ObjectGetPrototypeOf(internalWindow));
  4140. patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);
  4141. if (typeof internalWindow['SVGElement'] !== 'undefined') {
  4142. patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties);
  4143. }
  4144. patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);
  4145. patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);
  4146. patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);
  4147. patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
  4148. patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);
  4149. patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);
  4150. patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);
  4151. var HTMLMarqueeElement_1 = internalWindow['HTMLMarqueeElement'];
  4152. if (HTMLMarqueeElement_1) {
  4153. patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties);
  4154. }
  4155. var Worker_1 = internalWindow['Worker'];
  4156. if (Worker_1) {
  4157. patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties);
  4158. }
  4159. }
  4160. patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);
  4161. var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];
  4162. if (XMLHttpRequestEventTarget) {
  4163. patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);
  4164. }
  4165. if (typeof IDBIndex !== 'undefined') {
  4166. patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);
  4167. patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
  4168. patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
  4169. patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);
  4170. patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);
  4171. patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);
  4172. }
  4173. if (supportsWebSocket) {
  4174. patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);
  4175. }
  4176. }
  4177. else {
  4178. // Safari, Android browsers (Jelly Bean)
  4179. patchViaCapturingAllTheEvents();
  4180. patchClass('XMLHttpRequest');
  4181. if (supportsWebSocket) {
  4182. apply(api, _global);
  4183. }
  4184. }
  4185. }
  4186. function canPatchViaPropertyDescriptor() {
  4187. if ((isBrowser || isMix) && !ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
  4188. typeof Element !== 'undefined') {
  4189. // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
  4190. // IDL interface attributes are not configurable
  4191. var desc = ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');
  4192. if (desc && !desc.configurable)
  4193. return false;
  4194. }
  4195. var ON_READY_STATE_CHANGE = 'onreadystatechange';
  4196. var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
  4197. var xhrDesc = ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);
  4198. // add enumerable and configurable here because in opera
  4199. // by default XMLHttpRequest.prototype.onreadystatechange is undefined
  4200. // without adding enumerable and configurable will cause onreadystatechange
  4201. // non-configurable
  4202. // and if XMLHttpRequest.prototype.onreadystatechange is undefined,
  4203. // we should set a real desc instead a fake one
  4204. if (xhrDesc) {
  4205. ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
  4206. enumerable: true,
  4207. configurable: true,
  4208. get: function () {
  4209. return true;
  4210. }
  4211. });
  4212. var req = new XMLHttpRequest();
  4213. var result = !!req.onreadystatechange;
  4214. // restore original desc
  4215. ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});
  4216. return result;
  4217. }
  4218. else {
  4219. var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = zoneSymbol('fake');
  4220. ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {
  4221. enumerable: true,
  4222. configurable: true,
  4223. get: function () {
  4224. return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];
  4225. },
  4226. set: function (value) {
  4227. this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;
  4228. }
  4229. });
  4230. var req = new XMLHttpRequest();
  4231. var detectFunc = function () { };
  4232. req.onreadystatechange = detectFunc;
  4233. var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
  4234. req.onreadystatechange = null;
  4235. return result;
  4236. }
  4237. }
  4238. var unboundKey = zoneSymbol('unbound');
  4239. // Whenever any eventListener fires, we check the eventListener target and all parents
  4240. // for `onwhatever` properties and replace them with zone-bound functions
  4241. // - Chrome (for now)
  4242. function patchViaCapturingAllTheEvents() {
  4243. var _loop_1 = function (i) {
  4244. var property = eventNames[i];
  4245. var onproperty = 'on' + property;
  4246. self.addEventListener(property, function (event) {
  4247. var elt = event.target, bound, source;
  4248. if (elt) {
  4249. source = elt.constructor['name'] + '.' + onproperty;
  4250. }
  4251. else {
  4252. source = 'unknown.' + onproperty;
  4253. }
  4254. while (elt) {
  4255. if (elt[onproperty] && !elt[onproperty][unboundKey]) {
  4256. bound = wrapWithCurrentZone(elt[onproperty], source);
  4257. bound[unboundKey] = elt[onproperty];
  4258. elt[onproperty] = bound;
  4259. }
  4260. elt = elt.parentElement;
  4261. }
  4262. }, true);
  4263. };
  4264. for (var i = 0; i < eventNames.length; i++) {
  4265. _loop_1(i);
  4266. }
  4267. }
  4268. /**
  4269. * @license
  4270. * Copyright Google Inc. All Rights Reserved.
  4271. *
  4272. * Use of this source code is governed by an MIT-style license that can be
  4273. * found in the LICENSE file at https://angular.io/license
  4274. */
  4275. function eventTargetPatch(_global, api) {
  4276. var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
  4277. var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'
  4278. .split(',');
  4279. var EVENT_TARGET = 'EventTarget';
  4280. var apis = [];
  4281. var isWtf = _global['wtf'];
  4282. var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');
  4283. if (isWtf) {
  4284. // Workaround for: https://github.com/google/tracing-framework/issues/555
  4285. apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);
  4286. }
  4287. else if (_global[EVENT_TARGET]) {
  4288. apis.push(EVENT_TARGET);
  4289. }
  4290. else {
  4291. // Note: EventTarget is not available in all browsers,
  4292. // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
  4293. apis = NO_EVENT_TARGET;
  4294. }
  4295. var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;
  4296. var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;
  4297. var ieOrEdge = isIEOrEdge();
  4298. var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';
  4299. var FUNCTION_WRAPPER = '[object FunctionWrapper]';
  4300. var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';
  4301. // predefine all __zone_symbol__ + eventName + true/false string
  4302. for (var i = 0; i < eventNames.length; i++) {
  4303. var eventName = eventNames[i];
  4304. var falseEventName = eventName + FALSE_STR;
  4305. var trueEventName = eventName + TRUE_STR;
  4306. var symbol = ZONE_SYMBOL_PREFIX + falseEventName;
  4307. var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
  4308. zoneSymbolEventNames$1[eventName] = {};
  4309. zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;
  4310. zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;
  4311. }
  4312. // predefine all task.source string
  4313. for (var i = 0; i < WTF_ISSUE_555.length; i++) {
  4314. var target = WTF_ISSUE_555_ARRAY[i];
  4315. var targets = globalSources[target] = {};
  4316. for (var j = 0; j < eventNames.length; j++) {
  4317. var eventName = eventNames[j];
  4318. targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;
  4319. }
  4320. }
  4321. var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {
  4322. if (!isDisableIECheck && ieOrEdge) {
  4323. if (isEnableCrossContextCheck) {
  4324. try {
  4325. var testString = delegate.toString();
  4326. if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
  4327. nativeDelegate.apply(target, args);
  4328. return false;
  4329. }
  4330. }
  4331. catch (error) {
  4332. nativeDelegate.apply(target, args);
  4333. return false;
  4334. }
  4335. }
  4336. else {
  4337. var testString = delegate.toString();
  4338. if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {
  4339. nativeDelegate.apply(target, args);
  4340. return false;
  4341. }
  4342. }
  4343. }
  4344. else if (isEnableCrossContextCheck) {
  4345. try {
  4346. delegate.toString();
  4347. }
  4348. catch (error) {
  4349. nativeDelegate.apply(target, args);
  4350. return false;
  4351. }
  4352. }
  4353. return true;
  4354. };
  4355. var apiTypes = [];
  4356. for (var i = 0; i < apis.length; i++) {
  4357. var type = _global[apis[i]];
  4358. apiTypes.push(type && type.prototype);
  4359. }
  4360. // vh is validateHandler to check event handler
  4361. // is valid or not(for security check)
  4362. patchEventTarget(_global, apiTypes, { vh: checkIEAndCrossContext });
  4363. api.patchEventTarget = patchEventTarget;
  4364. return true;
  4365. }
  4366. function patchEvent(global, api) {
  4367. patchEventPrototype(global, api);
  4368. }
  4369. /**
  4370. * @license
  4371. * Copyright Google Inc. All Rights Reserved.
  4372. *
  4373. * Use of this source code is governed by an MIT-style license that can be
  4374. * found in the LICENSE file at https://angular.io/license
  4375. */
  4376. function registerElementPatch(_global) {
  4377. if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {
  4378. return;
  4379. }
  4380. var _registerElement = document.registerElement;
  4381. var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
  4382. document.registerElement = function (name, opts) {
  4383. if (opts && opts.prototype) {
  4384. callbacks.forEach(function (callback) {
  4385. var source = 'Document.registerElement::' + callback;
  4386. var prototype = opts.prototype;
  4387. if (prototype.hasOwnProperty(callback)) {
  4388. var descriptor = ObjectGetOwnPropertyDescriptor(prototype, callback);
  4389. if (descriptor && descriptor.value) {
  4390. descriptor.value = wrapWithCurrentZone(descriptor.value, source);
  4391. _redefineProperty(opts.prototype, callback, descriptor);
  4392. }
  4393. else {
  4394. prototype[callback] = wrapWithCurrentZone(prototype[callback], source);
  4395. }
  4396. }
  4397. else if (prototype[callback]) {
  4398. prototype[callback] = wrapWithCurrentZone(prototype[callback], source);
  4399. }
  4400. });
  4401. }
  4402. return _registerElement.call(document, name, opts);
  4403. };
  4404. attachOriginToPatched(document.registerElement, _registerElement);
  4405. }
  4406. /**
  4407. * @license
  4408. * Copyright Google Inc. All Rights Reserved.
  4409. *
  4410. * Use of this source code is governed by an MIT-style license that can be
  4411. * found in the LICENSE file at https://angular.io/license
  4412. */
  4413. /**
  4414. * @fileoverview
  4415. * @suppress {missingRequire}
  4416. */
  4417. Zone.__load_patch('util', function (global, Zone, api) {
  4418. api.patchOnProperties = patchOnProperties;
  4419. api.patchMethod = patchMethod;
  4420. api.bindArguments = bindArguments;
  4421. });
  4422. Zone.__load_patch('timers', function (global) {
  4423. var set = 'set';
  4424. var clear = 'clear';
  4425. patchTimer(global, set, clear, 'Timeout');
  4426. patchTimer(global, set, clear, 'Interval');
  4427. patchTimer(global, set, clear, 'Immediate');
  4428. });
  4429. Zone.__load_patch('requestAnimationFrame', function (global) {
  4430. patchTimer(global, 'request', 'cancel', 'AnimationFrame');
  4431. patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');
  4432. patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');
  4433. });
  4434. Zone.__load_patch('blocking', function (global, Zone) {
  4435. var blockingMethods = ['alert', 'prompt', 'confirm'];
  4436. for (var i = 0; i < blockingMethods.length; i++) {
  4437. var name_1 = blockingMethods[i];
  4438. patchMethod(global, name_1, function (delegate, symbol, name) {
  4439. return function (s, args) {
  4440. return Zone.current.run(delegate, global, args, name);
  4441. };
  4442. });
  4443. }
  4444. });
  4445. Zone.__load_patch('EventTarget', function (global, Zone, api) {
  4446. // load blackListEvents from global
  4447. var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');
  4448. if (global[SYMBOL_BLACK_LISTED_EVENTS]) {
  4449. Zone[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS];
  4450. }
  4451. patchEvent(global, api);
  4452. eventTargetPatch(global, api);
  4453. // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener
  4454. var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];
  4455. if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {
  4456. api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);
  4457. }
  4458. patchClass('MutationObserver');
  4459. patchClass('WebKitMutationObserver');
  4460. patchClass('IntersectionObserver');
  4461. patchClass('FileReader');
  4462. });
  4463. Zone.__load_patch('on_property', function (global, Zone, api) {
  4464. propertyDescriptorPatch(api, global);
  4465. propertyPatch();
  4466. registerElementPatch(global);
  4467. });
  4468. Zone.__load_patch('canvas', function (global) {
  4469. var HTMLCanvasElement = global['HTMLCanvasElement'];
  4470. if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&
  4471. HTMLCanvasElement.prototype.toBlob) {
  4472. patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
  4473. return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
  4474. });
  4475. }
  4476. });
  4477. Zone.__load_patch('XHR', function (global, Zone) {
  4478. // Treat XMLHttpRequest as a macrotask.
  4479. patchXHR(global);
  4480. var XHR_TASK = zoneSymbol('xhrTask');
  4481. var XHR_SYNC = zoneSymbol('xhrSync');
  4482. var XHR_LISTENER = zoneSymbol('xhrListener');
  4483. var XHR_SCHEDULED = zoneSymbol('xhrScheduled');
  4484. var XHR_URL = zoneSymbol('xhrURL');
  4485. function patchXHR(window) {
  4486. var XMLHttpRequestPrototype = XMLHttpRequest.prototype;
  4487. function findPendingTask(target) {
  4488. return target[XHR_TASK];
  4489. }
  4490. var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
  4491. var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
  4492. if (!oriAddListener) {
  4493. var XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];
  4494. if (XMLHttpRequestEventTarget) {
  4495. var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;
  4496. oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
  4497. oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
  4498. }
  4499. }
  4500. var READY_STATE_CHANGE = 'readystatechange';
  4501. var SCHEDULED = 'scheduled';
  4502. function scheduleTask(task) {
  4503. XMLHttpRequest[XHR_SCHEDULED] = false;
  4504. var data = task.data;
  4505. var target = data.target;
  4506. // remove existing event listener
  4507. var listener = target[XHR_LISTENER];
  4508. if (!oriAddListener) {
  4509. oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];
  4510. oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
  4511. }
  4512. if (listener) {
  4513. oriRemoveListener.call(target, READY_STATE_CHANGE, listener);
  4514. }
  4515. var newListener = target[XHR_LISTENER] = function () {
  4516. if (target.readyState === target.DONE) {
  4517. // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
  4518. // readyState=4 multiple times, so we need to check task state here
  4519. if (!data.aborted && XMLHttpRequest[XHR_SCHEDULED] && task.state === SCHEDULED) {
  4520. task.invoke();
  4521. }
  4522. }
  4523. };
  4524. oriAddListener.call(target, READY_STATE_CHANGE, newListener);
  4525. var storedTask = target[XHR_TASK];
  4526. if (!storedTask) {
  4527. target[XHR_TASK] = task;
  4528. }
  4529. sendNative.apply(target, data.args);
  4530. XMLHttpRequest[XHR_SCHEDULED] = true;
  4531. return task;
  4532. }
  4533. function placeholderCallback() { }
  4534. function clearTask(task) {
  4535. var data = task.data;
  4536. // Note - ideally, we would call data.target.removeEventListener here, but it's too late
  4537. // to prevent it from firing. So instead, we store info for the event listener.
  4538. data.aborted = true;
  4539. return abortNative.apply(data.target, data.args);
  4540. }
  4541. var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) {
  4542. self[XHR_SYNC] = args[2] == false;
  4543. self[XHR_URL] = args[1];
  4544. return openNative.apply(self, args);
  4545. }; });
  4546. var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';
  4547. var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) {
  4548. if (self[XHR_SYNC]) {
  4549. // if the XHR is sync there is no task to schedule, just execute the code.
  4550. return sendNative.apply(self, args);
  4551. }
  4552. else {
  4553. var options = {
  4554. target: self,
  4555. url: self[XHR_URL],
  4556. isPeriodic: false,
  4557. delay: null,
  4558. args: args,
  4559. aborted: false
  4560. };
  4561. return scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);
  4562. }
  4563. }; });
  4564. var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self) {
  4565. var task = findPendingTask(self);
  4566. if (task && typeof task.type == 'string') {
  4567. // If the XHR has already completed, do nothing.
  4568. // If the XHR has already been aborted, do nothing.
  4569. // Fix #569, call abort multiple times before done will cause
  4570. // macroTask task count be negative number
  4571. if (task.cancelFn == null || (task.data && task.data.aborted)) {
  4572. return;
  4573. }
  4574. task.zone.cancelTask(task);
  4575. }
  4576. // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no
  4577. // task
  4578. // to cancel. Do nothing.
  4579. }; });
  4580. }
  4581. });
  4582. Zone.__load_patch('geolocation', function (global) {
  4583. /// GEO_LOCATION
  4584. if (global['navigator'] && global['navigator'].geolocation) {
  4585. patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);
  4586. }
  4587. });
  4588. Zone.__load_patch('PromiseRejectionEvent', function (global, Zone) {
  4589. // handle unhandled promise rejection
  4590. function findPromiseRejectionHandler(evtName) {
  4591. return function (e) {
  4592. var eventTasks = findEventTasks(global, evtName);
  4593. eventTasks.forEach(function (eventTask) {
  4594. // windows has added unhandledrejection event listener
  4595. // trigger the event listener
  4596. var PromiseRejectionEvent = global['PromiseRejectionEvent'];
  4597. if (PromiseRejectionEvent) {
  4598. var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });
  4599. eventTask.invoke(evt);
  4600. }
  4601. });
  4602. };
  4603. }
  4604. if (global['PromiseRejectionEvent']) {
  4605. Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =
  4606. findPromiseRejectionHandler('unhandledrejection');
  4607. Zone[zoneSymbol('rejectionHandledHandler')] =
  4608. findPromiseRejectionHandler('rejectionhandled');
  4609. }
  4610. });
  4611. /**
  4612. * @license
  4613. * Copyright Google Inc. All Rights Reserved.
  4614. *
  4615. * Use of this source code is governed by an MIT-style license that can be
  4616. * found in the LICENSE file at https://angular.io/license
  4617. */
  4618. })));
  4619. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("./node_modules/webpack/buildin/global.js")))
  4620. /***/ }),
  4621. /***/ "./src/polyfills.ts":
  4622. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4623. "use strict";
  4624. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  4625. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_core_js_es7_reflect__ = __webpack_require__("./node_modules/core-js/es7/reflect.js");
  4626. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_core_js_es7_reflect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_core_js_es7_reflect__);
  4627. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_zone_js_dist_zone__ = __webpack_require__("./node_modules/zone.js/dist/zone.js");
  4628. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_zone_js_dist_zone___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_zone_js_dist_zone__);
  4629. /**
  4630. * This file includes polyfills needed by Angular and is loaded before the app.
  4631. * You can add your own extra polyfills to this file.
  4632. *
  4633. * This file is divided into 2 sections:
  4634. * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
  4635. * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
  4636. * file.
  4637. *
  4638. * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
  4639. * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
  4640. * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
  4641. *
  4642. * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
  4643. */
  4644. /***************************************************************************************************
  4645. * BROWSER POLYFILLS
  4646. */
  4647. /** IE9, IE10 and IE11 requires all of the following polyfills. **/
  4648. // import 'core-js/es6/symbol';
  4649. // import 'core-js/es6/object';
  4650. // import 'core-js/es6/function';
  4651. // import 'core-js/es6/parse-int';
  4652. // import 'core-js/es6/parse-float';
  4653. // import 'core-js/es6/number';
  4654. // import 'core-js/es6/math';
  4655. // import 'core-js/es6/string';
  4656. // import 'core-js/es6/date';
  4657. // import 'core-js/es6/array';
  4658. // import 'core-js/es6/regexp';
  4659. // import 'core-js/es6/map';
  4660. // import 'core-js/es6/weak-map';
  4661. // import 'core-js/es6/set';
  4662. /** IE10 and IE11 requires the following for NgClass support on SVG elements */
  4663. // import 'classlist.js'; // Run `npm install --save classlist.js`.
  4664. /** IE10 and IE11 requires the following for the Reflect API. */
  4665. // import 'core-js/es6/reflect';
  4666. /** Evergreen browsers require these. **/
  4667. // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
  4668. /**
  4669. * Required to support Web Animations `@angular/platform-browser/animations`.
  4670. * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
  4671. **/
  4672. // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
  4673. /**
  4674. * By default, zone.js will patch all possible macroTask and DomEvents
  4675. * user can disable parts of macroTask/DomEvents patch by setting following flags
  4676. */
  4677. // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
  4678. // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
  4679. // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
  4680. /*
  4681. * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
  4682. * with the following flag, it will bypass `zone.js` patch for IE/Edge
  4683. */
  4684. // (window as any).__Zone_enable_cross_context_check = true;
  4685. /***************************************************************************************************
  4686. * Zone JS is required by default for Angular itself.
  4687. */
  4688. // Included with Angular CLI.
  4689. /***************************************************************************************************
  4690. * APPLICATION IMPORTS
  4691. */
  4692. /***/ }),
  4693. /***/ 1:
  4694. /***/ (function(module, exports, __webpack_require__) {
  4695. module.exports = __webpack_require__("./src/polyfills.ts");
  4696. /***/ })
  4697. },[1]);
  4698. //# sourceMappingURL=polyfills.bundle.js.map