main.js 347 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530
  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. /******/ // identity function for calling harmony imports with the correct context
  37. /******/ __webpack_require__.i = function(value) { return value; };
  38. /******/
  39. /******/ // define getter function for harmony exports
  40. /******/ __webpack_require__.d = function(exports, name, getter) {
  41. /******/ if(!__webpack_require__.o(exports, name)) {
  42. /******/ Object.defineProperty(exports, name, {
  43. /******/ configurable: false,
  44. /******/ enumerable: true,
  45. /******/ get: getter
  46. /******/ });
  47. /******/ }
  48. /******/ };
  49. /******/
  50. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51. /******/ __webpack_require__.n = function(module) {
  52. /******/ var getter = module && module.__esModule ?
  53. /******/ function getDefault() { return module['default']; } :
  54. /******/ function getModuleExports() { return module; };
  55. /******/ __webpack_require__.d(getter, 'a', getter);
  56. /******/ return getter;
  57. /******/ };
  58. /******/
  59. /******/ // Object.prototype.hasOwnProperty.call
  60. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  61. /******/
  62. /******/ // __webpack_public_path__
  63. /******/ __webpack_require__.p = "";
  64. /******/
  65. /******/ // Load entry module and return exports
  66. /******/ return __webpack_require__(__webpack_require__.s = 85);
  67. /******/ })
  68. /************************************************************************/
  69. /******/ ([
  70. /* 0 */
  71. /***/ (function(module, exports, __webpack_require__) {
  72. "use strict";
  73. // Utilities
  74. //
  75. function _class(obj) { return Object.prototype.toString.call(obj); }
  76. function isString(obj) { return _class(obj) === '[object String]'; }
  77. var _hasOwnProperty = Object.prototype.hasOwnProperty;
  78. function has(object, key) {
  79. return _hasOwnProperty.call(object, key);
  80. }
  81. // Merge objects
  82. //
  83. function assign(obj /*from1, from2, from3, ...*/) {
  84. var sources = Array.prototype.slice.call(arguments, 1);
  85. sources.forEach(function (source) {
  86. if (!source) { return; }
  87. if (typeof source !== 'object') {
  88. throw new TypeError(source + 'must be object');
  89. }
  90. Object.keys(source).forEach(function (key) {
  91. obj[key] = source[key];
  92. });
  93. });
  94. return obj;
  95. }
  96. // Remove element from array and put another array at those position.
  97. // Useful for some operations with tokens
  98. function arrayReplaceAt(src, pos, newElements) {
  99. return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
  100. }
  101. ////////////////////////////////////////////////////////////////////////////////
  102. function isValidEntityCode(c) {
  103. /*eslint no-bitwise:0*/
  104. // broken sequence
  105. if (c >= 0xD800 && c <= 0xDFFF) { return false; }
  106. // never used
  107. if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }
  108. if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }
  109. // control codes
  110. if (c >= 0x00 && c <= 0x08) { return false; }
  111. if (c === 0x0B) { return false; }
  112. if (c >= 0x0E && c <= 0x1F) { return false; }
  113. if (c >= 0x7F && c <= 0x9F) { return false; }
  114. // out of range
  115. if (c > 0x10FFFF) { return false; }
  116. return true;
  117. }
  118. function fromCodePoint(c) {
  119. /*eslint no-bitwise:0*/
  120. if (c > 0xffff) {
  121. c -= 0x10000;
  122. var surrogate1 = 0xd800 + (c >> 10),
  123. surrogate2 = 0xdc00 + (c & 0x3ff);
  124. return String.fromCharCode(surrogate1, surrogate2);
  125. }
  126. return String.fromCharCode(c);
  127. }
  128. var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g;
  129. var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
  130. var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');
  131. var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;
  132. var entities = __webpack_require__(11);
  133. function replaceEntityPattern(match, name) {
  134. var code = 0;
  135. if (has(entities, name)) {
  136. return entities[name];
  137. }
  138. if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
  139. code = name[1].toLowerCase() === 'x' ?
  140. parseInt(name.slice(2), 16)
  141. :
  142. parseInt(name.slice(1), 10);
  143. if (isValidEntityCode(code)) {
  144. return fromCodePoint(code);
  145. }
  146. }
  147. return match;
  148. }
  149. /*function replaceEntities(str) {
  150. if (str.indexOf('&') < 0) { return str; }
  151. return str.replace(ENTITY_RE, replaceEntityPattern);
  152. }*/
  153. function unescapeMd(str) {
  154. if (str.indexOf('\\') < 0) { return str; }
  155. return str.replace(UNESCAPE_MD_RE, '$1');
  156. }
  157. function unescapeAll(str) {
  158. if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { return str; }
  159. return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {
  160. if (escaped) { return escaped; }
  161. return replaceEntityPattern(match, entity);
  162. });
  163. }
  164. ////////////////////////////////////////////////////////////////////////////////
  165. var HTML_ESCAPE_TEST_RE = /[&<>"]/;
  166. var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
  167. var HTML_REPLACEMENTS = {
  168. '&': '&amp;',
  169. '<': '&lt;',
  170. '>': '&gt;',
  171. '"': '&quot;'
  172. };
  173. function replaceUnsafeChar(ch) {
  174. return HTML_REPLACEMENTS[ch];
  175. }
  176. function escapeHtml(str) {
  177. if (HTML_ESCAPE_TEST_RE.test(str)) {
  178. return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
  179. }
  180. return str;
  181. }
  182. ////////////////////////////////////////////////////////////////////////////////
  183. var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
  184. function escapeRE(str) {
  185. return str.replace(REGEXP_ESCAPE_RE, '\\$&');
  186. }
  187. ////////////////////////////////////////////////////////////////////////////////
  188. function isSpace(code) {
  189. switch (code) {
  190. case 0x09:
  191. case 0x20:
  192. return true;
  193. }
  194. return false;
  195. }
  196. // Zs (unicode class) || [\t\f\v\r\n]
  197. function isWhiteSpace(code) {
  198. if (code >= 0x2000 && code <= 0x200A) { return true; }
  199. switch (code) {
  200. case 0x09: // \t
  201. case 0x0A: // \n
  202. case 0x0B: // \v
  203. case 0x0C: // \f
  204. case 0x0D: // \r
  205. case 0x20:
  206. case 0xA0:
  207. case 0x1680:
  208. case 0x202F:
  209. case 0x205F:
  210. case 0x3000:
  211. return true;
  212. }
  213. return false;
  214. }
  215. ////////////////////////////////////////////////////////////////////////////////
  216. /*eslint-disable max-len*/
  217. var UNICODE_PUNCT_RE = __webpack_require__(5);
  218. // Currently without astral characters support.
  219. function isPunctChar(ch) {
  220. return UNICODE_PUNCT_RE.test(ch);
  221. }
  222. // Markdown ASCII punctuation characters.
  223. //
  224. // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
  225. // http://spec.commonmark.org/0.15/#ascii-punctuation-character
  226. //
  227. // Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
  228. //
  229. function isMdAsciiPunct(ch) {
  230. switch (ch) {
  231. case 0x21/* ! */:
  232. case 0x22/* " */:
  233. case 0x23/* # */:
  234. case 0x24/* $ */:
  235. case 0x25/* % */:
  236. case 0x26/* & */:
  237. case 0x27/* ' */:
  238. case 0x28/* ( */:
  239. case 0x29/* ) */:
  240. case 0x2A/* * */:
  241. case 0x2B/* + */:
  242. case 0x2C/* , */:
  243. case 0x2D/* - */:
  244. case 0x2E/* . */:
  245. case 0x2F/* / */:
  246. case 0x3A/* : */:
  247. case 0x3B/* ; */:
  248. case 0x3C/* < */:
  249. case 0x3D/* = */:
  250. case 0x3E/* > */:
  251. case 0x3F/* ? */:
  252. case 0x40/* @ */:
  253. case 0x5B/* [ */:
  254. case 0x5C/* \ */:
  255. case 0x5D/* ] */:
  256. case 0x5E/* ^ */:
  257. case 0x5F/* _ */:
  258. case 0x60/* ` */:
  259. case 0x7B/* { */:
  260. case 0x7C/* | */:
  261. case 0x7D/* } */:
  262. case 0x7E/* ~ */:
  263. return true;
  264. default:
  265. return false;
  266. }
  267. }
  268. // Hepler to unify [reference labels].
  269. //
  270. function normalizeReference(str) {
  271. // use .toUpperCase() instead of .toLowerCase()
  272. // here to avoid a conflict with Object.prototype
  273. // members (most notably, `__proto__`)
  274. return str.trim().replace(/\s+/g, ' ').toUpperCase();
  275. }
  276. ////////////////////////////////////////////////////////////////////////////////
  277. // Re-export libraries commonly used in both markdown-it and its plugins,
  278. // so plugins won't have to depend on them explicitly, which reduces their
  279. // bundled size (e.g. a browser build).
  280. //
  281. exports.lib = {};
  282. exports.lib.mdurl = __webpack_require__(15);
  283. exports.lib.ucmicro = __webpack_require__(83);
  284. exports.assign = assign;
  285. exports.isString = isString;
  286. exports.has = has;
  287. exports.unescapeMd = unescapeMd;
  288. exports.unescapeAll = unescapeAll;
  289. exports.isValidEntityCode = isValidEntityCode;
  290. exports.fromCodePoint = fromCodePoint;
  291. // exports.replaceEntities = replaceEntities;
  292. exports.escapeHtml = escapeHtml;
  293. exports.arrayReplaceAt = arrayReplaceAt;
  294. exports.isSpace = isSpace;
  295. exports.isWhiteSpace = isWhiteSpace;
  296. exports.isMdAsciiPunct = isMdAsciiPunct;
  297. exports.isPunctChar = isPunctChar;
  298. exports.escapeRE = escapeRE;
  299. exports.normalizeReference = normalizeReference;
  300. /***/ }),
  301. /* 1 */
  302. /***/ (function(module, exports, __webpack_require__) {
  303. /* WEBPACK VAR INJECTION */(function(setImmediate, global) {;(function() {
  304. "use strict"
  305. function Vnode(tag, key, attrs0, children, text, dom) {
  306. return {tag: tag, key: key, attrs: attrs0, children: children, text: text, dom: dom, domSize: undefined, state: undefined, _state: undefined, events: undefined, instance: undefined, skip: false}
  307. }
  308. Vnode.normalize = function(node) {
  309. if (Array.isArray(node)) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)
  310. if (node != null && typeof node !== "object") return Vnode("#", undefined, undefined, node === false ? "" : node, undefined, undefined)
  311. return node
  312. }
  313. Vnode.normalizeChildren = function normalizeChildren(children) {
  314. for (var i = 0; i < children.length; i++) {
  315. children[i] = Vnode.normalize(children[i])
  316. }
  317. return children
  318. }
  319. var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
  320. var selectorCache = {}
  321. var hasOwn = {}.hasOwnProperty
  322. function compileSelector(selector) {
  323. var match, tag = "div", classes = [], attrs = {}
  324. while (match = selectorParser.exec(selector)) {
  325. var type = match[1], value = match[2]
  326. if (type === "" && value !== "") tag = value
  327. else if (type === "#") attrs.id = value
  328. else if (type === ".") classes.push(value)
  329. else if (match[3][0] === "[") {
  330. var attrValue = match[6]
  331. if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\")
  332. if (match[4] === "class") classes.push(attrValue)
  333. else attrs[match[4]] = attrValue || true
  334. }
  335. }
  336. if (classes.length > 0) attrs.className = classes.join(" ")
  337. return selectorCache[selector] = {tag: tag, attrs: attrs}
  338. }
  339. function execSelector(state, attrs, children) {
  340. var hasAttrs = false, childList, text
  341. var className = attrs.className || attrs.class
  342. for (var key in state.attrs) {
  343. if (hasOwn.call(state.attrs, key)) {
  344. attrs[key] = state.attrs[key]
  345. }
  346. }
  347. if (className !== undefined) {
  348. if (attrs.class !== undefined) {
  349. attrs.class = undefined
  350. attrs.className = className
  351. }
  352. if (state.attrs.className != null) {
  353. attrs.className = state.attrs.className + " " + className
  354. }
  355. }
  356. for (var key in attrs) {
  357. if (hasOwn.call(attrs, key) && key !== "key") {
  358. hasAttrs = true
  359. break
  360. }
  361. }
  362. if (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === "#") {
  363. text = children[0].children
  364. } else {
  365. childList = children
  366. }
  367. return Vnode(state.tag, attrs.key, hasAttrs ? attrs : undefined, childList, text)
  368. }
  369. function hyperscript(selector) {
  370. // Because sloppy mode sucks
  371. var attrs = arguments[1], start = 2, children
  372. if (selector == null || typeof selector !== "string" && typeof selector !== "function" && typeof selector.view !== "function") {
  373. throw Error("The selector must be either a string or a component.");
  374. }
  375. if (typeof selector === "string") {
  376. var cached = selectorCache[selector] || compileSelector(selector)
  377. }
  378. if (attrs == null) {
  379. attrs = {}
  380. } else if (typeof attrs !== "object" || attrs.tag != null || Array.isArray(attrs)) {
  381. attrs = {}
  382. start = 1
  383. }
  384. if (arguments.length === start + 1) {
  385. children = arguments[start]
  386. if (!Array.isArray(children)) children = [children]
  387. } else {
  388. children = []
  389. while (start < arguments.length) children.push(arguments[start++])
  390. }
  391. var normalized = Vnode.normalizeChildren(children)
  392. if (typeof selector === "string") {
  393. return execSelector(cached, attrs, normalized)
  394. } else {
  395. return Vnode(selector, attrs.key, attrs, normalized)
  396. }
  397. }
  398. hyperscript.trust = function(html) {
  399. if (html == null) html = ""
  400. return Vnode("<", undefined, undefined, html, undefined, undefined)
  401. }
  402. hyperscript.fragment = function(attrs1, children) {
  403. return Vnode("[", attrs1.key, attrs1, Vnode.normalizeChildren(children), undefined, undefined)
  404. }
  405. var m = hyperscript
  406. /** @constructor */
  407. var PromisePolyfill = function(executor) {
  408. if (!(this instanceof PromisePolyfill)) throw new Error("Promise must be called with `new`")
  409. if (typeof executor !== "function") throw new TypeError("executor must be a function")
  410. var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)
  411. var instance = self._instance = {resolvers: resolvers, rejectors: rejectors}
  412. var callAsync = typeof setImmediate === "function" ? setImmediate : setTimeout
  413. function handler(list, shouldAbsorb) {
  414. return function execute(value) {
  415. var then
  416. try {
  417. if (shouldAbsorb && value != null && (typeof value === "object" || typeof value === "function") && typeof (then = value.then) === "function") {
  418. if (value === self) throw new TypeError("Promise can't be resolved w/ itself")
  419. executeOnce(then.bind(value))
  420. }
  421. else {
  422. callAsync(function() {
  423. if (!shouldAbsorb && list.length === 0) console.error("Possible unhandled promise rejection:", value)
  424. for (var i = 0; i < list.length; i++) list[i](value)
  425. resolvers.length = 0, rejectors.length = 0
  426. instance.state = shouldAbsorb
  427. instance.retry = function() {execute(value)}
  428. })
  429. }
  430. }
  431. catch (e) {
  432. rejectCurrent(e)
  433. }
  434. }
  435. }
  436. function executeOnce(then) {
  437. var runs = 0
  438. function run(fn) {
  439. return function(value) {
  440. if (runs++ > 0) return
  441. fn(value)
  442. }
  443. }
  444. var onerror = run(rejectCurrent)
  445. try {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}
  446. }
  447. executeOnce(executor)
  448. }
  449. PromisePolyfill.prototype.then = function(onFulfilled, onRejection) {
  450. var self = this, instance = self._instance
  451. function handle(callback, list, next, state) {
  452. list.push(function(value) {
  453. if (typeof callback !== "function") next(value)
  454. else try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}
  455. })
  456. if (typeof instance.retry === "function" && state === instance.state) instance.retry()
  457. }
  458. var resolveNext, rejectNext
  459. var promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})
  460. handle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)
  461. return promise
  462. }
  463. PromisePolyfill.prototype.catch = function(onRejection) {
  464. return this.then(null, onRejection)
  465. }
  466. PromisePolyfill.resolve = function(value) {
  467. if (value instanceof PromisePolyfill) return value
  468. return new PromisePolyfill(function(resolve) {resolve(value)})
  469. }
  470. PromisePolyfill.reject = function(value) {
  471. return new PromisePolyfill(function(resolve, reject) {reject(value)})
  472. }
  473. PromisePolyfill.all = function(list) {
  474. return new PromisePolyfill(function(resolve, reject) {
  475. var total = list.length, count = 0, values = []
  476. if (list.length === 0) resolve([])
  477. else for (var i = 0; i < list.length; i++) {
  478. (function(i) {
  479. function consume(value) {
  480. count++
  481. values[i] = value
  482. if (count === total) resolve(values)
  483. }
  484. if (list[i] != null && (typeof list[i] === "object" || typeof list[i] === "function") && typeof list[i].then === "function") {
  485. list[i].then(consume, reject)
  486. }
  487. else consume(list[i])
  488. })(i)
  489. }
  490. })
  491. }
  492. PromisePolyfill.race = function(list) {
  493. return new PromisePolyfill(function(resolve, reject) {
  494. for (var i = 0; i < list.length; i++) {
  495. list[i].then(resolve, reject)
  496. }
  497. })
  498. }
  499. if (typeof window !== "undefined") {
  500. if (typeof window.Promise === "undefined") window.Promise = PromisePolyfill
  501. var PromisePolyfill = window.Promise
  502. } else if (typeof global !== "undefined") {
  503. if (typeof global.Promise === "undefined") global.Promise = PromisePolyfill
  504. var PromisePolyfill = global.Promise
  505. } else {
  506. }
  507. var buildQueryString = function(object) {
  508. if (Object.prototype.toString.call(object) !== "[object Object]") return ""
  509. var args = []
  510. for (var key0 in object) {
  511. destructure(key0, object[key0])
  512. }
  513. return args.join("&")
  514. function destructure(key0, value) {
  515. if (Array.isArray(value)) {
  516. for (var i = 0; i < value.length; i++) {
  517. destructure(key0 + "[" + i + "]", value[i])
  518. }
  519. }
  520. else if (Object.prototype.toString.call(value) === "[object Object]") {
  521. for (var i in value) {
  522. destructure(key0 + "[" + i + "]", value[i])
  523. }
  524. }
  525. else args.push(encodeURIComponent(key0) + (value != null && value !== "" ? "=" + encodeURIComponent(value) : ""))
  526. }
  527. }
  528. var FILE_PROTOCOL_REGEX = new RegExp("^file://", "i")
  529. var _8 = function($window, Promise) {
  530. var callbackCount = 0
  531. var oncompletion
  532. function setCompletionCallback(callback) {oncompletion = callback}
  533. function finalizer() {
  534. var count = 0
  535. function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()}
  536. return function finalize(promise0) {
  537. var then0 = promise0.then
  538. promise0.then = function() {
  539. count++
  540. var next = then0.apply(promise0, arguments)
  541. next.then(complete, function(e) {
  542. complete()
  543. if (count === 0) throw e
  544. })
  545. return finalize(next)
  546. }
  547. return promise0
  548. }
  549. }
  550. function normalize(args, extra) {
  551. if (typeof args === "string") {
  552. var url = args
  553. args = extra || {}
  554. if (args.url == null) args.url = url
  555. }
  556. return args
  557. }
  558. function request(args, extra) {
  559. var finalize = finalizer()
  560. args = normalize(args, extra)
  561. var promise0 = new Promise(function(resolve, reject) {
  562. if (args.method == null) args.method = "GET"
  563. args.method = args.method.toUpperCase()
  564. var useBody = (args.method === "GET" || args.method === "TRACE") ? false : (typeof args.useBody === "boolean" ? args.useBody : true)
  565. if (typeof args.serialize !== "function") args.serialize = typeof FormData !== "undefined" && args.data instanceof FormData ? function(value) {return value} : JSON.stringify
  566. if (typeof args.deserialize !== "function") args.deserialize = deserialize
  567. if (typeof args.extract !== "function") args.extract = extract
  568. args.url = interpolate(args.url, args.data)
  569. if (useBody) args.data = args.serialize(args.data)
  570. else args.url = assemble(args.url, args.data)
  571. var xhr = new $window.XMLHttpRequest(),
  572. aborted = false,
  573. _abort = xhr.abort
  574. xhr.abort = function abort() {
  575. aborted = true
  576. _abort.call(xhr)
  577. }
  578. xhr.open(args.method, args.url, typeof args.async === "boolean" ? args.async : true, typeof args.user === "string" ? args.user : undefined, typeof args.password === "string" ? args.password : undefined)
  579. if (args.serialize === JSON.stringify && useBody) {
  580. xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8")
  581. }
  582. if (args.deserialize === deserialize) {
  583. xhr.setRequestHeader("Accept", "application/json, text/*")
  584. }
  585. if (args.withCredentials) xhr.withCredentials = args.withCredentials
  586. for (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) {
  587. xhr.setRequestHeader(key, args.headers[key])
  588. }
  589. if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr
  590. xhr.onreadystatechange = function() {
  591. // Don't throw errors on xhr.abort().
  592. if(aborted) return
  593. if (xhr.readyState === 4) {
  594. try {
  595. var response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args))
  596. if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304 || FILE_PROTOCOL_REGEX.test(args.url)) {
  597. resolve(cast(args.type, response))
  598. }
  599. else {
  600. var error = new Error(xhr.responseText)
  601. for (var key in response) error[key] = response[key]
  602. reject(error)
  603. }
  604. }
  605. catch (e) {
  606. reject(e)
  607. }
  608. }
  609. }
  610. if (useBody && (args.data != null)) xhr.send(args.data)
  611. else xhr.send()
  612. })
  613. return args.background === true ? promise0 : finalize(promise0)
  614. }
  615. function jsonp(args, extra) {
  616. var finalize = finalizer()
  617. args = normalize(args, extra)
  618. var promise0 = new Promise(function(resolve, reject) {
  619. var callbackName = args.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + callbackCount++
  620. var script = $window.document.createElement("script")
  621. $window[callbackName] = function(data) {
  622. script.parentNode.removeChild(script)
  623. resolve(cast(args.type, data))
  624. delete $window[callbackName]
  625. }
  626. script.onerror = function() {
  627. script.parentNode.removeChild(script)
  628. reject(new Error("JSONP request failed"))
  629. delete $window[callbackName]
  630. }
  631. if (args.data == null) args.data = {}
  632. args.url = interpolate(args.url, args.data)
  633. args.data[args.callbackKey || "callback"] = callbackName
  634. script.src = assemble(args.url, args.data)
  635. $window.document.documentElement.appendChild(script)
  636. })
  637. return args.background === true? promise0 : finalize(promise0)
  638. }
  639. function interpolate(url, data) {
  640. if (data == null) return url
  641. var tokens = url.match(/:[^\/]+/gi) || []
  642. for (var i = 0; i < tokens.length; i++) {
  643. var key = tokens[i].slice(1)
  644. if (data[key] != null) {
  645. url = url.replace(tokens[i], data[key])
  646. }
  647. }
  648. return url
  649. }
  650. function assemble(url, data) {
  651. var querystring = buildQueryString(data)
  652. if (querystring !== "") {
  653. var prefix = url.indexOf("?") < 0 ? "?" : "&"
  654. url += prefix + querystring
  655. }
  656. return url
  657. }
  658. function deserialize(data) {
  659. try {return data !== "" ? JSON.parse(data) : null}
  660. catch (e) {throw new Error(data)}
  661. }
  662. function extract(xhr) {return xhr.responseText}
  663. function cast(type0, data) {
  664. if (typeof type0 === "function") {
  665. if (Array.isArray(data)) {
  666. for (var i = 0; i < data.length; i++) {
  667. data[i] = new type0(data[i])
  668. }
  669. }
  670. else return new type0(data)
  671. }
  672. return data
  673. }
  674. return {request: request, jsonp: jsonp, setCompletionCallback: setCompletionCallback}
  675. }
  676. var requestService = _8(window, PromisePolyfill)
  677. var coreRenderer = function($window) {
  678. var $doc = $window.document
  679. var $emptyFragment = $doc.createDocumentFragment()
  680. var onevent
  681. function setEventCallback(callback) {return onevent = callback}
  682. //create
  683. function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {
  684. for (var i = start; i < end; i++) {
  685. var vnode = vnodes[i]
  686. if (vnode != null) {
  687. createNode(parent, vnode, hooks, ns, nextSibling)
  688. }
  689. }
  690. }
  691. function createNode(parent, vnode, hooks, ns, nextSibling) {
  692. var tag = vnode.tag
  693. if (typeof tag === "string") {
  694. vnode.state = {}
  695. if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)
  696. switch (tag) {
  697. case "#": return createText(parent, vnode, nextSibling)
  698. case "<": return createHTML(parent, vnode, nextSibling)
  699. case "[": return createFragment(parent, vnode, hooks, ns, nextSibling)
  700. default: return createElement(parent, vnode, hooks, ns, nextSibling)
  701. }
  702. }
  703. else return createComponent(parent, vnode, hooks, ns, nextSibling)
  704. }
  705. function createText(parent, vnode, nextSibling) {
  706. vnode.dom = $doc.createTextNode(vnode.children)
  707. insertNode(parent, vnode.dom, nextSibling)
  708. return vnode.dom
  709. }
  710. function createHTML(parent, vnode, nextSibling) {
  711. var match1 = vnode.children.match(/^\s*?<(\w+)/im) || []
  712. var parent1 = {caption: "table", thead: "table", tbody: "table", tfoot: "table", tr: "tbody", th: "tr", td: "tr", colgroup: "table", col: "colgroup"}[match1[1]] || "div"
  713. var temp = $doc.createElement(parent1)
  714. temp.innerHTML = vnode.children
  715. vnode.dom = temp.firstChild
  716. vnode.domSize = temp.childNodes.length
  717. var fragment = $doc.createDocumentFragment()
  718. var child
  719. while (child = temp.firstChild) {
  720. fragment.appendChild(child)
  721. }
  722. insertNode(parent, fragment, nextSibling)
  723. return fragment
  724. }
  725. function createFragment(parent, vnode, hooks, ns, nextSibling) {
  726. var fragment = $doc.createDocumentFragment()
  727. if (vnode.children != null) {
  728. var children = vnode.children
  729. createNodes(fragment, children, 0, children.length, hooks, null, ns)
  730. }
  731. vnode.dom = fragment.firstChild
  732. vnode.domSize = fragment.childNodes.length
  733. insertNode(parent, fragment, nextSibling)
  734. return fragment
  735. }
  736. function createElement(parent, vnode, hooks, ns, nextSibling) {
  737. var tag = vnode.tag
  738. switch (vnode.tag) {
  739. case "svg": ns = "http://www.w3.org/2000/svg"; break
  740. case "math": ns = "http://www.w3.org/1998/Math/MathML"; break
  741. }
  742. var attrs2 = vnode.attrs
  743. var is = attrs2 && attrs2.is
  744. var element = ns ?
  745. is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
  746. is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)
  747. vnode.dom = element
  748. if (attrs2 != null) {
  749. setAttrs(vnode, attrs2, ns)
  750. }
  751. insertNode(parent, element, nextSibling)
  752. if (vnode.attrs != null && vnode.attrs.contenteditable != null) {
  753. setContentEditable(vnode)
  754. }
  755. else {
  756. if (vnode.text != null) {
  757. if (vnode.text !== "") element.textContent = vnode.text
  758. else vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)]
  759. }
  760. if (vnode.children != null) {
  761. var children = vnode.children
  762. createNodes(element, children, 0, children.length, hooks, null, ns)
  763. setLateAttrs(vnode)
  764. }
  765. }
  766. return element
  767. }
  768. function initComponent(vnode, hooks) {
  769. var sentinel
  770. if (typeof vnode.tag.view === "function") {
  771. vnode.state = Object.create(vnode.tag)
  772. sentinel = vnode.state.view
  773. if (sentinel.$$reentrantLock$$ != null) return $emptyFragment
  774. sentinel.$$reentrantLock$$ = true
  775. } else {
  776. vnode.state = void 0
  777. sentinel = vnode.tag
  778. if (sentinel.$$reentrantLock$$ != null) return $emptyFragment
  779. sentinel.$$reentrantLock$$ = true
  780. vnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === "function") ? new vnode.tag(vnode) : vnode.tag(vnode)
  781. }
  782. vnode._state = vnode.state
  783. if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)
  784. initLifecycle(vnode._state, vnode, hooks)
  785. vnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))
  786. if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as argument")
  787. sentinel.$$reentrantLock$$ = null
  788. }
  789. function createComponent(parent, vnode, hooks, ns, nextSibling) {
  790. initComponent(vnode, hooks)
  791. if (vnode.instance != null) {
  792. var element = createNode(parent, vnode.instance, hooks, ns, nextSibling)
  793. vnode.dom = vnode.instance.dom
  794. vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0
  795. insertNode(parent, element, nextSibling)
  796. return element
  797. }
  798. else {
  799. vnode.domSize = 0
  800. return $emptyFragment
  801. }
  802. }
  803. //update
  804. function updateNodes(parent, old, vnodes, recycling, hooks, nextSibling, ns) {
  805. if (old === vnodes || old == null && vnodes == null) return
  806. else if (old == null) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, undefined)
  807. else if (vnodes == null) removeNodes(old, 0, old.length, vnodes)
  808. else {
  809. if (old.length === vnodes.length) {
  810. var isUnkeyed = false
  811. for (var i = 0; i < vnodes.length; i++) {
  812. if (vnodes[i] != null && old[i] != null) {
  813. isUnkeyed = vnodes[i].key == null && old[i].key == null
  814. break
  815. }
  816. }
  817. if (isUnkeyed) {
  818. for (var i = 0; i < old.length; i++) {
  819. if (old[i] === vnodes[i]) continue
  820. else if (old[i] == null && vnodes[i] != null) createNode(parent, vnodes[i], hooks, ns, getNextSibling(old, i + 1, nextSibling))
  821. else if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes)
  822. else updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), recycling, ns)
  823. }
  824. return
  825. }
  826. }
  827. recycling = recycling || isRecyclable(old, vnodes)
  828. if (recycling) {
  829. var pool = old.pool
  830. old = old.concat(old.pool)
  831. }
  832. var oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map
  833. while (oldEnd >= oldStart && end >= start) {
  834. var o = old[oldStart], v = vnodes[start]
  835. if (o === v && !recycling) oldStart++, start++
  836. else if (o == null) oldStart++
  837. else if (v == null) start++
  838. else if (o.key === v.key) {
  839. var shouldRecycle = (pool != null && oldStart >= old.length - pool.length) || ((pool == null) && recycling)
  840. oldStart++, start++
  841. updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), shouldRecycle, ns)
  842. if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)
  843. }
  844. else {
  845. var o = old[oldEnd]
  846. if (o === v && !recycling) oldEnd--, start++
  847. else if (o == null) oldEnd--
  848. else if (v == null) start++
  849. else if (o.key === v.key) {
  850. var shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)
  851. updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)
  852. if (recycling || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, nextSibling))
  853. oldEnd--, start++
  854. }
  855. else break
  856. }
  857. }
  858. while (oldEnd >= oldStart && end >= start) {
  859. var o = old[oldEnd], v = vnodes[end]
  860. if (o === v && !recycling) oldEnd--, end--
  861. else if (o == null) oldEnd--
  862. else if (v == null) end--
  863. else if (o.key === v.key) {
  864. var shouldRecycle = (pool != null && oldEnd >= old.length - pool.length) || ((pool == null) && recycling)
  865. updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)
  866. if (recycling && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)
  867. if (o.dom != null) nextSibling = o.dom
  868. oldEnd--, end--
  869. }
  870. else {
  871. if (!map) map = getKeyMap(old, oldEnd)
  872. if (v != null) {
  873. var oldIndex = map[v.key]
  874. if (oldIndex != null) {
  875. var movable = old[oldIndex]
  876. var shouldRecycle = (pool != null && oldIndex >= old.length - pool.length) || ((pool == null) && recycling)
  877. updateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns)
  878. insertNode(parent, toFragment(movable), nextSibling)
  879. old[oldIndex].skip = true
  880. if (movable.dom != null) nextSibling = movable.dom
  881. }
  882. else {
  883. var dom = createNode(parent, v, hooks, undefined, nextSibling)
  884. nextSibling = dom
  885. }
  886. }
  887. end--
  888. }
  889. if (end < start) break
  890. }
  891. createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)
  892. removeNodes(old, oldStart, oldEnd + 1, vnodes)
  893. }
  894. }
  895. function updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) {
  896. var oldTag = old.tag, tag = vnode.tag
  897. if (oldTag === tag) {
  898. vnode.state = old.state
  899. vnode._state = old._state
  900. vnode.events = old.events
  901. if (!recycling && shouldNotUpdate(vnode, old)) return
  902. if (typeof oldTag === "string") {
  903. if (vnode.attrs != null) {
  904. if (recycling) {
  905. vnode.state = {}
  906. initLifecycle(vnode.attrs, vnode, hooks)
  907. }
  908. else updateLifecycle(vnode.attrs, vnode, hooks)
  909. }
  910. switch (oldTag) {
  911. case "#": updateText(old, vnode); break
  912. case "<": updateHTML(parent, old, vnode, nextSibling); break
  913. case "[": updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns); break
  914. default: updateElement(old, vnode, recycling, hooks, ns)
  915. }
  916. }
  917. else updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns)
  918. }
  919. else {
  920. removeNode(old, null)
  921. createNode(parent, vnode, hooks, ns, nextSibling)
  922. }
  923. }
  924. function updateText(old, vnode) {
  925. if (old.children.toString() !== vnode.children.toString()) {
  926. old.dom.nodeValue = vnode.children
  927. }
  928. vnode.dom = old.dom
  929. }
  930. function updateHTML(parent, old, vnode, nextSibling) {
  931. if (old.children !== vnode.children) {
  932. toFragment(old)
  933. createHTML(parent, vnode, nextSibling)
  934. }
  935. else vnode.dom = old.dom, vnode.domSize = old.domSize
  936. }
  937. function updateFragment(parent, old, vnode, recycling, hooks, nextSibling, ns) {
  938. updateNodes(parent, old.children, vnode.children, recycling, hooks, nextSibling, ns)
  939. var domSize = 0, children = vnode.children
  940. vnode.dom = null
  941. if (children != null) {
  942. for (var i = 0; i < children.length; i++) {
  943. var child = children[i]
  944. if (child != null && child.dom != null) {
  945. if (vnode.dom == null) vnode.dom = child.dom
  946. domSize += child.domSize || 1
  947. }
  948. }
  949. if (domSize !== 1) vnode.domSize = domSize
  950. }
  951. }
  952. function updateElement(old, vnode, recycling, hooks, ns) {
  953. var element = vnode.dom = old.dom
  954. switch (vnode.tag) {
  955. case "svg": ns = "http://www.w3.org/2000/svg"; break
  956. case "math": ns = "http://www.w3.org/1998/Math/MathML"; break
  957. }
  958. if (vnode.tag === "textarea") {
  959. if (vnode.attrs == null) vnode.attrs = {}
  960. if (vnode.text != null) {
  961. vnode.attrs.value = vnode.text //FIXME handle0 multiple children
  962. vnode.text = undefined
  963. }
  964. }
  965. updateAttrs(vnode, old.attrs, vnode.attrs, ns)
  966. if (vnode.attrs != null && vnode.attrs.contenteditable != null) {
  967. setContentEditable(vnode)
  968. }
  969. else if (old.text != null && vnode.text != null && vnode.text !== "") {
  970. if (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text
  971. }
  972. else {
  973. if (old.text != null) old.children = [Vnode("#", undefined, undefined, old.text, undefined, old.dom.firstChild)]
  974. if (vnode.text != null) vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)]
  975. updateNodes(element, old.children, vnode.children, recycling, hooks, null, ns)
  976. }
  977. }
  978. function updateComponent(parent, old, vnode, hooks, nextSibling, recycling, ns) {
  979. if (recycling) {
  980. initComponent(vnode, hooks)
  981. } else {
  982. vnode.instance = Vnode.normalize(vnode._state.view.call(vnode.state, vnode))
  983. if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as argument")
  984. if (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)
  985. updateLifecycle(vnode._state, vnode, hooks)
  986. }
  987. if (vnode.instance != null) {
  988. if (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)
  989. else updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, recycling, ns)
  990. vnode.dom = vnode.instance.dom
  991. vnode.domSize = vnode.instance.domSize
  992. }
  993. else if (old.instance != null) {
  994. removeNode(old.instance, null)
  995. vnode.dom = undefined
  996. vnode.domSize = 0
  997. }
  998. else {
  999. vnode.dom = old.dom
  1000. vnode.domSize = old.domSize
  1001. }
  1002. }
  1003. function isRecyclable(old, vnodes) {
  1004. if (old.pool != null && Math.abs(old.pool.length - vnodes.length) <= Math.abs(old.length - vnodes.length)) {
  1005. var oldChildrenLength = old[0] && old[0].children && old[0].children.length || 0
  1006. var poolChildrenLength = old.pool[0] && old.pool[0].children && old.pool[0].children.length || 0
  1007. var vnodesChildrenLength = vnodes[0] && vnodes[0].children && vnodes[0].children.length || 0
  1008. if (Math.abs(poolChildrenLength - vnodesChildrenLength) <= Math.abs(oldChildrenLength - vnodesChildrenLength)) {
  1009. return true
  1010. }
  1011. }
  1012. return false
  1013. }
  1014. function getKeyMap(vnodes, end) {
  1015. var map = {}, i = 0
  1016. for (var i = 0; i < end; i++) {
  1017. var vnode = vnodes[i]
  1018. if (vnode != null) {
  1019. var key2 = vnode.key
  1020. if (key2 != null) map[key2] = i
  1021. }
  1022. }
  1023. return map
  1024. }
  1025. function toFragment(vnode) {
  1026. var count0 = vnode.domSize
  1027. if (count0 != null || vnode.dom == null) {
  1028. var fragment = $doc.createDocumentFragment()
  1029. if (count0 > 0) {
  1030. var dom = vnode.dom
  1031. while (--count0) fragment.appendChild(dom.nextSibling)
  1032. fragment.insertBefore(dom, fragment.firstChild)
  1033. }
  1034. return fragment
  1035. }
  1036. else return vnode.dom
  1037. }
  1038. function getNextSibling(vnodes, i, nextSibling) {
  1039. for (; i < vnodes.length; i++) {
  1040. if (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom
  1041. }
  1042. return nextSibling
  1043. }
  1044. function insertNode(parent, dom, nextSibling) {
  1045. if (nextSibling && nextSibling.parentNode) parent.insertBefore(dom, nextSibling)
  1046. else parent.appendChild(dom)
  1047. }
  1048. function setContentEditable(vnode) {
  1049. var children = vnode.children
  1050. if (children != null && children.length === 1 && children[0].tag === "<") {
  1051. var content = children[0].children
  1052. if (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content
  1053. }
  1054. else if (vnode.text != null || children != null && children.length !== 0) throw new Error("Child node of a contenteditable must be trusted")
  1055. }
  1056. //remove
  1057. function removeNodes(vnodes, start, end, context) {
  1058. for (var i = start; i < end; i++) {
  1059. var vnode = vnodes[i]
  1060. if (vnode != null) {
  1061. if (vnode.skip) vnode.skip = false
  1062. else removeNode(vnode, context)
  1063. }
  1064. }
  1065. }
  1066. function removeNode(vnode, context) {
  1067. var expected = 1, called = 0
  1068. if (vnode.attrs && typeof vnode.attrs.onbeforeremove === "function") {
  1069. var result = vnode.attrs.onbeforeremove.call(vnode.state, vnode)
  1070. if (result != null && typeof result.then === "function") {
  1071. expected++
  1072. result.then(continuation, continuation)
  1073. }
  1074. }
  1075. if (typeof vnode.tag !== "string" && typeof vnode._state.onbeforeremove === "function") {
  1076. var result = vnode._state.onbeforeremove.call(vnode.state, vnode)
  1077. if (result != null && typeof result.then === "function") {
  1078. expected++
  1079. result.then(continuation, continuation)
  1080. }
  1081. }
  1082. continuation()
  1083. function continuation() {
  1084. if (++called === expected) {
  1085. onremove(vnode)
  1086. if (vnode.dom) {
  1087. var count0 = vnode.domSize || 1
  1088. if (count0 > 1) {
  1089. var dom = vnode.dom
  1090. while (--count0) {
  1091. removeNodeFromDOM(dom.nextSibling)
  1092. }
  1093. }
  1094. removeNodeFromDOM(vnode.dom)
  1095. if (context != null && vnode.domSize == null && !hasIntegrationMethods(vnode.attrs) && typeof vnode.tag === "string") { //TODO test custom elements
  1096. if (!context.pool) context.pool = [vnode]
  1097. else context.pool.push(vnode)
  1098. }
  1099. }
  1100. }
  1101. }
  1102. }
  1103. function removeNodeFromDOM(node) {
  1104. var parent = node.parentNode
  1105. if (parent != null) parent.removeChild(node)
  1106. }
  1107. function onremove(vnode) {
  1108. if (vnode.attrs && typeof vnode.attrs.onremove === "function") vnode.attrs.onremove.call(vnode.state, vnode)
  1109. if (typeof vnode.tag !== "string" && typeof vnode._state.onremove === "function") vnode._state.onremove.call(vnode.state, vnode)
  1110. if (vnode.instance != null) onremove(vnode.instance)
  1111. else {
  1112. var children = vnode.children
  1113. if (Array.isArray(children)) {
  1114. for (var i = 0; i < children.length; i++) {
  1115. var child = children[i]
  1116. if (child != null) onremove(child)
  1117. }
  1118. }
  1119. }
  1120. }
  1121. //attrs2
  1122. function setAttrs(vnode, attrs2, ns) {
  1123. for (var key2 in attrs2) {
  1124. setAttr(vnode, key2, null, attrs2[key2], ns)
  1125. }
  1126. }
  1127. function setAttr(vnode, key2, old, value, ns) {
  1128. var element = vnode.dom
  1129. if (key2 === "key" || key2 === "is" || (old === value && !isFormAttribute(vnode, key2)) && typeof value !== "object" || typeof value === "undefined" || isLifecycleMethod(key2)) return
  1130. var nsLastIndex = key2.indexOf(":")
  1131. if (nsLastIndex > -1 && key2.substr(0, nsLastIndex) === "xlink") {
  1132. element.setAttributeNS("http://www.w3.org/1999/xlink", key2.slice(nsLastIndex + 1), value)
  1133. }
  1134. else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value)
  1135. else if (key2 === "style") updateStyle(element, old, value)
  1136. else if (key2 in element && !isAttribute(key2) && ns === undefined && !isCustomElement(vnode)) {
  1137. //setting input[value] to same value by typing on focused element moves cursor to end in Chrome
  1138. if (vnode.tag === "input" && key2 === "value" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return
  1139. //setting select[value] to same value while having select open blinks select dropdown in Chrome
  1140. if (vnode.tag === "select" && key2 === "value" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return
  1141. //setting option[value] to same value while having select open blinks select dropdown in Chrome
  1142. if (vnode.tag === "option" && key2 === "value" && vnode.dom.value == value) return
  1143. // If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.
  1144. if (vnode.tag === "input" && key2 === "type") {
  1145. element.setAttribute(key2, value)
  1146. return
  1147. }
  1148. element[key2] = value
  1149. }
  1150. else {
  1151. if (typeof value === "boolean") {
  1152. if (value) element.setAttribute(key2, "")
  1153. else element.removeAttribute(key2)
  1154. }
  1155. else element.setAttribute(key2 === "className" ? "class" : key2, value)
  1156. }
  1157. }
  1158. function setLateAttrs(vnode) {
  1159. var attrs2 = vnode.attrs
  1160. if (vnode.tag === "select" && attrs2 != null) {
  1161. if ("value" in attrs2) setAttr(vnode, "value", null, attrs2.value, undefined)
  1162. if ("selectedIndex" in attrs2) setAttr(vnode, "selectedIndex", null, attrs2.selectedIndex, undefined)
  1163. }
  1164. }
  1165. function updateAttrs(vnode, old, attrs2, ns) {
  1166. if (attrs2 != null) {
  1167. for (var key2 in attrs2) {
  1168. setAttr(vnode, key2, old && old[key2], attrs2[key2], ns)
  1169. }
  1170. }
  1171. if (old != null) {
  1172. for (var key2 in old) {
  1173. if (attrs2 == null || !(key2 in attrs2)) {
  1174. if (key2 === "className") key2 = "class"
  1175. if (key2[0] === "o" && key2[1] === "n" && !isLifecycleMethod(key2)) updateEvent(vnode, key2, undefined)
  1176. else if (key2 !== "key") vnode.dom.removeAttribute(key2)
  1177. }
  1178. }
  1179. }
  1180. }
  1181. function isFormAttribute(vnode, attr) {
  1182. return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement
  1183. }
  1184. function isLifecycleMethod(attr) {
  1185. return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate"
  1186. }
  1187. function isAttribute(attr) {
  1188. return attr === "href" || attr === "list" || attr === "form" || attr === "width" || attr === "height"// || attr === "type"
  1189. }
  1190. function isCustomElement(vnode){
  1191. return vnode.attrs.is || vnode.tag.indexOf("-") > -1
  1192. }
  1193. function hasIntegrationMethods(source) {
  1194. return source != null && (source.oncreate || source.onupdate || source.onbeforeremove || source.onremove)
  1195. }
  1196. //style
  1197. function updateStyle(element, old, style) {
  1198. if (old === style) element.style.cssText = "", old = null
  1199. if (style == null) element.style.cssText = ""
  1200. else if (typeof style === "string") element.style.cssText = style
  1201. else {
  1202. if (typeof old === "string") element.style.cssText = ""
  1203. for (var key2 in style) {
  1204. element.style[key2] = style[key2]
  1205. }
  1206. if (old != null && typeof old !== "string") {
  1207. for (var key2 in old) {
  1208. if (!(key2 in style)) element.style[key2] = ""
  1209. }
  1210. }
  1211. }
  1212. }
  1213. //event
  1214. function updateEvent(vnode, key2, value) {
  1215. var element = vnode.dom
  1216. var callback = typeof onevent !== "function" ? value : function(e) {
  1217. var result = value.call(element, e)
  1218. onevent.call(element, e)
  1219. return result
  1220. }
  1221. if (key2 in element) element[key2] = typeof value === "function" ? callback : null
  1222. else {
  1223. var eventName = key2.slice(2)
  1224. if (vnode.events === undefined) vnode.events = {}
  1225. if (vnode.events[key2] === callback) return
  1226. if (vnode.events[key2] != null) element.removeEventListener(eventName, vnode.events[key2], false)
  1227. if (typeof value === "function") {
  1228. vnode.events[key2] = callback
  1229. element.addEventListener(eventName, vnode.events[key2], false)
  1230. }
  1231. }
  1232. }
  1233. //lifecycle
  1234. function initLifecycle(source, vnode, hooks) {
  1235. if (typeof source.oninit === "function") source.oninit.call(vnode.state, vnode)
  1236. if (typeof source.oncreate === "function") hooks.push(source.oncreate.bind(vnode.state, vnode))
  1237. }
  1238. function updateLifecycle(source, vnode, hooks) {
  1239. if (typeof source.onupdate === "function") hooks.push(source.onupdate.bind(vnode.state, vnode))
  1240. }
  1241. function shouldNotUpdate(vnode, old) {
  1242. var forceVnodeUpdate, forceComponentUpdate
  1243. if (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === "function") forceVnodeUpdate = vnode.attrs.onbeforeupdate.call(vnode.state, vnode, old)
  1244. if (typeof vnode.tag !== "string" && typeof vnode._state.onbeforeupdate === "function") forceComponentUpdate = vnode._state.onbeforeupdate.call(vnode.state, vnode, old)
  1245. if (!(forceVnodeUpdate === undefined && forceComponentUpdate === undefined) && !forceVnodeUpdate && !forceComponentUpdate) {
  1246. vnode.dom = old.dom
  1247. vnode.domSize = old.domSize
  1248. vnode.instance = old.instance
  1249. return true
  1250. }
  1251. return false
  1252. }
  1253. function render(dom, vnodes) {
  1254. if (!dom) throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.")
  1255. var hooks = []
  1256. var active = $doc.activeElement
  1257. // First time0 rendering into a node clears it out
  1258. if (dom.vnodes == null) dom.textContent = ""
  1259. if (!Array.isArray(vnodes)) vnodes = [vnodes]
  1260. updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), false, hooks, null, undefined)
  1261. dom.vnodes = vnodes
  1262. for (var i = 0; i < hooks.length; i++) hooks[i]()
  1263. if ($doc.activeElement !== active) active.focus()
  1264. }
  1265. return {render: render, setEventCallback: setEventCallback}
  1266. }
  1267. function throttle(callback) {
  1268. //60fps translates to 16.6ms, round it down since setTimeout requires int
  1269. var time = 16
  1270. var last = 0, pending = null
  1271. var timeout = typeof requestAnimationFrame === "function" ? requestAnimationFrame : setTimeout
  1272. return function() {
  1273. var now = Date.now()
  1274. if (last === 0 || now - last >= time) {
  1275. last = now
  1276. callback()
  1277. }
  1278. else if (pending === null) {
  1279. pending = timeout(function() {
  1280. pending = null
  1281. callback()
  1282. last = Date.now()
  1283. }, time - (now - last))
  1284. }
  1285. }
  1286. }
  1287. var _11 = function($window) {
  1288. var renderService = coreRenderer($window)
  1289. renderService.setEventCallback(function(e) {
  1290. if (e.redraw !== false) redraw()
  1291. })
  1292. var callbacks = []
  1293. function subscribe(key1, callback) {
  1294. unsubscribe(key1)
  1295. callbacks.push(key1, throttle(callback))
  1296. }
  1297. function unsubscribe(key1) {
  1298. var index = callbacks.indexOf(key1)
  1299. if (index > -1) callbacks.splice(index, 2)
  1300. }
  1301. function redraw() {
  1302. for (var i = 1; i < callbacks.length; i += 2) {
  1303. callbacks[i]()
  1304. }
  1305. }
  1306. return {subscribe: subscribe, unsubscribe: unsubscribe, redraw: redraw, render: renderService.render}
  1307. }
  1308. var redrawService = _11(window)
  1309. requestService.setCompletionCallback(redrawService.redraw)
  1310. var _16 = function(redrawService0) {
  1311. return function(root, component) {
  1312. if (component === null) {
  1313. redrawService0.render(root, [])
  1314. redrawService0.unsubscribe(root)
  1315. return
  1316. }
  1317. if (component.view == null && typeof component !== "function") throw new Error("m.mount(element, component) expects a component, not a vnode")
  1318. var run0 = function() {
  1319. redrawService0.render(root, Vnode(component))
  1320. }
  1321. redrawService0.subscribe(root, run0)
  1322. redrawService0.redraw()
  1323. }
  1324. }
  1325. m.mount = _16(redrawService)
  1326. var Promise = PromisePolyfill
  1327. var parseQueryString = function(string) {
  1328. if (string === "" || string == null) return {}
  1329. if (string.charAt(0) === "?") string = string.slice(1)
  1330. var entries = string.split("&"), data0 = {}, counters = {}
  1331. for (var i = 0; i < entries.length; i++) {
  1332. var entry = entries[i].split("=")
  1333. var key5 = decodeURIComponent(entry[0])
  1334. var value = entry.length === 2 ? decodeURIComponent(entry[1]) : ""
  1335. if (value === "true") value = true
  1336. else if (value === "false") value = false
  1337. var levels = key5.split(/\]\[?|\[/)
  1338. var cursor = data0
  1339. if (key5.indexOf("[") > -1) levels.pop()
  1340. for (var j = 0; j < levels.length; j++) {
  1341. var level = levels[j], nextLevel = levels[j + 1]
  1342. var isNumber = nextLevel == "" || !isNaN(parseInt(nextLevel, 10))
  1343. var isValue = j === levels.length - 1
  1344. if (level === "") {
  1345. var key5 = levels.slice(0, j).join()
  1346. if (counters[key5] == null) counters[key5] = 0
  1347. level = counters[key5]++
  1348. }
  1349. if (cursor[level] == null) {
  1350. cursor[level] = isValue ? value : isNumber ? [] : {}
  1351. }
  1352. cursor = cursor[level]
  1353. }
  1354. }
  1355. return data0
  1356. }
  1357. var coreRouter = function($window) {
  1358. var supportsPushState = typeof $window.history.pushState === "function"
  1359. var callAsync0 = typeof setImmediate === "function" ? setImmediate : setTimeout
  1360. function normalize1(fragment0) {
  1361. var data = $window.location[fragment0].replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)
  1362. if (fragment0 === "pathname" && data[0] !== "/") data = "/" + data
  1363. return data
  1364. }
  1365. var asyncId
  1366. function debounceAsync(callback0) {
  1367. return function() {
  1368. if (asyncId != null) return
  1369. asyncId = callAsync0(function() {
  1370. asyncId = null
  1371. callback0()
  1372. })
  1373. }
  1374. }
  1375. function parsePath(path, queryData, hashData) {
  1376. var queryIndex = path.indexOf("?")
  1377. var hashIndex = path.indexOf("#")
  1378. var pathEnd = queryIndex > -1 ? queryIndex : hashIndex > -1 ? hashIndex : path.length
  1379. if (queryIndex > -1) {
  1380. var queryEnd = hashIndex > -1 ? hashIndex : path.length
  1381. var queryParams = parseQueryString(path.slice(queryIndex + 1, queryEnd))
  1382. for (var key4 in queryParams) queryData[key4] = queryParams[key4]
  1383. }
  1384. if (hashIndex > -1) {
  1385. var hashParams = parseQueryString(path.slice(hashIndex + 1))
  1386. for (var key4 in hashParams) hashData[key4] = hashParams[key4]
  1387. }
  1388. return path.slice(0, pathEnd)
  1389. }
  1390. var router = {prefix: "#!"}
  1391. router.getPath = function() {
  1392. var type2 = router.prefix.charAt(0)
  1393. switch (type2) {
  1394. case "#": return normalize1("hash").slice(router.prefix.length)
  1395. case "?": return normalize1("search").slice(router.prefix.length) + normalize1("hash")
  1396. default: return normalize1("pathname").slice(router.prefix.length) + normalize1("search") + normalize1("hash")
  1397. }
  1398. }
  1399. router.setPath = function(path, data, options) {
  1400. var queryData = {}, hashData = {}
  1401. path = parsePath(path, queryData, hashData)
  1402. if (data != null) {
  1403. for (var key4 in data) queryData[key4] = data[key4]
  1404. path = path.replace(/:([^\/]+)/g, function(match2, token) {
  1405. delete queryData[token]
  1406. return data[token]
  1407. })
  1408. }
  1409. var query = buildQueryString(queryData)
  1410. if (query) path += "?" + query
  1411. var hash = buildQueryString(hashData)
  1412. if (hash) path += "#" + hash
  1413. if (supportsPushState) {
  1414. var state = options ? options.state : null
  1415. var title = options ? options.title : null
  1416. $window.onpopstate()
  1417. if (options && options.replace) $window.history.replaceState(state, title, router.prefix + path)
  1418. else $window.history.pushState(state, title, router.prefix + path)
  1419. }
  1420. else $window.location.href = router.prefix + path
  1421. }
  1422. router.defineRoutes = function(routes, resolve, reject) {
  1423. function resolveRoute() {
  1424. var path = router.getPath()
  1425. var params = {}
  1426. var pathname = parsePath(path, params, params)
  1427. var state = $window.history.state
  1428. if (state != null) {
  1429. for (var k in state) params[k] = state[k]
  1430. }
  1431. for (var route0 in routes) {
  1432. var matcher = new RegExp("^" + route0.replace(/:[^\/]+?\.{3}/g, "(.*?)").replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$")
  1433. if (matcher.test(pathname)) {
  1434. pathname.replace(matcher, function() {
  1435. var keys = route0.match(/:[^\/]+/g) || []
  1436. var values = [].slice.call(arguments, 1, -2)
  1437. for (var i = 0; i < keys.length; i++) {
  1438. params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i])
  1439. }
  1440. resolve(routes[route0], params, path, route0)
  1441. })
  1442. return
  1443. }
  1444. }
  1445. reject(path, params)
  1446. }
  1447. if (supportsPushState) $window.onpopstate = debounceAsync(resolveRoute)
  1448. else if (router.prefix.charAt(0) === "#") $window.onhashchange = resolveRoute
  1449. resolveRoute()
  1450. }
  1451. return router
  1452. }
  1453. var _20 = function($window, redrawService0) {
  1454. var routeService = coreRouter($window)
  1455. var identity = function(v) {return v}
  1456. var render1, component, attrs3, currentPath, lastUpdate
  1457. var route = function(root, defaultRoute, routes) {
  1458. if (root == null) throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined")
  1459. var run1 = function() {
  1460. if (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3)))
  1461. }
  1462. var bail = function(path) {
  1463. if (path !== defaultRoute) routeService.setPath(defaultRoute, null, {replace: true})
  1464. else throw new Error("Could not resolve default route " + defaultRoute)
  1465. }
  1466. routeService.defineRoutes(routes, function(payload, params, path) {
  1467. var update = lastUpdate = function(routeResolver, comp) {
  1468. if (update !== lastUpdate) return
  1469. component = comp != null && (typeof comp.view === "function" || typeof comp === "function")? comp : "div"
  1470. attrs3 = params, currentPath = path, lastUpdate = null
  1471. render1 = (routeResolver.render || identity).bind(routeResolver)
  1472. run1()
  1473. }
  1474. if (payload.view || typeof payload === "function") update({}, payload)
  1475. else {
  1476. if (payload.onmatch) {
  1477. Promise.resolve(payload.onmatch(params, path)).then(function(resolved) {
  1478. update(payload, resolved)
  1479. }, bail)
  1480. }
  1481. else update(payload, "div")
  1482. }
  1483. }, bail)
  1484. redrawService0.subscribe(root, run1)
  1485. }
  1486. route.set = function(path, data, options) {
  1487. if (lastUpdate != null) options = {replace: true}
  1488. lastUpdate = null
  1489. routeService.setPath(path, data, options)
  1490. }
  1491. route.get = function() {return currentPath}
  1492. route.prefix = function(prefix0) {routeService.prefix = prefix0}
  1493. route.link = function(vnode1) {
  1494. vnode1.dom.setAttribute("href", routeService.prefix + vnode1.attrs.href)
  1495. vnode1.dom.onclick = function(e) {
  1496. if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return
  1497. e.preventDefault()
  1498. e.redraw = false
  1499. var href = this.getAttribute("href")
  1500. if (href.indexOf(routeService.prefix) === 0) href = href.slice(routeService.prefix.length)
  1501. route.set(href, undefined, undefined)
  1502. }
  1503. }
  1504. route.param = function(key3) {
  1505. if(typeof attrs3 !== "undefined" && typeof key3 !== "undefined") return attrs3[key3]
  1506. return attrs3
  1507. }
  1508. return route
  1509. }
  1510. m.route = _20(window, redrawService)
  1511. m.withAttr = function(attrName, callback1, context) {
  1512. return function(e) {
  1513. callback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))
  1514. }
  1515. }
  1516. var _28 = coreRenderer(window)
  1517. m.render = _28.render
  1518. m.redraw = redrawService.redraw
  1519. m.request = requestService.request
  1520. m.jsonp = requestService.jsonp
  1521. m.parseQueryString = parseQueryString
  1522. m.buildQueryString = buildQueryString
  1523. m.version = "1.1.1"
  1524. m.vnode = Vnode
  1525. if (true) module["exports"] = m
  1526. else window.m = m
  1527. }());
  1528. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(81).setImmediate, __webpack_require__(6)))
  1529. /***/ }),
  1530. /* 2 */
  1531. /***/ (function(module, exports) {
  1532. // _
  1533. // (_)________ ____
  1534. // / / ___/ __ \/ __ \
  1535. // / (__ ) /_/ / / / /
  1536. // __/ /____/\____/_/ /_/
  1537. // /___/
  1538. module.exports = {
  1539. lang:'fr',
  1540. langs:[
  1541. {'lc':'fr', 'label':'fr', 'db':'2-Appuhn-FR-ethicadb.json'},
  1542. {'lc':'bra', 'label':'bra', 'db':'ethica-bresilen.json'}
  1543. ],
  1544. data:[],
  1545. loaded_dbs:0,
  1546. data_byid:[],
  1547. data_strct:{},
  1548. load: function(callback) {
  1549. // load all dbs, when all loaded call main app callback function
  1550. for (var i = 0; i < this.langs.length; i++) {
  1551. this.loadJSON(this.langs[i].lc, 'assets/jsondb/'+this.langs[i].db, callback)
  1552. }
  1553. },
  1554. loadJSON: function(lc, file, callback){
  1555. var xobj = new XMLHttpRequest();
  1556. xobj.overrideMimeType("application/json");
  1557. // TODO: load and unzip gziped json
  1558. // xobj.setRequestHeader('Accept-Encoding', 'gzip');
  1559. xobj.onreadystatechange = function () {
  1560. // console.log('onreadystatechange', xobj.readyState);
  1561. switch(xobj.readyState){
  1562. case 3:
  1563. console.log('loading');
  1564. break;
  1565. case 4:
  1566. if (xobj.status === 200) {
  1567. this.onJSONLoaded(lc, xobj.responseText, callback);
  1568. } else {
  1569. console.log("Status de la réponse: %d (%s)", xobj.status, xobj.statusText);
  1570. }
  1571. break;
  1572. }
  1573. }.bind(this);
  1574. xobj.open('GET', file, true);
  1575. xobj.send(null);
  1576. },
  1577. onJSONLoaded: function(lc, json, callback){
  1578. console.log('onDBLoaded');
  1579. this.data[lc] = JSON.parse(json);
  1580. this.loaded_dbs ++;
  1581. //
  1582. if (this.loaded_dbs == this.langs.length) {
  1583. this.parseByID(callback);
  1584. }
  1585. },
  1586. parseByID: function(callback){
  1587. for(l in this.data){
  1588. // console.log('l', l);
  1589. this.data_byid[l] = {};
  1590. for (p in this.data[l]) {
  1591. // console.log(this.data[l][p]);
  1592. for (e in this.data[l][p].enonces) {
  1593. // console.log('e',e);
  1594. this.data_byid[l][this.data[l][p].enonces[e].id] = this.data[l][p].enonces[e];
  1595. for (c in this.data[l][p].enonces[e].childs){
  1596. // console.log(_db[p][e][c]);
  1597. this.data_byid[l][this.data[l][p].enonces[e].childs[c].id] = this.data[l][p].enonces[e].childs[c];
  1598. }
  1599. }
  1600. }
  1601. }
  1602. // console.log('this.data_byid', this.data_byid);
  1603. this.parseStrct(callback);
  1604. },
  1605. parseStrct: function(callback){
  1606. var id, item, obj, links_match, link, tid;
  1607. for (id in this.data_byid[this.langs[0].lc]) {
  1608. item = this.data_byid[this.langs[0].lc][id];
  1609. // console.log(item);
  1610. obj = {
  1611. 'to':[],
  1612. 'from':[],
  1613. };
  1614. // get links
  1615. links_match = item.text.match(/\[[^\]]+\]\([^\)]+\)/g);
  1616. // console.log(links_match);
  1617. // if links exist on text
  1618. if(links_match){
  1619. for(link of links_match){
  1620. // console.log(link);
  1621. // get the target id
  1622. tid = link.match(/\((.+)\)/)[1];
  1623. // avoid duplicates
  1624. if (obj.to.indexOf(tid) == -1)
  1625. obj.to.push(tid);
  1626. // add id to "from" links in target
  1627. // if target exists
  1628. if(typeof this.data_strct[tid] !== 'undefined'){
  1629. // avoid duplicates
  1630. if (this.data_strct[tid].from.indexOf(tid) == -1)
  1631. this.data_strct[tid].from.push(id);
  1632. }else{
  1633. // if targets does not exists, the db has an issue, warn about that
  1634. console.log('!! warning : '+tid+' target id does not exists');
  1635. }
  1636. }
  1637. }
  1638. // add the item links to the main links listings
  1639. this.data_strct[id] = obj;
  1640. }
  1641. // console.log('data_strct',this.data_strct);
  1642. callback();
  1643. }
  1644. }
  1645. /***/ }),
  1646. /* 3 */
  1647. /***/ (function(module, exports, __webpack_require__) {
  1648. "use strict";
  1649. /**
  1650. * class Ruler
  1651. *
  1652. * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
  1653. * [[MarkdownIt#inline]] to manage sequences of functions (rules):
  1654. *
  1655. * - keep rules in defined order
  1656. * - assign the name to each rule
  1657. * - enable/disable rules
  1658. * - add/replace rules
  1659. * - allow assign rules to additional named chains (in the same)
  1660. * - cacheing lists of active rules
  1661. *
  1662. * You will not need use this class directly until write plugins. For simple
  1663. * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
  1664. * [[MarkdownIt.use]].
  1665. **/
  1666. /**
  1667. * new Ruler()
  1668. **/
  1669. function Ruler() {
  1670. // List of added rules. Each element is:
  1671. //
  1672. // {
  1673. // name: XXX,
  1674. // enabled: Boolean,
  1675. // fn: Function(),
  1676. // alt: [ name2, name3 ]
  1677. // }
  1678. //
  1679. this.__rules__ = [];
  1680. // Cached rule chains.
  1681. //
  1682. // First level - chain name, '' for default.
  1683. // Second level - diginal anchor for fast filtering by charcodes.
  1684. //
  1685. this.__cache__ = null;
  1686. }
  1687. ////////////////////////////////////////////////////////////////////////////////
  1688. // Helper methods, should not be used directly
  1689. // Find rule index by name
  1690. //
  1691. Ruler.prototype.__find__ = function (name) {
  1692. for (var i = 0; i < this.__rules__.length; i++) {
  1693. if (this.__rules__[i].name === name) {
  1694. return i;
  1695. }
  1696. }
  1697. return -1;
  1698. };
  1699. // Build rules lookup cache
  1700. //
  1701. Ruler.prototype.__compile__ = function () {
  1702. var self = this;
  1703. var chains = [ '' ];
  1704. // collect unique names
  1705. self.__rules__.forEach(function (rule) {
  1706. if (!rule.enabled) { return; }
  1707. rule.alt.forEach(function (altName) {
  1708. if (chains.indexOf(altName) < 0) {
  1709. chains.push(altName);
  1710. }
  1711. });
  1712. });
  1713. self.__cache__ = {};
  1714. chains.forEach(function (chain) {
  1715. self.__cache__[chain] = [];
  1716. self.__rules__.forEach(function (rule) {
  1717. if (!rule.enabled) { return; }
  1718. if (chain && rule.alt.indexOf(chain) < 0) { return; }
  1719. self.__cache__[chain].push(rule.fn);
  1720. });
  1721. });
  1722. };
  1723. /**
  1724. * Ruler.at(name, fn [, options])
  1725. * - name (String): rule name to replace.
  1726. * - fn (Function): new rule function.
  1727. * - options (Object): new rule options (not mandatory).
  1728. *
  1729. * Replace rule by name with new function & options. Throws error if name not
  1730. * found.
  1731. *
  1732. * ##### Options:
  1733. *
  1734. * - __alt__ - array with names of "alternate" chains.
  1735. *
  1736. * ##### Example
  1737. *
  1738. * Replace existing typorgapher replacement rule with new one:
  1739. *
  1740. * ```javascript
  1741. * var md = require('markdown-it')();
  1742. *
  1743. * md.core.ruler.at('replacements', function replace(state) {
  1744. * //...
  1745. * });
  1746. * ```
  1747. **/
  1748. Ruler.prototype.at = function (name, fn, options) {
  1749. var index = this.__find__(name);
  1750. var opt = options || {};
  1751. if (index === -1) { throw new Error('Parser rule not found: ' + name); }
  1752. this.__rules__[index].fn = fn;
  1753. this.__rules__[index].alt = opt.alt || [];
  1754. this.__cache__ = null;
  1755. };
  1756. /**
  1757. * Ruler.before(beforeName, ruleName, fn [, options])
  1758. * - beforeName (String): new rule will be added before this one.
  1759. * - ruleName (String): name of added rule.
  1760. * - fn (Function): rule function.
  1761. * - options (Object): rule options (not mandatory).
  1762. *
  1763. * Add new rule to chain before one with given name. See also
  1764. * [[Ruler.after]], [[Ruler.push]].
  1765. *
  1766. * ##### Options:
  1767. *
  1768. * - __alt__ - array with names of "alternate" chains.
  1769. *
  1770. * ##### Example
  1771. *
  1772. * ```javascript
  1773. * var md = require('markdown-it')();
  1774. *
  1775. * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
  1776. * //...
  1777. * });
  1778. * ```
  1779. **/
  1780. Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
  1781. var index = this.__find__(beforeName);
  1782. var opt = options || {};
  1783. if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }
  1784. this.__rules__.splice(index, 0, {
  1785. name: ruleName,
  1786. enabled: true,
  1787. fn: fn,
  1788. alt: opt.alt || []
  1789. });
  1790. this.__cache__ = null;
  1791. };
  1792. /**
  1793. * Ruler.after(afterName, ruleName, fn [, options])
  1794. * - afterName (String): new rule will be added after this one.
  1795. * - ruleName (String): name of added rule.
  1796. * - fn (Function): rule function.
  1797. * - options (Object): rule options (not mandatory).
  1798. *
  1799. * Add new rule to chain after one with given name. See also
  1800. * [[Ruler.before]], [[Ruler.push]].
  1801. *
  1802. * ##### Options:
  1803. *
  1804. * - __alt__ - array with names of "alternate" chains.
  1805. *
  1806. * ##### Example
  1807. *
  1808. * ```javascript
  1809. * var md = require('markdown-it')();
  1810. *
  1811. * md.inline.ruler.after('text', 'my_rule', function replace(state) {
  1812. * //...
  1813. * });
  1814. * ```
  1815. **/
  1816. Ruler.prototype.after = function (afterName, ruleName, fn, options) {
  1817. var index = this.__find__(afterName);
  1818. var opt = options || {};
  1819. if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }
  1820. this.__rules__.splice(index + 1, 0, {
  1821. name: ruleName,
  1822. enabled: true,
  1823. fn: fn,
  1824. alt: opt.alt || []
  1825. });
  1826. this.__cache__ = null;
  1827. };
  1828. /**
  1829. * Ruler.push(ruleName, fn [, options])
  1830. * - ruleName (String): name of added rule.
  1831. * - fn (Function): rule function.
  1832. * - options (Object): rule options (not mandatory).
  1833. *
  1834. * Push new rule to the end of chain. See also
  1835. * [[Ruler.before]], [[Ruler.after]].
  1836. *
  1837. * ##### Options:
  1838. *
  1839. * - __alt__ - array with names of "alternate" chains.
  1840. *
  1841. * ##### Example
  1842. *
  1843. * ```javascript
  1844. * var md = require('markdown-it')();
  1845. *
  1846. * md.core.ruler.push('my_rule', function replace(state) {
  1847. * //...
  1848. * });
  1849. * ```
  1850. **/
  1851. Ruler.prototype.push = function (ruleName, fn, options) {
  1852. var opt = options || {};
  1853. this.__rules__.push({
  1854. name: ruleName,
  1855. enabled: true,
  1856. fn: fn,
  1857. alt: opt.alt || []
  1858. });
  1859. this.__cache__ = null;
  1860. };
  1861. /**
  1862. * Ruler.enable(list [, ignoreInvalid]) -> Array
  1863. * - list (String|Array): list of rule names to enable.
  1864. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  1865. *
  1866. * Enable rules with given names. If any rule name not found - throw Error.
  1867. * Errors can be disabled by second param.
  1868. *
  1869. * Returns list of found rule names (if no exception happened).
  1870. *
  1871. * See also [[Ruler.disable]], [[Ruler.enableOnly]].
  1872. **/
  1873. Ruler.prototype.enable = function (list, ignoreInvalid) {
  1874. if (!Array.isArray(list)) { list = [ list ]; }
  1875. var result = [];
  1876. // Search by name and enable
  1877. list.forEach(function (name) {
  1878. var idx = this.__find__(name);
  1879. if (idx < 0) {
  1880. if (ignoreInvalid) { return; }
  1881. throw new Error('Rules manager: invalid rule name ' + name);
  1882. }
  1883. this.__rules__[idx].enabled = true;
  1884. result.push(name);
  1885. }, this);
  1886. this.__cache__ = null;
  1887. return result;
  1888. };
  1889. /**
  1890. * Ruler.enableOnly(list [, ignoreInvalid])
  1891. * - list (String|Array): list of rule names to enable (whitelist).
  1892. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  1893. *
  1894. * Enable rules with given names, and disable everything else. If any rule name
  1895. * not found - throw Error. Errors can be disabled by second param.
  1896. *
  1897. * See also [[Ruler.disable]], [[Ruler.enable]].
  1898. **/
  1899. Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
  1900. if (!Array.isArray(list)) { list = [ list ]; }
  1901. this.__rules__.forEach(function (rule) { rule.enabled = false; });
  1902. this.enable(list, ignoreInvalid);
  1903. };
  1904. /**
  1905. * Ruler.disable(list [, ignoreInvalid]) -> Array
  1906. * - list (String|Array): list of rule names to disable.
  1907. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  1908. *
  1909. * Disable rules with given names. If any rule name not found - throw Error.
  1910. * Errors can be disabled by second param.
  1911. *
  1912. * Returns list of found rule names (if no exception happened).
  1913. *
  1914. * See also [[Ruler.enable]], [[Ruler.enableOnly]].
  1915. **/
  1916. Ruler.prototype.disable = function (list, ignoreInvalid) {
  1917. if (!Array.isArray(list)) { list = [ list ]; }
  1918. var result = [];
  1919. // Search by name and disable
  1920. list.forEach(function (name) {
  1921. var idx = this.__find__(name);
  1922. if (idx < 0) {
  1923. if (ignoreInvalid) { return; }
  1924. throw new Error('Rules manager: invalid rule name ' + name);
  1925. }
  1926. this.__rules__[idx].enabled = false;
  1927. result.push(name);
  1928. }, this);
  1929. this.__cache__ = null;
  1930. return result;
  1931. };
  1932. /**
  1933. * Ruler.getRules(chainName) -> Array
  1934. *
  1935. * Return array of active functions (rules) for given chain name. It analyzes
  1936. * rules configuration, compiles caches if not exists and returns result.
  1937. *
  1938. * Default chain name is `''` (empty string). It can't be skipped. That's
  1939. * done intentionally, to keep signature monomorphic for high speed.
  1940. **/
  1941. Ruler.prototype.getRules = function (chainName) {
  1942. if (this.__cache__ === null) {
  1943. this.__compile__();
  1944. }
  1945. // Chain can be empty, if rules disabled. But we still have to return Array.
  1946. return this.__cache__[chainName] || [];
  1947. };
  1948. module.exports = Ruler;
  1949. /***/ }),
  1950. /* 4 */
  1951. /***/ (function(module, exports, __webpack_require__) {
  1952. "use strict";
  1953. // Token class
  1954. /**
  1955. * class Token
  1956. **/
  1957. /**
  1958. * new Token(type, tag, nesting)
  1959. *
  1960. * Create new token and fill passed properties.
  1961. **/
  1962. function Token(type, tag, nesting) {
  1963. /**
  1964. * Token#type -> String
  1965. *
  1966. * Type of the token (string, e.g. "paragraph_open")
  1967. **/
  1968. this.type = type;
  1969. /**
  1970. * Token#tag -> String
  1971. *
  1972. * html tag name, e.g. "p"
  1973. **/
  1974. this.tag = tag;
  1975. /**
  1976. * Token#attrs -> Array
  1977. *
  1978. * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
  1979. **/
  1980. this.attrs = null;
  1981. /**
  1982. * Token#map -> Array
  1983. *
  1984. * Source map info. Format: `[ line_begin, line_end ]`
  1985. **/
  1986. this.map = null;
  1987. /**
  1988. * Token#nesting -> Number
  1989. *
  1990. * Level change (number in {-1, 0, 1} set), where:
  1991. *
  1992. * - `1` means the tag is opening
  1993. * - `0` means the tag is self-closing
  1994. * - `-1` means the tag is closing
  1995. **/
  1996. this.nesting = nesting;
  1997. /**
  1998. * Token#level -> Number
  1999. *
  2000. * nesting level, the same as `state.level`
  2001. **/
  2002. this.level = 0;
  2003. /**
  2004. * Token#children -> Array
  2005. *
  2006. * An array of child nodes (inline and img tokens)
  2007. **/
  2008. this.children = null;
  2009. /**
  2010. * Token#content -> String
  2011. *
  2012. * In a case of self-closing tag (code, html, fence, etc.),
  2013. * it has contents of this tag.
  2014. **/
  2015. this.content = '';
  2016. /**
  2017. * Token#markup -> String
  2018. *
  2019. * '*' or '_' for emphasis, fence string for fence, etc.
  2020. **/
  2021. this.markup = '';
  2022. /**
  2023. * Token#info -> String
  2024. *
  2025. * fence infostring
  2026. **/
  2027. this.info = '';
  2028. /**
  2029. * Token#meta -> Object
  2030. *
  2031. * A place for plugins to store an arbitrary data
  2032. **/
  2033. this.meta = null;
  2034. /**
  2035. * Token#block -> Boolean
  2036. *
  2037. * True for block-level tokens, false for inline tokens.
  2038. * Used in renderer to calculate line breaks
  2039. **/
  2040. this.block = false;
  2041. /**
  2042. * Token#hidden -> Boolean
  2043. *
  2044. * If it's true, ignore this element when rendering. Used for tight lists
  2045. * to hide paragraphs.
  2046. **/
  2047. this.hidden = false;
  2048. }
  2049. /**
  2050. * Token.attrIndex(name) -> Number
  2051. *
  2052. * Search attribute index by name.
  2053. **/
  2054. Token.prototype.attrIndex = function attrIndex(name) {
  2055. var attrs, i, len;
  2056. if (!this.attrs) { return -1; }
  2057. attrs = this.attrs;
  2058. for (i = 0, len = attrs.length; i < len; i++) {
  2059. if (attrs[i][0] === name) { return i; }
  2060. }
  2061. return -1;
  2062. };
  2063. /**
  2064. * Token.attrPush(attrData)
  2065. *
  2066. * Add `[ name, value ]` attribute to list. Init attrs if necessary
  2067. **/
  2068. Token.prototype.attrPush = function attrPush(attrData) {
  2069. if (this.attrs) {
  2070. this.attrs.push(attrData);
  2071. } else {
  2072. this.attrs = [ attrData ];
  2073. }
  2074. };
  2075. /**
  2076. * Token.attrSet(name, value)
  2077. *
  2078. * Set `name` attribute to `value`. Override old value if exists.
  2079. **/
  2080. Token.prototype.attrSet = function attrSet(name, value) {
  2081. var idx = this.attrIndex(name),
  2082. attrData = [ name, value ];
  2083. if (idx < 0) {
  2084. this.attrPush(attrData);
  2085. } else {
  2086. this.attrs[idx] = attrData;
  2087. }
  2088. };
  2089. /**
  2090. * Token.attrGet(name)
  2091. *
  2092. * Get the value of attribute `name`, or null if it does not exist.
  2093. **/
  2094. Token.prototype.attrGet = function attrGet(name) {
  2095. var idx = this.attrIndex(name), value = null;
  2096. if (idx >= 0) {
  2097. value = this.attrs[idx][1];
  2098. }
  2099. return value;
  2100. };
  2101. /**
  2102. * Token.attrJoin(name, value)
  2103. *
  2104. * Join value to existing attribute via space. Or create new attribute if not
  2105. * exists. Useful to operate with token classes.
  2106. **/
  2107. Token.prototype.attrJoin = function attrJoin(name, value) {
  2108. var idx = this.attrIndex(name);
  2109. if (idx < 0) {
  2110. this.attrPush([ name, value ]);
  2111. } else {
  2112. this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;
  2113. }
  2114. };
  2115. module.exports = Token;
  2116. /***/ }),
  2117. /* 5 */
  2118. /***/ (function(module, exports) {
  2119. module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
  2120. /***/ }),
  2121. /* 6 */
  2122. /***/ (function(module, exports) {
  2123. var g;
  2124. // This works in non-strict mode
  2125. g = (function() {
  2126. return this;
  2127. })();
  2128. try {
  2129. // This works if eval is allowed (see CSP)
  2130. g = g || Function("return this")() || (1,eval)("this");
  2131. } catch(e) {
  2132. // This works if the window reference is available
  2133. if(typeof window === "object")
  2134. g = window;
  2135. }
  2136. // g can still be undefined, but nothing to do about it...
  2137. // We return undefined, instead of nothing here, so it's
  2138. // easier to handle this case. if(!global) { ...}
  2139. module.exports = g;
  2140. /***/ }),
  2141. /* 7 */
  2142. /***/ (function(module, exports, __webpack_require__) {
  2143. var m = __webpack_require__(1);
  2144. // ____ __
  2145. // / __/___ ____ / /____ _____
  2146. // / /_/ __ \/ __ \/ __/ _ \/ ___/
  2147. // / __/ /_/ / /_/ / /_/ __/ /
  2148. // /_/ \____/\____/\__/\___/_/
  2149. module.exports = {
  2150. view: function(vn){
  2151. return m('footer', [
  2152. m('p', m.trust('© 2017 <a href="./">Ethica Spinoza</a>'))
  2153. ]);
  2154. }
  2155. }
  2156. /***/ }),
  2157. /* 8 */
  2158. /***/ (function(module, exports, __webpack_require__) {
  2159. var m = __webpack_require__(1);
  2160. var _dbs = __webpack_require__(2);
  2161. // __ __ __
  2162. // / / / /__ ____ _____/ /__ _____
  2163. // / /_/ / _ \/ __ `/ __ / _ \/ ___/
  2164. // / __ / __/ /_/ / /_/ / __/ /
  2165. // /_/ /_/\___/\__,_/\__,_/\___/_/
  2166. module.exports = {
  2167. view: function(vn){
  2168. return m('header', [
  2169. m('h1', 'Ethica'),
  2170. m('nav', {'id':"menus"}, [
  2171. m(_RouteMenu),
  2172. m(_LangMenu)
  2173. ])
  2174. ]);
  2175. }
  2176. }
  2177. var _RouteMenu = {
  2178. view: function(){
  2179. // create ul dom
  2180. return m('ul', {id:"routes"}, [
  2181. m('li', m('a', {'href':'#!/tree'}, "tree")),
  2182. m('li', m('a', {'href':'#!/dots'}, "dots")),
  2183. ]
  2184. );
  2185. }
  2186. }
  2187. // __ __ ___
  2188. // / / ____ _____ ____ _/ |/ /__ ____ __ __
  2189. // / / / __ `/ __ \/ __ `/ /|_/ / _ \/ __ \/ / / /
  2190. // / /___/ /_/ / / / / /_/ / / / / __/ / / / /_/ /
  2191. // /_____/\__,_/_/ /_/\__, /_/ /_/\___/_/ /_/\__,_/
  2192. // /____/
  2193. var _LangMenu = {
  2194. view: function(){
  2195. // create ul dom
  2196. return m('ul', {id:"languages"}, _dbs.langs.map(function(lang){
  2197. // create li dom for each lank link
  2198. return m('li',
  2199. // create a dom
  2200. m('a', {
  2201. 'lang':lang.lc,
  2202. 'href':'/?lang='+lang.lc,
  2203. onclick:function(e){
  2204. e.preventDefault();
  2205. // console.log('click lang', e);
  2206. var lang = e.target.getAttribute('lang');
  2207. console.log(lang);
  2208. if(lang != _dbs.lang){
  2209. // change url variable
  2210. // change db
  2211. _dbs.lang = lang;
  2212. // redraw UI
  2213. // m.redraw();
  2214. }
  2215. return false;
  2216. }
  2217. }, lang.label)
  2218. );
  2219. })
  2220. );
  2221. }
  2222. }
  2223. /***/ }),
  2224. /* 9 */
  2225. /***/ (function(module, exports, __webpack_require__) {
  2226. "use strict";
  2227. // Process footnotes
  2228. //
  2229. ////////////////////////////////////////////////////////////////////////////////
  2230. // Renderer partials
  2231. function render_footnote_anchor_name(tokens, idx, options, env/*, slf*/) {
  2232. var n = Number(tokens[idx].meta.id + 1).toString();
  2233. var prefix = '';
  2234. if (typeof env.docId === 'string') {
  2235. prefix = '-' + env.docId + '-';
  2236. }
  2237. return prefix + n;
  2238. }
  2239. function render_footnote_caption(tokens, idx/*, options, env, slf*/) {
  2240. var n = Number(tokens[idx].meta.id + 1).toString();
  2241. if (tokens[idx].meta.subId > 0) {
  2242. n += ':' + tokens[idx].meta.subId;
  2243. }
  2244. return '[' + n + ']';
  2245. }
  2246. function render_footnote_ref(tokens, idx, options, env, slf) {
  2247. var id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf);
  2248. var caption = slf.rules.footnote_caption(tokens, idx, options, env, slf);
  2249. var refid = id;
  2250. if (tokens[idx].meta.subId > 0) {
  2251. refid += ':' + tokens[idx].meta.subId;
  2252. }
  2253. return '<sup class="footnote-ref"><a href="#fn' + id + '" id="fnref' + refid + '">' + caption + '</a></sup>';
  2254. }
  2255. function render_footnote_block_open(tokens, idx, options) {
  2256. return (options.xhtmlOut ? '<hr class="footnotes-sep" />\n' : '<hr class="footnotes-sep">\n') +
  2257. '<section class="footnotes">\n' +
  2258. '<ol class="footnotes-list">\n';
  2259. }
  2260. function render_footnote_block_close() {
  2261. return '</ol>\n</section>\n';
  2262. }
  2263. function render_footnote_open(tokens, idx, options, env, slf) {
  2264. var id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf);
  2265. if (tokens[idx].meta.subId > 0) {
  2266. id += ':' + tokens[idx].meta.subId;
  2267. }
  2268. return '<li id="fn' + id + '" class="footnote-item">';
  2269. }
  2270. function render_footnote_close() {
  2271. return '</li>\n';
  2272. }
  2273. function render_footnote_anchor(tokens, idx, options, env, slf) {
  2274. var id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf);
  2275. if (tokens[idx].meta.subId > 0) {
  2276. id += ':' + tokens[idx].meta.subId;
  2277. }
  2278. /* ↩ with escape code to prevent display as Apple Emoji on iOS */
  2279. return ' <a href="#fnref' + id + '" class="footnote-backref">\u21a9\uFE0E</a>';
  2280. }
  2281. module.exports = function footnote_plugin(md) {
  2282. var parseLinkLabel = md.helpers.parseLinkLabel,
  2283. isSpace = md.utils.isSpace;
  2284. md.renderer.rules.footnote_ref = render_footnote_ref;
  2285. md.renderer.rules.footnote_block_open = render_footnote_block_open;
  2286. md.renderer.rules.footnote_block_close = render_footnote_block_close;
  2287. md.renderer.rules.footnote_open = render_footnote_open;
  2288. md.renderer.rules.footnote_close = render_footnote_close;
  2289. md.renderer.rules.footnote_anchor = render_footnote_anchor;
  2290. // helpers (only used in other rules, no tokens are attached to those)
  2291. md.renderer.rules.footnote_caption = render_footnote_caption;
  2292. md.renderer.rules.footnote_anchor_name = render_footnote_anchor_name;
  2293. // Process footnote block definition
  2294. function footnote_def(state, startLine, endLine, silent) {
  2295. var oldBMark, oldTShift, oldSCount, oldParentType, pos, label, token,
  2296. initial, offset, ch, posAfterColon,
  2297. start = state.bMarks[startLine] + state.tShift[startLine],
  2298. max = state.eMarks[startLine];
  2299. // line should be at least 5 chars - "[^x]:"
  2300. if (start + 4 > max) { return false; }
  2301. if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }
  2302. if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }
  2303. for (pos = start + 2; pos < max; pos++) {
  2304. if (state.src.charCodeAt(pos) === 0x20) { return false; }
  2305. if (state.src.charCodeAt(pos) === 0x5D /* ] */) {
  2306. break;
  2307. }
  2308. }
  2309. if (pos === start + 2) { return false; } // no empty footnote labels
  2310. if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }
  2311. if (silent) { return true; }
  2312. pos++;
  2313. if (!state.env.footnotes) { state.env.footnotes = {}; }
  2314. if (!state.env.footnotes.refs) { state.env.footnotes.refs = {}; }
  2315. label = state.src.slice(start + 2, pos - 2);
  2316. state.env.footnotes.refs[':' + label] = -1;
  2317. token = new state.Token('footnote_reference_open', '', 1);
  2318. token.meta = { label: label };
  2319. token.level = state.level++;
  2320. state.tokens.push(token);
  2321. oldBMark = state.bMarks[startLine];
  2322. oldTShift = state.tShift[startLine];
  2323. oldSCount = state.sCount[startLine];
  2324. oldParentType = state.parentType;
  2325. posAfterColon = pos;
  2326. initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
  2327. while (pos < max) {
  2328. ch = state.src.charCodeAt(pos);
  2329. if (isSpace(ch)) {
  2330. if (ch === 0x09) {
  2331. offset += 4 - offset % 4;
  2332. } else {
  2333. offset++;
  2334. }
  2335. } else {
  2336. break;
  2337. }
  2338. pos++;
  2339. }
  2340. state.tShift[startLine] = pos - posAfterColon;
  2341. state.sCount[startLine] = offset - initial;
  2342. state.bMarks[startLine] = posAfterColon;
  2343. state.blkIndent += 4;
  2344. state.parentType = 'footnote';
  2345. if (state.sCount[startLine] < state.blkIndent) {
  2346. state.sCount[startLine] += state.blkIndent;
  2347. }
  2348. state.md.block.tokenize(state, startLine, endLine, true);
  2349. state.parentType = oldParentType;
  2350. state.blkIndent -= 4;
  2351. state.tShift[startLine] = oldTShift;
  2352. state.sCount[startLine] = oldSCount;
  2353. state.bMarks[startLine] = oldBMark;
  2354. token = new state.Token('footnote_reference_close', '', -1);
  2355. token.level = --state.level;
  2356. state.tokens.push(token);
  2357. return true;
  2358. }
  2359. // Process inline footnotes (^[...])
  2360. function footnote_inline(state, silent) {
  2361. var labelStart,
  2362. labelEnd,
  2363. footnoteId,
  2364. token,
  2365. tokens,
  2366. max = state.posMax,
  2367. start = state.pos;
  2368. if (start + 2 >= max) { return false; }
  2369. if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }
  2370. if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) { return false; }
  2371. labelStart = start + 2;
  2372. labelEnd = parseLinkLabel(state, start + 1);
  2373. // parser failed to find ']', so it's not a valid note
  2374. if (labelEnd < 0) { return false; }
  2375. // We found the end of the link, and know for a fact it's a valid link;
  2376. // so all that's left to do is to call tokenizer.
  2377. //
  2378. if (!silent) {
  2379. if (!state.env.footnotes) { state.env.footnotes = {}; }
  2380. if (!state.env.footnotes.list) { state.env.footnotes.list = []; }
  2381. footnoteId = state.env.footnotes.list.length;
  2382. state.md.inline.parse(
  2383. state.src.slice(labelStart, labelEnd),
  2384. state.md,
  2385. state.env,
  2386. tokens = []
  2387. );
  2388. token = state.push('footnote_ref', '', 0);
  2389. token.meta = { id: footnoteId };
  2390. state.env.footnotes.list[footnoteId] = { tokens: tokens };
  2391. }
  2392. state.pos = labelEnd + 1;
  2393. state.posMax = max;
  2394. return true;
  2395. }
  2396. // Process footnote references ([^...])
  2397. function footnote_ref(state, silent) {
  2398. var label,
  2399. pos,
  2400. footnoteId,
  2401. footnoteSubId,
  2402. token,
  2403. max = state.posMax,
  2404. start = state.pos;
  2405. // should be at least 4 chars - "[^x]"
  2406. if (start + 3 > max) { return false; }
  2407. if (!state.env.footnotes || !state.env.footnotes.refs) { return false; }
  2408. if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }
  2409. if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }
  2410. for (pos = start + 2; pos < max; pos++) {
  2411. if (state.src.charCodeAt(pos) === 0x20) { return false; }
  2412. if (state.src.charCodeAt(pos) === 0x0A) { return false; }
  2413. if (state.src.charCodeAt(pos) === 0x5D /* ] */) {
  2414. break;
  2415. }
  2416. }
  2417. if (pos === start + 2) { return false; } // no empty footnote labels
  2418. if (pos >= max) { return false; }
  2419. pos++;
  2420. label = state.src.slice(start + 2, pos - 1);
  2421. if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }
  2422. if (!silent) {
  2423. if (!state.env.footnotes.list) { state.env.footnotes.list = []; }
  2424. if (state.env.footnotes.refs[':' + label] < 0) {
  2425. footnoteId = state.env.footnotes.list.length;
  2426. state.env.footnotes.list[footnoteId] = { label: label, count: 0 };
  2427. state.env.footnotes.refs[':' + label] = footnoteId;
  2428. } else {
  2429. footnoteId = state.env.footnotes.refs[':' + label];
  2430. }
  2431. footnoteSubId = state.env.footnotes.list[footnoteId].count;
  2432. state.env.footnotes.list[footnoteId].count++;
  2433. token = state.push('footnote_ref', '', 0);
  2434. token.meta = { id: footnoteId, subId: footnoteSubId, label: label };
  2435. }
  2436. state.pos = pos;
  2437. state.posMax = max;
  2438. return true;
  2439. }
  2440. // Glue footnote tokens to end of token stream
  2441. function footnote_tail(state) {
  2442. var i, l, j, t, lastParagraph, list, token, tokens, current, currentLabel,
  2443. insideRef = false,
  2444. refTokens = {};
  2445. if (!state.env.footnotes) { return; }
  2446. state.tokens = state.tokens.filter(function (tok) {
  2447. if (tok.type === 'footnote_reference_open') {
  2448. insideRef = true;
  2449. current = [];
  2450. currentLabel = tok.meta.label;
  2451. return false;
  2452. }
  2453. if (tok.type === 'footnote_reference_close') {
  2454. insideRef = false;
  2455. // prepend ':' to avoid conflict with Object.prototype members
  2456. refTokens[':' + currentLabel] = current;
  2457. return false;
  2458. }
  2459. if (insideRef) { current.push(tok); }
  2460. return !insideRef;
  2461. });
  2462. if (!state.env.footnotes.list) { return; }
  2463. list = state.env.footnotes.list;
  2464. token = new state.Token('footnote_block_open', '', 1);
  2465. state.tokens.push(token);
  2466. for (i = 0, l = list.length; i < l; i++) {
  2467. token = new state.Token('footnote_open', '', 1);
  2468. token.meta = { id: i, label: list[i].label };
  2469. state.tokens.push(token);
  2470. if (list[i].tokens) {
  2471. tokens = [];
  2472. token = new state.Token('paragraph_open', 'p', 1);
  2473. token.block = true;
  2474. tokens.push(token);
  2475. token = new state.Token('inline', '', 0);
  2476. token.children = list[i].tokens;
  2477. token.content = '';
  2478. tokens.push(token);
  2479. token = new state.Token('paragraph_close', 'p', -1);
  2480. token.block = true;
  2481. tokens.push(token);
  2482. } else if (list[i].label) {
  2483. tokens = refTokens[':' + list[i].label];
  2484. }
  2485. state.tokens = state.tokens.concat(tokens);
  2486. if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {
  2487. lastParagraph = state.tokens.pop();
  2488. } else {
  2489. lastParagraph = null;
  2490. }
  2491. t = list[i].count > 0 ? list[i].count : 1;
  2492. for (j = 0; j < t; j++) {
  2493. token = new state.Token('footnote_anchor', '', 0);
  2494. token.meta = { id: i, subId: j, label: list[i].label };
  2495. state.tokens.push(token);
  2496. }
  2497. if (lastParagraph) {
  2498. state.tokens.push(lastParagraph);
  2499. }
  2500. token = new state.Token('footnote_close', '', -1);
  2501. state.tokens.push(token);
  2502. }
  2503. token = new state.Token('footnote_block_close', '', -1);
  2504. state.tokens.push(token);
  2505. }
  2506. md.block.ruler.before('reference', 'footnote_def', footnote_def, { alt: [ 'paragraph', 'reference' ] });
  2507. md.inline.ruler.after('image', 'footnote_inline', footnote_inline);
  2508. md.inline.ruler.after('footnote_inline', 'footnote_ref', footnote_ref);
  2509. md.core.ruler.after('inline', 'footnote_tail', footnote_tail);
  2510. };
  2511. /***/ }),
  2512. /* 10 */
  2513. /***/ (function(module, exports, __webpack_require__) {
  2514. "use strict";
  2515. module.exports = __webpack_require__(35);
  2516. /***/ }),
  2517. /* 11 */
  2518. /***/ (function(module, exports, __webpack_require__) {
  2519. "use strict";
  2520. // HTML5 entities map: { name -> utf16string }
  2521. //
  2522. /*eslint quotes:0*/
  2523. module.exports = __webpack_require__(23);
  2524. /***/ }),
  2525. /* 12 */
  2526. /***/ (function(module, exports, __webpack_require__) {
  2527. "use strict";
  2528. // Regexps to match html elements
  2529. var attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
  2530. var unquoted = '[^"\'=<>`\\x00-\\x20]+';
  2531. var single_quoted = "'[^']*'";
  2532. var double_quoted = '"[^"]*"';
  2533. var attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';
  2534. var attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)';
  2535. var open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
  2536. var close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
  2537. var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
  2538. var processing = '<[?].*?[?]>';
  2539. var declaration = '<![A-Z]+\\s+[^>]*>';
  2540. var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
  2541. var HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +
  2542. '|' + processing + '|' + declaration + '|' + cdata + ')');
  2543. var HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');
  2544. module.exports.HTML_TAG_RE = HTML_TAG_RE;
  2545. module.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;
  2546. /***/ }),
  2547. /* 13 */
  2548. /***/ (function(module, exports, __webpack_require__) {
  2549. "use strict";
  2550. // Process *this* and _that_
  2551. //
  2552. // Insert each marker as a separate text token, and add it to delimiter list
  2553. //
  2554. module.exports.tokenize = function emphasis(state, silent) {
  2555. var i, scanned, token,
  2556. start = state.pos,
  2557. marker = state.src.charCodeAt(start);
  2558. if (silent) { return false; }
  2559. if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }
  2560. scanned = state.scanDelims(state.pos, marker === 0x2A);
  2561. for (i = 0; i < scanned.length; i++) {
  2562. token = state.push('text', '', 0);
  2563. token.content = String.fromCharCode(marker);
  2564. state.delimiters.push({
  2565. // Char code of the starting marker (number).
  2566. //
  2567. marker: marker,
  2568. // Total length of these series of delimiters.
  2569. //
  2570. length: scanned.length,
  2571. // An amount of characters before this one that's equivalent to
  2572. // current one. In plain English: if this delimiter does not open
  2573. // an emphasis, neither do previous `jump` characters.
  2574. //
  2575. // Used to skip sequences like "*****" in one step, for 1st asterisk
  2576. // value will be 0, for 2nd it's 1 and so on.
  2577. //
  2578. jump: i,
  2579. // A position of the token this delimiter corresponds to.
  2580. //
  2581. token: state.tokens.length - 1,
  2582. // Token level.
  2583. //
  2584. level: state.level,
  2585. // If this delimiter is matched as a valid opener, `end` will be
  2586. // equal to its position, otherwise it's `-1`.
  2587. //
  2588. end: -1,
  2589. // Boolean flags that determine if this delimiter could open or close
  2590. // an emphasis.
  2591. //
  2592. open: scanned.can_open,
  2593. close: scanned.can_close
  2594. });
  2595. }
  2596. state.pos += scanned.length;
  2597. return true;
  2598. };
  2599. // Walk through delimiter list and replace text tokens with tags
  2600. //
  2601. module.exports.postProcess = function emphasis(state) {
  2602. var i,
  2603. startDelim,
  2604. endDelim,
  2605. token,
  2606. ch,
  2607. isStrong,
  2608. delimiters = state.delimiters,
  2609. max = state.delimiters.length;
  2610. for (i = 0; i < max; i++) {
  2611. startDelim = delimiters[i];
  2612. if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {
  2613. continue;
  2614. }
  2615. // Process only opening markers
  2616. if (startDelim.end === -1) {
  2617. continue;
  2618. }
  2619. endDelim = delimiters[startDelim.end];
  2620. // If the next delimiter has the same marker and is adjacent to this one,
  2621. // merge those into one strong delimiter.
  2622. //
  2623. // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
  2624. //
  2625. isStrong = i + 1 < max &&
  2626. delimiters[i + 1].end === startDelim.end - 1 &&
  2627. delimiters[i + 1].token === startDelim.token + 1 &&
  2628. delimiters[startDelim.end - 1].token === endDelim.token - 1 &&
  2629. delimiters[i + 1].marker === startDelim.marker;
  2630. ch = String.fromCharCode(startDelim.marker);
  2631. token = state.tokens[startDelim.token];
  2632. token.type = isStrong ? 'strong_open' : 'em_open';
  2633. token.tag = isStrong ? 'strong' : 'em';
  2634. token.nesting = 1;
  2635. token.markup = isStrong ? ch + ch : ch;
  2636. token.content = '';
  2637. token = state.tokens[endDelim.token];
  2638. token.type = isStrong ? 'strong_close' : 'em_close';
  2639. token.tag = isStrong ? 'strong' : 'em';
  2640. token.nesting = -1;
  2641. token.markup = isStrong ? ch + ch : ch;
  2642. token.content = '';
  2643. if (isStrong) {
  2644. state.tokens[delimiters[i + 1].token].content = '';
  2645. state.tokens[delimiters[startDelim.end - 1].token].content = '';
  2646. i++;
  2647. }
  2648. }
  2649. };
  2650. /***/ }),
  2651. /* 14 */
  2652. /***/ (function(module, exports, __webpack_require__) {
  2653. "use strict";
  2654. // ~~strike through~~
  2655. //
  2656. // Insert each marker as a separate text token, and add it to delimiter list
  2657. //
  2658. module.exports.tokenize = function strikethrough(state, silent) {
  2659. var i, scanned, token, len, ch,
  2660. start = state.pos,
  2661. marker = state.src.charCodeAt(start);
  2662. if (silent) { return false; }
  2663. if (marker !== 0x7E/* ~ */) { return false; }
  2664. scanned = state.scanDelims(state.pos, true);
  2665. len = scanned.length;
  2666. ch = String.fromCharCode(marker);
  2667. if (len < 2) { return false; }
  2668. if (len % 2) {
  2669. token = state.push('text', '', 0);
  2670. token.content = ch;
  2671. len--;
  2672. }
  2673. for (i = 0; i < len; i += 2) {
  2674. token = state.push('text', '', 0);
  2675. token.content = ch + ch;
  2676. state.delimiters.push({
  2677. marker: marker,
  2678. jump: i,
  2679. token: state.tokens.length - 1,
  2680. level: state.level,
  2681. end: -1,
  2682. open: scanned.can_open,
  2683. close: scanned.can_close
  2684. });
  2685. }
  2686. state.pos += scanned.length;
  2687. return true;
  2688. };
  2689. // Walk through delimiter list and replace text tokens with tags
  2690. //
  2691. module.exports.postProcess = function strikethrough(state) {
  2692. var i, j,
  2693. startDelim,
  2694. endDelim,
  2695. token,
  2696. loneMarkers = [],
  2697. delimiters = state.delimiters,
  2698. max = state.delimiters.length;
  2699. for (i = 0; i < max; i++) {
  2700. startDelim = delimiters[i];
  2701. if (startDelim.marker !== 0x7E/* ~ */) {
  2702. continue;
  2703. }
  2704. if (startDelim.end === -1) {
  2705. continue;
  2706. }
  2707. endDelim = delimiters[startDelim.end];
  2708. token = state.tokens[startDelim.token];
  2709. token.type = 's_open';
  2710. token.tag = 's';
  2711. token.nesting = 1;
  2712. token.markup = '~~';
  2713. token.content = '';
  2714. token = state.tokens[endDelim.token];
  2715. token.type = 's_close';
  2716. token.tag = 's';
  2717. token.nesting = -1;
  2718. token.markup = '~~';
  2719. token.content = '';
  2720. if (state.tokens[endDelim.token - 1].type === 'text' &&
  2721. state.tokens[endDelim.token - 1].content === '~') {
  2722. loneMarkers.push(endDelim.token - 1);
  2723. }
  2724. }
  2725. // If a marker sequence has an odd number of characters, it's splitted
  2726. // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
  2727. // start of the sequence.
  2728. //
  2729. // So, we have to move all those markers after subsequent s_close tags.
  2730. //
  2731. while (loneMarkers.length) {
  2732. i = loneMarkers.pop();
  2733. j = i + 1;
  2734. while (j < state.tokens.length && state.tokens[j].type === 's_close') {
  2735. j++;
  2736. }
  2737. j--;
  2738. if (i !== j) {
  2739. token = state.tokens[j];
  2740. state.tokens[j] = state.tokens[i];
  2741. state.tokens[i] = token;
  2742. }
  2743. }
  2744. };
  2745. /***/ }),
  2746. /* 15 */
  2747. /***/ (function(module, exports, __webpack_require__) {
  2748. "use strict";
  2749. module.exports.encode = __webpack_require__(75);
  2750. module.exports.decode = __webpack_require__(74);
  2751. module.exports.format = __webpack_require__(76);
  2752. module.exports.parse = __webpack_require__(77);
  2753. /***/ }),
  2754. /* 16 */
  2755. /***/ (function(module, exports) {
  2756. module.exports=/[\0-\x1F\x7F-\x9F]/
  2757. /***/ }),
  2758. /* 17 */
  2759. /***/ (function(module, exports) {
  2760. module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/
  2761. /***/ }),
  2762. /* 18 */
  2763. /***/ (function(module, exports) {
  2764. module.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/
  2765. /***/ }),
  2766. /* 19 */
  2767. /***/ (function(module, exports, __webpack_require__) {
  2768. /**
  2769. * @Author: Bachir Soussi Chiadmi <bach>
  2770. * @Date: 16-04-2017
  2771. * @Email: bachir@figureslibres.io
  2772. * @Last modified by: bach
  2773. * @Last modified time: 18-04-2017
  2774. * @License: GPL-V3
  2775. */
  2776. __webpack_require__(27);
  2777. __webpack_require__(24);
  2778. __webpack_require__(25);
  2779. __webpack_require__(26);
  2780. var m = __webpack_require__(1);
  2781. // var marked = require('marked');
  2782. // var _helpers = require('modules/helpers');
  2783. var _dbs = __webpack_require__(2);
  2784. var _Tree = __webpack_require__(22);
  2785. var _Dots = __webpack_require__(21);
  2786. function init(){
  2787. _dbs.load(function(){
  2788. console.log("Init _dbs.data", _dbs.data);
  2789. console.log("Init _dbs.data_byid", _dbs.data_byid);
  2790. console.log("Init _dbs.data_strct", _dbs.data_strct);
  2791. m.route(document.body, "/tree", {
  2792. "/tree": _Tree,
  2793. "/dots": _Dots,
  2794. });
  2795. });
  2796. };
  2797. // ___
  2798. // / | ____ ____
  2799. // / /| | / __ \/ __ \
  2800. // / ___ |/ /_/ / /_/ /
  2801. // /_/ |_/ .___/ .___/
  2802. // /_/ /_/
  2803. // var _App = {
  2804. // view: function(){
  2805. // console.log('_App view', _lang);
  2806. // return [
  2807. // m('header', [
  2808. // m('h1', 'Ethica'),
  2809. // m('aside', {'id':"menus"}, m(_LangMenu) )
  2810. // ]),
  2811. // m(_Tree),
  2812. // m('footer', [
  2813. // m('p', m.trust('© 2017 <a href="./">Ethica Spinoza</a>'))
  2814. // ])
  2815. // ]
  2816. // }
  2817. // }
  2818. // _ _ __
  2819. // (_)___ (_) /_
  2820. // / / __ \/ / __/
  2821. // / / / / / / /_
  2822. // /_/_/ /_/_/\__/
  2823. init()
  2824. /***/ }),
  2825. /* 20 */
  2826. /***/ (function(module, exports) {
  2827. // removed by extract-text-webpack-plugin
  2828. /***/ }),
  2829. /* 21 */
  2830. /***/ (function(module, exports, __webpack_require__) {
  2831. var m = __webpack_require__(1);
  2832. // https://github.com/markdown-it/markdown-it
  2833. var markdown = __webpack_require__(10)()
  2834. .use(__webpack_require__(9));
  2835. var _dbs = __webpack_require__(2);
  2836. var _Header = __webpack_require__(8);
  2837. var _Footer = __webpack_require__(7);
  2838. // var _lang = require('../main.js')._langs;
  2839. // ____ __
  2840. // / __ \____ / /_
  2841. // / / / / __ \/ __/
  2842. // / /_/ / /_/ / /_
  2843. // /_____/\____/\__/
  2844. var _Dot = {
  2845. id:null,
  2846. type:'',
  2847. text:'',
  2848. summary:'',
  2849. active:true,
  2850. opened:false,
  2851. links:null,
  2852. parents:[],
  2853. oninit: function(vn){
  2854. this.id = vn.attrs.id;
  2855. this.type = vn.attrs.type;
  2856. this.text = markdown.render(vn.attrs.text);
  2857. // construct summary
  2858. // TODO: summary needs more work (strip tags, markdown render)
  2859. this.summary = vn.attrs.text.match('([^ ]*[ ]{0,1}){1,6}')[0];
  2860. this.summary = this.summary.trim().replace(/_([^_]+)$/g, "_$1_");
  2861. this.summary = this.summary.replace(/\[([^\]]+)$/g, "$1");
  2862. this.summary = markdown.renderInline(this.summary) + "&nbsp;…";
  2863. if(typeof vn.attrs.active !== 'undefined')
  2864. this.active = vn.attrs.active;
  2865. // links
  2866. this.links = _dbs.data_strct[this.id];
  2867. // console.log(this.links);
  2868. // parents memorize where do we come from to avoid duplicates and looping nav
  2869. if(vn.attrs.parents){
  2870. this.parents = this.parents.concat(vn.attrs.parents);
  2871. // console.log('_Dot init '+this.id+' parents :',this.parents);
  2872. }
  2873. },
  2874. oncreate: function(vn){
  2875. if(this.active){
  2876. vn.dom.classList.remove('disabled');
  2877. }else{
  2878. vn.dom.classList.add('disabled');
  2879. }
  2880. },
  2881. onbeforeupdate: function(vn){
  2882. },
  2883. onupdate: function(vn){
  2884. // console.log('_Dot : onupdate', vn);
  2885. if(this.active){
  2886. if (this.opened){
  2887. vn.dom.classList.add('opened');
  2888. if(this.links.to.length)
  2889. vn.dom.classList.add('to-links');
  2890. }else{
  2891. vn.dom.classList.remove('opened');
  2892. if(this.links.from.length)
  2893. vn.dom.classList.add('from-links');
  2894. }
  2895. }
  2896. },
  2897. view: function(vn){
  2898. if (this.active && this.opened) {
  2899. // full view of dot with linked dots
  2900. console.log('_Dot view '+this.id+' parents :',this.parents);
  2901. var dot_content = [
  2902. // links to
  2903. this.links.to.length
  2904. ? m('aside', {'class':'links to'}, this.links.to.map(function(id){
  2905. // console.log(id);
  2906. return m(_Dot, {
  2907. "id":id,
  2908. 'text':_dbs.data_byid[_dbs.lang][id].text,
  2909. 'type':'',
  2910. // passe the memory of crossed dots plus the current one
  2911. 'parents':vn.state.parents.concat([vn.state.id]),
  2912. // activate link only if not in parents (already went through it)
  2913. 'active':vn.state.parents.indexOf(id) == -1 ? true:false
  2914. });
  2915. })
  2916. )
  2917. : null,
  2918. // id
  2919. m('span', {'class':'id'}, this.id), // this.type+' '+
  2920. // bullet
  2921. m('span', {'class':'bullet'}, m.trust('&#9899;')),
  2922. // full text
  2923. m('section', {'class':'text'}, m.trust(this.text)),
  2924. // links from
  2925. this.links.from.length
  2926. ? m('aside', {'class':'links from'}, this.links.from.map(function(id){
  2927. // retrun a dot
  2928. return m(_Dot, {
  2929. "id":id,
  2930. 'text':_dbs.data_byid[_dbs.lang][id].text,
  2931. 'type':'',
  2932. // passe the memory of crossed dots plus the current one
  2933. 'parents':vn.state.parents.concat([vn.state.id]),
  2934. // activate link only if not in parents (already went through it)
  2935. 'active':vn.state.parents.indexOf(id) == -1 ? true:false
  2936. });
  2937. })
  2938. )
  2939. : null
  2940. ];
  2941. }else{
  2942. // preview dot
  2943. var dot_content = [
  2944. m('span', {'class':'id'}, this.id), // this.type+' '+
  2945. m('span', {'class':'bullet'}, m.trust('&#8226;')),
  2946. m('p', {
  2947. 'class':'summary',
  2948. onclick:function(e){
  2949. vn.state.opened = true;
  2950. }
  2951. }, m.trust(this.summary))
  2952. ];
  2953. }
  2954. return m('div',{
  2955. 'id':this.id,
  2956. 'class':'dot'
  2957. },
  2958. dot_content
  2959. );
  2960. }
  2961. }
  2962. /*
  2963. down vote
  2964. Here's full list of black dotlikes from unicode
  2965. ● - &#9679; - Black Circle
  2966. ⏺ - &#9210; - Black Circle for Record
  2967. ⚫ - &#9899; - Medium Black Circle
  2968. ⬤ - &#11044; - Black Large Circle
  2969. ⧭ - &#10733; - Black Circle with Down Arrow
  2970. 🞄 - &#128900; - Black Slightly Small Circle
  2971. • - &#8226; - Bullet
  2972. ∙ - &#8729; - Bullet Operator
  2973. ⋅ - &#8901; - Dot Operator
  2974. 🌑 - &#127761; - New Moon Symbol
  2975. */
  2976. // _______ _ __ __
  2977. // / ___/ / (_) /__/ /
  2978. // / /__/ _ \/ / / _ /
  2979. // \___/_//_/_/_/\_,_/
  2980. var _Child = {
  2981. id:null,
  2982. part:null,
  2983. type:null,
  2984. // nested:false,
  2985. text:'',
  2986. oninit: function(vn){
  2987. // console.log('vn.attrs', vn.attrs);
  2988. this.id = vn.attrs.id;
  2989. this.type = vn.attrs.type;
  2990. // vn.state.part = vn.state.slug.match(/^(\d)(.+)/)[1];
  2991. this.text = vn.attrs.text;
  2992. // this.nested = vn.attrs.nested || false;
  2993. },
  2994. onbeforeupdate: function(vn, old){
  2995. // this.nested = vn.attrs.nested || false;
  2996. this.type = vn.attrs.type;
  2997. this.text = vn.attrs.text;
  2998. },
  2999. view: function(vn){
  3000. return m(_Dot, {"id":this.id, 'text':this.text, 'type':this.type});
  3001. }
  3002. };
  3003. // ______
  3004. // / ____/___ ____ ____ ________
  3005. // / __/ / __ \/ __ \/ __ \/ ___/ _ \
  3006. // / /___/ / / / /_/ / / / / /__/ __/
  3007. // /_____/_/ /_/\____/_/ /_/\___/\___/
  3008. var _Enonce = {
  3009. partid:null,
  3010. id:null,
  3011. title:null,
  3012. text:null,
  3013. // nested:false,
  3014. childs:[],
  3015. oninit:function(vn){
  3016. // // console.log('Enonce on init', vn);
  3017. this.partid = vn.attrs.partid;
  3018. this.id = vn.attrs.id;
  3019. this.title = vn.attrs.title;
  3020. this.text = vn.attrs.text;
  3021. this.childs = vn.attrs.childs;
  3022. // this.nested = vn.attrs.nested || false;
  3023. },
  3024. onbeforeupdate:function(vn, old) {
  3025. // console.log(vn.attrs.childs);
  3026. this.title = vn.attrs.title;
  3027. this.text = vn.attrs.text;
  3028. this.childs = vn.attrs.childs;
  3029. // this.nested = vn.attrs.nested || false;
  3030. // if(vn.attrs.id == '1d1') console.log('_Enonce UPDATE, text :', vn.attrs.text);
  3031. },
  3032. view: function(vn){
  3033. // if(vn.attrs.id == '1d1') console.log('_Enonce VIEW, text :', vn.attrs.text);
  3034. return [
  3035. // create dot
  3036. m(_Dot, {"id":this.id, 'text':this.text,'type':this.title}),
  3037. // addd children
  3038. this.childs.map(function(c){
  3039. return m(_Child, c);
  3040. })
  3041. ]
  3042. }
  3043. }
  3044. // ____ __
  3045. // / __ \____ ______/ /_
  3046. // / /_/ / __ `/ ___/ __/
  3047. // / ____/ /_/ / / / /_
  3048. // /_/ \__,_/_/ \__/
  3049. var _Part = {
  3050. oninit: function(vn){
  3051. this.id = vn.attrs.id;
  3052. this.title = vn.attrs.title;
  3053. this.enonces = vn.attrs.enonces;
  3054. },
  3055. onbeforeupdate: function(vn, old){
  3056. // console.log('_Part, onbeforeupdate old',old);
  3057. this.title = vn.attrs.title;
  3058. this.enonces = vn.attrs.enonces;
  3059. },
  3060. view: function(vn){
  3061. // console.log(vn.attrs.enonces);
  3062. return m("section", {
  3063. 'id' :this.id,
  3064. 'class' :'part'
  3065. },
  3066. [
  3067. // create title node
  3068. m("h1", {'class':'part'}, m.trust(markdown.renderInline(this.title))),
  3069. // create text node
  3070. this.enonces.map(function(e){
  3071. // console.log(e.text);
  3072. return m(_Enonce, Object.assign({"partid":this.id},e))
  3073. })
  3074. ]
  3075. )
  3076. }
  3077. }
  3078. // ____ __
  3079. // / __ \____ / /______
  3080. // / / / / __ \/ __/ ___/
  3081. // / /_/ / /_/ / /_(__ )
  3082. // /_____/\____/\__/____/
  3083. module.exports = {
  3084. view: function(){
  3085. console.log('_Dots view', _dbs.lang);
  3086. return [
  3087. m(_Header),
  3088. m('main', {id:"content", 'class':'dots'}, _dbs.data[_dbs.lang].map(function(p){
  3089. return m(_Part,p);
  3090. })
  3091. ),
  3092. m(_Footer)
  3093. ];
  3094. }
  3095. }
  3096. // function(){
  3097. // switch(_dbs.lang){
  3098. // case 'fr':
  3099. // return "Hello dots !";
  3100. // break;
  3101. // case 'bra':
  3102. // return '"Hola dots !"'
  3103. // break;
  3104. // }
  3105. // }
  3106. /***/ }),
  3107. /* 22 */
  3108. /***/ (function(module, exports, __webpack_require__) {
  3109. var m = __webpack_require__(1);
  3110. // https://github.com/markdown-it/markdown-it
  3111. var markdown = __webpack_require__(10)()
  3112. .use(__webpack_require__(9));
  3113. var _dbs = __webpack_require__(2);
  3114. var _Header = __webpack_require__(8);
  3115. var _Footer = __webpack_require__(7);
  3116. // __ _ __
  3117. // / / (_)___ / /__
  3118. // / / / / __ \/ //_/
  3119. // / /___/ / / / / ,<
  3120. // /_____/_/_/ /_/_/|_|
  3121. var _Link = {
  3122. tid:"",
  3123. opened:false,
  3124. oninit: function(vn){
  3125. // console.log("INIT LINK : vn", vn);
  3126. // define target id
  3127. this.tid = vn.attrs.href;
  3128. },
  3129. onbeforeupdate: function(vn){
  3130. this.tid = vn.attrs.href;
  3131. },
  3132. view: function(vn){
  3133. this.tid_known = typeof _dbs.data_byid[_dbs.lang][this.tid] === 'undefined' ? false : true;
  3134. if (!this.tid_known) {
  3135. console.log('!! target id '+this.tid+' unkonwn !!');
  3136. }
  3137. if(this.opened && this.tid_known){
  3138. // console.log('this.tid', vn.state);
  3139. return m('div', {'class':'opened-link'},
  3140. [
  3141. m('span', {'class':"link text"}, vn.children),
  3142. typeof _dbs.data_byid[_dbs.lang][this.tid].childs != "undefined"
  3143. ? m(_Enonce, _dbs.data_byid[_dbs.lang][this.tid])
  3144. : m(_Item, _dbs.data_byid[_dbs.lang][this.tid])
  3145. ]
  3146. );
  3147. }else{
  3148. // console.log(vn);
  3149. return m('a', {
  3150. 'class':'link',
  3151. 'href':'#'+this.tid,
  3152. 'rel':this.tid,
  3153. onclick:function(e){
  3154. e.preventDefault();
  3155. console.log('click', this);
  3156. vn.state.opened = true;
  3157. return false;
  3158. }
  3159. }, vn.children); // c'est quoi ce vn.children ?
  3160. }
  3161. }
  3162. }
  3163. // ______ __
  3164. // /_ __/__ _ __/ /_
  3165. // / / / _ \| |/_/ __/
  3166. // / / / __/> </ /_
  3167. // /_/ \___/_/|_|\__/
  3168. // recusive function to record information of all subnodes
  3169. function parseTextDom(nodes){
  3170. var list = [];
  3171. // loop through childNodes
  3172. for (var i = 0; i < nodes.length; i++) {
  3173. var n = {};
  3174. if(typeof nodes[i].localName != "undefined"){
  3175. n.tag=nodes[i].localName;
  3176. if (n.tag == 'p') {
  3177. // replace p by div as we will insert other div in them
  3178. n.tag = 'div';
  3179. n.attrs = {'class':'paragraph'};
  3180. }
  3181. if (n.tag == 'a') {
  3182. // record the href attribute for cross reference
  3183. n.attrs = {'href':nodes[i].attributes.href.value};
  3184. }
  3185. if(nodes[i].childNodes.length){
  3186. // again parse node's childs
  3187. n.childs = parseTextDom(nodes[i].childNodes);
  3188. }
  3189. }else if (nodes[i].textContent.length > 1){
  3190. // if node has no localName it is probably a #text node
  3191. // we record it if it's not empty
  3192. n.tag='#text';
  3193. n.text=nodes[i].textContent;
  3194. }
  3195. // add the node to the list if it has a tag
  3196. if(typeof n.tag != "undefined")
  3197. list.push(n);
  3198. }
  3199. return list;
  3200. }
  3201. // recusive fucntion to generate mithril object from information recorded with parseTextDom()
  3202. function populateTextDom(n,i){
  3203. // console.log('populateTextDom : '+i,n);
  3204. return n.tag == "#text"
  3205. ? m.trust(n.text)
  3206. : m(
  3207. n.tag != 'a' ? n.tag : _Link,
  3208. typeof n.attrs != "undefined" ? n.attrs : {},
  3209. typeof n.childs != "undefined"
  3210. ? n.childs.map(populateTextDom)
  3211. : typeof n.text != "undefined"
  3212. ? m.trust(n.text)
  3213. : null
  3214. );
  3215. }
  3216. var _Text = {
  3217. id:null,
  3218. text:"",
  3219. texthtml:"",
  3220. textdom:null,
  3221. textchilds:[],
  3222. parsetext: function(){
  3223. // console.log('parsetext', this);
  3224. // !! we need to convert markdown to html here because parseTextDom() is recursive through nodes tree
  3225. // convert markdown to html
  3226. this.texthtml = markdown.render(this.text)
  3227. // TODO: fixe number link text disapear [3](1d3) ( in 104d )
  3228. // TODO: fixe parenthèse disparait _(par les Défin. [test 3](1d3) et [test 5](1d5))_ ( in 104d )
  3229. // parse html string to virtual dom
  3230. this.textdom = new DOMParser().parseFromString(this.texthtml, "text/html");
  3231. // get the text nodes (avoid html document extra)
  3232. this.textchilds = parseTextDom(this.textdom.getElementsByTagName('body')[0].childNodes);
  3233. },
  3234. oninit: function(vn){
  3235. this.id = vn.attrs.id;
  3236. this.text = vn.attrs.text;
  3237. this.parsetext();
  3238. },
  3239. onbeforeupdate: function(vn,old){
  3240. this.text = vn.attrs.text;
  3241. this.parsetext();
  3242. },
  3243. view: function(vn){
  3244. // console.log('_Text :: view : '+vn.attrs.slug, vn);
  3245. return m('div',
  3246. {'class':'text'},
  3247. // loop through childNodes list generated by parseTextDom() in init
  3248. this.textchilds.map(populateTextDom)
  3249. ); // /m.div.text
  3250. } // view:
  3251. }
  3252. // ______
  3253. // / _/ /____ ____ ___
  3254. // / // __/ _ \/ __ `__ \
  3255. // _/ // /_/ __/ / / / / /
  3256. // /___/\__/\___/_/ /_/ /_/
  3257. var _Item = {
  3258. id:null,
  3259. part:null,
  3260. type:null,
  3261. nested:false,
  3262. oninit: function(vn){
  3263. // console.log('vn.attrs', vn.attrs);
  3264. this.id = vn.attrs.id;
  3265. this.type = vn.attrs.type;
  3266. // vn.state.part = vn.state.slug.match(/^(\d)(.+)/)[1];
  3267. this.text = vn.attrs.text;
  3268. this.nested = vn.attrs.nested || false;
  3269. },
  3270. onbeforeupdate: function(vn, old){
  3271. this.nested = vn.attrs.nested || false;
  3272. this.type = vn.attrs.type;
  3273. this.text = vn.attrs.text;
  3274. },
  3275. view: function(vn){
  3276. return m("section", {
  3277. 'id':this.id,
  3278. 'class':'item'+(this.nested ? ' nested':'')
  3279. },
  3280. [
  3281. // create title node
  3282. m("h3", {
  3283. // 'ref':vn.attrs.href,
  3284. onclick: function(e){
  3285. vn.state.active = vn.state.active ? 0 : 1;
  3286. }
  3287. }, this.type),
  3288. // create text node
  3289. m(_Text, {'text':this.text, 'id':this.id})
  3290. ]
  3291. )
  3292. }
  3293. };
  3294. // ______
  3295. // / ____/___ ____ ____ ________
  3296. // / __/ / __ \/ __ \/ __ \/ ___/ _ \
  3297. // / /___/ / / / /_/ / / / / /__/ __/
  3298. // /_____/_/ /_/\____/_/ /_/\___/\___/
  3299. var _Enonce = {
  3300. partid:null,
  3301. id:null,
  3302. title:null,
  3303. text:null,
  3304. nested:false,
  3305. childs:[],
  3306. oninit:function(vn){
  3307. // // console.log('Enonce on init', vn);
  3308. this.partid = vn.attrs.partid;
  3309. this.id = vn.attrs.id;
  3310. this.title = vn.attrs.title;
  3311. this.text = vn.attrs.text;
  3312. this.childs = vn.attrs.childs;
  3313. this.nested = vn.attrs.nested || false;
  3314. },
  3315. onbeforeupdate:function(vn, old) {
  3316. // console.log(vn.attrs.childs);
  3317. this.title = vn.attrs.title;
  3318. this.text = vn.attrs.text;
  3319. this.childs = vn.attrs.childs;
  3320. this.nested = vn.attrs.nested || false;
  3321. // if(vn.attrs.id == '1d1') console.log('_Enonce UPDATE, text :', vn.attrs.text);
  3322. },
  3323. view: function(vn){
  3324. // if(vn.attrs.id == '1d1') console.log('_Enonce VIEW, text :', vn.attrs.text);
  3325. return m("section", {
  3326. 'id' :this.id,
  3327. 'class' :'enonce'+(this.nested ? ' nested':'')
  3328. },
  3329. [
  3330. // create title node
  3331. m("h2", {}, this.title),
  3332. // create text node
  3333. m(_Text, {'text':this.text, 'id':this.id}),
  3334. // addd children
  3335. this.childs.map(function(c){
  3336. return m(_Item, c)
  3337. })
  3338. ])
  3339. }
  3340. }
  3341. // ____ __
  3342. // / __ \____ ______/ /_
  3343. // / /_/ / __ `/ ___/ __/
  3344. // / ____/ /_/ / / / /_
  3345. // /_/ \__,_/_/ \__/
  3346. var _Part = {
  3347. oninit: function(vn){
  3348. this.id = vn.attrs.id;
  3349. this.title = vn.attrs.title;
  3350. this.enonces = vn.attrs.enonces;
  3351. },
  3352. onbeforeupdate: function(vn, old){
  3353. // console.log('_Part, onbeforeupdate old',old);
  3354. this.title = vn.attrs.title;
  3355. this.enonces = vn.attrs.enonces;
  3356. },
  3357. view: function(vn){
  3358. // console.log(vn.attrs.enonces);
  3359. return m("section", {
  3360. 'id' :this.id,
  3361. 'class' :'part'
  3362. },
  3363. [
  3364. // create title node
  3365. m("h1", {'class':'part'}, m.trust(markdown.renderInline(this.title))),
  3366. // create text node
  3367. this.enonces.map(function(e){
  3368. // console.log(e.text);
  3369. return m(_Enonce, Object.assign({"partid":this.id},e))
  3370. })
  3371. ]
  3372. )
  3373. }
  3374. }
  3375. // ______
  3376. // /_ __/_______ ___
  3377. // / / / ___/ _ \/ _ \
  3378. // / / / / / __/ __/
  3379. // /_/ /_/ \___/\___/
  3380. module.exports = {
  3381. view: function(){
  3382. console.log('_Tree view', _dbs.lang);
  3383. return [
  3384. m(_Header),
  3385. m('main', {id:"content", 'class':'tree'}, _dbs.data[_dbs.lang].map(function(p){
  3386. // console.log("MAP _dbs", p);
  3387. return m(_Part,p);
  3388. })
  3389. ),
  3390. m(_Footer)
  3391. ]
  3392. }
  3393. }
  3394. /***/ }),
  3395. /* 23 */
  3396. /***/ (function(module, exports) {
  3397. module.exports = {
  3398. "Aacute": "Á",
  3399. "aacute": "á",
  3400. "Abreve": "Ă",
  3401. "abreve": "ă",
  3402. "ac": "∾",
  3403. "acd": "∿",
  3404. "acE": "∾̳",
  3405. "Acirc": "Â",
  3406. "acirc": "â",
  3407. "acute": "´",
  3408. "Acy": "А",
  3409. "acy": "а",
  3410. "AElig": "Æ",
  3411. "aelig": "æ",
  3412. "af": "⁡",
  3413. "Afr": "𝔄",
  3414. "afr": "𝔞",
  3415. "Agrave": "À",
  3416. "agrave": "à",
  3417. "alefsym": "ℵ",
  3418. "aleph": "ℵ",
  3419. "Alpha": "Α",
  3420. "alpha": "α",
  3421. "Amacr": "Ā",
  3422. "amacr": "ā",
  3423. "amalg": "⨿",
  3424. "amp": "&",
  3425. "AMP": "&",
  3426. "andand": "⩕",
  3427. "And": "⩓",
  3428. "and": "∧",
  3429. "andd": "⩜",
  3430. "andslope": "⩘",
  3431. "andv": "⩚",
  3432. "ang": "∠",
  3433. "ange": "⦤",
  3434. "angle": "∠",
  3435. "angmsdaa": "⦨",
  3436. "angmsdab": "⦩",
  3437. "angmsdac": "⦪",
  3438. "angmsdad": "⦫",
  3439. "angmsdae": "⦬",
  3440. "angmsdaf": "⦭",
  3441. "angmsdag": "⦮",
  3442. "angmsdah": "⦯",
  3443. "angmsd": "∡",
  3444. "angrt": "∟",
  3445. "angrtvb": "⊾",
  3446. "angrtvbd": "⦝",
  3447. "angsph": "∢",
  3448. "angst": "Å",
  3449. "angzarr": "⍼",
  3450. "Aogon": "Ą",
  3451. "aogon": "ą",
  3452. "Aopf": "𝔸",
  3453. "aopf": "𝕒",
  3454. "apacir": "⩯",
  3455. "ap": "≈",
  3456. "apE": "⩰",
  3457. "ape": "≊",
  3458. "apid": "≋",
  3459. "apos": "'",
  3460. "ApplyFunction": "⁡",
  3461. "approx": "≈",
  3462. "approxeq": "≊",
  3463. "Aring": "Å",
  3464. "aring": "å",
  3465. "Ascr": "𝒜",
  3466. "ascr": "𝒶",
  3467. "Assign": "≔",
  3468. "ast": "*",
  3469. "asymp": "≈",
  3470. "asympeq": "≍",
  3471. "Atilde": "Ã",
  3472. "atilde": "ã",
  3473. "Auml": "Ä",
  3474. "auml": "ä",
  3475. "awconint": "∳",
  3476. "awint": "⨑",
  3477. "backcong": "≌",
  3478. "backepsilon": "϶",
  3479. "backprime": "‵",
  3480. "backsim": "∽",
  3481. "backsimeq": "⋍",
  3482. "Backslash": "∖",
  3483. "Barv": "⫧",
  3484. "barvee": "⊽",
  3485. "barwed": "⌅",
  3486. "Barwed": "⌆",
  3487. "barwedge": "⌅",
  3488. "bbrk": "⎵",
  3489. "bbrktbrk": "⎶",
  3490. "bcong": "≌",
  3491. "Bcy": "Б",
  3492. "bcy": "б",
  3493. "bdquo": "„",
  3494. "becaus": "∵",
  3495. "because": "∵",
  3496. "Because": "∵",
  3497. "bemptyv": "⦰",
  3498. "bepsi": "϶",
  3499. "bernou": "ℬ",
  3500. "Bernoullis": "ℬ",
  3501. "Beta": "Β",
  3502. "beta": "β",
  3503. "beth": "ℶ",
  3504. "between": "≬",
  3505. "Bfr": "𝔅",
  3506. "bfr": "𝔟",
  3507. "bigcap": "⋂",
  3508. "bigcirc": "◯",
  3509. "bigcup": "⋃",
  3510. "bigodot": "⨀",
  3511. "bigoplus": "⨁",
  3512. "bigotimes": "⨂",
  3513. "bigsqcup": "⨆",
  3514. "bigstar": "★",
  3515. "bigtriangledown": "▽",
  3516. "bigtriangleup": "△",
  3517. "biguplus": "⨄",
  3518. "bigvee": "⋁",
  3519. "bigwedge": "⋀",
  3520. "bkarow": "⤍",
  3521. "blacklozenge": "⧫",
  3522. "blacksquare": "▪",
  3523. "blacktriangle": "▴",
  3524. "blacktriangledown": "▾",
  3525. "blacktriangleleft": "◂",
  3526. "blacktriangleright": "▸",
  3527. "blank": "␣",
  3528. "blk12": "▒",
  3529. "blk14": "░",
  3530. "blk34": "▓",
  3531. "block": "█",
  3532. "bne": "=⃥",
  3533. "bnequiv": "≡⃥",
  3534. "bNot": "⫭",
  3535. "bnot": "⌐",
  3536. "Bopf": "𝔹",
  3537. "bopf": "𝕓",
  3538. "bot": "⊥",
  3539. "bottom": "⊥",
  3540. "bowtie": "⋈",
  3541. "boxbox": "⧉",
  3542. "boxdl": "┐",
  3543. "boxdL": "╕",
  3544. "boxDl": "╖",
  3545. "boxDL": "╗",
  3546. "boxdr": "┌",
  3547. "boxdR": "╒",
  3548. "boxDr": "╓",
  3549. "boxDR": "╔",
  3550. "boxh": "─",
  3551. "boxH": "═",
  3552. "boxhd": "┬",
  3553. "boxHd": "╤",
  3554. "boxhD": "╥",
  3555. "boxHD": "╦",
  3556. "boxhu": "┴",
  3557. "boxHu": "╧",
  3558. "boxhU": "╨",
  3559. "boxHU": "╩",
  3560. "boxminus": "⊟",
  3561. "boxplus": "⊞",
  3562. "boxtimes": "⊠",
  3563. "boxul": "┘",
  3564. "boxuL": "╛",
  3565. "boxUl": "╜",
  3566. "boxUL": "╝",
  3567. "boxur": "└",
  3568. "boxuR": "╘",
  3569. "boxUr": "╙",
  3570. "boxUR": "╚",
  3571. "boxv": "│",
  3572. "boxV": "║",
  3573. "boxvh": "┼",
  3574. "boxvH": "╪",
  3575. "boxVh": "╫",
  3576. "boxVH": "╬",
  3577. "boxvl": "┤",
  3578. "boxvL": "╡",
  3579. "boxVl": "╢",
  3580. "boxVL": "╣",
  3581. "boxvr": "├",
  3582. "boxvR": "╞",
  3583. "boxVr": "╟",
  3584. "boxVR": "╠",
  3585. "bprime": "‵",
  3586. "breve": "˘",
  3587. "Breve": "˘",
  3588. "brvbar": "¦",
  3589. "bscr": "𝒷",
  3590. "Bscr": "ℬ",
  3591. "bsemi": "⁏",
  3592. "bsim": "∽",
  3593. "bsime": "⋍",
  3594. "bsolb": "⧅",
  3595. "bsol": "\\",
  3596. "bsolhsub": "⟈",
  3597. "bull": "•",
  3598. "bullet": "•",
  3599. "bump": "≎",
  3600. "bumpE": "⪮",
  3601. "bumpe": "≏",
  3602. "Bumpeq": "≎",
  3603. "bumpeq": "≏",
  3604. "Cacute": "Ć",
  3605. "cacute": "ć",
  3606. "capand": "⩄",
  3607. "capbrcup": "⩉",
  3608. "capcap": "⩋",
  3609. "cap": "∩",
  3610. "Cap": "⋒",
  3611. "capcup": "⩇",
  3612. "capdot": "⩀",
  3613. "CapitalDifferentialD": "ⅅ",
  3614. "caps": "∩︀",
  3615. "caret": "⁁",
  3616. "caron": "ˇ",
  3617. "Cayleys": "ℭ",
  3618. "ccaps": "⩍",
  3619. "Ccaron": "Č",
  3620. "ccaron": "č",
  3621. "Ccedil": "Ç",
  3622. "ccedil": "ç",
  3623. "Ccirc": "Ĉ",
  3624. "ccirc": "ĉ",
  3625. "Cconint": "∰",
  3626. "ccups": "⩌",
  3627. "ccupssm": "⩐",
  3628. "Cdot": "Ċ",
  3629. "cdot": "ċ",
  3630. "cedil": "¸",
  3631. "Cedilla": "¸",
  3632. "cemptyv": "⦲",
  3633. "cent": "¢",
  3634. "centerdot": "·",
  3635. "CenterDot": "·",
  3636. "cfr": "𝔠",
  3637. "Cfr": "ℭ",
  3638. "CHcy": "Ч",
  3639. "chcy": "ч",
  3640. "check": "✓",
  3641. "checkmark": "✓",
  3642. "Chi": "Χ",
  3643. "chi": "χ",
  3644. "circ": "ˆ",
  3645. "circeq": "≗",
  3646. "circlearrowleft": "↺",
  3647. "circlearrowright": "↻",
  3648. "circledast": "⊛",
  3649. "circledcirc": "⊚",
  3650. "circleddash": "⊝",
  3651. "CircleDot": "⊙",
  3652. "circledR": "®",
  3653. "circledS": "Ⓢ",
  3654. "CircleMinus": "⊖",
  3655. "CirclePlus": "⊕",
  3656. "CircleTimes": "⊗",
  3657. "cir": "○",
  3658. "cirE": "⧃",
  3659. "cire": "≗",
  3660. "cirfnint": "⨐",
  3661. "cirmid": "⫯",
  3662. "cirscir": "⧂",
  3663. "ClockwiseContourIntegral": "∲",
  3664. "CloseCurlyDoubleQuote": "”",
  3665. "CloseCurlyQuote": "’",
  3666. "clubs": "♣",
  3667. "clubsuit": "♣",
  3668. "colon": ":",
  3669. "Colon": "∷",
  3670. "Colone": "⩴",
  3671. "colone": "≔",
  3672. "coloneq": "≔",
  3673. "comma": ",",
  3674. "commat": "@",
  3675. "comp": "∁",
  3676. "compfn": "∘",
  3677. "complement": "∁",
  3678. "complexes": "ℂ",
  3679. "cong": "≅",
  3680. "congdot": "⩭",
  3681. "Congruent": "≡",
  3682. "conint": "∮",
  3683. "Conint": "∯",
  3684. "ContourIntegral": "∮",
  3685. "copf": "𝕔",
  3686. "Copf": "ℂ",
  3687. "coprod": "∐",
  3688. "Coproduct": "∐",
  3689. "copy": "©",
  3690. "COPY": "©",
  3691. "copysr": "℗",
  3692. "CounterClockwiseContourIntegral": "∳",
  3693. "crarr": "↵",
  3694. "cross": "✗",
  3695. "Cross": "⨯",
  3696. "Cscr": "𝒞",
  3697. "cscr": "𝒸",
  3698. "csub": "⫏",
  3699. "csube": "⫑",
  3700. "csup": "⫐",
  3701. "csupe": "⫒",
  3702. "ctdot": "⋯",
  3703. "cudarrl": "⤸",
  3704. "cudarrr": "⤵",
  3705. "cuepr": "⋞",
  3706. "cuesc": "⋟",
  3707. "cularr": "↶",
  3708. "cularrp": "⤽",
  3709. "cupbrcap": "⩈",
  3710. "cupcap": "⩆",
  3711. "CupCap": "≍",
  3712. "cup": "∪",
  3713. "Cup": "⋓",
  3714. "cupcup": "⩊",
  3715. "cupdot": "⊍",
  3716. "cupor": "⩅",
  3717. "cups": "∪︀",
  3718. "curarr": "↷",
  3719. "curarrm": "⤼",
  3720. "curlyeqprec": "⋞",
  3721. "curlyeqsucc": "⋟",
  3722. "curlyvee": "⋎",
  3723. "curlywedge": "⋏",
  3724. "curren": "¤",
  3725. "curvearrowleft": "↶",
  3726. "curvearrowright": "↷",
  3727. "cuvee": "⋎",
  3728. "cuwed": "⋏",
  3729. "cwconint": "∲",
  3730. "cwint": "∱",
  3731. "cylcty": "⌭",
  3732. "dagger": "†",
  3733. "Dagger": "‡",
  3734. "daleth": "ℸ",
  3735. "darr": "↓",
  3736. "Darr": "↡",
  3737. "dArr": "⇓",
  3738. "dash": "‐",
  3739. "Dashv": "⫤",
  3740. "dashv": "⊣",
  3741. "dbkarow": "⤏",
  3742. "dblac": "˝",
  3743. "Dcaron": "Ď",
  3744. "dcaron": "ď",
  3745. "Dcy": "Д",
  3746. "dcy": "д",
  3747. "ddagger": "‡",
  3748. "ddarr": "⇊",
  3749. "DD": "ⅅ",
  3750. "dd": "ⅆ",
  3751. "DDotrahd": "⤑",
  3752. "ddotseq": "⩷",
  3753. "deg": "°",
  3754. "Del": "∇",
  3755. "Delta": "Δ",
  3756. "delta": "δ",
  3757. "demptyv": "⦱",
  3758. "dfisht": "⥿",
  3759. "Dfr": "𝔇",
  3760. "dfr": "𝔡",
  3761. "dHar": "⥥",
  3762. "dharl": "⇃",
  3763. "dharr": "⇂",
  3764. "DiacriticalAcute": "´",
  3765. "DiacriticalDot": "˙",
  3766. "DiacriticalDoubleAcute": "˝",
  3767. "DiacriticalGrave": "`",
  3768. "DiacriticalTilde": "˜",
  3769. "diam": "⋄",
  3770. "diamond": "⋄",
  3771. "Diamond": "⋄",
  3772. "diamondsuit": "♦",
  3773. "diams": "♦",
  3774. "die": "¨",
  3775. "DifferentialD": "ⅆ",
  3776. "digamma": "ϝ",
  3777. "disin": "⋲",
  3778. "div": "÷",
  3779. "divide": "÷",
  3780. "divideontimes": "⋇",
  3781. "divonx": "⋇",
  3782. "DJcy": "Ђ",
  3783. "djcy": "ђ",
  3784. "dlcorn": "⌞",
  3785. "dlcrop": "⌍",
  3786. "dollar": "$",
  3787. "Dopf": "𝔻",
  3788. "dopf": "𝕕",
  3789. "Dot": "¨",
  3790. "dot": "˙",
  3791. "DotDot": "⃜",
  3792. "doteq": "≐",
  3793. "doteqdot": "≑",
  3794. "DotEqual": "≐",
  3795. "dotminus": "∸",
  3796. "dotplus": "∔",
  3797. "dotsquare": "⊡",
  3798. "doublebarwedge": "⌆",
  3799. "DoubleContourIntegral": "∯",
  3800. "DoubleDot": "¨",
  3801. "DoubleDownArrow": "⇓",
  3802. "DoubleLeftArrow": "⇐",
  3803. "DoubleLeftRightArrow": "⇔",
  3804. "DoubleLeftTee": "⫤",
  3805. "DoubleLongLeftArrow": "⟸",
  3806. "DoubleLongLeftRightArrow": "⟺",
  3807. "DoubleLongRightArrow": "⟹",
  3808. "DoubleRightArrow": "⇒",
  3809. "DoubleRightTee": "⊨",
  3810. "DoubleUpArrow": "⇑",
  3811. "DoubleUpDownArrow": "⇕",
  3812. "DoubleVerticalBar": "∥",
  3813. "DownArrowBar": "⤓",
  3814. "downarrow": "↓",
  3815. "DownArrow": "↓",
  3816. "Downarrow": "⇓",
  3817. "DownArrowUpArrow": "⇵",
  3818. "DownBreve": "̑",
  3819. "downdownarrows": "⇊",
  3820. "downharpoonleft": "⇃",
  3821. "downharpoonright": "⇂",
  3822. "DownLeftRightVector": "⥐",
  3823. "DownLeftTeeVector": "⥞",
  3824. "DownLeftVectorBar": "⥖",
  3825. "DownLeftVector": "↽",
  3826. "DownRightTeeVector": "⥟",
  3827. "DownRightVectorBar": "⥗",
  3828. "DownRightVector": "⇁",
  3829. "DownTeeArrow": "↧",
  3830. "DownTee": "⊤",
  3831. "drbkarow": "⤐",
  3832. "drcorn": "⌟",
  3833. "drcrop": "⌌",
  3834. "Dscr": "𝒟",
  3835. "dscr": "𝒹",
  3836. "DScy": "Ѕ",
  3837. "dscy": "ѕ",
  3838. "dsol": "⧶",
  3839. "Dstrok": "Đ",
  3840. "dstrok": "đ",
  3841. "dtdot": "⋱",
  3842. "dtri": "▿",
  3843. "dtrif": "▾",
  3844. "duarr": "⇵",
  3845. "duhar": "⥯",
  3846. "dwangle": "⦦",
  3847. "DZcy": "Џ",
  3848. "dzcy": "џ",
  3849. "dzigrarr": "⟿",
  3850. "Eacute": "É",
  3851. "eacute": "é",
  3852. "easter": "⩮",
  3853. "Ecaron": "Ě",
  3854. "ecaron": "ě",
  3855. "Ecirc": "Ê",
  3856. "ecirc": "ê",
  3857. "ecir": "≖",
  3858. "ecolon": "≕",
  3859. "Ecy": "Э",
  3860. "ecy": "э",
  3861. "eDDot": "⩷",
  3862. "Edot": "Ė",
  3863. "edot": "ė",
  3864. "eDot": "≑",
  3865. "ee": "ⅇ",
  3866. "efDot": "≒",
  3867. "Efr": "𝔈",
  3868. "efr": "𝔢",
  3869. "eg": "⪚",
  3870. "Egrave": "È",
  3871. "egrave": "è",
  3872. "egs": "⪖",
  3873. "egsdot": "⪘",
  3874. "el": "⪙",
  3875. "Element": "∈",
  3876. "elinters": "⏧",
  3877. "ell": "ℓ",
  3878. "els": "⪕",
  3879. "elsdot": "⪗",
  3880. "Emacr": "Ē",
  3881. "emacr": "ē",
  3882. "empty": "∅",
  3883. "emptyset": "∅",
  3884. "EmptySmallSquare": "◻",
  3885. "emptyv": "∅",
  3886. "EmptyVerySmallSquare": "▫",
  3887. "emsp13": " ",
  3888. "emsp14": " ",
  3889. "emsp": " ",
  3890. "ENG": "Ŋ",
  3891. "eng": "ŋ",
  3892. "ensp": " ",
  3893. "Eogon": "Ę",
  3894. "eogon": "ę",
  3895. "Eopf": "𝔼",
  3896. "eopf": "𝕖",
  3897. "epar": "⋕",
  3898. "eparsl": "⧣",
  3899. "eplus": "⩱",
  3900. "epsi": "ε",
  3901. "Epsilon": "Ε",
  3902. "epsilon": "ε",
  3903. "epsiv": "ϵ",
  3904. "eqcirc": "≖",
  3905. "eqcolon": "≕",
  3906. "eqsim": "≂",
  3907. "eqslantgtr": "⪖",
  3908. "eqslantless": "⪕",
  3909. "Equal": "⩵",
  3910. "equals": "=",
  3911. "EqualTilde": "≂",
  3912. "equest": "≟",
  3913. "Equilibrium": "⇌",
  3914. "equiv": "≡",
  3915. "equivDD": "⩸",
  3916. "eqvparsl": "⧥",
  3917. "erarr": "⥱",
  3918. "erDot": "≓",
  3919. "escr": "ℯ",
  3920. "Escr": "ℰ",
  3921. "esdot": "≐",
  3922. "Esim": "⩳",
  3923. "esim": "≂",
  3924. "Eta": "Η",
  3925. "eta": "η",
  3926. "ETH": "Ð",
  3927. "eth": "ð",
  3928. "Euml": "Ë",
  3929. "euml": "ë",
  3930. "euro": "€",
  3931. "excl": "!",
  3932. "exist": "∃",
  3933. "Exists": "∃",
  3934. "expectation": "ℰ",
  3935. "exponentiale": "ⅇ",
  3936. "ExponentialE": "ⅇ",
  3937. "fallingdotseq": "≒",
  3938. "Fcy": "Ф",
  3939. "fcy": "ф",
  3940. "female": "♀",
  3941. "ffilig": "ffi",
  3942. "fflig": "ff",
  3943. "ffllig": "ffl",
  3944. "Ffr": "𝔉",
  3945. "ffr": "𝔣",
  3946. "filig": "fi",
  3947. "FilledSmallSquare": "◼",
  3948. "FilledVerySmallSquare": "▪",
  3949. "fjlig": "fj",
  3950. "flat": "♭",
  3951. "fllig": "fl",
  3952. "fltns": "▱",
  3953. "fnof": "ƒ",
  3954. "Fopf": "𝔽",
  3955. "fopf": "𝕗",
  3956. "forall": "∀",
  3957. "ForAll": "∀",
  3958. "fork": "⋔",
  3959. "forkv": "⫙",
  3960. "Fouriertrf": "ℱ",
  3961. "fpartint": "⨍",
  3962. "frac12": "½",
  3963. "frac13": "⅓",
  3964. "frac14": "¼",
  3965. "frac15": "⅕",
  3966. "frac16": "⅙",
  3967. "frac18": "⅛",
  3968. "frac23": "⅔",
  3969. "frac25": "⅖",
  3970. "frac34": "¾",
  3971. "frac35": "⅗",
  3972. "frac38": "⅜",
  3973. "frac45": "⅘",
  3974. "frac56": "⅚",
  3975. "frac58": "⅝",
  3976. "frac78": "⅞",
  3977. "frasl": "⁄",
  3978. "frown": "⌢",
  3979. "fscr": "𝒻",
  3980. "Fscr": "ℱ",
  3981. "gacute": "ǵ",
  3982. "Gamma": "Γ",
  3983. "gamma": "γ",
  3984. "Gammad": "Ϝ",
  3985. "gammad": "ϝ",
  3986. "gap": "⪆",
  3987. "Gbreve": "Ğ",
  3988. "gbreve": "ğ",
  3989. "Gcedil": "Ģ",
  3990. "Gcirc": "Ĝ",
  3991. "gcirc": "ĝ",
  3992. "Gcy": "Г",
  3993. "gcy": "г",
  3994. "Gdot": "Ġ",
  3995. "gdot": "ġ",
  3996. "ge": "≥",
  3997. "gE": "≧",
  3998. "gEl": "⪌",
  3999. "gel": "⋛",
  4000. "geq": "≥",
  4001. "geqq": "≧",
  4002. "geqslant": "⩾",
  4003. "gescc": "⪩",
  4004. "ges": "⩾",
  4005. "gesdot": "⪀",
  4006. "gesdoto": "⪂",
  4007. "gesdotol": "⪄",
  4008. "gesl": "⋛︀",
  4009. "gesles": "⪔",
  4010. "Gfr": "𝔊",
  4011. "gfr": "𝔤",
  4012. "gg": "≫",
  4013. "Gg": "⋙",
  4014. "ggg": "⋙",
  4015. "gimel": "ℷ",
  4016. "GJcy": "Ѓ",
  4017. "gjcy": "ѓ",
  4018. "gla": "⪥",
  4019. "gl": "≷",
  4020. "glE": "⪒",
  4021. "glj": "⪤",
  4022. "gnap": "⪊",
  4023. "gnapprox": "⪊",
  4024. "gne": "⪈",
  4025. "gnE": "≩",
  4026. "gneq": "⪈",
  4027. "gneqq": "≩",
  4028. "gnsim": "⋧",
  4029. "Gopf": "𝔾",
  4030. "gopf": "𝕘",
  4031. "grave": "`",
  4032. "GreaterEqual": "≥",
  4033. "GreaterEqualLess": "⋛",
  4034. "GreaterFullEqual": "≧",
  4035. "GreaterGreater": "⪢",
  4036. "GreaterLess": "≷",
  4037. "GreaterSlantEqual": "⩾",
  4038. "GreaterTilde": "≳",
  4039. "Gscr": "𝒢",
  4040. "gscr": "ℊ",
  4041. "gsim": "≳",
  4042. "gsime": "⪎",
  4043. "gsiml": "⪐",
  4044. "gtcc": "⪧",
  4045. "gtcir": "⩺",
  4046. "gt": ">",
  4047. "GT": ">",
  4048. "Gt": "≫",
  4049. "gtdot": "⋗",
  4050. "gtlPar": "⦕",
  4051. "gtquest": "⩼",
  4052. "gtrapprox": "⪆",
  4053. "gtrarr": "⥸",
  4054. "gtrdot": "⋗",
  4055. "gtreqless": "⋛",
  4056. "gtreqqless": "⪌",
  4057. "gtrless": "≷",
  4058. "gtrsim": "≳",
  4059. "gvertneqq": "≩︀",
  4060. "gvnE": "≩︀",
  4061. "Hacek": "ˇ",
  4062. "hairsp": " ",
  4063. "half": "½",
  4064. "hamilt": "ℋ",
  4065. "HARDcy": "Ъ",
  4066. "hardcy": "ъ",
  4067. "harrcir": "⥈",
  4068. "harr": "↔",
  4069. "hArr": "⇔",
  4070. "harrw": "↭",
  4071. "Hat": "^",
  4072. "hbar": "ℏ",
  4073. "Hcirc": "Ĥ",
  4074. "hcirc": "ĥ",
  4075. "hearts": "♥",
  4076. "heartsuit": "♥",
  4077. "hellip": "…",
  4078. "hercon": "⊹",
  4079. "hfr": "𝔥",
  4080. "Hfr": "ℌ",
  4081. "HilbertSpace": "ℋ",
  4082. "hksearow": "⤥",
  4083. "hkswarow": "⤦",
  4084. "hoarr": "⇿",
  4085. "homtht": "∻",
  4086. "hookleftarrow": "↩",
  4087. "hookrightarrow": "↪",
  4088. "hopf": "𝕙",
  4089. "Hopf": "ℍ",
  4090. "horbar": "―",
  4091. "HorizontalLine": "─",
  4092. "hscr": "𝒽",
  4093. "Hscr": "ℋ",
  4094. "hslash": "ℏ",
  4095. "Hstrok": "Ħ",
  4096. "hstrok": "ħ",
  4097. "HumpDownHump": "≎",
  4098. "HumpEqual": "≏",
  4099. "hybull": "⁃",
  4100. "hyphen": "‐",
  4101. "Iacute": "Í",
  4102. "iacute": "í",
  4103. "ic": "⁣",
  4104. "Icirc": "Î",
  4105. "icirc": "î",
  4106. "Icy": "И",
  4107. "icy": "и",
  4108. "Idot": "İ",
  4109. "IEcy": "Е",
  4110. "iecy": "е",
  4111. "iexcl": "¡",
  4112. "iff": "⇔",
  4113. "ifr": "𝔦",
  4114. "Ifr": "ℑ",
  4115. "Igrave": "Ì",
  4116. "igrave": "ì",
  4117. "ii": "ⅈ",
  4118. "iiiint": "⨌",
  4119. "iiint": "∭",
  4120. "iinfin": "⧜",
  4121. "iiota": "℩",
  4122. "IJlig": "IJ",
  4123. "ijlig": "ij",
  4124. "Imacr": "Ī",
  4125. "imacr": "ī",
  4126. "image": "ℑ",
  4127. "ImaginaryI": "ⅈ",
  4128. "imagline": "ℐ",
  4129. "imagpart": "ℑ",
  4130. "imath": "ı",
  4131. "Im": "ℑ",
  4132. "imof": "⊷",
  4133. "imped": "Ƶ",
  4134. "Implies": "⇒",
  4135. "incare": "℅",
  4136. "in": "∈",
  4137. "infin": "∞",
  4138. "infintie": "⧝",
  4139. "inodot": "ı",
  4140. "intcal": "⊺",
  4141. "int": "∫",
  4142. "Int": "∬",
  4143. "integers": "ℤ",
  4144. "Integral": "∫",
  4145. "intercal": "⊺",
  4146. "Intersection": "⋂",
  4147. "intlarhk": "⨗",
  4148. "intprod": "⨼",
  4149. "InvisibleComma": "⁣",
  4150. "InvisibleTimes": "⁢",
  4151. "IOcy": "Ё",
  4152. "iocy": "ё",
  4153. "Iogon": "Į",
  4154. "iogon": "į",
  4155. "Iopf": "𝕀",
  4156. "iopf": "𝕚",
  4157. "Iota": "Ι",
  4158. "iota": "ι",
  4159. "iprod": "⨼",
  4160. "iquest": "¿",
  4161. "iscr": "𝒾",
  4162. "Iscr": "ℐ",
  4163. "isin": "∈",
  4164. "isindot": "⋵",
  4165. "isinE": "⋹",
  4166. "isins": "⋴",
  4167. "isinsv": "⋳",
  4168. "isinv": "∈",
  4169. "it": "⁢",
  4170. "Itilde": "Ĩ",
  4171. "itilde": "ĩ",
  4172. "Iukcy": "І",
  4173. "iukcy": "і",
  4174. "Iuml": "Ï",
  4175. "iuml": "ï",
  4176. "Jcirc": "Ĵ",
  4177. "jcirc": "ĵ",
  4178. "Jcy": "Й",
  4179. "jcy": "й",
  4180. "Jfr": "𝔍",
  4181. "jfr": "𝔧",
  4182. "jmath": "ȷ",
  4183. "Jopf": "𝕁",
  4184. "jopf": "𝕛",
  4185. "Jscr": "𝒥",
  4186. "jscr": "𝒿",
  4187. "Jsercy": "Ј",
  4188. "jsercy": "ј",
  4189. "Jukcy": "Є",
  4190. "jukcy": "є",
  4191. "Kappa": "Κ",
  4192. "kappa": "κ",
  4193. "kappav": "ϰ",
  4194. "Kcedil": "Ķ",
  4195. "kcedil": "ķ",
  4196. "Kcy": "К",
  4197. "kcy": "к",
  4198. "Kfr": "𝔎",
  4199. "kfr": "𝔨",
  4200. "kgreen": "ĸ",
  4201. "KHcy": "Х",
  4202. "khcy": "х",
  4203. "KJcy": "Ќ",
  4204. "kjcy": "ќ",
  4205. "Kopf": "𝕂",
  4206. "kopf": "𝕜",
  4207. "Kscr": "𝒦",
  4208. "kscr": "𝓀",
  4209. "lAarr": "⇚",
  4210. "Lacute": "Ĺ",
  4211. "lacute": "ĺ",
  4212. "laemptyv": "⦴",
  4213. "lagran": "ℒ",
  4214. "Lambda": "Λ",
  4215. "lambda": "λ",
  4216. "lang": "⟨",
  4217. "Lang": "⟪",
  4218. "langd": "⦑",
  4219. "langle": "⟨",
  4220. "lap": "⪅",
  4221. "Laplacetrf": "ℒ",
  4222. "laquo": "«",
  4223. "larrb": "⇤",
  4224. "larrbfs": "⤟",
  4225. "larr": "←",
  4226. "Larr": "↞",
  4227. "lArr": "⇐",
  4228. "larrfs": "⤝",
  4229. "larrhk": "↩",
  4230. "larrlp": "↫",
  4231. "larrpl": "⤹",
  4232. "larrsim": "⥳",
  4233. "larrtl": "↢",
  4234. "latail": "⤙",
  4235. "lAtail": "⤛",
  4236. "lat": "⪫",
  4237. "late": "⪭",
  4238. "lates": "⪭︀",
  4239. "lbarr": "⤌",
  4240. "lBarr": "⤎",
  4241. "lbbrk": "❲",
  4242. "lbrace": "{",
  4243. "lbrack": "[",
  4244. "lbrke": "⦋",
  4245. "lbrksld": "⦏",
  4246. "lbrkslu": "⦍",
  4247. "Lcaron": "Ľ",
  4248. "lcaron": "ľ",
  4249. "Lcedil": "Ļ",
  4250. "lcedil": "ļ",
  4251. "lceil": "⌈",
  4252. "lcub": "{",
  4253. "Lcy": "Л",
  4254. "lcy": "л",
  4255. "ldca": "⤶",
  4256. "ldquo": "“",
  4257. "ldquor": "„",
  4258. "ldrdhar": "⥧",
  4259. "ldrushar": "⥋",
  4260. "ldsh": "↲",
  4261. "le": "≤",
  4262. "lE": "≦",
  4263. "LeftAngleBracket": "⟨",
  4264. "LeftArrowBar": "⇤",
  4265. "leftarrow": "←",
  4266. "LeftArrow": "←",
  4267. "Leftarrow": "⇐",
  4268. "LeftArrowRightArrow": "⇆",
  4269. "leftarrowtail": "↢",
  4270. "LeftCeiling": "⌈",
  4271. "LeftDoubleBracket": "⟦",
  4272. "LeftDownTeeVector": "⥡",
  4273. "LeftDownVectorBar": "⥙",
  4274. "LeftDownVector": "⇃",
  4275. "LeftFloor": "⌊",
  4276. "leftharpoondown": "↽",
  4277. "leftharpoonup": "↼",
  4278. "leftleftarrows": "⇇",
  4279. "leftrightarrow": "↔",
  4280. "LeftRightArrow": "↔",
  4281. "Leftrightarrow": "⇔",
  4282. "leftrightarrows": "⇆",
  4283. "leftrightharpoons": "⇋",
  4284. "leftrightsquigarrow": "↭",
  4285. "LeftRightVector": "⥎",
  4286. "LeftTeeArrow": "↤",
  4287. "LeftTee": "⊣",
  4288. "LeftTeeVector": "⥚",
  4289. "leftthreetimes": "⋋",
  4290. "LeftTriangleBar": "⧏",
  4291. "LeftTriangle": "⊲",
  4292. "LeftTriangleEqual": "⊴",
  4293. "LeftUpDownVector": "⥑",
  4294. "LeftUpTeeVector": "⥠",
  4295. "LeftUpVectorBar": "⥘",
  4296. "LeftUpVector": "↿",
  4297. "LeftVectorBar": "⥒",
  4298. "LeftVector": "↼",
  4299. "lEg": "⪋",
  4300. "leg": "⋚",
  4301. "leq": "≤",
  4302. "leqq": "≦",
  4303. "leqslant": "⩽",
  4304. "lescc": "⪨",
  4305. "les": "⩽",
  4306. "lesdot": "⩿",
  4307. "lesdoto": "⪁",
  4308. "lesdotor": "⪃",
  4309. "lesg": "⋚︀",
  4310. "lesges": "⪓",
  4311. "lessapprox": "⪅",
  4312. "lessdot": "⋖",
  4313. "lesseqgtr": "⋚",
  4314. "lesseqqgtr": "⪋",
  4315. "LessEqualGreater": "⋚",
  4316. "LessFullEqual": "≦",
  4317. "LessGreater": "≶",
  4318. "lessgtr": "≶",
  4319. "LessLess": "⪡",
  4320. "lesssim": "≲",
  4321. "LessSlantEqual": "⩽",
  4322. "LessTilde": "≲",
  4323. "lfisht": "⥼",
  4324. "lfloor": "⌊",
  4325. "Lfr": "𝔏",
  4326. "lfr": "𝔩",
  4327. "lg": "≶",
  4328. "lgE": "⪑",
  4329. "lHar": "⥢",
  4330. "lhard": "↽",
  4331. "lharu": "↼",
  4332. "lharul": "⥪",
  4333. "lhblk": "▄",
  4334. "LJcy": "Љ",
  4335. "ljcy": "љ",
  4336. "llarr": "⇇",
  4337. "ll": "≪",
  4338. "Ll": "⋘",
  4339. "llcorner": "⌞",
  4340. "Lleftarrow": "⇚",
  4341. "llhard": "⥫",
  4342. "lltri": "◺",
  4343. "Lmidot": "Ŀ",
  4344. "lmidot": "ŀ",
  4345. "lmoustache": "⎰",
  4346. "lmoust": "⎰",
  4347. "lnap": "⪉",
  4348. "lnapprox": "⪉",
  4349. "lne": "⪇",
  4350. "lnE": "≨",
  4351. "lneq": "⪇",
  4352. "lneqq": "≨",
  4353. "lnsim": "⋦",
  4354. "loang": "⟬",
  4355. "loarr": "⇽",
  4356. "lobrk": "⟦",
  4357. "longleftarrow": "⟵",
  4358. "LongLeftArrow": "⟵",
  4359. "Longleftarrow": "⟸",
  4360. "longleftrightarrow": "⟷",
  4361. "LongLeftRightArrow": "⟷",
  4362. "Longleftrightarrow": "⟺",
  4363. "longmapsto": "⟼",
  4364. "longrightarrow": "⟶",
  4365. "LongRightArrow": "⟶",
  4366. "Longrightarrow": "⟹",
  4367. "looparrowleft": "↫",
  4368. "looparrowright": "↬",
  4369. "lopar": "⦅",
  4370. "Lopf": "𝕃",
  4371. "lopf": "𝕝",
  4372. "loplus": "⨭",
  4373. "lotimes": "⨴",
  4374. "lowast": "∗",
  4375. "lowbar": "_",
  4376. "LowerLeftArrow": "↙",
  4377. "LowerRightArrow": "↘",
  4378. "loz": "◊",
  4379. "lozenge": "◊",
  4380. "lozf": "⧫",
  4381. "lpar": "(",
  4382. "lparlt": "⦓",
  4383. "lrarr": "⇆",
  4384. "lrcorner": "⌟",
  4385. "lrhar": "⇋",
  4386. "lrhard": "⥭",
  4387. "lrm": "‎",
  4388. "lrtri": "⊿",
  4389. "lsaquo": "‹",
  4390. "lscr": "𝓁",
  4391. "Lscr": "ℒ",
  4392. "lsh": "↰",
  4393. "Lsh": "↰",
  4394. "lsim": "≲",
  4395. "lsime": "⪍",
  4396. "lsimg": "⪏",
  4397. "lsqb": "[",
  4398. "lsquo": "‘",
  4399. "lsquor": "‚",
  4400. "Lstrok": "Ł",
  4401. "lstrok": "ł",
  4402. "ltcc": "⪦",
  4403. "ltcir": "⩹",
  4404. "lt": "<",
  4405. "LT": "<",
  4406. "Lt": "≪",
  4407. "ltdot": "⋖",
  4408. "lthree": "⋋",
  4409. "ltimes": "⋉",
  4410. "ltlarr": "⥶",
  4411. "ltquest": "⩻",
  4412. "ltri": "◃",
  4413. "ltrie": "⊴",
  4414. "ltrif": "◂",
  4415. "ltrPar": "⦖",
  4416. "lurdshar": "⥊",
  4417. "luruhar": "⥦",
  4418. "lvertneqq": "≨︀",
  4419. "lvnE": "≨︀",
  4420. "macr": "¯",
  4421. "male": "♂",
  4422. "malt": "✠",
  4423. "maltese": "✠",
  4424. "Map": "⤅",
  4425. "map": "↦",
  4426. "mapsto": "↦",
  4427. "mapstodown": "↧",
  4428. "mapstoleft": "↤",
  4429. "mapstoup": "↥",
  4430. "marker": "▮",
  4431. "mcomma": "⨩",
  4432. "Mcy": "М",
  4433. "mcy": "м",
  4434. "mdash": "—",
  4435. "mDDot": "∺",
  4436. "measuredangle": "∡",
  4437. "MediumSpace": " ",
  4438. "Mellintrf": "ℳ",
  4439. "Mfr": "𝔐",
  4440. "mfr": "𝔪",
  4441. "mho": "℧",
  4442. "micro": "µ",
  4443. "midast": "*",
  4444. "midcir": "⫰",
  4445. "mid": "∣",
  4446. "middot": "·",
  4447. "minusb": "⊟",
  4448. "minus": "−",
  4449. "minusd": "∸",
  4450. "minusdu": "⨪",
  4451. "MinusPlus": "∓",
  4452. "mlcp": "⫛",
  4453. "mldr": "…",
  4454. "mnplus": "∓",
  4455. "models": "⊧",
  4456. "Mopf": "𝕄",
  4457. "mopf": "𝕞",
  4458. "mp": "∓",
  4459. "mscr": "𝓂",
  4460. "Mscr": "ℳ",
  4461. "mstpos": "∾",
  4462. "Mu": "Μ",
  4463. "mu": "μ",
  4464. "multimap": "⊸",
  4465. "mumap": "⊸",
  4466. "nabla": "∇",
  4467. "Nacute": "Ń",
  4468. "nacute": "ń",
  4469. "nang": "∠⃒",
  4470. "nap": "≉",
  4471. "napE": "⩰̸",
  4472. "napid": "≋̸",
  4473. "napos": "ʼn",
  4474. "napprox": "≉",
  4475. "natural": "♮",
  4476. "naturals": "ℕ",
  4477. "natur": "♮",
  4478. "nbsp": " ",
  4479. "nbump": "≎̸",
  4480. "nbumpe": "≏̸",
  4481. "ncap": "⩃",
  4482. "Ncaron": "Ň",
  4483. "ncaron": "ň",
  4484. "Ncedil": "Ņ",
  4485. "ncedil": "ņ",
  4486. "ncong": "≇",
  4487. "ncongdot": "⩭̸",
  4488. "ncup": "⩂",
  4489. "Ncy": "Н",
  4490. "ncy": "н",
  4491. "ndash": "–",
  4492. "nearhk": "⤤",
  4493. "nearr": "↗",
  4494. "neArr": "⇗",
  4495. "nearrow": "↗",
  4496. "ne": "≠",
  4497. "nedot": "≐̸",
  4498. "NegativeMediumSpace": "​",
  4499. "NegativeThickSpace": "​",
  4500. "NegativeThinSpace": "​",
  4501. "NegativeVeryThinSpace": "​",
  4502. "nequiv": "≢",
  4503. "nesear": "⤨",
  4504. "nesim": "≂̸",
  4505. "NestedGreaterGreater": "≫",
  4506. "NestedLessLess": "≪",
  4507. "NewLine": "\n",
  4508. "nexist": "∄",
  4509. "nexists": "∄",
  4510. "Nfr": "𝔑",
  4511. "nfr": "𝔫",
  4512. "ngE": "≧̸",
  4513. "nge": "≱",
  4514. "ngeq": "≱",
  4515. "ngeqq": "≧̸",
  4516. "ngeqslant": "⩾̸",
  4517. "nges": "⩾̸",
  4518. "nGg": "⋙̸",
  4519. "ngsim": "≵",
  4520. "nGt": "≫⃒",
  4521. "ngt": "≯",
  4522. "ngtr": "≯",
  4523. "nGtv": "≫̸",
  4524. "nharr": "↮",
  4525. "nhArr": "⇎",
  4526. "nhpar": "⫲",
  4527. "ni": "∋",
  4528. "nis": "⋼",
  4529. "nisd": "⋺",
  4530. "niv": "∋",
  4531. "NJcy": "Њ",
  4532. "njcy": "њ",
  4533. "nlarr": "↚",
  4534. "nlArr": "⇍",
  4535. "nldr": "‥",
  4536. "nlE": "≦̸",
  4537. "nle": "≰",
  4538. "nleftarrow": "↚",
  4539. "nLeftarrow": "⇍",
  4540. "nleftrightarrow": "↮",
  4541. "nLeftrightarrow": "⇎",
  4542. "nleq": "≰",
  4543. "nleqq": "≦̸",
  4544. "nleqslant": "⩽̸",
  4545. "nles": "⩽̸",
  4546. "nless": "≮",
  4547. "nLl": "⋘̸",
  4548. "nlsim": "≴",
  4549. "nLt": "≪⃒",
  4550. "nlt": "≮",
  4551. "nltri": "⋪",
  4552. "nltrie": "⋬",
  4553. "nLtv": "≪̸",
  4554. "nmid": "∤",
  4555. "NoBreak": "⁠",
  4556. "NonBreakingSpace": " ",
  4557. "nopf": "𝕟",
  4558. "Nopf": "ℕ",
  4559. "Not": "⫬",
  4560. "not": "¬",
  4561. "NotCongruent": "≢",
  4562. "NotCupCap": "≭",
  4563. "NotDoubleVerticalBar": "∦",
  4564. "NotElement": "∉",
  4565. "NotEqual": "≠",
  4566. "NotEqualTilde": "≂̸",
  4567. "NotExists": "∄",
  4568. "NotGreater": "≯",
  4569. "NotGreaterEqual": "≱",
  4570. "NotGreaterFullEqual": "≧̸",
  4571. "NotGreaterGreater": "≫̸",
  4572. "NotGreaterLess": "≹",
  4573. "NotGreaterSlantEqual": "⩾̸",
  4574. "NotGreaterTilde": "≵",
  4575. "NotHumpDownHump": "≎̸",
  4576. "NotHumpEqual": "≏̸",
  4577. "notin": "∉",
  4578. "notindot": "⋵̸",
  4579. "notinE": "⋹̸",
  4580. "notinva": "∉",
  4581. "notinvb": "⋷",
  4582. "notinvc": "⋶",
  4583. "NotLeftTriangleBar": "⧏̸",
  4584. "NotLeftTriangle": "⋪",
  4585. "NotLeftTriangleEqual": "⋬",
  4586. "NotLess": "≮",
  4587. "NotLessEqual": "≰",
  4588. "NotLessGreater": "≸",
  4589. "NotLessLess": "≪̸",
  4590. "NotLessSlantEqual": "⩽̸",
  4591. "NotLessTilde": "≴",
  4592. "NotNestedGreaterGreater": "⪢̸",
  4593. "NotNestedLessLess": "⪡̸",
  4594. "notni": "∌",
  4595. "notniva": "∌",
  4596. "notnivb": "⋾",
  4597. "notnivc": "⋽",
  4598. "NotPrecedes": "⊀",
  4599. "NotPrecedesEqual": "⪯̸",
  4600. "NotPrecedesSlantEqual": "⋠",
  4601. "NotReverseElement": "∌",
  4602. "NotRightTriangleBar": "⧐̸",
  4603. "NotRightTriangle": "⋫",
  4604. "NotRightTriangleEqual": "⋭",
  4605. "NotSquareSubset": "⊏̸",
  4606. "NotSquareSubsetEqual": "⋢",
  4607. "NotSquareSuperset": "⊐̸",
  4608. "NotSquareSupersetEqual": "⋣",
  4609. "NotSubset": "⊂⃒",
  4610. "NotSubsetEqual": "⊈",
  4611. "NotSucceeds": "⊁",
  4612. "NotSucceedsEqual": "⪰̸",
  4613. "NotSucceedsSlantEqual": "⋡",
  4614. "NotSucceedsTilde": "≿̸",
  4615. "NotSuperset": "⊃⃒",
  4616. "NotSupersetEqual": "⊉",
  4617. "NotTilde": "≁",
  4618. "NotTildeEqual": "≄",
  4619. "NotTildeFullEqual": "≇",
  4620. "NotTildeTilde": "≉",
  4621. "NotVerticalBar": "∤",
  4622. "nparallel": "∦",
  4623. "npar": "∦",
  4624. "nparsl": "⫽⃥",
  4625. "npart": "∂̸",
  4626. "npolint": "⨔",
  4627. "npr": "⊀",
  4628. "nprcue": "⋠",
  4629. "nprec": "⊀",
  4630. "npreceq": "⪯̸",
  4631. "npre": "⪯̸",
  4632. "nrarrc": "⤳̸",
  4633. "nrarr": "↛",
  4634. "nrArr": "⇏",
  4635. "nrarrw": "↝̸",
  4636. "nrightarrow": "↛",
  4637. "nRightarrow": "⇏",
  4638. "nrtri": "⋫",
  4639. "nrtrie": "⋭",
  4640. "nsc": "⊁",
  4641. "nsccue": "⋡",
  4642. "nsce": "⪰̸",
  4643. "Nscr": "𝒩",
  4644. "nscr": "𝓃",
  4645. "nshortmid": "∤",
  4646. "nshortparallel": "∦",
  4647. "nsim": "≁",
  4648. "nsime": "≄",
  4649. "nsimeq": "≄",
  4650. "nsmid": "∤",
  4651. "nspar": "∦",
  4652. "nsqsube": "⋢",
  4653. "nsqsupe": "⋣",
  4654. "nsub": "⊄",
  4655. "nsubE": "⫅̸",
  4656. "nsube": "⊈",
  4657. "nsubset": "⊂⃒",
  4658. "nsubseteq": "⊈",
  4659. "nsubseteqq": "⫅̸",
  4660. "nsucc": "⊁",
  4661. "nsucceq": "⪰̸",
  4662. "nsup": "⊅",
  4663. "nsupE": "⫆̸",
  4664. "nsupe": "⊉",
  4665. "nsupset": "⊃⃒",
  4666. "nsupseteq": "⊉",
  4667. "nsupseteqq": "⫆̸",
  4668. "ntgl": "≹",
  4669. "Ntilde": "Ñ",
  4670. "ntilde": "ñ",
  4671. "ntlg": "≸",
  4672. "ntriangleleft": "⋪",
  4673. "ntrianglelefteq": "⋬",
  4674. "ntriangleright": "⋫",
  4675. "ntrianglerighteq": "⋭",
  4676. "Nu": "Ν",
  4677. "nu": "ν",
  4678. "num": "#",
  4679. "numero": "№",
  4680. "numsp": " ",
  4681. "nvap": "≍⃒",
  4682. "nvdash": "⊬",
  4683. "nvDash": "⊭",
  4684. "nVdash": "⊮",
  4685. "nVDash": "⊯",
  4686. "nvge": "≥⃒",
  4687. "nvgt": ">⃒",
  4688. "nvHarr": "⤄",
  4689. "nvinfin": "⧞",
  4690. "nvlArr": "⤂",
  4691. "nvle": "≤⃒",
  4692. "nvlt": "<⃒",
  4693. "nvltrie": "⊴⃒",
  4694. "nvrArr": "⤃",
  4695. "nvrtrie": "⊵⃒",
  4696. "nvsim": "∼⃒",
  4697. "nwarhk": "⤣",
  4698. "nwarr": "↖",
  4699. "nwArr": "⇖",
  4700. "nwarrow": "↖",
  4701. "nwnear": "⤧",
  4702. "Oacute": "Ó",
  4703. "oacute": "ó",
  4704. "oast": "⊛",
  4705. "Ocirc": "Ô",
  4706. "ocirc": "ô",
  4707. "ocir": "⊚",
  4708. "Ocy": "О",
  4709. "ocy": "о",
  4710. "odash": "⊝",
  4711. "Odblac": "Ő",
  4712. "odblac": "ő",
  4713. "odiv": "⨸",
  4714. "odot": "⊙",
  4715. "odsold": "⦼",
  4716. "OElig": "Œ",
  4717. "oelig": "œ",
  4718. "ofcir": "⦿",
  4719. "Ofr": "𝔒",
  4720. "ofr": "𝔬",
  4721. "ogon": "˛",
  4722. "Ograve": "Ò",
  4723. "ograve": "ò",
  4724. "ogt": "⧁",
  4725. "ohbar": "⦵",
  4726. "ohm": "Ω",
  4727. "oint": "∮",
  4728. "olarr": "↺",
  4729. "olcir": "⦾",
  4730. "olcross": "⦻",
  4731. "oline": "‾",
  4732. "olt": "⧀",
  4733. "Omacr": "Ō",
  4734. "omacr": "ō",
  4735. "Omega": "Ω",
  4736. "omega": "ω",
  4737. "Omicron": "Ο",
  4738. "omicron": "ο",
  4739. "omid": "⦶",
  4740. "ominus": "⊖",
  4741. "Oopf": "𝕆",
  4742. "oopf": "𝕠",
  4743. "opar": "⦷",
  4744. "OpenCurlyDoubleQuote": "“",
  4745. "OpenCurlyQuote": "‘",
  4746. "operp": "⦹",
  4747. "oplus": "⊕",
  4748. "orarr": "↻",
  4749. "Or": "⩔",
  4750. "or": "∨",
  4751. "ord": "⩝",
  4752. "order": "ℴ",
  4753. "orderof": "ℴ",
  4754. "ordf": "ª",
  4755. "ordm": "º",
  4756. "origof": "⊶",
  4757. "oror": "⩖",
  4758. "orslope": "⩗",
  4759. "orv": "⩛",
  4760. "oS": "Ⓢ",
  4761. "Oscr": "𝒪",
  4762. "oscr": "ℴ",
  4763. "Oslash": "Ø",
  4764. "oslash": "ø",
  4765. "osol": "⊘",
  4766. "Otilde": "Õ",
  4767. "otilde": "õ",
  4768. "otimesas": "⨶",
  4769. "Otimes": "⨷",
  4770. "otimes": "⊗",
  4771. "Ouml": "Ö",
  4772. "ouml": "ö",
  4773. "ovbar": "⌽",
  4774. "OverBar": "‾",
  4775. "OverBrace": "⏞",
  4776. "OverBracket": "⎴",
  4777. "OverParenthesis": "⏜",
  4778. "para": "¶",
  4779. "parallel": "∥",
  4780. "par": "∥",
  4781. "parsim": "⫳",
  4782. "parsl": "⫽",
  4783. "part": "∂",
  4784. "PartialD": "∂",
  4785. "Pcy": "П",
  4786. "pcy": "п",
  4787. "percnt": "%",
  4788. "period": ".",
  4789. "permil": "‰",
  4790. "perp": "⊥",
  4791. "pertenk": "‱",
  4792. "Pfr": "𝔓",
  4793. "pfr": "𝔭",
  4794. "Phi": "Φ",
  4795. "phi": "φ",
  4796. "phiv": "ϕ",
  4797. "phmmat": "ℳ",
  4798. "phone": "☎",
  4799. "Pi": "Π",
  4800. "pi": "π",
  4801. "pitchfork": "⋔",
  4802. "piv": "ϖ",
  4803. "planck": "ℏ",
  4804. "planckh": "ℎ",
  4805. "plankv": "ℏ",
  4806. "plusacir": "⨣",
  4807. "plusb": "⊞",
  4808. "pluscir": "⨢",
  4809. "plus": "+",
  4810. "plusdo": "∔",
  4811. "plusdu": "⨥",
  4812. "pluse": "⩲",
  4813. "PlusMinus": "±",
  4814. "plusmn": "±",
  4815. "plussim": "⨦",
  4816. "plustwo": "⨧",
  4817. "pm": "±",
  4818. "Poincareplane": "ℌ",
  4819. "pointint": "⨕",
  4820. "popf": "𝕡",
  4821. "Popf": "ℙ",
  4822. "pound": "£",
  4823. "prap": "⪷",
  4824. "Pr": "⪻",
  4825. "pr": "≺",
  4826. "prcue": "≼",
  4827. "precapprox": "⪷",
  4828. "prec": "≺",
  4829. "preccurlyeq": "≼",
  4830. "Precedes": "≺",
  4831. "PrecedesEqual": "⪯",
  4832. "PrecedesSlantEqual": "≼",
  4833. "PrecedesTilde": "≾",
  4834. "preceq": "⪯",
  4835. "precnapprox": "⪹",
  4836. "precneqq": "⪵",
  4837. "precnsim": "⋨",
  4838. "pre": "⪯",
  4839. "prE": "⪳",
  4840. "precsim": "≾",
  4841. "prime": "′",
  4842. "Prime": "″",
  4843. "primes": "ℙ",
  4844. "prnap": "⪹",
  4845. "prnE": "⪵",
  4846. "prnsim": "⋨",
  4847. "prod": "∏",
  4848. "Product": "∏",
  4849. "profalar": "⌮",
  4850. "profline": "⌒",
  4851. "profsurf": "⌓",
  4852. "prop": "∝",
  4853. "Proportional": "∝",
  4854. "Proportion": "∷",
  4855. "propto": "∝",
  4856. "prsim": "≾",
  4857. "prurel": "⊰",
  4858. "Pscr": "𝒫",
  4859. "pscr": "𝓅",
  4860. "Psi": "Ψ",
  4861. "psi": "ψ",
  4862. "puncsp": " ",
  4863. "Qfr": "𝔔",
  4864. "qfr": "𝔮",
  4865. "qint": "⨌",
  4866. "qopf": "𝕢",
  4867. "Qopf": "ℚ",
  4868. "qprime": "⁗",
  4869. "Qscr": "𝒬",
  4870. "qscr": "𝓆",
  4871. "quaternions": "ℍ",
  4872. "quatint": "⨖",
  4873. "quest": "?",
  4874. "questeq": "≟",
  4875. "quot": "\"",
  4876. "QUOT": "\"",
  4877. "rAarr": "⇛",
  4878. "race": "∽̱",
  4879. "Racute": "Ŕ",
  4880. "racute": "ŕ",
  4881. "radic": "√",
  4882. "raemptyv": "⦳",
  4883. "rang": "⟩",
  4884. "Rang": "⟫",
  4885. "rangd": "⦒",
  4886. "range": "⦥",
  4887. "rangle": "⟩",
  4888. "raquo": "»",
  4889. "rarrap": "⥵",
  4890. "rarrb": "⇥",
  4891. "rarrbfs": "⤠",
  4892. "rarrc": "⤳",
  4893. "rarr": "→",
  4894. "Rarr": "↠",
  4895. "rArr": "⇒",
  4896. "rarrfs": "⤞",
  4897. "rarrhk": "↪",
  4898. "rarrlp": "↬",
  4899. "rarrpl": "⥅",
  4900. "rarrsim": "⥴",
  4901. "Rarrtl": "⤖",
  4902. "rarrtl": "↣",
  4903. "rarrw": "↝",
  4904. "ratail": "⤚",
  4905. "rAtail": "⤜",
  4906. "ratio": "∶",
  4907. "rationals": "ℚ",
  4908. "rbarr": "⤍",
  4909. "rBarr": "⤏",
  4910. "RBarr": "⤐",
  4911. "rbbrk": "❳",
  4912. "rbrace": "}",
  4913. "rbrack": "]",
  4914. "rbrke": "⦌",
  4915. "rbrksld": "⦎",
  4916. "rbrkslu": "⦐",
  4917. "Rcaron": "Ř",
  4918. "rcaron": "ř",
  4919. "Rcedil": "Ŗ",
  4920. "rcedil": "ŗ",
  4921. "rceil": "⌉",
  4922. "rcub": "}",
  4923. "Rcy": "Р",
  4924. "rcy": "р",
  4925. "rdca": "⤷",
  4926. "rdldhar": "⥩",
  4927. "rdquo": "”",
  4928. "rdquor": "”",
  4929. "rdsh": "↳",
  4930. "real": "ℜ",
  4931. "realine": "ℛ",
  4932. "realpart": "ℜ",
  4933. "reals": "ℝ",
  4934. "Re": "ℜ",
  4935. "rect": "▭",
  4936. "reg": "®",
  4937. "REG": "®",
  4938. "ReverseElement": "∋",
  4939. "ReverseEquilibrium": "⇋",
  4940. "ReverseUpEquilibrium": "⥯",
  4941. "rfisht": "⥽",
  4942. "rfloor": "⌋",
  4943. "rfr": "𝔯",
  4944. "Rfr": "ℜ",
  4945. "rHar": "⥤",
  4946. "rhard": "⇁",
  4947. "rharu": "⇀",
  4948. "rharul": "⥬",
  4949. "Rho": "Ρ",
  4950. "rho": "ρ",
  4951. "rhov": "ϱ",
  4952. "RightAngleBracket": "⟩",
  4953. "RightArrowBar": "⇥",
  4954. "rightarrow": "→",
  4955. "RightArrow": "→",
  4956. "Rightarrow": "⇒",
  4957. "RightArrowLeftArrow": "⇄",
  4958. "rightarrowtail": "↣",
  4959. "RightCeiling": "⌉",
  4960. "RightDoubleBracket": "⟧",
  4961. "RightDownTeeVector": "⥝",
  4962. "RightDownVectorBar": "⥕",
  4963. "RightDownVector": "⇂",
  4964. "RightFloor": "⌋",
  4965. "rightharpoondown": "⇁",
  4966. "rightharpoonup": "⇀",
  4967. "rightleftarrows": "⇄",
  4968. "rightleftharpoons": "⇌",
  4969. "rightrightarrows": "⇉",
  4970. "rightsquigarrow": "↝",
  4971. "RightTeeArrow": "↦",
  4972. "RightTee": "⊢",
  4973. "RightTeeVector": "⥛",
  4974. "rightthreetimes": "⋌",
  4975. "RightTriangleBar": "⧐",
  4976. "RightTriangle": "⊳",
  4977. "RightTriangleEqual": "⊵",
  4978. "RightUpDownVector": "⥏",
  4979. "RightUpTeeVector": "⥜",
  4980. "RightUpVectorBar": "⥔",
  4981. "RightUpVector": "↾",
  4982. "RightVectorBar": "⥓",
  4983. "RightVector": "⇀",
  4984. "ring": "˚",
  4985. "risingdotseq": "≓",
  4986. "rlarr": "⇄",
  4987. "rlhar": "⇌",
  4988. "rlm": "‏",
  4989. "rmoustache": "⎱",
  4990. "rmoust": "⎱",
  4991. "rnmid": "⫮",
  4992. "roang": "⟭",
  4993. "roarr": "⇾",
  4994. "robrk": "⟧",
  4995. "ropar": "⦆",
  4996. "ropf": "𝕣",
  4997. "Ropf": "ℝ",
  4998. "roplus": "⨮",
  4999. "rotimes": "⨵",
  5000. "RoundImplies": "⥰",
  5001. "rpar": ")",
  5002. "rpargt": "⦔",
  5003. "rppolint": "⨒",
  5004. "rrarr": "⇉",
  5005. "Rrightarrow": "⇛",
  5006. "rsaquo": "›",
  5007. "rscr": "𝓇",
  5008. "Rscr": "ℛ",
  5009. "rsh": "↱",
  5010. "Rsh": "↱",
  5011. "rsqb": "]",
  5012. "rsquo": "’",
  5013. "rsquor": "’",
  5014. "rthree": "⋌",
  5015. "rtimes": "⋊",
  5016. "rtri": "▹",
  5017. "rtrie": "⊵",
  5018. "rtrif": "▸",
  5019. "rtriltri": "⧎",
  5020. "RuleDelayed": "⧴",
  5021. "ruluhar": "⥨",
  5022. "rx": "℞",
  5023. "Sacute": "Ś",
  5024. "sacute": "ś",
  5025. "sbquo": "‚",
  5026. "scap": "⪸",
  5027. "Scaron": "Š",
  5028. "scaron": "š",
  5029. "Sc": "⪼",
  5030. "sc": "≻",
  5031. "sccue": "≽",
  5032. "sce": "⪰",
  5033. "scE": "⪴",
  5034. "Scedil": "Ş",
  5035. "scedil": "ş",
  5036. "Scirc": "Ŝ",
  5037. "scirc": "ŝ",
  5038. "scnap": "⪺",
  5039. "scnE": "⪶",
  5040. "scnsim": "⋩",
  5041. "scpolint": "⨓",
  5042. "scsim": "≿",
  5043. "Scy": "С",
  5044. "scy": "с",
  5045. "sdotb": "⊡",
  5046. "sdot": "⋅",
  5047. "sdote": "⩦",
  5048. "searhk": "⤥",
  5049. "searr": "↘",
  5050. "seArr": "⇘",
  5051. "searrow": "↘",
  5052. "sect": "§",
  5053. "semi": ";",
  5054. "seswar": "⤩",
  5055. "setminus": "∖",
  5056. "setmn": "∖",
  5057. "sext": "✶",
  5058. "Sfr": "𝔖",
  5059. "sfr": "𝔰",
  5060. "sfrown": "⌢",
  5061. "sharp": "♯",
  5062. "SHCHcy": "Щ",
  5063. "shchcy": "щ",
  5064. "SHcy": "Ш",
  5065. "shcy": "ш",
  5066. "ShortDownArrow": "↓",
  5067. "ShortLeftArrow": "←",
  5068. "shortmid": "∣",
  5069. "shortparallel": "∥",
  5070. "ShortRightArrow": "→",
  5071. "ShortUpArrow": "↑",
  5072. "shy": "­",
  5073. "Sigma": "Σ",
  5074. "sigma": "σ",
  5075. "sigmaf": "ς",
  5076. "sigmav": "ς",
  5077. "sim": "∼",
  5078. "simdot": "⩪",
  5079. "sime": "≃",
  5080. "simeq": "≃",
  5081. "simg": "⪞",
  5082. "simgE": "⪠",
  5083. "siml": "⪝",
  5084. "simlE": "⪟",
  5085. "simne": "≆",
  5086. "simplus": "⨤",
  5087. "simrarr": "⥲",
  5088. "slarr": "←",
  5089. "SmallCircle": "∘",
  5090. "smallsetminus": "∖",
  5091. "smashp": "⨳",
  5092. "smeparsl": "⧤",
  5093. "smid": "∣",
  5094. "smile": "⌣",
  5095. "smt": "⪪",
  5096. "smte": "⪬",
  5097. "smtes": "⪬︀",
  5098. "SOFTcy": "Ь",
  5099. "softcy": "ь",
  5100. "solbar": "⌿",
  5101. "solb": "⧄",
  5102. "sol": "/",
  5103. "Sopf": "𝕊",
  5104. "sopf": "𝕤",
  5105. "spades": "♠",
  5106. "spadesuit": "♠",
  5107. "spar": "∥",
  5108. "sqcap": "⊓",
  5109. "sqcaps": "⊓︀",
  5110. "sqcup": "⊔",
  5111. "sqcups": "⊔︀",
  5112. "Sqrt": "√",
  5113. "sqsub": "⊏",
  5114. "sqsube": "⊑",
  5115. "sqsubset": "⊏",
  5116. "sqsubseteq": "⊑",
  5117. "sqsup": "⊐",
  5118. "sqsupe": "⊒",
  5119. "sqsupset": "⊐",
  5120. "sqsupseteq": "⊒",
  5121. "square": "□",
  5122. "Square": "□",
  5123. "SquareIntersection": "⊓",
  5124. "SquareSubset": "⊏",
  5125. "SquareSubsetEqual": "⊑",
  5126. "SquareSuperset": "⊐",
  5127. "SquareSupersetEqual": "⊒",
  5128. "SquareUnion": "⊔",
  5129. "squarf": "▪",
  5130. "squ": "□",
  5131. "squf": "▪",
  5132. "srarr": "→",
  5133. "Sscr": "𝒮",
  5134. "sscr": "𝓈",
  5135. "ssetmn": "∖",
  5136. "ssmile": "⌣",
  5137. "sstarf": "⋆",
  5138. "Star": "⋆",
  5139. "star": "☆",
  5140. "starf": "★",
  5141. "straightepsilon": "ϵ",
  5142. "straightphi": "ϕ",
  5143. "strns": "¯",
  5144. "sub": "⊂",
  5145. "Sub": "⋐",
  5146. "subdot": "⪽",
  5147. "subE": "⫅",
  5148. "sube": "⊆",
  5149. "subedot": "⫃",
  5150. "submult": "⫁",
  5151. "subnE": "⫋",
  5152. "subne": "⊊",
  5153. "subplus": "⪿",
  5154. "subrarr": "⥹",
  5155. "subset": "⊂",
  5156. "Subset": "⋐",
  5157. "subseteq": "⊆",
  5158. "subseteqq": "⫅",
  5159. "SubsetEqual": "⊆",
  5160. "subsetneq": "⊊",
  5161. "subsetneqq": "⫋",
  5162. "subsim": "⫇",
  5163. "subsub": "⫕",
  5164. "subsup": "⫓",
  5165. "succapprox": "⪸",
  5166. "succ": "≻",
  5167. "succcurlyeq": "≽",
  5168. "Succeeds": "≻",
  5169. "SucceedsEqual": "⪰",
  5170. "SucceedsSlantEqual": "≽",
  5171. "SucceedsTilde": "≿",
  5172. "succeq": "⪰",
  5173. "succnapprox": "⪺",
  5174. "succneqq": "⪶",
  5175. "succnsim": "⋩",
  5176. "succsim": "≿",
  5177. "SuchThat": "∋",
  5178. "sum": "∑",
  5179. "Sum": "∑",
  5180. "sung": "♪",
  5181. "sup1": "¹",
  5182. "sup2": "²",
  5183. "sup3": "³",
  5184. "sup": "⊃",
  5185. "Sup": "⋑",
  5186. "supdot": "⪾",
  5187. "supdsub": "⫘",
  5188. "supE": "⫆",
  5189. "supe": "⊇",
  5190. "supedot": "⫄",
  5191. "Superset": "⊃",
  5192. "SupersetEqual": "⊇",
  5193. "suphsol": "⟉",
  5194. "suphsub": "⫗",
  5195. "suplarr": "⥻",
  5196. "supmult": "⫂",
  5197. "supnE": "⫌",
  5198. "supne": "⊋",
  5199. "supplus": "⫀",
  5200. "supset": "⊃",
  5201. "Supset": "⋑",
  5202. "supseteq": "⊇",
  5203. "supseteqq": "⫆",
  5204. "supsetneq": "⊋",
  5205. "supsetneqq": "⫌",
  5206. "supsim": "⫈",
  5207. "supsub": "⫔",
  5208. "supsup": "⫖",
  5209. "swarhk": "⤦",
  5210. "swarr": "↙",
  5211. "swArr": "⇙",
  5212. "swarrow": "↙",
  5213. "swnwar": "⤪",
  5214. "szlig": "ß",
  5215. "Tab": "\t",
  5216. "target": "⌖",
  5217. "Tau": "Τ",
  5218. "tau": "τ",
  5219. "tbrk": "⎴",
  5220. "Tcaron": "Ť",
  5221. "tcaron": "ť",
  5222. "Tcedil": "Ţ",
  5223. "tcedil": "ţ",
  5224. "Tcy": "Т",
  5225. "tcy": "т",
  5226. "tdot": "⃛",
  5227. "telrec": "⌕",
  5228. "Tfr": "𝔗",
  5229. "tfr": "𝔱",
  5230. "there4": "∴",
  5231. "therefore": "∴",
  5232. "Therefore": "∴",
  5233. "Theta": "Θ",
  5234. "theta": "θ",
  5235. "thetasym": "ϑ",
  5236. "thetav": "ϑ",
  5237. "thickapprox": "≈",
  5238. "thicksim": "∼",
  5239. "ThickSpace": "  ",
  5240. "ThinSpace": " ",
  5241. "thinsp": " ",
  5242. "thkap": "≈",
  5243. "thksim": "∼",
  5244. "THORN": "Þ",
  5245. "thorn": "þ",
  5246. "tilde": "˜",
  5247. "Tilde": "∼",
  5248. "TildeEqual": "≃",
  5249. "TildeFullEqual": "≅",
  5250. "TildeTilde": "≈",
  5251. "timesbar": "⨱",
  5252. "timesb": "⊠",
  5253. "times": "×",
  5254. "timesd": "⨰",
  5255. "tint": "∭",
  5256. "toea": "⤨",
  5257. "topbot": "⌶",
  5258. "topcir": "⫱",
  5259. "top": "⊤",
  5260. "Topf": "𝕋",
  5261. "topf": "𝕥",
  5262. "topfork": "⫚",
  5263. "tosa": "⤩",
  5264. "tprime": "‴",
  5265. "trade": "™",
  5266. "TRADE": "™",
  5267. "triangle": "▵",
  5268. "triangledown": "▿",
  5269. "triangleleft": "◃",
  5270. "trianglelefteq": "⊴",
  5271. "triangleq": "≜",
  5272. "triangleright": "▹",
  5273. "trianglerighteq": "⊵",
  5274. "tridot": "◬",
  5275. "trie": "≜",
  5276. "triminus": "⨺",
  5277. "TripleDot": "⃛",
  5278. "triplus": "⨹",
  5279. "trisb": "⧍",
  5280. "tritime": "⨻",
  5281. "trpezium": "⏢",
  5282. "Tscr": "𝒯",
  5283. "tscr": "𝓉",
  5284. "TScy": "Ц",
  5285. "tscy": "ц",
  5286. "TSHcy": "Ћ",
  5287. "tshcy": "ћ",
  5288. "Tstrok": "Ŧ",
  5289. "tstrok": "ŧ",
  5290. "twixt": "≬",
  5291. "twoheadleftarrow": "↞",
  5292. "twoheadrightarrow": "↠",
  5293. "Uacute": "Ú",
  5294. "uacute": "ú",
  5295. "uarr": "↑",
  5296. "Uarr": "↟",
  5297. "uArr": "⇑",
  5298. "Uarrocir": "⥉",
  5299. "Ubrcy": "Ў",
  5300. "ubrcy": "ў",
  5301. "Ubreve": "Ŭ",
  5302. "ubreve": "ŭ",
  5303. "Ucirc": "Û",
  5304. "ucirc": "û",
  5305. "Ucy": "У",
  5306. "ucy": "у",
  5307. "udarr": "⇅",
  5308. "Udblac": "Ű",
  5309. "udblac": "ű",
  5310. "udhar": "⥮",
  5311. "ufisht": "⥾",
  5312. "Ufr": "𝔘",
  5313. "ufr": "𝔲",
  5314. "Ugrave": "Ù",
  5315. "ugrave": "ù",
  5316. "uHar": "⥣",
  5317. "uharl": "↿",
  5318. "uharr": "↾",
  5319. "uhblk": "▀",
  5320. "ulcorn": "⌜",
  5321. "ulcorner": "⌜",
  5322. "ulcrop": "⌏",
  5323. "ultri": "◸",
  5324. "Umacr": "Ū",
  5325. "umacr": "ū",
  5326. "uml": "¨",
  5327. "UnderBar": "_",
  5328. "UnderBrace": "⏟",
  5329. "UnderBracket": "⎵",
  5330. "UnderParenthesis": "⏝",
  5331. "Union": "⋃",
  5332. "UnionPlus": "⊎",
  5333. "Uogon": "Ų",
  5334. "uogon": "ų",
  5335. "Uopf": "𝕌",
  5336. "uopf": "𝕦",
  5337. "UpArrowBar": "⤒",
  5338. "uparrow": "↑",
  5339. "UpArrow": "↑",
  5340. "Uparrow": "⇑",
  5341. "UpArrowDownArrow": "⇅",
  5342. "updownarrow": "↕",
  5343. "UpDownArrow": "↕",
  5344. "Updownarrow": "⇕",
  5345. "UpEquilibrium": "⥮",
  5346. "upharpoonleft": "↿",
  5347. "upharpoonright": "↾",
  5348. "uplus": "⊎",
  5349. "UpperLeftArrow": "↖",
  5350. "UpperRightArrow": "↗",
  5351. "upsi": "υ",
  5352. "Upsi": "ϒ",
  5353. "upsih": "ϒ",
  5354. "Upsilon": "Υ",
  5355. "upsilon": "υ",
  5356. "UpTeeArrow": "↥",
  5357. "UpTee": "⊥",
  5358. "upuparrows": "⇈",
  5359. "urcorn": "⌝",
  5360. "urcorner": "⌝",
  5361. "urcrop": "⌎",
  5362. "Uring": "Ů",
  5363. "uring": "ů",
  5364. "urtri": "◹",
  5365. "Uscr": "𝒰",
  5366. "uscr": "𝓊",
  5367. "utdot": "⋰",
  5368. "Utilde": "Ũ",
  5369. "utilde": "ũ",
  5370. "utri": "▵",
  5371. "utrif": "▴",
  5372. "uuarr": "⇈",
  5373. "Uuml": "Ü",
  5374. "uuml": "ü",
  5375. "uwangle": "⦧",
  5376. "vangrt": "⦜",
  5377. "varepsilon": "ϵ",
  5378. "varkappa": "ϰ",
  5379. "varnothing": "∅",
  5380. "varphi": "ϕ",
  5381. "varpi": "ϖ",
  5382. "varpropto": "∝",
  5383. "varr": "↕",
  5384. "vArr": "⇕",
  5385. "varrho": "ϱ",
  5386. "varsigma": "ς",
  5387. "varsubsetneq": "⊊︀",
  5388. "varsubsetneqq": "⫋︀",
  5389. "varsupsetneq": "⊋︀",
  5390. "varsupsetneqq": "⫌︀",
  5391. "vartheta": "ϑ",
  5392. "vartriangleleft": "⊲",
  5393. "vartriangleright": "⊳",
  5394. "vBar": "⫨",
  5395. "Vbar": "⫫",
  5396. "vBarv": "⫩",
  5397. "Vcy": "В",
  5398. "vcy": "в",
  5399. "vdash": "⊢",
  5400. "vDash": "⊨",
  5401. "Vdash": "⊩",
  5402. "VDash": "⊫",
  5403. "Vdashl": "⫦",
  5404. "veebar": "⊻",
  5405. "vee": "∨",
  5406. "Vee": "⋁",
  5407. "veeeq": "≚",
  5408. "vellip": "⋮",
  5409. "verbar": "|",
  5410. "Verbar": "‖",
  5411. "vert": "|",
  5412. "Vert": "‖",
  5413. "VerticalBar": "∣",
  5414. "VerticalLine": "|",
  5415. "VerticalSeparator": "❘",
  5416. "VerticalTilde": "≀",
  5417. "VeryThinSpace": " ",
  5418. "Vfr": "𝔙",
  5419. "vfr": "𝔳",
  5420. "vltri": "⊲",
  5421. "vnsub": "⊂⃒",
  5422. "vnsup": "⊃⃒",
  5423. "Vopf": "𝕍",
  5424. "vopf": "𝕧",
  5425. "vprop": "∝",
  5426. "vrtri": "⊳",
  5427. "Vscr": "𝒱",
  5428. "vscr": "𝓋",
  5429. "vsubnE": "⫋︀",
  5430. "vsubne": "⊊︀",
  5431. "vsupnE": "⫌︀",
  5432. "vsupne": "⊋︀",
  5433. "Vvdash": "⊪",
  5434. "vzigzag": "⦚",
  5435. "Wcirc": "Ŵ",
  5436. "wcirc": "ŵ",
  5437. "wedbar": "⩟",
  5438. "wedge": "∧",
  5439. "Wedge": "⋀",
  5440. "wedgeq": "≙",
  5441. "weierp": "℘",
  5442. "Wfr": "𝔚",
  5443. "wfr": "𝔴",
  5444. "Wopf": "𝕎",
  5445. "wopf": "𝕨",
  5446. "wp": "℘",
  5447. "wr": "≀",
  5448. "wreath": "≀",
  5449. "Wscr": "𝒲",
  5450. "wscr": "𝓌",
  5451. "xcap": "⋂",
  5452. "xcirc": "◯",
  5453. "xcup": "⋃",
  5454. "xdtri": "▽",
  5455. "Xfr": "𝔛",
  5456. "xfr": "𝔵",
  5457. "xharr": "⟷",
  5458. "xhArr": "⟺",
  5459. "Xi": "Ξ",
  5460. "xi": "ξ",
  5461. "xlarr": "⟵",
  5462. "xlArr": "⟸",
  5463. "xmap": "⟼",
  5464. "xnis": "⋻",
  5465. "xodot": "⨀",
  5466. "Xopf": "𝕏",
  5467. "xopf": "𝕩",
  5468. "xoplus": "⨁",
  5469. "xotime": "⨂",
  5470. "xrarr": "⟶",
  5471. "xrArr": "⟹",
  5472. "Xscr": "𝒳",
  5473. "xscr": "𝓍",
  5474. "xsqcup": "⨆",
  5475. "xuplus": "⨄",
  5476. "xutri": "△",
  5477. "xvee": "⋁",
  5478. "xwedge": "⋀",
  5479. "Yacute": "Ý",
  5480. "yacute": "ý",
  5481. "YAcy": "Я",
  5482. "yacy": "я",
  5483. "Ycirc": "Ŷ",
  5484. "ycirc": "ŷ",
  5485. "Ycy": "Ы",
  5486. "ycy": "ы",
  5487. "yen": "¥",
  5488. "Yfr": "𝔜",
  5489. "yfr": "𝔶",
  5490. "YIcy": "Ї",
  5491. "yicy": "ї",
  5492. "Yopf": "𝕐",
  5493. "yopf": "𝕪",
  5494. "Yscr": "𝒴",
  5495. "yscr": "𝓎",
  5496. "YUcy": "Ю",
  5497. "yucy": "ю",
  5498. "yuml": "ÿ",
  5499. "Yuml": "Ÿ",
  5500. "Zacute": "Ź",
  5501. "zacute": "ź",
  5502. "Zcaron": "Ž",
  5503. "zcaron": "ž",
  5504. "Zcy": "З",
  5505. "zcy": "з",
  5506. "Zdot": "Ż",
  5507. "zdot": "ż",
  5508. "zeetrf": "ℨ",
  5509. "ZeroWidthSpace": "​",
  5510. "Zeta": "Ζ",
  5511. "zeta": "ζ",
  5512. "zfr": "𝔷",
  5513. "Zfr": "ℨ",
  5514. "ZHcy": "Ж",
  5515. "zhcy": "ж",
  5516. "zigrarr": "⇝",
  5517. "zopf": "𝕫",
  5518. "Zopf": "ℤ",
  5519. "Zscr": "𝒵",
  5520. "zscr": "𝓏",
  5521. "zwj": "‍",
  5522. "zwnj": "‌"
  5523. };
  5524. /***/ }),
  5525. /* 24 */
  5526. /***/ (function(module, exports) {
  5527. // removed by extract-text-webpack-plugin
  5528. /***/ }),
  5529. /* 25 */
  5530. /***/ (function(module, exports) {
  5531. // removed by extract-text-webpack-plugin
  5532. /***/ }),
  5533. /* 26 */
  5534. /***/ (function(module, exports) {
  5535. // removed by extract-text-webpack-plugin
  5536. /***/ }),
  5537. /* 27 */
  5538. /***/ (function(module, exports) {
  5539. // removed by extract-text-webpack-plugin
  5540. /***/ }),
  5541. /* 28 */
  5542. /***/ (function(module, exports, __webpack_require__) {
  5543. "use strict";
  5544. ////////////////////////////////////////////////////////////////////////////////
  5545. // Helpers
  5546. // Merge objects
  5547. //
  5548. function assign(obj /*from1, from2, from3, ...*/) {
  5549. var sources = Array.prototype.slice.call(arguments, 1);
  5550. sources.forEach(function (source) {
  5551. if (!source) { return; }
  5552. Object.keys(source).forEach(function (key) {
  5553. obj[key] = source[key];
  5554. });
  5555. });
  5556. return obj;
  5557. }
  5558. function _class(obj) { return Object.prototype.toString.call(obj); }
  5559. function isString(obj) { return _class(obj) === '[object String]'; }
  5560. function isObject(obj) { return _class(obj) === '[object Object]'; }
  5561. function isRegExp(obj) { return _class(obj) === '[object RegExp]'; }
  5562. function isFunction(obj) { return _class(obj) === '[object Function]'; }
  5563. function escapeRE(str) { return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); }
  5564. ////////////////////////////////////////////////////////////////////////////////
  5565. var defaultOptions = {
  5566. fuzzyLink: true,
  5567. fuzzyEmail: true,
  5568. fuzzyIP: false
  5569. };
  5570. function isOptionsObj(obj) {
  5571. return Object.keys(obj || {}).reduce(function (acc, k) {
  5572. return acc || defaultOptions.hasOwnProperty(k);
  5573. }, false);
  5574. }
  5575. var defaultSchemas = {
  5576. 'http:': {
  5577. validate: function (text, pos, self) {
  5578. var tail = text.slice(pos);
  5579. if (!self.re.http) {
  5580. // compile lazily, because "host"-containing variables can change on tlds update.
  5581. self.re.http = new RegExp(
  5582. '^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'
  5583. );
  5584. }
  5585. if (self.re.http.test(tail)) {
  5586. return tail.match(self.re.http)[0].length;
  5587. }
  5588. return 0;
  5589. }
  5590. },
  5591. 'https:': 'http:',
  5592. 'ftp:': 'http:',
  5593. '//': {
  5594. validate: function (text, pos, self) {
  5595. var tail = text.slice(pos);
  5596. if (!self.re.no_http) {
  5597. // compile lazily, because "host"-containing variables can change on tlds update.
  5598. self.re.no_http = new RegExp(
  5599. '^' +
  5600. self.re.src_auth +
  5601. // Don't allow single-level domains, because of false positives like '//test'
  5602. // with code comments
  5603. '(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' +
  5604. self.re.src_port +
  5605. self.re.src_host_terminator +
  5606. self.re.src_path,
  5607. 'i'
  5608. );
  5609. }
  5610. if (self.re.no_http.test(tail)) {
  5611. // should not be `://` & `///`, that protects from errors in protocol name
  5612. if (pos >= 3 && text[pos - 3] === ':') { return 0; }
  5613. if (pos >= 3 && text[pos - 3] === '/') { return 0; }
  5614. return tail.match(self.re.no_http)[0].length;
  5615. }
  5616. return 0;
  5617. }
  5618. },
  5619. 'mailto:': {
  5620. validate: function (text, pos, self) {
  5621. var tail = text.slice(pos);
  5622. if (!self.re.mailto) {
  5623. self.re.mailto = new RegExp(
  5624. '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'
  5625. );
  5626. }
  5627. if (self.re.mailto.test(tail)) {
  5628. return tail.match(self.re.mailto)[0].length;
  5629. }
  5630. return 0;
  5631. }
  5632. }
  5633. };
  5634. /*eslint-disable max-len*/
  5635. // RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
  5636. var tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
  5637. // DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
  5638. var tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
  5639. /*eslint-enable max-len*/
  5640. ////////////////////////////////////////////////////////////////////////////////
  5641. function resetScanCache(self) {
  5642. self.__index__ = -1;
  5643. self.__text_cache__ = '';
  5644. }
  5645. function createValidator(re) {
  5646. return function (text, pos) {
  5647. var tail = text.slice(pos);
  5648. if (re.test(tail)) {
  5649. return tail.match(re)[0].length;
  5650. }
  5651. return 0;
  5652. };
  5653. }
  5654. function createNormalizer() {
  5655. return function (match, self) {
  5656. self.normalize(match);
  5657. };
  5658. }
  5659. // Schemas compiler. Build regexps.
  5660. //
  5661. function compile(self) {
  5662. // Load & clone RE patterns.
  5663. var re = self.re = __webpack_require__(29)(self.__opts__);
  5664. // Define dynamic patterns
  5665. var tlds = self.__tlds__.slice();
  5666. self.onCompile();
  5667. if (!self.__tlds_replaced__) {
  5668. tlds.push(tlds_2ch_src_re);
  5669. }
  5670. tlds.push(re.src_xn);
  5671. re.src_tlds = tlds.join('|');
  5672. function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }
  5673. re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
  5674. re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
  5675. re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
  5676. re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');
  5677. //
  5678. // Compile each schema
  5679. //
  5680. var aliases = [];
  5681. self.__compiled__ = {}; // Reset compiled data
  5682. function schemaError(name, val) {
  5683. throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
  5684. }
  5685. Object.keys(self.__schemas__).forEach(function (name) {
  5686. var val = self.__schemas__[name];
  5687. // skip disabled methods
  5688. if (val === null) { return; }
  5689. var compiled = { validate: null, link: null };
  5690. self.__compiled__[name] = compiled;
  5691. if (isObject(val)) {
  5692. if (isRegExp(val.validate)) {
  5693. compiled.validate = createValidator(val.validate);
  5694. } else if (isFunction(val.validate)) {
  5695. compiled.validate = val.validate;
  5696. } else {
  5697. schemaError(name, val);
  5698. }
  5699. if (isFunction(val.normalize)) {
  5700. compiled.normalize = val.normalize;
  5701. } else if (!val.normalize) {
  5702. compiled.normalize = createNormalizer();
  5703. } else {
  5704. schemaError(name, val);
  5705. }
  5706. return;
  5707. }
  5708. if (isString(val)) {
  5709. aliases.push(name);
  5710. return;
  5711. }
  5712. schemaError(name, val);
  5713. });
  5714. //
  5715. // Compile postponed aliases
  5716. //
  5717. aliases.forEach(function (alias) {
  5718. if (!self.__compiled__[self.__schemas__[alias]]) {
  5719. // Silently fail on missed schemas to avoid errons on disable.
  5720. // schemaError(alias, self.__schemas__[alias]);
  5721. return;
  5722. }
  5723. self.__compiled__[alias].validate =
  5724. self.__compiled__[self.__schemas__[alias]].validate;
  5725. self.__compiled__[alias].normalize =
  5726. self.__compiled__[self.__schemas__[alias]].normalize;
  5727. });
  5728. //
  5729. // Fake record for guessed links
  5730. //
  5731. self.__compiled__[''] = { validate: null, normalize: createNormalizer() };
  5732. //
  5733. // Build schema condition
  5734. //
  5735. var slist = Object.keys(self.__compiled__)
  5736. .filter(function (name) {
  5737. // Filter disabled & fake schemas
  5738. return name.length > 0 && self.__compiled__[name];
  5739. })
  5740. .map(escapeRE)
  5741. .join('|');
  5742. // (?!_) cause 1.5x slowdown
  5743. self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
  5744. self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
  5745. self.re.pretest = RegExp(
  5746. '(' + self.re.schema_test.source + ')|' +
  5747. '(' + self.re.host_fuzzy_test.source + ')|' +
  5748. '@',
  5749. 'i');
  5750. //
  5751. // Cleanup
  5752. //
  5753. resetScanCache(self);
  5754. }
  5755. /**
  5756. * class Match
  5757. *
  5758. * Match result. Single element of array, returned by [[LinkifyIt#match]]
  5759. **/
  5760. function Match(self, shift) {
  5761. var start = self.__index__,
  5762. end = self.__last_index__,
  5763. text = self.__text_cache__.slice(start, end);
  5764. /**
  5765. * Match#schema -> String
  5766. *
  5767. * Prefix (protocol) for matched string.
  5768. **/
  5769. this.schema = self.__schema__.toLowerCase();
  5770. /**
  5771. * Match#index -> Number
  5772. *
  5773. * First position of matched string.
  5774. **/
  5775. this.index = start + shift;
  5776. /**
  5777. * Match#lastIndex -> Number
  5778. *
  5779. * Next position after matched string.
  5780. **/
  5781. this.lastIndex = end + shift;
  5782. /**
  5783. * Match#raw -> String
  5784. *
  5785. * Matched string.
  5786. **/
  5787. this.raw = text;
  5788. /**
  5789. * Match#text -> String
  5790. *
  5791. * Notmalized text of matched string.
  5792. **/
  5793. this.text = text;
  5794. /**
  5795. * Match#url -> String
  5796. *
  5797. * Normalized url of matched string.
  5798. **/
  5799. this.url = text;
  5800. }
  5801. function createMatch(self, shift) {
  5802. var match = new Match(self, shift);
  5803. self.__compiled__[match.schema].normalize(match, self);
  5804. return match;
  5805. }
  5806. /**
  5807. * class LinkifyIt
  5808. **/
  5809. /**
  5810. * new LinkifyIt(schemas, options)
  5811. * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
  5812. * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
  5813. *
  5814. * Creates new linkifier instance with optional additional schemas.
  5815. * Can be called without `new` keyword for convenience.
  5816. *
  5817. * By default understands:
  5818. *
  5819. * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
  5820. * - "fuzzy" links and emails (example.com, foo@bar.com).
  5821. *
  5822. * `schemas` is an object, where each key/value describes protocol/rule:
  5823. *
  5824. * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
  5825. * for example). `linkify-it` makes shure that prefix is not preceeded with
  5826. * alphanumeric char and symbols. Only whitespaces and punctuation allowed.
  5827. * - __value__ - rule to check tail after link prefix
  5828. * - _String_ - just alias to existing rule
  5829. * - _Object_
  5830. * - _validate_ - validator function (should return matched length on success),
  5831. * or `RegExp`.
  5832. * - _normalize_ - optional function to normalize text & url of matched result
  5833. * (for example, for @twitter mentions).
  5834. *
  5835. * `options`:
  5836. *
  5837. * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
  5838. * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
  5839. * like version numbers. Default `false`.
  5840. * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
  5841. *
  5842. **/
  5843. function LinkifyIt(schemas, options) {
  5844. if (!(this instanceof LinkifyIt)) {
  5845. return new LinkifyIt(schemas, options);
  5846. }
  5847. if (!options) {
  5848. if (isOptionsObj(schemas)) {
  5849. options = schemas;
  5850. schemas = {};
  5851. }
  5852. }
  5853. this.__opts__ = assign({}, defaultOptions, options);
  5854. // Cache last tested result. Used to skip repeating steps on next `match` call.
  5855. this.__index__ = -1;
  5856. this.__last_index__ = -1; // Next scan position
  5857. this.__schema__ = '';
  5858. this.__text_cache__ = '';
  5859. this.__schemas__ = assign({}, defaultSchemas, schemas);
  5860. this.__compiled__ = {};
  5861. this.__tlds__ = tlds_default;
  5862. this.__tlds_replaced__ = false;
  5863. this.re = {};
  5864. compile(this);
  5865. }
  5866. /** chainable
  5867. * LinkifyIt#add(schema, definition)
  5868. * - schema (String): rule name (fixed pattern prefix)
  5869. * - definition (String|RegExp|Object): schema definition
  5870. *
  5871. * Add new rule definition. See constructor description for details.
  5872. **/
  5873. LinkifyIt.prototype.add = function add(schema, definition) {
  5874. this.__schemas__[schema] = definition;
  5875. compile(this);
  5876. return this;
  5877. };
  5878. /** chainable
  5879. * LinkifyIt#set(options)
  5880. * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
  5881. *
  5882. * Set recognition options for links without schema.
  5883. **/
  5884. LinkifyIt.prototype.set = function set(options) {
  5885. this.__opts__ = assign(this.__opts__, options);
  5886. return this;
  5887. };
  5888. /**
  5889. * LinkifyIt#test(text) -> Boolean
  5890. *
  5891. * Searches linkifiable pattern and returns `true` on success or `false` on fail.
  5892. **/
  5893. LinkifyIt.prototype.test = function test(text) {
  5894. // Reset scan cache
  5895. this.__text_cache__ = text;
  5896. this.__index__ = -1;
  5897. if (!text.length) { return false; }
  5898. var m, ml, me, len, shift, next, re, tld_pos, at_pos;
  5899. // try to scan for link with schema - that's the most simple rule
  5900. if (this.re.schema_test.test(text)) {
  5901. re = this.re.schema_search;
  5902. re.lastIndex = 0;
  5903. while ((m = re.exec(text)) !== null) {
  5904. len = this.testSchemaAt(text, m[2], re.lastIndex);
  5905. if (len) {
  5906. this.__schema__ = m[2];
  5907. this.__index__ = m.index + m[1].length;
  5908. this.__last_index__ = m.index + m[0].length + len;
  5909. break;
  5910. }
  5911. }
  5912. }
  5913. if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
  5914. // guess schemaless links
  5915. tld_pos = text.search(this.re.host_fuzzy_test);
  5916. if (tld_pos >= 0) {
  5917. // if tld is located after found link - no need to check fuzzy pattern
  5918. if (this.__index__ < 0 || tld_pos < this.__index__) {
  5919. if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
  5920. shift = ml.index + ml[1].length;
  5921. if (this.__index__ < 0 || shift < this.__index__) {
  5922. this.__schema__ = '';
  5923. this.__index__ = shift;
  5924. this.__last_index__ = ml.index + ml[0].length;
  5925. }
  5926. }
  5927. }
  5928. }
  5929. }
  5930. if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
  5931. // guess schemaless emails
  5932. at_pos = text.indexOf('@');
  5933. if (at_pos >= 0) {
  5934. // We can't skip this check, because this cases are possible:
  5935. // 192.168.1.1@gmail.com, my.in@example.com
  5936. if ((me = text.match(this.re.email_fuzzy)) !== null) {
  5937. shift = me.index + me[1].length;
  5938. next = me.index + me[0].length;
  5939. if (this.__index__ < 0 || shift < this.__index__ ||
  5940. (shift === this.__index__ && next > this.__last_index__)) {
  5941. this.__schema__ = 'mailto:';
  5942. this.__index__ = shift;
  5943. this.__last_index__ = next;
  5944. }
  5945. }
  5946. }
  5947. }
  5948. return this.__index__ >= 0;
  5949. };
  5950. /**
  5951. * LinkifyIt#pretest(text) -> Boolean
  5952. *
  5953. * Very quick check, that can give false positives. Returns true if link MAY BE
  5954. * can exists. Can be used for speed optimization, when you need to check that
  5955. * link NOT exists.
  5956. **/
  5957. LinkifyIt.prototype.pretest = function pretest(text) {
  5958. return this.re.pretest.test(text);
  5959. };
  5960. /**
  5961. * LinkifyIt#testSchemaAt(text, name, position) -> Number
  5962. * - text (String): text to scan
  5963. * - name (String): rule (schema) name
  5964. * - position (Number): text offset to check from
  5965. *
  5966. * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
  5967. * at given position. Returns length of found pattern (0 on fail).
  5968. **/
  5969. LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
  5970. // If not supported schema check requested - terminate
  5971. if (!this.__compiled__[schema.toLowerCase()]) {
  5972. return 0;
  5973. }
  5974. return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
  5975. };
  5976. /**
  5977. * LinkifyIt#match(text) -> Array|null
  5978. *
  5979. * Returns array of found link descriptions or `null` on fail. We strongly
  5980. * recommend to use [[LinkifyIt#test]] first, for best speed.
  5981. *
  5982. * ##### Result match description
  5983. *
  5984. * - __schema__ - link schema, can be empty for fuzzy links, or `//` for
  5985. * protocol-neutral links.
  5986. * - __index__ - offset of matched text
  5987. * - __lastIndex__ - index of next char after mathch end
  5988. * - __raw__ - matched text
  5989. * - __text__ - normalized text
  5990. * - __url__ - link, generated from matched text
  5991. **/
  5992. LinkifyIt.prototype.match = function match(text) {
  5993. var shift = 0, result = [];
  5994. // Try to take previous element from cache, if .test() called before
  5995. if (this.__index__ >= 0 && this.__text_cache__ === text) {
  5996. result.push(createMatch(this, shift));
  5997. shift = this.__last_index__;
  5998. }
  5999. // Cut head if cache was used
  6000. var tail = shift ? text.slice(shift) : text;
  6001. // Scan string until end reached
  6002. while (this.test(tail)) {
  6003. result.push(createMatch(this, shift));
  6004. tail = tail.slice(this.__last_index__);
  6005. shift += this.__last_index__;
  6006. }
  6007. if (result.length) {
  6008. return result;
  6009. }
  6010. return null;
  6011. };
  6012. /** chainable
  6013. * LinkifyIt#tlds(list [, keepOld]) -> this
  6014. * - list (Array): list of tlds
  6015. * - keepOld (Boolean): merge with current list if `true` (`false` by default)
  6016. *
  6017. * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
  6018. * to avoid false positives. By default this algorythm used:
  6019. *
  6020. * - hostname with any 2-letter root zones are ok.
  6021. * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
  6022. * are ok.
  6023. * - encoded (`xn--...`) root zones are ok.
  6024. *
  6025. * If list is replaced, then exact match for 2-chars root zones will be checked.
  6026. **/
  6027. LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
  6028. list = Array.isArray(list) ? list : [ list ];
  6029. if (!keepOld) {
  6030. this.__tlds__ = list.slice();
  6031. this.__tlds_replaced__ = true;
  6032. compile(this);
  6033. return this;
  6034. }
  6035. this.__tlds__ = this.__tlds__.concat(list)
  6036. .sort()
  6037. .filter(function (el, idx, arr) {
  6038. return el !== arr[idx - 1];
  6039. })
  6040. .reverse();
  6041. compile(this);
  6042. return this;
  6043. };
  6044. /**
  6045. * LinkifyIt#normalize(match)
  6046. *
  6047. * Default normalizer (if schema does not define it's own).
  6048. **/
  6049. LinkifyIt.prototype.normalize = function normalize(match) {
  6050. // Do minimal possible changes by default. Need to collect feedback prior
  6051. // to move forward https://github.com/markdown-it/linkify-it/issues/1
  6052. if (!match.schema) { match.url = 'http://' + match.url; }
  6053. if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
  6054. match.url = 'mailto:' + match.url;
  6055. }
  6056. };
  6057. /**
  6058. * LinkifyIt#onCompile()
  6059. *
  6060. * Override to modify basic RegExp-s.
  6061. **/
  6062. LinkifyIt.prototype.onCompile = function onCompile() {
  6063. };
  6064. module.exports = LinkifyIt;
  6065. /***/ }),
  6066. /* 29 */
  6067. /***/ (function(module, exports, __webpack_require__) {
  6068. "use strict";
  6069. module.exports = function (opts) {
  6070. var re = {};
  6071. // Use direct extract instead of `regenerate` to reduse browserified size
  6072. re.src_Any = __webpack_require__(18).source;
  6073. re.src_Cc = __webpack_require__(16).source;
  6074. re.src_Z = __webpack_require__(17).source;
  6075. re.src_P = __webpack_require__(5).source;
  6076. // \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
  6077. re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join('|');
  6078. // \p{\Z\Cc} (white spaces + control)
  6079. re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');
  6080. // Experimental. List of chars, completely prohibited in links
  6081. // because can separate it from other part of text
  6082. var text_separators = '[><\uff5c]';
  6083. // All possible word characters (everything without punctuation, spaces & controls)
  6084. // Defined via punctuation & spaces to save space
  6085. // Should be something like \p{\L\N\S\M} (\w but without `_`)
  6086. re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
  6087. // The same as abothe but without [0-9]
  6088. // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
  6089. ////////////////////////////////////////////////////////////////////////////////
  6090. re.src_ip4 =
  6091. '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
  6092. // Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
  6093. re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?';
  6094. re.src_port =
  6095. '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?';
  6096. re.src_host_terminator =
  6097. '(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
  6098. re.src_path =
  6099. '(?:' +
  6100. '[/?#]' +
  6101. '(?:' +
  6102. '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-]).|' +
  6103. '\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' +
  6104. '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' +
  6105. '\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
  6106. '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
  6107. "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
  6108. "\\'(?=" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found
  6109. '\\.{2,3}[a-zA-Z0-9%/]|' + // github has ... in commit range links. Restrict to
  6110. // - english
  6111. // - percent-encoded
  6112. // - parts of file path
  6113. // until more examples found.
  6114. '\\.(?!' + re.src_ZCc + '|[.]).|' +
  6115. (opts && opts['---'] ?
  6116. '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate
  6117. :
  6118. '\\-+|'
  6119. ) +
  6120. '\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths
  6121. '\\!(?!' + re.src_ZCc + '|[!]).|' +
  6122. '\\?(?!' + re.src_ZCc + '|[?]).' +
  6123. ')+' +
  6124. '|\\/' +
  6125. ')?';
  6126. re.src_email_name =
  6127. '[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+';
  6128. re.src_xn =
  6129. 'xn--[a-z0-9\\-]{1,59}';
  6130. // More to read about domain names
  6131. // http://serverfault.com/questions/638260/
  6132. re.src_domain_root =
  6133. // Allow letters & digits (http://test1)
  6134. '(?:' +
  6135. re.src_xn +
  6136. '|' +
  6137. re.src_pseudo_letter + '{1,63}' +
  6138. ')';
  6139. re.src_domain =
  6140. '(?:' +
  6141. re.src_xn +
  6142. '|' +
  6143. '(?:' + re.src_pseudo_letter + ')' +
  6144. '|' +
  6145. // don't allow `--` in domain names, because:
  6146. // - that can conflict with markdown &mdash; / &ndash;
  6147. // - nobody use those anyway
  6148. '(?:' + re.src_pseudo_letter + '(?:-(?!-)|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +
  6149. ')';
  6150. re.src_host =
  6151. '(?:' +
  6152. // Don't need IP check, because digits are already allowed in normal domain names
  6153. // src_ip4 +
  6154. // '|' +
  6155. '(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain/*_root*/ + ')' +
  6156. ')';
  6157. re.tpl_host_fuzzy =
  6158. '(?:' +
  6159. re.src_ip4 +
  6160. '|' +
  6161. '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' +
  6162. ')';
  6163. re.tpl_host_no_ip_fuzzy =
  6164. '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))';
  6165. re.src_host_strict =
  6166. re.src_host + re.src_host_terminator;
  6167. re.tpl_host_fuzzy_strict =
  6168. re.tpl_host_fuzzy + re.src_host_terminator;
  6169. re.src_host_port_strict =
  6170. re.src_host + re.src_port + re.src_host_terminator;
  6171. re.tpl_host_port_fuzzy_strict =
  6172. re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;
  6173. re.tpl_host_port_no_ip_fuzzy_strict =
  6174. re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;
  6175. ////////////////////////////////////////////////////////////////////////////////
  6176. // Main rules
  6177. // Rude test fuzzy links by host, for quick deny
  6178. re.tpl_host_fuzzy_test =
  6179. 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';
  6180. re.tpl_email_fuzzy =
  6181. '(^|' + text_separators + '|\\(|' + re.src_ZCc + ')(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
  6182. re.tpl_link_fuzzy =
  6183. // Fuzzy link can't be prepended with .:/\- and non punctuation.
  6184. // but can start with > (markdown blockquote)
  6185. '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
  6186. '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
  6187. re.tpl_link_no_ip_fuzzy =
  6188. // Fuzzy link can't be prepended with .:/\- and non punctuation.
  6189. // but can start with > (markdown blockquote)
  6190. '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
  6191. '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
  6192. return re;
  6193. };
  6194. /***/ }),
  6195. /* 30 */
  6196. /***/ (function(module, exports, __webpack_require__) {
  6197. "use strict";
  6198. // List of valid html blocks names, accorting to commonmark spec
  6199. // http://jgm.github.io/CommonMark/spec.html#html-blocks
  6200. module.exports = [
  6201. 'address',
  6202. 'article',
  6203. 'aside',
  6204. 'base',
  6205. 'basefont',
  6206. 'blockquote',
  6207. 'body',
  6208. 'caption',
  6209. 'center',
  6210. 'col',
  6211. 'colgroup',
  6212. 'dd',
  6213. 'details',
  6214. 'dialog',
  6215. 'dir',
  6216. 'div',
  6217. 'dl',
  6218. 'dt',
  6219. 'fieldset',
  6220. 'figcaption',
  6221. 'figure',
  6222. 'footer',
  6223. 'form',
  6224. 'frame',
  6225. 'frameset',
  6226. 'h1',
  6227. 'h2',
  6228. 'h3',
  6229. 'h4',
  6230. 'h5',
  6231. 'h6',
  6232. 'head',
  6233. 'header',
  6234. 'hr',
  6235. 'html',
  6236. 'iframe',
  6237. 'legend',
  6238. 'li',
  6239. 'link',
  6240. 'main',
  6241. 'menu',
  6242. 'menuitem',
  6243. 'meta',
  6244. 'nav',
  6245. 'noframes',
  6246. 'ol',
  6247. 'optgroup',
  6248. 'option',
  6249. 'p',
  6250. 'param',
  6251. 'pre',
  6252. 'section',
  6253. 'source',
  6254. 'title',
  6255. 'summary',
  6256. 'table',
  6257. 'tbody',
  6258. 'td',
  6259. 'tfoot',
  6260. 'th',
  6261. 'thead',
  6262. 'title',
  6263. 'tr',
  6264. 'track',
  6265. 'ul'
  6266. ];
  6267. /***/ }),
  6268. /* 31 */
  6269. /***/ (function(module, exports, __webpack_require__) {
  6270. "use strict";
  6271. // Just a shortcut for bulk export
  6272. exports.parseLinkLabel = __webpack_require__(33);
  6273. exports.parseLinkDestination = __webpack_require__(32);
  6274. exports.parseLinkTitle = __webpack_require__(34);
  6275. /***/ }),
  6276. /* 32 */
  6277. /***/ (function(module, exports, __webpack_require__) {
  6278. "use strict";
  6279. // Parse link destination
  6280. //
  6281. var isSpace = __webpack_require__(0).isSpace;
  6282. var unescapeAll = __webpack_require__(0).unescapeAll;
  6283. module.exports = function parseLinkDestination(str, pos, max) {
  6284. var code, level,
  6285. lines = 0,
  6286. start = pos,
  6287. result = {
  6288. ok: false,
  6289. pos: 0,
  6290. lines: 0,
  6291. str: ''
  6292. };
  6293. if (str.charCodeAt(pos) === 0x3C /* < */) {
  6294. pos++;
  6295. while (pos < max) {
  6296. code = str.charCodeAt(pos);
  6297. if (code === 0x0A /* \n */ || isSpace(code)) { return result; }
  6298. if (code === 0x3E /* > */) {
  6299. result.pos = pos + 1;
  6300. result.str = unescapeAll(str.slice(start + 1, pos));
  6301. result.ok = true;
  6302. return result;
  6303. }
  6304. if (code === 0x5C /* \ */ && pos + 1 < max) {
  6305. pos += 2;
  6306. continue;
  6307. }
  6308. pos++;
  6309. }
  6310. // no closing '>'
  6311. return result;
  6312. }
  6313. // this should be ... } else { ... branch
  6314. level = 0;
  6315. while (pos < max) {
  6316. code = str.charCodeAt(pos);
  6317. if (code === 0x20) { break; }
  6318. // ascii control characters
  6319. if (code < 0x20 || code === 0x7F) { break; }
  6320. if (code === 0x5C /* \ */ && pos + 1 < max) {
  6321. pos += 2;
  6322. continue;
  6323. }
  6324. if (code === 0x28 /* ( */) {
  6325. level++;
  6326. if (level > 1) { break; }
  6327. }
  6328. if (code === 0x29 /* ) */) {
  6329. level--;
  6330. if (level < 0) { break; }
  6331. }
  6332. pos++;
  6333. }
  6334. if (start === pos) { return result; }
  6335. result.str = unescapeAll(str.slice(start, pos));
  6336. result.lines = lines;
  6337. result.pos = pos;
  6338. result.ok = true;
  6339. return result;
  6340. };
  6341. /***/ }),
  6342. /* 33 */
  6343. /***/ (function(module, exports, __webpack_require__) {
  6344. "use strict";
  6345. // Parse link label
  6346. //
  6347. // this function assumes that first character ("[") already matches;
  6348. // returns the end of the label
  6349. //
  6350. module.exports = function parseLinkLabel(state, start, disableNested) {
  6351. var level, found, marker, prevPos,
  6352. labelEnd = -1,
  6353. max = state.posMax,
  6354. oldPos = state.pos;
  6355. state.pos = start + 1;
  6356. level = 1;
  6357. while (state.pos < max) {
  6358. marker = state.src.charCodeAt(state.pos);
  6359. if (marker === 0x5D /* ] */) {
  6360. level--;
  6361. if (level === 0) {
  6362. found = true;
  6363. break;
  6364. }
  6365. }
  6366. prevPos = state.pos;
  6367. state.md.inline.skipToken(state);
  6368. if (marker === 0x5B /* [ */) {
  6369. if (prevPos === state.pos - 1) {
  6370. // increase level if we find text `[`, which is not a part of any token
  6371. level++;
  6372. } else if (disableNested) {
  6373. state.pos = oldPos;
  6374. return -1;
  6375. }
  6376. }
  6377. }
  6378. if (found) {
  6379. labelEnd = state.pos;
  6380. }
  6381. // restore old state
  6382. state.pos = oldPos;
  6383. return labelEnd;
  6384. };
  6385. /***/ }),
  6386. /* 34 */
  6387. /***/ (function(module, exports, __webpack_require__) {
  6388. "use strict";
  6389. // Parse link title
  6390. //
  6391. var unescapeAll = __webpack_require__(0).unescapeAll;
  6392. module.exports = function parseLinkTitle(str, pos, max) {
  6393. var code,
  6394. marker,
  6395. lines = 0,
  6396. start = pos,
  6397. result = {
  6398. ok: false,
  6399. pos: 0,
  6400. lines: 0,
  6401. str: ''
  6402. };
  6403. if (pos >= max) { return result; }
  6404. marker = str.charCodeAt(pos);
  6405. if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }
  6406. pos++;
  6407. // if opening marker is "(", switch it to closing marker ")"
  6408. if (marker === 0x28) { marker = 0x29; }
  6409. while (pos < max) {
  6410. code = str.charCodeAt(pos);
  6411. if (code === marker) {
  6412. result.pos = pos + 1;
  6413. result.lines = lines;
  6414. result.str = unescapeAll(str.slice(start + 1, pos));
  6415. result.ok = true;
  6416. return result;
  6417. } else if (code === 0x0A) {
  6418. lines++;
  6419. } else if (code === 0x5C /* \ */ && pos + 1 < max) {
  6420. pos++;
  6421. if (str.charCodeAt(pos) === 0x0A) {
  6422. lines++;
  6423. }
  6424. }
  6425. pos++;
  6426. }
  6427. return result;
  6428. };
  6429. /***/ }),
  6430. /* 35 */
  6431. /***/ (function(module, exports, __webpack_require__) {
  6432. "use strict";
  6433. // Main parser class
  6434. var utils = __webpack_require__(0);
  6435. var helpers = __webpack_require__(31);
  6436. var Renderer = __webpack_require__(42);
  6437. var ParserCore = __webpack_require__(37);
  6438. var ParserBlock = __webpack_require__(36);
  6439. var ParserInline = __webpack_require__(38);
  6440. var LinkifyIt = __webpack_require__(28);
  6441. var mdurl = __webpack_require__(15);
  6442. var punycode = __webpack_require__(79);
  6443. var config = {
  6444. 'default': __webpack_require__(40),
  6445. zero: __webpack_require__(41),
  6446. commonmark: __webpack_require__(39)
  6447. };
  6448. ////////////////////////////////////////////////////////////////////////////////
  6449. //
  6450. // This validator can prohibit more than really needed to prevent XSS. It's a
  6451. // tradeoff to keep code simple and to be secure by default.
  6452. //
  6453. // If you need different setup - override validator method as you wish. Or
  6454. // replace it with dummy function and use external sanitizer.
  6455. //
  6456. var BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
  6457. var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
  6458. function validateLink(url) {
  6459. // url should be normalized at this point, and existing entities are decoded
  6460. var str = url.trim().toLowerCase();
  6461. return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;
  6462. }
  6463. ////////////////////////////////////////////////////////////////////////////////
  6464. var RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];
  6465. function normalizeLink(url) {
  6466. var parsed = mdurl.parse(url, true);
  6467. if (parsed.hostname) {
  6468. // Encode hostnames in urls like:
  6469. // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
  6470. //
  6471. // We don't encode unknown schemas, because it's likely that we encode
  6472. // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
  6473. //
  6474. if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
  6475. try {
  6476. parsed.hostname = punycode.toASCII(parsed.hostname);
  6477. } catch (er) { /**/ }
  6478. }
  6479. }
  6480. return mdurl.encode(mdurl.format(parsed));
  6481. }
  6482. function normalizeLinkText(url) {
  6483. var parsed = mdurl.parse(url, true);
  6484. if (parsed.hostname) {
  6485. // Encode hostnames in urls like:
  6486. // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
  6487. //
  6488. // We don't encode unknown schemas, because it's likely that we encode
  6489. // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
  6490. //
  6491. if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
  6492. try {
  6493. parsed.hostname = punycode.toUnicode(parsed.hostname);
  6494. } catch (er) { /**/ }
  6495. }
  6496. }
  6497. return mdurl.decode(mdurl.format(parsed));
  6498. }
  6499. /**
  6500. * class MarkdownIt
  6501. *
  6502. * Main parser/renderer class.
  6503. *
  6504. * ##### Usage
  6505. *
  6506. * ```javascript
  6507. * // node.js, "classic" way:
  6508. * var MarkdownIt = require('markdown-it'),
  6509. * md = new MarkdownIt();
  6510. * var result = md.render('# markdown-it rulezz!');
  6511. *
  6512. * // node.js, the same, but with sugar:
  6513. * var md = require('markdown-it')();
  6514. * var result = md.render('# markdown-it rulezz!');
  6515. *
  6516. * // browser without AMD, added to "window" on script load
  6517. * // Note, there are no dash.
  6518. * var md = window.markdownit();
  6519. * var result = md.render('# markdown-it rulezz!');
  6520. * ```
  6521. *
  6522. * Single line rendering, without paragraph wrap:
  6523. *
  6524. * ```javascript
  6525. * var md = require('markdown-it')();
  6526. * var result = md.renderInline('__markdown-it__ rulezz!');
  6527. * ```
  6528. **/
  6529. /**
  6530. * new MarkdownIt([presetName, options])
  6531. * - presetName (String): optional, `commonmark` / `zero`
  6532. * - options (Object)
  6533. *
  6534. * Creates parser instanse with given config. Can be called without `new`.
  6535. *
  6536. * ##### presetName
  6537. *
  6538. * MarkdownIt provides named presets as a convenience to quickly
  6539. * enable/disable active syntax rules and options for common use cases.
  6540. *
  6541. * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
  6542. * configures parser to strict [CommonMark](http://commonmark.org/) mode.
  6543. * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
  6544. * similar to GFM, used when no preset name given. Enables all available rules,
  6545. * but still without html, typographer & autolinker.
  6546. * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
  6547. * all rules disabled. Useful to quickly setup your config via `.enable()`.
  6548. * For example, when you need only `bold` and `italic` markup and nothing else.
  6549. *
  6550. * ##### options:
  6551. *
  6552. * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
  6553. * That's not safe! You may need external sanitizer to protect output from XSS.
  6554. * It's better to extend features via plugins, instead of enabling HTML.
  6555. * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
  6556. * (`<br />`). This is needed only for full CommonMark compatibility. In real
  6557. * world you will need HTML output.
  6558. * - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
  6559. * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
  6560. * Can be useful for external highlighters.
  6561. * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
  6562. * - __typographer__ - `false`. Set `true` to enable [some language-neutral
  6563. * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
  6564. * quotes beautification (smartquotes).
  6565. * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
  6566. * pairs, when typographer enabled and smartquotes on. For example, you can
  6567. * use `'«»„“'` for Russian, `'„“‚‘'` for German, and
  6568. * `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
  6569. * - __highlight__ - `null`. Highlighter function for fenced code blocks.
  6570. * Highlighter `function (str, lang)` should return escaped HTML. It can also
  6571. * return empty string if the source was not changed and should be escaped
  6572. * externaly. If result starts with <pre... internal wrapper is skipped.
  6573. *
  6574. * ##### Example
  6575. *
  6576. * ```javascript
  6577. * // commonmark mode
  6578. * var md = require('markdown-it')('commonmark');
  6579. *
  6580. * // default mode
  6581. * var md = require('markdown-it')();
  6582. *
  6583. * // enable everything
  6584. * var md = require('markdown-it')({
  6585. * html: true,
  6586. * linkify: true,
  6587. * typographer: true
  6588. * });
  6589. * ```
  6590. *
  6591. * ##### Syntax highlighting
  6592. *
  6593. * ```js
  6594. * var hljs = require('highlight.js') // https://highlightjs.org/
  6595. *
  6596. * var md = require('markdown-it')({
  6597. * highlight: function (str, lang) {
  6598. * if (lang && hljs.getLanguage(lang)) {
  6599. * try {
  6600. * return hljs.highlight(lang, str, true).value;
  6601. * } catch (__) {}
  6602. * }
  6603. *
  6604. * return ''; // use external default escaping
  6605. * }
  6606. * });
  6607. * ```
  6608. *
  6609. * Or with full wrapper override (if you need assign class to `<pre>`):
  6610. *
  6611. * ```javascript
  6612. * var hljs = require('highlight.js') // https://highlightjs.org/
  6613. *
  6614. * // Actual default values
  6615. * var md = require('markdown-it')({
  6616. * highlight: function (str, lang) {
  6617. * if (lang && hljs.getLanguage(lang)) {
  6618. * try {
  6619. * return '<pre class="hljs"><code>' +
  6620. * hljs.highlight(lang, str, true).value +
  6621. * '</code></pre>';
  6622. * } catch (__) {}
  6623. * }
  6624. *
  6625. * return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
  6626. * }
  6627. * });
  6628. * ```
  6629. *
  6630. **/
  6631. function MarkdownIt(presetName, options) {
  6632. if (!(this instanceof MarkdownIt)) {
  6633. return new MarkdownIt(presetName, options);
  6634. }
  6635. if (!options) {
  6636. if (!utils.isString(presetName)) {
  6637. options = presetName || {};
  6638. presetName = 'default';
  6639. }
  6640. }
  6641. /**
  6642. * MarkdownIt#inline -> ParserInline
  6643. *
  6644. * Instance of [[ParserInline]]. You may need it to add new rules when
  6645. * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
  6646. * [[MarkdownIt.enable]].
  6647. **/
  6648. this.inline = new ParserInline();
  6649. /**
  6650. * MarkdownIt#block -> ParserBlock
  6651. *
  6652. * Instance of [[ParserBlock]]. You may need it to add new rules when
  6653. * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
  6654. * [[MarkdownIt.enable]].
  6655. **/
  6656. this.block = new ParserBlock();
  6657. /**
  6658. * MarkdownIt#core -> Core
  6659. *
  6660. * Instance of [[Core]] chain executor. You may need it to add new rules when
  6661. * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
  6662. * [[MarkdownIt.enable]].
  6663. **/
  6664. this.core = new ParserCore();
  6665. /**
  6666. * MarkdownIt#renderer -> Renderer
  6667. *
  6668. * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
  6669. * rules for new token types, generated by plugins.
  6670. *
  6671. * ##### Example
  6672. *
  6673. * ```javascript
  6674. * var md = require('markdown-it')();
  6675. *
  6676. * function myToken(tokens, idx, options, env, self) {
  6677. * //...
  6678. * return result;
  6679. * };
  6680. *
  6681. * md.renderer.rules['my_token'] = myToken
  6682. * ```
  6683. *
  6684. * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
  6685. **/
  6686. this.renderer = new Renderer();
  6687. /**
  6688. * MarkdownIt#linkify -> LinkifyIt
  6689. *
  6690. * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
  6691. * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
  6692. * rule.
  6693. **/
  6694. this.linkify = new LinkifyIt();
  6695. /**
  6696. * MarkdownIt#validateLink(url) -> Boolean
  6697. *
  6698. * Link validation function. CommonMark allows too much in links. By default
  6699. * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
  6700. * except some embedded image types.
  6701. *
  6702. * You can change this behaviour:
  6703. *
  6704. * ```javascript
  6705. * var md = require('markdown-it')();
  6706. * // enable everything
  6707. * md.validateLink = function () { return true; }
  6708. * ```
  6709. **/
  6710. this.validateLink = validateLink;
  6711. /**
  6712. * MarkdownIt#normalizeLink(url) -> String
  6713. *
  6714. * Function used to encode link url to a machine-readable format,
  6715. * which includes url-encoding, punycode, etc.
  6716. **/
  6717. this.normalizeLink = normalizeLink;
  6718. /**
  6719. * MarkdownIt#normalizeLinkText(url) -> String
  6720. *
  6721. * Function used to decode link url to a human-readable format`
  6722. **/
  6723. this.normalizeLinkText = normalizeLinkText;
  6724. // Expose utils & helpers for easy acces from plugins
  6725. /**
  6726. * MarkdownIt#utils -> utils
  6727. *
  6728. * Assorted utility functions, useful to write plugins. See details
  6729. * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
  6730. **/
  6731. this.utils = utils;
  6732. /**
  6733. * MarkdownIt#helpers -> helpers
  6734. *
  6735. * Link components parser functions, useful to write plugins. See details
  6736. * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
  6737. **/
  6738. this.helpers = utils.assign({}, helpers);
  6739. this.options = {};
  6740. this.configure(presetName);
  6741. if (options) { this.set(options); }
  6742. }
  6743. /** chainable
  6744. * MarkdownIt.set(options)
  6745. *
  6746. * Set parser options (in the same format as in constructor). Probably, you
  6747. * will never need it, but you can change options after constructor call.
  6748. *
  6749. * ##### Example
  6750. *
  6751. * ```javascript
  6752. * var md = require('markdown-it')()
  6753. * .set({ html: true, breaks: true })
  6754. * .set({ typographer, true });
  6755. * ```
  6756. *
  6757. * __Note:__ To achieve the best possible performance, don't modify a
  6758. * `markdown-it` instance options on the fly. If you need multiple configurations
  6759. * it's best to create multiple instances and initialize each with separate
  6760. * config.
  6761. **/
  6762. MarkdownIt.prototype.set = function (options) {
  6763. utils.assign(this.options, options);
  6764. return this;
  6765. };
  6766. /** chainable, internal
  6767. * MarkdownIt.configure(presets)
  6768. *
  6769. * Batch load of all options and compenent settings. This is internal method,
  6770. * and you probably will not need it. But if you with - see available presets
  6771. * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
  6772. *
  6773. * We strongly recommend to use presets instead of direct config loads. That
  6774. * will give better compatibility with next versions.
  6775. **/
  6776. MarkdownIt.prototype.configure = function (presets) {
  6777. var self = this, presetName;
  6778. if (utils.isString(presets)) {
  6779. presetName = presets;
  6780. presets = config[presetName];
  6781. if (!presets) { throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); }
  6782. }
  6783. if (!presets) { throw new Error('Wrong `markdown-it` preset, can\'t be empty'); }
  6784. if (presets.options) { self.set(presets.options); }
  6785. if (presets.components) {
  6786. Object.keys(presets.components).forEach(function (name) {
  6787. if (presets.components[name].rules) {
  6788. self[name].ruler.enableOnly(presets.components[name].rules);
  6789. }
  6790. if (presets.components[name].rules2) {
  6791. self[name].ruler2.enableOnly(presets.components[name].rules2);
  6792. }
  6793. });
  6794. }
  6795. return this;
  6796. };
  6797. /** chainable
  6798. * MarkdownIt.enable(list, ignoreInvalid)
  6799. * - list (String|Array): rule name or list of rule names to enable
  6800. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  6801. *
  6802. * Enable list or rules. It will automatically find appropriate components,
  6803. * containing rules with given names. If rule not found, and `ignoreInvalid`
  6804. * not set - throws exception.
  6805. *
  6806. * ##### Example
  6807. *
  6808. * ```javascript
  6809. * var md = require('markdown-it')()
  6810. * .enable(['sub', 'sup'])
  6811. * .disable('smartquotes');
  6812. * ```
  6813. **/
  6814. MarkdownIt.prototype.enable = function (list, ignoreInvalid) {
  6815. var result = [];
  6816. if (!Array.isArray(list)) { list = [ list ]; }
  6817. [ 'core', 'block', 'inline' ].forEach(function (chain) {
  6818. result = result.concat(this[chain].ruler.enable(list, true));
  6819. }, this);
  6820. result = result.concat(this.inline.ruler2.enable(list, true));
  6821. var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
  6822. if (missed.length && !ignoreInvalid) {
  6823. throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
  6824. }
  6825. return this;
  6826. };
  6827. /** chainable
  6828. * MarkdownIt.disable(list, ignoreInvalid)
  6829. * - list (String|Array): rule name or list of rule names to disable.
  6830. * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
  6831. *
  6832. * The same as [[MarkdownIt.enable]], but turn specified rules off.
  6833. **/
  6834. MarkdownIt.prototype.disable = function (list, ignoreInvalid) {
  6835. var result = [];
  6836. if (!Array.isArray(list)) { list = [ list ]; }
  6837. [ 'core', 'block', 'inline' ].forEach(function (chain) {
  6838. result = result.concat(this[chain].ruler.disable(list, true));
  6839. }, this);
  6840. result = result.concat(this.inline.ruler2.disable(list, true));
  6841. var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
  6842. if (missed.length && !ignoreInvalid) {
  6843. throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
  6844. }
  6845. return this;
  6846. };
  6847. /** chainable
  6848. * MarkdownIt.use(plugin, params)
  6849. *
  6850. * Load specified plugin with given params into current parser instance.
  6851. * It's just a sugar to call `plugin(md, params)` with curring.
  6852. *
  6853. * ##### Example
  6854. *
  6855. * ```javascript
  6856. * var iterator = require('markdown-it-for-inline');
  6857. * var md = require('markdown-it')()
  6858. * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
  6859. * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
  6860. * });
  6861. * ```
  6862. **/
  6863. MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
  6864. var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
  6865. plugin.apply(plugin, args);
  6866. return this;
  6867. };
  6868. /** internal
  6869. * MarkdownIt.parse(src, env) -> Array
  6870. * - src (String): source string
  6871. * - env (Object): environment sandbox
  6872. *
  6873. * Parse input string and returns list of block tokens (special token type
  6874. * "inline" will contain list of inline tokens). You should not call this
  6875. * method directly, until you write custom renderer (for example, to produce
  6876. * AST).
  6877. *
  6878. * `env` is used to pass data between "distributed" rules and return additional
  6879. * metadata like reference info, needed for the renderer. It also can be used to
  6880. * inject data in specific cases. Usually, you will be ok to pass `{}`,
  6881. * and then pass updated object to renderer.
  6882. **/
  6883. MarkdownIt.prototype.parse = function (src, env) {
  6884. if (typeof src !== 'string') {
  6885. throw new Error('Input data should be a String');
  6886. }
  6887. var state = new this.core.State(src, this, env);
  6888. this.core.process(state);
  6889. return state.tokens;
  6890. };
  6891. /**
  6892. * MarkdownIt.render(src [, env]) -> String
  6893. * - src (String): source string
  6894. * - env (Object): environment sandbox
  6895. *
  6896. * Render markdown string into html. It does all magic for you :).
  6897. *
  6898. * `env` can be used to inject additional metadata (`{}` by default).
  6899. * But you will not need it with high probability. See also comment
  6900. * in [[MarkdownIt.parse]].
  6901. **/
  6902. MarkdownIt.prototype.render = function (src, env) {
  6903. env = env || {};
  6904. return this.renderer.render(this.parse(src, env), this.options, env);
  6905. };
  6906. /** internal
  6907. * MarkdownIt.parseInline(src, env) -> Array
  6908. * - src (String): source string
  6909. * - env (Object): environment sandbox
  6910. *
  6911. * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
  6912. * block tokens list with the single `inline` element, containing parsed inline
  6913. * tokens in `children` property. Also updates `env` object.
  6914. **/
  6915. MarkdownIt.prototype.parseInline = function (src, env) {
  6916. var state = new this.core.State(src, this, env);
  6917. state.inlineMode = true;
  6918. this.core.process(state);
  6919. return state.tokens;
  6920. };
  6921. /**
  6922. * MarkdownIt.renderInline(src [, env]) -> String
  6923. * - src (String): source string
  6924. * - env (Object): environment sandbox
  6925. *
  6926. * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
  6927. * will NOT be wrapped into `<p>` tags.
  6928. **/
  6929. MarkdownIt.prototype.renderInline = function (src, env) {
  6930. env = env || {};
  6931. return this.renderer.render(this.parseInline(src, env), this.options, env);
  6932. };
  6933. module.exports = MarkdownIt;
  6934. /***/ }),
  6935. /* 36 */
  6936. /***/ (function(module, exports, __webpack_require__) {
  6937. "use strict";
  6938. /** internal
  6939. * class ParserBlock
  6940. *
  6941. * Block-level tokenizer.
  6942. **/
  6943. var Ruler = __webpack_require__(3);
  6944. var _rules = [
  6945. // First 2 params - rule name & source. Secondary array - list of rules,
  6946. // which can be terminated by this one.
  6947. [ 'table', __webpack_require__(54), [ 'paragraph', 'reference' ] ],
  6948. [ 'code', __webpack_require__(44) ],
  6949. [ 'fence', __webpack_require__(45), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
  6950. [ 'blockquote', __webpack_require__(43), [ 'paragraph', 'reference', 'list' ] ],
  6951. [ 'hr', __webpack_require__(47), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
  6952. [ 'list', __webpack_require__(50), [ 'paragraph', 'reference', 'blockquote' ] ],
  6953. [ 'reference', __webpack_require__(52) ],
  6954. [ 'heading', __webpack_require__(46), [ 'paragraph', 'reference', 'blockquote' ] ],
  6955. [ 'lheading', __webpack_require__(49) ],
  6956. [ 'html_block', __webpack_require__(48), [ 'paragraph', 'reference', 'blockquote' ] ],
  6957. [ 'paragraph', __webpack_require__(51) ]
  6958. ];
  6959. /**
  6960. * new ParserBlock()
  6961. **/
  6962. function ParserBlock() {
  6963. /**
  6964. * ParserBlock#ruler -> Ruler
  6965. *
  6966. * [[Ruler]] instance. Keep configuration of block rules.
  6967. **/
  6968. this.ruler = new Ruler();
  6969. for (var i = 0; i < _rules.length; i++) {
  6970. this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });
  6971. }
  6972. }
  6973. // Generate tokens for input range
  6974. //
  6975. ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
  6976. var ok, i,
  6977. rules = this.ruler.getRules(''),
  6978. len = rules.length,
  6979. line = startLine,
  6980. hasEmptyLines = false,
  6981. maxNesting = state.md.options.maxNesting;
  6982. while (line < endLine) {
  6983. state.line = line = state.skipEmptyLines(line);
  6984. if (line >= endLine) { break; }
  6985. // Termination condition for nested calls.
  6986. // Nested calls currently used for blockquotes & lists
  6987. if (state.sCount[line] < state.blkIndent) { break; }
  6988. // If nesting level exceeded - skip tail to the end. That's not ordinary
  6989. // situation and we should not care about content.
  6990. if (state.level >= maxNesting) {
  6991. state.line = endLine;
  6992. break;
  6993. }
  6994. // Try all possible rules.
  6995. // On success, rule should:
  6996. //
  6997. // - update `state.line`
  6998. // - update `state.tokens`
  6999. // - return true
  7000. for (i = 0; i < len; i++) {
  7001. ok = rules[i](state, line, endLine, false);
  7002. if (ok) { break; }
  7003. }
  7004. // set state.tight iff we had an empty line before current tag
  7005. // i.e. latest empty line should not count
  7006. state.tight = !hasEmptyLines;
  7007. // paragraph might "eat" one newline after it in nested lists
  7008. if (state.isEmpty(state.line - 1)) {
  7009. hasEmptyLines = true;
  7010. }
  7011. line = state.line;
  7012. if (line < endLine && state.isEmpty(line)) {
  7013. hasEmptyLines = true;
  7014. line++;
  7015. state.line = line;
  7016. }
  7017. }
  7018. };
  7019. /**
  7020. * ParserBlock.parse(str, md, env, outTokens)
  7021. *
  7022. * Process input string and push block tokens into `outTokens`
  7023. **/
  7024. ParserBlock.prototype.parse = function (src, md, env, outTokens) {
  7025. var state;
  7026. if (!src) { return; }
  7027. state = new this.State(src, md, env, outTokens);
  7028. this.tokenize(state, state.line, state.lineMax);
  7029. };
  7030. ParserBlock.prototype.State = __webpack_require__(53);
  7031. module.exports = ParserBlock;
  7032. /***/ }),
  7033. /* 37 */
  7034. /***/ (function(module, exports, __webpack_require__) {
  7035. "use strict";
  7036. /** internal
  7037. * class Core
  7038. *
  7039. * Top-level rules executor. Glues block/inline parsers and does intermediate
  7040. * transformations.
  7041. **/
  7042. var Ruler = __webpack_require__(3);
  7043. var _rules = [
  7044. [ 'normalize', __webpack_require__(58) ],
  7045. [ 'block', __webpack_require__(55) ],
  7046. [ 'inline', __webpack_require__(56) ],
  7047. [ 'linkify', __webpack_require__(57) ],
  7048. [ 'replacements', __webpack_require__(59) ],
  7049. [ 'smartquotes', __webpack_require__(60) ]
  7050. ];
  7051. /**
  7052. * new Core()
  7053. **/
  7054. function Core() {
  7055. /**
  7056. * Core#ruler -> Ruler
  7057. *
  7058. * [[Ruler]] instance. Keep configuration of core rules.
  7059. **/
  7060. this.ruler = new Ruler();
  7061. for (var i = 0; i < _rules.length; i++) {
  7062. this.ruler.push(_rules[i][0], _rules[i][1]);
  7063. }
  7064. }
  7065. /**
  7066. * Core.process(state)
  7067. *
  7068. * Executes core chain rules.
  7069. **/
  7070. Core.prototype.process = function (state) {
  7071. var i, l, rules;
  7072. rules = this.ruler.getRules('');
  7073. for (i = 0, l = rules.length; i < l; i++) {
  7074. rules[i](state);
  7075. }
  7076. };
  7077. Core.prototype.State = __webpack_require__(61);
  7078. module.exports = Core;
  7079. /***/ }),
  7080. /* 38 */
  7081. /***/ (function(module, exports, __webpack_require__) {
  7082. "use strict";
  7083. /** internal
  7084. * class ParserInline
  7085. *
  7086. * Tokenizes paragraph content.
  7087. **/
  7088. var Ruler = __webpack_require__(3);
  7089. ////////////////////////////////////////////////////////////////////////////////
  7090. // Parser rules
  7091. var _rules = [
  7092. [ 'text', __webpack_require__(72) ],
  7093. [ 'newline', __webpack_require__(70) ],
  7094. [ 'escape', __webpack_require__(66) ],
  7095. [ 'backticks', __webpack_require__(63) ],
  7096. [ 'strikethrough', __webpack_require__(14).tokenize ],
  7097. [ 'emphasis', __webpack_require__(13).tokenize ],
  7098. [ 'link', __webpack_require__(69) ],
  7099. [ 'image', __webpack_require__(68) ],
  7100. [ 'autolink', __webpack_require__(62) ],
  7101. [ 'html_inline', __webpack_require__(67) ],
  7102. [ 'entity', __webpack_require__(65) ]
  7103. ];
  7104. var _rules2 = [
  7105. [ 'balance_pairs', __webpack_require__(64) ],
  7106. [ 'strikethrough', __webpack_require__(14).postProcess ],
  7107. [ 'emphasis', __webpack_require__(13).postProcess ],
  7108. [ 'text_collapse', __webpack_require__(73) ]
  7109. ];
  7110. /**
  7111. * new ParserInline()
  7112. **/
  7113. function ParserInline() {
  7114. var i;
  7115. /**
  7116. * ParserInline#ruler -> Ruler
  7117. *
  7118. * [[Ruler]] instance. Keep configuration of inline rules.
  7119. **/
  7120. this.ruler = new Ruler();
  7121. for (i = 0; i < _rules.length; i++) {
  7122. this.ruler.push(_rules[i][0], _rules[i][1]);
  7123. }
  7124. /**
  7125. * ParserInline#ruler2 -> Ruler
  7126. *
  7127. * [[Ruler]] instance. Second ruler used for post-processing
  7128. * (e.g. in emphasis-like rules).
  7129. **/
  7130. this.ruler2 = new Ruler();
  7131. for (i = 0; i < _rules2.length; i++) {
  7132. this.ruler2.push(_rules2[i][0], _rules2[i][1]);
  7133. }
  7134. }
  7135. // Skip single token by running all rules in validation mode;
  7136. // returns `true` if any rule reported success
  7137. //
  7138. ParserInline.prototype.skipToken = function (state) {
  7139. var ok, i, pos = state.pos,
  7140. rules = this.ruler.getRules(''),
  7141. len = rules.length,
  7142. maxNesting = state.md.options.maxNesting,
  7143. cache = state.cache;
  7144. if (typeof cache[pos] !== 'undefined') {
  7145. state.pos = cache[pos];
  7146. return;
  7147. }
  7148. if (state.level < maxNesting) {
  7149. for (i = 0; i < len; i++) {
  7150. // Increment state.level and decrement it later to limit recursion.
  7151. // It's harmless to do here, because no tokens are created. But ideally,
  7152. // we'd need a separate private state variable for this purpose.
  7153. //
  7154. state.level++;
  7155. ok = rules[i](state, true);
  7156. state.level--;
  7157. if (ok) { break; }
  7158. }
  7159. } else {
  7160. // Too much nesting, just skip until the end of the paragraph.
  7161. //
  7162. // NOTE: this will cause links to behave incorrectly in the following case,
  7163. // when an amount of `[` is exactly equal to `maxNesting + 1`:
  7164. //
  7165. // [[[[[[[[[[[[[[[[[[[[[foo]()
  7166. //
  7167. // TODO: remove this workaround when CM standard will allow nested links
  7168. // (we can replace it by preventing links from being parsed in
  7169. // validation mode)
  7170. //
  7171. state.pos = state.posMax;
  7172. }
  7173. if (!ok) { state.pos++; }
  7174. cache[pos] = state.pos;
  7175. };
  7176. // Generate tokens for input range
  7177. //
  7178. ParserInline.prototype.tokenize = function (state) {
  7179. var ok, i,
  7180. rules = this.ruler.getRules(''),
  7181. len = rules.length,
  7182. end = state.posMax,
  7183. maxNesting = state.md.options.maxNesting;
  7184. while (state.pos < end) {
  7185. // Try all possible rules.
  7186. // On success, rule should:
  7187. //
  7188. // - update `state.pos`
  7189. // - update `state.tokens`
  7190. // - return true
  7191. if (state.level < maxNesting) {
  7192. for (i = 0; i < len; i++) {
  7193. ok = rules[i](state, false);
  7194. if (ok) { break; }
  7195. }
  7196. }
  7197. if (ok) {
  7198. if (state.pos >= end) { break; }
  7199. continue;
  7200. }
  7201. state.pending += state.src[state.pos++];
  7202. }
  7203. if (state.pending) {
  7204. state.pushPending();
  7205. }
  7206. };
  7207. /**
  7208. * ParserInline.parse(str, md, env, outTokens)
  7209. *
  7210. * Process input string and push inline tokens into `outTokens`
  7211. **/
  7212. ParserInline.prototype.parse = function (str, md, env, outTokens) {
  7213. var i, rules, len;
  7214. var state = new this.State(str, md, env, outTokens);
  7215. this.tokenize(state);
  7216. rules = this.ruler2.getRules('');
  7217. len = rules.length;
  7218. for (i = 0; i < len; i++) {
  7219. rules[i](state);
  7220. }
  7221. };
  7222. ParserInline.prototype.State = __webpack_require__(71);
  7223. module.exports = ParserInline;
  7224. /***/ }),
  7225. /* 39 */
  7226. /***/ (function(module, exports, __webpack_require__) {
  7227. "use strict";
  7228. // Commonmark default options
  7229. module.exports = {
  7230. options: {
  7231. html: true, // Enable HTML tags in source
  7232. xhtmlOut: true, // Use '/' to close single tags (<br />)
  7233. breaks: false, // Convert '\n' in paragraphs into <br>
  7234. langPrefix: 'language-', // CSS language prefix for fenced blocks
  7235. linkify: false, // autoconvert URL-like texts to links
  7236. // Enable some language-neutral replacements + quotes beautification
  7237. typographer: false,
  7238. // Double + single quotes replacement pairs, when typographer enabled,
  7239. // and smartquotes on. Could be either a String or an Array.
  7240. //
  7241. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  7242. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  7243. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  7244. // Highlighter function. Should return escaped HTML,
  7245. // or '' if the source string is not changed and should be escaped externaly.
  7246. // If result starts with <pre... internal wrapper is skipped.
  7247. //
  7248. // function (/*str, lang*/) { return ''; }
  7249. //
  7250. highlight: null,
  7251. maxNesting: 20 // Internal protection, recursion limit
  7252. },
  7253. components: {
  7254. core: {
  7255. rules: [
  7256. 'normalize',
  7257. 'block',
  7258. 'inline'
  7259. ]
  7260. },
  7261. block: {
  7262. rules: [
  7263. 'blockquote',
  7264. 'code',
  7265. 'fence',
  7266. 'heading',
  7267. 'hr',
  7268. 'html_block',
  7269. 'lheading',
  7270. 'list',
  7271. 'reference',
  7272. 'paragraph'
  7273. ]
  7274. },
  7275. inline: {
  7276. rules: [
  7277. 'autolink',
  7278. 'backticks',
  7279. 'emphasis',
  7280. 'entity',
  7281. 'escape',
  7282. 'html_inline',
  7283. 'image',
  7284. 'link',
  7285. 'newline',
  7286. 'text'
  7287. ],
  7288. rules2: [
  7289. 'balance_pairs',
  7290. 'emphasis',
  7291. 'text_collapse'
  7292. ]
  7293. }
  7294. }
  7295. };
  7296. /***/ }),
  7297. /* 40 */
  7298. /***/ (function(module, exports, __webpack_require__) {
  7299. "use strict";
  7300. // markdown-it default options
  7301. module.exports = {
  7302. options: {
  7303. html: false, // Enable HTML tags in source
  7304. xhtmlOut: false, // Use '/' to close single tags (<br />)
  7305. breaks: false, // Convert '\n' in paragraphs into <br>
  7306. langPrefix: 'language-', // CSS language prefix for fenced blocks
  7307. linkify: false, // autoconvert URL-like texts to links
  7308. // Enable some language-neutral replacements + quotes beautification
  7309. typographer: false,
  7310. // Double + single quotes replacement pairs, when typographer enabled,
  7311. // and smartquotes on. Could be either a String or an Array.
  7312. //
  7313. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  7314. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  7315. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  7316. // Highlighter function. Should return escaped HTML,
  7317. // or '' if the source string is not changed and should be escaped externaly.
  7318. // If result starts with <pre... internal wrapper is skipped.
  7319. //
  7320. // function (/*str, lang*/) { return ''; }
  7321. //
  7322. highlight: null,
  7323. maxNesting: 100 // Internal protection, recursion limit
  7324. },
  7325. components: {
  7326. core: {},
  7327. block: {},
  7328. inline: {}
  7329. }
  7330. };
  7331. /***/ }),
  7332. /* 41 */
  7333. /***/ (function(module, exports, __webpack_require__) {
  7334. "use strict";
  7335. // "Zero" preset, with nothing enabled. Useful for manual configuring of simple
  7336. // modes. For example, to parse bold/italic only.
  7337. module.exports = {
  7338. options: {
  7339. html: false, // Enable HTML tags in source
  7340. xhtmlOut: false, // Use '/' to close single tags (<br />)
  7341. breaks: false, // Convert '\n' in paragraphs into <br>
  7342. langPrefix: 'language-', // CSS language prefix for fenced blocks
  7343. linkify: false, // autoconvert URL-like texts to links
  7344. // Enable some language-neutral replacements + quotes beautification
  7345. typographer: false,
  7346. // Double + single quotes replacement pairs, when typographer enabled,
  7347. // and smartquotes on. Could be either a String or an Array.
  7348. //
  7349. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  7350. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  7351. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  7352. // Highlighter function. Should return escaped HTML,
  7353. // or '' if the source string is not changed and should be escaped externaly.
  7354. // If result starts with <pre... internal wrapper is skipped.
  7355. //
  7356. // function (/*str, lang*/) { return ''; }
  7357. //
  7358. highlight: null,
  7359. maxNesting: 20 // Internal protection, recursion limit
  7360. },
  7361. components: {
  7362. core: {
  7363. rules: [
  7364. 'normalize',
  7365. 'block',
  7366. 'inline'
  7367. ]
  7368. },
  7369. block: {
  7370. rules: [
  7371. 'paragraph'
  7372. ]
  7373. },
  7374. inline: {
  7375. rules: [
  7376. 'text'
  7377. ],
  7378. rules2: [
  7379. 'balance_pairs',
  7380. 'text_collapse'
  7381. ]
  7382. }
  7383. }
  7384. };
  7385. /***/ }),
  7386. /* 42 */
  7387. /***/ (function(module, exports, __webpack_require__) {
  7388. "use strict";
  7389. /**
  7390. * class Renderer
  7391. *
  7392. * Generates HTML from parsed token stream. Each instance has independent
  7393. * copy of rules. Those can be rewritten with ease. Also, you can add new
  7394. * rules if you create plugin and adds new token types.
  7395. **/
  7396. var assign = __webpack_require__(0).assign;
  7397. var unescapeAll = __webpack_require__(0).unescapeAll;
  7398. var escapeHtml = __webpack_require__(0).escapeHtml;
  7399. ////////////////////////////////////////////////////////////////////////////////
  7400. var default_rules = {};
  7401. default_rules.code_inline = function (tokens, idx, options, env, slf) {
  7402. var token = tokens[idx];
  7403. return '<code' + slf.renderAttrs(token) + '>' +
  7404. escapeHtml(tokens[idx].content) +
  7405. '</code>';
  7406. };
  7407. default_rules.code_block = function (tokens, idx, options, env, slf) {
  7408. var token = tokens[idx];
  7409. return '<pre' + slf.renderAttrs(token) + '><code>' +
  7410. escapeHtml(tokens[idx].content) +
  7411. '</code></pre>\n';
  7412. };
  7413. default_rules.fence = function (tokens, idx, options, env, slf) {
  7414. var token = tokens[idx],
  7415. info = token.info ? unescapeAll(token.info).trim() : '',
  7416. langName = '',
  7417. highlighted, i, tmpAttrs, tmpToken;
  7418. if (info) {
  7419. langName = info.split(/\s+/g)[0];
  7420. }
  7421. if (options.highlight) {
  7422. highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);
  7423. } else {
  7424. highlighted = escapeHtml(token.content);
  7425. }
  7426. if (highlighted.indexOf('<pre') === 0) {
  7427. return highlighted + '\n';
  7428. }
  7429. // If language exists, inject class gently, without mudofying original token.
  7430. // May be, one day we will add .clone() for token and simplify this part, but
  7431. // now we prefer to keep things local.
  7432. if (info) {
  7433. i = token.attrIndex('class');
  7434. tmpAttrs = token.attrs ? token.attrs.slice() : [];
  7435. if (i < 0) {
  7436. tmpAttrs.push([ 'class', options.langPrefix + langName ]);
  7437. } else {
  7438. tmpAttrs[i][1] += ' ' + options.langPrefix + langName;
  7439. }
  7440. // Fake token just to render attributes
  7441. tmpToken = {
  7442. attrs: tmpAttrs
  7443. };
  7444. return '<pre><code' + slf.renderAttrs(tmpToken) + '>'
  7445. + highlighted
  7446. + '</code></pre>\n';
  7447. }
  7448. return '<pre><code' + slf.renderAttrs(token) + '>'
  7449. + highlighted
  7450. + '</code></pre>\n';
  7451. };
  7452. default_rules.image = function (tokens, idx, options, env, slf) {
  7453. var token = tokens[idx];
  7454. // "alt" attr MUST be set, even if empty. Because it's mandatory and
  7455. // should be placed on proper position for tests.
  7456. //
  7457. // Replace content with actual value
  7458. token.attrs[token.attrIndex('alt')][1] =
  7459. slf.renderInlineAsText(token.children, options, env);
  7460. return slf.renderToken(tokens, idx, options);
  7461. };
  7462. default_rules.hardbreak = function (tokens, idx, options /*, env */) {
  7463. return options.xhtmlOut ? '<br />\n' : '<br>\n';
  7464. };
  7465. default_rules.softbreak = function (tokens, idx, options /*, env */) {
  7466. return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n';
  7467. };
  7468. default_rules.text = function (tokens, idx /*, options, env */) {
  7469. return escapeHtml(tokens[idx].content);
  7470. };
  7471. default_rules.html_block = function (tokens, idx /*, options, env */) {
  7472. return tokens[idx].content;
  7473. };
  7474. default_rules.html_inline = function (tokens, idx /*, options, env */) {
  7475. return tokens[idx].content;
  7476. };
  7477. /**
  7478. * new Renderer()
  7479. *
  7480. * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
  7481. **/
  7482. function Renderer() {
  7483. /**
  7484. * Renderer#rules -> Object
  7485. *
  7486. * Contains render rules for tokens. Can be updated and extended.
  7487. *
  7488. * ##### Example
  7489. *
  7490. * ```javascript
  7491. * var md = require('markdown-it')();
  7492. *
  7493. * md.renderer.rules.strong_open = function () { return '<b>'; };
  7494. * md.renderer.rules.strong_close = function () { return '</b>'; };
  7495. *
  7496. * var result = md.renderInline(...);
  7497. * ```
  7498. *
  7499. * Each rule is called as independed static function with fixed signature:
  7500. *
  7501. * ```javascript
  7502. * function my_token_render(tokens, idx, options, env, renderer) {
  7503. * // ...
  7504. * return renderedHTML;
  7505. * }
  7506. * ```
  7507. *
  7508. * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
  7509. * for more details and examples.
  7510. **/
  7511. this.rules = assign({}, default_rules);
  7512. }
  7513. /**
  7514. * Renderer.renderAttrs(token) -> String
  7515. *
  7516. * Render token attributes to string.
  7517. **/
  7518. Renderer.prototype.renderAttrs = function renderAttrs(token) {
  7519. var i, l, result;
  7520. if (!token.attrs) { return ''; }
  7521. result = '';
  7522. for (i = 0, l = token.attrs.length; i < l; i++) {
  7523. result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
  7524. }
  7525. return result;
  7526. };
  7527. /**
  7528. * Renderer.renderToken(tokens, idx, options) -> String
  7529. * - tokens (Array): list of tokens
  7530. * - idx (Numbed): token index to render
  7531. * - options (Object): params of parser instance
  7532. *
  7533. * Default token renderer. Can be overriden by custom function
  7534. * in [[Renderer#rules]].
  7535. **/
  7536. Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
  7537. var nextToken,
  7538. result = '',
  7539. needLf = false,
  7540. token = tokens[idx];
  7541. // Tight list paragraphs
  7542. if (token.hidden) {
  7543. return '';
  7544. }
  7545. // Insert a newline between hidden paragraph and subsequent opening
  7546. // block-level tag.
  7547. //
  7548. // For example, here we should insert a newline before blockquote:
  7549. // - a
  7550. // >
  7551. //
  7552. if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
  7553. result += '\n';
  7554. }
  7555. // Add token name, e.g. `<img`
  7556. result += (token.nesting === -1 ? '</' : '<') + token.tag;
  7557. // Encode attributes, e.g. `<img src="foo"`
  7558. result += this.renderAttrs(token);
  7559. // Add a slash for self-closing tags, e.g. `<img src="foo" /`
  7560. if (token.nesting === 0 && options.xhtmlOut) {
  7561. result += ' /';
  7562. }
  7563. // Check if we need to add a newline after this tag
  7564. if (token.block) {
  7565. needLf = true;
  7566. if (token.nesting === 1) {
  7567. if (idx + 1 < tokens.length) {
  7568. nextToken = tokens[idx + 1];
  7569. if (nextToken.type === 'inline' || nextToken.hidden) {
  7570. // Block-level tag containing an inline tag.
  7571. //
  7572. needLf = false;
  7573. } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
  7574. // Opening tag + closing tag of the same type. E.g. `<li></li>`.
  7575. //
  7576. needLf = false;
  7577. }
  7578. }
  7579. }
  7580. }
  7581. result += needLf ? '>\n' : '>';
  7582. return result;
  7583. };
  7584. /**
  7585. * Renderer.renderInline(tokens, options, env) -> String
  7586. * - tokens (Array): list on block tokens to renter
  7587. * - options (Object): params of parser instance
  7588. * - env (Object): additional data from parsed input (references, for example)
  7589. *
  7590. * The same as [[Renderer.render]], but for single token of `inline` type.
  7591. **/
  7592. Renderer.prototype.renderInline = function (tokens, options, env) {
  7593. var type,
  7594. result = '',
  7595. rules = this.rules;
  7596. for (var i = 0, len = tokens.length; i < len; i++) {
  7597. type = tokens[i].type;
  7598. if (typeof rules[type] !== 'undefined') {
  7599. result += rules[type](tokens, i, options, env, this);
  7600. } else {
  7601. result += this.renderToken(tokens, i, options);
  7602. }
  7603. }
  7604. return result;
  7605. };
  7606. /** internal
  7607. * Renderer.renderInlineAsText(tokens, options, env) -> String
  7608. * - tokens (Array): list on block tokens to renter
  7609. * - options (Object): params of parser instance
  7610. * - env (Object): additional data from parsed input (references, for example)
  7611. *
  7612. * Special kludge for image `alt` attributes to conform CommonMark spec.
  7613. * Don't try to use it! Spec requires to show `alt` content with stripped markup,
  7614. * instead of simple escaping.
  7615. **/
  7616. Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
  7617. var result = '';
  7618. for (var i = 0, len = tokens.length; i < len; i++) {
  7619. if (tokens[i].type === 'text') {
  7620. result += tokens[i].content;
  7621. } else if (tokens[i].type === 'image') {
  7622. result += this.renderInlineAsText(tokens[i].children, options, env);
  7623. }
  7624. }
  7625. return result;
  7626. };
  7627. /**
  7628. * Renderer.render(tokens, options, env) -> String
  7629. * - tokens (Array): list on block tokens to renter
  7630. * - options (Object): params of parser instance
  7631. * - env (Object): additional data from parsed input (references, for example)
  7632. *
  7633. * Takes token stream and generates HTML. Probably, you will never need to call
  7634. * this method directly.
  7635. **/
  7636. Renderer.prototype.render = function (tokens, options, env) {
  7637. var i, len, type,
  7638. result = '',
  7639. rules = this.rules;
  7640. for (i = 0, len = tokens.length; i < len; i++) {
  7641. type = tokens[i].type;
  7642. if (type === 'inline') {
  7643. result += this.renderInline(tokens[i].children, options, env);
  7644. } else if (typeof rules[type] !== 'undefined') {
  7645. result += rules[tokens[i].type](tokens, i, options, env, this);
  7646. } else {
  7647. result += this.renderToken(tokens, i, options, env);
  7648. }
  7649. }
  7650. return result;
  7651. };
  7652. module.exports = Renderer;
  7653. /***/ }),
  7654. /* 43 */
  7655. /***/ (function(module, exports, __webpack_require__) {
  7656. "use strict";
  7657. // Block quotes
  7658. var isSpace = __webpack_require__(0).isSpace;
  7659. module.exports = function blockquote(state, startLine, endLine, silent) {
  7660. var adjustTab,
  7661. ch,
  7662. i,
  7663. initial,
  7664. isOutdented,
  7665. l,
  7666. lastLineEmpty,
  7667. lines,
  7668. nextLine,
  7669. offset,
  7670. oldBMarks,
  7671. oldBSCount,
  7672. oldIndent,
  7673. oldParentType,
  7674. oldSCount,
  7675. oldTShift,
  7676. spaceAfterMarker,
  7677. terminate,
  7678. terminatorRules,
  7679. token,
  7680. oldLineMax = state.lineMax,
  7681. pos = state.bMarks[startLine] + state.tShift[startLine],
  7682. max = state.eMarks[startLine];
  7683. // if it's indented more than 3 spaces, it should be a code block
  7684. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  7685. // check the block quote marker
  7686. if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }
  7687. // we know that it's going to be a valid blockquote,
  7688. // so no point trying to find the end of it in silent mode
  7689. if (silent) { return true; }
  7690. // skip spaces after ">" and re-calculate offset
  7691. initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
  7692. // skip one optional space after '>'
  7693. if (state.src.charCodeAt(pos) === 0x20 /* space */) {
  7694. // ' > test '
  7695. // ^ -- position start of line here:
  7696. pos++;
  7697. initial++;
  7698. offset++;
  7699. adjustTab = false;
  7700. spaceAfterMarker = true;
  7701. } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
  7702. spaceAfterMarker = true;
  7703. if ((state.bsCount[startLine] + offset) % 4 === 3) {
  7704. // ' >\t test '
  7705. // ^ -- position start of line here (tab has width===1)
  7706. pos++;
  7707. initial++;
  7708. offset++;
  7709. adjustTab = false;
  7710. } else {
  7711. // ' >\t test '
  7712. // ^ -- position start of line here + shift bsCount slightly
  7713. // to make extra space appear
  7714. adjustTab = true;
  7715. }
  7716. } else {
  7717. spaceAfterMarker = false;
  7718. }
  7719. oldBMarks = [ state.bMarks[startLine] ];
  7720. state.bMarks[startLine] = pos;
  7721. while (pos < max) {
  7722. ch = state.src.charCodeAt(pos);
  7723. if (isSpace(ch)) {
  7724. if (ch === 0x09) {
  7725. offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;
  7726. } else {
  7727. offset++;
  7728. }
  7729. } else {
  7730. break;
  7731. }
  7732. pos++;
  7733. }
  7734. oldBSCount = [ state.bsCount[startLine] ];
  7735. state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);
  7736. lastLineEmpty = pos >= max;
  7737. oldSCount = [ state.sCount[startLine] ];
  7738. state.sCount[startLine] = offset - initial;
  7739. oldTShift = [ state.tShift[startLine] ];
  7740. state.tShift[startLine] = pos - state.bMarks[startLine];
  7741. terminatorRules = state.md.block.ruler.getRules('blockquote');
  7742. oldParentType = state.parentType;
  7743. state.parentType = 'blockquote';
  7744. // Search the end of the block
  7745. //
  7746. // Block ends with either:
  7747. // 1. an empty line outside:
  7748. // ```
  7749. // > test
  7750. //
  7751. // ```
  7752. // 2. an empty line inside:
  7753. // ```
  7754. // >
  7755. // test
  7756. // ```
  7757. // 3. another tag:
  7758. // ```
  7759. // > test
  7760. // - - -
  7761. // ```
  7762. for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
  7763. // check if it's outdented, i.e. it's inside list item and indented
  7764. // less than said list item:
  7765. //
  7766. // ```
  7767. // 1. anything
  7768. // > current blockquote
  7769. // 2. checking this line
  7770. // ```
  7771. isOutdented = state.sCount[nextLine] < state.blkIndent;
  7772. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  7773. max = state.eMarks[nextLine];
  7774. if (pos >= max) {
  7775. // Case 1: line is not inside the blockquote, and this line is empty.
  7776. break;
  7777. }
  7778. if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {
  7779. // This line is inside the blockquote.
  7780. // skip spaces after ">" and re-calculate offset
  7781. initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]);
  7782. // skip one optional space after '>'
  7783. if (state.src.charCodeAt(pos) === 0x20 /* space */) {
  7784. // ' > test '
  7785. // ^ -- position start of line here:
  7786. pos++;
  7787. initial++;
  7788. offset++;
  7789. adjustTab = false;
  7790. spaceAfterMarker = true;
  7791. } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
  7792. spaceAfterMarker = true;
  7793. if ((state.bsCount[nextLine] + offset) % 4 === 3) {
  7794. // ' >\t test '
  7795. // ^ -- position start of line here (tab has width===1)
  7796. pos++;
  7797. initial++;
  7798. offset++;
  7799. adjustTab = false;
  7800. } else {
  7801. // ' >\t test '
  7802. // ^ -- position start of line here + shift bsCount slightly
  7803. // to make extra space appear
  7804. adjustTab = true;
  7805. }
  7806. } else {
  7807. spaceAfterMarker = false;
  7808. }
  7809. oldBMarks.push(state.bMarks[nextLine]);
  7810. state.bMarks[nextLine] = pos;
  7811. while (pos < max) {
  7812. ch = state.src.charCodeAt(pos);
  7813. if (isSpace(ch)) {
  7814. if (ch === 0x09) {
  7815. offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
  7816. } else {
  7817. offset++;
  7818. }
  7819. } else {
  7820. break;
  7821. }
  7822. pos++;
  7823. }
  7824. lastLineEmpty = pos >= max;
  7825. oldBSCount.push(state.bsCount[nextLine]);
  7826. state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
  7827. oldSCount.push(state.sCount[nextLine]);
  7828. state.sCount[nextLine] = offset - initial;
  7829. oldTShift.push(state.tShift[nextLine]);
  7830. state.tShift[nextLine] = pos - state.bMarks[nextLine];
  7831. continue;
  7832. }
  7833. // Case 2: line is not inside the blockquote, and the last line was empty.
  7834. if (lastLineEmpty) { break; }
  7835. // Case 3: another tag found.
  7836. terminate = false;
  7837. for (i = 0, l = terminatorRules.length; i < l; i++) {
  7838. if (terminatorRules[i](state, nextLine, endLine, true)) {
  7839. terminate = true;
  7840. break;
  7841. }
  7842. }
  7843. if (terminate) {
  7844. // Quirk to enforce "hard termination mode" for paragraphs;
  7845. // normally if you call `tokenize(state, startLine, nextLine)`,
  7846. // paragraphs will look below nextLine for paragraph continuation,
  7847. // but if blockquote is terminated by another tag, they shouldn't
  7848. state.lineMax = nextLine;
  7849. if (state.blkIndent !== 0) {
  7850. // state.blkIndent was non-zero, we now set it to zero,
  7851. // so we need to re-calculate all offsets to appear as
  7852. // if indent wasn't changed
  7853. oldBMarks.push(state.bMarks[nextLine]);
  7854. oldBSCount.push(state.bsCount[nextLine]);
  7855. oldTShift.push(state.tShift[nextLine]);
  7856. oldSCount.push(state.sCount[nextLine]);
  7857. state.sCount[nextLine] -= state.blkIndent;
  7858. }
  7859. break;
  7860. }
  7861. if (isOutdented) break;
  7862. oldBMarks.push(state.bMarks[nextLine]);
  7863. oldBSCount.push(state.bsCount[nextLine]);
  7864. oldTShift.push(state.tShift[nextLine]);
  7865. oldSCount.push(state.sCount[nextLine]);
  7866. // A negative indentation means that this is a paragraph continuation
  7867. //
  7868. state.sCount[nextLine] = -1;
  7869. }
  7870. oldIndent = state.blkIndent;
  7871. state.blkIndent = 0;
  7872. token = state.push('blockquote_open', 'blockquote', 1);
  7873. token.markup = '>';
  7874. token.map = lines = [ startLine, 0 ];
  7875. state.md.block.tokenize(state, startLine, nextLine);
  7876. token = state.push('blockquote_close', 'blockquote', -1);
  7877. token.markup = '>';
  7878. state.lineMax = oldLineMax;
  7879. state.parentType = oldParentType;
  7880. lines[1] = state.line;
  7881. // Restore original tShift; this might not be necessary since the parser
  7882. // has already been here, but just to make sure we can do that.
  7883. for (i = 0; i < oldTShift.length; i++) {
  7884. state.bMarks[i + startLine] = oldBMarks[i];
  7885. state.tShift[i + startLine] = oldTShift[i];
  7886. state.sCount[i + startLine] = oldSCount[i];
  7887. state.bsCount[i + startLine] = oldBSCount[i];
  7888. }
  7889. state.blkIndent = oldIndent;
  7890. return true;
  7891. };
  7892. /***/ }),
  7893. /* 44 */
  7894. /***/ (function(module, exports, __webpack_require__) {
  7895. "use strict";
  7896. // Code block (4 spaces padded)
  7897. module.exports = function code(state, startLine, endLine/*, silent*/) {
  7898. var nextLine, last, token;
  7899. if (state.sCount[startLine] - state.blkIndent < 4) { return false; }
  7900. last = nextLine = startLine + 1;
  7901. while (nextLine < endLine) {
  7902. if (state.isEmpty(nextLine)) {
  7903. nextLine++;
  7904. continue;
  7905. }
  7906. if (state.sCount[nextLine] - state.blkIndent >= 4) {
  7907. nextLine++;
  7908. last = nextLine;
  7909. continue;
  7910. }
  7911. break;
  7912. }
  7913. state.line = last;
  7914. token = state.push('code_block', 'code', 0);
  7915. token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);
  7916. token.map = [ startLine, state.line ];
  7917. return true;
  7918. };
  7919. /***/ }),
  7920. /* 45 */
  7921. /***/ (function(module, exports, __webpack_require__) {
  7922. "use strict";
  7923. // fences (``` lang, ~~~ lang)
  7924. module.exports = function fence(state, startLine, endLine, silent) {
  7925. var marker, len, params, nextLine, mem, token, markup,
  7926. haveEndMarker = false,
  7927. pos = state.bMarks[startLine] + state.tShift[startLine],
  7928. max = state.eMarks[startLine];
  7929. // if it's indented more than 3 spaces, it should be a code block
  7930. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  7931. if (pos + 3 > max) { return false; }
  7932. marker = state.src.charCodeAt(pos);
  7933. if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {
  7934. return false;
  7935. }
  7936. // scan marker length
  7937. mem = pos;
  7938. pos = state.skipChars(pos, marker);
  7939. len = pos - mem;
  7940. if (len < 3) { return false; }
  7941. markup = state.src.slice(mem, pos);
  7942. params = state.src.slice(pos, max);
  7943. if (params.indexOf(String.fromCharCode(marker)) >= 0) { return false; }
  7944. // Since start is found, we can report success here in validation mode
  7945. if (silent) { return true; }
  7946. // search end of block
  7947. nextLine = startLine;
  7948. for (;;) {
  7949. nextLine++;
  7950. if (nextLine >= endLine) {
  7951. // unclosed block should be autoclosed by end of document.
  7952. // also block seems to be autoclosed by end of parent
  7953. break;
  7954. }
  7955. pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
  7956. max = state.eMarks[nextLine];
  7957. if (pos < max && state.sCount[nextLine] < state.blkIndent) {
  7958. // non-empty line with negative indent should stop the list:
  7959. // - ```
  7960. // test
  7961. break;
  7962. }
  7963. if (state.src.charCodeAt(pos) !== marker) { continue; }
  7964. if (state.sCount[nextLine] - state.blkIndent >= 4) {
  7965. // closing fence should be indented less than 4 spaces
  7966. continue;
  7967. }
  7968. pos = state.skipChars(pos, marker);
  7969. // closing code fence must be at least as long as the opening one
  7970. if (pos - mem < len) { continue; }
  7971. // make sure tail has spaces only
  7972. pos = state.skipSpaces(pos);
  7973. if (pos < max) { continue; }
  7974. haveEndMarker = true;
  7975. // found!
  7976. break;
  7977. }
  7978. // If a fence has heading spaces, they should be removed from its inner block
  7979. len = state.sCount[startLine];
  7980. state.line = nextLine + (haveEndMarker ? 1 : 0);
  7981. token = state.push('fence', 'code', 0);
  7982. token.info = params;
  7983. token.content = state.getLines(startLine + 1, nextLine, len, true);
  7984. token.markup = markup;
  7985. token.map = [ startLine, state.line ];
  7986. return true;
  7987. };
  7988. /***/ }),
  7989. /* 46 */
  7990. /***/ (function(module, exports, __webpack_require__) {
  7991. "use strict";
  7992. // heading (#, ##, ...)
  7993. var isSpace = __webpack_require__(0).isSpace;
  7994. module.exports = function heading(state, startLine, endLine, silent) {
  7995. var ch, level, tmp, token,
  7996. pos = state.bMarks[startLine] + state.tShift[startLine],
  7997. max = state.eMarks[startLine];
  7998. // if it's indented more than 3 spaces, it should be a code block
  7999. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8000. ch = state.src.charCodeAt(pos);
  8001. if (ch !== 0x23/* # */ || pos >= max) { return false; }
  8002. // count heading level
  8003. level = 1;
  8004. ch = state.src.charCodeAt(++pos);
  8005. while (ch === 0x23/* # */ && pos < max && level <= 6) {
  8006. level++;
  8007. ch = state.src.charCodeAt(++pos);
  8008. }
  8009. if (level > 6 || (pos < max && !isSpace(ch))) { return false; }
  8010. if (silent) { return true; }
  8011. // Let's cut tails like ' ### ' from the end of string
  8012. max = state.skipSpacesBack(max, pos);
  8013. tmp = state.skipCharsBack(max, 0x23, pos); // #
  8014. if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
  8015. max = tmp;
  8016. }
  8017. state.line = startLine + 1;
  8018. token = state.push('heading_open', 'h' + String(level), 1);
  8019. token.markup = '########'.slice(0, level);
  8020. token.map = [ startLine, state.line ];
  8021. token = state.push('inline', '', 0);
  8022. token.content = state.src.slice(pos, max).trim();
  8023. token.map = [ startLine, state.line ];
  8024. token.children = [];
  8025. token = state.push('heading_close', 'h' + String(level), -1);
  8026. token.markup = '########'.slice(0, level);
  8027. return true;
  8028. };
  8029. /***/ }),
  8030. /* 47 */
  8031. /***/ (function(module, exports, __webpack_require__) {
  8032. "use strict";
  8033. // Horizontal rule
  8034. var isSpace = __webpack_require__(0).isSpace;
  8035. module.exports = function hr(state, startLine, endLine, silent) {
  8036. var marker, cnt, ch, token,
  8037. pos = state.bMarks[startLine] + state.tShift[startLine],
  8038. max = state.eMarks[startLine];
  8039. // if it's indented more than 3 spaces, it should be a code block
  8040. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8041. marker = state.src.charCodeAt(pos++);
  8042. // Check hr marker
  8043. if (marker !== 0x2A/* * */ &&
  8044. marker !== 0x2D/* - */ &&
  8045. marker !== 0x5F/* _ */) {
  8046. return false;
  8047. }
  8048. // markers can be mixed with spaces, but there should be at least 3 of them
  8049. cnt = 1;
  8050. while (pos < max) {
  8051. ch = state.src.charCodeAt(pos++);
  8052. if (ch !== marker && !isSpace(ch)) { return false; }
  8053. if (ch === marker) { cnt++; }
  8054. }
  8055. if (cnt < 3) { return false; }
  8056. if (silent) { return true; }
  8057. state.line = startLine + 1;
  8058. token = state.push('hr', 'hr', 0);
  8059. token.map = [ startLine, state.line ];
  8060. token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
  8061. return true;
  8062. };
  8063. /***/ }),
  8064. /* 48 */
  8065. /***/ (function(module, exports, __webpack_require__) {
  8066. "use strict";
  8067. // HTML block
  8068. var block_names = __webpack_require__(30);
  8069. var HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(12).HTML_OPEN_CLOSE_TAG_RE;
  8070. // An array of opening and corresponding closing sequences for html tags,
  8071. // last argument defines whether it can terminate a paragraph or not
  8072. //
  8073. var HTML_SEQUENCES = [
  8074. [ /^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true ],
  8075. [ /^<!--/, /-->/, true ],
  8076. [ /^<\?/, /\?>/, true ],
  8077. [ /^<![A-Z]/, />/, true ],
  8078. [ /^<!\[CDATA\[/, /\]\]>/, true ],
  8079. [ new RegExp('^</?(' + block_names.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true ],
  8080. [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false ]
  8081. ];
  8082. module.exports = function html_block(state, startLine, endLine, silent) {
  8083. var i, nextLine, token, lineText,
  8084. pos = state.bMarks[startLine] + state.tShift[startLine],
  8085. max = state.eMarks[startLine];
  8086. // if it's indented more than 3 spaces, it should be a code block
  8087. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8088. if (!state.md.options.html) { return false; }
  8089. if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
  8090. lineText = state.src.slice(pos, max);
  8091. for (i = 0; i < HTML_SEQUENCES.length; i++) {
  8092. if (HTML_SEQUENCES[i][0].test(lineText)) { break; }
  8093. }
  8094. if (i === HTML_SEQUENCES.length) { return false; }
  8095. if (silent) {
  8096. // true if this sequence can be a terminator, false otherwise
  8097. return HTML_SEQUENCES[i][2];
  8098. }
  8099. nextLine = startLine + 1;
  8100. // If we are here - we detected HTML block.
  8101. // Let's roll down till block end.
  8102. if (!HTML_SEQUENCES[i][1].test(lineText)) {
  8103. for (; nextLine < endLine; nextLine++) {
  8104. if (state.sCount[nextLine] < state.blkIndent) { break; }
  8105. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  8106. max = state.eMarks[nextLine];
  8107. lineText = state.src.slice(pos, max);
  8108. if (HTML_SEQUENCES[i][1].test(lineText)) {
  8109. if (lineText.length !== 0) { nextLine++; }
  8110. break;
  8111. }
  8112. }
  8113. }
  8114. state.line = nextLine;
  8115. token = state.push('html_block', '', 0);
  8116. token.map = [ startLine, nextLine ];
  8117. token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
  8118. return true;
  8119. };
  8120. /***/ }),
  8121. /* 49 */
  8122. /***/ (function(module, exports, __webpack_require__) {
  8123. "use strict";
  8124. // lheading (---, ===)
  8125. module.exports = function lheading(state, startLine, endLine/*, silent*/) {
  8126. var content, terminate, i, l, token, pos, max, level, marker,
  8127. nextLine = startLine + 1, oldParentType,
  8128. terminatorRules = state.md.block.ruler.getRules('paragraph');
  8129. // if it's indented more than 3 spaces, it should be a code block
  8130. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8131. oldParentType = state.parentType;
  8132. state.parentType = 'paragraph'; // use paragraph to match terminatorRules
  8133. // jump line-by-line until empty one or EOF
  8134. for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
  8135. // this would be a code block normally, but after paragraph
  8136. // it's considered a lazy continuation regardless of what's there
  8137. if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
  8138. //
  8139. // Check for underline in setext header
  8140. //
  8141. if (state.sCount[nextLine] >= state.blkIndent) {
  8142. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  8143. max = state.eMarks[nextLine];
  8144. if (pos < max) {
  8145. marker = state.src.charCodeAt(pos);
  8146. if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {
  8147. pos = state.skipChars(pos, marker);
  8148. pos = state.skipSpaces(pos);
  8149. if (pos >= max) {
  8150. level = (marker === 0x3D/* = */ ? 1 : 2);
  8151. break;
  8152. }
  8153. }
  8154. }
  8155. }
  8156. // quirk for blockquotes, this line should already be checked by that rule
  8157. if (state.sCount[nextLine] < 0) { continue; }
  8158. // Some tags can terminate paragraph without empty line.
  8159. terminate = false;
  8160. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8161. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8162. terminate = true;
  8163. break;
  8164. }
  8165. }
  8166. if (terminate) { break; }
  8167. }
  8168. if (!level) {
  8169. // Didn't find valid underline
  8170. return false;
  8171. }
  8172. content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  8173. state.line = nextLine + 1;
  8174. token = state.push('heading_open', 'h' + String(level), 1);
  8175. token.markup = String.fromCharCode(marker);
  8176. token.map = [ startLine, state.line ];
  8177. token = state.push('inline', '', 0);
  8178. token.content = content;
  8179. token.map = [ startLine, state.line - 1 ];
  8180. token.children = [];
  8181. token = state.push('heading_close', 'h' + String(level), -1);
  8182. token.markup = String.fromCharCode(marker);
  8183. state.parentType = oldParentType;
  8184. return true;
  8185. };
  8186. /***/ }),
  8187. /* 50 */
  8188. /***/ (function(module, exports, __webpack_require__) {
  8189. "use strict";
  8190. // Lists
  8191. var isSpace = __webpack_require__(0).isSpace;
  8192. // Search `[-+*][\n ]`, returns next pos arter marker on success
  8193. // or -1 on fail.
  8194. function skipBulletListMarker(state, startLine) {
  8195. var marker, pos, max, ch;
  8196. pos = state.bMarks[startLine] + state.tShift[startLine];
  8197. max = state.eMarks[startLine];
  8198. marker = state.src.charCodeAt(pos++);
  8199. // Check bullet
  8200. if (marker !== 0x2A/* * */ &&
  8201. marker !== 0x2D/* - */ &&
  8202. marker !== 0x2B/* + */) {
  8203. return -1;
  8204. }
  8205. if (pos < max) {
  8206. ch = state.src.charCodeAt(pos);
  8207. if (!isSpace(ch)) {
  8208. // " -test " - is not a list item
  8209. return -1;
  8210. }
  8211. }
  8212. return pos;
  8213. }
  8214. // Search `\d+[.)][\n ]`, returns next pos arter marker on success
  8215. // or -1 on fail.
  8216. function skipOrderedListMarker(state, startLine) {
  8217. var ch,
  8218. start = state.bMarks[startLine] + state.tShift[startLine],
  8219. pos = start,
  8220. max = state.eMarks[startLine];
  8221. // List marker should have at least 2 chars (digit + dot)
  8222. if (pos + 1 >= max) { return -1; }
  8223. ch = state.src.charCodeAt(pos++);
  8224. if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }
  8225. for (;;) {
  8226. // EOL -> fail
  8227. if (pos >= max) { return -1; }
  8228. ch = state.src.charCodeAt(pos++);
  8229. if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {
  8230. // List marker should have no more than 9 digits
  8231. // (prevents integer overflow in browsers)
  8232. if (pos - start >= 10) { return -1; }
  8233. continue;
  8234. }
  8235. // found valid marker
  8236. if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {
  8237. break;
  8238. }
  8239. return -1;
  8240. }
  8241. if (pos < max) {
  8242. ch = state.src.charCodeAt(pos);
  8243. if (!isSpace(ch)) {
  8244. // " 1.test " - is not a list item
  8245. return -1;
  8246. }
  8247. }
  8248. return pos;
  8249. }
  8250. function markTightParagraphs(state, idx) {
  8251. var i, l,
  8252. level = state.level + 2;
  8253. for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
  8254. if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
  8255. state.tokens[i + 2].hidden = true;
  8256. state.tokens[i].hidden = true;
  8257. i += 2;
  8258. }
  8259. }
  8260. }
  8261. module.exports = function list(state, startLine, endLine, silent) {
  8262. var ch,
  8263. contentStart,
  8264. i,
  8265. indent,
  8266. indentAfterMarker,
  8267. initial,
  8268. isOrdered,
  8269. itemLines,
  8270. l,
  8271. listLines,
  8272. listTokIdx,
  8273. markerCharCode,
  8274. markerValue,
  8275. max,
  8276. nextLine,
  8277. offset,
  8278. oldIndent,
  8279. oldLIndent,
  8280. oldParentType,
  8281. oldTShift,
  8282. oldTight,
  8283. pos,
  8284. posAfterMarker,
  8285. prevEmptyEnd,
  8286. start,
  8287. terminate,
  8288. terminatorRules,
  8289. token,
  8290. isTerminatingParagraph = false,
  8291. tight = true;
  8292. // if it's indented more than 3 spaces, it should be a code block
  8293. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8294. // limit conditions when list can interrupt
  8295. // a paragraph (validation mode only)
  8296. if (silent && state.parentType === 'paragraph') {
  8297. // Next list item should still terminate previous list item;
  8298. //
  8299. // This code can fail if plugins use blkIndent as well as lists,
  8300. // but I hope the spec gets fixed long before that happens.
  8301. //
  8302. if (state.tShift[startLine] >= state.blkIndent) {
  8303. isTerminatingParagraph = true;
  8304. }
  8305. }
  8306. // Detect list type and position after marker
  8307. if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {
  8308. isOrdered = true;
  8309. start = state.bMarks[startLine] + state.tShift[startLine];
  8310. markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));
  8311. // If we're starting a new ordered list right after
  8312. // a paragraph, it should start with 1.
  8313. if (isTerminatingParagraph && markerValue !== 1) return false;
  8314. } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {
  8315. isOrdered = false;
  8316. } else {
  8317. return false;
  8318. }
  8319. // If we're starting a new unordered list right after
  8320. // a paragraph, first line should not be empty.
  8321. if (isTerminatingParagraph) {
  8322. if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;
  8323. }
  8324. // We should terminate list on style change. Remember first one to compare.
  8325. markerCharCode = state.src.charCodeAt(posAfterMarker - 1);
  8326. // For validation mode we can terminate immediately
  8327. if (silent) { return true; }
  8328. // Start list
  8329. listTokIdx = state.tokens.length;
  8330. if (isOrdered) {
  8331. token = state.push('ordered_list_open', 'ol', 1);
  8332. if (markerValue !== 1) {
  8333. token.attrs = [ [ 'start', markerValue ] ];
  8334. }
  8335. } else {
  8336. token = state.push('bullet_list_open', 'ul', 1);
  8337. }
  8338. token.map = listLines = [ startLine, 0 ];
  8339. token.markup = String.fromCharCode(markerCharCode);
  8340. //
  8341. // Iterate list items
  8342. //
  8343. nextLine = startLine;
  8344. prevEmptyEnd = false;
  8345. terminatorRules = state.md.block.ruler.getRules('list');
  8346. oldParentType = state.parentType;
  8347. state.parentType = 'list';
  8348. while (nextLine < endLine) {
  8349. pos = posAfterMarker;
  8350. max = state.eMarks[nextLine];
  8351. initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);
  8352. while (pos < max) {
  8353. ch = state.src.charCodeAt(pos);
  8354. if (isSpace(ch)) {
  8355. if (ch === 0x09) {
  8356. offset += 4 - (offset + state.bsCount[nextLine]) % 4;
  8357. } else {
  8358. offset++;
  8359. }
  8360. } else {
  8361. break;
  8362. }
  8363. pos++;
  8364. }
  8365. contentStart = pos;
  8366. if (contentStart >= max) {
  8367. // trimming space in "- \n 3" case, indent is 1 here
  8368. indentAfterMarker = 1;
  8369. } else {
  8370. indentAfterMarker = offset - initial;
  8371. }
  8372. // If we have more than 4 spaces, the indent is 1
  8373. // (the rest is just indented code block)
  8374. if (indentAfterMarker > 4) { indentAfterMarker = 1; }
  8375. // " - test"
  8376. // ^^^^^ - calculating total length of this thing
  8377. indent = initial + indentAfterMarker;
  8378. // Run subparser & write tokens
  8379. token = state.push('list_item_open', 'li', 1);
  8380. token.markup = String.fromCharCode(markerCharCode);
  8381. token.map = itemLines = [ startLine, 0 ];
  8382. oldIndent = state.blkIndent;
  8383. oldTight = state.tight;
  8384. oldTShift = state.tShift[startLine];
  8385. oldLIndent = state.sCount[startLine];
  8386. state.blkIndent = indent;
  8387. state.tight = true;
  8388. state.tShift[startLine] = contentStart - state.bMarks[startLine];
  8389. state.sCount[startLine] = offset;
  8390. if (contentStart >= max && state.isEmpty(startLine + 1)) {
  8391. // workaround for this case
  8392. // (list item is empty, list terminates before "foo"):
  8393. // ~~~~~~~~
  8394. // -
  8395. //
  8396. // foo
  8397. // ~~~~~~~~
  8398. state.line = Math.min(state.line + 2, endLine);
  8399. } else {
  8400. state.md.block.tokenize(state, startLine, endLine, true);
  8401. }
  8402. // If any of list item is tight, mark list as tight
  8403. if (!state.tight || prevEmptyEnd) {
  8404. tight = false;
  8405. }
  8406. // Item become loose if finish with empty line,
  8407. // but we should filter last element, because it means list finish
  8408. prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);
  8409. state.blkIndent = oldIndent;
  8410. state.tShift[startLine] = oldTShift;
  8411. state.sCount[startLine] = oldLIndent;
  8412. state.tight = oldTight;
  8413. token = state.push('list_item_close', 'li', -1);
  8414. token.markup = String.fromCharCode(markerCharCode);
  8415. nextLine = startLine = state.line;
  8416. itemLines[1] = nextLine;
  8417. contentStart = state.bMarks[startLine];
  8418. if (nextLine >= endLine) { break; }
  8419. //
  8420. // Try to check if list is terminated or continued.
  8421. //
  8422. if (state.sCount[nextLine] < state.blkIndent) { break; }
  8423. // fail if terminating block found
  8424. terminate = false;
  8425. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8426. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8427. terminate = true;
  8428. break;
  8429. }
  8430. }
  8431. if (terminate) { break; }
  8432. // fail if list has another type
  8433. if (isOrdered) {
  8434. posAfterMarker = skipOrderedListMarker(state, nextLine);
  8435. if (posAfterMarker < 0) { break; }
  8436. } else {
  8437. posAfterMarker = skipBulletListMarker(state, nextLine);
  8438. if (posAfterMarker < 0) { break; }
  8439. }
  8440. if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }
  8441. }
  8442. // Finilize list
  8443. if (isOrdered) {
  8444. token = state.push('ordered_list_close', 'ol', -1);
  8445. } else {
  8446. token = state.push('bullet_list_close', 'ul', -1);
  8447. }
  8448. token.markup = String.fromCharCode(markerCharCode);
  8449. listLines[1] = nextLine;
  8450. state.line = nextLine;
  8451. state.parentType = oldParentType;
  8452. // mark paragraphs tight if needed
  8453. if (tight) {
  8454. markTightParagraphs(state, listTokIdx);
  8455. }
  8456. return true;
  8457. };
  8458. /***/ }),
  8459. /* 51 */
  8460. /***/ (function(module, exports, __webpack_require__) {
  8461. "use strict";
  8462. // Paragraph
  8463. module.exports = function paragraph(state, startLine/*, endLine*/) {
  8464. var content, terminate, i, l, token, oldParentType,
  8465. nextLine = startLine + 1,
  8466. terminatorRules = state.md.block.ruler.getRules('paragraph'),
  8467. endLine = state.lineMax;
  8468. oldParentType = state.parentType;
  8469. state.parentType = 'paragraph';
  8470. // jump line-by-line until empty one or EOF
  8471. for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
  8472. // this would be a code block normally, but after paragraph
  8473. // it's considered a lazy continuation regardless of what's there
  8474. if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
  8475. // quirk for blockquotes, this line should already be checked by that rule
  8476. if (state.sCount[nextLine] < 0) { continue; }
  8477. // Some tags can terminate paragraph without empty line.
  8478. terminate = false;
  8479. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8480. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8481. terminate = true;
  8482. break;
  8483. }
  8484. }
  8485. if (terminate) { break; }
  8486. }
  8487. content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  8488. state.line = nextLine;
  8489. token = state.push('paragraph_open', 'p', 1);
  8490. token.map = [ startLine, state.line ];
  8491. token = state.push('inline', '', 0);
  8492. token.content = content;
  8493. token.map = [ startLine, state.line ];
  8494. token.children = [];
  8495. token = state.push('paragraph_close', 'p', -1);
  8496. state.parentType = oldParentType;
  8497. return true;
  8498. };
  8499. /***/ }),
  8500. /* 52 */
  8501. /***/ (function(module, exports, __webpack_require__) {
  8502. "use strict";
  8503. var normalizeReference = __webpack_require__(0).normalizeReference;
  8504. var isSpace = __webpack_require__(0).isSpace;
  8505. module.exports = function reference(state, startLine, _endLine, silent) {
  8506. var ch,
  8507. destEndPos,
  8508. destEndLineNo,
  8509. endLine,
  8510. href,
  8511. i,
  8512. l,
  8513. label,
  8514. labelEnd,
  8515. oldParentType,
  8516. res,
  8517. start,
  8518. str,
  8519. terminate,
  8520. terminatorRules,
  8521. title,
  8522. lines = 0,
  8523. pos = state.bMarks[startLine] + state.tShift[startLine],
  8524. max = state.eMarks[startLine],
  8525. nextLine = startLine + 1;
  8526. // if it's indented more than 3 spaces, it should be a code block
  8527. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8528. if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }
  8529. // Simple check to quickly interrupt scan on [link](url) at the start of line.
  8530. // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54
  8531. while (++pos < max) {
  8532. if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&
  8533. state.src.charCodeAt(pos - 1) !== 0x5C/* \ */) {
  8534. if (pos + 1 === max) { return false; }
  8535. if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }
  8536. break;
  8537. }
  8538. }
  8539. endLine = state.lineMax;
  8540. // jump line-by-line until empty one or EOF
  8541. terminatorRules = state.md.block.ruler.getRules('reference');
  8542. oldParentType = state.parentType;
  8543. state.parentType = 'reference';
  8544. for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
  8545. // this would be a code block normally, but after paragraph
  8546. // it's considered a lazy continuation regardless of what's there
  8547. if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }
  8548. // quirk for blockquotes, this line should already be checked by that rule
  8549. if (state.sCount[nextLine] < 0) { continue; }
  8550. // Some tags can terminate paragraph without empty line.
  8551. terminate = false;
  8552. for (i = 0, l = terminatorRules.length; i < l; i++) {
  8553. if (terminatorRules[i](state, nextLine, endLine, true)) {
  8554. terminate = true;
  8555. break;
  8556. }
  8557. }
  8558. if (terminate) { break; }
  8559. }
  8560. str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  8561. max = str.length;
  8562. for (pos = 1; pos < max; pos++) {
  8563. ch = str.charCodeAt(pos);
  8564. if (ch === 0x5B /* [ */) {
  8565. return false;
  8566. } else if (ch === 0x5D /* ] */) {
  8567. labelEnd = pos;
  8568. break;
  8569. } else if (ch === 0x0A /* \n */) {
  8570. lines++;
  8571. } else if (ch === 0x5C /* \ */) {
  8572. pos++;
  8573. if (pos < max && str.charCodeAt(pos) === 0x0A) {
  8574. lines++;
  8575. }
  8576. }
  8577. }
  8578. if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }
  8579. // [label]: destination 'title'
  8580. // ^^^ skip optional whitespace here
  8581. for (pos = labelEnd + 2; pos < max; pos++) {
  8582. ch = str.charCodeAt(pos);
  8583. if (ch === 0x0A) {
  8584. lines++;
  8585. } else if (isSpace(ch)) {
  8586. /*eslint no-empty:0*/
  8587. } else {
  8588. break;
  8589. }
  8590. }
  8591. // [label]: destination 'title'
  8592. // ^^^^^^^^^^^ parse this
  8593. res = state.md.helpers.parseLinkDestination(str, pos, max);
  8594. if (!res.ok) { return false; }
  8595. href = state.md.normalizeLink(res.str);
  8596. if (!state.md.validateLink(href)) { return false; }
  8597. pos = res.pos;
  8598. lines += res.lines;
  8599. // save cursor state, we could require to rollback later
  8600. destEndPos = pos;
  8601. destEndLineNo = lines;
  8602. // [label]: destination 'title'
  8603. // ^^^ skipping those spaces
  8604. start = pos;
  8605. for (; pos < max; pos++) {
  8606. ch = str.charCodeAt(pos);
  8607. if (ch === 0x0A) {
  8608. lines++;
  8609. } else if (isSpace(ch)) {
  8610. /*eslint no-empty:0*/
  8611. } else {
  8612. break;
  8613. }
  8614. }
  8615. // [label]: destination 'title'
  8616. // ^^^^^^^ parse this
  8617. res = state.md.helpers.parseLinkTitle(str, pos, max);
  8618. if (pos < max && start !== pos && res.ok) {
  8619. title = res.str;
  8620. pos = res.pos;
  8621. lines += res.lines;
  8622. } else {
  8623. title = '';
  8624. pos = destEndPos;
  8625. lines = destEndLineNo;
  8626. }
  8627. // skip trailing spaces until the rest of the line
  8628. while (pos < max) {
  8629. ch = str.charCodeAt(pos);
  8630. if (!isSpace(ch)) { break; }
  8631. pos++;
  8632. }
  8633. if (pos < max && str.charCodeAt(pos) !== 0x0A) {
  8634. if (title) {
  8635. // garbage at the end of the line after title,
  8636. // but it could still be a valid reference if we roll back
  8637. title = '';
  8638. pos = destEndPos;
  8639. lines = destEndLineNo;
  8640. while (pos < max) {
  8641. ch = str.charCodeAt(pos);
  8642. if (!isSpace(ch)) { break; }
  8643. pos++;
  8644. }
  8645. }
  8646. }
  8647. if (pos < max && str.charCodeAt(pos) !== 0x0A) {
  8648. // garbage at the end of the line
  8649. return false;
  8650. }
  8651. label = normalizeReference(str.slice(1, labelEnd));
  8652. if (!label) {
  8653. // CommonMark 0.20 disallows empty labels
  8654. return false;
  8655. }
  8656. // Reference can not terminate anything. This check is for safety only.
  8657. /*istanbul ignore if*/
  8658. if (silent) { return true; }
  8659. if (typeof state.env.references === 'undefined') {
  8660. state.env.references = {};
  8661. }
  8662. if (typeof state.env.references[label] === 'undefined') {
  8663. state.env.references[label] = { title: title, href: href };
  8664. }
  8665. state.parentType = oldParentType;
  8666. state.line = startLine + lines + 1;
  8667. return true;
  8668. };
  8669. /***/ }),
  8670. /* 53 */
  8671. /***/ (function(module, exports, __webpack_require__) {
  8672. "use strict";
  8673. // Parser state class
  8674. var Token = __webpack_require__(4);
  8675. var isSpace = __webpack_require__(0).isSpace;
  8676. function StateBlock(src, md, env, tokens) {
  8677. var ch, s, start, pos, len, indent, offset, indent_found;
  8678. this.src = src;
  8679. // link to parser instance
  8680. this.md = md;
  8681. this.env = env;
  8682. //
  8683. // Internal state vartiables
  8684. //
  8685. this.tokens = tokens;
  8686. this.bMarks = []; // line begin offsets for fast jumps
  8687. this.eMarks = []; // line end offsets for fast jumps
  8688. this.tShift = []; // offsets of the first non-space characters (tabs not expanded)
  8689. this.sCount = []; // indents for each line (tabs expanded)
  8690. // An amount of virtual spaces (tabs expanded) between beginning
  8691. // of each line (bMarks) and real beginning of that line.
  8692. //
  8693. // It exists only as a hack because blockquotes override bMarks
  8694. // losing information in the process.
  8695. //
  8696. // It's used only when expanding tabs, you can think about it as
  8697. // an initial tab length, e.g. bsCount=21 applied to string `\t123`
  8698. // means first tab should be expanded to 4-21%4 === 3 spaces.
  8699. //
  8700. this.bsCount = [];
  8701. // block parser variables
  8702. this.blkIndent = 0; // required block content indent
  8703. // (for example, if we are in list)
  8704. this.line = 0; // line index in src
  8705. this.lineMax = 0; // lines count
  8706. this.tight = false; // loose/tight mode for lists
  8707. this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)
  8708. // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
  8709. // used in lists to determine if they interrupt a paragraph
  8710. this.parentType = 'root';
  8711. this.level = 0;
  8712. // renderer
  8713. this.result = '';
  8714. // Create caches
  8715. // Generate markers.
  8716. s = this.src;
  8717. indent_found = false;
  8718. for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {
  8719. ch = s.charCodeAt(pos);
  8720. if (!indent_found) {
  8721. if (isSpace(ch)) {
  8722. indent++;
  8723. if (ch === 0x09) {
  8724. offset += 4 - offset % 4;
  8725. } else {
  8726. offset++;
  8727. }
  8728. continue;
  8729. } else {
  8730. indent_found = true;
  8731. }
  8732. }
  8733. if (ch === 0x0A || pos === len - 1) {
  8734. if (ch !== 0x0A) { pos++; }
  8735. this.bMarks.push(start);
  8736. this.eMarks.push(pos);
  8737. this.tShift.push(indent);
  8738. this.sCount.push(offset);
  8739. this.bsCount.push(0);
  8740. indent_found = false;
  8741. indent = 0;
  8742. offset = 0;
  8743. start = pos + 1;
  8744. }
  8745. }
  8746. // Push fake entry to simplify cache bounds checks
  8747. this.bMarks.push(s.length);
  8748. this.eMarks.push(s.length);
  8749. this.tShift.push(0);
  8750. this.sCount.push(0);
  8751. this.bsCount.push(0);
  8752. this.lineMax = this.bMarks.length - 1; // don't count last fake line
  8753. }
  8754. // Push new token to "stream".
  8755. //
  8756. StateBlock.prototype.push = function (type, tag, nesting) {
  8757. var token = new Token(type, tag, nesting);
  8758. token.block = true;
  8759. if (nesting < 0) { this.level--; }
  8760. token.level = this.level;
  8761. if (nesting > 0) { this.level++; }
  8762. this.tokens.push(token);
  8763. return token;
  8764. };
  8765. StateBlock.prototype.isEmpty = function isEmpty(line) {
  8766. return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
  8767. };
  8768. StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
  8769. for (var max = this.lineMax; from < max; from++) {
  8770. if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
  8771. break;
  8772. }
  8773. }
  8774. return from;
  8775. };
  8776. // Skip spaces from given position.
  8777. StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
  8778. var ch;
  8779. for (var max = this.src.length; pos < max; pos++) {
  8780. ch = this.src.charCodeAt(pos);
  8781. if (!isSpace(ch)) { break; }
  8782. }
  8783. return pos;
  8784. };
  8785. // Skip spaces from given position in reverse.
  8786. StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
  8787. if (pos <= min) { return pos; }
  8788. while (pos > min) {
  8789. if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }
  8790. }
  8791. return pos;
  8792. };
  8793. // Skip char codes from given position
  8794. StateBlock.prototype.skipChars = function skipChars(pos, code) {
  8795. for (var max = this.src.length; pos < max; pos++) {
  8796. if (this.src.charCodeAt(pos) !== code) { break; }
  8797. }
  8798. return pos;
  8799. };
  8800. // Skip char codes reverse from given position - 1
  8801. StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
  8802. if (pos <= min) { return pos; }
  8803. while (pos > min) {
  8804. if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }
  8805. }
  8806. return pos;
  8807. };
  8808. // cut lines range from source.
  8809. StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
  8810. var i, lineIndent, ch, first, last, queue, lineStart,
  8811. line = begin;
  8812. if (begin >= end) {
  8813. return '';
  8814. }
  8815. queue = new Array(end - begin);
  8816. for (i = 0; line < end; line++, i++) {
  8817. lineIndent = 0;
  8818. lineStart = first = this.bMarks[line];
  8819. if (line + 1 < end || keepLastLF) {
  8820. // No need for bounds check because we have fake entry on tail.
  8821. last = this.eMarks[line] + 1;
  8822. } else {
  8823. last = this.eMarks[line];
  8824. }
  8825. while (first < last && lineIndent < indent) {
  8826. ch = this.src.charCodeAt(first);
  8827. if (isSpace(ch)) {
  8828. if (ch === 0x09) {
  8829. lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
  8830. } else {
  8831. lineIndent++;
  8832. }
  8833. } else if (first - lineStart < this.tShift[line]) {
  8834. // patched tShift masked characters to look like spaces (blockquotes, list markers)
  8835. lineIndent++;
  8836. } else {
  8837. break;
  8838. }
  8839. first++;
  8840. }
  8841. if (lineIndent > indent) {
  8842. // partially expanding tabs in code blocks, e.g '\t\tfoobar'
  8843. // with indent=2 becomes ' \tfoobar'
  8844. queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);
  8845. } else {
  8846. queue[i] = this.src.slice(first, last);
  8847. }
  8848. }
  8849. return queue.join('');
  8850. };
  8851. // re-export Token class to use in block rules
  8852. StateBlock.prototype.Token = Token;
  8853. module.exports = StateBlock;
  8854. /***/ }),
  8855. /* 54 */
  8856. /***/ (function(module, exports, __webpack_require__) {
  8857. "use strict";
  8858. // GFM table, non-standard
  8859. var isSpace = __webpack_require__(0).isSpace;
  8860. function getLine(state, line) {
  8861. var pos = state.bMarks[line] + state.blkIndent,
  8862. max = state.eMarks[line];
  8863. return state.src.substr(pos, max - pos);
  8864. }
  8865. function escapedSplit(str) {
  8866. var result = [],
  8867. pos = 0,
  8868. max = str.length,
  8869. ch,
  8870. escapes = 0,
  8871. lastPos = 0,
  8872. backTicked = false,
  8873. lastBackTick = 0;
  8874. ch = str.charCodeAt(pos);
  8875. while (pos < max) {
  8876. if (ch === 0x60/* ` */) {
  8877. if (backTicked) {
  8878. // make \` close code sequence, but not open it;
  8879. // the reason is: `\` is correct code block
  8880. backTicked = false;
  8881. lastBackTick = pos;
  8882. } else if (escapes % 2 === 0) {
  8883. backTicked = true;
  8884. lastBackTick = pos;
  8885. }
  8886. } else if (ch === 0x7c/* | */ && (escapes % 2 === 0) && !backTicked) {
  8887. result.push(str.substring(lastPos, pos));
  8888. lastPos = pos + 1;
  8889. }
  8890. if (ch === 0x5c/* \ */) {
  8891. escapes++;
  8892. } else {
  8893. escapes = 0;
  8894. }
  8895. pos++;
  8896. // If there was an un-closed backtick, go back to just after
  8897. // the last backtick, but as if it was a normal character
  8898. if (pos === max && backTicked) {
  8899. backTicked = false;
  8900. pos = lastBackTick + 1;
  8901. }
  8902. ch = str.charCodeAt(pos);
  8903. }
  8904. result.push(str.substring(lastPos));
  8905. return result;
  8906. }
  8907. module.exports = function table(state, startLine, endLine, silent) {
  8908. var ch, lineText, pos, i, nextLine, columns, columnCount, token,
  8909. aligns, t, tableLines, tbodyLines;
  8910. // should have at least two lines
  8911. if (startLine + 2 > endLine) { return false; }
  8912. nextLine = startLine + 1;
  8913. if (state.sCount[nextLine] < state.blkIndent) { return false; }
  8914. // if it's indented more than 3 spaces, it should be a code block
  8915. if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }
  8916. // first character of the second line should be '|', '-', ':',
  8917. // and no other characters are allowed but spaces;
  8918. // basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp
  8919. pos = state.bMarks[nextLine] + state.tShift[nextLine];
  8920. if (pos >= state.eMarks[nextLine]) { return false; }
  8921. ch = state.src.charCodeAt(pos++);
  8922. if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }
  8923. while (pos < state.eMarks[nextLine]) {
  8924. ch = state.src.charCodeAt(pos);
  8925. if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }
  8926. pos++;
  8927. }
  8928. lineText = getLine(state, startLine + 1);
  8929. columns = lineText.split('|');
  8930. aligns = [];
  8931. for (i = 0; i < columns.length; i++) {
  8932. t = columns[i].trim();
  8933. if (!t) {
  8934. // allow empty columns before and after table, but not in between columns;
  8935. // e.g. allow ` |---| `, disallow ` ---||--- `
  8936. if (i === 0 || i === columns.length - 1) {
  8937. continue;
  8938. } else {
  8939. return false;
  8940. }
  8941. }
  8942. if (!/^:?-+:?$/.test(t)) { return false; }
  8943. if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {
  8944. aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');
  8945. } else if (t.charCodeAt(0) === 0x3A/* : */) {
  8946. aligns.push('left');
  8947. } else {
  8948. aligns.push('');
  8949. }
  8950. }
  8951. lineText = getLine(state, startLine).trim();
  8952. if (lineText.indexOf('|') === -1) { return false; }
  8953. if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
  8954. columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
  8955. // header row will define an amount of columns in the entire table,
  8956. // and align row shouldn't be smaller than that (the rest of the rows can)
  8957. columnCount = columns.length;
  8958. if (columnCount > aligns.length) { return false; }
  8959. if (silent) { return true; }
  8960. token = state.push('table_open', 'table', 1);
  8961. token.map = tableLines = [ startLine, 0 ];
  8962. token = state.push('thead_open', 'thead', 1);
  8963. token.map = [ startLine, startLine + 1 ];
  8964. token = state.push('tr_open', 'tr', 1);
  8965. token.map = [ startLine, startLine + 1 ];
  8966. for (i = 0; i < columns.length; i++) {
  8967. token = state.push('th_open', 'th', 1);
  8968. token.map = [ startLine, startLine + 1 ];
  8969. if (aligns[i]) {
  8970. token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
  8971. }
  8972. token = state.push('inline', '', 0);
  8973. token.content = columns[i].trim();
  8974. token.map = [ startLine, startLine + 1 ];
  8975. token.children = [];
  8976. token = state.push('th_close', 'th', -1);
  8977. }
  8978. token = state.push('tr_close', 'tr', -1);
  8979. token = state.push('thead_close', 'thead', -1);
  8980. token = state.push('tbody_open', 'tbody', 1);
  8981. token.map = tbodyLines = [ startLine + 2, 0 ];
  8982. for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
  8983. if (state.sCount[nextLine] < state.blkIndent) { break; }
  8984. lineText = getLine(state, nextLine).trim();
  8985. if (lineText.indexOf('|') === -1) { break; }
  8986. if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }
  8987. columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
  8988. token = state.push('tr_open', 'tr', 1);
  8989. for (i = 0; i < columnCount; i++) {
  8990. token = state.push('td_open', 'td', 1);
  8991. if (aligns[i]) {
  8992. token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];
  8993. }
  8994. token = state.push('inline', '', 0);
  8995. token.content = columns[i] ? columns[i].trim() : '';
  8996. token.children = [];
  8997. token = state.push('td_close', 'td', -1);
  8998. }
  8999. token = state.push('tr_close', 'tr', -1);
  9000. }
  9001. token = state.push('tbody_close', 'tbody', -1);
  9002. token = state.push('table_close', 'table', -1);
  9003. tableLines[1] = tbodyLines[1] = nextLine;
  9004. state.line = nextLine;
  9005. return true;
  9006. };
  9007. /***/ }),
  9008. /* 55 */
  9009. /***/ (function(module, exports, __webpack_require__) {
  9010. "use strict";
  9011. module.exports = function block(state) {
  9012. var token;
  9013. if (state.inlineMode) {
  9014. token = new state.Token('inline', '', 0);
  9015. token.content = state.src;
  9016. token.map = [ 0, 1 ];
  9017. token.children = [];
  9018. state.tokens.push(token);
  9019. } else {
  9020. state.md.block.parse(state.src, state.md, state.env, state.tokens);
  9021. }
  9022. };
  9023. /***/ }),
  9024. /* 56 */
  9025. /***/ (function(module, exports, __webpack_require__) {
  9026. "use strict";
  9027. module.exports = function inline(state) {
  9028. var tokens = state.tokens, tok, i, l;
  9029. // Parse inlines
  9030. for (i = 0, l = tokens.length; i < l; i++) {
  9031. tok = tokens[i];
  9032. if (tok.type === 'inline') {
  9033. state.md.inline.parse(tok.content, state.md, state.env, tok.children);
  9034. }
  9035. }
  9036. };
  9037. /***/ }),
  9038. /* 57 */
  9039. /***/ (function(module, exports, __webpack_require__) {
  9040. "use strict";
  9041. // Replace link-like texts with link nodes.
  9042. //
  9043. // Currently restricted by `md.validateLink()` to http/https/ftp
  9044. //
  9045. var arrayReplaceAt = __webpack_require__(0).arrayReplaceAt;
  9046. function isLinkOpen(str) {
  9047. return /^<a[>\s]/i.test(str);
  9048. }
  9049. function isLinkClose(str) {
  9050. return /^<\/a\s*>/i.test(str);
  9051. }
  9052. module.exports = function linkify(state) {
  9053. var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,
  9054. level, htmlLinkLevel, url, fullUrl, urlText,
  9055. blockTokens = state.tokens,
  9056. links;
  9057. if (!state.md.options.linkify) { return; }
  9058. for (j = 0, l = blockTokens.length; j < l; j++) {
  9059. if (blockTokens[j].type !== 'inline' ||
  9060. !state.md.linkify.pretest(blockTokens[j].content)) {
  9061. continue;
  9062. }
  9063. tokens = blockTokens[j].children;
  9064. htmlLinkLevel = 0;
  9065. // We scan from the end, to keep position when new tags added.
  9066. // Use reversed logic in links start/end match
  9067. for (i = tokens.length - 1; i >= 0; i--) {
  9068. currentToken = tokens[i];
  9069. // Skip content of markdown links
  9070. if (currentToken.type === 'link_close') {
  9071. i--;
  9072. while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {
  9073. i--;
  9074. }
  9075. continue;
  9076. }
  9077. // Skip content of html tag links
  9078. if (currentToken.type === 'html_inline') {
  9079. if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {
  9080. htmlLinkLevel--;
  9081. }
  9082. if (isLinkClose(currentToken.content)) {
  9083. htmlLinkLevel++;
  9084. }
  9085. }
  9086. if (htmlLinkLevel > 0) { continue; }
  9087. if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {
  9088. text = currentToken.content;
  9089. links = state.md.linkify.match(text);
  9090. // Now split string to nodes
  9091. nodes = [];
  9092. level = currentToken.level;
  9093. lastPos = 0;
  9094. for (ln = 0; ln < links.length; ln++) {
  9095. url = links[ln].url;
  9096. fullUrl = state.md.normalizeLink(url);
  9097. if (!state.md.validateLink(fullUrl)) { continue; }
  9098. urlText = links[ln].text;
  9099. // Linkifier might send raw hostnames like "example.com", where url
  9100. // starts with domain name. So we prepend http:// in those cases,
  9101. // and remove it afterwards.
  9102. //
  9103. if (!links[ln].schema) {
  9104. urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
  9105. } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
  9106. urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
  9107. } else {
  9108. urlText = state.md.normalizeLinkText(urlText);
  9109. }
  9110. pos = links[ln].index;
  9111. if (pos > lastPos) {
  9112. token = new state.Token('text', '', 0);
  9113. token.content = text.slice(lastPos, pos);
  9114. token.level = level;
  9115. nodes.push(token);
  9116. }
  9117. token = new state.Token('link_open', 'a', 1);
  9118. token.attrs = [ [ 'href', fullUrl ] ];
  9119. token.level = level++;
  9120. token.markup = 'linkify';
  9121. token.info = 'auto';
  9122. nodes.push(token);
  9123. token = new state.Token('text', '', 0);
  9124. token.content = urlText;
  9125. token.level = level;
  9126. nodes.push(token);
  9127. token = new state.Token('link_close', 'a', -1);
  9128. token.level = --level;
  9129. token.markup = 'linkify';
  9130. token.info = 'auto';
  9131. nodes.push(token);
  9132. lastPos = links[ln].lastIndex;
  9133. }
  9134. if (lastPos < text.length) {
  9135. token = new state.Token('text', '', 0);
  9136. token.content = text.slice(lastPos);
  9137. token.level = level;
  9138. nodes.push(token);
  9139. }
  9140. // replace current node
  9141. blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
  9142. }
  9143. }
  9144. }
  9145. };
  9146. /***/ }),
  9147. /* 58 */
  9148. /***/ (function(module, exports, __webpack_require__) {
  9149. "use strict";
  9150. // Normalize input string
  9151. var NEWLINES_RE = /\r[\n\u0085]?|[\u2424\u2028\u0085]/g;
  9152. var NULL_RE = /\u0000/g;
  9153. module.exports = function inline(state) {
  9154. var str;
  9155. // Normalize newlines
  9156. str = state.src.replace(NEWLINES_RE, '\n');
  9157. // Replace NULL characters
  9158. str = str.replace(NULL_RE, '\uFFFD');
  9159. state.src = str;
  9160. };
  9161. /***/ }),
  9162. /* 59 */
  9163. /***/ (function(module, exports, __webpack_require__) {
  9164. "use strict";
  9165. // Simple typographyc replacements
  9166. //
  9167. // (c) (C) → ©
  9168. // (tm) (TM) → ™
  9169. // (r) (R) → ®
  9170. // +- → ±
  9171. // (p) (P) -> §
  9172. // ... → … (also ?.... → ?.., !.... → !..)
  9173. // ???????? → ???, !!!!! → !!!, `,,` → `,`
  9174. // -- → &ndash;, --- → &mdash;
  9175. //
  9176. // TODO:
  9177. // - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
  9178. // - miltiplication 2 x 4 -> 2 × 4
  9179. var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;
  9180. // Workaround for phantomjs - need regex without /g flag,
  9181. // or root check will fail every second time
  9182. var SCOPED_ABBR_TEST_RE = /\((c|tm|r|p)\)/i;
  9183. var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig;
  9184. var SCOPED_ABBR = {
  9185. c: '©',
  9186. r: '®',
  9187. p: '§',
  9188. tm: '™'
  9189. };
  9190. function replaceFn(match, name) {
  9191. return SCOPED_ABBR[name.toLowerCase()];
  9192. }
  9193. function replace_scoped(inlineTokens) {
  9194. var i, token, inside_autolink = 0;
  9195. for (i = inlineTokens.length - 1; i >= 0; i--) {
  9196. token = inlineTokens[i];
  9197. if (token.type === 'text' && !inside_autolink) {
  9198. token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
  9199. }
  9200. if (token.type === 'link_open' && token.info === 'auto') {
  9201. inside_autolink--;
  9202. }
  9203. if (token.type === 'link_close' && token.info === 'auto') {
  9204. inside_autolink++;
  9205. }
  9206. }
  9207. }
  9208. function replace_rare(inlineTokens) {
  9209. var i, token, inside_autolink = 0;
  9210. for (i = inlineTokens.length - 1; i >= 0; i--) {
  9211. token = inlineTokens[i];
  9212. if (token.type === 'text' && !inside_autolink) {
  9213. if (RARE_RE.test(token.content)) {
  9214. token.content = token.content
  9215. .replace(/\+-/g, '±')
  9216. // .., ..., ....... -> …
  9217. // but ?..... & !..... -> ?.. & !..
  9218. .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..')
  9219. .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
  9220. // em-dash
  9221. .replace(/(^|[^-])---([^-]|$)/mg, '$1\u2014$2')
  9222. // en-dash
  9223. .replace(/(^|\s)--(\s|$)/mg, '$1\u2013$2')
  9224. .replace(/(^|[^-\s])--([^-\s]|$)/mg, '$1\u2013$2');
  9225. }
  9226. }
  9227. if (token.type === 'link_open' && token.info === 'auto') {
  9228. inside_autolink--;
  9229. }
  9230. if (token.type === 'link_close' && token.info === 'auto') {
  9231. inside_autolink++;
  9232. }
  9233. }
  9234. }
  9235. module.exports = function replace(state) {
  9236. var blkIdx;
  9237. if (!state.md.options.typographer) { return; }
  9238. for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
  9239. if (state.tokens[blkIdx].type !== 'inline') { continue; }
  9240. if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
  9241. replace_scoped(state.tokens[blkIdx].children);
  9242. }
  9243. if (RARE_RE.test(state.tokens[blkIdx].content)) {
  9244. replace_rare(state.tokens[blkIdx].children);
  9245. }
  9246. }
  9247. };
  9248. /***/ }),
  9249. /* 60 */
  9250. /***/ (function(module, exports, __webpack_require__) {
  9251. "use strict";
  9252. // Convert straight quotation marks to typographic ones
  9253. //
  9254. var isWhiteSpace = __webpack_require__(0).isWhiteSpace;
  9255. var isPunctChar = __webpack_require__(0).isPunctChar;
  9256. var isMdAsciiPunct = __webpack_require__(0).isMdAsciiPunct;
  9257. var QUOTE_TEST_RE = /['"]/;
  9258. var QUOTE_RE = /['"]/g;
  9259. var APOSTROPHE = '\u2019'; /* ’ */
  9260. function replaceAt(str, index, ch) {
  9261. return str.substr(0, index) + ch + str.substr(index + 1);
  9262. }
  9263. function process_inlines(tokens, state) {
  9264. var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,
  9265. isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,
  9266. canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;
  9267. stack = [];
  9268. for (i = 0; i < tokens.length; i++) {
  9269. token = tokens[i];
  9270. thisLevel = tokens[i].level;
  9271. for (j = stack.length - 1; j >= 0; j--) {
  9272. if (stack[j].level <= thisLevel) { break; }
  9273. }
  9274. stack.length = j + 1;
  9275. if (token.type !== 'text') { continue; }
  9276. text = token.content;
  9277. pos = 0;
  9278. max = text.length;
  9279. /*eslint no-labels:0,block-scoped-var:0*/
  9280. OUTER:
  9281. while (pos < max) {
  9282. QUOTE_RE.lastIndex = pos;
  9283. t = QUOTE_RE.exec(text);
  9284. if (!t) { break; }
  9285. canOpen = canClose = true;
  9286. pos = t.index + 1;
  9287. isSingle = (t[0] === "'");
  9288. // Find previous character,
  9289. // default to space if it's the beginning of the line
  9290. //
  9291. lastChar = 0x20;
  9292. if (t.index - 1 >= 0) {
  9293. lastChar = text.charCodeAt(t.index - 1);
  9294. } else {
  9295. for (j = i - 1; j >= 0; j--) {
  9296. if (tokens[j].type !== 'text') { continue; }
  9297. lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
  9298. break;
  9299. }
  9300. }
  9301. // Find next character,
  9302. // default to space if it's the end of the line
  9303. //
  9304. nextChar = 0x20;
  9305. if (pos < max) {
  9306. nextChar = text.charCodeAt(pos);
  9307. } else {
  9308. for (j = i + 1; j < tokens.length; j++) {
  9309. if (tokens[j].type !== 'text') { continue; }
  9310. nextChar = tokens[j].content.charCodeAt(0);
  9311. break;
  9312. }
  9313. }
  9314. isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
  9315. isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
  9316. isLastWhiteSpace = isWhiteSpace(lastChar);
  9317. isNextWhiteSpace = isWhiteSpace(nextChar);
  9318. if (isNextWhiteSpace) {
  9319. canOpen = false;
  9320. } else if (isNextPunctChar) {
  9321. if (!(isLastWhiteSpace || isLastPunctChar)) {
  9322. canOpen = false;
  9323. }
  9324. }
  9325. if (isLastWhiteSpace) {
  9326. canClose = false;
  9327. } else if (isLastPunctChar) {
  9328. if (!(isNextWhiteSpace || isNextPunctChar)) {
  9329. canClose = false;
  9330. }
  9331. }
  9332. if (nextChar === 0x22 /* " */ && t[0] === '"') {
  9333. if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {
  9334. // special case: 1"" - count first quote as an inch
  9335. canClose = canOpen = false;
  9336. }
  9337. }
  9338. if (canOpen && canClose) {
  9339. // treat this as the middle of the word
  9340. canOpen = false;
  9341. canClose = isNextPunctChar;
  9342. }
  9343. if (!canOpen && !canClose) {
  9344. // middle of word
  9345. if (isSingle) {
  9346. token.content = replaceAt(token.content, t.index, APOSTROPHE);
  9347. }
  9348. continue;
  9349. }
  9350. if (canClose) {
  9351. // this could be a closing quote, rewind the stack to get a match
  9352. for (j = stack.length - 1; j >= 0; j--) {
  9353. item = stack[j];
  9354. if (stack[j].level < thisLevel) { break; }
  9355. if (item.single === isSingle && stack[j].level === thisLevel) {
  9356. item = stack[j];
  9357. if (isSingle) {
  9358. openQuote = state.md.options.quotes[2];
  9359. closeQuote = state.md.options.quotes[3];
  9360. } else {
  9361. openQuote = state.md.options.quotes[0];
  9362. closeQuote = state.md.options.quotes[1];
  9363. }
  9364. // replace token.content *before* tokens[item.token].content,
  9365. // because, if they are pointing at the same token, replaceAt
  9366. // could mess up indices when quote length != 1
  9367. token.content = replaceAt(token.content, t.index, closeQuote);
  9368. tokens[item.token].content = replaceAt(
  9369. tokens[item.token].content, item.pos, openQuote);
  9370. pos += closeQuote.length - 1;
  9371. if (item.token === i) { pos += openQuote.length - 1; }
  9372. text = token.content;
  9373. max = text.length;
  9374. stack.length = j;
  9375. continue OUTER;
  9376. }
  9377. }
  9378. }
  9379. if (canOpen) {
  9380. stack.push({
  9381. token: i,
  9382. pos: t.index,
  9383. single: isSingle,
  9384. level: thisLevel
  9385. });
  9386. } else if (canClose && isSingle) {
  9387. token.content = replaceAt(token.content, t.index, APOSTROPHE);
  9388. }
  9389. }
  9390. }
  9391. }
  9392. module.exports = function smartquotes(state) {
  9393. /*eslint max-depth:0*/
  9394. var blkIdx;
  9395. if (!state.md.options.typographer) { return; }
  9396. for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
  9397. if (state.tokens[blkIdx].type !== 'inline' ||
  9398. !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
  9399. continue;
  9400. }
  9401. process_inlines(state.tokens[blkIdx].children, state);
  9402. }
  9403. };
  9404. /***/ }),
  9405. /* 61 */
  9406. /***/ (function(module, exports, __webpack_require__) {
  9407. "use strict";
  9408. // Core state object
  9409. //
  9410. var Token = __webpack_require__(4);
  9411. function StateCore(src, md, env) {
  9412. this.src = src;
  9413. this.env = env;
  9414. this.tokens = [];
  9415. this.inlineMode = false;
  9416. this.md = md; // link to parser instance
  9417. }
  9418. // re-export Token class to use in core rules
  9419. StateCore.prototype.Token = Token;
  9420. module.exports = StateCore;
  9421. /***/ }),
  9422. /* 62 */
  9423. /***/ (function(module, exports, __webpack_require__) {
  9424. "use strict";
  9425. // Process autolinks '<protocol:...>'
  9426. /*eslint max-len:0*/
  9427. var EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;
  9428. var AUTOLINK_RE = /^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;
  9429. module.exports = function autolink(state, silent) {
  9430. var tail, linkMatch, emailMatch, url, fullUrl, token,
  9431. pos = state.pos;
  9432. if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
  9433. tail = state.src.slice(pos);
  9434. if (tail.indexOf('>') < 0) { return false; }
  9435. if (AUTOLINK_RE.test(tail)) {
  9436. linkMatch = tail.match(AUTOLINK_RE);
  9437. url = linkMatch[0].slice(1, -1);
  9438. fullUrl = state.md.normalizeLink(url);
  9439. if (!state.md.validateLink(fullUrl)) { return false; }
  9440. if (!silent) {
  9441. token = state.push('link_open', 'a', 1);
  9442. token.attrs = [ [ 'href', fullUrl ] ];
  9443. token.markup = 'autolink';
  9444. token.info = 'auto';
  9445. token = state.push('text', '', 0);
  9446. token.content = state.md.normalizeLinkText(url);
  9447. token = state.push('link_close', 'a', -1);
  9448. token.markup = 'autolink';
  9449. token.info = 'auto';
  9450. }
  9451. state.pos += linkMatch[0].length;
  9452. return true;
  9453. }
  9454. if (EMAIL_RE.test(tail)) {
  9455. emailMatch = tail.match(EMAIL_RE);
  9456. url = emailMatch[0].slice(1, -1);
  9457. fullUrl = state.md.normalizeLink('mailto:' + url);
  9458. if (!state.md.validateLink(fullUrl)) { return false; }
  9459. if (!silent) {
  9460. token = state.push('link_open', 'a', 1);
  9461. token.attrs = [ [ 'href', fullUrl ] ];
  9462. token.markup = 'autolink';
  9463. token.info = 'auto';
  9464. token = state.push('text', '', 0);
  9465. token.content = state.md.normalizeLinkText(url);
  9466. token = state.push('link_close', 'a', -1);
  9467. token.markup = 'autolink';
  9468. token.info = 'auto';
  9469. }
  9470. state.pos += emailMatch[0].length;
  9471. return true;
  9472. }
  9473. return false;
  9474. };
  9475. /***/ }),
  9476. /* 63 */
  9477. /***/ (function(module, exports, __webpack_require__) {
  9478. "use strict";
  9479. // Parse backticks
  9480. module.exports = function backtick(state, silent) {
  9481. var start, max, marker, matchStart, matchEnd, token,
  9482. pos = state.pos,
  9483. ch = state.src.charCodeAt(pos);
  9484. if (ch !== 0x60/* ` */) { return false; }
  9485. start = pos;
  9486. pos++;
  9487. max = state.posMax;
  9488. while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }
  9489. marker = state.src.slice(start, pos);
  9490. matchStart = matchEnd = pos;
  9491. while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
  9492. matchEnd = matchStart + 1;
  9493. while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }
  9494. if (matchEnd - matchStart === marker.length) {
  9495. if (!silent) {
  9496. token = state.push('code_inline', 'code', 0);
  9497. token.markup = marker;
  9498. token.content = state.src.slice(pos, matchStart)
  9499. .replace(/[ \n]+/g, ' ')
  9500. .trim();
  9501. }
  9502. state.pos = matchEnd;
  9503. return true;
  9504. }
  9505. }
  9506. if (!silent) { state.pending += marker; }
  9507. state.pos += marker.length;
  9508. return true;
  9509. };
  9510. /***/ }),
  9511. /* 64 */
  9512. /***/ (function(module, exports, __webpack_require__) {
  9513. "use strict";
  9514. // For each opening emphasis-like marker find a matching closing one
  9515. //
  9516. module.exports = function link_pairs(state) {
  9517. var i, j, lastDelim, currDelim,
  9518. delimiters = state.delimiters,
  9519. max = state.delimiters.length;
  9520. for (i = 0; i < max; i++) {
  9521. lastDelim = delimiters[i];
  9522. if (!lastDelim.close) { continue; }
  9523. j = i - lastDelim.jump - 1;
  9524. while (j >= 0) {
  9525. currDelim = delimiters[j];
  9526. if (currDelim.open &&
  9527. currDelim.marker === lastDelim.marker &&
  9528. currDelim.end < 0 &&
  9529. currDelim.level === lastDelim.level) {
  9530. // typeofs are for backward compatibility with plugins
  9531. var odd_match = (currDelim.close || lastDelim.open) &&
  9532. typeof currDelim.length !== 'undefined' &&
  9533. typeof lastDelim.length !== 'undefined' &&
  9534. (currDelim.length + lastDelim.length) % 3 === 0;
  9535. if (!odd_match) {
  9536. lastDelim.jump = i - j;
  9537. lastDelim.open = false;
  9538. currDelim.end = i;
  9539. currDelim.jump = 0;
  9540. break;
  9541. }
  9542. }
  9543. j -= currDelim.jump + 1;
  9544. }
  9545. }
  9546. };
  9547. /***/ }),
  9548. /* 65 */
  9549. /***/ (function(module, exports, __webpack_require__) {
  9550. "use strict";
  9551. // Process html entity - &#123;, &#xAF;, &quot;, ...
  9552. var entities = __webpack_require__(11);
  9553. var has = __webpack_require__(0).has;
  9554. var isValidEntityCode = __webpack_require__(0).isValidEntityCode;
  9555. var fromCodePoint = __webpack_require__(0).fromCodePoint;
  9556. var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;
  9557. var NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;
  9558. module.exports = function entity(state, silent) {
  9559. var ch, code, match, pos = state.pos, max = state.posMax;
  9560. if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }
  9561. if (pos + 1 < max) {
  9562. ch = state.src.charCodeAt(pos + 1);
  9563. if (ch === 0x23 /* # */) {
  9564. match = state.src.slice(pos).match(DIGITAL_RE);
  9565. if (match) {
  9566. if (!silent) {
  9567. code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
  9568. state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);
  9569. }
  9570. state.pos += match[0].length;
  9571. return true;
  9572. }
  9573. } else {
  9574. match = state.src.slice(pos).match(NAMED_RE);
  9575. if (match) {
  9576. if (has(entities, match[1])) {
  9577. if (!silent) { state.pending += entities[match[1]]; }
  9578. state.pos += match[0].length;
  9579. return true;
  9580. }
  9581. }
  9582. }
  9583. }
  9584. if (!silent) { state.pending += '&'; }
  9585. state.pos++;
  9586. return true;
  9587. };
  9588. /***/ }),
  9589. /* 66 */
  9590. /***/ (function(module, exports, __webpack_require__) {
  9591. "use strict";
  9592. // Proceess escaped chars and hardbreaks
  9593. var isSpace = __webpack_require__(0).isSpace;
  9594. var ESCAPED = [];
  9595. for (var i = 0; i < 256; i++) { ESCAPED.push(0); }
  9596. '\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'
  9597. .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });
  9598. module.exports = function escape(state, silent) {
  9599. var ch, pos = state.pos, max = state.posMax;
  9600. if (state.src.charCodeAt(pos) !== 0x5C/* \ */) { return false; }
  9601. pos++;
  9602. if (pos < max) {
  9603. ch = state.src.charCodeAt(pos);
  9604. if (ch < 256 && ESCAPED[ch] !== 0) {
  9605. if (!silent) { state.pending += state.src[pos]; }
  9606. state.pos += 2;
  9607. return true;
  9608. }
  9609. if (ch === 0x0A) {
  9610. if (!silent) {
  9611. state.push('hardbreak', 'br', 0);
  9612. }
  9613. pos++;
  9614. // skip leading whitespaces from next line
  9615. while (pos < max) {
  9616. ch = state.src.charCodeAt(pos);
  9617. if (!isSpace(ch)) { break; }
  9618. pos++;
  9619. }
  9620. state.pos = pos;
  9621. return true;
  9622. }
  9623. }
  9624. if (!silent) { state.pending += '\\'; }
  9625. state.pos++;
  9626. return true;
  9627. };
  9628. /***/ }),
  9629. /* 67 */
  9630. /***/ (function(module, exports, __webpack_require__) {
  9631. "use strict";
  9632. // Process html tags
  9633. var HTML_TAG_RE = __webpack_require__(12).HTML_TAG_RE;
  9634. function isLetter(ch) {
  9635. /*eslint no-bitwise:0*/
  9636. var lc = ch | 0x20; // to lower case
  9637. return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);
  9638. }
  9639. module.exports = function html_inline(state, silent) {
  9640. var ch, match, max, token,
  9641. pos = state.pos;
  9642. if (!state.md.options.html) { return false; }
  9643. // Check start
  9644. max = state.posMax;
  9645. if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||
  9646. pos + 2 >= max) {
  9647. return false;
  9648. }
  9649. // Quick fail on second char
  9650. ch = state.src.charCodeAt(pos + 1);
  9651. if (ch !== 0x21/* ! */ &&
  9652. ch !== 0x3F/* ? */ &&
  9653. ch !== 0x2F/* / */ &&
  9654. !isLetter(ch)) {
  9655. return false;
  9656. }
  9657. match = state.src.slice(pos).match(HTML_TAG_RE);
  9658. if (!match) { return false; }
  9659. if (!silent) {
  9660. token = state.push('html_inline', '', 0);
  9661. token.content = state.src.slice(pos, pos + match[0].length);
  9662. }
  9663. state.pos += match[0].length;
  9664. return true;
  9665. };
  9666. /***/ }),
  9667. /* 68 */
  9668. /***/ (function(module, exports, __webpack_require__) {
  9669. "use strict";
  9670. // Process ![image](<src> "title")
  9671. var normalizeReference = __webpack_require__(0).normalizeReference;
  9672. var isSpace = __webpack_require__(0).isSpace;
  9673. module.exports = function image(state, silent) {
  9674. var attrs,
  9675. code,
  9676. content,
  9677. label,
  9678. labelEnd,
  9679. labelStart,
  9680. pos,
  9681. ref,
  9682. res,
  9683. title,
  9684. token,
  9685. tokens,
  9686. start,
  9687. href = '',
  9688. oldPos = state.pos,
  9689. max = state.posMax;
  9690. if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }
  9691. if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }
  9692. labelStart = state.pos + 2;
  9693. labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);
  9694. // parser failed to find ']', so it's not a valid link
  9695. if (labelEnd < 0) { return false; }
  9696. pos = labelEnd + 1;
  9697. if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
  9698. //
  9699. // Inline link
  9700. //
  9701. // [link]( <href> "title" )
  9702. // ^^ skipping these spaces
  9703. pos++;
  9704. for (; pos < max; pos++) {
  9705. code = state.src.charCodeAt(pos);
  9706. if (!isSpace(code) && code !== 0x0A) { break; }
  9707. }
  9708. if (pos >= max) { return false; }
  9709. // [link]( <href> "title" )
  9710. // ^^^^^^ parsing link destination
  9711. start = pos;
  9712. res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
  9713. if (res.ok) {
  9714. href = state.md.normalizeLink(res.str);
  9715. if (state.md.validateLink(href)) {
  9716. pos = res.pos;
  9717. } else {
  9718. href = '';
  9719. }
  9720. }
  9721. // [link]( <href> "title" )
  9722. // ^^ skipping these spaces
  9723. start = pos;
  9724. for (; pos < max; pos++) {
  9725. code = state.src.charCodeAt(pos);
  9726. if (!isSpace(code) && code !== 0x0A) { break; }
  9727. }
  9728. // [link]( <href> "title" )
  9729. // ^^^^^^^ parsing link title
  9730. res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
  9731. if (pos < max && start !== pos && res.ok) {
  9732. title = res.str;
  9733. pos = res.pos;
  9734. // [link]( <href> "title" )
  9735. // ^^ skipping these spaces
  9736. for (; pos < max; pos++) {
  9737. code = state.src.charCodeAt(pos);
  9738. if (!isSpace(code) && code !== 0x0A) { break; }
  9739. }
  9740. } else {
  9741. title = '';
  9742. }
  9743. if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
  9744. state.pos = oldPos;
  9745. return false;
  9746. }
  9747. pos++;
  9748. } else {
  9749. //
  9750. // Link reference
  9751. //
  9752. if (typeof state.env.references === 'undefined') { return false; }
  9753. if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
  9754. start = pos + 1;
  9755. pos = state.md.helpers.parseLinkLabel(state, pos);
  9756. if (pos >= 0) {
  9757. label = state.src.slice(start, pos++);
  9758. } else {
  9759. pos = labelEnd + 1;
  9760. }
  9761. } else {
  9762. pos = labelEnd + 1;
  9763. }
  9764. // covers label === '' and label === undefined
  9765. // (collapsed reference link and shortcut reference link respectively)
  9766. if (!label) { label = state.src.slice(labelStart, labelEnd); }
  9767. ref = state.env.references[normalizeReference(label)];
  9768. if (!ref) {
  9769. state.pos = oldPos;
  9770. return false;
  9771. }
  9772. href = ref.href;
  9773. title = ref.title;
  9774. }
  9775. //
  9776. // We found the end of the link, and know for a fact it's a valid link;
  9777. // so all that's left to do is to call tokenizer.
  9778. //
  9779. if (!silent) {
  9780. content = state.src.slice(labelStart, labelEnd);
  9781. state.md.inline.parse(
  9782. content,
  9783. state.md,
  9784. state.env,
  9785. tokens = []
  9786. );
  9787. token = state.push('image', 'img', 0);
  9788. token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];
  9789. token.children = tokens;
  9790. token.content = content;
  9791. if (title) {
  9792. attrs.push([ 'title', title ]);
  9793. }
  9794. }
  9795. state.pos = pos;
  9796. state.posMax = max;
  9797. return true;
  9798. };
  9799. /***/ }),
  9800. /* 69 */
  9801. /***/ (function(module, exports, __webpack_require__) {
  9802. "use strict";
  9803. // Process [link](<to> "stuff")
  9804. var normalizeReference = __webpack_require__(0).normalizeReference;
  9805. var isSpace = __webpack_require__(0).isSpace;
  9806. module.exports = function link(state, silent) {
  9807. var attrs,
  9808. code,
  9809. label,
  9810. labelEnd,
  9811. labelStart,
  9812. pos,
  9813. res,
  9814. ref,
  9815. title,
  9816. token,
  9817. href = '',
  9818. oldPos = state.pos,
  9819. max = state.posMax,
  9820. start = state.pos,
  9821. parseReference = true;
  9822. if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }
  9823. labelStart = state.pos + 1;
  9824. labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);
  9825. // parser failed to find ']', so it's not a valid link
  9826. if (labelEnd < 0) { return false; }
  9827. pos = labelEnd + 1;
  9828. if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {
  9829. //
  9830. // Inline link
  9831. //
  9832. // might have found a valid shortcut link, disable reference parsing
  9833. parseReference = false;
  9834. // [link]( <href> "title" )
  9835. // ^^ skipping these spaces
  9836. pos++;
  9837. for (; pos < max; pos++) {
  9838. code = state.src.charCodeAt(pos);
  9839. if (!isSpace(code) && code !== 0x0A) { break; }
  9840. }
  9841. if (pos >= max) { return false; }
  9842. // [link]( <href> "title" )
  9843. // ^^^^^^ parsing link destination
  9844. start = pos;
  9845. res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
  9846. if (res.ok) {
  9847. href = state.md.normalizeLink(res.str);
  9848. if (state.md.validateLink(href)) {
  9849. pos = res.pos;
  9850. } else {
  9851. href = '';
  9852. }
  9853. }
  9854. // [link]( <href> "title" )
  9855. // ^^ skipping these spaces
  9856. start = pos;
  9857. for (; pos < max; pos++) {
  9858. code = state.src.charCodeAt(pos);
  9859. if (!isSpace(code) && code !== 0x0A) { break; }
  9860. }
  9861. // [link]( <href> "title" )
  9862. // ^^^^^^^ parsing link title
  9863. res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
  9864. if (pos < max && start !== pos && res.ok) {
  9865. title = res.str;
  9866. pos = res.pos;
  9867. // [link]( <href> "title" )
  9868. // ^^ skipping these spaces
  9869. for (; pos < max; pos++) {
  9870. code = state.src.charCodeAt(pos);
  9871. if (!isSpace(code) && code !== 0x0A) { break; }
  9872. }
  9873. } else {
  9874. title = '';
  9875. }
  9876. if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
  9877. // parsing a valid shortcut link failed, fallback to reference
  9878. parseReference = true;
  9879. }
  9880. pos++;
  9881. }
  9882. if (parseReference) {
  9883. //
  9884. // Link reference
  9885. //
  9886. if (typeof state.env.references === 'undefined') { return false; }
  9887. if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {
  9888. start = pos + 1;
  9889. pos = state.md.helpers.parseLinkLabel(state, pos);
  9890. if (pos >= 0) {
  9891. label = state.src.slice(start, pos++);
  9892. } else {
  9893. pos = labelEnd + 1;
  9894. }
  9895. } else {
  9896. pos = labelEnd + 1;
  9897. }
  9898. // covers label === '' and label === undefined
  9899. // (collapsed reference link and shortcut reference link respectively)
  9900. if (!label) { label = state.src.slice(labelStart, labelEnd); }
  9901. ref = state.env.references[normalizeReference(label)];
  9902. if (!ref) {
  9903. state.pos = oldPos;
  9904. return false;
  9905. }
  9906. href = ref.href;
  9907. title = ref.title;
  9908. }
  9909. //
  9910. // We found the end of the link, and know for a fact it's a valid link;
  9911. // so all that's left to do is to call tokenizer.
  9912. //
  9913. if (!silent) {
  9914. state.pos = labelStart;
  9915. state.posMax = labelEnd;
  9916. token = state.push('link_open', 'a', 1);
  9917. token.attrs = attrs = [ [ 'href', href ] ];
  9918. if (title) {
  9919. attrs.push([ 'title', title ]);
  9920. }
  9921. state.md.inline.tokenize(state);
  9922. token = state.push('link_close', 'a', -1);
  9923. }
  9924. state.pos = pos;
  9925. state.posMax = max;
  9926. return true;
  9927. };
  9928. /***/ }),
  9929. /* 70 */
  9930. /***/ (function(module, exports, __webpack_require__) {
  9931. "use strict";
  9932. // Proceess '\n'
  9933. var isSpace = __webpack_require__(0).isSpace;
  9934. module.exports = function newline(state, silent) {
  9935. var pmax, max, pos = state.pos;
  9936. if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }
  9937. pmax = state.pending.length - 1;
  9938. max = state.posMax;
  9939. // ' \n' -> hardbreak
  9940. // Lookup in pending chars is bad practice! Don't copy to other rules!
  9941. // Pending string is stored in concat mode, indexed lookups will cause
  9942. // convertion to flat mode.
  9943. if (!silent) {
  9944. if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
  9945. if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
  9946. state.pending = state.pending.replace(/ +$/, '');
  9947. state.push('hardbreak', 'br', 0);
  9948. } else {
  9949. state.pending = state.pending.slice(0, -1);
  9950. state.push('softbreak', 'br', 0);
  9951. }
  9952. } else {
  9953. state.push('softbreak', 'br', 0);
  9954. }
  9955. }
  9956. pos++;
  9957. // skip heading spaces for next line
  9958. while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }
  9959. state.pos = pos;
  9960. return true;
  9961. };
  9962. /***/ }),
  9963. /* 71 */
  9964. /***/ (function(module, exports, __webpack_require__) {
  9965. "use strict";
  9966. // Inline parser state
  9967. var Token = __webpack_require__(4);
  9968. var isWhiteSpace = __webpack_require__(0).isWhiteSpace;
  9969. var isPunctChar = __webpack_require__(0).isPunctChar;
  9970. var isMdAsciiPunct = __webpack_require__(0).isMdAsciiPunct;
  9971. function StateInline(src, md, env, outTokens) {
  9972. this.src = src;
  9973. this.env = env;
  9974. this.md = md;
  9975. this.tokens = outTokens;
  9976. this.pos = 0;
  9977. this.posMax = this.src.length;
  9978. this.level = 0;
  9979. this.pending = '';
  9980. this.pendingLevel = 0;
  9981. this.cache = {}; // Stores { start: end } pairs. Useful for backtrack
  9982. // optimization of pairs parse (emphasis, strikes).
  9983. this.delimiters = []; // Emphasis-like delimiters
  9984. }
  9985. // Flush pending text
  9986. //
  9987. StateInline.prototype.pushPending = function () {
  9988. var token = new Token('text', '', 0);
  9989. token.content = this.pending;
  9990. token.level = this.pendingLevel;
  9991. this.tokens.push(token);
  9992. this.pending = '';
  9993. return token;
  9994. };
  9995. // Push new token to "stream".
  9996. // If pending text exists - flush it as text token
  9997. //
  9998. StateInline.prototype.push = function (type, tag, nesting) {
  9999. if (this.pending) {
  10000. this.pushPending();
  10001. }
  10002. var token = new Token(type, tag, nesting);
  10003. if (nesting < 0) { this.level--; }
  10004. token.level = this.level;
  10005. if (nesting > 0) { this.level++; }
  10006. this.pendingLevel = this.level;
  10007. this.tokens.push(token);
  10008. return token;
  10009. };
  10010. // Scan a sequence of emphasis-like markers, and determine whether
  10011. // it can start an emphasis sequence or end an emphasis sequence.
  10012. //
  10013. // - start - position to scan from (it should point at a valid marker);
  10014. // - canSplitWord - determine if these markers can be found inside a word
  10015. //
  10016. StateInline.prototype.scanDelims = function (start, canSplitWord) {
  10017. var pos = start, lastChar, nextChar, count, can_open, can_close,
  10018. isLastWhiteSpace, isLastPunctChar,
  10019. isNextWhiteSpace, isNextPunctChar,
  10020. left_flanking = true,
  10021. right_flanking = true,
  10022. max = this.posMax,
  10023. marker = this.src.charCodeAt(start);
  10024. // treat beginning of the line as a whitespace
  10025. lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
  10026. while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }
  10027. count = pos - start;
  10028. // treat end of the line as a whitespace
  10029. nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
  10030. isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
  10031. isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
  10032. isLastWhiteSpace = isWhiteSpace(lastChar);
  10033. isNextWhiteSpace = isWhiteSpace(nextChar);
  10034. if (isNextWhiteSpace) {
  10035. left_flanking = false;
  10036. } else if (isNextPunctChar) {
  10037. if (!(isLastWhiteSpace || isLastPunctChar)) {
  10038. left_flanking = false;
  10039. }
  10040. }
  10041. if (isLastWhiteSpace) {
  10042. right_flanking = false;
  10043. } else if (isLastPunctChar) {
  10044. if (!(isNextWhiteSpace || isNextPunctChar)) {
  10045. right_flanking = false;
  10046. }
  10047. }
  10048. if (!canSplitWord) {
  10049. can_open = left_flanking && (!right_flanking || isLastPunctChar);
  10050. can_close = right_flanking && (!left_flanking || isNextPunctChar);
  10051. } else {
  10052. can_open = left_flanking;
  10053. can_close = right_flanking;
  10054. }
  10055. return {
  10056. can_open: can_open,
  10057. can_close: can_close,
  10058. length: count
  10059. };
  10060. };
  10061. // re-export Token class to use in block rules
  10062. StateInline.prototype.Token = Token;
  10063. module.exports = StateInline;
  10064. /***/ }),
  10065. /* 72 */
  10066. /***/ (function(module, exports, __webpack_require__) {
  10067. "use strict";
  10068. // Skip text characters for text token, place those to pending buffer
  10069. // and increment current pos
  10070. // Rule to skip pure text
  10071. // '{}$%@~+=:' reserved for extentions
  10072. // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
  10073. // !!!! Don't confuse with "Markdown ASCII Punctuation" chars
  10074. // http://spec.commonmark.org/0.15/#ascii-punctuation-character
  10075. function isTerminatorChar(ch) {
  10076. switch (ch) {
  10077. case 0x0A/* \n */:
  10078. case 0x21/* ! */:
  10079. case 0x23/* # */:
  10080. case 0x24/* $ */:
  10081. case 0x25/* % */:
  10082. case 0x26/* & */:
  10083. case 0x2A/* * */:
  10084. case 0x2B/* + */:
  10085. case 0x2D/* - */:
  10086. case 0x3A/* : */:
  10087. case 0x3C/* < */:
  10088. case 0x3D/* = */:
  10089. case 0x3E/* > */:
  10090. case 0x40/* @ */:
  10091. case 0x5B/* [ */:
  10092. case 0x5C/* \ */:
  10093. case 0x5D/* ] */:
  10094. case 0x5E/* ^ */:
  10095. case 0x5F/* _ */:
  10096. case 0x60/* ` */:
  10097. case 0x7B/* { */:
  10098. case 0x7D/* } */:
  10099. case 0x7E/* ~ */:
  10100. return true;
  10101. default:
  10102. return false;
  10103. }
  10104. }
  10105. module.exports = function text(state, silent) {
  10106. var pos = state.pos;
  10107. while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
  10108. pos++;
  10109. }
  10110. if (pos === state.pos) { return false; }
  10111. if (!silent) { state.pending += state.src.slice(state.pos, pos); }
  10112. state.pos = pos;
  10113. return true;
  10114. };
  10115. // Alternative implementation, for memory.
  10116. //
  10117. // It costs 10% of performance, but allows extend terminators list, if place it
  10118. // to `ParcerInline` property. Probably, will switch to it sometime, such
  10119. // flexibility required.
  10120. /*
  10121. var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;
  10122. module.exports = function text(state, silent) {
  10123. var pos = state.pos,
  10124. idx = state.src.slice(pos).search(TERMINATOR_RE);
  10125. // first char is terminator -> empty text
  10126. if (idx === 0) { return false; }
  10127. // no terminator -> text till end of string
  10128. if (idx < 0) {
  10129. if (!silent) { state.pending += state.src.slice(pos); }
  10130. state.pos = state.src.length;
  10131. return true;
  10132. }
  10133. if (!silent) { state.pending += state.src.slice(pos, pos + idx); }
  10134. state.pos += idx;
  10135. return true;
  10136. };*/
  10137. /***/ }),
  10138. /* 73 */
  10139. /***/ (function(module, exports, __webpack_require__) {
  10140. "use strict";
  10141. // Merge adjacent text nodes into one, and re-calculate all token levels
  10142. //
  10143. module.exports = function text_collapse(state) {
  10144. var curr, last,
  10145. level = 0,
  10146. tokens = state.tokens,
  10147. max = state.tokens.length;
  10148. for (curr = last = 0; curr < max; curr++) {
  10149. // re-calculate levels
  10150. level += tokens[curr].nesting;
  10151. tokens[curr].level = level;
  10152. if (tokens[curr].type === 'text' &&
  10153. curr + 1 < max &&
  10154. tokens[curr + 1].type === 'text') {
  10155. // collapse two adjacent text nodes
  10156. tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
  10157. } else {
  10158. if (curr !== last) { tokens[last] = tokens[curr]; }
  10159. last++;
  10160. }
  10161. }
  10162. if (curr !== last) {
  10163. tokens.length = last;
  10164. }
  10165. };
  10166. /***/ }),
  10167. /* 74 */
  10168. /***/ (function(module, exports, __webpack_require__) {
  10169. "use strict";
  10170. /* eslint-disable no-bitwise */
  10171. var decodeCache = {};
  10172. function getDecodeCache(exclude) {
  10173. var i, ch, cache = decodeCache[exclude];
  10174. if (cache) { return cache; }
  10175. cache = decodeCache[exclude] = [];
  10176. for (i = 0; i < 128; i++) {
  10177. ch = String.fromCharCode(i);
  10178. cache.push(ch);
  10179. }
  10180. for (i = 0; i < exclude.length; i++) {
  10181. ch = exclude.charCodeAt(i);
  10182. cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);
  10183. }
  10184. return cache;
  10185. }
  10186. // Decode percent-encoded string.
  10187. //
  10188. function decode(string, exclude) {
  10189. var cache;
  10190. if (typeof exclude !== 'string') {
  10191. exclude = decode.defaultChars;
  10192. }
  10193. cache = getDecodeCache(exclude);
  10194. return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {
  10195. var i, l, b1, b2, b3, b4, chr,
  10196. result = '';
  10197. for (i = 0, l = seq.length; i < l; i += 3) {
  10198. b1 = parseInt(seq.slice(i + 1, i + 3), 16);
  10199. if (b1 < 0x80) {
  10200. result += cache[b1];
  10201. continue;
  10202. }
  10203. if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {
  10204. // 110xxxxx 10xxxxxx
  10205. b2 = parseInt(seq.slice(i + 4, i + 6), 16);
  10206. if ((b2 & 0xC0) === 0x80) {
  10207. chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);
  10208. if (chr < 0x80) {
  10209. result += '\ufffd\ufffd';
  10210. } else {
  10211. result += String.fromCharCode(chr);
  10212. }
  10213. i += 3;
  10214. continue;
  10215. }
  10216. }
  10217. if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {
  10218. // 1110xxxx 10xxxxxx 10xxxxxx
  10219. b2 = parseInt(seq.slice(i + 4, i + 6), 16);
  10220. b3 = parseInt(seq.slice(i + 7, i + 9), 16);
  10221. if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
  10222. chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);
  10223. if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {
  10224. result += '\ufffd\ufffd\ufffd';
  10225. } else {
  10226. result += String.fromCharCode(chr);
  10227. }
  10228. i += 6;
  10229. continue;
  10230. }
  10231. }
  10232. if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {
  10233. // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
  10234. b2 = parseInt(seq.slice(i + 4, i + 6), 16);
  10235. b3 = parseInt(seq.slice(i + 7, i + 9), 16);
  10236. b4 = parseInt(seq.slice(i + 10, i + 12), 16);
  10237. if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
  10238. chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);
  10239. if (chr < 0x10000 || chr > 0x10FFFF) {
  10240. result += '\ufffd\ufffd\ufffd\ufffd';
  10241. } else {
  10242. chr -= 0x10000;
  10243. result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));
  10244. }
  10245. i += 9;
  10246. continue;
  10247. }
  10248. }
  10249. result += '\ufffd';
  10250. }
  10251. return result;
  10252. });
  10253. }
  10254. decode.defaultChars = ';/?:@&=+$,#';
  10255. decode.componentChars = '';
  10256. module.exports = decode;
  10257. /***/ }),
  10258. /* 75 */
  10259. /***/ (function(module, exports, __webpack_require__) {
  10260. "use strict";
  10261. var encodeCache = {};
  10262. // Create a lookup array where anything but characters in `chars` string
  10263. // and alphanumeric chars is percent-encoded.
  10264. //
  10265. function getEncodeCache(exclude) {
  10266. var i, ch, cache = encodeCache[exclude];
  10267. if (cache) { return cache; }
  10268. cache = encodeCache[exclude] = [];
  10269. for (i = 0; i < 128; i++) {
  10270. ch = String.fromCharCode(i);
  10271. if (/^[0-9a-z]$/i.test(ch)) {
  10272. // always allow unencoded alphanumeric characters
  10273. cache.push(ch);
  10274. } else {
  10275. cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));
  10276. }
  10277. }
  10278. for (i = 0; i < exclude.length; i++) {
  10279. cache[exclude.charCodeAt(i)] = exclude[i];
  10280. }
  10281. return cache;
  10282. }
  10283. // Encode unsafe characters with percent-encoding, skipping already
  10284. // encoded sequences.
  10285. //
  10286. // - string - string to encode
  10287. // - exclude - list of characters to ignore (in addition to a-zA-Z0-9)
  10288. // - keepEscaped - don't encode '%' in a correct escape sequence (default: true)
  10289. //
  10290. function encode(string, exclude, keepEscaped) {
  10291. var i, l, code, nextCode, cache,
  10292. result = '';
  10293. if (typeof exclude !== 'string') {
  10294. // encode(string, keepEscaped)
  10295. keepEscaped = exclude;
  10296. exclude = encode.defaultChars;
  10297. }
  10298. if (typeof keepEscaped === 'undefined') {
  10299. keepEscaped = true;
  10300. }
  10301. cache = getEncodeCache(exclude);
  10302. for (i = 0, l = string.length; i < l; i++) {
  10303. code = string.charCodeAt(i);
  10304. if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {
  10305. if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
  10306. result += string.slice(i, i + 3);
  10307. i += 2;
  10308. continue;
  10309. }
  10310. }
  10311. if (code < 128) {
  10312. result += cache[code];
  10313. continue;
  10314. }
  10315. if (code >= 0xD800 && code <= 0xDFFF) {
  10316. if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
  10317. nextCode = string.charCodeAt(i + 1);
  10318. if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
  10319. result += encodeURIComponent(string[i] + string[i + 1]);
  10320. i++;
  10321. continue;
  10322. }
  10323. }
  10324. result += '%EF%BF%BD';
  10325. continue;
  10326. }
  10327. result += encodeURIComponent(string[i]);
  10328. }
  10329. return result;
  10330. }
  10331. encode.defaultChars = ";/?:@&=+$,-_.!~*'()#";
  10332. encode.componentChars = "-_.!~*'()";
  10333. module.exports = encode;
  10334. /***/ }),
  10335. /* 76 */
  10336. /***/ (function(module, exports, __webpack_require__) {
  10337. "use strict";
  10338. module.exports = function format(url) {
  10339. var result = '';
  10340. result += url.protocol || '';
  10341. result += url.slashes ? '//' : '';
  10342. result += url.auth ? url.auth + '@' : '';
  10343. if (url.hostname && url.hostname.indexOf(':') !== -1) {
  10344. // ipv6 address
  10345. result += '[' + url.hostname + ']';
  10346. } else {
  10347. result += url.hostname || '';
  10348. }
  10349. result += url.port ? ':' + url.port : '';
  10350. result += url.pathname || '';
  10351. result += url.search || '';
  10352. result += url.hash || '';
  10353. return result;
  10354. };
  10355. /***/ }),
  10356. /* 77 */
  10357. /***/ (function(module, exports, __webpack_require__) {
  10358. "use strict";
  10359. // Copyright Joyent, Inc. and other Node contributors.
  10360. //
  10361. // Permission is hereby granted, free of charge, to any person obtaining a
  10362. // copy of this software and associated documentation files (the
  10363. // "Software"), to deal in the Software without restriction, including
  10364. // without limitation the rights to use, copy, modify, merge, publish,
  10365. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10366. // persons to whom the Software is furnished to do so, subject to the
  10367. // following conditions:
  10368. //
  10369. // The above copyright notice and this permission notice shall be included
  10370. // in all copies or substantial portions of the Software.
  10371. //
  10372. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10373. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10374. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10375. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10376. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10377. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10378. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10379. //
  10380. // Changes from joyent/node:
  10381. //
  10382. // 1. No leading slash in paths,
  10383. // e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
  10384. //
  10385. // 2. Backslashes are not replaced with slashes,
  10386. // so `http:\\example.org\` is treated like a relative path
  10387. //
  10388. // 3. Trailing colon is treated like a part of the path,
  10389. // i.e. in `http://example.org:foo` pathname is `:foo`
  10390. //
  10391. // 4. Nothing is URL-encoded in the resulting object,
  10392. // (in joyent/node some chars in auth and paths are encoded)
  10393. //
  10394. // 5. `url.parse()` does not have `parseQueryString` argument
  10395. //
  10396. // 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
  10397. // which can be constructed using other parts of the url.
  10398. //
  10399. function Url() {
  10400. this.protocol = null;
  10401. this.slashes = null;
  10402. this.auth = null;
  10403. this.port = null;
  10404. this.hostname = null;
  10405. this.hash = null;
  10406. this.search = null;
  10407. this.pathname = null;
  10408. }
  10409. // Reference: RFC 3986, RFC 1808, RFC 2396
  10410. // define these here so at least they only have to be
  10411. // compiled once on the first module load.
  10412. var protocolPattern = /^([a-z0-9.+-]+:)/i,
  10413. portPattern = /:[0-9]*$/,
  10414. // Special case for a simple path URL
  10415. simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  10416. // RFC 2396: characters reserved for delimiting URLs.
  10417. // We actually just auto-escape these.
  10418. delims = [ '<', '>', '"', '`', ' ', '\r', '\n', '\t' ],
  10419. // RFC 2396: characters not allowed for various reasons.
  10420. unwise = [ '{', '}', '|', '\\', '^', '`' ].concat(delims),
  10421. // Allowed by RFCs, but cause of XSS attacks. Always escape these.
  10422. autoEscape = [ '\'' ].concat(unwise),
  10423. // Characters that are never ever allowed in a hostname.
  10424. // Note that any invalid chars are also handled, but these
  10425. // are the ones that are *expected* to be seen, so we fast-path
  10426. // them.
  10427. nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),
  10428. hostEndingChars = [ '/', '?', '#' ],
  10429. hostnameMaxLen = 255,
  10430. hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
  10431. hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  10432. // protocols that can allow "unsafe" and "unwise" chars.
  10433. /* eslint-disable no-script-url */
  10434. // protocols that never have a hostname.
  10435. hostlessProtocol = {
  10436. 'javascript': true,
  10437. 'javascript:': true
  10438. },
  10439. // protocols that always contain a // bit.
  10440. slashedProtocol = {
  10441. 'http': true,
  10442. 'https': true,
  10443. 'ftp': true,
  10444. 'gopher': true,
  10445. 'file': true,
  10446. 'http:': true,
  10447. 'https:': true,
  10448. 'ftp:': true,
  10449. 'gopher:': true,
  10450. 'file:': true
  10451. };
  10452. /* eslint-enable no-script-url */
  10453. function urlParse(url, slashesDenoteHost) {
  10454. if (url && url instanceof Url) { return url; }
  10455. var u = new Url();
  10456. u.parse(url, slashesDenoteHost);
  10457. return u;
  10458. }
  10459. Url.prototype.parse = function(url, slashesDenoteHost) {
  10460. var i, l, lowerProto, hec, slashes,
  10461. rest = url;
  10462. // trim before proceeding.
  10463. // This is to support parse stuff like " http://foo.com \n"
  10464. rest = rest.trim();
  10465. if (!slashesDenoteHost && url.split('#').length === 1) {
  10466. // Try fast path regexp
  10467. var simplePath = simplePathPattern.exec(rest);
  10468. if (simplePath) {
  10469. this.pathname = simplePath[1];
  10470. if (simplePath[2]) {
  10471. this.search = simplePath[2];
  10472. }
  10473. return this;
  10474. }
  10475. }
  10476. var proto = protocolPattern.exec(rest);
  10477. if (proto) {
  10478. proto = proto[0];
  10479. lowerProto = proto.toLowerCase();
  10480. this.protocol = proto;
  10481. rest = rest.substr(proto.length);
  10482. }
  10483. // figure out if it's got a host
  10484. // user@server is *always* interpreted as a hostname, and url
  10485. // resolution will treat //foo/bar as host=foo,path=bar because that's
  10486. // how the browser resolves relative URLs.
  10487. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  10488. slashes = rest.substr(0, 2) === '//';
  10489. if (slashes && !(proto && hostlessProtocol[proto])) {
  10490. rest = rest.substr(2);
  10491. this.slashes = true;
  10492. }
  10493. }
  10494. if (!hostlessProtocol[proto] &&
  10495. (slashes || (proto && !slashedProtocol[proto]))) {
  10496. // there's a hostname.
  10497. // the first instance of /, ?, ;, or # ends the host.
  10498. //
  10499. // If there is an @ in the hostname, then non-host chars *are* allowed
  10500. // to the left of the last @ sign, unless some host-ending character
  10501. // comes *before* the @-sign.
  10502. // URLs are obnoxious.
  10503. //
  10504. // ex:
  10505. // http://a@b@c/ => user:a@b host:c
  10506. // http://a@b?@c => user:a host:c path:/?@c
  10507. // v0.12 TODO(isaacs): This is not quite how Chrome does things.
  10508. // Review our test case against browsers more comprehensively.
  10509. // find the first instance of any hostEndingChars
  10510. var hostEnd = -1;
  10511. for (i = 0; i < hostEndingChars.length; i++) {
  10512. hec = rest.indexOf(hostEndingChars[i]);
  10513. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
  10514. hostEnd = hec;
  10515. }
  10516. }
  10517. // at this point, either we have an explicit point where the
  10518. // auth portion cannot go past, or the last @ char is the decider.
  10519. var auth, atSign;
  10520. if (hostEnd === -1) {
  10521. // atSign can be anywhere.
  10522. atSign = rest.lastIndexOf('@');
  10523. } else {
  10524. // atSign must be in auth portion.
  10525. // http://a@b/c@d => host:b auth:a path:/c@d
  10526. atSign = rest.lastIndexOf('@', hostEnd);
  10527. }
  10528. // Now we have a portion which is definitely the auth.
  10529. // Pull that off.
  10530. if (atSign !== -1) {
  10531. auth = rest.slice(0, atSign);
  10532. rest = rest.slice(atSign + 1);
  10533. this.auth = auth;
  10534. }
  10535. // the host is the remaining to the left of the first non-host char
  10536. hostEnd = -1;
  10537. for (i = 0; i < nonHostChars.length; i++) {
  10538. hec = rest.indexOf(nonHostChars[i]);
  10539. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
  10540. hostEnd = hec;
  10541. }
  10542. }
  10543. // if we still have not hit it, then the entire thing is a host.
  10544. if (hostEnd === -1) {
  10545. hostEnd = rest.length;
  10546. }
  10547. if (rest[hostEnd - 1] === ':') { hostEnd--; }
  10548. var host = rest.slice(0, hostEnd);
  10549. rest = rest.slice(hostEnd);
  10550. // pull out port.
  10551. this.parseHost(host);
  10552. // we've indicated that there is a hostname,
  10553. // so even if it's empty, it has to be present.
  10554. this.hostname = this.hostname || '';
  10555. // if hostname begins with [ and ends with ]
  10556. // assume that it's an IPv6 address.
  10557. var ipv6Hostname = this.hostname[0] === '[' &&
  10558. this.hostname[this.hostname.length - 1] === ']';
  10559. // validate a little.
  10560. if (!ipv6Hostname) {
  10561. var hostparts = this.hostname.split(/\./);
  10562. for (i = 0, l = hostparts.length; i < l; i++) {
  10563. var part = hostparts[i];
  10564. if (!part) { continue; }
  10565. if (!part.match(hostnamePartPattern)) {
  10566. var newpart = '';
  10567. for (var j = 0, k = part.length; j < k; j++) {
  10568. if (part.charCodeAt(j) > 127) {
  10569. // we replace non-ASCII char with a temporary placeholder
  10570. // we need this to make sure size of hostname is not
  10571. // broken by replacing non-ASCII by nothing
  10572. newpart += 'x';
  10573. } else {
  10574. newpart += part[j];
  10575. }
  10576. }
  10577. // we test again with ASCII char only
  10578. if (!newpart.match(hostnamePartPattern)) {
  10579. var validParts = hostparts.slice(0, i);
  10580. var notHost = hostparts.slice(i + 1);
  10581. var bit = part.match(hostnamePartStart);
  10582. if (bit) {
  10583. validParts.push(bit[1]);
  10584. notHost.unshift(bit[2]);
  10585. }
  10586. if (notHost.length) {
  10587. rest = notHost.join('.') + rest;
  10588. }
  10589. this.hostname = validParts.join('.');
  10590. break;
  10591. }
  10592. }
  10593. }
  10594. }
  10595. if (this.hostname.length > hostnameMaxLen) {
  10596. this.hostname = '';
  10597. }
  10598. // strip [ and ] from the hostname
  10599. // the host field still retains them, though
  10600. if (ipv6Hostname) {
  10601. this.hostname = this.hostname.substr(1, this.hostname.length - 2);
  10602. }
  10603. }
  10604. // chop off from the tail first.
  10605. var hash = rest.indexOf('#');
  10606. if (hash !== -1) {
  10607. // got a fragment string.
  10608. this.hash = rest.substr(hash);
  10609. rest = rest.slice(0, hash);
  10610. }
  10611. var qm = rest.indexOf('?');
  10612. if (qm !== -1) {
  10613. this.search = rest.substr(qm);
  10614. rest = rest.slice(0, qm);
  10615. }
  10616. if (rest) { this.pathname = rest; }
  10617. if (slashedProtocol[lowerProto] &&
  10618. this.hostname && !this.pathname) {
  10619. this.pathname = '';
  10620. }
  10621. return this;
  10622. };
  10623. Url.prototype.parseHost = function(host) {
  10624. var port = portPattern.exec(host);
  10625. if (port) {
  10626. port = port[0];
  10627. if (port !== ':') {
  10628. this.port = port.substr(1);
  10629. }
  10630. host = host.substr(0, host.length - port.length);
  10631. }
  10632. if (host) { this.hostname = host; }
  10633. };
  10634. module.exports = urlParse;
  10635. /***/ }),
  10636. /* 78 */
  10637. /***/ (function(module, exports) {
  10638. // shim for using process in browser
  10639. var process = module.exports = {};
  10640. // cached from whatever global is present so that test runners that stub it
  10641. // don't break things. But we need to wrap it in a try catch in case it is
  10642. // wrapped in strict mode code which doesn't define any globals. It's inside a
  10643. // function because try/catches deoptimize in certain engines.
  10644. var cachedSetTimeout;
  10645. var cachedClearTimeout;
  10646. function defaultSetTimout() {
  10647. throw new Error('setTimeout has not been defined');
  10648. }
  10649. function defaultClearTimeout () {
  10650. throw new Error('clearTimeout has not been defined');
  10651. }
  10652. (function () {
  10653. try {
  10654. if (typeof setTimeout === 'function') {
  10655. cachedSetTimeout = setTimeout;
  10656. } else {
  10657. cachedSetTimeout = defaultSetTimout;
  10658. }
  10659. } catch (e) {
  10660. cachedSetTimeout = defaultSetTimout;
  10661. }
  10662. try {
  10663. if (typeof clearTimeout === 'function') {
  10664. cachedClearTimeout = clearTimeout;
  10665. } else {
  10666. cachedClearTimeout = defaultClearTimeout;
  10667. }
  10668. } catch (e) {
  10669. cachedClearTimeout = defaultClearTimeout;
  10670. }
  10671. } ())
  10672. function runTimeout(fun) {
  10673. if (cachedSetTimeout === setTimeout) {
  10674. //normal enviroments in sane situations
  10675. return setTimeout(fun, 0);
  10676. }
  10677. // if setTimeout wasn't available but was latter defined
  10678. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  10679. cachedSetTimeout = setTimeout;
  10680. return setTimeout(fun, 0);
  10681. }
  10682. try {
  10683. // when when somebody has screwed with setTimeout but no I.E. maddness
  10684. return cachedSetTimeout(fun, 0);
  10685. } catch(e){
  10686. try {
  10687. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  10688. return cachedSetTimeout.call(null, fun, 0);
  10689. } catch(e){
  10690. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  10691. return cachedSetTimeout.call(this, fun, 0);
  10692. }
  10693. }
  10694. }
  10695. function runClearTimeout(marker) {
  10696. if (cachedClearTimeout === clearTimeout) {
  10697. //normal enviroments in sane situations
  10698. return clearTimeout(marker);
  10699. }
  10700. // if clearTimeout wasn't available but was latter defined
  10701. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  10702. cachedClearTimeout = clearTimeout;
  10703. return clearTimeout(marker);
  10704. }
  10705. try {
  10706. // when when somebody has screwed with setTimeout but no I.E. maddness
  10707. return cachedClearTimeout(marker);
  10708. } catch (e){
  10709. try {
  10710. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  10711. return cachedClearTimeout.call(null, marker);
  10712. } catch (e){
  10713. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  10714. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  10715. return cachedClearTimeout.call(this, marker);
  10716. }
  10717. }
  10718. }
  10719. var queue = [];
  10720. var draining = false;
  10721. var currentQueue;
  10722. var queueIndex = -1;
  10723. function cleanUpNextTick() {
  10724. if (!draining || !currentQueue) {
  10725. return;
  10726. }
  10727. draining = false;
  10728. if (currentQueue.length) {
  10729. queue = currentQueue.concat(queue);
  10730. } else {
  10731. queueIndex = -1;
  10732. }
  10733. if (queue.length) {
  10734. drainQueue();
  10735. }
  10736. }
  10737. function drainQueue() {
  10738. if (draining) {
  10739. return;
  10740. }
  10741. var timeout = runTimeout(cleanUpNextTick);
  10742. draining = true;
  10743. var len = queue.length;
  10744. while(len) {
  10745. currentQueue = queue;
  10746. queue = [];
  10747. while (++queueIndex < len) {
  10748. if (currentQueue) {
  10749. currentQueue[queueIndex].run();
  10750. }
  10751. }
  10752. queueIndex = -1;
  10753. len = queue.length;
  10754. }
  10755. currentQueue = null;
  10756. draining = false;
  10757. runClearTimeout(timeout);
  10758. }
  10759. process.nextTick = function (fun) {
  10760. var args = new Array(arguments.length - 1);
  10761. if (arguments.length > 1) {
  10762. for (var i = 1; i < arguments.length; i++) {
  10763. args[i - 1] = arguments[i];
  10764. }
  10765. }
  10766. queue.push(new Item(fun, args));
  10767. if (queue.length === 1 && !draining) {
  10768. runTimeout(drainQueue);
  10769. }
  10770. };
  10771. // v8 likes predictible objects
  10772. function Item(fun, array) {
  10773. this.fun = fun;
  10774. this.array = array;
  10775. }
  10776. Item.prototype.run = function () {
  10777. this.fun.apply(null, this.array);
  10778. };
  10779. process.title = 'browser';
  10780. process.browser = true;
  10781. process.env = {};
  10782. process.argv = [];
  10783. process.version = ''; // empty string to avoid regexp issues
  10784. process.versions = {};
  10785. function noop() {}
  10786. process.on = noop;
  10787. process.addListener = noop;
  10788. process.once = noop;
  10789. process.off = noop;
  10790. process.removeListener = noop;
  10791. process.removeAllListeners = noop;
  10792. process.emit = noop;
  10793. process.binding = function (name) {
  10794. throw new Error('process.binding is not supported');
  10795. };
  10796. process.cwd = function () { return '/' };
  10797. process.chdir = function (dir) {
  10798. throw new Error('process.chdir is not supported');
  10799. };
  10800. process.umask = function() { return 0; };
  10801. /***/ }),
  10802. /* 79 */
  10803. /***/ (function(module, exports, __webpack_require__) {
  10804. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
  10805. ;(function(root) {
  10806. /** Detect free variables */
  10807. var freeExports = typeof exports == 'object' && exports &&
  10808. !exports.nodeType && exports;
  10809. var freeModule = typeof module == 'object' && module &&
  10810. !module.nodeType && module;
  10811. var freeGlobal = typeof global == 'object' && global;
  10812. if (
  10813. freeGlobal.global === freeGlobal ||
  10814. freeGlobal.window === freeGlobal ||
  10815. freeGlobal.self === freeGlobal
  10816. ) {
  10817. root = freeGlobal;
  10818. }
  10819. /**
  10820. * The `punycode` object.
  10821. * @name punycode
  10822. * @type Object
  10823. */
  10824. var punycode,
  10825. /** Highest positive signed 32-bit float value */
  10826. maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
  10827. /** Bootstring parameters */
  10828. base = 36,
  10829. tMin = 1,
  10830. tMax = 26,
  10831. skew = 38,
  10832. damp = 700,
  10833. initialBias = 72,
  10834. initialN = 128, // 0x80
  10835. delimiter = '-', // '\x2D'
  10836. /** Regular expressions */
  10837. regexPunycode = /^xn--/,
  10838. regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
  10839. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
  10840. /** Error messages */
  10841. errors = {
  10842. 'overflow': 'Overflow: input needs wider integers to process',
  10843. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  10844. 'invalid-input': 'Invalid input'
  10845. },
  10846. /** Convenience shortcuts */
  10847. baseMinusTMin = base - tMin,
  10848. floor = Math.floor,
  10849. stringFromCharCode = String.fromCharCode,
  10850. /** Temporary variable */
  10851. key;
  10852. /*--------------------------------------------------------------------------*/
  10853. /**
  10854. * A generic error utility function.
  10855. * @private
  10856. * @param {String} type The error type.
  10857. * @returns {Error} Throws a `RangeError` with the applicable error message.
  10858. */
  10859. function error(type) {
  10860. throw new RangeError(errors[type]);
  10861. }
  10862. /**
  10863. * A generic `Array#map` utility function.
  10864. * @private
  10865. * @param {Array} array The array to iterate over.
  10866. * @param {Function} callback The function that gets called for every array
  10867. * item.
  10868. * @returns {Array} A new array of values returned by the callback function.
  10869. */
  10870. function map(array, fn) {
  10871. var length = array.length;
  10872. var result = [];
  10873. while (length--) {
  10874. result[length] = fn(array[length]);
  10875. }
  10876. return result;
  10877. }
  10878. /**
  10879. * A simple `Array#map`-like wrapper to work with domain name strings or email
  10880. * addresses.
  10881. * @private
  10882. * @param {String} domain The domain name or email address.
  10883. * @param {Function} callback The function that gets called for every
  10884. * character.
  10885. * @returns {Array} A new string of characters returned by the callback
  10886. * function.
  10887. */
  10888. function mapDomain(string, fn) {
  10889. var parts = string.split('@');
  10890. var result = '';
  10891. if (parts.length > 1) {
  10892. // In email addresses, only the domain name should be punycoded. Leave
  10893. // the local part (i.e. everything up to `@`) intact.
  10894. result = parts[0] + '@';
  10895. string = parts[1];
  10896. }
  10897. // Avoid `split(regex)` for IE8 compatibility. See #17.
  10898. string = string.replace(regexSeparators, '\x2E');
  10899. var labels = string.split('.');
  10900. var encoded = map(labels, fn).join('.');
  10901. return result + encoded;
  10902. }
  10903. /**
  10904. * Creates an array containing the numeric code points of each Unicode
  10905. * character in the string. While JavaScript uses UCS-2 internally,
  10906. * this function will convert a pair of surrogate halves (each of which
  10907. * UCS-2 exposes as separate characters) into a single code point,
  10908. * matching UTF-16.
  10909. * @see `punycode.ucs2.encode`
  10910. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  10911. * @memberOf punycode.ucs2
  10912. * @name decode
  10913. * @param {String} string The Unicode input string (UCS-2).
  10914. * @returns {Array} The new array of code points.
  10915. */
  10916. function ucs2decode(string) {
  10917. var output = [],
  10918. counter = 0,
  10919. length = string.length,
  10920. value,
  10921. extra;
  10922. while (counter < length) {
  10923. value = string.charCodeAt(counter++);
  10924. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  10925. // high surrogate, and there is a next character
  10926. extra = string.charCodeAt(counter++);
  10927. if ((extra & 0xFC00) == 0xDC00) { // low surrogate
  10928. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  10929. } else {
  10930. // unmatched surrogate; only append this code unit, in case the next
  10931. // code unit is the high surrogate of a surrogate pair
  10932. output.push(value);
  10933. counter--;
  10934. }
  10935. } else {
  10936. output.push(value);
  10937. }
  10938. }
  10939. return output;
  10940. }
  10941. /**
  10942. * Creates a string based on an array of numeric code points.
  10943. * @see `punycode.ucs2.decode`
  10944. * @memberOf punycode.ucs2
  10945. * @name encode
  10946. * @param {Array} codePoints The array of numeric code points.
  10947. * @returns {String} The new Unicode string (UCS-2).
  10948. */
  10949. function ucs2encode(array) {
  10950. return map(array, function(value) {
  10951. var output = '';
  10952. if (value > 0xFFFF) {
  10953. value -= 0x10000;
  10954. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  10955. value = 0xDC00 | value & 0x3FF;
  10956. }
  10957. output += stringFromCharCode(value);
  10958. return output;
  10959. }).join('');
  10960. }
  10961. /**
  10962. * Converts a basic code point into a digit/integer.
  10963. * @see `digitToBasic()`
  10964. * @private
  10965. * @param {Number} codePoint The basic numeric code point value.
  10966. * @returns {Number} The numeric value of a basic code point (for use in
  10967. * representing integers) in the range `0` to `base - 1`, or `base` if
  10968. * the code point does not represent a value.
  10969. */
  10970. function basicToDigit(codePoint) {
  10971. if (codePoint - 48 < 10) {
  10972. return codePoint - 22;
  10973. }
  10974. if (codePoint - 65 < 26) {
  10975. return codePoint - 65;
  10976. }
  10977. if (codePoint - 97 < 26) {
  10978. return codePoint - 97;
  10979. }
  10980. return base;
  10981. }
  10982. /**
  10983. * Converts a digit/integer into a basic code point.
  10984. * @see `basicToDigit()`
  10985. * @private
  10986. * @param {Number} digit The numeric value of a basic code point.
  10987. * @returns {Number} The basic code point whose value (when used for
  10988. * representing integers) is `digit`, which needs to be in the range
  10989. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  10990. * used; else, the lowercase form is used. The behavior is undefined
  10991. * if `flag` is non-zero and `digit` has no uppercase form.
  10992. */
  10993. function digitToBasic(digit, flag) {
  10994. // 0..25 map to ASCII a..z or A..Z
  10995. // 26..35 map to ASCII 0..9
  10996. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  10997. }
  10998. /**
  10999. * Bias adaptation function as per section 3.4 of RFC 3492.
  11000. * https://tools.ietf.org/html/rfc3492#section-3.4
  11001. * @private
  11002. */
  11003. function adapt(delta, numPoints, firstTime) {
  11004. var k = 0;
  11005. delta = firstTime ? floor(delta / damp) : delta >> 1;
  11006. delta += floor(delta / numPoints);
  11007. for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
  11008. delta = floor(delta / baseMinusTMin);
  11009. }
  11010. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  11011. }
  11012. /**
  11013. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  11014. * symbols.
  11015. * @memberOf punycode
  11016. * @param {String} input The Punycode string of ASCII-only symbols.
  11017. * @returns {String} The resulting string of Unicode symbols.
  11018. */
  11019. function decode(input) {
  11020. // Don't use UCS-2
  11021. var output = [],
  11022. inputLength = input.length,
  11023. out,
  11024. i = 0,
  11025. n = initialN,
  11026. bias = initialBias,
  11027. basic,
  11028. j,
  11029. index,
  11030. oldi,
  11031. w,
  11032. k,
  11033. digit,
  11034. t,
  11035. /** Cached calculation results */
  11036. baseMinusT;
  11037. // Handle the basic code points: let `basic` be the number of input code
  11038. // points before the last delimiter, or `0` if there is none, then copy
  11039. // the first basic code points to the output.
  11040. basic = input.lastIndexOf(delimiter);
  11041. if (basic < 0) {
  11042. basic = 0;
  11043. }
  11044. for (j = 0; j < basic; ++j) {
  11045. // if it's not a basic code point
  11046. if (input.charCodeAt(j) >= 0x80) {
  11047. error('not-basic');
  11048. }
  11049. output.push(input.charCodeAt(j));
  11050. }
  11051. // Main decoding loop: start just after the last delimiter if any basic code
  11052. // points were copied; start at the beginning otherwise.
  11053. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
  11054. // `index` is the index of the next character to be consumed.
  11055. // Decode a generalized variable-length integer into `delta`,
  11056. // which gets added to `i`. The overflow checking is easier
  11057. // if we increase `i` as we go, then subtract off its starting
  11058. // value at the end to obtain `delta`.
  11059. for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
  11060. if (index >= inputLength) {
  11061. error('invalid-input');
  11062. }
  11063. digit = basicToDigit(input.charCodeAt(index++));
  11064. if (digit >= base || digit > floor((maxInt - i) / w)) {
  11065. error('overflow');
  11066. }
  11067. i += digit * w;
  11068. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  11069. if (digit < t) {
  11070. break;
  11071. }
  11072. baseMinusT = base - t;
  11073. if (w > floor(maxInt / baseMinusT)) {
  11074. error('overflow');
  11075. }
  11076. w *= baseMinusT;
  11077. }
  11078. out = output.length + 1;
  11079. bias = adapt(i - oldi, out, oldi == 0);
  11080. // `i` was supposed to wrap around from `out` to `0`,
  11081. // incrementing `n` each time, so we'll fix that now:
  11082. if (floor(i / out) > maxInt - n) {
  11083. error('overflow');
  11084. }
  11085. n += floor(i / out);
  11086. i %= out;
  11087. // Insert `n` at position `i` of the output
  11088. output.splice(i++, 0, n);
  11089. }
  11090. return ucs2encode(output);
  11091. }
  11092. /**
  11093. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  11094. * Punycode string of ASCII-only symbols.
  11095. * @memberOf punycode
  11096. * @param {String} input The string of Unicode symbols.
  11097. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  11098. */
  11099. function encode(input) {
  11100. var n,
  11101. delta,
  11102. handledCPCount,
  11103. basicLength,
  11104. bias,
  11105. j,
  11106. m,
  11107. q,
  11108. k,
  11109. t,
  11110. currentValue,
  11111. output = [],
  11112. /** `inputLength` will hold the number of code points in `input`. */
  11113. inputLength,
  11114. /** Cached calculation results */
  11115. handledCPCountPlusOne,
  11116. baseMinusT,
  11117. qMinusT;
  11118. // Convert the input in UCS-2 to Unicode
  11119. input = ucs2decode(input);
  11120. // Cache the length
  11121. inputLength = input.length;
  11122. // Initialize the state
  11123. n = initialN;
  11124. delta = 0;
  11125. bias = initialBias;
  11126. // Handle the basic code points
  11127. for (j = 0; j < inputLength; ++j) {
  11128. currentValue = input[j];
  11129. if (currentValue < 0x80) {
  11130. output.push(stringFromCharCode(currentValue));
  11131. }
  11132. }
  11133. handledCPCount = basicLength = output.length;
  11134. // `handledCPCount` is the number of code points that have been handled;
  11135. // `basicLength` is the number of basic code points.
  11136. // Finish the basic string - if it is not empty - with a delimiter
  11137. if (basicLength) {
  11138. output.push(delimiter);
  11139. }
  11140. // Main encoding loop:
  11141. while (handledCPCount < inputLength) {
  11142. // All non-basic code points < n have been handled already. Find the next
  11143. // larger one:
  11144. for (m = maxInt, j = 0; j < inputLength; ++j) {
  11145. currentValue = input[j];
  11146. if (currentValue >= n && currentValue < m) {
  11147. m = currentValue;
  11148. }
  11149. }
  11150. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  11151. // but guard against overflow
  11152. handledCPCountPlusOne = handledCPCount + 1;
  11153. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  11154. error('overflow');
  11155. }
  11156. delta += (m - n) * handledCPCountPlusOne;
  11157. n = m;
  11158. for (j = 0; j < inputLength; ++j) {
  11159. currentValue = input[j];
  11160. if (currentValue < n && ++delta > maxInt) {
  11161. error('overflow');
  11162. }
  11163. if (currentValue == n) {
  11164. // Represent delta as a generalized variable-length integer
  11165. for (q = delta, k = base; /* no condition */; k += base) {
  11166. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  11167. if (q < t) {
  11168. break;
  11169. }
  11170. qMinusT = q - t;
  11171. baseMinusT = base - t;
  11172. output.push(
  11173. stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
  11174. );
  11175. q = floor(qMinusT / baseMinusT);
  11176. }
  11177. output.push(stringFromCharCode(digitToBasic(q, 0)));
  11178. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  11179. delta = 0;
  11180. ++handledCPCount;
  11181. }
  11182. }
  11183. ++delta;
  11184. ++n;
  11185. }
  11186. return output.join('');
  11187. }
  11188. /**
  11189. * Converts a Punycode string representing a domain name or an email address
  11190. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  11191. * it doesn't matter if you call it on a string that has already been
  11192. * converted to Unicode.
  11193. * @memberOf punycode
  11194. * @param {String} input The Punycoded domain name or email address to
  11195. * convert to Unicode.
  11196. * @returns {String} The Unicode representation of the given Punycode
  11197. * string.
  11198. */
  11199. function toUnicode(input) {
  11200. return mapDomain(input, function(string) {
  11201. return regexPunycode.test(string)
  11202. ? decode(string.slice(4).toLowerCase())
  11203. : string;
  11204. });
  11205. }
  11206. /**
  11207. * Converts a Unicode string representing a domain name or an email address to
  11208. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  11209. * i.e. it doesn't matter if you call it with a domain that's already in
  11210. * ASCII.
  11211. * @memberOf punycode
  11212. * @param {String} input The domain name or email address to convert, as a
  11213. * Unicode string.
  11214. * @returns {String} The Punycode representation of the given domain name or
  11215. * email address.
  11216. */
  11217. function toASCII(input) {
  11218. return mapDomain(input, function(string) {
  11219. return regexNonASCII.test(string)
  11220. ? 'xn--' + encode(string)
  11221. : string;
  11222. });
  11223. }
  11224. /*--------------------------------------------------------------------------*/
  11225. /** Define the public API */
  11226. punycode = {
  11227. /**
  11228. * A string representing the current Punycode.js version number.
  11229. * @memberOf punycode
  11230. * @type String
  11231. */
  11232. 'version': '1.4.1',
  11233. /**
  11234. * An object of methods to convert from JavaScript's internal character
  11235. * representation (UCS-2) to Unicode code points, and back.
  11236. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  11237. * @memberOf punycode
  11238. * @type Object
  11239. */
  11240. 'ucs2': {
  11241. 'decode': ucs2decode,
  11242. 'encode': ucs2encode
  11243. },
  11244. 'decode': decode,
  11245. 'encode': encode,
  11246. 'toASCII': toASCII,
  11247. 'toUnicode': toUnicode
  11248. };
  11249. /** Expose `punycode` */
  11250. // Some AMD build optimizers, like r.js, check for specific condition patterns
  11251. // like the following:
  11252. if (
  11253. true
  11254. ) {
  11255. !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
  11256. return punycode;
  11257. }.call(exports, __webpack_require__, exports, module),
  11258. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  11259. } else if (freeExports && freeModule) {
  11260. if (module.exports == freeExports) {
  11261. // in Node.js, io.js, or RingoJS v0.8.0+
  11262. freeModule.exports = punycode;
  11263. } else {
  11264. // in Narwhal or RingoJS v0.7.0-
  11265. for (key in punycode) {
  11266. punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
  11267. }
  11268. }
  11269. } else {
  11270. // in Rhino or a web browser
  11271. root.punycode = punycode;
  11272. }
  11273. }(this));
  11274. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(84)(module), __webpack_require__(6)))
  11275. /***/ }),
  11276. /* 80 */
  11277. /***/ (function(module, exports, __webpack_require__) {
  11278. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  11279. "use strict";
  11280. if (global.setImmediate) {
  11281. return;
  11282. }
  11283. var nextHandle = 1; // Spec says greater than zero
  11284. var tasksByHandle = {};
  11285. var currentlyRunningATask = false;
  11286. var doc = global.document;
  11287. var registerImmediate;
  11288. function setImmediate(callback) {
  11289. // Callback can either be a function or a string
  11290. if (typeof callback !== "function") {
  11291. callback = new Function("" + callback);
  11292. }
  11293. // Copy function arguments
  11294. var args = new Array(arguments.length - 1);
  11295. for (var i = 0; i < args.length; i++) {
  11296. args[i] = arguments[i + 1];
  11297. }
  11298. // Store and register the task
  11299. var task = { callback: callback, args: args };
  11300. tasksByHandle[nextHandle] = task;
  11301. registerImmediate(nextHandle);
  11302. return nextHandle++;
  11303. }
  11304. function clearImmediate(handle) {
  11305. delete tasksByHandle[handle];
  11306. }
  11307. function run(task) {
  11308. var callback = task.callback;
  11309. var args = task.args;
  11310. switch (args.length) {
  11311. case 0:
  11312. callback();
  11313. break;
  11314. case 1:
  11315. callback(args[0]);
  11316. break;
  11317. case 2:
  11318. callback(args[0], args[1]);
  11319. break;
  11320. case 3:
  11321. callback(args[0], args[1], args[2]);
  11322. break;
  11323. default:
  11324. callback.apply(undefined, args);
  11325. break;
  11326. }
  11327. }
  11328. function runIfPresent(handle) {
  11329. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  11330. // So if we're currently running a task, we'll need to delay this invocation.
  11331. if (currentlyRunningATask) {
  11332. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  11333. // "too much recursion" error.
  11334. setTimeout(runIfPresent, 0, handle);
  11335. } else {
  11336. var task = tasksByHandle[handle];
  11337. if (task) {
  11338. currentlyRunningATask = true;
  11339. try {
  11340. run(task);
  11341. } finally {
  11342. clearImmediate(handle);
  11343. currentlyRunningATask = false;
  11344. }
  11345. }
  11346. }
  11347. }
  11348. function installNextTickImplementation() {
  11349. registerImmediate = function(handle) {
  11350. process.nextTick(function () { runIfPresent(handle); });
  11351. };
  11352. }
  11353. function canUsePostMessage() {
  11354. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  11355. // where `global.postMessage` means something completely different and can't be used for this purpose.
  11356. if (global.postMessage && !global.importScripts) {
  11357. var postMessageIsAsynchronous = true;
  11358. var oldOnMessage = global.onmessage;
  11359. global.onmessage = function() {
  11360. postMessageIsAsynchronous = false;
  11361. };
  11362. global.postMessage("", "*");
  11363. global.onmessage = oldOnMessage;
  11364. return postMessageIsAsynchronous;
  11365. }
  11366. }
  11367. function installPostMessageImplementation() {
  11368. // Installs an event handler on `global` for the `message` event: see
  11369. // * https://developer.mozilla.org/en/DOM/window.postMessage
  11370. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  11371. var messagePrefix = "setImmediate$" + Math.random() + "$";
  11372. var onGlobalMessage = function(event) {
  11373. if (event.source === global &&
  11374. typeof event.data === "string" &&
  11375. event.data.indexOf(messagePrefix) === 0) {
  11376. runIfPresent(+event.data.slice(messagePrefix.length));
  11377. }
  11378. };
  11379. if (global.addEventListener) {
  11380. global.addEventListener("message", onGlobalMessage, false);
  11381. } else {
  11382. global.attachEvent("onmessage", onGlobalMessage);
  11383. }
  11384. registerImmediate = function(handle) {
  11385. global.postMessage(messagePrefix + handle, "*");
  11386. };
  11387. }
  11388. function installMessageChannelImplementation() {
  11389. var channel = new MessageChannel();
  11390. channel.port1.onmessage = function(event) {
  11391. var handle = event.data;
  11392. runIfPresent(handle);
  11393. };
  11394. registerImmediate = function(handle) {
  11395. channel.port2.postMessage(handle);
  11396. };
  11397. }
  11398. function installReadyStateChangeImplementation() {
  11399. var html = doc.documentElement;
  11400. registerImmediate = function(handle) {
  11401. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  11402. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  11403. var script = doc.createElement("script");
  11404. script.onreadystatechange = function () {
  11405. runIfPresent(handle);
  11406. script.onreadystatechange = null;
  11407. html.removeChild(script);
  11408. script = null;
  11409. };
  11410. html.appendChild(script);
  11411. };
  11412. }
  11413. function installSetTimeoutImplementation() {
  11414. registerImmediate = function(handle) {
  11415. setTimeout(runIfPresent, 0, handle);
  11416. };
  11417. }
  11418. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  11419. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  11420. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  11421. // Don't get fooled by e.g. browserify environments.
  11422. if ({}.toString.call(global.process) === "[object process]") {
  11423. // For Node.js before 0.9
  11424. installNextTickImplementation();
  11425. } else if (canUsePostMessage()) {
  11426. // For non-IE10 modern browsers
  11427. installPostMessageImplementation();
  11428. } else if (global.MessageChannel) {
  11429. // For web workers, where supported
  11430. installMessageChannelImplementation();
  11431. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  11432. // For IE 6–8
  11433. installReadyStateChangeImplementation();
  11434. } else {
  11435. // For older browsers
  11436. installSetTimeoutImplementation();
  11437. }
  11438. attachTo.setImmediate = setImmediate;
  11439. attachTo.clearImmediate = clearImmediate;
  11440. }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
  11441. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(78)))
  11442. /***/ }),
  11443. /* 81 */
  11444. /***/ (function(module, exports, __webpack_require__) {
  11445. var apply = Function.prototype.apply;
  11446. // DOM APIs, for completeness
  11447. exports.setTimeout = function() {
  11448. return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
  11449. };
  11450. exports.setInterval = function() {
  11451. return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
  11452. };
  11453. exports.clearTimeout =
  11454. exports.clearInterval = function(timeout) {
  11455. if (timeout) {
  11456. timeout.close();
  11457. }
  11458. };
  11459. function Timeout(id, clearFn) {
  11460. this._id = id;
  11461. this._clearFn = clearFn;
  11462. }
  11463. Timeout.prototype.unref = Timeout.prototype.ref = function() {};
  11464. Timeout.prototype.close = function() {
  11465. this._clearFn.call(window, this._id);
  11466. };
  11467. // Does not start the time, just sets up the members needed.
  11468. exports.enroll = function(item, msecs) {
  11469. clearTimeout(item._idleTimeoutId);
  11470. item._idleTimeout = msecs;
  11471. };
  11472. exports.unenroll = function(item) {
  11473. clearTimeout(item._idleTimeoutId);
  11474. item._idleTimeout = -1;
  11475. };
  11476. exports._unrefActive = exports.active = function(item) {
  11477. clearTimeout(item._idleTimeoutId);
  11478. var msecs = item._idleTimeout;
  11479. if (msecs >= 0) {
  11480. item._idleTimeoutId = setTimeout(function onTimeout() {
  11481. if (item._onTimeout)
  11482. item._onTimeout();
  11483. }, msecs);
  11484. }
  11485. };
  11486. // setimmediate attaches itself to the global object
  11487. __webpack_require__(80);
  11488. exports.setImmediate = setImmediate;
  11489. exports.clearImmediate = clearImmediate;
  11490. /***/ }),
  11491. /* 82 */
  11492. /***/ (function(module, exports) {
  11493. module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
  11494. /***/ }),
  11495. /* 83 */
  11496. /***/ (function(module, exports, __webpack_require__) {
  11497. "use strict";
  11498. exports.Any = __webpack_require__(18);
  11499. exports.Cc = __webpack_require__(16);
  11500. exports.Cf = __webpack_require__(82);
  11501. exports.P = __webpack_require__(5);
  11502. exports.Z = __webpack_require__(17);
  11503. /***/ }),
  11504. /* 84 */
  11505. /***/ (function(module, exports) {
  11506. module.exports = function(module) {
  11507. if(!module.webpackPolyfill) {
  11508. module.deprecate = function() {};
  11509. module.paths = [];
  11510. // module.parent = undefined by default
  11511. if(!module.children) module.children = [];
  11512. Object.defineProperty(module, "loaded", {
  11513. enumerable: true,
  11514. get: function() {
  11515. return module.l;
  11516. }
  11517. });
  11518. Object.defineProperty(module, "id", {
  11519. enumerable: true,
  11520. get: function() {
  11521. return module.i;
  11522. }
  11523. });
  11524. module.webpackPolyfill = 1;
  11525. }
  11526. return module;
  11527. };
  11528. /***/ }),
  11529. /* 85 */
  11530. /***/ (function(module, exports, __webpack_require__) {
  11531. __webpack_require__(19);
  11532. module.exports = __webpack_require__(20);
  11533. /***/ })
  11534. /******/ ]);
  11535. //# sourceMappingURL=main.js.map