main.js 333 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId]) {
  10. /******/ return installedModules[moduleId].exports;
  11. /******/ }
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // define getter function for harmony exports
  37. /******/ __webpack_require__.d = function(exports, name, getter) {
  38. /******/ if(!__webpack_require__.o(exports, name)) {
  39. /******/ Object.defineProperty(exports, name, {
  40. /******/ configurable: false,
  41. /******/ enumerable: true,
  42. /******/ get: getter
  43. /******/ });
  44. /******/ }
  45. /******/ };
  46. /******/
  47. /******/ // getDefaultExport function for compatibility with non-harmony modules
  48. /******/ __webpack_require__.n = function(module) {
  49. /******/ var getter = module && module.__esModule ?
  50. /******/ function getDefault() { return module['default']; } :
  51. /******/ function getModuleExports() { return module; };
  52. /******/ __webpack_require__.d(getter, 'a', getter);
  53. /******/ return getter;
  54. /******/ };
  55. /******/
  56. /******/ // Object.prototype.hasOwnProperty.call
  57. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  58. /******/
  59. /******/ // __webpack_public_path__
  60. /******/ __webpack_require__.p = "";
  61. /******/
  62. /******/ // Load entry module and return exports
  63. /******/ return __webpack_require__(__webpack_require__.s = 11);
  64. /******/ })
  65. /************************************************************************/
  66. /******/ ([
  67. /* 0 */
  68. /***/ (function(module, exports) {
  69. module.exports = require("path");
  70. /***/ }),
  71. /* 1 */
  72. /***/ (function(module, exports) {
  73. module.exports = require("fs");
  74. /***/ }),
  75. /* 2 */
  76. /***/ (function(module, exports) {
  77. module.exports = require("electron");
  78. /***/ }),
  79. /* 3 */
  80. /***/ (function(module, exports) {
  81. /* -*- Mode: js; js-indent-level: 2; -*- */
  82. /*
  83. * Copyright 2011 Mozilla Foundation and contributors
  84. * Licensed under the New BSD license. See LICENSE or:
  85. * http://opensource.org/licenses/BSD-3-Clause
  86. */
  87. /**
  88. * This is a helper function for getting values from parameter/options
  89. * objects.
  90. *
  91. * @param args The object we are extracting values from
  92. * @param name The name of the property we are getting.
  93. * @param defaultValue An optional value to return if the property is missing
  94. * from the object. If this is not specified and the property is missing, an
  95. * error will be thrown.
  96. */
  97. function getArg(aArgs, aName, aDefaultValue) {
  98. if (aName in aArgs) {
  99. return aArgs[aName];
  100. } else if (arguments.length === 3) {
  101. return aDefaultValue;
  102. } else {
  103. throw new Error('"' + aName + '" is a required argument.');
  104. }
  105. }
  106. exports.getArg = getArg;
  107. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
  108. var dataUrlRegexp = /^data:.+\,.+$/;
  109. function urlParse(aUrl) {
  110. var match = aUrl.match(urlRegexp);
  111. if (!match) {
  112. return null;
  113. }
  114. return {
  115. scheme: match[1],
  116. auth: match[2],
  117. host: match[3],
  118. port: match[4],
  119. path: match[5]
  120. };
  121. }
  122. exports.urlParse = urlParse;
  123. function urlGenerate(aParsedUrl) {
  124. var url = '';
  125. if (aParsedUrl.scheme) {
  126. url += aParsedUrl.scheme + ':';
  127. }
  128. url += '//';
  129. if (aParsedUrl.auth) {
  130. url += aParsedUrl.auth + '@';
  131. }
  132. if (aParsedUrl.host) {
  133. url += aParsedUrl.host;
  134. }
  135. if (aParsedUrl.port) {
  136. url += ":" + aParsedUrl.port
  137. }
  138. if (aParsedUrl.path) {
  139. url += aParsedUrl.path;
  140. }
  141. return url;
  142. }
  143. exports.urlGenerate = urlGenerate;
  144. /**
  145. * Normalizes a path, or the path portion of a URL:
  146. *
  147. * - Replaces consecutive slashes with one slash.
  148. * - Removes unnecessary '.' parts.
  149. * - Removes unnecessary '<dir>/..' parts.
  150. *
  151. * Based on code in the Node.js 'path' core module.
  152. *
  153. * @param aPath The path or url to normalize.
  154. */
  155. function normalize(aPath) {
  156. var path = aPath;
  157. var url = urlParse(aPath);
  158. if (url) {
  159. if (!url.path) {
  160. return aPath;
  161. }
  162. path = url.path;
  163. }
  164. var isAbsolute = exports.isAbsolute(path);
  165. var parts = path.split(/\/+/);
  166. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  167. part = parts[i];
  168. if (part === '.') {
  169. parts.splice(i, 1);
  170. } else if (part === '..') {
  171. up++;
  172. } else if (up > 0) {
  173. if (part === '') {
  174. // The first part is blank if the path is absolute. Trying to go
  175. // above the root is a no-op. Therefore we can remove all '..' parts
  176. // directly after the root.
  177. parts.splice(i + 1, up);
  178. up = 0;
  179. } else {
  180. parts.splice(i, 2);
  181. up--;
  182. }
  183. }
  184. }
  185. path = parts.join('/');
  186. if (path === '') {
  187. path = isAbsolute ? '/' : '.';
  188. }
  189. if (url) {
  190. url.path = path;
  191. return urlGenerate(url);
  192. }
  193. return path;
  194. }
  195. exports.normalize = normalize;
  196. /**
  197. * Joins two paths/URLs.
  198. *
  199. * @param aRoot The root path or URL.
  200. * @param aPath The path or URL to be joined with the root.
  201. *
  202. * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
  203. * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
  204. * first.
  205. * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
  206. * is updated with the result and aRoot is returned. Otherwise the result
  207. * is returned.
  208. * - If aPath is absolute, the result is aPath.
  209. * - Otherwise the two paths are joined with a slash.
  210. * - Joining for example 'http://' and 'www.example.com' is also supported.
  211. */
  212. function join(aRoot, aPath) {
  213. if (aRoot === "") {
  214. aRoot = ".";
  215. }
  216. if (aPath === "") {
  217. aPath = ".";
  218. }
  219. var aPathUrl = urlParse(aPath);
  220. var aRootUrl = urlParse(aRoot);
  221. if (aRootUrl) {
  222. aRoot = aRootUrl.path || '/';
  223. }
  224. // `join(foo, '//www.example.org')`
  225. if (aPathUrl && !aPathUrl.scheme) {
  226. if (aRootUrl) {
  227. aPathUrl.scheme = aRootUrl.scheme;
  228. }
  229. return urlGenerate(aPathUrl);
  230. }
  231. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  232. return aPath;
  233. }
  234. // `join('http://', 'www.example.com')`
  235. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  236. aRootUrl.host = aPath;
  237. return urlGenerate(aRootUrl);
  238. }
  239. var joined = aPath.charAt(0) === '/'
  240. ? aPath
  241. : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  242. if (aRootUrl) {
  243. aRootUrl.path = joined;
  244. return urlGenerate(aRootUrl);
  245. }
  246. return joined;
  247. }
  248. exports.join = join;
  249. exports.isAbsolute = function (aPath) {
  250. return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
  251. };
  252. /**
  253. * Make a path relative to a URL or another path.
  254. *
  255. * @param aRoot The root path or URL.
  256. * @param aPath The path or URL to be made relative to aRoot.
  257. */
  258. function relative(aRoot, aPath) {
  259. if (aRoot === "") {
  260. aRoot = ".";
  261. }
  262. aRoot = aRoot.replace(/\/$/, '');
  263. // It is possible for the path to be above the root. In this case, simply
  264. // checking whether the root is a prefix of the path won't work. Instead, we
  265. // need to remove components from the root one by one, until either we find
  266. // a prefix that fits, or we run out of components to remove.
  267. var level = 0;
  268. while (aPath.indexOf(aRoot + '/') !== 0) {
  269. var index = aRoot.lastIndexOf("/");
  270. if (index < 0) {
  271. return aPath;
  272. }
  273. // If the only part of the root that is left is the scheme (i.e. http://,
  274. // file:///, etc.), one or more slashes (/), or simply nothing at all, we
  275. // have exhausted all components, so the path is not relative to the root.
  276. aRoot = aRoot.slice(0, index);
  277. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  278. return aPath;
  279. }
  280. ++level;
  281. }
  282. // Make sure we add a "../" for each component we removed from the root.
  283. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  284. }
  285. exports.relative = relative;
  286. var supportsNullProto = (function () {
  287. var obj = Object.create(null);
  288. return !('__proto__' in obj);
  289. }());
  290. function identity (s) {
  291. return s;
  292. }
  293. /**
  294. * Because behavior goes wacky when you set `__proto__` on objects, we
  295. * have to prefix all the strings in our set with an arbitrary character.
  296. *
  297. * See https://github.com/mozilla/source-map/pull/31 and
  298. * https://github.com/mozilla/source-map/issues/30
  299. *
  300. * @param String aStr
  301. */
  302. function toSetString(aStr) {
  303. if (isProtoString(aStr)) {
  304. return '$' + aStr;
  305. }
  306. return aStr;
  307. }
  308. exports.toSetString = supportsNullProto ? identity : toSetString;
  309. function fromSetString(aStr) {
  310. if (isProtoString(aStr)) {
  311. return aStr.slice(1);
  312. }
  313. return aStr;
  314. }
  315. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  316. function isProtoString(s) {
  317. if (!s) {
  318. return false;
  319. }
  320. var length = s.length;
  321. if (length < 9 /* "__proto__".length */) {
  322. return false;
  323. }
  324. if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
  325. s.charCodeAt(length - 2) !== 95 /* '_' */ ||
  326. s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
  327. s.charCodeAt(length - 4) !== 116 /* 't' */ ||
  328. s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
  329. s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
  330. s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
  331. s.charCodeAt(length - 8) !== 95 /* '_' */ ||
  332. s.charCodeAt(length - 9) !== 95 /* '_' */) {
  333. return false;
  334. }
  335. for (var i = length - 10; i >= 0; i--) {
  336. if (s.charCodeAt(i) !== 36 /* '$' */) {
  337. return false;
  338. }
  339. }
  340. return true;
  341. }
  342. /**
  343. * Comparator between two mappings where the original positions are compared.
  344. *
  345. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  346. * mappings with the same original source/line/column, but different generated
  347. * line and column the same. Useful when searching for a mapping with a
  348. * stubbed out mapping.
  349. */
  350. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  351. var cmp = strcmp(mappingA.source, mappingB.source);
  352. if (cmp !== 0) {
  353. return cmp;
  354. }
  355. cmp = mappingA.originalLine - mappingB.originalLine;
  356. if (cmp !== 0) {
  357. return cmp;
  358. }
  359. cmp = mappingA.originalColumn - mappingB.originalColumn;
  360. if (cmp !== 0 || onlyCompareOriginal) {
  361. return cmp;
  362. }
  363. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  364. if (cmp !== 0) {
  365. return cmp;
  366. }
  367. cmp = mappingA.generatedLine - mappingB.generatedLine;
  368. if (cmp !== 0) {
  369. return cmp;
  370. }
  371. return strcmp(mappingA.name, mappingB.name);
  372. }
  373. exports.compareByOriginalPositions = compareByOriginalPositions;
  374. /**
  375. * Comparator between two mappings with deflated source and name indices where
  376. * the generated positions are compared.
  377. *
  378. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  379. * mappings with the same generated line and column, but different
  380. * source/name/original line and column the same. Useful when searching for a
  381. * mapping with a stubbed out mapping.
  382. */
  383. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  384. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  385. if (cmp !== 0) {
  386. return cmp;
  387. }
  388. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  389. if (cmp !== 0 || onlyCompareGenerated) {
  390. return cmp;
  391. }
  392. cmp = strcmp(mappingA.source, mappingB.source);
  393. if (cmp !== 0) {
  394. return cmp;
  395. }
  396. cmp = mappingA.originalLine - mappingB.originalLine;
  397. if (cmp !== 0) {
  398. return cmp;
  399. }
  400. cmp = mappingA.originalColumn - mappingB.originalColumn;
  401. if (cmp !== 0) {
  402. return cmp;
  403. }
  404. return strcmp(mappingA.name, mappingB.name);
  405. }
  406. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  407. function strcmp(aStr1, aStr2) {
  408. if (aStr1 === aStr2) {
  409. return 0;
  410. }
  411. if (aStr1 === null) {
  412. return 1; // aStr2 !== null
  413. }
  414. if (aStr2 === null) {
  415. return -1; // aStr1 !== null
  416. }
  417. if (aStr1 > aStr2) {
  418. return 1;
  419. }
  420. return -1;
  421. }
  422. /**
  423. * Comparator between two mappings with inflated source and name strings where
  424. * the generated positions are compared.
  425. */
  426. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  427. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  428. if (cmp !== 0) {
  429. return cmp;
  430. }
  431. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  432. if (cmp !== 0) {
  433. return cmp;
  434. }
  435. cmp = strcmp(mappingA.source, mappingB.source);
  436. if (cmp !== 0) {
  437. return cmp;
  438. }
  439. cmp = mappingA.originalLine - mappingB.originalLine;
  440. if (cmp !== 0) {
  441. return cmp;
  442. }
  443. cmp = mappingA.originalColumn - mappingB.originalColumn;
  444. if (cmp !== 0) {
  445. return cmp;
  446. }
  447. return strcmp(mappingA.name, mappingB.name);
  448. }
  449. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  450. /**
  451. * Strip any JSON XSSI avoidance prefix from the string (as documented
  452. * in the source maps specification), and then parse the string as
  453. * JSON.
  454. */
  455. function parseSourceMapInput(str) {
  456. return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
  457. }
  458. exports.parseSourceMapInput = parseSourceMapInput;
  459. /**
  460. * Compute the URL of a source given the the source root, the source's
  461. * URL, and the source map's URL.
  462. */
  463. function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
  464. sourceURL = sourceURL || '';
  465. if (sourceRoot) {
  466. // This follows what Chrome does.
  467. if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
  468. sourceRoot += '/';
  469. }
  470. // The spec says:
  471. // Line 4: An optional source root, useful for relocating source
  472. // files on a server or removing repeated values in the
  473. // “sources” entry. This value is prepended to the individual
  474. // entries in the “source” field.
  475. sourceURL = sourceRoot + sourceURL;
  476. }
  477. // Historically, SourceMapConsumer did not take the sourceMapURL as
  478. // a parameter. This mode is still somewhat supported, which is why
  479. // this code block is conditional. However, it's preferable to pass
  480. // the source map URL to SourceMapConsumer, so that this function
  481. // can implement the source URL resolution algorithm as outlined in
  482. // the spec. This block is basically the equivalent of:
  483. // new URL(sourceURL, sourceMapURL).toString()
  484. // ... except it avoids using URL, which wasn't available in the
  485. // older releases of node still supported by this library.
  486. //
  487. // The spec says:
  488. // If the sources are not absolute URLs after prepending of the
  489. // “sourceRoot”, the sources are resolved relative to the
  490. // SourceMap (like resolving script src in a html document).
  491. if (sourceMapURL) {
  492. var parsed = urlParse(sourceMapURL);
  493. if (!parsed) {
  494. throw new Error("sourceMapURL could not be parsed");
  495. }
  496. if (parsed.path) {
  497. // Strip the last path component, but keep the "/".
  498. var index = parsed.path.lastIndexOf('/');
  499. if (index >= 0) {
  500. parsed.path = parsed.path.substring(0, index + 1);
  501. }
  502. }
  503. sourceURL = join(urlGenerate(parsed), sourceURL);
  504. }
  505. return normalize(sourceURL);
  506. }
  507. exports.computeSourceURL = computeSourceURL;
  508. /***/ }),
  509. /* 4 */
  510. /***/ (function(module, exports, __webpack_require__) {
  511. "use strict";
  512. Object.defineProperty(exports, "__esModule", {
  513. value: true
  514. });
  515. var _wurl = __webpack_require__(50);
  516. var _wurl2 = _interopRequireDefault(_wurl);
  517. var _os = __webpack_require__(51);
  518. var _os2 = _interopRequireDefault(_os);
  519. var _fs = __webpack_require__(1);
  520. var _fs2 = _interopRequireDefault(_fs);
  521. var _path = __webpack_require__(0);
  522. var _path2 = _interopRequireDefault(_path);
  523. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  524. var INJECT_CSS_PATH = _path2.default.join(__dirname, '..', 'inject/inject.css');
  525. var log = __webpack_require__(10);
  526. function isOSX() {
  527. return _os2.default.platform() === 'darwin';
  528. }
  529. function isLinux() {
  530. return _os2.default.platform() === 'linux';
  531. }
  532. function isWindows() {
  533. return _os2.default.platform() === 'win32';
  534. }
  535. function linkIsInternal(currentUrl, newUrl, internalUrlRegex) {
  536. if (newUrl === 'about:blank') {
  537. return true;
  538. }
  539. if (internalUrlRegex) {
  540. var regex = RegExp(internalUrlRegex);
  541. return regex.test(newUrl);
  542. }
  543. var currentDomain = (0, _wurl2.default)('domain', currentUrl);
  544. var newDomain = (0, _wurl2.default)('domain', newUrl);
  545. return currentDomain === newDomain;
  546. }
  547. function shouldInjectCss() {
  548. try {
  549. _fs2.default.accessSync(INJECT_CSS_PATH, _fs2.default.F_OK);
  550. return true;
  551. } catch (e) {
  552. return false;
  553. }
  554. }
  555. function getCssToInject() {
  556. return _fs2.default.readFileSync(INJECT_CSS_PATH).toString();
  557. }
  558. /**
  559. * Helper method to print debug messages from the main process in the browser window
  560. * @param {BrowserWindow} browserWindow
  561. * @param message
  562. */
  563. function debugLog(browserWindow, message) {
  564. // need the timeout as it takes time for the preload javascript to be loaded in the window
  565. setTimeout(function () {
  566. browserWindow.webContents.send('debug', message);
  567. }, 3000);
  568. log.info(message);
  569. }
  570. function getAppIcon() {
  571. return _path2.default.join(__dirname, '../', `/icon.${isWindows() ? 'ico' : 'png'}`);
  572. }
  573. function nativeTabsSupported() {
  574. return isOSX();
  575. }
  576. function getCounterValue(title) {
  577. var itemCountRegex = /[([{]([\d.,]*)\+?[}\])]/;
  578. var match = itemCountRegex.exec(title);
  579. return match ? match[1] : undefined;
  580. }
  581. exports.default = {
  582. isOSX,
  583. isLinux,
  584. isWindows,
  585. linkIsInternal,
  586. getCssToInject,
  587. debugLog,
  588. shouldInjectCss,
  589. getAppIcon,
  590. nativeTabsSupported,
  591. getCounterValue
  592. };
  593. /***/ }),
  594. /* 5 */
  595. /***/ (function(module, exports, __webpack_require__) {
  596. /* -*- Mode: js; js-indent-level: 2; -*- */
  597. /*
  598. * Copyright 2011 Mozilla Foundation and contributors
  599. * Licensed under the New BSD license. See LICENSE or:
  600. * http://opensource.org/licenses/BSD-3-Clause
  601. */
  602. var base64VLQ = __webpack_require__(6);
  603. var util = __webpack_require__(3);
  604. var ArraySet = __webpack_require__(7).ArraySet;
  605. var MappingList = __webpack_require__(16).MappingList;
  606. /**
  607. * An instance of the SourceMapGenerator represents a source map which is
  608. * being built incrementally. You may pass an object with the following
  609. * properties:
  610. *
  611. * - file: The filename of the generated source.
  612. * - sourceRoot: A root for all relative URLs in this source map.
  613. */
  614. function SourceMapGenerator(aArgs) {
  615. if (!aArgs) {
  616. aArgs = {};
  617. }
  618. this._file = util.getArg(aArgs, 'file', null);
  619. this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
  620. this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
  621. this._sources = new ArraySet();
  622. this._names = new ArraySet();
  623. this._mappings = new MappingList();
  624. this._sourcesContents = null;
  625. }
  626. SourceMapGenerator.prototype._version = 3;
  627. /**
  628. * Creates a new SourceMapGenerator based on a SourceMapConsumer
  629. *
  630. * @param aSourceMapConsumer The SourceMap.
  631. */
  632. SourceMapGenerator.fromSourceMap =
  633. function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  634. var sourceRoot = aSourceMapConsumer.sourceRoot;
  635. var generator = new SourceMapGenerator({
  636. file: aSourceMapConsumer.file,
  637. sourceRoot: sourceRoot
  638. });
  639. aSourceMapConsumer.eachMapping(function (mapping) {
  640. var newMapping = {
  641. generated: {
  642. line: mapping.generatedLine,
  643. column: mapping.generatedColumn
  644. }
  645. };
  646. if (mapping.source != null) {
  647. newMapping.source = mapping.source;
  648. if (sourceRoot != null) {
  649. newMapping.source = util.relative(sourceRoot, newMapping.source);
  650. }
  651. newMapping.original = {
  652. line: mapping.originalLine,
  653. column: mapping.originalColumn
  654. };
  655. if (mapping.name != null) {
  656. newMapping.name = mapping.name;
  657. }
  658. }
  659. generator.addMapping(newMapping);
  660. });
  661. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  662. var sourceRelative = sourceFile;
  663. if (sourceRoot !== null) {
  664. sourceRelative = util.relative(sourceRoot, sourceFile);
  665. }
  666. if (!generator._sources.has(sourceRelative)) {
  667. generator._sources.add(sourceRelative);
  668. }
  669. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  670. if (content != null) {
  671. generator.setSourceContent(sourceFile, content);
  672. }
  673. });
  674. return generator;
  675. };
  676. /**
  677. * Add a single mapping from original source line and column to the generated
  678. * source's line and column for this source map being created. The mapping
  679. * object should have the following properties:
  680. *
  681. * - generated: An object with the generated line and column positions.
  682. * - original: An object with the original line and column positions.
  683. * - source: The original source file (relative to the sourceRoot).
  684. * - name: An optional original token name for this mapping.
  685. */
  686. SourceMapGenerator.prototype.addMapping =
  687. function SourceMapGenerator_addMapping(aArgs) {
  688. var generated = util.getArg(aArgs, 'generated');
  689. var original = util.getArg(aArgs, 'original', null);
  690. var source = util.getArg(aArgs, 'source', null);
  691. var name = util.getArg(aArgs, 'name', null);
  692. if (!this._skipValidation) {
  693. this._validateMapping(generated, original, source, name);
  694. }
  695. if (source != null) {
  696. source = String(source);
  697. if (!this._sources.has(source)) {
  698. this._sources.add(source);
  699. }
  700. }
  701. if (name != null) {
  702. name = String(name);
  703. if (!this._names.has(name)) {
  704. this._names.add(name);
  705. }
  706. }
  707. this._mappings.add({
  708. generatedLine: generated.line,
  709. generatedColumn: generated.column,
  710. originalLine: original != null && original.line,
  711. originalColumn: original != null && original.column,
  712. source: source,
  713. name: name
  714. });
  715. };
  716. /**
  717. * Set the source content for a source file.
  718. */
  719. SourceMapGenerator.prototype.setSourceContent =
  720. function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  721. var source = aSourceFile;
  722. if (this._sourceRoot != null) {
  723. source = util.relative(this._sourceRoot, source);
  724. }
  725. if (aSourceContent != null) {
  726. // Add the source content to the _sourcesContents map.
  727. // Create a new _sourcesContents map if the property is null.
  728. if (!this._sourcesContents) {
  729. this._sourcesContents = Object.create(null);
  730. }
  731. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  732. } else if (this._sourcesContents) {
  733. // Remove the source file from the _sourcesContents map.
  734. // If the _sourcesContents map is empty, set the property to null.
  735. delete this._sourcesContents[util.toSetString(source)];
  736. if (Object.keys(this._sourcesContents).length === 0) {
  737. this._sourcesContents = null;
  738. }
  739. }
  740. };
  741. /**
  742. * Applies the mappings of a sub-source-map for a specific source file to the
  743. * source map being generated. Each mapping to the supplied source file is
  744. * rewritten using the supplied source map. Note: The resolution for the
  745. * resulting mappings is the minimium of this map and the supplied map.
  746. *
  747. * @param aSourceMapConsumer The source map to be applied.
  748. * @param aSourceFile Optional. The filename of the source file.
  749. * If omitted, SourceMapConsumer's file property will be used.
  750. * @param aSourceMapPath Optional. The dirname of the path to the source map
  751. * to be applied. If relative, it is relative to the SourceMapConsumer.
  752. * This parameter is needed when the two source maps aren't in the same
  753. * directory, and the source map to be applied contains relative source
  754. * paths. If so, those relative source paths need to be rewritten
  755. * relative to the SourceMapGenerator.
  756. */
  757. SourceMapGenerator.prototype.applySourceMap =
  758. function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  759. var sourceFile = aSourceFile;
  760. // If aSourceFile is omitted, we will use the file property of the SourceMap
  761. if (aSourceFile == null) {
  762. if (aSourceMapConsumer.file == null) {
  763. throw new Error(
  764. 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
  765. 'or the source map\'s "file" property. Both were omitted.'
  766. );
  767. }
  768. sourceFile = aSourceMapConsumer.file;
  769. }
  770. var sourceRoot = this._sourceRoot;
  771. // Make "sourceFile" relative if an absolute Url is passed.
  772. if (sourceRoot != null) {
  773. sourceFile = util.relative(sourceRoot, sourceFile);
  774. }
  775. // Applying the SourceMap can add and remove items from the sources and
  776. // the names array.
  777. var newSources = new ArraySet();
  778. var newNames = new ArraySet();
  779. // Find mappings for the "sourceFile"
  780. this._mappings.unsortedForEach(function (mapping) {
  781. if (mapping.source === sourceFile && mapping.originalLine != null) {
  782. // Check if it can be mapped by the source map, then update the mapping.
  783. var original = aSourceMapConsumer.originalPositionFor({
  784. line: mapping.originalLine,
  785. column: mapping.originalColumn
  786. });
  787. if (original.source != null) {
  788. // Copy mapping
  789. mapping.source = original.source;
  790. if (aSourceMapPath != null) {
  791. mapping.source = util.join(aSourceMapPath, mapping.source)
  792. }
  793. if (sourceRoot != null) {
  794. mapping.source = util.relative(sourceRoot, mapping.source);
  795. }
  796. mapping.originalLine = original.line;
  797. mapping.originalColumn = original.column;
  798. if (original.name != null) {
  799. mapping.name = original.name;
  800. }
  801. }
  802. }
  803. var source = mapping.source;
  804. if (source != null && !newSources.has(source)) {
  805. newSources.add(source);
  806. }
  807. var name = mapping.name;
  808. if (name != null && !newNames.has(name)) {
  809. newNames.add(name);
  810. }
  811. }, this);
  812. this._sources = newSources;
  813. this._names = newNames;
  814. // Copy sourcesContents of applied map.
  815. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  816. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  817. if (content != null) {
  818. if (aSourceMapPath != null) {
  819. sourceFile = util.join(aSourceMapPath, sourceFile);
  820. }
  821. if (sourceRoot != null) {
  822. sourceFile = util.relative(sourceRoot, sourceFile);
  823. }
  824. this.setSourceContent(sourceFile, content);
  825. }
  826. }, this);
  827. };
  828. /**
  829. * A mapping can have one of the three levels of data:
  830. *
  831. * 1. Just the generated position.
  832. * 2. The Generated position, original position, and original source.
  833. * 3. Generated and original position, original source, as well as a name
  834. * token.
  835. *
  836. * To maintain consistency, we validate that any new mapping being added falls
  837. * in to one of these categories.
  838. */
  839. SourceMapGenerator.prototype._validateMapping =
  840. function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
  841. aName) {
  842. // When aOriginal is truthy but has empty values for .line and .column,
  843. // it is most likely a programmer error. In this case we throw a very
  844. // specific error message to try to guide them the right way.
  845. // For example: https://github.com/Polymer/polymer-bundler/pull/519
  846. if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
  847. throw new Error(
  848. 'original.line and original.column are not numbers -- you probably meant to omit ' +
  849. 'the original mapping entirely and only map the generated position. If so, pass ' +
  850. 'null for the original mapping instead of an object with empty or null values.'
  851. );
  852. }
  853. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
  854. && aGenerated.line > 0 && aGenerated.column >= 0
  855. && !aOriginal && !aSource && !aName) {
  856. // Case 1.
  857. return;
  858. }
  859. else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
  860. && aOriginal && 'line' in aOriginal && 'column' in aOriginal
  861. && aGenerated.line > 0 && aGenerated.column >= 0
  862. && aOriginal.line > 0 && aOriginal.column >= 0
  863. && aSource) {
  864. // Cases 2 and 3.
  865. return;
  866. }
  867. else {
  868. throw new Error('Invalid mapping: ' + JSON.stringify({
  869. generated: aGenerated,
  870. source: aSource,
  871. original: aOriginal,
  872. name: aName
  873. }));
  874. }
  875. };
  876. /**
  877. * Serialize the accumulated mappings in to the stream of base 64 VLQs
  878. * specified by the source map format.
  879. */
  880. SourceMapGenerator.prototype._serializeMappings =
  881. function SourceMapGenerator_serializeMappings() {
  882. var previousGeneratedColumn = 0;
  883. var previousGeneratedLine = 1;
  884. var previousOriginalColumn = 0;
  885. var previousOriginalLine = 0;
  886. var previousName = 0;
  887. var previousSource = 0;
  888. var result = '';
  889. var next;
  890. var mapping;
  891. var nameIdx;
  892. var sourceIdx;
  893. var mappings = this._mappings.toArray();
  894. for (var i = 0, len = mappings.length; i < len; i++) {
  895. mapping = mappings[i];
  896. next = ''
  897. if (mapping.generatedLine !== previousGeneratedLine) {
  898. previousGeneratedColumn = 0;
  899. while (mapping.generatedLine !== previousGeneratedLine) {
  900. next += ';';
  901. previousGeneratedLine++;
  902. }
  903. }
  904. else {
  905. if (i > 0) {
  906. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  907. continue;
  908. }
  909. next += ',';
  910. }
  911. }
  912. next += base64VLQ.encode(mapping.generatedColumn
  913. - previousGeneratedColumn);
  914. previousGeneratedColumn = mapping.generatedColumn;
  915. if (mapping.source != null) {
  916. sourceIdx = this._sources.indexOf(mapping.source);
  917. next += base64VLQ.encode(sourceIdx - previousSource);
  918. previousSource = sourceIdx;
  919. // lines are stored 0-based in SourceMap spec version 3
  920. next += base64VLQ.encode(mapping.originalLine - 1
  921. - previousOriginalLine);
  922. previousOriginalLine = mapping.originalLine - 1;
  923. next += base64VLQ.encode(mapping.originalColumn
  924. - previousOriginalColumn);
  925. previousOriginalColumn = mapping.originalColumn;
  926. if (mapping.name != null) {
  927. nameIdx = this._names.indexOf(mapping.name);
  928. next += base64VLQ.encode(nameIdx - previousName);
  929. previousName = nameIdx;
  930. }
  931. }
  932. result += next;
  933. }
  934. return result;
  935. };
  936. SourceMapGenerator.prototype._generateSourcesContent =
  937. function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  938. return aSources.map(function (source) {
  939. if (!this._sourcesContents) {
  940. return null;
  941. }
  942. if (aSourceRoot != null) {
  943. source = util.relative(aSourceRoot, source);
  944. }
  945. var key = util.toSetString(source);
  946. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
  947. ? this._sourcesContents[key]
  948. : null;
  949. }, this);
  950. };
  951. /**
  952. * Externalize the source map.
  953. */
  954. SourceMapGenerator.prototype.toJSON =
  955. function SourceMapGenerator_toJSON() {
  956. var map = {
  957. version: this._version,
  958. sources: this._sources.toArray(),
  959. names: this._names.toArray(),
  960. mappings: this._serializeMappings()
  961. };
  962. if (this._file != null) {
  963. map.file = this._file;
  964. }
  965. if (this._sourceRoot != null) {
  966. map.sourceRoot = this._sourceRoot;
  967. }
  968. if (this._sourcesContents) {
  969. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  970. }
  971. return map;
  972. };
  973. /**
  974. * Render the source map being generated to a string.
  975. */
  976. SourceMapGenerator.prototype.toString =
  977. function SourceMapGenerator_toString() {
  978. return JSON.stringify(this.toJSON());
  979. };
  980. exports.SourceMapGenerator = SourceMapGenerator;
  981. /***/ }),
  982. /* 6 */
  983. /***/ (function(module, exports, __webpack_require__) {
  984. /* -*- Mode: js; js-indent-level: 2; -*- */
  985. /*
  986. * Copyright 2011 Mozilla Foundation and contributors
  987. * Licensed under the New BSD license. See LICENSE or:
  988. * http://opensource.org/licenses/BSD-3-Clause
  989. *
  990. * Based on the Base 64 VLQ implementation in Closure Compiler:
  991. * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
  992. *
  993. * Copyright 2011 The Closure Compiler Authors. All rights reserved.
  994. * Redistribution and use in source and binary forms, with or without
  995. * modification, are permitted provided that the following conditions are
  996. * met:
  997. *
  998. * * Redistributions of source code must retain the above copyright
  999. * notice, this list of conditions and the following disclaimer.
  1000. * * Redistributions in binary form must reproduce the above
  1001. * copyright notice, this list of conditions and the following
  1002. * disclaimer in the documentation and/or other materials provided
  1003. * with the distribution.
  1004. * * Neither the name of Google Inc. nor the names of its
  1005. * contributors may be used to endorse or promote products derived
  1006. * from this software without specific prior written permission.
  1007. *
  1008. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  1009. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  1010. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  1011. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  1012. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  1013. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1014. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1015. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1016. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1017. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  1018. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1019. */
  1020. var base64 = __webpack_require__(15);
  1021. // A single base 64 digit can contain 6 bits of data. For the base 64 variable
  1022. // length quantities we use in the source map spec, the first bit is the sign,
  1023. // the next four bits are the actual value, and the 6th bit is the
  1024. // continuation bit. The continuation bit tells us whether there are more
  1025. // digits in this value following this digit.
  1026. //
  1027. // Continuation
  1028. // | Sign
  1029. // | |
  1030. // V V
  1031. // 101011
  1032. var VLQ_BASE_SHIFT = 5;
  1033. // binary: 100000
  1034. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  1035. // binary: 011111
  1036. var VLQ_BASE_MASK = VLQ_BASE - 1;
  1037. // binary: 100000
  1038. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  1039. /**
  1040. * Converts from a two-complement value to a value where the sign bit is
  1041. * placed in the least significant bit. For example, as decimals:
  1042. * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
  1043. * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
  1044. */
  1045. function toVLQSigned(aValue) {
  1046. return aValue < 0
  1047. ? ((-aValue) << 1) + 1
  1048. : (aValue << 1) + 0;
  1049. }
  1050. /**
  1051. * Converts to a two-complement value from a value where the sign bit is
  1052. * placed in the least significant bit. For example, as decimals:
  1053. * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
  1054. * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
  1055. */
  1056. function fromVLQSigned(aValue) {
  1057. var isNegative = (aValue & 1) === 1;
  1058. var shifted = aValue >> 1;
  1059. return isNegative
  1060. ? -shifted
  1061. : shifted;
  1062. }
  1063. /**
  1064. * Returns the base 64 VLQ encoded value.
  1065. */
  1066. exports.encode = function base64VLQ_encode(aValue) {
  1067. var encoded = "";
  1068. var digit;
  1069. var vlq = toVLQSigned(aValue);
  1070. do {
  1071. digit = vlq & VLQ_BASE_MASK;
  1072. vlq >>>= VLQ_BASE_SHIFT;
  1073. if (vlq > 0) {
  1074. // There are still more digits in this value, so we must make sure the
  1075. // continuation bit is marked.
  1076. digit |= VLQ_CONTINUATION_BIT;
  1077. }
  1078. encoded += base64.encode(digit);
  1079. } while (vlq > 0);
  1080. return encoded;
  1081. };
  1082. /**
  1083. * Decodes the next base 64 VLQ value from the given string and returns the
  1084. * value and the rest of the string via the out parameter.
  1085. */
  1086. exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  1087. var strLen = aStr.length;
  1088. var result = 0;
  1089. var shift = 0;
  1090. var continuation, digit;
  1091. do {
  1092. if (aIndex >= strLen) {
  1093. throw new Error("Expected more digits in base 64 VLQ value.");
  1094. }
  1095. digit = base64.decode(aStr.charCodeAt(aIndex++));
  1096. if (digit === -1) {
  1097. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  1098. }
  1099. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  1100. digit &= VLQ_BASE_MASK;
  1101. result = result + (digit << shift);
  1102. shift += VLQ_BASE_SHIFT;
  1103. } while (continuation);
  1104. aOutParam.value = fromVLQSigned(result);
  1105. aOutParam.rest = aIndex;
  1106. };
  1107. /***/ }),
  1108. /* 7 */
  1109. /***/ (function(module, exports, __webpack_require__) {
  1110. /* -*- Mode: js; js-indent-level: 2; -*- */
  1111. /*
  1112. * Copyright 2011 Mozilla Foundation and contributors
  1113. * Licensed under the New BSD license. See LICENSE or:
  1114. * http://opensource.org/licenses/BSD-3-Clause
  1115. */
  1116. var util = __webpack_require__(3);
  1117. var has = Object.prototype.hasOwnProperty;
  1118. var hasNativeMap = typeof Map !== "undefined";
  1119. /**
  1120. * A data structure which is a combination of an array and a set. Adding a new
  1121. * member is O(1), testing for membership is O(1), and finding the index of an
  1122. * element is O(1). Removing elements from the set is not supported. Only
  1123. * strings are supported for membership.
  1124. */
  1125. function ArraySet() {
  1126. this._array = [];
  1127. this._set = hasNativeMap ? new Map() : Object.create(null);
  1128. }
  1129. /**
  1130. * Static method for creating ArraySet instances from an existing array.
  1131. */
  1132. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  1133. var set = new ArraySet();
  1134. for (var i = 0, len = aArray.length; i < len; i++) {
  1135. set.add(aArray[i], aAllowDuplicates);
  1136. }
  1137. return set;
  1138. };
  1139. /**
  1140. * Return how many unique items are in this ArraySet. If duplicates have been
  1141. * added, than those do not count towards the size.
  1142. *
  1143. * @returns Number
  1144. */
  1145. ArraySet.prototype.size = function ArraySet_size() {
  1146. return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  1147. };
  1148. /**
  1149. * Add the given string to this set.
  1150. *
  1151. * @param String aStr
  1152. */
  1153. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  1154. var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
  1155. var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
  1156. var idx = this._array.length;
  1157. if (!isDuplicate || aAllowDuplicates) {
  1158. this._array.push(aStr);
  1159. }
  1160. if (!isDuplicate) {
  1161. if (hasNativeMap) {
  1162. this._set.set(aStr, idx);
  1163. } else {
  1164. this._set[sStr] = idx;
  1165. }
  1166. }
  1167. };
  1168. /**
  1169. * Is the given string a member of this set?
  1170. *
  1171. * @param String aStr
  1172. */
  1173. ArraySet.prototype.has = function ArraySet_has(aStr) {
  1174. if (hasNativeMap) {
  1175. return this._set.has(aStr);
  1176. } else {
  1177. var sStr = util.toSetString(aStr);
  1178. return has.call(this._set, sStr);
  1179. }
  1180. };
  1181. /**
  1182. * What is the index of the given string in the array?
  1183. *
  1184. * @param String aStr
  1185. */
  1186. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  1187. if (hasNativeMap) {
  1188. var idx = this._set.get(aStr);
  1189. if (idx >= 0) {
  1190. return idx;
  1191. }
  1192. } else {
  1193. var sStr = util.toSetString(aStr);
  1194. if (has.call(this._set, sStr)) {
  1195. return this._set[sStr];
  1196. }
  1197. }
  1198. throw new Error('"' + aStr + '" is not in the set.');
  1199. };
  1200. /**
  1201. * What is the element at the given index?
  1202. *
  1203. * @param Number aIdx
  1204. */
  1205. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  1206. if (aIdx >= 0 && aIdx < this._array.length) {
  1207. return this._array[aIdx];
  1208. }
  1209. throw new Error('No element indexed by ' + aIdx);
  1210. };
  1211. /**
  1212. * Returns the array representation of this set (which has the proper indices
  1213. * indicated by indexOf). Note that this is a copy of the internal array used
  1214. * for storing the members so that no one can mess with internal state.
  1215. */
  1216. ArraySet.prototype.toArray = function ArraySet_toArray() {
  1217. return this._array.slice();
  1218. };
  1219. exports.ArraySet = ArraySet;
  1220. /***/ }),
  1221. /* 8 */
  1222. /***/ (function(module, exports, __webpack_require__) {
  1223. "use strict";
  1224. const path = __webpack_require__(0);
  1225. const electron = __webpack_require__(2);
  1226. const unusedFilename = __webpack_require__(23);
  1227. const pupa = __webpack_require__(26);
  1228. const extName = __webpack_require__(27);
  1229. const {app, shell} = electron;
  1230. function getFilenameFromMime(name, mime) {
  1231. const exts = extName.mime(mime);
  1232. if (exts.length !== 1) {
  1233. return name;
  1234. }
  1235. return `${name}.${exts[0].ext}`;
  1236. }
  1237. function registerListener(session, options, cb = () => {}) {
  1238. const downloadItems = new Set();
  1239. let receivedBytes = 0;
  1240. let completedBytes = 0;
  1241. let totalBytes = 0;
  1242. const activeDownloadItems = () => downloadItems.size;
  1243. const progressDownloadItems = () => receivedBytes / totalBytes;
  1244. options = Object.assign({
  1245. showBadge: true
  1246. }, options);
  1247. const listener = (e, item, webContents) => {
  1248. downloadItems.add(item);
  1249. totalBytes += item.getTotalBytes();
  1250. let hostWebContents = webContents;
  1251. if (webContents.getType() === 'webview') {
  1252. ({hostWebContents} = webContents);
  1253. }
  1254. const win = electron.BrowserWindow.fromWebContents(hostWebContents);
  1255. const dir = options.directory || app.getPath('downloads');
  1256. let filePath;
  1257. if (options.filename) {
  1258. filePath = path.join(dir, options.filename);
  1259. } else {
  1260. const filename = item.getFilename();
  1261. const name = path.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType());
  1262. filePath = unusedFilename.sync(path.join(dir, name));
  1263. }
  1264. const errorMessage = options.errorMessage || 'The download of {filename} was interrupted';
  1265. const errorTitle = options.errorTitle || 'Download Error';
  1266. if (!options.saveAs) {
  1267. item.setSavePath(filePath);
  1268. }
  1269. if (typeof options.onStarted === 'function') {
  1270. options.onStarted(item);
  1271. }
  1272. item.on('updated', () => {
  1273. receivedBytes = [...downloadItems].reduce((receivedBytes, item) => {
  1274. receivedBytes += item.getReceivedBytes();
  1275. return receivedBytes;
  1276. }, completedBytes);
  1277. if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) {
  1278. app.setBadgeCount(activeDownloadItems());
  1279. }
  1280. if (!win.isDestroyed()) {
  1281. win.setProgressBar(progressDownloadItems());
  1282. }
  1283. if (typeof options.onProgress === 'function') {
  1284. options.onProgress(progressDownloadItems());
  1285. }
  1286. });
  1287. item.on('done', (e, state) => {
  1288. completedBytes += item.getTotalBytes();
  1289. downloadItems.delete(item);
  1290. if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) {
  1291. app.setBadgeCount(activeDownloadItems());
  1292. }
  1293. if (!win.isDestroyed() && !activeDownloadItems()) {
  1294. win.setProgressBar(-1);
  1295. receivedBytes = 0;
  1296. completedBytes = 0;
  1297. totalBytes = 0;
  1298. }
  1299. if (options.unregisterWhenDone) {
  1300. session.removeListener('will-download', listener);
  1301. }
  1302. if (state === 'cancelled') {
  1303. if (typeof options.onCancel === 'function') {
  1304. options.onCancel(item);
  1305. }
  1306. } else if (state === 'interrupted') {
  1307. const message = pupa(errorMessage, {filename: item.getFilename()});
  1308. electron.dialog.showErrorBox(errorTitle, message);
  1309. cb(new Error(message));
  1310. } else if (state === 'completed') {
  1311. if (process.platform === 'darwin') {
  1312. app.dock.downloadFinished(filePath);
  1313. }
  1314. if (options.openFolderWhenDone) {
  1315. shell.showItemInFolder(path.join(dir, item.getFilename()));
  1316. }
  1317. cb(null, item);
  1318. }
  1319. });
  1320. };
  1321. session.on('will-download', listener);
  1322. }
  1323. module.exports = (options = {}) => {
  1324. app.on('session-created', session => {
  1325. registerListener(session, options);
  1326. });
  1327. };
  1328. module.exports.download = (win, url, options) => new Promise((resolve, reject) => {
  1329. options = Object.assign({}, options, {unregisterWhenDone: true});
  1330. registerListener(win.webContents.session, options, (err, item) => {
  1331. if (err) {
  1332. reject(err);
  1333. } else {
  1334. resolve(item);
  1335. }
  1336. });
  1337. win.webContents.downloadURL(url);
  1338. });
  1339. /***/ }),
  1340. /* 9 */
  1341. /***/ (function(module, exports, __webpack_require__) {
  1342. "use strict";
  1343. var fs = __webpack_require__(1)
  1344. module.exports = clone(fs)
  1345. function clone (obj) {
  1346. if (obj === null || typeof obj !== 'object')
  1347. return obj
  1348. if (obj instanceof Object)
  1349. var copy = { __proto__: obj.__proto__ }
  1350. else
  1351. var copy = Object.create(null)
  1352. Object.getOwnPropertyNames(obj).forEach(function (key) {
  1353. Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
  1354. })
  1355. return copy
  1356. }
  1357. /***/ }),
  1358. /* 10 */
  1359. /***/ (function(module, exports, __webpack_require__) {
  1360. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
  1361. * loglevel - https://github.com/pimterry/loglevel
  1362. *
  1363. * Copyright (c) 2013 Tim Perry
  1364. * Licensed under the MIT license.
  1365. */
  1366. (function (root, definition) {
  1367. "use strict";
  1368. if (true) {
  1369. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),
  1370. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  1371. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  1372. __WEBPACK_AMD_DEFINE_FACTORY__),
  1373. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  1374. } else if (typeof module === 'object' && module.exports) {
  1375. module.exports = definition();
  1376. } else {
  1377. root.log = definition();
  1378. }
  1379. }(this, function () {
  1380. "use strict";
  1381. // Slightly dubious tricks to cut down minimized file size
  1382. var noop = function() {};
  1383. var undefinedType = "undefined";
  1384. var logMethods = [
  1385. "trace",
  1386. "debug",
  1387. "info",
  1388. "warn",
  1389. "error"
  1390. ];
  1391. // Cross-browser bind equivalent that works at least back to IE6
  1392. function bindMethod(obj, methodName) {
  1393. var method = obj[methodName];
  1394. if (typeof method.bind === 'function') {
  1395. return method.bind(obj);
  1396. } else {
  1397. try {
  1398. return Function.prototype.bind.call(method, obj);
  1399. } catch (e) {
  1400. // Missing bind shim or IE8 + Modernizr, fallback to wrapping
  1401. return function() {
  1402. return Function.prototype.apply.apply(method, [obj, arguments]);
  1403. };
  1404. }
  1405. }
  1406. }
  1407. // Build the best logging method possible for this env
  1408. // Wherever possible we want to bind, not wrap, to preserve stack traces
  1409. function realMethod(methodName) {
  1410. if (methodName === 'debug') {
  1411. methodName = 'log';
  1412. }
  1413. if (typeof console === undefinedType) {
  1414. return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
  1415. } else if (console[methodName] !== undefined) {
  1416. return bindMethod(console, methodName);
  1417. } else if (console.log !== undefined) {
  1418. return bindMethod(console, 'log');
  1419. } else {
  1420. return noop;
  1421. }
  1422. }
  1423. // These private functions always need `this` to be set properly
  1424. function replaceLoggingMethods(level, loggerName) {
  1425. /*jshint validthis:true */
  1426. for (var i = 0; i < logMethods.length; i++) {
  1427. var methodName = logMethods[i];
  1428. this[methodName] = (i < level) ?
  1429. noop :
  1430. this.methodFactory(methodName, level, loggerName);
  1431. }
  1432. // Define log.log as an alias for log.debug
  1433. this.log = this.debug;
  1434. }
  1435. // In old IE versions, the console isn't present until you first open it.
  1436. // We build realMethod() replacements here that regenerate logging methods
  1437. function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
  1438. return function () {
  1439. if (typeof console !== undefinedType) {
  1440. replaceLoggingMethods.call(this, level, loggerName);
  1441. this[methodName].apply(this, arguments);
  1442. }
  1443. };
  1444. }
  1445. // By default, we use closely bound real methods wherever possible, and
  1446. // otherwise we wait for a console to appear, and then try again.
  1447. function defaultMethodFactory(methodName, level, loggerName) {
  1448. /*jshint validthis:true */
  1449. return realMethod(methodName) ||
  1450. enableLoggingWhenConsoleArrives.apply(this, arguments);
  1451. }
  1452. function Logger(name, defaultLevel, factory) {
  1453. var self = this;
  1454. var currentLevel;
  1455. var storageKey = "loglevel";
  1456. if (name) {
  1457. storageKey += ":" + name;
  1458. }
  1459. function persistLevelIfPossible(levelNum) {
  1460. var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
  1461. if (typeof window === undefinedType) return;
  1462. // Use localStorage if available
  1463. try {
  1464. window.localStorage[storageKey] = levelName;
  1465. return;
  1466. } catch (ignore) {}
  1467. // Use session cookie as fallback
  1468. try {
  1469. window.document.cookie =
  1470. encodeURIComponent(storageKey) + "=" + levelName + ";";
  1471. } catch (ignore) {}
  1472. }
  1473. function getPersistedLevel() {
  1474. var storedLevel;
  1475. if (typeof window === undefinedType) return;
  1476. try {
  1477. storedLevel = window.localStorage[storageKey];
  1478. } catch (ignore) {}
  1479. // Fallback to cookies if local storage gives us nothing
  1480. if (typeof storedLevel === undefinedType) {
  1481. try {
  1482. var cookie = window.document.cookie;
  1483. var location = cookie.indexOf(
  1484. encodeURIComponent(storageKey) + "=");
  1485. if (location !== -1) {
  1486. storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
  1487. }
  1488. } catch (ignore) {}
  1489. }
  1490. // If the stored level is not valid, treat it as if nothing was stored.
  1491. if (self.levels[storedLevel] === undefined) {
  1492. storedLevel = undefined;
  1493. }
  1494. return storedLevel;
  1495. }
  1496. /*
  1497. *
  1498. * Public logger API - see https://github.com/pimterry/loglevel for details
  1499. *
  1500. */
  1501. self.name = name;
  1502. self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
  1503. "ERROR": 4, "SILENT": 5};
  1504. self.methodFactory = factory || defaultMethodFactory;
  1505. self.getLevel = function () {
  1506. return currentLevel;
  1507. };
  1508. self.setLevel = function (level, persist) {
  1509. if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
  1510. level = self.levels[level.toUpperCase()];
  1511. }
  1512. if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
  1513. currentLevel = level;
  1514. if (persist !== false) { // defaults to true
  1515. persistLevelIfPossible(level);
  1516. }
  1517. replaceLoggingMethods.call(self, level, name);
  1518. if (typeof console === undefinedType && level < self.levels.SILENT) {
  1519. return "No console available for logging";
  1520. }
  1521. } else {
  1522. throw "log.setLevel() called with invalid level: " + level;
  1523. }
  1524. };
  1525. self.setDefaultLevel = function (level) {
  1526. if (!getPersistedLevel()) {
  1527. self.setLevel(level, false);
  1528. }
  1529. };
  1530. self.enableAll = function(persist) {
  1531. self.setLevel(self.levels.TRACE, persist);
  1532. };
  1533. self.disableAll = function(persist) {
  1534. self.setLevel(self.levels.SILENT, persist);
  1535. };
  1536. // Initialize with the right level
  1537. var initialLevel = getPersistedLevel();
  1538. if (initialLevel == null) {
  1539. initialLevel = defaultLevel == null ? "WARN" : defaultLevel;
  1540. }
  1541. self.setLevel(initialLevel, false);
  1542. }
  1543. /*
  1544. *
  1545. * Top-level API
  1546. *
  1547. */
  1548. var defaultLogger = new Logger();
  1549. var _loggersByName = {};
  1550. defaultLogger.getLogger = function getLogger(name) {
  1551. if (typeof name !== "string" || name === "") {
  1552. throw new TypeError("You must supply a name when creating a logger.");
  1553. }
  1554. var logger = _loggersByName[name];
  1555. if (!logger) {
  1556. logger = _loggersByName[name] = new Logger(
  1557. name, defaultLogger.getLevel(), defaultLogger.methodFactory);
  1558. }
  1559. return logger;
  1560. };
  1561. // Grab the current global log variable in case of overwrite
  1562. var _log = (typeof window !== undefinedType) ? window.log : undefined;
  1563. defaultLogger.noConflict = function() {
  1564. if (typeof window !== undefinedType &&
  1565. window.log === defaultLogger) {
  1566. window.log = _log;
  1567. }
  1568. return defaultLogger;
  1569. };
  1570. defaultLogger.getLoggers = function getLoggers() {
  1571. return _loggersByName;
  1572. };
  1573. return defaultLogger;
  1574. }));
  1575. /***/ }),
  1576. /* 11 */
  1577. /***/ (function(module, exports, __webpack_require__) {
  1578. "use strict";
  1579. __webpack_require__(12);
  1580. var _fs = __webpack_require__(1);
  1581. var _fs2 = _interopRequireDefault(_fs);
  1582. var _path = __webpack_require__(0);
  1583. var _path2 = _interopRequireDefault(_path);
  1584. var _electron = __webpack_require__(2);
  1585. var _electronDl = __webpack_require__(8);
  1586. var _electronDl2 = _interopRequireDefault(_electronDl);
  1587. var _loginWindow = __webpack_require__(34);
  1588. var _loginWindow2 = _interopRequireDefault(_loginWindow);
  1589. var _mainWindow = __webpack_require__(35);
  1590. var _mainWindow2 = _interopRequireDefault(_mainWindow);
  1591. var _trayIcon = __webpack_require__(56);
  1592. var _trayIcon2 = _interopRequireDefault(_trayIcon);
  1593. var _helpers = __webpack_require__(4);
  1594. var _helpers2 = _interopRequireDefault(_helpers);
  1595. var _inferFlash = __webpack_require__(57);
  1596. var _inferFlash2 = _interopRequireDefault(_inferFlash);
  1597. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  1598. var isOSX = _helpers2.default.isOSX;
  1599. var APP_ARGS_FILE_PATH = _path2.default.join(__dirname, '..', 'nativefier.json');
  1600. var appArgs = JSON.parse(_fs2.default.readFileSync(APP_ARGS_FILE_PATH, 'utf8'));
  1601. var fileDownloadOptions = Object.assign({}, appArgs.fileDownloadOptions);
  1602. (0, _electronDl2.default)(fileDownloadOptions);
  1603. if (appArgs.processEnvs) {
  1604. Object.keys(appArgs.processEnvs).forEach(function (key) {
  1605. /* eslint-env node */
  1606. process.env[key] = appArgs.processEnvs[key];
  1607. });
  1608. }
  1609. var mainWindow = void 0;
  1610. if (typeof appArgs.flashPluginDir === 'string') {
  1611. _electron.app.commandLine.appendSwitch('ppapi-flash-path', appArgs.flashPluginDir);
  1612. } else if (appArgs.flashPluginDir) {
  1613. var flashPath = (0, _inferFlash2.default)();
  1614. _electron.app.commandLine.appendSwitch('ppapi-flash-path', flashPath);
  1615. }
  1616. if (appArgs.ignoreCertificate) {
  1617. _electron.app.commandLine.appendSwitch('ignore-certificate-errors');
  1618. }
  1619. if (appArgs.disableGpu) {
  1620. _electron.app.disableHardwareAcceleration();
  1621. }
  1622. if (appArgs.ignoreGpuBlacklist) {
  1623. _electron.app.commandLine.appendSwitch('ignore-gpu-blacklist');
  1624. }
  1625. if (appArgs.enableEs3Apis) {
  1626. _electron.app.commandLine.appendSwitch('enable-es3-apis');
  1627. }
  1628. if (appArgs.diskCacheSize) {
  1629. _electron.app.commandLine.appendSwitch('disk-cache-size', appArgs.diskCacheSize);
  1630. }
  1631. if (appArgs.basicAuthUsername) {
  1632. _electron.app.commandLine.appendSwitch('basic-auth-username', appArgs.basicAuthUsername);
  1633. }
  1634. if (appArgs.basicAuthPassword) {
  1635. _electron.app.commandLine.appendSwitch('basic-auth-password', appArgs.basicAuthPassword);
  1636. }
  1637. // do nothing for setDockBadge if not OSX
  1638. var setDockBadge = function setDockBadge() {};
  1639. if (isOSX()) {
  1640. var currentBadgeCount = 0;
  1641. setDockBadge = function setDockBadge(count) {
  1642. var bounce = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1643. _electron.app.dock.setBadge(count);
  1644. if (bounce && count > currentBadgeCount) _electron.app.dock.bounce();
  1645. currentBadgeCount = count;
  1646. };
  1647. }
  1648. _electron.app.on('window-all-closed', function () {
  1649. if (!isOSX() || appArgs.fastQuit) {
  1650. _electron.app.quit();
  1651. }
  1652. });
  1653. _electron.app.on('activate', function (event, hasVisibleWindows) {
  1654. if (isOSX()) {
  1655. // this is called when the dock is clicked
  1656. if (!hasVisibleWindows) {
  1657. mainWindow.show();
  1658. }
  1659. }
  1660. });
  1661. _electron.app.on('before-quit', function () {
  1662. // not fired when the close button on the window is clicked
  1663. if (isOSX()) {
  1664. // need to force a quit as a workaround here to simulate the osx app hiding behaviour
  1665. // Somehow sokution at https://github.com/atom/electron/issues/444#issuecomment-76492576 does not work,
  1666. // e.prevent default appears to persist
  1667. // might cause issues in the future as before-quit and will-quit events are not called
  1668. _electron.app.exit(0);
  1669. }
  1670. });
  1671. if (appArgs.crashReporter) {
  1672. _electron.app.on('will-finish-launching', function () {
  1673. _electron.crashReporter.start({
  1674. companyName: appArgs.companyName || '',
  1675. productName: appArgs.name,
  1676. submitURL: appArgs.crashReporter,
  1677. uploadToServer: true
  1678. });
  1679. });
  1680. }
  1681. _electron.app.on('ready', function () {
  1682. mainWindow = (0, _mainWindow2.default)(appArgs, _electron.app.quit, setDockBadge);
  1683. (0, _trayIcon2.default)(appArgs, mainWindow);
  1684. });
  1685. _electron.app.on('new-window-for-tab', function () {
  1686. mainWindow.emit('new-tab');
  1687. });
  1688. _electron.app.on('login', function (event, webContents, request, authInfo, callback) {
  1689. // for http authentication
  1690. event.preventDefault();
  1691. if (appArgs.basicAuthUsername !== null && appArgs.basicAuthPassword !== null) {
  1692. callback(appArgs.basicAuthUsername, appArgs.basicAuthPassword);
  1693. } else {
  1694. (0, _loginWindow2.default)(callback);
  1695. }
  1696. });
  1697. if (appArgs.singleInstance) {
  1698. var shouldQuit = _electron.app.makeSingleInstance(function () {
  1699. // Someone tried to run a second instance, we should focus our window.
  1700. if (mainWindow) {
  1701. if (!mainWindow.isVisible()) {
  1702. // tray
  1703. mainWindow.show();
  1704. }
  1705. if (mainWindow.isMinimized()) {
  1706. // minimized
  1707. mainWindow.restore();
  1708. }
  1709. mainWindow.focus();
  1710. }
  1711. });
  1712. if (shouldQuit) {
  1713. _electron.app.quit();
  1714. }
  1715. }
  1716. /***/ }),
  1717. /* 12 */
  1718. /***/ (function(module, exports, __webpack_require__) {
  1719. __webpack_require__(13).install();
  1720. /***/ }),
  1721. /* 13 */
  1722. /***/ (function(module, exports, __webpack_require__) {
  1723. var SourceMapConsumer = __webpack_require__(14).SourceMapConsumer;
  1724. var path = __webpack_require__(0);
  1725. var fs;
  1726. try {
  1727. fs = __webpack_require__(1);
  1728. if (!fs.existsSync || !fs.readFileSync) {
  1729. // fs doesn't have all methods we need
  1730. fs = null;
  1731. }
  1732. } catch (err) {
  1733. /* nop */
  1734. }
  1735. var bufferFrom = __webpack_require__(21);
  1736. // Only install once if called multiple times
  1737. var errorFormatterInstalled = false;
  1738. var uncaughtShimInstalled = false;
  1739. // If true, the caches are reset before a stack trace formatting operation
  1740. var emptyCacheBetweenOperations = false;
  1741. // Supports {browser, node, auto}
  1742. var environment = "auto";
  1743. // Maps a file path to a string containing the file contents
  1744. var fileContentsCache = {};
  1745. // Maps a file path to a source map for that file
  1746. var sourceMapCache = {};
  1747. // Regex for detecting source maps
  1748. var reSourceMap = /^data:application\/json[^,]+base64,/;
  1749. // Priority list of retrieve handlers
  1750. var retrieveFileHandlers = [];
  1751. var retrieveMapHandlers = [];
  1752. function isInBrowser() {
  1753. if (environment === "browser")
  1754. return true;
  1755. if (environment === "node")
  1756. return false;
  1757. return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function') && !(window.require && window.module && window.process && window.process.type === "renderer"));
  1758. }
  1759. function hasGlobalProcessEventEmitter() {
  1760. return ((typeof process === 'object') && (process !== null) && (typeof process.on === 'function'));
  1761. }
  1762. function handlerExec(list) {
  1763. return function(arg) {
  1764. for (var i = 0; i < list.length; i++) {
  1765. var ret = list[i](arg);
  1766. if (ret) {
  1767. return ret;
  1768. }
  1769. }
  1770. return null;
  1771. };
  1772. }
  1773. var retrieveFile = handlerExec(retrieveFileHandlers);
  1774. retrieveFileHandlers.push(function(path) {
  1775. // Trim the path to make sure there is no extra whitespace.
  1776. path = path.trim();
  1777. if (/^file:/.test(path)) {
  1778. // existsSync/readFileSync can't handle file protocol, but once stripped, it works
  1779. path = path.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
  1780. return drive ?
  1781. '' : // file:///C:/dir/file -> C:/dir/file
  1782. '/'; // file:///root-dir/file -> /root-dir/file
  1783. });
  1784. }
  1785. if (path in fileContentsCache) {
  1786. return fileContentsCache[path];
  1787. }
  1788. var contents = null;
  1789. if (!fs) {
  1790. // Use SJAX if we are in the browser
  1791. var xhr = new XMLHttpRequest();
  1792. xhr.open('GET', path, false);
  1793. xhr.send(null);
  1794. var contents = null
  1795. if (xhr.readyState === 4 && xhr.status === 200) {
  1796. contents = xhr.responseText
  1797. }
  1798. } else if (fs.existsSync(path)) {
  1799. // Otherwise, use the filesystem
  1800. try {
  1801. contents = fs.readFileSync(path, 'utf8');
  1802. } catch (er) {
  1803. contents = '';
  1804. }
  1805. }
  1806. return fileContentsCache[path] = contents;
  1807. });
  1808. // Support URLs relative to a directory, but be careful about a protocol prefix
  1809. // in case we are in the browser (i.e. directories may start with "http://" or "file:///")
  1810. function supportRelativeURL(file, url) {
  1811. if (!file) return url;
  1812. var dir = path.dirname(file);
  1813. var match = /^\w+:\/\/[^\/]*/.exec(dir);
  1814. var protocol = match ? match[0] : '';
  1815. var startPath = dir.slice(protocol.length);
  1816. if (protocol && /^\/\w\:/.test(startPath)) {
  1817. // handle file:///C:/ paths
  1818. protocol += '/';
  1819. return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, '/');
  1820. }
  1821. return protocol + path.resolve(dir.slice(protocol.length), url);
  1822. }
  1823. function retrieveSourceMapURL(source) {
  1824. var fileData;
  1825. if (isInBrowser()) {
  1826. try {
  1827. var xhr = new XMLHttpRequest();
  1828. xhr.open('GET', source, false);
  1829. xhr.send(null);
  1830. fileData = xhr.readyState === 4 ? xhr.responseText : null;
  1831. // Support providing a sourceMappingURL via the SourceMap header
  1832. var sourceMapHeader = xhr.getResponseHeader("SourceMap") ||
  1833. xhr.getResponseHeader("X-SourceMap");
  1834. if (sourceMapHeader) {
  1835. return sourceMapHeader;
  1836. }
  1837. } catch (e) {
  1838. }
  1839. }
  1840. // Get the URL of the source map
  1841. fileData = retrieveFile(source);
  1842. var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;
  1843. // Keep executing the search to find the *last* sourceMappingURL to avoid
  1844. // picking up sourceMappingURLs from comments, strings, etc.
  1845. var lastMatch, match;
  1846. while (match = re.exec(fileData)) lastMatch = match;
  1847. if (!lastMatch) return null;
  1848. return lastMatch[1];
  1849. };
  1850. // Can be overridden by the retrieveSourceMap option to install. Takes a
  1851. // generated source filename; returns a {map, optional url} object, or null if
  1852. // there is no source map. The map field may be either a string or the parsed
  1853. // JSON object (ie, it must be a valid argument to the SourceMapConsumer
  1854. // constructor).
  1855. var retrieveSourceMap = handlerExec(retrieveMapHandlers);
  1856. retrieveMapHandlers.push(function(source) {
  1857. var sourceMappingURL = retrieveSourceMapURL(source);
  1858. if (!sourceMappingURL) return null;
  1859. // Read the contents of the source map
  1860. var sourceMapData;
  1861. if (reSourceMap.test(sourceMappingURL)) {
  1862. // Support source map URL as a data url
  1863. var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1);
  1864. sourceMapData = bufferFrom(rawData, "base64").toString();
  1865. sourceMappingURL = source;
  1866. } else {
  1867. // Support source map URLs relative to the source URL
  1868. sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
  1869. sourceMapData = retrieveFile(sourceMappingURL);
  1870. }
  1871. if (!sourceMapData) {
  1872. return null;
  1873. }
  1874. return {
  1875. url: sourceMappingURL,
  1876. map: sourceMapData
  1877. };
  1878. });
  1879. function mapSourcePosition(position) {
  1880. var sourceMap = sourceMapCache[position.source];
  1881. if (!sourceMap) {
  1882. // Call the (overrideable) retrieveSourceMap function to get the source map.
  1883. var urlAndMap = retrieveSourceMap(position.source);
  1884. if (urlAndMap) {
  1885. sourceMap = sourceMapCache[position.source] = {
  1886. url: urlAndMap.url,
  1887. map: new SourceMapConsumer(urlAndMap.map)
  1888. };
  1889. // Load all sources stored inline with the source map into the file cache
  1890. // to pretend like they are already loaded. They may not exist on disk.
  1891. if (sourceMap.map.sourcesContent) {
  1892. sourceMap.map.sources.forEach(function(source, i) {
  1893. var contents = sourceMap.map.sourcesContent[i];
  1894. if (contents) {
  1895. var url = supportRelativeURL(sourceMap.url, source);
  1896. fileContentsCache[url] = contents;
  1897. }
  1898. });
  1899. }
  1900. } else {
  1901. sourceMap = sourceMapCache[position.source] = {
  1902. url: null,
  1903. map: null
  1904. };
  1905. }
  1906. }
  1907. // Resolve the source URL relative to the URL of the source map
  1908. if (sourceMap && sourceMap.map) {
  1909. var originalPosition = sourceMap.map.originalPositionFor(position);
  1910. // Only return the original position if a matching line was found. If no
  1911. // matching line is found then we return position instead, which will cause
  1912. // the stack trace to print the path and line for the compiled file. It is
  1913. // better to give a precise location in the compiled file than a vague
  1914. // location in the original file.
  1915. if (originalPosition.source !== null) {
  1916. originalPosition.source = supportRelativeURL(
  1917. sourceMap.url, originalPosition.source);
  1918. return originalPosition;
  1919. }
  1920. }
  1921. return position;
  1922. }
  1923. // Parses code generated by FormatEvalOrigin(), a function inside V8:
  1924. // https://code.google.com/p/v8/source/browse/trunk/src/messages.js
  1925. function mapEvalOrigin(origin) {
  1926. // Most eval() calls are in this format
  1927. var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
  1928. if (match) {
  1929. var position = mapSourcePosition({
  1930. source: match[2],
  1931. line: +match[3],
  1932. column: match[4] - 1
  1933. });
  1934. return 'eval at ' + match[1] + ' (' + position.source + ':' +
  1935. position.line + ':' + (position.column + 1) + ')';
  1936. }
  1937. // Parse nested eval() calls using recursion
  1938. match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
  1939. if (match) {
  1940. return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')';
  1941. }
  1942. // Make sure we still return useful information if we didn't find anything
  1943. return origin;
  1944. }
  1945. // This is copied almost verbatim from the V8 source code at
  1946. // https://code.google.com/p/v8/source/browse/trunk/src/messages.js. The
  1947. // implementation of wrapCallSite() used to just forward to the actual source
  1948. // code of CallSite.prototype.toString but unfortunately a new release of V8
  1949. // did something to the prototype chain and broke the shim. The only fix I
  1950. // could find was copy/paste.
  1951. function CallSiteToString() {
  1952. var fileName;
  1953. var fileLocation = "";
  1954. if (this.isNative()) {
  1955. fileLocation = "native";
  1956. } else {
  1957. fileName = this.getScriptNameOrSourceURL();
  1958. if (!fileName && this.isEval()) {
  1959. fileLocation = this.getEvalOrigin();
  1960. fileLocation += ", "; // Expecting source position to follow.
  1961. }
  1962. if (fileName) {
  1963. fileLocation += fileName;
  1964. } else {
  1965. // Source code does not originate from a file and is not native, but we
  1966. // can still get the source position inside the source string, e.g. in
  1967. // an eval string.
  1968. fileLocation += "<anonymous>";
  1969. }
  1970. var lineNumber = this.getLineNumber();
  1971. if (lineNumber != null) {
  1972. fileLocation += ":" + lineNumber;
  1973. var columnNumber = this.getColumnNumber();
  1974. if (columnNumber) {
  1975. fileLocation += ":" + columnNumber;
  1976. }
  1977. }
  1978. }
  1979. var line = "";
  1980. var functionName = this.getFunctionName();
  1981. var addSuffix = true;
  1982. var isConstructor = this.isConstructor();
  1983. var isMethodCall = !(this.isToplevel() || isConstructor);
  1984. if (isMethodCall) {
  1985. var typeName = this.getTypeName();
  1986. // Fixes shim to be backward compatable with Node v0 to v4
  1987. if (typeName === "[object Object]") {
  1988. typeName = "null";
  1989. }
  1990. var methodName = this.getMethodName();
  1991. if (functionName) {
  1992. if (typeName && functionName.indexOf(typeName) != 0) {
  1993. line += typeName + ".";
  1994. }
  1995. line += functionName;
  1996. if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
  1997. line += " [as " + methodName + "]";
  1998. }
  1999. } else {
  2000. line += typeName + "." + (methodName || "<anonymous>");
  2001. }
  2002. } else if (isConstructor) {
  2003. line += "new " + (functionName || "<anonymous>");
  2004. } else if (functionName) {
  2005. line += functionName;
  2006. } else {
  2007. line += fileLocation;
  2008. addSuffix = false;
  2009. }
  2010. if (addSuffix) {
  2011. line += " (" + fileLocation + ")";
  2012. }
  2013. return line;
  2014. }
  2015. function cloneCallSite(frame) {
  2016. var object = {};
  2017. Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
  2018. object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name];
  2019. });
  2020. object.toString = CallSiteToString;
  2021. return object;
  2022. }
  2023. function wrapCallSite(frame) {
  2024. if(frame.isNative()) {
  2025. return frame;
  2026. }
  2027. // Most call sites will return the source file from getFileName(), but code
  2028. // passed to eval() ending in "//# sourceURL=..." will return the source file
  2029. // from getScriptNameOrSourceURL() instead
  2030. var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
  2031. if (source) {
  2032. var line = frame.getLineNumber();
  2033. var column = frame.getColumnNumber() - 1;
  2034. // Fix position in Node where some (internal) code is prepended.
  2035. // See https://github.com/evanw/node-source-map-support/issues/36
  2036. var headerLength = 62;
  2037. if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
  2038. column -= headerLength;
  2039. }
  2040. var position = mapSourcePosition({
  2041. source: source,
  2042. line: line,
  2043. column: column
  2044. });
  2045. frame = cloneCallSite(frame);
  2046. frame.getFileName = function() { return position.source; };
  2047. frame.getLineNumber = function() { return position.line; };
  2048. frame.getColumnNumber = function() { return position.column + 1; };
  2049. frame.getScriptNameOrSourceURL = function() { return position.source; };
  2050. return frame;
  2051. }
  2052. // Code called using eval() needs special handling
  2053. var origin = frame.isEval() && frame.getEvalOrigin();
  2054. if (origin) {
  2055. origin = mapEvalOrigin(origin);
  2056. frame = cloneCallSite(frame);
  2057. frame.getEvalOrigin = function() { return origin; };
  2058. return frame;
  2059. }
  2060. // If we get here then we were unable to change the source position
  2061. return frame;
  2062. }
  2063. // This function is part of the V8 stack trace API, for more info see:
  2064. // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
  2065. function prepareStackTrace(error, stack) {
  2066. if (emptyCacheBetweenOperations) {
  2067. fileContentsCache = {};
  2068. sourceMapCache = {};
  2069. }
  2070. return error + stack.map(function(frame) {
  2071. return '\n at ' + wrapCallSite(frame);
  2072. }).join('');
  2073. }
  2074. // Generate position and snippet of original source with pointer
  2075. function getErrorSource(error) {
  2076. var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
  2077. if (match) {
  2078. var source = match[1];
  2079. var line = +match[2];
  2080. var column = +match[3];
  2081. // Support the inline sourceContents inside the source map
  2082. var contents = fileContentsCache[source];
  2083. // Support files on disk
  2084. if (!contents && fs && fs.existsSync(source)) {
  2085. try {
  2086. contents = fs.readFileSync(source, 'utf8');
  2087. } catch (er) {
  2088. contents = '';
  2089. }
  2090. }
  2091. // Format the line from the original source code like node does
  2092. if (contents) {
  2093. var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
  2094. if (code) {
  2095. return source + ':' + line + '\n' + code + '\n' +
  2096. new Array(column).join(' ') + '^';
  2097. }
  2098. }
  2099. }
  2100. return null;
  2101. }
  2102. function printErrorAndExit (error) {
  2103. var source = getErrorSource(error);
  2104. if (source) {
  2105. fs.writeSync(2, "\n" + source + "\n");
  2106. }
  2107. fs.writeSync(2, error.stack + "\n");
  2108. process.exit(1);
  2109. }
  2110. function shimEmitUncaughtException () {
  2111. var origEmit = process.emit;
  2112. process.emit = function (type) {
  2113. if (type === 'uncaughtException') {
  2114. var hasStack = (arguments[1] && arguments[1].stack);
  2115. var hasListeners = (this.listeners(type).length > 0);
  2116. if (hasStack && !hasListeners) {
  2117. return printErrorAndExit(arguments[1]);
  2118. }
  2119. }
  2120. return origEmit.apply(this, arguments);
  2121. };
  2122. }
  2123. var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
  2124. var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
  2125. exports.wrapCallSite = wrapCallSite;
  2126. exports.getErrorSource = getErrorSource;
  2127. exports.mapSourcePosition = mapSourcePosition;
  2128. exports.retrieveSourceMap = retrieveSourceMap;
  2129. exports.install = function(options) {
  2130. options = options || {};
  2131. if (options.environment) {
  2132. environment = options.environment;
  2133. if (["node", "browser", "auto"].indexOf(environment) === -1) {
  2134. throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}")
  2135. }
  2136. }
  2137. // Allow sources to be found by methods other than reading the files
  2138. // directly from disk.
  2139. if (options.retrieveFile) {
  2140. if (options.overrideRetrieveFile) {
  2141. retrieveFileHandlers.length = 0;
  2142. }
  2143. retrieveFileHandlers.unshift(options.retrieveFile);
  2144. }
  2145. // Allow source maps to be found by methods other than reading the files
  2146. // directly from disk.
  2147. if (options.retrieveSourceMap) {
  2148. if (options.overrideRetrieveSourceMap) {
  2149. retrieveMapHandlers.length = 0;
  2150. }
  2151. retrieveMapHandlers.unshift(options.retrieveSourceMap);
  2152. }
  2153. // Support runtime transpilers that include inline source maps
  2154. if (options.hookRequire && !isInBrowser()) {
  2155. var Module;
  2156. try {
  2157. Module = __webpack_require__(22);
  2158. } catch (err) {
  2159. // NOP: Loading in catch block to convert webpack error to warning.
  2160. }
  2161. var $compile = Module.prototype._compile;
  2162. if (!$compile.__sourceMapSupport) {
  2163. Module.prototype._compile = function(content, filename) {
  2164. fileContentsCache[filename] = content;
  2165. sourceMapCache[filename] = undefined;
  2166. return $compile.call(this, content, filename);
  2167. };
  2168. Module.prototype._compile.__sourceMapSupport = true;
  2169. }
  2170. }
  2171. // Configure options
  2172. if (!emptyCacheBetweenOperations) {
  2173. emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ?
  2174. options.emptyCacheBetweenOperations : false;
  2175. }
  2176. // Install the error reformatter
  2177. if (!errorFormatterInstalled) {
  2178. errorFormatterInstalled = true;
  2179. Error.prepareStackTrace = prepareStackTrace;
  2180. }
  2181. if (!uncaughtShimInstalled) {
  2182. var installHandler = 'handleUncaughtExceptions' in options ?
  2183. options.handleUncaughtExceptions : true;
  2184. // Provide the option to not install the uncaught exception handler. This is
  2185. // to support other uncaught exception handlers (in test frameworks, for
  2186. // example). If this handler is not installed and there are no other uncaught
  2187. // exception handlers, uncaught exceptions will be caught by node's built-in
  2188. // exception handler and the process will still be terminated. However, the
  2189. // generated JavaScript code will be shown above the stack trace instead of
  2190. // the original source code.
  2191. if (installHandler && hasGlobalProcessEventEmitter()) {
  2192. uncaughtShimInstalled = true;
  2193. shimEmitUncaughtException();
  2194. }
  2195. }
  2196. };
  2197. exports.resetRetrieveHandlers = function() {
  2198. retrieveFileHandlers.length = 0;
  2199. retrieveMapHandlers.length = 0;
  2200. retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
  2201. retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
  2202. }
  2203. /***/ }),
  2204. /* 14 */
  2205. /***/ (function(module, exports, __webpack_require__) {
  2206. /*
  2207. * Copyright 2009-2011 Mozilla Foundation and contributors
  2208. * Licensed under the New BSD license. See LICENSE.txt or:
  2209. * http://opensource.org/licenses/BSD-3-Clause
  2210. */
  2211. exports.SourceMapGenerator = __webpack_require__(5).SourceMapGenerator;
  2212. exports.SourceMapConsumer = __webpack_require__(17).SourceMapConsumer;
  2213. exports.SourceNode = __webpack_require__(20).SourceNode;
  2214. /***/ }),
  2215. /* 15 */
  2216. /***/ (function(module, exports) {
  2217. /* -*- Mode: js; js-indent-level: 2; -*- */
  2218. /*
  2219. * Copyright 2011 Mozilla Foundation and contributors
  2220. * Licensed under the New BSD license. See LICENSE or:
  2221. * http://opensource.org/licenses/BSD-3-Clause
  2222. */
  2223. var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  2224. /**
  2225. * Encode an integer in the range of 0 to 63 to a single base 64 digit.
  2226. */
  2227. exports.encode = function (number) {
  2228. if (0 <= number && number < intToCharMap.length) {
  2229. return intToCharMap[number];
  2230. }
  2231. throw new TypeError("Must be between 0 and 63: " + number);
  2232. };
  2233. /**
  2234. * Decode a single base 64 character code digit to an integer. Returns -1 on
  2235. * failure.
  2236. */
  2237. exports.decode = function (charCode) {
  2238. var bigA = 65; // 'A'
  2239. var bigZ = 90; // 'Z'
  2240. var littleA = 97; // 'a'
  2241. var littleZ = 122; // 'z'
  2242. var zero = 48; // '0'
  2243. var nine = 57; // '9'
  2244. var plus = 43; // '+'
  2245. var slash = 47; // '/'
  2246. var littleOffset = 26;
  2247. var numberOffset = 52;
  2248. // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  2249. if (bigA <= charCode && charCode <= bigZ) {
  2250. return (charCode - bigA);
  2251. }
  2252. // 26 - 51: abcdefghijklmnopqrstuvwxyz
  2253. if (littleA <= charCode && charCode <= littleZ) {
  2254. return (charCode - littleA + littleOffset);
  2255. }
  2256. // 52 - 61: 0123456789
  2257. if (zero <= charCode && charCode <= nine) {
  2258. return (charCode - zero + numberOffset);
  2259. }
  2260. // 62: +
  2261. if (charCode == plus) {
  2262. return 62;
  2263. }
  2264. // 63: /
  2265. if (charCode == slash) {
  2266. return 63;
  2267. }
  2268. // Invalid base64 digit.
  2269. return -1;
  2270. };
  2271. /***/ }),
  2272. /* 16 */
  2273. /***/ (function(module, exports, __webpack_require__) {
  2274. /* -*- Mode: js; js-indent-level: 2; -*- */
  2275. /*
  2276. * Copyright 2014 Mozilla Foundation and contributors
  2277. * Licensed under the New BSD license. See LICENSE or:
  2278. * http://opensource.org/licenses/BSD-3-Clause
  2279. */
  2280. var util = __webpack_require__(3);
  2281. /**
  2282. * Determine whether mappingB is after mappingA with respect to generated
  2283. * position.
  2284. */
  2285. function generatedPositionAfter(mappingA, mappingB) {
  2286. // Optimized for most common case
  2287. var lineA = mappingA.generatedLine;
  2288. var lineB = mappingB.generatedLine;
  2289. var columnA = mappingA.generatedColumn;
  2290. var columnB = mappingB.generatedColumn;
  2291. return lineB > lineA || lineB == lineA && columnB >= columnA ||
  2292. util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  2293. }
  2294. /**
  2295. * A data structure to provide a sorted view of accumulated mappings in a
  2296. * performance conscious manner. It trades a neglibable overhead in general
  2297. * case for a large speedup in case of mappings being added in order.
  2298. */
  2299. function MappingList() {
  2300. this._array = [];
  2301. this._sorted = true;
  2302. // Serves as infimum
  2303. this._last = {generatedLine: -1, generatedColumn: 0};
  2304. }
  2305. /**
  2306. * Iterate through internal items. This method takes the same arguments that
  2307. * `Array.prototype.forEach` takes.
  2308. *
  2309. * NOTE: The order of the mappings is NOT guaranteed.
  2310. */
  2311. MappingList.prototype.unsortedForEach =
  2312. function MappingList_forEach(aCallback, aThisArg) {
  2313. this._array.forEach(aCallback, aThisArg);
  2314. };
  2315. /**
  2316. * Add the given source mapping.
  2317. *
  2318. * @param Object aMapping
  2319. */
  2320. MappingList.prototype.add = function MappingList_add(aMapping) {
  2321. if (generatedPositionAfter(this._last, aMapping)) {
  2322. this._last = aMapping;
  2323. this._array.push(aMapping);
  2324. } else {
  2325. this._sorted = false;
  2326. this._array.push(aMapping);
  2327. }
  2328. };
  2329. /**
  2330. * Returns the flat, sorted array of mappings. The mappings are sorted by
  2331. * generated position.
  2332. *
  2333. * WARNING: This method returns internal data without copying, for
  2334. * performance. The return value must NOT be mutated, and should be treated as
  2335. * an immutable borrow. If you want to take ownership, you must make your own
  2336. * copy.
  2337. */
  2338. MappingList.prototype.toArray = function MappingList_toArray() {
  2339. if (!this._sorted) {
  2340. this._array.sort(util.compareByGeneratedPositionsInflated);
  2341. this._sorted = true;
  2342. }
  2343. return this._array;
  2344. };
  2345. exports.MappingList = MappingList;
  2346. /***/ }),
  2347. /* 17 */
  2348. /***/ (function(module, exports, __webpack_require__) {
  2349. /* -*- Mode: js; js-indent-level: 2; -*- */
  2350. /*
  2351. * Copyright 2011 Mozilla Foundation and contributors
  2352. * Licensed under the New BSD license. See LICENSE or:
  2353. * http://opensource.org/licenses/BSD-3-Clause
  2354. */
  2355. var util = __webpack_require__(3);
  2356. var binarySearch = __webpack_require__(18);
  2357. var ArraySet = __webpack_require__(7).ArraySet;
  2358. var base64VLQ = __webpack_require__(6);
  2359. var quickSort = __webpack_require__(19).quickSort;
  2360. function SourceMapConsumer(aSourceMap, aSourceMapURL) {
  2361. var sourceMap = aSourceMap;
  2362. if (typeof aSourceMap === 'string') {
  2363. sourceMap = util.parseSourceMapInput(aSourceMap);
  2364. }
  2365. return sourceMap.sections != null
  2366. ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)
  2367. : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
  2368. }
  2369. SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
  2370. return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
  2371. }
  2372. /**
  2373. * The version of the source mapping spec that we are consuming.
  2374. */
  2375. SourceMapConsumer.prototype._version = 3;
  2376. // `__generatedMappings` and `__originalMappings` are arrays that hold the
  2377. // parsed mapping coordinates from the source map's "mappings" attribute. They
  2378. // are lazily instantiated, accessed via the `_generatedMappings` and
  2379. // `_originalMappings` getters respectively, and we only parse the mappings
  2380. // and create these arrays once queried for a source location. We jump through
  2381. // these hoops because there can be many thousands of mappings, and parsing
  2382. // them is expensive, so we only want to do it if we must.
  2383. //
  2384. // Each object in the arrays is of the form:
  2385. //
  2386. // {
  2387. // generatedLine: The line number in the generated code,
  2388. // generatedColumn: The column number in the generated code,
  2389. // source: The path to the original source file that generated this
  2390. // chunk of code,
  2391. // originalLine: The line number in the original source that
  2392. // corresponds to this chunk of generated code,
  2393. // originalColumn: The column number in the original source that
  2394. // corresponds to this chunk of generated code,
  2395. // name: The name of the original symbol which generated this chunk of
  2396. // code.
  2397. // }
  2398. //
  2399. // All properties except for `generatedLine` and `generatedColumn` can be
  2400. // `null`.
  2401. //
  2402. // `_generatedMappings` is ordered by the generated positions.
  2403. //
  2404. // `_originalMappings` is ordered by the original positions.
  2405. SourceMapConsumer.prototype.__generatedMappings = null;
  2406. Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
  2407. configurable: true,
  2408. enumerable: true,
  2409. get: function () {
  2410. if (!this.__generatedMappings) {
  2411. this._parseMappings(this._mappings, this.sourceRoot);
  2412. }
  2413. return this.__generatedMappings;
  2414. }
  2415. });
  2416. SourceMapConsumer.prototype.__originalMappings = null;
  2417. Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
  2418. configurable: true,
  2419. enumerable: true,
  2420. get: function () {
  2421. if (!this.__originalMappings) {
  2422. this._parseMappings(this._mappings, this.sourceRoot);
  2423. }
  2424. return this.__originalMappings;
  2425. }
  2426. });
  2427. SourceMapConsumer.prototype._charIsMappingSeparator =
  2428. function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
  2429. var c = aStr.charAt(index);
  2430. return c === ";" || c === ",";
  2431. };
  2432. /**
  2433. * Parse the mappings in a string in to a data structure which we can easily
  2434. * query (the ordered arrays in the `this.__generatedMappings` and
  2435. * `this.__originalMappings` properties).
  2436. */
  2437. SourceMapConsumer.prototype._parseMappings =
  2438. function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  2439. throw new Error("Subclasses must implement _parseMappings");
  2440. };
  2441. SourceMapConsumer.GENERATED_ORDER = 1;
  2442. SourceMapConsumer.ORIGINAL_ORDER = 2;
  2443. SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  2444. SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  2445. /**
  2446. * Iterate over each mapping between an original source/line/column and a
  2447. * generated line/column in this source map.
  2448. *
  2449. * @param Function aCallback
  2450. * The function that is called with each mapping.
  2451. * @param Object aContext
  2452. * Optional. If specified, this object will be the value of `this` every
  2453. * time that `aCallback` is called.
  2454. * @param aOrder
  2455. * Either `SourceMapConsumer.GENERATED_ORDER` or
  2456. * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
  2457. * iterate over the mappings sorted by the generated file's line/column
  2458. * order or the original's source/line/column order, respectively. Defaults to
  2459. * `SourceMapConsumer.GENERATED_ORDER`.
  2460. */
  2461. SourceMapConsumer.prototype.eachMapping =
  2462. function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  2463. var context = aContext || null;
  2464. var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
  2465. var mappings;
  2466. switch (order) {
  2467. case SourceMapConsumer.GENERATED_ORDER:
  2468. mappings = this._generatedMappings;
  2469. break;
  2470. case SourceMapConsumer.ORIGINAL_ORDER:
  2471. mappings = this._originalMappings;
  2472. break;
  2473. default:
  2474. throw new Error("Unknown order of iteration.");
  2475. }
  2476. var sourceRoot = this.sourceRoot;
  2477. mappings.map(function (mapping) {
  2478. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  2479. source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
  2480. return {
  2481. source: source,
  2482. generatedLine: mapping.generatedLine,
  2483. generatedColumn: mapping.generatedColumn,
  2484. originalLine: mapping.originalLine,
  2485. originalColumn: mapping.originalColumn,
  2486. name: mapping.name === null ? null : this._names.at(mapping.name)
  2487. };
  2488. }, this).forEach(aCallback, context);
  2489. };
  2490. /**
  2491. * Returns all generated line and column information for the original source,
  2492. * line, and column provided. If no column is provided, returns all mappings
  2493. * corresponding to a either the line we are searching for or the next
  2494. * closest line that has any mappings. Otherwise, returns all mappings
  2495. * corresponding to the given line and either the column we are searching for
  2496. * or the next closest column that has any offsets.
  2497. *
  2498. * The only argument is an object with the following properties:
  2499. *
  2500. * - source: The filename of the original source.
  2501. * - line: The line number in the original source. The line number is 1-based.
  2502. * - column: Optional. the column number in the original source.
  2503. * The column number is 0-based.
  2504. *
  2505. * and an array of objects is returned, each with the following properties:
  2506. *
  2507. * - line: The line number in the generated source, or null. The
  2508. * line number is 1-based.
  2509. * - column: The column number in the generated source, or null.
  2510. * The column number is 0-based.
  2511. */
  2512. SourceMapConsumer.prototype.allGeneratedPositionsFor =
  2513. function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  2514. var line = util.getArg(aArgs, 'line');
  2515. // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
  2516. // returns the index of the closest mapping less than the needle. By
  2517. // setting needle.originalColumn to 0, we thus find the last mapping for
  2518. // the given line, provided such a mapping exists.
  2519. var needle = {
  2520. source: util.getArg(aArgs, 'source'),
  2521. originalLine: line,
  2522. originalColumn: util.getArg(aArgs, 'column', 0)
  2523. };
  2524. needle.source = this._findSourceIndex(needle.source);
  2525. if (needle.source < 0) {
  2526. return [];
  2527. }
  2528. var mappings = [];
  2529. var index = this._findMapping(needle,
  2530. this._originalMappings,
  2531. "originalLine",
  2532. "originalColumn",
  2533. util.compareByOriginalPositions,
  2534. binarySearch.LEAST_UPPER_BOUND);
  2535. if (index >= 0) {
  2536. var mapping = this._originalMappings[index];
  2537. if (aArgs.column === undefined) {
  2538. var originalLine = mapping.originalLine;
  2539. // Iterate until either we run out of mappings, or we run into
  2540. // a mapping for a different line than the one we found. Since
  2541. // mappings are sorted, this is guaranteed to find all mappings for
  2542. // the line we found.
  2543. while (mapping && mapping.originalLine === originalLine) {
  2544. mappings.push({
  2545. line: util.getArg(mapping, 'generatedLine', null),
  2546. column: util.getArg(mapping, 'generatedColumn', null),
  2547. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  2548. });
  2549. mapping = this._originalMappings[++index];
  2550. }
  2551. } else {
  2552. var originalColumn = mapping.originalColumn;
  2553. // Iterate until either we run out of mappings, or we run into
  2554. // a mapping for a different line than the one we were searching for.
  2555. // Since mappings are sorted, this is guaranteed to find all mappings for
  2556. // the line we are searching for.
  2557. while (mapping &&
  2558. mapping.originalLine === line &&
  2559. mapping.originalColumn == originalColumn) {
  2560. mappings.push({
  2561. line: util.getArg(mapping, 'generatedLine', null),
  2562. column: util.getArg(mapping, 'generatedColumn', null),
  2563. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  2564. });
  2565. mapping = this._originalMappings[++index];
  2566. }
  2567. }
  2568. }
  2569. return mappings;
  2570. };
  2571. exports.SourceMapConsumer = SourceMapConsumer;
  2572. /**
  2573. * A BasicSourceMapConsumer instance represents a parsed source map which we can
  2574. * query for information about the original file positions by giving it a file
  2575. * position in the generated source.
  2576. *
  2577. * The first parameter is the raw source map (either as a JSON string, or
  2578. * already parsed to an object). According to the spec, source maps have the
  2579. * following attributes:
  2580. *
  2581. * - version: Which version of the source map spec this map is following.
  2582. * - sources: An array of URLs to the original source files.
  2583. * - names: An array of identifiers which can be referrenced by individual mappings.
  2584. * - sourceRoot: Optional. The URL root from which all sources are relative.
  2585. * - sourcesContent: Optional. An array of contents of the original source files.
  2586. * - mappings: A string of base64 VLQs which contain the actual mappings.
  2587. * - file: Optional. The generated file this source map is associated with.
  2588. *
  2589. * Here is an example source map, taken from the source map spec[0]:
  2590. *
  2591. * {
  2592. * version : 3,
  2593. * file: "out.js",
  2594. * sourceRoot : "",
  2595. * sources: ["foo.js", "bar.js"],
  2596. * names: ["src", "maps", "are", "fun"],
  2597. * mappings: "AA,AB;;ABCDE;"
  2598. * }
  2599. *
  2600. * The second parameter, if given, is a string whose value is the URL
  2601. * at which the source map was found. This URL is used to compute the
  2602. * sources array.
  2603. *
  2604. * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
  2605. */
  2606. function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
  2607. var sourceMap = aSourceMap;
  2608. if (typeof aSourceMap === 'string') {
  2609. sourceMap = util.parseSourceMapInput(aSourceMap);
  2610. }
  2611. var version = util.getArg(sourceMap, 'version');
  2612. var sources = util.getArg(sourceMap, 'sources');
  2613. // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
  2614. // requires the array) to play nice here.
  2615. var names = util.getArg(sourceMap, 'names', []);
  2616. var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
  2617. var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
  2618. var mappings = util.getArg(sourceMap, 'mappings');
  2619. var file = util.getArg(sourceMap, 'file', null);
  2620. // Once again, Sass deviates from the spec and supplies the version as a
  2621. // string rather than a number, so we use loose equality checking here.
  2622. if (version != this._version) {
  2623. throw new Error('Unsupported version: ' + version);
  2624. }
  2625. if (sourceRoot) {
  2626. sourceRoot = util.normalize(sourceRoot);
  2627. }
  2628. sources = sources
  2629. .map(String)
  2630. // Some source maps produce relative source paths like "./foo.js" instead of
  2631. // "foo.js". Normalize these first so that future comparisons will succeed.
  2632. // See bugzil.la/1090768.
  2633. .map(util.normalize)
  2634. // Always ensure that absolute sources are internally stored relative to
  2635. // the source root, if the source root is absolute. Not doing this would
  2636. // be particularly problematic when the source root is a prefix of the
  2637. // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
  2638. .map(function (source) {
  2639. return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
  2640. ? util.relative(sourceRoot, source)
  2641. : source;
  2642. });
  2643. // Pass `true` below to allow duplicate names and sources. While source maps
  2644. // are intended to be compressed and deduplicated, the TypeScript compiler
  2645. // sometimes generates source maps with duplicates in them. See Github issue
  2646. // #72 and bugzil.la/889492.
  2647. this._names = ArraySet.fromArray(names.map(String), true);
  2648. this._sources = ArraySet.fromArray(sources, true);
  2649. this._absoluteSources = this._sources.toArray().map(function (s) {
  2650. return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
  2651. });
  2652. this.sourceRoot = sourceRoot;
  2653. this.sourcesContent = sourcesContent;
  2654. this._mappings = mappings;
  2655. this._sourceMapURL = aSourceMapURL;
  2656. this.file = file;
  2657. }
  2658. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  2659. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  2660. /**
  2661. * Utility function to find the index of a source. Returns -1 if not
  2662. * found.
  2663. */
  2664. BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
  2665. var relativeSource = aSource;
  2666. if (this.sourceRoot != null) {
  2667. relativeSource = util.relative(this.sourceRoot, relativeSource);
  2668. }
  2669. if (this._sources.has(relativeSource)) {
  2670. return this._sources.indexOf(relativeSource);
  2671. }
  2672. // Maybe aSource is an absolute URL as returned by |sources|. In
  2673. // this case we can't simply undo the transform.
  2674. var i;
  2675. for (i = 0; i < this._absoluteSources.length; ++i) {
  2676. if (this._absoluteSources[i] == aSource) {
  2677. return i;
  2678. }
  2679. }
  2680. return -1;
  2681. };
  2682. /**
  2683. * Create a BasicSourceMapConsumer from a SourceMapGenerator.
  2684. *
  2685. * @param SourceMapGenerator aSourceMap
  2686. * The source map that will be consumed.
  2687. * @param String aSourceMapURL
  2688. * The URL at which the source map can be found (optional)
  2689. * @returns BasicSourceMapConsumer
  2690. */
  2691. BasicSourceMapConsumer.fromSourceMap =
  2692. function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
  2693. var smc = Object.create(BasicSourceMapConsumer.prototype);
  2694. var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
  2695. var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
  2696. smc.sourceRoot = aSourceMap._sourceRoot;
  2697. smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
  2698. smc.sourceRoot);
  2699. smc.file = aSourceMap._file;
  2700. smc._sourceMapURL = aSourceMapURL;
  2701. smc._absoluteSources = smc._sources.toArray().map(function (s) {
  2702. return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
  2703. });
  2704. // Because we are modifying the entries (by converting string sources and
  2705. // names to indices into the sources and names ArraySets), we have to make
  2706. // a copy of the entry or else bad things happen. Shared mutable state
  2707. // strikes again! See github issue #191.
  2708. var generatedMappings = aSourceMap._mappings.toArray().slice();
  2709. var destGeneratedMappings = smc.__generatedMappings = [];
  2710. var destOriginalMappings = smc.__originalMappings = [];
  2711. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  2712. var srcMapping = generatedMappings[i];
  2713. var destMapping = new Mapping;
  2714. destMapping.generatedLine = srcMapping.generatedLine;
  2715. destMapping.generatedColumn = srcMapping.generatedColumn;
  2716. if (srcMapping.source) {
  2717. destMapping.source = sources.indexOf(srcMapping.source);
  2718. destMapping.originalLine = srcMapping.originalLine;
  2719. destMapping.originalColumn = srcMapping.originalColumn;
  2720. if (srcMapping.name) {
  2721. destMapping.name = names.indexOf(srcMapping.name);
  2722. }
  2723. destOriginalMappings.push(destMapping);
  2724. }
  2725. destGeneratedMappings.push(destMapping);
  2726. }
  2727. quickSort(smc.__originalMappings, util.compareByOriginalPositions);
  2728. return smc;
  2729. };
  2730. /**
  2731. * The version of the source mapping spec that we are consuming.
  2732. */
  2733. BasicSourceMapConsumer.prototype._version = 3;
  2734. /**
  2735. * The list of original sources.
  2736. */
  2737. Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
  2738. get: function () {
  2739. return this._absoluteSources.slice();
  2740. }
  2741. });
  2742. /**
  2743. * Provide the JIT with a nice shape / hidden class.
  2744. */
  2745. function Mapping() {
  2746. this.generatedLine = 0;
  2747. this.generatedColumn = 0;
  2748. this.source = null;
  2749. this.originalLine = null;
  2750. this.originalColumn = null;
  2751. this.name = null;
  2752. }
  2753. /**
  2754. * Parse the mappings in a string in to a data structure which we can easily
  2755. * query (the ordered arrays in the `this.__generatedMappings` and
  2756. * `this.__originalMappings` properties).
  2757. */
  2758. BasicSourceMapConsumer.prototype._parseMappings =
  2759. function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  2760. var generatedLine = 1;
  2761. var previousGeneratedColumn = 0;
  2762. var previousOriginalLine = 0;
  2763. var previousOriginalColumn = 0;
  2764. var previousSource = 0;
  2765. var previousName = 0;
  2766. var length = aStr.length;
  2767. var index = 0;
  2768. var cachedSegments = {};
  2769. var temp = {};
  2770. var originalMappings = [];
  2771. var generatedMappings = [];
  2772. var mapping, str, segment, end, value;
  2773. while (index < length) {
  2774. if (aStr.charAt(index) === ';') {
  2775. generatedLine++;
  2776. index++;
  2777. previousGeneratedColumn = 0;
  2778. }
  2779. else if (aStr.charAt(index) === ',') {
  2780. index++;
  2781. }
  2782. else {
  2783. mapping = new Mapping();
  2784. mapping.generatedLine = generatedLine;
  2785. // Because each offset is encoded relative to the previous one,
  2786. // many segments often have the same encoding. We can exploit this
  2787. // fact by caching the parsed variable length fields of each segment,
  2788. // allowing us to avoid a second parse if we encounter the same
  2789. // segment again.
  2790. for (end = index; end < length; end++) {
  2791. if (this._charIsMappingSeparator(aStr, end)) {
  2792. break;
  2793. }
  2794. }
  2795. str = aStr.slice(index, end);
  2796. segment = cachedSegments[str];
  2797. if (segment) {
  2798. index += str.length;
  2799. } else {
  2800. segment = [];
  2801. while (index < end) {
  2802. base64VLQ.decode(aStr, index, temp);
  2803. value = temp.value;
  2804. index = temp.rest;
  2805. segment.push(value);
  2806. }
  2807. if (segment.length === 2) {
  2808. throw new Error('Found a source, but no line and column');
  2809. }
  2810. if (segment.length === 3) {
  2811. throw new Error('Found a source and line, but no column');
  2812. }
  2813. cachedSegments[str] = segment;
  2814. }
  2815. // Generated column.
  2816. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  2817. previousGeneratedColumn = mapping.generatedColumn;
  2818. if (segment.length > 1) {
  2819. // Original source.
  2820. mapping.source = previousSource + segment[1];
  2821. previousSource += segment[1];
  2822. // Original line.
  2823. mapping.originalLine = previousOriginalLine + segment[2];
  2824. previousOriginalLine = mapping.originalLine;
  2825. // Lines are stored 0-based
  2826. mapping.originalLine += 1;
  2827. // Original column.
  2828. mapping.originalColumn = previousOriginalColumn + segment[3];
  2829. previousOriginalColumn = mapping.originalColumn;
  2830. if (segment.length > 4) {
  2831. // Original name.
  2832. mapping.name = previousName + segment[4];
  2833. previousName += segment[4];
  2834. }
  2835. }
  2836. generatedMappings.push(mapping);
  2837. if (typeof mapping.originalLine === 'number') {
  2838. originalMappings.push(mapping);
  2839. }
  2840. }
  2841. }
  2842. quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
  2843. this.__generatedMappings = generatedMappings;
  2844. quickSort(originalMappings, util.compareByOriginalPositions);
  2845. this.__originalMappings = originalMappings;
  2846. };
  2847. /**
  2848. * Find the mapping that best matches the hypothetical "needle" mapping that
  2849. * we are searching for in the given "haystack" of mappings.
  2850. */
  2851. BasicSourceMapConsumer.prototype._findMapping =
  2852. function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
  2853. aColumnName, aComparator, aBias) {
  2854. // To return the position we are searching for, we must first find the
  2855. // mapping for the given position and then return the opposite position it
  2856. // points to. Because the mappings are sorted, we can use binary search to
  2857. // find the best mapping.
  2858. if (aNeedle[aLineName] <= 0) {
  2859. throw new TypeError('Line must be greater than or equal to 1, got '
  2860. + aNeedle[aLineName]);
  2861. }
  2862. if (aNeedle[aColumnName] < 0) {
  2863. throw new TypeError('Column must be greater than or equal to 0, got '
  2864. + aNeedle[aColumnName]);
  2865. }
  2866. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  2867. };
  2868. /**
  2869. * Compute the last column for each generated mapping. The last column is
  2870. * inclusive.
  2871. */
  2872. BasicSourceMapConsumer.prototype.computeColumnSpans =
  2873. function SourceMapConsumer_computeColumnSpans() {
  2874. for (var index = 0; index < this._generatedMappings.length; ++index) {
  2875. var mapping = this._generatedMappings[index];
  2876. // Mappings do not contain a field for the last generated columnt. We
  2877. // can come up with an optimistic estimate, however, by assuming that
  2878. // mappings are contiguous (i.e. given two consecutive mappings, the
  2879. // first mapping ends where the second one starts).
  2880. if (index + 1 < this._generatedMappings.length) {
  2881. var nextMapping = this._generatedMappings[index + 1];
  2882. if (mapping.generatedLine === nextMapping.generatedLine) {
  2883. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  2884. continue;
  2885. }
  2886. }
  2887. // The last mapping for each line spans the entire line.
  2888. mapping.lastGeneratedColumn = Infinity;
  2889. }
  2890. };
  2891. /**
  2892. * Returns the original source, line, and column information for the generated
  2893. * source's line and column positions provided. The only argument is an object
  2894. * with the following properties:
  2895. *
  2896. * - line: The line number in the generated source. The line number
  2897. * is 1-based.
  2898. * - column: The column number in the generated source. The column
  2899. * number is 0-based.
  2900. * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
  2901. * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
  2902. * closest element that is smaller than or greater than the one we are
  2903. * searching for, respectively, if the exact element cannot be found.
  2904. * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
  2905. *
  2906. * and an object is returned with the following properties:
  2907. *
  2908. * - source: The original source file, or null.
  2909. * - line: The line number in the original source, or null. The
  2910. * line number is 1-based.
  2911. * - column: The column number in the original source, or null. The
  2912. * column number is 0-based.
  2913. * - name: The original identifier, or null.
  2914. */
  2915. BasicSourceMapConsumer.prototype.originalPositionFor =
  2916. function SourceMapConsumer_originalPositionFor(aArgs) {
  2917. var needle = {
  2918. generatedLine: util.getArg(aArgs, 'line'),
  2919. generatedColumn: util.getArg(aArgs, 'column')
  2920. };
  2921. var index = this._findMapping(
  2922. needle,
  2923. this._generatedMappings,
  2924. "generatedLine",
  2925. "generatedColumn",
  2926. util.compareByGeneratedPositionsDeflated,
  2927. util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
  2928. );
  2929. if (index >= 0) {
  2930. var mapping = this._generatedMappings[index];
  2931. if (mapping.generatedLine === needle.generatedLine) {
  2932. var source = util.getArg(mapping, 'source', null);
  2933. if (source !== null) {
  2934. source = this._sources.at(source);
  2935. source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
  2936. }
  2937. var name = util.getArg(mapping, 'name', null);
  2938. if (name !== null) {
  2939. name = this._names.at(name);
  2940. }
  2941. return {
  2942. source: source,
  2943. line: util.getArg(mapping, 'originalLine', null),
  2944. column: util.getArg(mapping, 'originalColumn', null),
  2945. name: name
  2946. };
  2947. }
  2948. }
  2949. return {
  2950. source: null,
  2951. line: null,
  2952. column: null,
  2953. name: null
  2954. };
  2955. };
  2956. /**
  2957. * Return true if we have the source content for every source in the source
  2958. * map, false otherwise.
  2959. */
  2960. BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
  2961. function BasicSourceMapConsumer_hasContentsOfAllSources() {
  2962. if (!this.sourcesContent) {
  2963. return false;
  2964. }
  2965. return this.sourcesContent.length >= this._sources.size() &&
  2966. !this.sourcesContent.some(function (sc) { return sc == null; });
  2967. };
  2968. /**
  2969. * Returns the original source content. The only argument is the url of the
  2970. * original source file. Returns null if no original source content is
  2971. * available.
  2972. */
  2973. BasicSourceMapConsumer.prototype.sourceContentFor =
  2974. function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  2975. if (!this.sourcesContent) {
  2976. return null;
  2977. }
  2978. var index = this._findSourceIndex(aSource);
  2979. if (index >= 0) {
  2980. return this.sourcesContent[index];
  2981. }
  2982. var relativeSource = aSource;
  2983. if (this.sourceRoot != null) {
  2984. relativeSource = util.relative(this.sourceRoot, relativeSource);
  2985. }
  2986. var url;
  2987. if (this.sourceRoot != null
  2988. && (url = util.urlParse(this.sourceRoot))) {
  2989. // XXX: file:// URIs and absolute paths lead to unexpected behavior for
  2990. // many users. We can help them out when they expect file:// URIs to
  2991. // behave like it would if they were running a local HTTP server. See
  2992. // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
  2993. var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
  2994. if (url.scheme == "file"
  2995. && this._sources.has(fileUriAbsPath)) {
  2996. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
  2997. }
  2998. if ((!url.path || url.path == "/")
  2999. && this._sources.has("/" + relativeSource)) {
  3000. return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
  3001. }
  3002. }
  3003. // This function is used recursively from
  3004. // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
  3005. // don't want to throw if we can't find the source - we just want to
  3006. // return null, so we provide a flag to exit gracefully.
  3007. if (nullOnMissing) {
  3008. return null;
  3009. }
  3010. else {
  3011. throw new Error('"' + relativeSource + '" is not in the SourceMap.');
  3012. }
  3013. };
  3014. /**
  3015. * Returns the generated line and column information for the original source,
  3016. * line, and column positions provided. The only argument is an object with
  3017. * the following properties:
  3018. *
  3019. * - source: The filename of the original source.
  3020. * - line: The line number in the original source. The line number
  3021. * is 1-based.
  3022. * - column: The column number in the original source. The column
  3023. * number is 0-based.
  3024. * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
  3025. * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
  3026. * closest element that is smaller than or greater than the one we are
  3027. * searching for, respectively, if the exact element cannot be found.
  3028. * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
  3029. *
  3030. * and an object is returned with the following properties:
  3031. *
  3032. * - line: The line number in the generated source, or null. The
  3033. * line number is 1-based.
  3034. * - column: The column number in the generated source, or null.
  3035. * The column number is 0-based.
  3036. */
  3037. BasicSourceMapConsumer.prototype.generatedPositionFor =
  3038. function SourceMapConsumer_generatedPositionFor(aArgs) {
  3039. var source = util.getArg(aArgs, 'source');
  3040. source = this._findSourceIndex(source);
  3041. if (source < 0) {
  3042. return {
  3043. line: null,
  3044. column: null,
  3045. lastColumn: null
  3046. };
  3047. }
  3048. var needle = {
  3049. source: source,
  3050. originalLine: util.getArg(aArgs, 'line'),
  3051. originalColumn: util.getArg(aArgs, 'column')
  3052. };
  3053. var index = this._findMapping(
  3054. needle,
  3055. this._originalMappings,
  3056. "originalLine",
  3057. "originalColumn",
  3058. util.compareByOriginalPositions,
  3059. util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
  3060. );
  3061. if (index >= 0) {
  3062. var mapping = this._originalMappings[index];
  3063. if (mapping.source === needle.source) {
  3064. return {
  3065. line: util.getArg(mapping, 'generatedLine', null),
  3066. column: util.getArg(mapping, 'generatedColumn', null),
  3067. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  3068. };
  3069. }
  3070. }
  3071. return {
  3072. line: null,
  3073. column: null,
  3074. lastColumn: null
  3075. };
  3076. };
  3077. exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
  3078. /**
  3079. * An IndexedSourceMapConsumer instance represents a parsed source map which
  3080. * we can query for information. It differs from BasicSourceMapConsumer in
  3081. * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
  3082. * input.
  3083. *
  3084. * The first parameter is a raw source map (either as a JSON string, or already
  3085. * parsed to an object). According to the spec for indexed source maps, they
  3086. * have the following attributes:
  3087. *
  3088. * - version: Which version of the source map spec this map is following.
  3089. * - file: Optional. The generated file this source map is associated with.
  3090. * - sections: A list of section definitions.
  3091. *
  3092. * Each value under the "sections" field has two fields:
  3093. * - offset: The offset into the original specified at which this section
  3094. * begins to apply, defined as an object with a "line" and "column"
  3095. * field.
  3096. * - map: A source map definition. This source map could also be indexed,
  3097. * but doesn't have to be.
  3098. *
  3099. * Instead of the "map" field, it's also possible to have a "url" field
  3100. * specifying a URL to retrieve a source map from, but that's currently
  3101. * unsupported.
  3102. *
  3103. * Here's an example source map, taken from the source map spec[0], but
  3104. * modified to omit a section which uses the "url" field.
  3105. *
  3106. * {
  3107. * version : 3,
  3108. * file: "app.js",
  3109. * sections: [{
  3110. * offset: {line:100, column:10},
  3111. * map: {
  3112. * version : 3,
  3113. * file: "section.js",
  3114. * sources: ["foo.js", "bar.js"],
  3115. * names: ["src", "maps", "are", "fun"],
  3116. * mappings: "AAAA,E;;ABCDE;"
  3117. * }
  3118. * }],
  3119. * }
  3120. *
  3121. * The second parameter, if given, is a string whose value is the URL
  3122. * at which the source map was found. This URL is used to compute the
  3123. * sources array.
  3124. *
  3125. * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
  3126. */
  3127. function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
  3128. var sourceMap = aSourceMap;
  3129. if (typeof aSourceMap === 'string') {
  3130. sourceMap = util.parseSourceMapInput(aSourceMap);
  3131. }
  3132. var version = util.getArg(sourceMap, 'version');
  3133. var sections = util.getArg(sourceMap, 'sections');
  3134. if (version != this._version) {
  3135. throw new Error('Unsupported version: ' + version);
  3136. }
  3137. this._sources = new ArraySet();
  3138. this._names = new ArraySet();
  3139. var lastOffset = {
  3140. line: -1,
  3141. column: 0
  3142. };
  3143. this._sections = sections.map(function (s) {
  3144. if (s.url) {
  3145. // The url field will require support for asynchronicity.
  3146. // See https://github.com/mozilla/source-map/issues/16
  3147. throw new Error('Support for url field in sections not implemented.');
  3148. }
  3149. var offset = util.getArg(s, 'offset');
  3150. var offsetLine = util.getArg(offset, 'line');
  3151. var offsetColumn = util.getArg(offset, 'column');
  3152. if (offsetLine < lastOffset.line ||
  3153. (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
  3154. throw new Error('Section offsets must be ordered and non-overlapping.');
  3155. }
  3156. lastOffset = offset;
  3157. return {
  3158. generatedOffset: {
  3159. // The offset fields are 0-based, but we use 1-based indices when
  3160. // encoding/decoding from VLQ.
  3161. generatedLine: offsetLine + 1,
  3162. generatedColumn: offsetColumn + 1
  3163. },
  3164. consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)
  3165. }
  3166. });
  3167. }
  3168. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  3169. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  3170. /**
  3171. * The version of the source mapping spec that we are consuming.
  3172. */
  3173. IndexedSourceMapConsumer.prototype._version = 3;
  3174. /**
  3175. * The list of original sources.
  3176. */
  3177. Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
  3178. get: function () {
  3179. var sources = [];
  3180. for (var i = 0; i < this._sections.length; i++) {
  3181. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  3182. sources.push(this._sections[i].consumer.sources[j]);
  3183. }
  3184. }
  3185. return sources;
  3186. }
  3187. });
  3188. /**
  3189. * Returns the original source, line, and column information for the generated
  3190. * source's line and column positions provided. The only argument is an object
  3191. * with the following properties:
  3192. *
  3193. * - line: The line number in the generated source. The line number
  3194. * is 1-based.
  3195. * - column: The column number in the generated source. The column
  3196. * number is 0-based.
  3197. *
  3198. * and an object is returned with the following properties:
  3199. *
  3200. * - source: The original source file, or null.
  3201. * - line: The line number in the original source, or null. The
  3202. * line number is 1-based.
  3203. * - column: The column number in the original source, or null. The
  3204. * column number is 0-based.
  3205. * - name: The original identifier, or null.
  3206. */
  3207. IndexedSourceMapConsumer.prototype.originalPositionFor =
  3208. function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  3209. var needle = {
  3210. generatedLine: util.getArg(aArgs, 'line'),
  3211. generatedColumn: util.getArg(aArgs, 'column')
  3212. };
  3213. // Find the section containing the generated position we're trying to map
  3214. // to an original position.
  3215. var sectionIndex = binarySearch.search(needle, this._sections,
  3216. function(needle, section) {
  3217. var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
  3218. if (cmp) {
  3219. return cmp;
  3220. }
  3221. return (needle.generatedColumn -
  3222. section.generatedOffset.generatedColumn);
  3223. });
  3224. var section = this._sections[sectionIndex];
  3225. if (!section) {
  3226. return {
  3227. source: null,
  3228. line: null,
  3229. column: null,
  3230. name: null
  3231. };
  3232. }
  3233. return section.consumer.originalPositionFor({
  3234. line: needle.generatedLine -
  3235. (section.generatedOffset.generatedLine - 1),
  3236. column: needle.generatedColumn -
  3237. (section.generatedOffset.generatedLine === needle.generatedLine
  3238. ? section.generatedOffset.generatedColumn - 1
  3239. : 0),
  3240. bias: aArgs.bias
  3241. });
  3242. };
  3243. /**
  3244. * Return true if we have the source content for every source in the source
  3245. * map, false otherwise.
  3246. */
  3247. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
  3248. function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  3249. return this._sections.every(function (s) {
  3250. return s.consumer.hasContentsOfAllSources();
  3251. });
  3252. };
  3253. /**
  3254. * Returns the original source content. The only argument is the url of the
  3255. * original source file. Returns null if no original source content is
  3256. * available.
  3257. */
  3258. IndexedSourceMapConsumer.prototype.sourceContentFor =
  3259. function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  3260. for (var i = 0; i < this._sections.length; i++) {
  3261. var section = this._sections[i];
  3262. var content = section.consumer.sourceContentFor(aSource, true);
  3263. if (content) {
  3264. return content;
  3265. }
  3266. }
  3267. if (nullOnMissing) {
  3268. return null;
  3269. }
  3270. else {
  3271. throw new Error('"' + aSource + '" is not in the SourceMap.');
  3272. }
  3273. };
  3274. /**
  3275. * Returns the generated line and column information for the original source,
  3276. * line, and column positions provided. The only argument is an object with
  3277. * the following properties:
  3278. *
  3279. * - source: The filename of the original source.
  3280. * - line: The line number in the original source. The line number
  3281. * is 1-based.
  3282. * - column: The column number in the original source. The column
  3283. * number is 0-based.
  3284. *
  3285. * and an object is returned with the following properties:
  3286. *
  3287. * - line: The line number in the generated source, or null. The
  3288. * line number is 1-based.
  3289. * - column: The column number in the generated source, or null.
  3290. * The column number is 0-based.
  3291. */
  3292. IndexedSourceMapConsumer.prototype.generatedPositionFor =
  3293. function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  3294. for (var i = 0; i < this._sections.length; i++) {
  3295. var section = this._sections[i];
  3296. // Only consider this section if the requested source is in the list of
  3297. // sources of the consumer.
  3298. if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {
  3299. continue;
  3300. }
  3301. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  3302. if (generatedPosition) {
  3303. var ret = {
  3304. line: generatedPosition.line +
  3305. (section.generatedOffset.generatedLine - 1),
  3306. column: generatedPosition.column +
  3307. (section.generatedOffset.generatedLine === generatedPosition.line
  3308. ? section.generatedOffset.generatedColumn - 1
  3309. : 0)
  3310. };
  3311. return ret;
  3312. }
  3313. }
  3314. return {
  3315. line: null,
  3316. column: null
  3317. };
  3318. };
  3319. /**
  3320. * Parse the mappings in a string in to a data structure which we can easily
  3321. * query (the ordered arrays in the `this.__generatedMappings` and
  3322. * `this.__originalMappings` properties).
  3323. */
  3324. IndexedSourceMapConsumer.prototype._parseMappings =
  3325. function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  3326. this.__generatedMappings = [];
  3327. this.__originalMappings = [];
  3328. for (var i = 0; i < this._sections.length; i++) {
  3329. var section = this._sections[i];
  3330. var sectionMappings = section.consumer._generatedMappings;
  3331. for (var j = 0; j < sectionMappings.length; j++) {
  3332. var mapping = sectionMappings[j];
  3333. var source = section.consumer._sources.at(mapping.source);
  3334. source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
  3335. this._sources.add(source);
  3336. source = this._sources.indexOf(source);
  3337. var name = null;
  3338. if (mapping.name) {
  3339. name = section.consumer._names.at(mapping.name);
  3340. this._names.add(name);
  3341. name = this._names.indexOf(name);
  3342. }
  3343. // The mappings coming from the consumer for the section have
  3344. // generated positions relative to the start of the section, so we
  3345. // need to offset them to be relative to the start of the concatenated
  3346. // generated file.
  3347. var adjustedMapping = {
  3348. source: source,
  3349. generatedLine: mapping.generatedLine +
  3350. (section.generatedOffset.generatedLine - 1),
  3351. generatedColumn: mapping.generatedColumn +
  3352. (section.generatedOffset.generatedLine === mapping.generatedLine
  3353. ? section.generatedOffset.generatedColumn - 1
  3354. : 0),
  3355. originalLine: mapping.originalLine,
  3356. originalColumn: mapping.originalColumn,
  3357. name: name
  3358. };
  3359. this.__generatedMappings.push(adjustedMapping);
  3360. if (typeof adjustedMapping.originalLine === 'number') {
  3361. this.__originalMappings.push(adjustedMapping);
  3362. }
  3363. }
  3364. }
  3365. quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
  3366. quickSort(this.__originalMappings, util.compareByOriginalPositions);
  3367. };
  3368. exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  3369. /***/ }),
  3370. /* 18 */
  3371. /***/ (function(module, exports) {
  3372. /* -*- Mode: js; js-indent-level: 2; -*- */
  3373. /*
  3374. * Copyright 2011 Mozilla Foundation and contributors
  3375. * Licensed under the New BSD license. See LICENSE or:
  3376. * http://opensource.org/licenses/BSD-3-Clause
  3377. */
  3378. exports.GREATEST_LOWER_BOUND = 1;
  3379. exports.LEAST_UPPER_BOUND = 2;
  3380. /**
  3381. * Recursive implementation of binary search.
  3382. *
  3383. * @param aLow Indices here and lower do not contain the needle.
  3384. * @param aHigh Indices here and higher do not contain the needle.
  3385. * @param aNeedle The element being searched for.
  3386. * @param aHaystack The non-empty array being searched.
  3387. * @param aCompare Function which takes two elements and returns -1, 0, or 1.
  3388. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
  3389. * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
  3390. * closest element that is smaller than or greater than the one we are
  3391. * searching for, respectively, if the exact element cannot be found.
  3392. */
  3393. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  3394. // This function terminates when one of the following is true:
  3395. //
  3396. // 1. We find the exact element we are looking for.
  3397. //
  3398. // 2. We did not find the exact element, but we can return the index of
  3399. // the next-closest element.
  3400. //
  3401. // 3. We did not find the exact element, and there is no next-closest
  3402. // element than the one we are searching for, so we return -1.
  3403. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  3404. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  3405. if (cmp === 0) {
  3406. // Found the element we are looking for.
  3407. return mid;
  3408. }
  3409. else if (cmp > 0) {
  3410. // Our needle is greater than aHaystack[mid].
  3411. if (aHigh - mid > 1) {
  3412. // The element is in the upper half.
  3413. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  3414. }
  3415. // The exact needle element was not found in this haystack. Determine if
  3416. // we are in termination case (3) or (2) and return the appropriate thing.
  3417. if (aBias == exports.LEAST_UPPER_BOUND) {
  3418. return aHigh < aHaystack.length ? aHigh : -1;
  3419. } else {
  3420. return mid;
  3421. }
  3422. }
  3423. else {
  3424. // Our needle is less than aHaystack[mid].
  3425. if (mid - aLow > 1) {
  3426. // The element is in the lower half.
  3427. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  3428. }
  3429. // we are in termination case (3) or (2) and return the appropriate thing.
  3430. if (aBias == exports.LEAST_UPPER_BOUND) {
  3431. return mid;
  3432. } else {
  3433. return aLow < 0 ? -1 : aLow;
  3434. }
  3435. }
  3436. }
  3437. /**
  3438. * This is an implementation of binary search which will always try and return
  3439. * the index of the closest element if there is no exact hit. This is because
  3440. * mappings between original and generated line/col pairs are single points,
  3441. * and there is an implicit region between each of them, so a miss just means
  3442. * that you aren't on the very start of a region.
  3443. *
  3444. * @param aNeedle The element you are looking for.
  3445. * @param aHaystack The array that is being searched.
  3446. * @param aCompare A function which takes the needle and an element in the
  3447. * array and returns -1, 0, or 1 depending on whether the needle is less
  3448. * than, equal to, or greater than the element, respectively.
  3449. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
  3450. * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
  3451. * closest element that is smaller than or greater than the one we are
  3452. * searching for, respectively, if the exact element cannot be found.
  3453. * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
  3454. */
  3455. exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  3456. if (aHaystack.length === 0) {
  3457. return -1;
  3458. }
  3459. var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
  3460. aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  3461. if (index < 0) {
  3462. return -1;
  3463. }
  3464. // We have found either the exact element, or the next-closest element than
  3465. // the one we are searching for. However, there may be more than one such
  3466. // element. Make sure we always return the smallest of these.
  3467. while (index - 1 >= 0) {
  3468. if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
  3469. break;
  3470. }
  3471. --index;
  3472. }
  3473. return index;
  3474. };
  3475. /***/ }),
  3476. /* 19 */
  3477. /***/ (function(module, exports) {
  3478. /* -*- Mode: js; js-indent-level: 2; -*- */
  3479. /*
  3480. * Copyright 2011 Mozilla Foundation and contributors
  3481. * Licensed under the New BSD license. See LICENSE or:
  3482. * http://opensource.org/licenses/BSD-3-Clause
  3483. */
  3484. // It turns out that some (most?) JavaScript engines don't self-host
  3485. // `Array.prototype.sort`. This makes sense because C++ will likely remain
  3486. // faster than JS when doing raw CPU-intensive sorting. However, when using a
  3487. // custom comparator function, calling back and forth between the VM's C++ and
  3488. // JIT'd JS is rather slow *and* loses JIT type information, resulting in
  3489. // worse generated code for the comparator function than would be optimal. In
  3490. // fact, when sorting with a comparator, these costs outweigh the benefits of
  3491. // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
  3492. // a ~3500ms mean speed-up in `bench/bench.html`.
  3493. /**
  3494. * Swap the elements indexed by `x` and `y` in the array `ary`.
  3495. *
  3496. * @param {Array} ary
  3497. * The array.
  3498. * @param {Number} x
  3499. * The index of the first item.
  3500. * @param {Number} y
  3501. * The index of the second item.
  3502. */
  3503. function swap(ary, x, y) {
  3504. var temp = ary[x];
  3505. ary[x] = ary[y];
  3506. ary[y] = temp;
  3507. }
  3508. /**
  3509. * Returns a random integer within the range `low .. high` inclusive.
  3510. *
  3511. * @param {Number} low
  3512. * The lower bound on the range.
  3513. * @param {Number} high
  3514. * The upper bound on the range.
  3515. */
  3516. function randomIntInRange(low, high) {
  3517. return Math.round(low + (Math.random() * (high - low)));
  3518. }
  3519. /**
  3520. * The Quick Sort algorithm.
  3521. *
  3522. * @param {Array} ary
  3523. * An array to sort.
  3524. * @param {function} comparator
  3525. * Function to use to compare two items.
  3526. * @param {Number} p
  3527. * Start index of the array
  3528. * @param {Number} r
  3529. * End index of the array
  3530. */
  3531. function doQuickSort(ary, comparator, p, r) {
  3532. // If our lower bound is less than our upper bound, we (1) partition the
  3533. // array into two pieces and (2) recurse on each half. If it is not, this is
  3534. // the empty array and our base case.
  3535. if (p < r) {
  3536. // (1) Partitioning.
  3537. //
  3538. // The partitioning chooses a pivot between `p` and `r` and moves all
  3539. // elements that are less than or equal to the pivot to the before it, and
  3540. // all the elements that are greater than it after it. The effect is that
  3541. // once partition is done, the pivot is in the exact place it will be when
  3542. // the array is put in sorted order, and it will not need to be moved
  3543. // again. This runs in O(n) time.
  3544. // Always choose a random pivot so that an input array which is reverse
  3545. // sorted does not cause O(n^2) running time.
  3546. var pivotIndex = randomIntInRange(p, r);
  3547. var i = p - 1;
  3548. swap(ary, pivotIndex, r);
  3549. var pivot = ary[r];
  3550. // Immediately after `j` is incremented in this loop, the following hold
  3551. // true:
  3552. //
  3553. // * Every element in `ary[p .. i]` is less than or equal to the pivot.
  3554. //
  3555. // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
  3556. for (var j = p; j < r; j++) {
  3557. if (comparator(ary[j], pivot) <= 0) {
  3558. i += 1;
  3559. swap(ary, i, j);
  3560. }
  3561. }
  3562. swap(ary, i + 1, j);
  3563. var q = i + 1;
  3564. // (2) Recurse on each half.
  3565. doQuickSort(ary, comparator, p, q - 1);
  3566. doQuickSort(ary, comparator, q + 1, r);
  3567. }
  3568. }
  3569. /**
  3570. * Sort the given array in-place with the given comparator function.
  3571. *
  3572. * @param {Array} ary
  3573. * An array to sort.
  3574. * @param {function} comparator
  3575. * Function to use to compare two items.
  3576. */
  3577. exports.quickSort = function (ary, comparator) {
  3578. doQuickSort(ary, comparator, 0, ary.length - 1);
  3579. };
  3580. /***/ }),
  3581. /* 20 */
  3582. /***/ (function(module, exports, __webpack_require__) {
  3583. /* -*- Mode: js; js-indent-level: 2; -*- */
  3584. /*
  3585. * Copyright 2011 Mozilla Foundation and contributors
  3586. * Licensed under the New BSD license. See LICENSE or:
  3587. * http://opensource.org/licenses/BSD-3-Clause
  3588. */
  3589. var SourceMapGenerator = __webpack_require__(5).SourceMapGenerator;
  3590. var util = __webpack_require__(3);
  3591. // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
  3592. // operating systems these days (capturing the result).
  3593. var REGEX_NEWLINE = /(\r?\n)/;
  3594. // Newline character code for charCodeAt() comparisons
  3595. var NEWLINE_CODE = 10;
  3596. // Private symbol for identifying `SourceNode`s when multiple versions of
  3597. // the source-map library are loaded. This MUST NOT CHANGE across
  3598. // versions!
  3599. var isSourceNode = "$$$isSourceNode$$$";
  3600. /**
  3601. * SourceNodes provide a way to abstract over interpolating/concatenating
  3602. * snippets of generated JavaScript source code while maintaining the line and
  3603. * column information associated with the original source code.
  3604. *
  3605. * @param aLine The original line number.
  3606. * @param aColumn The original column number.
  3607. * @param aSource The original source's filename.
  3608. * @param aChunks Optional. An array of strings which are snippets of
  3609. * generated JS, or other SourceNodes.
  3610. * @param aName The original identifier.
  3611. */
  3612. function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  3613. this.children = [];
  3614. this.sourceContents = {};
  3615. this.line = aLine == null ? null : aLine;
  3616. this.column = aColumn == null ? null : aColumn;
  3617. this.source = aSource == null ? null : aSource;
  3618. this.name = aName == null ? null : aName;
  3619. this[isSourceNode] = true;
  3620. if (aChunks != null) this.add(aChunks);
  3621. }
  3622. /**
  3623. * Creates a SourceNode from generated code and a SourceMapConsumer.
  3624. *
  3625. * @param aGeneratedCode The generated code
  3626. * @param aSourceMapConsumer The SourceMap for the generated code
  3627. * @param aRelativePath Optional. The path that relative sources in the
  3628. * SourceMapConsumer should be relative to.
  3629. */
  3630. SourceNode.fromStringWithSourceMap =
  3631. function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  3632. // The SourceNode we want to fill with the generated code
  3633. // and the SourceMap
  3634. var node = new SourceNode();
  3635. // All even indices of this array are one line of the generated code,
  3636. // while all odd indices are the newlines between two adjacent lines
  3637. // (since `REGEX_NEWLINE` captures its match).
  3638. // Processed fragments are accessed by calling `shiftNextLine`.
  3639. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  3640. var remainingLinesIndex = 0;
  3641. var shiftNextLine = function() {
  3642. var lineContents = getNextLine();
  3643. // The last line of a file might not have a newline.
  3644. var newLine = getNextLine() || "";
  3645. return lineContents + newLine;
  3646. function getNextLine() {
  3647. return remainingLinesIndex < remainingLines.length ?
  3648. remainingLines[remainingLinesIndex++] : undefined;
  3649. }
  3650. };
  3651. // We need to remember the position of "remainingLines"
  3652. var lastGeneratedLine = 1, lastGeneratedColumn = 0;
  3653. // The generate SourceNodes we need a code range.
  3654. // To extract it current and last mapping is used.
  3655. // Here we store the last mapping.
  3656. var lastMapping = null;
  3657. aSourceMapConsumer.eachMapping(function (mapping) {
  3658. if (lastMapping !== null) {
  3659. // We add the code from "lastMapping" to "mapping":
  3660. // First check if there is a new line in between.
  3661. if (lastGeneratedLine < mapping.generatedLine) {
  3662. // Associate first line with "lastMapping"
  3663. addMappingWithCode(lastMapping, shiftNextLine());
  3664. lastGeneratedLine++;
  3665. lastGeneratedColumn = 0;
  3666. // The remaining code is added without mapping
  3667. } else {
  3668. // There is no new line in between.
  3669. // Associate the code between "lastGeneratedColumn" and
  3670. // "mapping.generatedColumn" with "lastMapping"
  3671. var nextLine = remainingLines[remainingLinesIndex] || '';
  3672. var code = nextLine.substr(0, mapping.generatedColumn -
  3673. lastGeneratedColumn);
  3674. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
  3675. lastGeneratedColumn);
  3676. lastGeneratedColumn = mapping.generatedColumn;
  3677. addMappingWithCode(lastMapping, code);
  3678. // No more remaining code, continue
  3679. lastMapping = mapping;
  3680. return;
  3681. }
  3682. }
  3683. // We add the generated code until the first mapping
  3684. // to the SourceNode without any mapping.
  3685. // Each line is added as separate string.
  3686. while (lastGeneratedLine < mapping.generatedLine) {
  3687. node.add(shiftNextLine());
  3688. lastGeneratedLine++;
  3689. }
  3690. if (lastGeneratedColumn < mapping.generatedColumn) {
  3691. var nextLine = remainingLines[remainingLinesIndex] || '';
  3692. node.add(nextLine.substr(0, mapping.generatedColumn));
  3693. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
  3694. lastGeneratedColumn = mapping.generatedColumn;
  3695. }
  3696. lastMapping = mapping;
  3697. }, this);
  3698. // We have processed all mappings.
  3699. if (remainingLinesIndex < remainingLines.length) {
  3700. if (lastMapping) {
  3701. // Associate the remaining code in the current line with "lastMapping"
  3702. addMappingWithCode(lastMapping, shiftNextLine());
  3703. }
  3704. // and add the remaining lines without any mapping
  3705. node.add(remainingLines.splice(remainingLinesIndex).join(""));
  3706. }
  3707. // Copy sourcesContent into SourceNode
  3708. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  3709. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  3710. if (content != null) {
  3711. if (aRelativePath != null) {
  3712. sourceFile = util.join(aRelativePath, sourceFile);
  3713. }
  3714. node.setSourceContent(sourceFile, content);
  3715. }
  3716. });
  3717. return node;
  3718. function addMappingWithCode(mapping, code) {
  3719. if (mapping === null || mapping.source === undefined) {
  3720. node.add(code);
  3721. } else {
  3722. var source = aRelativePath
  3723. ? util.join(aRelativePath, mapping.source)
  3724. : mapping.source;
  3725. node.add(new SourceNode(mapping.originalLine,
  3726. mapping.originalColumn,
  3727. source,
  3728. code,
  3729. mapping.name));
  3730. }
  3731. }
  3732. };
  3733. /**
  3734. * Add a chunk of generated JS to this source node.
  3735. *
  3736. * @param aChunk A string snippet of generated JS code, another instance of
  3737. * SourceNode, or an array where each member is one of those things.
  3738. */
  3739. SourceNode.prototype.add = function SourceNode_add(aChunk) {
  3740. if (Array.isArray(aChunk)) {
  3741. aChunk.forEach(function (chunk) {
  3742. this.add(chunk);
  3743. }, this);
  3744. }
  3745. else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  3746. if (aChunk) {
  3747. this.children.push(aChunk);
  3748. }
  3749. }
  3750. else {
  3751. throw new TypeError(
  3752. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  3753. );
  3754. }
  3755. return this;
  3756. };
  3757. /**
  3758. * Add a chunk of generated JS to the beginning of this source node.
  3759. *
  3760. * @param aChunk A string snippet of generated JS code, another instance of
  3761. * SourceNode, or an array where each member is one of those things.
  3762. */
  3763. SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  3764. if (Array.isArray(aChunk)) {
  3765. for (var i = aChunk.length-1; i >= 0; i--) {
  3766. this.prepend(aChunk[i]);
  3767. }
  3768. }
  3769. else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  3770. this.children.unshift(aChunk);
  3771. }
  3772. else {
  3773. throw new TypeError(
  3774. "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
  3775. );
  3776. }
  3777. return this;
  3778. };
  3779. /**
  3780. * Walk over the tree of JS snippets in this node and its children. The
  3781. * walking function is called once for each snippet of JS and is passed that
  3782. * snippet and the its original associated source's line/column location.
  3783. *
  3784. * @param aFn The traversal function.
  3785. */
  3786. SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  3787. var chunk;
  3788. for (var i = 0, len = this.children.length; i < len; i++) {
  3789. chunk = this.children[i];
  3790. if (chunk[isSourceNode]) {
  3791. chunk.walk(aFn);
  3792. }
  3793. else {
  3794. if (chunk !== '') {
  3795. aFn(chunk, { source: this.source,
  3796. line: this.line,
  3797. column: this.column,
  3798. name: this.name });
  3799. }
  3800. }
  3801. }
  3802. };
  3803. /**
  3804. * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
  3805. * each of `this.children`.
  3806. *
  3807. * @param aSep The separator.
  3808. */
  3809. SourceNode.prototype.join = function SourceNode_join(aSep) {
  3810. var newChildren;
  3811. var i;
  3812. var len = this.children.length;
  3813. if (len > 0) {
  3814. newChildren = [];
  3815. for (i = 0; i < len-1; i++) {
  3816. newChildren.push(this.children[i]);
  3817. newChildren.push(aSep);
  3818. }
  3819. newChildren.push(this.children[i]);
  3820. this.children = newChildren;
  3821. }
  3822. return this;
  3823. };
  3824. /**
  3825. * Call String.prototype.replace on the very right-most source snippet. Useful
  3826. * for trimming whitespace from the end of a source node, etc.
  3827. *
  3828. * @param aPattern The pattern to replace.
  3829. * @param aReplacement The thing to replace the pattern with.
  3830. */
  3831. SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  3832. var lastChild = this.children[this.children.length - 1];
  3833. if (lastChild[isSourceNode]) {
  3834. lastChild.replaceRight(aPattern, aReplacement);
  3835. }
  3836. else if (typeof lastChild === 'string') {
  3837. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  3838. }
  3839. else {
  3840. this.children.push(''.replace(aPattern, aReplacement));
  3841. }
  3842. return this;
  3843. };
  3844. /**
  3845. * Set the source content for a source file. This will be added to the SourceMapGenerator
  3846. * in the sourcesContent field.
  3847. *
  3848. * @param aSourceFile The filename of the source file
  3849. * @param aSourceContent The content of the source file
  3850. */
  3851. SourceNode.prototype.setSourceContent =
  3852. function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  3853. this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  3854. };
  3855. /**
  3856. * Walk over the tree of SourceNodes. The walking function is called for each
  3857. * source file content and is passed the filename and source content.
  3858. *
  3859. * @param aFn The traversal function.
  3860. */
  3861. SourceNode.prototype.walkSourceContents =
  3862. function SourceNode_walkSourceContents(aFn) {
  3863. for (var i = 0, len = this.children.length; i < len; i++) {
  3864. if (this.children[i][isSourceNode]) {
  3865. this.children[i].walkSourceContents(aFn);
  3866. }
  3867. }
  3868. var sources = Object.keys(this.sourceContents);
  3869. for (var i = 0, len = sources.length; i < len; i++) {
  3870. aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  3871. }
  3872. };
  3873. /**
  3874. * Return the string representation of this source node. Walks over the tree
  3875. * and concatenates all the various snippets together to one string.
  3876. */
  3877. SourceNode.prototype.toString = function SourceNode_toString() {
  3878. var str = "";
  3879. this.walk(function (chunk) {
  3880. str += chunk;
  3881. });
  3882. return str;
  3883. };
  3884. /**
  3885. * Returns the string representation of this source node along with a source
  3886. * map.
  3887. */
  3888. SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  3889. var generated = {
  3890. code: "",
  3891. line: 1,
  3892. column: 0
  3893. };
  3894. var map = new SourceMapGenerator(aArgs);
  3895. var sourceMappingActive = false;
  3896. var lastOriginalSource = null;
  3897. var lastOriginalLine = null;
  3898. var lastOriginalColumn = null;
  3899. var lastOriginalName = null;
  3900. this.walk(function (chunk, original) {
  3901. generated.code += chunk;
  3902. if (original.source !== null
  3903. && original.line !== null
  3904. && original.column !== null) {
  3905. if(lastOriginalSource !== original.source
  3906. || lastOriginalLine !== original.line
  3907. || lastOriginalColumn !== original.column
  3908. || lastOriginalName !== original.name) {
  3909. map.addMapping({
  3910. source: original.source,
  3911. original: {
  3912. line: original.line,
  3913. column: original.column
  3914. },
  3915. generated: {
  3916. line: generated.line,
  3917. column: generated.column
  3918. },
  3919. name: original.name
  3920. });
  3921. }
  3922. lastOriginalSource = original.source;
  3923. lastOriginalLine = original.line;
  3924. lastOriginalColumn = original.column;
  3925. lastOriginalName = original.name;
  3926. sourceMappingActive = true;
  3927. } else if (sourceMappingActive) {
  3928. map.addMapping({
  3929. generated: {
  3930. line: generated.line,
  3931. column: generated.column
  3932. }
  3933. });
  3934. lastOriginalSource = null;
  3935. sourceMappingActive = false;
  3936. }
  3937. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  3938. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  3939. generated.line++;
  3940. generated.column = 0;
  3941. // Mappings end at eol
  3942. if (idx + 1 === length) {
  3943. lastOriginalSource = null;
  3944. sourceMappingActive = false;
  3945. } else if (sourceMappingActive) {
  3946. map.addMapping({
  3947. source: original.source,
  3948. original: {
  3949. line: original.line,
  3950. column: original.column
  3951. },
  3952. generated: {
  3953. line: generated.line,
  3954. column: generated.column
  3955. },
  3956. name: original.name
  3957. });
  3958. }
  3959. } else {
  3960. generated.column++;
  3961. }
  3962. }
  3963. });
  3964. this.walkSourceContents(function (sourceFile, sourceContent) {
  3965. map.setSourceContent(sourceFile, sourceContent);
  3966. });
  3967. return { code: generated.code, map: map };
  3968. };
  3969. exports.SourceNode = SourceNode;
  3970. /***/ }),
  3971. /* 21 */
  3972. /***/ (function(module, exports) {
  3973. var toString = Object.prototype.toString
  3974. var isModern = (
  3975. typeof Buffer.alloc === 'function' &&
  3976. typeof Buffer.allocUnsafe === 'function' &&
  3977. typeof Buffer.from === 'function'
  3978. )
  3979. function isArrayBuffer (input) {
  3980. return toString.call(input).slice(8, -1) === 'ArrayBuffer'
  3981. }
  3982. function fromArrayBuffer (obj, byteOffset, length) {
  3983. byteOffset >>>= 0
  3984. var maxLength = obj.byteLength - byteOffset
  3985. if (maxLength < 0) {
  3986. throw new RangeError("'offset' is out of bounds")
  3987. }
  3988. if (length === undefined) {
  3989. length = maxLength
  3990. } else {
  3991. length >>>= 0
  3992. if (length > maxLength) {
  3993. throw new RangeError("'length' is out of bounds")
  3994. }
  3995. }
  3996. return isModern
  3997. ? Buffer.from(obj.slice(byteOffset, byteOffset + length))
  3998. : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)))
  3999. }
  4000. function fromString (string, encoding) {
  4001. if (typeof encoding !== 'string' || encoding === '') {
  4002. encoding = 'utf8'
  4003. }
  4004. if (!Buffer.isEncoding(encoding)) {
  4005. throw new TypeError('"encoding" must be a valid string encoding')
  4006. }
  4007. return isModern
  4008. ? Buffer.from(string, encoding)
  4009. : new Buffer(string, encoding)
  4010. }
  4011. function bufferFrom (value, encodingOrOffset, length) {
  4012. if (typeof value === 'number') {
  4013. throw new TypeError('"value" argument must not be a number')
  4014. }
  4015. if (isArrayBuffer(value)) {
  4016. return fromArrayBuffer(value, encodingOrOffset, length)
  4017. }
  4018. if (typeof value === 'string') {
  4019. return fromString(value, encodingOrOffset)
  4020. }
  4021. return isModern
  4022. ? Buffer.from(value)
  4023. : new Buffer(value)
  4024. }
  4025. module.exports = bufferFrom
  4026. /***/ }),
  4027. /* 22 */
  4028. /***/ (function(module, exports) {
  4029. module.exports = require("module");
  4030. /***/ }),
  4031. /* 23 */
  4032. /***/ (function(module, exports, __webpack_require__) {
  4033. "use strict";
  4034. const pathExists = __webpack_require__(24);
  4035. const modifyFilename = __webpack_require__(25);
  4036. const incrementer = fp => {
  4037. let i = 0;
  4038. return () => modifyFilename(fp, (filename, ext) => `${filename} (${++i})${ext}`);
  4039. };
  4040. module.exports = fp => {
  4041. const getFp = incrementer(fp);
  4042. const find = newFp => pathExists(newFp).then(x => x ? find(getFp()) : newFp);
  4043. return find(fp);
  4044. };
  4045. module.exports.sync = fp => {
  4046. const getFp = incrementer(fp);
  4047. const find = newFp => pathExists.sync(newFp) ? find(getFp()) : newFp;
  4048. return find(fp);
  4049. };
  4050. /***/ }),
  4051. /* 24 */
  4052. /***/ (function(module, exports, __webpack_require__) {
  4053. "use strict";
  4054. const fs = __webpack_require__(1);
  4055. module.exports = fp => new Promise(resolve => {
  4056. fs.access(fp, err => {
  4057. resolve(!err);
  4058. });
  4059. });
  4060. module.exports.sync = fp => {
  4061. try {
  4062. fs.accessSync(fp);
  4063. return true;
  4064. } catch (err) {
  4065. return false;
  4066. }
  4067. };
  4068. /***/ }),
  4069. /* 25 */
  4070. /***/ (function(module, exports, __webpack_require__) {
  4071. "use strict";
  4072. var path = __webpack_require__(0);
  4073. module.exports = function modifyFilename(pth, modifier) {
  4074. if (arguments.length !== 2) {
  4075. throw new Error('`path` and `modifier` required');
  4076. }
  4077. if (Array.isArray(pth)) {
  4078. return pth.map(function (el) {
  4079. return modifyFilename(el, modifier);
  4080. });
  4081. }
  4082. var ext = path.extname(pth);
  4083. return path.join(path.dirname(pth), modifier(path.basename(pth, ext), ext));
  4084. };
  4085. /***/ }),
  4086. /* 26 */
  4087. /***/ (function(module, exports, __webpack_require__) {
  4088. "use strict";
  4089. module.exports = (tpl, data) => {
  4090. if (typeof tpl !== 'string') {
  4091. throw new TypeError(`Expected a string in the first argument, got ${typeof tpl}`);
  4092. }
  4093. if (typeof data !== 'object') {
  4094. throw new TypeError(`Expected an Object/Array in the second argument, got ${typeof data}`);
  4095. }
  4096. const re = /{(.*?)}/g;
  4097. return tpl.replace(re, (_, key) => {
  4098. let ret = data;
  4099. for (const prop of key.split('.')) {
  4100. ret = ret ? ret[prop] : '';
  4101. }
  4102. return ret || '';
  4103. });
  4104. };
  4105. /***/ }),
  4106. /* 27 */
  4107. /***/ (function(module, exports, __webpack_require__) {
  4108. "use strict";
  4109. const extList = __webpack_require__(28);
  4110. const sortKeysLength = __webpack_require__(31);
  4111. module.exports = str => {
  4112. const obj = sortKeysLength.desc(extList());
  4113. const exts = Object.keys(obj).filter(x => str.endsWith(x));
  4114. if (exts.length === 0) {
  4115. return [];
  4116. }
  4117. return exts.map(x => ({
  4118. ext: x,
  4119. mime: obj[x]
  4120. }));
  4121. };
  4122. module.exports.mime = str => {
  4123. const obj = sortKeysLength.desc(extList());
  4124. const exts = Object.keys(obj).filter(x => obj[x] === str);
  4125. if (exts.length === 0) {
  4126. return [];
  4127. }
  4128. return exts.map(x => ({
  4129. ext: x,
  4130. mime: obj[x]
  4131. }));
  4132. };
  4133. /***/ }),
  4134. /* 28 */
  4135. /***/ (function(module, exports, __webpack_require__) {
  4136. "use strict";
  4137. var mimeDb = __webpack_require__(29);
  4138. module.exports = function () {
  4139. var ret = {};
  4140. Object.keys(mimeDb).forEach(function (x) {
  4141. var val = mimeDb[x];
  4142. if (val.extensions && val.extensions.length > 0) {
  4143. val.extensions.forEach(function (y) {
  4144. ret[y] = x;
  4145. });
  4146. }
  4147. });
  4148. return ret;
  4149. };
  4150. /***/ }),
  4151. /* 29 */
  4152. /***/ (function(module, exports, __webpack_require__) {
  4153. /*!
  4154. * mime-db
  4155. * Copyright(c) 2014 Jonathan Ong
  4156. * MIT Licensed
  4157. */
  4158. /**
  4159. * Module exports.
  4160. */
  4161. module.exports = __webpack_require__(30)
  4162. /***/ }),
  4163. /* 30 */
  4164. /***/ (function(module, exports) {
  4165. module.exports = {"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana"},"application/3gpp-ims+xml":{"source":"iana"},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana"},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","extensions":["atomsvc"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana"},"application/bacnet-xdd+zip":{"source":"iana"},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana"},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana"},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/cbor":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana"},"application/ccxml+xml":{"source":"iana","extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana"},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana"},"application/cellml+xml":{"source":"iana"},"application/cfw":{"source":"iana"},"application/clue_info+xml":{"source":"iana"},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana"},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana"},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana"},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana"},"application/cstadata+xml":{"source":"iana"},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana"},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana"},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/docbook+xml":{"source":"apache","extensions":["dbk"]},"application/dskpp+xml":{"source":"iana"},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/emergencycalldata.comment+xml":{"source":"iana"},"application/emergencycalldata.control+xml":{"source":"iana"},"application/emergencycalldata.deviceinfo+xml":{"source":"iana"},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana"},"application/emergencycalldata.serviceinfo+xml":{"source":"iana"},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana"},"application/emergencycalldata.veds+xml":{"source":"iana"},"application/emma+xml":{"source":"iana","extensions":["emma"]},"application/emotionml+xml":{"source":"iana"},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana"},"application/epub+zip":{"source":"iana","extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana"},"application/fhir+xml":{"source":"iana"},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false,"extensions":["woff"]},"application/framework-attributes+xml":{"source":"iana"},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geoxacml+xml":{"source":"iana"},"application/gml+xml":{"source":"iana","extensions":["gml"]},"application/gpx+xml":{"source":"apache","extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana"},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana"},"application/ibe-pkg-reply+xml":{"source":"iana"},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana"},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana"},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana"},"application/kpml-response+xml":{"source":"iana"},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana"},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana"},"application/lost+xml":{"source":"iana","extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana"},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana"},"application/mathml-presentation+xml":{"source":"iana"},"application/mbms-associated-procedure-description+xml":{"source":"iana"},"application/mbms-deregister+xml":{"source":"iana"},"application/mbms-envelope+xml":{"source":"iana"},"application/mbms-msk+xml":{"source":"iana"},"application/mbms-msk-response+xml":{"source":"iana"},"application/mbms-protection-description+xml":{"source":"iana"},"application/mbms-reception-report+xml":{"source":"iana"},"application/mbms-register+xml":{"source":"iana"},"application/mbms-register-response+xml":{"source":"iana"},"application/mbms-schedule+xml":{"source":"iana"},"application/mbms-user-service-description+xml":{"source":"iana"},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana"},"application/media_control+xml":{"source":"iana"},"application/mediaservercontrol+xml":{"source":"iana","extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","extensions":["meta4"]},"application/mets+xml":{"source":"iana","extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mmt-usd+xml":{"source":"iana"},"application/mods+xml":{"source":"iana","extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana"},"application/mrb-publish+xml":{"source":"iana"},"application/msc-ivr+xml":{"source":"iana"},"application/msc-mixer+xml":{"source":"iana"},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana"},"application/n-triples":{"source":"iana"},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana"},"application/news-groupinfo":{"source":"iana"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana"},"application/node":{"source":"iana"},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana"},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana"},"application/pidf-diff+xml":{"source":"iana"},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","extensions":["pls"]},"application/poc-settings+xml":{"source":"iana"},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana"},"application/provenance+xml":{"source":"iana"},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.hpub+zip":{"source":"iana"},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana"},"application/pskc+xml":{"source":"iana","extensions":["pskcxml"]},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf"]},"application/reginfo+xml":{"source":"iana","extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","extensions":["rld"]},"application/rfc+xml":{"source":"iana"},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana"},"application/rls-services+xml":{"source":"iana","extensions":["rs"]},"application/route-apd+xml":{"source":"iana"},"application/route-s-tsid+xml":{"source":"iana"},"application/route-usd+xml":{"source":"iana"},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana"},"application/samlmetadata+xml":{"source":"iana"},"application/sbml+xml":{"source":"iana","extensions":["sbml"]},"application/scaip+xml":{"source":"iana"},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/sep+xml":{"source":"iana"},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","extensions":["shf"]},"application/sieve":{"source":"iana"},"application/simple-filter+xml":{"source":"iana"},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","extensions":["srx"]},"application/spirits-event+xml":{"source":"iana"},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","extensions":["grxml"]},"application/sru+xml":{"source":"iana","extensions":["sru"]},"application/ssdl+xml":{"source":"apache","extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","extensions":["ssml"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/tei+xml":{"source":"iana","extensions":["tei","teicorpus"]},"application/thraud+xml":{"source":"iana","extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tnauthlist":{"source":"iana"},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana"},"application/tve-trigger":{"source":"iana"},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana"},"application/urc-ressheet+xml":{"source":"iana"},"application/urc-targetdesc+xml":{"source":"iana"},"application/urc-uisocketdesc+xml":{"source":"iana"},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana"},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana"},"application/vnd.3gpp-prose+xml":{"source":"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana"},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana"},"application/vnd.3gpp.bsf+xml":{"source":"iana"},"application/vnd.3gpp.gmop+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana"},"application/vnd.3gpp.mid-call+xml":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana"},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana"},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana"},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana"},"application/vnd.3gpp.ussd+xml":{"source":"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana"},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","extensions":["mpkg"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana"},"application/vnd.balsamiq.bmml+xml":{"source":"iana"},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana"},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana"},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana"},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","extensions":["wbs"]},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana"},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana"},"application/vnd.cybank":{"source":"iana"},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume-movie":{"source":"iana"},"application/vnd.desmume.movie":{"source":"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana"},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana"},"application/vnd.dvb.notif-container+xml":{"source":"iana"},"application/vnd.dvb.notif-generic+xml":{"source":"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana"},"application/vnd.dvb.notif-init+xml":{"source":"iana"},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana"},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana"},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana"},"application/vnd.eszigno3+xml":{"source":"iana","extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana"},"application/vnd.etsi.asic-e+zip":{"source":"iana"},"application/vnd.etsi.asic-s+zip":{"source":"iana"},"application/vnd.etsi.cug+xml":{"source":"iana"},"application/vnd.etsi.iptvcommand+xml":{"source":"iana"},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana"},"application/vnd.etsi.iptvprofile+xml":{"source":"iana"},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana"},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana"},"application/vnd.etsi.iptvservice+xml":{"source":"iana"},"application/vnd.etsi.iptvsync+xml":{"source":"iana"},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana"},"application/vnd.etsi.mcid+xml":{"source":"iana"},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana"},"application/vnd.etsi.pstn+xml":{"source":"iana"},"application/vnd.etsi.sci+xml":{"source":"iana"},"application/vnd.etsi.simservs+xml":{"source":"iana"},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana"},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana"},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana"},"application/vnd.gov.sk.e-form+zip":{"source":"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana"},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana"},"application/vnd.imagemeter.image+zip":{"source":"iana"},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana"},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana"},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana"},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana"},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana"},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana"},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana"},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana"},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","extensions":["lasxml"]},"application/vnd.liberty-request+xml":{"source":"iana"},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","extensions":["lbe"]},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana"},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana"},"application/vnd.marlin.drm.license+xml":{"source":"iana"},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana"},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana"},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana"},"application/vnd.ms-printing.printticket+xml":{"source":"apache"},"application/vnd.ms-printschematicket+xml":{"source":"iana"},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana"},"application/vnd.nokia.iptv.config+xml":{"source":"iana"},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana"},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana"},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana"},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana"},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana"},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana"},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana"},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana"},"application/vnd.oipf.spdlist+xml":{"source":"iana"},"application/vnd.oipf.ueprofile+xml":{"source":"iana"},"application/vnd.oipf.userprofile+xml":{"source":"iana"},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana"},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana"},"application/vnd.oma.bcast.imd+xml":{"source":"iana"},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana"},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana"},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana"},"application/vnd.oma.bcast.sprov+xml":{"source":"iana"},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana"},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana"},"application/vnd.oma.cab-pcc+xml":{"source":"iana"},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana"},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana"},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana"},"application/vnd.oma.group-usage-list+xml":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana"},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana"},"application/vnd.oma.poc.final-report+xml":{"source":"iana"},"application/vnd.oma.poc.groups+xml":{"source":"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana"},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana"},"application/vnd.oma.xcap-directory+xml":{"source":"iana"},"application/vnd.omads-email+xml":{"source":"iana"},"application/vnd.omads-file+xml":{"source":"iana"},"application/vnd.omads-folder+xml":{"source":"iana"},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana"},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana"},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana"},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana"},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos+xml":{"source":"iana"},"application/vnd.paos.xml":{"source":"apache"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana"},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana"},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana"},"application/vnd.radisys.msml+xml":{"source":"iana"},"application/vnd.radisys.msml-audit+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana"},"application/vnd.radisys.msml-conf+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana"},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana"},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.software602.filler.form+xml":{"source":"iana"},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana"},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana"},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana"},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana"},"application/vnd.wv.ssp+xml":{"source":"iana"},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana"},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana"},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"apache","extensions":["der","crt","pem"]},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana"},"application/xaml+xml":{"source":"apache","extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana"},"application/xcap-caps+xml":{"source":"iana"},"application/xcap-diff+xml":{"source":"iana","extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana"},"application/xcap-error+xml":{"source":"iana"},"application/xcap-ns+xml":{"source":"iana"},"application/xcon-conference-info+xml":{"source":"iana"},"application/xcon-conference-info-diff+xml":{"source":"iana"},"application/xenc+xml":{"source":"iana","extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache"},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana"},"application/xmpp+xml":{"source":"iana"},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","extensions":["xpl"]},"application/xslt+xml":{"source":"iana","extensions":["xslt"]},"application/xspf+xml":{"source":"apache","extensions":["xspf"]},"application/xv+xml":{"source":"iana","extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana"},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana"},"application/yin+xml":{"source":"iana","extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana"},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana"},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana"},"image/apng":{"compressible":false,"extensions":["apng"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana"},"image/emf":{"source":"iana"},"image/fits":{"source":"iana"},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana"},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana"},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana"},"image/tiff":{"source":"iana","compressible":false,"extensions":["tiff","tif"]},"image/tiff-fx":{"source":"iana"},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana"},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana"},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana"},"image/vnd.valve.source.texture":{"source":"iana"},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana"},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana"},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/vnd.collada+xml":{"source":"iana","extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana"},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana"},"model/vnd.parasolid.transmit.binary":{"source":"iana"},"model/vnd.parasolid.transmit.text":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.valve.source.compiled-map":{"source":"iana"},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana"},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana"},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana","compressible":false},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shex":{"extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana"},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}
  4166. /***/ }),
  4167. /* 31 */
  4168. /***/ (function(module, exports, __webpack_require__) {
  4169. "use strict";
  4170. var sortKeys = __webpack_require__(32);
  4171. /**
  4172. * Sort object keys by length
  4173. *
  4174. * @param obj
  4175. * @api public
  4176. */
  4177. module.exports.desc = function (obj) {
  4178. return sortKeys(obj, function (a, b) {
  4179. return b.length - a.length;
  4180. });
  4181. }
  4182. module.exports.asc = function (obj) {
  4183. return sortKeys(obj, function (a, b) {
  4184. return a.length - b.length;
  4185. });
  4186. }
  4187. /***/ }),
  4188. /* 32 */
  4189. /***/ (function(module, exports, __webpack_require__) {
  4190. "use strict";
  4191. var isPlainObj = __webpack_require__(33);
  4192. module.exports = function (obj, opts) {
  4193. if (!isPlainObj(obj)) {
  4194. throw new TypeError('Expected a plain object');
  4195. }
  4196. opts = opts || {};
  4197. // DEPRECATED
  4198. if (typeof opts === 'function') {
  4199. opts = {compare: opts};
  4200. }
  4201. var deep = opts.deep;
  4202. var seenInput = [];
  4203. var seenOutput = [];
  4204. var sortKeys = function (x) {
  4205. var seenIndex = seenInput.indexOf(x);
  4206. if (seenIndex !== -1) {
  4207. return seenOutput[seenIndex];
  4208. }
  4209. var ret = {};
  4210. var keys = Object.keys(x).sort(opts.compare);
  4211. seenInput.push(x);
  4212. seenOutput.push(ret);
  4213. for (var i = 0; i < keys.length; i++) {
  4214. var key = keys[i];
  4215. var val = x[key];
  4216. ret[key] = deep && isPlainObj(val) ? sortKeys(val) : val;
  4217. }
  4218. return ret;
  4219. };
  4220. return sortKeys(obj);
  4221. };
  4222. /***/ }),
  4223. /* 33 */
  4224. /***/ (function(module, exports, __webpack_require__) {
  4225. "use strict";
  4226. var toString = Object.prototype.toString;
  4227. module.exports = function (x) {
  4228. var prototype;
  4229. return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
  4230. };
  4231. /***/ }),
  4232. /* 34 */
  4233. /***/ (function(module, exports, __webpack_require__) {
  4234. "use strict";
  4235. Object.defineProperty(exports, "__esModule", {
  4236. value: true
  4237. });
  4238. var _electron = __webpack_require__(2);
  4239. var _path = __webpack_require__(0);
  4240. var _path2 = _interopRequireDefault(_path);
  4241. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4242. function createLoginWindow(loginCallback) {
  4243. var loginWindow = new _electron.BrowserWindow({
  4244. width: 300,
  4245. height: 400,
  4246. frame: false,
  4247. resizable: false
  4248. });
  4249. loginWindow.loadURL(`file://${_path2.default.join(__dirname, '/static/login/login.html')}`);
  4250. _electron.ipcMain.once('login-message', function (event, usernameAndPassword) {
  4251. loginCallback(usernameAndPassword[0], usernameAndPassword[1]);
  4252. loginWindow.close();
  4253. });
  4254. return loginWindow;
  4255. }
  4256. exports.default = createLoginWindow;
  4257. /***/ }),
  4258. /* 35 */
  4259. /***/ (function(module, exports, __webpack_require__) {
  4260. "use strict";
  4261. Object.defineProperty(exports, "__esModule", {
  4262. value: true
  4263. });
  4264. var _fs = __webpack_require__(1);
  4265. var _fs2 = _interopRequireDefault(_fs);
  4266. var _path = __webpack_require__(0);
  4267. var _path2 = _interopRequireDefault(_path);
  4268. var _electron = __webpack_require__(2);
  4269. var _electronWindowState = __webpack_require__(36);
  4270. var _electronWindowState2 = _interopRequireDefault(_electronWindowState);
  4271. var _mainWindowHelpers = __webpack_require__(49);
  4272. var _mainWindowHelpers2 = _interopRequireDefault(_mainWindowHelpers);
  4273. var _helpers = __webpack_require__(4);
  4274. var _helpers2 = _interopRequireDefault(_helpers);
  4275. var _menu = __webpack_require__(52);
  4276. var _menu2 = _interopRequireDefault(_menu);
  4277. var _contextMenu = __webpack_require__(53);
  4278. var _contextMenu2 = _interopRequireDefault(_contextMenu);
  4279. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  4280. var isOSX = _helpers2.default.isOSX,
  4281. linkIsInternal = _helpers2.default.linkIsInternal,
  4282. getCssToInject = _helpers2.default.getCssToInject,
  4283. shouldInjectCss = _helpers2.default.shouldInjectCss,
  4284. getAppIcon = _helpers2.default.getAppIcon,
  4285. nativeTabsSupported = _helpers2.default.nativeTabsSupported,
  4286. getCounterValue = _helpers2.default.getCounterValue;
  4287. var onNewWindowHelper = _mainWindowHelpers2.default.onNewWindowHelper;
  4288. var ZOOM_INTERVAL = 0.1;
  4289. function maybeHideWindow(window, event, fastQuit, tray) {
  4290. if (isOSX() && !fastQuit) {
  4291. // this is called when exiting from clicking the cross button on the window
  4292. event.preventDefault();
  4293. window.hide();
  4294. } else if (!fastQuit && tray) {
  4295. event.preventDefault();
  4296. window.hide();
  4297. }
  4298. // will close the window on other platforms
  4299. }
  4300. function maybeInjectCss(browserWindow) {
  4301. if (!shouldInjectCss()) {
  4302. return;
  4303. }
  4304. var cssToInject = getCssToInject();
  4305. var injectCss = function injectCss() {
  4306. browserWindow.webContents.insertCSS(cssToInject);
  4307. };
  4308. browserWindow.webContents.on('did-finish-load', function () {
  4309. // remove the injection of css the moment the page is loaded
  4310. browserWindow.webContents.removeListener('did-get-response-details', injectCss);
  4311. });
  4312. // on every page navigation inject the css
  4313. browserWindow.webContents.on('did-navigate', function () {
  4314. // we have to inject the css in did-get-response-details to prevent the fouc
  4315. // will run multiple times
  4316. browserWindow.webContents.on('did-get-response-details', injectCss);
  4317. });
  4318. }
  4319. /**
  4320. *
  4321. * @param {{}} inpOptions AppArgs from nativefier.json
  4322. * @param {function} onAppQuit
  4323. * @param {function} setDockBadge
  4324. * @returns {electron.BrowserWindow}
  4325. */
  4326. function createMainWindow(inpOptions, onAppQuit, setDockBadge) {
  4327. var _this = this;
  4328. var options = Object.assign({}, inpOptions);
  4329. var mainWindowState = (0, _electronWindowState2.default)({
  4330. defaultWidth: options.width || 1280,
  4331. defaultHeight: options.height || 800
  4332. });
  4333. var DEFAULT_WINDOW_OPTIONS = {
  4334. // Convert dashes to spaces because on linux the app name is joined with dashes
  4335. title: options.name,
  4336. tabbingIdentifier: nativeTabsSupported() ? options.name : undefined,
  4337. webPreferences: {
  4338. javascript: true,
  4339. plugins: true,
  4340. // node globals causes problems with sites like messenger.com
  4341. nodeIntegration: false,
  4342. webSecurity: !options.insecure,
  4343. preload: _path2.default.join(__dirname, 'static', 'preload.js'),
  4344. zoomFactor: options.zoom
  4345. }
  4346. };
  4347. var mainWindow = new _electron.BrowserWindow(Object.assign({
  4348. frame: !options.hideWindowFrame,
  4349. width: mainWindowState.width,
  4350. height: mainWindowState.height,
  4351. minWidth: options.minWidth,
  4352. minHeight: options.minHeight,
  4353. maxWidth: options.maxWidth,
  4354. maxHeight: options.maxHeight,
  4355. x: options.x,
  4356. y: options.y,
  4357. autoHideMenuBar: !options.showMenuBar,
  4358. // after webpack path here should reference `resources/app/`
  4359. icon: getAppIcon(),
  4360. // set to undefined and not false because explicitly setting to false will disable full screen
  4361. fullscreen: options.fullScreen || undefined,
  4362. // Whether the window should always stay on top of other windows. Default is false.
  4363. alwaysOnTop: options.alwaysOnTop,
  4364. titleBarStyle: options.titleBarStyle
  4365. }, DEFAULT_WINDOW_OPTIONS));
  4366. mainWindowState.manage(mainWindow);
  4367. // after first run, no longer force maximize to be true
  4368. if (options.maximize) {
  4369. mainWindow.maximize();
  4370. options.maximize = undefined;
  4371. _fs2.default.writeFileSync(_path2.default.join(__dirname, '..', 'nativefier.json'), JSON.stringify(options));
  4372. }
  4373. var withFocusedWindow = function withFocusedWindow(block) {
  4374. var focusedWindow = _electron.BrowserWindow.getFocusedWindow();
  4375. if (focusedWindow) {
  4376. block(focusedWindow);
  4377. }
  4378. };
  4379. var adjustWindowZoom = function adjustWindowZoom(window, adjustment) {
  4380. window.webContents.getZoomFactor(function (zoomFactor) {
  4381. window.webContents.setZoomFactor(zoomFactor + adjustment);
  4382. });
  4383. };
  4384. var onZoomIn = function onZoomIn() {
  4385. withFocusedWindow(function (focusedWindow) {
  4386. return adjustWindowZoom(focusedWindow, ZOOM_INTERVAL);
  4387. });
  4388. };
  4389. var onZoomOut = function onZoomOut() {
  4390. withFocusedWindow(function (focusedWindow) {
  4391. return adjustWindowZoom(focusedWindow, -ZOOM_INTERVAL);
  4392. });
  4393. };
  4394. var onZoomReset = function onZoomReset() {
  4395. withFocusedWindow(function (focusedWindow) {
  4396. focusedWindow.webContents.setZoomFactor(options.zoom);
  4397. });
  4398. };
  4399. var clearAppData = function clearAppData() {
  4400. _electron.dialog.showMessageBox(mainWindow, {
  4401. type: 'warning',
  4402. buttons: ['Yes', 'Cancel'],
  4403. defaultId: 1,
  4404. title: 'Clear cache confirmation',
  4405. message: 'This will clear all data (cookies, local storage etc) from this app. Are you sure you wish to proceed?'
  4406. }, function (response) {
  4407. if (response !== 0) {
  4408. return;
  4409. }
  4410. var session = mainWindow.webContents.session;
  4411. session.clearStorageData(function () {
  4412. session.clearCache(function () {
  4413. mainWindow.loadURL(options.targetUrl);
  4414. });
  4415. });
  4416. });
  4417. };
  4418. var onGoBack = function onGoBack() {
  4419. withFocusedWindow(function (focusedWindow) {
  4420. focusedWindow.webContents.goBack();
  4421. });
  4422. };
  4423. var onGoForward = function onGoForward() {
  4424. withFocusedWindow(function (focusedWindow) {
  4425. focusedWindow.webContents.goForward();
  4426. });
  4427. };
  4428. var getCurrentUrl = function getCurrentUrl() {
  4429. withFocusedWindow(function (focusedWindow) {
  4430. focusedWindow.webContents.getURL();
  4431. });
  4432. };
  4433. var onWillNavigate = function onWillNavigate(event, urlToGo) {
  4434. if (!linkIsInternal(options.targetUrl, urlToGo, options.internalUrls)) {
  4435. event.preventDefault();
  4436. _electron.shell.openExternal(urlToGo);
  4437. }
  4438. };
  4439. var createNewWindow = void 0;
  4440. var createNewTab = function createNewTab(url, foreground) {
  4441. withFocusedWindow(function (focusedWindow) {
  4442. var newTab = createNewWindow(url);
  4443. focusedWindow.addTabbedWindow(newTab);
  4444. if (!foreground) {
  4445. focusedWindow.focus();
  4446. }
  4447. return newTab;
  4448. });
  4449. return undefined;
  4450. };
  4451. var createAboutBlankWindow = function createAboutBlankWindow() {
  4452. var window = createNewWindow('about:blank');
  4453. window.hide();
  4454. window.webContents.once('did-stop-loading', function () {
  4455. if (window.webContents.getURL() === 'about:blank') {
  4456. window.close();
  4457. } else {
  4458. window.show();
  4459. }
  4460. });
  4461. return window;
  4462. };
  4463. var onNewWindow = function onNewWindow(event, urlToGo, _, disposition) {
  4464. var preventDefault = function preventDefault(newGuest) {
  4465. event.preventDefault();
  4466. if (newGuest) {
  4467. // eslint-disable-next-line no-param-reassign
  4468. event.newGuest = newGuest;
  4469. }
  4470. };
  4471. onNewWindowHelper(urlToGo, disposition, options.targetUrl, options.internalUrls, preventDefault, _electron.shell.openExternal, createAboutBlankWindow, nativeTabsSupported, createNewTab);
  4472. };
  4473. var sendParamsOnDidFinishLoad = function sendParamsOnDidFinishLoad(window) {
  4474. window.webContents.on('did-finish-load', function () {
  4475. window.webContents.send('params', JSON.stringify(options));
  4476. });
  4477. };
  4478. createNewWindow = function createNewWindow(url) {
  4479. var window = new _electron.BrowserWindow(DEFAULT_WINDOW_OPTIONS);
  4480. if (options.userAgent) {
  4481. window.webContents.setUserAgent(options.userAgent);
  4482. }
  4483. maybeInjectCss(window);
  4484. sendParamsOnDidFinishLoad(window);
  4485. window.webContents.on('new-window', onNewWindow);
  4486. window.webContents.on('will-navigate', onWillNavigate);
  4487. window.loadURL(url);
  4488. return window;
  4489. };
  4490. var menuOptions = {
  4491. nativefierVersion: options.nativefierVersion,
  4492. appQuit: onAppQuit,
  4493. zoomIn: onZoomIn,
  4494. zoomOut: onZoomOut,
  4495. zoomReset: onZoomReset,
  4496. zoomBuildTimeValue: options.zoom,
  4497. goBack: onGoBack,
  4498. goForward: onGoForward,
  4499. getCurrentUrl,
  4500. clearAppData,
  4501. disableDevTools: options.disableDevTools
  4502. };
  4503. (0, _menu2.default)(menuOptions);
  4504. if (!options.disableContextMenu) {
  4505. (0, _contextMenu2.default)(createNewWindow, nativeTabsSupported() ? createNewTab : undefined);
  4506. }
  4507. if (options.userAgent) {
  4508. mainWindow.webContents.setUserAgent(options.userAgent);
  4509. }
  4510. maybeInjectCss(mainWindow);
  4511. sendParamsOnDidFinishLoad(mainWindow);
  4512. if (options.counter) {
  4513. mainWindow.on('page-title-updated', function (e, title) {
  4514. var counterValue = getCounterValue(title);
  4515. if (counterValue) {
  4516. setDockBadge(counterValue, options.bounce);
  4517. } else {
  4518. setDockBadge('');
  4519. }
  4520. });
  4521. } else {
  4522. _electron.ipcMain.on('notification', function () {
  4523. if (!isOSX() || mainWindow.isFocused()) {
  4524. return;
  4525. }
  4526. setDockBadge('•', options.bounce);
  4527. });
  4528. mainWindow.on('focus', function () {
  4529. setDockBadge('');
  4530. });
  4531. }
  4532. mainWindow.webContents.on('new-window', onNewWindow);
  4533. mainWindow.webContents.on('will-navigate', onWillNavigate);
  4534. mainWindow.loadURL(options.targetUrl);
  4535. mainWindow.on('new-tab', function () {
  4536. return createNewTab(options.targetUrl, true);
  4537. });
  4538. mainWindow.on('close', function (event) {
  4539. if (mainWindow.isFullScreen()) {
  4540. if (nativeTabsSupported()) {
  4541. mainWindow.moveTabToNewWindow();
  4542. }
  4543. mainWindow.setFullScreen(false);
  4544. mainWindow.once('leave-full-screen', maybeHideWindow.bind(_this, mainWindow, event, options.fastQuit));
  4545. }
  4546. maybeHideWindow(mainWindow, event, options.fastQuit, options.tray);
  4547. });
  4548. return mainWindow;
  4549. }
  4550. exports.default = createMainWindow;
  4551. /***/ }),
  4552. /* 36 */
  4553. /***/ (function(module, exports, __webpack_require__) {
  4554. "use strict";
  4555. var path = __webpack_require__(0);
  4556. var electron = __webpack_require__(2);
  4557. var jsonfile = __webpack_require__(37);
  4558. var mkdirp = __webpack_require__(45);
  4559. var deepEqual = __webpack_require__(46);
  4560. module.exports = function (options) {
  4561. var app = electron.app || electron.remote.app;
  4562. var screen = electron.screen || electron.remote.screen;
  4563. var state;
  4564. var winRef;
  4565. var stateChangeTimer;
  4566. var eventHandlingDelay = 100;
  4567. var config = Object.assign({
  4568. file: 'window-state.json',
  4569. path: app.getPath('userData'),
  4570. maximize: true,
  4571. fullScreen: true
  4572. }, options);
  4573. var fullStoreFileName = path.join(config.path, config.file);
  4574. function isNormal(win) {
  4575. return !win.isMaximized() && !win.isMinimized() && !win.isFullScreen();
  4576. }
  4577. function hasBounds() {
  4578. return state &&
  4579. Number.isInteger(state.x) &&
  4580. Number.isInteger(state.y) &&
  4581. Number.isInteger(state.width) && state.width > 0 &&
  4582. Number.isInteger(state.height) && state.height > 0;
  4583. }
  4584. function validateState() {
  4585. var isValid = state && (hasBounds() || state.isMaximized || state.isFullScreen);
  4586. if (!isValid) {
  4587. state = null;
  4588. return;
  4589. }
  4590. if (hasBounds() && state.displayBounds) {
  4591. // Check if the display where the window was last open is still available
  4592. var displayBounds = screen.getDisplayMatching(state).bounds;
  4593. var sameBounds = deepEqual(state.displayBounds, displayBounds, {strict: true});
  4594. if (!sameBounds) {
  4595. if (displayBounds.width < state.displayBounds.width) {
  4596. if (state.x > displayBounds.width) {
  4597. state.x = 0;
  4598. }
  4599. if (state.width > displayBounds.width) {
  4600. state.width = displayBounds.width;
  4601. }
  4602. }
  4603. if (displayBounds.height < state.displayBounds.height) {
  4604. if (state.y > displayBounds.height) {
  4605. state.y = 0;
  4606. }
  4607. if (state.height > displayBounds.height) {
  4608. state.height = displayBounds.height;
  4609. }
  4610. }
  4611. }
  4612. }
  4613. }
  4614. function updateState(win) {
  4615. win = win || winRef;
  4616. if (!win) {
  4617. return;
  4618. }
  4619. // don't throw an error when window was closed
  4620. try {
  4621. var winBounds = win.getBounds();
  4622. if (isNormal(win)) {
  4623. state.x = winBounds.x;
  4624. state.y = winBounds.y;
  4625. state.width = winBounds.width;
  4626. state.height = winBounds.height;
  4627. }
  4628. state.isMaximized = win.isMaximized();
  4629. state.isFullScreen = win.isFullScreen();
  4630. state.displayBounds = screen.getDisplayMatching(winBounds).bounds;
  4631. } catch (err) {}
  4632. }
  4633. function saveState(win) {
  4634. // Update window state only if it was provided
  4635. if (win) {
  4636. updateState(win);
  4637. }
  4638. // Save state
  4639. try {
  4640. mkdirp.sync(path.dirname(fullStoreFileName));
  4641. jsonfile.writeFileSync(fullStoreFileName, state);
  4642. } catch (err) {
  4643. // Don't care
  4644. }
  4645. }
  4646. function stateChangeHandler() {
  4647. // Handles both 'resize' and 'move'
  4648. clearTimeout(stateChangeTimer);
  4649. stateChangeTimer = setTimeout(updateState, eventHandlingDelay);
  4650. }
  4651. function closeHandler() {
  4652. updateState();
  4653. }
  4654. function closedHandler() {
  4655. // Unregister listeners and save state
  4656. unmanage();
  4657. saveState();
  4658. }
  4659. function manage(win) {
  4660. if (config.maximize && state.isMaximized) {
  4661. win.maximize();
  4662. }
  4663. if (config.fullScreen && state.isFullScreen) {
  4664. win.setFullScreen(true);
  4665. }
  4666. win.on('resize', stateChangeHandler);
  4667. win.on('move', stateChangeHandler);
  4668. win.on('close', closeHandler);
  4669. win.on('closed', closedHandler);
  4670. winRef = win;
  4671. }
  4672. function unmanage() {
  4673. if (winRef) {
  4674. winRef.removeListener('resize', stateChangeHandler);
  4675. winRef.removeListener('move', stateChangeHandler);
  4676. clearTimeout(stateChangeTimer);
  4677. winRef.removeListener('close', closeHandler);
  4678. winRef.removeListener('closed', closedHandler);
  4679. winRef = null;
  4680. }
  4681. }
  4682. // Load previous state
  4683. try {
  4684. state = jsonfile.readFileSync(fullStoreFileName);
  4685. } catch (err) {
  4686. // Don't care
  4687. }
  4688. // Check state validity
  4689. validateState();
  4690. // Set state fallback values
  4691. state = Object.assign({
  4692. width: config.defaultWidth || 800,
  4693. height: config.defaultHeight || 600
  4694. }, state);
  4695. return {
  4696. get x() { return state.x; },
  4697. get y() { return state.y; },
  4698. get width() { return state.width; },
  4699. get height() { return state.height; },
  4700. get isMaximized() { return state.isMaximized; },
  4701. get isFullScreen() { return state.isFullScreen; },
  4702. saveState: saveState,
  4703. unmanage: unmanage,
  4704. manage: manage
  4705. };
  4706. };
  4707. /***/ }),
  4708. /* 37 */
  4709. /***/ (function(module, exports, __webpack_require__) {
  4710. var _fs
  4711. try {
  4712. _fs = __webpack_require__(38)
  4713. } catch (_) {
  4714. _fs = __webpack_require__(1)
  4715. }
  4716. function readFile (file, options, callback) {
  4717. if (callback == null) {
  4718. callback = options
  4719. options = {}
  4720. }
  4721. if (typeof options === 'string') {
  4722. options = {encoding: options}
  4723. }
  4724. options = options || {}
  4725. var fs = options.fs || _fs
  4726. var shouldThrow = true
  4727. // DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead
  4728. if ('passParsingErrors' in options) {
  4729. shouldThrow = options.passParsingErrors
  4730. } else if ('throws' in options) {
  4731. shouldThrow = options.throws
  4732. }
  4733. fs.readFile(file, options, function (err, data) {
  4734. if (err) return callback(err)
  4735. data = stripBom(data)
  4736. var obj
  4737. try {
  4738. obj = JSON.parse(data, options ? options.reviver : null)
  4739. } catch (err2) {
  4740. if (shouldThrow) {
  4741. err2.message = file + ': ' + err2.message
  4742. return callback(err2)
  4743. } else {
  4744. return callback(null, null)
  4745. }
  4746. }
  4747. callback(null, obj)
  4748. })
  4749. }
  4750. function readFileSync (file, options) {
  4751. options = options || {}
  4752. if (typeof options === 'string') {
  4753. options = {encoding: options}
  4754. }
  4755. var fs = options.fs || _fs
  4756. var shouldThrow = true
  4757. // DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead
  4758. if ('passParsingErrors' in options) {
  4759. shouldThrow = options.passParsingErrors
  4760. } else if ('throws' in options) {
  4761. shouldThrow = options.throws
  4762. }
  4763. var content = fs.readFileSync(file, options)
  4764. content = stripBom(content)
  4765. try {
  4766. return JSON.parse(content, options.reviver)
  4767. } catch (err) {
  4768. if (shouldThrow) {
  4769. err.message = file + ': ' + err.message
  4770. throw err
  4771. } else {
  4772. return null
  4773. }
  4774. }
  4775. }
  4776. function writeFile (file, obj, options, callback) {
  4777. if (callback == null) {
  4778. callback = options
  4779. options = {}
  4780. }
  4781. options = options || {}
  4782. var fs = options.fs || _fs
  4783. var spaces = typeof options === 'object' && options !== null
  4784. ? 'spaces' in options
  4785. ? options.spaces : this.spaces
  4786. : this.spaces
  4787. var str = ''
  4788. try {
  4789. str = JSON.stringify(obj, options ? options.replacer : null, spaces) + '\n'
  4790. } catch (err) {
  4791. if (callback) return callback(err, null)
  4792. }
  4793. fs.writeFile(file, str, options, callback)
  4794. }
  4795. function writeFileSync (file, obj, options) {
  4796. options = options || {}
  4797. var fs = options.fs || _fs
  4798. var spaces = typeof options === 'object' && options !== null
  4799. ? 'spaces' in options
  4800. ? options.spaces : this.spaces
  4801. : this.spaces
  4802. var str = JSON.stringify(obj, options.replacer, spaces) + '\n'
  4803. // not sure if fs.writeFileSync returns anything, but just in case
  4804. return fs.writeFileSync(file, str, options)
  4805. }
  4806. function stripBom (content) {
  4807. // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
  4808. if (Buffer.isBuffer(content)) content = content.toString('utf8')
  4809. content = content.replace(/^\uFEFF/, '')
  4810. return content
  4811. }
  4812. var jsonfile = {
  4813. spaces: null,
  4814. readFile: readFile,
  4815. readFileSync: readFileSync,
  4816. writeFile: writeFile,
  4817. writeFileSync: writeFileSync
  4818. }
  4819. module.exports = jsonfile
  4820. /***/ }),
  4821. /* 38 */
  4822. /***/ (function(module, exports, __webpack_require__) {
  4823. var fs = __webpack_require__(1)
  4824. var polyfills = __webpack_require__(39)
  4825. var legacy = __webpack_require__(41)
  4826. var queue = []
  4827. var util = __webpack_require__(43)
  4828. function noop () {}
  4829. var debug = noop
  4830. if (util.debuglog)
  4831. debug = util.debuglog('gfs4')
  4832. else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
  4833. debug = function() {
  4834. var m = util.format.apply(util, arguments)
  4835. m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
  4836. console.error(m)
  4837. }
  4838. if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
  4839. process.on('exit', function() {
  4840. debug(queue)
  4841. __webpack_require__(44).equal(queue.length, 0)
  4842. })
  4843. }
  4844. module.exports = patch(__webpack_require__(9))
  4845. if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) {
  4846. module.exports = patch(fs)
  4847. }
  4848. // Always patch fs.close/closeSync, because we want to
  4849. // retry() whenever a close happens *anywhere* in the program.
  4850. // This is essential when multiple graceful-fs instances are
  4851. // in play at the same time.
  4852. module.exports.close =
  4853. fs.close = (function (fs$close) { return function (fd, cb) {
  4854. return fs$close.call(fs, fd, function (err) {
  4855. if (!err)
  4856. retry()
  4857. if (typeof cb === 'function')
  4858. cb.apply(this, arguments)
  4859. })
  4860. }})(fs.close)
  4861. module.exports.closeSync =
  4862. fs.closeSync = (function (fs$closeSync) { return function (fd) {
  4863. // Note that graceful-fs also retries when fs.closeSync() fails.
  4864. // Looks like a bug to me, although it's probably a harmless one.
  4865. var rval = fs$closeSync.apply(fs, arguments)
  4866. retry()
  4867. return rval
  4868. }})(fs.closeSync)
  4869. function patch (fs) {
  4870. // Everything that references the open() function needs to be in here
  4871. polyfills(fs)
  4872. fs.gracefulify = patch
  4873. fs.FileReadStream = ReadStream; // Legacy name.
  4874. fs.FileWriteStream = WriteStream; // Legacy name.
  4875. fs.createReadStream = createReadStream
  4876. fs.createWriteStream = createWriteStream
  4877. var fs$readFile = fs.readFile
  4878. fs.readFile = readFile
  4879. function readFile (path, options, cb) {
  4880. if (typeof options === 'function')
  4881. cb = options, options = null
  4882. return go$readFile(path, options, cb)
  4883. function go$readFile (path, options, cb) {
  4884. return fs$readFile(path, options, function (err) {
  4885. if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
  4886. enqueue([go$readFile, [path, options, cb]])
  4887. else {
  4888. if (typeof cb === 'function')
  4889. cb.apply(this, arguments)
  4890. retry()
  4891. }
  4892. })
  4893. }
  4894. }
  4895. var fs$writeFile = fs.writeFile
  4896. fs.writeFile = writeFile
  4897. function writeFile (path, data, options, cb) {
  4898. if (typeof options === 'function')
  4899. cb = options, options = null
  4900. return go$writeFile(path, data, options, cb)
  4901. function go$writeFile (path, data, options, cb) {
  4902. return fs$writeFile(path, data, options, function (err) {
  4903. if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
  4904. enqueue([go$writeFile, [path, data, options, cb]])
  4905. else {
  4906. if (typeof cb === 'function')
  4907. cb.apply(this, arguments)
  4908. retry()
  4909. }
  4910. })
  4911. }
  4912. }
  4913. var fs$appendFile = fs.appendFile
  4914. if (fs$appendFile)
  4915. fs.appendFile = appendFile
  4916. function appendFile (path, data, options, cb) {
  4917. if (typeof options === 'function')
  4918. cb = options, options = null
  4919. return go$appendFile(path, data, options, cb)
  4920. function go$appendFile (path, data, options, cb) {
  4921. return fs$appendFile(path, data, options, function (err) {
  4922. if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
  4923. enqueue([go$appendFile, [path, data, options, cb]])
  4924. else {
  4925. if (typeof cb === 'function')
  4926. cb.apply(this, arguments)
  4927. retry()
  4928. }
  4929. })
  4930. }
  4931. }
  4932. var fs$readdir = fs.readdir
  4933. fs.readdir = readdir
  4934. function readdir (path, options, cb) {
  4935. var args = [path]
  4936. if (typeof options !== 'function') {
  4937. args.push(options)
  4938. } else {
  4939. cb = options
  4940. }
  4941. args.push(go$readdir$cb)
  4942. return go$readdir(args)
  4943. function go$readdir$cb (err, files) {
  4944. if (files && files.sort)
  4945. files.sort()
  4946. if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
  4947. enqueue([go$readdir, [args]])
  4948. else {
  4949. if (typeof cb === 'function')
  4950. cb.apply(this, arguments)
  4951. retry()
  4952. }
  4953. }
  4954. }
  4955. function go$readdir (args) {
  4956. return fs$readdir.apply(fs, args)
  4957. }
  4958. if (process.version.substr(0, 4) === 'v0.8') {
  4959. var legStreams = legacy(fs)
  4960. ReadStream = legStreams.ReadStream
  4961. WriteStream = legStreams.WriteStream
  4962. }
  4963. var fs$ReadStream = fs.ReadStream
  4964. ReadStream.prototype = Object.create(fs$ReadStream.prototype)
  4965. ReadStream.prototype.open = ReadStream$open
  4966. var fs$WriteStream = fs.WriteStream
  4967. WriteStream.prototype = Object.create(fs$WriteStream.prototype)
  4968. WriteStream.prototype.open = WriteStream$open
  4969. fs.ReadStream = ReadStream
  4970. fs.WriteStream = WriteStream
  4971. function ReadStream (path, options) {
  4972. if (this instanceof ReadStream)
  4973. return fs$ReadStream.apply(this, arguments), this
  4974. else
  4975. return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
  4976. }
  4977. function ReadStream$open () {
  4978. var that = this
  4979. open(that.path, that.flags, that.mode, function (err, fd) {
  4980. if (err) {
  4981. if (that.autoClose)
  4982. that.destroy()
  4983. that.emit('error', err)
  4984. } else {
  4985. that.fd = fd
  4986. that.emit('open', fd)
  4987. that.read()
  4988. }
  4989. })
  4990. }
  4991. function WriteStream (path, options) {
  4992. if (this instanceof WriteStream)
  4993. return fs$WriteStream.apply(this, arguments), this
  4994. else
  4995. return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
  4996. }
  4997. function WriteStream$open () {
  4998. var that = this
  4999. open(that.path, that.flags, that.mode, function (err, fd) {
  5000. if (err) {
  5001. that.destroy()
  5002. that.emit('error', err)
  5003. } else {
  5004. that.fd = fd
  5005. that.emit('open', fd)
  5006. }
  5007. })
  5008. }
  5009. function createReadStream (path, options) {
  5010. return new ReadStream(path, options)
  5011. }
  5012. function createWriteStream (path, options) {
  5013. return new WriteStream(path, options)
  5014. }
  5015. var fs$open = fs.open
  5016. fs.open = open
  5017. function open (path, flags, mode, cb) {
  5018. if (typeof mode === 'function')
  5019. cb = mode, mode = null
  5020. return go$open(path, flags, mode, cb)
  5021. function go$open (path, flags, mode, cb) {
  5022. return fs$open(path, flags, mode, function (err, fd) {
  5023. if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
  5024. enqueue([go$open, [path, flags, mode, cb]])
  5025. else {
  5026. if (typeof cb === 'function')
  5027. cb.apply(this, arguments)
  5028. retry()
  5029. }
  5030. })
  5031. }
  5032. }
  5033. return fs
  5034. }
  5035. function enqueue (elem) {
  5036. debug('ENQUEUE', elem[0].name, elem[1])
  5037. queue.push(elem)
  5038. }
  5039. function retry () {
  5040. var elem = queue.shift()
  5041. if (elem) {
  5042. debug('RETRY', elem[0].name, elem[1])
  5043. elem[0].apply(null, elem[1])
  5044. }
  5045. }
  5046. /***/ }),
  5047. /* 39 */
  5048. /***/ (function(module, exports, __webpack_require__) {
  5049. var fs = __webpack_require__(9)
  5050. var constants = __webpack_require__(40)
  5051. var origCwd = process.cwd
  5052. var cwd = null
  5053. var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
  5054. process.cwd = function() {
  5055. if (!cwd)
  5056. cwd = origCwd.call(process)
  5057. return cwd
  5058. }
  5059. try {
  5060. process.cwd()
  5061. } catch (er) {}
  5062. var chdir = process.chdir
  5063. process.chdir = function(d) {
  5064. cwd = null
  5065. chdir.call(process, d)
  5066. }
  5067. module.exports = patch
  5068. function patch (fs) {
  5069. // (re-)implement some things that are known busted or missing.
  5070. // lchmod, broken prior to 0.6.2
  5071. // back-port the fix here.
  5072. if (constants.hasOwnProperty('O_SYMLINK') &&
  5073. process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
  5074. patchLchmod(fs)
  5075. }
  5076. // lutimes implementation, or no-op
  5077. if (!fs.lutimes) {
  5078. patchLutimes(fs)
  5079. }
  5080. // https://github.com/isaacs/node-graceful-fs/issues/4
  5081. // Chown should not fail on einval or eperm if non-root.
  5082. // It should not fail on enosys ever, as this just indicates
  5083. // that a fs doesn't support the intended operation.
  5084. fs.chown = chownFix(fs.chown)
  5085. fs.fchown = chownFix(fs.fchown)
  5086. fs.lchown = chownFix(fs.lchown)
  5087. fs.chmod = chmodFix(fs.chmod)
  5088. fs.fchmod = chmodFix(fs.fchmod)
  5089. fs.lchmod = chmodFix(fs.lchmod)
  5090. fs.chownSync = chownFixSync(fs.chownSync)
  5091. fs.fchownSync = chownFixSync(fs.fchownSync)
  5092. fs.lchownSync = chownFixSync(fs.lchownSync)
  5093. fs.chmodSync = chmodFixSync(fs.chmodSync)
  5094. fs.fchmodSync = chmodFixSync(fs.fchmodSync)
  5095. fs.lchmodSync = chmodFixSync(fs.lchmodSync)
  5096. fs.stat = statFix(fs.stat)
  5097. fs.fstat = statFix(fs.fstat)
  5098. fs.lstat = statFix(fs.lstat)
  5099. fs.statSync = statFixSync(fs.statSync)
  5100. fs.fstatSync = statFixSync(fs.fstatSync)
  5101. fs.lstatSync = statFixSync(fs.lstatSync)
  5102. // if lchmod/lchown do not exist, then make them no-ops
  5103. if (!fs.lchmod) {
  5104. fs.lchmod = function (path, mode, cb) {
  5105. if (cb) process.nextTick(cb)
  5106. }
  5107. fs.lchmodSync = function () {}
  5108. }
  5109. if (!fs.lchown) {
  5110. fs.lchown = function (path, uid, gid, cb) {
  5111. if (cb) process.nextTick(cb)
  5112. }
  5113. fs.lchownSync = function () {}
  5114. }
  5115. // on Windows, A/V software can lock the directory, causing this
  5116. // to fail with an EACCES or EPERM if the directory contains newly
  5117. // created files. Try again on failure, for up to 60 seconds.
  5118. // Set the timeout this long because some Windows Anti-Virus, such as Parity
  5119. // bit9, may lock files for up to a minute, causing npm package install
  5120. // failures. Also, take care to yield the scheduler. Windows scheduling gives
  5121. // CPU to a busy looping process, which can cause the program causing the lock
  5122. // contention to be starved of CPU by node, so the contention doesn't resolve.
  5123. if (platform === "win32") {
  5124. fs.rename = (function (fs$rename) { return function (from, to, cb) {
  5125. var start = Date.now()
  5126. var backoff = 0;
  5127. fs$rename(from, to, function CB (er) {
  5128. if (er
  5129. && (er.code === "EACCES" || er.code === "EPERM")
  5130. && Date.now() - start < 60000) {
  5131. setTimeout(function() {
  5132. fs.stat(to, function (stater, st) {
  5133. if (stater && stater.code === "ENOENT")
  5134. fs$rename(from, to, CB);
  5135. else
  5136. cb(er)
  5137. })
  5138. }, backoff)
  5139. if (backoff < 100)
  5140. backoff += 10;
  5141. return;
  5142. }
  5143. if (cb) cb(er)
  5144. })
  5145. }})(fs.rename)
  5146. }
  5147. // if read() returns EAGAIN, then just try it again.
  5148. fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) {
  5149. var callback
  5150. if (callback_ && typeof callback_ === 'function') {
  5151. var eagCounter = 0
  5152. callback = function (er, _, __) {
  5153. if (er && er.code === 'EAGAIN' && eagCounter < 10) {
  5154. eagCounter ++
  5155. return fs$read.call(fs, fd, buffer, offset, length, position, callback)
  5156. }
  5157. callback_.apply(this, arguments)
  5158. }
  5159. }
  5160. return fs$read.call(fs, fd, buffer, offset, length, position, callback)
  5161. }})(fs.read)
  5162. fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
  5163. var eagCounter = 0
  5164. while (true) {
  5165. try {
  5166. return fs$readSync.call(fs, fd, buffer, offset, length, position)
  5167. } catch (er) {
  5168. if (er.code === 'EAGAIN' && eagCounter < 10) {
  5169. eagCounter ++
  5170. continue
  5171. }
  5172. throw er
  5173. }
  5174. }
  5175. }})(fs.readSync)
  5176. }
  5177. function patchLchmod (fs) {
  5178. fs.lchmod = function (path, mode, callback) {
  5179. fs.open( path
  5180. , constants.O_WRONLY | constants.O_SYMLINK
  5181. , mode
  5182. , function (err, fd) {
  5183. if (err) {
  5184. if (callback) callback(err)
  5185. return
  5186. }
  5187. // prefer to return the chmod error, if one occurs,
  5188. // but still try to close, and report closing errors if they occur.
  5189. fs.fchmod(fd, mode, function (err) {
  5190. fs.close(fd, function(err2) {
  5191. if (callback) callback(err || err2)
  5192. })
  5193. })
  5194. })
  5195. }
  5196. fs.lchmodSync = function (path, mode) {
  5197. var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
  5198. // prefer to return the chmod error, if one occurs,
  5199. // but still try to close, and report closing errors if they occur.
  5200. var threw = true
  5201. var ret
  5202. try {
  5203. ret = fs.fchmodSync(fd, mode)
  5204. threw = false
  5205. } finally {
  5206. if (threw) {
  5207. try {
  5208. fs.closeSync(fd)
  5209. } catch (er) {}
  5210. } else {
  5211. fs.closeSync(fd)
  5212. }
  5213. }
  5214. return ret
  5215. }
  5216. }
  5217. function patchLutimes (fs) {
  5218. if (constants.hasOwnProperty("O_SYMLINK")) {
  5219. fs.lutimes = function (path, at, mt, cb) {
  5220. fs.open(path, constants.O_SYMLINK, function (er, fd) {
  5221. if (er) {
  5222. if (cb) cb(er)
  5223. return
  5224. }
  5225. fs.futimes(fd, at, mt, function (er) {
  5226. fs.close(fd, function (er2) {
  5227. if (cb) cb(er || er2)
  5228. })
  5229. })
  5230. })
  5231. }
  5232. fs.lutimesSync = function (path, at, mt) {
  5233. var fd = fs.openSync(path, constants.O_SYMLINK)
  5234. var ret
  5235. var threw = true
  5236. try {
  5237. ret = fs.futimesSync(fd, at, mt)
  5238. threw = false
  5239. } finally {
  5240. if (threw) {
  5241. try {
  5242. fs.closeSync(fd)
  5243. } catch (er) {}
  5244. } else {
  5245. fs.closeSync(fd)
  5246. }
  5247. }
  5248. return ret
  5249. }
  5250. } else {
  5251. fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
  5252. fs.lutimesSync = function () {}
  5253. }
  5254. }
  5255. function chmodFix (orig) {
  5256. if (!orig) return orig
  5257. return function (target, mode, cb) {
  5258. return orig.call(fs, target, mode, function (er) {
  5259. if (chownErOk(er)) er = null
  5260. if (cb) cb.apply(this, arguments)
  5261. })
  5262. }
  5263. }
  5264. function chmodFixSync (orig) {
  5265. if (!orig) return orig
  5266. return function (target, mode) {
  5267. try {
  5268. return orig.call(fs, target, mode)
  5269. } catch (er) {
  5270. if (!chownErOk(er)) throw er
  5271. }
  5272. }
  5273. }
  5274. function chownFix (orig) {
  5275. if (!orig) return orig
  5276. return function (target, uid, gid, cb) {
  5277. return orig.call(fs, target, uid, gid, function (er) {
  5278. if (chownErOk(er)) er = null
  5279. if (cb) cb.apply(this, arguments)
  5280. })
  5281. }
  5282. }
  5283. function chownFixSync (orig) {
  5284. if (!orig) return orig
  5285. return function (target, uid, gid) {
  5286. try {
  5287. return orig.call(fs, target, uid, gid)
  5288. } catch (er) {
  5289. if (!chownErOk(er)) throw er
  5290. }
  5291. }
  5292. }
  5293. function statFix (orig) {
  5294. if (!orig) return orig
  5295. // Older versions of Node erroneously returned signed integers for
  5296. // uid + gid.
  5297. return function (target, cb) {
  5298. return orig.call(fs, target, function (er, stats) {
  5299. if (!stats) return cb.apply(this, arguments)
  5300. if (stats.uid < 0) stats.uid += 0x100000000
  5301. if (stats.gid < 0) stats.gid += 0x100000000
  5302. if (cb) cb.apply(this, arguments)
  5303. })
  5304. }
  5305. }
  5306. function statFixSync (orig) {
  5307. if (!orig) return orig
  5308. // Older versions of Node erroneously returned signed integers for
  5309. // uid + gid.
  5310. return function (target) {
  5311. var stats = orig.call(fs, target)
  5312. if (stats.uid < 0) stats.uid += 0x100000000
  5313. if (stats.gid < 0) stats.gid += 0x100000000
  5314. return stats;
  5315. }
  5316. }
  5317. // ENOSYS means that the fs doesn't support the op. Just ignore
  5318. // that, because it doesn't matter.
  5319. //
  5320. // if there's no getuid, or if getuid() is something other
  5321. // than 0, and the error is EINVAL or EPERM, then just ignore
  5322. // it.
  5323. //
  5324. // This specific case is a silent failure in cp, install, tar,
  5325. // and most other unix tools that manage permissions.
  5326. //
  5327. // When running as root, or if other types of errors are
  5328. // encountered, then it's strict.
  5329. function chownErOk (er) {
  5330. if (!er)
  5331. return true
  5332. if (er.code === "ENOSYS")
  5333. return true
  5334. var nonroot = !process.getuid || process.getuid() !== 0
  5335. if (nonroot) {
  5336. if (er.code === "EINVAL" || er.code === "EPERM")
  5337. return true
  5338. }
  5339. return false
  5340. }
  5341. /***/ }),
  5342. /* 40 */
  5343. /***/ (function(module, exports) {
  5344. module.exports = require("constants");
  5345. /***/ }),
  5346. /* 41 */
  5347. /***/ (function(module, exports, __webpack_require__) {
  5348. var Stream = __webpack_require__(42).Stream
  5349. module.exports = legacy
  5350. function legacy (fs) {
  5351. return {
  5352. ReadStream: ReadStream,
  5353. WriteStream: WriteStream
  5354. }
  5355. function ReadStream (path, options) {
  5356. if (!(this instanceof ReadStream)) return new ReadStream(path, options);
  5357. Stream.call(this);
  5358. var self = this;
  5359. this.path = path;
  5360. this.fd = null;
  5361. this.readable = true;
  5362. this.paused = false;
  5363. this.flags = 'r';
  5364. this.mode = 438; /*=0666*/
  5365. this.bufferSize = 64 * 1024;
  5366. options = options || {};
  5367. // Mixin options into this
  5368. var keys = Object.keys(options);
  5369. for (var index = 0, length = keys.length; index < length; index++) {
  5370. var key = keys[index];
  5371. this[key] = options[key];
  5372. }
  5373. if (this.encoding) this.setEncoding(this.encoding);
  5374. if (this.start !== undefined) {
  5375. if ('number' !== typeof this.start) {
  5376. throw TypeError('start must be a Number');
  5377. }
  5378. if (this.end === undefined) {
  5379. this.end = Infinity;
  5380. } else if ('number' !== typeof this.end) {
  5381. throw TypeError('end must be a Number');
  5382. }
  5383. if (this.start > this.end) {
  5384. throw new Error('start must be <= end');
  5385. }
  5386. this.pos = this.start;
  5387. }
  5388. if (this.fd !== null) {
  5389. process.nextTick(function() {
  5390. self._read();
  5391. });
  5392. return;
  5393. }
  5394. fs.open(this.path, this.flags, this.mode, function (err, fd) {
  5395. if (err) {
  5396. self.emit('error', err);
  5397. self.readable = false;
  5398. return;
  5399. }
  5400. self.fd = fd;
  5401. self.emit('open', fd);
  5402. self._read();
  5403. })
  5404. }
  5405. function WriteStream (path, options) {
  5406. if (!(this instanceof WriteStream)) return new WriteStream(path, options);
  5407. Stream.call(this);
  5408. this.path = path;
  5409. this.fd = null;
  5410. this.writable = true;
  5411. this.flags = 'w';
  5412. this.encoding = 'binary';
  5413. this.mode = 438; /*=0666*/
  5414. this.bytesWritten = 0;
  5415. options = options || {};
  5416. // Mixin options into this
  5417. var keys = Object.keys(options);
  5418. for (var index = 0, length = keys.length; index < length; index++) {
  5419. var key = keys[index];
  5420. this[key] = options[key];
  5421. }
  5422. if (this.start !== undefined) {
  5423. if ('number' !== typeof this.start) {
  5424. throw TypeError('start must be a Number');
  5425. }
  5426. if (this.start < 0) {
  5427. throw new Error('start must be >= zero');
  5428. }
  5429. this.pos = this.start;
  5430. }
  5431. this.busy = false;
  5432. this._queue = [];
  5433. if (this.fd === null) {
  5434. this._open = fs.open;
  5435. this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
  5436. this.flush();
  5437. }
  5438. }
  5439. }
  5440. /***/ }),
  5441. /* 42 */
  5442. /***/ (function(module, exports) {
  5443. module.exports = require("stream");
  5444. /***/ }),
  5445. /* 43 */
  5446. /***/ (function(module, exports) {
  5447. module.exports = require("util");
  5448. /***/ }),
  5449. /* 44 */
  5450. /***/ (function(module, exports) {
  5451. module.exports = require("assert");
  5452. /***/ }),
  5453. /* 45 */
  5454. /***/ (function(module, exports, __webpack_require__) {
  5455. var path = __webpack_require__(0);
  5456. var fs = __webpack_require__(1);
  5457. var _0777 = parseInt('0777', 8);
  5458. module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
  5459. function mkdirP (p, opts, f, made) {
  5460. if (typeof opts === 'function') {
  5461. f = opts;
  5462. opts = {};
  5463. }
  5464. else if (!opts || typeof opts !== 'object') {
  5465. opts = { mode: opts };
  5466. }
  5467. var mode = opts.mode;
  5468. var xfs = opts.fs || fs;
  5469. if (mode === undefined) {
  5470. mode = _0777 & (~process.umask());
  5471. }
  5472. if (!made) made = null;
  5473. var cb = f || function () {};
  5474. p = path.resolve(p);
  5475. xfs.mkdir(p, mode, function (er) {
  5476. if (!er) {
  5477. made = made || p;
  5478. return cb(null, made);
  5479. }
  5480. switch (er.code) {
  5481. case 'ENOENT':
  5482. mkdirP(path.dirname(p), opts, function (er, made) {
  5483. if (er) cb(er, made);
  5484. else mkdirP(p, opts, cb, made);
  5485. });
  5486. break;
  5487. // In the case of any other error, just see if there's a dir
  5488. // there already. If so, then hooray! If not, then something
  5489. // is borked.
  5490. default:
  5491. xfs.stat(p, function (er2, stat) {
  5492. // if the stat fails, then that's super weird.
  5493. // let the original error be the failure reason.
  5494. if (er2 || !stat.isDirectory()) cb(er, made)
  5495. else cb(null, made);
  5496. });
  5497. break;
  5498. }
  5499. });
  5500. }
  5501. mkdirP.sync = function sync (p, opts, made) {
  5502. if (!opts || typeof opts !== 'object') {
  5503. opts = { mode: opts };
  5504. }
  5505. var mode = opts.mode;
  5506. var xfs = opts.fs || fs;
  5507. if (mode === undefined) {
  5508. mode = _0777 & (~process.umask());
  5509. }
  5510. if (!made) made = null;
  5511. p = path.resolve(p);
  5512. try {
  5513. xfs.mkdirSync(p, mode);
  5514. made = made || p;
  5515. }
  5516. catch (err0) {
  5517. switch (err0.code) {
  5518. case 'ENOENT' :
  5519. made = sync(path.dirname(p), opts, made);
  5520. sync(p, opts, made);
  5521. break;
  5522. // In the case of any other error, just see if there's a dir
  5523. // there already. If so, then hooray! If not, then something
  5524. // is borked.
  5525. default:
  5526. var stat;
  5527. try {
  5528. stat = xfs.statSync(p);
  5529. }
  5530. catch (err1) {
  5531. throw err0;
  5532. }
  5533. if (!stat.isDirectory()) throw err0;
  5534. break;
  5535. }
  5536. }
  5537. return made;
  5538. };
  5539. /***/ }),
  5540. /* 46 */
  5541. /***/ (function(module, exports, __webpack_require__) {
  5542. var pSlice = Array.prototype.slice;
  5543. var objectKeys = __webpack_require__(47);
  5544. var isArguments = __webpack_require__(48);
  5545. var deepEqual = module.exports = function (actual, expected, opts) {
  5546. if (!opts) opts = {};
  5547. // 7.1. All identical values are equivalent, as determined by ===.
  5548. if (actual === expected) {
  5549. return true;
  5550. } else if (actual instanceof Date && expected instanceof Date) {
  5551. return actual.getTime() === expected.getTime();
  5552. // 7.3. Other pairs that do not both pass typeof value == 'object',
  5553. // equivalence is determined by ==.
  5554. } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
  5555. return opts.strict ? actual === expected : actual == expected;
  5556. // 7.4. For all other Object pairs, including Array objects, equivalence is
  5557. // determined by having the same number of owned properties (as verified
  5558. // with Object.prototype.hasOwnProperty.call), the same set of keys
  5559. // (although not necessarily the same order), equivalent values for every
  5560. // corresponding key, and an identical 'prototype' property. Note: this
  5561. // accounts for both named and indexed properties on Arrays.
  5562. } else {
  5563. return objEquiv(actual, expected, opts);
  5564. }
  5565. }
  5566. function isUndefinedOrNull(value) {
  5567. return value === null || value === undefined;
  5568. }
  5569. function isBuffer (x) {
  5570. if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
  5571. if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
  5572. return false;
  5573. }
  5574. if (x.length > 0 && typeof x[0] !== 'number') return false;
  5575. return true;
  5576. }
  5577. function objEquiv(a, b, opts) {
  5578. var i, key;
  5579. if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
  5580. return false;
  5581. // an identical 'prototype' property.
  5582. if (a.prototype !== b.prototype) return false;
  5583. //~~~I've managed to break Object.keys through screwy arguments passing.
  5584. // Converting to array solves the problem.
  5585. if (isArguments(a)) {
  5586. if (!isArguments(b)) {
  5587. return false;
  5588. }
  5589. a = pSlice.call(a);
  5590. b = pSlice.call(b);
  5591. return deepEqual(a, b, opts);
  5592. }
  5593. if (isBuffer(a)) {
  5594. if (!isBuffer(b)) {
  5595. return false;
  5596. }
  5597. if (a.length !== b.length) return false;
  5598. for (i = 0; i < a.length; i++) {
  5599. if (a[i] !== b[i]) return false;
  5600. }
  5601. return true;
  5602. }
  5603. try {
  5604. var ka = objectKeys(a),
  5605. kb = objectKeys(b);
  5606. } catch (e) {//happens when one is a string literal and the other isn't
  5607. return false;
  5608. }
  5609. // having the same number of owned properties (keys incorporates
  5610. // hasOwnProperty)
  5611. if (ka.length != kb.length)
  5612. return false;
  5613. //the same set of keys (although not necessarily the same order),
  5614. ka.sort();
  5615. kb.sort();
  5616. //~~~cheap key test
  5617. for (i = ka.length - 1; i >= 0; i--) {
  5618. if (ka[i] != kb[i])
  5619. return false;
  5620. }
  5621. //equivalent values for every corresponding key, and
  5622. //~~~possibly expensive deep test
  5623. for (i = ka.length - 1; i >= 0; i--) {
  5624. key = ka[i];
  5625. if (!deepEqual(a[key], b[key], opts)) return false;
  5626. }
  5627. return typeof a === typeof b;
  5628. }
  5629. /***/ }),
  5630. /* 47 */
  5631. /***/ (function(module, exports) {
  5632. exports = module.exports = typeof Object.keys === 'function'
  5633. ? Object.keys : shim;
  5634. exports.shim = shim;
  5635. function shim (obj) {
  5636. var keys = [];
  5637. for (var key in obj) keys.push(key);
  5638. return keys;
  5639. }
  5640. /***/ }),
  5641. /* 48 */
  5642. /***/ (function(module, exports) {
  5643. var supportsArgumentsClass = (function(){
  5644. return Object.prototype.toString.call(arguments)
  5645. })() == '[object Arguments]';
  5646. exports = module.exports = supportsArgumentsClass ? supported : unsupported;
  5647. exports.supported = supported;
  5648. function supported(object) {
  5649. return Object.prototype.toString.call(object) == '[object Arguments]';
  5650. };
  5651. exports.unsupported = unsupported;
  5652. function unsupported(object){
  5653. return object &&
  5654. typeof object == 'object' &&
  5655. typeof object.length == 'number' &&
  5656. Object.prototype.hasOwnProperty.call(object, 'callee') &&
  5657. !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
  5658. false;
  5659. };
  5660. /***/ }),
  5661. /* 49 */
  5662. /***/ (function(module, exports, __webpack_require__) {
  5663. "use strict";
  5664. Object.defineProperty(exports, "__esModule", {
  5665. value: true
  5666. });
  5667. var _helpers = __webpack_require__(4);
  5668. var _helpers2 = _interopRequireDefault(_helpers);
  5669. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  5670. var linkIsInternal = _helpers2.default.linkIsInternal;
  5671. function onNewWindowHelper(urlToGo, disposition, targetUrl, internalUrls, preventDefault, openExternal, createAboutBlankWindow, nativeTabsSupported, createNewTab) {
  5672. if (!linkIsInternal(targetUrl, urlToGo, internalUrls)) {
  5673. openExternal(urlToGo);
  5674. preventDefault();
  5675. } else if (urlToGo === 'about:blank') {
  5676. var newWindow = createAboutBlankWindow();
  5677. preventDefault(newWindow);
  5678. } else if (nativeTabsSupported()) {
  5679. if (disposition === 'background-tab') {
  5680. var newTab = createNewTab(urlToGo, false);
  5681. preventDefault(newTab);
  5682. } else if (disposition === 'foreground-tab') {
  5683. var _newTab = createNewTab(urlToGo, true);
  5684. preventDefault(_newTab);
  5685. }
  5686. }
  5687. }
  5688. exports.default = { onNewWindowHelper };
  5689. /***/ }),
  5690. /* 50 */
  5691. /***/ (function(module, exports) {
  5692. module.exports = function (arg, url) {
  5693. function _t() {
  5694. return new RegExp(/(.*?)\.?([^\.]*?)\.(gl|com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/);
  5695. }
  5696. function _d(s) {
  5697. return decodeURIComponent(s.replace(/\+/g, ' '));
  5698. }
  5699. function _i(arg, str) {
  5700. var sptr = arg.charAt(0),
  5701. split = str.split(sptr);
  5702. if (sptr === arg) { return split; }
  5703. arg = parseInt(arg.substring(1), 10);
  5704. return split[arg < 0 ? split.length + arg : arg - 1];
  5705. }
  5706. function _f(arg, str) {
  5707. var sptr = arg.charAt(0),
  5708. split = str.split('&'),
  5709. field = [],
  5710. params = {},
  5711. tmp = [],
  5712. arg2 = arg.substring(1);
  5713. for (var i = 0, ii = split.length; i < ii; i++) {
  5714. field = split[i].match(/(.*?)=(.*)/);
  5715. // TODO: regex should be able to handle this.
  5716. if ( ! field) {
  5717. field = [split[i], split[i], ''];
  5718. }
  5719. if (field[1].replace(/\s/g, '') !== '') {
  5720. field[2] = _d(field[2] || '');
  5721. // If we have a match just return it right away.
  5722. if (arg2 === field[1]) { return field[2]; }
  5723. // Check for array pattern.
  5724. tmp = field[1].match(/(.*)\[([0-9]+)\]/);
  5725. if (tmp) {
  5726. params[tmp[1]] = params[tmp[1]] || [];
  5727. params[tmp[1]][tmp[2]] = field[2];
  5728. }
  5729. else {
  5730. params[field[1]] = field[2];
  5731. }
  5732. }
  5733. }
  5734. if (sptr === arg) { return params; }
  5735. return params[arg2];
  5736. }
  5737. var _l = {}, tmp, tmp2;
  5738. if (arg === 'tld?') { return _t(); }
  5739. url = url || window.location.toString();
  5740. if ( ! arg) { return url; }
  5741. arg = arg.toString();
  5742. if (tmp = url.match(/^mailto:([^\/].+)/)) {
  5743. _l.protocol = 'mailto';
  5744. _l.email = tmp[1];
  5745. }
  5746. else {
  5747. // Ignore Hashbangs.
  5748. if (tmp = url.match(/(.*?)\/#\!(.*)/)) {
  5749. url = tmp[1] + tmp[2];
  5750. }
  5751. // Hash.
  5752. if (tmp = url.match(/(.*?)#(.*)/)) {
  5753. _l.hash = tmp[2];
  5754. url = tmp[1];
  5755. }
  5756. // Return hash parts.
  5757. if (_l.hash && arg.match(/^#/)) { return _f(arg, _l.hash); }
  5758. // Query
  5759. if (tmp = url.match(/(.*?)\?(.*)/)) {
  5760. _l.query = tmp[2];
  5761. url = tmp[1];
  5762. }
  5763. // Return query parts.
  5764. if (_l.query && arg.match(/^\?/)) { return _f(arg, _l.query); }
  5765. // Protocol.
  5766. if (tmp = url.match(/(.*?)\:?\/\/(.*)/)) {
  5767. _l.protocol = tmp[1].toLowerCase();
  5768. url = tmp[2];
  5769. }
  5770. // Path.
  5771. if (tmp = url.match(/(.*?)(\/.*)/)) {
  5772. _l.path = tmp[2];
  5773. url = tmp[1];
  5774. }
  5775. // Clean up path.
  5776. _l.path = (_l.path || '').replace(/^([^\/])/, '/$1');
  5777. // Return path parts.
  5778. if (arg.match(/^[\-0-9]+$/)) { arg = arg.replace(/^([^\/])/, '/$1'); }
  5779. if (arg.match(/^\//)) { return _i(arg, _l.path.substring(1)); }
  5780. // File.
  5781. tmp = _i('/-1', _l.path.substring(1));
  5782. if (tmp && (tmp = tmp.match(/(.*?)\.([^.]+)$/))) {
  5783. _l.file = tmp[0];
  5784. _l.filename = tmp[1];
  5785. _l.fileext = tmp[2];
  5786. }
  5787. // Port.
  5788. if (tmp = url.match(/(.*)\:([0-9]+)$/)) {
  5789. _l.port = tmp[2];
  5790. url = tmp[1];
  5791. }
  5792. // Auth.
  5793. if (tmp = url.match(/(.*?)@(.*)/)) {
  5794. _l.auth = tmp[1];
  5795. url = tmp[2];
  5796. }
  5797. // User and pass.
  5798. if (_l.auth) {
  5799. tmp = _l.auth.match(/(.*)\:(.*)/);
  5800. _l.user = tmp ? tmp[1] : _l.auth;
  5801. _l.pass = tmp ? tmp[2] : undefined;
  5802. }
  5803. // Hostname.
  5804. _l.hostname = url.toLowerCase();
  5805. // Return hostname parts.
  5806. if (arg.charAt(0) === '.') { return _i(arg, _l.hostname); }
  5807. // Domain, tld and sub domain.
  5808. if (_t()) {
  5809. tmp = _l.hostname.match(_t());
  5810. if (tmp) {
  5811. _l.tld = tmp[3];
  5812. _l.domain = tmp[2] ? tmp[2] + '.' + tmp[3] : undefined;
  5813. _l.sub = tmp[1] || undefined;
  5814. }
  5815. }
  5816. // Set port and protocol defaults if not set.
  5817. _l.port = _l.port || (_l.protocol === 'https' ? '443' : '80');
  5818. _l.protocol = _l.protocol || (_l.port === '443' ? 'https' : 'http');
  5819. }
  5820. // Return arg.
  5821. if (arg in _l) { return _l[arg]; }
  5822. // Return everything.
  5823. if (arg === '{}') { return _l; }
  5824. // Default to undefined for no match.
  5825. return undefined;
  5826. };
  5827. /***/ }),
  5828. /* 51 */
  5829. /***/ (function(module, exports) {
  5830. module.exports = require("os");
  5831. /***/ }),
  5832. /* 52 */
  5833. /***/ (function(module, exports, __webpack_require__) {
  5834. "use strict";
  5835. Object.defineProperty(exports, "__esModule", {
  5836. value: true
  5837. });
  5838. var _electron = __webpack_require__(2);
  5839. /**
  5840. * @param nativefierVersion
  5841. * @param appQuit
  5842. * @param zoomIn
  5843. * @param zoomOut
  5844. * @param zoomReset
  5845. * @param zoomBuildTimeValue
  5846. * @param goBack
  5847. * @param goForward
  5848. * @param getCurrentUrl
  5849. * @param clearAppData
  5850. * @param disableDevTools
  5851. */
  5852. function createMenu(_ref) {
  5853. var nativefierVersion = _ref.nativefierVersion,
  5854. appQuit = _ref.appQuit,
  5855. zoomIn = _ref.zoomIn,
  5856. zoomOut = _ref.zoomOut,
  5857. zoomReset = _ref.zoomReset,
  5858. zoomBuildTimeValue = _ref.zoomBuildTimeValue,
  5859. goBack = _ref.goBack,
  5860. goForward = _ref.goForward,
  5861. getCurrentUrl = _ref.getCurrentUrl,
  5862. clearAppData = _ref.clearAppData,
  5863. disableDevTools = _ref.disableDevTools;
  5864. if (_electron.Menu.getApplicationMenu()) {
  5865. return;
  5866. }
  5867. var zoomResetLabel = zoomBuildTimeValue === 1.0 ? 'Reset Zoom' : `Reset Zoom (to ${zoomBuildTimeValue * 100}%, set at build time)`;
  5868. var template = [{
  5869. label: 'Edit',
  5870. submenu: [{
  5871. label: 'Undo',
  5872. accelerator: 'CmdOrCtrl+Z',
  5873. role: 'undo'
  5874. }, {
  5875. label: 'Redo',
  5876. accelerator: 'Shift+CmdOrCtrl+Z',
  5877. role: 'redo'
  5878. }, {
  5879. type: 'separator'
  5880. }, {
  5881. label: 'Cut',
  5882. accelerator: 'CmdOrCtrl+X',
  5883. role: 'cut'
  5884. }, {
  5885. label: 'Copy',
  5886. accelerator: 'CmdOrCtrl+C',
  5887. role: 'copy'
  5888. }, {
  5889. label: 'Copy Current URL',
  5890. accelerator: 'CmdOrCtrl+L',
  5891. click: function click() {
  5892. var currentURL = getCurrentUrl();
  5893. _electron.clipboard.writeText(currentURL);
  5894. }
  5895. }, {
  5896. label: 'Paste',
  5897. accelerator: 'CmdOrCtrl+V',
  5898. role: 'paste'
  5899. }, {
  5900. label: 'Paste and Match Style',
  5901. accelerator: 'CmdOrCtrl+Shift+V',
  5902. role: 'pasteandmatchstyle'
  5903. }, {
  5904. label: 'Select All',
  5905. accelerator: 'CmdOrCtrl+A',
  5906. role: 'selectall'
  5907. }, {
  5908. label: 'Clear App Data',
  5909. click: function click() {
  5910. clearAppData();
  5911. }
  5912. }]
  5913. }, {
  5914. label: 'View',
  5915. submenu: [{
  5916. label: 'Back',
  5917. accelerator: 'CmdOrCtrl+[',
  5918. click: function click() {
  5919. goBack();
  5920. }
  5921. }, {
  5922. label: 'Forward',
  5923. accelerator: 'CmdOrCtrl+]',
  5924. click: function click() {
  5925. goForward();
  5926. }
  5927. }, {
  5928. label: 'Reload',
  5929. accelerator: 'CmdOrCtrl+R',
  5930. click: function click(item, focusedWindow) {
  5931. if (focusedWindow) {
  5932. focusedWindow.reload();
  5933. }
  5934. }
  5935. }, {
  5936. type: 'separator'
  5937. }, {
  5938. label: 'Toggle Full Screen',
  5939. accelerator: function () {
  5940. if (process.platform === 'darwin') {
  5941. return 'Ctrl+Command+F';
  5942. }
  5943. return 'F11';
  5944. }(),
  5945. click: function click(item, focusedWindow) {
  5946. if (focusedWindow) {
  5947. focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
  5948. }
  5949. }
  5950. }, {
  5951. label: 'Zoom In',
  5952. accelerator: function () {
  5953. if (process.platform === 'darwin') {
  5954. return 'Command+=';
  5955. }
  5956. return 'Ctrl+=';
  5957. }(),
  5958. click: function click() {
  5959. zoomIn();
  5960. }
  5961. }, {
  5962. label: 'Zoom Out',
  5963. accelerator: function () {
  5964. if (process.platform === 'darwin') {
  5965. return 'Command+-';
  5966. }
  5967. return 'Ctrl+-';
  5968. }(),
  5969. click: function click() {
  5970. zoomOut();
  5971. }
  5972. }, {
  5973. label: zoomResetLabel,
  5974. accelerator: function () {
  5975. if (process.platform === 'darwin') {
  5976. return 'Command+0';
  5977. }
  5978. return 'Ctrl+0';
  5979. }(),
  5980. click: function click() {
  5981. zoomReset();
  5982. }
  5983. }, {
  5984. label: 'Toggle Developer Tools',
  5985. accelerator: function () {
  5986. if (process.platform === 'darwin') {
  5987. return 'Alt+Command+I';
  5988. }
  5989. return 'Ctrl+Shift+I';
  5990. }(),
  5991. click: function click(item, focusedWindow) {
  5992. if (focusedWindow) {
  5993. focusedWindow.toggleDevTools();
  5994. }
  5995. }
  5996. }]
  5997. }, {
  5998. label: 'Window',
  5999. role: 'window',
  6000. submenu: [{
  6001. label: 'Minimize',
  6002. accelerator: 'CmdOrCtrl+M',
  6003. role: 'minimize'
  6004. }, {
  6005. label: 'Close',
  6006. accelerator: 'CmdOrCtrl+W',
  6007. role: 'close'
  6008. }]
  6009. }, {
  6010. label: 'Help',
  6011. role: 'help',
  6012. submenu: [{
  6013. label: `Built with Nativefier v${nativefierVersion}`,
  6014. click: function click() {
  6015. _electron.shell.openExternal('https://github.com/jiahaog/nativefier');
  6016. }
  6017. }, {
  6018. label: 'Report an Issue',
  6019. click: function click() {
  6020. _electron.shell.openExternal('https://github.com/jiahaog/nativefier/issues');
  6021. }
  6022. }]
  6023. }];
  6024. if (disableDevTools) {
  6025. // remove last item (dev tools) from menu > view
  6026. var submenu = template[1].submenu;
  6027. submenu.splice(submenu.length - 1, 1);
  6028. }
  6029. if (process.platform === 'darwin') {
  6030. template.unshift({
  6031. label: 'Electron',
  6032. submenu: [{
  6033. label: 'Services',
  6034. role: 'services',
  6035. submenu: []
  6036. }, {
  6037. type: 'separator'
  6038. }, {
  6039. label: 'Hide App',
  6040. accelerator: 'Command+H',
  6041. role: 'hide'
  6042. }, {
  6043. label: 'Hide Others',
  6044. accelerator: 'Command+Shift+H',
  6045. role: 'hideothers'
  6046. }, {
  6047. label: 'Show All',
  6048. role: 'unhide'
  6049. }, {
  6050. type: 'separator'
  6051. }, {
  6052. label: 'Quit',
  6053. accelerator: 'Command+Q',
  6054. click: function click() {
  6055. appQuit();
  6056. }
  6057. }]
  6058. });
  6059. template[3].submenu.push({
  6060. type: 'separator'
  6061. }, {
  6062. label: 'Bring All to Front',
  6063. role: 'front'
  6064. });
  6065. }
  6066. var menu = _electron.Menu.buildFromTemplate(template);
  6067. _electron.Menu.setApplicationMenu(menu);
  6068. }
  6069. exports.default = createMenu;
  6070. /***/ }),
  6071. /* 53 */
  6072. /***/ (function(module, exports, __webpack_require__) {
  6073. "use strict";
  6074. Object.defineProperty(exports, "__esModule", {
  6075. value: true
  6076. });
  6077. var _electron = __webpack_require__(2);
  6078. var _electronContextMenu = __webpack_require__(54);
  6079. var _electronContextMenu2 = _interopRequireDefault(_electronContextMenu);
  6080. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6081. function initContextMenu(createNewWindow, createNewTab) {
  6082. (0, _electronContextMenu2.default)({
  6083. prepend: function prepend(params) {
  6084. var items = [];
  6085. if (params.linkURL) {
  6086. items.push({
  6087. label: 'Open Link in Default Browser',
  6088. click: function click() {
  6089. _electron.shell.openExternal(params.linkURL);
  6090. }
  6091. });
  6092. items.push({
  6093. label: 'Open Link in New Window',
  6094. click: function click() {
  6095. createNewWindow(params.linkURL);
  6096. }
  6097. });
  6098. if (createNewTab) {
  6099. items.push({
  6100. label: 'Open Link in New Tab',
  6101. click: function click() {
  6102. createNewTab(params.linkURL, false);
  6103. }
  6104. });
  6105. }
  6106. }
  6107. return items;
  6108. }
  6109. });
  6110. }
  6111. exports.default = initContextMenu;
  6112. /***/ }),
  6113. /* 54 */
  6114. /***/ (function(module, exports, __webpack_require__) {
  6115. "use strict";
  6116. const electron = __webpack_require__(2);
  6117. const {download} = __webpack_require__(8);
  6118. const isDev = __webpack_require__(55);
  6119. const webContents = win => win.webContents || win.getWebContents();
  6120. function create(win, opts) {
  6121. webContents(win).on('context-menu', (e, props) => {
  6122. if (typeof opts.shouldShowMenu === 'function' && opts.shouldShowMenu(e, props) === false) {
  6123. return;
  6124. }
  6125. const editFlags = props.editFlags;
  6126. const hasText = props.selectionText.trim().length > 0;
  6127. const can = type => editFlags[`can${type}`] && hasText;
  6128. let menuTpl = [{
  6129. type: 'separator'
  6130. }, {
  6131. id: 'cut',
  6132. label: 'Cut',
  6133. // Needed because of macOS limitation:
  6134. // https://github.com/electron/electron/issues/5860
  6135. role: can('Cut') ? 'cut' : '',
  6136. enabled: can('Cut'),
  6137. visible: props.isEditable
  6138. }, {
  6139. id: 'copy',
  6140. label: 'Copy',
  6141. role: can('Copy') ? 'copy' : '',
  6142. enabled: can('Copy'),
  6143. visible: props.isEditable || hasText
  6144. }, {
  6145. id: 'paste',
  6146. label: 'Paste',
  6147. role: editFlags.canPaste ? 'paste' : '',
  6148. enabled: editFlags.canPaste,
  6149. visible: props.isEditable
  6150. }, {
  6151. type: 'separator'
  6152. }];
  6153. if (props.mediaType === 'image') {
  6154. menuTpl = [{
  6155. type: 'separator'
  6156. }, {
  6157. id: 'save',
  6158. label: 'Save Image',
  6159. click() {
  6160. download(win, props.srcURL);
  6161. }
  6162. }, {
  6163. type: 'separator'
  6164. }];
  6165. }
  6166. if (props.linkURL && props.mediaType === 'none') {
  6167. menuTpl = [{
  6168. type: 'separator'
  6169. }, {
  6170. id: 'copyLink',
  6171. label: 'Copy Link',
  6172. click() {
  6173. if (process.platform === 'darwin') {
  6174. electron.clipboard.writeBookmark(props.linkText, props.linkURL);
  6175. } else {
  6176. electron.clipboard.writeText(props.linkURL);
  6177. }
  6178. }
  6179. }, {
  6180. type: 'separator'
  6181. }];
  6182. }
  6183. if (opts.prepend) {
  6184. const result = opts.prepend(props, win);
  6185. if (Array.isArray(result)) {
  6186. menuTpl.unshift(...result);
  6187. }
  6188. }
  6189. if (opts.append) {
  6190. const result = opts.append(props, win);
  6191. if (Array.isArray(result)) {
  6192. menuTpl.push(...result);
  6193. }
  6194. }
  6195. if (opts.showInspectElement || (opts.showInspectElement !== false && isDev)) {
  6196. menuTpl.push({
  6197. type: 'separator'
  6198. }, {
  6199. id: 'inspect',
  6200. label: 'Inspect Element',
  6201. click() {
  6202. win.inspectElement(props.x, props.y);
  6203. if (webContents(win).isDevToolsOpened()) {
  6204. webContents(win).devToolsWebContents.focus();
  6205. }
  6206. }
  6207. }, {
  6208. type: 'separator'
  6209. });
  6210. }
  6211. // Apply custom labels for default menu items
  6212. if (opts.labels) {
  6213. for (const menuItem of menuTpl) {
  6214. if (opts.labels[menuItem.id]) {
  6215. menuItem.label = opts.labels[menuItem.id];
  6216. }
  6217. }
  6218. }
  6219. // Filter out leading/trailing separators
  6220. // TODO: https://github.com/electron/electron/issues/5869
  6221. menuTpl = delUnusedElements(menuTpl);
  6222. if (menuTpl.length > 0) {
  6223. const menu = (electron.remote ? electron.remote.Menu : electron.Menu).buildFromTemplate(menuTpl);
  6224. /*
  6225. * When electron.remote is not available this runs in the browser process.
  6226. * We can safely use win in this case as it refers to the window the
  6227. * context-menu should open in.
  6228. * When this is being called from a webView, we can't use win as this
  6229. * would refere to the webView which is not allowed to render a popup menu.
  6230. */
  6231. menu.popup(electron.remote ? electron.remote.getCurrentWindow() : win);
  6232. }
  6233. });
  6234. }
  6235. function delUnusedElements(menuTpl) {
  6236. let notDeletedPrevEl;
  6237. return menuTpl.filter(el => el.visible !== false).filter((el, i, arr) => {
  6238. const toDelete = el.type === 'separator' && (!notDeletedPrevEl || i === arr.length - 1 || arr[i + 1].type === 'separator');
  6239. notDeletedPrevEl = toDelete ? notDeletedPrevEl : el;
  6240. return !toDelete;
  6241. });
  6242. }
  6243. module.exports = (opts = {}) => {
  6244. if (opts.window) {
  6245. const win = opts.window;
  6246. const wc = webContents(win);
  6247. // When window is a webview that has not yet finished loading webContents is not available
  6248. if (wc === undefined) {
  6249. win.addEventListener('dom-ready', () => {
  6250. create(win, opts);
  6251. }, {once: true});
  6252. return;
  6253. }
  6254. return create(win, opts);
  6255. }
  6256. (electron.BrowserWindow || electron.remote.BrowserWindow).getAllWindows().forEach(win => {
  6257. create(win, opts);
  6258. });
  6259. (electron.app || electron.remote.app).on('browser-window-created', (e, win) => {
  6260. create(win, opts);
  6261. });
  6262. };
  6263. /***/ }),
  6264. /* 55 */
  6265. /***/ (function(module, exports, __webpack_require__) {
  6266. "use strict";
  6267. module.exports = process.defaultApp || /[\\/]electron-prebuilt[\\/]/.test(process.execPath) || /[\\/]electron[\\/]/.test(process.execPath);
  6268. /***/ }),
  6269. /* 56 */
  6270. /***/ (function(module, exports, __webpack_require__) {
  6271. "use strict";
  6272. Object.defineProperty(exports, "__esModule", {
  6273. value: true
  6274. });
  6275. var _helpers = __webpack_require__(4);
  6276. var _helpers2 = _interopRequireDefault(_helpers);
  6277. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6278. var _require = __webpack_require__(2),
  6279. app = _require.app,
  6280. Tray = _require.Tray,
  6281. Menu = _require.Menu,
  6282. ipcMain = _require.ipcMain,
  6283. nativeImage = _require.nativeImage;
  6284. var getAppIcon = _helpers2.default.getAppIcon,
  6285. getCounterValue = _helpers2.default.getCounterValue;
  6286. /**
  6287. *
  6288. * @param {{}} inpOptions AppArgs from nativefier.json
  6289. * @param {electron.BrowserWindow} mainWindow MainWindow created from main.js
  6290. * @returns {electron.Tray}
  6291. */
  6292. function createTrayIcon(inpOptions, mainWindow) {
  6293. var options = Object.assign({}, inpOptions);
  6294. if (options.tray) {
  6295. var iconPath = getAppIcon();
  6296. var nimage = nativeImage.createFromPath(iconPath);
  6297. var appIcon = new Tray(nimage);
  6298. var onClick = function onClick() {
  6299. if (mainWindow.isVisible()) {
  6300. mainWindow.hide();
  6301. } else {
  6302. mainWindow.show();
  6303. }
  6304. };
  6305. var contextMenu = Menu.buildFromTemplate([{
  6306. label: options.name,
  6307. click: onClick
  6308. }, {
  6309. label: 'Quit',
  6310. click: app.exit
  6311. }]);
  6312. appIcon.on('click', onClick);
  6313. mainWindow.on('show', function () {
  6314. appIcon.setHighlightMode('always');
  6315. });
  6316. mainWindow.on('hide', function () {
  6317. appIcon.setHighlightMode('never');
  6318. });
  6319. if (options.counter) {
  6320. mainWindow.on('page-title-updated', function (e, title) {
  6321. var counterValue = getCounterValue(title);
  6322. if (counterValue) {
  6323. appIcon.setToolTip(`(${counterValue}) ${options.name}`);
  6324. } else {
  6325. appIcon.setToolTip(options.name);
  6326. }
  6327. });
  6328. } else {
  6329. ipcMain.on('notification', function () {
  6330. if (mainWindow.isFocused()) {
  6331. return;
  6332. }
  6333. appIcon.setToolTip(`• ${options.name}`);
  6334. });
  6335. mainWindow.on('focus', function () {
  6336. appIcon.setToolTip(options.name);
  6337. });
  6338. }
  6339. appIcon.setToolTip(options.name);
  6340. appIcon.setContextMenu(contextMenu);
  6341. return appIcon;
  6342. }
  6343. return null;
  6344. }
  6345. exports.default = createTrayIcon;
  6346. /***/ }),
  6347. /* 57 */
  6348. /***/ (function(module, exports, __webpack_require__) {
  6349. "use strict";
  6350. Object.defineProperty(exports, "__esModule", {
  6351. value: true
  6352. });
  6353. var _fs = __webpack_require__(1);
  6354. var _fs2 = _interopRequireDefault(_fs);
  6355. var _path = __webpack_require__(0);
  6356. var _path2 = _interopRequireDefault(_path);
  6357. var _helpers = __webpack_require__(4);
  6358. var _helpers2 = _interopRequireDefault(_helpers);
  6359. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6360. var isOSX = _helpers2.default.isOSX,
  6361. isWindows = _helpers2.default.isWindows,
  6362. isLinux = _helpers2.default.isLinux;
  6363. var log = __webpack_require__(10);
  6364. /**
  6365. * Synchronously find a file or directory
  6366. * @param {RegExp} pattern regex
  6367. * @param {string} base path
  6368. * @param {boolean} [findDir] if true, search results will be limited to only directories
  6369. * @returns {Array}
  6370. */
  6371. function findSync(pattern, basePath, findDir) {
  6372. var matches = [];
  6373. (function findSyncRecurse(base) {
  6374. var children = void 0;
  6375. try {
  6376. children = _fs2.default.readdirSync(base);
  6377. } catch (exception) {
  6378. if (exception.code === 'ENOENT') {
  6379. return;
  6380. }
  6381. throw exception;
  6382. }
  6383. children.forEach(function (child) {
  6384. var childPath = _path2.default.join(base, child);
  6385. var childIsDirectory = _fs2.default.lstatSync(childPath).isDirectory();
  6386. var patternMatches = pattern.test(childPath);
  6387. if (!patternMatches) {
  6388. if (!childIsDirectory) {
  6389. return;
  6390. }
  6391. findSyncRecurse(childPath);
  6392. return;
  6393. }
  6394. if (!findDir) {
  6395. matches.push(childPath);
  6396. return;
  6397. }
  6398. if (childIsDirectory) {
  6399. matches.push(childPath);
  6400. }
  6401. });
  6402. })(basePath);
  6403. return matches;
  6404. }
  6405. function linuxMatch() {
  6406. return findSync(/libpepflashplayer\.so/, '/opt/google/chrome')[0];
  6407. }
  6408. function windowsMatch() {
  6409. return findSync(/pepflashplayer\.dll/, 'C:\\Program Files (x86)\\Google\\Chrome')[0];
  6410. }
  6411. function darwinMatch() {
  6412. return findSync(/PepperFlashPlayer.plugin/, '/Applications/Google Chrome.app/', true)[0];
  6413. }
  6414. function inferFlash() {
  6415. if (isOSX()) {
  6416. return darwinMatch();
  6417. }
  6418. if (isWindows()) {
  6419. return windowsMatch();
  6420. }
  6421. if (isLinux()) {
  6422. return linuxMatch();
  6423. }
  6424. log.warn('Unable to determine OS to infer flash player');
  6425. return null;
  6426. }
  6427. exports.default = inferFlash;
  6428. /***/ })
  6429. /******/ ]);
  6430. //# sourceMappingURL=main.js.map