browser.js 229 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (factory((global.VueTemplateCompiler = {})));
  5. }(this, (function (exports) { 'use strict';
  6. var splitRE = /\r?\n/g;
  7. var emptyRE = /^\s*$/;
  8. var needFixRE = /^(\r?\n)*[\t\s]/;
  9. var deIndent = function deindent (str) {
  10. if (!needFixRE.test(str)) {
  11. return str
  12. }
  13. var lines = str.split(splitRE);
  14. var min = Infinity;
  15. var type, cur, c;
  16. for (var i = 0; i < lines.length; i++) {
  17. var line = lines[i];
  18. if (!emptyRE.test(line)) {
  19. if (!type) {
  20. c = line.charAt(0);
  21. if (c === ' ' || c === '\t') {
  22. type = c;
  23. cur = count(line, type);
  24. if (cur < min) {
  25. min = cur;
  26. }
  27. } else {
  28. return str
  29. }
  30. } else {
  31. cur = count(line, type);
  32. if (cur < min) {
  33. min = cur;
  34. }
  35. }
  36. }
  37. }
  38. return lines.map(function (line) {
  39. return line.slice(min)
  40. }).join('\n')
  41. };
  42. function count (line, type) {
  43. var i = 0;
  44. while (line.charAt(i) === type) {
  45. i++;
  46. }
  47. return i
  48. }
  49. /* */
  50. var emptyObject = Object.freeze({});
  51. // These helpers produce better VM code in JS engines due to their
  52. // explicitness and function inlining.
  53. function isUndef (v) {
  54. return v === undefined || v === null
  55. }
  56. /**
  57. * Check if value is primitive.
  58. */
  59. function isPrimitive (value) {
  60. return (
  61. typeof value === 'string' ||
  62. typeof value === 'number' ||
  63. // $flow-disable-line
  64. typeof value === 'symbol' ||
  65. typeof value === 'boolean'
  66. )
  67. }
  68. /**
  69. * Quick object check - this is primarily used to tell
  70. * Objects from primitive values when we know the value
  71. * is a JSON-compliant type.
  72. */
  73. function isObject (obj) {
  74. return obj !== null && typeof obj === 'object'
  75. }
  76. /**
  77. * Get the raw type string of a value, e.g., [object Object].
  78. */
  79. var _toString = Object.prototype.toString;
  80. function toRawType (value) {
  81. return _toString.call(value).slice(8, -1)
  82. }
  83. /**
  84. * Strict object type check. Only returns true
  85. * for plain JavaScript objects.
  86. */
  87. function isPlainObject (obj) {
  88. return _toString.call(obj) === '[object Object]'
  89. }
  90. /**
  91. * Check if val is a valid array index.
  92. */
  93. function isValidArrayIndex (val) {
  94. var n = parseFloat(String(val));
  95. return n >= 0 && Math.floor(n) === n && isFinite(val)
  96. }
  97. /**
  98. * Make a map and return a function for checking if a key
  99. * is in that map.
  100. */
  101. function makeMap (
  102. str,
  103. expectsLowerCase
  104. ) {
  105. var map = Object.create(null);
  106. var list = str.split(',');
  107. for (var i = 0; i < list.length; i++) {
  108. map[list[i]] = true;
  109. }
  110. return expectsLowerCase
  111. ? function (val) { return map[val.toLowerCase()]; }
  112. : function (val) { return map[val]; }
  113. }
  114. /**
  115. * Check if a tag is a built-in tag.
  116. */
  117. var isBuiltInTag = makeMap('slot,component', true);
  118. /**
  119. * Check if an attribute is a reserved attribute.
  120. */
  121. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  122. /**
  123. * Remove an item from an array.
  124. */
  125. function remove (arr, item) {
  126. if (arr.length) {
  127. var index = arr.indexOf(item);
  128. if (index > -1) {
  129. return arr.splice(index, 1)
  130. }
  131. }
  132. }
  133. /**
  134. * Check whether an object has the property.
  135. */
  136. var hasOwnProperty = Object.prototype.hasOwnProperty;
  137. function hasOwn (obj, key) {
  138. return hasOwnProperty.call(obj, key)
  139. }
  140. /**
  141. * Create a cached version of a pure function.
  142. */
  143. function cached (fn) {
  144. var cache = Object.create(null);
  145. return (function cachedFn (str) {
  146. var hit = cache[str];
  147. return hit || (cache[str] = fn(str))
  148. })
  149. }
  150. /**
  151. * Camelize a hyphen-delimited string.
  152. */
  153. var camelizeRE = /-(\w)/g;
  154. var camelize = cached(function (str) {
  155. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  156. });
  157. /**
  158. * Simple bind polyfill for environments that do not support it,
  159. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  160. * since native bind is now performant enough in most browsers.
  161. * But removing it would mean breaking code that was able to run in
  162. * PhantomJS 1.x, so this must be kept for backward compatibility.
  163. */
  164. /* istanbul ignore next */
  165. function polyfillBind (fn, ctx) {
  166. function boundFn (a) {
  167. var l = arguments.length;
  168. return l
  169. ? l > 1
  170. ? fn.apply(ctx, arguments)
  171. : fn.call(ctx, a)
  172. : fn.call(ctx)
  173. }
  174. boundFn._length = fn.length;
  175. return boundFn
  176. }
  177. function nativeBind (fn, ctx) {
  178. return fn.bind(ctx)
  179. }
  180. var bind = Function.prototype.bind
  181. ? nativeBind
  182. : polyfillBind;
  183. /**
  184. * Mix properties into target object.
  185. */
  186. function extend (to, _from) {
  187. for (var key in _from) {
  188. to[key] = _from[key];
  189. }
  190. return to
  191. }
  192. /* eslint-disable no-unused-vars */
  193. /**
  194. * Perform no operation.
  195. * Stubbing args to make Flow happy without leaving useless transpiled code
  196. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  197. */
  198. function noop (a, b, c) {}
  199. /**
  200. * Always return false.
  201. */
  202. var no = function (a, b, c) { return false; };
  203. /* eslint-enable no-unused-vars */
  204. /**
  205. * Return the same value.
  206. */
  207. var identity = function (_) { return _; };
  208. /**
  209. * Generate a string containing static keys from compiler modules.
  210. */
  211. function genStaticKeys (modules) {
  212. return modules.reduce(function (keys, m) {
  213. return keys.concat(m.staticKeys || [])
  214. }, []).join(',')
  215. }
  216. /* */
  217. var isUnaryTag = makeMap(
  218. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  219. 'link,meta,param,source,track,wbr'
  220. );
  221. // Elements that you can, intentionally, leave open
  222. // (and which close themselves)
  223. var canBeLeftOpenTag = makeMap(
  224. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  225. );
  226. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  227. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  228. var isNonPhrasingTag = makeMap(
  229. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  230. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  231. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  232. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  233. 'title,tr,track'
  234. );
  235. /**
  236. * Not type-checking this file because it's mostly vendor code.
  237. */
  238. // Regular Expressions for parsing tags and attributes
  239. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  240. // could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
  241. // but for Vue templates we can enforce a simple charset
  242. var ncname = '[a-zA-Z_][\\w\\-\\.]*';
  243. var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
  244. var startTagOpen = new RegExp(("^<" + qnameCapture));
  245. var startTagClose = /^\s*(\/?)>/;
  246. var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
  247. var doctype = /^<!DOCTYPE [^>]+>/i;
  248. // #7298: escape - to avoid being pased as HTML comment when inlined in page
  249. var comment = /^<!\--/;
  250. var conditionalComment = /^<!\[/;
  251. // Special Elements (can contain anything)
  252. var isPlainTextElement = makeMap('script,style,textarea', true);
  253. var reCache = {};
  254. var decodingMap = {
  255. '&lt;': '<',
  256. '&gt;': '>',
  257. '&quot;': '"',
  258. '&amp;': '&',
  259. '&#10;': '\n',
  260. '&#9;': '\t'
  261. };
  262. var encodedAttr = /&(?:lt|gt|quot|amp);/g;
  263. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
  264. // #5992
  265. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  266. var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
  267. function decodeAttr (value, shouldDecodeNewlines) {
  268. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  269. return value.replace(re, function (match) { return decodingMap[match]; })
  270. }
  271. function parseHTML (html, options) {
  272. var stack = [];
  273. var expectHTML = options.expectHTML;
  274. var isUnaryTag$$1 = options.isUnaryTag || no;
  275. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  276. var index = 0;
  277. var last, lastTag;
  278. while (html) {
  279. last = html;
  280. // Make sure we're not in a plaintext content element like script/style
  281. if (!lastTag || !isPlainTextElement(lastTag)) {
  282. var textEnd = html.indexOf('<');
  283. if (textEnd === 0) {
  284. // Comment:
  285. if (comment.test(html)) {
  286. var commentEnd = html.indexOf('-->');
  287. if (commentEnd >= 0) {
  288. if (options.shouldKeepComment) {
  289. options.comment(html.substring(4, commentEnd));
  290. }
  291. advance(commentEnd + 3);
  292. continue
  293. }
  294. }
  295. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  296. if (conditionalComment.test(html)) {
  297. var conditionalEnd = html.indexOf(']>');
  298. if (conditionalEnd >= 0) {
  299. advance(conditionalEnd + 2);
  300. continue
  301. }
  302. }
  303. // Doctype:
  304. var doctypeMatch = html.match(doctype);
  305. if (doctypeMatch) {
  306. advance(doctypeMatch[0].length);
  307. continue
  308. }
  309. // End tag:
  310. var endTagMatch = html.match(endTag);
  311. if (endTagMatch) {
  312. var curIndex = index;
  313. advance(endTagMatch[0].length);
  314. parseEndTag(endTagMatch[1], curIndex, index);
  315. continue
  316. }
  317. // Start tag:
  318. var startTagMatch = parseStartTag();
  319. if (startTagMatch) {
  320. handleStartTag(startTagMatch);
  321. if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
  322. advance(1);
  323. }
  324. continue
  325. }
  326. }
  327. var text = (void 0), rest = (void 0), next = (void 0);
  328. if (textEnd >= 0) {
  329. rest = html.slice(textEnd);
  330. while (
  331. !endTag.test(rest) &&
  332. !startTagOpen.test(rest) &&
  333. !comment.test(rest) &&
  334. !conditionalComment.test(rest)
  335. ) {
  336. // < in plain text, be forgiving and treat it as text
  337. next = rest.indexOf('<', 1);
  338. if (next < 0) { break }
  339. textEnd += next;
  340. rest = html.slice(textEnd);
  341. }
  342. text = html.substring(0, textEnd);
  343. advance(textEnd);
  344. }
  345. if (textEnd < 0) {
  346. text = html;
  347. html = '';
  348. }
  349. if (options.chars && text) {
  350. options.chars(text);
  351. }
  352. } else {
  353. var endTagLength = 0;
  354. var stackedTag = lastTag.toLowerCase();
  355. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  356. var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
  357. endTagLength = endTag.length;
  358. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  359. text = text
  360. .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
  361. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  362. }
  363. if (shouldIgnoreFirstNewline(stackedTag, text)) {
  364. text = text.slice(1);
  365. }
  366. if (options.chars) {
  367. options.chars(text);
  368. }
  369. return ''
  370. });
  371. index += html.length - rest$1.length;
  372. html = rest$1;
  373. parseEndTag(stackedTag, index - endTagLength, index);
  374. }
  375. if (html === last) {
  376. options.chars && options.chars(html);
  377. if (!stack.length && options.warn) {
  378. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
  379. }
  380. break
  381. }
  382. }
  383. // Clean up any remaining tags
  384. parseEndTag();
  385. function advance (n) {
  386. index += n;
  387. html = html.substring(n);
  388. }
  389. function parseStartTag () {
  390. var start = html.match(startTagOpen);
  391. if (start) {
  392. var match = {
  393. tagName: start[1],
  394. attrs: [],
  395. start: index
  396. };
  397. advance(start[0].length);
  398. var end, attr;
  399. while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
  400. advance(attr[0].length);
  401. match.attrs.push(attr);
  402. }
  403. if (end) {
  404. match.unarySlash = end[1];
  405. advance(end[0].length);
  406. match.end = index;
  407. return match
  408. }
  409. }
  410. }
  411. function handleStartTag (match) {
  412. var tagName = match.tagName;
  413. var unarySlash = match.unarySlash;
  414. if (expectHTML) {
  415. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  416. parseEndTag(lastTag);
  417. }
  418. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  419. parseEndTag(tagName);
  420. }
  421. }
  422. var unary = isUnaryTag$$1(tagName) || !!unarySlash;
  423. var l = match.attrs.length;
  424. var attrs = new Array(l);
  425. for (var i = 0; i < l; i++) {
  426. var args = match.attrs[i];
  427. var value = args[3] || args[4] || args[5] || '';
  428. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  429. ? options.shouldDecodeNewlinesForHref
  430. : options.shouldDecodeNewlines;
  431. attrs[i] = {
  432. name: args[1],
  433. value: decodeAttr(value, shouldDecodeNewlines)
  434. };
  435. }
  436. if (!unary) {
  437. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
  438. lastTag = tagName;
  439. }
  440. if (options.start) {
  441. options.start(tagName, attrs, unary, match.start, match.end);
  442. }
  443. }
  444. function parseEndTag (tagName, start, end) {
  445. var pos, lowerCasedTagName;
  446. if (start == null) { start = index; }
  447. if (end == null) { end = index; }
  448. // Find the closest opened tag of the same type
  449. if (tagName) {
  450. lowerCasedTagName = tagName.toLowerCase();
  451. for (pos = stack.length - 1; pos >= 0; pos--) {
  452. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  453. break
  454. }
  455. }
  456. } else {
  457. // If no tag name is provided, clean shop
  458. pos = 0;
  459. }
  460. if (pos >= 0) {
  461. // Close all the open elements, up the stack
  462. for (var i = stack.length - 1; i >= pos; i--) {
  463. if (i > pos || !tagName &&
  464. options.warn
  465. ) {
  466. options.warn(
  467. ("tag <" + (stack[i].tag) + "> has no matching end tag.")
  468. );
  469. }
  470. if (options.end) {
  471. options.end(stack[i].tag, start, end);
  472. }
  473. }
  474. // Remove the open elements from the stack
  475. stack.length = pos;
  476. lastTag = pos && stack[pos - 1].tag;
  477. } else if (lowerCasedTagName === 'br') {
  478. if (options.start) {
  479. options.start(tagName, [], true, start, end);
  480. }
  481. } else if (lowerCasedTagName === 'p') {
  482. if (options.start) {
  483. options.start(tagName, [], false, start, end);
  484. }
  485. if (options.end) {
  486. options.end(tagName, start, end);
  487. }
  488. }
  489. }
  490. }
  491. /* */
  492. var splitRE$1 = /\r?\n/g;
  493. var replaceRE = /./g;
  494. var isSpecialTag = makeMap('script,style,template', true);
  495. /**
  496. * Parse a single-file component (*.vue) file into an SFC Descriptor Object.
  497. */
  498. function parseComponent (
  499. content,
  500. options
  501. ) {
  502. if ( options === void 0 ) options = {};
  503. var sfc = {
  504. template: null,
  505. script: null,
  506. styles: [],
  507. customBlocks: []
  508. };
  509. var depth = 0;
  510. var currentBlock = null;
  511. function start (
  512. tag,
  513. attrs,
  514. unary,
  515. start,
  516. end
  517. ) {
  518. if (depth === 0) {
  519. currentBlock = {
  520. type: tag,
  521. content: '',
  522. start: end,
  523. attrs: attrs.reduce(function (cumulated, ref) {
  524. var name = ref.name;
  525. var value = ref.value;
  526. cumulated[name] = value || true;
  527. return cumulated
  528. }, {})
  529. };
  530. if (isSpecialTag(tag)) {
  531. checkAttrs(currentBlock, attrs);
  532. if (tag === 'style') {
  533. sfc.styles.push(currentBlock);
  534. } else {
  535. sfc[tag] = currentBlock;
  536. }
  537. } else { // custom blocks
  538. sfc.customBlocks.push(currentBlock);
  539. }
  540. }
  541. if (!unary) {
  542. depth++;
  543. }
  544. }
  545. function checkAttrs (block, attrs) {
  546. for (var i = 0; i < attrs.length; i++) {
  547. var attr = attrs[i];
  548. if (attr.name === 'lang') {
  549. block.lang = attr.value;
  550. }
  551. if (attr.name === 'scoped') {
  552. block.scoped = true;
  553. }
  554. if (attr.name === 'module') {
  555. block.module = attr.value || true;
  556. }
  557. if (attr.name === 'src') {
  558. block.src = attr.value;
  559. }
  560. }
  561. }
  562. function end (tag, start) {
  563. if (depth === 1 && currentBlock) {
  564. currentBlock.end = start;
  565. var text = deIndent(content.slice(currentBlock.start, currentBlock.end));
  566. // pad content so that linters and pre-processors can output correct
  567. // line numbers in errors and warnings
  568. if (currentBlock.type !== 'template' && options.pad) {
  569. text = padContent(currentBlock, options.pad) + text;
  570. }
  571. currentBlock.content = text;
  572. currentBlock = null;
  573. }
  574. depth--;
  575. }
  576. function padContent (block, pad) {
  577. if (pad === 'space') {
  578. return content.slice(0, block.start).replace(replaceRE, ' ')
  579. } else {
  580. var offset = content.slice(0, block.start).split(splitRE$1).length;
  581. var padChar = block.type === 'script' && !block.lang
  582. ? '//\n'
  583. : '\n';
  584. return Array(offset).join(padChar)
  585. }
  586. }
  587. parseHTML(content, {
  588. start: start,
  589. end: end
  590. });
  591. return sfc
  592. }
  593. /* */
  594. /**
  595. * Define a property.
  596. */
  597. function def (obj, key, val, enumerable) {
  598. Object.defineProperty(obj, key, {
  599. value: val,
  600. enumerable: !!enumerable,
  601. writable: true,
  602. configurable: true
  603. });
  604. }
  605. /* */
  606. // can we use __proto__?
  607. var hasProto = '__proto__' in {};
  608. // Browser environment sniffing
  609. var inBrowser = typeof window !== 'undefined';
  610. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  611. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  612. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  613. var isIE = UA && /msie|trident/.test(UA);
  614. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  615. var isEdge = UA && UA.indexOf('edge/') > 0;
  616. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  617. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  618. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  619. // Firefox has a "watch" function on Object.prototype...
  620. var nativeWatch = ({}).watch;
  621. if (inBrowser) {
  622. try {
  623. var opts = {};
  624. Object.defineProperty(opts, 'passive', ({
  625. get: function get () {
  626. }
  627. })); // https://github.com/facebook/flow/issues/285
  628. window.addEventListener('test-passive', null, opts);
  629. } catch (e) {}
  630. }
  631. // this needs to be lazy-evaled because vue may be required before
  632. // vue-server-renderer can set VUE_ENV
  633. var _isServer;
  634. var isServerRendering = function () {
  635. if (_isServer === undefined) {
  636. /* istanbul ignore if */
  637. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  638. // detect presence of vue-server-renderer and avoid
  639. // Webpack shimming the process
  640. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  641. } else {
  642. _isServer = false;
  643. }
  644. }
  645. return _isServer
  646. };
  647. // detect devtools
  648. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  649. /* istanbul ignore next */
  650. function isNative (Ctor) {
  651. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  652. }
  653. var hasSymbol =
  654. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  655. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  656. var _Set;
  657. /* istanbul ignore if */ // $flow-disable-line
  658. if (typeof Set !== 'undefined' && isNative(Set)) {
  659. // use native Set when available.
  660. _Set = Set;
  661. } else {
  662. // a non-standard Set polyfill that only works with primitive keys.
  663. _Set = /*@__PURE__*/(function () {
  664. function Set () {
  665. this.set = Object.create(null);
  666. }
  667. Set.prototype.has = function has (key) {
  668. return this.set[key] === true
  669. };
  670. Set.prototype.add = function add (key) {
  671. this.set[key] = true;
  672. };
  673. Set.prototype.clear = function clear () {
  674. this.set = Object.create(null);
  675. };
  676. return Set;
  677. }());
  678. }
  679. var ASSET_TYPES = [
  680. 'component',
  681. 'directive',
  682. 'filter'
  683. ];
  684. var LIFECYCLE_HOOKS = [
  685. 'beforeCreate',
  686. 'created',
  687. 'beforeMount',
  688. 'mounted',
  689. 'beforeUpdate',
  690. 'updated',
  691. 'beforeDestroy',
  692. 'destroyed',
  693. 'activated',
  694. 'deactivated',
  695. 'errorCaptured'
  696. ];
  697. /* */
  698. var config = ({
  699. /**
  700. * Option merge strategies (used in core/util/options)
  701. */
  702. // $flow-disable-line
  703. optionMergeStrategies: Object.create(null),
  704. /**
  705. * Whether to suppress warnings.
  706. */
  707. silent: false,
  708. /**
  709. * Show production mode tip message on boot?
  710. */
  711. productionTip: "development" !== 'production',
  712. /**
  713. * Whether to enable devtools
  714. */
  715. devtools: "development" !== 'production',
  716. /**
  717. * Whether to record perf
  718. */
  719. performance: false,
  720. /**
  721. * Error handler for watcher errors
  722. */
  723. errorHandler: null,
  724. /**
  725. * Warn handler for watcher warns
  726. */
  727. warnHandler: null,
  728. /**
  729. * Ignore certain custom elements
  730. */
  731. ignoredElements: [],
  732. /**
  733. * Custom user key aliases for v-on
  734. */
  735. // $flow-disable-line
  736. keyCodes: Object.create(null),
  737. /**
  738. * Check if a tag is reserved so that it cannot be registered as a
  739. * component. This is platform-dependent and may be overwritten.
  740. */
  741. isReservedTag: no,
  742. /**
  743. * Check if an attribute is reserved so that it cannot be used as a component
  744. * prop. This is platform-dependent and may be overwritten.
  745. */
  746. isReservedAttr: no,
  747. /**
  748. * Check if a tag is an unknown element.
  749. * Platform-dependent.
  750. */
  751. isUnknownElement: no,
  752. /**
  753. * Get the namespace of an element
  754. */
  755. getTagNamespace: noop,
  756. /**
  757. * Parse the real tag name for the specific platform.
  758. */
  759. parsePlatformTagName: identity,
  760. /**
  761. * Check if an attribute must be bound using property, e.g. value
  762. * Platform-dependent.
  763. */
  764. mustUseProp: no,
  765. /**
  766. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  767. * This will significantly reduce performance if set to false.
  768. */
  769. async: true,
  770. /**
  771. * Exposed for legacy reasons
  772. */
  773. _lifecycleHooks: LIFECYCLE_HOOKS
  774. });
  775. /* */
  776. var warn = noop;
  777. var tip = noop;
  778. var generateComponentTrace = (noop); // work around flow check
  779. var formatComponentName = (noop);
  780. {
  781. var hasConsole = typeof console !== 'undefined';
  782. var classifyRE = /(?:^|[-_])(\w)/g;
  783. var classify = function (str) { return str
  784. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  785. .replace(/[-_]/g, ''); };
  786. warn = function (msg, vm) {
  787. var trace = vm ? generateComponentTrace(vm) : '';
  788. if (hasConsole && (!config.silent)) {
  789. console.error(("[Vue warn]: " + msg + trace));
  790. }
  791. };
  792. tip = function (msg, vm) {
  793. if (hasConsole && (!config.silent)) {
  794. console.warn("[Vue tip]: " + msg + (
  795. vm ? generateComponentTrace(vm) : ''
  796. ));
  797. }
  798. };
  799. formatComponentName = function (vm, includeFile) {
  800. if (vm.$root === vm) {
  801. return '<Root>'
  802. }
  803. var options = typeof vm === 'function' && vm.cid != null
  804. ? vm.options
  805. : vm._isVue
  806. ? vm.$options || vm.constructor.options
  807. : vm || {};
  808. var name = options.name || options._componentTag;
  809. var file = options.__file;
  810. if (!name && file) {
  811. var match = file.match(/([^/\\]+)\.vue$/);
  812. name = match && match[1];
  813. }
  814. return (
  815. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  816. (file && includeFile !== false ? (" at " + file) : '')
  817. )
  818. };
  819. var repeat = function (str, n) {
  820. var res = '';
  821. while (n) {
  822. if (n % 2 === 1) { res += str; }
  823. if (n > 1) { str += str; }
  824. n >>= 1;
  825. }
  826. return res
  827. };
  828. generateComponentTrace = function (vm) {
  829. if (vm._isVue && vm.$parent) {
  830. var tree = [];
  831. var currentRecursiveSequence = 0;
  832. while (vm) {
  833. if (tree.length > 0) {
  834. var last = tree[tree.length - 1];
  835. if (last.constructor === vm.constructor) {
  836. currentRecursiveSequence++;
  837. vm = vm.$parent;
  838. continue
  839. } else if (currentRecursiveSequence > 0) {
  840. tree[tree.length - 1] = [last, currentRecursiveSequence];
  841. currentRecursiveSequence = 0;
  842. }
  843. }
  844. tree.push(vm);
  845. vm = vm.$parent;
  846. }
  847. return '\n\nfound in\n\n' + tree
  848. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  849. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  850. : formatComponentName(vm))); })
  851. .join('\n')
  852. } else {
  853. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  854. }
  855. };
  856. }
  857. /* */
  858. var uid = 0;
  859. /**
  860. * A dep is an observable that can have multiple
  861. * directives subscribing to it.
  862. */
  863. var Dep = function Dep () {
  864. this.id = uid++;
  865. this.subs = [];
  866. };
  867. Dep.prototype.addSub = function addSub (sub) {
  868. this.subs.push(sub);
  869. };
  870. Dep.prototype.removeSub = function removeSub (sub) {
  871. remove(this.subs, sub);
  872. };
  873. Dep.prototype.depend = function depend () {
  874. if (Dep.target) {
  875. Dep.target.addDep(this);
  876. }
  877. };
  878. Dep.prototype.notify = function notify () {
  879. // stabilize the subscriber list first
  880. var subs = this.subs.slice();
  881. for (var i = 0, l = subs.length; i < l; i++) {
  882. subs[i].update();
  883. }
  884. };
  885. // the current target watcher being evaluated.
  886. // this is globally unique because there could be only one
  887. // watcher being evaluated at any time.
  888. Dep.target = null;
  889. /* */
  890. var VNode = function VNode (
  891. tag,
  892. data,
  893. children,
  894. text,
  895. elm,
  896. context,
  897. componentOptions,
  898. asyncFactory
  899. ) {
  900. this.tag = tag;
  901. this.data = data;
  902. this.children = children;
  903. this.text = text;
  904. this.elm = elm;
  905. this.ns = undefined;
  906. this.context = context;
  907. this.fnContext = undefined;
  908. this.fnOptions = undefined;
  909. this.fnScopeId = undefined;
  910. this.key = data && data.key;
  911. this.componentOptions = componentOptions;
  912. this.componentInstance = undefined;
  913. this.parent = undefined;
  914. this.raw = false;
  915. this.isStatic = false;
  916. this.isRootInsert = true;
  917. this.isComment = false;
  918. this.isCloned = false;
  919. this.isOnce = false;
  920. this.asyncFactory = asyncFactory;
  921. this.asyncMeta = undefined;
  922. this.isAsyncPlaceholder = false;
  923. };
  924. var prototypeAccessors = { child: { configurable: true } };
  925. // DEPRECATED: alias for componentInstance for backwards compat.
  926. /* istanbul ignore next */
  927. prototypeAccessors.child.get = function () {
  928. return this.componentInstance
  929. };
  930. Object.defineProperties( VNode.prototype, prototypeAccessors );
  931. /*
  932. * not type checking this file because flow doesn't play well with
  933. * dynamically accessing methods on Array prototype
  934. */
  935. var arrayProto = Array.prototype;
  936. var arrayMethods = Object.create(arrayProto);
  937. var methodsToPatch = [
  938. 'push',
  939. 'pop',
  940. 'shift',
  941. 'unshift',
  942. 'splice',
  943. 'sort',
  944. 'reverse'
  945. ];
  946. /**
  947. * Intercept mutating methods and emit events
  948. */
  949. methodsToPatch.forEach(function (method) {
  950. // cache original method
  951. var original = arrayProto[method];
  952. def(arrayMethods, method, function mutator () {
  953. var args = [], len = arguments.length;
  954. while ( len-- ) args[ len ] = arguments[ len ];
  955. var result = original.apply(this, args);
  956. var ob = this.__ob__;
  957. var inserted;
  958. switch (method) {
  959. case 'push':
  960. case 'unshift':
  961. inserted = args;
  962. break
  963. case 'splice':
  964. inserted = args.slice(2);
  965. break
  966. }
  967. if (inserted) { ob.observeArray(inserted); }
  968. // notify change
  969. ob.dep.notify();
  970. return result
  971. });
  972. });
  973. /* */
  974. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  975. /**
  976. * In some cases we may want to disable observation inside a component's
  977. * update computation.
  978. */
  979. var shouldObserve = true;
  980. /**
  981. * Observer class that is attached to each observed
  982. * object. Once attached, the observer converts the target
  983. * object's property keys into getter/setters that
  984. * collect dependencies and dispatch updates.
  985. */
  986. var Observer = function Observer (value) {
  987. this.value = value;
  988. this.dep = new Dep();
  989. this.vmCount = 0;
  990. def(value, '__ob__', this);
  991. if (Array.isArray(value)) {
  992. if (hasProto) {
  993. protoAugment(value, arrayMethods);
  994. } else {
  995. copyAugment(value, arrayMethods, arrayKeys);
  996. }
  997. this.observeArray(value);
  998. } else {
  999. this.walk(value);
  1000. }
  1001. };
  1002. /**
  1003. * Walk through all properties and convert them into
  1004. * getter/setters. This method should only be called when
  1005. * value type is Object.
  1006. */
  1007. Observer.prototype.walk = function walk (obj) {
  1008. var keys = Object.keys(obj);
  1009. for (var i = 0; i < keys.length; i++) {
  1010. defineReactive$$1(obj, keys[i]);
  1011. }
  1012. };
  1013. /**
  1014. * Observe a list of Array items.
  1015. */
  1016. Observer.prototype.observeArray = function observeArray (items) {
  1017. for (var i = 0, l = items.length; i < l; i++) {
  1018. observe(items[i]);
  1019. }
  1020. };
  1021. // helpers
  1022. /**
  1023. * Augment a target Object or Array by intercepting
  1024. * the prototype chain using __proto__
  1025. */
  1026. function protoAugment (target, src) {
  1027. /* eslint-disable no-proto */
  1028. target.__proto__ = src;
  1029. /* eslint-enable no-proto */
  1030. }
  1031. /**
  1032. * Augment a target Object or Array by defining
  1033. * hidden properties.
  1034. */
  1035. /* istanbul ignore next */
  1036. function copyAugment (target, src, keys) {
  1037. for (var i = 0, l = keys.length; i < l; i++) {
  1038. var key = keys[i];
  1039. def(target, key, src[key]);
  1040. }
  1041. }
  1042. /**
  1043. * Attempt to create an observer instance for a value,
  1044. * returns the new observer if successfully observed,
  1045. * or the existing observer if the value already has one.
  1046. */
  1047. function observe (value, asRootData) {
  1048. if (!isObject(value) || value instanceof VNode) {
  1049. return
  1050. }
  1051. var ob;
  1052. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  1053. ob = value.__ob__;
  1054. } else if (
  1055. shouldObserve &&
  1056. !isServerRendering() &&
  1057. (Array.isArray(value) || isPlainObject(value)) &&
  1058. Object.isExtensible(value) &&
  1059. !value._isVue
  1060. ) {
  1061. ob = new Observer(value);
  1062. }
  1063. if (asRootData && ob) {
  1064. ob.vmCount++;
  1065. }
  1066. return ob
  1067. }
  1068. /**
  1069. * Define a reactive property on an Object.
  1070. */
  1071. function defineReactive$$1 (
  1072. obj,
  1073. key,
  1074. val,
  1075. customSetter,
  1076. shallow
  1077. ) {
  1078. var dep = new Dep();
  1079. var property = Object.getOwnPropertyDescriptor(obj, key);
  1080. if (property && property.configurable === false) {
  1081. return
  1082. }
  1083. // cater for pre-defined getter/setters
  1084. var getter = property && property.get;
  1085. var setter = property && property.set;
  1086. if ((!getter || setter) && arguments.length === 2) {
  1087. val = obj[key];
  1088. }
  1089. var childOb = !shallow && observe(val);
  1090. Object.defineProperty(obj, key, {
  1091. enumerable: true,
  1092. configurable: true,
  1093. get: function reactiveGetter () {
  1094. var value = getter ? getter.call(obj) : val;
  1095. if (Dep.target) {
  1096. dep.depend();
  1097. if (childOb) {
  1098. childOb.dep.depend();
  1099. if (Array.isArray(value)) {
  1100. dependArray(value);
  1101. }
  1102. }
  1103. }
  1104. return value
  1105. },
  1106. set: function reactiveSetter (newVal) {
  1107. var value = getter ? getter.call(obj) : val;
  1108. /* eslint-disable no-self-compare */
  1109. if (newVal === value || (newVal !== newVal && value !== value)) {
  1110. return
  1111. }
  1112. /* eslint-enable no-self-compare */
  1113. if (customSetter) {
  1114. customSetter();
  1115. }
  1116. // #7981: for accessor properties without setter
  1117. if (getter && !setter) { return }
  1118. if (setter) {
  1119. setter.call(obj, newVal);
  1120. } else {
  1121. val = newVal;
  1122. }
  1123. childOb = !shallow && observe(newVal);
  1124. dep.notify();
  1125. }
  1126. });
  1127. }
  1128. /**
  1129. * Set a property on an object. Adds the new property and
  1130. * triggers change notification if the property doesn't
  1131. * already exist.
  1132. */
  1133. function set (target, key, val) {
  1134. if (isUndef(target) || isPrimitive(target)
  1135. ) {
  1136. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  1137. }
  1138. if (Array.isArray(target) && isValidArrayIndex(key)) {
  1139. target.length = Math.max(target.length, key);
  1140. target.splice(key, 1, val);
  1141. return val
  1142. }
  1143. if (key in target && !(key in Object.prototype)) {
  1144. target[key] = val;
  1145. return val
  1146. }
  1147. var ob = (target).__ob__;
  1148. if (target._isVue || (ob && ob.vmCount)) {
  1149. warn(
  1150. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  1151. 'at runtime - declare it upfront in the data option.'
  1152. );
  1153. return val
  1154. }
  1155. if (!ob) {
  1156. target[key] = val;
  1157. return val
  1158. }
  1159. defineReactive$$1(ob.value, key, val);
  1160. ob.dep.notify();
  1161. return val
  1162. }
  1163. /**
  1164. * Collect dependencies on array elements when the array is touched, since
  1165. * we cannot intercept array element access like property getters.
  1166. */
  1167. function dependArray (value) {
  1168. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  1169. e = value[i];
  1170. e && e.__ob__ && e.__ob__.dep.depend();
  1171. if (Array.isArray(e)) {
  1172. dependArray(e);
  1173. }
  1174. }
  1175. }
  1176. /* */
  1177. /**
  1178. * Option overwriting strategies are functions that handle
  1179. * how to merge a parent option value and a child option
  1180. * value into the final value.
  1181. */
  1182. var strats = config.optionMergeStrategies;
  1183. /**
  1184. * Options with restrictions
  1185. */
  1186. {
  1187. strats.el = strats.propsData = function (parent, child, vm, key) {
  1188. if (!vm) {
  1189. warn(
  1190. "option \"" + key + "\" can only be used during instance " +
  1191. 'creation with the `new` keyword.'
  1192. );
  1193. }
  1194. return defaultStrat(parent, child)
  1195. };
  1196. }
  1197. /**
  1198. * Helper that recursively merges two data objects together.
  1199. */
  1200. function mergeData (to, from) {
  1201. if (!from) { return to }
  1202. var key, toVal, fromVal;
  1203. var keys = Object.keys(from);
  1204. for (var i = 0; i < keys.length; i++) {
  1205. key = keys[i];
  1206. toVal = to[key];
  1207. fromVal = from[key];
  1208. if (!hasOwn(to, key)) {
  1209. set(to, key, fromVal);
  1210. } else if (
  1211. toVal !== fromVal &&
  1212. isPlainObject(toVal) &&
  1213. isPlainObject(fromVal)
  1214. ) {
  1215. mergeData(toVal, fromVal);
  1216. }
  1217. }
  1218. return to
  1219. }
  1220. /**
  1221. * Data
  1222. */
  1223. function mergeDataOrFn (
  1224. parentVal,
  1225. childVal,
  1226. vm
  1227. ) {
  1228. if (!vm) {
  1229. // in a Vue.extend merge, both should be functions
  1230. if (!childVal) {
  1231. return parentVal
  1232. }
  1233. if (!parentVal) {
  1234. return childVal
  1235. }
  1236. // when parentVal & childVal are both present,
  1237. // we need to return a function that returns the
  1238. // merged result of both functions... no need to
  1239. // check if parentVal is a function here because
  1240. // it has to be a function to pass previous merges.
  1241. return function mergedDataFn () {
  1242. return mergeData(
  1243. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  1244. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  1245. )
  1246. }
  1247. } else {
  1248. return function mergedInstanceDataFn () {
  1249. // instance merge
  1250. var instanceData = typeof childVal === 'function'
  1251. ? childVal.call(vm, vm)
  1252. : childVal;
  1253. var defaultData = typeof parentVal === 'function'
  1254. ? parentVal.call(vm, vm)
  1255. : parentVal;
  1256. if (instanceData) {
  1257. return mergeData(instanceData, defaultData)
  1258. } else {
  1259. return defaultData
  1260. }
  1261. }
  1262. }
  1263. }
  1264. strats.data = function (
  1265. parentVal,
  1266. childVal,
  1267. vm
  1268. ) {
  1269. if (!vm) {
  1270. if (childVal && typeof childVal !== 'function') {
  1271. warn(
  1272. 'The "data" option should be a function ' +
  1273. 'that returns a per-instance value in component ' +
  1274. 'definitions.',
  1275. vm
  1276. );
  1277. return parentVal
  1278. }
  1279. return mergeDataOrFn(parentVal, childVal)
  1280. }
  1281. return mergeDataOrFn(parentVal, childVal, vm)
  1282. };
  1283. /**
  1284. * Hooks and props are merged as arrays.
  1285. */
  1286. function mergeHook (
  1287. parentVal,
  1288. childVal
  1289. ) {
  1290. return childVal
  1291. ? parentVal
  1292. ? parentVal.concat(childVal)
  1293. : Array.isArray(childVal)
  1294. ? childVal
  1295. : [childVal]
  1296. : parentVal
  1297. }
  1298. LIFECYCLE_HOOKS.forEach(function (hook) {
  1299. strats[hook] = mergeHook;
  1300. });
  1301. /**
  1302. * Assets
  1303. *
  1304. * When a vm is present (instance creation), we need to do
  1305. * a three-way merge between constructor options, instance
  1306. * options and parent options.
  1307. */
  1308. function mergeAssets (
  1309. parentVal,
  1310. childVal,
  1311. vm,
  1312. key
  1313. ) {
  1314. var res = Object.create(parentVal || null);
  1315. if (childVal) {
  1316. assertObjectType(key, childVal, vm);
  1317. return extend(res, childVal)
  1318. } else {
  1319. return res
  1320. }
  1321. }
  1322. ASSET_TYPES.forEach(function (type) {
  1323. strats[type + 's'] = mergeAssets;
  1324. });
  1325. /**
  1326. * Watchers.
  1327. *
  1328. * Watchers hashes should not overwrite one
  1329. * another, so we merge them as arrays.
  1330. */
  1331. strats.watch = function (
  1332. parentVal,
  1333. childVal,
  1334. vm,
  1335. key
  1336. ) {
  1337. // work around Firefox's Object.prototype.watch...
  1338. if (parentVal === nativeWatch) { parentVal = undefined; }
  1339. if (childVal === nativeWatch) { childVal = undefined; }
  1340. /* istanbul ignore if */
  1341. if (!childVal) { return Object.create(parentVal || null) }
  1342. {
  1343. assertObjectType(key, childVal, vm);
  1344. }
  1345. if (!parentVal) { return childVal }
  1346. var ret = {};
  1347. extend(ret, parentVal);
  1348. for (var key$1 in childVal) {
  1349. var parent = ret[key$1];
  1350. var child = childVal[key$1];
  1351. if (parent && !Array.isArray(parent)) {
  1352. parent = [parent];
  1353. }
  1354. ret[key$1] = parent
  1355. ? parent.concat(child)
  1356. : Array.isArray(child) ? child : [child];
  1357. }
  1358. return ret
  1359. };
  1360. /**
  1361. * Other object hashes.
  1362. */
  1363. strats.props =
  1364. strats.methods =
  1365. strats.inject =
  1366. strats.computed = function (
  1367. parentVal,
  1368. childVal,
  1369. vm,
  1370. key
  1371. ) {
  1372. if (childVal && "development" !== 'production') {
  1373. assertObjectType(key, childVal, vm);
  1374. }
  1375. if (!parentVal) { return childVal }
  1376. var ret = Object.create(null);
  1377. extend(ret, parentVal);
  1378. if (childVal) { extend(ret, childVal); }
  1379. return ret
  1380. };
  1381. strats.provide = mergeDataOrFn;
  1382. /**
  1383. * Default strategy.
  1384. */
  1385. var defaultStrat = function (parentVal, childVal) {
  1386. return childVal === undefined
  1387. ? parentVal
  1388. : childVal
  1389. };
  1390. function assertObjectType (name, value, vm) {
  1391. if (!isPlainObject(value)) {
  1392. warn(
  1393. "Invalid value for option \"" + name + "\": expected an Object, " +
  1394. "but got " + (toRawType(value)) + ".",
  1395. vm
  1396. );
  1397. }
  1398. }
  1399. /* */
  1400. /* */
  1401. /* */
  1402. var callbacks = [];
  1403. function flushCallbacks () {
  1404. var copies = callbacks.slice(0);
  1405. callbacks.length = 0;
  1406. for (var i = 0; i < copies.length; i++) {
  1407. copies[i]();
  1408. }
  1409. }
  1410. // Determine (macro) task defer implementation.
  1411. // Technically setImmediate should be the ideal choice, but it's only available
  1412. // in IE. The only polyfill that consistently queues the callback after all DOM
  1413. // events triggered in the same loop is by using MessageChannel.
  1414. /* istanbul ignore if */
  1415. if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) ; else if (typeof MessageChannel !== 'undefined' && (
  1416. isNative(MessageChannel) ||
  1417. // PhantomJS
  1418. MessageChannel.toString() === '[object MessageChannelConstructor]'
  1419. )) {
  1420. var channel = new MessageChannel();
  1421. channel.port1.onmessage = flushCallbacks;
  1422. }
  1423. // Determine microtask defer implementation.
  1424. /* istanbul ignore next, $flow-disable-line */
  1425. if (typeof Promise !== 'undefined' && isNative(Promise)) ;
  1426. /* */
  1427. /* */
  1428. // these are reserved for web because they are directly compiled away
  1429. // during template compilation
  1430. var isReservedAttr = makeMap('style,class');
  1431. // attributes that should be using props for binding
  1432. var acceptValue = makeMap('input,textarea,option,select,progress');
  1433. var mustUseProp = function (tag, type, attr) {
  1434. return (
  1435. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  1436. (attr === 'selected' && tag === 'option') ||
  1437. (attr === 'checked' && tag === 'input') ||
  1438. (attr === 'muted' && tag === 'video')
  1439. )
  1440. };
  1441. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  1442. var isBooleanAttr = makeMap(
  1443. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  1444. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  1445. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  1446. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  1447. 'required,reversed,scoped,seamless,selected,sortable,translate,' +
  1448. 'truespeed,typemustmatch,visible'
  1449. );
  1450. /* */
  1451. /* */
  1452. var isHTMLTag = makeMap(
  1453. 'html,body,base,head,link,meta,style,title,' +
  1454. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  1455. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  1456. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  1457. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  1458. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  1459. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  1460. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  1461. 'output,progress,select,textarea,' +
  1462. 'details,dialog,menu,menuitem,summary,' +
  1463. 'content,element,shadow,template,blockquote,iframe,tfoot'
  1464. );
  1465. // this map is intentionally selective, only covering SVG elements that may
  1466. // contain child elements.
  1467. var isSVG = makeMap(
  1468. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  1469. 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  1470. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  1471. true
  1472. );
  1473. var isPreTag = function (tag) { return tag === 'pre'; };
  1474. var isReservedTag = function (tag) {
  1475. return isHTMLTag(tag) || isSVG(tag)
  1476. };
  1477. function getTagNamespace (tag) {
  1478. if (isSVG(tag)) {
  1479. return 'svg'
  1480. }
  1481. // basic support for MathML
  1482. // note it doesn't support other MathML elements being component roots
  1483. if (tag === 'math') {
  1484. return 'math'
  1485. }
  1486. }
  1487. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  1488. /* */
  1489. /* */
  1490. var validDivisionCharRE = /[\w).+\-_$\]]/;
  1491. function parseFilters (exp) {
  1492. var inSingle = false;
  1493. var inDouble = false;
  1494. var inTemplateString = false;
  1495. var inRegex = false;
  1496. var curly = 0;
  1497. var square = 0;
  1498. var paren = 0;
  1499. var lastFilterIndex = 0;
  1500. var c, prev, i, expression, filters;
  1501. for (i = 0; i < exp.length; i++) {
  1502. prev = c;
  1503. c = exp.charCodeAt(i);
  1504. if (inSingle) {
  1505. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  1506. } else if (inDouble) {
  1507. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  1508. } else if (inTemplateString) {
  1509. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  1510. } else if (inRegex) {
  1511. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  1512. } else if (
  1513. c === 0x7C && // pipe
  1514. exp.charCodeAt(i + 1) !== 0x7C &&
  1515. exp.charCodeAt(i - 1) !== 0x7C &&
  1516. !curly && !square && !paren
  1517. ) {
  1518. if (expression === undefined) {
  1519. // first filter, end of expression
  1520. lastFilterIndex = i + 1;
  1521. expression = exp.slice(0, i).trim();
  1522. } else {
  1523. pushFilter();
  1524. }
  1525. } else {
  1526. switch (c) {
  1527. case 0x22: inDouble = true; break // "
  1528. case 0x27: inSingle = true; break // '
  1529. case 0x60: inTemplateString = true; break // `
  1530. case 0x28: paren++; break // (
  1531. case 0x29: paren--; break // )
  1532. case 0x5B: square++; break // [
  1533. case 0x5D: square--; break // ]
  1534. case 0x7B: curly++; break // {
  1535. case 0x7D: curly--; break // }
  1536. }
  1537. if (c === 0x2f) { // /
  1538. var j = i - 1;
  1539. var p = (void 0);
  1540. // find first non-whitespace prev char
  1541. for (; j >= 0; j--) {
  1542. p = exp.charAt(j);
  1543. if (p !== ' ') { break }
  1544. }
  1545. if (!p || !validDivisionCharRE.test(p)) {
  1546. inRegex = true;
  1547. }
  1548. }
  1549. }
  1550. }
  1551. if (expression === undefined) {
  1552. expression = exp.slice(0, i).trim();
  1553. } else if (lastFilterIndex !== 0) {
  1554. pushFilter();
  1555. }
  1556. function pushFilter () {
  1557. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  1558. lastFilterIndex = i + 1;
  1559. }
  1560. if (filters) {
  1561. for (i = 0; i < filters.length; i++) {
  1562. expression = wrapFilter(expression, filters[i]);
  1563. }
  1564. }
  1565. return expression
  1566. }
  1567. function wrapFilter (exp, filter) {
  1568. var i = filter.indexOf('(');
  1569. if (i < 0) {
  1570. // _f: resolveFilter
  1571. return ("_f(\"" + filter + "\")(" + exp + ")")
  1572. } else {
  1573. var name = filter.slice(0, i);
  1574. var args = filter.slice(i + 1);
  1575. return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
  1576. }
  1577. }
  1578. /* */
  1579. var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
  1580. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  1581. var buildRegex = cached(function (delimiters) {
  1582. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  1583. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  1584. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  1585. });
  1586. function parseText (
  1587. text,
  1588. delimiters
  1589. ) {
  1590. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  1591. if (!tagRE.test(text)) {
  1592. return
  1593. }
  1594. var tokens = [];
  1595. var rawTokens = [];
  1596. var lastIndex = tagRE.lastIndex = 0;
  1597. var match, index, tokenValue;
  1598. while ((match = tagRE.exec(text))) {
  1599. index = match.index;
  1600. // push text token
  1601. if (index > lastIndex) {
  1602. rawTokens.push(tokenValue = text.slice(lastIndex, index));
  1603. tokens.push(JSON.stringify(tokenValue));
  1604. }
  1605. // tag token
  1606. var exp = parseFilters(match[1].trim());
  1607. tokens.push(("_s(" + exp + ")"));
  1608. rawTokens.push({ '@binding': exp });
  1609. lastIndex = index + match[0].length;
  1610. }
  1611. if (lastIndex < text.length) {
  1612. rawTokens.push(tokenValue = text.slice(lastIndex));
  1613. tokens.push(JSON.stringify(tokenValue));
  1614. }
  1615. return {
  1616. expression: tokens.join('+'),
  1617. tokens: rawTokens
  1618. }
  1619. }
  1620. /* */
  1621. function baseWarn (msg) {
  1622. console.error(("[Vue compiler]: " + msg));
  1623. }
  1624. function pluckModuleFunction (
  1625. modules,
  1626. key
  1627. ) {
  1628. return modules
  1629. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  1630. : []
  1631. }
  1632. function addProp (el, name, value) {
  1633. (el.props || (el.props = [])).push({ name: name, value: value });
  1634. el.plain = false;
  1635. }
  1636. function addAttr (el, name, value) {
  1637. (el.attrs || (el.attrs = [])).push({ name: name, value: value });
  1638. el.plain = false;
  1639. }
  1640. // add a raw attr (use this in preTransforms)
  1641. function addRawAttr (el, name, value) {
  1642. el.attrsMap[name] = value;
  1643. el.attrsList.push({ name: name, value: value });
  1644. }
  1645. function addDirective (
  1646. el,
  1647. name,
  1648. rawName,
  1649. value,
  1650. arg,
  1651. modifiers
  1652. ) {
  1653. (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
  1654. el.plain = false;
  1655. }
  1656. function addHandler (
  1657. el,
  1658. name,
  1659. value,
  1660. modifiers,
  1661. important,
  1662. warn
  1663. ) {
  1664. modifiers = modifiers || emptyObject;
  1665. // warn prevent and passive modifier
  1666. /* istanbul ignore if */
  1667. if (
  1668. warn &&
  1669. modifiers.prevent && modifiers.passive
  1670. ) {
  1671. warn(
  1672. 'passive and prevent can\'t be used together. ' +
  1673. 'Passive handler can\'t prevent default event.'
  1674. );
  1675. }
  1676. // normalize click.right and click.middle since they don't actually fire
  1677. // this is technically browser-specific, but at least for now browsers are
  1678. // the only target envs that have right/middle clicks.
  1679. if (name === 'click') {
  1680. if (modifiers.right) {
  1681. name = 'contextmenu';
  1682. delete modifiers.right;
  1683. } else if (modifiers.middle) {
  1684. name = 'mouseup';
  1685. }
  1686. }
  1687. // check capture modifier
  1688. if (modifiers.capture) {
  1689. delete modifiers.capture;
  1690. name = '!' + name; // mark the event as captured
  1691. }
  1692. if (modifiers.once) {
  1693. delete modifiers.once;
  1694. name = '~' + name; // mark the event as once
  1695. }
  1696. /* istanbul ignore if */
  1697. if (modifiers.passive) {
  1698. delete modifiers.passive;
  1699. name = '&' + name; // mark the event as passive
  1700. }
  1701. var events;
  1702. if (modifiers.native) {
  1703. delete modifiers.native;
  1704. events = el.nativeEvents || (el.nativeEvents = {});
  1705. } else {
  1706. events = el.events || (el.events = {});
  1707. }
  1708. var newHandler = {
  1709. value: value.trim()
  1710. };
  1711. if (modifiers !== emptyObject) {
  1712. newHandler.modifiers = modifiers;
  1713. }
  1714. var handlers = events[name];
  1715. /* istanbul ignore if */
  1716. if (Array.isArray(handlers)) {
  1717. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  1718. } else if (handlers) {
  1719. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  1720. } else {
  1721. events[name] = newHandler;
  1722. }
  1723. el.plain = false;
  1724. }
  1725. function getBindingAttr (
  1726. el,
  1727. name,
  1728. getStatic
  1729. ) {
  1730. var dynamicValue =
  1731. getAndRemoveAttr(el, ':' + name) ||
  1732. getAndRemoveAttr(el, 'v-bind:' + name);
  1733. if (dynamicValue != null) {
  1734. return parseFilters(dynamicValue)
  1735. } else if (getStatic !== false) {
  1736. var staticValue = getAndRemoveAttr(el, name);
  1737. if (staticValue != null) {
  1738. return JSON.stringify(staticValue)
  1739. }
  1740. }
  1741. }
  1742. // note: this only removes the attr from the Array (attrsList) so that it
  1743. // doesn't get processed by processAttrs.
  1744. // By default it does NOT remove it from the map (attrsMap) because the map is
  1745. // needed during codegen.
  1746. function getAndRemoveAttr (
  1747. el,
  1748. name,
  1749. removeFromMap
  1750. ) {
  1751. var val;
  1752. if ((val = el.attrsMap[name]) != null) {
  1753. var list = el.attrsList;
  1754. for (var i = 0, l = list.length; i < l; i++) {
  1755. if (list[i].name === name) {
  1756. list.splice(i, 1);
  1757. break
  1758. }
  1759. }
  1760. }
  1761. if (removeFromMap) {
  1762. delete el.attrsMap[name];
  1763. }
  1764. return val
  1765. }
  1766. /* */
  1767. function transformNode (el, options) {
  1768. var warn = options.warn || baseWarn;
  1769. var staticClass = getAndRemoveAttr(el, 'class');
  1770. if (staticClass) {
  1771. var res = parseText(staticClass, options.delimiters);
  1772. if (res) {
  1773. warn(
  1774. "class=\"" + staticClass + "\": " +
  1775. 'Interpolation inside attributes has been removed. ' +
  1776. 'Use v-bind or the colon shorthand instead. For example, ' +
  1777. 'instead of <div class="{{ val }}">, use <div :class="val">.'
  1778. );
  1779. }
  1780. }
  1781. if (staticClass) {
  1782. el.staticClass = JSON.stringify(staticClass);
  1783. }
  1784. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  1785. if (classBinding) {
  1786. el.classBinding = classBinding;
  1787. }
  1788. }
  1789. function genData (el) {
  1790. var data = '';
  1791. if (el.staticClass) {
  1792. data += "staticClass:" + (el.staticClass) + ",";
  1793. }
  1794. if (el.classBinding) {
  1795. data += "class:" + (el.classBinding) + ",";
  1796. }
  1797. return data
  1798. }
  1799. var klass = {
  1800. staticKeys: ['staticClass'],
  1801. transformNode: transformNode,
  1802. genData: genData
  1803. };
  1804. /* */
  1805. var parseStyleText = cached(function (cssText) {
  1806. var res = {};
  1807. var listDelimiter = /;(?![^(]*\))/g;
  1808. var propertyDelimiter = /:(.+)/;
  1809. cssText.split(listDelimiter).forEach(function (item) {
  1810. if (item) {
  1811. var tmp = item.split(propertyDelimiter);
  1812. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  1813. }
  1814. });
  1815. return res
  1816. });
  1817. /* */
  1818. function transformNode$1 (el, options) {
  1819. var warn = options.warn || baseWarn;
  1820. var staticStyle = getAndRemoveAttr(el, 'style');
  1821. if (staticStyle) {
  1822. /* istanbul ignore if */
  1823. {
  1824. var res = parseText(staticStyle, options.delimiters);
  1825. if (res) {
  1826. warn(
  1827. "style=\"" + staticStyle + "\": " +
  1828. 'Interpolation inside attributes has been removed. ' +
  1829. 'Use v-bind or the colon shorthand instead. For example, ' +
  1830. 'instead of <div style="{{ val }}">, use <div :style="val">.'
  1831. );
  1832. }
  1833. }
  1834. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  1835. }
  1836. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  1837. if (styleBinding) {
  1838. el.styleBinding = styleBinding;
  1839. }
  1840. }
  1841. function genData$1 (el) {
  1842. var data = '';
  1843. if (el.staticStyle) {
  1844. data += "staticStyle:" + (el.staticStyle) + ",";
  1845. }
  1846. if (el.styleBinding) {
  1847. data += "style:(" + (el.styleBinding) + "),";
  1848. }
  1849. return data
  1850. }
  1851. var style = {
  1852. staticKeys: ['staticStyle'],
  1853. transformNode: transformNode$1,
  1854. genData: genData$1
  1855. };
  1856. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  1857. function createCommonjsModule(fn, module) {
  1858. return module = { exports: {} }, fn(module, module.exports), module.exports;
  1859. }
  1860. var he = createCommonjsModule(function (module, exports) {
  1861. (function(root) {
  1862. // Detect free variables `exports`.
  1863. var freeExports = exports;
  1864. // Detect free variable `module`.
  1865. var freeModule = module &&
  1866. module.exports == freeExports && module;
  1867. // Detect free variable `global`, from Node.js or Browserified code,
  1868. // and use it as `root`.
  1869. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
  1870. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  1871. root = freeGlobal;
  1872. }
  1873. /*--------------------------------------------------------------------------*/
  1874. // All astral symbols.
  1875. var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  1876. // All ASCII symbols (not just printable ASCII) except those listed in the
  1877. // first column of the overrides table.
  1878. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
  1879. var regexAsciiWhitelist = /[\x01-\x7F]/g;
  1880. // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
  1881. // code points listed in the first column of the overrides table on
  1882. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
  1883. var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
  1884. var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
  1885. var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'};
  1886. var regexEscape = /["&'<>`]/g;
  1887. var escapeMap = {
  1888. '"': '&quot;',
  1889. '&': '&amp;',
  1890. '\'': '&#x27;',
  1891. '<': '&lt;',
  1892. // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
  1893. // following is not strictly necessary unless it’s part of a tag or an
  1894. // unquoted attribute value. We’re only escaping it to support those
  1895. // situations, and for XML support.
  1896. '>': '&gt;',
  1897. // In Internet Explorer ≤ 8, the backtick character can be used
  1898. // to break out of (un)quoted attribute values or HTML comments.
  1899. // See http://html5sec.org/#102, http://html5sec.org/#108, and
  1900. // http://html5sec.org/#133.
  1901. '`': '&#x60;'
  1902. };
  1903. var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
  1904. var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
  1905. var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
  1906. var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'};
  1907. var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'};
  1908. var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'};
  1909. var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];
  1910. /*--------------------------------------------------------------------------*/
  1911. var stringFromCharCode = String.fromCharCode;
  1912. var object = {};
  1913. var hasOwnProperty = object.hasOwnProperty;
  1914. var has = function(object, propertyName) {
  1915. return hasOwnProperty.call(object, propertyName);
  1916. };
  1917. var contains = function(array, value) {
  1918. var index = -1;
  1919. var length = array.length;
  1920. while (++index < length) {
  1921. if (array[index] == value) {
  1922. return true;
  1923. }
  1924. }
  1925. return false;
  1926. };
  1927. var merge = function(options, defaults) {
  1928. if (!options) {
  1929. return defaults;
  1930. }
  1931. var result = {};
  1932. var key;
  1933. for (key in defaults) {
  1934. // A `hasOwnProperty` check is not needed here, since only recognized
  1935. // option names are used anyway. Any others are ignored.
  1936. result[key] = has(options, key) ? options[key] : defaults[key];
  1937. }
  1938. return result;
  1939. };
  1940. // Modified version of `ucs2encode`; see https://mths.be/punycode.
  1941. var codePointToSymbol = function(codePoint, strict) {
  1942. var output = '';
  1943. if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
  1944. // See issue #4:
  1945. // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
  1946. // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
  1947. // REPLACEMENT CHARACTER.”
  1948. if (strict) {
  1949. parseError('character reference outside the permissible Unicode range');
  1950. }
  1951. return '\uFFFD';
  1952. }
  1953. if (has(decodeMapNumeric, codePoint)) {
  1954. if (strict) {
  1955. parseError('disallowed character reference');
  1956. }
  1957. return decodeMapNumeric[codePoint];
  1958. }
  1959. if (strict && contains(invalidReferenceCodePoints, codePoint)) {
  1960. parseError('disallowed character reference');
  1961. }
  1962. if (codePoint > 0xFFFF) {
  1963. codePoint -= 0x10000;
  1964. output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
  1965. codePoint = 0xDC00 | codePoint & 0x3FF;
  1966. }
  1967. output += stringFromCharCode(codePoint);
  1968. return output;
  1969. };
  1970. var hexEscape = function(codePoint) {
  1971. return '&#x' + codePoint.toString(16).toUpperCase() + ';';
  1972. };
  1973. var decEscape = function(codePoint) {
  1974. return '&#' + codePoint + ';';
  1975. };
  1976. var parseError = function(message) {
  1977. throw Error('Parse error: ' + message);
  1978. };
  1979. /*--------------------------------------------------------------------------*/
  1980. var encode = function(string, options) {
  1981. options = merge(options, encode.options);
  1982. var strict = options.strict;
  1983. if (strict && regexInvalidRawCodePoint.test(string)) {
  1984. parseError('forbidden code point');
  1985. }
  1986. var encodeEverything = options.encodeEverything;
  1987. var useNamedReferences = options.useNamedReferences;
  1988. var allowUnsafeSymbols = options.allowUnsafeSymbols;
  1989. var escapeCodePoint = options.decimal ? decEscape : hexEscape;
  1990. var escapeBmpSymbol = function(symbol) {
  1991. return escapeCodePoint(symbol.charCodeAt(0));
  1992. };
  1993. if (encodeEverything) {
  1994. // Encode ASCII symbols.
  1995. string = string.replace(regexAsciiWhitelist, function(symbol) {
  1996. // Use named references if requested & possible.
  1997. if (useNamedReferences && has(encodeMap, symbol)) {
  1998. return '&' + encodeMap[symbol] + ';';
  1999. }
  2000. return escapeBmpSymbol(symbol);
  2001. });
  2002. // Shorten a few escapes that represent two symbols, of which at least one
  2003. // is within the ASCII range.
  2004. if (useNamedReferences) {
  2005. string = string
  2006. .replace(/&gt;\u20D2/g, '&nvgt;')
  2007. .replace(/&lt;\u20D2/g, '&nvlt;')
  2008. .replace(/&#x66;&#x6A;/g, '&fjlig;');
  2009. }
  2010. // Encode non-ASCII symbols.
  2011. if (useNamedReferences) {
  2012. // Encode non-ASCII symbols that can be replaced with a named reference.
  2013. string = string.replace(regexEncodeNonAscii, function(string) {
  2014. // Note: there is no need to check `has(encodeMap, string)` here.
  2015. return '&' + encodeMap[string] + ';';
  2016. });
  2017. }
  2018. // Note: any remaining non-ASCII symbols are handled outside of the `if`.
  2019. } else if (useNamedReferences) {
  2020. // Apply named character references.
  2021. // Encode `<>"'&` using named character references.
  2022. if (!allowUnsafeSymbols) {
  2023. string = string.replace(regexEscape, function(string) {
  2024. return '&' + encodeMap[string] + ';'; // no need to check `has()` here
  2025. });
  2026. }
  2027. // Shorten escapes that represent two symbols, of which at least one is
  2028. // `<>"'&`.
  2029. string = string
  2030. .replace(/&gt;\u20D2/g, '&nvgt;')
  2031. .replace(/&lt;\u20D2/g, '&nvlt;');
  2032. // Encode non-ASCII symbols that can be replaced with a named reference.
  2033. string = string.replace(regexEncodeNonAscii, function(string) {
  2034. // Note: there is no need to check `has(encodeMap, string)` here.
  2035. return '&' + encodeMap[string] + ';';
  2036. });
  2037. } else if (!allowUnsafeSymbols) {
  2038. // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
  2039. // using named character references.
  2040. string = string.replace(regexEscape, escapeBmpSymbol);
  2041. }
  2042. return string
  2043. // Encode astral symbols.
  2044. .replace(regexAstralSymbols, function($0) {
  2045. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  2046. var high = $0.charCodeAt(0);
  2047. var low = $0.charCodeAt(1);
  2048. var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
  2049. return escapeCodePoint(codePoint);
  2050. })
  2051. // Encode any remaining BMP symbols that are not printable ASCII symbols
  2052. // using a hexadecimal escape.
  2053. .replace(regexBmpWhitelist, escapeBmpSymbol);
  2054. };
  2055. // Expose default options (so they can be overridden globally).
  2056. encode.options = {
  2057. 'allowUnsafeSymbols': false,
  2058. 'encodeEverything': false,
  2059. 'strict': false,
  2060. 'useNamedReferences': false,
  2061. 'decimal' : false
  2062. };
  2063. var decode = function(html, options) {
  2064. options = merge(options, decode.options);
  2065. var strict = options.strict;
  2066. if (strict && regexInvalidEntity.test(html)) {
  2067. parseError('malformed character reference');
  2068. }
  2069. return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {
  2070. var codePoint;
  2071. var semicolon;
  2072. var decDigits;
  2073. var hexDigits;
  2074. var reference;
  2075. var next;
  2076. if ($1) {
  2077. reference = $1;
  2078. // Note: there is no need to check `has(decodeMap, reference)`.
  2079. return decodeMap[reference];
  2080. }
  2081. if ($2) {
  2082. // Decode named character references without trailing `;`, e.g. `&amp`.
  2083. // This is only a parse error if it gets converted to `&`, or if it is
  2084. // followed by `=` in an attribute context.
  2085. reference = $2;
  2086. next = $3;
  2087. if (next && options.isAttributeValue) {
  2088. if (strict && next == '=') {
  2089. parseError('`&` did not start a character reference');
  2090. }
  2091. return $0;
  2092. } else {
  2093. if (strict) {
  2094. parseError(
  2095. 'named character reference was not terminated by a semicolon'
  2096. );
  2097. }
  2098. // Note: there is no need to check `has(decodeMapLegacy, reference)`.
  2099. return decodeMapLegacy[reference] + (next || '');
  2100. }
  2101. }
  2102. if ($4) {
  2103. // Decode decimal escapes, e.g. `&#119558;`.
  2104. decDigits = $4;
  2105. semicolon = $5;
  2106. if (strict && !semicolon) {
  2107. parseError('character reference was not terminated by a semicolon');
  2108. }
  2109. codePoint = parseInt(decDigits, 10);
  2110. return codePointToSymbol(codePoint, strict);
  2111. }
  2112. if ($6) {
  2113. // Decode hexadecimal escapes, e.g. `&#x1D306;`.
  2114. hexDigits = $6;
  2115. semicolon = $7;
  2116. if (strict && !semicolon) {
  2117. parseError('character reference was not terminated by a semicolon');
  2118. }
  2119. codePoint = parseInt(hexDigits, 16);
  2120. return codePointToSymbol(codePoint, strict);
  2121. }
  2122. // If we’re still here, `if ($7)` is implied; it’s an ambiguous
  2123. // ampersand for sure. https://mths.be/notes/ambiguous-ampersands
  2124. if (strict) {
  2125. parseError(
  2126. 'named character reference was not terminated by a semicolon'
  2127. );
  2128. }
  2129. return $0;
  2130. });
  2131. };
  2132. // Expose default options (so they can be overridden globally).
  2133. decode.options = {
  2134. 'isAttributeValue': false,
  2135. 'strict': false
  2136. };
  2137. var escape = function(string) {
  2138. return string.replace(regexEscape, function($0) {
  2139. // Note: there is no need to check `has(escapeMap, $0)` here.
  2140. return escapeMap[$0];
  2141. });
  2142. };
  2143. /*--------------------------------------------------------------------------*/
  2144. var he = {
  2145. 'version': '1.2.0',
  2146. 'encode': encode,
  2147. 'decode': decode,
  2148. 'escape': escape,
  2149. 'unescape': decode
  2150. };
  2151. // Some AMD build optimizers, like r.js, check for specific condition patterns
  2152. // like the following:
  2153. if (freeExports && !freeExports.nodeType) {
  2154. if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
  2155. freeModule.exports = he;
  2156. } else { // in Narwhal or RingoJS v0.7.0-
  2157. for (var key in he) {
  2158. has(he, key) && (freeExports[key] = he[key]);
  2159. }
  2160. }
  2161. } else { // in Rhino or a web browser
  2162. root.he = he;
  2163. }
  2164. }(commonjsGlobal));
  2165. });
  2166. /* */
  2167. /**
  2168. * Cross-platform code generation for component v-model
  2169. */
  2170. function genComponentModel (
  2171. el,
  2172. value,
  2173. modifiers
  2174. ) {
  2175. var ref = modifiers || {};
  2176. var number = ref.number;
  2177. var trim = ref.trim;
  2178. var baseValueExpression = '$$v';
  2179. var valueExpression = baseValueExpression;
  2180. if (trim) {
  2181. valueExpression =
  2182. "(typeof " + baseValueExpression + " === 'string'" +
  2183. "? " + baseValueExpression + ".trim()" +
  2184. ": " + baseValueExpression + ")";
  2185. }
  2186. if (number) {
  2187. valueExpression = "_n(" + valueExpression + ")";
  2188. }
  2189. var assignment = genAssignmentCode(value, valueExpression);
  2190. el.model = {
  2191. value: ("(" + value + ")"),
  2192. expression: JSON.stringify(value),
  2193. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  2194. };
  2195. }
  2196. /**
  2197. * Cross-platform codegen helper for generating v-model value assignment code.
  2198. */
  2199. function genAssignmentCode (
  2200. value,
  2201. assignment
  2202. ) {
  2203. var res = parseModel(value);
  2204. if (res.key === null) {
  2205. return (value + "=" + assignment)
  2206. } else {
  2207. return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
  2208. }
  2209. }
  2210. /**
  2211. * Parse a v-model expression into a base path and a final key segment.
  2212. * Handles both dot-path and possible square brackets.
  2213. *
  2214. * Possible cases:
  2215. *
  2216. * - test
  2217. * - test[key]
  2218. * - test[test1[key]]
  2219. * - test["a"][key]
  2220. * - xxx.test[a[a].test1[key]]
  2221. * - test.xxx.a["asa"][test1[key]]
  2222. *
  2223. */
  2224. var len, str, chr, index, expressionPos, expressionEndPos;
  2225. function parseModel (val) {
  2226. // Fix https://github.com/vuejs/vue/pull/7730
  2227. // allow v-model="obj.val " (trailing whitespace)
  2228. val = val.trim();
  2229. len = val.length;
  2230. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  2231. index = val.lastIndexOf('.');
  2232. if (index > -1) {
  2233. return {
  2234. exp: val.slice(0, index),
  2235. key: '"' + val.slice(index + 1) + '"'
  2236. }
  2237. } else {
  2238. return {
  2239. exp: val,
  2240. key: null
  2241. }
  2242. }
  2243. }
  2244. str = val;
  2245. index = expressionPos = expressionEndPos = 0;
  2246. while (!eof()) {
  2247. chr = next();
  2248. /* istanbul ignore if */
  2249. if (isStringStart(chr)) {
  2250. parseString(chr);
  2251. } else if (chr === 0x5B) {
  2252. parseBracket(chr);
  2253. }
  2254. }
  2255. return {
  2256. exp: val.slice(0, expressionPos),
  2257. key: val.slice(expressionPos + 1, expressionEndPos)
  2258. }
  2259. }
  2260. function next () {
  2261. return str.charCodeAt(++index)
  2262. }
  2263. function eof () {
  2264. return index >= len
  2265. }
  2266. function isStringStart (chr) {
  2267. return chr === 0x22 || chr === 0x27
  2268. }
  2269. function parseBracket (chr) {
  2270. var inBracket = 1;
  2271. expressionPos = index;
  2272. while (!eof()) {
  2273. chr = next();
  2274. if (isStringStart(chr)) {
  2275. parseString(chr);
  2276. continue
  2277. }
  2278. if (chr === 0x5B) { inBracket++; }
  2279. if (chr === 0x5D) { inBracket--; }
  2280. if (inBracket === 0) {
  2281. expressionEndPos = index;
  2282. break
  2283. }
  2284. }
  2285. }
  2286. function parseString (chr) {
  2287. var stringQuote = chr;
  2288. while (!eof()) {
  2289. chr = next();
  2290. if (chr === stringQuote) {
  2291. break
  2292. }
  2293. }
  2294. }
  2295. /* */
  2296. var onRE = /^@|^v-on:/;
  2297. var dirRE = /^v-|^@|^:/;
  2298. var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
  2299. var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  2300. var stripParensRE = /^\(|\)$/g;
  2301. var argRE = /:(.*)$/;
  2302. var bindRE = /^:|^v-bind:/;
  2303. var modifierRE = /\.[^.]+/g;
  2304. var decodeHTMLCached = cached(he.decode);
  2305. // configurable state
  2306. var warn$1;
  2307. var delimiters;
  2308. var transforms;
  2309. var preTransforms;
  2310. var postTransforms;
  2311. var platformIsPreTag;
  2312. var platformMustUseProp;
  2313. var platformGetTagNamespace;
  2314. function createASTElement (
  2315. tag,
  2316. attrs,
  2317. parent
  2318. ) {
  2319. return {
  2320. type: 1,
  2321. tag: tag,
  2322. attrsList: attrs,
  2323. attrsMap: makeAttrsMap(attrs),
  2324. parent: parent,
  2325. children: []
  2326. }
  2327. }
  2328. /**
  2329. * Convert HTML string to AST.
  2330. */
  2331. function parse (
  2332. template,
  2333. options
  2334. ) {
  2335. warn$1 = options.warn || baseWarn;
  2336. platformIsPreTag = options.isPreTag || no;
  2337. platformMustUseProp = options.mustUseProp || no;
  2338. platformGetTagNamespace = options.getTagNamespace || no;
  2339. transforms = pluckModuleFunction(options.modules, 'transformNode');
  2340. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  2341. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  2342. delimiters = options.delimiters;
  2343. var stack = [];
  2344. var preserveWhitespace = options.preserveWhitespace !== false;
  2345. var root;
  2346. var currentParent;
  2347. var inVPre = false;
  2348. var inPre = false;
  2349. var warned = false;
  2350. function warnOnce (msg) {
  2351. if (!warned) {
  2352. warned = true;
  2353. warn$1(msg);
  2354. }
  2355. }
  2356. function closeElement (element) {
  2357. // check pre state
  2358. if (element.pre) {
  2359. inVPre = false;
  2360. }
  2361. if (platformIsPreTag(element.tag)) {
  2362. inPre = false;
  2363. }
  2364. // apply post-transforms
  2365. for (var i = 0; i < postTransforms.length; i++) {
  2366. postTransforms[i](element, options);
  2367. }
  2368. }
  2369. parseHTML(template, {
  2370. warn: warn$1,
  2371. expectHTML: options.expectHTML,
  2372. isUnaryTag: options.isUnaryTag,
  2373. canBeLeftOpenTag: options.canBeLeftOpenTag,
  2374. shouldDecodeNewlines: options.shouldDecodeNewlines,
  2375. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  2376. shouldKeepComment: options.comments,
  2377. start: function start (tag, attrs, unary) {
  2378. // check namespace.
  2379. // inherit parent ns if there is one
  2380. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  2381. // handle IE svg bug
  2382. /* istanbul ignore if */
  2383. if (isIE && ns === 'svg') {
  2384. attrs = guardIESVGBug(attrs);
  2385. }
  2386. var element = createASTElement(tag, attrs, currentParent);
  2387. if (ns) {
  2388. element.ns = ns;
  2389. }
  2390. if (isForbiddenTag(element) && !isServerRendering()) {
  2391. element.forbidden = true;
  2392. warn$1(
  2393. 'Templates should only be responsible for mapping the state to the ' +
  2394. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  2395. "<" + tag + ">" + ', as they will not be parsed.'
  2396. );
  2397. }
  2398. // apply pre-transforms
  2399. for (var i = 0; i < preTransforms.length; i++) {
  2400. element = preTransforms[i](element, options) || element;
  2401. }
  2402. if (!inVPre) {
  2403. processPre(element);
  2404. if (element.pre) {
  2405. inVPre = true;
  2406. }
  2407. }
  2408. if (platformIsPreTag(element.tag)) {
  2409. inPre = true;
  2410. }
  2411. if (inVPre) {
  2412. processRawAttrs(element);
  2413. } else if (!element.processed) {
  2414. // structural directives
  2415. processFor(element);
  2416. processIf(element);
  2417. processOnce(element);
  2418. // element-scope stuff
  2419. processElement(element, options);
  2420. }
  2421. function checkRootConstraints (el) {
  2422. {
  2423. if (el.tag === 'slot' || el.tag === 'template') {
  2424. warnOnce(
  2425. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  2426. 'contain multiple nodes.'
  2427. );
  2428. }
  2429. if (el.attrsMap.hasOwnProperty('v-for')) {
  2430. warnOnce(
  2431. 'Cannot use v-for on stateful component root element because ' +
  2432. 'it renders multiple elements.'
  2433. );
  2434. }
  2435. }
  2436. }
  2437. // tree management
  2438. if (!root) {
  2439. root = element;
  2440. checkRootConstraints(root);
  2441. } else if (!stack.length) {
  2442. // allow root elements with v-if, v-else-if and v-else
  2443. if (root.if && (element.elseif || element.else)) {
  2444. checkRootConstraints(element);
  2445. addIfCondition(root, {
  2446. exp: element.elseif,
  2447. block: element
  2448. });
  2449. } else {
  2450. warnOnce(
  2451. "Component template should contain exactly one root element. " +
  2452. "If you are using v-if on multiple elements, " +
  2453. "use v-else-if to chain them instead."
  2454. );
  2455. }
  2456. }
  2457. if (currentParent && !element.forbidden) {
  2458. if (element.elseif || element.else) {
  2459. processIfConditions(element, currentParent);
  2460. } else if (element.slotScope) { // scoped slot
  2461. currentParent.plain = false;
  2462. var name = element.slotTarget || '"default"'
  2463. ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  2464. } else {
  2465. currentParent.children.push(element);
  2466. element.parent = currentParent;
  2467. }
  2468. }
  2469. if (!unary) {
  2470. currentParent = element;
  2471. stack.push(element);
  2472. } else {
  2473. closeElement(element);
  2474. }
  2475. },
  2476. end: function end () {
  2477. // remove trailing whitespace
  2478. var element = stack[stack.length - 1];
  2479. var lastNode = element.children[element.children.length - 1];
  2480. if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
  2481. element.children.pop();
  2482. }
  2483. // pop stack
  2484. stack.length -= 1;
  2485. currentParent = stack[stack.length - 1];
  2486. closeElement(element);
  2487. },
  2488. chars: function chars (text) {
  2489. if (!currentParent) {
  2490. {
  2491. if (text === template) {
  2492. warnOnce(
  2493. 'Component template requires a root element, rather than just text.'
  2494. );
  2495. } else if ((text = text.trim())) {
  2496. warnOnce(
  2497. ("text \"" + text + "\" outside root element will be ignored.")
  2498. );
  2499. }
  2500. }
  2501. return
  2502. }
  2503. // IE textarea placeholder bug
  2504. /* istanbul ignore if */
  2505. if (isIE &&
  2506. currentParent.tag === 'textarea' &&
  2507. currentParent.attrsMap.placeholder === text
  2508. ) {
  2509. return
  2510. }
  2511. var children = currentParent.children;
  2512. text = inPre || text.trim()
  2513. ? isTextTag(currentParent) ? text : decodeHTMLCached(text)
  2514. // only preserve whitespace if its not right after a starting tag
  2515. : preserveWhitespace && children.length ? ' ' : '';
  2516. if (text) {
  2517. var res;
  2518. if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
  2519. children.push({
  2520. type: 2,
  2521. expression: res.expression,
  2522. tokens: res.tokens,
  2523. text: text
  2524. });
  2525. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  2526. children.push({
  2527. type: 3,
  2528. text: text
  2529. });
  2530. }
  2531. }
  2532. },
  2533. comment: function comment (text) {
  2534. currentParent.children.push({
  2535. type: 3,
  2536. text: text,
  2537. isComment: true
  2538. });
  2539. }
  2540. });
  2541. return root
  2542. }
  2543. function processPre (el) {
  2544. if (getAndRemoveAttr(el, 'v-pre') != null) {
  2545. el.pre = true;
  2546. }
  2547. }
  2548. function processRawAttrs (el) {
  2549. var l = el.attrsList.length;
  2550. if (l) {
  2551. var attrs = el.attrs = new Array(l);
  2552. for (var i = 0; i < l; i++) {
  2553. attrs[i] = {
  2554. name: el.attrsList[i].name,
  2555. value: JSON.stringify(el.attrsList[i].value)
  2556. };
  2557. }
  2558. } else if (!el.pre) {
  2559. // non root node in pre blocks with no attributes
  2560. el.plain = true;
  2561. }
  2562. }
  2563. function processElement (element, options) {
  2564. processKey(element);
  2565. // determine whether this is a plain element after
  2566. // removing structural attributes
  2567. element.plain = !element.key && !element.attrsList.length;
  2568. processRef(element);
  2569. processSlot(element);
  2570. processComponent(element);
  2571. for (var i = 0; i < transforms.length; i++) {
  2572. element = transforms[i](element, options) || element;
  2573. }
  2574. processAttrs(element);
  2575. }
  2576. function processKey (el) {
  2577. var exp = getBindingAttr(el, 'key');
  2578. if (exp) {
  2579. {
  2580. if (el.tag === 'template') {
  2581. warn$1("<template> cannot be keyed. Place the key on real elements instead.");
  2582. }
  2583. if (el.for) {
  2584. var iterator = el.iterator2 || el.iterator1;
  2585. var parent = el.parent;
  2586. if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
  2587. warn$1(
  2588. "Do not use v-for index as key on <transition-group> children, " +
  2589. "this is the same as not using keys."
  2590. );
  2591. }
  2592. }
  2593. }
  2594. el.key = exp;
  2595. }
  2596. }
  2597. function processRef (el) {
  2598. var ref = getBindingAttr(el, 'ref');
  2599. if (ref) {
  2600. el.ref = ref;
  2601. el.refInFor = checkInFor(el);
  2602. }
  2603. }
  2604. function processFor (el) {
  2605. var exp;
  2606. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  2607. var res = parseFor(exp);
  2608. if (res) {
  2609. extend(el, res);
  2610. } else {
  2611. warn$1(
  2612. ("Invalid v-for expression: " + exp)
  2613. );
  2614. }
  2615. }
  2616. }
  2617. function parseFor (exp) {
  2618. var inMatch = exp.match(forAliasRE);
  2619. if (!inMatch) { return }
  2620. var res = {};
  2621. res.for = inMatch[2].trim();
  2622. var alias = inMatch[1].trim().replace(stripParensRE, '');
  2623. var iteratorMatch = alias.match(forIteratorRE);
  2624. if (iteratorMatch) {
  2625. res.alias = alias.replace(forIteratorRE, '').trim();
  2626. res.iterator1 = iteratorMatch[1].trim();
  2627. if (iteratorMatch[2]) {
  2628. res.iterator2 = iteratorMatch[2].trim();
  2629. }
  2630. } else {
  2631. res.alias = alias;
  2632. }
  2633. return res
  2634. }
  2635. function processIf (el) {
  2636. var exp = getAndRemoveAttr(el, 'v-if');
  2637. if (exp) {
  2638. el.if = exp;
  2639. addIfCondition(el, {
  2640. exp: exp,
  2641. block: el
  2642. });
  2643. } else {
  2644. if (getAndRemoveAttr(el, 'v-else') != null) {
  2645. el.else = true;
  2646. }
  2647. var elseif = getAndRemoveAttr(el, 'v-else-if');
  2648. if (elseif) {
  2649. el.elseif = elseif;
  2650. }
  2651. }
  2652. }
  2653. function processIfConditions (el, parent) {
  2654. var prev = findPrevElement(parent.children);
  2655. if (prev && prev.if) {
  2656. addIfCondition(prev, {
  2657. exp: el.elseif,
  2658. block: el
  2659. });
  2660. } else {
  2661. warn$1(
  2662. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  2663. "used on element <" + (el.tag) + "> without corresponding v-if."
  2664. );
  2665. }
  2666. }
  2667. function findPrevElement (children) {
  2668. var i = children.length;
  2669. while (i--) {
  2670. if (children[i].type === 1) {
  2671. return children[i]
  2672. } else {
  2673. if (children[i].text !== ' ') {
  2674. warn$1(
  2675. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  2676. "will be ignored."
  2677. );
  2678. }
  2679. children.pop();
  2680. }
  2681. }
  2682. }
  2683. function addIfCondition (el, condition) {
  2684. if (!el.ifConditions) {
  2685. el.ifConditions = [];
  2686. }
  2687. el.ifConditions.push(condition);
  2688. }
  2689. function processOnce (el) {
  2690. var once$$1 = getAndRemoveAttr(el, 'v-once');
  2691. if (once$$1 != null) {
  2692. el.once = true;
  2693. }
  2694. }
  2695. function processSlot (el) {
  2696. if (el.tag === 'slot') {
  2697. el.slotName = getBindingAttr(el, 'name');
  2698. if (el.key) {
  2699. warn$1(
  2700. "`key` does not work on <slot> because slots are abstract outlets " +
  2701. "and can possibly expand into multiple elements. " +
  2702. "Use the key on a wrapping element instead."
  2703. );
  2704. }
  2705. } else {
  2706. var slotScope;
  2707. if (el.tag === 'template') {
  2708. slotScope = getAndRemoveAttr(el, 'scope');
  2709. /* istanbul ignore if */
  2710. if (slotScope) {
  2711. warn$1(
  2712. "the \"scope\" attribute for scoped slots have been deprecated and " +
  2713. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  2714. "can also be used on plain elements in addition to <template> to " +
  2715. "denote scoped slots.",
  2716. true
  2717. );
  2718. }
  2719. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  2720. } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  2721. /* istanbul ignore if */
  2722. if (el.attrsMap['v-for']) {
  2723. warn$1(
  2724. "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
  2725. "(v-for takes higher priority). Use a wrapper <template> for the " +
  2726. "scoped slot to make it clearer.",
  2727. true
  2728. );
  2729. }
  2730. el.slotScope = slotScope;
  2731. }
  2732. var slotTarget = getBindingAttr(el, 'slot');
  2733. if (slotTarget) {
  2734. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  2735. // preserve slot as an attribute for native shadow DOM compat
  2736. // only for non-scoped slots.
  2737. if (el.tag !== 'template' && !el.slotScope) {
  2738. addAttr(el, 'slot', slotTarget);
  2739. }
  2740. }
  2741. }
  2742. }
  2743. function processComponent (el) {
  2744. var binding;
  2745. if ((binding = getBindingAttr(el, 'is'))) {
  2746. el.component = binding;
  2747. }
  2748. if (getAndRemoveAttr(el, 'inline-template') != null) {
  2749. el.inlineTemplate = true;
  2750. }
  2751. }
  2752. function processAttrs (el) {
  2753. var list = el.attrsList;
  2754. var i, l, name, rawName, value, modifiers, isProp;
  2755. for (i = 0, l = list.length; i < l; i++) {
  2756. name = rawName = list[i].name;
  2757. value = list[i].value;
  2758. if (dirRE.test(name)) {
  2759. // mark element as dynamic
  2760. el.hasBindings = true;
  2761. // modifiers
  2762. modifiers = parseModifiers(name);
  2763. if (modifiers) {
  2764. name = name.replace(modifierRE, '');
  2765. }
  2766. if (bindRE.test(name)) { // v-bind
  2767. name = name.replace(bindRE, '');
  2768. value = parseFilters(value);
  2769. isProp = false;
  2770. if (
  2771. value.trim().length === 0
  2772. ) {
  2773. warn$1(
  2774. ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
  2775. );
  2776. }
  2777. if (modifiers) {
  2778. if (modifiers.prop) {
  2779. isProp = true;
  2780. name = camelize(name);
  2781. if (name === 'innerHtml') { name = 'innerHTML'; }
  2782. }
  2783. if (modifiers.camel) {
  2784. name = camelize(name);
  2785. }
  2786. if (modifiers.sync) {
  2787. addHandler(
  2788. el,
  2789. ("update:" + (camelize(name))),
  2790. genAssignmentCode(value, "$event")
  2791. );
  2792. }
  2793. }
  2794. if (isProp || (
  2795. !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
  2796. )) {
  2797. addProp(el, name, value);
  2798. } else {
  2799. addAttr(el, name, value);
  2800. }
  2801. } else if (onRE.test(name)) { // v-on
  2802. name = name.replace(onRE, '');
  2803. addHandler(el, name, value, modifiers, false, warn$1);
  2804. } else { // normal directives
  2805. name = name.replace(dirRE, '');
  2806. // parse arg
  2807. var argMatch = name.match(argRE);
  2808. var arg = argMatch && argMatch[1];
  2809. if (arg) {
  2810. name = name.slice(0, -(arg.length + 1));
  2811. }
  2812. addDirective(el, name, rawName, value, arg, modifiers);
  2813. if (name === 'model') {
  2814. checkForAliasModel(el, value);
  2815. }
  2816. }
  2817. } else {
  2818. // literal attribute
  2819. {
  2820. var res = parseText(value, delimiters);
  2821. if (res) {
  2822. warn$1(
  2823. name + "=\"" + value + "\": " +
  2824. 'Interpolation inside attributes has been removed. ' +
  2825. 'Use v-bind or the colon shorthand instead. For example, ' +
  2826. 'instead of <div id="{{ val }}">, use <div :id="val">.'
  2827. );
  2828. }
  2829. }
  2830. addAttr(el, name, JSON.stringify(value));
  2831. // #6887 firefox doesn't update muted state if set via attribute
  2832. // even immediately after element creation
  2833. if (!el.component &&
  2834. name === 'muted' &&
  2835. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  2836. addProp(el, name, 'true');
  2837. }
  2838. }
  2839. }
  2840. }
  2841. function checkInFor (el) {
  2842. var parent = el;
  2843. while (parent) {
  2844. if (parent.for !== undefined) {
  2845. return true
  2846. }
  2847. parent = parent.parent;
  2848. }
  2849. return false
  2850. }
  2851. function parseModifiers (name) {
  2852. var match = name.match(modifierRE);
  2853. if (match) {
  2854. var ret = {};
  2855. match.forEach(function (m) { ret[m.slice(1)] = true; });
  2856. return ret
  2857. }
  2858. }
  2859. function makeAttrsMap (attrs) {
  2860. var map = {};
  2861. for (var i = 0, l = attrs.length; i < l; i++) {
  2862. if (
  2863. map[attrs[i].name] && !isIE && !isEdge
  2864. ) {
  2865. warn$1('duplicate attribute: ' + attrs[i].name);
  2866. }
  2867. map[attrs[i].name] = attrs[i].value;
  2868. }
  2869. return map
  2870. }
  2871. // for script (e.g. type="x/template") or style, do not decode content
  2872. function isTextTag (el) {
  2873. return el.tag === 'script' || el.tag === 'style'
  2874. }
  2875. function isForbiddenTag (el) {
  2876. return (
  2877. el.tag === 'style' ||
  2878. (el.tag === 'script' && (
  2879. !el.attrsMap.type ||
  2880. el.attrsMap.type === 'text/javascript'
  2881. ))
  2882. )
  2883. }
  2884. var ieNSBug = /^xmlns:NS\d+/;
  2885. var ieNSPrefix = /^NS\d+:/;
  2886. /* istanbul ignore next */
  2887. function guardIESVGBug (attrs) {
  2888. var res = [];
  2889. for (var i = 0; i < attrs.length; i++) {
  2890. var attr = attrs[i];
  2891. if (!ieNSBug.test(attr.name)) {
  2892. attr.name = attr.name.replace(ieNSPrefix, '');
  2893. res.push(attr);
  2894. }
  2895. }
  2896. return res
  2897. }
  2898. function checkForAliasModel (el, value) {
  2899. var _el = el;
  2900. while (_el) {
  2901. if (_el.for && _el.alias === value) {
  2902. warn$1(
  2903. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  2904. "You are binding v-model directly to a v-for iteration alias. " +
  2905. "This will not be able to modify the v-for source array because " +
  2906. "writing to the alias is like modifying a function local variable. " +
  2907. "Consider using an array of objects and use v-model on an object property instead."
  2908. );
  2909. }
  2910. _el = _el.parent;
  2911. }
  2912. }
  2913. /* */
  2914. function preTransformNode (el, options) {
  2915. if (el.tag === 'input') {
  2916. var map = el.attrsMap;
  2917. if (!map['v-model']) {
  2918. return
  2919. }
  2920. var typeBinding;
  2921. if (map[':type'] || map['v-bind:type']) {
  2922. typeBinding = getBindingAttr(el, 'type');
  2923. }
  2924. if (!map.type && !typeBinding && map['v-bind']) {
  2925. typeBinding = "(" + (map['v-bind']) + ").type";
  2926. }
  2927. if (typeBinding) {
  2928. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  2929. var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
  2930. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  2931. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  2932. // 1. checkbox
  2933. var branch0 = cloneASTElement(el);
  2934. // process for on the main node
  2935. processFor(branch0);
  2936. addRawAttr(branch0, 'type', 'checkbox');
  2937. processElement(branch0, options);
  2938. branch0.processed = true; // prevent it from double-processed
  2939. branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
  2940. addIfCondition(branch0, {
  2941. exp: branch0.if,
  2942. block: branch0
  2943. });
  2944. // 2. add radio else-if condition
  2945. var branch1 = cloneASTElement(el);
  2946. getAndRemoveAttr(branch1, 'v-for', true);
  2947. addRawAttr(branch1, 'type', 'radio');
  2948. processElement(branch1, options);
  2949. addIfCondition(branch0, {
  2950. exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
  2951. block: branch1
  2952. });
  2953. // 3. other
  2954. var branch2 = cloneASTElement(el);
  2955. getAndRemoveAttr(branch2, 'v-for', true);
  2956. addRawAttr(branch2, ':type', typeBinding);
  2957. processElement(branch2, options);
  2958. addIfCondition(branch0, {
  2959. exp: ifCondition,
  2960. block: branch2
  2961. });
  2962. if (hasElse) {
  2963. branch0.else = true;
  2964. } else if (elseIfCondition) {
  2965. branch0.elseif = elseIfCondition;
  2966. }
  2967. return branch0
  2968. }
  2969. }
  2970. }
  2971. function cloneASTElement (el) {
  2972. return createASTElement(el.tag, el.attrsList.slice(), el.parent)
  2973. }
  2974. var model = {
  2975. preTransformNode: preTransformNode
  2976. };
  2977. var modules = [
  2978. klass,
  2979. style,
  2980. model
  2981. ];
  2982. /* */
  2983. var warn$2;
  2984. // in some cases, the event used has to be determined at runtime
  2985. // so we used some reserved tokens during compile.
  2986. var RANGE_TOKEN = '__r';
  2987. function model$1 (
  2988. el,
  2989. dir,
  2990. _warn
  2991. ) {
  2992. warn$2 = _warn;
  2993. var value = dir.value;
  2994. var modifiers = dir.modifiers;
  2995. var tag = el.tag;
  2996. var type = el.attrsMap.type;
  2997. {
  2998. // inputs with type="file" are read only and setting the input's
  2999. // value will throw an error.
  3000. if (tag === 'input' && type === 'file') {
  3001. warn$2(
  3002. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  3003. "File inputs are read only. Use a v-on:change listener instead."
  3004. );
  3005. }
  3006. }
  3007. if (el.component) {
  3008. genComponentModel(el, value, modifiers);
  3009. // component v-model doesn't need extra runtime
  3010. return false
  3011. } else if (tag === 'select') {
  3012. genSelect(el, value, modifiers);
  3013. } else if (tag === 'input' && type === 'checkbox') {
  3014. genCheckboxModel(el, value, modifiers);
  3015. } else if (tag === 'input' && type === 'radio') {
  3016. genRadioModel(el, value, modifiers);
  3017. } else if (tag === 'input' || tag === 'textarea') {
  3018. genDefaultModel(el, value, modifiers);
  3019. } else {
  3020. genComponentModel(el, value, modifiers);
  3021. // component v-model doesn't need extra runtime
  3022. return false
  3023. }
  3024. // ensure runtime directive metadata
  3025. return true
  3026. }
  3027. function genCheckboxModel (
  3028. el,
  3029. value,
  3030. modifiers
  3031. ) {
  3032. var number = modifiers && modifiers.number;
  3033. var valueBinding = getBindingAttr(el, 'value') || 'null';
  3034. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  3035. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  3036. addProp(el, 'checked',
  3037. "Array.isArray(" + value + ")" +
  3038. "?_i(" + value + "," + valueBinding + ")>-1" + (
  3039. trueValueBinding === 'true'
  3040. ? (":(" + value + ")")
  3041. : (":_q(" + value + "," + trueValueBinding + ")")
  3042. )
  3043. );
  3044. addHandler(el, 'change',
  3045. "var $$a=" + value + "," +
  3046. '$$el=$event.target,' +
  3047. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  3048. 'if(Array.isArray($$a)){' +
  3049. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  3050. '$$i=_i($$a,$$v);' +
  3051. "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
  3052. "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
  3053. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  3054. null, true
  3055. );
  3056. }
  3057. function genRadioModel (
  3058. el,
  3059. value,
  3060. modifiers
  3061. ) {
  3062. var number = modifiers && modifiers.number;
  3063. var valueBinding = getBindingAttr(el, 'value') || 'null';
  3064. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  3065. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  3066. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  3067. }
  3068. function genSelect (
  3069. el,
  3070. value,
  3071. modifiers
  3072. ) {
  3073. var number = modifiers && modifiers.number;
  3074. var selectedVal = "Array.prototype.filter" +
  3075. ".call($event.target.options,function(o){return o.selected})" +
  3076. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  3077. "return " + (number ? '_n(val)' : 'val') + "})";
  3078. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  3079. var code = "var $$selectedVal = " + selectedVal + ";";
  3080. code = code + " " + (genAssignmentCode(value, assignment));
  3081. addHandler(el, 'change', code, null, true);
  3082. }
  3083. function genDefaultModel (
  3084. el,
  3085. value,
  3086. modifiers
  3087. ) {
  3088. var type = el.attrsMap.type;
  3089. // warn if v-bind:value conflicts with v-model
  3090. // except for inputs with v-bind:type
  3091. {
  3092. var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
  3093. var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  3094. if (value$1 && !typeBinding) {
  3095. var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
  3096. warn$2(
  3097. binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
  3098. 'because the latter already expands to a value binding internally'
  3099. );
  3100. }
  3101. }
  3102. var ref = modifiers || {};
  3103. var lazy = ref.lazy;
  3104. var number = ref.number;
  3105. var trim = ref.trim;
  3106. var needCompositionGuard = !lazy && type !== 'range';
  3107. var event = lazy
  3108. ? 'change'
  3109. : type === 'range'
  3110. ? RANGE_TOKEN
  3111. : 'input';
  3112. var valueExpression = '$event.target.value';
  3113. if (trim) {
  3114. valueExpression = "$event.target.value.trim()";
  3115. }
  3116. if (number) {
  3117. valueExpression = "_n(" + valueExpression + ")";
  3118. }
  3119. var code = genAssignmentCode(value, valueExpression);
  3120. if (needCompositionGuard) {
  3121. code = "if($event.target.composing)return;" + code;
  3122. }
  3123. addProp(el, 'value', ("(" + value + ")"));
  3124. addHandler(el, event, code, null, true);
  3125. if (trim || number) {
  3126. addHandler(el, 'blur', '$forceUpdate()');
  3127. }
  3128. }
  3129. /* */
  3130. function text (el, dir) {
  3131. if (dir.value) {
  3132. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
  3133. }
  3134. }
  3135. /* */
  3136. function html (el, dir) {
  3137. if (dir.value) {
  3138. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
  3139. }
  3140. }
  3141. var directives = {
  3142. model: model$1,
  3143. text: text,
  3144. html: html
  3145. };
  3146. /* */
  3147. var baseOptions = {
  3148. expectHTML: true,
  3149. modules: modules,
  3150. directives: directives,
  3151. isPreTag: isPreTag,
  3152. isUnaryTag: isUnaryTag,
  3153. mustUseProp: mustUseProp,
  3154. canBeLeftOpenTag: canBeLeftOpenTag,
  3155. isReservedTag: isReservedTag,
  3156. getTagNamespace: getTagNamespace,
  3157. staticKeys: genStaticKeys(modules)
  3158. };
  3159. /* */
  3160. var isStaticKey;
  3161. var isPlatformReservedTag;
  3162. var genStaticKeysCached = cached(genStaticKeys$1);
  3163. /**
  3164. * Goal of the optimizer: walk the generated template AST tree
  3165. * and detect sub-trees that are purely static, i.e. parts of
  3166. * the DOM that never needs to change.
  3167. *
  3168. * Once we detect these sub-trees, we can:
  3169. *
  3170. * 1. Hoist them into constants, so that we no longer need to
  3171. * create fresh nodes for them on each re-render;
  3172. * 2. Completely skip them in the patching process.
  3173. */
  3174. function optimize (root, options) {
  3175. if (!root) { return }
  3176. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  3177. isPlatformReservedTag = options.isReservedTag || no;
  3178. // first pass: mark all non-static nodes.
  3179. markStatic(root);
  3180. // second pass: mark static roots.
  3181. markStaticRoots(root, false);
  3182. }
  3183. function genStaticKeys$1 (keys) {
  3184. return makeMap(
  3185. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +
  3186. (keys ? ',' + keys : '')
  3187. )
  3188. }
  3189. function markStatic (node) {
  3190. node.static = isStatic(node);
  3191. if (node.type === 1) {
  3192. // do not make component slot content static. this avoids
  3193. // 1. components not able to mutate slot nodes
  3194. // 2. static slot content fails for hot-reloading
  3195. if (
  3196. !isPlatformReservedTag(node.tag) &&
  3197. node.tag !== 'slot' &&
  3198. node.attrsMap['inline-template'] == null
  3199. ) {
  3200. return
  3201. }
  3202. for (var i = 0, l = node.children.length; i < l; i++) {
  3203. var child = node.children[i];
  3204. markStatic(child);
  3205. if (!child.static) {
  3206. node.static = false;
  3207. }
  3208. }
  3209. if (node.ifConditions) {
  3210. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  3211. var block = node.ifConditions[i$1].block;
  3212. markStatic(block);
  3213. if (!block.static) {
  3214. node.static = false;
  3215. }
  3216. }
  3217. }
  3218. }
  3219. }
  3220. function markStaticRoots (node, isInFor) {
  3221. if (node.type === 1) {
  3222. if (node.static || node.once) {
  3223. node.staticInFor = isInFor;
  3224. }
  3225. // For a node to qualify as a static root, it should have children that
  3226. // are not just static text. Otherwise the cost of hoisting out will
  3227. // outweigh the benefits and it's better off to just always render it fresh.
  3228. if (node.static && node.children.length && !(
  3229. node.children.length === 1 &&
  3230. node.children[0].type === 3
  3231. )) {
  3232. node.staticRoot = true;
  3233. return
  3234. } else {
  3235. node.staticRoot = false;
  3236. }
  3237. if (node.children) {
  3238. for (var i = 0, l = node.children.length; i < l; i++) {
  3239. markStaticRoots(node.children[i], isInFor || !!node.for);
  3240. }
  3241. }
  3242. if (node.ifConditions) {
  3243. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  3244. markStaticRoots(node.ifConditions[i$1].block, isInFor);
  3245. }
  3246. }
  3247. }
  3248. }
  3249. function isStatic (node) {
  3250. if (node.type === 2) { // expression
  3251. return false
  3252. }
  3253. if (node.type === 3) { // text
  3254. return true
  3255. }
  3256. return !!(node.pre || (
  3257. !node.hasBindings && // no dynamic bindings
  3258. !node.if && !node.for && // not v-if or v-for or v-else
  3259. !isBuiltInTag(node.tag) && // not a built-in
  3260. isPlatformReservedTag(node.tag) && // not a component
  3261. !isDirectChildOfTemplateFor(node) &&
  3262. Object.keys(node).every(isStaticKey)
  3263. ))
  3264. }
  3265. function isDirectChildOfTemplateFor (node) {
  3266. while (node.parent) {
  3267. node = node.parent;
  3268. if (node.tag !== 'template') {
  3269. return false
  3270. }
  3271. if (node.for) {
  3272. return true
  3273. }
  3274. }
  3275. return false
  3276. }
  3277. /* */
  3278. var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
  3279. var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
  3280. // KeyboardEvent.keyCode aliases
  3281. var keyCodes = {
  3282. esc: 27,
  3283. tab: 9,
  3284. enter: 13,
  3285. space: 32,
  3286. up: 38,
  3287. left: 37,
  3288. right: 39,
  3289. down: 40,
  3290. 'delete': [8, 46]
  3291. };
  3292. // KeyboardEvent.key aliases
  3293. var keyNames = {
  3294. // #7880: IE11 and Edge use `Esc` for Escape key name.
  3295. esc: ['Esc', 'Escape'],
  3296. tab: 'Tab',
  3297. enter: 'Enter',
  3298. // #9112: IE11 uses `Spacebar` for Space key name.
  3299. space: [' ', 'Spacebar'],
  3300. // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
  3301. up: ['Up', 'ArrowUp'],
  3302. left: ['Left', 'ArrowLeft'],
  3303. right: ['Right', 'ArrowRight'],
  3304. down: ['Down', 'ArrowDown'],
  3305. // #9112: IE11 uses `Del` for Delete key name.
  3306. 'delete': ['Backspace', 'Delete', 'Del']
  3307. };
  3308. // #4868: modifiers that prevent the execution of the listener
  3309. // need to explicitly return null so that we can determine whether to remove
  3310. // the listener for .once
  3311. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  3312. var modifierCode = {
  3313. stop: '$event.stopPropagation();',
  3314. prevent: '$event.preventDefault();',
  3315. self: genGuard("$event.target !== $event.currentTarget"),
  3316. ctrl: genGuard("!$event.ctrlKey"),
  3317. shift: genGuard("!$event.shiftKey"),
  3318. alt: genGuard("!$event.altKey"),
  3319. meta: genGuard("!$event.metaKey"),
  3320. left: genGuard("'button' in $event && $event.button !== 0"),
  3321. middle: genGuard("'button' in $event && $event.button !== 1"),
  3322. right: genGuard("'button' in $event && $event.button !== 2")
  3323. };
  3324. function genHandlers (
  3325. events,
  3326. isNative
  3327. ) {
  3328. var res = isNative ? 'nativeOn:{' : 'on:{';
  3329. for (var name in events) {
  3330. res += "\"" + name + "\":" + (genHandler(name, events[name])) + ",";
  3331. }
  3332. return res.slice(0, -1) + '}'
  3333. }
  3334. function genHandler (
  3335. name,
  3336. handler
  3337. ) {
  3338. if (!handler) {
  3339. return 'function(){}'
  3340. }
  3341. if (Array.isArray(handler)) {
  3342. return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
  3343. }
  3344. var isMethodPath = simplePathRE.test(handler.value);
  3345. var isFunctionExpression = fnExpRE.test(handler.value);
  3346. if (!handler.modifiers) {
  3347. if (isMethodPath || isFunctionExpression) {
  3348. return handler.value
  3349. }
  3350. return ("function($event){" + (handler.value) + "}") // inline statement
  3351. } else {
  3352. var code = '';
  3353. var genModifierCode = '';
  3354. var keys = [];
  3355. for (var key in handler.modifiers) {
  3356. if (modifierCode[key]) {
  3357. genModifierCode += modifierCode[key];
  3358. // left/right
  3359. if (keyCodes[key]) {
  3360. keys.push(key);
  3361. }
  3362. } else if (key === 'exact') {
  3363. var modifiers = (handler.modifiers);
  3364. genModifierCode += genGuard(
  3365. ['ctrl', 'shift', 'alt', 'meta']
  3366. .filter(function (keyModifier) { return !modifiers[keyModifier]; })
  3367. .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
  3368. .join('||')
  3369. );
  3370. } else {
  3371. keys.push(key);
  3372. }
  3373. }
  3374. if (keys.length) {
  3375. code += genKeyFilter(keys);
  3376. }
  3377. // Make sure modifiers like prevent and stop get executed after key filtering
  3378. if (genModifierCode) {
  3379. code += genModifierCode;
  3380. }
  3381. var handlerCode = isMethodPath
  3382. ? ("return " + (handler.value) + "($event)")
  3383. : isFunctionExpression
  3384. ? ("return (" + (handler.value) + ")($event)")
  3385. : handler.value;
  3386. return ("function($event){" + code + handlerCode + "}")
  3387. }
  3388. }
  3389. function genKeyFilter (keys) {
  3390. return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
  3391. }
  3392. function genFilterCode (key) {
  3393. var keyVal = parseInt(key, 10);
  3394. if (keyVal) {
  3395. return ("$event.keyCode!==" + keyVal)
  3396. }
  3397. var keyCode = keyCodes[key];
  3398. var keyName = keyNames[key];
  3399. return (
  3400. "_k($event.keyCode," +
  3401. (JSON.stringify(key)) + "," +
  3402. (JSON.stringify(keyCode)) + "," +
  3403. "$event.key," +
  3404. "" + (JSON.stringify(keyName)) +
  3405. ")"
  3406. )
  3407. }
  3408. /* */
  3409. function on (el, dir) {
  3410. if (dir.modifiers) {
  3411. warn("v-on without argument does not support modifiers.");
  3412. }
  3413. el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
  3414. }
  3415. /* */
  3416. function bind$1 (el, dir) {
  3417. el.wrapData = function (code) {
  3418. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
  3419. };
  3420. }
  3421. /* */
  3422. var baseDirectives = {
  3423. on: on,
  3424. bind: bind$1,
  3425. cloak: noop
  3426. };
  3427. /* */
  3428. var CodegenState = function CodegenState (options) {
  3429. this.options = options;
  3430. this.warn = options.warn || baseWarn;
  3431. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  3432. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  3433. this.directives = extend(extend({}, baseDirectives), options.directives);
  3434. var isReservedTag = options.isReservedTag || no;
  3435. this.maybeComponent = function (el) { return !(isReservedTag(el.tag) && !el.component); };
  3436. this.onceId = 0;
  3437. this.staticRenderFns = [];
  3438. this.pre = false;
  3439. };
  3440. function generate (
  3441. ast,
  3442. options
  3443. ) {
  3444. var state = new CodegenState(options);
  3445. var code = ast ? genElement(ast, state) : '_c("div")';
  3446. return {
  3447. render: ("with(this){return " + code + "}"),
  3448. staticRenderFns: state.staticRenderFns
  3449. }
  3450. }
  3451. function genElement (el, state) {
  3452. if (el.parent) {
  3453. el.pre = el.pre || el.parent.pre;
  3454. }
  3455. if (el.staticRoot && !el.staticProcessed) {
  3456. return genStatic(el, state)
  3457. } else if (el.once && !el.onceProcessed) {
  3458. return genOnce(el, state)
  3459. } else if (el.for && !el.forProcessed) {
  3460. return genFor(el, state)
  3461. } else if (el.if && !el.ifProcessed) {
  3462. return genIf(el, state)
  3463. } else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
  3464. return genChildren(el, state) || 'void 0'
  3465. } else if (el.tag === 'slot') {
  3466. return genSlot(el, state)
  3467. } else {
  3468. // component or element
  3469. var code;
  3470. if (el.component) {
  3471. code = genComponent(el.component, el, state);
  3472. } else {
  3473. var data;
  3474. if (!el.plain || (el.pre && state.maybeComponent(el))) {
  3475. data = genData$2(el, state);
  3476. }
  3477. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  3478. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  3479. }
  3480. // module transforms
  3481. for (var i = 0; i < state.transforms.length; i++) {
  3482. code = state.transforms[i](el, code);
  3483. }
  3484. return code
  3485. }
  3486. }
  3487. // hoist static sub-trees out
  3488. function genStatic (el, state) {
  3489. el.staticProcessed = true;
  3490. // Some elements (templates) need to behave differently inside of a v-pre
  3491. // node. All pre nodes are static roots, so we can use this as a location to
  3492. // wrap a state change and reset it upon exiting the pre node.
  3493. var originalPreState = state.pre;
  3494. if (el.pre) {
  3495. state.pre = el.pre;
  3496. }
  3497. state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
  3498. state.pre = originalPreState;
  3499. return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  3500. }
  3501. // v-once
  3502. function genOnce (el, state) {
  3503. el.onceProcessed = true;
  3504. if (el.if && !el.ifProcessed) {
  3505. return genIf(el, state)
  3506. } else if (el.staticInFor) {
  3507. var key = '';
  3508. var parent = el.parent;
  3509. while (parent) {
  3510. if (parent.for) {
  3511. key = parent.key;
  3512. break
  3513. }
  3514. parent = parent.parent;
  3515. }
  3516. if (!key) {
  3517. state.warn(
  3518. "v-once can only be used inside v-for that is keyed. "
  3519. );
  3520. return genElement(el, state)
  3521. }
  3522. return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
  3523. } else {
  3524. return genStatic(el, state)
  3525. }
  3526. }
  3527. function genIf (
  3528. el,
  3529. state,
  3530. altGen,
  3531. altEmpty
  3532. ) {
  3533. el.ifProcessed = true; // avoid recursion
  3534. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
  3535. }
  3536. function genIfConditions (
  3537. conditions,
  3538. state,
  3539. altGen,
  3540. altEmpty
  3541. ) {
  3542. if (!conditions.length) {
  3543. return altEmpty || '_e()'
  3544. }
  3545. var condition = conditions.shift();
  3546. if (condition.exp) {
  3547. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
  3548. } else {
  3549. return ("" + (genTernaryExp(condition.block)))
  3550. }
  3551. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  3552. function genTernaryExp (el) {
  3553. return altGen
  3554. ? altGen(el, state)
  3555. : el.once
  3556. ? genOnce(el, state)
  3557. : genElement(el, state)
  3558. }
  3559. }
  3560. function genFor (
  3561. el,
  3562. state,
  3563. altGen,
  3564. altHelper
  3565. ) {
  3566. var exp = el.for;
  3567. var alias = el.alias;
  3568. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  3569. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  3570. if (state.maybeComponent(el) &&
  3571. el.tag !== 'slot' &&
  3572. el.tag !== 'template' &&
  3573. !el.key
  3574. ) {
  3575. state.warn(
  3576. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  3577. "v-for should have explicit keys. " +
  3578. "See https://vuejs.org/guide/list.html#key for more info.",
  3579. true /* tip */
  3580. );
  3581. }
  3582. el.forProcessed = true; // avoid recursion
  3583. return (altHelper || '_l') + "((" + exp + ")," +
  3584. "function(" + alias + iterator1 + iterator2 + "){" +
  3585. "return " + ((altGen || genElement)(el, state)) +
  3586. '})'
  3587. }
  3588. function genData$2 (el, state) {
  3589. var data = '{';
  3590. // directives first.
  3591. // directives may mutate the el's other properties before they are generated.
  3592. var dirs = genDirectives(el, state);
  3593. if (dirs) { data += dirs + ','; }
  3594. // key
  3595. if (el.key) {
  3596. data += "key:" + (el.key) + ",";
  3597. }
  3598. // ref
  3599. if (el.ref) {
  3600. data += "ref:" + (el.ref) + ",";
  3601. }
  3602. if (el.refInFor) {
  3603. data += "refInFor:true,";
  3604. }
  3605. // pre
  3606. if (el.pre) {
  3607. data += "pre:true,";
  3608. }
  3609. // record original tag name for components using "is" attribute
  3610. if (el.component) {
  3611. data += "tag:\"" + (el.tag) + "\",";
  3612. }
  3613. // module data generation functions
  3614. for (var i = 0; i < state.dataGenFns.length; i++) {
  3615. data += state.dataGenFns[i](el);
  3616. }
  3617. // attributes
  3618. if (el.attrs) {
  3619. data += "attrs:{" + (genProps(el.attrs)) + "},";
  3620. }
  3621. // DOM props
  3622. if (el.props) {
  3623. data += "domProps:{" + (genProps(el.props)) + "},";
  3624. }
  3625. // event handlers
  3626. if (el.events) {
  3627. data += (genHandlers(el.events, false)) + ",";
  3628. }
  3629. if (el.nativeEvents) {
  3630. data += (genHandlers(el.nativeEvents, true)) + ",";
  3631. }
  3632. // slot target
  3633. // only for non-scoped slots
  3634. if (el.slotTarget && !el.slotScope) {
  3635. data += "slot:" + (el.slotTarget) + ",";
  3636. }
  3637. // scoped slots
  3638. if (el.scopedSlots) {
  3639. data += (genScopedSlots(el.scopedSlots, state)) + ",";
  3640. }
  3641. // component v-model
  3642. if (el.model) {
  3643. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  3644. }
  3645. // inline-template
  3646. if (el.inlineTemplate) {
  3647. var inlineTemplate = genInlineTemplate(el, state);
  3648. if (inlineTemplate) {
  3649. data += inlineTemplate + ",";
  3650. }
  3651. }
  3652. data = data.replace(/,$/, '') + '}';
  3653. // v-bind data wrap
  3654. if (el.wrapData) {
  3655. data = el.wrapData(data);
  3656. }
  3657. // v-on data wrap
  3658. if (el.wrapListeners) {
  3659. data = el.wrapListeners(data);
  3660. }
  3661. return data
  3662. }
  3663. function genDirectives (el, state) {
  3664. var dirs = el.directives;
  3665. if (!dirs) { return }
  3666. var res = 'directives:[';
  3667. var hasRuntime = false;
  3668. var i, l, dir, needRuntime;
  3669. for (i = 0, l = dirs.length; i < l; i++) {
  3670. dir = dirs[i];
  3671. needRuntime = true;
  3672. var gen = state.directives[dir.name];
  3673. if (gen) {
  3674. // compile-time directive that manipulates AST.
  3675. // returns true if it also needs a runtime counterpart.
  3676. needRuntime = !!gen(el, dir, state.warn);
  3677. }
  3678. if (needRuntime) {
  3679. hasRuntime = true;
  3680. res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
  3681. }
  3682. }
  3683. if (hasRuntime) {
  3684. return res.slice(0, -1) + ']'
  3685. }
  3686. }
  3687. function genInlineTemplate (el, state) {
  3688. var ast = el.children[0];
  3689. if (el.children.length !== 1 || ast.type !== 1) {
  3690. state.warn('Inline-template components must have exactly one child element.');
  3691. }
  3692. if (ast.type === 1) {
  3693. var inlineRenderFns = generate(ast, state.options);
  3694. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  3695. }
  3696. }
  3697. function genScopedSlots (
  3698. slots,
  3699. state
  3700. ) {
  3701. return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
  3702. return genScopedSlot(key, slots[key], state)
  3703. }).join(',')) + "])")
  3704. }
  3705. function genScopedSlot (
  3706. key,
  3707. el,
  3708. state
  3709. ) {
  3710. if (el.for && !el.forProcessed) {
  3711. return genForScopedSlot(key, el, state)
  3712. }
  3713. var fn = "function(" + (String(el.slotScope)) + "){" +
  3714. "return " + (el.tag === 'template'
  3715. ? el.if
  3716. ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
  3717. : genChildren(el, state) || 'undefined'
  3718. : genElement(el, state)) + "}";
  3719. return ("{key:" + key + ",fn:" + fn + "}")
  3720. }
  3721. function genForScopedSlot (
  3722. key,
  3723. el,
  3724. state
  3725. ) {
  3726. var exp = el.for;
  3727. var alias = el.alias;
  3728. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  3729. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  3730. el.forProcessed = true; // avoid recursion
  3731. return "_l((" + exp + ")," +
  3732. "function(" + alias + iterator1 + iterator2 + "){" +
  3733. "return " + (genScopedSlot(key, el, state)) +
  3734. '})'
  3735. }
  3736. function genChildren (
  3737. el,
  3738. state,
  3739. checkSkip,
  3740. altGenElement,
  3741. altGenNode
  3742. ) {
  3743. var children = el.children;
  3744. if (children.length) {
  3745. var el$1 = children[0];
  3746. // optimize single v-for
  3747. if (children.length === 1 &&
  3748. el$1.for &&
  3749. el$1.tag !== 'template' &&
  3750. el$1.tag !== 'slot'
  3751. ) {
  3752. var normalizationType = checkSkip
  3753. ? state.maybeComponent(el$1) ? ",1" : ",0"
  3754. : "";
  3755. return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType)
  3756. }
  3757. var normalizationType$1 = checkSkip
  3758. ? getNormalizationType(children, state.maybeComponent)
  3759. : 0;
  3760. var gen = altGenNode || genNode;
  3761. return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : ''))
  3762. }
  3763. }
  3764. // determine the normalization needed for the children array.
  3765. // 0: no normalization needed
  3766. // 1: simple normalization needed (possible 1-level deep nested array)
  3767. // 2: full normalization needed
  3768. function getNormalizationType (
  3769. children,
  3770. maybeComponent
  3771. ) {
  3772. var res = 0;
  3773. for (var i = 0; i < children.length; i++) {
  3774. var el = children[i];
  3775. if (el.type !== 1) {
  3776. continue
  3777. }
  3778. if (needsNormalization(el) ||
  3779. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  3780. res = 2;
  3781. break
  3782. }
  3783. if (maybeComponent(el) ||
  3784. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  3785. res = 1;
  3786. }
  3787. }
  3788. return res
  3789. }
  3790. function needsNormalization (el) {
  3791. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  3792. }
  3793. function genNode (node, state) {
  3794. if (node.type === 1) {
  3795. return genElement(node, state)
  3796. } else if (node.type === 3 && node.isComment) {
  3797. return genComment(node)
  3798. } else {
  3799. return genText(node)
  3800. }
  3801. }
  3802. function genText (text) {
  3803. return ("_v(" + (text.type === 2
  3804. ? text.expression // no need for () because already wrapped in _s()
  3805. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  3806. }
  3807. function genComment (comment) {
  3808. return ("_e(" + (JSON.stringify(comment.text)) + ")")
  3809. }
  3810. function genSlot (el, state) {
  3811. var slotName = el.slotName || '"default"';
  3812. var children = genChildren(el, state);
  3813. var res = "_t(" + slotName + (children ? ("," + children) : '');
  3814. var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
  3815. var bind$$1 = el.attrsMap['v-bind'];
  3816. if ((attrs || bind$$1) && !children) {
  3817. res += ",null";
  3818. }
  3819. if (attrs) {
  3820. res += "," + attrs;
  3821. }
  3822. if (bind$$1) {
  3823. res += (attrs ? '' : ',null') + "," + bind$$1;
  3824. }
  3825. return res + ')'
  3826. }
  3827. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  3828. function genComponent (
  3829. componentName,
  3830. el,
  3831. state
  3832. ) {
  3833. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  3834. return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
  3835. }
  3836. function genProps (props) {
  3837. var res = '';
  3838. for (var i = 0; i < props.length; i++) {
  3839. var prop = props[i];
  3840. /* istanbul ignore if */
  3841. {
  3842. res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
  3843. }
  3844. }
  3845. return res.slice(0, -1)
  3846. }
  3847. // #3895, #4268
  3848. function transformSpecialNewlines (text) {
  3849. return text
  3850. .replace(/\u2028/g, '\\u2028')
  3851. .replace(/\u2029/g, '\\u2029')
  3852. }
  3853. /* */
  3854. // these keywords should not appear inside expressions, but operators like
  3855. // typeof, instanceof and in are allowed
  3856. var prohibitedKeywordRE = new RegExp('\\b' + (
  3857. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  3858. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  3859. 'extends,finally,continue,debugger,function,arguments'
  3860. ).split(',').join('\\b|\\b') + '\\b');
  3861. // these unary operators should not be used as property/method names
  3862. var unaryOperatorsRE = new RegExp('\\b' + (
  3863. 'delete,typeof,void'
  3864. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  3865. // strip strings in expressions
  3866. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  3867. // detect problematic expressions in a template
  3868. function detectErrors (ast) {
  3869. var errors = [];
  3870. if (ast) {
  3871. checkNode(ast, errors);
  3872. }
  3873. return errors
  3874. }
  3875. function checkNode (node, errors) {
  3876. if (node.type === 1) {
  3877. for (var name in node.attrsMap) {
  3878. if (dirRE.test(name)) {
  3879. var value = node.attrsMap[name];
  3880. if (value) {
  3881. if (name === 'v-for') {
  3882. checkFor(node, ("v-for=\"" + value + "\""), errors);
  3883. } else if (onRE.test(name)) {
  3884. checkEvent(value, (name + "=\"" + value + "\""), errors);
  3885. } else {
  3886. checkExpression(value, (name + "=\"" + value + "\""), errors);
  3887. }
  3888. }
  3889. }
  3890. }
  3891. if (node.children) {
  3892. for (var i = 0; i < node.children.length; i++) {
  3893. checkNode(node.children[i], errors);
  3894. }
  3895. }
  3896. } else if (node.type === 2) {
  3897. checkExpression(node.expression, node.text, errors);
  3898. }
  3899. }
  3900. function checkEvent (exp, text, errors) {
  3901. var stipped = exp.replace(stripStringRE, '');
  3902. var keywordMatch = stipped.match(unaryOperatorsRE);
  3903. if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
  3904. errors.push(
  3905. "avoid using JavaScript unary operator as property name: " +
  3906. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
  3907. );
  3908. }
  3909. checkExpression(exp, text, errors);
  3910. }
  3911. function checkFor (node, text, errors) {
  3912. checkExpression(node.for || '', text, errors);
  3913. checkIdentifier(node.alias, 'v-for alias', text, errors);
  3914. checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
  3915. checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
  3916. }
  3917. function checkIdentifier (
  3918. ident,
  3919. type,
  3920. text,
  3921. errors
  3922. ) {
  3923. if (typeof ident === 'string') {
  3924. try {
  3925. new Function(("var " + ident + "=_"));
  3926. } catch (e) {
  3927. errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
  3928. }
  3929. }
  3930. }
  3931. function checkExpression (exp, text, errors) {
  3932. try {
  3933. new Function(("return " + exp));
  3934. } catch (e) {
  3935. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  3936. if (keywordMatch) {
  3937. errors.push(
  3938. "avoid using JavaScript keyword as property name: " +
  3939. "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
  3940. );
  3941. } else {
  3942. errors.push(
  3943. "invalid expression: " + (e.message) + " in\n\n" +
  3944. " " + exp + "\n\n" +
  3945. " Raw expression: " + (text.trim()) + "\n"
  3946. );
  3947. }
  3948. }
  3949. }
  3950. /* */
  3951. function createFunction (code, errors) {
  3952. try {
  3953. return new Function(code)
  3954. } catch (err) {
  3955. errors.push({ err: err, code: code });
  3956. return noop
  3957. }
  3958. }
  3959. function createCompileToFunctionFn (compile) {
  3960. var cache = Object.create(null);
  3961. return function compileToFunctions (
  3962. template,
  3963. options,
  3964. vm
  3965. ) {
  3966. options = extend({}, options);
  3967. var warn$$1 = options.warn || warn;
  3968. delete options.warn;
  3969. /* istanbul ignore if */
  3970. {
  3971. // detect possible CSP restriction
  3972. try {
  3973. new Function('return 1');
  3974. } catch (e) {
  3975. if (e.toString().match(/unsafe-eval|CSP/)) {
  3976. warn$$1(
  3977. 'It seems you are using the standalone build of Vue.js in an ' +
  3978. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  3979. 'The template compiler cannot work in this environment. Consider ' +
  3980. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  3981. 'templates into render functions.'
  3982. );
  3983. }
  3984. }
  3985. }
  3986. // check cache
  3987. var key = options.delimiters
  3988. ? String(options.delimiters) + template
  3989. : template;
  3990. if (cache[key]) {
  3991. return cache[key]
  3992. }
  3993. // compile
  3994. var compiled = compile(template, options);
  3995. // check compilation errors/tips
  3996. {
  3997. if (compiled.errors && compiled.errors.length) {
  3998. warn$$1(
  3999. "Error compiling template:\n\n" + template + "\n\n" +
  4000. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  4001. vm
  4002. );
  4003. }
  4004. if (compiled.tips && compiled.tips.length) {
  4005. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  4006. }
  4007. }
  4008. // turn code into functions
  4009. var res = {};
  4010. var fnGenErrors = [];
  4011. res.render = createFunction(compiled.render, fnGenErrors);
  4012. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  4013. return createFunction(code, fnGenErrors)
  4014. });
  4015. // check function generation errors.
  4016. // this should only happen if there is a bug in the compiler itself.
  4017. // mostly for codegen development use
  4018. /* istanbul ignore if */
  4019. {
  4020. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  4021. warn$$1(
  4022. "Failed to generate render function:\n\n" +
  4023. fnGenErrors.map(function (ref) {
  4024. var err = ref.err;
  4025. var code = ref.code;
  4026. return ((err.toString()) + " in\n\n" + code + "\n");
  4027. }).join('\n'),
  4028. vm
  4029. );
  4030. }
  4031. }
  4032. return (cache[key] = res)
  4033. }
  4034. }
  4035. /* */
  4036. function createCompilerCreator (baseCompile) {
  4037. return function createCompiler (baseOptions) {
  4038. function compile (
  4039. template,
  4040. options
  4041. ) {
  4042. var finalOptions = Object.create(baseOptions);
  4043. var errors = [];
  4044. var tips = [];
  4045. finalOptions.warn = function (msg, tip) {
  4046. (tip ? tips : errors).push(msg);
  4047. };
  4048. if (options) {
  4049. // merge custom modules
  4050. if (options.modules) {
  4051. finalOptions.modules =
  4052. (baseOptions.modules || []).concat(options.modules);
  4053. }
  4054. // merge custom directives
  4055. if (options.directives) {
  4056. finalOptions.directives = extend(
  4057. Object.create(baseOptions.directives || null),
  4058. options.directives
  4059. );
  4060. }
  4061. // copy other options
  4062. for (var key in options) {
  4063. if (key !== 'modules' && key !== 'directives') {
  4064. finalOptions[key] = options[key];
  4065. }
  4066. }
  4067. }
  4068. var compiled = baseCompile(template, finalOptions);
  4069. {
  4070. errors.push.apply(errors, detectErrors(compiled.ast));
  4071. }
  4072. compiled.errors = errors;
  4073. compiled.tips = tips;
  4074. return compiled
  4075. }
  4076. return {
  4077. compile: compile,
  4078. compileToFunctions: createCompileToFunctionFn(compile)
  4079. }
  4080. }
  4081. }
  4082. /* */
  4083. // `createCompilerCreator` allows creating compilers that use alternative
  4084. // parser/optimizer/codegen, e.g the SSR optimizing compiler.
  4085. // Here we just export a default compiler using the default parts.
  4086. var createCompiler = createCompilerCreator(function baseCompile (
  4087. template,
  4088. options
  4089. ) {
  4090. var ast = parse(template.trim(), options);
  4091. if (options.optimize !== false) {
  4092. optimize(ast, options);
  4093. }
  4094. var code = generate(ast, options);
  4095. return {
  4096. ast: ast,
  4097. render: code.render,
  4098. staticRenderFns: code.staticRenderFns
  4099. }
  4100. });
  4101. /* */
  4102. var ref = createCompiler(baseOptions);
  4103. var compile = ref.compile;
  4104. var compileToFunctions = ref.compileToFunctions;
  4105. /* */
  4106. var isAttr = makeMap(
  4107. 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
  4108. 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
  4109. 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
  4110. 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
  4111. 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
  4112. 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
  4113. 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
  4114. 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
  4115. 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
  4116. 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
  4117. 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
  4118. 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
  4119. 'target,title,type,usemap,value,width,wrap'
  4120. );
  4121. /* istanbul ignore next */
  4122. var isRenderableAttr = function (name) {
  4123. return (
  4124. isAttr(name) ||
  4125. name.indexOf('data-') === 0 ||
  4126. name.indexOf('aria-') === 0
  4127. )
  4128. };
  4129. var propsToAttrMap = {
  4130. acceptCharset: 'accept-charset',
  4131. className: 'class',
  4132. htmlFor: 'for',
  4133. httpEquiv: 'http-equiv'
  4134. };
  4135. var ESC = {
  4136. '<': '&lt;',
  4137. '>': '&gt;',
  4138. '"': '&quot;',
  4139. '&': '&amp;'
  4140. };
  4141. function escape (s) {
  4142. return s.replace(/[<>"&]/g, escapeChar)
  4143. }
  4144. function escapeChar (a) {
  4145. return ESC[a] || a
  4146. }
  4147. /* */
  4148. var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
  4149. // let the model AST transform translate v-model into appropriate
  4150. // props bindings
  4151. function applyModelTransform (el, state) {
  4152. if (el.directives) {
  4153. for (var i = 0; i < el.directives.length; i++) {
  4154. var dir = el.directives[i];
  4155. if (dir.name === 'model') {
  4156. state.directives.model(el, dir, state.warn);
  4157. // remove value for textarea as its converted to text
  4158. if (el.tag === 'textarea' && el.props) {
  4159. el.props = el.props.filter(function (p) { return p.name !== 'value'; });
  4160. }
  4161. break
  4162. }
  4163. }
  4164. }
  4165. }
  4166. function genAttrSegments (
  4167. attrs
  4168. ) {
  4169. return attrs.map(function (ref) {
  4170. var name = ref.name;
  4171. var value = ref.value;
  4172. return genAttrSegment(name, value);
  4173. })
  4174. }
  4175. function genDOMPropSegments (
  4176. props,
  4177. attrs
  4178. ) {
  4179. var segments = [];
  4180. props.forEach(function (ref) {
  4181. var name = ref.name;
  4182. var value = ref.value;
  4183. name = propsToAttrMap[name] || name.toLowerCase();
  4184. if (isRenderableAttr(name) &&
  4185. !(attrs && attrs.some(function (a) { return a.name === name; }))
  4186. ) {
  4187. segments.push(genAttrSegment(name, value));
  4188. }
  4189. });
  4190. return segments
  4191. }
  4192. function genAttrSegment (name, value) {
  4193. if (plainStringRE.test(value)) {
  4194. // force double quote
  4195. value = value.replace(/^'|'$/g, '"');
  4196. // force enumerated attr to "true"
  4197. if (isEnumeratedAttr(name) && value !== "\"false\"") {
  4198. value = "\"true\"";
  4199. }
  4200. return {
  4201. type: RAW,
  4202. value: isBooleanAttr(name)
  4203. ? (" " + name + "=\"" + name + "\"")
  4204. : value === '""'
  4205. ? (" " + name)
  4206. : (" " + name + "=\"" + (JSON.parse(value)) + "\"")
  4207. }
  4208. } else {
  4209. return {
  4210. type: EXPRESSION,
  4211. value: ("_ssrAttr(" + (JSON.stringify(name)) + "," + value + ")")
  4212. }
  4213. }
  4214. }
  4215. function genClassSegments (
  4216. staticClass,
  4217. classBinding
  4218. ) {
  4219. if (staticClass && !classBinding) {
  4220. return [{ type: RAW, value: (" class=\"" + (JSON.parse(staticClass)) + "\"") }]
  4221. } else {
  4222. return [{
  4223. type: EXPRESSION,
  4224. value: ("_ssrClass(" + (staticClass || 'null') + "," + (classBinding || 'null') + ")")
  4225. }]
  4226. }
  4227. }
  4228. function genStyleSegments (
  4229. staticStyle,
  4230. parsedStaticStyle,
  4231. styleBinding,
  4232. vShowExpression
  4233. ) {
  4234. if (staticStyle && !styleBinding && !vShowExpression) {
  4235. return [{ type: RAW, value: (" style=" + (JSON.stringify(staticStyle))) }]
  4236. } else {
  4237. return [{
  4238. type: EXPRESSION,
  4239. value: ("_ssrStyle(" + (parsedStaticStyle || 'null') + "," + (styleBinding || 'null') + ", " + (vShowExpression
  4240. ? ("{ display: (" + vShowExpression + ") ? '' : 'none' }")
  4241. : 'null') + ")")
  4242. }]
  4243. }
  4244. }
  4245. /* */
  4246. // optimizability constants
  4247. var optimizability = {
  4248. FALSE: 0, // whole sub tree un-optimizable
  4249. FULL: 1, // whole sub tree optimizable
  4250. SELF: 2, // self optimizable but has some un-optimizable children
  4251. CHILDREN: 3, // self un-optimizable but have fully optimizable children
  4252. PARTIAL: 4 // self un-optimizable with some un-optimizable children
  4253. };
  4254. var isPlatformReservedTag$1;
  4255. function optimize$1 (root, options) {
  4256. if (!root) { return }
  4257. isPlatformReservedTag$1 = options.isReservedTag || no;
  4258. walk(root, true);
  4259. }
  4260. function walk (node, isRoot) {
  4261. if (isUnOptimizableTree(node)) {
  4262. node.ssrOptimizability = optimizability.FALSE;
  4263. return
  4264. }
  4265. // root node or nodes with custom directives should always be a VNode
  4266. var selfUnoptimizable = isRoot || hasCustomDirective(node);
  4267. var check = function (child) {
  4268. if (child.ssrOptimizability !== optimizability.FULL) {
  4269. node.ssrOptimizability = selfUnoptimizable
  4270. ? optimizability.PARTIAL
  4271. : optimizability.SELF;
  4272. }
  4273. };
  4274. if (selfUnoptimizable) {
  4275. node.ssrOptimizability = optimizability.CHILDREN;
  4276. }
  4277. if (node.type === 1) {
  4278. for (var i = 0, l = node.children.length; i < l; i++) {
  4279. var child = node.children[i];
  4280. walk(child);
  4281. check(child);
  4282. }
  4283. if (node.ifConditions) {
  4284. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  4285. var block = node.ifConditions[i$1].block;
  4286. walk(block, isRoot);
  4287. check(block);
  4288. }
  4289. }
  4290. if (node.ssrOptimizability == null ||
  4291. (!isRoot && (node.attrsMap['v-html'] || node.attrsMap['v-text']))
  4292. ) {
  4293. node.ssrOptimizability = optimizability.FULL;
  4294. } else {
  4295. node.children = optimizeSiblings(node);
  4296. }
  4297. } else {
  4298. node.ssrOptimizability = optimizability.FULL;
  4299. }
  4300. }
  4301. function optimizeSiblings (el) {
  4302. var children = el.children;
  4303. var optimizedChildren = [];
  4304. var currentOptimizableGroup = [];
  4305. var pushGroup = function () {
  4306. if (currentOptimizableGroup.length) {
  4307. optimizedChildren.push({
  4308. type: 1,
  4309. parent: el,
  4310. tag: 'template',
  4311. attrsList: [],
  4312. attrsMap: {},
  4313. children: currentOptimizableGroup,
  4314. ssrOptimizability: optimizability.FULL
  4315. });
  4316. }
  4317. currentOptimizableGroup = [];
  4318. };
  4319. for (var i = 0; i < children.length; i++) {
  4320. var c = children[i];
  4321. if (c.ssrOptimizability === optimizability.FULL) {
  4322. currentOptimizableGroup.push(c);
  4323. } else {
  4324. // wrap fully-optimizable adjacent siblings inside a template tag
  4325. // so that they can be optimized into a single ssrNode by codegen
  4326. pushGroup();
  4327. optimizedChildren.push(c);
  4328. }
  4329. }
  4330. pushGroup();
  4331. return optimizedChildren
  4332. }
  4333. function isUnOptimizableTree (node) {
  4334. if (node.type === 2 || node.type === 3) { // text or expression
  4335. return false
  4336. }
  4337. return (
  4338. isBuiltInTag(node.tag) || // built-in (slot, component)
  4339. !isPlatformReservedTag$1(node.tag) || // custom component
  4340. !!node.component || // "is" component
  4341. isSelectWithModel(node) // <select v-model> requires runtime inspection
  4342. )
  4343. }
  4344. var isBuiltInDir = makeMap('text,html,show,on,bind,model,pre,cloak,once');
  4345. function hasCustomDirective (node) {
  4346. return (
  4347. node.type === 1 &&
  4348. node.directives &&
  4349. node.directives.some(function (d) { return !isBuiltInDir(d.name); })
  4350. )
  4351. }
  4352. // <select v-model> cannot be optimized because it requires a runtime check
  4353. // to determine proper selected option
  4354. function isSelectWithModel (node) {
  4355. return (
  4356. node.type === 1 &&
  4357. node.tag === 'select' &&
  4358. node.directives != null &&
  4359. node.directives.some(function (d) { return d.name === 'model'; })
  4360. )
  4361. }
  4362. /* */
  4363. // segment types
  4364. var RAW = 0;
  4365. var INTERPOLATION = 1;
  4366. var EXPRESSION = 2;
  4367. function generate$1 (
  4368. ast,
  4369. options
  4370. ) {
  4371. var state = new CodegenState(options);
  4372. var code = ast ? genSSRElement(ast, state) : '_c("div")';
  4373. return {
  4374. render: ("with(this){return " + code + "}"),
  4375. staticRenderFns: state.staticRenderFns
  4376. }
  4377. }
  4378. function genSSRElement (el, state) {
  4379. if (el.for && !el.forProcessed) {
  4380. return genFor(el, state, genSSRElement)
  4381. } else if (el.if && !el.ifProcessed) {
  4382. return genIf(el, state, genSSRElement)
  4383. } else if (el.tag === 'template' && !el.slotTarget) {
  4384. return el.ssrOptimizability === optimizability.FULL
  4385. ? genChildrenAsStringNode(el, state)
  4386. : genSSRChildren(el, state) || 'void 0'
  4387. }
  4388. switch (el.ssrOptimizability) {
  4389. case optimizability.FULL:
  4390. // stringify whole tree
  4391. return genStringElement(el, state)
  4392. case optimizability.SELF:
  4393. // stringify self and check children
  4394. return genStringElementWithChildren(el, state)
  4395. case optimizability.CHILDREN:
  4396. // generate self as VNode and stringify children
  4397. return genNormalElement(el, state, true)
  4398. case optimizability.PARTIAL:
  4399. // generate self as VNode and check children
  4400. return genNormalElement(el, state, false)
  4401. default:
  4402. // bail whole tree
  4403. return genElement(el, state)
  4404. }
  4405. }
  4406. function genNormalElement (el, state, stringifyChildren) {
  4407. var data = el.plain ? undefined : genData$2(el, state);
  4408. var children = stringifyChildren
  4409. ? ("[" + (genChildrenAsStringNode(el, state)) + "]")
  4410. : genSSRChildren(el, state, true);
  4411. return ("_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")")
  4412. }
  4413. function genSSRChildren (el, state, checkSkip) {
  4414. return genChildren(el, state, checkSkip, genSSRElement, genSSRNode)
  4415. }
  4416. function genSSRNode (el, state) {
  4417. return el.type === 1
  4418. ? genSSRElement(el, state)
  4419. : genText(el)
  4420. }
  4421. function genChildrenAsStringNode (el, state) {
  4422. return el.children.length
  4423. ? ("_ssrNode(" + (flattenSegments(childrenToSegments(el, state))) + ")")
  4424. : ''
  4425. }
  4426. function genStringElement (el, state) {
  4427. return ("_ssrNode(" + (elementToString(el, state)) + ")")
  4428. }
  4429. function genStringElementWithChildren (el, state) {
  4430. var children = genSSRChildren(el, state, true);
  4431. return ("_ssrNode(" + (flattenSegments(elementToOpenTagSegments(el, state))) + ",\"</" + (el.tag) + ">\"" + (children ? ("," + children) : '') + ")")
  4432. }
  4433. function elementToString (el, state) {
  4434. return ("(" + (flattenSegments(elementToSegments(el, state))) + ")")
  4435. }
  4436. function elementToSegments (el, state) {
  4437. // v-for / v-if
  4438. if (el.for && !el.forProcessed) {
  4439. el.forProcessed = true;
  4440. return [{
  4441. type: EXPRESSION,
  4442. value: genFor(el, state, elementToString, '_ssrList')
  4443. }]
  4444. } else if (el.if && !el.ifProcessed) {
  4445. el.ifProcessed = true;
  4446. return [{
  4447. type: EXPRESSION,
  4448. value: genIf(el, state, elementToString, '"<!---->"')
  4449. }]
  4450. } else if (el.tag === 'template') {
  4451. return childrenToSegments(el, state)
  4452. }
  4453. var openSegments = elementToOpenTagSegments(el, state);
  4454. var childrenSegments = childrenToSegments(el, state);
  4455. var ref = state.options;
  4456. var isUnaryTag = ref.isUnaryTag;
  4457. var close = (isUnaryTag && isUnaryTag(el.tag))
  4458. ? []
  4459. : [{ type: RAW, value: ("</" + (el.tag) + ">") }];
  4460. return openSegments.concat(childrenSegments, close)
  4461. }
  4462. function elementToOpenTagSegments (el, state) {
  4463. applyModelTransform(el, state);
  4464. var binding;
  4465. var segments = [{ type: RAW, value: ("<" + (el.tag)) }];
  4466. // attrs
  4467. if (el.attrs) {
  4468. segments.push.apply(segments, genAttrSegments(el.attrs));
  4469. }
  4470. // domProps
  4471. if (el.props) {
  4472. segments.push.apply(segments, genDOMPropSegments(el.props, el.attrs));
  4473. }
  4474. // v-bind="object"
  4475. if ((binding = el.attrsMap['v-bind'])) {
  4476. segments.push({ type: EXPRESSION, value: ("_ssrAttrs(" + binding + ")") });
  4477. }
  4478. // v-bind.prop="object"
  4479. if ((binding = el.attrsMap['v-bind.prop'])) {
  4480. segments.push({ type: EXPRESSION, value: ("_ssrDOMProps(" + binding + ")") });
  4481. }
  4482. // class
  4483. if (el.staticClass || el.classBinding) {
  4484. segments.push.apply(
  4485. segments,
  4486. genClassSegments(el.staticClass, el.classBinding)
  4487. );
  4488. }
  4489. // style & v-show
  4490. if (el.staticStyle || el.styleBinding || el.attrsMap['v-show']) {
  4491. segments.push.apply(
  4492. segments,
  4493. genStyleSegments(
  4494. el.attrsMap.style,
  4495. el.staticStyle,
  4496. el.styleBinding,
  4497. el.attrsMap['v-show']
  4498. )
  4499. );
  4500. }
  4501. // _scopedId
  4502. if (state.options.scopeId) {
  4503. segments.push({ type: RAW, value: (" " + (state.options.scopeId)) });
  4504. }
  4505. segments.push({ type: RAW, value: ">" });
  4506. return segments
  4507. }
  4508. function childrenToSegments (el, state) {
  4509. var binding;
  4510. if ((binding = el.attrsMap['v-html'])) {
  4511. return [{ type: EXPRESSION, value: ("_s(" + binding + ")") }]
  4512. }
  4513. if ((binding = el.attrsMap['v-text'])) {
  4514. return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
  4515. }
  4516. if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
  4517. return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
  4518. }
  4519. return el.children
  4520. ? nodesToSegments(el.children, state)
  4521. : []
  4522. }
  4523. function nodesToSegments (
  4524. children,
  4525. state
  4526. ) {
  4527. var segments = [];
  4528. for (var i = 0; i < children.length; i++) {
  4529. var c = children[i];
  4530. if (c.type === 1) {
  4531. segments.push.apply(segments, elementToSegments(c, state));
  4532. } else if (c.type === 2) {
  4533. segments.push({ type: INTERPOLATION, value: c.expression });
  4534. } else if (c.type === 3) {
  4535. segments.push({ type: RAW, value: escape(c.text) });
  4536. }
  4537. }
  4538. return segments
  4539. }
  4540. function flattenSegments (segments) {
  4541. var mergedSegments = [];
  4542. var textBuffer = '';
  4543. var pushBuffer = function () {
  4544. if (textBuffer) {
  4545. mergedSegments.push(JSON.stringify(textBuffer));
  4546. textBuffer = '';
  4547. }
  4548. };
  4549. for (var i = 0; i < segments.length; i++) {
  4550. var s = segments[i];
  4551. if (s.type === RAW) {
  4552. textBuffer += s.value;
  4553. } else if (s.type === INTERPOLATION) {
  4554. pushBuffer();
  4555. mergedSegments.push(("_ssrEscape(" + (s.value) + ")"));
  4556. } else if (s.type === EXPRESSION) {
  4557. pushBuffer();
  4558. mergedSegments.push(("(" + (s.value) + ")"));
  4559. }
  4560. }
  4561. pushBuffer();
  4562. return mergedSegments.join('+')
  4563. }
  4564. /* */
  4565. var createCompiler$1 = createCompilerCreator(function baseCompile (
  4566. template,
  4567. options
  4568. ) {
  4569. var ast = parse(template.trim(), options);
  4570. optimize$1(ast, options);
  4571. var code = generate$1(ast, options);
  4572. return {
  4573. ast: ast,
  4574. render: code.render,
  4575. staticRenderFns: code.staticRenderFns
  4576. }
  4577. });
  4578. /* */
  4579. var ref$1 = createCompiler$1(baseOptions);
  4580. var compile$1 = ref$1.compile;
  4581. var compileToFunctions$1 = ref$1.compileToFunctions;
  4582. /* */
  4583. exports.parseComponent = parseComponent;
  4584. exports.compile = compile;
  4585. exports.compileToFunctions = compileToFunctions;
  4586. exports.ssrCompile = compile$1;
  4587. exports.ssrCompileToFunctions = compileToFunctions$1;
  4588. Object.defineProperty(exports, '__esModule', { value: true });
  4589. })));