browser.js 203 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099
  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$1 = /\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$1);
  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. // these helpers produces better vm code in JS engines due to their
  51. // explicitness and function inlining
  52. /**
  53. * Check if value is primitive
  54. */
  55. /**
  56. * Quick object check - this is primarily used to tell
  57. * Objects from primitive values when we know the value
  58. * is a JSON-compliant type.
  59. */
  60. function isObject (obj) {
  61. return obj !== null && typeof obj === 'object'
  62. }
  63. /**
  64. * Get the raw type string of a value e.g. [object Object]
  65. */
  66. var _toString = Object.prototype.toString;
  67. function toRawType (value) {
  68. return _toString.call(value).slice(8, -1)
  69. }
  70. /**
  71. * Strict object type check. Only returns true
  72. * for plain JavaScript objects.
  73. */
  74. function isPlainObject (obj) {
  75. return _toString.call(obj) === '[object Object]'
  76. }
  77. /**
  78. * Check if val is a valid array index.
  79. */
  80. function isValidArrayIndex (val) {
  81. var n = parseFloat(String(val));
  82. return n >= 0 && Math.floor(n) === n && isFinite(val)
  83. }
  84. /**
  85. * Convert a value to a string that is actually rendered.
  86. */
  87. /**
  88. * Convert a input value to a number for persistence.
  89. * If the conversion fails, return original string.
  90. */
  91. /**
  92. * Make a map and return a function for checking if a key
  93. * is in that map.
  94. */
  95. function makeMap (
  96. str,
  97. expectsLowerCase
  98. ) {
  99. var map = Object.create(null);
  100. var list = str.split(',');
  101. for (var i = 0; i < list.length; i++) {
  102. map[list[i]] = true;
  103. }
  104. return expectsLowerCase
  105. ? function (val) { return map[val.toLowerCase()]; }
  106. : function (val) { return map[val]; }
  107. }
  108. /**
  109. * Check if a tag is a built-in tag.
  110. */
  111. var isBuiltInTag = makeMap('slot,component', true);
  112. /**
  113. * Check if a attribute is a reserved attribute.
  114. */
  115. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  116. /**
  117. * Remove an item from an array
  118. */
  119. function remove (arr, item) {
  120. if (arr.length) {
  121. var index = arr.indexOf(item);
  122. if (index > -1) {
  123. return arr.splice(index, 1)
  124. }
  125. }
  126. }
  127. /**
  128. * Check whether the object has the property.
  129. */
  130. var hasOwnProperty = Object.prototype.hasOwnProperty;
  131. function hasOwn (obj, key) {
  132. return hasOwnProperty.call(obj, key)
  133. }
  134. /**
  135. * Create a cached version of a pure function.
  136. */
  137. function cached (fn) {
  138. var cache = Object.create(null);
  139. return (function cachedFn (str) {
  140. var hit = cache[str];
  141. return hit || (cache[str] = fn(str))
  142. })
  143. }
  144. /**
  145. * Camelize a hyphen-delimited string.
  146. */
  147. var camelizeRE = /-(\w)/g;
  148. var camelize = cached(function (str) {
  149. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  150. });
  151. /**
  152. * Capitalize a string.
  153. */
  154. var capitalize = cached(function (str) {
  155. return str.charAt(0).toUpperCase() + str.slice(1)
  156. });
  157. /**
  158. * Hyphenate a camelCase string.
  159. */
  160. var hyphenateRE = /\B([A-Z])/g;
  161. var hyphenate = cached(function (str) {
  162. return str.replace(hyphenateRE, '-$1').toLowerCase()
  163. });
  164. /**
  165. * Simple bind, faster than native
  166. */
  167. /**
  168. * Convert an Array-like object to a real Array.
  169. */
  170. /**
  171. * Mix properties into target object.
  172. */
  173. function extend (to, _from) {
  174. for (var key in _from) {
  175. to[key] = _from[key];
  176. }
  177. return to
  178. }
  179. /**
  180. * Merge an Array of Objects into a single Object.
  181. */
  182. /**
  183. * Perform no operation.
  184. * Stubbing args to make Flow happy without leaving useless transpiled code
  185. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
  186. */
  187. function noop (a, b, c) {}
  188. /**
  189. * Always return false.
  190. */
  191. var no = function (a, b, c) { return false; };
  192. /**
  193. * Return same value
  194. */
  195. var identity = function (_) { return _; };
  196. /**
  197. * Generate a static keys string from compiler modules.
  198. */
  199. function genStaticKeys (modules) {
  200. return modules.reduce(function (keys, m) {
  201. return keys.concat(m.staticKeys || [])
  202. }, []).join(',')
  203. }
  204. /**
  205. * Check if two values are loosely equal - that is,
  206. * if they are plain objects, do they have the same shape?
  207. */
  208. /**
  209. * Ensure a function is called only once.
  210. */
  211. /* */
  212. var isUnaryTag = makeMap(
  213. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  214. 'link,meta,param,source,track,wbr'
  215. );
  216. // Elements that you can, intentionally, leave open
  217. // (and which close themselves)
  218. var canBeLeftOpenTag = makeMap(
  219. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  220. );
  221. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  222. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  223. var isNonPhrasingTag = makeMap(
  224. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  225. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  226. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  227. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  228. 'title,tr,track'
  229. );
  230. /**
  231. * Not type-checking this file because it's mostly vendor code.
  232. */
  233. /*!
  234. * HTML Parser By John Resig (ejohn.org)
  235. * Modified by Juriy "kangax" Zaytsev
  236. * Original code by Erik Arvidsson, Mozilla Public License
  237. * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
  238. */
  239. // Regular Expressions for parsing tags and attributes
  240. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  241. // could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
  242. // but for Vue templates we can enforce a simple charset
  243. var ncname = '[a-zA-Z_][\\w\\-\\.]*';
  244. var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
  245. var startTagOpen = new RegExp(("^<" + qnameCapture));
  246. var startTagClose = /^\s*(\/?)>/;
  247. var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
  248. var doctype = /^<!DOCTYPE [^>]+>/i;
  249. var comment = /^<!--/;
  250. var conditionalComment = /^<!\[/;
  251. var IS_REGEX_CAPTURING_BROKEN = false;
  252. 'x'.replace(/x(.)?/g, function (m, g) {
  253. IS_REGEX_CAPTURING_BROKEN = g === '';
  254. });
  255. // Special Elements (can contain anything)
  256. var isPlainTextElement = makeMap('script,style,textarea', true);
  257. var reCache = {};
  258. var decodingMap = {
  259. '&lt;': '<',
  260. '&gt;': '>',
  261. '&quot;': '"',
  262. '&amp;': '&',
  263. '&#10;': '\n',
  264. '&#9;': '\t'
  265. };
  266. var encodedAttr = /&(?:lt|gt|quot|amp);/g;
  267. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
  268. // #5992
  269. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  270. var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
  271. function decodeAttr (value, shouldDecodeNewlines) {
  272. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  273. return value.replace(re, function (match) { return decodingMap[match]; })
  274. }
  275. function parseHTML (html, options) {
  276. var stack = [];
  277. var expectHTML = options.expectHTML;
  278. var isUnaryTag$$1 = options.isUnaryTag || no;
  279. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  280. var index = 0;
  281. var last, lastTag;
  282. while (html) {
  283. last = html;
  284. // Make sure we're not in a plaintext content element like script/style
  285. if (!lastTag || !isPlainTextElement(lastTag)) {
  286. var textEnd = html.indexOf('<');
  287. if (textEnd === 0) {
  288. // Comment:
  289. if (comment.test(html)) {
  290. var commentEnd = html.indexOf('-->');
  291. if (commentEnd >= 0) {
  292. if (options.shouldKeepComment) {
  293. options.comment(html.substring(4, commentEnd));
  294. }
  295. advance(commentEnd + 3);
  296. continue
  297. }
  298. }
  299. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  300. if (conditionalComment.test(html)) {
  301. var conditionalEnd = html.indexOf(']>');
  302. if (conditionalEnd >= 0) {
  303. advance(conditionalEnd + 2);
  304. continue
  305. }
  306. }
  307. // Doctype:
  308. var doctypeMatch = html.match(doctype);
  309. if (doctypeMatch) {
  310. advance(doctypeMatch[0].length);
  311. continue
  312. }
  313. // End tag:
  314. var endTagMatch = html.match(endTag);
  315. if (endTagMatch) {
  316. var curIndex = index;
  317. advance(endTagMatch[0].length);
  318. parseEndTag(endTagMatch[1], curIndex, index);
  319. continue
  320. }
  321. // Start tag:
  322. var startTagMatch = parseStartTag();
  323. if (startTagMatch) {
  324. handleStartTag(startTagMatch);
  325. if (shouldIgnoreFirstNewline(lastTag, html)) {
  326. advance(1);
  327. }
  328. continue
  329. }
  330. }
  331. var text = (void 0), rest = (void 0), next = (void 0);
  332. if (textEnd >= 0) {
  333. rest = html.slice(textEnd);
  334. while (
  335. !endTag.test(rest) &&
  336. !startTagOpen.test(rest) &&
  337. !comment.test(rest) &&
  338. !conditionalComment.test(rest)
  339. ) {
  340. // < in plain text, be forgiving and treat it as text
  341. next = rest.indexOf('<', 1);
  342. if (next < 0) { break }
  343. textEnd += next;
  344. rest = html.slice(textEnd);
  345. }
  346. text = html.substring(0, textEnd);
  347. advance(textEnd);
  348. }
  349. if (textEnd < 0) {
  350. text = html;
  351. html = '';
  352. }
  353. if (options.chars && text) {
  354. options.chars(text);
  355. }
  356. } else {
  357. var endTagLength = 0;
  358. var stackedTag = lastTag.toLowerCase();
  359. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  360. var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
  361. endTagLength = endTag.length;
  362. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  363. text = text
  364. .replace(/<!--([\s\S]*?)-->/g, '$1')
  365. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  366. }
  367. if (shouldIgnoreFirstNewline(stackedTag, text)) {
  368. text = text.slice(1);
  369. }
  370. if (options.chars) {
  371. options.chars(text);
  372. }
  373. return ''
  374. });
  375. index += html.length - rest$1.length;
  376. html = rest$1;
  377. parseEndTag(stackedTag, index - endTagLength, index);
  378. }
  379. if (html === last) {
  380. options.chars && options.chars(html);
  381. if ("development" !== 'production' && !stack.length && options.warn) {
  382. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
  383. }
  384. break
  385. }
  386. }
  387. // Clean up any remaining tags
  388. parseEndTag();
  389. function advance (n) {
  390. index += n;
  391. html = html.substring(n);
  392. }
  393. function parseStartTag () {
  394. var start = html.match(startTagOpen);
  395. if (start) {
  396. var match = {
  397. tagName: start[1],
  398. attrs: [],
  399. start: index
  400. };
  401. advance(start[0].length);
  402. var end, attr;
  403. while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
  404. advance(attr[0].length);
  405. match.attrs.push(attr);
  406. }
  407. if (end) {
  408. match.unarySlash = end[1];
  409. advance(end[0].length);
  410. match.end = index;
  411. return match
  412. }
  413. }
  414. }
  415. function handleStartTag (match) {
  416. var tagName = match.tagName;
  417. var unarySlash = match.unarySlash;
  418. if (expectHTML) {
  419. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  420. parseEndTag(lastTag);
  421. }
  422. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  423. parseEndTag(tagName);
  424. }
  425. }
  426. var unary = isUnaryTag$$1(tagName) || !!unarySlash;
  427. var l = match.attrs.length;
  428. var attrs = new Array(l);
  429. for (var i = 0; i < l; i++) {
  430. var args = match.attrs[i];
  431. // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778
  432. if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
  433. if (args[3] === '') { delete args[3]; }
  434. if (args[4] === '') { delete args[4]; }
  435. if (args[5] === '') { delete args[5]; }
  436. }
  437. var value = args[3] || args[4] || args[5] || '';
  438. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  439. ? options.shouldDecodeNewlinesForHref
  440. : options.shouldDecodeNewlines;
  441. attrs[i] = {
  442. name: args[1],
  443. value: decodeAttr(value, shouldDecodeNewlines)
  444. };
  445. }
  446. if (!unary) {
  447. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
  448. lastTag = tagName;
  449. }
  450. if (options.start) {
  451. options.start(tagName, attrs, unary, match.start, match.end);
  452. }
  453. }
  454. function parseEndTag (tagName, start, end) {
  455. var pos, lowerCasedTagName;
  456. if (start == null) { start = index; }
  457. if (end == null) { end = index; }
  458. if (tagName) {
  459. lowerCasedTagName = tagName.toLowerCase();
  460. }
  461. // Find the closest opened tag of the same type
  462. if (tagName) {
  463. for (pos = stack.length - 1; pos >= 0; pos--) {
  464. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  465. break
  466. }
  467. }
  468. } else {
  469. // If no tag name is provided, clean shop
  470. pos = 0;
  471. }
  472. if (pos >= 0) {
  473. // Close all the open elements, up the stack
  474. for (var i = stack.length - 1; i >= pos; i--) {
  475. if ("development" !== 'production' &&
  476. (i > pos || !tagName) &&
  477. options.warn
  478. ) {
  479. options.warn(
  480. ("tag <" + (stack[i].tag) + "> has no matching end tag.")
  481. );
  482. }
  483. if (options.end) {
  484. options.end(stack[i].tag, start, end);
  485. }
  486. }
  487. // Remove the open elements from the stack
  488. stack.length = pos;
  489. lastTag = pos && stack[pos - 1].tag;
  490. } else if (lowerCasedTagName === 'br') {
  491. if (options.start) {
  492. options.start(tagName, [], true, start, end);
  493. }
  494. } else if (lowerCasedTagName === 'p') {
  495. if (options.start) {
  496. options.start(tagName, [], false, start, end);
  497. }
  498. if (options.end) {
  499. options.end(tagName, start, end);
  500. }
  501. }
  502. }
  503. }
  504. /* */
  505. var splitRE = /\r?\n/g;
  506. var replaceRE = /./g;
  507. var isSpecialTag = makeMap('script,style,template', true);
  508. /**
  509. * Parse a single-file component (*.vue) file into an SFC Descriptor Object.
  510. */
  511. function parseComponent (
  512. content,
  513. options
  514. ) {
  515. if ( options === void 0 ) options = {};
  516. var sfc = {
  517. template: null,
  518. script: null,
  519. styles: [],
  520. customBlocks: []
  521. };
  522. var depth = 0;
  523. var currentBlock = null;
  524. function start (
  525. tag,
  526. attrs,
  527. unary,
  528. start,
  529. end
  530. ) {
  531. if (depth === 0) {
  532. currentBlock = {
  533. type: tag,
  534. content: '',
  535. start: end,
  536. attrs: attrs.reduce(function (cumulated, ref) {
  537. var name = ref.name;
  538. var value = ref.value;
  539. cumulated[name] = value || true;
  540. return cumulated
  541. }, Object.create(null))
  542. };
  543. if (isSpecialTag(tag)) {
  544. checkAttrs(currentBlock, attrs);
  545. if (tag === 'style') {
  546. sfc.styles.push(currentBlock);
  547. } else {
  548. sfc[tag] = currentBlock;
  549. }
  550. } else { // custom blocks
  551. sfc.customBlocks.push(currentBlock);
  552. }
  553. }
  554. if (!unary) {
  555. depth++;
  556. }
  557. }
  558. function checkAttrs (block, attrs) {
  559. for (var i = 0; i < attrs.length; i++) {
  560. var attr = attrs[i];
  561. if (attr.name === 'lang') {
  562. block.lang = attr.value;
  563. }
  564. if (attr.name === 'scoped') {
  565. block.scoped = true;
  566. }
  567. if (attr.name === 'module') {
  568. block.module = attr.value || true;
  569. }
  570. if (attr.name === 'src') {
  571. block.src = attr.value;
  572. }
  573. }
  574. }
  575. function end (tag, start, end) {
  576. if (depth === 1 && currentBlock) {
  577. currentBlock.end = start;
  578. var text = deIndent(content.slice(currentBlock.start, currentBlock.end));
  579. // pad content so that linters and pre-processors can output correct
  580. // line numbers in errors and warnings
  581. if (currentBlock.type !== 'template' && options.pad) {
  582. text = padContent(currentBlock, options.pad) + text;
  583. }
  584. currentBlock.content = text;
  585. currentBlock = null;
  586. }
  587. depth--;
  588. }
  589. function padContent (block, pad) {
  590. if (pad === 'space') {
  591. return content.slice(0, block.start).replace(replaceRE, ' ')
  592. } else {
  593. var offset = content.slice(0, block.start).split(splitRE).length;
  594. var padChar = block.type === 'script' && !block.lang
  595. ? '//\n'
  596. : '\n';
  597. return Array(offset).join(padChar)
  598. }
  599. }
  600. parseHTML(content, {
  601. start: start,
  602. end: end
  603. });
  604. return sfc
  605. }
  606. /* */
  607. var emptyObject = Object.freeze({});
  608. /**
  609. * Check if a string starts with $ or _
  610. */
  611. /**
  612. * Define a property.
  613. */
  614. function def (obj, key, val, enumerable) {
  615. Object.defineProperty(obj, key, {
  616. value: val,
  617. enumerable: !!enumerable,
  618. writable: true,
  619. configurable: true
  620. });
  621. }
  622. /* */
  623. // can we use __proto__?
  624. var hasProto = '__proto__' in {};
  625. // Browser environment sniffing
  626. var inBrowser = typeof window !== 'undefined';
  627. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  628. var isIE = UA && /msie|trident/.test(UA);
  629. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  630. var isEdge = UA && UA.indexOf('edge/') > 0;
  631. var isAndroid = UA && UA.indexOf('android') > 0;
  632. var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
  633. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  634. // Firefox has a "watch" function on Object.prototype...
  635. var nativeWatch = ({}).watch;
  636. if (inBrowser) {
  637. try {
  638. var opts = {};
  639. Object.defineProperty(opts, 'passive', ({
  640. get: function get () {
  641. /* istanbul ignore next */
  642. }
  643. })); // https://github.com/facebook/flow/issues/285
  644. window.addEventListener('test-passive', null, opts);
  645. } catch (e) {}
  646. }
  647. // this needs to be lazy-evaled because vue may be required before
  648. // vue-server-renderer can set VUE_ENV
  649. var _isServer;
  650. var isServerRendering = function () {
  651. if (_isServer === undefined) {
  652. /* istanbul ignore if */
  653. if (!inBrowser && typeof global !== 'undefined') {
  654. // detect presence of vue-server-renderer and avoid
  655. // Webpack shimming the process
  656. _isServer = global['process'].env.VUE_ENV === 'server';
  657. } else {
  658. _isServer = false;
  659. }
  660. }
  661. return _isServer
  662. };
  663. // detect devtools
  664. /* istanbul ignore next */
  665. function isNative (Ctor) {
  666. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  667. }
  668. var hasSymbol =
  669. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  670. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  671. var _Set;
  672. /* istanbul ignore if */ // $flow-disable-line
  673. if (typeof Set !== 'undefined' && isNative(Set)) {
  674. // use native Set when available.
  675. _Set = Set;
  676. } else {
  677. // a non-standard Set polyfill that only works with primitive keys.
  678. _Set = (function () {
  679. function Set () {
  680. this.set = Object.create(null);
  681. }
  682. Set.prototype.has = function has (key) {
  683. return this.set[key] === true
  684. };
  685. Set.prototype.add = function add (key) {
  686. this.set[key] = true;
  687. };
  688. Set.prototype.clear = function clear () {
  689. this.set = Object.create(null);
  690. };
  691. return Set;
  692. }());
  693. }
  694. var ASSET_TYPES = [
  695. 'component',
  696. 'directive',
  697. 'filter'
  698. ];
  699. var LIFECYCLE_HOOKS = [
  700. 'beforeCreate',
  701. 'created',
  702. 'beforeMount',
  703. 'mounted',
  704. 'beforeUpdate',
  705. 'updated',
  706. 'beforeDestroy',
  707. 'destroyed',
  708. 'activated',
  709. 'deactivated',
  710. 'errorCaptured'
  711. ];
  712. /* */
  713. var config = ({
  714. /**
  715. * Option merge strategies (used in core/util/options)
  716. */
  717. optionMergeStrategies: Object.create(null),
  718. /**
  719. * Whether to suppress warnings.
  720. */
  721. silent: false,
  722. /**
  723. * Show production mode tip message on boot?
  724. */
  725. productionTip: "development" !== 'production',
  726. /**
  727. * Whether to enable devtools
  728. */
  729. devtools: "development" !== 'production',
  730. /**
  731. * Whether to record perf
  732. */
  733. performance: false,
  734. /**
  735. * Error handler for watcher errors
  736. */
  737. errorHandler: null,
  738. /**
  739. * Warn handler for watcher warns
  740. */
  741. warnHandler: null,
  742. /**
  743. * Ignore certain custom elements
  744. */
  745. ignoredElements: [],
  746. /**
  747. * Custom user key aliases for v-on
  748. */
  749. keyCodes: Object.create(null),
  750. /**
  751. * Check if a tag is reserved so that it cannot be registered as a
  752. * component. This is platform-dependent and may be overwritten.
  753. */
  754. isReservedTag: no,
  755. /**
  756. * Check if an attribute is reserved so that it cannot be used as a component
  757. * prop. This is platform-dependent and may be overwritten.
  758. */
  759. isReservedAttr: no,
  760. /**
  761. * Check if a tag is an unknown element.
  762. * Platform-dependent.
  763. */
  764. isUnknownElement: no,
  765. /**
  766. * Get the namespace of an element
  767. */
  768. getTagNamespace: noop,
  769. /**
  770. * Parse the real tag name for the specific platform.
  771. */
  772. parsePlatformTagName: identity,
  773. /**
  774. * Check if an attribute must be bound using property, e.g. value
  775. * Platform-dependent.
  776. */
  777. mustUseProp: no,
  778. /**
  779. * Exposed for legacy reasons
  780. */
  781. _lifecycleHooks: LIFECYCLE_HOOKS
  782. });
  783. /* */
  784. var warn = noop;
  785. var tip = noop;
  786. var generateComponentTrace = (noop); // work around flow check
  787. var formatComponentName = (noop);
  788. {
  789. var hasConsole = typeof console !== 'undefined';
  790. var classifyRE = /(?:^|[-_])(\w)/g;
  791. var classify = function (str) { return str
  792. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  793. .replace(/[-_]/g, ''); };
  794. warn = function (msg, vm) {
  795. var trace = vm ? generateComponentTrace(vm) : '';
  796. if (config.warnHandler) {
  797. config.warnHandler.call(null, msg, vm, trace);
  798. } else if (hasConsole && (!config.silent)) {
  799. console.error(("[Vue warn]: " + msg + trace));
  800. }
  801. };
  802. tip = function (msg, vm) {
  803. if (hasConsole && (!config.silent)) {
  804. console.warn("[Vue tip]: " + msg + (
  805. vm ? generateComponentTrace(vm) : ''
  806. ));
  807. }
  808. };
  809. formatComponentName = function (vm, includeFile) {
  810. if (vm.$root === vm) {
  811. return '<Root>'
  812. }
  813. var options = typeof vm === 'function' && vm.cid != null
  814. ? vm.options
  815. : vm._isVue
  816. ? vm.$options || vm.constructor.options
  817. : vm || {};
  818. var name = options.name || options._componentTag;
  819. var file = options.__file;
  820. if (!name && file) {
  821. var match = file.match(/([^/\\]+)\.vue$/);
  822. name = match && match[1];
  823. }
  824. return (
  825. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  826. (file && includeFile !== false ? (" at " + file) : '')
  827. )
  828. };
  829. var repeat = function (str, n) {
  830. var res = '';
  831. while (n) {
  832. if (n % 2 === 1) { res += str; }
  833. if (n > 1) { str += str; }
  834. n >>= 1;
  835. }
  836. return res
  837. };
  838. generateComponentTrace = function (vm) {
  839. if (vm._isVue && vm.$parent) {
  840. var tree = [];
  841. var currentRecursiveSequence = 0;
  842. while (vm) {
  843. if (tree.length > 0) {
  844. var last = tree[tree.length - 1];
  845. if (last.constructor === vm.constructor) {
  846. currentRecursiveSequence++;
  847. vm = vm.$parent;
  848. continue
  849. } else if (currentRecursiveSequence > 0) {
  850. tree[tree.length - 1] = [last, currentRecursiveSequence];
  851. currentRecursiveSequence = 0;
  852. }
  853. }
  854. tree.push(vm);
  855. vm = vm.$parent;
  856. }
  857. return '\n\nfound in\n\n' + tree
  858. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  859. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  860. : formatComponentName(vm))); })
  861. .join('\n')
  862. } else {
  863. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  864. }
  865. };
  866. }
  867. /* */
  868. var uid = 0;
  869. /**
  870. * A dep is an observable that can have multiple
  871. * directives subscribing to it.
  872. */
  873. var Dep = function Dep () {
  874. this.id = uid++;
  875. this.subs = [];
  876. };
  877. Dep.prototype.addSub = function addSub (sub) {
  878. this.subs.push(sub);
  879. };
  880. Dep.prototype.removeSub = function removeSub (sub) {
  881. remove(this.subs, sub);
  882. };
  883. Dep.prototype.depend = function depend () {
  884. if (Dep.target) {
  885. Dep.target.addDep(this);
  886. }
  887. };
  888. Dep.prototype.notify = function notify () {
  889. // stabilize the subscriber list first
  890. var subs = this.subs.slice();
  891. for (var i = 0, l = subs.length; i < l; i++) {
  892. subs[i].update();
  893. }
  894. };
  895. // the current target watcher being evaluated.
  896. // this is globally unique because there could be only one
  897. // watcher being evaluated at any time.
  898. Dep.target = null;
  899. /* */
  900. var VNode = function VNode (
  901. tag,
  902. data,
  903. children,
  904. text,
  905. elm,
  906. context,
  907. componentOptions,
  908. asyncFactory
  909. ) {
  910. this.tag = tag;
  911. this.data = data;
  912. this.children = children;
  913. this.text = text;
  914. this.elm = elm;
  915. this.ns = undefined;
  916. this.context = context;
  917. this.functionalContext = undefined;
  918. this.functionalOptions = undefined;
  919. this.functionalScopeId = undefined;
  920. this.key = data && data.key;
  921. this.componentOptions = componentOptions;
  922. this.componentInstance = undefined;
  923. this.parent = undefined;
  924. this.raw = false;
  925. this.isStatic = false;
  926. this.isRootInsert = true;
  927. this.isComment = false;
  928. this.isCloned = false;
  929. this.isOnce = false;
  930. this.asyncFactory = asyncFactory;
  931. this.asyncMeta = undefined;
  932. this.isAsyncPlaceholder = false;
  933. };
  934. var prototypeAccessors = { child: { configurable: true } };
  935. // DEPRECATED: alias for componentInstance for backwards compat.
  936. /* istanbul ignore next */
  937. prototypeAccessors.child.get = function () {
  938. return this.componentInstance
  939. };
  940. Object.defineProperties( VNode.prototype, prototypeAccessors );
  941. // optimized shallow clone
  942. // used for static nodes and slot nodes because they may be reused across
  943. // multiple renders, cloning them avoids errors when DOM manipulations rely
  944. // on their elm reference.
  945. /*
  946. * not type checking this file because flow doesn't play well with
  947. * dynamically accessing methods on Array prototype
  948. */
  949. var arrayProto = Array.prototype;
  950. var arrayMethods = Object.create(arrayProto);[
  951. 'push',
  952. 'pop',
  953. 'shift',
  954. 'unshift',
  955. 'splice',
  956. 'sort',
  957. 'reverse'
  958. ]
  959. .forEach(function (method) {
  960. // cache original method
  961. var original = arrayProto[method];
  962. def(arrayMethods, method, function mutator () {
  963. var args = [], len = arguments.length;
  964. while ( len-- ) args[ len ] = arguments[ len ];
  965. var result = original.apply(this, args);
  966. var ob = this.__ob__;
  967. var inserted;
  968. switch (method) {
  969. case 'push':
  970. case 'unshift':
  971. inserted = args;
  972. break
  973. case 'splice':
  974. inserted = args.slice(2);
  975. break
  976. }
  977. if (inserted) { ob.observeArray(inserted); }
  978. // notify change
  979. ob.dep.notify();
  980. return result
  981. });
  982. });
  983. /* */
  984. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  985. /**
  986. * By default, when a reactive property is set, the new value is
  987. * also converted to become reactive. However when passing down props,
  988. * we don't want to force conversion because the value may be a nested value
  989. * under a frozen data structure. Converting it would defeat the optimization.
  990. */
  991. var observerState = {
  992. shouldConvert: true
  993. };
  994. /**
  995. * Observer class that are attached to each observed
  996. * object. Once attached, the observer converts target
  997. * object's property keys into getter/setters that
  998. * collect dependencies and dispatches updates.
  999. */
  1000. var Observer = function Observer (value) {
  1001. this.value = value;
  1002. this.dep = new Dep();
  1003. this.vmCount = 0;
  1004. def(value, '__ob__', this);
  1005. if (Array.isArray(value)) {
  1006. var augment = hasProto
  1007. ? protoAugment
  1008. : copyAugment;
  1009. augment(value, arrayMethods, arrayKeys);
  1010. this.observeArray(value);
  1011. } else {
  1012. this.walk(value);
  1013. }
  1014. };
  1015. /**
  1016. * Walk through each property and convert them into
  1017. * getter/setters. This method should only be called when
  1018. * value type is Object.
  1019. */
  1020. Observer.prototype.walk = function walk (obj) {
  1021. var keys = Object.keys(obj);
  1022. for (var i = 0; i < keys.length; i++) {
  1023. defineReactive(obj, keys[i], obj[keys[i]]);
  1024. }
  1025. };
  1026. /**
  1027. * Observe a list of Array items.
  1028. */
  1029. Observer.prototype.observeArray = function observeArray (items) {
  1030. for (var i = 0, l = items.length; i < l; i++) {
  1031. observe(items[i]);
  1032. }
  1033. };
  1034. // helpers
  1035. /**
  1036. * Augment an target Object or Array by intercepting
  1037. * the prototype chain using __proto__
  1038. */
  1039. function protoAugment (target, src, keys) {
  1040. /* eslint-disable no-proto */
  1041. target.__proto__ = src;
  1042. /* eslint-enable no-proto */
  1043. }
  1044. /**
  1045. * Augment an target Object or Array by defining
  1046. * hidden properties.
  1047. */
  1048. /* istanbul ignore next */
  1049. function copyAugment (target, src, keys) {
  1050. for (var i = 0, l = keys.length; i < l; i++) {
  1051. var key = keys[i];
  1052. def(target, key, src[key]);
  1053. }
  1054. }
  1055. /**
  1056. * Attempt to create an observer instance for a value,
  1057. * returns the new observer if successfully observed,
  1058. * or the existing observer if the value already has one.
  1059. */
  1060. function observe (value, asRootData) {
  1061. if (!isObject(value) || value instanceof VNode) {
  1062. return
  1063. }
  1064. var ob;
  1065. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  1066. ob = value.__ob__;
  1067. } else if (
  1068. observerState.shouldConvert &&
  1069. !isServerRendering() &&
  1070. (Array.isArray(value) || isPlainObject(value)) &&
  1071. Object.isExtensible(value) &&
  1072. !value._isVue
  1073. ) {
  1074. ob = new Observer(value);
  1075. }
  1076. if (asRootData && ob) {
  1077. ob.vmCount++;
  1078. }
  1079. return ob
  1080. }
  1081. /**
  1082. * Define a reactive property on an Object.
  1083. */
  1084. function defineReactive (
  1085. obj,
  1086. key,
  1087. val,
  1088. customSetter,
  1089. shallow
  1090. ) {
  1091. var dep = new Dep();
  1092. var property = Object.getOwnPropertyDescriptor(obj, key);
  1093. if (property && property.configurable === false) {
  1094. return
  1095. }
  1096. // cater for pre-defined getter/setters
  1097. var getter = property && property.get;
  1098. var setter = property && property.set;
  1099. var childOb = !shallow && observe(val);
  1100. Object.defineProperty(obj, key, {
  1101. enumerable: true,
  1102. configurable: true,
  1103. get: function reactiveGetter () {
  1104. var value = getter ? getter.call(obj) : val;
  1105. if (Dep.target) {
  1106. dep.depend();
  1107. if (childOb) {
  1108. childOb.dep.depend();
  1109. if (Array.isArray(value)) {
  1110. dependArray(value);
  1111. }
  1112. }
  1113. }
  1114. return value
  1115. },
  1116. set: function reactiveSetter (newVal) {
  1117. var value = getter ? getter.call(obj) : val;
  1118. /* eslint-disable no-self-compare */
  1119. if (newVal === value || (newVal !== newVal && value !== value)) {
  1120. return
  1121. }
  1122. /* eslint-enable no-self-compare */
  1123. if ("development" !== 'production' && customSetter) {
  1124. customSetter();
  1125. }
  1126. if (setter) {
  1127. setter.call(obj, newVal);
  1128. } else {
  1129. val = newVal;
  1130. }
  1131. childOb = !shallow && observe(newVal);
  1132. dep.notify();
  1133. }
  1134. });
  1135. }
  1136. /**
  1137. * Set a property on an object. Adds the new property and
  1138. * triggers change notification if the property doesn't
  1139. * already exist.
  1140. */
  1141. function set (target, key, val) {
  1142. if (Array.isArray(target) && isValidArrayIndex(key)) {
  1143. target.length = Math.max(target.length, key);
  1144. target.splice(key, 1, val);
  1145. return val
  1146. }
  1147. if (key in target && !(key in Object.prototype)) {
  1148. target[key] = val;
  1149. return val
  1150. }
  1151. var ob = (target).__ob__;
  1152. if (target._isVue || (ob && ob.vmCount)) {
  1153. "development" !== 'production' && warn(
  1154. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  1155. 'at runtime - declare it upfront in the data option.'
  1156. );
  1157. return val
  1158. }
  1159. if (!ob) {
  1160. target[key] = val;
  1161. return val
  1162. }
  1163. defineReactive(ob.value, key, val);
  1164. ob.dep.notify();
  1165. return val
  1166. }
  1167. /**
  1168. * Delete a property and trigger change if necessary.
  1169. */
  1170. /**
  1171. * Collect dependencies on array elements when the array is touched, since
  1172. * we cannot intercept array element access like property getters.
  1173. */
  1174. function dependArray (value) {
  1175. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  1176. e = value[i];
  1177. e && e.__ob__ && e.__ob__.dep.depend();
  1178. if (Array.isArray(e)) {
  1179. dependArray(e);
  1180. }
  1181. }
  1182. }
  1183. /* */
  1184. /**
  1185. * Option overwriting strategies are functions that handle
  1186. * how to merge a parent option value and a child option
  1187. * value into the final value.
  1188. */
  1189. var strats = config.optionMergeStrategies;
  1190. /**
  1191. * Options with restrictions
  1192. */
  1193. {
  1194. strats.el = strats.propsData = function (parent, child, vm, key) {
  1195. if (!vm) {
  1196. warn(
  1197. "option \"" + key + "\" can only be used during instance " +
  1198. 'creation with the `new` keyword.'
  1199. );
  1200. }
  1201. return defaultStrat(parent, child)
  1202. };
  1203. }
  1204. /**
  1205. * Helper that recursively merges two data objects together.
  1206. */
  1207. function mergeData (to, from) {
  1208. if (!from) { return to }
  1209. var key, toVal, fromVal;
  1210. var keys = Object.keys(from);
  1211. for (var i = 0; i < keys.length; i++) {
  1212. key = keys[i];
  1213. toVal = to[key];
  1214. fromVal = from[key];
  1215. if (!hasOwn(to, key)) {
  1216. set(to, key, fromVal);
  1217. } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
  1218. mergeData(toVal, fromVal);
  1219. }
  1220. }
  1221. return to
  1222. }
  1223. /**
  1224. * Data
  1225. */
  1226. function mergeDataOrFn (
  1227. parentVal,
  1228. childVal,
  1229. vm
  1230. ) {
  1231. if (!vm) {
  1232. // in a Vue.extend merge, both should be functions
  1233. if (!childVal) {
  1234. return parentVal
  1235. }
  1236. if (!parentVal) {
  1237. return childVal
  1238. }
  1239. // when parentVal & childVal are both present,
  1240. // we need to return a function that returns the
  1241. // merged result of both functions... no need to
  1242. // check if parentVal is a function here because
  1243. // it has to be a function to pass previous merges.
  1244. return function mergedDataFn () {
  1245. return mergeData(
  1246. typeof childVal === 'function' ? childVal.call(this) : childVal,
  1247. typeof parentVal === 'function' ? parentVal.call(this) : parentVal
  1248. )
  1249. }
  1250. } else {
  1251. return function mergedInstanceDataFn () {
  1252. // instance merge
  1253. var instanceData = typeof childVal === 'function'
  1254. ? childVal.call(vm)
  1255. : childVal;
  1256. var defaultData = typeof parentVal === 'function'
  1257. ? parentVal.call(vm)
  1258. : parentVal;
  1259. if (instanceData) {
  1260. return mergeData(instanceData, defaultData)
  1261. } else {
  1262. return defaultData
  1263. }
  1264. }
  1265. }
  1266. }
  1267. strats.data = function (
  1268. parentVal,
  1269. childVal,
  1270. vm
  1271. ) {
  1272. if (!vm) {
  1273. if (childVal && typeof childVal !== 'function') {
  1274. "development" !== 'production' && warn(
  1275. 'The "data" option should be a function ' +
  1276. 'that returns a per-instance value in component ' +
  1277. 'definitions.',
  1278. vm
  1279. );
  1280. return parentVal
  1281. }
  1282. return mergeDataOrFn(parentVal, childVal)
  1283. }
  1284. return mergeDataOrFn(parentVal, childVal, vm)
  1285. };
  1286. /**
  1287. * Hooks and props are merged as arrays.
  1288. */
  1289. function mergeHook (
  1290. parentVal,
  1291. childVal
  1292. ) {
  1293. return childVal
  1294. ? parentVal
  1295. ? parentVal.concat(childVal)
  1296. : Array.isArray(childVal)
  1297. ? childVal
  1298. : [childVal]
  1299. : parentVal
  1300. }
  1301. LIFECYCLE_HOOKS.forEach(function (hook) {
  1302. strats[hook] = mergeHook;
  1303. });
  1304. /**
  1305. * Assets
  1306. *
  1307. * When a vm is present (instance creation), we need to do
  1308. * a three-way merge between constructor options, instance
  1309. * options and parent options.
  1310. */
  1311. function mergeAssets (
  1312. parentVal,
  1313. childVal,
  1314. vm,
  1315. key
  1316. ) {
  1317. var res = Object.create(parentVal || null);
  1318. if (childVal) {
  1319. "development" !== 'production' && assertObjectType(key, childVal, vm);
  1320. return extend(res, childVal)
  1321. } else {
  1322. return res
  1323. }
  1324. }
  1325. ASSET_TYPES.forEach(function (type) {
  1326. strats[type + 's'] = mergeAssets;
  1327. });
  1328. /**
  1329. * Watchers.
  1330. *
  1331. * Watchers hashes should not overwrite one
  1332. * another, so we merge them as arrays.
  1333. */
  1334. strats.watch = function (
  1335. parentVal,
  1336. childVal,
  1337. vm,
  1338. key
  1339. ) {
  1340. // work around Firefox's Object.prototype.watch...
  1341. if (parentVal === nativeWatch) { parentVal = undefined; }
  1342. if (childVal === nativeWatch) { childVal = undefined; }
  1343. /* istanbul ignore if */
  1344. if (!childVal) { return Object.create(parentVal || null) }
  1345. {
  1346. assertObjectType(key, childVal, vm);
  1347. }
  1348. if (!parentVal) { return childVal }
  1349. var ret = {};
  1350. extend(ret, parentVal);
  1351. for (var key$1 in childVal) {
  1352. var parent = ret[key$1];
  1353. var child = childVal[key$1];
  1354. if (parent && !Array.isArray(parent)) {
  1355. parent = [parent];
  1356. }
  1357. ret[key$1] = parent
  1358. ? parent.concat(child)
  1359. : Array.isArray(child) ? child : [child];
  1360. }
  1361. return ret
  1362. };
  1363. /**
  1364. * Other object hashes.
  1365. */
  1366. strats.props =
  1367. strats.methods =
  1368. strats.inject =
  1369. strats.computed = function (
  1370. parentVal,
  1371. childVal,
  1372. vm,
  1373. key
  1374. ) {
  1375. if (childVal && "development" !== 'production') {
  1376. assertObjectType(key, childVal, vm);
  1377. }
  1378. if (!parentVal) { return childVal }
  1379. var ret = Object.create(null);
  1380. extend(ret, parentVal);
  1381. if (childVal) { extend(ret, childVal); }
  1382. return ret
  1383. };
  1384. strats.provide = mergeDataOrFn;
  1385. /**
  1386. * Default strategy.
  1387. */
  1388. var defaultStrat = function (parentVal, childVal) {
  1389. return childVal === undefined
  1390. ? parentVal
  1391. : childVal
  1392. };
  1393. function assertObjectType (name, value, vm) {
  1394. if (!isPlainObject(value)) {
  1395. warn(
  1396. "Invalid value for option \"" + name + "\": expected an Object, " +
  1397. "but got " + (toRawType(value)) + ".",
  1398. vm
  1399. );
  1400. }
  1401. }
  1402. /**
  1403. * Merge two option objects into a new one.
  1404. * Core utility used in both instantiation and inheritance.
  1405. */
  1406. /**
  1407. * Resolve an asset.
  1408. * This function is used because child instances need access
  1409. * to assets defined in its ancestor chain.
  1410. */
  1411. /* */
  1412. /* */
  1413. /* */
  1414. /* globals MessageChannel */
  1415. var callbacks = [];
  1416. function flushCallbacks () {
  1417. var copies = callbacks.slice(0);
  1418. callbacks.length = 0;
  1419. for (var i = 0; i < copies.length; i++) {
  1420. copies[i]();
  1421. }
  1422. }
  1423. // Determine (macro) Task defer implementation.
  1424. // Technically setImmediate should be the ideal choice, but it's only available
  1425. // in IE. The only polyfill that consistently queues the callback after all DOM
  1426. // events triggered in the same loop is by using MessageChannel.
  1427. /* istanbul ignore if */
  1428. if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  1429. } else if (typeof MessageChannel !== 'undefined' && (
  1430. isNative(MessageChannel) ||
  1431. // PhantomJS
  1432. MessageChannel.toString() === '[object MessageChannelConstructor]'
  1433. )) {
  1434. var channel = new MessageChannel();
  1435. channel.port1.onmessage = flushCallbacks;
  1436. } else {
  1437. /* istanbul ignore next */
  1438. }
  1439. // Determine MicroTask defer implementation.
  1440. /* istanbul ignore next, $flow-disable-line */
  1441. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  1442. } else {
  1443. // fallback to macro
  1444. }
  1445. /**
  1446. * Wrap a function so that if any code inside triggers state change,
  1447. * the changes are queued using a Task instead of a MicroTask.
  1448. */
  1449. /* */
  1450. /* */
  1451. // these are reserved for web because they are directly compiled away
  1452. // during template compilation
  1453. var isReservedAttr = makeMap('style,class');
  1454. // attributes that should be using props for binding
  1455. var acceptValue = makeMap('input,textarea,option,select,progress');
  1456. var mustUseProp = function (tag, type, attr) {
  1457. return (
  1458. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  1459. (attr === 'selected' && tag === 'option') ||
  1460. (attr === 'checked' && tag === 'input') ||
  1461. (attr === 'muted' && tag === 'video')
  1462. )
  1463. };
  1464. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  1465. var isBooleanAttr = makeMap(
  1466. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  1467. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  1468. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  1469. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  1470. 'required,reversed,scoped,seamless,selected,sortable,translate,' +
  1471. 'truespeed,typemustmatch,visible'
  1472. );
  1473. /* */
  1474. /* */
  1475. var isHTMLTag = makeMap(
  1476. 'html,body,base,head,link,meta,style,title,' +
  1477. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  1478. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  1479. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  1480. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  1481. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  1482. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  1483. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  1484. 'output,progress,select,textarea,' +
  1485. 'details,dialog,menu,menuitem,summary,' +
  1486. 'content,element,shadow,template,blockquote,iframe,tfoot'
  1487. );
  1488. // this map is intentionally selective, only covering SVG elements that may
  1489. // contain child elements.
  1490. var isSVG = makeMap(
  1491. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  1492. 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  1493. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  1494. true
  1495. );
  1496. var isPreTag = function (tag) { return tag === 'pre'; };
  1497. var isReservedTag = function (tag) {
  1498. return isHTMLTag(tag) || isSVG(tag)
  1499. };
  1500. function getTagNamespace (tag) {
  1501. if (isSVG(tag)) {
  1502. return 'svg'
  1503. }
  1504. // basic support for MathML
  1505. // note it doesn't support other MathML elements being component roots
  1506. if (tag === 'math') {
  1507. return 'math'
  1508. }
  1509. }
  1510. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  1511. /* */
  1512. /**
  1513. * Query an element selector if it's not an element already.
  1514. */
  1515. /* */
  1516. var validDivisionCharRE = /[\w).+\-_$\]]/;
  1517. function parseFilters (exp) {
  1518. var inSingle = false;
  1519. var inDouble = false;
  1520. var inTemplateString = false;
  1521. var inRegex = false;
  1522. var curly = 0;
  1523. var square = 0;
  1524. var paren = 0;
  1525. var lastFilterIndex = 0;
  1526. var c, prev, i, expression, filters;
  1527. for (i = 0; i < exp.length; i++) {
  1528. prev = c;
  1529. c = exp.charCodeAt(i);
  1530. if (inSingle) {
  1531. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  1532. } else if (inDouble) {
  1533. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  1534. } else if (inTemplateString) {
  1535. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  1536. } else if (inRegex) {
  1537. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  1538. } else if (
  1539. c === 0x7C && // pipe
  1540. exp.charCodeAt(i + 1) !== 0x7C &&
  1541. exp.charCodeAt(i - 1) !== 0x7C &&
  1542. !curly && !square && !paren
  1543. ) {
  1544. if (expression === undefined) {
  1545. // first filter, end of expression
  1546. lastFilterIndex = i + 1;
  1547. expression = exp.slice(0, i).trim();
  1548. } else {
  1549. pushFilter();
  1550. }
  1551. } else {
  1552. switch (c) {
  1553. case 0x22: inDouble = true; break // "
  1554. case 0x27: inSingle = true; break // '
  1555. case 0x60: inTemplateString = true; break // `
  1556. case 0x28: paren++; break // (
  1557. case 0x29: paren--; break // )
  1558. case 0x5B: square++; break // [
  1559. case 0x5D: square--; break // ]
  1560. case 0x7B: curly++; break // {
  1561. case 0x7D: curly--; break // }
  1562. }
  1563. if (c === 0x2f) { // /
  1564. var j = i - 1;
  1565. var p = (void 0);
  1566. // find first non-whitespace prev char
  1567. for (; j >= 0; j--) {
  1568. p = exp.charAt(j);
  1569. if (p !== ' ') { break }
  1570. }
  1571. if (!p || !validDivisionCharRE.test(p)) {
  1572. inRegex = true;
  1573. }
  1574. }
  1575. }
  1576. }
  1577. if (expression === undefined) {
  1578. expression = exp.slice(0, i).trim();
  1579. } else if (lastFilterIndex !== 0) {
  1580. pushFilter();
  1581. }
  1582. function pushFilter () {
  1583. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  1584. lastFilterIndex = i + 1;
  1585. }
  1586. if (filters) {
  1587. for (i = 0; i < filters.length; i++) {
  1588. expression = wrapFilter(expression, filters[i]);
  1589. }
  1590. }
  1591. return expression
  1592. }
  1593. function wrapFilter (exp, filter) {
  1594. var i = filter.indexOf('(');
  1595. if (i < 0) {
  1596. // _f: resolveFilter
  1597. return ("_f(\"" + filter + "\")(" + exp + ")")
  1598. } else {
  1599. var name = filter.slice(0, i);
  1600. var args = filter.slice(i + 1);
  1601. return ("_f(\"" + name + "\")(" + exp + "," + args)
  1602. }
  1603. }
  1604. /* */
  1605. var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
  1606. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  1607. var buildRegex = cached(function (delimiters) {
  1608. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  1609. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  1610. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  1611. });
  1612. function parseText (
  1613. text,
  1614. delimiters
  1615. ) {
  1616. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  1617. if (!tagRE.test(text)) {
  1618. return
  1619. }
  1620. var tokens = [];
  1621. var lastIndex = tagRE.lastIndex = 0;
  1622. var match, index;
  1623. while ((match = tagRE.exec(text))) {
  1624. index = match.index;
  1625. // push text token
  1626. if (index > lastIndex) {
  1627. tokens.push(JSON.stringify(text.slice(lastIndex, index)));
  1628. }
  1629. // tag token
  1630. var exp = parseFilters(match[1].trim());
  1631. tokens.push(("_s(" + exp + ")"));
  1632. lastIndex = index + match[0].length;
  1633. }
  1634. if (lastIndex < text.length) {
  1635. tokens.push(JSON.stringify(text.slice(lastIndex)));
  1636. }
  1637. return tokens.join('+')
  1638. }
  1639. /* */
  1640. function baseWarn (msg) {
  1641. console.error(("[Vue compiler]: " + msg));
  1642. }
  1643. function pluckModuleFunction (
  1644. modules,
  1645. key
  1646. ) {
  1647. return modules
  1648. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  1649. : []
  1650. }
  1651. function addProp (el, name, value) {
  1652. (el.props || (el.props = [])).push({ name: name, value: value });
  1653. }
  1654. function addAttr (el, name, value) {
  1655. (el.attrs || (el.attrs = [])).push({ name: name, value: value });
  1656. }
  1657. function addDirective (
  1658. el,
  1659. name,
  1660. rawName,
  1661. value,
  1662. arg,
  1663. modifiers
  1664. ) {
  1665. (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
  1666. }
  1667. function addHandler (
  1668. el,
  1669. name,
  1670. value,
  1671. modifiers,
  1672. important,
  1673. warn
  1674. ) {
  1675. // warn prevent and passive modifier
  1676. /* istanbul ignore if */
  1677. if (
  1678. "development" !== 'production' && warn &&
  1679. modifiers && modifiers.prevent && modifiers.passive
  1680. ) {
  1681. warn(
  1682. 'passive and prevent can\'t be used together. ' +
  1683. 'Passive handler can\'t prevent default event.'
  1684. );
  1685. }
  1686. // check capture modifier
  1687. if (modifiers && modifiers.capture) {
  1688. delete modifiers.capture;
  1689. name = '!' + name; // mark the event as captured
  1690. }
  1691. if (modifiers && modifiers.once) {
  1692. delete modifiers.once;
  1693. name = '~' + name; // mark the event as once
  1694. }
  1695. /* istanbul ignore if */
  1696. if (modifiers && modifiers.passive) {
  1697. delete modifiers.passive;
  1698. name = '&' + name; // mark the event as passive
  1699. }
  1700. var events;
  1701. if (modifiers && modifiers.native) {
  1702. delete modifiers.native;
  1703. events = el.nativeEvents || (el.nativeEvents = {});
  1704. } else {
  1705. events = el.events || (el.events = {});
  1706. }
  1707. var newHandler = { value: value, modifiers: modifiers };
  1708. var handlers = events[name];
  1709. /* istanbul ignore if */
  1710. if (Array.isArray(handlers)) {
  1711. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  1712. } else if (handlers) {
  1713. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  1714. } else {
  1715. events[name] = newHandler;
  1716. }
  1717. }
  1718. function getBindingAttr (
  1719. el,
  1720. name,
  1721. getStatic
  1722. ) {
  1723. var dynamicValue =
  1724. getAndRemoveAttr(el, ':' + name) ||
  1725. getAndRemoveAttr(el, 'v-bind:' + name);
  1726. if (dynamicValue != null) {
  1727. return parseFilters(dynamicValue)
  1728. } else if (getStatic !== false) {
  1729. var staticValue = getAndRemoveAttr(el, name);
  1730. if (staticValue != null) {
  1731. return JSON.stringify(staticValue)
  1732. }
  1733. }
  1734. }
  1735. // note: this only removes the attr from the Array (attrsList) so that it
  1736. // doesn't get processed by processAttrs.
  1737. // By default it does NOT remove it from the map (attrsMap) because the map is
  1738. // needed during codegen.
  1739. function getAndRemoveAttr (
  1740. el,
  1741. name,
  1742. removeFromMap
  1743. ) {
  1744. var val;
  1745. if ((val = el.attrsMap[name]) != null) {
  1746. var list = el.attrsList;
  1747. for (var i = 0, l = list.length; i < l; i++) {
  1748. if (list[i].name === name) {
  1749. list.splice(i, 1);
  1750. break
  1751. }
  1752. }
  1753. }
  1754. if (removeFromMap) {
  1755. delete el.attrsMap[name];
  1756. }
  1757. return val
  1758. }
  1759. /* */
  1760. function transformNode (el, options) {
  1761. var warn = options.warn || baseWarn;
  1762. var staticClass = getAndRemoveAttr(el, 'class');
  1763. if ("development" !== 'production' && staticClass) {
  1764. var expression = parseText(staticClass, options.delimiters);
  1765. if (expression) {
  1766. warn(
  1767. "class=\"" + staticClass + "\": " +
  1768. 'Interpolation inside attributes has been removed. ' +
  1769. 'Use v-bind or the colon shorthand instead. For example, ' +
  1770. 'instead of <div class="{{ val }}">, use <div :class="val">.'
  1771. );
  1772. }
  1773. }
  1774. if (staticClass) {
  1775. el.staticClass = JSON.stringify(staticClass);
  1776. }
  1777. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  1778. if (classBinding) {
  1779. el.classBinding = classBinding;
  1780. }
  1781. }
  1782. function genData (el) {
  1783. var data = '';
  1784. if (el.staticClass) {
  1785. data += "staticClass:" + (el.staticClass) + ",";
  1786. }
  1787. if (el.classBinding) {
  1788. data += "class:" + (el.classBinding) + ",";
  1789. }
  1790. return data
  1791. }
  1792. var klass = {
  1793. staticKeys: ['staticClass'],
  1794. transformNode: transformNode,
  1795. genData: genData
  1796. };
  1797. /* */
  1798. var parseStyleText = cached(function (cssText) {
  1799. var res = {};
  1800. var listDelimiter = /;(?![^(]*\))/g;
  1801. var propertyDelimiter = /:(.+)/;
  1802. cssText.split(listDelimiter).forEach(function (item) {
  1803. if (item) {
  1804. var tmp = item.split(propertyDelimiter);
  1805. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  1806. }
  1807. });
  1808. return res
  1809. });
  1810. // normalize possible array / string values into Object
  1811. /**
  1812. * parent component style should be after child's
  1813. * so that parent component's style could override it
  1814. */
  1815. /* */
  1816. function transformNode$1 (el, options) {
  1817. var warn = options.warn || baseWarn;
  1818. var staticStyle = getAndRemoveAttr(el, 'style');
  1819. if (staticStyle) {
  1820. /* istanbul ignore if */
  1821. {
  1822. var expression = parseText(staticStyle, options.delimiters);
  1823. if (expression) {
  1824. warn(
  1825. "style=\"" + staticStyle + "\": " +
  1826. 'Interpolation inside attributes has been removed. ' +
  1827. 'Use v-bind or the colon shorthand instead. For example, ' +
  1828. 'instead of <div style="{{ val }}">, use <div :style="val">.'
  1829. );
  1830. }
  1831. }
  1832. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  1833. }
  1834. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  1835. if (styleBinding) {
  1836. el.styleBinding = styleBinding;
  1837. }
  1838. }
  1839. function genData$1 (el) {
  1840. var data = '';
  1841. if (el.staticStyle) {
  1842. data += "staticStyle:" + (el.staticStyle) + ",";
  1843. }
  1844. if (el.styleBinding) {
  1845. data += "style:(" + (el.styleBinding) + "),";
  1846. }
  1847. return data
  1848. }
  1849. var style = {
  1850. staticKeys: ['staticStyle'],
  1851. transformNode: transformNode$1,
  1852. genData: genData$1
  1853. };
  1854. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  1855. function createCommonjsModule(fn, module) {
  1856. return module = { exports: {} }, fn(module, module.exports), module.exports;
  1857. }
  1858. var he = createCommonjsModule(function (module, exports) {
  1859. /*! https://mths.be/he v1.1.1 by @mathias | MIT license */
  1860. (function(root) {
  1861. // Detect free variables `exports`.
  1862. var freeExports = 'object' == 'object' && exports;
  1863. // Detect free variable `module`.
  1864. var freeModule = 'object' == 'object' && module &&
  1865. module.exports == freeExports && module;
  1866. // Detect free variable `global`, from Node.js or Browserified code,
  1867. // and use it as `root`.
  1868. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
  1869. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  1870. root = freeGlobal;
  1871. }
  1872. /*--------------------------------------------------------------------------*/
  1873. // All astral symbols.
  1874. var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  1875. // All ASCII symbols (not just printable ASCII) except those listed in the
  1876. // first column of the overrides table.
  1877. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
  1878. var regexAsciiWhitelist = /[\x01-\x7F]/g;
  1879. // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
  1880. // code points listed in the first column of the overrides table on
  1881. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
  1882. var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
  1883. 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;
  1884. 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'};
  1885. var regexEscape = /["&'<>`]/g;
  1886. var escapeMap = {
  1887. '"': '&quot;',
  1888. '&': '&amp;',
  1889. '\'': '&#x27;',
  1890. '<': '&lt;',
  1891. // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
  1892. // following is not strictly necessary unless it’s part of a tag or an
  1893. // unquoted attribute value. We’re only escaping it to support those
  1894. // situations, and for XML support.
  1895. '>': '&gt;',
  1896. // In Internet Explorer ≤ 8, the backtick character can be used
  1897. // to break out of (un)quoted attribute values or HTML comments.
  1898. // See http://html5sec.org/#102, http://html5sec.org/#108, and
  1899. // http://html5sec.org/#133.
  1900. '`': '&#x60;'
  1901. };
  1902. var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
  1903. 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]/;
  1904. var regexDecode = /&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(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])?/g;
  1905. 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'};
  1906. 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'};
  1907. 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'};
  1908. 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];
  1909. /*--------------------------------------------------------------------------*/
  1910. var stringFromCharCode = String.fromCharCode;
  1911. var object = {};
  1912. var hasOwnProperty = object.hasOwnProperty;
  1913. var has = function(object, propertyName) {
  1914. return hasOwnProperty.call(object, propertyName);
  1915. };
  1916. var contains = function(array, value) {
  1917. var index = -1;
  1918. var length = array.length;
  1919. while (++index < length) {
  1920. if (array[index] == value) {
  1921. return true;
  1922. }
  1923. }
  1924. return false;
  1925. };
  1926. var merge = function(options, defaults) {
  1927. if (!options) {
  1928. return defaults;
  1929. }
  1930. var result = {};
  1931. var key;
  1932. for (key in defaults) {
  1933. // A `hasOwnProperty` check is not needed here, since only recognized
  1934. // option names are used anyway. Any others are ignored.
  1935. result[key] = has(options, key) ? options[key] : defaults[key];
  1936. }
  1937. return result;
  1938. };
  1939. // Modified version of `ucs2encode`; see https://mths.be/punycode.
  1940. var codePointToSymbol = function(codePoint, strict) {
  1941. var output = '';
  1942. if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
  1943. // See issue #4:
  1944. // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
  1945. // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
  1946. // REPLACEMENT CHARACTER.”
  1947. if (strict) {
  1948. parseError('character reference outside the permissible Unicode range');
  1949. }
  1950. return '\uFFFD';
  1951. }
  1952. if (has(decodeMapNumeric, codePoint)) {
  1953. if (strict) {
  1954. parseError('disallowed character reference');
  1955. }
  1956. return decodeMapNumeric[codePoint];
  1957. }
  1958. if (strict && contains(invalidReferenceCodePoints, codePoint)) {
  1959. parseError('disallowed character reference');
  1960. }
  1961. if (codePoint > 0xFFFF) {
  1962. codePoint -= 0x10000;
  1963. output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
  1964. codePoint = 0xDC00 | codePoint & 0x3FF;
  1965. }
  1966. output += stringFromCharCode(codePoint);
  1967. return output;
  1968. };
  1969. var hexEscape = function(codePoint) {
  1970. return '&#x' + codePoint.toString(16).toUpperCase() + ';';
  1971. };
  1972. var decEscape = function(codePoint) {
  1973. return '&#' + codePoint + ';';
  1974. };
  1975. var parseError = function(message) {
  1976. throw Error('Parse error: ' + message);
  1977. };
  1978. /*--------------------------------------------------------------------------*/
  1979. var encode = function(string, options) {
  1980. options = merge(options, encode.options);
  1981. var strict = options.strict;
  1982. if (strict && regexInvalidRawCodePoint.test(string)) {
  1983. parseError('forbidden code point');
  1984. }
  1985. var encodeEverything = options.encodeEverything;
  1986. var useNamedReferences = options.useNamedReferences;
  1987. var allowUnsafeSymbols = options.allowUnsafeSymbols;
  1988. var escapeCodePoint = options.decimal ? decEscape : hexEscape;
  1989. var escapeBmpSymbol = function(symbol) {
  1990. return escapeCodePoint(symbol.charCodeAt(0));
  1991. };
  1992. if (encodeEverything) {
  1993. // Encode ASCII symbols.
  1994. string = string.replace(regexAsciiWhitelist, function(symbol) {
  1995. // Use named references if requested & possible.
  1996. if (useNamedReferences && has(encodeMap, symbol)) {
  1997. return '&' + encodeMap[symbol] + ';';
  1998. }
  1999. return escapeBmpSymbol(symbol);
  2000. });
  2001. // Shorten a few escapes that represent two symbols, of which at least one
  2002. // is within the ASCII range.
  2003. if (useNamedReferences) {
  2004. string = string
  2005. .replace(/&gt;\u20D2/g, '&nvgt;')
  2006. .replace(/&lt;\u20D2/g, '&nvlt;')
  2007. .replace(/&#x66;&#x6A;/g, '&fjlig;');
  2008. }
  2009. // Encode non-ASCII symbols.
  2010. if (useNamedReferences) {
  2011. // Encode non-ASCII symbols that can be replaced with a named reference.
  2012. string = string.replace(regexEncodeNonAscii, function(string) {
  2013. // Note: there is no need to check `has(encodeMap, string)` here.
  2014. return '&' + encodeMap[string] + ';';
  2015. });
  2016. }
  2017. // Note: any remaining non-ASCII symbols are handled outside of the `if`.
  2018. } else if (useNamedReferences) {
  2019. // Apply named character references.
  2020. // Encode `<>"'&` using named character references.
  2021. if (!allowUnsafeSymbols) {
  2022. string = string.replace(regexEscape, function(string) {
  2023. return '&' + encodeMap[string] + ';'; // no need to check `has()` here
  2024. });
  2025. }
  2026. // Shorten escapes that represent two symbols, of which at least one is
  2027. // `<>"'&`.
  2028. string = string
  2029. .replace(/&gt;\u20D2/g, '&nvgt;')
  2030. .replace(/&lt;\u20D2/g, '&nvlt;');
  2031. // Encode non-ASCII symbols that can be replaced with a named reference.
  2032. string = string.replace(regexEncodeNonAscii, function(string) {
  2033. // Note: there is no need to check `has(encodeMap, string)` here.
  2034. return '&' + encodeMap[string] + ';';
  2035. });
  2036. } else if (!allowUnsafeSymbols) {
  2037. // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
  2038. // using named character references.
  2039. string = string.replace(regexEscape, escapeBmpSymbol);
  2040. }
  2041. return string
  2042. // Encode astral symbols.
  2043. .replace(regexAstralSymbols, function($0) {
  2044. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  2045. var high = $0.charCodeAt(0);
  2046. var low = $0.charCodeAt(1);
  2047. var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
  2048. return escapeCodePoint(codePoint);
  2049. })
  2050. // Encode any remaining BMP symbols that are not printable ASCII symbols
  2051. // using a hexadecimal escape.
  2052. .replace(regexBmpWhitelist, escapeBmpSymbol);
  2053. };
  2054. // Expose default options (so they can be overridden globally).
  2055. encode.options = {
  2056. 'allowUnsafeSymbols': false,
  2057. 'encodeEverything': false,
  2058. 'strict': false,
  2059. 'useNamedReferences': false,
  2060. 'decimal' : false
  2061. };
  2062. var decode = function(html, options) {
  2063. options = merge(options, decode.options);
  2064. var strict = options.strict;
  2065. if (strict && regexInvalidEntity.test(html)) {
  2066. parseError('malformed character reference');
  2067. }
  2068. return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7) {
  2069. var codePoint;
  2070. var semicolon;
  2071. var decDigits;
  2072. var hexDigits;
  2073. var reference;
  2074. var next;
  2075. if ($1) {
  2076. // Decode decimal escapes, e.g. `&#119558;`.
  2077. decDigits = $1;
  2078. semicolon = $2;
  2079. if (strict && !semicolon) {
  2080. parseError('character reference was not terminated by a semicolon');
  2081. }
  2082. codePoint = parseInt(decDigits, 10);
  2083. return codePointToSymbol(codePoint, strict);
  2084. }
  2085. if ($3) {
  2086. // Decode hexadecimal escapes, e.g. `&#x1D306;`.
  2087. hexDigits = $3;
  2088. semicolon = $4;
  2089. if (strict && !semicolon) {
  2090. parseError('character reference was not terminated by a semicolon');
  2091. }
  2092. codePoint = parseInt(hexDigits, 16);
  2093. return codePointToSymbol(codePoint, strict);
  2094. }
  2095. if ($5) {
  2096. // Decode named character references with trailing `;`, e.g. `&copy;`.
  2097. reference = $5;
  2098. if (has(decodeMap, reference)) {
  2099. return decodeMap[reference];
  2100. } else {
  2101. // Ambiguous ampersand. https://mths.be/notes/ambiguous-ampersands
  2102. if (strict) {
  2103. parseError(
  2104. 'named character reference was not terminated by a semicolon'
  2105. );
  2106. }
  2107. return $0;
  2108. }
  2109. }
  2110. // If we’re still here, it’s a legacy reference for sure. No need for an
  2111. // extra `if` check.
  2112. // Decode named character references without trailing `;`, e.g. `&amp`
  2113. // This is only a parse error if it gets converted to `&`, or if it is
  2114. // followed by `=` in an attribute context.
  2115. reference = $6;
  2116. next = $7;
  2117. if (next && options.isAttributeValue) {
  2118. if (strict && next == '=') {
  2119. parseError('`&` did not start a character reference');
  2120. }
  2121. return $0;
  2122. } else {
  2123. if (strict) {
  2124. parseError(
  2125. 'named character reference was not terminated by a semicolon'
  2126. );
  2127. }
  2128. // Note: there is no need to check `has(decodeMapLegacy, reference)`.
  2129. return decodeMapLegacy[reference] + (next || '');
  2130. }
  2131. });
  2132. };
  2133. // Expose default options (so they can be overridden globally).
  2134. decode.options = {
  2135. 'isAttributeValue': false,
  2136. 'strict': false
  2137. };
  2138. var escape = function(string) {
  2139. return string.replace(regexEscape, function($0) {
  2140. // Note: there is no need to check `has(escapeMap, $0)` here.
  2141. return escapeMap[$0];
  2142. });
  2143. };
  2144. /*--------------------------------------------------------------------------*/
  2145. var he = {
  2146. 'version': '1.1.1',
  2147. 'encode': encode,
  2148. 'decode': decode,
  2149. 'escape': escape,
  2150. 'unescape': decode
  2151. };
  2152. // Some AMD build optimizers, like r.js, check for specific condition patterns
  2153. // like the following:
  2154. if (
  2155. typeof undefined == 'function' &&
  2156. typeof undefined.amd == 'object' &&
  2157. undefined.amd
  2158. ) {
  2159. undefined(function() {
  2160. return he;
  2161. });
  2162. } else if (freeExports && !freeExports.nodeType) {
  2163. if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
  2164. freeModule.exports = he;
  2165. } else { // in Narwhal or RingoJS v0.7.0-
  2166. for (var key in he) {
  2167. has(he, key) && (freeExports[key] = he[key]);
  2168. }
  2169. }
  2170. } else { // in Rhino or a web browser
  2171. root.he = he;
  2172. }
  2173. }(commonjsGlobal));
  2174. });
  2175. /* */
  2176. /**
  2177. * Cross-platform code generation for component v-model
  2178. */
  2179. function genComponentModel (
  2180. el,
  2181. value,
  2182. modifiers
  2183. ) {
  2184. var ref = modifiers || {};
  2185. var number = ref.number;
  2186. var trim = ref.trim;
  2187. var baseValueExpression = '$$v';
  2188. var valueExpression = baseValueExpression;
  2189. if (trim) {
  2190. valueExpression =
  2191. "(typeof " + baseValueExpression + " === 'string'" +
  2192. "? " + baseValueExpression + ".trim()" +
  2193. ": " + baseValueExpression + ")";
  2194. }
  2195. if (number) {
  2196. valueExpression = "_n(" + valueExpression + ")";
  2197. }
  2198. var assignment = genAssignmentCode(value, valueExpression);
  2199. el.model = {
  2200. value: ("(" + value + ")"),
  2201. expression: ("\"" + value + "\""),
  2202. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  2203. };
  2204. }
  2205. /**
  2206. * Cross-platform codegen helper for generating v-model value assignment code.
  2207. */
  2208. function genAssignmentCode (
  2209. value,
  2210. assignment
  2211. ) {
  2212. var res = parseModel(value);
  2213. if (res.key === null) {
  2214. return (value + "=" + assignment)
  2215. } else {
  2216. return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
  2217. }
  2218. }
  2219. /**
  2220. * Parse a v-model expression into a base path and a final key segment.
  2221. * Handles both dot-path and possible square brackets.
  2222. *
  2223. * Possible cases:
  2224. *
  2225. * - test
  2226. * - test[key]
  2227. * - test[test1[key]]
  2228. * - test["a"][key]
  2229. * - xxx.test[a[a].test1[key]]
  2230. * - test.xxx.a["asa"][test1[key]]
  2231. *
  2232. */
  2233. var len;
  2234. var str;
  2235. var chr;
  2236. var index;
  2237. var expressionPos;
  2238. var expressionEndPos;
  2239. function parseModel (val) {
  2240. len = val.length;
  2241. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  2242. index = val.lastIndexOf('.');
  2243. if (index > -1) {
  2244. return {
  2245. exp: val.slice(0, index),
  2246. key: '"' + val.slice(index + 1) + '"'
  2247. }
  2248. } else {
  2249. return {
  2250. exp: val,
  2251. key: null
  2252. }
  2253. }
  2254. }
  2255. str = val;
  2256. index = expressionPos = expressionEndPos = 0;
  2257. while (!eof()) {
  2258. chr = next();
  2259. /* istanbul ignore if */
  2260. if (isStringStart(chr)) {
  2261. parseString(chr);
  2262. } else if (chr === 0x5B) {
  2263. parseBracket(chr);
  2264. }
  2265. }
  2266. return {
  2267. exp: val.slice(0, expressionPos),
  2268. key: val.slice(expressionPos + 1, expressionEndPos)
  2269. }
  2270. }
  2271. function next () {
  2272. return str.charCodeAt(++index)
  2273. }
  2274. function eof () {
  2275. return index >= len
  2276. }
  2277. function isStringStart (chr) {
  2278. return chr === 0x22 || chr === 0x27
  2279. }
  2280. function parseBracket (chr) {
  2281. var inBracket = 1;
  2282. expressionPos = index;
  2283. while (!eof()) {
  2284. chr = next();
  2285. if (isStringStart(chr)) {
  2286. parseString(chr);
  2287. continue
  2288. }
  2289. if (chr === 0x5B) { inBracket++; }
  2290. if (chr === 0x5D) { inBracket--; }
  2291. if (inBracket === 0) {
  2292. expressionEndPos = index;
  2293. break
  2294. }
  2295. }
  2296. }
  2297. function parseString (chr) {
  2298. var stringQuote = chr;
  2299. while (!eof()) {
  2300. chr = next();
  2301. if (chr === stringQuote) {
  2302. break
  2303. }
  2304. }
  2305. }
  2306. /* */
  2307. var onRE = /^@|^v-on:/;
  2308. var dirRE = /^v-|^@|^:/;
  2309. var forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/;
  2310. var forIteratorRE = /\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/;
  2311. var argRE = /:(.*)$/;
  2312. var bindRE = /^:|^v-bind:/;
  2313. var modifierRE = /\.[^.]+/g;
  2314. var decodeHTMLCached = cached(he.decode);
  2315. // configurable state
  2316. var warn$1;
  2317. var delimiters;
  2318. var transforms;
  2319. var preTransforms;
  2320. var postTransforms;
  2321. var platformIsPreTag;
  2322. var platformMustUseProp;
  2323. var platformGetTagNamespace;
  2324. function createASTElement (
  2325. tag,
  2326. attrs,
  2327. parent
  2328. ) {
  2329. return {
  2330. type: 1,
  2331. tag: tag,
  2332. attrsList: attrs,
  2333. attrsMap: makeAttrsMap(attrs),
  2334. parent: parent,
  2335. children: []
  2336. }
  2337. }
  2338. /**
  2339. * Convert HTML string to AST.
  2340. */
  2341. function parse (
  2342. template,
  2343. options
  2344. ) {
  2345. warn$1 = options.warn || baseWarn;
  2346. platformIsPreTag = options.isPreTag || no;
  2347. platformMustUseProp = options.mustUseProp || no;
  2348. platformGetTagNamespace = options.getTagNamespace || no;
  2349. transforms = pluckModuleFunction(options.modules, 'transformNode');
  2350. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  2351. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  2352. delimiters = options.delimiters;
  2353. var stack = [];
  2354. var preserveWhitespace = options.preserveWhitespace !== false;
  2355. var root;
  2356. var currentParent;
  2357. var inVPre = false;
  2358. var inPre = false;
  2359. var warned = false;
  2360. function warnOnce (msg) {
  2361. if (!warned) {
  2362. warned = true;
  2363. warn$1(msg);
  2364. }
  2365. }
  2366. function endPre (element) {
  2367. // check pre state
  2368. if (element.pre) {
  2369. inVPre = false;
  2370. }
  2371. if (platformIsPreTag(element.tag)) {
  2372. inPre = false;
  2373. }
  2374. }
  2375. parseHTML(template, {
  2376. warn: warn$1,
  2377. expectHTML: options.expectHTML,
  2378. isUnaryTag: options.isUnaryTag,
  2379. canBeLeftOpenTag: options.canBeLeftOpenTag,
  2380. shouldDecodeNewlines: options.shouldDecodeNewlines,
  2381. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  2382. shouldKeepComment: options.comments,
  2383. start: function start (tag, attrs, unary) {
  2384. // check namespace.
  2385. // inherit parent ns if there is one
  2386. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  2387. // handle IE svg bug
  2388. /* istanbul ignore if */
  2389. if (isIE && ns === 'svg') {
  2390. attrs = guardIESVGBug(attrs);
  2391. }
  2392. var element = createASTElement(tag, attrs, currentParent);
  2393. if (ns) {
  2394. element.ns = ns;
  2395. }
  2396. if (isForbiddenTag(element) && !isServerRendering()) {
  2397. element.forbidden = true;
  2398. "development" !== 'production' && warn$1(
  2399. 'Templates should only be responsible for mapping the state to the ' +
  2400. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  2401. "<" + tag + ">" + ', as they will not be parsed.'
  2402. );
  2403. }
  2404. // apply pre-transforms
  2405. for (var i = 0; i < preTransforms.length; i++) {
  2406. element = preTransforms[i](element, options) || element;
  2407. }
  2408. if (!inVPre) {
  2409. processPre(element);
  2410. if (element.pre) {
  2411. inVPre = true;
  2412. }
  2413. }
  2414. if (platformIsPreTag(element.tag)) {
  2415. inPre = true;
  2416. }
  2417. if (inVPre) {
  2418. processRawAttrs(element);
  2419. } else if (!element.processed) {
  2420. // structural directives
  2421. processFor(element);
  2422. processIf(element);
  2423. processOnce(element);
  2424. // element-scope stuff
  2425. processElement(element, options);
  2426. }
  2427. function checkRootConstraints (el) {
  2428. {
  2429. if (el.tag === 'slot' || el.tag === 'template') {
  2430. warnOnce(
  2431. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  2432. 'contain multiple nodes.'
  2433. );
  2434. }
  2435. if (el.attrsMap.hasOwnProperty('v-for')) {
  2436. warnOnce(
  2437. 'Cannot use v-for on stateful component root element because ' +
  2438. 'it renders multiple elements.'
  2439. );
  2440. }
  2441. }
  2442. }
  2443. // tree management
  2444. if (!root) {
  2445. root = element;
  2446. checkRootConstraints(root);
  2447. } else if (!stack.length) {
  2448. // allow root elements with v-if, v-else-if and v-else
  2449. if (root.if && (element.elseif || element.else)) {
  2450. checkRootConstraints(element);
  2451. addIfCondition(root, {
  2452. exp: element.elseif,
  2453. block: element
  2454. });
  2455. } else {
  2456. warnOnce(
  2457. "Component template should contain exactly one root element. " +
  2458. "If you are using v-if on multiple elements, " +
  2459. "use v-else-if to chain them instead."
  2460. );
  2461. }
  2462. }
  2463. if (currentParent && !element.forbidden) {
  2464. if (element.elseif || element.else) {
  2465. processIfConditions(element, currentParent);
  2466. } else if (element.slotScope) { // scoped slot
  2467. currentParent.plain = false;
  2468. var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  2469. } else {
  2470. currentParent.children.push(element);
  2471. element.parent = currentParent;
  2472. }
  2473. }
  2474. if (!unary) {
  2475. currentParent = element;
  2476. stack.push(element);
  2477. } else {
  2478. endPre(element);
  2479. }
  2480. // apply post-transforms
  2481. for (var i$1 = 0; i$1 < postTransforms.length; i$1++) {
  2482. postTransforms[i$1](element, options);
  2483. }
  2484. },
  2485. end: function end () {
  2486. // remove trailing whitespace
  2487. var element = stack[stack.length - 1];
  2488. var lastNode = element.children[element.children.length - 1];
  2489. if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
  2490. element.children.pop();
  2491. }
  2492. // pop stack
  2493. stack.length -= 1;
  2494. currentParent = stack[stack.length - 1];
  2495. endPre(element);
  2496. },
  2497. chars: function chars (text) {
  2498. if (!currentParent) {
  2499. {
  2500. if (text === template) {
  2501. warnOnce(
  2502. 'Component template requires a root element, rather than just text.'
  2503. );
  2504. } else if ((text = text.trim())) {
  2505. warnOnce(
  2506. ("text \"" + text + "\" outside root element will be ignored.")
  2507. );
  2508. }
  2509. }
  2510. return
  2511. }
  2512. // IE textarea placeholder bug
  2513. /* istanbul ignore if */
  2514. if (isIE &&
  2515. currentParent.tag === 'textarea' &&
  2516. currentParent.attrsMap.placeholder === text
  2517. ) {
  2518. return
  2519. }
  2520. var children = currentParent.children;
  2521. text = inPre || text.trim()
  2522. ? isTextTag(currentParent) ? text : decodeHTMLCached(text)
  2523. // only preserve whitespace if its not right after a starting tag
  2524. : preserveWhitespace && children.length ? ' ' : '';
  2525. if (text) {
  2526. var expression;
  2527. if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {
  2528. children.push({
  2529. type: 2,
  2530. expression: expression,
  2531. text: text
  2532. });
  2533. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  2534. children.push({
  2535. type: 3,
  2536. text: text
  2537. });
  2538. }
  2539. }
  2540. },
  2541. comment: function comment (text) {
  2542. currentParent.children.push({
  2543. type: 3,
  2544. text: text,
  2545. isComment: true
  2546. });
  2547. }
  2548. });
  2549. return root
  2550. }
  2551. function processPre (el) {
  2552. if (getAndRemoveAttr(el, 'v-pre') != null) {
  2553. el.pre = true;
  2554. }
  2555. }
  2556. function processRawAttrs (el) {
  2557. var l = el.attrsList.length;
  2558. if (l) {
  2559. var attrs = el.attrs = new Array(l);
  2560. for (var i = 0; i < l; i++) {
  2561. attrs[i] = {
  2562. name: el.attrsList[i].name,
  2563. value: JSON.stringify(el.attrsList[i].value)
  2564. };
  2565. }
  2566. } else if (!el.pre) {
  2567. // non root node in pre blocks with no attributes
  2568. el.plain = true;
  2569. }
  2570. }
  2571. function processElement (element, options) {
  2572. processKey(element);
  2573. // determine whether this is a plain element after
  2574. // removing structural attributes
  2575. element.plain = !element.key && !element.attrsList.length;
  2576. processRef(element);
  2577. processSlot(element);
  2578. processComponent(element);
  2579. for (var i = 0; i < transforms.length; i++) {
  2580. element = transforms[i](element, options) || element;
  2581. }
  2582. processAttrs(element);
  2583. }
  2584. function processKey (el) {
  2585. var exp = getBindingAttr(el, 'key');
  2586. if (exp) {
  2587. if ("development" !== 'production' && el.tag === 'template') {
  2588. warn$1("<template> cannot be keyed. Place the key on real elements instead.");
  2589. }
  2590. el.key = exp;
  2591. }
  2592. }
  2593. function processRef (el) {
  2594. var ref = getBindingAttr(el, 'ref');
  2595. if (ref) {
  2596. el.ref = ref;
  2597. el.refInFor = checkInFor(el);
  2598. }
  2599. }
  2600. function processFor (el) {
  2601. var exp;
  2602. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  2603. var inMatch = exp.match(forAliasRE);
  2604. if (!inMatch) {
  2605. "development" !== 'production' && warn$1(
  2606. ("Invalid v-for expression: " + exp)
  2607. );
  2608. return
  2609. }
  2610. el.for = inMatch[2].trim();
  2611. var alias = inMatch[1].trim();
  2612. var iteratorMatch = alias.match(forIteratorRE);
  2613. if (iteratorMatch) {
  2614. el.alias = iteratorMatch[1].trim();
  2615. el.iterator1 = iteratorMatch[2].trim();
  2616. if (iteratorMatch[3]) {
  2617. el.iterator2 = iteratorMatch[3].trim();
  2618. }
  2619. } else {
  2620. el.alias = alias;
  2621. }
  2622. }
  2623. }
  2624. function processIf (el) {
  2625. var exp = getAndRemoveAttr(el, 'v-if');
  2626. if (exp) {
  2627. el.if = exp;
  2628. addIfCondition(el, {
  2629. exp: exp,
  2630. block: el
  2631. });
  2632. } else {
  2633. if (getAndRemoveAttr(el, 'v-else') != null) {
  2634. el.else = true;
  2635. }
  2636. var elseif = getAndRemoveAttr(el, 'v-else-if');
  2637. if (elseif) {
  2638. el.elseif = elseif;
  2639. }
  2640. }
  2641. }
  2642. function processIfConditions (el, parent) {
  2643. var prev = findPrevElement(parent.children);
  2644. if (prev && prev.if) {
  2645. addIfCondition(prev, {
  2646. exp: el.elseif,
  2647. block: el
  2648. });
  2649. } else {
  2650. warn$1(
  2651. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  2652. "used on element <" + (el.tag) + "> without corresponding v-if."
  2653. );
  2654. }
  2655. }
  2656. function findPrevElement (children) {
  2657. var i = children.length;
  2658. while (i--) {
  2659. if (children[i].type === 1) {
  2660. return children[i]
  2661. } else {
  2662. if ("development" !== 'production' && children[i].text !== ' ') {
  2663. warn$1(
  2664. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  2665. "will be ignored."
  2666. );
  2667. }
  2668. children.pop();
  2669. }
  2670. }
  2671. }
  2672. function addIfCondition (el, condition) {
  2673. if (!el.ifConditions) {
  2674. el.ifConditions = [];
  2675. }
  2676. el.ifConditions.push(condition);
  2677. }
  2678. function processOnce (el) {
  2679. var once$$1 = getAndRemoveAttr(el, 'v-once');
  2680. if (once$$1 != null) {
  2681. el.once = true;
  2682. }
  2683. }
  2684. function processSlot (el) {
  2685. if (el.tag === 'slot') {
  2686. el.slotName = getBindingAttr(el, 'name');
  2687. if ("development" !== 'production' && el.key) {
  2688. warn$1(
  2689. "`key` does not work on <slot> because slots are abstract outlets " +
  2690. "and can possibly expand into multiple elements. " +
  2691. "Use the key on a wrapping element instead."
  2692. );
  2693. }
  2694. } else {
  2695. var slotScope;
  2696. if (el.tag === 'template') {
  2697. slotScope = getAndRemoveAttr(el, 'scope');
  2698. /* istanbul ignore if */
  2699. if ("development" !== 'production' && slotScope) {
  2700. warn$1(
  2701. "the \"scope\" attribute for scoped slots have been deprecated and " +
  2702. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  2703. "can also be used on plain elements in addition to <template> to " +
  2704. "denote scoped slots.",
  2705. true
  2706. );
  2707. }
  2708. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  2709. } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  2710. el.slotScope = slotScope;
  2711. }
  2712. var slotTarget = getBindingAttr(el, 'slot');
  2713. if (slotTarget) {
  2714. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  2715. // preserve slot as an attribute for native shadow DOM compat
  2716. // only for non-scoped slots.
  2717. if (el.tag !== 'template' && !el.slotScope) {
  2718. addAttr(el, 'slot', slotTarget);
  2719. }
  2720. }
  2721. }
  2722. }
  2723. function processComponent (el) {
  2724. var binding;
  2725. if ((binding = getBindingAttr(el, 'is'))) {
  2726. el.component = binding;
  2727. }
  2728. if (getAndRemoveAttr(el, 'inline-template') != null) {
  2729. el.inlineTemplate = true;
  2730. }
  2731. }
  2732. function processAttrs (el) {
  2733. var list = el.attrsList;
  2734. var i, l, name, rawName, value, modifiers, isProp;
  2735. for (i = 0, l = list.length; i < l; i++) {
  2736. name = rawName = list[i].name;
  2737. value = list[i].value;
  2738. if (dirRE.test(name)) {
  2739. // mark element as dynamic
  2740. el.hasBindings = true;
  2741. // modifiers
  2742. modifiers = parseModifiers(name);
  2743. if (modifiers) {
  2744. name = name.replace(modifierRE, '');
  2745. }
  2746. if (bindRE.test(name)) { // v-bind
  2747. name = name.replace(bindRE, '');
  2748. value = parseFilters(value);
  2749. isProp = false;
  2750. if (modifiers) {
  2751. if (modifiers.prop) {
  2752. isProp = true;
  2753. name = camelize(name);
  2754. if (name === 'innerHtml') { name = 'innerHTML'; }
  2755. }
  2756. if (modifiers.camel) {
  2757. name = camelize(name);
  2758. }
  2759. if (modifiers.sync) {
  2760. addHandler(
  2761. el,
  2762. ("update:" + (camelize(name))),
  2763. genAssignmentCode(value, "$event")
  2764. );
  2765. }
  2766. }
  2767. if (isProp || (
  2768. !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
  2769. )) {
  2770. addProp(el, name, value);
  2771. } else {
  2772. addAttr(el, name, value);
  2773. }
  2774. } else if (onRE.test(name)) { // v-on
  2775. name = name.replace(onRE, '');
  2776. addHandler(el, name, value, modifiers, false, warn$1);
  2777. } else { // normal directives
  2778. name = name.replace(dirRE, '');
  2779. // parse arg
  2780. var argMatch = name.match(argRE);
  2781. var arg = argMatch && argMatch[1];
  2782. if (arg) {
  2783. name = name.slice(0, -(arg.length + 1));
  2784. }
  2785. addDirective(el, name, rawName, value, arg, modifiers);
  2786. if ("development" !== 'production' && name === 'model') {
  2787. checkForAliasModel(el, value);
  2788. }
  2789. }
  2790. } else {
  2791. // literal attribute
  2792. {
  2793. var expression = parseText(value, delimiters);
  2794. if (expression) {
  2795. warn$1(
  2796. name + "=\"" + value + "\": " +
  2797. 'Interpolation inside attributes has been removed. ' +
  2798. 'Use v-bind or the colon shorthand instead. For example, ' +
  2799. 'instead of <div id="{{ val }}">, use <div :id="val">.'
  2800. );
  2801. }
  2802. }
  2803. addAttr(el, name, JSON.stringify(value));
  2804. // #6887 firefox doesn't update muted state if set via attribute
  2805. // even immediately after element creation
  2806. if (!el.component &&
  2807. name === 'muted' &&
  2808. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  2809. addProp(el, name, 'true');
  2810. }
  2811. }
  2812. }
  2813. }
  2814. function checkInFor (el) {
  2815. var parent = el;
  2816. while (parent) {
  2817. if (parent.for !== undefined) {
  2818. return true
  2819. }
  2820. parent = parent.parent;
  2821. }
  2822. return false
  2823. }
  2824. function parseModifiers (name) {
  2825. var match = name.match(modifierRE);
  2826. if (match) {
  2827. var ret = {};
  2828. match.forEach(function (m) { ret[m.slice(1)] = true; });
  2829. return ret
  2830. }
  2831. }
  2832. function makeAttrsMap (attrs) {
  2833. var map = {};
  2834. for (var i = 0, l = attrs.length; i < l; i++) {
  2835. if (
  2836. "development" !== 'production' &&
  2837. map[attrs[i].name] && !isIE && !isEdge
  2838. ) {
  2839. warn$1('duplicate attribute: ' + attrs[i].name);
  2840. }
  2841. map[attrs[i].name] = attrs[i].value;
  2842. }
  2843. return map
  2844. }
  2845. // for script (e.g. type="x/template") or style, do not decode content
  2846. function isTextTag (el) {
  2847. return el.tag === 'script' || el.tag === 'style'
  2848. }
  2849. function isForbiddenTag (el) {
  2850. return (
  2851. el.tag === 'style' ||
  2852. (el.tag === 'script' && (
  2853. !el.attrsMap.type ||
  2854. el.attrsMap.type === 'text/javascript'
  2855. ))
  2856. )
  2857. }
  2858. var ieNSBug = /^xmlns:NS\d+/;
  2859. var ieNSPrefix = /^NS\d+:/;
  2860. /* istanbul ignore next */
  2861. function guardIESVGBug (attrs) {
  2862. var res = [];
  2863. for (var i = 0; i < attrs.length; i++) {
  2864. var attr = attrs[i];
  2865. if (!ieNSBug.test(attr.name)) {
  2866. attr.name = attr.name.replace(ieNSPrefix, '');
  2867. res.push(attr);
  2868. }
  2869. }
  2870. return res
  2871. }
  2872. function checkForAliasModel (el, value) {
  2873. var _el = el;
  2874. while (_el) {
  2875. if (_el.for && _el.alias === value) {
  2876. warn$1(
  2877. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  2878. "You are binding v-model directly to a v-for iteration alias. " +
  2879. "This will not be able to modify the v-for source array because " +
  2880. "writing to the alias is like modifying a function local variable. " +
  2881. "Consider using an array of objects and use v-model on an object property instead."
  2882. );
  2883. }
  2884. _el = _el.parent;
  2885. }
  2886. }
  2887. /* */
  2888. /**
  2889. * Expand input[v-model] with dyanmic type bindings into v-if-else chains
  2890. * Turn this:
  2891. * <input v-model="data[type]" :type="type">
  2892. * into this:
  2893. * <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
  2894. * <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
  2895. * <input v-else :type="type" v-model="data[type]">
  2896. */
  2897. function preTransformNode (el, options) {
  2898. if (el.tag === 'input') {
  2899. var map = el.attrsMap;
  2900. if (map['v-model'] && (map['v-bind:type'] || map[':type'])) {
  2901. var typeBinding = getBindingAttr(el, 'type');
  2902. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  2903. var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
  2904. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  2905. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  2906. // 1. checkbox
  2907. var branch0 = cloneASTElement(el);
  2908. // process for on the main node
  2909. processFor(branch0);
  2910. addRawAttr(branch0, 'type', 'checkbox');
  2911. processElement(branch0, options);
  2912. branch0.processed = true; // prevent it from double-processed
  2913. branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
  2914. addIfCondition(branch0, {
  2915. exp: branch0.if,
  2916. block: branch0
  2917. });
  2918. // 2. add radio else-if condition
  2919. var branch1 = cloneASTElement(el);
  2920. getAndRemoveAttr(branch1, 'v-for', true);
  2921. addRawAttr(branch1, 'type', 'radio');
  2922. processElement(branch1, options);
  2923. addIfCondition(branch0, {
  2924. exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
  2925. block: branch1
  2926. });
  2927. // 3. other
  2928. var branch2 = cloneASTElement(el);
  2929. getAndRemoveAttr(branch2, 'v-for', true);
  2930. addRawAttr(branch2, ':type', typeBinding);
  2931. processElement(branch2, options);
  2932. addIfCondition(branch0, {
  2933. exp: ifCondition,
  2934. block: branch2
  2935. });
  2936. if (hasElse) {
  2937. branch0.else = true;
  2938. } else if (elseIfCondition) {
  2939. branch0.elseif = elseIfCondition;
  2940. }
  2941. return branch0
  2942. }
  2943. }
  2944. }
  2945. function cloneASTElement (el) {
  2946. return createASTElement(el.tag, el.attrsList.slice(), el.parent)
  2947. }
  2948. function addRawAttr (el, name, value) {
  2949. el.attrsMap[name] = value;
  2950. el.attrsList.push({ name: name, value: value });
  2951. }
  2952. var model = {
  2953. preTransformNode: preTransformNode
  2954. };
  2955. var modules = [
  2956. klass,
  2957. style,
  2958. model
  2959. ];
  2960. /* */
  2961. var warn$2;
  2962. // in some cases, the event used has to be determined at runtime
  2963. // so we used some reserved tokens during compile.
  2964. var RANGE_TOKEN = '__r';
  2965. function model$1 (
  2966. el,
  2967. dir,
  2968. _warn
  2969. ) {
  2970. warn$2 = _warn;
  2971. var value = dir.value;
  2972. var modifiers = dir.modifiers;
  2973. var tag = el.tag;
  2974. var type = el.attrsMap.type;
  2975. {
  2976. // inputs with type="file" are read only and setting the input's
  2977. // value will throw an error.
  2978. if (tag === 'input' && type === 'file') {
  2979. warn$2(
  2980. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  2981. "File inputs are read only. Use a v-on:change listener instead."
  2982. );
  2983. }
  2984. }
  2985. if (el.component) {
  2986. genComponentModel(el, value, modifiers);
  2987. // component v-model doesn't need extra runtime
  2988. return false
  2989. } else if (tag === 'select') {
  2990. genSelect(el, value, modifiers);
  2991. } else if (tag === 'input' && type === 'checkbox') {
  2992. genCheckboxModel(el, value, modifiers);
  2993. } else if (tag === 'input' && type === 'radio') {
  2994. genRadioModel(el, value, modifiers);
  2995. } else if (tag === 'input' || tag === 'textarea') {
  2996. genDefaultModel(el, value, modifiers);
  2997. } else if (!config.isReservedTag(tag)) {
  2998. genComponentModel(el, value, modifiers);
  2999. // component v-model doesn't need extra runtime
  3000. return false
  3001. } else {
  3002. warn$2(
  3003. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  3004. "v-model is not supported on this element type. " +
  3005. 'If you are working with contenteditable, it\'s recommended to ' +
  3006. 'wrap a library dedicated for that purpose inside a custom component.'
  3007. );
  3008. }
  3009. // ensure runtime directive metadata
  3010. return true
  3011. }
  3012. function genCheckboxModel (
  3013. el,
  3014. value,
  3015. modifiers
  3016. ) {
  3017. var number = modifiers && modifiers.number;
  3018. var valueBinding = getBindingAttr(el, 'value') || 'null';
  3019. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  3020. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  3021. addProp(el, 'checked',
  3022. "Array.isArray(" + value + ")" +
  3023. "?_i(" + value + "," + valueBinding + ")>-1" + (
  3024. trueValueBinding === 'true'
  3025. ? (":(" + value + ")")
  3026. : (":_q(" + value + "," + trueValueBinding + ")")
  3027. )
  3028. );
  3029. addHandler(el, 'change',
  3030. "var $$a=" + value + "," +
  3031. '$$el=$event.target,' +
  3032. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  3033. 'if(Array.isArray($$a)){' +
  3034. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  3035. '$$i=_i($$a,$$v);' +
  3036. "if($$el.checked){$$i<0&&(" + value + "=$$a.concat([$$v]))}" +
  3037. "else{$$i>-1&&(" + value + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}" +
  3038. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  3039. null, true
  3040. );
  3041. }
  3042. function genRadioModel (
  3043. el,
  3044. value,
  3045. modifiers
  3046. ) {
  3047. var number = modifiers && modifiers.number;
  3048. var valueBinding = getBindingAttr(el, 'value') || 'null';
  3049. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  3050. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  3051. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  3052. }
  3053. function genSelect (
  3054. el,
  3055. value,
  3056. modifiers
  3057. ) {
  3058. var number = modifiers && modifiers.number;
  3059. var selectedVal = "Array.prototype.filter" +
  3060. ".call($event.target.options,function(o){return o.selected})" +
  3061. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  3062. "return " + (number ? '_n(val)' : 'val') + "})";
  3063. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  3064. var code = "var $$selectedVal = " + selectedVal + ";";
  3065. code = code + " " + (genAssignmentCode(value, assignment));
  3066. addHandler(el, 'change', code, null, true);
  3067. }
  3068. function genDefaultModel (
  3069. el,
  3070. value,
  3071. modifiers
  3072. ) {
  3073. var type = el.attrsMap.type;
  3074. var ref = modifiers || {};
  3075. var lazy = ref.lazy;
  3076. var number = ref.number;
  3077. var trim = ref.trim;
  3078. var needCompositionGuard = !lazy && type !== 'range';
  3079. var event = lazy
  3080. ? 'change'
  3081. : type === 'range'
  3082. ? RANGE_TOKEN
  3083. : 'input';
  3084. var valueExpression = '$event.target.value';
  3085. if (trim) {
  3086. valueExpression = "$event.target.value.trim()";
  3087. }
  3088. if (number) {
  3089. valueExpression = "_n(" + valueExpression + ")";
  3090. }
  3091. var code = genAssignmentCode(value, valueExpression);
  3092. if (needCompositionGuard) {
  3093. code = "if($event.target.composing)return;" + code;
  3094. }
  3095. addProp(el, 'value', ("(" + value + ")"));
  3096. addHandler(el, event, code, null, true);
  3097. if (trim || number) {
  3098. addHandler(el, 'blur', '$forceUpdate()');
  3099. }
  3100. }
  3101. /* */
  3102. function text (el, dir) {
  3103. if (dir.value) {
  3104. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
  3105. }
  3106. }
  3107. /* */
  3108. function html (el, dir) {
  3109. if (dir.value) {
  3110. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
  3111. }
  3112. }
  3113. var directives = {
  3114. model: model$1,
  3115. text: text,
  3116. html: html
  3117. };
  3118. /* */
  3119. var baseOptions = {
  3120. expectHTML: true,
  3121. modules: modules,
  3122. directives: directives,
  3123. isPreTag: isPreTag,
  3124. isUnaryTag: isUnaryTag,
  3125. mustUseProp: mustUseProp,
  3126. canBeLeftOpenTag: canBeLeftOpenTag,
  3127. isReservedTag: isReservedTag,
  3128. getTagNamespace: getTagNamespace,
  3129. staticKeys: genStaticKeys(modules)
  3130. };
  3131. /* */
  3132. var isStaticKey;
  3133. var isPlatformReservedTag;
  3134. var genStaticKeysCached = cached(genStaticKeys$1);
  3135. /**
  3136. * Goal of the optimizer: walk the generated template AST tree
  3137. * and detect sub-trees that are purely static, i.e. parts of
  3138. * the DOM that never needs to change.
  3139. *
  3140. * Once we detect these sub-trees, we can:
  3141. *
  3142. * 1. Hoist them into constants, so that we no longer need to
  3143. * create fresh nodes for them on each re-render;
  3144. * 2. Completely skip them in the patching process.
  3145. */
  3146. function optimize (root, options) {
  3147. if (!root) { return }
  3148. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  3149. isPlatformReservedTag = options.isReservedTag || no;
  3150. // first pass: mark all non-static nodes.
  3151. markStatic(root);
  3152. // second pass: mark static roots.
  3153. markStaticRoots(root, false);
  3154. }
  3155. function genStaticKeys$1 (keys) {
  3156. return makeMap(
  3157. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +
  3158. (keys ? ',' + keys : '')
  3159. )
  3160. }
  3161. function markStatic (node) {
  3162. node.static = isStatic(node);
  3163. if (node.type === 1) {
  3164. // do not make component slot content static. this avoids
  3165. // 1. components not able to mutate slot nodes
  3166. // 2. static slot content fails for hot-reloading
  3167. if (
  3168. !isPlatformReservedTag(node.tag) &&
  3169. node.tag !== 'slot' &&
  3170. node.attrsMap['inline-template'] == null
  3171. ) {
  3172. return
  3173. }
  3174. for (var i = 0, l = node.children.length; i < l; i++) {
  3175. var child = node.children[i];
  3176. markStatic(child);
  3177. if (!child.static) {
  3178. node.static = false;
  3179. }
  3180. }
  3181. if (node.ifConditions) {
  3182. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  3183. var block = node.ifConditions[i$1].block;
  3184. markStatic(block);
  3185. if (!block.static) {
  3186. node.static = false;
  3187. }
  3188. }
  3189. }
  3190. }
  3191. }
  3192. function markStaticRoots (node, isInFor) {
  3193. if (node.type === 1) {
  3194. if (node.static || node.once) {
  3195. node.staticInFor = isInFor;
  3196. }
  3197. // For a node to qualify as a static root, it should have children that
  3198. // are not just static text. Otherwise the cost of hoisting out will
  3199. // outweigh the benefits and it's better off to just always render it fresh.
  3200. if (node.static && node.children.length && !(
  3201. node.children.length === 1 &&
  3202. node.children[0].type === 3
  3203. )) {
  3204. node.staticRoot = true;
  3205. return
  3206. } else {
  3207. node.staticRoot = false;
  3208. }
  3209. if (node.children) {
  3210. for (var i = 0, l = node.children.length; i < l; i++) {
  3211. markStaticRoots(node.children[i], isInFor || !!node.for);
  3212. }
  3213. }
  3214. if (node.ifConditions) {
  3215. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  3216. markStaticRoots(node.ifConditions[i$1].block, isInFor);
  3217. }
  3218. }
  3219. }
  3220. }
  3221. function isStatic (node) {
  3222. if (node.type === 2) { // expression
  3223. return false
  3224. }
  3225. if (node.type === 3) { // text
  3226. return true
  3227. }
  3228. return !!(node.pre || (
  3229. !node.hasBindings && // no dynamic bindings
  3230. !node.if && !node.for && // not v-if or v-for or v-else
  3231. !isBuiltInTag(node.tag) && // not a built-in
  3232. isPlatformReservedTag(node.tag) && // not a component
  3233. !isDirectChildOfTemplateFor(node) &&
  3234. Object.keys(node).every(isStaticKey)
  3235. ))
  3236. }
  3237. function isDirectChildOfTemplateFor (node) {
  3238. while (node.parent) {
  3239. node = node.parent;
  3240. if (node.tag !== 'template') {
  3241. return false
  3242. }
  3243. if (node.for) {
  3244. return true
  3245. }
  3246. }
  3247. return false
  3248. }
  3249. /* */
  3250. var fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
  3251. var simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/;
  3252. // keyCode aliases
  3253. var keyCodes = {
  3254. esc: 27,
  3255. tab: 9,
  3256. enter: 13,
  3257. space: 32,
  3258. up: 38,
  3259. left: 37,
  3260. right: 39,
  3261. down: 40,
  3262. 'delete': [8, 46]
  3263. };
  3264. // #4868: modifiers that prevent the execution of the listener
  3265. // need to explicitly return null so that we can determine whether to remove
  3266. // the listener for .once
  3267. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  3268. var modifierCode = {
  3269. stop: '$event.stopPropagation();',
  3270. prevent: '$event.preventDefault();',
  3271. self: genGuard("$event.target !== $event.currentTarget"),
  3272. ctrl: genGuard("!$event.ctrlKey"),
  3273. shift: genGuard("!$event.shiftKey"),
  3274. alt: genGuard("!$event.altKey"),
  3275. meta: genGuard("!$event.metaKey"),
  3276. left: genGuard("'button' in $event && $event.button !== 0"),
  3277. middle: genGuard("'button' in $event && $event.button !== 1"),
  3278. right: genGuard("'button' in $event && $event.button !== 2")
  3279. };
  3280. function genHandlers (
  3281. events,
  3282. isNative,
  3283. warn
  3284. ) {
  3285. var res = isNative ? 'nativeOn:{' : 'on:{';
  3286. for (var name in events) {
  3287. var handler = events[name];
  3288. // #5330: warn click.right, since right clicks do not actually fire click events.
  3289. if ("development" !== 'production' &&
  3290. name === 'click' &&
  3291. handler && handler.modifiers && handler.modifiers.right
  3292. ) {
  3293. warn(
  3294. "Use \"contextmenu\" instead of \"click.right\" since right clicks " +
  3295. "do not actually fire \"click\" events."
  3296. );
  3297. }
  3298. res += "\"" + name + "\":" + (genHandler(name, handler)) + ",";
  3299. }
  3300. return res.slice(0, -1) + '}'
  3301. }
  3302. function genHandler (
  3303. name,
  3304. handler
  3305. ) {
  3306. if (!handler) {
  3307. return 'function(){}'
  3308. }
  3309. if (Array.isArray(handler)) {
  3310. return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
  3311. }
  3312. var isMethodPath = simplePathRE.test(handler.value);
  3313. var isFunctionExpression = fnExpRE.test(handler.value);
  3314. if (!handler.modifiers) {
  3315. return isMethodPath || isFunctionExpression
  3316. ? handler.value
  3317. : ("function($event){" + (handler.value) + "}") // inline statement
  3318. } else {
  3319. var code = '';
  3320. var genModifierCode = '';
  3321. var keys = [];
  3322. for (var key in handler.modifiers) {
  3323. if (modifierCode[key]) {
  3324. genModifierCode += modifierCode[key];
  3325. // left/right
  3326. if (keyCodes[key]) {
  3327. keys.push(key);
  3328. }
  3329. } else if (key === 'exact') {
  3330. var modifiers = (handler.modifiers);
  3331. genModifierCode += genGuard(
  3332. ['ctrl', 'shift', 'alt', 'meta']
  3333. .filter(function (keyModifier) { return !modifiers[keyModifier]; })
  3334. .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
  3335. .join('||')
  3336. );
  3337. } else {
  3338. keys.push(key);
  3339. }
  3340. }
  3341. if (keys.length) {
  3342. code += genKeyFilter(keys);
  3343. }
  3344. // Make sure modifiers like prevent and stop get executed after key filtering
  3345. if (genModifierCode) {
  3346. code += genModifierCode;
  3347. }
  3348. var handlerCode = isMethodPath
  3349. ? handler.value + '($event)'
  3350. : isFunctionExpression
  3351. ? ("(" + (handler.value) + ")($event)")
  3352. : handler.value;
  3353. return ("function($event){" + code + handlerCode + "}")
  3354. }
  3355. }
  3356. function genKeyFilter (keys) {
  3357. return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
  3358. }
  3359. function genFilterCode (key) {
  3360. var keyVal = parseInt(key, 10);
  3361. if (keyVal) {
  3362. return ("$event.keyCode!==" + keyVal)
  3363. }
  3364. var code = keyCodes[key];
  3365. return (
  3366. "_k($event.keyCode," +
  3367. (JSON.stringify(key)) + "," +
  3368. (JSON.stringify(code)) + "," +
  3369. "$event.key)"
  3370. )
  3371. }
  3372. /* */
  3373. function on (el, dir) {
  3374. if ("development" !== 'production' && dir.modifiers) {
  3375. warn("v-on without argument does not support modifiers.");
  3376. }
  3377. el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
  3378. }
  3379. /* */
  3380. function bind$1 (el, dir) {
  3381. el.wrapData = function (code) {
  3382. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
  3383. };
  3384. }
  3385. /* */
  3386. var baseDirectives = {
  3387. on: on,
  3388. bind: bind$1,
  3389. cloak: noop
  3390. };
  3391. /* */
  3392. var CodegenState = function CodegenState (options) {
  3393. this.options = options;
  3394. this.warn = options.warn || baseWarn;
  3395. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  3396. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  3397. this.directives = extend(extend({}, baseDirectives), options.directives);
  3398. var isReservedTag = options.isReservedTag || no;
  3399. this.maybeComponent = function (el) { return !isReservedTag(el.tag); };
  3400. this.onceId = 0;
  3401. this.staticRenderFns = [];
  3402. };
  3403. function generate (
  3404. ast,
  3405. options
  3406. ) {
  3407. var state = new CodegenState(options);
  3408. var code = ast ? genElement(ast, state) : '_c("div")';
  3409. return {
  3410. render: ("with(this){return " + code + "}"),
  3411. staticRenderFns: state.staticRenderFns
  3412. }
  3413. }
  3414. function genElement (el, state) {
  3415. if (el.staticRoot && !el.staticProcessed) {
  3416. return genStatic(el, state)
  3417. } else if (el.once && !el.onceProcessed) {
  3418. return genOnce(el, state)
  3419. } else if (el.for && !el.forProcessed) {
  3420. return genFor(el, state)
  3421. } else if (el.if && !el.ifProcessed) {
  3422. return genIf(el, state)
  3423. } else if (el.tag === 'template' && !el.slotTarget) {
  3424. return genChildren(el, state) || 'void 0'
  3425. } else if (el.tag === 'slot') {
  3426. return genSlot(el, state)
  3427. } else {
  3428. // component or element
  3429. var code;
  3430. if (el.component) {
  3431. code = genComponent(el.component, el, state);
  3432. } else {
  3433. var data = el.plain ? undefined : genData$2(el, state);
  3434. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  3435. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  3436. }
  3437. // module transforms
  3438. for (var i = 0; i < state.transforms.length; i++) {
  3439. code = state.transforms[i](el, code);
  3440. }
  3441. return code
  3442. }
  3443. }
  3444. // hoist static sub-trees out
  3445. function genStatic (el, state) {
  3446. el.staticProcessed = true;
  3447. state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
  3448. return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  3449. }
  3450. // v-once
  3451. function genOnce (el, state) {
  3452. el.onceProcessed = true;
  3453. if (el.if && !el.ifProcessed) {
  3454. return genIf(el, state)
  3455. } else if (el.staticInFor) {
  3456. var key = '';
  3457. var parent = el.parent;
  3458. while (parent) {
  3459. if (parent.for) {
  3460. key = parent.key;
  3461. break
  3462. }
  3463. parent = parent.parent;
  3464. }
  3465. if (!key) {
  3466. "development" !== 'production' && state.warn(
  3467. "v-once can only be used inside v-for that is keyed. "
  3468. );
  3469. return genElement(el, state)
  3470. }
  3471. return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
  3472. } else {
  3473. return genStatic(el, state)
  3474. }
  3475. }
  3476. function genIf (
  3477. el,
  3478. state,
  3479. altGen,
  3480. altEmpty
  3481. ) {
  3482. el.ifProcessed = true; // avoid recursion
  3483. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
  3484. }
  3485. function genIfConditions (
  3486. conditions,
  3487. state,
  3488. altGen,
  3489. altEmpty
  3490. ) {
  3491. if (!conditions.length) {
  3492. return altEmpty || '_e()'
  3493. }
  3494. var condition = conditions.shift();
  3495. if (condition.exp) {
  3496. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
  3497. } else {
  3498. return ("" + (genTernaryExp(condition.block)))
  3499. }
  3500. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  3501. function genTernaryExp (el) {
  3502. return altGen
  3503. ? altGen(el, state)
  3504. : el.once
  3505. ? genOnce(el, state)
  3506. : genElement(el, state)
  3507. }
  3508. }
  3509. function genFor (
  3510. el,
  3511. state,
  3512. altGen,
  3513. altHelper
  3514. ) {
  3515. var exp = el.for;
  3516. var alias = el.alias;
  3517. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  3518. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  3519. if ("development" !== 'production' &&
  3520. state.maybeComponent(el) &&
  3521. el.tag !== 'slot' &&
  3522. el.tag !== 'template' &&
  3523. !el.key
  3524. ) {
  3525. state.warn(
  3526. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  3527. "v-for should have explicit keys. " +
  3528. "See https://vuejs.org/guide/list.html#key for more info.",
  3529. true /* tip */
  3530. );
  3531. }
  3532. el.forProcessed = true; // avoid recursion
  3533. return (altHelper || '_l') + "((" + exp + ")," +
  3534. "function(" + alias + iterator1 + iterator2 + "){" +
  3535. "return " + ((altGen || genElement)(el, state)) +
  3536. '})'
  3537. }
  3538. function genData$2 (el, state) {
  3539. var data = '{';
  3540. // directives first.
  3541. // directives may mutate the el's other properties before they are generated.
  3542. var dirs = genDirectives(el, state);
  3543. if (dirs) { data += dirs + ','; }
  3544. // key
  3545. if (el.key) {
  3546. data += "key:" + (el.key) + ",";
  3547. }
  3548. // ref
  3549. if (el.ref) {
  3550. data += "ref:" + (el.ref) + ",";
  3551. }
  3552. if (el.refInFor) {
  3553. data += "refInFor:true,";
  3554. }
  3555. // pre
  3556. if (el.pre) {
  3557. data += "pre:true,";
  3558. }
  3559. // record original tag name for components using "is" attribute
  3560. if (el.component) {
  3561. data += "tag:\"" + (el.tag) + "\",";
  3562. }
  3563. // module data generation functions
  3564. for (var i = 0; i < state.dataGenFns.length; i++) {
  3565. data += state.dataGenFns[i](el);
  3566. }
  3567. // attributes
  3568. if (el.attrs) {
  3569. data += "attrs:{" + (genProps(el.attrs)) + "},";
  3570. }
  3571. // DOM props
  3572. if (el.props) {
  3573. data += "domProps:{" + (genProps(el.props)) + "},";
  3574. }
  3575. // event handlers
  3576. if (el.events) {
  3577. data += (genHandlers(el.events, false, state.warn)) + ",";
  3578. }
  3579. if (el.nativeEvents) {
  3580. data += (genHandlers(el.nativeEvents, true, state.warn)) + ",";
  3581. }
  3582. // slot target
  3583. // only for non-scoped slots
  3584. if (el.slotTarget && !el.slotScope) {
  3585. data += "slot:" + (el.slotTarget) + ",";
  3586. }
  3587. // scoped slots
  3588. if (el.scopedSlots) {
  3589. data += (genScopedSlots(el.scopedSlots, state)) + ",";
  3590. }
  3591. // component v-model
  3592. if (el.model) {
  3593. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  3594. }
  3595. // inline-template
  3596. if (el.inlineTemplate) {
  3597. var inlineTemplate = genInlineTemplate(el, state);
  3598. if (inlineTemplate) {
  3599. data += inlineTemplate + ",";
  3600. }
  3601. }
  3602. data = data.replace(/,$/, '') + '}';
  3603. // v-bind data wrap
  3604. if (el.wrapData) {
  3605. data = el.wrapData(data);
  3606. }
  3607. // v-on data wrap
  3608. if (el.wrapListeners) {
  3609. data = el.wrapListeners(data);
  3610. }
  3611. return data
  3612. }
  3613. function genDirectives (el, state) {
  3614. var dirs = el.directives;
  3615. if (!dirs) { return }
  3616. var res = 'directives:[';
  3617. var hasRuntime = false;
  3618. var i, l, dir, needRuntime;
  3619. for (i = 0, l = dirs.length; i < l; i++) {
  3620. dir = dirs[i];
  3621. needRuntime = true;
  3622. var gen = state.directives[dir.name];
  3623. if (gen) {
  3624. // compile-time directive that manipulates AST.
  3625. // returns true if it also needs a runtime counterpart.
  3626. needRuntime = !!gen(el, dir, state.warn);
  3627. }
  3628. if (needRuntime) {
  3629. hasRuntime = true;
  3630. 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))) : '') + "},";
  3631. }
  3632. }
  3633. if (hasRuntime) {
  3634. return res.slice(0, -1) + ']'
  3635. }
  3636. }
  3637. function genInlineTemplate (el, state) {
  3638. var ast = el.children[0];
  3639. if ("development" !== 'production' && (
  3640. el.children.length !== 1 || ast.type !== 1
  3641. )) {
  3642. state.warn('Inline-template components must have exactly one child element.');
  3643. }
  3644. if (ast.type === 1) {
  3645. var inlineRenderFns = generate(ast, state.options);
  3646. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  3647. }
  3648. }
  3649. function genScopedSlots (
  3650. slots,
  3651. state
  3652. ) {
  3653. return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
  3654. return genScopedSlot(key, slots[key], state)
  3655. }).join(',')) + "])")
  3656. }
  3657. function genScopedSlot (
  3658. key,
  3659. el,
  3660. state
  3661. ) {
  3662. if (el.for && !el.forProcessed) {
  3663. return genForScopedSlot(key, el, state)
  3664. }
  3665. var fn = "function(" + (String(el.slotScope)) + "){" +
  3666. "return " + (el.tag === 'template'
  3667. ? el.if
  3668. ? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined")
  3669. : genChildren(el, state) || 'undefined'
  3670. : genElement(el, state)) + "}";
  3671. return ("{key:" + key + ",fn:" + fn + "}")
  3672. }
  3673. function genForScopedSlot (
  3674. key,
  3675. el,
  3676. state
  3677. ) {
  3678. var exp = el.for;
  3679. var alias = el.alias;
  3680. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  3681. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  3682. el.forProcessed = true; // avoid recursion
  3683. return "_l((" + exp + ")," +
  3684. "function(" + alias + iterator1 + iterator2 + "){" +
  3685. "return " + (genScopedSlot(key, el, state)) +
  3686. '})'
  3687. }
  3688. function genChildren (
  3689. el,
  3690. state,
  3691. checkSkip,
  3692. altGenElement,
  3693. altGenNode
  3694. ) {
  3695. var children = el.children;
  3696. if (children.length) {
  3697. var el$1 = children[0];
  3698. // optimize single v-for
  3699. if (children.length === 1 &&
  3700. el$1.for &&
  3701. el$1.tag !== 'template' &&
  3702. el$1.tag !== 'slot'
  3703. ) {
  3704. return (altGenElement || genElement)(el$1, state)
  3705. }
  3706. var normalizationType = checkSkip
  3707. ? getNormalizationType(children, state.maybeComponent)
  3708. : 0;
  3709. var gen = altGenNode || genNode;
  3710. return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
  3711. }
  3712. }
  3713. // determine the normalization needed for the children array.
  3714. // 0: no normalization needed
  3715. // 1: simple normalization needed (possible 1-level deep nested array)
  3716. // 2: full normalization needed
  3717. function getNormalizationType (
  3718. children,
  3719. maybeComponent
  3720. ) {
  3721. var res = 0;
  3722. for (var i = 0; i < children.length; i++) {
  3723. var el = children[i];
  3724. if (el.type !== 1) {
  3725. continue
  3726. }
  3727. if (needsNormalization(el) ||
  3728. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  3729. res = 2;
  3730. break
  3731. }
  3732. if (maybeComponent(el) ||
  3733. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  3734. res = 1;
  3735. }
  3736. }
  3737. return res
  3738. }
  3739. function needsNormalization (el) {
  3740. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  3741. }
  3742. function genNode (node, state) {
  3743. if (node.type === 1) {
  3744. return genElement(node, state)
  3745. } if (node.type === 3 && node.isComment) {
  3746. return genComment(node)
  3747. } else {
  3748. return genText(node)
  3749. }
  3750. }
  3751. function genText (text) {
  3752. return ("_v(" + (text.type === 2
  3753. ? text.expression // no need for () because already wrapped in _s()
  3754. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  3755. }
  3756. function genComment (comment) {
  3757. return ("_e(" + (JSON.stringify(comment.text)) + ")")
  3758. }
  3759. function genSlot (el, state) {
  3760. var slotName = el.slotName || '"default"';
  3761. var children = genChildren(el, state);
  3762. var res = "_t(" + slotName + (children ? ("," + children) : '');
  3763. var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
  3764. var bind$$1 = el.attrsMap['v-bind'];
  3765. if ((attrs || bind$$1) && !children) {
  3766. res += ",null";
  3767. }
  3768. if (attrs) {
  3769. res += "," + attrs;
  3770. }
  3771. if (bind$$1) {
  3772. res += (attrs ? '' : ',null') + "," + bind$$1;
  3773. }
  3774. return res + ')'
  3775. }
  3776. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  3777. function genComponent (
  3778. componentName,
  3779. el,
  3780. state
  3781. ) {
  3782. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  3783. return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
  3784. }
  3785. function genProps (props) {
  3786. var res = '';
  3787. for (var i = 0; i < props.length; i++) {
  3788. var prop = props[i];
  3789. res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
  3790. }
  3791. return res.slice(0, -1)
  3792. }
  3793. // #3895, #4268
  3794. function transformSpecialNewlines (text) {
  3795. return text
  3796. .replace(/\u2028/g, '\\u2028')
  3797. .replace(/\u2029/g, '\\u2029')
  3798. }
  3799. /* */
  3800. // these keywords should not appear inside expressions, but operators like
  3801. // typeof, instanceof and in are allowed
  3802. var prohibitedKeywordRE = new RegExp('\\b' + (
  3803. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  3804. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  3805. 'extends,finally,continue,debugger,function,arguments'
  3806. ).split(',').join('\\b|\\b') + '\\b');
  3807. // these unary operators should not be used as property/method names
  3808. var unaryOperatorsRE = new RegExp('\\b' + (
  3809. 'delete,typeof,void'
  3810. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  3811. // check valid identifier for v-for
  3812. var identRE = /[A-Za-z_$][\w$]*/;
  3813. // strip strings in expressions
  3814. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  3815. // detect problematic expressions in a template
  3816. function detectErrors (ast) {
  3817. var errors = [];
  3818. if (ast) {
  3819. checkNode(ast, errors);
  3820. }
  3821. return errors
  3822. }
  3823. function checkNode (node, errors) {
  3824. if (node.type === 1) {
  3825. for (var name in node.attrsMap) {
  3826. if (dirRE.test(name)) {
  3827. var value = node.attrsMap[name];
  3828. if (value) {
  3829. if (name === 'v-for') {
  3830. checkFor(node, ("v-for=\"" + value + "\""), errors);
  3831. } else if (onRE.test(name)) {
  3832. checkEvent(value, (name + "=\"" + value + "\""), errors);
  3833. } else {
  3834. checkExpression(value, (name + "=\"" + value + "\""), errors);
  3835. }
  3836. }
  3837. }
  3838. }
  3839. if (node.children) {
  3840. for (var i = 0; i < node.children.length; i++) {
  3841. checkNode(node.children[i], errors);
  3842. }
  3843. }
  3844. } else if (node.type === 2) {
  3845. checkExpression(node.expression, node.text, errors);
  3846. }
  3847. }
  3848. function checkEvent (exp, text, errors) {
  3849. var stipped = exp.replace(stripStringRE, '');
  3850. var keywordMatch = stipped.match(unaryOperatorsRE);
  3851. if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
  3852. errors.push(
  3853. "avoid using JavaScript unary operator as property name: " +
  3854. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
  3855. );
  3856. }
  3857. checkExpression(exp, text, errors);
  3858. }
  3859. function checkFor (node, text, errors) {
  3860. checkExpression(node.for || '', text, errors);
  3861. checkIdentifier(node.alias, 'v-for alias', text, errors);
  3862. checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
  3863. checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
  3864. }
  3865. function checkIdentifier (ident, type, text, errors) {
  3866. if (typeof ident === 'string' && !identRE.test(ident)) {
  3867. errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
  3868. }
  3869. }
  3870. function checkExpression (exp, text, errors) {
  3871. try {
  3872. new Function(("return " + exp));
  3873. } catch (e) {
  3874. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  3875. if (keywordMatch) {
  3876. errors.push(
  3877. "avoid using JavaScript keyword as property name: " +
  3878. "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
  3879. );
  3880. } else {
  3881. errors.push(
  3882. "invalid expression: " + (e.message) + " in\n\n" +
  3883. " " + exp + "\n\n" +
  3884. " Raw expression: " + (text.trim()) + "\n"
  3885. );
  3886. }
  3887. }
  3888. }
  3889. /* */
  3890. function createFunction (code, errors) {
  3891. try {
  3892. return new Function(code)
  3893. } catch (err) {
  3894. errors.push({ err: err, code: code });
  3895. return noop
  3896. }
  3897. }
  3898. function createCompileToFunctionFn (compile) {
  3899. var cache = Object.create(null);
  3900. return function compileToFunctions (
  3901. template,
  3902. options,
  3903. vm
  3904. ) {
  3905. options = extend({}, options);
  3906. var warn$$1 = options.warn || warn;
  3907. delete options.warn;
  3908. /* istanbul ignore if */
  3909. {
  3910. // detect possible CSP restriction
  3911. try {
  3912. new Function('return 1');
  3913. } catch (e) {
  3914. if (e.toString().match(/unsafe-eval|CSP/)) {
  3915. warn$$1(
  3916. 'It seems you are using the standalone build of Vue.js in an ' +
  3917. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  3918. 'The template compiler cannot work in this environment. Consider ' +
  3919. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  3920. 'templates into render functions.'
  3921. );
  3922. }
  3923. }
  3924. }
  3925. // check cache
  3926. var key = options.delimiters
  3927. ? String(options.delimiters) + template
  3928. : template;
  3929. if (cache[key]) {
  3930. return cache[key]
  3931. }
  3932. // compile
  3933. var compiled = compile(template, options);
  3934. // check compilation errors/tips
  3935. {
  3936. if (compiled.errors && compiled.errors.length) {
  3937. warn$$1(
  3938. "Error compiling template:\n\n" + template + "\n\n" +
  3939. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  3940. vm
  3941. );
  3942. }
  3943. if (compiled.tips && compiled.tips.length) {
  3944. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  3945. }
  3946. }
  3947. // turn code into functions
  3948. var res = {};
  3949. var fnGenErrors = [];
  3950. res.render = createFunction(compiled.render, fnGenErrors);
  3951. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  3952. return createFunction(code, fnGenErrors)
  3953. });
  3954. // check function generation errors.
  3955. // this should only happen if there is a bug in the compiler itself.
  3956. // mostly for codegen development use
  3957. /* istanbul ignore if */
  3958. {
  3959. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  3960. warn$$1(
  3961. "Failed to generate render function:\n\n" +
  3962. fnGenErrors.map(function (ref) {
  3963. var err = ref.err;
  3964. var code = ref.code;
  3965. return ((err.toString()) + " in\n\n" + code + "\n");
  3966. }).join('\n'),
  3967. vm
  3968. );
  3969. }
  3970. }
  3971. return (cache[key] = res)
  3972. }
  3973. }
  3974. /* */
  3975. function createCompilerCreator (baseCompile) {
  3976. return function createCompiler (baseOptions) {
  3977. function compile (
  3978. template,
  3979. options
  3980. ) {
  3981. var finalOptions = Object.create(baseOptions);
  3982. var errors = [];
  3983. var tips = [];
  3984. finalOptions.warn = function (msg, tip) {
  3985. (tip ? tips : errors).push(msg);
  3986. };
  3987. if (options) {
  3988. // merge custom modules
  3989. if (options.modules) {
  3990. finalOptions.modules =
  3991. (baseOptions.modules || []).concat(options.modules);
  3992. }
  3993. // merge custom directives
  3994. if (options.directives) {
  3995. finalOptions.directives = extend(
  3996. Object.create(baseOptions.directives),
  3997. options.directives
  3998. );
  3999. }
  4000. // copy other options
  4001. for (var key in options) {
  4002. if (key !== 'modules' && key !== 'directives') {
  4003. finalOptions[key] = options[key];
  4004. }
  4005. }
  4006. }
  4007. var compiled = baseCompile(template, finalOptions);
  4008. {
  4009. errors.push.apply(errors, detectErrors(compiled.ast));
  4010. }
  4011. compiled.errors = errors;
  4012. compiled.tips = tips;
  4013. return compiled
  4014. }
  4015. return {
  4016. compile: compile,
  4017. compileToFunctions: createCompileToFunctionFn(compile)
  4018. }
  4019. }
  4020. }
  4021. /* */
  4022. // `createCompilerCreator` allows creating compilers that use alternative
  4023. // parser/optimizer/codegen, e.g the SSR optimizing compiler.
  4024. // Here we just export a default compiler using the default parts.
  4025. var createCompiler = createCompilerCreator(function baseCompile (
  4026. template,
  4027. options
  4028. ) {
  4029. var ast = parse(template.trim(), options);
  4030. optimize(ast, options);
  4031. var code = generate(ast, options);
  4032. return {
  4033. ast: ast,
  4034. render: code.render,
  4035. staticRenderFns: code.staticRenderFns
  4036. }
  4037. });
  4038. /* */
  4039. var ref = createCompiler(baseOptions);
  4040. var compile = ref.compile;
  4041. var compileToFunctions = ref.compileToFunctions;
  4042. /* */
  4043. var isAttr = makeMap(
  4044. 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
  4045. 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
  4046. 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
  4047. 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
  4048. 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
  4049. 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
  4050. 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
  4051. 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
  4052. 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
  4053. 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
  4054. 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
  4055. 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
  4056. 'target,title,type,usemap,value,width,wrap'
  4057. );
  4058. /* istanbul ignore next */
  4059. var isRenderableAttr = function (name) {
  4060. return (
  4061. isAttr(name) ||
  4062. name.indexOf('data-') === 0 ||
  4063. name.indexOf('aria-') === 0
  4064. )
  4065. };
  4066. var propsToAttrMap = {
  4067. acceptCharset: 'accept-charset',
  4068. className: 'class',
  4069. htmlFor: 'for',
  4070. httpEquiv: 'http-equiv'
  4071. };
  4072. var ESC = {
  4073. '<': '&lt;',
  4074. '>': '&gt;',
  4075. '"': '&quot;',
  4076. '&': '&amp;'
  4077. };
  4078. function escape (s) {
  4079. return s.replace(/[<>"&]/g, escapeChar)
  4080. }
  4081. function escapeChar (a) {
  4082. return ESC[a] || a
  4083. }
  4084. /* */
  4085. var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
  4086. // let the model AST transform translate v-model into appropriate
  4087. // props bindings
  4088. function applyModelTransform (el, state) {
  4089. if (el.directives) {
  4090. for (var i = 0; i < el.directives.length; i++) {
  4091. var dir = el.directives[i];
  4092. if (dir.name === 'model') {
  4093. state.directives.model(el, dir, state.warn);
  4094. // remove value for textarea as its converted to text
  4095. if (el.tag === 'textarea' && el.props) {
  4096. el.props = el.props.filter(function (p) { return p.name !== 'value'; });
  4097. }
  4098. break
  4099. }
  4100. }
  4101. }
  4102. }
  4103. function genAttrSegments (
  4104. attrs
  4105. ) {
  4106. return attrs.map(function (ref) {
  4107. var name = ref.name;
  4108. var value = ref.value;
  4109. return genAttrSegment(name, value);
  4110. })
  4111. }
  4112. function genDOMPropSegments (
  4113. props,
  4114. attrs
  4115. ) {
  4116. var segments = [];
  4117. props.forEach(function (ref) {
  4118. var name = ref.name;
  4119. var value = ref.value;
  4120. name = propsToAttrMap[name] || name.toLowerCase();
  4121. if (isRenderableAttr(name) &&
  4122. !(attrs && attrs.some(function (a) { return a.name === name; }))
  4123. ) {
  4124. segments.push(genAttrSegment(name, value));
  4125. }
  4126. });
  4127. return segments
  4128. }
  4129. function genAttrSegment (name, value) {
  4130. if (plainStringRE.test(value)) {
  4131. // force double quote
  4132. value = value.replace(/^'|'$/g, '"');
  4133. // force enumerated attr to "true"
  4134. if (isEnumeratedAttr(name) && value !== "\"false\"") {
  4135. value = "\"true\"";
  4136. }
  4137. return {
  4138. type: RAW,
  4139. value: isBooleanAttr(name)
  4140. ? (" " + name + "=\"" + name + "\"")
  4141. : value === '""'
  4142. ? (" " + name)
  4143. : (" " + name + "=" + value)
  4144. }
  4145. } else {
  4146. return {
  4147. type: EXPRESSION,
  4148. value: ("_ssrAttr(" + (JSON.stringify(name)) + "," + value + ")")
  4149. }
  4150. }
  4151. }
  4152. function genClassSegments (
  4153. staticClass,
  4154. classBinding
  4155. ) {
  4156. if (staticClass && !classBinding) {
  4157. return [{ type: RAW, value: (" class=" + staticClass) }]
  4158. } else {
  4159. return [{
  4160. type: EXPRESSION,
  4161. value: ("_ssrClass(" + (staticClass || 'null') + "," + (classBinding || 'null') + ")")
  4162. }]
  4163. }
  4164. }
  4165. function genStyleSegments (
  4166. staticStyle,
  4167. parsedStaticStyle,
  4168. styleBinding,
  4169. vShowExpression
  4170. ) {
  4171. if (staticStyle && !styleBinding && !vShowExpression) {
  4172. return [{ type: RAW, value: (" style=" + (JSON.stringify(staticStyle))) }]
  4173. } else {
  4174. return [{
  4175. type: EXPRESSION,
  4176. value: ("_ssrStyle(" + (parsedStaticStyle || 'null') + "," + (styleBinding || 'null') + ", " + (vShowExpression
  4177. ? ("{ display: (" + vShowExpression + ") ? '' : 'none' }")
  4178. : 'null') + ")")
  4179. }]
  4180. }
  4181. }
  4182. /* */
  4183. /**
  4184. * In SSR, the vdom tree is generated only once and never patched, so
  4185. * we can optimize most element / trees into plain string render functions.
  4186. * The SSR optimizer walks the AST tree to detect optimizable elements and trees.
  4187. *
  4188. * The criteria for SSR optimizability is quite a bit looser than static tree
  4189. * detection (which is designed for client re-render). In SSR we bail only for
  4190. * components/slots/custom directives.
  4191. */
  4192. // optimizability constants
  4193. var optimizability = {
  4194. FALSE: 0, // whole sub tree un-optimizable
  4195. FULL: 1, // whole sub tree optimizable
  4196. SELF: 2, // self optimizable but has some un-optimizable children
  4197. CHILDREN: 3, // self un-optimizable but have fully optimizable children
  4198. PARTIAL: 4 // self un-optimizable with some un-optimizable children
  4199. };
  4200. var isPlatformReservedTag$1;
  4201. function optimize$1 (root, options) {
  4202. if (!root) { return }
  4203. isPlatformReservedTag$1 = options.isReservedTag || no;
  4204. walk(root, true);
  4205. }
  4206. function walk (node, isRoot) {
  4207. if (isUnOptimizableTree(node)) {
  4208. node.ssrOptimizability = optimizability.FALSE;
  4209. return
  4210. }
  4211. // root node or nodes with custom directives should always be a VNode
  4212. var selfUnoptimizable = isRoot || hasCustomDirective(node);
  4213. var check = function (child) {
  4214. if (child.ssrOptimizability !== optimizability.FULL) {
  4215. node.ssrOptimizability = selfUnoptimizable
  4216. ? optimizability.PARTIAL
  4217. : optimizability.SELF;
  4218. }
  4219. };
  4220. if (selfUnoptimizable) {
  4221. node.ssrOptimizability = optimizability.CHILDREN;
  4222. }
  4223. if (node.type === 1) {
  4224. for (var i = 0, l = node.children.length; i < l; i++) {
  4225. var child = node.children[i];
  4226. walk(child);
  4227. check(child);
  4228. }
  4229. if (node.ifConditions) {
  4230. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  4231. var block = node.ifConditions[i$1].block;
  4232. walk(block, isRoot);
  4233. check(block);
  4234. }
  4235. }
  4236. if (node.ssrOptimizability == null ||
  4237. (!isRoot && (node.attrsMap['v-html'] || node.attrsMap['v-text']))
  4238. ) {
  4239. node.ssrOptimizability = optimizability.FULL;
  4240. } else {
  4241. node.children = optimizeSiblings(node);
  4242. }
  4243. } else {
  4244. node.ssrOptimizability = optimizability.FULL;
  4245. }
  4246. }
  4247. function optimizeSiblings (el) {
  4248. var children = el.children;
  4249. var optimizedChildren = [];
  4250. var currentOptimizableGroup = [];
  4251. var pushGroup = function () {
  4252. if (currentOptimizableGroup.length) {
  4253. optimizedChildren.push({
  4254. type: 1,
  4255. parent: el,
  4256. tag: 'template',
  4257. attrsList: [],
  4258. attrsMap: {},
  4259. children: currentOptimizableGroup,
  4260. ssrOptimizability: optimizability.FULL
  4261. });
  4262. }
  4263. currentOptimizableGroup = [];
  4264. };
  4265. for (var i = 0; i < children.length; i++) {
  4266. var c = children[i];
  4267. if (c.ssrOptimizability === optimizability.FULL) {
  4268. currentOptimizableGroup.push(c);
  4269. } else {
  4270. // wrap fully-optimizable adjacent siblings inside a template tag
  4271. // so that they can be optimized into a single ssrNode by codegen
  4272. pushGroup();
  4273. optimizedChildren.push(c);
  4274. }
  4275. }
  4276. pushGroup();
  4277. return optimizedChildren
  4278. }
  4279. function isUnOptimizableTree (node) {
  4280. if (node.type === 2 || node.type === 3) { // text or expression
  4281. return false
  4282. }
  4283. return (
  4284. isBuiltInTag(node.tag) || // built-in (slot, component)
  4285. !isPlatformReservedTag$1(node.tag) || // custom component
  4286. !!node.component || // "is" component
  4287. isSelectWithModel(node) // <select v-model> requires runtime inspection
  4288. )
  4289. }
  4290. var isBuiltInDir = makeMap('text,html,show,on,bind,model,pre,cloak,once');
  4291. function hasCustomDirective (node) {
  4292. return (
  4293. node.type === 1 &&
  4294. node.directives &&
  4295. node.directives.some(function (d) { return !isBuiltInDir(d.name); })
  4296. )
  4297. }
  4298. // <select v-model> cannot be optimized because it requires a runtime check
  4299. // to determine proper selected option
  4300. function isSelectWithModel (node) {
  4301. return (
  4302. node.type === 1 &&
  4303. node.tag === 'select' &&
  4304. node.directives != null &&
  4305. node.directives.some(function (d) { return d.name === 'model'; })
  4306. )
  4307. }
  4308. /* */
  4309. // The SSR codegen is essentially extending the default codegen to handle
  4310. // SSR-optimizable nodes and turn them into string render fns. In cases where
  4311. // a node is not optimizable it simply falls back to the default codegen.
  4312. // segment types
  4313. var RAW = 0;
  4314. var INTERPOLATION = 1;
  4315. var EXPRESSION = 2;
  4316. function generate$1 (
  4317. ast,
  4318. options
  4319. ) {
  4320. var state = new CodegenState(options);
  4321. var code = ast ? genSSRElement(ast, state) : '_c("div")';
  4322. return {
  4323. render: ("with(this){return " + code + "}"),
  4324. staticRenderFns: state.staticRenderFns
  4325. }
  4326. }
  4327. function genSSRElement (el, state) {
  4328. if (el.for && !el.forProcessed) {
  4329. return genFor(el, state, genSSRElement)
  4330. } else if (el.if && !el.ifProcessed) {
  4331. return genIf(el, state, genSSRElement)
  4332. } else if (el.tag === 'template' && !el.slotTarget) {
  4333. return el.ssrOptimizability === optimizability.FULL
  4334. ? genChildrenAsStringNode(el, state)
  4335. : genSSRChildren(el, state) || 'void 0'
  4336. }
  4337. switch (el.ssrOptimizability) {
  4338. case optimizability.FULL:
  4339. // stringify whole tree
  4340. return genStringElement(el, state)
  4341. case optimizability.SELF:
  4342. // stringify self and check children
  4343. return genStringElementWithChildren(el, state)
  4344. case optimizability.CHILDREN:
  4345. // generate self as VNode and stringify children
  4346. return genNormalElement(el, state, true)
  4347. case optimizability.PARTIAL:
  4348. // generate self as VNode and check children
  4349. return genNormalElement(el, state, false)
  4350. default:
  4351. // bail whole tree
  4352. return genElement(el, state)
  4353. }
  4354. }
  4355. function genNormalElement (el, state, stringifyChildren) {
  4356. var data = el.plain ? undefined : genData$2(el, state);
  4357. var children = stringifyChildren
  4358. ? ("[" + (genChildrenAsStringNode(el, state)) + "]")
  4359. : genSSRChildren(el, state, true);
  4360. return ("_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")")
  4361. }
  4362. function genSSRChildren (el, state, checkSkip) {
  4363. return genChildren(el, state, checkSkip, genSSRElement, genSSRNode)
  4364. }
  4365. function genSSRNode (el, state) {
  4366. return el.type === 1
  4367. ? genSSRElement(el, state)
  4368. : genText(el)
  4369. }
  4370. function genChildrenAsStringNode (el, state) {
  4371. return el.children.length
  4372. ? ("_ssrNode(" + (flattenSegments(childrenToSegments(el, state))) + ")")
  4373. : ''
  4374. }
  4375. function genStringElement (el, state) {
  4376. return ("_ssrNode(" + (elementToString(el, state)) + ")")
  4377. }
  4378. function genStringElementWithChildren (el, state) {
  4379. var children = genSSRChildren(el, state, true);
  4380. return ("_ssrNode(" + (flattenSegments(elementToOpenTagSegments(el, state))) + ",\"</" + (el.tag) + ">\"" + (children ? ("," + children) : '') + ")")
  4381. }
  4382. function elementToString (el, state) {
  4383. return ("(" + (flattenSegments(elementToSegments(el, state))) + ")")
  4384. }
  4385. function elementToSegments (el, state) {
  4386. // v-for / v-if
  4387. if (el.for && !el.forProcessed) {
  4388. el.forProcessed = true;
  4389. return [{
  4390. type: EXPRESSION,
  4391. value: genFor(el, state, elementToString, '_ssrList')
  4392. }]
  4393. } else if (el.if && !el.ifProcessed) {
  4394. el.ifProcessed = true;
  4395. return [{
  4396. type: EXPRESSION,
  4397. value: genIf(el, state, elementToString, '"<!---->"')
  4398. }]
  4399. } else if (el.tag === 'template') {
  4400. return childrenToSegments(el, state)
  4401. }
  4402. var openSegments = elementToOpenTagSegments(el, state);
  4403. var childrenSegments = childrenToSegments(el, state);
  4404. var ref = state.options;
  4405. var isUnaryTag = ref.isUnaryTag;
  4406. var close = (isUnaryTag && isUnaryTag(el.tag))
  4407. ? []
  4408. : [{ type: RAW, value: ("</" + (el.tag) + ">") }];
  4409. return openSegments.concat(childrenSegments, close)
  4410. }
  4411. function elementToOpenTagSegments (el, state) {
  4412. applyModelTransform(el, state);
  4413. var binding;
  4414. var segments = [{ type: RAW, value: ("<" + (el.tag)) }];
  4415. // attrs
  4416. if (el.attrs) {
  4417. segments.push.apply(segments, genAttrSegments(el.attrs));
  4418. }
  4419. // domProps
  4420. if (el.props) {
  4421. segments.push.apply(segments, genDOMPropSegments(el.props, el.attrs));
  4422. }
  4423. // v-bind="object"
  4424. if ((binding = el.attrsMap['v-bind'])) {
  4425. segments.push({ type: EXPRESSION, value: ("_ssrAttrs(" + binding + ")") });
  4426. }
  4427. // v-bind.prop="object"
  4428. if ((binding = el.attrsMap['v-bind.prop'])) {
  4429. segments.push({ type: EXPRESSION, value: ("_ssrDOMProps(" + binding + ")") });
  4430. }
  4431. // class
  4432. if (el.staticClass || el.classBinding) {
  4433. segments.push.apply(
  4434. segments,
  4435. genClassSegments(el.staticClass, el.classBinding)
  4436. );
  4437. }
  4438. // style & v-show
  4439. if (el.staticStyle || el.styleBinding || el.attrsMap['v-show']) {
  4440. segments.push.apply(
  4441. segments,
  4442. genStyleSegments(
  4443. el.attrsMap.style,
  4444. el.staticStyle,
  4445. el.styleBinding,
  4446. el.attrsMap['v-show']
  4447. )
  4448. );
  4449. }
  4450. // _scopedId
  4451. if (state.options.scopeId) {
  4452. segments.push({ type: RAW, value: (" " + (state.options.scopeId)) });
  4453. }
  4454. segments.push({ type: RAW, value: ">" });
  4455. return segments
  4456. }
  4457. function childrenToSegments (el, state) {
  4458. var binding;
  4459. if ((binding = el.attrsMap['v-html'])) {
  4460. return [{ type: EXPRESSION, value: ("_s(" + binding + ")") }]
  4461. }
  4462. if ((binding = el.attrsMap['v-text'])) {
  4463. return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
  4464. }
  4465. if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
  4466. return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
  4467. }
  4468. return el.children
  4469. ? nodesToSegments(el.children, state)
  4470. : []
  4471. }
  4472. function nodesToSegments (
  4473. children,
  4474. state
  4475. ) {
  4476. var segments = [];
  4477. for (var i = 0; i < children.length; i++) {
  4478. var c = children[i];
  4479. if (c.type === 1) {
  4480. segments.push.apply(segments, elementToSegments(c, state));
  4481. } else if (c.type === 2) {
  4482. segments.push({ type: INTERPOLATION, value: c.expression });
  4483. } else if (c.type === 3) {
  4484. segments.push({ type: RAW, value: escape(c.text) });
  4485. }
  4486. }
  4487. return segments
  4488. }
  4489. function flattenSegments (segments) {
  4490. var mergedSegments = [];
  4491. var textBuffer = '';
  4492. var pushBuffer = function () {
  4493. if (textBuffer) {
  4494. mergedSegments.push(JSON.stringify(textBuffer));
  4495. textBuffer = '';
  4496. }
  4497. };
  4498. for (var i = 0; i < segments.length; i++) {
  4499. var s = segments[i];
  4500. if (s.type === RAW) {
  4501. textBuffer += s.value;
  4502. } else if (s.type === INTERPOLATION) {
  4503. pushBuffer();
  4504. mergedSegments.push(("_ssrEscape(" + (s.value) + ")"));
  4505. } else if (s.type === EXPRESSION) {
  4506. pushBuffer();
  4507. mergedSegments.push(("(" + (s.value) + ")"));
  4508. }
  4509. }
  4510. pushBuffer();
  4511. return mergedSegments.join('+')
  4512. }
  4513. /* */
  4514. var createCompiler$1 = createCompilerCreator(function baseCompile (
  4515. template,
  4516. options
  4517. ) {
  4518. var ast = parse(template.trim(), options);
  4519. optimize$1(ast, options);
  4520. var code = generate$1(ast, options);
  4521. return {
  4522. ast: ast,
  4523. render: code.render,
  4524. staticRenderFns: code.staticRenderFns
  4525. }
  4526. });
  4527. /* */
  4528. var ref$1 = createCompiler$1(baseOptions);
  4529. var compile$1 = ref$1.compile;
  4530. var compileToFunctions$1 = ref$1.compileToFunctions;
  4531. /* */
  4532. exports.parseComponent = parseComponent;
  4533. exports.compile = compile;
  4534. exports.compileToFunctions = compileToFunctions;
  4535. exports.ssrCompile = compile$1;
  4536. exports.ssrCompileToFunctions = compileToFunctions$1;
  4537. Object.defineProperty(exports, '__esModule', { value: true });
  4538. })));