cheerio.min.js 485 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635
  1. var e, t = function () {
  2. return t = Object.assign || function (e) {
  3. for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  4. return e
  5. }, t.apply(this, arguments)
  6. }, n = {xml: !1, decodeEntities: !0}, r = {_useHtmlParser2: !0, xmlMode: !0};
  7. function i(e) {
  8. return (null == e ? void 0 : e.xml) ? "boolean" == typeof e.xml ? r : t(t({}, r), e.xml) : null != e ? e : void 0
  9. }
  10. !function (e) {
  11. e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype"
  12. }(e || (e = {}));
  13. const s = e.Root, a = e.Text, o = e.Directive, c = e.Comment, l = e.Script, h = e.Style, u = e.Tag, p = e.CDATA,
  14. f = e.Doctype;
  15. class d {
  16. constructor() {
  17. this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null
  18. }
  19. get parentNode() {
  20. return this.parent
  21. }
  22. set parentNode(e) {
  23. this.parent = e
  24. }
  25. get previousSibling() {
  26. return this.prev
  27. }
  28. set previousSibling(e) {
  29. this.prev = e
  30. }
  31. get nextSibling() {
  32. return this.next
  33. }
  34. set nextSibling(e) {
  35. this.next = e
  36. }
  37. cloneNode(e = !1) {
  38. return v(this, e)
  39. }
  40. }
  41. class E extends d {
  42. constructor(e) {
  43. super(), this.data = e
  44. }
  45. get nodeValue() {
  46. return this.data
  47. }
  48. set nodeValue(e) {
  49. this.data = e
  50. }
  51. }
  52. class m extends E {
  53. constructor() {
  54. super(...arguments), this.type = e.Text
  55. }
  56. get nodeType() {
  57. return 3
  58. }
  59. }
  60. class T extends E {
  61. constructor() {
  62. super(...arguments), this.type = e.Comment
  63. }
  64. get nodeType() {
  65. return 8
  66. }
  67. }
  68. class _ extends E {
  69. constructor(t, n) {
  70. super(n), this.name = t, this.type = e.Directive
  71. }
  72. get nodeType() {
  73. return 1
  74. }
  75. }
  76. class A extends d {
  77. constructor(e) {
  78. super(), this.children = e
  79. }
  80. get firstChild() {
  81. var e;
  82. return null !== (e = this.children[0]) && void 0 !== e ? e : null
  83. }
  84. get lastChild() {
  85. return this.children.length > 0 ? this.children[this.children.length - 1] : null
  86. }
  87. get childNodes() {
  88. return this.children
  89. }
  90. set childNodes(e) {
  91. this.children = e
  92. }
  93. }
  94. class g extends A {
  95. constructor() {
  96. super(...arguments), this.type = e.CDATA
  97. }
  98. get nodeType() {
  99. return 4
  100. }
  101. }
  102. class N extends A {
  103. constructor() {
  104. super(...arguments), this.type = e.Root
  105. }
  106. get nodeType() {
  107. return 9
  108. }
  109. }
  110. class C extends A {
  111. constructor(t, n, r = [], i = ("script" === t ? e.Script : "style" === t ? e.Style : e.Tag)) {
  112. super(r), this.name = t, this.attribs = n, this.type = i
  113. }
  114. get nodeType() {
  115. return 1
  116. }
  117. get tagName() {
  118. return this.name
  119. }
  120. set tagName(e) {
  121. this.name = e
  122. }
  123. get attributes() {
  124. return Object.keys(this.attribs).map((e => {
  125. var t, n;
  126. return {
  127. name: e,
  128. value: this.attribs[e],
  129. namespace: null === (t = this["x-attribsNamespace"]) || void 0 === t ? void 0 : t[e],
  130. prefix: null === (n = this["x-attribsPrefix"]) || void 0 === n ? void 0 : n[e]
  131. }
  132. }))
  133. }
  134. }
  135. function I(t) {
  136. return (n = t).type === e.Tag || n.type === e.Script || n.type === e.Style;
  137. var n
  138. }
  139. function S(t) {
  140. return t.type === e.CDATA
  141. }
  142. function b(t) {
  143. return t.type === e.Text
  144. }
  145. function O(t) {
  146. return t.type === e.Comment
  147. }
  148. function y(t) {
  149. return t.type === e.Directive
  150. }
  151. function L(t) {
  152. return t.type === e.Root
  153. }
  154. function k(e) {
  155. return Object.prototype.hasOwnProperty.call(e, "children")
  156. }
  157. function v(e, t = !1) {
  158. let n;
  159. if (b(e)) n = new m(e.data); else if (O(e)) n = new T(e.data); else if (I(e)) {
  160. const r = t ? D(e.children) : [], i = new C(e.name, {...e.attribs}, r);
  161. r.forEach((e => e.parent = i)), null != e.namespace && (i.namespace = e.namespace), e["x-attribsNamespace"] && (i["x-attribsNamespace"] = {...e["x-attribsNamespace"]}), e["x-attribsPrefix"] && (i["x-attribsPrefix"] = {...e["x-attribsPrefix"]}), n = i
  162. } else if (S(e)) {
  163. const r = t ? D(e.children) : [], i = new g(r);
  164. r.forEach((e => e.parent = i)), n = i
  165. } else if (L(e)) {
  166. const r = t ? D(e.children) : [], i = new N(r);
  167. r.forEach((e => e.parent = i)), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i
  168. } else {
  169. if (!y(e)) throw new Error(`Not implemented yet: ${e.type}`);
  170. {
  171. const t = new _(e.name, e.data);
  172. null != e["x-name"] && (t["x-name"] = e["x-name"], t["x-publicId"] = e["x-publicId"], t["x-systemId"] = e["x-systemId"]), n = t
  173. }
  174. }
  175. return n.startIndex = e.startIndex, n.endIndex = e.endIndex, null != e.sourceCodeLocation && (n.sourceCodeLocation = e.sourceCodeLocation), n
  176. }
  177. function D(e) {
  178. const t = e.map((e => v(e, !0)));
  179. for (let e = 1; e < t.length; e++) t[e].prev = t[e - 1], t[e - 1].next = t[e];
  180. return t
  181. }
  182. const R = {withStartIndices: !1, withEndIndices: !1, xmlMode: !1};
  183. class M {
  184. constructor(e, t, n) {
  185. this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, "function" == typeof t && (n = t, t = R), "object" == typeof e && (t = e, e = void 0), this.callback = null != e ? e : null, this.options = null != t ? t : R, this.elementCB = null != n ? n : null
  186. }
  187. onparserinit(e) {
  188. this.parser = e
  189. }
  190. onreset() {
  191. this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null
  192. }
  193. onend() {
  194. this.done || (this.done = !0, this.parser = null, this.handleCallback(null))
  195. }
  196. onerror(e) {
  197. this.handleCallback(e)
  198. }
  199. onclosetag() {
  200. this.lastNode = null;
  201. const e = this.tagStack.pop();
  202. this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e)
  203. }
  204. onopentag(t, n) {
  205. const r = this.options.xmlMode ? e.Tag : void 0, i = new C(t, n, void 0, r);
  206. this.addNode(i), this.tagStack.push(i)
  207. }
  208. ontext(t) {
  209. const {lastNode: n} = this;
  210. if (n && n.type === e.Text) n.data += t, this.options.withEndIndices && (n.endIndex = this.parser.endIndex); else {
  211. const e = new m(t);
  212. this.addNode(e), this.lastNode = e
  213. }
  214. }
  215. oncomment(t) {
  216. if (this.lastNode && this.lastNode.type === e.Comment) return void (this.lastNode.data += t);
  217. const n = new T(t);
  218. this.addNode(n), this.lastNode = n
  219. }
  220. oncommentend() {
  221. this.lastNode = null
  222. }
  223. oncdatastart() {
  224. const e = new m(""), t = new g([e]);
  225. this.addNode(t), e.parent = t, this.lastNode = e
  226. }
  227. oncdataend() {
  228. this.lastNode = null
  229. }
  230. onprocessinginstruction(e, t) {
  231. const n = new _(e, t);
  232. this.addNode(n)
  233. }
  234. handleCallback(e) {
  235. if ("function" == typeof this.callback) this.callback(e, this.dom); else if (e) throw e
  236. }
  237. addNode(e) {
  238. const t = this.tagStack[this.tagStack.length - 1], n = t.children[t.children.length - 1];
  239. this.options.withStartIndices && (e.startIndex = this.parser.startIndex), this.options.withEndIndices && (e.endIndex = this.parser.endIndex), t.children.push(e), n && (e.prev = n, n.next = e), e.parent = t, this.lastNode = null
  240. }
  241. }
  242. const P = /["&'<>$\x80-\uFFFF]/g,
  243. x = new Map([[34, "&quot;"], [38, "&amp;"], [39, "&apos;"], [60, "&lt;"], [62, "&gt;"]]),
  244. w = null != String.prototype.codePointAt ? (e, t) => e.codePointAt(t) : (e, t) => 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t);
  245. function B(e) {
  246. let t, n = "", r = 0;
  247. for (; null !== (t = P.exec(e));) {
  248. const i = t.index, s = e.charCodeAt(i), a = x.get(s);
  249. void 0 !== a ? (n += e.substring(r, i) + a, r = i + 1) : (n += `${e.substring(r, i)}&#x${w(e, i).toString(16)};`, r = P.lastIndex += Number(55296 == (64512 & s)))
  250. }
  251. return n + e.substr(r)
  252. }
  253. function F(e, t) {
  254. return function (n) {
  255. let r, i = 0, s = "";
  256. for (; r = e.exec(n);) i !== r.index && (s += n.substring(i, r.index)), s += t.get(r[0].charCodeAt(0)), i = r.index + 1;
  257. return s + n.substring(i)
  258. }
  259. }
  260. const U = F(/["&\u00A0]/g, new Map([[34, "&quot;"], [38, "&amp;"], [160, "&nbsp;"]])),
  261. H = F(/[&<>\u00A0]/g, new Map([[38, "&amp;"], [60, "&lt;"], [62, "&gt;"], [160, "&nbsp;"]])),
  262. G = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map((e => [e.toLowerCase(), e]))),
  263. Y = new Map(["definitionURL", "attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map((e => [e.toLowerCase(), e]))),
  264. q = new Set(["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"]);
  265. function K(e) {
  266. return e.replace(/"/g, "&quot;")
  267. }
  268. const j = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
  269. function V(e, t = {}) {
  270. const n = "length" in e ? e : [e];
  271. let r = "";
  272. for (let e = 0; e < n.length; e++) r += W(n[e], t);
  273. return r
  274. }
  275. function W(e, t) {
  276. switch (e.type) {
  277. case s:
  278. return V(e.children, t);
  279. case f:
  280. case o:
  281. return `<${e.data}>`;
  282. case c:
  283. return function (e) {
  284. return `\x3c!--${e.data}--\x3e`
  285. }(e);
  286. case p:
  287. return function (e) {
  288. return `<![CDATA[${e.children[0].data}]]>`
  289. }(e);
  290. case l:
  291. case h:
  292. case u:
  293. return function (e, t) {
  294. var n;
  295. "foreign" === t.xmlMode && (e.name = null !== (n = G.get(e.name)) && void 0 !== n ? n : e.name, e.parent && Q.has(e.parent.name) && (t = {
  296. ...t,
  297. xmlMode: !1
  298. }));
  299. !t.xmlMode && X.has(e.name) && (t = {...t, xmlMode: "foreign"});
  300. let r = `<${e.name}`;
  301. const i = function (e, t) {
  302. var n;
  303. if (!e) return;
  304. const r = !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) ? K : t.xmlMode || "utf8" !== t.encodeEntities ? B : U;
  305. return Object.keys(e).map((n => {
  306. var i, s;
  307. const a = null !== (i = e[n]) && void 0 !== i ? i : "";
  308. return "foreign" === t.xmlMode && (n = null !== (s = Y.get(n)) && void 0 !== s ? s : n), t.emptyAttrs || t.xmlMode || "" !== a ? `${n}="${r(a)}"` : n
  309. })).join(" ")
  310. }(e.attribs, t);
  311. i && (r += ` ${i}`);
  312. 0 === e.children.length && (t.xmlMode ? !1 !== t.selfClosingTags : t.selfClosingTags && j.has(e.name)) ? (t.xmlMode || (r += " "), r += "/>") : (r += ">", e.children.length > 0 && (r += V(e.children, t)), !t.xmlMode && j.has(e.name) || (r += `</${e.name}>`));
  313. return r
  314. }(e, t);
  315. case a:
  316. return function (e, t) {
  317. var n;
  318. let r = e.data || "";
  319. !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) || !t.xmlMode && e.parent && q.has(e.parent.name) || (r = t.xmlMode || "utf8" !== t.encodeEntities ? B(r) : H(r));
  320. return r
  321. }(e, t)
  322. }
  323. }
  324. const Q = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title"]),
  325. X = new Set(["svg", "math"]);
  326. function $(e, t) {
  327. return V(e, t)
  328. }
  329. function z(e) {
  330. return Array.isArray(e) ? e.map(z).join("") : k(e) && !O(e) ? z(e.children) : b(e) ? e.data : ""
  331. }
  332. function J(t) {
  333. return Array.isArray(t) ? t.map(J).join("") : k(t) && (t.type === e.Tag || S(t)) ? J(t.children) : b(t) ? t.data : ""
  334. }
  335. function Z(e) {
  336. return k(e) ? e.children : []
  337. }
  338. function ee(e) {
  339. return e.parent || null
  340. }
  341. function te(e) {
  342. const t = ee(e);
  343. if (null != t) return Z(t);
  344. const n = [e];
  345. let {prev: r, next: i} = e;
  346. for (; null != r;) n.unshift(r), ({prev: r} = r);
  347. for (; null != i;) n.push(i), ({next: i} = i);
  348. return n
  349. }
  350. function ne(e) {
  351. let {next: t} = e;
  352. for (; null !== t && !I(t);) ({next: t} = t);
  353. return t
  354. }
  355. function re(e) {
  356. let {prev: t} = e;
  357. for (; null !== t && !I(t);) ({prev: t} = t);
  358. return t
  359. }
  360. function ie(e) {
  361. if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) {
  362. const t = e.parent.children;
  363. t.splice(t.lastIndexOf(e), 1)
  364. }
  365. }
  366. function se(e, t, n = !0, r = 1 / 0) {
  367. return Array.isArray(t) || (t = [t]), ae(e, t, n, r)
  368. }
  369. function ae(e, t, n, r) {
  370. const i = [];
  371. for (const s of t) {
  372. if (e(s) && (i.push(s), --r <= 0)) break;
  373. if (n && k(s) && s.children.length > 0) {
  374. const t = ae(e, s.children, n, r);
  375. if (i.push(...t), r -= t.length, r <= 0) break
  376. }
  377. }
  378. return i
  379. }
  380. function oe(e, t, n = !0) {
  381. let r = null;
  382. for (let i = 0; i < t.length && !r; i++) {
  383. const s = t[i];
  384. I(s) && (e(s) ? r = s : n && s.children.length > 0 && (r = oe(e, s.children, !0)))
  385. }
  386. return r
  387. }
  388. const ce = {
  389. tag_name: e => "function" == typeof e ? t => I(t) && e(t.name) : "*" === e ? I : t => I(t) && t.name === e,
  390. tag_type: e => "function" == typeof e ? t => e(t.type) : t => t.type === e,
  391. tag_contains: e => "function" == typeof e ? t => b(t) && e(t.data) : t => b(t) && t.data === e
  392. };
  393. function le(e, t) {
  394. return "function" == typeof t ? n => I(n) && t(n.attribs[e]) : n => I(n) && n.attribs[e] === t
  395. }
  396. function he(e, t) {
  397. return n => e(n) || t(n)
  398. }
  399. function ue(e) {
  400. const t = Object.keys(e).map((t => {
  401. const n = e[t];
  402. return Object.prototype.hasOwnProperty.call(ce, t) ? ce[t](n) : le(t, n)
  403. }));
  404. return 0 === t.length ? null : t.reduce(he)
  405. }
  406. function pe(e, t, n = !0, r = 1 / 0) {
  407. return se(ce.tag_name(e), t, n, r)
  408. }
  409. var fe;
  410. function de(e, t) {
  411. const n = [], r = [];
  412. if (e === t) return 0;
  413. let i = k(e) ? e : e.parent;
  414. for (; i;) n.unshift(i), i = i.parent;
  415. for (i = k(t) ? t : t.parent; i;) r.unshift(i), i = i.parent;
  416. const s = Math.min(n.length, r.length);
  417. let a = 0;
  418. for (; a < s && n[a] === r[a];) a++;
  419. if (0 === a) return fe.DISCONNECTED;
  420. const o = n[a - 1], c = o.children, l = n[a], h = r[a];
  421. return c.indexOf(l) > c.indexOf(h) ? o === t ? fe.FOLLOWING | fe.CONTAINED_BY : fe.FOLLOWING : o === e ? fe.PRECEDING | fe.CONTAINS : fe.PRECEDING
  422. }
  423. function Ee(e) {
  424. return (e = e.filter(((e, t, n) => !n.includes(e, t + 1)))).sort(((e, t) => {
  425. const n = de(e, t);
  426. return n & fe.PRECEDING ? -1 : n & fe.FOLLOWING ? 1 : 0
  427. })), e
  428. }
  429. !function (e) {
  430. e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY"
  431. }(fe || (fe = {}));
  432. const me = ["url", "type", "lang"],
  433. Te = ["fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width"];
  434. function _e(e) {
  435. return pe("media:content", e).map((e => {
  436. const {attribs: t} = e, n = {medium: t.medium, isDefault: !!t.isDefault};
  437. for (const e of me) t[e] && (n[e] = t[e]);
  438. for (const e of Te) t[e] && (n[e] = parseInt(t[e], 10));
  439. return t.expression && (n.expression = t.expression), n
  440. }))
  441. }
  442. function Ae(e, t) {
  443. return pe(e, t, !0, 1)[0]
  444. }
  445. function ge(e, t, n = !1) {
  446. return z(pe(e, t, n, 1)).trim()
  447. }
  448. function Ne(e, t, n, r, i = !1) {
  449. const s = ge(n, r, i);
  450. s && (e[t] = s)
  451. }
  452. function Ce(e) {
  453. return "rss" === e || "feed" === e || "rdf:RDF" === e
  454. }
  455. var Ie, Se = Object.freeze({
  456. __proto__: null,
  457. isTag: I,
  458. isCDATA: S,
  459. isText: b,
  460. isComment: O,
  461. isDocument: L,
  462. hasChildren: k,
  463. getOuterHTML: $,
  464. getInnerHTML: function (e, t) {
  465. return k(e) ? e.children.map((e => $(e, t))).join("") : ""
  466. },
  467. getText: function e(t) {
  468. return Array.isArray(t) ? t.map(e).join("") : I(t) ? "br" === t.name ? "\n" : e(t.children) : S(t) ? e(t.children) : b(t) ? t.data : ""
  469. },
  470. textContent: z,
  471. innerText: J,
  472. getChildren: Z,
  473. getParent: ee,
  474. getSiblings: te,
  475. getAttributeValue: function (e, t) {
  476. var n;
  477. return null === (n = e.attribs) || void 0 === n ? void 0 : n[t]
  478. },
  479. hasAttrib: function (e, t) {
  480. return null != e.attribs && Object.prototype.hasOwnProperty.call(e.attribs, t) && null != e.attribs[t]
  481. },
  482. getName: function (e) {
  483. return e.name
  484. },
  485. nextElementSibling: ne,
  486. prevElementSibling: re,
  487. removeElement: ie,
  488. replaceElement: function (e, t) {
  489. const n = t.prev = e.prev;
  490. n && (n.next = t);
  491. const r = t.next = e.next;
  492. r && (r.prev = t);
  493. const i = t.parent = e.parent;
  494. if (i) {
  495. const n = i.children;
  496. n[n.lastIndexOf(e)] = t, e.parent = null
  497. }
  498. },
  499. appendChild: function (e, t) {
  500. if (ie(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
  501. const n = e.children[e.children.length - 2];
  502. n.next = t, t.prev = n
  503. } else t.prev = null
  504. },
  505. append: function (e, t) {
  506. ie(t);
  507. const {parent: n} = e, r = e.next;
  508. if (t.next = r, t.prev = e, e.next = t, t.parent = n, r) {
  509. if (r.prev = t, n) {
  510. const e = n.children;
  511. e.splice(e.lastIndexOf(r), 0, t)
  512. }
  513. } else n && n.children.push(t)
  514. },
  515. prependChild: function (e, t) {
  516. if (ie(t), t.parent = e, t.prev = null, 1 !== e.children.unshift(t)) {
  517. const n = e.children[1];
  518. n.prev = t, t.next = n
  519. } else t.next = null
  520. },
  521. prepend: function (e, t) {
  522. ie(t);
  523. const {parent: n} = e;
  524. if (n) {
  525. const r = n.children;
  526. r.splice(r.indexOf(e), 0, t)
  527. }
  528. e.prev && (e.prev.next = t), t.parent = n, t.prev = e.prev, t.next = e, e.prev = t
  529. },
  530. filter: se,
  531. find: ae,
  532. findOneChild: function (e, t) {
  533. return t.find(e)
  534. },
  535. findOne: oe,
  536. existsOne: function e(t, n) {
  537. return n.some((n => I(n) && (t(n) || n.children.length > 0 && e(t, n.children))))
  538. },
  539. findAll: function (e, t) {
  540. var n;
  541. const r = [], i = t.filter(I);
  542. let s;
  543. for (; s = i.shift();) {
  544. const t = null === (n = s.children) || void 0 === n ? void 0 : n.filter(I);
  545. t && t.length > 0 && i.unshift(...t), e(s) && r.push(s)
  546. }
  547. return r
  548. },
  549. testElement: function (e, t) {
  550. const n = ue(e);
  551. return !n || n(t)
  552. },
  553. getElements: function (e, t, n, r = 1 / 0) {
  554. const i = ue(e);
  555. return i ? se(i, t, n, r) : []
  556. },
  557. getElementById: function (e, t, n = !0) {
  558. return Array.isArray(t) || (t = [t]), oe(le("id", e), t, n)
  559. },
  560. getElementsByTagName: pe,
  561. getElementsByTagType: function (e, t, n = !0, r = 1 / 0) {
  562. return se(ce.tag_type(e), t, n, r)
  563. },
  564. removeSubsets: function (e) {
  565. let t = e.length;
  566. for (; --t >= 0;) {
  567. const n = e[t];
  568. if (t > 0 && e.lastIndexOf(n, t - 1) >= 0) e.splice(t, 1); else for (let r = n.parent; r; r = r.parent) if (e.includes(r)) {
  569. e.splice(t, 1);
  570. break
  571. }
  572. }
  573. return e
  574. },
  575. get DocumentPosition() {
  576. return fe
  577. },
  578. compareDocumentPosition: de,
  579. uniqueSort: Ee,
  580. getFeed: function (e) {
  581. const t = Ae(Ce, e);
  582. return t ? "feed" === t.name ? function (e) {
  583. var t;
  584. const n = e.children, r = {
  585. type: "atom", items: pe("entry", n).map((e => {
  586. var t;
  587. const {children: n} = e, r = {media: _e(n)};
  588. Ne(r, "id", "id", n), Ne(r, "title", "title", n);
  589. const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href;
  590. i && (r.link = i);
  591. const s = ge("summary", n) || ge("content", n);
  592. s && (r.description = s);
  593. const a = ge("updated", n);
  594. return a && (r.pubDate = new Date(a)), r
  595. }))
  596. };
  597. Ne(r, "id", "id", n), Ne(r, "title", "title", n);
  598. const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href;
  599. i && (r.link = i);
  600. Ne(r, "description", "subtitle", n);
  601. const s = ge("updated", n);
  602. s && (r.updated = new Date(s));
  603. return Ne(r, "author", "email", n, !0), r
  604. }(t) : function (e) {
  605. var t, n;
  606. const r = null !== (n = null === (t = Ae("channel", e.children)) || void 0 === t ? void 0 : t.children) && void 0 !== n ? n : [],
  607. i = {
  608. type: e.name.substr(0, 3), id: "", items: pe("item", e.children).map((e => {
  609. const {children: t} = e, n = {media: _e(t)};
  610. Ne(n, "id", "guid", t), Ne(n, "title", "title", t), Ne(n, "link", "link", t), Ne(n, "description", "description", t);
  611. const r = ge("pubDate", t);
  612. return r && (n.pubDate = new Date(r)), n
  613. }))
  614. };
  615. Ne(i, "title", "title", r), Ne(i, "link", "link", r), Ne(i, "description", "description", r);
  616. const s = ge("lastBuildDate", r);
  617. s && (i.updated = new Date(s));
  618. return Ne(i, "author", "managingEditor", r, !0), i
  619. }(t) : null
  620. }
  621. }),
  622. be = "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {};
  623. function Oe(e) {
  624. if (Object.keys) return Object.keys(e);
  625. var t = [];
  626. for (var n in e) t.push(n);
  627. return t
  628. }
  629. function ye(e, t) {
  630. if (e.forEach) return e.forEach(t);
  631. for (var n = 0; n < e.length; n++) t(e[n], n, e)
  632. }
  633. function Le() {
  634. try {
  635. return Object.defineProperty({}, "_", {}), function (e, t, n) {
  636. Object.defineProperty(e, t, {writable: !0, enumerable: !1, configurable: !0, value: n})
  637. }
  638. } catch (e) {
  639. return function (e, t, n) {
  640. e[t] = n
  641. }
  642. }
  643. }
  644. var ke = ["Array", "Boolean", "Date", "Error", "EvalError", "Function", "Infinity", "JSON", "Math", "NaN", "Number", "Object", "RangeError", "ReferenceError", "RegExp", "String", "SyntaxError", "TypeError", "URIError", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "undefined", "unescape"];
  645. function ve() {
  646. }
  647. function De(e) {
  648. if (!(this instanceof De)) return new De(e);
  649. this.code = e
  650. }
  651. function Re(e) {
  652. if (Me(e)) return e;
  653. var t = new ve;
  654. return "object" == typeof e && ye(Oe(e), (function (n) {
  655. t[n] = e[n]
  656. })), t
  657. }
  658. function Me(e) {
  659. return e instanceof ve
  660. }
  661. ve.prototype = {}, De.prototype.runInContext = function (e) {
  662. if (!(e instanceof ve)) throw new TypeError("needs a 'context' argument.");
  663. if (be.document) {
  664. var t = be.document.createElement("iframe");
  665. t.style || (t.style = {}), t.style.display = "none", be.document.body.appendChild(t);
  666. var n = t.contentWindow, r = n.eval, i = n.execScript;
  667. !r && i && (i.call(n, "null"), r = n.eval), ye(Oe(e), (function (t) {
  668. n[t] = e[t]
  669. })), ye(ke, (function (t) {
  670. e[t] && (n[t] = e[t])
  671. }));
  672. var s = Oe(n), a = r.call(n, this.code);
  673. return ye(Oe(n), (function (t) {
  674. (t in e || -1 === function (e, t) {
  675. if (xe) return e.indexOf(t);
  676. for (var n = 0; n < e.length; ++n) if (e[n] === t) return n;
  677. return -1
  678. }(s, t)) && (e[t] = n[t])
  679. })), ye(ke, (function (t) {
  680. var r, i, s;
  681. t in e || (r = e, i = t, s = n[t], "function" != typeof Ie && (Ie = Le), Ie(r, i, s))
  682. })), be.document.body.removeChild(t), a
  683. }
  684. return function (e, t) {
  685. var n = Oe(be);
  686. return n.push("with (this.__ctx__){return eval(this.__code__)}"), Function.apply(null, n).apply({
  687. __code__: e,
  688. __ctx__: t
  689. })
  690. }(this.code, e)
  691. }, De.prototype.runInThisContext = function () {
  692. return new Function("code", "return eval(code);").call(be, this.code)
  693. }, De.prototype.runInNewContext = function (e) {
  694. var t = Re(e), n = this.runInContext(t);
  695. return e && ye(Oe(t), (function (n) {
  696. e[n] = t[n]
  697. })), n
  698. };
  699. var Pe = {
  700. runInContext: function (e, t, n) {
  701. return new De(e).runInContext(t, n)
  702. }, isContext: Me, createContext: Re, createScript: function (e) {
  703. return new De(e)
  704. }, Script: De, runInThisContext: function (e, t) {
  705. return new De(e).runInThisContext(t)
  706. }, runInNewContext: function (e, t, n) {
  707. return new De(e).runInNewContext(t, n)
  708. }
  709. }, xe = [].indexOf;
  710. const {hasOwnProperty: we} = Object.prototype;
  711. function Be(e, t) {
  712. return (e = e.slice()).push(t), e
  713. }
  714. function Fe(e, t) {
  715. return (t = t.slice()).unshift(e), t
  716. }
  717. class Ue extends Error {
  718. constructor(e) {
  719. super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'), this.avoidNew = !0, this.value = e, this.name = "NewError"
  720. }
  721. }
  722. function He(e, t, n, r, i) {
  723. if (!(this instanceof He)) try {
  724. return new He(e, t, n, r, i)
  725. } catch (e) {
  726. if (!e.avoidNew) throw e;
  727. return e.value
  728. }
  729. "string" == typeof e && (i = r, r = n, n = t, t = e, e = null);
  730. const s = e && "object" == typeof e;
  731. if (e = e || {}, this.json = e.json || n, this.path = e.path || t, this.resultType = e.resultType || "value", this.flatten = e.flatten || !1, this.wrap = !we.call(e, "wrap") || e.wrap, this.sandbox = e.sandbox || {}, this.preventEval = e.preventEval || !1, this.parent = e.parent || null, this.parentProperty = e.parentProperty || null, this.callback = e.callback || r || null, this.otherTypeCallback = e.otherTypeCallback || i || function () {
  732. throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")
  733. }, !1 !== e.autostart) {
  734. const r = {path: s ? e.path : t};
  735. s ? "json" in e && (r.json = e.json) : r.json = n;
  736. const i = this.evaluate(r);
  737. if (!i || "object" != typeof i) throw new Ue(i);
  738. return i
  739. }
  740. }
  741. He.prototype.evaluate = function (e, t, n, r) {
  742. let i = this.parent, s = this.parentProperty, {flatten: a, wrap: o} = this;
  743. if (this.currResultType = this.resultType, this.currPreventEval = this.preventEval, this.currSandbox = this.sandbox, n = n || this.callback, this.currOtherTypeCallback = r || this.otherTypeCallback, t = t || this.json, (e = e || this.path) && "object" == typeof e && !Array.isArray(e)) {
  744. if (!e.path && "" !== e.path) throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');
  745. if (!we.call(e, "json")) throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');
  746. ({json: t} = e), a = we.call(e, "flatten") ? e.flatten : a, this.currResultType = we.call(e, "resultType") ? e.resultType : this.currResultType, this.currSandbox = we.call(e, "sandbox") ? e.sandbox : this.currSandbox, o = we.call(e, "wrap") ? e.wrap : o, this.currPreventEval = we.call(e, "preventEval") ? e.preventEval : this.currPreventEval, n = we.call(e, "callback") ? e.callback : n, this.currOtherTypeCallback = we.call(e, "otherTypeCallback") ? e.otherTypeCallback : this.currOtherTypeCallback, i = we.call(e, "parent") ? e.parent : i, s = we.call(e, "parentProperty") ? e.parentProperty : s, e = e.path
  747. }
  748. if (i = i || null, s = s || null, Array.isArray(e) && (e = He.toPathString(e)), !e && "" !== e || !t) return;
  749. const c = He.toPathArray(e);
  750. "$" === c[0] && c.length > 1 && c.shift(), this._hasParentSelector = null;
  751. const l = this._trace(c, t, ["$"], i, s, n).filter((function (e) {
  752. return e && !e.isParentSelector
  753. }));
  754. return l.length ? o || 1 !== l.length || l[0].hasArrExpr ? l.reduce(((e, t) => {
  755. const n = this._getPreferredOutput(t);
  756. return a && Array.isArray(n) ? e = e.concat(n) : e.push(n), e
  757. }), []) : this._getPreferredOutput(l[0]) : o ? [] : void 0
  758. }, He.prototype._getPreferredOutput = function (e) {
  759. const t = this.currResultType;
  760. switch (t) {
  761. case"all": {
  762. const t = Array.isArray(e.path) ? e.path : He.toPathArray(e.path);
  763. return e.pointer = He.toPointer(t), e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), e
  764. }
  765. case"value":
  766. case"parent":
  767. case"parentProperty":
  768. return e[t];
  769. case"path":
  770. return He.toPathString(e[t]);
  771. case"pointer":
  772. return He.toPointer(e.path);
  773. default:
  774. throw new TypeError("Unknown result type")
  775. }
  776. }, He.prototype._handleCallback = function (e, t, n) {
  777. if (t) {
  778. const r = this._getPreferredOutput(e);
  779. e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), t(r, n, e)
  780. }
  781. }, He.prototype._trace = function (e, t, n, r, i, s, a, o) {
  782. let c;
  783. if (!e.length) return c = {
  784. path: n,
  785. value: t,
  786. parent: r,
  787. parentProperty: i,
  788. hasArrExpr: a
  789. }, this._handleCallback(c, s, "value"), c;
  790. const l = e[0], h = e.slice(1), u = [];
  791. function p(e) {
  792. Array.isArray(e) ? e.forEach((e => {
  793. u.push(e)
  794. })) : u.push(e)
  795. }
  796. if (("string" != typeof l || o) && t && we.call(t, l)) p(this._trace(h, t[l], Be(n, l), t, l, s, a)); else if ("*" === l) this._walk(t, (e => {
  797. p(this._trace(h, t[e], Be(n, e), t, e, s, !0, !0))
  798. })); else if (".." === l) p(this._trace(h, t, n, r, i, s, a)), this._walk(t, (r => {
  799. "object" == typeof t[r] && p(this._trace(e.slice(), t[r], Be(n, r), t, r, s, !0))
  800. })); else {
  801. if ("^" === l) return this._hasParentSelector = !0, {path: n.slice(0, -1), expr: h, isParentSelector: !0};
  802. if ("~" === l) return c = {
  803. path: Be(n, l),
  804. value: i,
  805. parent: r,
  806. parentProperty: null
  807. }, this._handleCallback(c, s, "property"), c;
  808. if ("$" === l) p(this._trace(h, t, n, null, null, s, a)); else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(l)) p(this._slice(l, h, t, n, r, i, s)); else if (0 === l.indexOf("?(")) {
  809. if (this.currPreventEval) throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
  810. const e = l.replace(/^\?\((.*?)\)$/u, "$1");
  811. this._walk(t, (a => {
  812. this._eval(e, t[a], a, n, r, i) && p(this._trace(h, t[a], Be(n, a), t, a, s, !0))
  813. }))
  814. } else if ("(" === l[0]) {
  815. if (this.currPreventEval) throw new Error("Eval [(expr)] prevented in JSONPath expression.");
  816. p(this._trace(Fe(this._eval(l, t, n[n.length - 1], n.slice(0, -1), r, i), h), t, n, r, i, s, a))
  817. } else if ("@" === l[0]) {
  818. let e = !1;
  819. const a = l.slice(1, -2);
  820. switch (a) {
  821. case"scalar":
  822. t && ["object", "function"].includes(typeof t) || (e = !0);
  823. break;
  824. case"boolean":
  825. case"string":
  826. case"undefined":
  827. case"function":
  828. typeof t === a && (e = !0);
  829. break;
  830. case"integer":
  831. !Number.isFinite(t) || t % 1 || (e = !0);
  832. break;
  833. case"number":
  834. Number.isFinite(t) && (e = !0);
  835. break;
  836. case"nonFinite":
  837. "number" != typeof t || Number.isFinite(t) || (e = !0);
  838. break;
  839. case"object":
  840. t && typeof t === a && (e = !0);
  841. break;
  842. case"array":
  843. Array.isArray(t) && (e = !0);
  844. break;
  845. case"other":
  846. e = this.currOtherTypeCallback(t, n, r, i);
  847. break;
  848. case"null":
  849. null === t && (e = !0);
  850. break;
  851. default:
  852. throw new TypeError("Unknown value type " + a)
  853. }
  854. if (e) return c = {path: n, value: t, parent: r, parentProperty: i}, this._handleCallback(c, s, "value"), c
  855. } else if ("`" === l[0] && t && we.call(t, l.slice(1))) {
  856. const e = l.slice(1);
  857. p(this._trace(h, t[e], Be(n, e), t, e, s, a, !0))
  858. } else if (l.includes(",")) {
  859. const e = l.split(",");
  860. for (const a of e) p(this._trace(Fe(a, h), t, n, r, i, s, !0))
  861. } else !o && t && we.call(t, l) && p(this._trace(h, t[l], Be(n, l), t, l, s, a, !0))
  862. }
  863. if (this._hasParentSelector) for (let e = 0; e < u.length; e++) {
  864. const n = u[e];
  865. if (n && n.isParentSelector) {
  866. const o = this._trace(n.expr, t, n.path, r, i, s, a);
  867. if (Array.isArray(o)) {
  868. u[e] = o[0];
  869. const t = o.length;
  870. for (let n = 1; n < t; n++) e++, u.splice(e, 0, o[n])
  871. } else u[e] = o
  872. }
  873. }
  874. return u
  875. }, He.prototype._walk = function (e, t) {
  876. if (Array.isArray(e)) {
  877. const n = e.length;
  878. for (let e = 0; e < n; e++) t(e)
  879. } else e && "object" == typeof e && Object.keys(e).forEach((e => {
  880. t(e)
  881. }))
  882. }, He.prototype._slice = function (e, t, n, r, i, s, a) {
  883. if (!Array.isArray(n)) return;
  884. const o = n.length, c = e.split(":"), l = c[2] && Number.parseInt(c[2]) || 1;
  885. let h = c[0] && Number.parseInt(c[0]) || 0, u = c[1] && Number.parseInt(c[1]) || o;
  886. h = h < 0 ? Math.max(0, h + o) : Math.min(o, h), u = u < 0 ? Math.max(0, u + o) : Math.min(o, u);
  887. const p = [];
  888. for (let e = h; e < u; e += l) {
  889. this._trace(Fe(e, t), n, r, i, s, a, !0).forEach((e => {
  890. p.push(e)
  891. }))
  892. }
  893. return p
  894. }, He.prototype._eval = function (e, t, n, r, i, s) {
  895. this.currSandbox._$_parentProperty = s, this.currSandbox._$_parent = i, this.currSandbox._$_property = n, this.currSandbox._$_root = this.json, this.currSandbox._$_v = t;
  896. const a = e.includes("@path");
  897. a && (this.currSandbox._$_path = He.toPathString(r.concat([n])));
  898. const o = "script:" + e;
  899. if (!He.cache[o]) {
  900. let t = e.replace(/@parentProperty/gu, "_$_parentProperty").replace(/@parent/gu, "_$_parent").replace(/@property/gu, "_$_property").replace(/@root/gu, "_$_root").replace(/@([.\s)[])/gu, "_$_v$1");
  901. a && (t = t.replace(/@path/gu, "_$_path")), He.cache[o] = new this.vm.Script(t)
  902. }
  903. try {
  904. return He.cache[o].runInNewContext(this.currSandbox)
  905. } catch (t) {
  906. throw new Error("jsonPath: " + t.message + ": " + e)
  907. }
  908. }, He.cache = {}, He.toPathString = function (e) {
  909. const t = e, n = t.length;
  910. let r = "$";
  911. for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += /^[0-9*]+$/u.test(t[e]) ? "[" + t[e] + "]" : "['" + t[e] + "']");
  912. return r
  913. }, He.toPointer = function (e) {
  914. const t = e, n = t.length;
  915. let r = "";
  916. for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += "/" + t[e].toString().replace(/~/gu, "~0").replace(/\//gu, "~1"));
  917. return r
  918. }, He.toPathArray = function (e) {
  919. const {cache: t} = He;
  920. if (t[e]) return t[e].concat();
  921. const n = [],
  922. r = e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ";$&;").replace(/[['](\??\(.*?\))[\]']/gu, (function (e, t) {
  923. return "[#" + (n.push(t) - 1) + "]"
  924. })).replace(/\[['"]([^'\]]*)['"]\]/gu, (function (e, t) {
  925. return "['" + t.replace(/\./gu, "%@%").replace(/~/gu, "%%@@%%") + "']"
  926. })).replace(/~/gu, ";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ";").replace(/%@%/gu, ".").replace(/%%@@%%/gu, "~").replace(/(?:;)?(\^+)(?:;)?/gu, (function (e, t) {
  927. return ";" + t.split("").join(";") + ";"
  928. })).replace(/;;;|;;/gu, ";..;").replace(/;$|'?\]|'$/gu, ""), i = r.split(";").map((function (e) {
  929. const t = e.match(/#(\d+)/u);
  930. return t && t[1] ? n[t[1]] : e
  931. }));
  932. return t[e] = i, t[e].concat()
  933. }, He.prototype.vm = Pe;
  934. var Ge = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
  935. function Ye() {
  936. throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")
  937. }
  938. function qe(e) {
  939. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e
  940. }
  941. function Ke(e, t) {
  942. return e(t = {exports: {}}, t.exports), t.exports
  943. }
  944. var je = Ke((function (e) {
  945. var t = Array.prototype, n = Object.prototype,
  946. r = {"&": "&amp;", '"': "&quot;", "'": "&#39;", "<": "&lt;", ">": "&gt;"}, i = /[&"'<>]/g, s = e.exports = {};
  947. function a(e, t) {
  948. return n.hasOwnProperty.call(e, t)
  949. }
  950. function o(e) {
  951. return r[e]
  952. }
  953. function c(e, t, n) {
  954. var r, i, s;
  955. if (e instanceof Error && (e = (i = e).name + ": " + i.message), Object.setPrototypeOf ? (r = new Error(e), Object.setPrototypeOf(r, c.prototype)) : (r = this, Object.defineProperty(r, "message", {
  956. enumerable: !1,
  957. writable: !0,
  958. value: e
  959. })), Object.defineProperty(r, "name", {value: "Template render error"}), Error.captureStackTrace && Error.captureStackTrace(r, this.constructor), i) {
  960. var a = Object.getOwnPropertyDescriptor(i, "stack");
  961. (s = a && (a.get || function () {
  962. return a.value
  963. })) || (s = function () {
  964. return i.stack
  965. })
  966. } else {
  967. var o = new Error(e).stack;
  968. s = function () {
  969. return o
  970. }
  971. }
  972. return Object.defineProperty(r, "stack", {
  973. get: function () {
  974. return s.call(r)
  975. }
  976. }), Object.defineProperty(r, "cause", {value: i}), r.lineno = t, r.colno = n, r.firstUpdate = !0, r.Update = function (e) {
  977. var t = "(" + (e || "unknown path") + ")";
  978. return this.firstUpdate && (this.lineno && this.colno ? t += " [Line " + this.lineno + ", Column " + this.colno + "]" : this.lineno && (t += " [Line " + this.lineno + "]")), t += "\n ", this.firstUpdate && (t += " "), this.message = t + (this.message || ""), this.firstUpdate = !1, this
  979. }, r
  980. }
  981. function l(e) {
  982. return "[object Function]" === n.toString.call(e)
  983. }
  984. function h(e) {
  985. return "[object Array]" === n.toString.call(e)
  986. }
  987. function u(e) {
  988. return "[object String]" === n.toString.call(e)
  989. }
  990. function p(e) {
  991. return "[object Object]" === n.toString.call(e)
  992. }
  993. function f(e) {
  994. var t = function (e) {
  995. return e ? "string" == typeof e ? e.split(".") : [e] : []
  996. }(e);
  997. return function (e) {
  998. for (var n = e, r = 0; r < t.length; r++) {
  999. var i = t[r];
  1000. if (!a(n, i)) return;
  1001. n = n[i]
  1002. }
  1003. return n
  1004. }
  1005. }
  1006. function d(e) {
  1007. return Array.prototype.slice.call(e)
  1008. }
  1009. function E(e, t, n) {
  1010. return Array.prototype.indexOf.call(e || [], t, n)
  1011. }
  1012. function m(e) {
  1013. var t = [];
  1014. for (var n in e) a(e, n) && t.push(n);
  1015. return t
  1016. }
  1017. s.hasOwnProp = a, s._prettifyError = function (e, t, n) {
  1018. if (n.Update || (n = new s.TemplateError(n)), n.Update(e), !t) {
  1019. var r = n;
  1020. (n = new Error(r.message)).name = r.name
  1021. }
  1022. return n
  1023. }, Object.setPrototypeOf ? Object.setPrototypeOf(c.prototype, Error.prototype) : c.prototype = Object.create(Error.prototype, {constructor: {value: c}}), s.TemplateError = c, s.escape = function (e) {
  1024. return e.replace(i, o)
  1025. }, s.isFunction = l, s.isArray = h, s.isString = u, s.isObject = p, s.getAttrGetter = f, s.groupBy = function (e, t, n) {
  1026. for (var r = {}, i = l(t) ? t : f(t), s = 0; s < e.length; s++) {
  1027. var a = e[s], o = i(a, s);
  1028. if (void 0 === o && !0 === n) throw new TypeError('groupby: attribute "' + t + '" resolved to undefined');
  1029. (r[o] || (r[o] = [])).push(a)
  1030. }
  1031. return r
  1032. }, s.toArray = d, s.without = function (e) {
  1033. var t = [];
  1034. if (!e) return t;
  1035. for (var n = e.length, r = d(arguments).slice(1), i = -1; ++i < n;) -1 === E(r, e[i]) && t.push(e[i]);
  1036. return t
  1037. }, s.repeat = function (e, t) {
  1038. for (var n = "", r = 0; r < t; r++) n += e;
  1039. return n
  1040. }, s.each = function (e, n, r) {
  1041. if (null != e) if (t.forEach && e.forEach === t.forEach) e.forEach(n, r); else if (e.length === +e.length) for (var i = 0, s = e.length; i < s; i++) n.call(r, e[i], i, e)
  1042. }, s.map = function (e, n) {
  1043. var r = [];
  1044. if (null == e) return r;
  1045. if (t.map && e.map === t.map) return e.map(n);
  1046. for (var i = 0; i < e.length; i++) r[r.length] = n(e[i], i);
  1047. return e.length === +e.length && (r.length = e.length), r
  1048. }, s.asyncIter = function (e, t, n) {
  1049. var r = -1;
  1050. !function i() {
  1051. ++r < e.length ? t(e[r], r, i, n) : n()
  1052. }()
  1053. }, s.asyncFor = function (e, t, n) {
  1054. var r = m(e || {}), i = r.length, s = -1;
  1055. !function a() {
  1056. s++;
  1057. var o = r[s];
  1058. s < i ? t(o, e[o], s, i, a) : n()
  1059. }()
  1060. }, s.indexOf = E, s.keys = m, s._entries = function (e) {
  1061. return m(e).map((function (t) {
  1062. return [t, e[t]]
  1063. }))
  1064. }, s._values = function (e) {
  1065. return m(e).map((function (t) {
  1066. return e[t]
  1067. }))
  1068. }, s._assign = s.extend = function (e, t) {
  1069. return e = e || {}, m(t).forEach((function (n) {
  1070. e[n] = t[n]
  1071. })), e
  1072. }, s.inOperator = function (e, t) {
  1073. if (h(t) || u(t)) return -1 !== t.indexOf(e);
  1074. if (p(t)) return e in t;
  1075. throw new Error('Cannot use "in" operator to search for "' + e + '" in unexpected types.')
  1076. }
  1077. }));
  1078. function Ve() {
  1079. throw new Error("setTimeout has not been defined")
  1080. }
  1081. function We() {
  1082. throw new Error("clearTimeout has not been defined")
  1083. }
  1084. var Qe = Ve, Xe = We;
  1085. function $e(e) {
  1086. if (Qe === setTimeout) return setTimeout(e, 0);
  1087. if ((Qe === Ve || !Qe) && setTimeout) return Qe = setTimeout, setTimeout(e, 0);
  1088. try {
  1089. return Qe(e, 0)
  1090. } catch (t) {
  1091. try {
  1092. return Qe.call(null, e, 0)
  1093. } catch (t) {
  1094. return Qe.call(this, e, 0)
  1095. }
  1096. }
  1097. }
  1098. "function" == typeof be.setTimeout && (Qe = setTimeout), "function" == typeof be.clearTimeout && (Xe = clearTimeout);
  1099. var ze, Je = [], Ze = !1, et = -1;
  1100. function tt() {
  1101. Ze && ze && (Ze = !1, ze.length ? Je = ze.concat(Je) : et = -1, Je.length && nt())
  1102. }
  1103. function nt() {
  1104. if (!Ze) {
  1105. var e = $e(tt);
  1106. Ze = !0;
  1107. for (var t = Je.length; t;) {
  1108. for (ze = Je, Je = []; ++et < t;) ze && ze[et].run();
  1109. et = -1, t = Je.length
  1110. }
  1111. ze = null, Ze = !1, function (e) {
  1112. if (Xe === clearTimeout) return clearTimeout(e);
  1113. if ((Xe === We || !Xe) && clearTimeout) return Xe = clearTimeout, clearTimeout(e);
  1114. try {
  1115. Xe(e)
  1116. } catch (t) {
  1117. try {
  1118. return Xe.call(null, e)
  1119. } catch (t) {
  1120. return Xe.call(this, e)
  1121. }
  1122. }
  1123. }(e)
  1124. }
  1125. }
  1126. function rt(e, t) {
  1127. this.fun = e, this.array = t
  1128. }
  1129. rt.prototype.run = function () {
  1130. this.fun.apply(null, this.array)
  1131. };
  1132. function it() {
  1133. }
  1134. var st = it, at = it, ot = it, ct = it, lt = it, ht = it, ut = it;
  1135. var pt = be.performance || {}, ft = pt.now || pt.mozNow || pt.msNow || pt.oNow || pt.webkitNow || function () {
  1136. return (new Date).getTime()
  1137. };
  1138. var dt = new Date;
  1139. var Et = {
  1140. nextTick: function (e) {
  1141. var t = new Array(arguments.length - 1);
  1142. if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  1143. Je.push(new rt(e, t)), 1 !== Je.length || Ze || $e(nt)
  1144. },
  1145. title: "browser",
  1146. browser: !0,
  1147. env: {},
  1148. argv: [],
  1149. version: "",
  1150. versions: {},
  1151. on: st,
  1152. addListener: at,
  1153. once: ot,
  1154. off: ct,
  1155. removeListener: lt,
  1156. removeAllListeners: ht,
  1157. emit: ut,
  1158. binding: function (e) {
  1159. throw new Error("process.binding is not supported")
  1160. },
  1161. cwd: function () {
  1162. return "/"
  1163. },
  1164. chdir: function (e) {
  1165. throw new Error("process.chdir is not supported")
  1166. },
  1167. umask: function () {
  1168. return 0
  1169. },
  1170. hrtime: function (e) {
  1171. var t = .001 * ft.call(pt), n = Math.floor(t), r = Math.floor(t % 1 * 1e9);
  1172. return e && (n -= e[0], (r -= e[1]) < 0 && (n--, r += 1e9)), [n, r]
  1173. },
  1174. platform: "browser",
  1175. release: {},
  1176. config: {},
  1177. uptime: function () {
  1178. return (new Date - dt) / 1e3
  1179. }
  1180. };
  1181. function mt() {
  1182. }
  1183. function Tt() {
  1184. Tt.init.call(this)
  1185. }
  1186. function _t(e) {
  1187. return void 0 === e._maxListeners ? Tt.defaultMaxListeners : e._maxListeners
  1188. }
  1189. function At(e, t, n) {
  1190. if (t) e.call(n); else for (var r = e.length, i = yt(e, r), s = 0; s < r; ++s) i[s].call(n)
  1191. }
  1192. function gt(e, t, n, r) {
  1193. if (t) e.call(n, r); else for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].call(n, r)
  1194. }
  1195. function Nt(e, t, n, r, i) {
  1196. if (t) e.call(n, r, i); else for (var s = e.length, a = yt(e, s), o = 0; o < s; ++o) a[o].call(n, r, i)
  1197. }
  1198. function Ct(e, t, n, r, i, s) {
  1199. if (t) e.call(n, r, i, s); else for (var a = e.length, o = yt(e, a), c = 0; c < a; ++c) o[c].call(n, r, i, s)
  1200. }
  1201. function It(e, t, n, r) {
  1202. if (t) e.apply(n, r); else for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].apply(n, r)
  1203. }
  1204. function St(e, t, n, r) {
  1205. var i, s, a;
  1206. if ("function" != typeof n) throw new TypeError('"listener" argument must be a function');
  1207. if ((s = e._events) ? (s.newListener && (e.emit("newListener", t, n.listener ? n.listener : n), s = e._events), a = s[t]) : (s = e._events = new mt, e._eventsCount = 0), a) {
  1208. if ("function" == typeof a ? a = s[t] = r ? [n, a] : [a, n] : r ? a.unshift(n) : a.push(n), !a.warned && (i = _t(e)) && i > 0 && a.length > i) {
  1209. a.warned = !0;
  1210. var o = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + t + " listeners added. Use emitter.setMaxListeners() to increase limit");
  1211. o.name = "MaxListenersExceededWarning", o.emitter = e, o.type = t, o.count = a.length, function (e) {
  1212. "function" == typeof console.warn ? console.warn(e) : console.log(e)
  1213. }(o)
  1214. }
  1215. } else a = s[t] = n, ++e._eventsCount;
  1216. return e
  1217. }
  1218. function bt(e, t, n) {
  1219. var r = !1;
  1220. function i() {
  1221. e.removeListener(t, i), r || (r = !0, n.apply(e, arguments))
  1222. }
  1223. return i.listener = n, i
  1224. }
  1225. function Ot(e) {
  1226. var t = this._events;
  1227. if (t) {
  1228. var n = t[e];
  1229. if ("function" == typeof n) return 1;
  1230. if (n) return n.length
  1231. }
  1232. return 0
  1233. }
  1234. function yt(e, t) {
  1235. for (var n = new Array(t); t--;) n[t] = e[t];
  1236. return n
  1237. }
  1238. function Lt() {
  1239. var e;
  1240. Tt.call(this), this.__emitError = (e = this, function (t) {
  1241. e.emit("error", t)
  1242. })
  1243. }
  1244. function kt() {
  1245. return new Lt
  1246. }
  1247. mt.prototype = Object.create(null), Tt.EventEmitter = Tt, Tt.usingDomains = !1, Tt.prototype.domain = void 0, Tt.prototype._events = void 0, Tt.prototype._maxListeners = void 0, Tt.defaultMaxListeners = 10, Tt.init = function () {
  1248. this.domain = null, Tt.usingDomains && undefined.active, this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = new mt, this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0
  1249. }, Tt.prototype.setMaxListeners = function (e) {
  1250. if ("number" != typeof e || e < 0 || isNaN(e)) throw new TypeError('"n" argument must be a positive number');
  1251. return this._maxListeners = e, this
  1252. }, Tt.prototype.getMaxListeners = function () {
  1253. return _t(this)
  1254. }, Tt.prototype.emit = function (e) {
  1255. var t, n, r, i, s, a, o, c = "error" === e;
  1256. if (a = this._events) c = c && null == a.error; else if (!c) return !1;
  1257. if (o = this.domain, c) {
  1258. if (t = arguments[1], !o) {
  1259. if (t instanceof Error) throw t;
  1260. var l = new Error('Uncaught, unspecified "error" event. (' + t + ")");
  1261. throw l.context = t, l
  1262. }
  1263. return t || (t = new Error('Uncaught, unspecified "error" event')), t.domainEmitter = this, t.domain = o, t.domainThrown = !1, o.emit("error", t), !1
  1264. }
  1265. if (!(n = a[e])) return !1;
  1266. var h = "function" == typeof n;
  1267. switch (r = arguments.length) {
  1268. case 1:
  1269. At(n, h, this);
  1270. break;
  1271. case 2:
  1272. gt(n, h, this, arguments[1]);
  1273. break;
  1274. case 3:
  1275. Nt(n, h, this, arguments[1], arguments[2]);
  1276. break;
  1277. case 4:
  1278. Ct(n, h, this, arguments[1], arguments[2], arguments[3]);
  1279. break;
  1280. default:
  1281. for (i = new Array(r - 1), s = 1; s < r; s++) i[s - 1] = arguments[s];
  1282. It(n, h, this, i)
  1283. }
  1284. return !0
  1285. }, Tt.prototype.addListener = function (e, t) {
  1286. return St(this, e, t, !1)
  1287. }, Tt.prototype.on = Tt.prototype.addListener, Tt.prototype.prependListener = function (e, t) {
  1288. return St(this, e, t, !0)
  1289. }, Tt.prototype.once = function (e, t) {
  1290. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1291. return this.on(e, bt(this, e, t)), this
  1292. }, Tt.prototype.prependOnceListener = function (e, t) {
  1293. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1294. return this.prependListener(e, bt(this, e, t)), this
  1295. }, Tt.prototype.removeListener = function (e, t) {
  1296. var n, r, i, s, a;
  1297. if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
  1298. if (!(r = this._events)) return this;
  1299. if (!(n = r[e])) return this;
  1300. if (n === t || n.listener && n.listener === t) 0 == --this._eventsCount ? this._events = new mt : (delete r[e], r.removeListener && this.emit("removeListener", e, n.listener || t)); else if ("function" != typeof n) {
  1301. for (i = -1, s = n.length; s-- > 0;) if (n[s] === t || n[s].listener && n[s].listener === t) {
  1302. a = n[s].listener, i = s;
  1303. break
  1304. }
  1305. if (i < 0) return this;
  1306. if (1 === n.length) {
  1307. if (n[0] = void 0, 0 == --this._eventsCount) return this._events = new mt, this;
  1308. delete r[e]
  1309. } else !function (e, t) {
  1310. for (var n = t, r = n + 1, i = e.length; r < i; n += 1, r += 1) e[n] = e[r];
  1311. e.pop()
  1312. }(n, i);
  1313. r.removeListener && this.emit("removeListener", e, a || t)
  1314. }
  1315. return this
  1316. }, Tt.prototype.removeAllListeners = function (e) {
  1317. var t, n;
  1318. if (!(n = this._events)) return this;
  1319. if (!n.removeListener) return 0 === arguments.length ? (this._events = new mt, this._eventsCount = 0) : n[e] && (0 == --this._eventsCount ? this._events = new mt : delete n[e]), this;
  1320. if (0 === arguments.length) {
  1321. for (var r, i = Object.keys(n), s = 0; s < i.length; ++s) "removeListener" !== (r = i[s]) && this.removeAllListeners(r);
  1322. return this.removeAllListeners("removeListener"), this._events = new mt, this._eventsCount = 0, this
  1323. }
  1324. if ("function" == typeof (t = n[e])) this.removeListener(e, t); else if (t) do {
  1325. this.removeListener(e, t[t.length - 1])
  1326. } while (t[0]);
  1327. return this
  1328. }, Tt.prototype.listeners = function (e) {
  1329. var t, n = this._events;
  1330. return n && (t = n[e]) ? "function" == typeof t ? [t.listener || t] : function (e) {
  1331. for (var t = new Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n];
  1332. return t
  1333. }(t) : []
  1334. }, Tt.listenerCount = function (e, t) {
  1335. return "function" == typeof e.listenerCount ? e.listenerCount(t) : Ot.call(e, t)
  1336. }, Tt.prototype.listenerCount = Ot, Tt.prototype.eventNames = function () {
  1337. return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []
  1338. }, ("function" == typeof Object.create ? function (e, t) {
  1339. e.super_ = t, e.prototype = Object.create(t.prototype, {
  1340. constructor: {
  1341. value: e,
  1342. enumerable: !1,
  1343. writable: !0,
  1344. configurable: !0
  1345. }
  1346. })
  1347. } : function (e, t) {
  1348. e.super_ = t;
  1349. var n = function () {
  1350. };
  1351. n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e
  1352. })(Lt, Tt), Lt.prototype.add = function (e) {
  1353. e.on("error", this.__emitError)
  1354. }, Lt.prototype.remove = function (e) {
  1355. e.removeListener("error", this.__emitError)
  1356. }, Lt.prototype.bind = function (e) {
  1357. var t = this.__emitError;
  1358. return function () {
  1359. var n = Array.prototype.slice.call(arguments);
  1360. try {
  1361. e.apply(null, n)
  1362. } catch (e) {
  1363. t(e)
  1364. }
  1365. }
  1366. }, Lt.prototype.intercept = function (e) {
  1367. var t = this.__emitError;
  1368. return function (n) {
  1369. if (n) t(n); else {
  1370. var r = Array.prototype.slice.call(arguments, 1);
  1371. try {
  1372. e.apply(null, r)
  1373. } catch (n) {
  1374. t(n)
  1375. }
  1376. }
  1377. }
  1378. }, Lt.prototype.run = function (e) {
  1379. var t = this.__emitError;
  1380. try {
  1381. e()
  1382. } catch (e) {
  1383. t(e)
  1384. }
  1385. return this
  1386. }, Lt.prototype.dispose = function () {
  1387. return this.removeAllListeners(), this
  1388. }, Lt.prototype.enter = Lt.prototype.exit = function () {
  1389. return this
  1390. };
  1391. var vt, Dt = {Domain: Lt, createDomain: kt, create: kt}, Rt = "function" == typeof setImmediate, Mt = Pt;
  1392. function Pt(e) {
  1393. xt.length || (Ut(), wt = !0), xt[xt.length] = e
  1394. }
  1395. var xt = [], wt = !1, Bt = 0;
  1396. function Ft() {
  1397. for (; Bt < xt.length;) {
  1398. var e = Bt;
  1399. if (Bt += 1, xt[e].call(), Bt > 1024) {
  1400. for (var t = 0, n = xt.length - Bt; t < n; t++) xt[t] = xt[t + Bt];
  1401. xt.length -= Bt, Bt = 0
  1402. }
  1403. }
  1404. xt.length = 0, Bt = 0, wt = !1
  1405. }
  1406. function Ut() {
  1407. var e = Et.domain;
  1408. e && (vt || (vt = Dt), vt.active = Et.domain = null), wt && Rt ? setImmediate(Ft) : Et.nextTick(Ft), e && (vt.active = Et.domain = e)
  1409. }
  1410. Pt.requestFlush = Ut;
  1411. var Ht = [], Gt = function (e) {
  1412. var t;
  1413. t = Ht.length ? Ht.pop() : new Yt;
  1414. t.task = e, t.domain = Et.domain, Mt(t)
  1415. };
  1416. function Yt() {
  1417. this.task = null, this.domain = null
  1418. }
  1419. Yt.prototype.call = function () {
  1420. this.domain && this.domain.enter();
  1421. var e = !0;
  1422. try {
  1423. this.task.call(), e = !1, this.domain && this.domain.exit()
  1424. } finally {
  1425. e && Mt.requestFlush(), this.task = null, this.domain = null, Ht.push(this)
  1426. }
  1427. };
  1428. var qt = Ke((function (e) {
  1429. !function (t) {
  1430. var n = function () {
  1431. var e = Array.prototype.slice.call(arguments);
  1432. "function" == typeof e[0] && e[0].apply(null, e.splice(1))
  1433. }, r = function (e) {
  1434. "function" == typeof setImmediate ? setImmediate(e) : void 0 !== Et && Et.nextTick ? Et.nextTick(e) : setTimeout(e, 0)
  1435. }, i = Array.isArray || function (e) {
  1436. return "[object Array]" === Object.prototype.toString.call(e)
  1437. }, s = function (e, t, s) {
  1438. var a = s ? r : n;
  1439. if (t = t || function () {
  1440. }, !i(e)) {
  1441. var o = new Error("First argument to waterfall must be an array of functions");
  1442. return t(o)
  1443. }
  1444. if (!e.length) return t();
  1445. var c = function (e) {
  1446. return function (n) {
  1447. if (n) t.apply(null, arguments), t = function () {
  1448. }; else {
  1449. var r = Array.prototype.slice.call(arguments, 1), i = e.next();
  1450. i ? r.push(c(i)) : r.push(t), a((function () {
  1451. e.apply(null, r)
  1452. }))
  1453. }
  1454. }
  1455. };
  1456. c(function (e) {
  1457. var t = function (n) {
  1458. var r = function () {
  1459. return e.length && e[n].apply(null, arguments), r.next()
  1460. };
  1461. return r.next = function () {
  1462. return n < e.length - 1 ? t(n + 1) : null
  1463. }, r
  1464. };
  1465. return t(0)
  1466. }(e))()
  1467. };
  1468. e.exports ? e.exports = s : t.waterfall = s
  1469. }(Ge)
  1470. }));
  1471. function Kt(e, t, n, r) {
  1472. return {type: e, value: t, lineno: n, colno: r}
  1473. }
  1474. var jt = function () {
  1475. function e(e, t) {
  1476. this.str = e, this.index = 0, this.len = e.length, this.lineno = 0, this.colno = 0, this.in_code = !1;
  1477. var n = (t = t || {}).tags || {};
  1478. this.tags = {
  1479. BLOCK_START: n.blockStart || "{%",
  1480. BLOCK_END: n.blockEnd || "%}",
  1481. VARIABLE_START: n.variableStart || "{{",
  1482. VARIABLE_END: n.variableEnd || "}}",
  1483. COMMENT_START: n.commentStart || "{#",
  1484. COMMENT_END: n.commentEnd || "#}"
  1485. }, this.trimBlocks = !!t.trimBlocks, this.lstripBlocks = !!t.lstripBlocks
  1486. }
  1487. var t = e.prototype;
  1488. return t.nextToken = function () {
  1489. var e, t = this.lineno, n = this.colno;
  1490. if (this.in_code) {
  1491. var r = this.current();
  1492. if (this.isFinished()) return null;
  1493. if ('"' === r || "'" === r) return Kt("string", this._parseString(r), t, n);
  1494. if (e = this._extract(" \n\t\r ")) return Kt("whitespace", e, t, n);
  1495. if ((e = this._extractString(this.tags.BLOCK_END)) || (e = this._extractString("-" + this.tags.BLOCK_END))) return this.in_code = !1, this.trimBlocks && ("\n" === (r = this.current()) ? this.forward() : "\r" === r && (this.forward(), "\n" === (r = this.current()) ? this.forward() : this.back())), Kt("block-end", e, t, n);
  1496. if ((e = this._extractString(this.tags.VARIABLE_END)) || (e = this._extractString("-" + this.tags.VARIABLE_END))) return this.in_code = !1, Kt("variable-end", e, t, n);
  1497. if ("r" === r && "/" === this.str.charAt(this.index + 1)) {
  1498. this.forwardN(2);
  1499. for (var i = ""; !this.isFinished();) {
  1500. if ("/" === this.current() && "\\" !== this.previous()) {
  1501. this.forward();
  1502. break
  1503. }
  1504. i += this.current(), this.forward()
  1505. }
  1506. for (var s = ["g", "i", "m", "y"], a = ""; !this.isFinished();) {
  1507. if (!(-1 !== s.indexOf(this.current()))) break;
  1508. a += this.current(), this.forward()
  1509. }
  1510. return Kt("regex", {body: i, flags: a}, t, n)
  1511. }
  1512. if (-1 !== "()[]{}%*-+~/#,:|.<>=!".indexOf(r)) {
  1513. this.forward();
  1514. var o, c = ["==", "===", "!=", "!==", "<=", ">=", "//", "**"], l = r + this.current();
  1515. switch (-1 !== je.indexOf(c, l) && (this.forward(), r = l, -1 !== je.indexOf(c, l + this.current()) && (r = l + this.current(), this.forward())), r) {
  1516. case"(":
  1517. o = "left-paren";
  1518. break;
  1519. case")":
  1520. o = "right-paren";
  1521. break;
  1522. case"[":
  1523. o = "left-bracket";
  1524. break;
  1525. case"]":
  1526. o = "right-bracket";
  1527. break;
  1528. case"{":
  1529. o = "left-curly";
  1530. break;
  1531. case"}":
  1532. o = "right-curly";
  1533. break;
  1534. case",":
  1535. o = "comma";
  1536. break;
  1537. case":":
  1538. o = "colon";
  1539. break;
  1540. case"~":
  1541. o = "tilde";
  1542. break;
  1543. case"|":
  1544. o = "pipe";
  1545. break;
  1546. default:
  1547. o = "operator"
  1548. }
  1549. return Kt(o, r, t, n)
  1550. }
  1551. if ((e = this._extractUntil(" \n\t\r ()[]{}%*-+~/#,:|.<>=!")).match(/^[-+]?[0-9]+$/)) return "." === this.current() ? (this.forward(), Kt("float", e + "." + this._extract("0123456789"), t, n)) : Kt("int", e, t, n);
  1552. if (e.match(/^(true|false)$/)) return Kt("boolean", e, t, n);
  1553. if ("none" === e) return Kt("none", e, t, n);
  1554. if ("null" === e) return Kt("none", e, t, n);
  1555. if (e) return Kt("symbol", e, t, n);
  1556. throw new Error("Unexpected value while parsing: " + e)
  1557. }
  1558. var h,
  1559. u = this.tags.BLOCK_START.charAt(0) + this.tags.VARIABLE_START.charAt(0) + this.tags.COMMENT_START.charAt(0) + this.tags.COMMENT_END.charAt(0);
  1560. if (this.isFinished()) return null;
  1561. if ((e = this._extractString(this.tags.BLOCK_START + "-")) || (e = this._extractString(this.tags.BLOCK_START))) return this.in_code = !0, Kt("block-start", e, t, n);
  1562. if ((e = this._extractString(this.tags.VARIABLE_START + "-")) || (e = this._extractString(this.tags.VARIABLE_START))) return this.in_code = !0, Kt("variable-start", e, t, n);
  1563. e = "";
  1564. var p = !1;
  1565. for (this._matches(this.tags.COMMENT_START) && (p = !0, e = this._extractString(this.tags.COMMENT_START)); null !== (h = this._extractUntil(u));) {
  1566. if (e += h, (this._matches(this.tags.BLOCK_START) || this._matches(this.tags.VARIABLE_START) || this._matches(this.tags.COMMENT_START)) && !p) {
  1567. if (this.lstripBlocks && this._matches(this.tags.BLOCK_START) && this.colno > 0 && this.colno <= e.length) {
  1568. var f = e.slice(-this.colno);
  1569. if (/^\s+$/.test(f) && !(e = e.slice(0, -this.colno)).length) return this.nextToken()
  1570. }
  1571. break
  1572. }
  1573. if (this._matches(this.tags.COMMENT_END)) {
  1574. if (!p) throw new Error("unexpected end of comment");
  1575. e += this._extractString(this.tags.COMMENT_END);
  1576. break
  1577. }
  1578. e += this.current(), this.forward()
  1579. }
  1580. if (null === h && p) throw new Error("expected end of comment, got end of file");
  1581. return Kt(p ? "comment" : "data", e, t, n)
  1582. }, t._parseString = function (e) {
  1583. this.forward();
  1584. for (var t = ""; !this.isFinished() && this.current() !== e;) {
  1585. var n = this.current();
  1586. if ("\\" === n) {
  1587. switch (this.forward(), this.current()) {
  1588. case"n":
  1589. t += "\n";
  1590. break;
  1591. case"t":
  1592. t += "\t";
  1593. break;
  1594. case"r":
  1595. t += "\r";
  1596. break;
  1597. default:
  1598. t += this.current()
  1599. }
  1600. this.forward()
  1601. } else t += n, this.forward()
  1602. }
  1603. return this.forward(), t
  1604. }, t._matches = function (e) {
  1605. return this.index + e.length > this.len ? null : this.str.slice(this.index, this.index + e.length) === e
  1606. }, t._extractString = function (e) {
  1607. return this._matches(e) ? (this.forwardN(e.length), e) : null
  1608. }, t._extractUntil = function (e) {
  1609. return this._extractMatching(!0, e || "")
  1610. }, t._extract = function (e) {
  1611. return this._extractMatching(!1, e)
  1612. }, t._extractMatching = function (e, t) {
  1613. if (this.isFinished()) return null;
  1614. var n = t.indexOf(this.current());
  1615. if (e && -1 === n || !e && -1 !== n) {
  1616. var r = this.current();
  1617. this.forward();
  1618. for (var i = t.indexOf(this.current()); (e && -1 === i || !e && -1 !== i) && !this.isFinished();) r += this.current(), this.forward(), i = t.indexOf(this.current());
  1619. return r
  1620. }
  1621. return ""
  1622. }, t._extractRegex = function (e) {
  1623. var t = this.currentStr().match(e);
  1624. return t ? (this.forwardN(t[0].length), t) : null
  1625. }, t.isFinished = function () {
  1626. return this.index >= this.len
  1627. }, t.forwardN = function (e) {
  1628. for (var t = 0; t < e; t++) this.forward()
  1629. }, t.forward = function () {
  1630. this.index++, "\n" === this.previous() ? (this.lineno++, this.colno = 0) : this.colno++
  1631. }, t.backN = function (e) {
  1632. for (var t = 0; t < e; t++) this.back()
  1633. }, t.back = function () {
  1634. if (this.index--, "\n" === this.current()) {
  1635. this.lineno--;
  1636. var e = this.src.lastIndexOf("\n", this.index - 1);
  1637. this.colno = -1 === e ? this.index : this.index - e
  1638. } else this.colno--
  1639. }, t.current = function () {
  1640. return this.isFinished() ? "" : this.str.charAt(this.index)
  1641. }, t.currentStr = function () {
  1642. return this.isFinished() ? "" : this.str.substr(this.index)
  1643. }, t.previous = function () {
  1644. return this.str.charAt(this.index - 1)
  1645. }, e
  1646. }(), Vt = {
  1647. lex: function (e, t) {
  1648. return new jt(e, t)
  1649. },
  1650. TOKEN_STRING: "string",
  1651. TOKEN_WHITESPACE: "whitespace",
  1652. TOKEN_DATA: "data",
  1653. TOKEN_BLOCK_START: "block-start",
  1654. TOKEN_BLOCK_END: "block-end",
  1655. TOKEN_VARIABLE_START: "variable-start",
  1656. TOKEN_VARIABLE_END: "variable-end",
  1657. TOKEN_COMMENT: "comment",
  1658. TOKEN_LEFT_PAREN: "left-paren",
  1659. TOKEN_RIGHT_PAREN: "right-paren",
  1660. TOKEN_LEFT_BRACKET: "left-bracket",
  1661. TOKEN_RIGHT_BRACKET: "right-bracket",
  1662. TOKEN_LEFT_CURLY: "left-curly",
  1663. TOKEN_RIGHT_CURLY: "right-curly",
  1664. TOKEN_OPERATOR: "operator",
  1665. TOKEN_COMMA: "comma",
  1666. TOKEN_COLON: "colon",
  1667. TOKEN_TILDE: "tilde",
  1668. TOKEN_PIPE: "pipe",
  1669. TOKEN_INT: "int",
  1670. TOKEN_FLOAT: "float",
  1671. TOKEN_BOOLEAN: "boolean",
  1672. TOKEN_NONE: "none",
  1673. TOKEN_SYMBOL: "symbol",
  1674. TOKEN_SPECIAL: "special",
  1675. TOKEN_REGEX: "regex"
  1676. };
  1677. function Wt(e, t) {
  1678. for (var n = 0; n < t.length; n++) {
  1679. var r = t[n];
  1680. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1681. }
  1682. }
  1683. function Qt(e, t, n) {
  1684. return t && Wt(e.prototype, t), n && Wt(e, n), e
  1685. }
  1686. function Xt(e, t) {
  1687. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, $t(e, t)
  1688. }
  1689. function $t(e, t) {
  1690. return $t = Object.setPrototypeOf || function (e, t) {
  1691. return e.__proto__ = t, e
  1692. }, $t(e, t)
  1693. }
  1694. function zt(e, t, n) {
  1695. n = n || {}, je.keys(n).forEach((function (t) {
  1696. n[t] = function (e, t) {
  1697. return "function" != typeof e || "function" != typeof t ? t : function () {
  1698. var n = this.parent;
  1699. this.parent = e;
  1700. var r = t.apply(this, arguments);
  1701. return this.parent = n, r
  1702. }
  1703. }(e.prototype[t], n[t])
  1704. }));
  1705. var r = function (e) {
  1706. function n() {
  1707. return e.apply(this, arguments) || this
  1708. }
  1709. return Xt(n, e), Qt(n, [{
  1710. key: "typename", get: function () {
  1711. return t
  1712. }
  1713. }]), n
  1714. }(e);
  1715. return je._assign(r.prototype, n), r
  1716. }
  1717. var Jt = function () {
  1718. function e() {
  1719. this.init.apply(this, arguments)
  1720. }
  1721. return e.prototype.init = function () {
  1722. }, e.extend = function (e, t) {
  1723. return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t)
  1724. }, Qt(e, [{
  1725. key: "typename", get: function () {
  1726. return this.constructor.name
  1727. }
  1728. }]), e
  1729. }(), Zt = function (e) {
  1730. function t() {
  1731. var t, n;
  1732. return (t = n = e.call(this) || this).init.apply(t, arguments), n
  1733. }
  1734. return Xt(t, e), t.prototype.init = function () {
  1735. }, t.extend = function (e, t) {
  1736. return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t)
  1737. }, Qt(t, [{
  1738. key: "typename", get: function () {
  1739. return this.constructor.name
  1740. }
  1741. }]), t
  1742. }(Tt), en = {Obj: Jt, EmitterObj: Zt};
  1743. function tn(e, t) {
  1744. for (var n = 0; n < t.length; n++) {
  1745. var r = t[n];
  1746. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  1747. }
  1748. }
  1749. function nn(e, t, n) {
  1750. return t && tn(e.prototype, t), n && tn(e, n), e
  1751. }
  1752. function rn(e, t) {
  1753. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t)
  1754. }
  1755. function sn(e, t) {
  1756. return sn = Object.setPrototypeOf || function (e, t) {
  1757. return e.__proto__ = t, e
  1758. }, sn(e, t)
  1759. }
  1760. function an(e, t, n) {
  1761. e instanceof t && n.push(e), e instanceof on && e.findAll(t, n)
  1762. }
  1763. var on = function (e) {
  1764. function t() {
  1765. return e.apply(this, arguments) || this
  1766. }
  1767. rn(t, e);
  1768. var n = t.prototype;
  1769. return n.init = function (e, t) {
  1770. for (var n = arguments, r = this, i = arguments.length, s = new Array(i > 2 ? i - 2 : 0), a = 2; a < i; a++) s[a - 2] = arguments[a];
  1771. this.lineno = e, this.colno = t, this.fields.forEach((function (e, t) {
  1772. var i = n[t + 2];
  1773. void 0 === i && (i = null), r[e] = i
  1774. }))
  1775. }, n.findAll = function (e, t) {
  1776. var n = this;
  1777. return t = t || [], this instanceof ln ? this.children.forEach((function (n) {
  1778. return an(n, e, t)
  1779. })) : this.fields.forEach((function (r) {
  1780. return an(n[r], e, t)
  1781. })), t
  1782. }, n.iterFields = function (e) {
  1783. var t = this;
  1784. this.fields.forEach((function (n) {
  1785. e(t[n], n)
  1786. }))
  1787. }, t
  1788. }(en.Obj), cn = function (e) {
  1789. function t() {
  1790. return e.apply(this, arguments) || this
  1791. }
  1792. return rn(t, e), nn(t, [{
  1793. key: "typename", get: function () {
  1794. return "Value"
  1795. }
  1796. }, {
  1797. key: "fields", get: function () {
  1798. return ["value"]
  1799. }
  1800. }]), t
  1801. }(on), ln = function (e) {
  1802. function t() {
  1803. return e.apply(this, arguments) || this
  1804. }
  1805. rn(t, e);
  1806. var n = t.prototype;
  1807. return n.init = function (t, n, r) {
  1808. e.prototype.init.call(this, t, n, r || [])
  1809. }, n.addChild = function (e) {
  1810. this.children.push(e)
  1811. }, nn(t, [{
  1812. key: "typename", get: function () {
  1813. return "NodeList"
  1814. }
  1815. }, {
  1816. key: "fields", get: function () {
  1817. return ["children"]
  1818. }
  1819. }]), t
  1820. }(on), hn = ln.extend("Root"), un = cn.extend("Literal"), pn = cn.extend("Symbol"), fn = ln.extend("Group"),
  1821. dn = ln.extend("Array"), En = on.extend("Pair", {fields: ["key", "value"]}), mn = ln.extend("Dict"),
  1822. Tn = on.extend("LookupVal", {fields: ["target", "val"]}), _n = on.extend("If", {fields: ["cond", "body", "else_"]}),
  1823. An = _n.extend("IfAsync"), gn = on.extend("InlineIf", {fields: ["cond", "body", "else_"]}),
  1824. Nn = on.extend("For", {fields: ["arr", "name", "body", "else_"]}), Cn = Nn.extend("AsyncEach"),
  1825. In = Nn.extend("AsyncAll"), Sn = on.extend("Macro", {fields: ["name", "args", "body"]}), bn = Sn.extend("Caller"),
  1826. On = on.extend("Import", {fields: ["template", "target", "withContext"]}), yn = function (e) {
  1827. function t() {
  1828. return e.apply(this, arguments) || this
  1829. }
  1830. return rn(t, e), t.prototype.init = function (t, n, r, i, s) {
  1831. e.prototype.init.call(this, t, n, r, i || new ln, s)
  1832. }, nn(t, [{
  1833. key: "typename", get: function () {
  1834. return "FromImport"
  1835. }
  1836. }, {
  1837. key: "fields", get: function () {
  1838. return ["template", "names", "withContext"]
  1839. }
  1840. }]), t
  1841. }(on), Ln = on.extend("FunCall", {fields: ["name", "args"]}), kn = Ln.extend("Filter"),
  1842. vn = kn.extend("FilterAsync", {fields: ["name", "args", "symbol"]}), Dn = mn.extend("KeywordArgs"),
  1843. Rn = on.extend("Block", {fields: ["name", "body"]}), Mn = on.extend("Super", {fields: ["blockName", "symbol"]}),
  1844. Pn = on.extend("TemplateRef", {fields: ["template"]}).extend("Extends"),
  1845. xn = on.extend("Include", {fields: ["template", "ignoreMissing"]}),
  1846. wn = on.extend("Set", {fields: ["targets", "value"]}),
  1847. Bn = on.extend("Switch", {fields: ["expr", "cases", "default"]}),
  1848. Fn = on.extend("Case", {fields: ["cond", "body"]}), Un = ln.extend("Output"),
  1849. Hn = on.extend("Capture", {fields: ["body"]}), Gn = un.extend("TemplateData"),
  1850. Yn = on.extend("UnaryOp", {fields: ["target"]}), qn = on.extend("BinOp", {fields: ["left", "right"]}),
  1851. Kn = qn.extend("In"), jn = qn.extend("Is"), Vn = qn.extend("Or"), Wn = qn.extend("And"), Qn = Yn.extend("Not"),
  1852. Xn = qn.extend("Add"), $n = qn.extend("Concat"), zn = qn.extend("Sub"), Jn = qn.extend("Mul"),
  1853. Zn = qn.extend("Div"), er = qn.extend("FloorDiv"), tr = qn.extend("Mod"), nr = qn.extend("Pow"),
  1854. rr = Yn.extend("Neg"), ir = Yn.extend("Pos"), sr = on.extend("Compare", {fields: ["expr", "ops"]}),
  1855. ar = on.extend("CompareOperand", {fields: ["expr", "type"]}), or = on.extend("CallExtension", {
  1856. init: function (e, t, n, r) {
  1857. this.parent(), this.extName = e.__name || e, this.prop = t, this.args = n || new ln, this.contentArgs = r || [], this.autoescape = e.autoescape
  1858. }, fields: ["extName", "prop", "args", "contentArgs"]
  1859. }), cr = or.extend("CallExtensionAsync");
  1860. function lr(e, t, n) {
  1861. var r = e.split("\n");
  1862. r.forEach((function (e, i) {
  1863. e && (n && i > 0 || !n) && Et.stdout.write(" ".repeat(t));
  1864. var s = i === r.length - 1 ? "" : "\n";
  1865. Et.stdout.write("" + e + s)
  1866. }))
  1867. }
  1868. var hr = {
  1869. Node: on,
  1870. Root: hn,
  1871. NodeList: ln,
  1872. Value: cn,
  1873. Literal: un,
  1874. Symbol: pn,
  1875. Group: fn,
  1876. Array: dn,
  1877. Pair: En,
  1878. Dict: mn,
  1879. Output: Un,
  1880. Capture: Hn,
  1881. TemplateData: Gn,
  1882. If: _n,
  1883. IfAsync: An,
  1884. InlineIf: gn,
  1885. For: Nn,
  1886. AsyncEach: Cn,
  1887. AsyncAll: In,
  1888. Macro: Sn,
  1889. Caller: bn,
  1890. Import: On,
  1891. FromImport: yn,
  1892. FunCall: Ln,
  1893. Filter: kn,
  1894. FilterAsync: vn,
  1895. KeywordArgs: Dn,
  1896. Block: Rn,
  1897. Super: Mn,
  1898. Extends: Pn,
  1899. Include: xn,
  1900. Set: wn,
  1901. Switch: Bn,
  1902. Case: Fn,
  1903. LookupVal: Tn,
  1904. BinOp: qn,
  1905. In: Kn,
  1906. Is: jn,
  1907. Or: Vn,
  1908. And: Wn,
  1909. Not: Qn,
  1910. Add: Xn,
  1911. Concat: $n,
  1912. Sub: zn,
  1913. Mul: Jn,
  1914. Div: Zn,
  1915. FloorDiv: er,
  1916. Mod: tr,
  1917. Pow: nr,
  1918. Neg: rr,
  1919. Pos: ir,
  1920. Compare: sr,
  1921. CompareOperand: ar,
  1922. CallExtension: or,
  1923. CallExtensionAsync: cr,
  1924. printNodes: function e(t, n) {
  1925. if (n = n || 0, lr(t.typename + ": ", n), t instanceof ln) lr("\n"), t.children.forEach((function (t) {
  1926. e(t, n + 2)
  1927. })); else if (t instanceof or) lr(t.extName + "." + t.prop + "\n"), t.args && e(t.args, n + 2), t.contentArgs && t.contentArgs.forEach((function (t) {
  1928. e(t, n + 2)
  1929. })); else {
  1930. var r = [], i = null;
  1931. t.iterFields((function (e, t) {
  1932. e instanceof on ? r.push([t, e]) : (i = i || {})[t] = e
  1933. })), i ? lr(JSON.stringify(i, null, 2) + "\n", null, !0) : lr("\n"), r.forEach((function (t) {
  1934. var r = t[0], i = t[1];
  1935. lr("[" + r + "] =>", n + 2), e(i, n + 4)
  1936. }))
  1937. }
  1938. }
  1939. };
  1940. function ur(e, t) {
  1941. return ur = Object.setPrototypeOf || function (e, t) {
  1942. return e.__proto__ = t, e
  1943. }, ur(e, t)
  1944. }
  1945. hr.Node, hr.Root, hr.NodeList, hr.Value, hr.Literal, hr.Group, hr.Pair, hr.Dict, hr.Output, hr.Capture, hr.TemplateData, hr.If, hr.IfAsync, hr.InlineIf, hr.For, hr.AsyncEach, hr.AsyncAll, hr.Macro, hr.Caller, hr.Import, hr.FromImport, hr.FunCall, hr.Filter, hr.FilterAsync, hr.KeywordArgs, hr.Block, hr.Super, hr.Extends, hr.Include, hr.Switch, hr.Case, hr.LookupVal, hr.BinOp, hr.In, hr.Is, hr.Or, hr.And, hr.Not, hr.Add, hr.Concat, hr.Sub, hr.Mul, hr.Div, hr.FloorDiv, hr.Mod, hr.Pow, hr.Neg, hr.Pos, hr.Compare, hr.CompareOperand, hr.CallExtension, hr.CallExtensionAsync, hr.printNodes;
  1946. var pr = function (e) {
  1947. var t, n;
  1948. function r() {
  1949. return e.apply(this, arguments) || this
  1950. }
  1951. n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, ur(t, n);
  1952. var i = r.prototype;
  1953. return i.init = function (e) {
  1954. this.tokens = e, this.peeked = null, this.breakOnBlocks = null, this.dropLeadingWhitespace = !1, this.extensions = []
  1955. }, i.nextToken = function (e) {
  1956. var t;
  1957. if (this.peeked) {
  1958. if (e || this.peeked.type !== Vt.TOKEN_WHITESPACE) return t = this.peeked, this.peeked = null, t;
  1959. this.peeked = null
  1960. }
  1961. if (t = this.tokens.nextToken(), !e) for (; t && t.type === Vt.TOKEN_WHITESPACE;) t = this.tokens.nextToken();
  1962. return t
  1963. }, i.peekToken = function () {
  1964. return this.peeked = this.peeked || this.nextToken(), this.peeked
  1965. }, i.pushToken = function (e) {
  1966. if (this.peeked) throw new Error("pushToken: can only push one token on between reads");
  1967. this.peeked = e
  1968. }, i.error = function (e, t, n) {
  1969. if (void 0 === t || void 0 === n) {
  1970. var r = this.peekToken() || {};
  1971. t = r.lineno, n = r.colno
  1972. }
  1973. return void 0 !== t && (t += 1), void 0 !== n && (n += 1), new je.TemplateError(e, t, n)
  1974. }, i.fail = function (e, t, n) {
  1975. throw this.error(e, t, n)
  1976. }, i.skip = function (e) {
  1977. var t = this.nextToken();
  1978. return !(!t || t.type !== e) || (this.pushToken(t), !1)
  1979. }, i.expect = function (e) {
  1980. var t = this.nextToken();
  1981. return t.type !== e && this.fail("expected " + e + ", got " + t.type, t.lineno, t.colno), t
  1982. }, i.skipValue = function (e, t) {
  1983. var n = this.nextToken();
  1984. return !(!n || n.type !== e || n.value !== t) || (this.pushToken(n), !1)
  1985. }, i.skipSymbol = function (e) {
  1986. return this.skipValue(Vt.TOKEN_SYMBOL, e)
  1987. }, i.advanceAfterBlockEnd = function (e) {
  1988. var t;
  1989. return e || ((t = this.peekToken()) || this.fail("unexpected end of file"), t.type !== Vt.TOKEN_SYMBOL && this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"), e = this.nextToken().value), (t = this.nextToken()) && t.type === Vt.TOKEN_BLOCK_END ? "-" === t.value.charAt(0) && (this.dropLeadingWhitespace = !0) : this.fail("expected block end in " + e + " statement"), t
  1990. }, i.advanceAfterVariableEnd = function () {
  1991. var e = this.nextToken();
  1992. e && e.type === Vt.TOKEN_VARIABLE_END ? this.dropLeadingWhitespace = "-" === e.value.charAt(e.value.length - this.tokens.tags.VARIABLE_END.length - 1) : (this.pushToken(e), this.fail("expected variable end"))
  1993. }, i.parseFor = function () {
  1994. var e, t, n = this.peekToken();
  1995. if (this.skipSymbol("for") ? (e = new hr.For(n.lineno, n.colno), t = "endfor") : this.skipSymbol("asyncEach") ? (e = new hr.AsyncEach(n.lineno, n.colno), t = "endeach") : this.skipSymbol("asyncAll") ? (e = new hr.AsyncAll(n.lineno, n.colno), t = "endall") : this.fail("parseFor: expected for{Async}", n.lineno, n.colno), e.name = this.parsePrimary(), e.name instanceof hr.Symbol || this.fail("parseFor: variable name expected for loop"), this.peekToken().type === Vt.TOKEN_COMMA) {
  1996. var r = e.name;
  1997. for (e.name = new hr.Array(r.lineno, r.colno), e.name.addChild(r); this.skip(Vt.TOKEN_COMMA);) {
  1998. var i = this.parsePrimary();
  1999. e.name.addChild(i)
  2000. }
  2001. }
  2002. return this.skipSymbol("in") || this.fail('parseFor: expected "in" keyword for loop', n.lineno, n.colno), e.arr = this.parseExpression(), this.advanceAfterBlockEnd(n.value), e.body = this.parseUntilBlocks(t, "else"), this.skipSymbol("else") && (this.advanceAfterBlockEnd("else"), e.else_ = this.parseUntilBlocks(t)), this.advanceAfterBlockEnd(), e
  2003. }, i.parseMacro = function () {
  2004. var e = this.peekToken();
  2005. this.skipSymbol("macro") || this.fail("expected macro");
  2006. var t = this.parsePrimary(!0), n = this.parseSignature(), r = new hr.Macro(e.lineno, e.colno, t, n);
  2007. return this.advanceAfterBlockEnd(e.value), r.body = this.parseUntilBlocks("endmacro"), this.advanceAfterBlockEnd(), r
  2008. }, i.parseCall = function () {
  2009. var e = this.peekToken();
  2010. this.skipSymbol("call") || this.fail("expected call");
  2011. var t = this.parseSignature(!0) || new hr.NodeList, n = this.parsePrimary();
  2012. this.advanceAfterBlockEnd(e.value);
  2013. var r = this.parseUntilBlocks("endcall");
  2014. this.advanceAfterBlockEnd();
  2015. var i = new hr.Symbol(e.lineno, e.colno, "caller"), s = new hr.Caller(e.lineno, e.colno, i, t, r),
  2016. a = n.args.children;
  2017. return a[a.length - 1] instanceof hr.KeywordArgs || a.push(new hr.KeywordArgs), a[a.length - 1].addChild(new hr.Pair(e.lineno, e.colno, i, s)), new hr.Output(e.lineno, e.colno, [n])
  2018. }, i.parseWithContext = function () {
  2019. var e = this.peekToken(), t = null;
  2020. return this.skipSymbol("with") ? t = !0 : this.skipSymbol("without") && (t = !1), null !== t && (this.skipSymbol("context") || this.fail("parseFrom: expected context after with/without", e.lineno, e.colno)), t
  2021. }, i.parseImport = function () {
  2022. var e = this.peekToken();
  2023. this.skipSymbol("import") || this.fail("parseImport: expected import", e.lineno, e.colno);
  2024. var t = this.parseExpression();
  2025. this.skipSymbol("as") || this.fail('parseImport: expected "as" keyword', e.lineno, e.colno);
  2026. var n = this.parseExpression(), r = this.parseWithContext(), i = new hr.Import(e.lineno, e.colno, t, n, r);
  2027. return this.advanceAfterBlockEnd(e.value), i
  2028. }, i.parseFrom = function () {
  2029. var e = this.peekToken();
  2030. this.skipSymbol("from") || this.fail("parseFrom: expected from");
  2031. var t = this.parseExpression();
  2032. this.skipSymbol("import") || this.fail("parseFrom: expected import", e.lineno, e.colno);
  2033. for (var n, r = new hr.NodeList; ;) {
  2034. var i = this.peekToken();
  2035. if (i.type === Vt.TOKEN_BLOCK_END) {
  2036. r.children.length || this.fail("parseFrom: Expected at least one import name", e.lineno, e.colno), "-" === i.value.charAt(0) && (this.dropLeadingWhitespace = !0), this.nextToken();
  2037. break
  2038. }
  2039. r.children.length > 0 && !this.skip(Vt.TOKEN_COMMA) && this.fail("parseFrom: expected comma", e.lineno, e.colno);
  2040. var s = this.parsePrimary();
  2041. if ("_" === s.value.charAt(0) && this.fail("parseFrom: names starting with an underscore cannot be imported", s.lineno, s.colno), this.skipSymbol("as")) {
  2042. var a = this.parsePrimary();
  2043. r.addChild(new hr.Pair(s.lineno, s.colno, s, a))
  2044. } else r.addChild(s);
  2045. n = this.parseWithContext()
  2046. }
  2047. return new hr.FromImport(e.lineno, e.colno, t, r, n)
  2048. }, i.parseBlock = function () {
  2049. var e = this.peekToken();
  2050. this.skipSymbol("block") || this.fail("parseBlock: expected block", e.lineno, e.colno);
  2051. var t = new hr.Block(e.lineno, e.colno);
  2052. t.name = this.parsePrimary(), t.name instanceof hr.Symbol || this.fail("parseBlock: variable name expected", e.lineno, e.colno), this.advanceAfterBlockEnd(e.value), t.body = this.parseUntilBlocks("endblock"), this.skipSymbol("endblock"), this.skipSymbol(t.name.value);
  2053. var n = this.peekToken();
  2054. return n || this.fail("parseBlock: expected endblock, got end of file"), this.advanceAfterBlockEnd(n.value), t
  2055. }, i.parseExtends = function () {
  2056. var e = "extends", t = this.peekToken();
  2057. this.skipSymbol(e) || this.fail("parseTemplateRef: expected extends");
  2058. var n = new hr.Extends(t.lineno, t.colno);
  2059. return n.template = this.parseExpression(), this.advanceAfterBlockEnd(t.value), n
  2060. }, i.parseInclude = function () {
  2061. var e = "include", t = this.peekToken();
  2062. this.skipSymbol(e) || this.fail("parseInclude: expected include");
  2063. var n = new hr.Include(t.lineno, t.colno);
  2064. return n.template = this.parseExpression(), this.skipSymbol("ignore") && this.skipSymbol("missing") && (n.ignoreMissing = !0), this.advanceAfterBlockEnd(t.value), n
  2065. }, i.parseIf = function () {
  2066. var e, t = this.peekToken();
  2067. this.skipSymbol("if") || this.skipSymbol("elif") || this.skipSymbol("elseif") ? e = new hr.If(t.lineno, t.colno) : this.skipSymbol("ifAsync") ? e = new hr.IfAsync(t.lineno, t.colno) : this.fail("parseIf: expected if, elif, or elseif", t.lineno, t.colno), e.cond = this.parseExpression(), this.advanceAfterBlockEnd(t.value), e.body = this.parseUntilBlocks("elif", "elseif", "else", "endif");
  2068. var n = this.peekToken();
  2069. switch (n && n.value) {
  2070. case"elseif":
  2071. case"elif":
  2072. e.else_ = this.parseIf();
  2073. break;
  2074. case"else":
  2075. this.advanceAfterBlockEnd(), e.else_ = this.parseUntilBlocks("endif"), this.advanceAfterBlockEnd();
  2076. break;
  2077. case"endif":
  2078. e.else_ = null, this.advanceAfterBlockEnd();
  2079. break;
  2080. default:
  2081. this.fail("parseIf: expected elif, else, or endif, got end of file")
  2082. }
  2083. return e
  2084. }, i.parseSet = function () {
  2085. var e = this.peekToken();
  2086. this.skipSymbol("set") || this.fail("parseSet: expected set", e.lineno, e.colno);
  2087. for (var t, n = new hr.Set(e.lineno, e.colno, []); (t = this.parsePrimary()) && (n.targets.push(t), this.skip(Vt.TOKEN_COMMA));) ;
  2088. return this.skipValue(Vt.TOKEN_OPERATOR, "=") ? (n.value = this.parseExpression(), this.advanceAfterBlockEnd(e.value)) : this.skip(Vt.TOKEN_BLOCK_END) ? (n.body = new hr.Capture(e.lineno, e.colno, this.parseUntilBlocks("endset")), n.value = null, this.advanceAfterBlockEnd()) : this.fail("parseSet: expected = or block end in set tag", e.lineno, e.colno), n
  2089. }, i.parseSwitch = function () {
  2090. var e = "switch", t = "endswitch", n = "case", r = "default", i = this.peekToken();
  2091. this.skipSymbol(e) || this.skipSymbol(n) || this.skipSymbol(r) || this.fail('parseSwitch: expected "switch," "case" or "default"', i.lineno, i.colno);
  2092. var s = this.parseExpression();
  2093. this.advanceAfterBlockEnd(e), this.parseUntilBlocks(n, r, t);
  2094. var a, o = this.peekToken(), c = [];
  2095. do {
  2096. this.skipSymbol(n);
  2097. var l = this.parseExpression();
  2098. this.advanceAfterBlockEnd(e);
  2099. var h = this.parseUntilBlocks(n, r, t);
  2100. c.push(new hr.Case(o.line, o.col, l, h)), o = this.peekToken()
  2101. } while (o && o.value === n);
  2102. switch (o.value) {
  2103. case r:
  2104. this.advanceAfterBlockEnd(), a = this.parseUntilBlocks(t), this.advanceAfterBlockEnd();
  2105. break;
  2106. case t:
  2107. this.advanceAfterBlockEnd();
  2108. break;
  2109. default:
  2110. this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')
  2111. }
  2112. return new hr.Switch(i.lineno, i.colno, s, c, a)
  2113. }, i.parseStatement = function () {
  2114. var e = this.peekToken();
  2115. if (e.type !== Vt.TOKEN_SYMBOL && this.fail("tag name expected", e.lineno, e.colno), this.breakOnBlocks && -1 !== je.indexOf(this.breakOnBlocks, e.value)) return null;
  2116. switch (e.value) {
  2117. case"raw":
  2118. return this.parseRaw();
  2119. case"verbatim":
  2120. return this.parseRaw("verbatim");
  2121. case"if":
  2122. case"ifAsync":
  2123. return this.parseIf();
  2124. case"for":
  2125. case"asyncEach":
  2126. case"asyncAll":
  2127. return this.parseFor();
  2128. case"block":
  2129. return this.parseBlock();
  2130. case"extends":
  2131. return this.parseExtends();
  2132. case"include":
  2133. return this.parseInclude();
  2134. case"set":
  2135. return this.parseSet();
  2136. case"macro":
  2137. return this.parseMacro();
  2138. case"call":
  2139. return this.parseCall();
  2140. case"import":
  2141. return this.parseImport();
  2142. case"from":
  2143. return this.parseFrom();
  2144. case"filter":
  2145. return this.parseFilterStatement();
  2146. case"switch":
  2147. return this.parseSwitch();
  2148. default:
  2149. if (this.extensions.length) for (var t = 0; t < this.extensions.length; t++) {
  2150. var n = this.extensions[t];
  2151. if (-1 !== je.indexOf(n.tags || [], e.value)) return n.parse(this, hr, Vt)
  2152. }
  2153. this.fail("unknown block tag: " + e.value, e.lineno, e.colno)
  2154. }
  2155. }, i.parseRaw = function (e) {
  2156. for (var t = "end" + (e = e || "raw"), n = new RegExp("([\\s\\S]*?){%\\s*(" + e + "|" + t + ")\\s*(?=%})%}"), r = 1, i = "", s = null, a = this.advanceAfterBlockEnd(); (s = this.tokens._extractRegex(n)) && r > 0;) {
  2157. var o = s[0], c = s[1], l = s[2];
  2158. l === e ? r += 1 : l === t && (r -= 1), 0 === r ? (i += c, this.tokens.backN(o.length - c.length)) : i += o
  2159. }
  2160. return new hr.Output(a.lineno, a.colno, [new hr.TemplateData(a.lineno, a.colno, i)])
  2161. }, i.parsePostfix = function (e) {
  2162. for (var t, n = this.peekToken(); n;) {
  2163. if (n.type === Vt.TOKEN_LEFT_PAREN) e = new hr.FunCall(n.lineno, n.colno, e, this.parseSignature()); else if (n.type === Vt.TOKEN_LEFT_BRACKET) (t = this.parseAggregate()).children.length > 1 && this.fail("invalid index"), e = new hr.LookupVal(n.lineno, n.colno, e, t.children[0]); else {
  2164. if (n.type !== Vt.TOKEN_OPERATOR || "." !== n.value) break;
  2165. this.nextToken();
  2166. var r = this.nextToken();
  2167. r.type !== Vt.TOKEN_SYMBOL && this.fail("expected name as lookup value, got " + r.value, r.lineno, r.colno), t = new hr.Literal(r.lineno, r.colno, r.value), e = new hr.LookupVal(n.lineno, n.colno, e, t)
  2168. }
  2169. n = this.peekToken()
  2170. }
  2171. return e
  2172. }, i.parseExpression = function () {
  2173. return this.parseInlineIf()
  2174. }, i.parseInlineIf = function () {
  2175. var e = this.parseOr();
  2176. if (this.skipSymbol("if")) {
  2177. var t = this.parseOr(), n = e;
  2178. (e = new hr.InlineIf(e.lineno, e.colno)).body = n, e.cond = t, this.skipSymbol("else") ? e.else_ = this.parseOr() : e.else_ = null
  2179. }
  2180. return e
  2181. }, i.parseOr = function () {
  2182. for (var e = this.parseAnd(); this.skipSymbol("or");) {
  2183. var t = this.parseAnd();
  2184. e = new hr.Or(e.lineno, e.colno, e, t)
  2185. }
  2186. return e
  2187. }, i.parseAnd = function () {
  2188. for (var e = this.parseNot(); this.skipSymbol("and");) {
  2189. var t = this.parseNot();
  2190. e = new hr.And(e.lineno, e.colno, e, t)
  2191. }
  2192. return e
  2193. }, i.parseNot = function () {
  2194. var e = this.peekToken();
  2195. return this.skipSymbol("not") ? new hr.Not(e.lineno, e.colno, this.parseNot()) : this.parseIn()
  2196. }, i.parseIn = function () {
  2197. for (var e = this.parseIs(); ;) {
  2198. var t = this.nextToken();
  2199. if (!t) break;
  2200. var n = t.type === Vt.TOKEN_SYMBOL && "not" === t.value;
  2201. if (n || this.pushToken(t), !this.skipSymbol("in")) {
  2202. n && this.pushToken(t);
  2203. break
  2204. }
  2205. var r = this.parseIs();
  2206. e = new hr.In(e.lineno, e.colno, e, r), n && (e = new hr.Not(e.lineno, e.colno, e))
  2207. }
  2208. return e
  2209. }, i.parseIs = function () {
  2210. var e = this.parseCompare();
  2211. if (this.skipSymbol("is")) {
  2212. var t = this.skipSymbol("not"), n = this.parseCompare();
  2213. e = new hr.Is(e.lineno, e.colno, e, n), t && (e = new hr.Not(e.lineno, e.colno, e))
  2214. }
  2215. return e
  2216. }, i.parseCompare = function () {
  2217. for (var e = ["==", "===", "!=", "!==", "<", ">", "<=", ">="], t = this.parseConcat(), n = []; ;) {
  2218. var r = this.nextToken();
  2219. if (!r) break;
  2220. if (-1 === e.indexOf(r.value)) {
  2221. this.pushToken(r);
  2222. break
  2223. }
  2224. n.push(new hr.CompareOperand(r.lineno, r.colno, this.parseConcat(), r.value))
  2225. }
  2226. return n.length ? new hr.Compare(n[0].lineno, n[0].colno, t, n) : t
  2227. }, i.parseConcat = function () {
  2228. for (var e = this.parseAdd(); this.skipValue(Vt.TOKEN_TILDE, "~");) {
  2229. var t = this.parseAdd();
  2230. e = new hr.Concat(e.lineno, e.colno, e, t)
  2231. }
  2232. return e
  2233. }, i.parseAdd = function () {
  2234. for (var e = this.parseSub(); this.skipValue(Vt.TOKEN_OPERATOR, "+");) {
  2235. var t = this.parseSub();
  2236. e = new hr.Add(e.lineno, e.colno, e, t)
  2237. }
  2238. return e
  2239. }, i.parseSub = function () {
  2240. for (var e = this.parseMul(); this.skipValue(Vt.TOKEN_OPERATOR, "-");) {
  2241. var t = this.parseMul();
  2242. e = new hr.Sub(e.lineno, e.colno, e, t)
  2243. }
  2244. return e
  2245. }, i.parseMul = function () {
  2246. for (var e = this.parseDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "*");) {
  2247. var t = this.parseDiv();
  2248. e = new hr.Mul(e.lineno, e.colno, e, t)
  2249. }
  2250. return e
  2251. }, i.parseDiv = function () {
  2252. for (var e = this.parseFloorDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "/");) {
  2253. var t = this.parseFloorDiv();
  2254. e = new hr.Div(e.lineno, e.colno, e, t)
  2255. }
  2256. return e
  2257. }, i.parseFloorDiv = function () {
  2258. for (var e = this.parseMod(); this.skipValue(Vt.TOKEN_OPERATOR, "//");) {
  2259. var t = this.parseMod();
  2260. e = new hr.FloorDiv(e.lineno, e.colno, e, t)
  2261. }
  2262. return e
  2263. }, i.parseMod = function () {
  2264. for (var e = this.parsePow(); this.skipValue(Vt.TOKEN_OPERATOR, "%");) {
  2265. var t = this.parsePow();
  2266. e = new hr.Mod(e.lineno, e.colno, e, t)
  2267. }
  2268. return e
  2269. }, i.parsePow = function () {
  2270. for (var e = this.parseUnary(); this.skipValue(Vt.TOKEN_OPERATOR, "**");) {
  2271. var t = this.parseUnary();
  2272. e = new hr.Pow(e.lineno, e.colno, e, t)
  2273. }
  2274. return e
  2275. }, i.parseUnary = function (e) {
  2276. var t, n = this.peekToken();
  2277. return t = this.skipValue(Vt.TOKEN_OPERATOR, "-") ? new hr.Neg(n.lineno, n.colno, this.parseUnary(!0)) : this.skipValue(Vt.TOKEN_OPERATOR, "+") ? new hr.Pos(n.lineno, n.colno, this.parseUnary(!0)) : this.parsePrimary(), e || (t = this.parseFilter(t)), t
  2278. }, i.parsePrimary = function (e) {
  2279. var t, n = this.nextToken(), r = null;
  2280. if (n ? n.type === Vt.TOKEN_STRING ? t = n.value : n.type === Vt.TOKEN_INT ? t = parseInt(n.value, 10) : n.type === Vt.TOKEN_FLOAT ? t = parseFloat(n.value) : n.type === Vt.TOKEN_BOOLEAN ? "true" === n.value ? t = !0 : "false" === n.value ? t = !1 : this.fail("invalid boolean: " + n.value, n.lineno, n.colno) : n.type === Vt.TOKEN_NONE ? t = null : n.type === Vt.TOKEN_REGEX && (t = new RegExp(n.value.body, n.value.flags)) : this.fail("expected expression, got end of file"), void 0 !== t ? r = new hr.Literal(n.lineno, n.colno, t) : n.type === Vt.TOKEN_SYMBOL ? r = new hr.Symbol(n.lineno, n.colno, n.value) : (this.pushToken(n), r = this.parseAggregate()), e || (r = this.parsePostfix(r)), r) return r;
  2281. throw this.error("unexpected token: " + n.value, n.lineno, n.colno)
  2282. }, i.parseFilterName = function () {
  2283. for (var e = this.expect(Vt.TOKEN_SYMBOL), t = e.value; this.skipValue(Vt.TOKEN_OPERATOR, ".");) t += "." + this.expect(Vt.TOKEN_SYMBOL).value;
  2284. return new hr.Symbol(e.lineno, e.colno, t)
  2285. }, i.parseFilterArgs = function (e) {
  2286. return this.peekToken().type === Vt.TOKEN_LEFT_PAREN ? this.parsePostfix(e).args.children : []
  2287. }, i.parseFilter = function (e) {
  2288. for (; this.skip(Vt.TOKEN_PIPE);) {
  2289. var t = this.parseFilterName();
  2290. e = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [e].concat(this.parseFilterArgs(e))))
  2291. }
  2292. return e
  2293. }, i.parseFilterStatement = function () {
  2294. var e = this.peekToken();
  2295. this.skipSymbol("filter") || this.fail("parseFilterStatement: expected filter");
  2296. var t = this.parseFilterName(), n = this.parseFilterArgs(t);
  2297. this.advanceAfterBlockEnd(e.value);
  2298. var r = new hr.Capture(t.lineno, t.colno, this.parseUntilBlocks("endfilter"));
  2299. this.advanceAfterBlockEnd();
  2300. var i = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [r].concat(n)));
  2301. return new hr.Output(t.lineno, t.colno, [i])
  2302. }, i.parseAggregate = function () {
  2303. var e, t = this.nextToken();
  2304. switch (t.type) {
  2305. case Vt.TOKEN_LEFT_PAREN:
  2306. e = new hr.Group(t.lineno, t.colno);
  2307. break;
  2308. case Vt.TOKEN_LEFT_BRACKET:
  2309. e = new hr.Array(t.lineno, t.colno);
  2310. break;
  2311. case Vt.TOKEN_LEFT_CURLY:
  2312. e = new hr.Dict(t.lineno, t.colno);
  2313. break;
  2314. default:
  2315. return null
  2316. }
  2317. for (; ;) {
  2318. var n = this.peekToken().type;
  2319. if (n === Vt.TOKEN_RIGHT_PAREN || n === Vt.TOKEN_RIGHT_BRACKET || n === Vt.TOKEN_RIGHT_CURLY) {
  2320. this.nextToken();
  2321. break
  2322. }
  2323. if (e.children.length > 0 && (this.skip(Vt.TOKEN_COMMA) || this.fail("parseAggregate: expected comma after expression", t.lineno, t.colno)), e instanceof hr.Dict) {
  2324. var r = this.parsePrimary();
  2325. this.skip(Vt.TOKEN_COLON) || this.fail("parseAggregate: expected colon after dict key", t.lineno, t.colno);
  2326. var i = this.parseExpression();
  2327. e.addChild(new hr.Pair(r.lineno, r.colno, r, i))
  2328. } else {
  2329. var s = this.parseExpression();
  2330. e.addChild(s)
  2331. }
  2332. }
  2333. return e
  2334. }, i.parseSignature = function (e, t) {
  2335. var n = this.peekToken();
  2336. if (!t && n.type !== Vt.TOKEN_LEFT_PAREN) {
  2337. if (e) return null;
  2338. this.fail("expected arguments", n.lineno, n.colno)
  2339. }
  2340. n.type === Vt.TOKEN_LEFT_PAREN && (n = this.nextToken());
  2341. for (var r = new hr.NodeList(n.lineno, n.colno), i = new hr.KeywordArgs(n.lineno, n.colno), s = !1; ;) {
  2342. if (n = this.peekToken(), !t && n.type === Vt.TOKEN_RIGHT_PAREN) {
  2343. this.nextToken();
  2344. break
  2345. }
  2346. if (t && n.type === Vt.TOKEN_BLOCK_END) break;
  2347. if (s && !this.skip(Vt.TOKEN_COMMA)) this.fail("parseSignature: expected comma after expression", n.lineno, n.colno); else {
  2348. var a = this.parseExpression();
  2349. this.skipValue(Vt.TOKEN_OPERATOR, "=") ? i.addChild(new hr.Pair(a.lineno, a.colno, a, this.parseExpression())) : r.addChild(a)
  2350. }
  2351. s = !0
  2352. }
  2353. return i.children.length && r.addChild(i), r
  2354. }, i.parseUntilBlocks = function () {
  2355. for (var e = this.breakOnBlocks, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
  2356. this.breakOnBlocks = n;
  2357. var i = this.parse();
  2358. return this.breakOnBlocks = e, i
  2359. }, i.parseNodes = function () {
  2360. for (var e, t = []; e = this.nextToken();) if (e.type === Vt.TOKEN_DATA) {
  2361. var n = e.value, r = this.peekToken(), i = r && r.value;
  2362. this.dropLeadingWhitespace && (n = n.replace(/^\s*/, ""), this.dropLeadingWhitespace = !1), r && (r.type === Vt.TOKEN_BLOCK_START && "-" === i.charAt(i.length - 1) || r.type === Vt.TOKEN_VARIABLE_START && "-" === i.charAt(this.tokens.tags.VARIABLE_START.length) || r.type === Vt.TOKEN_COMMENT && "-" === i.charAt(this.tokens.tags.COMMENT_START.length)) && (n = n.replace(/\s*$/, "")), t.push(new hr.Output(e.lineno, e.colno, [new hr.TemplateData(e.lineno, e.colno, n)]))
  2363. } else if (e.type === Vt.TOKEN_BLOCK_START) {
  2364. this.dropLeadingWhitespace = !1;
  2365. var s = this.parseStatement();
  2366. if (!s) break;
  2367. t.push(s)
  2368. } else if (e.type === Vt.TOKEN_VARIABLE_START) {
  2369. var a = this.parseExpression();
  2370. this.dropLeadingWhitespace = !1, this.advanceAfterVariableEnd(), t.push(new hr.Output(e.lineno, e.colno, [a]))
  2371. } else e.type === Vt.TOKEN_COMMENT ? this.dropLeadingWhitespace = "-" === e.value.charAt(e.value.length - this.tokens.tags.COMMENT_END.length - 1) : this.fail("Unexpected token at top-level: " + e.type, e.lineno, e.colno);
  2372. return t
  2373. }, i.parse = function () {
  2374. return new hr.NodeList(0, 0, this.parseNodes())
  2375. }, i.parseAsRoot = function () {
  2376. return new hr.Root(0, 0, this.parseNodes())
  2377. }, r
  2378. }(en.Obj), fr = {
  2379. parse: function (e, t, n) {
  2380. var r = new pr(Vt.lex(e, n));
  2381. return void 0 !== t && (r.extensions = t), r.parseAsRoot()
  2382. }, Parser: pr
  2383. }, dr = 0;
  2384. function Er() {
  2385. return "hole_" + dr++
  2386. }
  2387. function mr(e, t) {
  2388. for (var n = null, r = 0; r < e.length; r++) {
  2389. var i = t(e[r]);
  2390. i !== e[r] && (n || (n = e.slice()), n[r] = i)
  2391. }
  2392. return n || e
  2393. }
  2394. function Tr(e, t, n) {
  2395. if (!(e instanceof hr.Node)) return e;
  2396. if (!n) {
  2397. var r = t(e);
  2398. if (r && r !== e) return r
  2399. }
  2400. if (e instanceof hr.NodeList) {
  2401. var i = mr(e.children, (function (e) {
  2402. return Tr(e, t, n)
  2403. }));
  2404. i !== e.children && (e = new hr[e.typename](e.lineno, e.colno, i))
  2405. } else if (e instanceof hr.CallExtension) {
  2406. var s = Tr(e.args, t, n), a = mr(e.contentArgs, (function (e) {
  2407. return Tr(e, t, n)
  2408. }));
  2409. s === e.args && a === e.contentArgs || (e = new hr[e.typename](e.extName, e.prop, s, a))
  2410. } else {
  2411. var o = e.fields.map((function (t) {
  2412. return e[t]
  2413. })), c = mr(o, (function (e) {
  2414. return Tr(e, t, n)
  2415. }));
  2416. c !== o && (e = new hr[e.typename](e.lineno, e.colno), c.forEach((function (t, n) {
  2417. e[e.fields[n]] = t
  2418. })))
  2419. }
  2420. return n && t(e) || e
  2421. }
  2422. function _r(e, t) {
  2423. return Tr(e, t, !0)
  2424. }
  2425. function Ar(e, t, n) {
  2426. var r = [], i = _r(n ? e[n] : e, (function (e) {
  2427. var n;
  2428. return e instanceof hr.Block ? e : ((e instanceof hr.Filter && -1 !== je.indexOf(t, e.name.value) || e instanceof hr.CallExtensionAsync) && (n = new hr.Symbol(e.lineno, e.colno, Er()), r.push(new hr.FilterAsync(e.lineno, e.colno, e.name, e.args, n))), n)
  2429. }));
  2430. return n ? e[n] = i : e = i, r.length ? (r.push(e), new hr.NodeList(e.lineno, e.colno, r)) : e
  2431. }
  2432. function gr(e, t) {
  2433. return function (e) {
  2434. return _r(e, (function (e) {
  2435. if (e instanceof hr.If || e instanceof hr.For) {
  2436. var t = !1;
  2437. if (Tr(e, (function (e) {
  2438. if (e instanceof hr.FilterAsync || e instanceof hr.IfAsync || e instanceof hr.AsyncEach || e instanceof hr.AsyncAll || e instanceof hr.CallExtensionAsync) return t = !0, e
  2439. })), t) {
  2440. if (e instanceof hr.If) return new hr.IfAsync(e.lineno, e.colno, e.cond, e.body, e.else_);
  2441. if (e instanceof hr.For && !(e instanceof hr.AsyncAll)) return new hr.AsyncEach(e.lineno, e.colno, e.arr, e.name, e.body, e.else_)
  2442. }
  2443. }
  2444. }))
  2445. }(function (e) {
  2446. return Tr(e, (function (e) {
  2447. if (e instanceof hr.Block) {
  2448. var t = !1, n = Er();
  2449. e.body = Tr(e.body, (function (e) {
  2450. if (e instanceof hr.FunCall && "super" === e.name.value) return t = !0, new hr.Symbol(e.lineno, e.colno, n)
  2451. })), t && e.body.children.unshift(new hr.Super(0, 0, e.name, new hr.Symbol(0, 0, n)))
  2452. }
  2453. }))
  2454. }(function (e, t) {
  2455. return _r(e, (function (e) {
  2456. return e instanceof hr.Output ? Ar(e, t) : e instanceof hr.Set ? Ar(e, t, "value") : e instanceof hr.For ? Ar(e, t, "arr") : e instanceof hr.If ? Ar(e, t, "cond") : e instanceof hr.CallExtension ? Ar(e, t, "args") : void 0
  2457. }))
  2458. }(e, t)))
  2459. }
  2460. var Nr = {
  2461. transform: function (e, t) {
  2462. return gr(e, t || [])
  2463. }
  2464. }, Cr = Array.from, Ir = "function" == typeof Symbol && Symbol.iterator && "function" == typeof Cr, Sr = function () {
  2465. function e(e, t) {
  2466. this.variables = Object.create(null), this.parent = e, this.topLevel = !1, this.isolateWrites = t
  2467. }
  2468. var t = e.prototype;
  2469. return t.set = function (e, t, n) {
  2470. var r = e.split("."), i = this.variables, s = this;
  2471. if (n && (s = this.resolve(r[0], !0))) s.set(e, t); else {
  2472. for (var a = 0; a < r.length - 1; a++) {
  2473. var o = r[a];
  2474. i[o] || (i[o] = {}), i = i[o]
  2475. }
  2476. i[r[r.length - 1]] = t
  2477. }
  2478. }, t.get = function (e) {
  2479. var t = this.variables[e];
  2480. return void 0 !== t ? t : null
  2481. }, t.lookup = function (e) {
  2482. var t = this.parent, n = this.variables[e];
  2483. return void 0 !== n ? n : t && t.lookup(e)
  2484. }, t.resolve = function (e, t) {
  2485. var n = t && this.isolateWrites ? void 0 : this.parent;
  2486. return void 0 !== this.variables[e] ? this : n && n.resolve(e)
  2487. }, t.push = function (t) {
  2488. return new e(this, t)
  2489. }, t.pop = function () {
  2490. return this.parent
  2491. }, e
  2492. }();
  2493. function br(e) {
  2494. return e && Object.prototype.hasOwnProperty.call(e, "__keywords")
  2495. }
  2496. function Or(e) {
  2497. var t = e.length;
  2498. if (t) {
  2499. var n = e[t - 1];
  2500. if (br(n)) return n
  2501. }
  2502. return {}
  2503. }
  2504. function yr(e) {
  2505. var t = e.length;
  2506. return 0 === t ? 0 : br(e[t - 1]) ? t - 1 : t
  2507. }
  2508. function Lr(e) {
  2509. if ("string" != typeof e) return e;
  2510. this.val = e, Object.defineProperty(this, "length", {writable: !0, configurable: !0, value: e.length})
  2511. }
  2512. Lr.prototype = Object.create(String.prototype, {
  2513. length: {
  2514. writable: !0,
  2515. configurable: !0,
  2516. value: 0
  2517. }
  2518. }), Lr.prototype.valueOf = function () {
  2519. return this.val
  2520. }, Lr.prototype.toString = function () {
  2521. return this.val
  2522. };
  2523. var kr = {
  2524. Frame: Sr, makeMacro: function (e, t, n) {
  2525. return function () {
  2526. for (var r = arguments.length, i = new Array(r), s = 0; s < r; s++) i[s] = arguments[s];
  2527. var a, o = yr(i), c = Or(i);
  2528. if (o > e.length) a = i.slice(0, e.length), i.slice(a.length, o).forEach((function (e, n) {
  2529. n < t.length && (c[t[n]] = e)
  2530. })), a.push(c); else if (o < e.length) {
  2531. a = i.slice(0, o);
  2532. for (var l = o; l < e.length; l++) {
  2533. var h = e[l];
  2534. a.push(c[h]), delete c[h]
  2535. }
  2536. a.push(c)
  2537. } else a = i;
  2538. return n.apply(this, a)
  2539. }
  2540. }, makeKeywordArgs: function (e) {
  2541. return e.__keywords = !0, e
  2542. }, numArgs: yr, suppressValue: function (e, t) {
  2543. return "object" == typeof (e = null != e ? e : "") ? new Lr(JSON.stringify(e).toString()) : (!t || e instanceof Lr || (e = je.escape(e.toString())), e)
  2544. }, ensureDefined: function (e, t, n) {
  2545. if (null == e) throw new je.TemplateError("attempted to output null or undefined value", t + 1, n + 1);
  2546. return e
  2547. }, memberLookup: function (e, t) {
  2548. if (null != e) return "function" == typeof e[t] ? function () {
  2549. for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
  2550. return e[t].apply(e, r)
  2551. } : e[t]
  2552. }, contextOrFrameLookup: function (e, t, n) {
  2553. var r = t.lookup(n);
  2554. return void 0 !== r ? r : e.lookup(n)
  2555. }, callWrap: function (e, t, n, r) {
  2556. if (!e) throw new Error("Unable to call `" + t + "`, which is undefined or falsey");
  2557. if ("function" != typeof e) throw new Error("Unable to call `" + t + "`, which is not a function");
  2558. return e.apply(n, r)
  2559. }, handleError: function (e, t, n) {
  2560. return e.lineno ? e : new je.TemplateError(e, t, n)
  2561. }, isArray: je.isArray, keys: je.keys, SafeString: Lr, copySafeness: function (e, t) {
  2562. return e instanceof Lr ? new Lr(t) : t.toString()
  2563. }, markSafe: function (e) {
  2564. var t = typeof e;
  2565. return "string" === t ? new Lr(e) : "function" !== t ? e : function (t) {
  2566. var n = e.apply(this, arguments);
  2567. return "string" == typeof n ? new Lr(n) : n
  2568. }
  2569. }, asyncEach: function (e, t, n, r) {
  2570. if (je.isArray(e)) {
  2571. var i = e.length;
  2572. je.asyncIter(e, (function (e, r, s) {
  2573. switch (t) {
  2574. case 1:
  2575. n(e, r, i, s);
  2576. break;
  2577. case 2:
  2578. n(e[0], e[1], r, i, s);
  2579. break;
  2580. case 3:
  2581. n(e[0], e[1], e[2], r, i, s);
  2582. break;
  2583. default:
  2584. e.push(r, i, s), n.apply(this, e)
  2585. }
  2586. }), r)
  2587. } else je.asyncFor(e, (function (e, t, r, i, s) {
  2588. n(e, t, r, i, s)
  2589. }), r)
  2590. }, asyncAll: function (e, t, n, r) {
  2591. var i, s, a = 0;
  2592. function o(e, t) {
  2593. a++, s[e] = t, a === i && r(null, s.join(""))
  2594. }
  2595. if (je.isArray(e)) if (i = e.length, s = new Array(i), 0 === i) r(null, ""); else for (var c = 0; c < e.length; c++) {
  2596. var l = e[c];
  2597. switch (t) {
  2598. case 1:
  2599. n(l, c, i, o);
  2600. break;
  2601. case 2:
  2602. n(l[0], l[1], c, i, o);
  2603. break;
  2604. case 3:
  2605. n(l[0], l[1], l[2], c, i, o);
  2606. break;
  2607. default:
  2608. l.push(c, i, o), n.apply(this, l)
  2609. }
  2610. } else {
  2611. var h = je.keys(e || {});
  2612. if (i = h.length, s = new Array(i), 0 === i) r(null, ""); else for (var u = 0; u < h.length; u++) {
  2613. var p = h[u];
  2614. n(p, e[p], u, i, o)
  2615. }
  2616. }
  2617. }, inOperator: je.inOperator, fromIterator: function (e) {
  2618. return "object" != typeof e || null === e || je.isArray(e) ? e : Ir && Symbol.iterator in e ? Cr(e) : e
  2619. }
  2620. };
  2621. function vr(e, t) {
  2622. return vr = Object.setPrototypeOf || function (e, t) {
  2623. return e.__proto__ = t, e
  2624. }, vr(e, t)
  2625. }
  2626. kr.Frame, kr.makeMacro, kr.makeKeywordArgs, kr.numArgs, kr.suppressValue, kr.ensureDefined, kr.memberLookup, kr.contextOrFrameLookup, kr.callWrap, kr.handleError, kr.isArray, kr.keys, kr.SafeString, kr.copySafeness, kr.markSafe, kr.asyncEach, kr.asyncAll, kr.inOperator, kr.fromIterator;
  2627. var Dr = je.TemplateError, Rr = kr.Frame,
  2628. Mr = {"==": "==", "===": "===", "!=": "!=", "!==": "!==", "<": "<", ">": ">", "<=": "<=", ">=": ">="},
  2629. Pr = function (e) {
  2630. var t, n;
  2631. function r() {
  2632. return e.apply(this, arguments) || this
  2633. }
  2634. n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, vr(t, n);
  2635. var i = r.prototype;
  2636. return i.init = function (e, t) {
  2637. this.templateName = e, this.codebuf = [], this.lastId = 0, this.buffer = null, this.bufferStack = [], this._scopeClosers = "", this.inBlock = !1, this.throwOnUndefined = t
  2638. }, i.fail = function (e, t, n) {
  2639. throw void 0 !== t && (t += 1), void 0 !== n && (n += 1), new Dr(e, t, n)
  2640. }, i._pushBuffer = function () {
  2641. var e = this._tmpid();
  2642. return this.bufferStack.push(this.buffer), this.buffer = e, this._emit("var " + this.buffer + ' = "";'), e
  2643. }, i._popBuffer = function () {
  2644. this.buffer = this.bufferStack.pop()
  2645. }, i._emit = function (e) {
  2646. this.codebuf.push(e)
  2647. }, i._emitLine = function (e) {
  2648. this._emit(e + "\n")
  2649. }, i._emitLines = function () {
  2650. for (var e = this, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
  2651. n.forEach((function (t) {
  2652. return e._emitLine(t)
  2653. }))
  2654. }, i._emitFuncBegin = function (e, t) {
  2655. this.buffer = "output", this._scopeClosers = "", this._emitLine("function " + t + "(env, context, frame, runtime, cb) {"), this._emitLine("var lineno = " + e.lineno + ";"), this._emitLine("var colno = " + e.colno + ";"), this._emitLine("var " + this.buffer + ' = "";'), this._emitLine("try {")
  2656. }, i._emitFuncEnd = function (e) {
  2657. e || this._emitLine("cb(null, " + this.buffer + ");"), this._closeScopeLevels(), this._emitLine("} catch (e) {"), this._emitLine(" cb(runtime.handleError(e, lineno, colno));"), this._emitLine("}"), this._emitLine("}"), this.buffer = null
  2658. }, i._addScopeLevel = function () {
  2659. this._scopeClosers += "})"
  2660. }, i._closeScopeLevels = function () {
  2661. this._emitLine(this._scopeClosers + ";"), this._scopeClosers = ""
  2662. }, i._withScopedSyntax = function (e) {
  2663. var t = this._scopeClosers;
  2664. this._scopeClosers = "", e.call(this), this._closeScopeLevels(), this._scopeClosers = t
  2665. }, i._makeCallback = function (e) {
  2666. var t = this._tmpid();
  2667. return "function(" + t + (e ? "," + e : "") + ") {\nif(" + t + ") { cb(" + t + "); return; }"
  2668. }, i._tmpid = function () {
  2669. return this.lastId++, "t_" + this.lastId
  2670. }, i._templateName = function () {
  2671. return null == this.templateName ? "undefined" : JSON.stringify(this.templateName)
  2672. }, i._compileChildren = function (e, t) {
  2673. var n = this;
  2674. e.children.forEach((function (e) {
  2675. n.compile(e, t)
  2676. }))
  2677. }, i._compileAggregate = function (e, t, n, r) {
  2678. var i = this;
  2679. n && this._emit(n), e.children.forEach((function (e, n) {
  2680. n > 0 && i._emit(","), i.compile(e, t)
  2681. })), r && this._emit(r)
  2682. }, i._compileExpression = function (e, t) {
  2683. this.assertType(e, hr.Literal, hr.Symbol, hr.Group, hr.Array, hr.Dict, hr.FunCall, hr.Caller, hr.Filter, hr.LookupVal, hr.Compare, hr.InlineIf, hr.In, hr.Is, hr.And, hr.Or, hr.Not, hr.Add, hr.Concat, hr.Sub, hr.Mul, hr.Div, hr.FloorDiv, hr.Mod, hr.Pow, hr.Neg, hr.Pos, hr.Compare, hr.NodeList), this.compile(e, t)
  2684. }, i.assertType = function (e) {
  2685. for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
  2686. n.some((function (t) {
  2687. return e instanceof t
  2688. })) || this.fail("assertType: invalid type: " + e.typename, e.lineno, e.colno)
  2689. }, i.compileCallExtension = function (e, t, n) {
  2690. var r = this, i = e.args, s = e.contentArgs, a = "boolean" != typeof e.autoescape || e.autoescape;
  2691. if (n || this._emit(this.buffer + " += runtime.suppressValue("), this._emit('env.getExtension("' + e.extName + '")["' + e.prop + '"]('), this._emit("context"), (i || s) && this._emit(","), i && (i instanceof hr.NodeList || this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"), i.children.forEach((function (e, n) {
  2692. r._compileExpression(e, t), (n !== i.children.length - 1 || s.length) && r._emit(",")
  2693. }))), s.length && s.forEach((function (e, n) {
  2694. if (n > 0 && r._emit(","), e) {
  2695. r._emitLine("function(cb) {"), r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");
  2696. var i = r._pushBuffer();
  2697. r._withScopedSyntax((function () {
  2698. r.compile(e, t), r._emitLine("cb(null, " + i + ");")
  2699. })), r._popBuffer(), r._emitLine("return " + i + ";"), r._emitLine("}")
  2700. } else r._emit("null")
  2701. })), n) {
  2702. var o = this._tmpid();
  2703. this._emitLine(", " + this._makeCallback(o)), this._emitLine(this.buffer + " += runtime.suppressValue(" + o + ", " + a + " && env.opts.autoescape);"), this._addScopeLevel()
  2704. } else this._emit(")"), this._emit(", " + a + " && env.opts.autoescape);\n")
  2705. }, i.compileCallExtensionAsync = function (e, t) {
  2706. this.compileCallExtension(e, t, !0)
  2707. }, i.compileNodeList = function (e, t) {
  2708. this._compileChildren(e, t)
  2709. }, i.compileLiteral = function (e) {
  2710. if ("string" == typeof e.value) {
  2711. var t = e.value.replace(/\\/g, "\\\\");
  2712. t = (t = (t = (t = (t = t.replace(/"/g, '\\"')).replace(/\n/g, "\\n")).replace(/\r/g, "\\r")).replace(/\t/g, "\\t")).replace(/\u2028/g, "\\u2028"), this._emit('"' + t + '"')
  2713. } else null === e.value ? this._emit("null") : this._emit(e.value.toString())
  2714. }, i.compileSymbol = function (e, t) {
  2715. var n = e.value, r = t.lookup(n);
  2716. r ? this._emit(r) : this._emit('runtime.contextOrFrameLookup(context, frame, "' + n + '")')
  2717. }, i.compileGroup = function (e, t) {
  2718. this._compileAggregate(e, t, "(", ")")
  2719. }, i.compileArray = function (e, t) {
  2720. this._compileAggregate(e, t, "[", "]")
  2721. }, i.compileDict = function (e, t) {
  2722. this._compileAggregate(e, t, "{", "}")
  2723. }, i.compilePair = function (e, t) {
  2724. var n = e.key, r = e.value;
  2725. n instanceof hr.Symbol ? n = new hr.Literal(n.lineno, n.colno, n.value) : n instanceof hr.Literal && "string" == typeof n.value || this.fail("compilePair: Dict keys must be strings or names", n.lineno, n.colno), this.compile(n, t), this._emit(": "), this._compileExpression(r, t)
  2726. }, i.compileInlineIf = function (e, t) {
  2727. this._emit("("), this.compile(e.cond, t), this._emit("?"), this.compile(e.body, t), this._emit(":"), null !== e.else_ ? this.compile(e.else_, t) : this._emit('""'), this._emit(")")
  2728. }, i.compileIn = function (e, t) {
  2729. this._emit("runtime.inOperator("), this.compile(e.left, t), this._emit(","), this.compile(e.right, t), this._emit(")")
  2730. }, i.compileIs = function (e, t) {
  2731. var n = e.right.name ? e.right.name.value : e.right.value;
  2732. this._emit('env.getTest("' + n + '").call(context, '), this.compile(e.left, t), e.right.args && (this._emit(","), this.compile(e.right.args, t)), this._emit(") === true")
  2733. }, i._binOpEmitter = function (e, t, n) {
  2734. this.compile(e.left, t), this._emit(n), this.compile(e.right, t)
  2735. }, i.compileOr = function (e, t) {
  2736. return this._binOpEmitter(e, t, " || ")
  2737. }, i.compileAnd = function (e, t) {
  2738. return this._binOpEmitter(e, t, " && ")
  2739. }, i.compileAdd = function (e, t) {
  2740. return this._binOpEmitter(e, t, " + ")
  2741. }, i.compileConcat = function (e, t) {
  2742. return this._binOpEmitter(e, t, ' + "" + ')
  2743. }, i.compileSub = function (e, t) {
  2744. return this._binOpEmitter(e, t, " - ")
  2745. }, i.compileMul = function (e, t) {
  2746. return this._binOpEmitter(e, t, " * ")
  2747. }, i.compileDiv = function (e, t) {
  2748. return this._binOpEmitter(e, t, " / ")
  2749. }, i.compileMod = function (e, t) {
  2750. return this._binOpEmitter(e, t, " % ")
  2751. }, i.compileNot = function (e, t) {
  2752. this._emit("!"), this.compile(e.target, t)
  2753. }, i.compileFloorDiv = function (e, t) {
  2754. this._emit("Math.floor("), this.compile(e.left, t), this._emit(" / "), this.compile(e.right, t), this._emit(")")
  2755. }, i.compilePow = function (e, t) {
  2756. this._emit("Math.pow("), this.compile(e.left, t), this._emit(", "), this.compile(e.right, t), this._emit(")")
  2757. }, i.compileNeg = function (e, t) {
  2758. this._emit("-"), this.compile(e.target, t)
  2759. }, i.compilePos = function (e, t) {
  2760. this._emit("+"), this.compile(e.target, t)
  2761. }, i.compileCompare = function (e, t) {
  2762. var n = this;
  2763. this.compile(e.expr, t), e.ops.forEach((function (e) {
  2764. n._emit(" " + Mr[e.type] + " "), n.compile(e.expr, t)
  2765. }))
  2766. }, i.compileLookupVal = function (e, t) {
  2767. this._emit("runtime.memberLookup(("), this._compileExpression(e.target, t), this._emit("),"), this._compileExpression(e.val, t), this._emit(")")
  2768. }, i._getNodeName = function (e) {
  2769. switch (e.typename) {
  2770. case"Symbol":
  2771. return e.value;
  2772. case"FunCall":
  2773. return "the return value of (" + this._getNodeName(e.name) + ")";
  2774. case"LookupVal":
  2775. return this._getNodeName(e.target) + '["' + this._getNodeName(e.val) + '"]';
  2776. case"Literal":
  2777. return e.value.toString();
  2778. default:
  2779. return "--expression--"
  2780. }
  2781. }, i.compileFunCall = function (e, t) {
  2782. this._emit("(lineno = " + e.lineno + ", colno = " + e.colno + ", "), this._emit("runtime.callWrap("), this._compileExpression(e.name, t), this._emit(', "' + this._getNodeName(e.name).replace(/"/g, '\\"') + '", context, '), this._compileAggregate(e.args, t, "[", "])"), this._emit(")")
  2783. }, i.compileFilter = function (e, t) {
  2784. var n = e.name;
  2785. this.assertType(n, hr.Symbol), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emit(")")
  2786. }, i.compileFilterAsync = function (e, t) {
  2787. var n = e.name, r = e.symbol.value;
  2788. this.assertType(n, hr.Symbol), t.set(r, r), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emitLine(", " + this._makeCallback(r)), this._addScopeLevel()
  2789. }, i.compileKeywordArgs = function (e, t) {
  2790. this._emit("runtime.makeKeywordArgs("), this.compileDict(e, t), this._emit(")")
  2791. }, i.compileSet = function (e, t) {
  2792. var n = this, r = [];
  2793. e.targets.forEach((function (e) {
  2794. var i = e.value, s = t.lookup(i);
  2795. null == s && (s = n._tmpid(), n._emitLine("var " + s + ";")), r.push(s)
  2796. })), e.value ? (this._emit(r.join(" = ") + " = "), this._compileExpression(e.value, t), this._emitLine(";")) : (this._emit(r.join(" = ") + " = "), this.compile(e.body, t), this._emitLine(";")), e.targets.forEach((function (e, t) {
  2797. var i = r[t], s = e.value;
  2798. n._emitLine('frame.set("' + s + '", ' + i + ", true);"), n._emitLine("if(frame.topLevel) {"), n._emitLine('context.setVariable("' + s + '", ' + i + ");"), n._emitLine("}"), "_" !== s.charAt(0) && (n._emitLine("if(frame.topLevel) {"), n._emitLine('context.addExport("' + s + '", ' + i + ");"), n._emitLine("}"))
  2799. }))
  2800. }, i.compileSwitch = function (e, t) {
  2801. var n = this;
  2802. this._emit("switch ("), this.compile(e.expr, t), this._emit(") {"), e.cases.forEach((function (e, r) {
  2803. n._emit("case "), n.compile(e.cond, t), n._emit(": "), n.compile(e.body, t), e.body.children.length && n._emitLine("break;")
  2804. })), e.default && (this._emit("default:"), this.compile(e.default, t)), this._emit("}")
  2805. }, i.compileIf = function (e, t, n) {
  2806. var r = this;
  2807. this._emit("if("), this._compileExpression(e.cond, t), this._emitLine(") {"), this._withScopedSyntax((function () {
  2808. r.compile(e.body, t), n && r._emit("cb()")
  2809. })), e.else_ ? (this._emitLine("}\nelse {"), this._withScopedSyntax((function () {
  2810. r.compile(e.else_, t), n && r._emit("cb()")
  2811. }))) : n && (this._emitLine("}\nelse {"), this._emit("cb()")), this._emitLine("}")
  2812. }, i.compileIfAsync = function (e, t) {
  2813. this._emit("(function(cb) {"), this.compileIf(e, t, !0), this._emit("})(" + this._makeCallback()), this._addScopeLevel()
  2814. }, i._emitLoopBindings = function (e, t, n, r) {
  2815. var i = this;
  2816. [{name: "index", val: n + " + 1"}, {name: "index0", val: n}, {
  2817. name: "revindex",
  2818. val: r + " - " + n
  2819. }, {name: "revindex0", val: r + " - " + n + " - 1"}, {name: "first", val: n + " === 0"}, {
  2820. name: "last",
  2821. val: n + " === " + r + " - 1"
  2822. }, {name: "length", val: r}].forEach((function (e) {
  2823. i._emitLine('frame.set("loop.' + e.name + '", ' + e.val + ");")
  2824. }))
  2825. }, i.compileFor = function (e, t) {
  2826. var n = this, r = this._tmpid(), i = this._tmpid(), s = this._tmpid();
  2827. if (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + s + " = "), this._compileExpression(e.arr, t), this._emitLine(";"), this._emit("if(" + s + ") {"), this._emitLine(s + " = runtime.fromIterator(" + s + ");"), e.name instanceof hr.Array) {
  2828. this._emitLine("var " + r + ";"), this._emitLine("if(runtime.isArray(" + s + ")) {"), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(" + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), e.name.children.forEach((function (i, a) {
  2829. var o = n._tmpid();
  2830. n._emitLine("var " + o + " = " + s + "[" + r + "][" + a + "];"), n._emitLine('frame.set("' + i + '", ' + s + "[" + r + "][" + a + "]);"), t.set(e.name.children[a].value, o)
  2831. })), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function () {
  2832. n.compile(e.body, t)
  2833. })), this._emitLine("}"), this._emitLine("} else {");
  2834. var a = e.name.children, o = a[0], c = a[1], l = this._tmpid(), h = this._tmpid();
  2835. t.set(o.value, l), t.set(c.value, h), this._emitLine(r + " = -1;"), this._emitLine("var " + i + " = runtime.keys(" + s + ").length;"), this._emitLine("for(var " + l + " in " + s + ") {"), this._emitLine(r + "++;"), this._emitLine("var " + h + " = " + s + "[" + l + "];"), this._emitLine('frame.set("' + o.value + '", ' + l + ");"), this._emitLine('frame.set("' + c.value + '", ' + h + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function () {
  2836. n.compile(e.body, t)
  2837. })), this._emitLine("}"), this._emitLine("}")
  2838. } else {
  2839. var u = this._tmpid();
  2840. t.set(e.name.value, u), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(var " + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), this._emitLine("var " + u + " = " + s + "[" + r + "];"), this._emitLine('frame.set("' + e.name.value + '", ' + u + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function () {
  2841. n.compile(e.body, t)
  2842. })), this._emitLine("}")
  2843. }
  2844. this._emitLine("}"), e.else_ && (this._emitLine("if (!" + i + ") {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();")
  2845. }, i._compileAsyncLoop = function (e, t, n) {
  2846. var r = this, i = this._tmpid(), s = this._tmpid(), a = this._tmpid(), o = n ? "asyncAll" : "asyncEach";
  2847. if (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + a + " = runtime.fromIterator("), this._compileExpression(e.arr, t), this._emitLine(");"), e.name instanceof hr.Array) {
  2848. var c = e.name.children.length;
  2849. this._emit("runtime." + o + "(" + a + ", " + c + ", function("), e.name.children.forEach((function (e) {
  2850. r._emit(e.value + ",")
  2851. })), this._emit(i + "," + s + ",next) {"), e.name.children.forEach((function (e) {
  2852. var n = e.value;
  2853. t.set(n, n), r._emitLine('frame.set("' + n + '", ' + n + ");")
  2854. }))
  2855. } else {
  2856. var l = e.name.value;
  2857. this._emitLine("runtime." + o + "(" + a + ", 1, function(" + l + ", " + i + ", " + s + ",next) {"), this._emitLine('frame.set("' + l + '", ' + l + ");"), t.set(l, l)
  2858. }
  2859. this._emitLoopBindings(e, a, i, s), this._withScopedSyntax((function () {
  2860. var s;
  2861. n && (s = r._pushBuffer()), r.compile(e.body, t), r._emitLine("next(" + i + (s ? "," + s : "") + ");"), n && r._popBuffer()
  2862. }));
  2863. var h = this._tmpid();
  2864. this._emitLine("}, " + this._makeCallback(h)), this._addScopeLevel(), n && this._emitLine(this.buffer + " += " + h + ";"), e.else_ && (this._emitLine("if (!" + a + ".length) {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();")
  2865. }, i.compileAsyncEach = function (e, t) {
  2866. this._compileAsyncLoop(e, t)
  2867. }, i.compileAsyncAll = function (e, t) {
  2868. this._compileAsyncLoop(e, t, !0)
  2869. }, i._compileMacro = function (e, t) {
  2870. var n = this, r = [], i = null, s = "macro_" + this._tmpid(), a = void 0 !== t;
  2871. e.args.children.forEach((function (t, s) {
  2872. s === e.args.children.length - 1 && t instanceof hr.Dict ? i = t : (n.assertType(t, hr.Symbol), r.push(t))
  2873. }));
  2874. var o, c = [].concat(r.map((function (e) {
  2875. return "l_" + e.value
  2876. })), ["kwargs"]), l = r.map((function (e) {
  2877. return '"' + e.value + '"'
  2878. })), h = (i && i.children || []).map((function (e) {
  2879. return '"' + e.key.value + '"'
  2880. }));
  2881. o = a ? t.push(!0) : new Rr, this._emitLines("var " + s + " = runtime.makeMacro(", "[" + l.join(", ") + "], ", "[" + h.join(", ") + "], ", "function (" + c.join(", ") + ") {", "var callerFrame = frame;", "frame = " + (a ? "frame.push(true);" : "new runtime.Frame();"), "kwargs = kwargs || {};", 'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {', 'frame.set("caller", kwargs.caller); }'), r.forEach((function (e) {
  2882. n._emitLine('frame.set("' + e.value + '", l_' + e.value + ");"), o.set(e.value, "l_" + e.value)
  2883. })), i && i.children.forEach((function (e) {
  2884. var t = e.key.value;
  2885. n._emit('frame.set("' + t + '", '), n._emit('Object.prototype.hasOwnProperty.call(kwargs, "' + t + '")'), n._emit(' ? kwargs["' + t + '"] : '), n._compileExpression(e.value, o), n._emit(");")
  2886. }));
  2887. var u = this._pushBuffer();
  2888. return this._withScopedSyntax((function () {
  2889. n.compile(e.body, o)
  2890. })), this._emitLine("frame = " + (a ? "frame.pop();" : "callerFrame;")), this._emitLine("return new runtime.SafeString(" + u + ");"), this._emitLine("});"), this._popBuffer(), s
  2891. }, i.compileMacro = function (e, t) {
  2892. var n = this._compileMacro(e), r = e.name.value;
  2893. t.set(r, n), t.parent ? this._emitLine('frame.set("' + r + '", ' + n + ");") : ("_" !== e.name.value.charAt(0) && this._emitLine('context.addExport("' + r + '");'), this._emitLine('context.setVariable("' + r + '", ' + n + ");"))
  2894. }, i.compileCaller = function (e, t) {
  2895. this._emit("(function (){");
  2896. var n = this._compileMacro(e, t);
  2897. this._emit("return " + n + ";})()")
  2898. }, i._compileGetTemplate = function (e, t, n, r) {
  2899. var i = this._tmpid(), s = this._templateName(), a = this._makeCallback(i), o = n ? "true" : "false",
  2900. c = r ? "true" : "false";
  2901. return this._emit("env.getTemplate("), this._compileExpression(e.template, t), this._emitLine(", " + o + ", " + s + ", " + c + ", " + a), i
  2902. }, i.compileImport = function (e, t) {
  2903. var n = e.target.value, r = this._compileGetTemplate(e, t, !1, !1);
  2904. this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), t.set(n, r), t.parent ? this._emitLine('frame.set("' + n + '", ' + r + ");") : this._emitLine('context.setVariable("' + n + '", ' + r + ");")
  2905. }, i.compileFromImport = function (e, t) {
  2906. var n = this, r = this._compileGetTemplate(e, t, !1, !1);
  2907. this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), e.names.children.forEach((function (e) {
  2908. var i, s, a = n._tmpid();
  2909. e instanceof hr.Pair ? (i = e.key.value, s = e.value.value) : s = i = e.value, n._emitLine("if(Object.prototype.hasOwnProperty.call(" + r + ', "' + i + '")) {'), n._emitLine("var " + a + " = " + r + "." + i + ";"), n._emitLine("} else {"), n._emitLine("cb(new Error(\"cannot import '" + i + "'\")); return;"), n._emitLine("}"), t.set(s, a), t.parent ? n._emitLine('frame.set("' + s + '", ' + a + ");") : n._emitLine('context.setVariable("' + s + '", ' + a + ");")
  2910. }))
  2911. }, i.compileBlock = function (e) {
  2912. var t = this._tmpid();
  2913. this.inBlock || this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '), this._emit('context.getBlock("' + e.name.value + '")'), this.inBlock || this._emit(")"), this._emitLine("(env, context, frame, runtime, " + this._makeCallback(t)), this._emitLine(this.buffer + " += " + t + ";"), this._addScopeLevel()
  2914. }, i.compileSuper = function (e, t) {
  2915. var n = e.blockName.value, r = e.symbol.value, i = this._makeCallback(r);
  2916. this._emitLine('context.getSuper(env, "' + n + '", b_' + n + ", frame, runtime, " + i), this._emitLine(r + " = runtime.markSafe(" + r + ");"), this._addScopeLevel(), t.set(r, r)
  2917. }, i.compileExtends = function (e, t) {
  2918. var n = this._tmpid(), r = this._compileGetTemplate(e, t, !0, !1);
  2919. this._emitLine("parentTemplate = " + r), this._emitLine("for(var " + n + " in parentTemplate.blocks) {"), this._emitLine("context.addBlock(" + n + ", parentTemplate.blocks[" + n + "]);"), this._emitLine("}"), this._addScopeLevel()
  2920. }, i.compileInclude = function (e, t) {
  2921. this._emitLine("var tasks = [];"), this._emitLine("tasks.push("), this._emitLine("function(callback) {");
  2922. var n = this._compileGetTemplate(e, t, !1, e.ignoreMissing);
  2923. this._emitLine("callback(null," + n + ");});"), this._emitLine("});");
  2924. var r = this._tmpid();
  2925. this._emitLine("tasks.push("), this._emitLine("function(template, callback){"), this._emitLine("template.render(context.getVariables(), frame, " + this._makeCallback(r)), this._emitLine("callback(null," + r + ");});"), this._emitLine("});"), this._emitLine("tasks.push("), this._emitLine("function(result, callback){"), this._emitLine(this.buffer + " += result;"), this._emitLine("callback(null);"), this._emitLine("});"), this._emitLine("env.waterfall(tasks, function(){"), this._addScopeLevel()
  2926. }, i.compileTemplateData = function (e, t) {
  2927. this.compileLiteral(e, t)
  2928. }, i.compileCapture = function (e, t) {
  2929. var n = this, r = this.buffer;
  2930. this.buffer = "output", this._emitLine("(function() {"), this._emitLine('var output = "";'), this._withScopedSyntax((function () {
  2931. n.compile(e.body, t)
  2932. })), this._emitLine("return output;"), this._emitLine("})()"), this.buffer = r
  2933. }, i.compileOutput = function (e, t) {
  2934. var n = this;
  2935. e.children.forEach((function (r) {
  2936. r instanceof hr.TemplateData ? r.value && (n._emit(n.buffer + " += "), n.compileLiteral(r, t), n._emitLine(";")) : (n._emit(n.buffer + " += runtime.suppressValue("), n.throwOnUndefined && n._emit("runtime.ensureDefined("), n.compile(r, t), n.throwOnUndefined && n._emit("," + e.lineno + "," + e.colno + ")"), n._emit(", env.opts.autoescape);\n"))
  2937. }))
  2938. }, i.compileRoot = function (e, t) {
  2939. var n = this;
  2940. t && this.fail("compileRoot: root node can't have frame"), t = new Rr, this._emitFuncBegin(e, "root"), this._emitLine("var parentTemplate = null;"), this._compileChildren(e, t), this._emitLine("if(parentTemplate) {"), this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"), this._emitLine("} else {"), this._emitLine("cb(null, " + this.buffer + ");"), this._emitLine("}"), this._emitFuncEnd(!0), this.inBlock = !0;
  2941. var r = [], i = e.findAll(hr.Block);
  2942. i.forEach((function (e, t) {
  2943. var i = e.name.value;
  2944. if (-1 !== r.indexOf(i)) throw new Error('Block "' + i + '" defined more than once.');
  2945. r.push(i), n._emitFuncBegin(e, "b_" + i);
  2946. var s = new Rr;
  2947. n._emitLine("var frame = frame.push(true);"), n.compile(e.body, s), n._emitFuncEnd()
  2948. })), this._emitLine("return {"), i.forEach((function (e, t) {
  2949. var r = "b_" + e.name.value;
  2950. n._emitLine(r + ": " + r + ",")
  2951. })), this._emitLine("root: root\n};")
  2952. }, i.compile = function (e, t) {
  2953. var n = this["compile" + e.typename];
  2954. n ? n.call(this, e, t) : this.fail("compile: Cannot compile node: " + e.typename, e.lineno, e.colno)
  2955. }, i.getCode = function () {
  2956. return this.codebuf.join("")
  2957. }, r
  2958. }(en.Obj), xr = {
  2959. compile: function (e, t, n, r, i) {
  2960. void 0 === i && (i = {});
  2961. var s = new Pr(r, i.throwOnUndefined), a = (n || []).map((function (e) {
  2962. return e.preprocess
  2963. })).filter((function (e) {
  2964. return !!e
  2965. })).reduce((function (e, t) {
  2966. return t(e)
  2967. }), e);
  2968. return s.compile(Nr.transform(fr.parse(a, n, i), t, r)), s.getCode()
  2969. }, Compiler: Pr
  2970. }, wr = Ke((function (e) {
  2971. var t = e.exports = {};
  2972. function n(e, t) {
  2973. return null == e || !1 === e ? t : e
  2974. }
  2975. function r(e) {
  2976. return e != e
  2977. }
  2978. function i(e) {
  2979. var t = (e = n(e, "")).toLowerCase();
  2980. return kr.copySafeness(e, t.charAt(0).toUpperCase() + t.slice(1))
  2981. }
  2982. function s(e) {
  2983. if (je.isString(e)) return e.split("");
  2984. if (je.isObject(e)) return je._entries(e || {}).map((function (e) {
  2985. return {key: e[0], value: e[1]}
  2986. }));
  2987. if (je.isArray(e)) return e;
  2988. throw new je.TemplateError("list filter: type not iterable")
  2989. }
  2990. function a(e) {
  2991. return function (t, n, r) {
  2992. void 0 === n && (n = "truthy");
  2993. var i = this, s = i.env.getTest(n);
  2994. return je.toArray(t).filter((function (t) {
  2995. return s.call(i, t, r) === e
  2996. }))
  2997. }
  2998. }
  2999. function o(e) {
  3000. return kr.copySafeness(e, e.replace(/^\s*|\s*$/g, ""))
  3001. }
  3002. t.abs = Math.abs, t.batch = function (e, t, n) {
  3003. var r, i = [], s = [];
  3004. for (r = 0; r < e.length; r++) r % t == 0 && s.length && (i.push(s), s = []), s.push(e[r]);
  3005. if (s.length) {
  3006. if (n) for (r = s.length; r < t; r++) s.push(n);
  3007. i.push(s)
  3008. }
  3009. return i
  3010. }, t.capitalize = i, t.center = function (e, t) {
  3011. if (t = t || 80, (e = n(e, "")).length >= t) return e;
  3012. var r = t - e.length, i = je.repeat(" ", r / 2 - r % 2), s = je.repeat(" ", r / 2);
  3013. return kr.copySafeness(e, i + e + s)
  3014. }, t.default = function (e, t, n) {
  3015. return n ? e || t : void 0 !== e ? e : t
  3016. }, t.dictsort = function (e, t, n) {
  3017. if (!je.isObject(e)) throw new je.TemplateError("dictsort filter: val must be an object");
  3018. var r, i = [];
  3019. for (var s in e) i.push([s, e[s]]);
  3020. if (void 0 === n || "key" === n) r = 0; else {
  3021. if ("value" !== n) throw new je.TemplateError("dictsort filter: You can only sort by either key or value");
  3022. r = 1
  3023. }
  3024. return i.sort((function (e, n) {
  3025. var i = e[r], s = n[r];
  3026. return t || (je.isString(i) && (i = i.toUpperCase()), je.isString(s) && (s = s.toUpperCase())), i > s ? 1 : i === s ? 0 : -1
  3027. })), i
  3028. }, t.dump = function (e, t) {
  3029. return JSON.stringify(e, null, t)
  3030. }, t.escape = function (e) {
  3031. return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(je.escape(e.toString())))
  3032. }, t.safe = function (e) {
  3033. return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(e.toString()))
  3034. }, t.first = function (e) {
  3035. return e[0]
  3036. }, t.forceescape = function (e) {
  3037. return e = null == e ? "" : e, kr.markSafe(je.escape(e.toString()))
  3038. }, t.groupby = function (e, t) {
  3039. return je.groupBy(e, t, this.env.opts.throwOnUndefined)
  3040. }, t.indent = function (e, t, r) {
  3041. if ("" === (e = n(e, ""))) return "";
  3042. t = t || 4;
  3043. var i = e.split("\n"), s = je.repeat(" ", t), a = i.map((function (e, t) {
  3044. return 0 !== t || r ? "" + s + e : e
  3045. })).join("\n");
  3046. return kr.copySafeness(e, a)
  3047. }, t.join = function (e, t, n) {
  3048. return t = t || "", n && (e = je.map(e, (function (e) {
  3049. return e[n]
  3050. }))), e.join(t)
  3051. }, t.last = function (e) {
  3052. return e[e.length - 1]
  3053. }, t.length = function (e) {
  3054. var t = n(e, "");
  3055. return void 0 !== t ? "function" == typeof Map && t instanceof Map || "function" == typeof Set && t instanceof Set ? t.size : !je.isObject(t) || t instanceof kr.SafeString ? t.length : je.keys(t).length : 0
  3056. }, t.list = s, t.lower = function (e) {
  3057. return (e = n(e, "")).toLowerCase()
  3058. }, t.nl2br = function (e) {
  3059. return null == e ? "" : kr.copySafeness(e, e.replace(/\r\n|\n/g, "<br />\n"))
  3060. }, t.random = function (e) {
  3061. return e[Math.floor(Math.random() * e.length)]
  3062. }, t.reject = a(!1), t.rejectattr = function (e, t) {
  3063. return e.filter((function (e) {
  3064. return !e[t]
  3065. }))
  3066. }, t.select = a(!0), t.selectattr = function (e, t) {
  3067. return e.filter((function (e) {
  3068. return !!e[t]
  3069. }))
  3070. }, t.replace = function (e, t, n, r) {
  3071. var i = e;
  3072. if (t instanceof RegExp) return e.replace(t, n);
  3073. void 0 === r && (r = -1);
  3074. var s = "";
  3075. if ("number" == typeof t) t = "" + t; else if ("string" != typeof t) return e;
  3076. if ("number" == typeof e && (e = "" + e), "string" != typeof e && !(e instanceof kr.SafeString)) return e;
  3077. if ("" === t) return s = n + e.split("").join(n) + n, kr.copySafeness(e, s);
  3078. var a = e.indexOf(t);
  3079. if (0 === r || -1 === a) return e;
  3080. for (var o = 0, c = 0; a > -1 && (-1 === r || c < r);) s += e.substring(o, a) + n, o = a + t.length, c++, a = e.indexOf(t, o);
  3081. return o < e.length && (s += e.substring(o)), kr.copySafeness(i, s)
  3082. }, t.reverse = function (e) {
  3083. var t;
  3084. return (t = je.isString(e) ? s(e) : je.map(e, (function (e) {
  3085. return e
  3086. }))).reverse(), je.isString(e) ? kr.copySafeness(e, t.join("")) : t
  3087. }, t.round = function (e, t, n) {
  3088. t = t || 0;
  3089. var r = Math.pow(10, t);
  3090. return ("ceil" === n ? Math.ceil : "floor" === n ? Math.floor : Math.round)(e * r) / r
  3091. }, t.slice = function (e, t, n) {
  3092. for (var r = Math.floor(e.length / t), i = e.length % t, s = [], a = 0, o = 0; o < t; o++) {
  3093. var c = a + o * r;
  3094. o < i && a++;
  3095. var l = a + (o + 1) * r, h = e.slice(c, l);
  3096. n && o >= i && h.push(n), s.push(h)
  3097. }
  3098. return s
  3099. }, t.sum = function (e, t, n) {
  3100. return void 0 === n && (n = 0), t && (e = je.map(e, (function (e) {
  3101. return e[t]
  3102. }))), n + e.reduce((function (e, t) {
  3103. return e + t
  3104. }), 0)
  3105. }, t.sort = kr.makeMacro(["value", "reverse", "case_sensitive", "attribute"], [], (function (e, t, n, r) {
  3106. var i = this, s = je.map(e, (function (e) {
  3107. return e
  3108. })), a = je.getAttrGetter(r);
  3109. return s.sort((function (e, s) {
  3110. var o = r ? a(e) : e, c = r ? a(s) : s;
  3111. if (i.env.opts.throwOnUndefined && r && (void 0 === o || void 0 === c)) throw new TypeError('sort: attribute "' + r + '" resolved to undefined');
  3112. return !n && je.isString(o) && je.isString(c) && (o = o.toLowerCase(), c = c.toLowerCase()), o < c ? t ? 1 : -1 : o > c ? t ? -1 : 1 : 0
  3113. })), s
  3114. })), t.string = function (e) {
  3115. return kr.copySafeness(e, e)
  3116. }, t.striptags = function (e, t) {
  3117. var r = o((e = n(e, "")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi, "")), i = "";
  3118. return i = t ? r.replace(/^ +| +$/gm, "").replace(/ +/g, " ").replace(/(\r\n)/g, "\n").replace(/\n\n\n+/g, "\n\n") : r.replace(/\s+/gi, " "), kr.copySafeness(e, i)
  3119. }, t.title = function (e) {
  3120. var t = (e = n(e, "")).split(" ").map((function (e) {
  3121. return i(e)
  3122. }));
  3123. return kr.copySafeness(e, t.join(" "))
  3124. }, t.trim = o, t.truncate = function (e, t, r, i) {
  3125. var s = e;
  3126. if (t = t || 255, (e = n(e, "")).length <= t) return e;
  3127. if (r) e = e.substring(0, t); else {
  3128. var a = e.lastIndexOf(" ", t);
  3129. -1 === a && (a = t), e = e.substring(0, a)
  3130. }
  3131. return e += null != i ? i : "...", kr.copySafeness(s, e)
  3132. }, t.upper = function (e) {
  3133. return (e = n(e, "")).toUpperCase()
  3134. }, t.urlencode = function (e) {
  3135. var t = encodeURIComponent;
  3136. return je.isString(e) ? t(e) : (je.isArray(e) ? e : je._entries(e)).map((function (e) {
  3137. var n = e[0], r = e[1];
  3138. return t(n) + "=" + t(r)
  3139. })).join("&")
  3140. };
  3141. var c = /^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/, l = /^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,
  3142. h = /^https?:\/\/.*$/, u = /^www\./, p = /\.(?:org|net|com)(?:\:|\/|$)/;
  3143. t.urlize = function (e, t, n) {
  3144. r(t) && (t = 1 / 0);
  3145. var i = !0 === n ? ' rel="nofollow"' : "";
  3146. return e.split(/(\s+)/).filter((function (e) {
  3147. return e && e.length
  3148. })).map((function (e) {
  3149. var n = e.match(c), r = n ? n[1] : e, s = r.substr(0, t);
  3150. return h.test(r) ? '<a href="' + r + '"' + i + ">" + s + "</a>" : u.test(r) ? '<a href="http://' + r + '"' + i + ">" + s + "</a>" : l.test(r) ? '<a href="mailto:' + r + '">' + r + "</a>" : p.test(r) ? '<a href="http://' + r + '"' + i + ">" + s + "</a>" : e
  3151. })).join("")
  3152. }, t.wordcount = function (e) {
  3153. var t = (e = n(e, "")) ? e.match(/\w+/g) : null;
  3154. return t ? t.length : null
  3155. }, t.float = function (e, t) {
  3156. var n = parseFloat(e);
  3157. return r(n) ? t : n
  3158. };
  3159. var f = kr.makeMacro(["value", "default", "base"], [], (function (e, t, n) {
  3160. void 0 === n && (n = 10);
  3161. var i = parseInt(e, n);
  3162. return r(i) ? t : i
  3163. }));
  3164. t.int = f, t.d = t.default, t.e = t.escape
  3165. })), Br = {};
  3166. function Fr(e, t) {
  3167. for (var n = 0, r = e.length - 1; r >= 0; r--) {
  3168. var i = e[r];
  3169. "." === i ? e.splice(r, 1) : ".." === i ? (e.splice(r, 1), n++) : n && (e.splice(r, 1), n--)
  3170. }
  3171. if (t) for (; n--; n) e.unshift("..");
  3172. return e
  3173. }
  3174. var Ur = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, Hr = function (e) {
  3175. return Ur.exec(e).slice(1)
  3176. };
  3177. function Gr() {
  3178. for (var e = "", t = !1, n = arguments.length - 1; n >= -1 && !t; n--) {
  3179. var r = n >= 0 ? arguments[n] : "/";
  3180. if ("string" != typeof r) throw new TypeError("Arguments to path.resolve must be strings");
  3181. r && (e = r + "/" + e, t = "/" === r.charAt(0))
  3182. }
  3183. return (t ? "/" : "") + (e = Fr(jr(e.split("/"), (function (e) {
  3184. return !!e
  3185. })), !t).join("/")) || "."
  3186. }
  3187. function Yr(e) {
  3188. var t = qr(e), n = "/" === Vr(e, -1);
  3189. return (e = Fr(jr(e.split("/"), (function (e) {
  3190. return !!e
  3191. })), !t).join("/")) || t || (e = "."), e && n && (e += "/"), (t ? "/" : "") + e
  3192. }
  3193. function qr(e) {
  3194. return "/" === e.charAt(0)
  3195. }
  3196. var Kr = {
  3197. extname: function (e) {
  3198. return Hr(e)[3]
  3199. }, basename: function (e, t) {
  3200. var n = Hr(e)[2];
  3201. return t && n.substr(-1 * t.length) === t && (n = n.substr(0, n.length - t.length)), n
  3202. }, dirname: function (e) {
  3203. var t = Hr(e), n = t[0], r = t[1];
  3204. return n || r ? (r && (r = r.substr(0, r.length - 1)), n + r) : "."
  3205. }, sep: "/", delimiter: ":", relative: function (e, t) {
  3206. function n(e) {
  3207. for (var t = 0; t < e.length && "" === e[t]; t++) ;
  3208. for (var n = e.length - 1; n >= 0 && "" === e[n]; n--) ;
  3209. return t > n ? [] : e.slice(t, n - t + 1)
  3210. }
  3211. e = Gr(e).substr(1), t = Gr(t).substr(1);
  3212. for (var r = n(e.split("/")), i = n(t.split("/")), s = Math.min(r.length, i.length), a = s, o = 0; o < s; o++) if (r[o] !== i[o]) {
  3213. a = o;
  3214. break
  3215. }
  3216. var c = [];
  3217. for (o = a; o < r.length; o++) c.push("..");
  3218. return (c = c.concat(i.slice(a))).join("/")
  3219. }, join: function () {
  3220. var e = Array.prototype.slice.call(arguments, 0);
  3221. return Yr(jr(e, (function (e, t) {
  3222. if ("string" != typeof e) throw new TypeError("Arguments to path.join must be strings");
  3223. return e
  3224. })).join("/"))
  3225. }, isAbsolute: qr, normalize: Yr, resolve: Gr
  3226. };
  3227. function jr(e, t) {
  3228. if (e.filter) return e.filter(t);
  3229. for (var n = [], r = 0; r < e.length; r++) t(e[r], r, e) && n.push(e[r]);
  3230. return n
  3231. }
  3232. var Vr = "b" === "ab".substr(-1) ? function (e, t, n) {
  3233. return e.substr(t, n)
  3234. } : function (e, t, n) {
  3235. return t < 0 && (t = e.length + t), e.substr(t, n)
  3236. };
  3237. function Wr(e, t) {
  3238. return Wr = Object.setPrototypeOf || function (e, t) {
  3239. return e.__proto__ = t, e
  3240. }, Wr(e, t)
  3241. }
  3242. var Qr = function (e) {
  3243. var t, n;
  3244. function r() {
  3245. return e.apply(this, arguments) || this
  3246. }
  3247. n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, Wr(t, n);
  3248. var i = r.prototype;
  3249. return i.resolve = function (e, t) {
  3250. return Kr.resolve(Kr.dirname(e), t)
  3251. }, i.isRelative = function (e) {
  3252. return 0 === e.indexOf("./") || 0 === e.indexOf("../")
  3253. }, r
  3254. }(en.EmitterObj);
  3255. function Xr(e, t) {
  3256. return Xr = Object.setPrototypeOf || function (e, t) {
  3257. return e.__proto__ = t, e
  3258. }, Xr(e, t)
  3259. }
  3260. var $r = function (e) {
  3261. var t, n;
  3262. function r(t) {
  3263. var n;
  3264. return (n = e.call(this) || this).precompiled = t || {}, n
  3265. }
  3266. return n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, Xr(t, n), r.prototype.getSource = function (e) {
  3267. return this.precompiled[e] ? {src: {type: "code", obj: this.precompiled[e]}, path: e} : null
  3268. }, r
  3269. }(Qr);
  3270. function zr(e, t) {
  3271. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Jr(e, t)
  3272. }
  3273. function Jr(e, t) {
  3274. return Jr = Object.setPrototypeOf || function (e, t) {
  3275. return e.__proto__ = t, e
  3276. }, Jr(e, t)
  3277. }
  3278. var Zr = {PrecompiledLoader: $r}.PrecompiledLoader, ei = function (e) {
  3279. function t(t, n) {
  3280. var r;
  3281. return n = n || {}, (r = e.call(this) || this).pathsToNames = {}, r.noCache = !!n.noCache, t ? (t = Array.isArray(t) ? t : [t], r.searchPaths = t.map(Kr.normalize)) : r.searchPaths = ["."], r
  3282. }
  3283. return zr(t, e), t.prototype.getSource = function (e) {
  3284. for (var t = null, n = this.searchPaths, r = 0; r < n.length; r++) {
  3285. var i = Kr.resolve(n[r]), s = Kr.resolve(n[r], e);
  3286. if (0 === s.indexOf(i) && Br.existsSync(s)) {
  3287. t = s;
  3288. break
  3289. }
  3290. }
  3291. if (!t) return null;
  3292. this.pathsToNames[t] = e;
  3293. var a = {src: Br.readFileSync(t, "utf-8"), path: t, noCache: this.noCache};
  3294. return this.emit("load", e, a), a
  3295. }, t
  3296. }(Qr), ti = {
  3297. FileSystemLoader: ei, PrecompiledLoader: Zr, NodeResolveLoader: function (e) {
  3298. function t(t) {
  3299. var n;
  3300. return t = t || {}, (n = e.call(this) || this).pathsToNames = {}, n.noCache = !!t.noCache, n
  3301. }
  3302. return zr(t, e), t.prototype.getSource = function (e) {
  3303. if (/^\.?\.?(\/|\\)/.test(e)) return null;
  3304. if (/^[A-Z]:/.test(e)) return null;
  3305. var t;
  3306. try {
  3307. t = Ye.resolve(e)
  3308. } catch (e) {
  3309. return null
  3310. }
  3311. this.pathsToNames[t] = e;
  3312. var n = {src: Br.readFileSync(t, "utf-8"), path: t, noCache: this.noCache};
  3313. return this.emit("load", e, n), n
  3314. }, t
  3315. }(Qr)
  3316. }, ni = Ke((function (e, t) {
  3317. var n = kr.SafeString;
  3318. t.callable = function (e) {
  3319. return "function" == typeof e
  3320. }, t.defined = function (e) {
  3321. return void 0 !== e
  3322. }, t.divisibleby = function (e, t) {
  3323. return e % t == 0
  3324. }, t.escaped = function (e) {
  3325. return e instanceof n
  3326. }, t.equalto = function (e, t) {
  3327. return e === t
  3328. }, t.eq = t.equalto, t.sameas = t.equalto, t.even = function (e) {
  3329. return e % 2 == 0
  3330. }, t.falsy = function (e) {
  3331. return !e
  3332. }, t.ge = function (e, t) {
  3333. return e >= t
  3334. }, t.greaterthan = function (e, t) {
  3335. return e > t
  3336. }, t.gt = t.greaterthan, t.le = function (e, t) {
  3337. return e <= t
  3338. }, t.lessthan = function (e, t) {
  3339. return e < t
  3340. }, t.lt = t.lessthan, t.lower = function (e) {
  3341. return e.toLowerCase() === e
  3342. }, t.ne = function (e, t) {
  3343. return e !== t
  3344. }, t.null = function (e) {
  3345. return null === e
  3346. }, t.number = function (e) {
  3347. return "number" == typeof e
  3348. }, t.odd = function (e) {
  3349. return e % 2 == 1
  3350. }, t.string = function (e) {
  3351. return "string" == typeof e
  3352. }, t.truthy = function (e) {
  3353. return !!e
  3354. }, t.undefined = function (e) {
  3355. return void 0 === e
  3356. }, t.upper = function (e) {
  3357. return e.toUpperCase() === e
  3358. }, t.iterable = function (e) {
  3359. return "undefined" != typeof Symbol ? !!e[Symbol.iterator] : Array.isArray(e) || "string" == typeof e
  3360. }, t.mapping = function (e) {
  3361. var t = null != e && "object" == typeof e && !Array.isArray(e);
  3362. return Set ? t && !(e instanceof Set) : t
  3363. }
  3364. }));
  3365. function ri(e) {
  3366. var t = -1;
  3367. return {
  3368. current: null, reset: function () {
  3369. t = -1, this.current = null
  3370. }, next: function () {
  3371. return ++t >= e.length && (t = 0), this.current = e[t], this.current
  3372. }
  3373. }
  3374. }
  3375. ni.callable, ni.defined, ni.divisibleby, ni.escaped, ni.equalto, ni.eq, ni.sameas, ni.even, ni.falsy, ni.ge, ni.greaterthan, ni.gt, ni.le, ni.lessthan, ni.lt, ni.lower, ni.ne, ni.number, ni.odd, ni.string, ni.truthy, ni.undefined, ni.upper, ni.iterable, ni.mapping;
  3376. var ii = function () {
  3377. return {
  3378. range: function (e, t, n) {
  3379. void 0 === t ? (t = e, e = 0, n = 1) : n || (n = 1);
  3380. var r = [];
  3381. if (n > 0) for (var i = e; i < t; i += n) r.push(i); else for (var s = e; s > t; s += n) r.push(s);
  3382. return r
  3383. }, cycler: function () {
  3384. return ri(Array.prototype.slice.call(arguments))
  3385. }, joiner: function (e) {
  3386. return function (e) {
  3387. e = e || ",";
  3388. var t = !0;
  3389. return function () {
  3390. var n = t ? "" : e;
  3391. return t = !1, n
  3392. }
  3393. }(e)
  3394. }
  3395. }
  3396. };
  3397. function si(e, t) {
  3398. e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ai(e, t)
  3399. }
  3400. function ai(e, t) {
  3401. return ai = Object.setPrototypeOf || function (e, t) {
  3402. return e.__proto__ = t, e
  3403. }, ai(e, t)
  3404. }
  3405. var oi = ti.FileSystemLoader, ci = ti.WebLoader, li = ti.PrecompiledLoader, hi = en.Obj, ui = en.EmitterObj,
  3406. pi = kr.handleError, fi = kr.Frame;
  3407. function di(e, t, n) {
  3408. Gt((function () {
  3409. e(t, n)
  3410. }))
  3411. }
  3412. var Ei = {
  3413. type: "code", obj: {
  3414. root: function (e, t, n, r, i) {
  3415. try {
  3416. i(null, "")
  3417. } catch (e) {
  3418. i(pi(e, null, null))
  3419. }
  3420. }
  3421. }
  3422. }, mi = function (e) {
  3423. function t() {
  3424. return e.apply(this, arguments) || this
  3425. }
  3426. si(t, e);
  3427. var n = t.prototype;
  3428. return n.init = function (e, t) {
  3429. var n = this;
  3430. t = this.opts = t || {}, this.opts.dev = !!t.dev, this.opts.autoescape = null == t.autoescape || t.autoescape, this.opts.throwOnUndefined = !!t.throwOnUndefined, this.opts.trimBlocks = !!t.trimBlocks, this.opts.lstripBlocks = !!t.lstripBlocks, this.loaders = [], e ? this.loaders = je.isArray(e) ? e : [e] : oi ? this.loaders = [new oi("views")] : ci && (this.loaders = [new ci("/views")]), "undefined" != typeof window && window.jinja2Precompiled && this.loaders.unshift(new li(window.jinja2Precompiled)), this._initLoaders(), this.globals = ii(), this.filters = {}, this.tests = {}, this.asyncFilters = [], this.extensions = {}, this.extensionsList = [], je._entries(wr).forEach((function (e) {
  3431. var t = e[0], r = e[1];
  3432. return n.addFilter(t, r)
  3433. })), je._entries(ni).forEach((function (e) {
  3434. var t = e[0], r = e[1];
  3435. return n.addTest(t, r)
  3436. }))
  3437. }, n._initLoaders = function () {
  3438. var e = this;
  3439. this.loaders.forEach((function (t) {
  3440. t.cache = {}, "function" == typeof t.on && (t.on("update", (function (n, r) {
  3441. t.cache[n] = null, e.emit("update", n, r, t)
  3442. })), t.on("load", (function (n, r) {
  3443. e.emit("load", n, r, t)
  3444. })))
  3445. }))
  3446. }, n.invalidateCache = function () {
  3447. this.loaders.forEach((function (e) {
  3448. e.cache = {}
  3449. }))
  3450. }, n.addExtension = function (e, t) {
  3451. return t.__name = e, this.extensions[e] = t, this.extensionsList.push(t), this
  3452. }, n.removeExtension = function (e) {
  3453. var t = this.getExtension(e);
  3454. t && (this.extensionsList = je.without(this.extensionsList, t), delete this.extensions[e])
  3455. }, n.getExtension = function (e) {
  3456. return this.extensions[e]
  3457. }, n.hasExtension = function (e) {
  3458. return !!this.extensions[e]
  3459. }, n.addGlobal = function (e, t) {
  3460. return this.globals[e] = t, this
  3461. }, n.getGlobal = function (e) {
  3462. if (void 0 === this.globals[e]) throw new Error("global not found: " + e);
  3463. return this.globals[e]
  3464. }, n.addFilter = function (e, t, n) {
  3465. var r = t;
  3466. return n && this.asyncFilters.push(e), this.filters[e] = r, this
  3467. }, n.getFilter = function (e) {
  3468. if (!this.filters[e]) throw new Error("filter not found: " + e);
  3469. return this.filters[e]
  3470. }, n.addTest = function (e, t) {
  3471. return this.tests[e] = t, this
  3472. }, n.getTest = function (e) {
  3473. if (!this.tests[e]) throw new Error("test not found: " + e);
  3474. return this.tests[e]
  3475. }, n.resolveTemplate = function (e, t, n) {
  3476. return !(!e.isRelative || !t) && e.isRelative(n) && e.resolve ? e.resolve(t, n) : n
  3477. }, n.getTemplate = function (e, t, n, r, i) {
  3478. var s, a = this, o = this, c = null;
  3479. if (e && e.raw && (e = e.raw), je.isFunction(n) && (i = n, n = null, t = t || !1), je.isFunction(t) && (i = t, t = !1), e instanceof _i) c = e; else {
  3480. if ("string" != typeof e) throw new Error("template names must be a string: " + e);
  3481. for (var l = 0; l < this.loaders.length; l++) {
  3482. var h = this.loaders[l];
  3483. if (c = h.cache[this.resolveTemplate(h, n, e)]) break
  3484. }
  3485. }
  3486. if (c) return t && c.compile(), i ? void i(null, c) : c;
  3487. return je.asyncIter(this.loaders, (function (t, r, i, s) {
  3488. function a(e, n) {
  3489. e ? s(e) : n ? (n.loader = t, s(null, n)) : i()
  3490. }
  3491. e = o.resolveTemplate(t, n, e), t.async ? t.getSource(e, a) : a(null, t.getSource(e))
  3492. }), (function (n, o) {
  3493. if (o || n || r || (n = new Error("template not found: " + e)), n) {
  3494. if (i) return void i(n);
  3495. throw n
  3496. }
  3497. var c;
  3498. o ? (c = new _i(o.src, a, o.path, t), o.noCache || (o.loader.cache[e] = c)) : c = new _i(Ei, a, "", t), i ? i(null, c) : s = c
  3499. })), s
  3500. }, n.express = function (e) {
  3501. return function (e, t) {
  3502. function n(e, t) {
  3503. if (this.name = e, this.path = e, this.defaultEngine = t.defaultEngine, this.ext = Kr.extname(e), !this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
  3504. this.ext || (this.name += this.ext = ("." !== this.defaultEngine[0] ? "." : "") + this.defaultEngine)
  3505. }
  3506. return n.prototype.render = function (t, n) {
  3507. e.render(this.name, t, n)
  3508. }, t.set("view", n), t.set("jinja2Env", e), e
  3509. }(this, e)
  3510. }, n.render = function (e, t, n) {
  3511. je.isFunction(t) && (n = t, t = null);
  3512. var r = null;
  3513. return this.getTemplate(e, (function (e, i) {
  3514. if (e && n) di(n, e); else {
  3515. if (e) throw e;
  3516. r = i.render(t, n)
  3517. }
  3518. })), r
  3519. }, n.renderString = function (e, t, n, r) {
  3520. return je.isFunction(n) && (r = n, n = {}), new _i(e, this, (n = n || {}).path).render(t, r)
  3521. }, n.waterfall = function (e, t, n) {
  3522. return qt(e, t, n)
  3523. }, t
  3524. }(ui), Ti = function (e) {
  3525. function t() {
  3526. return e.apply(this, arguments) || this
  3527. }
  3528. si(t, e);
  3529. var n = t.prototype;
  3530. return n.init = function (e, t, n) {
  3531. var r = this;
  3532. this.env = n || new mi, this.ctx = je.extend({}, e), this.blocks = {}, this.exported = [], je.keys(t).forEach((function (e) {
  3533. r.addBlock(e, t[e])
  3534. }))
  3535. }, n.lookup = function (e) {
  3536. return e in this.env.globals && !(e in this.ctx) ? this.env.globals[e] : this.ctx[e]
  3537. }, n.setVariable = function (e, t) {
  3538. this.ctx[e] = t
  3539. }, n.getVariables = function () {
  3540. return this.ctx
  3541. }, n.addBlock = function (e, t) {
  3542. return this.blocks[e] = this.blocks[e] || [], this.blocks[e].push(t), this
  3543. }, n.getBlock = function (e) {
  3544. if (!this.blocks[e]) throw new Error('unknown block "' + e + '"');
  3545. return this.blocks[e][0]
  3546. }, n.getSuper = function (e, t, n, r, i, s) {
  3547. var a = je.indexOf(this.blocks[t] || [], n), o = this.blocks[t][a + 1];
  3548. if (-1 === a || !o) throw new Error('no super block available for "' + t + '"');
  3549. o(e, this, r, i, s)
  3550. }, n.addExport = function (e) {
  3551. this.exported.push(e)
  3552. }, n.getExported = function () {
  3553. var e = this, t = {};
  3554. return this.exported.forEach((function (n) {
  3555. t[n] = e.ctx[n]
  3556. })), t
  3557. }, t
  3558. }(hi), _i = function (e) {
  3559. function t() {
  3560. return e.apply(this, arguments) || this
  3561. }
  3562. si(t, e);
  3563. var n = t.prototype;
  3564. return n.init = function (e, t, n, r) {
  3565. if (this.env = t || new mi, je.isObject(e)) switch (e.type) {
  3566. case"code":
  3567. this.tmplProps = e.obj;
  3568. break;
  3569. case"string":
  3570. this.tmplStr = e.obj;
  3571. break;
  3572. default:
  3573. throw new Error("Unexpected template object type " + e.type + "; expected 'code', or 'string'")
  3574. } else {
  3575. if (!je.isString(e)) throw new Error("src must be a string or an object describing the source");
  3576. this.tmplStr = e
  3577. }
  3578. if (this.path = n, r) try {
  3579. this._compile()
  3580. } catch (e) {
  3581. throw je._prettifyError(this.path, this.env.opts.dev, e)
  3582. } else this.compiled = !1
  3583. }, n.render = function (e, t, n) {
  3584. var r = this;
  3585. "function" == typeof e ? (n = e, e = {}) : "function" == typeof t && (n = t, t = null);
  3586. var i = !t;
  3587. try {
  3588. this.compile()
  3589. } catch (e) {
  3590. var s = je._prettifyError(this.path, this.env.opts.dev, e);
  3591. if (n) return di(n, s);
  3592. throw s
  3593. }
  3594. var a = new Ti(e || {}, this.blocks, this.env), o = t ? t.push(!0) : new fi;
  3595. o.topLevel = !0;
  3596. var c = null, l = !1;
  3597. return this.rootRenderFunc(this.env, a, o, kr, (function (e, t) {
  3598. if (!l || !n || void 0 === t) if (e && (e = je._prettifyError(r.path, r.env.opts.dev, e), l = !0), n) i ? di(n, e, t) : n(e, t); else {
  3599. if (e) throw e;
  3600. c = t
  3601. }
  3602. })), c
  3603. }, n.getExported = function (e, t, n) {
  3604. "function" == typeof e && (n = e, e = {}), "function" == typeof t && (n = t, t = null);
  3605. try {
  3606. this.compile()
  3607. } catch (e) {
  3608. if (n) return n(e);
  3609. throw e
  3610. }
  3611. var r = t ? t.push() : new fi;
  3612. r.topLevel = !0;
  3613. var i = new Ti(e || {}, this.blocks, this.env);
  3614. this.rootRenderFunc(this.env, i, r, kr, (function (e) {
  3615. e ? n(e, null) : n(null, i.getExported())
  3616. }))
  3617. }, n.compile = function () {
  3618. this.compiled || this._compile()
  3619. }, n._compile = function () {
  3620. var e;
  3621. if (this.tmplProps) e = this.tmplProps; else {
  3622. var t = xr.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts);
  3623. e = new Function(t)()
  3624. }
  3625. this.blocks = this._getBlocks(e), this.rootRenderFunc = e.root, this.compiled = !0
  3626. }, n._getBlocks = function (e) {
  3627. var t = {};
  3628. return je.keys(e).forEach((function (n) {
  3629. "b_" === n.slice(0, 2) && (t[n.slice(2)] = e[n])
  3630. })), t
  3631. }, t
  3632. }(hi), Ai = {Environment: mi, Template: _i};
  3633. je._prettifyError;
  3634. var gi, Ni = Ai.Environment;
  3635. function Ci(e, t) {
  3636. var n;
  3637. return t = t || {}, je.isObject(e) && (t = e, e = null), ti.FileSystemLoader ? n = new ti.FileSystemLoader(e, {
  3638. watch: t.watch,
  3639. noCache: t.noCache
  3640. }) : ti.WebLoader && (n = new ti.WebLoader(e, {
  3641. useCache: t.web && t.web.useCache,
  3642. async: t.web && t.web.async
  3643. })), gi = new Ni(n, t), t && t.express && gi.express(t.express), gi
  3644. }
  3645. ti.FileSystemLoader, ti.NodeResolveLoader, ti.PrecompiledLoader, ti.WebLoader;
  3646. var Ii = function (e, t, n) {
  3647. return gi || Ci(), gi.renderString(e, t, n)
  3648. }, Si = function () {
  3649. return Si = Object.assign || function (e) {
  3650. for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  3651. return e
  3652. }, Si.apply(this, arguments)
  3653. };
  3654. function bi(e, t, n) {
  3655. return e ? e(null != t ? t : e._root.children, null, void 0, n).toString() : ""
  3656. }
  3657. function Oi(e, t) {
  3658. return bi(this, function (e, t) {
  3659. return !t && "object" == typeof e && null != e && !("length" in e) && !("type" in e)
  3660. }(e) ? void (t = e) : e, Si(Si(Si({}, n), null == this ? void 0 : this._options), i(null != t ? t : {})))
  3661. }
  3662. function yi(e) {
  3663. return bi(this, e, Si(Si({}, this._options), {xmlMode: !0}))
  3664. }
  3665. function Li(e) {
  3666. for (var t = e || (this ? this.root() : []), n = "", r = 0; r < t.length; r++) n += z(t[r]);
  3667. return n
  3668. }
  3669. function ki(e, t, r) {
  3670. if (void 0 === r && (r = "boolean" == typeof t && t), !e || "string" != typeof e) return null;
  3671. "boolean" == typeof t && (r = t);
  3672. var i = this.load(e, n, !1);
  3673. return r || i("script").remove(), i.root()[0].children.slice()
  3674. }
  3675. function vi() {
  3676. return this(this._root)
  3677. }
  3678. function Di(e, t) {
  3679. if (t === e) return !1;
  3680. for (var n = t; n && n !== n.parent;) if ((n = n.parent) === e) return !0;
  3681. return !1
  3682. }
  3683. function Ri(e, t) {
  3684. if (Mi(e) && Mi(t)) {
  3685. for (var n = e.length, r = +t.length, i = 0; i < r; i++) e[n++] = t[i];
  3686. return e.length = n, e
  3687. }
  3688. }
  3689. function Mi(e) {
  3690. if (Array.isArray(e)) return !0;
  3691. if ("object" != typeof e || !Object.prototype.hasOwnProperty.call(e, "length") || "number" != typeof e.length || e.length < 0) return !1;
  3692. for (var t = 0; t < e.length; t++) if (!(t in e)) return !1;
  3693. return !0
  3694. }
  3695. var Pi, xi = Object.freeze({
  3696. __proto__: null,
  3697. html: Oi,
  3698. xml: yi,
  3699. text: Li,
  3700. parseHTML: ki,
  3701. root: vi,
  3702. contains: Di,
  3703. merge: Ri,
  3704. jp: function (e, t) {
  3705. return He({path: e, json: t})
  3706. },
  3707. jpo: function (e) {
  3708. return He(e)
  3709. },
  3710. jinja2: function (e, t) {
  3711. return Ii(e, t)
  3712. }
  3713. });
  3714. function wi(e) {
  3715. return null != e.cheerio
  3716. }
  3717. function Bi(e, t) {
  3718. for (var n = e.length, r = 0; r < n; r++) t(e[r], r);
  3719. return e
  3720. }
  3721. function Fi(e) {
  3722. var t = "length" in e ? Array.prototype.map.call(e, (function (e) {
  3723. return v(e, !0)
  3724. })) : [v(e, !0)], n = new N(t);
  3725. return t.forEach((function (e) {
  3726. e.parent = n
  3727. })), t
  3728. }
  3729. function Ui(e) {
  3730. var t = e.indexOf("<");
  3731. if (t < 0 || t > e.length - 3) return !1;
  3732. var n = e.charCodeAt(t + 1);
  3733. return (n >= Pi.LowerA && n <= Pi.LowerZ || n >= Pi.UpperA && n <= Pi.UpperZ || n === Pi.Exclamation) && e.includes(">", t + 2)
  3734. }
  3735. !function (e) {
  3736. e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation"
  3737. }(Pi || (Pi = {}));
  3738. var Hi = Object.prototype.hasOwnProperty, Gi = /\s+/, Yi = {null: null, true: !0, false: !1},
  3739. qi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  3740. Ki = /^{[^]*}$|^\[[^]*]$/;
  3741. function ji(e, t, n) {
  3742. var r;
  3743. if (e && I(e)) return null !== (r = e.attribs) && void 0 !== r || (e.attribs = {}), t ? Hi.call(e.attribs, t) ? !n && qi.test(t) ? t : e.attribs[t] : "option" === e.name && "value" === t ? Li(e.children) : "input" !== e.name || "radio" !== e.attribs.type && "checkbox" !== e.attribs.type || "value" !== t ? void 0 : "on" : e.attribs
  3744. }
  3745. function Vi(e, t, n) {
  3746. null === n ? zi(e, t) : e.attribs[t] = "".concat(n)
  3747. }
  3748. function Wi(e, t, n) {
  3749. return t in e ? e[t] : !n && qi.test(t) ? void 0 !== ji(e, t, !1) : ji(e, t, n)
  3750. }
  3751. function Qi(e, t, n, r) {
  3752. t in e ? e[t] = n : Vi(e, t, !r && qi.test(t) ? n ? "" : null : "".concat(n))
  3753. }
  3754. function Xi(e, t, n) {
  3755. var r, i = e;
  3756. null !== (r = i.data) && void 0 !== r || (i.data = {}), "object" == typeof t ? Object.assign(i.data, t) : "string" == typeof t && void 0 !== n && (i.data[t] = n)
  3757. }
  3758. function $i(e, t) {
  3759. var n, r, i, s;
  3760. null == t ? r = (n = Object.keys(e.attribs).filter((function (e) {
  3761. return e.startsWith("data-")
  3762. }))).map((function (e) {
  3763. return e.slice("data-".length).replace(/[_.-](\w|$)/g, (function (e, t) {
  3764. return t.toUpperCase()
  3765. }))
  3766. })) : (n = ["data-" + (s = t, s.replace(/[A-Z]/g, "-$&").toLowerCase())], r = [t]);
  3767. for (var a = 0; a < n.length; ++a) {
  3768. var o = n[a], c = r[a];
  3769. if (Hi.call(e.attribs, o) && !Hi.call(e.data, c)) {
  3770. if (i = e.attribs[o], Hi.call(Yi, i)) i = Yi[i]; else if (i === String(Number(i))) i = Number(i); else if (Ki.test(i)) try {
  3771. i = JSON.parse(i)
  3772. } catch (e) {
  3773. }
  3774. e.data[c] = i
  3775. }
  3776. }
  3777. return null == t ? e.data : i
  3778. }
  3779. function zi(e, t) {
  3780. e.attribs && Hi.call(e.attribs, t) && delete e.attribs[t]
  3781. }
  3782. function Ji(e) {
  3783. return e ? e.trim().split(Gi) : []
  3784. }
  3785. var Zi, es, ts = Object.freeze({
  3786. __proto__: null, attr: function (e, t) {
  3787. if ("object" == typeof e || void 0 !== t) {
  3788. if ("function" == typeof t) {
  3789. if ("string" != typeof e) throw new Error("Bad combination of arguments.");
  3790. return Bi(this, (function (n, r) {
  3791. I(n) && Vi(n, e, t.call(n, r, n.attribs[e]))
  3792. }))
  3793. }
  3794. return Bi(this, (function (n) {
  3795. I(n) && ("object" == typeof e ? Object.keys(e).forEach((function (t) {
  3796. var r = e[t];
  3797. Vi(n, t, r)
  3798. })) : Vi(n, e, t))
  3799. }))
  3800. }
  3801. return arguments.length > 1 ? this : ji(this[0], e, this.options.xmlMode)
  3802. }, prop: function (e, t) {
  3803. var n, r = this;
  3804. if ("string" == typeof e && void 0 === t) {
  3805. var i = this[0];
  3806. if (!i || !I(i)) return;
  3807. switch (e) {
  3808. case"style":
  3809. var s = this.css(), a = Object.keys(s);
  3810. return a.forEach((function (e, t) {
  3811. s[t] = e
  3812. })), s.length = a.length, s;
  3813. case"tagName":
  3814. case"nodeName":
  3815. return i.name.toUpperCase();
  3816. case"href":
  3817. case"src":
  3818. var o = null === (n = i.attribs) || void 0 === n ? void 0 : n[e];
  3819. return "undefined" == typeof URL || ("href" !== e || "a" !== i.tagName && "link" !== i.name) && ("src" !== e || "img" !== i.tagName && "iframe" !== i.tagName && "audio" !== i.tagName && "video" !== i.tagName && "source" !== i.tagName) || void 0 === o || !this.options.baseURI ? o : new URL(o, this.options.baseURI).href;
  3820. case"innerText":
  3821. return J(i);
  3822. case"textContent":
  3823. return z(i);
  3824. case"outerHTML":
  3825. return this.clone().wrap("<container />").parent().html();
  3826. case"innerHTML":
  3827. return this.html();
  3828. default:
  3829. return Wi(i, e, this.options.xmlMode)
  3830. }
  3831. }
  3832. if ("object" == typeof e || void 0 !== t) {
  3833. if ("function" == typeof t) {
  3834. if ("object" == typeof e) throw new Error("Bad combination of arguments.");
  3835. return Bi(this, (function (n, i) {
  3836. I(n) && Qi(n, e, t.call(n, i, Wi(n, e, r.options.xmlMode)), r.options.xmlMode)
  3837. }))
  3838. }
  3839. return Bi(this, (function (n) {
  3840. I(n) && ("object" == typeof e ? Object.keys(e).forEach((function (t) {
  3841. var i = e[t];
  3842. Qi(n, t, i, r.options.xmlMode)
  3843. })) : Qi(n, e, t, r.options.xmlMode))
  3844. }))
  3845. }
  3846. }, data: function (e, t) {
  3847. var n, r = this[0];
  3848. if (r && I(r)) {
  3849. var i = r;
  3850. return null !== (n = i.data) && void 0 !== n || (i.data = {}), e ? "object" == typeof e || void 0 !== t ? (Bi(this, (function (n) {
  3851. I(n) && ("object" == typeof e ? Xi(n, e) : Xi(n, e, t))
  3852. })), this) : Hi.call(i.data, e) ? i.data[e] : $i(i, e) : $i(i)
  3853. }
  3854. }, val: function (e) {
  3855. var t = 0 === arguments.length, n = this[0];
  3856. if (!n || !I(n)) return t ? void 0 : this;
  3857. switch (n.name) {
  3858. case"textarea":
  3859. return this.text(e);
  3860. case"select":
  3861. var r = this.find("option:selected");
  3862. if (!t) {
  3863. if (null == this.attr("multiple") && "object" == typeof e) return this;
  3864. this.find("option").removeAttr("selected");
  3865. for (var i = "object" != typeof e ? [e] : e, s = 0; s < i.length; s++) this.find('option[value="'.concat(i[s], '"]')).attr("selected", "");
  3866. return this
  3867. }
  3868. return this.attr("multiple") ? r.toArray().map((function (e) {
  3869. return Li(e.children)
  3870. })) : r.attr("value");
  3871. case"input":
  3872. case"option":
  3873. return t ? this.attr("value") : this.attr("value", e)
  3874. }
  3875. }, removeAttr: function (e) {
  3876. for (var t = Ji(e), n = function (e) {
  3877. Bi(r, (function (n) {
  3878. I(n) && zi(n, t[e])
  3879. }))
  3880. }, r = this, i = 0; i < t.length; i++) n(i);
  3881. return this
  3882. }, hasClass: function (e) {
  3883. return this.toArray().some((function (t) {
  3884. var n = I(t) && t.attribs.class, r = -1;
  3885. if (n && e.length) for (; (r = n.indexOf(e, r + 1)) > -1;) {
  3886. var i = r + e.length;
  3887. if ((0 === r || Gi.test(n[r - 1])) && (i === n.length || Gi.test(n[i]))) return !0
  3888. }
  3889. return !1
  3890. }))
  3891. }, addClass: function e(t) {
  3892. if ("function" == typeof t) return Bi(this, (function (n, r) {
  3893. if (I(n)) {
  3894. var i = n.attribs.class || "";
  3895. e.call([n], t.call(n, r, i))
  3896. }
  3897. }));
  3898. if (!t || "string" != typeof t) return this;
  3899. for (var n = t.split(Gi), r = this.length, i = 0; i < r; i++) {
  3900. var s = this[i];
  3901. if (I(s)) {
  3902. var a = ji(s, "class", !1);
  3903. if (a) {
  3904. for (var o = " ".concat(a, " "), c = 0; c < n.length; c++) {
  3905. var l = "".concat(n[c], " ");
  3906. o.includes(" ".concat(l)) || (o += l)
  3907. }
  3908. Vi(s, "class", o.trim())
  3909. } else Vi(s, "class", n.join(" ").trim())
  3910. }
  3911. }
  3912. return this
  3913. }, removeClass: function e(t) {
  3914. if ("function" == typeof t) return Bi(this, (function (n, r) {
  3915. I(n) && e.call([n], t.call(n, r, n.attribs.class || ""))
  3916. }));
  3917. var n = Ji(t), r = n.length, i = 0 === arguments.length;
  3918. return Bi(this, (function (e) {
  3919. if (I(e)) if (i) e.attribs.class = ""; else {
  3920. for (var t = Ji(e.attribs.class), s = !1, a = 0; a < r; a++) {
  3921. var o = t.indexOf(n[a]);
  3922. o >= 0 && (t.splice(o, 1), s = !0, a--)
  3923. }
  3924. s && (e.attribs.class = t.join(" "))
  3925. }
  3926. }))
  3927. }, toggleClass: function e(t, n) {
  3928. if ("function" == typeof t) return Bi(this, (function (r, i) {
  3929. I(r) && e.call([r], t.call(r, i, r.attribs.class || "", n), n)
  3930. }));
  3931. if (!t || "string" != typeof t) return this;
  3932. for (var r = t.split(Gi), i = r.length, s = "boolean" == typeof n ? n ? 1 : -1 : 0, a = this.length, o = 0; o < a; o++) {
  3933. var c = this[o];
  3934. if (I(c)) {
  3935. for (var l = Ji(c.attribs.class), h = 0; h < i; h++) {
  3936. var u = l.indexOf(r[h]);
  3937. s >= 0 && u < 0 ? l.push(r[h]) : s <= 0 && u >= 0 && l.splice(u, 1)
  3938. }
  3939. c.attribs.class = l.join(" ")
  3940. }
  3941. }
  3942. return this
  3943. }
  3944. });
  3945. !function (e) {
  3946. e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator"
  3947. }(Zi || (Zi = {})), function (e) {
  3948. e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start"
  3949. }(es || (es = {}));
  3950. const ns = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, rs = /\\([\da-f]{1,6}\s?|(\s)|.)/gi,
  3951. is = new Map([[126, es.Element], [94, es.Start], [36, es.End], [42, es.Any], [33, es.Not], [124, es.Hyphen]]),
  3952. ss = new Set(["has", "not", "matches", "is", "where", "host", "host-context"]);
  3953. function as(e) {
  3954. switch (e.type) {
  3955. case Zi.Adjacent:
  3956. case Zi.Child:
  3957. case Zi.Descendant:
  3958. case Zi.Parent:
  3959. case Zi.Sibling:
  3960. case Zi.ColumnCombinator:
  3961. return !0;
  3962. default:
  3963. return !1
  3964. }
  3965. }
  3966. const os = new Set(["contains", "icontains"]);
  3967. function cs(e, t, n) {
  3968. const r = parseInt(t, 16) - 65536;
  3969. return r != r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  3970. }
  3971. function ls(e) {
  3972. return e.replace(rs, cs)
  3973. }
  3974. function hs(e) {
  3975. return 39 === e || 34 === e
  3976. }
  3977. function us(e) {
  3978. return 32 === e || 9 === e || 10 === e || 12 === e || 13 === e
  3979. }
  3980. function ps(e) {
  3981. const t = [], n = fs(t, `${e}`, 0);
  3982. if (n < e.length) throw new Error(`Unmatched selector: ${e.slice(n)}`);
  3983. return t
  3984. }
  3985. function fs(e, t, n) {
  3986. let r = [];
  3987. function i(e) {
  3988. const r = t.slice(n + e).match(ns);
  3989. if (!r) throw new Error(`Expected name, found ${t.slice(n)}`);
  3990. const [i] = r;
  3991. return n += e + i.length, ls(i)
  3992. }
  3993. function s(e) {
  3994. for (n += e; n < t.length && us(t.charCodeAt(n));) n++
  3995. }
  3996. function a() {
  3997. const e = n += 1;
  3998. let r = 1;
  3999. for (; r > 0 && n < t.length; n++) 40 !== t.charCodeAt(n) || o(n) ? 41 !== t.charCodeAt(n) || o(n) || r-- : r++;
  4000. if (r) throw new Error("Parenthesis not matched");
  4001. return ls(t.slice(e, n - 1))
  4002. }
  4003. function o(e) {
  4004. let n = 0;
  4005. for (; 92 === t.charCodeAt(--e);) n++;
  4006. return 1 == (1 & n)
  4007. }
  4008. function c() {
  4009. if (r.length > 0 && as(r[r.length - 1])) throw new Error("Did not expect successive traversals.")
  4010. }
  4011. function l(e) {
  4012. r.length > 0 && r[r.length - 1].type === Zi.Descendant ? r[r.length - 1].type = e : (c(), r.push({type: e}))
  4013. }
  4014. function h(e, t) {
  4015. r.push({type: Zi.Attribute, name: e, action: t, value: i(1), namespace: null, ignoreCase: "quirks"})
  4016. }
  4017. function u() {
  4018. if (r.length && r[r.length - 1].type === Zi.Descendant && r.pop(), 0 === r.length) throw new Error("Empty sub-selector");
  4019. e.push(r)
  4020. }
  4021. if (s(0), t.length === n) return n;
  4022. e:for (; n < t.length;) {
  4023. const e = t.charCodeAt(n);
  4024. switch (e) {
  4025. case 32:
  4026. case 9:
  4027. case 10:
  4028. case 12:
  4029. case 13:
  4030. 0 !== r.length && r[0].type === Zi.Descendant || (c(), r.push({type: Zi.Descendant})), s(1);
  4031. break;
  4032. case 62:
  4033. l(Zi.Child), s(1);
  4034. break;
  4035. case 60:
  4036. l(Zi.Parent), s(1);
  4037. break;
  4038. case 126:
  4039. l(Zi.Sibling), s(1);
  4040. break;
  4041. case 43:
  4042. l(Zi.Adjacent), s(1);
  4043. break;
  4044. case 46:
  4045. h("class", es.Element);
  4046. break;
  4047. case 35:
  4048. h("id", es.Equals);
  4049. break;
  4050. case 91: {
  4051. let e;
  4052. s(1);
  4053. let a = null;
  4054. 124 === t.charCodeAt(n) ? e = i(1) : t.startsWith("*|", n) ? (a = "*", e = i(2)) : (e = i(0), 124 === t.charCodeAt(n) && 61 !== t.charCodeAt(n + 1) && (a = e, e = i(1))), s(0);
  4055. let c = es.Exists;
  4056. const l = is.get(t.charCodeAt(n));
  4057. if (l) {
  4058. if (c = l, 61 !== t.charCodeAt(n + 1)) throw new Error("Expected `=`");
  4059. s(2)
  4060. } else 61 === t.charCodeAt(n) && (c = es.Equals, s(1));
  4061. let h = "", u = null;
  4062. if ("exists" !== c) {
  4063. if (hs(t.charCodeAt(n))) {
  4064. const e = t.charCodeAt(n);
  4065. let r = n + 1;
  4066. for (; r < t.length && (t.charCodeAt(r) !== e || o(r));) r += 1;
  4067. if (t.charCodeAt(r) !== e) throw new Error("Attribute value didn't end");
  4068. h = ls(t.slice(n + 1, r)), n = r + 1
  4069. } else {
  4070. const e = n;
  4071. for (; n < t.length && (!us(t.charCodeAt(n)) && 93 !== t.charCodeAt(n) || o(n));) n += 1;
  4072. h = ls(t.slice(e, n))
  4073. }
  4074. s(0);
  4075. const e = 32 | t.charCodeAt(n);
  4076. 115 === e ? (u = !1, s(1)) : 105 === e && (u = !0, s(1))
  4077. }
  4078. if (93 !== t.charCodeAt(n)) throw new Error("Attribute selector didn't terminate");
  4079. n += 1;
  4080. const p = {type: Zi.Attribute, name: e, action: c, value: h, namespace: a, ignoreCase: u};
  4081. r.push(p);
  4082. break
  4083. }
  4084. case 58: {
  4085. if (58 === t.charCodeAt(n + 1)) {
  4086. r.push({
  4087. type: Zi.PseudoElement,
  4088. name: i(2).toLowerCase(),
  4089. data: 40 === t.charCodeAt(n) ? a() : null
  4090. });
  4091. continue
  4092. }
  4093. const e = i(1).toLowerCase();
  4094. let s = null;
  4095. if (40 === t.charCodeAt(n)) if (ss.has(e)) {
  4096. if (hs(t.charCodeAt(n + 1))) throw new Error(`Pseudo-selector ${e} cannot be quoted`);
  4097. if (s = [], n = fs(s, t, n + 1), 41 !== t.charCodeAt(n)) throw new Error(`Missing closing parenthesis in :${e} (${t})`);
  4098. n += 1
  4099. } else {
  4100. if (s = a(), os.has(e)) {
  4101. const e = s.charCodeAt(0);
  4102. e === s.charCodeAt(s.length - 1) && hs(e) && (s = s.slice(1, -1))
  4103. }
  4104. s = ls(s)
  4105. }
  4106. r.push({type: Zi.Pseudo, name: e, data: s});
  4107. break
  4108. }
  4109. case 44:
  4110. u(), r = [], s(1);
  4111. break;
  4112. default: {
  4113. if (t.startsWith("/*", n)) {
  4114. const e = t.indexOf("*/", n + 2);
  4115. if (e < 0) throw new Error("Comment was not terminated");
  4116. n = e + 2, 0 === r.length && s(0);
  4117. break
  4118. }
  4119. let a, o = null;
  4120. if (42 === e) n += 1, a = "*"; else if (124 === e) {
  4121. if (a = "", 124 === t.charCodeAt(n + 1)) {
  4122. l(Zi.ColumnCombinator), s(2);
  4123. break
  4124. }
  4125. } else {
  4126. if (!ns.test(t.slice(n))) break e;
  4127. a = i(0)
  4128. }
  4129. 124 === t.charCodeAt(n) && 124 !== t.charCodeAt(n + 1) && (o = a, 42 === t.charCodeAt(n + 1) ? (a = "*", n += 2) : a = i(1)), r.push("*" === a ? {
  4130. type: Zi.Universal,
  4131. namespace: o
  4132. } : {type: Zi.Tag, name: a, namespace: o})
  4133. }
  4134. }
  4135. }
  4136. return u(), n
  4137. }
  4138. var ds = {
  4139. trueFunc: function () {
  4140. return !0
  4141. }, falseFunc: function () {
  4142. return !1
  4143. }
  4144. }, Es = ds.trueFunc;
  4145. const ms = new Map([[Zi.Universal, 50], [Zi.Tag, 30], [Zi.Attribute, 1], [Zi.Pseudo, 0]]);
  4146. function Ts(e) {
  4147. return !ms.has(e.type)
  4148. }
  4149. const _s = new Map([[es.Exists, 10], [es.Equals, 8], [es.Not, 7], [es.Start, 6], [es.End, 6], [es.Any, 5]]);
  4150. function As(e) {
  4151. const t = e.map(gs);
  4152. for (let n = 1; n < e.length; n++) {
  4153. const r = t[n];
  4154. if (!(r < 0)) for (let i = n - 1; i >= 0 && r < t[i]; i--) {
  4155. const n = e[i + 1];
  4156. e[i + 1] = e[i], e[i] = n, t[i + 1] = t[i], t[i] = r
  4157. }
  4158. }
  4159. }
  4160. function gs(e) {
  4161. var t, n;
  4162. let r = null !== (t = ms.get(e.type)) && void 0 !== t ? t : -1;
  4163. return e.type === Zi.Attribute ? (r = null !== (n = _s.get(e.action)) && void 0 !== n ? n : 4, e.action === es.Equals && "id" === e.name && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === Zi.Pseudo && (e.data ? "has" === e.name || "contains" === e.name ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((e => Math.min(...e.map(gs))))), r < 0 && (r = 0)) : r = 2 : r = 3), r
  4164. }
  4165. const Ns = /[-[\]{}()*+?.,\\^$|#\s]/g;
  4166. function Cs(e) {
  4167. return e.replace(Ns, "\\$&")
  4168. }
  4169. const Is = new Set(["accept", "accept-charset", "align", "alink", "axis", "bgcolor", "charset", "checked", "clear", "codetype", "color", "compact", "declare", "defer", "dir", "direction", "disabled", "enctype", "face", "frame", "hreflang", "http-equiv", "lang", "language", "link", "media", "method", "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly", "rel", "rev", "rules", "scope", "scrolling", "selected", "shape", "target", "text", "type", "valign", "valuetype", "vlink"]);
  4170. function Ss(e, t) {
  4171. return "boolean" == typeof e.ignoreCase ? e.ignoreCase : "quirks" === e.ignoreCase ? !!t.quirksMode : !t.xmlMode && Is.has(e.name)
  4172. }
  4173. const bs = {
  4174. equals(e, t, n) {
  4175. const {adapter: r} = n, {name: i} = t;
  4176. let {value: s} = t;
  4177. return Ss(t, n) ? (s = s.toLowerCase(), t => {
  4178. const n = r.getAttributeValue(t, i);
  4179. return null != n && n.length === s.length && n.toLowerCase() === s && e(t)
  4180. }) : t => r.getAttributeValue(t, i) === s && e(t)
  4181. }, hyphen(e, t, n) {
  4182. const {adapter: r} = n, {name: i} = t;
  4183. let {value: s} = t;
  4184. const a = s.length;
  4185. return Ss(t, n) ? (s = s.toLowerCase(), function (t) {
  4186. const n = r.getAttributeValue(t, i);
  4187. return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a).toLowerCase() === s && e(t)
  4188. }) : function (t) {
  4189. const n = r.getAttributeValue(t, i);
  4190. return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a) === s && e(t)
  4191. }
  4192. }, element(e, t, n) {
  4193. const {adapter: r} = n, {name: i, value: s} = t;
  4194. if (/\s/.test(s)) return ds.falseFunc;
  4195. const a = new RegExp(`(?:^|\\s)${Cs(s)}(?:$|\\s)`, Ss(t, n) ? "i" : "");
  4196. return function (t) {
  4197. const n = r.getAttributeValue(t, i);
  4198. return null != n && n.length >= s.length && a.test(n) && e(t)
  4199. }
  4200. }, exists: (e, {name: t}, {adapter: n}) => r => n.hasAttrib(r, t) && e(r), start(e, t, n) {
  4201. const {adapter: r} = n, {name: i} = t;
  4202. let {value: s} = t;
  4203. const a = s.length;
  4204. return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4205. const n = r.getAttributeValue(t, i);
  4206. return null != n && n.length >= a && n.substr(0, a).toLowerCase() === s && e(t)
  4207. }) : t => {
  4208. var n;
  4209. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.startsWith(s)) && e(t)
  4210. }
  4211. }, end(e, t, n) {
  4212. const {adapter: r} = n, {name: i} = t;
  4213. let {value: s} = t;
  4214. const a = -s.length;
  4215. return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4216. var n;
  4217. return (null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.substr(a).toLowerCase()) === s && e(t)
  4218. }) : t => {
  4219. var n;
  4220. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.endsWith(s)) && e(t)
  4221. }
  4222. }, any(e, t, n) {
  4223. const {adapter: r} = n, {name: i, value: s} = t;
  4224. if ("" === s) return ds.falseFunc;
  4225. if (Ss(t, n)) {
  4226. const t = new RegExp(Cs(s), "i");
  4227. return function (n) {
  4228. const a = r.getAttributeValue(n, i);
  4229. return null != a && a.length >= s.length && t.test(a) && e(n)
  4230. }
  4231. }
  4232. return t => {
  4233. var n;
  4234. return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.includes(s)) && e(t)
  4235. }
  4236. }, not(e, t, n) {
  4237. const {adapter: r} = n, {name: i} = t;
  4238. let {value: s} = t;
  4239. return "" === s ? t => !!r.getAttributeValue(t, i) && e(t) : Ss(t, n) ? (s = s.toLowerCase(), t => {
  4240. const n = r.getAttributeValue(t, i);
  4241. return (null == n || n.length !== s.length || n.toLowerCase() !== s) && e(t)
  4242. }) : t => r.getAttributeValue(t, i) !== s && e(t)
  4243. }
  4244. };
  4245. var Os = Ke((function (e, t) {
  4246. Object.defineProperty(t, "__esModule", {value: !0}), t.parse = void 0;
  4247. var n = new Set([9, 10, 12, 13, 32]), r = "0".charCodeAt(0), i = "9".charCodeAt(0);
  4248. t.parse = function (e) {
  4249. if ("even" === (e = e.trim().toLowerCase())) return [2, 0];
  4250. if ("odd" === e) return [2, 1];
  4251. var t = 0, s = 0, a = c(), o = l();
  4252. if (t < e.length && "n" === e.charAt(t) && (t++, s = a * (null != o ? o : 1), h(), t < e.length ? (a = c(), h(), o = l()) : a = o = 0), null === o || t < e.length) throw new Error("n-th rule couldn't be parsed ('" + e + "')");
  4253. return [s, a * o];
  4254. function c() {
  4255. return "-" === e.charAt(t) ? (t++, -1) : ("+" === e.charAt(t) && t++, 1)
  4256. }
  4257. function l() {
  4258. for (var n = t, s = 0; t < e.length && e.charCodeAt(t) >= r && e.charCodeAt(t) <= i;) s = 10 * s + (e.charCodeAt(t) - r), t++;
  4259. return t === n ? null : s
  4260. }
  4261. function h() {
  4262. for (; t < e.length && n.has(e.charCodeAt(t));) t++
  4263. }
  4264. }
  4265. }));
  4266. qe(Os), Os.parse;
  4267. var ys = Ke((function (e, t) {
  4268. Object.defineProperty(t, "__esModule", {value: !0}), t.compile = void 0, t.compile = function (e) {
  4269. var t = e[0], n = e[1] - 1;
  4270. if (n < 0 && t <= 0) return ds.falseFunc;
  4271. if (-1 === t) return function (e) {
  4272. return e <= n
  4273. };
  4274. if (0 === t) return function (e) {
  4275. return e === n
  4276. };
  4277. if (1 === t) return n < 0 ? ds.trueFunc : function (e) {
  4278. return e >= n
  4279. };
  4280. var r = Math.abs(t), i = (n % r + r) % r;
  4281. return t > 1 ? function (e) {
  4282. return e >= n && e % r === i
  4283. } : function (e) {
  4284. return e <= n && e % r === i
  4285. }
  4286. }
  4287. }));
  4288. qe(ys), ys.compile;
  4289. var Ls = Os, ks = ys, vs = Ke((function (e, t) {
  4290. Object.defineProperty(t, "__esModule", {value: !0}), t.compile = t.parse = void 0, Object.defineProperty(t, "parse", {
  4291. enumerable: !0,
  4292. get: function () {
  4293. return Ls.parse
  4294. }
  4295. }), Object.defineProperty(t, "compile", {
  4296. enumerable: !0, get: function () {
  4297. return ks.compile
  4298. }
  4299. }), t.default = function (e) {
  4300. return (0, ks.compile)((0, Ls.parse)(e))
  4301. }
  4302. })), Ds = qe(vs);
  4303. function Rs(e, t) {
  4304. return n => {
  4305. const r = t.getParent(n);
  4306. return null != r && t.isTag(r) && e(n)
  4307. }
  4308. }
  4309. vs.compile, vs.parse;
  4310. const Ms = {
  4311. contains: (e, t, {adapter: n}) => function (r) {
  4312. return e(r) && n.getText(r).includes(t)
  4313. }, icontains(e, t, {adapter: n}) {
  4314. const r = t.toLowerCase();
  4315. return function (t) {
  4316. return e(t) && n.getText(t).toLowerCase().includes(r)
  4317. }
  4318. }, "nth-child"(e, t, {adapter: n, equals: r}) {
  4319. const i = Ds(t);
  4320. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function (t) {
  4321. const s = n.getSiblings(t);
  4322. let a = 0;
  4323. for (let e = 0; e < s.length && !r(t, s[e]); e++) n.isTag(s[e]) && a++;
  4324. return i(a) && e(t)
  4325. }
  4326. }, "nth-last-child"(e, t, {adapter: n, equals: r}) {
  4327. const i = Ds(t);
  4328. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function (t) {
  4329. const s = n.getSiblings(t);
  4330. let a = 0;
  4331. for (let e = s.length - 1; e >= 0 && !r(t, s[e]); e--) n.isTag(s[e]) && a++;
  4332. return i(a) && e(t)
  4333. }
  4334. }, "nth-of-type"(e, t, {adapter: n, equals: r}) {
  4335. const i = Ds(t);
  4336. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function (t) {
  4337. const s = n.getSiblings(t);
  4338. let a = 0;
  4339. for (let e = 0; e < s.length; e++) {
  4340. const i = s[e];
  4341. if (r(t, i)) break;
  4342. n.isTag(i) && n.getName(i) === n.getName(t) && a++
  4343. }
  4344. return i(a) && e(t)
  4345. }
  4346. }, "nth-last-of-type"(e, t, {adapter: n, equals: r}) {
  4347. const i = Ds(t);
  4348. return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function (t) {
  4349. const s = n.getSiblings(t);
  4350. let a = 0;
  4351. for (let e = s.length - 1; e >= 0; e--) {
  4352. const i = s[e];
  4353. if (r(t, i)) break;
  4354. n.isTag(i) && n.getName(i) === n.getName(t) && a++
  4355. }
  4356. return i(a) && e(t)
  4357. }
  4358. }, root: (e, t, {adapter: n}) => t => {
  4359. const r = n.getParent(t);
  4360. return (null == r || !n.isTag(r)) && e(t)
  4361. }, scope(e, t, n, r) {
  4362. const {equals: i} = n;
  4363. return r && 0 !== r.length ? 1 === r.length ? t => i(r[0], t) && e(t) : t => r.includes(t) && e(t) : Ms.root(e, t, n)
  4364. }, hover: Ps("isHovered"), visited: Ps("isVisited"), active: Ps("isActive")
  4365. };
  4366. function Ps(e) {
  4367. return function (t, n, {adapter: r}) {
  4368. const i = r[e];
  4369. return "function" != typeof i ? ds.falseFunc : function (e) {
  4370. return i(e) && t(e)
  4371. }
  4372. }
  4373. }
  4374. const xs = {
  4375. empty: (e, {adapter: t}) => !t.getChildren(e).some((e => t.isTag(e) || "" !== t.getText(e))),
  4376. "first-child"(e, {adapter: t, equals: n}) {
  4377. if (t.prevElementSibling) return null == t.prevElementSibling(e);
  4378. const r = t.getSiblings(e).find((e => t.isTag(e)));
  4379. return null != r && n(e, r)
  4380. },
  4381. "last-child"(e, {adapter: t, equals: n}) {
  4382. const r = t.getSiblings(e);
  4383. for (let i = r.length - 1; i >= 0; i--) {
  4384. if (n(e, r[i])) return !0;
  4385. if (t.isTag(r[i])) break
  4386. }
  4387. return !1
  4388. },
  4389. "first-of-type"(e, {adapter: t, equals: n}) {
  4390. const r = t.getSiblings(e), i = t.getName(e);
  4391. for (let s = 0; s < r.length; s++) {
  4392. const a = r[s];
  4393. if (n(e, a)) return !0;
  4394. if (t.isTag(a) && t.getName(a) === i) break
  4395. }
  4396. return !1
  4397. },
  4398. "last-of-type"(e, {adapter: t, equals: n}) {
  4399. const r = t.getSiblings(e), i = t.getName(e);
  4400. for (let s = r.length - 1; s >= 0; s--) {
  4401. const a = r[s];
  4402. if (n(e, a)) return !0;
  4403. if (t.isTag(a) && t.getName(a) === i) break
  4404. }
  4405. return !1
  4406. },
  4407. "only-of-type"(e, {adapter: t, equals: n}) {
  4408. const r = t.getName(e);
  4409. return t.getSiblings(e).every((i => n(e, i) || !t.isTag(i) || t.getName(i) !== r))
  4410. },
  4411. "only-child": (e, {adapter: t, equals: n}) => t.getSiblings(e).every((r => n(e, r) || !t.isTag(r)))
  4412. };
  4413. function ws(e, t, n, r) {
  4414. if (null === n) {
  4415. if (e.length > r) throw new Error(`Pseudo-class :${t} requires an argument`)
  4416. } else if (e.length === r) throw new Error(`Pseudo-class :${t} doesn't have any arguments`)
  4417. }
  4418. const Bs = {
  4419. "any-link": ":is(a, area, link)[href]",
  4420. link: ":any-link:not(:visited)",
  4421. disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",
  4422. enabled: ":not(:disabled)",
  4423. checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",
  4424. required: ":is(input, select, textarea)[required]",
  4425. optional: ":is(input, select, textarea):not([required])",
  4426. selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",
  4427. checkbox: "[type=checkbox]",
  4428. file: "[type=file]",
  4429. password: "[type=password]",
  4430. radio: "[type=radio]",
  4431. reset: "[type=reset]",
  4432. image: "[type=image]",
  4433. submit: "[type=submit]",
  4434. parent: ":not(:empty)",
  4435. header: ":is(h1, h2, h3, h4, h5, h6)",
  4436. button: ":is(button, input[type=button])",
  4437. input: ":is(input, textarea, select, button)",
  4438. text: "input:is(:not([type!='']), [type=text])"
  4439. }, Fs = {};
  4440. function Us(e, t) {
  4441. const n = t.getSiblings(e);
  4442. if (n.length <= 1) return [];
  4443. const r = n.indexOf(e);
  4444. return r < 0 || r === n.length - 1 ? [] : n.slice(r + 1).filter(t.isTag)
  4445. }
  4446. function Hs(e) {
  4447. return {
  4448. xmlMode: !!e.xmlMode,
  4449. lowerCaseAttributeNames: !!e.lowerCaseAttributeNames,
  4450. lowerCaseTags: !!e.lowerCaseTags,
  4451. quirksMode: !!e.quirksMode,
  4452. cacheResults: !!e.cacheResults,
  4453. pseudos: e.pseudos,
  4454. adapter: e.adapter,
  4455. equals: e.equals
  4456. }
  4457. }
  4458. const Gs = (e, t, n, r, i) => {
  4459. const s = i(t, Hs(n), r);
  4460. return s === ds.trueFunc ? e : s === ds.falseFunc ? ds.falseFunc : t => s(t) && e(t)
  4461. }, Ys = {
  4462. is: Gs, matches: Gs, where: Gs, not(e, t, n, r, i) {
  4463. const s = i(t, Hs(n), r);
  4464. return s === ds.falseFunc ? e : s === ds.trueFunc ? ds.falseFunc : t => !s(t) && e(t)
  4465. }, has(e, t, n, r, i) {
  4466. const {adapter: s} = n, a = Hs(n);
  4467. a.relativeSelector = !0;
  4468. const o = t.some((e => e.some(Ts))) ? [Fs] : void 0, c = i(t, a, o);
  4469. if (c === ds.falseFunc) return ds.falseFunc;
  4470. const l = function (e, t) {
  4471. return e === ds.falseFunc ? ds.falseFunc : n => t.isTag(n) && e(n)
  4472. }(c, s);
  4473. if (o && c !== ds.trueFunc) {
  4474. const {shouldTestNextSiblings: t = !1} = c;
  4475. return n => {
  4476. if (!e(n)) return !1;
  4477. o[0] = n;
  4478. const r = s.getChildren(n), i = t ? [...r, ...Us(n, s)] : r;
  4479. return s.existsOne(l, i)
  4480. }
  4481. }
  4482. return t => e(t) && s.existsOne(l, s.getChildren(t))
  4483. }
  4484. };
  4485. function qs(e, t) {
  4486. const n = t.getParent(e);
  4487. return n && t.isTag(n) ? n : null
  4488. }
  4489. function Ks(e, t, n, r, i) {
  4490. const {adapter: s, equals: a} = n;
  4491. switch (t.type) {
  4492. case Zi.PseudoElement:
  4493. throw new Error("Pseudo-elements are not supported by css-select");
  4494. case Zi.ColumnCombinator:
  4495. throw new Error("Column combinators are not yet supported by css-select");
  4496. case Zi.Attribute:
  4497. if (null != t.namespace) throw new Error("Namespaced attributes are not yet supported by css-select");
  4498. return n.xmlMode && !n.lowerCaseAttributeNames || (t.name = t.name.toLowerCase()), bs[t.action](e, t, n);
  4499. case Zi.Pseudo:
  4500. return function (e, t, n, r, i) {
  4501. var s;
  4502. const {name: a, data: o} = t;
  4503. if (Array.isArray(o)) {
  4504. if (!(a in Ys)) throw new Error(`Unknown pseudo-class :${a}(${o})`);
  4505. return Ys[a](e, o, n, r, i)
  4506. }
  4507. const c = null === (s = n.pseudos) || void 0 === s ? void 0 : s[a],
  4508. l = "string" == typeof c ? c : Bs[a];
  4509. if ("string" == typeof l) {
  4510. if (null != o) throw new Error(`Pseudo ${a} doesn't have any arguments`);
  4511. const t = ps(l);
  4512. return Ys.is(e, t, n, r, i)
  4513. }
  4514. if ("function" == typeof c) return ws(c, a, o, 1), t => c(t, o) && e(t);
  4515. if (a in Ms) return Ms[a](e, o, n, r);
  4516. if (a in xs) {
  4517. const t = xs[a];
  4518. return ws(t, a, o, 2), r => t(r, n, o) && e(r)
  4519. }
  4520. throw new Error(`Unknown pseudo-class :${a}`)
  4521. }(e, t, n, r, i);
  4522. case Zi.Tag: {
  4523. if (null != t.namespace) throw new Error("Namespaced tag names are not yet supported by css-select");
  4524. let {name: r} = t;
  4525. return n.xmlMode && !n.lowerCaseTags || (r = r.toLowerCase()), function (t) {
  4526. return s.getName(t) === r && e(t)
  4527. }
  4528. }
  4529. case Zi.Descendant: {
  4530. if (!1 === n.cacheResults || "undefined" == typeof WeakSet) return function (t) {
  4531. let n = t;
  4532. for (; n = qs(n, s);) if (e(n)) return !0;
  4533. return !1
  4534. };
  4535. const t = new WeakSet;
  4536. return function (n) {
  4537. let r = n;
  4538. for (; r = qs(r, s);) if (!t.has(r)) {
  4539. if (s.isTag(r) && e(r)) return !0;
  4540. t.add(r)
  4541. }
  4542. return !1
  4543. }
  4544. }
  4545. case"_flexibleDescendant":
  4546. return function (t) {
  4547. let n = t;
  4548. do {
  4549. if (e(n)) return !0
  4550. } while (n = qs(n, s));
  4551. return !1
  4552. };
  4553. case Zi.Parent:
  4554. return function (t) {
  4555. return s.getChildren(t).some((t => s.isTag(t) && e(t)))
  4556. };
  4557. case Zi.Child:
  4558. return function (t) {
  4559. const n = s.getParent(t);
  4560. return null != n && s.isTag(n) && e(n)
  4561. };
  4562. case Zi.Sibling:
  4563. return function (t) {
  4564. const n = s.getSiblings(t);
  4565. for (let r = 0; r < n.length; r++) {
  4566. const i = n[r];
  4567. if (a(t, i)) break;
  4568. if (s.isTag(i) && e(i)) return !0
  4569. }
  4570. return !1
  4571. };
  4572. case Zi.Adjacent:
  4573. return s.prevElementSibling ? function (t) {
  4574. const n = s.prevElementSibling(t);
  4575. return null != n && e(n)
  4576. } : function (t) {
  4577. const n = s.getSiblings(t);
  4578. let r;
  4579. for (let e = 0; e < n.length; e++) {
  4580. const i = n[e];
  4581. if (a(t, i)) break;
  4582. s.isTag(i) && (r = i)
  4583. }
  4584. return !!r && e(r)
  4585. };
  4586. case Zi.Universal:
  4587. if (null != t.namespace && "*" !== t.namespace) throw new Error("Namespaced universal selectors are not yet supported by css-select");
  4588. return e
  4589. }
  4590. }
  4591. function js(e) {
  4592. return e.type === Zi.Pseudo && ("scope" === e.name || Array.isArray(e.data) && e.data.some((e => e.some(js))))
  4593. }
  4594. const Vs = {type: Zi.Descendant}, Ws = {type: "_flexibleDescendant"}, Qs = {type: Zi.Pseudo, name: "scope", data: null};
  4595. function Xs(e, t, n) {
  4596. var r;
  4597. e.forEach(As), n = null !== (r = t.context) && void 0 !== r ? r : n;
  4598. const i = Array.isArray(n), s = n && (Array.isArray(n) ? n : [n]);
  4599. if (!1 !== t.relativeSelector) !function (e, {adapter: t}, n) {
  4600. const r = !!(null == n ? void 0 : n.every((e => {
  4601. const n = t.isTag(e) && t.getParent(e);
  4602. return e === Fs || n && t.isTag(n)
  4603. })));
  4604. for (const t of e) {
  4605. if (t.length > 0 && Ts(t[0]) && t[0].type !== Zi.Descendant) ; else {
  4606. if (!r || t.some(js)) continue;
  4607. t.unshift(Vs)
  4608. }
  4609. t.unshift(Qs)
  4610. }
  4611. }(e, t, s); else if (e.some((e => e.length > 0 && Ts(e[0])))) throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");
  4612. let a = !1;
  4613. const o = e.map((e => {
  4614. if (e.length >= 2) {
  4615. const [t, n] = e;
  4616. t.type !== Zi.Pseudo || "scope" !== t.name || (i && n.type === Zi.Descendant ? e[1] = Ws : n.type !== Zi.Adjacent && n.type !== Zi.Sibling || (a = !0))
  4617. }
  4618. return function (e, t, n) {
  4619. var r;
  4620. return e.reduce(((e, r) => e === ds.falseFunc ? ds.falseFunc : Ks(e, r, t, n, Xs)), null !== (r = t.rootFunc) && void 0 !== r ? r : ds.trueFunc)
  4621. }(e, t, s)
  4622. })).reduce($s, ds.falseFunc);
  4623. return o.shouldTestNextSiblings = a, o
  4624. }
  4625. function $s(e, t) {
  4626. return t === ds.falseFunc || e === ds.trueFunc ? e : e === ds.falseFunc || t === ds.trueFunc ? t : function (n) {
  4627. return e(n) || t(n)
  4628. }
  4629. }
  4630. const zs = (e, t) => e === t, Js = {adapter: Se, equals: zs};
  4631. const Zs = (ea = Xs, function (e, t, n) {
  4632. const r = function (e) {
  4633. var t, n, r, i;
  4634. const s = null != e ? e : Js;
  4635. return null !== (t = s.adapter) && void 0 !== t || (s.adapter = Se), null !== (n = s.equals) && void 0 !== n || (s.equals = null !== (i = null === (r = s.adapter) || void 0 === r ? void 0 : r.equals) && void 0 !== i ? i : zs), s
  4636. }(t);
  4637. return ea(e, r, n)
  4638. });
  4639. var ea;
  4640. function ta(e, t, n = !1) {
  4641. return n && (e = function (e, t) {
  4642. const n = Array.isArray(e) ? e.slice(0) : [e], r = n.length;
  4643. for (let e = 0; e < r; e++) {
  4644. const r = Us(n[e], t);
  4645. n.push(...r)
  4646. }
  4647. return n
  4648. }(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e)
  4649. }
  4650. const na = new Set(["first", "last", "eq", "gt", "nth", "lt", "even", "odd"]);
  4651. function ra(e) {
  4652. return "pseudo" === e.type && (!!na.has(e.name) || !("not" !== e.name || !Array.isArray(e.data)) && e.data.some((e => e.some(ra))))
  4653. }
  4654. function ia(e) {
  4655. const t = [], n = [];
  4656. for (const r of e) r.some(ra) ? t.push(r) : n.push(r);
  4657. return [n, t]
  4658. }
  4659. const sa = {type: Zi.Universal, namespace: null}, aa = {type: Zi.Pseudo, name: "scope", data: null};
  4660. function oa(e, t, n = {}) {
  4661. return ca([e], t, n)
  4662. }
  4663. function ca(e, t, n = {}) {
  4664. if ("function" == typeof t) return e.some(t);
  4665. const [r, i] = ia(ps(t));
  4666. return r.length > 0 && e.some(Zs(r, n)) || i.some((t => ua(t, e, n).length > 0))
  4667. }
  4668. function la(e, t, n = {}) {
  4669. return ha(ps(e), t, n)
  4670. }
  4671. function ha(e, t, n) {
  4672. if (0 === t.length) return [];
  4673. const [r, i] = ia(e);
  4674. let s;
  4675. if (r.length) {
  4676. const e = Ea(t, r, n);
  4677. if (0 === i.length) return e;
  4678. e.length && (s = new Set(e))
  4679. }
  4680. for (let e = 0; e < i.length && (null == s ? void 0 : s.size) !== t.length; e++) {
  4681. const r = i[e], a = s ? t.filter((e => I(e) && !s.has(e))) : t;
  4682. if (0 === a.length) break;
  4683. const o = ua(r, t, n);
  4684. if (o.length) if (s) o.forEach((e => s.add(e))); else {
  4685. if (e === i.length - 1) return o;
  4686. s = new Set(o)
  4687. }
  4688. }
  4689. return void 0 !== s ? s.size === t.length ? t : t.filter((e => s.has(e))) : []
  4690. }
  4691. function ua(e, t, n) {
  4692. var r;
  4693. if (e.some(as)) {
  4694. const i = null !== (r = n.root) && void 0 !== r ? r : function (e) {
  4695. for (; e.parent;) e = e.parent;
  4696. return e
  4697. }(t[0]), s = {...n, context: t, relativeSelector: !1};
  4698. return e.push(aa), pa(i, e, s, !0, t.length)
  4699. }
  4700. return pa(t, e, n, !1, t.length)
  4701. }
  4702. function pa(e, t, n, r, i) {
  4703. const s = t.findIndex(ra), a = t.slice(0, s), o = t[s], c = t.length - 1 === s ? i : 1 / 0, l = function (e, t, n) {
  4704. const r = null != t ? parseInt(t, 10) : NaN;
  4705. switch (e) {
  4706. case"first":
  4707. return 1;
  4708. case"nth":
  4709. case"eq":
  4710. return isFinite(r) ? r >= 0 ? r + 1 : 1 / 0 : 0;
  4711. case"lt":
  4712. return isFinite(r) ? r >= 0 ? Math.min(r, n) : 1 / 0 : 0;
  4713. case"gt":
  4714. return isFinite(r) ? 1 / 0 : 0;
  4715. case"odd":
  4716. return 2 * n;
  4717. case"even":
  4718. return 2 * n - 1;
  4719. case"last":
  4720. case"not":
  4721. return 1 / 0
  4722. }
  4723. }(o.name, o.data, c);
  4724. if (0 === l) return [];
  4725. const h = (0 !== a.length || Array.isArray(e) ? 0 === a.length ? (Array.isArray(e) ? e : [e]).filter(I) : r || a.some(as) ? fa(e, [a], n, l) : Ea(e, [a], n) : Z(e).filter(I)).slice(0, l);
  4726. let u = function (e, t, n, r) {
  4727. const i = "string" == typeof n ? parseInt(n, 10) : NaN;
  4728. switch (e) {
  4729. case"first":
  4730. case"lt":
  4731. return t;
  4732. case"last":
  4733. return t.length > 0 ? [t[t.length - 1]] : t;
  4734. case"nth":
  4735. case"eq":
  4736. return isFinite(i) && Math.abs(i) < t.length ? [i < 0 ? t[t.length + i] : t[i]] : [];
  4737. case"gt":
  4738. return isFinite(i) ? t.slice(i + 1) : [];
  4739. case"even":
  4740. return t.filter(((e, t) => t % 2 == 0));
  4741. case"odd":
  4742. return t.filter(((e, t) => t % 2 == 1));
  4743. case"not": {
  4744. const e = new Set(ha(n, t, r));
  4745. return t.filter((t => !e.has(t)))
  4746. }
  4747. }
  4748. }(o.name, h, o.data, n);
  4749. if (0 === u.length || t.length === s + 1) return u;
  4750. const p = t.slice(s + 1), f = p.some(as);
  4751. if (f) {
  4752. if (as(p[0])) {
  4753. const {type: e} = p[0];
  4754. e !== Zi.Sibling && e !== Zi.Adjacent || (u = ta(u, Se, !0)), p.unshift(sa)
  4755. }
  4756. n = {...n, relativeSelector: !1, rootFunc: e => u.includes(e)}
  4757. } else n.rootFunc && n.rootFunc !== Es && (n = {...n, rootFunc: Es});
  4758. return p.some(ra) ? pa(u, p, n, !1, i) : f ? fa(u, [p], n, i) : Ea(u, [p], n)
  4759. }
  4760. function fa(e, t, n, r) {
  4761. return da(e, Zs(t, n, e), r)
  4762. }
  4763. function da(e, t, n = 1 / 0) {
  4764. return ae((e => I(e) && t(e)), ta(e, Se, t.shouldTestNextSiblings), !0, n)
  4765. }
  4766. function Ea(e, t, n) {
  4767. const r = (Array.isArray(e) ? e : [e]).filter(I);
  4768. if (0 === r.length) return r;
  4769. const i = Zs(t, n);
  4770. return i === Es ? r : r.filter(i)
  4771. }
  4772. var ma = function (e, t, n) {
  4773. if (n || 2 === arguments.length) for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
  4774. return e.concat(r || Array.prototype.slice.call(t))
  4775. }, Ta = /^\s*[~+]/;
  4776. function _a(e) {
  4777. return function (t) {
  4778. for (var n = [], r = 1; r < arguments.length; r++) n[r - 1] = arguments[r];
  4779. return function (r) {
  4780. var i, s = e(t, this);
  4781. return r && (s = xa(s, r, this.options.xmlMode, null === (i = this._root) || void 0 === i ? void 0 : i[0])), this._make(this.length > 1 && s.length > 1 ? n.reduce((function (e, t) {
  4782. return t(e)
  4783. }), s) : s)
  4784. }
  4785. }
  4786. }
  4787. var Aa = _a((function (e, t) {
  4788. for (var n, r = [], i = 0; i < t.length; i++) {
  4789. var s = e(t[i]);
  4790. r.push(s)
  4791. }
  4792. return (n = new Array).concat.apply(n, r)
  4793. })), ga = _a((function (e, t) {
  4794. for (var n = [], r = 0; r < t.length; r++) {
  4795. var i = e(t[r]);
  4796. null !== i && n.push(i)
  4797. }
  4798. return n
  4799. }));
  4800. function Na(e) {
  4801. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  4802. var r = null, i = _a((function (e, t) {
  4803. var n = [];
  4804. return Bi(t, (function (t) {
  4805. for (var i; (i = e(t)) && !(null == r ? void 0 : r(i, n.length)); t = i) n.push(i)
  4806. })), n
  4807. })).apply(void 0, ma([e], t, !1));
  4808. return function (e, t) {
  4809. var n = this;
  4810. r = "string" == typeof e ? function (t) {
  4811. return oa(t, e, n.options)
  4812. } : e ? Pa(e) : null;
  4813. var s = i.call(this, t);
  4814. return r = null, s
  4815. }
  4816. }
  4817. function Ca(e) {
  4818. return Array.from(new Set(e))
  4819. }
  4820. var Ia = ga((function (e) {
  4821. var t = e.parent;
  4822. return t && !L(t) ? t : null
  4823. }), Ca), Sa = Aa((function (e) {
  4824. for (var t = []; e.parent && !L(e.parent);) t.push(e.parent), e = e.parent;
  4825. return t
  4826. }), Ee, (function (e) {
  4827. return e.reverse()
  4828. })), ba = Na((function (e) {
  4829. var t = e.parent;
  4830. return t && !L(t) ? t : null
  4831. }), Ee, (function (e) {
  4832. return e.reverse()
  4833. }));
  4834. var Oa = ga((function (e) {
  4835. return ne(e)
  4836. })), ya = Aa((function (e) {
  4837. for (var t = []; e.next;) I(e = e.next) && t.push(e);
  4838. return t
  4839. }), Ca), La = Na((function (e) {
  4840. return ne(e)
  4841. }), Ca), ka = ga((function (e) {
  4842. return re(e)
  4843. })), va = Aa((function (e) {
  4844. for (var t = []; e.prev;) I(e = e.prev) && t.push(e);
  4845. return t
  4846. }), Ca), Da = Na((function (e) {
  4847. return re(e)
  4848. }), Ca), Ra = Aa((function (e) {
  4849. return te(e).filter((function (t) {
  4850. return I(t) && t !== e
  4851. }))
  4852. }), Ee), Ma = Aa((function (e) {
  4853. return Z(e).filter(I)
  4854. }), Ca);
  4855. function Pa(e) {
  4856. return "function" == typeof e ? function (t, n) {
  4857. return e.call(t, n, t)
  4858. } : wi(e) ? function (t) {
  4859. return Array.prototype.includes.call(e, t)
  4860. } : function (t) {
  4861. return e === t
  4862. }
  4863. }
  4864. function xa(e, t, n, r) {
  4865. return "string" == typeof t ? la(t, e, {xmlMode: n, root: r}) : e.filter(Pa(t))
  4866. }
  4867. var wa = Object.freeze({
  4868. __proto__: null,
  4869. find: function (e) {
  4870. var t;
  4871. if (!e) return this._make([]);
  4872. var n = this.toArray();
  4873. if ("string" != typeof e) {
  4874. var r = wi(e) ? e.toArray() : [e];
  4875. return this._make(r.filter((function (e) {
  4876. return n.some((function (t) {
  4877. return Di(t, e)
  4878. }))
  4879. })))
  4880. }
  4881. var i = Ta.test(e) ? n : this.children().toArray(), s = {
  4882. context: n,
  4883. root: null === (t = this._root) || void 0 === t ? void 0 : t[0],
  4884. xmlMode: this.options.xmlMode,
  4885. lowerCaseTags: this.options.lowerCaseTags,
  4886. lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,
  4887. pseudos: this.options.pseudos,
  4888. quirksMode: this.options.quirksMode
  4889. };
  4890. return this._make(function (e, t, n = {}, r = 1 / 0) {
  4891. if ("function" == typeof e) return da(t, e);
  4892. const [i, s] = ia(ps(e)), a = s.map((e => pa(t, e, n, !0, r)));
  4893. return i.length && a.push(fa(t, i, n, r)), 0 === a.length ? [] : 1 === a.length ? a[0] : Ee(a.reduce(((e, t) => [...e, ...t])))
  4894. }(e, i, s))
  4895. },
  4896. parent: Ia,
  4897. parents: Sa,
  4898. parentsUntil: ba,
  4899. closest: function (e) {
  4900. var t, n = [];
  4901. if (!e) return this._make(n);
  4902. var r = {xmlMode: this.options.xmlMode, root: null === (t = this._root) || void 0 === t ? void 0 : t[0]},
  4903. i = "string" == typeof e ? function (t) {
  4904. return oa(t, e, r)
  4905. } : Pa(e);
  4906. return Bi(this, (function (e) {
  4907. for (; e && I(e);) {
  4908. if (i(e, 0)) {
  4909. n.includes(e) || n.push(e);
  4910. break
  4911. }
  4912. e = e.parent
  4913. }
  4914. })), this._make(n)
  4915. },
  4916. next: Oa,
  4917. nextAll: ya,
  4918. nextUntil: La,
  4919. prev: ka,
  4920. prevAll: va,
  4921. prevUntil: Da,
  4922. siblings: Ra,
  4923. children: Ma,
  4924. contents: function () {
  4925. var e = this.toArray().reduce((function (e, t) {
  4926. return k(t) ? e.concat(t.children) : e
  4927. }), []);
  4928. return this._make(e)
  4929. },
  4930. each: function (e) {
  4931. for (var t = 0, n = this.length; t < n && !1 !== e.call(this[t], t, this[t]);) ++t;
  4932. return this
  4933. },
  4934. map: function (e) {
  4935. for (var t = [], n = 0; n < this.length; n++) {
  4936. var r = this[n], i = e.call(r, n, r);
  4937. null != i && (t = t.concat(i))
  4938. }
  4939. return this._make(t)
  4940. },
  4941. filter: function (e) {
  4942. var t;
  4943. return this._make(xa(this.toArray(), e, this.options.xmlMode, null === (t = this._root) || void 0 === t ? void 0 : t[0]))
  4944. },
  4945. filterArray: xa,
  4946. is: function (e) {
  4947. var t = this.toArray();
  4948. return "string" == typeof e ? ca(t.filter(I), e, this.options) : !!e && t.some(Pa(e))
  4949. },
  4950. not: function (e) {
  4951. var t = this.toArray();
  4952. if ("string" == typeof e) {
  4953. var n = new Set(la(e, t, this.options));
  4954. t = t.filter((function (e) {
  4955. return !n.has(e)
  4956. }))
  4957. } else {
  4958. var r = Pa(e);
  4959. t = t.filter((function (e, t) {
  4960. return !r(e, t)
  4961. }))
  4962. }
  4963. return this._make(t)
  4964. },
  4965. has: function (e) {
  4966. var t = this;
  4967. return this.filter("string" == typeof e ? ":has(".concat(e, ")") : function (n, r) {
  4968. return t._make(r).find(e).length > 0
  4969. })
  4970. },
  4971. first: function () {
  4972. return this.length > 1 ? this._make(this[0]) : this
  4973. },
  4974. last: function () {
  4975. return this.length > 0 ? this._make(this[this.length - 1]) : this
  4976. },
  4977. eq: function (e) {
  4978. var t;
  4979. return 0 === (e = +e) && this.length <= 1 ? this : (e < 0 && (e = this.length + e), this._make(null !== (t = this[e]) && void 0 !== t ? t : []))
  4980. },
  4981. get: function (e) {
  4982. return null == e ? this.toArray() : this[e < 0 ? this.length + e : e]
  4983. },
  4984. toArray: function () {
  4985. return Array.prototype.slice.call(this)
  4986. },
  4987. index: function (e) {
  4988. var t, n;
  4989. return null == e ? (t = this.parent().children(), n = this[0]) : "string" == typeof e ? (t = this._make(e), n = this[0]) : (t = this, n = wi(e) ? e[0] : e), Array.prototype.indexOf.call(t, n)
  4990. },
  4991. slice: function (e, t) {
  4992. return this._make(Array.prototype.slice.call(this, e, t))
  4993. },
  4994. end: function () {
  4995. var e;
  4996. return null !== (e = this.prevObject) && void 0 !== e ? e : this._make([])
  4997. },
  4998. add: function (e, t) {
  4999. var n = this._make(e, t), r = Ee(ma(ma([], this.get(), !0), n.get(), !0));
  5000. return this._make(r)
  5001. },
  5002. addBack: function (e) {
  5003. return this.prevObject ? this.add(e ? this.prevObject.filter(e) : this.prevObject) : this
  5004. }
  5005. });
  5006. function Ba(e, t) {
  5007. var n = Array.isArray(e) ? e : [e];
  5008. t ? t.children = n : t = null;
  5009. for (var r = 0; r < n.length; r++) {
  5010. var i = n[r];
  5011. i.parent && i.parent.children !== n && ie(i), t ? (i.prev = n[r - 1] || null, i.next = n[r + 1] || null) : i.prev = i.next = null, i.parent = t
  5012. }
  5013. return t
  5014. }
  5015. var Fa = function (e, t, n) {
  5016. if (n || 2 === arguments.length) for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
  5017. return e.concat(r || Array.prototype.slice.call(t))
  5018. };
  5019. function Ua(e) {
  5020. return function () {
  5021. for (var t = this, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
  5022. var i = this.length - 1;
  5023. return Bi(this, (function (r, s) {
  5024. if (k(r)) {
  5025. var a = "function" == typeof n[0] ? n[0].call(r, s, t._render(r.children)) : n,
  5026. o = t._makeDomArray(a, s < i);
  5027. e(o, r.children, r)
  5028. }
  5029. }))
  5030. }
  5031. }
  5032. function Ha(e, t, n, r, i) {
  5033. for (var s, a, o = Fa([t, n], r, !0), c = 0 === t ? null : e[t - 1], l = t + n >= e.length ? null : e[t + n], h = 0; h < r.length; ++h) {
  5034. var u = r[h], p = u.parent;
  5035. if (p) {
  5036. var f = p.children.indexOf(u);
  5037. f > -1 && (p.children.splice(f, 1), i === p && t > f && o[0]--)
  5038. }
  5039. u.parent = i, u.prev && (u.prev.next = null !== (s = u.next) && void 0 !== s ? s : null), u.next && (u.next.prev = null !== (a = u.prev) && void 0 !== a ? a : null), u.prev = 0 === h ? c : r[h - 1], u.next = h === r.length - 1 ? l : r[h + 1]
  5040. }
  5041. return c && (c.next = r[0]), l && (l.prev = r[r.length - 1]), e.splice.apply(e, o)
  5042. }
  5043. var Ga = Ua((function (e, t, n) {
  5044. Ha(t, t.length, 0, e, n)
  5045. })), Ya = Ua((function (e, t, n) {
  5046. Ha(t, 0, 0, e, n)
  5047. }));
  5048. function qa(e) {
  5049. return function (t) {
  5050. for (var n = this.length - 1, r = this.parents().last(), i = 0; i < this.length; i++) {
  5051. var s = this[i],
  5052. a = "function" == typeof t ? t.call(s, i, s) : "string" != typeof t || Ui(t) ? t : r.find(t).clone(),
  5053. o = this._makeDomArray(a, i < n)[0];
  5054. if (o && k(o)) {
  5055. for (var c = o, l = 0; l < c.children.length;) {
  5056. var h = c.children[l];
  5057. I(h) ? (c = h, l = 0) : l++
  5058. }
  5059. e(s, c, [o])
  5060. }
  5061. }
  5062. return this
  5063. }
  5064. }
  5065. var Ka = qa((function (e, t, n) {
  5066. var r = e.parent;
  5067. if (r) {
  5068. var i = r.children, s = i.indexOf(e);
  5069. Ba([e], t), Ha(i, s, 0, n, r)
  5070. }
  5071. })), ja = qa((function (e, t, n) {
  5072. k(e) && (Ba(e.children, t), Ba(n, e))
  5073. }));
  5074. var Va = Object.freeze({
  5075. __proto__: null, _makeDomArray: function (e, t) {
  5076. var n = this;
  5077. return null == e ? [] : wi(e) ? t ? Fi(e.get()) : e.get() : Array.isArray(e) ? e.reduce((function (e, r) {
  5078. return e.concat(n._makeDomArray(r, t))
  5079. }), []) : "string" == typeof e ? this._parse(e, this.options, !1, null).children : t ? Fi([e]) : [e]
  5080. }, appendTo: function (e) {
  5081. return (wi(e) ? e : this._make(e)).append(this), this
  5082. }, prependTo: function (e) {
  5083. return (wi(e) ? e : this._make(e)).prepend(this), this
  5084. }, append: Ga, prepend: Ya, wrap: Ka, wrapInner: ja, unwrap: function (e) {
  5085. var t = this;
  5086. return this.parent(e).not("body").each((function (e, n) {
  5087. t._make(n).replaceWith(n.children)
  5088. })), this
  5089. }, wrapAll: function (e) {
  5090. var t = this[0];
  5091. if (t) {
  5092. for (var n = this._make("function" == typeof e ? e.call(t, 0, t) : e).insertBefore(t), r = void 0, i = 0; i < n.length; i++) "tag" === n[i].type && (r = n[i]);
  5093. for (var s = 0; r && s < r.children.length;) {
  5094. var a = r.children[s];
  5095. "tag" === a.type ? (r = a, s = 0) : s++
  5096. }
  5097. r && this._make(r).append(this)
  5098. }
  5099. return this
  5100. }, after: function () {
  5101. for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  5102. var r = this.length - 1;
  5103. return Bi(this, (function (n, i) {
  5104. var s = n.parent;
  5105. if (k(n) && s) {
  5106. var a = s.children, o = a.indexOf(n);
  5107. if (!(o < 0)) {
  5108. var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t;
  5109. Ha(a, o + 1, 0, e._makeDomArray(c, i < r), s)
  5110. }
  5111. }
  5112. }))
  5113. }, insertAfter: function (e) {
  5114. var t = this;
  5115. "string" == typeof e && (e = this._make(e)), this.remove();
  5116. var n = [];
  5117. return this._makeDomArray(e).forEach((function (e) {
  5118. var r = t.clone().toArray(), i = e.parent;
  5119. if (i) {
  5120. var s = i.children, a = s.indexOf(e);
  5121. a < 0 || (Ha(s, a + 1, 0, r, i), n.push.apply(n, r))
  5122. }
  5123. })), this._make(n)
  5124. }, before: function () {
  5125. for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  5126. var r = this.length - 1;
  5127. return Bi(this, (function (n, i) {
  5128. var s = n.parent;
  5129. if (k(n) && s) {
  5130. var a = s.children, o = a.indexOf(n);
  5131. if (!(o < 0)) {
  5132. var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t;
  5133. Ha(a, o, 0, e._makeDomArray(c, i < r), s)
  5134. }
  5135. }
  5136. }))
  5137. }, insertBefore: function (e) {
  5138. var t = this, n = this._make(e);
  5139. this.remove();
  5140. var r = [];
  5141. return Bi(n, (function (e) {
  5142. var n = t.clone().toArray(), i = e.parent;
  5143. if (i) {
  5144. var s = i.children, a = s.indexOf(e);
  5145. a < 0 || (Ha(s, a, 0, n, i), r.push.apply(r, n))
  5146. }
  5147. })), this._make(r)
  5148. }, remove: function (e) {
  5149. return Bi(e ? this.filter(e) : this, (function (e) {
  5150. ie(e), e.prev = e.next = e.parent = null
  5151. })), this
  5152. }, replaceWith: function (e) {
  5153. var t = this;
  5154. return Bi(this, (function (n, r) {
  5155. var i = n.parent;
  5156. if (i) {
  5157. var s = i.children, a = "function" == typeof e ? e.call(n, r, n) : e, o = t._makeDomArray(a);
  5158. Ba(o, null);
  5159. var c = s.indexOf(n);
  5160. Ha(s, c, 1, o, i), o.includes(n) || (n.parent = n.prev = n.next = null)
  5161. }
  5162. }))
  5163. }, empty: function () {
  5164. return Bi(this, (function (e) {
  5165. k(e) && (e.children.forEach((function (e) {
  5166. e.next = e.prev = e.parent = null
  5167. })), e.children.length = 0)
  5168. }))
  5169. }, html: function (e) {
  5170. var t = this;
  5171. if (void 0 === e) {
  5172. var n = this[0];
  5173. return n && k(n) ? this._render(n.children) : null
  5174. }
  5175. return Bi(this, (function (n) {
  5176. k(n) && (n.children.forEach((function (e) {
  5177. e.next = e.prev = e.parent = null
  5178. })), Ba(wi(e) ? e.toArray() : t._parse("".concat(e), t.options, !1, n).children, n))
  5179. }))
  5180. }, toString: function () {
  5181. return this._render(this)
  5182. }, text: function (e) {
  5183. var t = this;
  5184. return void 0 === e ? Li(this) : Bi(this, "function" == typeof e ? function (n, r) {
  5185. return t._make(n).text(e.call(n, r, Li([n])))
  5186. } : function (t) {
  5187. k(t) && (t.children.forEach((function (e) {
  5188. e.next = e.prev = e.parent = null
  5189. })), Ba(new m("".concat(e)), t))
  5190. })
  5191. }, clone: function () {
  5192. return this._make(Fi(this.get()))
  5193. }
  5194. });
  5195. function Wa(e, t, n, r) {
  5196. if ("string" == typeof t) {
  5197. var i = Qa(e), s = "function" == typeof n ? n.call(e, r, i[t]) : n;
  5198. "" === s ? delete i[t] : null != s && (i[t] = s), e.attribs.style = (a = i, Object.keys(a).reduce((function (e, t) {
  5199. return "".concat(e).concat(e ? " " : "").concat(t, ": ").concat(a[t], ";")
  5200. }), ""))
  5201. } else "object" == typeof t && Object.keys(t).forEach((function (n, r) {
  5202. Wa(e, n, t[n], r)
  5203. }));
  5204. var a
  5205. }
  5206. function Qa(e, t) {
  5207. if (e && I(e)) {
  5208. var n = function (e) {
  5209. if (!(e = (e || "").trim())) return {};
  5210. for (var t, n = {}, r = 0, i = e.split(";"); r < i.length; r++) {
  5211. var s = i[r], a = s.indexOf(":");
  5212. if (a < 1 || a === s.length - 1) {
  5213. var o = s.trimEnd();
  5214. o.length > 0 && void 0 !== t && (n[t] += ";".concat(o))
  5215. } else n[t = s.slice(0, a).trim()] = s.slice(a + 1).trim()
  5216. }
  5217. return n
  5218. }(e.attribs.style);
  5219. if ("string" == typeof t) return n[t];
  5220. if (Array.isArray(t)) {
  5221. var r = {};
  5222. return t.forEach((function (e) {
  5223. null != n[e] && (r[e] = n[e])
  5224. })), r
  5225. }
  5226. return n
  5227. }
  5228. }
  5229. var Xa = Object.freeze({
  5230. __proto__: null, css: function (e, t) {
  5231. return null != e && null != t || "object" == typeof e && !Array.isArray(e) ? Bi(this, (function (n, r) {
  5232. I(n) && Wa(n, e, t, r)
  5233. })) : 0 !== this.length ? Qa(this[0], e) : void 0
  5234. }
  5235. }), $a = /%20/g, za = /\r?\n/g;
  5236. var Ja = Object.freeze({
  5237. __proto__: null, serialize: function () {
  5238. var e = this.serializeArray().map((function (e) {
  5239. return "".concat(encodeURIComponent(e.name), "=").concat(encodeURIComponent(e.value))
  5240. }));
  5241. return e.join("&").replace($a, "+")
  5242. }, serializeArray: function () {
  5243. var e = this;
  5244. return this.map((function (t, n) {
  5245. var r = e._make(n);
  5246. return I(n) && "form" === n.name ? r.find("input,select,textarea,keygen").toArray() : r.filter("input,select,textarea,keygen").toArray()
  5247. })).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function (t, n) {
  5248. var r, i = e._make(n), s = i.attr("name"), a = null !== (r = i.val()) && void 0 !== r ? r : "";
  5249. return Array.isArray(a) ? a.map((function (e) {
  5250. return {name: s, value: e.replace(za, "\r\n")}
  5251. })) : {name: s, value: a.replace(za, "\r\n")}
  5252. })).toArray()
  5253. }
  5254. }), Za = function (e, t, n) {
  5255. if (this.length = 0, this.options = n, this._root = t, e) {
  5256. for (var r = 0; r < e.length; r++) this[r] = e[r];
  5257. this.length = e.length
  5258. }
  5259. };
  5260. Za.prototype.cheerio = "[cheerio object]", Za.prototype.splice = Array.prototype.splice, Za.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator], Object.assign(Za.prototype, ts, wa, Va, Xa, Ja);
  5261. var eo, to = (eo = function (e, t) {
  5262. return eo = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (e, t) {
  5263. e.__proto__ = t
  5264. } || function (e, t) {
  5265. for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n])
  5266. }, eo(e, t)
  5267. }, function (e, t) {
  5268. if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
  5269. function n() {
  5270. this.constructor = e
  5271. }
  5272. eo(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
  5273. }), no = function () {
  5274. return no = Object.assign || function (e) {
  5275. for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  5276. return e
  5277. }, no.apply(this, arguments)
  5278. };
  5279. const ro = new Set([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]);
  5280. var io;
  5281. !function (e) {
  5282. e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.NUMBER_SIGN = 35] = "NUMBER_SIGN", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_F = 70] = "LATIN_CAPITAL_F", e[e.LATIN_CAPITAL_X = 88] = "LATIN_CAPITAL_X", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_F = 102] = "LATIN_SMALL_F", e[e.LATIN_SMALL_X = 120] = "LATIN_SMALL_X", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z", e[e.REPLACEMENT_CHARACTER = 65533] = "REPLACEMENT_CHARACTER"
  5283. }(io = io || (io = {}));
  5284. const so = "--", ao = "[CDATA[", oo = "doctype", co = "script", lo = "public", ho = "system";
  5285. function uo(e) {
  5286. return e >= 55296 && e <= 57343
  5287. }
  5288. function po(e) {
  5289. return 32 !== e && 10 !== e && 13 !== e && 9 !== e && 12 !== e && e >= 1 && e <= 31 || e >= 127 && e <= 159
  5290. }
  5291. function fo(e) {
  5292. return e >= 64976 && e <= 65007 || ro.has(e)
  5293. }
  5294. var Eo;
  5295. !function (e) {
  5296. e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text"
  5297. }(Eo = Eo || (Eo = {}));
  5298. class mo {
  5299. constructor(e) {
  5300. this.handler = e, this.html = "", this.pos = -1, this.lastGapPos = -2, this.gapStack = [], this.skipNextNewLine = !1, this.lastChunkWritten = !1, this.endOfChunkHit = !1, this.bufferWaterline = 65536, this.isEol = !1, this.lineStartPos = 0, this.droppedBufferSize = 0, this.line = 1, this.lastErrOffset = -1
  5301. }
  5302. get col() {
  5303. return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos)
  5304. }
  5305. get offset() {
  5306. return this.droppedBufferSize + this.pos
  5307. }
  5308. getError(e) {
  5309. const {line: t, col: n, offset: r} = this;
  5310. return {code: e, startLine: t, endLine: t, startCol: n, endCol: n, startOffset: r, endOffset: r}
  5311. }
  5312. _err(e) {
  5313. this.handler.onParseError && this.lastErrOffset !== this.offset && (this.lastErrOffset = this.offset, this.handler.onParseError(this.getError(e)))
  5314. }
  5315. _addGap() {
  5316. this.gapStack.push(this.lastGapPos), this.lastGapPos = this.pos
  5317. }
  5318. _processSurrogate(e) {
  5319. if (this.pos !== this.html.length - 1) {
  5320. const t = this.html.charCodeAt(this.pos + 1);
  5321. if (function (e) {
  5322. return e >= 56320 && e <= 57343
  5323. }(t)) return this.pos++, this._addGap(), 1024 * (e - 55296) + 9216 + t
  5324. } else if (!this.lastChunkWritten) return this.endOfChunkHit = !0, io.EOF;
  5325. return this._err(Eo.surrogateInInputStream), e
  5326. }
  5327. willDropParsedChunk() {
  5328. return this.pos > this.bufferWaterline
  5329. }
  5330. dropParsedChunk() {
  5331. this.willDropParsedChunk() && (this.html = this.html.substring(this.pos), this.lineStartPos -= this.pos, this.droppedBufferSize += this.pos, this.pos = 0, this.lastGapPos = -2, this.gapStack.length = 0)
  5332. }
  5333. write(e, t) {
  5334. this.html.length > 0 ? this.html += e : this.html = e, this.endOfChunkHit = !1, this.lastChunkWritten = t
  5335. }
  5336. insertHtmlAtCurrentPos(e) {
  5337. this.html = this.html.substring(0, this.pos + 1) + e + this.html.substring(this.pos + 1), this.endOfChunkHit = !1
  5338. }
  5339. startsWith(e, t) {
  5340. if (this.pos + e.length > this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, !1;
  5341. if (t) return this.html.startsWith(e, this.pos);
  5342. for (let t = 0; t < e.length; t++) {
  5343. if ((32 | this.html.charCodeAt(this.pos + t)) !== e.charCodeAt(t)) return !1
  5344. }
  5345. return !0
  5346. }
  5347. peek(e) {
  5348. const t = this.pos + e;
  5349. return t >= this.html.length ? (this.endOfChunkHit = !this.lastChunkWritten, io.EOF) : this.html.charCodeAt(t)
  5350. }
  5351. advance() {
  5352. if (this.pos++, this.isEol && (this.isEol = !1, this.line++, this.lineStartPos = this.pos), this.pos >= this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, io.EOF;
  5353. let e = this.html.charCodeAt(this.pos);
  5354. if (e === io.CARRIAGE_RETURN) return this.isEol = !0, this.skipNextNewLine = !0, io.LINE_FEED;
  5355. if (e === io.LINE_FEED && (this.isEol = !0, this.skipNextNewLine)) return this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance();
  5356. this.skipNextNewLine = !1, uo(e) && (e = this._processSurrogate(e));
  5357. return null === this.handler.onParseError || e > 31 && e < 127 || e === io.LINE_FEED || e === io.CARRIAGE_RETURN || e > 159 && e < 64976 || this._checkForProblematicCharacters(e), e
  5358. }
  5359. _checkForProblematicCharacters(e) {
  5360. po(e) ? this._err(Eo.controlCharacterInInputStream) : fo(e) && this._err(Eo.noncharacterInInputStream)
  5361. }
  5362. retreat(e) {
  5363. for (this.pos -= e; this.pos < this.lastGapPos;) this.lastGapPos = this.gapStack.pop(), this.pos--;
  5364. this.isEol = !1
  5365. }
  5366. }
  5367. var To;
  5368. function _o(e, t) {
  5369. for (let n = e.attrs.length - 1; n >= 0; n--) if (e.attrs[n].name === t) return e.attrs[n].value;
  5370. return null
  5371. }
  5372. !function (e) {
  5373. e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION"
  5374. }(To = To || (To = {}));
  5375. var Ao = Ke((function (e, t) {
  5376. Object.defineProperty(t, "__esModule", {value: !0}), t.default = new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function (e) {
  5377. return e.charCodeAt(0)
  5378. })))
  5379. }));
  5380. qe(Ao);
  5381. var go = Ke((function (e, t) {
  5382. Object.defineProperty(t, "__esModule", {value: !0}), t.default = new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function (e) {
  5383. return e.charCodeAt(0)
  5384. })))
  5385. }));
  5386. qe(go);
  5387. var No = Ke((function (e, t) {
  5388. var n;
  5389. Object.defineProperty(t, "__esModule", {value: !0}), t.replaceCodePoint = t.fromCodePoint = void 0;
  5390. var r = new Map([[0, 65533], [128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376]]);
  5391. function i(e) {
  5392. var t;
  5393. return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : null !== (t = r.get(e)) && void 0 !== t ? t : e
  5394. }
  5395. t.fromCodePoint = null !== (n = String.fromCodePoint) && void 0 !== n ? n : function (e) {
  5396. var t = "";
  5397. return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += String.fromCharCode(e)
  5398. }, t.replaceCodePoint = i, t.default = function (e) {
  5399. return (0, t.fromCodePoint)(i(e))
  5400. }
  5401. }));
  5402. qe(No), No.replaceCodePoint, No.fromCodePoint;
  5403. var Co = Ao, Io = go, So = No, bo = Ke((function (e, t) {
  5404. var n = Ge && Ge.__importDefault || function (e) {
  5405. return e && e.__esModule ? e : {default: e}
  5406. };
  5407. Object.defineProperty(t, "__esModule", {value: !0}), t.decodeXML = t.decodeHTMLStrict = t.decodeHTML = t.determineBranch = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0;
  5408. var r = n(Co);
  5409. t.htmlDecodeTree = r.default;
  5410. var i = n(Io);
  5411. t.xmlDecodeTree = i.default;
  5412. var s = n(So);
  5413. t.decodeCodePoint = s.default;
  5414. var a, o, c = So;
  5415. function l(e) {
  5416. return function (t, n) {
  5417. for (var r = "", i = 0, c = 0; (c = t.indexOf("&", c)) >= 0;) if (r += t.slice(i, c), i = c, c += 1, t.charCodeAt(c) !== a.NUM) {
  5418. for (var l = 0, u = 1, p = 0, f = e[p]; c < t.length && !((p = h(e, f, p + 1, t.charCodeAt(c))) < 0); c++, u++) {
  5419. var d = (f = e[p]) & o.VALUE_LENGTH;
  5420. if (d) {
  5421. var E;
  5422. if (n && t.charCodeAt(c) !== a.SEMI || (l = p, u = 0), 0 === (E = (d >> 14) - 1)) break;
  5423. p += E
  5424. }
  5425. }
  5426. if (0 !== l) r += 1 === (E = (e[l] & o.VALUE_LENGTH) >> 14) ? String.fromCharCode(e[l] & ~o.VALUE_LENGTH) : 2 === E ? String.fromCharCode(e[l + 1]) : String.fromCharCode(e[l + 1], e[l + 2]), i = c - u + 1
  5427. } else {
  5428. var m = c + 1, T = 10, _ = t.charCodeAt(m);
  5429. (_ | a.To_LOWER_BIT) === a.LOWER_X && (T = 16, c += 1, m += 1);
  5430. do {
  5431. _ = t.charCodeAt(++c)
  5432. } while (_ >= a.ZERO && _ <= a.NINE || 16 === T && (_ | a.To_LOWER_BIT) >= a.LOWER_A && (_ | a.To_LOWER_BIT) <= a.LOWER_F);
  5433. if (m !== c) {
  5434. var A = t.substring(m, c), g = parseInt(A, T);
  5435. if (t.charCodeAt(c) === a.SEMI) c += 1; else if (n) continue;
  5436. r += (0, s.default)(g), i = c
  5437. }
  5438. }
  5439. return r + t.slice(i)
  5440. }
  5441. }
  5442. function h(e, t, n, r) {
  5443. var i = (t & o.BRANCH_LENGTH) >> 7, s = t & o.JUMP_TABLE;
  5444. if (0 === i) return 0 !== s && r === s ? n : -1;
  5445. if (s) {
  5446. var a = r - s;
  5447. return a < 0 || a >= i ? -1 : e[n + a] - 1
  5448. }
  5449. for (var c = n, l = c + i - 1; c <= l;) {
  5450. var h = c + l >>> 1, u = e[h];
  5451. if (u < r) c = h + 1; else {
  5452. if (!(u > r)) return e[h + i];
  5453. l = h - 1
  5454. }
  5455. }
  5456. return -1
  5457. }
  5458. Object.defineProperty(t, "replaceCodePoint", {
  5459. enumerable: !0, get: function () {
  5460. return c.replaceCodePoint
  5461. }
  5462. }), Object.defineProperty(t, "fromCodePoint", {
  5463. enumerable: !0, get: function () {
  5464. return c.fromCodePoint
  5465. }
  5466. }), function (e) {
  5467. e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.To_LOWER_BIT = 32] = "To_LOWER_BIT"
  5468. }(a || (a = {})), function (e) {
  5469. e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE"
  5470. }(o = t.BinTrieFlags || (t.BinTrieFlags = {})), t.determineBranch = h;
  5471. var u = l(r.default), p = l(i.default);
  5472. t.decodeHTML = function (e) {
  5473. return u(e, !1)
  5474. }, t.decodeHTMLStrict = function (e) {
  5475. return u(e, !0)
  5476. }, t.decodeXML = function (e) {
  5477. return p(e, !0)
  5478. }
  5479. }));
  5480. qe(bo), bo.decodeXML, bo.decodeHTMLStrict, bo.decodeHTML;
  5481. var Oo = bo.determineBranch, yo = bo.BinTrieFlags, Lo = bo.fromCodePoint, ko = bo.replaceCodePoint;
  5482. bo.decodeCodePoint;
  5483. var vo, Do, Ro, Mo, Po, xo = bo.xmlDecodeTree, wo = bo.htmlDecodeTree;
  5484. !function (e) {
  5485. e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/"
  5486. }(vo = vo || (vo = {})), function (e) {
  5487. e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size"
  5488. }(Do = Do || (Do = {})), function (e) {
  5489. e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks"
  5490. }(Ro = Ro || (Ro = {})), function (e) {
  5491. e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style",e.SUB = "sub",e.SUMMARY = "summary",e.SUP = "sup",e.TABLE = "table",e.TBODY = "tbody",e.TEMPLATE = "template",e.TEXTAREA = "textarea",e.TFOOT = "tfoot",e.TD = "td",e.TH = "th",e.THEAD = "thead",e.TITLE = "title",e.TR = "tr",e.TRACK = "track",e.TT = "tt",e.U = "u",e.UL = "ul",e.SVG = "svg",e.VAR = "var",e.WBR = "wbr",e.XMP = "xmp"
  5492. }(Mo = Mo || (Mo = {})), function (e) {
  5493. e[e.UNKNOWN = 0] = "UNKNOWN", e[e.A = 1] = "A", e[e.ADDRESS = 2] = "ADDRESS", e[e.ANNOTATION_XML = 3] = "ANNOTATION_XML", e[e.APPLET = 4] = "APPLET", e[e.AREA = 5] = "AREA", e[e.ARTICLE = 6] = "ARTICLE", e[e.ASIDE = 7] = "ASIDE", e[e.B = 8] = "B", e[e.BASE = 9] = "BASE", e[e.BASEFONT = 10] = "BASEFONT", e[e.BGSOUND = 11] = "BGSOUND", e[e.BIG = 12] = "BIG", e[e.BLOCKQUOTE = 13] = "BLOCKQUOTE", e[e.BODY = 14] = "BODY", e[e.BR = 15] = "BR", e[e.BUTTON = 16] = "BUTTON", e[e.CAPTION = 17] = "CAPTION", e[e.CENTER = 18] = "CENTER", e[e.CODE = 19] = "CODE", e[e.COL = 20] = "COL", e[e.COLGROUP = 21] = "COLGROUP", e[e.DD = 22] = "DD", e[e.DESC = 23] = "DESC", e[e.DETAILS = 24] = "DETAILS", e[e.DIALOG = 25] = "DIALOG", e[e.DIR = 26] = "DIR", e[e.DIV = 27] = "DIV", e[e.DL = 28] = "DL", e[e.DT = 29] = "DT", e[e.EM = 30] = "EM", e[e.EMBED = 31] = "EMBED", e[e.FIELDSET = 32] = "FIELDSET", e[e.FIGCAPTION = 33] = "FIGCAPTION", e[e.FIGURE = 34] = "FIGURE", e[e.FONT = 35] = "FONT", e[e.FOOTER = 36] = "FOOTER", e[e.FOREIGN_OBJECT = 37] = "FOREIGN_OBJECT", e[e.FORM = 38] = "FORM", e[e.FRAME = 39] = "FRAME", e[e.FRAMESET = 40] = "FRAMESET", e[e.H1 = 41] = "H1", e[e.H2 = 42] = "H2", e[e.H3 = 43] = "H3", e[e.H4 = 44] = "H4", e[e.H5 = 45] = "H5", e[e.H6 = 46] = "H6", e[e.HEAD = 47] = "HEAD", e[e.HEADER = 48] = "HEADER", e[e.HGROUP = 49] = "HGROUP", e[e.HR = 50] = "HR", e[e.HTML = 51] = "HTML", e[e.I = 52] = "I", e[e.IMG = 53] = "IMG", e[e.IMAGE = 54] = "IMAGE", e[e.INPUT = 55] = "INPUT", e[e.IFRAME = 56] = "IFRAME", e[e.KEYGEN = 57] = "KEYGEN", e[e.LABEL = 58] = "LABEL", e[e.LI = 59] = "LI", e[e.LINK = 60] = "LINK", e[e.LISTING = 61] = "LISTING", e[e.MAIN = 62] = "MAIN", e[e.MALIGNMARK = 63] = "MALIGNMARK", e[e.MARQUEE = 64] = "MARQUEE", e[e.MATH = 65] = "MATH", e[e.MENU = 66] = "MENU", e[e.META = 67] = "META", e[e.MGLYPH = 68] = "MGLYPH", e[e.MI = 69] = "MI", e[e.MO = 70] = "MO", e[e.MN = 71] = "MN", e[e.MS = 72] = "MS", e[e.MTEXT = 73] = "MTEXT", e[e.NAV = 74] = "NAV", e[e.NOBR = 75] = "NOBR", e[e.NOFRAMES = 76] = "NOFRAMES", e[e.NOEMBED = 77] = "NOEMBED", e[e.NOSCRIPT = 78] = "NOSCRIPT", e[e.OBJECT = 79] = "OBJECT", e[e.OL = 80] = "OL", e[e.OPTGROUP = 81] = "OPTGROUP", e[e.OPTION = 82] = "OPTION", e[e.P = 83] = "P", e[e.PARAM = 84] = "PARAM", e[e.PLAINTEXT = 85] = "PLAINTEXT", e[e.PRE = 86] = "PRE", e[e.RB = 87] = "RB", e[e.RP = 88] = "RP", e[e.RT = 89] = "RT", e[e.RTC = 90] = "RTC", e[e.RUBY = 91] = "RUBY", e[e.S = 92] = "S", e[e.SCRIPT = 93] = "SCRIPT", e[e.SECTION = 94] = "SECTION", e[e.SELECT = 95] = "SELECT", e[e.SOURCE = 96] = "SOURCE", e[e.SMALL = 97] = "SMALL", e[e.SPAN = 98] = "SPAN", e[e.STRIKE = 99] = "STRIKE", e[e.STRONG = 100] = "STRONG",e[e.STYLE = 101] = "STYLE",e[e.SUB = 102] = "SUB",e[e.SUMMARY = 103] = "SUMMARY",e[e.SUP = 104] = "SUP",e[e.TABLE = 105] = "TABLE",e[e.TBODY = 106] = "TBODY",e[e.TEMPLATE = 107] = "TEMPLATE",e[e.TEXTAREA = 108] = "TEXTAREA",e[e.TFOOT = 109] = "TFOOT",e[e.TD = 110] = "TD",e[e.TH = 111] = "TH",e[e.THEAD = 112] = "THEAD",e[e.TITLE = 113] = "TITLE",e[e.TR = 114] = "TR",e[e.TRACK = 115] = "TRACK",e[e.TT = 116] = "TT",e[e.U = 117] = "U",e[e.UL = 118] = "UL",e[e.SVG = 119] = "SVG",e[e.VAR = 120] = "VAR",e[e.WBR = 121] = "WBR",e[e.XMP = 122] = "XMP"
  5494. }(Po = Po || (Po = {}));
  5495. const Bo = new Map([[Mo.A, Po.A], [Mo.ADDRESS, Po.ADDRESS], [Mo.ANNOTATION_XML, Po.ANNOTATION_XML], [Mo.APPLET, Po.APPLET], [Mo.AREA, Po.AREA], [Mo.ARTICLE, Po.ARTICLE], [Mo.ASIDE, Po.ASIDE], [Mo.B, Po.B], [Mo.BASE, Po.BASE], [Mo.BASEFONT, Po.BASEFONT], [Mo.BGSOUND, Po.BGSOUND], [Mo.BIG, Po.BIG], [Mo.BLOCKQUOTE, Po.BLOCKQUOTE], [Mo.BODY, Po.BODY], [Mo.BR, Po.BR], [Mo.BUTTON, Po.BUTTON], [Mo.CAPTION, Po.CAPTION], [Mo.CENTER, Po.CENTER], [Mo.CODE, Po.CODE], [Mo.COL, Po.COL], [Mo.COLGROUP, Po.COLGROUP], [Mo.DD, Po.DD], [Mo.DESC, Po.DESC], [Mo.DETAILS, Po.DETAILS], [Mo.DIALOG, Po.DIALOG], [Mo.DIR, Po.DIR], [Mo.DIV, Po.DIV], [Mo.DL, Po.DL], [Mo.DT, Po.DT], [Mo.EM, Po.EM], [Mo.EMBED, Po.EMBED], [Mo.FIELDSET, Po.FIELDSET], [Mo.FIGCAPTION, Po.FIGCAPTION], [Mo.FIGURE, Po.FIGURE], [Mo.FONT, Po.FONT], [Mo.FOOTER, Po.FOOTER], [Mo.FOREIGN_OBJECT, Po.FOREIGN_OBJECT], [Mo.FORM, Po.FORM], [Mo.FRAME, Po.FRAME], [Mo.FRAMESET, Po.FRAMESET], [Mo.H1, Po.H1], [Mo.H2, Po.H2], [Mo.H3, Po.H3], [Mo.H4, Po.H4], [Mo.H5, Po.H5], [Mo.H6, Po.H6], [Mo.HEAD, Po.HEAD], [Mo.HEADER, Po.HEADER], [Mo.HGROUP, Po.HGROUP], [Mo.HR, Po.HR], [Mo.HTML, Po.HTML], [Mo.I, Po.I], [Mo.IMG, Po.IMG], [Mo.IMAGE, Po.IMAGE], [Mo.INPUT, Po.INPUT], [Mo.IFRAME, Po.IFRAME], [Mo.KEYGEN, Po.KEYGEN], [Mo.LABEL, Po.LABEL], [Mo.LI, Po.LI], [Mo.LINK, Po.LINK], [Mo.LISTING, Po.LISTING], [Mo.MAIN, Po.MAIN], [Mo.MALIGNMARK, Po.MALIGNMARK], [Mo.MARQUEE, Po.MARQUEE], [Mo.MATH, Po.MATH], [Mo.MENU, Po.MENU], [Mo.META, Po.META], [Mo.MGLYPH, Po.MGLYPH], [Mo.MI, Po.MI], [Mo.MO, Po.MO], [Mo.MN, Po.MN], [Mo.MS, Po.MS], [Mo.MTEXT, Po.MTEXT], [Mo.NAV, Po.NAV], [Mo.NOBR, Po.NOBR], [Mo.NOFRAMES, Po.NOFRAMES], [Mo.NOEMBED, Po.NOEMBED], [Mo.NOSCRIPT, Po.NOSCRIPT], [Mo.OBJECT, Po.OBJECT], [Mo.OL, Po.OL], [Mo.OPTGROUP, Po.OPTGROUP], [Mo.OPTION, Po.OPTION], [Mo.P, Po.P], [Mo.PARAM, Po.PARAM], [Mo.PLAINTEXT, Po.PLAINTEXT], [Mo.PRE, Po.PRE], [Mo.RB, Po.RB], [Mo.RP, Po.RP], [Mo.RT, Po.RT], [Mo.RTC, Po.RTC], [Mo.RUBY, Po.RUBY], [Mo.S, Po.S], [Mo.SCRIPT, Po.SCRIPT], [Mo.SECTION, Po.SECTION], [Mo.SELECT, Po.SELECT], [Mo.SOURCE, Po.SOURCE], [Mo.SMALL, Po.SMALL], [Mo.SPAN, Po.SPAN], [Mo.STRIKE, Po.STRIKE], [Mo.STRONG, Po.STRONG], [Mo.STYLE, Po.STYLE], [Mo.SUB, Po.SUB], [Mo.SUMMARY, Po.SUMMARY], [Mo.SUP, Po.SUP], [Mo.TABLE, Po.TABLE], [Mo.TBODY, Po.TBODY], [Mo.TEMPLATE, Po.TEMPLATE], [Mo.TEXTAREA, Po.TEXTAREA], [Mo.TFOOT, Po.TFOOT], [Mo.TD, Po.TD], [Mo.TH, Po.TH], [Mo.THEAD, Po.THEAD], [Mo.TITLE, Po.TITLE], [Mo.TR, Po.TR], [Mo.TRACK, Po.TRACK], [Mo.TT, Po.TT], [Mo.U, Po.U], [Mo.UL, Po.UL], [Mo.SVG, Po.SVG], [Mo.VAR, Po.VAR], [Mo.WBR, Po.WBR], [Mo.XMP, Po.XMP]]);
  5496. function Fo(e) {
  5497. var t;
  5498. return null !== (t = Bo.get(e)) && void 0 !== t ? t : Po.UNKNOWN
  5499. }
  5500. const Uo = Po, Ho = {
  5501. [vo.HTML]: new Set([Uo.ADDRESS, Uo.APPLET, Uo.AREA, Uo.ARTICLE, Uo.ASIDE, Uo.BASE, Uo.BASEFONT, Uo.BGSOUND, Uo.BLOCKQUOTE, Uo.BODY, Uo.BR, Uo.BUTTON, Uo.CAPTION, Uo.CENTER, Uo.COL, Uo.COLGROUP, Uo.DD, Uo.DETAILS, Uo.DIR, Uo.DIV, Uo.DL, Uo.DT, Uo.EMBED, Uo.FIELDSET, Uo.FIGCAPTION, Uo.FIGURE, Uo.FOOTER, Uo.FORM, Uo.FRAME, Uo.FRAMESET, Uo.H1, Uo.H2, Uo.H3, Uo.H4, Uo.H5, Uo.H6, Uo.HEAD, Uo.HEADER, Uo.HGROUP, Uo.HR, Uo.HTML, Uo.IFRAME, Uo.IMG, Uo.INPUT, Uo.LI, Uo.LINK, Uo.LISTING, Uo.MAIN, Uo.MARQUEE, Uo.MENU, Uo.META, Uo.NAV, Uo.NOEMBED, Uo.NOFRAMES, Uo.NOSCRIPT, Uo.OBJECT, Uo.OL, Uo.P, Uo.PARAM, Uo.PLAINTEXT, Uo.PRE, Uo.SCRIPT, Uo.SECTION, Uo.SELECT, Uo.SOURCE, Uo.STYLE, Uo.SUMMARY, Uo.TABLE, Uo.TBODY, Uo.TD, Uo.TEMPLATE, Uo.TEXTAREA, Uo.TFOOT, Uo.TH, Uo.THEAD, Uo.TITLE, Uo.TR, Uo.TRACK, Uo.UL, Uo.WBR, Uo.XMP]),
  5502. [vo.MATHML]: new Set([Uo.MI, Uo.MO, Uo.MN, Uo.MS, Uo.MTEXT, Uo.ANNOTATION_XML]),
  5503. [vo.SVG]: new Set([Uo.TITLE, Uo.FOREIGN_OBJECT, Uo.DESC]),
  5504. [vo.XLINK]: new Set,
  5505. [vo.XML]: new Set,
  5506. [vo.XMLNS]: new Set
  5507. };
  5508. function Go(e) {
  5509. return e === Uo.H1 || e === Uo.H2 || e === Uo.H3 || e === Uo.H4 || e === Uo.H5 || e === Uo.H6
  5510. }
  5511. const Yo = new Set([Mo.STYLE, Mo.SCRIPT, Mo.XMP, Mo.IFRAME, Mo.NOEMBED, Mo.NOFRAMES, Mo.PLAINTEXT]);
  5512. const qo = new Map([[128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376]]);
  5513. var Ko;
  5514. !function (e) {
  5515. e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.NAMED_CHARACTER_REFERENCE = 72] = "NAMED_CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 73] = "AMBIGUOUS_AMPERSAND", e[e.NUMERIC_CHARACTER_REFERENCE = 74] = "NUMERIC_CHARACTER_REFERENCE", e[e.HEXADEMICAL_CHARACTER_REFERENCE_START = 75] = "HEXADEMICAL_CHARACTER_REFERENCE_START", e[e.HEXADEMICAL_CHARACTER_REFERENCE = 76] = "HEXADEMICAL_CHARACTER_REFERENCE", e[e.DECIMAL_CHARACTER_REFERENCE = 77] = "DECIMAL_CHARACTER_REFERENCE", e[e.NUMERIC_CHARACTER_REFERENCE_END = 78] = "NUMERIC_CHARACTER_REFERENCE_END"
  5516. }(Ko || (Ko = {}));
  5517. const jo = {
  5518. DATA: Ko.DATA,
  5519. RCDATA: Ko.RCDATA,
  5520. RAWTEXT: Ko.RAWTEXT,
  5521. SCRIPT_DATA: Ko.SCRIPT_DATA,
  5522. PLAINTEXT: Ko.PLAINTEXT,
  5523. CDATA_SECTION: Ko.CDATA_SECTION
  5524. };
  5525. function Vo(e) {
  5526. return e >= io.DIGIT_0 && e <= io.DIGIT_9
  5527. }
  5528. function Wo(e) {
  5529. return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_Z
  5530. }
  5531. function Qo(e) {
  5532. return function (e) {
  5533. return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_Z
  5534. }(e) || Wo(e)
  5535. }
  5536. function Xo(e) {
  5537. return Qo(e) || Vo(e)
  5538. }
  5539. function $o(e) {
  5540. return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_F
  5541. }
  5542. function zo(e) {
  5543. return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_F
  5544. }
  5545. function Jo(e) {
  5546. return e + 32
  5547. }
  5548. function Zo(e) {
  5549. return e === io.SPACE || e === io.LINE_FEED || e === io.TABULATION || e === io.FORM_FEED
  5550. }
  5551. function ec(e) {
  5552. return Zo(e) || e === io.SOLIDUS || e === io.GREATER_THAN_SIGN
  5553. }
  5554. class tc {
  5555. constructor(e, t) {
  5556. this.options = e, this.handler = t, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = Ko.DATA, this.returnState = Ko.DATA, this.charRefCode = -1, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = {
  5557. name: "",
  5558. value: ""
  5559. }, this.preprocessor = new mo(t), this.currentLocation = this.getCurrentLocation(-1)
  5560. }
  5561. _err(e) {
  5562. var t, n;
  5563. null === (n = (t = this.handler).onParseError) || void 0 === n || n.call(t, this.preprocessor.getError(e))
  5564. }
  5565. getCurrentLocation(e) {
  5566. return this.options.sourceCodeLocationInfo ? {
  5567. startLine: this.preprocessor.line,
  5568. startCol: this.preprocessor.col - e,
  5569. startOffset: this.preprocessor.offset - e,
  5570. endLine: -1,
  5571. endCol: -1,
  5572. endOffset: -1
  5573. } : null
  5574. }
  5575. _runParsingLoop() {
  5576. if (!this.inLoop) {
  5577. for (this.inLoop = !0; this.active && !this.paused;) {
  5578. this.consumedAfterSnapshot = 0;
  5579. const e = this._consume();
  5580. this._ensureHibernation() || this._callState(e)
  5581. }
  5582. this.inLoop = !1
  5583. }
  5584. }
  5585. pause() {
  5586. this.paused = !0
  5587. }
  5588. resume(e) {
  5589. if (!this.paused) throw new Error("Parser was already resumed");
  5590. this.paused = !1, this.inLoop || (this._runParsingLoop(), this.paused || null == e || e())
  5591. }
  5592. write(e, t, n) {
  5593. this.active = !0, this.preprocessor.write(e, t), this._runParsingLoop(), this.paused || null == n || n()
  5594. }
  5595. insertHtmlAtCurrentPos(e) {
  5596. this.active = !0, this.preprocessor.insertHtmlAtCurrentPos(e), this._runParsingLoop()
  5597. }
  5598. _ensureHibernation() {
  5599. return !!this.preprocessor.endOfChunkHit && (this._unconsume(this.consumedAfterSnapshot), this.active = !1, !0)
  5600. }
  5601. _consume() {
  5602. return this.consumedAfterSnapshot++, this.preprocessor.advance()
  5603. }
  5604. _unconsume(e) {
  5605. this.consumedAfterSnapshot -= e, this.preprocessor.retreat(e)
  5606. }
  5607. _reconsumeInState(e, t) {
  5608. this.state = e, this._callState(t)
  5609. }
  5610. _advanceBy(e) {
  5611. this.consumedAfterSnapshot += e;
  5612. for (let t = 0; t < e; t++) this.preprocessor.advance()
  5613. }
  5614. _consumeSequenceIfMatch(e, t) {
  5615. return !!this.preprocessor.startsWith(e, t) && (this._advanceBy(e.length - 1), !0)
  5616. }
  5617. _createStartTagToken() {
  5618. this.currentToken = {
  5619. type: To.START_TAG,
  5620. tagName: "",
  5621. tagID: Po.UNKNOWN,
  5622. selfClosing: !1,
  5623. ackSelfClosing: !1,
  5624. attrs: [],
  5625. location: this.getCurrentLocation(1)
  5626. }
  5627. }
  5628. _createEndTagToken() {
  5629. this.currentToken = {
  5630. type: To.END_TAG,
  5631. tagName: "",
  5632. tagID: Po.UNKNOWN,
  5633. selfClosing: !1,
  5634. ackSelfClosing: !1,
  5635. attrs: [],
  5636. location: this.getCurrentLocation(2)
  5637. }
  5638. }
  5639. _createCommentToken(e) {
  5640. this.currentToken = {type: To.COMMENT, data: "", location: this.getCurrentLocation(e)}
  5641. }
  5642. _createDoctypeToken(e) {
  5643. this.currentToken = {
  5644. type: To.DOCTYPE,
  5645. name: e,
  5646. forceQuirks: !1,
  5647. publicId: null,
  5648. systemId: null,
  5649. location: this.currentLocation
  5650. }
  5651. }
  5652. _createCharacterToken(e, t) {
  5653. this.currentCharacterToken = {type: e, chars: t, location: this.currentLocation}
  5654. }
  5655. _createAttr(e) {
  5656. this.currentAttr = {name: e, value: ""}, this.currentLocation = this.getCurrentLocation(0)
  5657. }
  5658. _leaveAttrName() {
  5659. var e, t;
  5660. const n = this.currentToken;
  5661. if (null === _o(n, this.currentAttr.name)) {
  5662. if (n.attrs.push(this.currentAttr), n.location && this.currentLocation) {
  5663. (null !== (e = (t = n.location).attrs) && void 0 !== e ? e : t.attrs = Object.create(null))[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue()
  5664. }
  5665. } else this._err(Eo.duplicateAttribute)
  5666. }
  5667. _leaveAttrValue() {
  5668. this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset)
  5669. }
  5670. prepareToken(e) {
  5671. this._emitCurrentCharacterToken(e.location), this.currentToken = null, e.location && (e.location.endLine = this.preprocessor.line, e.location.endCol = this.preprocessor.col + 1, e.location.endOffset = this.preprocessor.offset + 1), this.currentLocation = this.getCurrentLocation(-1)
  5672. }
  5673. emitCurrentTagToken() {
  5674. const e = this.currentToken;
  5675. this.prepareToken(e), e.tagID = Fo(e.tagName), e.type === To.START_TAG ? (this.lastStartTagName = e.tagName, this.handler.onStartTag(e)) : (e.attrs.length > 0 && this._err(Eo.endTagWithAttributes), e.selfClosing && this._err(Eo.endTagWithTrailingSolidus), this.handler.onEndTag(e)), this.preprocessor.dropParsedChunk()
  5676. }
  5677. emitCurrentComment(e) {
  5678. this.prepareToken(e), this.handler.onComment(e), this.preprocessor.dropParsedChunk()
  5679. }
  5680. emitCurrentDoctype(e) {
  5681. this.prepareToken(e), this.handler.onDoctype(e), this.preprocessor.dropParsedChunk()
  5682. }
  5683. _emitCurrentCharacterToken(e) {
  5684. if (this.currentCharacterToken) {
  5685. switch (e && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = e.startLine, this.currentCharacterToken.location.endCol = e.startCol, this.currentCharacterToken.location.endOffset = e.startOffset), this.currentCharacterToken.type) {
  5686. case To.CHARACTER:
  5687. this.handler.onCharacter(this.currentCharacterToken);
  5688. break;
  5689. case To.NULL_CHARACTER:
  5690. this.handler.onNullCharacter(this.currentCharacterToken);
  5691. break;
  5692. case To.WHITESPACE_CHARACTER:
  5693. this.handler.onWhitespaceCharacter(this.currentCharacterToken)
  5694. }
  5695. this.currentCharacterToken = null
  5696. }
  5697. }
  5698. _emitEOFToken() {
  5699. const e = this.getCurrentLocation(0);
  5700. e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({
  5701. type: To.EOF,
  5702. location: e
  5703. }), this.active = !1
  5704. }
  5705. _appendCharToCurrentCharacterToken(e, t) {
  5706. if (this.currentCharacterToken) {
  5707. if (this.currentCharacterToken.type === e) return void (this.currentCharacterToken.chars += t);
  5708. this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk()
  5709. }
  5710. this._createCharacterToken(e, t)
  5711. }
  5712. _emitCodePoint(e) {
  5713. const t = Zo(e) ? To.WHITESPACE_CHARACTER : e === io.NULL ? To.NULL_CHARACTER : To.CHARACTER;
  5714. this._appendCharToCurrentCharacterToken(t, String.fromCodePoint(e))
  5715. }
  5716. _emitChars(e) {
  5717. this._appendCharToCurrentCharacterToken(To.CHARACTER, e)
  5718. }
  5719. _matchNamedCharacterReference(e) {
  5720. let t = null, n = 0, r = !1;
  5721. for (let s = 0, a = wo[0]; s >= 0 && (s = Oo(wo, a, s + 1, e), !(s < 0)); e = this._consume()) {
  5722. n += 1, a = wo[s];
  5723. const o = a & yo.VALUE_LENGTH;
  5724. if (o) {
  5725. const a = (o >> 14) - 1;
  5726. if (e !== io.SEMICOLON && this._isCharacterReferenceInAttribute() && ((i = this.preprocessor.peek(1)) === io.EQUALS_SIGN || Xo(i)) ? (t = [io.AMPERSAND], s += a) : (t = 0 === a ? [wo[s] & ~yo.VALUE_LENGTH] : 1 === a ? [wo[++s]] : [wo[++s], wo[++s]], n = 0, r = e !== io.SEMICOLON), 0 === a) {
  5727. this._consume();
  5728. break
  5729. }
  5730. }
  5731. }
  5732. var i;
  5733. return this._unconsume(n), r && !this.preprocessor.endOfChunkHit && this._err(Eo.missingSemicolonAfterCharacterReference), this._unconsume(1), t
  5734. }
  5735. _isCharacterReferenceInAttribute() {
  5736. return this.returnState === Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_UNQUOTED
  5737. }
  5738. _flushCodePointConsumedAsCharacterReference(e) {
  5739. this._isCharacterReferenceInAttribute() ? this.currentAttr.value += String.fromCodePoint(e) : this._emitCodePoint(e)
  5740. }
  5741. _callState(e) {
  5742. switch (this.state) {
  5743. case Ko.DATA:
  5744. this._stateData(e);
  5745. break;
  5746. case Ko.RCDATA:
  5747. this._stateRcdata(e);
  5748. break;
  5749. case Ko.RAWTEXT:
  5750. this._stateRawtext(e);
  5751. break;
  5752. case Ko.SCRIPT_DATA:
  5753. this._stateScriptData(e);
  5754. break;
  5755. case Ko.PLAINTEXT:
  5756. this._statePlaintext(e);
  5757. break;
  5758. case Ko.TAG_OPEN:
  5759. this._stateTagOpen(e);
  5760. break;
  5761. case Ko.END_TAG_OPEN:
  5762. this._stateEndTagOpen(e);
  5763. break;
  5764. case Ko.TAG_NAME:
  5765. this._stateTagName(e);
  5766. break;
  5767. case Ko.RCDATA_LESS_THAN_SIGN:
  5768. this._stateRcdataLessThanSign(e);
  5769. break;
  5770. case Ko.RCDATA_END_TAG_OPEN:
  5771. this._stateRcdataEndTagOpen(e);
  5772. break;
  5773. case Ko.RCDATA_END_TAG_NAME:
  5774. this._stateRcdataEndTagName(e);
  5775. break;
  5776. case Ko.RAWTEXT_LESS_THAN_SIGN:
  5777. this._stateRawtextLessThanSign(e);
  5778. break;
  5779. case Ko.RAWTEXT_END_TAG_OPEN:
  5780. this._stateRawtextEndTagOpen(e);
  5781. break;
  5782. case Ko.RAWTEXT_END_TAG_NAME:
  5783. this._stateRawtextEndTagName(e);
  5784. break;
  5785. case Ko.SCRIPT_DATA_LESS_THAN_SIGN:
  5786. this._stateScriptDataLessThanSign(e);
  5787. break;
  5788. case Ko.SCRIPT_DATA_END_TAG_OPEN:
  5789. this._stateScriptDataEndTagOpen(e);
  5790. break;
  5791. case Ko.SCRIPT_DATA_END_TAG_NAME:
  5792. this._stateScriptDataEndTagName(e);
  5793. break;
  5794. case Ko.SCRIPT_DATA_ESCAPE_START:
  5795. this._stateScriptDataEscapeStart(e);
  5796. break;
  5797. case Ko.SCRIPT_DATA_ESCAPE_START_DASH:
  5798. this._stateScriptDataEscapeStartDash(e);
  5799. break;
  5800. case Ko.SCRIPT_DATA_ESCAPED:
  5801. this._stateScriptDataEscaped(e);
  5802. break;
  5803. case Ko.SCRIPT_DATA_ESCAPED_DASH:
  5804. this._stateScriptDataEscapedDash(e);
  5805. break;
  5806. case Ko.SCRIPT_DATA_ESCAPED_DASH_DASH:
  5807. this._stateScriptDataEscapedDashDash(e);
  5808. break;
  5809. case Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
  5810. this._stateScriptDataEscapedLessThanSign(e);
  5811. break;
  5812. case Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
  5813. this._stateScriptDataEscapedEndTagOpen(e);
  5814. break;
  5815. case Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
  5816. this._stateScriptDataEscapedEndTagName(e);
  5817. break;
  5818. case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START:
  5819. this._stateScriptDataDoubleEscapeStart(e);
  5820. break;
  5821. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED:
  5822. this._stateScriptDataDoubleEscaped(e);
  5823. break;
  5824. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:
  5825. this._stateScriptDataDoubleEscapedDash(e);
  5826. break;
  5827. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:
  5828. this._stateScriptDataDoubleEscapedDashDash(e);
  5829. break;
  5830. case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:
  5831. this._stateScriptDataDoubleEscapedLessThanSign(e);
  5832. break;
  5833. case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END:
  5834. this._stateScriptDataDoubleEscapeEnd(e);
  5835. break;
  5836. case Ko.BEFORE_ATTRIBUTE_NAME:
  5837. this._stateBeforeAttributeName(e);
  5838. break;
  5839. case Ko.ATTRIBUTE_NAME:
  5840. this._stateAttributeName(e);
  5841. break;
  5842. case Ko.AFTER_ATTRIBUTE_NAME:
  5843. this._stateAfterAttributeName(e);
  5844. break;
  5845. case Ko.BEFORE_ATTRIBUTE_VALUE:
  5846. this._stateBeforeAttributeValue(e);
  5847. break;
  5848. case Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED:
  5849. this._stateAttributeValueDoubleQuoted(e);
  5850. break;
  5851. case Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED:
  5852. this._stateAttributeValueSingleQuoted(e);
  5853. break;
  5854. case Ko.ATTRIBUTE_VALUE_UNQUOTED:
  5855. this._stateAttributeValueUnquoted(e);
  5856. break;
  5857. case Ko.AFTER_ATTRIBUTE_VALUE_QUOTED:
  5858. this._stateAfterAttributeValueQuoted(e);
  5859. break;
  5860. case Ko.SELF_CLOSING_START_TAG:
  5861. this._stateSelfClosingStartTag(e);
  5862. break;
  5863. case Ko.BOGUS_COMMENT:
  5864. this._stateBogusComment(e);
  5865. break;
  5866. case Ko.MARKUP_DECLARATION_OPEN:
  5867. this._stateMarkupDeclarationOpen(e);
  5868. break;
  5869. case Ko.COMMENT_START:
  5870. this._stateCommentStart(e);
  5871. break;
  5872. case Ko.COMMENT_START_DASH:
  5873. this._stateCommentStartDash(e);
  5874. break;
  5875. case Ko.COMMENT:
  5876. this._stateComment(e);
  5877. break;
  5878. case Ko.COMMENT_LESS_THAN_SIGN:
  5879. this._stateCommentLessThanSign(e);
  5880. break;
  5881. case Ko.COMMENT_LESS_THAN_SIGN_BANG:
  5882. this._stateCommentLessThanSignBang(e);
  5883. break;
  5884. case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH:
  5885. this._stateCommentLessThanSignBangDash(e);
  5886. break;
  5887. case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:
  5888. this._stateCommentLessThanSignBangDashDash(e);
  5889. break;
  5890. case Ko.COMMENT_END_DASH:
  5891. this._stateCommentEndDash(e);
  5892. break;
  5893. case Ko.COMMENT_END:
  5894. this._stateCommentEnd(e);
  5895. break;
  5896. case Ko.COMMENT_END_BANG:
  5897. this._stateCommentEndBang(e);
  5898. break;
  5899. case Ko.DOCTYPE:
  5900. this._stateDoctype(e);
  5901. break;
  5902. case Ko.BEFORE_DOCTYPE_NAME:
  5903. this._stateBeforeDoctypeName(e);
  5904. break;
  5905. case Ko.DOCTYPE_NAME:
  5906. this._stateDoctypeName(e);
  5907. break;
  5908. case Ko.AFTER_DOCTYPE_NAME:
  5909. this._stateAfterDoctypeName(e);
  5910. break;
  5911. case Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD:
  5912. this._stateAfterDoctypePublicKeyword(e);
  5913. break;
  5914. case Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:
  5915. this._stateBeforeDoctypePublicIdentifier(e);
  5916. break;
  5917. case Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:
  5918. this._stateDoctypePublicIdentifierDoubleQuoted(e);
  5919. break;
  5920. case Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:
  5921. this._stateDoctypePublicIdentifierSingleQuoted(e);
  5922. break;
  5923. case Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:
  5924. this._stateAfterDoctypePublicIdentifier(e);
  5925. break;
  5926. case Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:
  5927. this._stateBetweenDoctypePublicAndSystemIdentifiers(e);
  5928. break;
  5929. case Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD:
  5930. this._stateAfterDoctypeSystemKeyword(e);
  5931. break;
  5932. case Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:
  5933. this._stateBeforeDoctypeSystemIdentifier(e);
  5934. break;
  5935. case Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:
  5936. this._stateDoctypeSystemIdentifierDoubleQuoted(e);
  5937. break;
  5938. case Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:
  5939. this._stateDoctypeSystemIdentifierSingleQuoted(e);
  5940. break;
  5941. case Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:
  5942. this._stateAfterDoctypeSystemIdentifier(e);
  5943. break;
  5944. case Ko.BOGUS_DOCTYPE:
  5945. this._stateBogusDoctype(e);
  5946. break;
  5947. case Ko.CDATA_SECTION:
  5948. this._stateCdataSection(e);
  5949. break;
  5950. case Ko.CDATA_SECTION_BRACKET:
  5951. this._stateCdataSectionBracket(e);
  5952. break;
  5953. case Ko.CDATA_SECTION_END:
  5954. this._stateCdataSectionEnd(e);
  5955. break;
  5956. case Ko.CHARACTER_REFERENCE:
  5957. this._stateCharacterReference(e);
  5958. break;
  5959. case Ko.NAMED_CHARACTER_REFERENCE:
  5960. this._stateNamedCharacterReference(e);
  5961. break;
  5962. case Ko.AMBIGUOUS_AMPERSAND:
  5963. this._stateAmbiguousAmpersand(e);
  5964. break;
  5965. case Ko.NUMERIC_CHARACTER_REFERENCE:
  5966. this._stateNumericCharacterReference(e);
  5967. break;
  5968. case Ko.HEXADEMICAL_CHARACTER_REFERENCE_START:
  5969. this._stateHexademicalCharacterReferenceStart(e);
  5970. break;
  5971. case Ko.HEXADEMICAL_CHARACTER_REFERENCE:
  5972. this._stateHexademicalCharacterReference(e);
  5973. break;
  5974. case Ko.DECIMAL_CHARACTER_REFERENCE:
  5975. this._stateDecimalCharacterReference(e);
  5976. break;
  5977. case Ko.NUMERIC_CHARACTER_REFERENCE_END:
  5978. this._stateNumericCharacterReferenceEnd(e);
  5979. break;
  5980. default:
  5981. throw new Error("Unknown state")
  5982. }
  5983. }
  5984. _stateData(e) {
  5985. switch (e) {
  5986. case io.LESS_THAN_SIGN:
  5987. this.state = Ko.TAG_OPEN;
  5988. break;
  5989. case io.AMPERSAND:
  5990. this.returnState = Ko.DATA, this.state = Ko.CHARACTER_REFERENCE;
  5991. break;
  5992. case io.NULL:
  5993. this._err(Eo.unexpectedNullCharacter), this._emitCodePoint(e);
  5994. break;
  5995. case io.EOF:
  5996. this._emitEOFToken();
  5997. break;
  5998. default:
  5999. this._emitCodePoint(e)
  6000. }
  6001. }
  6002. _stateRcdata(e) {
  6003. switch (e) {
  6004. case io.AMPERSAND:
  6005. this.returnState = Ko.RCDATA, this.state = Ko.CHARACTER_REFERENCE;
  6006. break;
  6007. case io.LESS_THAN_SIGN:
  6008. this.state = Ko.RCDATA_LESS_THAN_SIGN;
  6009. break;
  6010. case io.NULL:
  6011. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  6012. break;
  6013. case io.EOF:
  6014. this._emitEOFToken();
  6015. break;
  6016. default:
  6017. this._emitCodePoint(e)
  6018. }
  6019. }
  6020. _stateRawtext(e) {
  6021. switch (e) {
  6022. case io.LESS_THAN_SIGN:
  6023. this.state = Ko.RAWTEXT_LESS_THAN_SIGN;
  6024. break;
  6025. case io.NULL:
  6026. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  6027. break;
  6028. case io.EOF:
  6029. this._emitEOFToken();
  6030. break;
  6031. default:
  6032. this._emitCodePoint(e)
  6033. }
  6034. }
  6035. _stateScriptData(e) {
  6036. switch (e) {
  6037. case io.LESS_THAN_SIGN:
  6038. this.state = Ko.SCRIPT_DATA_LESS_THAN_SIGN;
  6039. break;
  6040. case io.NULL:
  6041. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  6042. break;
  6043. case io.EOF:
  6044. this._emitEOFToken();
  6045. break;
  6046. default:
  6047. this._emitCodePoint(e)
  6048. }
  6049. }
  6050. _statePlaintext(e) {
  6051. switch (e) {
  6052. case io.NULL:
  6053. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  6054. break;
  6055. case io.EOF:
  6056. this._emitEOFToken();
  6057. break;
  6058. default:
  6059. this._emitCodePoint(e)
  6060. }
  6061. }
  6062. _stateTagOpen(e) {
  6063. if (Qo(e)) this._createStartTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e); else switch (e) {
  6064. case io.EXCLAMATION_MARK:
  6065. this.state = Ko.MARKUP_DECLARATION_OPEN;
  6066. break;
  6067. case io.SOLIDUS:
  6068. this.state = Ko.END_TAG_OPEN;
  6069. break;
  6070. case io.QUESTION_MARK:
  6071. this._err(Eo.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e);
  6072. break;
  6073. case io.EOF:
  6074. this._err(Eo.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
  6075. break;
  6076. default:
  6077. this._err(Eo.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = Ko.DATA, this._stateData(e)
  6078. }
  6079. }
  6080. _stateEndTagOpen(e) {
  6081. if (Qo(e)) this._createEndTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e); else switch (e) {
  6082. case io.GREATER_THAN_SIGN:
  6083. this._err(Eo.missingEndTagName), this.state = Ko.DATA;
  6084. break;
  6085. case io.EOF:
  6086. this._err(Eo.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
  6087. break;
  6088. default:
  6089. this._err(Eo.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e)
  6090. }
  6091. }
  6092. _stateTagName(e) {
  6093. const t = this.currentToken;
  6094. switch (e) {
  6095. case io.SPACE:
  6096. case io.LINE_FEED:
  6097. case io.TABULATION:
  6098. case io.FORM_FEED:
  6099. this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  6100. break;
  6101. case io.SOLIDUS:
  6102. this.state = Ko.SELF_CLOSING_START_TAG;
  6103. break;
  6104. case io.GREATER_THAN_SIGN:
  6105. this.state = Ko.DATA, this.emitCurrentTagToken();
  6106. break;
  6107. case io.NULL:
  6108. this._err(Eo.unexpectedNullCharacter), t.tagName += "�";
  6109. break;
  6110. case io.EOF:
  6111. this._err(Eo.eofInTag), this._emitEOFToken();
  6112. break;
  6113. default:
  6114. t.tagName += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  6115. }
  6116. }
  6117. _stateRcdataLessThanSign(e) {
  6118. e === io.SOLIDUS ? this.state = Ko.RCDATA_END_TAG_OPEN : (this._emitChars("<"), this.state = Ko.RCDATA, this._stateRcdata(e))
  6119. }
  6120. _stateRcdataEndTagOpen(e) {
  6121. Qo(e) ? (this.state = Ko.RCDATA_END_TAG_NAME, this._stateRcdataEndTagName(e)) : (this._emitChars("</"), this.state = Ko.RCDATA, this._stateRcdata(e))
  6122. }
  6123. handleSpecialEndTag(e) {
  6124. if (!this.preprocessor.startsWith(this.lastStartTagName, !1)) return !this._ensureHibernation();
  6125. this._createEndTagToken();
  6126. this.currentToken.tagName = this.lastStartTagName;
  6127. switch (this.preprocessor.peek(this.lastStartTagName.length)) {
  6128. case io.SPACE:
  6129. case io.LINE_FEED:
  6130. case io.TABULATION:
  6131. case io.FORM_FEED:
  6132. return this._advanceBy(this.lastStartTagName.length), this.state = Ko.BEFORE_ATTRIBUTE_NAME, !1;
  6133. case io.SOLIDUS:
  6134. return this._advanceBy(this.lastStartTagName.length), this.state = Ko.SELF_CLOSING_START_TAG, !1;
  6135. case io.GREATER_THAN_SIGN:
  6136. return this._advanceBy(this.lastStartTagName.length), this.emitCurrentTagToken(), this.state = Ko.DATA, !1;
  6137. default:
  6138. return !this._ensureHibernation()
  6139. }
  6140. }
  6141. _stateRcdataEndTagName(e) {
  6142. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.RCDATA, this._stateRcdata(e))
  6143. }
  6144. _stateRawtextLessThanSign(e) {
  6145. e === io.SOLIDUS ? this.state = Ko.RAWTEXT_END_TAG_OPEN : (this._emitChars("<"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  6146. }
  6147. _stateRawtextEndTagOpen(e) {
  6148. Qo(e) ? (this.state = Ko.RAWTEXT_END_TAG_NAME, this._stateRawtextEndTagName(e)) : (this._emitChars("</"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  6149. }
  6150. _stateRawtextEndTagName(e) {
  6151. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.RAWTEXT, this._stateRawtext(e))
  6152. }
  6153. _stateScriptDataLessThanSign(e) {
  6154. switch (e) {
  6155. case io.SOLIDUS:
  6156. this.state = Ko.SCRIPT_DATA_END_TAG_OPEN;
  6157. break;
  6158. case io.EXCLAMATION_MARK:
  6159. this.state = Ko.SCRIPT_DATA_ESCAPE_START, this._emitChars("<!");
  6160. break;
  6161. default:
  6162. this._emitChars("<"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e)
  6163. }
  6164. }
  6165. _stateScriptDataEndTagOpen(e) {
  6166. Qo(e) ? (this.state = Ko.SCRIPT_DATA_END_TAG_NAME, this._stateScriptDataEndTagName(e)) : (this._emitChars("</"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  6167. }
  6168. _stateScriptDataEndTagName(e) {
  6169. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  6170. }
  6171. _stateScriptDataEscapeStart(e) {
  6172. e === io.HYPHEN_MINUS ? (this.state = Ko.SCRIPT_DATA_ESCAPE_START_DASH, this._emitChars("-")) : (this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  6173. }
  6174. _stateScriptDataEscapeStartDash(e) {
  6175. e === io.HYPHEN_MINUS ? (this.state = Ko.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-")) : (this.state = Ko.SCRIPT_DATA, this._stateScriptData(e))
  6176. }
  6177. _stateScriptDataEscaped(e) {
  6178. switch (e) {
  6179. case io.HYPHEN_MINUS:
  6180. this.state = Ko.SCRIPT_DATA_ESCAPED_DASH, this._emitChars("-");
  6181. break;
  6182. case io.LESS_THAN_SIGN:
  6183. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  6184. break;
  6185. case io.NULL:
  6186. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  6187. break;
  6188. case io.EOF:
  6189. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  6190. break;
  6191. default:
  6192. this._emitCodePoint(e)
  6193. }
  6194. }
  6195. _stateScriptDataEscapedDash(e) {
  6196. switch (e) {
  6197. case io.HYPHEN_MINUS:
  6198. this.state = Ko.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-");
  6199. break;
  6200. case io.LESS_THAN_SIGN:
  6201. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  6202. break;
  6203. case io.NULL:
  6204. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�");
  6205. break;
  6206. case io.EOF:
  6207. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  6208. break;
  6209. default:
  6210. this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
  6211. }
  6212. }
  6213. _stateScriptDataEscapedDashDash(e) {
  6214. switch (e) {
  6215. case io.HYPHEN_MINUS:
  6216. this._emitChars("-");
  6217. break;
  6218. case io.LESS_THAN_SIGN:
  6219. this.state = Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
  6220. break;
  6221. case io.GREATER_THAN_SIGN:
  6222. this.state = Ko.SCRIPT_DATA, this._emitChars(">");
  6223. break;
  6224. case io.NULL:
  6225. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�");
  6226. break;
  6227. case io.EOF:
  6228. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  6229. break;
  6230. default:
  6231. this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
  6232. }
  6233. }
  6234. _stateScriptDataEscapedLessThanSign(e) {
  6235. e === io.SOLIDUS ? this.state = Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : Qo(e) ? (this._emitChars("<"), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(e)) : (this._emitChars("<"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  6236. }
  6237. _stateScriptDataEscapedEndTagOpen(e) {
  6238. Qo(e) ? (this.state = Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(e)) : (this._emitChars("</"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  6239. }
  6240. _stateScriptDataEscapedEndTagName(e) {
  6241. this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  6242. }
  6243. _stateScriptDataDoubleEscapeStart(e) {
  6244. if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) {
  6245. this._emitCodePoint(e);
  6246. for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume());
  6247. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED
  6248. } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
  6249. }
  6250. _stateScriptDataDoubleEscaped(e) {
  6251. switch (e) {
  6252. case io.HYPHEN_MINUS:
  6253. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH, this._emitChars("-");
  6254. break;
  6255. case io.LESS_THAN_SIGN:
  6256. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  6257. break;
  6258. case io.NULL:
  6259. this._err(Eo.unexpectedNullCharacter), this._emitChars("�");
  6260. break;
  6261. case io.EOF:
  6262. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  6263. break;
  6264. default:
  6265. this._emitCodePoint(e)
  6266. }
  6267. }
  6268. _stateScriptDataDoubleEscapedDash(e) {
  6269. switch (e) {
  6270. case io.HYPHEN_MINUS:
  6271. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH, this._emitChars("-");
  6272. break;
  6273. case io.LESS_THAN_SIGN:
  6274. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  6275. break;
  6276. case io.NULL:
  6277. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�");
  6278. break;
  6279. case io.EOF:
  6280. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  6281. break;
  6282. default:
  6283. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
  6284. }
  6285. }
  6286. _stateScriptDataDoubleEscapedDashDash(e) {
  6287. switch (e) {
  6288. case io.HYPHEN_MINUS:
  6289. this._emitChars("-");
  6290. break;
  6291. case io.LESS_THAN_SIGN:
  6292. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
  6293. break;
  6294. case io.GREATER_THAN_SIGN:
  6295. this.state = Ko.SCRIPT_DATA, this._emitChars(">");
  6296. break;
  6297. case io.NULL:
  6298. this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�");
  6299. break;
  6300. case io.EOF:
  6301. this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
  6302. break;
  6303. default:
  6304. this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
  6305. }
  6306. }
  6307. _stateScriptDataDoubleEscapedLessThanSign(e) {
  6308. e === io.SOLIDUS ? (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END, this._emitChars("/")) : (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
  6309. }
  6310. _stateScriptDataDoubleEscapeEnd(e) {
  6311. if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) {
  6312. this._emitCodePoint(e);
  6313. for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume());
  6314. this.state = Ko.SCRIPT_DATA_ESCAPED
  6315. } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
  6316. }
  6317. _stateBeforeAttributeName(e) {
  6318. switch (e) {
  6319. case io.SPACE:
  6320. case io.LINE_FEED:
  6321. case io.TABULATION:
  6322. case io.FORM_FEED:
  6323. break;
  6324. case io.SOLIDUS:
  6325. case io.GREATER_THAN_SIGN:
  6326. case io.EOF:
  6327. this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
  6328. break;
  6329. case io.EQUALS_SIGN:
  6330. this._err(Eo.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = Ko.ATTRIBUTE_NAME;
  6331. break;
  6332. default:
  6333. this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e)
  6334. }
  6335. }
  6336. _stateAttributeName(e) {
  6337. switch (e) {
  6338. case io.SPACE:
  6339. case io.LINE_FEED:
  6340. case io.TABULATION:
  6341. case io.FORM_FEED:
  6342. case io.SOLIDUS:
  6343. case io.GREATER_THAN_SIGN:
  6344. case io.EOF:
  6345. this._leaveAttrName(), this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
  6346. break;
  6347. case io.EQUALS_SIGN:
  6348. this._leaveAttrName(), this.state = Ko.BEFORE_ATTRIBUTE_VALUE;
  6349. break;
  6350. case io.QUOTATION_MARK:
  6351. case io.APOSTROPHE:
  6352. case io.LESS_THAN_SIGN:
  6353. this._err(Eo.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(e);
  6354. break;
  6355. case io.NULL:
  6356. this._err(Eo.unexpectedNullCharacter), this.currentAttr.name += "�";
  6357. break;
  6358. default:
  6359. this.currentAttr.name += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  6360. }
  6361. }
  6362. _stateAfterAttributeName(e) {
  6363. switch (e) {
  6364. case io.SPACE:
  6365. case io.LINE_FEED:
  6366. case io.TABULATION:
  6367. case io.FORM_FEED:
  6368. break;
  6369. case io.SOLIDUS:
  6370. this.state = Ko.SELF_CLOSING_START_TAG;
  6371. break;
  6372. case io.EQUALS_SIGN:
  6373. this.state = Ko.BEFORE_ATTRIBUTE_VALUE;
  6374. break;
  6375. case io.GREATER_THAN_SIGN:
  6376. this.state = Ko.DATA, this.emitCurrentTagToken();
  6377. break;
  6378. case io.EOF:
  6379. this._err(Eo.eofInTag), this._emitEOFToken();
  6380. break;
  6381. default:
  6382. this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e)
  6383. }
  6384. }
  6385. _stateBeforeAttributeValue(e) {
  6386. switch (e) {
  6387. case io.SPACE:
  6388. case io.LINE_FEED:
  6389. case io.TABULATION:
  6390. case io.FORM_FEED:
  6391. break;
  6392. case io.QUOTATION_MARK:
  6393. this.state = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
  6394. break;
  6395. case io.APOSTROPHE:
  6396. this.state = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED;
  6397. break;
  6398. case io.GREATER_THAN_SIGN:
  6399. this._err(Eo.missingAttributeValue), this.state = Ko.DATA, this.emitCurrentTagToken();
  6400. break;
  6401. default:
  6402. this.state = Ko.ATTRIBUTE_VALUE_UNQUOTED, this._stateAttributeValueUnquoted(e)
  6403. }
  6404. }
  6405. _stateAttributeValueDoubleQuoted(e) {
  6406. switch (e) {
  6407. case io.QUOTATION_MARK:
  6408. this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED;
  6409. break;
  6410. case io.AMPERSAND:
  6411. this.returnState = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE;
  6412. break;
  6413. case io.NULL:
  6414. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  6415. break;
  6416. case io.EOF:
  6417. this._err(Eo.eofInTag), this._emitEOFToken();
  6418. break;
  6419. default:
  6420. this.currentAttr.value += String.fromCodePoint(e)
  6421. }
  6422. }
  6423. _stateAttributeValueSingleQuoted(e) {
  6424. switch (e) {
  6425. case io.APOSTROPHE:
  6426. this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED;
  6427. break;
  6428. case io.AMPERSAND:
  6429. this.returnState = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE;
  6430. break;
  6431. case io.NULL:
  6432. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  6433. break;
  6434. case io.EOF:
  6435. this._err(Eo.eofInTag), this._emitEOFToken();
  6436. break;
  6437. default:
  6438. this.currentAttr.value += String.fromCodePoint(e)
  6439. }
  6440. }
  6441. _stateAttributeValueUnquoted(e) {
  6442. switch (e) {
  6443. case io.SPACE:
  6444. case io.LINE_FEED:
  6445. case io.TABULATION:
  6446. case io.FORM_FEED:
  6447. this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  6448. break;
  6449. case io.AMPERSAND:
  6450. this.returnState = Ko.ATTRIBUTE_VALUE_UNQUOTED, this.state = Ko.CHARACTER_REFERENCE;
  6451. break;
  6452. case io.GREATER_THAN_SIGN:
  6453. this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken();
  6454. break;
  6455. case io.NULL:
  6456. this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�";
  6457. break;
  6458. case io.QUOTATION_MARK:
  6459. case io.APOSTROPHE:
  6460. case io.LESS_THAN_SIGN:
  6461. case io.EQUALS_SIGN:
  6462. case io.GRAVE_ACCENT:
  6463. this._err(Eo.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(e);
  6464. break;
  6465. case io.EOF:
  6466. this._err(Eo.eofInTag), this._emitEOFToken();
  6467. break;
  6468. default:
  6469. this.currentAttr.value += String.fromCodePoint(e)
  6470. }
  6471. }
  6472. _stateAfterAttributeValueQuoted(e) {
  6473. switch (e) {
  6474. case io.SPACE:
  6475. case io.LINE_FEED:
  6476. case io.TABULATION:
  6477. case io.FORM_FEED:
  6478. this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME;
  6479. break;
  6480. case io.SOLIDUS:
  6481. this._leaveAttrValue(), this.state = Ko.SELF_CLOSING_START_TAG;
  6482. break;
  6483. case io.GREATER_THAN_SIGN:
  6484. this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken();
  6485. break;
  6486. case io.EOF:
  6487. this._err(Eo.eofInTag), this._emitEOFToken();
  6488. break;
  6489. default:
  6490. this._err(Eo.missingWhitespaceBetweenAttributes), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
  6491. }
  6492. }
  6493. _stateSelfClosingStartTag(e) {
  6494. switch (e) {
  6495. case io.GREATER_THAN_SIGN:
  6496. this.currentToken.selfClosing = !0, this.state = Ko.DATA, this.emitCurrentTagToken();
  6497. break;
  6498. case io.EOF:
  6499. this._err(Eo.eofInTag), this._emitEOFToken();
  6500. break;
  6501. default:
  6502. this._err(Eo.unexpectedSolidusInTag), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
  6503. }
  6504. }
  6505. _stateBogusComment(e) {
  6506. const t = this.currentToken;
  6507. switch (e) {
  6508. case io.GREATER_THAN_SIGN:
  6509. this.state = Ko.DATA, this.emitCurrentComment(t);
  6510. break;
  6511. case io.EOF:
  6512. this.emitCurrentComment(t), this._emitEOFToken();
  6513. break;
  6514. case io.NULL:
  6515. this._err(Eo.unexpectedNullCharacter), t.data += "�";
  6516. break;
  6517. default:
  6518. t.data += String.fromCodePoint(e)
  6519. }
  6520. }
  6521. _stateMarkupDeclarationOpen(e) {
  6522. this._consumeSequenceIfMatch(so, !0) ? (this._createCommentToken(so.length + 1), this.state = Ko.COMMENT_START) : this._consumeSequenceIfMatch(oo, !1) ? (this.currentLocation = this.getCurrentLocation(oo.length + 1), this.state = Ko.DOCTYPE) : this._consumeSequenceIfMatch(ao, !0) ? this.inForeignNode ? this.state = Ko.CDATA_SECTION : (this._err(Eo.cdataInHtmlContent), this._createCommentToken(ao.length + 1), this.currentToken.data = "[CDATA[", this.state = Ko.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(Eo.incorrectlyOpenedComment), this._createCommentToken(2), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e))
  6523. }
  6524. _stateCommentStart(e) {
  6525. switch (e) {
  6526. case io.HYPHEN_MINUS:
  6527. this.state = Ko.COMMENT_START_DASH;
  6528. break;
  6529. case io.GREATER_THAN_SIGN: {
  6530. this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA;
  6531. const e = this.currentToken;
  6532. this.emitCurrentComment(e);
  6533. break
  6534. }
  6535. default:
  6536. this.state = Ko.COMMENT, this._stateComment(e)
  6537. }
  6538. }
  6539. _stateCommentStartDash(e) {
  6540. const t = this.currentToken;
  6541. switch (e) {
  6542. case io.HYPHEN_MINUS:
  6543. this.state = Ko.COMMENT_END;
  6544. break;
  6545. case io.GREATER_THAN_SIGN:
  6546. this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA, this.emitCurrentComment(t);
  6547. break;
  6548. case io.EOF:
  6549. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  6550. break;
  6551. default:
  6552. t.data += "-", this.state = Ko.COMMENT, this._stateComment(e)
  6553. }
  6554. }
  6555. _stateComment(e) {
  6556. const t = this.currentToken;
  6557. switch (e) {
  6558. case io.HYPHEN_MINUS:
  6559. this.state = Ko.COMMENT_END_DASH;
  6560. break;
  6561. case io.LESS_THAN_SIGN:
  6562. t.data += "<", this.state = Ko.COMMENT_LESS_THAN_SIGN;
  6563. break;
  6564. case io.NULL:
  6565. this._err(Eo.unexpectedNullCharacter), t.data += "�";
  6566. break;
  6567. case io.EOF:
  6568. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  6569. break;
  6570. default:
  6571. t.data += String.fromCodePoint(e)
  6572. }
  6573. }
  6574. _stateCommentLessThanSign(e) {
  6575. const t = this.currentToken;
  6576. switch (e) {
  6577. case io.EXCLAMATION_MARK:
  6578. t.data += "!", this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG;
  6579. break;
  6580. case io.LESS_THAN_SIGN:
  6581. t.data += "<";
  6582. break;
  6583. default:
  6584. this.state = Ko.COMMENT, this._stateComment(e)
  6585. }
  6586. }
  6587. _stateCommentLessThanSignBang(e) {
  6588. e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH : (this.state = Ko.COMMENT, this._stateComment(e))
  6589. }
  6590. _stateCommentLessThanSignBangDash(e) {
  6591. e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH : (this.state = Ko.COMMENT_END_DASH, this._stateCommentEndDash(e))
  6592. }
  6593. _stateCommentLessThanSignBangDashDash(e) {
  6594. e !== io.GREATER_THAN_SIGN && e !== io.EOF && this._err(Eo.nestedComment), this.state = Ko.COMMENT_END, this._stateCommentEnd(e)
  6595. }
  6596. _stateCommentEndDash(e) {
  6597. const t = this.currentToken;
  6598. switch (e) {
  6599. case io.HYPHEN_MINUS:
  6600. this.state = Ko.COMMENT_END;
  6601. break;
  6602. case io.EOF:
  6603. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  6604. break;
  6605. default:
  6606. t.data += "-", this.state = Ko.COMMENT, this._stateComment(e)
  6607. }
  6608. }
  6609. _stateCommentEnd(e) {
  6610. const t = this.currentToken;
  6611. switch (e) {
  6612. case io.GREATER_THAN_SIGN:
  6613. this.state = Ko.DATA, this.emitCurrentComment(t);
  6614. break;
  6615. case io.EXCLAMATION_MARK:
  6616. this.state = Ko.COMMENT_END_BANG;
  6617. break;
  6618. case io.HYPHEN_MINUS:
  6619. t.data += "-";
  6620. break;
  6621. case io.EOF:
  6622. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  6623. break;
  6624. default:
  6625. t.data += "--", this.state = Ko.COMMENT, this._stateComment(e)
  6626. }
  6627. }
  6628. _stateCommentEndBang(e) {
  6629. const t = this.currentToken;
  6630. switch (e) {
  6631. case io.HYPHEN_MINUS:
  6632. t.data += "--!", this.state = Ko.COMMENT_END_DASH;
  6633. break;
  6634. case io.GREATER_THAN_SIGN:
  6635. this._err(Eo.incorrectlyClosedComment), this.state = Ko.DATA, this.emitCurrentComment(t);
  6636. break;
  6637. case io.EOF:
  6638. this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
  6639. break;
  6640. default:
  6641. t.data += "--!", this.state = Ko.COMMENT, this._stateComment(e)
  6642. }
  6643. }
  6644. _stateDoctype(e) {
  6645. switch (e) {
  6646. case io.SPACE:
  6647. case io.LINE_FEED:
  6648. case io.TABULATION:
  6649. case io.FORM_FEED:
  6650. this.state = Ko.BEFORE_DOCTYPE_NAME;
  6651. break;
  6652. case io.GREATER_THAN_SIGN:
  6653. this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e);
  6654. break;
  6655. case io.EOF: {
  6656. this._err(Eo.eofInDoctype), this._createDoctypeToken(null);
  6657. const e = this.currentToken;
  6658. e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
  6659. break
  6660. }
  6661. default:
  6662. this._err(Eo.missingWhitespaceBeforeDoctypeName), this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e)
  6663. }
  6664. }
  6665. _stateBeforeDoctypeName(e) {
  6666. if (Wo(e)) this._createDoctypeToken(String.fromCharCode(Jo(e))), this.state = Ko.DOCTYPE_NAME; else switch (e) {
  6667. case io.SPACE:
  6668. case io.LINE_FEED:
  6669. case io.TABULATION:
  6670. case io.FORM_FEED:
  6671. break;
  6672. case io.NULL:
  6673. this._err(Eo.unexpectedNullCharacter), this._createDoctypeToken("�"), this.state = Ko.DOCTYPE_NAME;
  6674. break;
  6675. case io.GREATER_THAN_SIGN: {
  6676. this._err(Eo.missingDoctypeName), this._createDoctypeToken(null);
  6677. const e = this.currentToken;
  6678. e.forceQuirks = !0, this.emitCurrentDoctype(e), this.state = Ko.DATA;
  6679. break
  6680. }
  6681. case io.EOF: {
  6682. this._err(Eo.eofInDoctype), this._createDoctypeToken(null);
  6683. const e = this.currentToken;
  6684. e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
  6685. break
  6686. }
  6687. default:
  6688. this._createDoctypeToken(String.fromCodePoint(e)), this.state = Ko.DOCTYPE_NAME
  6689. }
  6690. }
  6691. _stateDoctypeName(e) {
  6692. const t = this.currentToken;
  6693. switch (e) {
  6694. case io.SPACE:
  6695. case io.LINE_FEED:
  6696. case io.TABULATION:
  6697. case io.FORM_FEED:
  6698. this.state = Ko.AFTER_DOCTYPE_NAME;
  6699. break;
  6700. case io.GREATER_THAN_SIGN:
  6701. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6702. break;
  6703. case io.NULL:
  6704. this._err(Eo.unexpectedNullCharacter), t.name += "�";
  6705. break;
  6706. case io.EOF:
  6707. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6708. break;
  6709. default:
  6710. t.name += String.fromCodePoint(Wo(e) ? Jo(e) : e)
  6711. }
  6712. }
  6713. _stateAfterDoctypeName(e) {
  6714. const t = this.currentToken;
  6715. switch (e) {
  6716. case io.SPACE:
  6717. case io.LINE_FEED:
  6718. case io.TABULATION:
  6719. case io.FORM_FEED:
  6720. break;
  6721. case io.GREATER_THAN_SIGN:
  6722. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6723. break;
  6724. case io.EOF:
  6725. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6726. break;
  6727. default:
  6728. this._consumeSequenceIfMatch(lo, !1) ? this.state = Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(ho, !1) ? this.state = Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(Eo.invalidCharacterSequenceAfterDoctypeName), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e))
  6729. }
  6730. }
  6731. _stateAfterDoctypePublicKeyword(e) {
  6732. const t = this.currentToken;
  6733. switch (e) {
  6734. case io.SPACE:
  6735. case io.LINE_FEED:
  6736. case io.TABULATION:
  6737. case io.FORM_FEED:
  6738. this.state = Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;
  6739. break;
  6740. case io.QUOTATION_MARK:
  6741. this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
  6742. break;
  6743. case io.APOSTROPHE:
  6744. this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
  6745. break;
  6746. case io.GREATER_THAN_SIGN:
  6747. this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6748. break;
  6749. case io.EOF:
  6750. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6751. break;
  6752. default:
  6753. this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6754. }
  6755. }
  6756. _stateBeforeDoctypePublicIdentifier(e) {
  6757. const t = this.currentToken;
  6758. switch (e) {
  6759. case io.SPACE:
  6760. case io.LINE_FEED:
  6761. case io.TABULATION:
  6762. case io.FORM_FEED:
  6763. break;
  6764. case io.QUOTATION_MARK:
  6765. t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
  6766. break;
  6767. case io.APOSTROPHE:
  6768. t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
  6769. break;
  6770. case io.GREATER_THAN_SIGN:
  6771. this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6772. break;
  6773. case io.EOF:
  6774. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6775. break;
  6776. default:
  6777. this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6778. }
  6779. }
  6780. _stateDoctypePublicIdentifierDoubleQuoted(e) {
  6781. const t = this.currentToken;
  6782. switch (e) {
  6783. case io.QUOTATION_MARK:
  6784. this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
  6785. break;
  6786. case io.NULL:
  6787. this._err(Eo.unexpectedNullCharacter), t.publicId += "�";
  6788. break;
  6789. case io.GREATER_THAN_SIGN:
  6790. this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6791. break;
  6792. case io.EOF:
  6793. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6794. break;
  6795. default:
  6796. t.publicId += String.fromCodePoint(e)
  6797. }
  6798. }
  6799. _stateDoctypePublicIdentifierSingleQuoted(e) {
  6800. const t = this.currentToken;
  6801. switch (e) {
  6802. case io.APOSTROPHE:
  6803. this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
  6804. break;
  6805. case io.NULL:
  6806. this._err(Eo.unexpectedNullCharacter), t.publicId += "�";
  6807. break;
  6808. case io.GREATER_THAN_SIGN:
  6809. this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6810. break;
  6811. case io.EOF:
  6812. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6813. break;
  6814. default:
  6815. t.publicId += String.fromCodePoint(e)
  6816. }
  6817. }
  6818. _stateAfterDoctypePublicIdentifier(e) {
  6819. const t = this.currentToken;
  6820. switch (e) {
  6821. case io.SPACE:
  6822. case io.LINE_FEED:
  6823. case io.TABULATION:
  6824. case io.FORM_FEED:
  6825. this.state = Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;
  6826. break;
  6827. case io.GREATER_THAN_SIGN:
  6828. this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6829. break;
  6830. case io.QUOTATION_MARK:
  6831. this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  6832. break;
  6833. case io.APOSTROPHE:
  6834. this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  6835. break;
  6836. case io.EOF:
  6837. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6838. break;
  6839. default:
  6840. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6841. }
  6842. }
  6843. _stateBetweenDoctypePublicAndSystemIdentifiers(e) {
  6844. const t = this.currentToken;
  6845. switch (e) {
  6846. case io.SPACE:
  6847. case io.LINE_FEED:
  6848. case io.TABULATION:
  6849. case io.FORM_FEED:
  6850. break;
  6851. case io.GREATER_THAN_SIGN:
  6852. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6853. break;
  6854. case io.QUOTATION_MARK:
  6855. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  6856. break;
  6857. case io.APOSTROPHE:
  6858. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  6859. break;
  6860. case io.EOF:
  6861. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6862. break;
  6863. default:
  6864. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6865. }
  6866. }
  6867. _stateAfterDoctypeSystemKeyword(e) {
  6868. const t = this.currentToken;
  6869. switch (e) {
  6870. case io.SPACE:
  6871. case io.LINE_FEED:
  6872. case io.TABULATION:
  6873. case io.FORM_FEED:
  6874. this.state = Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;
  6875. break;
  6876. case io.QUOTATION_MARK:
  6877. this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  6878. break;
  6879. case io.APOSTROPHE:
  6880. this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  6881. break;
  6882. case io.GREATER_THAN_SIGN:
  6883. this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6884. break;
  6885. case io.EOF:
  6886. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6887. break;
  6888. default:
  6889. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6890. }
  6891. }
  6892. _stateBeforeDoctypeSystemIdentifier(e) {
  6893. const t = this.currentToken;
  6894. switch (e) {
  6895. case io.SPACE:
  6896. case io.LINE_FEED:
  6897. case io.TABULATION:
  6898. case io.FORM_FEED:
  6899. break;
  6900. case io.QUOTATION_MARK:
  6901. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
  6902. break;
  6903. case io.APOSTROPHE:
  6904. t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
  6905. break;
  6906. case io.GREATER_THAN_SIGN:
  6907. this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t);
  6908. break;
  6909. case io.EOF:
  6910. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6911. break;
  6912. default:
  6913. this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6914. }
  6915. }
  6916. _stateDoctypeSystemIdentifierDoubleQuoted(e) {
  6917. const t = this.currentToken;
  6918. switch (e) {
  6919. case io.QUOTATION_MARK:
  6920. this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
  6921. break;
  6922. case io.NULL:
  6923. this._err(Eo.unexpectedNullCharacter), t.systemId += "�";
  6924. break;
  6925. case io.GREATER_THAN_SIGN:
  6926. this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6927. break;
  6928. case io.EOF:
  6929. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6930. break;
  6931. default:
  6932. t.systemId += String.fromCodePoint(e)
  6933. }
  6934. }
  6935. _stateDoctypeSystemIdentifierSingleQuoted(e) {
  6936. const t = this.currentToken;
  6937. switch (e) {
  6938. case io.APOSTROPHE:
  6939. this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
  6940. break;
  6941. case io.NULL:
  6942. this._err(Eo.unexpectedNullCharacter), t.systemId += "�";
  6943. break;
  6944. case io.GREATER_THAN_SIGN:
  6945. this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6946. break;
  6947. case io.EOF:
  6948. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6949. break;
  6950. default:
  6951. t.systemId += String.fromCodePoint(e)
  6952. }
  6953. }
  6954. _stateAfterDoctypeSystemIdentifier(e) {
  6955. const t = this.currentToken;
  6956. switch (e) {
  6957. case io.SPACE:
  6958. case io.LINE_FEED:
  6959. case io.TABULATION:
  6960. case io.FORM_FEED:
  6961. break;
  6962. case io.GREATER_THAN_SIGN:
  6963. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6964. break;
  6965. case io.EOF:
  6966. this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
  6967. break;
  6968. default:
  6969. this._err(Eo.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
  6970. }
  6971. }
  6972. _stateBogusDoctype(e) {
  6973. const t = this.currentToken;
  6974. switch (e) {
  6975. case io.GREATER_THAN_SIGN:
  6976. this.emitCurrentDoctype(t), this.state = Ko.DATA;
  6977. break;
  6978. case io.NULL:
  6979. this._err(Eo.unexpectedNullCharacter);
  6980. break;
  6981. case io.EOF:
  6982. this.emitCurrentDoctype(t), this._emitEOFToken()
  6983. }
  6984. }
  6985. _stateCdataSection(e) {
  6986. switch (e) {
  6987. case io.RIGHT_SQUARE_BRACKET:
  6988. this.state = Ko.CDATA_SECTION_BRACKET;
  6989. break;
  6990. case io.EOF:
  6991. this._err(Eo.eofInCdata), this._emitEOFToken();
  6992. break;
  6993. default:
  6994. this._emitCodePoint(e)
  6995. }
  6996. }
  6997. _stateCdataSectionBracket(e) {
  6998. e === io.RIGHT_SQUARE_BRACKET ? this.state = Ko.CDATA_SECTION_END : (this._emitChars("]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e))
  6999. }
  7000. _stateCdataSectionEnd(e) {
  7001. switch (e) {
  7002. case io.GREATER_THAN_SIGN:
  7003. this.state = Ko.DATA;
  7004. break;
  7005. case io.RIGHT_SQUARE_BRACKET:
  7006. this._emitChars("]");
  7007. break;
  7008. default:
  7009. this._emitChars("]]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e)
  7010. }
  7011. }
  7012. _stateCharacterReference(e) {
  7013. e === io.NUMBER_SIGN ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE : Xo(e) ? (this.state = Ko.NAMED_CHARACTER_REFERENCE, this._stateNamedCharacterReference(e)) : (this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._reconsumeInState(this.returnState, e))
  7014. }
  7015. _stateNamedCharacterReference(e) {
  7016. const t = this._matchNamedCharacterReference(e);
  7017. if (this._ensureHibernation()) ; else if (t) {
  7018. for (let e = 0; e < t.length; e++) this._flushCodePointConsumedAsCharacterReference(t[e]);
  7019. this.state = this.returnState
  7020. } else this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this.state = Ko.AMBIGUOUS_AMPERSAND
  7021. }
  7022. _stateAmbiguousAmpersand(e) {
  7023. Xo(e) ? this._flushCodePointConsumedAsCharacterReference(e) : (e === io.SEMICOLON && this._err(Eo.unknownNamedCharacterReference), this._reconsumeInState(this.returnState, e))
  7024. }
  7025. _stateNumericCharacterReference(e) {
  7026. this.charRefCode = 0, e === io.LATIN_SMALL_X || e === io.LATIN_CAPITAL_X ? this.state = Ko.HEXADEMICAL_CHARACTER_REFERENCE_START : Vo(e) ? (this.state = Ko.DECIMAL_CHARACTER_REFERENCE, this._stateDecimalCharacterReference(e)) : (this._err(Eo.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(io.NUMBER_SIGN), this._reconsumeInState(this.returnState, e))
  7027. }
  7028. _stateHexademicalCharacterReferenceStart(e) {
  7029. !function (e) {
  7030. return Vo(e) || $o(e) || zo(e)
  7031. }(e) ? (this._err(Eo.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(io.NUMBER_SIGN), this._unconsume(2), this.state = this.returnState) : (this.state = Ko.HEXADEMICAL_CHARACTER_REFERENCE, this._stateHexademicalCharacterReference(e))
  7032. }
  7033. _stateHexademicalCharacterReference(e) {
  7034. $o(e) ? this.charRefCode = 16 * this.charRefCode + e - 55 : zo(e) ? this.charRefCode = 16 * this.charRefCode + e - 87 : Vo(e) ? this.charRefCode = 16 * this.charRefCode + e - 48 : e === io.SEMICOLON ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END : (this._err(Eo.missingSemicolonAfterCharacterReference), this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e))
  7035. }
  7036. _stateDecimalCharacterReference(e) {
  7037. Vo(e) ? this.charRefCode = 10 * this.charRefCode + e - 48 : e === io.SEMICOLON ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END : (this._err(Eo.missingSemicolonAfterCharacterReference), this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e))
  7038. }
  7039. _stateNumericCharacterReferenceEnd(e) {
  7040. if (this.charRefCode === io.NULL) this._err(Eo.nullCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER; else if (this.charRefCode > 1114111) this._err(Eo.characterReferenceOutsideUnicodeRange), this.charRefCode = io.REPLACEMENT_CHARACTER; else if (uo(this.charRefCode)) this._err(Eo.surrogateCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER; else if (fo(this.charRefCode)) this._err(Eo.noncharacterCharacterReference); else if (po(this.charRefCode) || this.charRefCode === io.CARRIAGE_RETURN) {
  7041. this._err(Eo.controlCharacterReference);
  7042. const e = qo.get(this.charRefCode);
  7043. void 0 !== e && (this.charRefCode = e)
  7044. }
  7045. this._flushCodePointConsumedAsCharacterReference(this.charRefCode), this._reconsumeInState(this.returnState, e)
  7046. }
  7047. }
  7048. const nc = new Set([Po.DD, Po.DT, Po.LI, Po.OPTGROUP, Po.OPTION, Po.P, Po.RB, Po.RP, Po.RT, Po.RTC]),
  7049. rc = new Set([...nc, Po.CAPTION, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]),
  7050. ic = new Map([[Po.APPLET, vo.HTML], [Po.CAPTION, vo.HTML], [Po.HTML, vo.HTML], [Po.MARQUEE, vo.HTML], [Po.OBJECT, vo.HTML], [Po.TABLE, vo.HTML], [Po.TD, vo.HTML], [Po.TEMPLATE, vo.HTML], [Po.TH, vo.HTML], [Po.ANNOTATION_XML, vo.MATHML], [Po.MI, vo.MATHML], [Po.MN, vo.MATHML], [Po.MO, vo.MATHML], [Po.MS, vo.MATHML], [Po.MTEXT, vo.MATHML], [Po.DESC, vo.SVG], [Po.FOREIGN_OBJECT, vo.SVG], [Po.TITLE, vo.SVG]]),
  7051. sc = [Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6], ac = [Po.TR, Po.TEMPLATE, Po.HTML],
  7052. oc = [Po.TBODY, Po.TFOOT, Po.THEAD, Po.TEMPLATE, Po.HTML], cc = [Po.TABLE, Po.TEMPLATE, Po.HTML],
  7053. lc = [Po.TD, Po.TH];
  7054. class hc {
  7055. constructor(e, t, n) {
  7056. this.treeAdapter = t, this.handler = n, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = Po.UNKNOWN, this.current = e
  7057. }
  7058. get currentTmplContentOrNode() {
  7059. return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current
  7060. }
  7061. _indexOf(e) {
  7062. return this.items.lastIndexOf(e, this.stackTop)
  7063. }
  7064. _isInTemplate() {
  7065. return this.currentTagId === Po.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === vo.HTML
  7066. }
  7067. _updateCurrentElement() {
  7068. this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop]
  7069. }
  7070. push(e, t) {
  7071. this.stackTop++, this.items[this.stackTop] = e, this.current = e, this.tagIDs[this.stackTop] = t, this.currentTagId = t, this._isInTemplate() && this.tmplCount++, this.handler.onItemPush(e, t, !0)
  7072. }
  7073. pop() {
  7074. const e = this.current;
  7075. this.tmplCount > 0 && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !0)
  7076. }
  7077. replace(e, t) {
  7078. const n = this._indexOf(e);
  7079. this.items[n] = t, n === this.stackTop && (this.current = t)
  7080. }
  7081. insertAfter(e, t, n) {
  7082. const r = this._indexOf(e) + 1;
  7083. this.items.splice(r, 0, t), this.tagIDs.splice(r, 0, n), this.stackTop++, r === this.stackTop && this._updateCurrentElement(), this.handler.onItemPush(this.current, this.currentTagId, r === this.stackTop)
  7084. }
  7085. popUntilTagNamePopped(e) {
  7086. let t = this.stackTop + 1;
  7087. do {
  7088. t = this.tagIDs.lastIndexOf(e, t - 1)
  7089. } while (t > 0 && this.treeAdapter.getNamespaceURI(this.items[t]) !== vo.HTML);
  7090. this.shortenToLength(t < 0 ? 0 : t)
  7091. }
  7092. shortenToLength(e) {
  7093. for (; this.stackTop >= e;) {
  7094. const t = this.current;
  7095. this.tmplCount > 0 && this._isInTemplate() && (this.tmplCount -= 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, this.stackTop < e)
  7096. }
  7097. }
  7098. popUntilElementPopped(e) {
  7099. const t = this._indexOf(e);
  7100. this.shortenToLength(t < 0 ? 0 : t)
  7101. }
  7102. popUntilPopped(e, t) {
  7103. const n = this._indexOfTagNames(e, t);
  7104. this.shortenToLength(n < 0 ? 0 : n)
  7105. }
  7106. popUntilNumberedHeaderPopped() {
  7107. this.popUntilPopped(sc, vo.HTML)
  7108. }
  7109. popUntilTableCellPopped() {
  7110. this.popUntilPopped(lc, vo.HTML)
  7111. }
  7112. popAllUpToHtmlElement() {
  7113. this.tmplCount = 0, this.shortenToLength(1)
  7114. }
  7115. _indexOfTagNames(e, t) {
  7116. for (let n = this.stackTop; n >= 0; n--) if (e.includes(this.tagIDs[n]) && this.treeAdapter.getNamespaceURI(this.items[n]) === t) return n;
  7117. return -1
  7118. }
  7119. clearBackTo(e, t) {
  7120. const n = this._indexOfTagNames(e, t);
  7121. this.shortenToLength(n + 1)
  7122. }
  7123. clearBackToTableContext() {
  7124. this.clearBackTo(cc, vo.HTML)
  7125. }
  7126. clearBackToTableBodyContext() {
  7127. this.clearBackTo(oc, vo.HTML)
  7128. }
  7129. clearBackToTableRowContext() {
  7130. this.clearBackTo(ac, vo.HTML)
  7131. }
  7132. remove(e) {
  7133. const t = this._indexOf(e);
  7134. t >= 0 && (t === this.stackTop ? this.pop() : (this.items.splice(t, 1), this.tagIDs.splice(t, 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !1)))
  7135. }
  7136. tryPeekProperlyNestedBodyElement() {
  7137. return this.stackTop >= 1 && this.tagIDs[1] === Po.BODY ? this.items[1] : null
  7138. }
  7139. contains(e) {
  7140. return this._indexOf(e) > -1
  7141. }
  7142. getCommonAncestor(e) {
  7143. const t = this._indexOf(e) - 1;
  7144. return t >= 0 ? this.items[t] : null
  7145. }
  7146. isRootHtmlElementCurrent() {
  7147. return 0 === this.stackTop && this.tagIDs[0] === Po.HTML
  7148. }
  7149. hasInScope(e) {
  7150. for (let t = this.stackTop; t >= 0; t--) {
  7151. const n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
  7152. if (n === e && r === vo.HTML) return !0;
  7153. if (ic.get(n) === r) return !1
  7154. }
  7155. return !0
  7156. }
  7157. hasNumberedHeaderInScope() {
  7158. for (let e = this.stackTop; e >= 0; e--) {
  7159. const t = this.tagIDs[e], n = this.treeAdapter.getNamespaceURI(this.items[e]);
  7160. if (Go(t) && n === vo.HTML) return !0;
  7161. if (ic.get(t) === n) return !1
  7162. }
  7163. return !0
  7164. }
  7165. hasInListItemScope(e) {
  7166. for (let t = this.stackTop; t >= 0; t--) {
  7167. const n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
  7168. if (n === e && r === vo.HTML) return !0;
  7169. if ((n === Po.UL || n === Po.OL) && r === vo.HTML || ic.get(n) === r) return !1
  7170. }
  7171. return !0
  7172. }
  7173. hasInButtonScope(e) {
  7174. for (let t = this.stackTop; t >= 0; t--) {
  7175. const n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
  7176. if (n === e && r === vo.HTML) return !0;
  7177. if (n === Po.BUTTON && r === vo.HTML || ic.get(n) === r) return !1
  7178. }
  7179. return !0
  7180. }
  7181. hasInTableScope(e) {
  7182. for (let t = this.stackTop; t >= 0; t--) {
  7183. const n = this.tagIDs[t];
  7184. if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) {
  7185. if (n === e) return !0;
  7186. if (n === Po.TABLE || n === Po.TEMPLATE || n === Po.HTML) return !1
  7187. }
  7188. }
  7189. return !0
  7190. }
  7191. hasTableBodyContextInTableScope() {
  7192. for (let e = this.stackTop; e >= 0; e--) {
  7193. const t = this.tagIDs[e];
  7194. if (this.treeAdapter.getNamespaceURI(this.items[e]) === vo.HTML) {
  7195. if (t === Po.TBODY || t === Po.THEAD || t === Po.TFOOT) return !0;
  7196. if (t === Po.TABLE || t === Po.HTML) return !1
  7197. }
  7198. }
  7199. return !0
  7200. }
  7201. hasInSelectScope(e) {
  7202. for (let t = this.stackTop; t >= 0; t--) {
  7203. const n = this.tagIDs[t];
  7204. if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) {
  7205. if (n === e) return !0;
  7206. if (n !== Po.OPTION && n !== Po.OPTGROUP) return !1
  7207. }
  7208. }
  7209. return !0
  7210. }
  7211. generateImpliedEndTags() {
  7212. for (; nc.has(this.currentTagId);) this.pop()
  7213. }
  7214. generateImpliedEndTagsThoroughly() {
  7215. for (; rc.has(this.currentTagId);) this.pop()
  7216. }
  7217. generateImpliedEndTagsWithExclusion(e) {
  7218. for (; this.currentTagId !== e && rc.has(this.currentTagId);) this.pop()
  7219. }
  7220. }
  7221. var uc;
  7222. !function (e) {
  7223. e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element"
  7224. }(uc = uc || (uc = {}));
  7225. const pc = {type: uc.Marker};
  7226. class fc {
  7227. constructor(e) {
  7228. this.treeAdapter = e, this.entries = [], this.bookmark = null
  7229. }
  7230. _getNoahArkConditionCandidates(e, t) {
  7231. const n = [], r = t.length, i = this.treeAdapter.getTagName(e), s = this.treeAdapter.getNamespaceURI(e);
  7232. for (let e = 0; e < this.entries.length; e++) {
  7233. const t = this.entries[e];
  7234. if (t.type === uc.Marker) break;
  7235. const {element: a} = t;
  7236. if (this.treeAdapter.getTagName(a) === i && this.treeAdapter.getNamespaceURI(a) === s) {
  7237. const t = this.treeAdapter.getAttrList(a);
  7238. t.length === r && n.push({idx: e, attrs: t})
  7239. }
  7240. }
  7241. return n
  7242. }
  7243. _ensureNoahArkCondition(e) {
  7244. if (this.entries.length < 3) return;
  7245. const t = this.treeAdapter.getAttrList(e), n = this._getNoahArkConditionCandidates(e, t);
  7246. if (n.length < 3) return;
  7247. const r = new Map(t.map((e => [e.name, e.value])));
  7248. let i = 0;
  7249. for (let e = 0; e < n.length; e++) {
  7250. const t = n[e];
  7251. t.attrs.every((e => r.get(e.name) === e.value)) && (i += 1, i >= 3 && this.entries.splice(t.idx, 1))
  7252. }
  7253. }
  7254. insertMarker() {
  7255. this.entries.unshift(pc)
  7256. }
  7257. pushElement(e, t) {
  7258. this._ensureNoahArkCondition(e), this.entries.unshift({type: uc.Element, element: e, token: t})
  7259. }
  7260. insertElementAfterBookmark(e, t) {
  7261. const n = this.entries.indexOf(this.bookmark);
  7262. this.entries.splice(n, 0, {type: uc.Element, element: e, token: t})
  7263. }
  7264. removeEntry(e) {
  7265. const t = this.entries.indexOf(e);
  7266. t >= 0 && this.entries.splice(t, 1)
  7267. }
  7268. clearToLastMarker() {
  7269. const e = this.entries.indexOf(pc);
  7270. e >= 0 ? this.entries.splice(0, e + 1) : this.entries.length = 0
  7271. }
  7272. getElementEntryInScopeWithTagName(e) {
  7273. const t = this.entries.find((t => t.type === uc.Marker || this.treeAdapter.getTagName(t.element) === e));
  7274. return t && t.type === uc.Element ? t : null
  7275. }
  7276. getElementEntry(e) {
  7277. return this.entries.find((t => t.type === uc.Element && t.element === e))
  7278. }
  7279. }
  7280. function dc(e) {
  7281. return {nodeName: "#text", value: e, parentNode: null}
  7282. }
  7283. const Ec = {
  7284. createDocument: () => ({nodeName: "#document", mode: Ro.NO_QUIRKS, childNodes: []}),
  7285. createDocumentFragment: () => ({nodeName: "#document-fragment", childNodes: []}),
  7286. createElement: (e, t, n) => ({
  7287. nodeName: e,
  7288. tagName: e,
  7289. attrs: n,
  7290. namespaceURI: t,
  7291. childNodes: [],
  7292. parentNode: null
  7293. }),
  7294. createCommentNode: e => ({nodeName: "#comment", data: e, parentNode: null}),
  7295. appendChild(e, t) {
  7296. e.childNodes.push(t), t.parentNode = e
  7297. },
  7298. insertBefore(e, t, n) {
  7299. const r = e.childNodes.indexOf(n);
  7300. e.childNodes.splice(r, 0, t), t.parentNode = e
  7301. },
  7302. setTemplateContent(e, t) {
  7303. e.content = t
  7304. },
  7305. getTemplateContent: e => e.content,
  7306. setDocumentType(e, t, n, r) {
  7307. const i = e.childNodes.find((e => "#documentType" === e.nodeName));
  7308. if (i) i.name = t, i.publicId = n, i.systemId = r; else {
  7309. const i = {nodeName: "#documentType", name: t, publicId: n, systemId: r, parentNode: null};
  7310. Ec.appendChild(e, i)
  7311. }
  7312. },
  7313. setDocumentMode(e, t) {
  7314. e.mode = t
  7315. },
  7316. getDocumentMode: e => e.mode,
  7317. detachNode(e) {
  7318. if (e.parentNode) {
  7319. const t = e.parentNode.childNodes.indexOf(e);
  7320. e.parentNode.childNodes.splice(t, 1), e.parentNode = null
  7321. }
  7322. },
  7323. insertText(e, t) {
  7324. if (e.childNodes.length > 0) {
  7325. const n = e.childNodes[e.childNodes.length - 1];
  7326. if (Ec.isTextNode(n)) return void (n.value += t)
  7327. }
  7328. Ec.appendChild(e, dc(t))
  7329. },
  7330. insertTextBefore(e, t, n) {
  7331. const r = e.childNodes[e.childNodes.indexOf(n) - 1];
  7332. r && Ec.isTextNode(r) ? r.value += t : Ec.insertBefore(e, dc(t), n)
  7333. },
  7334. adoptAttributes(e, t) {
  7335. const n = new Set(e.attrs.map((e => e.name)));
  7336. for (let r = 0; r < t.length; r++) n.has(t[r].name) || e.attrs.push(t[r])
  7337. },
  7338. getFirstChild: e => e.childNodes[0],
  7339. getChildNodes: e => e.childNodes,
  7340. getParentNode: e => e.parentNode,
  7341. getAttrList: e => e.attrs,
  7342. getTagName: e => e.tagName,
  7343. getNamespaceURI: e => e.namespaceURI,
  7344. getTextNodeContent: e => e.value,
  7345. getCommentNodeContent: e => e.data,
  7346. getDocumentTypeNodeName: e => e.name,
  7347. getDocumentTypeNodePublicId: e => e.publicId,
  7348. getDocumentTypeNodeSystemId: e => e.systemId,
  7349. isTextNode: e => "#text" === e.nodeName,
  7350. isCommentNode: e => "#comment" === e.nodeName,
  7351. isDocumentTypeNode: e => "#documentType" === e.nodeName,
  7352. isElementNode: e => Object.prototype.hasOwnProperty.call(e, "tagName"),
  7353. setNodeSourceCodeLocation(e, t) {
  7354. e.sourceCodeLocation = t
  7355. },
  7356. getNodeSourceCodeLocation: e => e.sourceCodeLocation,
  7357. updateNodeSourceCodeLocation(e, t) {
  7358. e.sourceCodeLocation = {...e.sourceCodeLocation, ...t}
  7359. }
  7360. },
  7361. mc = ["+//silmaril//dtd html pro v0r11 19970101//", "-//as//dtd html 3.0 aswedit + extensions//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", "-//spyglass//dtd html 2.0 extended//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//"],
  7362. Tc = [...mc, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"],
  7363. _c = new Set(["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"]),
  7364. Ac = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"],
  7365. gc = [...Ac, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"];
  7366. function Nc(e, t) {
  7367. return t.some((t => e.startsWith(t)))
  7368. }
  7369. const Cc = "text/html", Ic = "application/xhtml+xml",
  7370. Sc = new Map(["attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map((e => [e.toLowerCase(), e]))),
  7371. bc = new Map([["xlink:actuate", {
  7372. prefix: "xlink",
  7373. name: "actuate",
  7374. namespace: vo.XLINK
  7375. }], ["xlink:arcrole", {prefix: "xlink", name: "arcrole", namespace: vo.XLINK}], ["xlink:href", {
  7376. prefix: "xlink",
  7377. name: "href",
  7378. namespace: vo.XLINK
  7379. }], ["xlink:role", {prefix: "xlink", name: "role", namespace: vo.XLINK}], ["xlink:show", {
  7380. prefix: "xlink",
  7381. name: "show",
  7382. namespace: vo.XLINK
  7383. }], ["xlink:title", {prefix: "xlink", name: "title", namespace: vo.XLINK}], ["xlink:type", {
  7384. prefix: "xlink",
  7385. name: "type",
  7386. namespace: vo.XLINK
  7387. }], ["xml:base", {prefix: "xml", name: "base", namespace: vo.XML}], ["xml:lang", {
  7388. prefix: "xml",
  7389. name: "lang",
  7390. namespace: vo.XML
  7391. }], ["xml:space", {prefix: "xml", name: "space", namespace: vo.XML}], ["xmlns", {
  7392. prefix: "",
  7393. name: "xmlns",
  7394. namespace: vo.XMLNS
  7395. }], ["xmlns:xlink", {prefix: "xmlns", name: "xlink", namespace: vo.XMLNS}]]),
  7396. Oc = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map((e => [e.toLowerCase(), e]))),
  7397. yc = new Set([Po.B, Po.BIG, Po.BLOCKQUOTE, Po.BODY, Po.BR, Po.CENTER, Po.CODE, Po.DD, Po.DIV, Po.DL, Po.DT, Po.EM, Po.EMBED, Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6, Po.HEAD, Po.HR, Po.I, Po.IMG, Po.LI, Po.LISTING, Po.MENU, Po.META, Po.NOBR, Po.OL, Po.P, Po.PRE, Po.RUBY, Po.S, Po.SMALL, Po.SPAN, Po.STRONG, Po.STRIKE, Po.SUB, Po.SUP, Po.TABLE, Po.TT, Po.U, Po.UL, Po.VAR]);
  7398. function Lc(e) {
  7399. for (let t = 0; t < e.attrs.length; t++) if ("definitionurl" === e.attrs[t].name) {
  7400. e.attrs[t].name = "definitionURL";
  7401. break
  7402. }
  7403. }
  7404. function kc(e) {
  7405. for (let t = 0; t < e.attrs.length; t++) {
  7406. const n = Sc.get(e.attrs[t].name);
  7407. null != n && (e.attrs[t].name = n)
  7408. }
  7409. }
  7410. function vc(e) {
  7411. for (let t = 0; t < e.attrs.length; t++) {
  7412. const n = bc.get(e.attrs[t].name);
  7413. n && (e.attrs[t].prefix = n.prefix, e.attrs[t].name = n.name, e.attrs[t].namespace = n.namespace)
  7414. }
  7415. }
  7416. function Dc(e, t, n, r) {
  7417. return (!r || r === vo.HTML) && function (e, t, n) {
  7418. if (t === vo.MATHML && e === Po.ANNOTATION_XML) for (let e = 0; e < n.length; e++) if (n[e].name === Do.ENCODING) {
  7419. const t = n[e].value.toLowerCase();
  7420. return t === Cc || t === Ic
  7421. }
  7422. return t === vo.SVG && (e === Po.FOREIGN_OBJECT || e === Po.DESC || e === Po.TITLE)
  7423. }(e, t, n) || (!r || r === vo.MATHML) && function (e, t) {
  7424. return t === vo.MATHML && (e === Po.MI || e === Po.MO || e === Po.MN || e === Po.MS || e === Po.MTEXT)
  7425. }(e, t)
  7426. }
  7427. var Rc;
  7428. !function (e) {
  7429. e[e.INITIAL = 0] = "INITIAL", e[e.BEFORE_HTML = 1] = "BEFORE_HTML", e[e.BEFORE_HEAD = 2] = "BEFORE_HEAD", e[e.IN_HEAD = 3] = "IN_HEAD", e[e.IN_HEAD_NO_SCRIPT = 4] = "IN_HEAD_NO_SCRIPT", e[e.AFTER_HEAD = 5] = "AFTER_HEAD", e[e.IN_BODY = 6] = "IN_BODY", e[e.TEXT = 7] = "TEXT", e[e.IN_TABLE = 8] = "IN_TABLE", e[e.IN_TABLE_TEXT = 9] = "IN_TABLE_TEXT", e[e.IN_CAPTION = 10] = "IN_CAPTION", e[e.IN_COLUMN_GROUP = 11] = "IN_COLUMN_GROUP", e[e.IN_TABLE_BODY = 12] = "IN_TABLE_BODY", e[e.IN_ROW = 13] = "IN_ROW", e[e.IN_CELL = 14] = "IN_CELL", e[e.IN_SELECT = 15] = "IN_SELECT", e[e.IN_SELECT_IN_TABLE = 16] = "IN_SELECT_IN_TABLE", e[e.IN_TEMPLATE = 17] = "IN_TEMPLATE", e[e.AFTER_BODY = 18] = "AFTER_BODY", e[e.IN_FRAMESET = 19] = "IN_FRAMESET", e[e.AFTER_FRAMESET = 20] = "AFTER_FRAMESET", e[e.AFTER_AFTER_BODY = 21] = "AFTER_AFTER_BODY", e[e.AFTER_AFTER_FRAMESET = 22] = "AFTER_AFTER_FRAMESET"
  7430. }(Rc || (Rc = {}));
  7431. const Mc = {startLine: -1, startCol: -1, startOffset: -1, endLine: -1, endCol: -1, endOffset: -1},
  7432. Pc = new Set([Po.TABLE, Po.TBODY, Po.TFOOT, Po.THEAD, Po.TR]),
  7433. xc = {scriptingEnabled: !0, sourceCodeLocationInfo: !1, treeAdapter: Ec, onParseError: null};
  7434. class wc {
  7435. constructor(e, t, n = null, r = null) {
  7436. this.fragmentContext = n, this.scriptHandler = r, this.currentToken = null, this.stopped = !1, this.insertionMode = Rc.INITIAL, this.originalInsertionMode = Rc.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = {...xc, ...e}, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = null != t ? t : this.treeAdapter.createDocument(), this.tokenizer = new tc(this.options, this), this.activeFormattingElements = new fc(this.treeAdapter), this.fragmentContextID = n ? Fo(this.treeAdapter.getTagName(n)) : Po.UNKNOWN, this._setContextModes(null != n ? n : this.document, this.fragmentContextID), this.openElements = new hc(this.document, this.treeAdapter, this)
  7437. }
  7438. static parse(e, t) {
  7439. const n = new this(t);
  7440. return n.tokenizer.write(e, !0), n.document
  7441. }
  7442. static getFragmentParser(e, t) {
  7443. const n = {...xc, ...t};
  7444. null != e || (e = n.treeAdapter.createElement(Mo.TEMPLATE, vo.HTML, []));
  7445. const r = n.treeAdapter.createElement("documentmock", vo.HTML, []), i = new this(n, r, e);
  7446. return i.fragmentContextID === Po.TEMPLATE && i.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i
  7447. }
  7448. getFragment() {
  7449. const e = this.treeAdapter.getFirstChild(this.document), t = this.treeAdapter.createDocumentFragment();
  7450. return this._adoptNodes(e, t), t
  7451. }
  7452. _err(e, t, n) {
  7453. var r;
  7454. if (!this.onParseError) return;
  7455. const i = null !== (r = e.location) && void 0 !== r ? r : Mc, s = {
  7456. code: t,
  7457. startLine: i.startLine,
  7458. startCol: i.startCol,
  7459. startOffset: i.startOffset,
  7460. endLine: n ? i.startLine : i.endLine,
  7461. endCol: n ? i.startCol : i.endCol,
  7462. endOffset: n ? i.startOffset : i.endOffset
  7463. };
  7464. this.onParseError(s)
  7465. }
  7466. onItemPush(e, t, n) {
  7467. var r, i;
  7468. null === (i = (r = this.treeAdapter).onItemPush) || void 0 === i || i.call(r, e), n && this.openElements.stackTop > 0 && this._setContextModes(e, t)
  7469. }
  7470. onItemPop(e, t) {
  7471. var n, r;
  7472. if (this.options.sourceCodeLocationInfo && this._setEndLocation(e, this.currentToken), null === (r = (n = this.treeAdapter).onItemPop) || void 0 === r || r.call(n, e, this.openElements.current), t) {
  7473. let e, t;
  7474. 0 === this.openElements.stackTop && this.fragmentContext ? (e = this.fragmentContext, t = this.fragmentContextID) : ({
  7475. current: e,
  7476. currentTagId: t
  7477. } = this.openElements), this._setContextModes(e, t)
  7478. }
  7479. }
  7480. _setContextModes(e, t) {
  7481. const n = e === this.document || this.treeAdapter.getNamespaceURI(e) === vo.HTML;
  7482. this.currentNotInHTML = !n, this.tokenizer.inForeignNode = !n && !this._isIntegrationPoint(t, e)
  7483. }
  7484. _switchToTextParsing(e, t) {
  7485. this._insertElement(e, vo.HTML), this.tokenizer.state = t, this.originalInsertionMode = this.insertionMode, this.insertionMode = Rc.TEXT
  7486. }
  7487. switchToPlaintextParsing() {
  7488. this.insertionMode = Rc.TEXT, this.originalInsertionMode = Rc.IN_BODY, this.tokenizer.state = jo.PLAINTEXT
  7489. }
  7490. _getAdjustedCurrentElement() {
  7491. return 0 === this.openElements.stackTop && this.fragmentContext ? this.fragmentContext : this.openElements.current
  7492. }
  7493. _findFormInFragmentContext() {
  7494. let e = this.fragmentContext;
  7495. for (; e;) {
  7496. if (this.treeAdapter.getTagName(e) === Mo.FORM) {
  7497. this.formElement = e;
  7498. break
  7499. }
  7500. e = this.treeAdapter.getParentNode(e)
  7501. }
  7502. }
  7503. _initTokenizerForFragmentParsing() {
  7504. if (this.fragmentContext && this.treeAdapter.getNamespaceURI(this.fragmentContext) === vo.HTML) switch (this.fragmentContextID) {
  7505. case Po.TITLE:
  7506. case Po.TEXTAREA:
  7507. this.tokenizer.state = jo.RCDATA;
  7508. break;
  7509. case Po.STYLE:
  7510. case Po.XMP:
  7511. case Po.IFRAME:
  7512. case Po.NOEMBED:
  7513. case Po.NOFRAMES:
  7514. case Po.NOSCRIPT:
  7515. this.tokenizer.state = jo.RAWTEXT;
  7516. break;
  7517. case Po.SCRIPT:
  7518. this.tokenizer.state = jo.SCRIPT_DATA;
  7519. break;
  7520. case Po.PLAINTEXT:
  7521. this.tokenizer.state = jo.PLAINTEXT
  7522. }
  7523. }
  7524. _setDocumentType(e) {
  7525. const t = e.name || "", n = e.publicId || "", r = e.systemId || "";
  7526. if (this.treeAdapter.setDocumentType(this.document, t, n, r), e.location) {
  7527. const t = this.treeAdapter.getChildNodes(this.document).find((e => this.treeAdapter.isDocumentTypeNode(e)));
  7528. t && this.treeAdapter.setNodeSourceCodeLocation(t, e.location)
  7529. }
  7530. }
  7531. _attachElementToTree(e, t) {
  7532. if (this.options.sourceCodeLocationInfo) {
  7533. const n = t && {...t, startTag: t};
  7534. this.treeAdapter.setNodeSourceCodeLocation(e, n)
  7535. }
  7536. if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(e); else {
  7537. const t = this.openElements.currentTmplContentOrNode;
  7538. this.treeAdapter.appendChild(t, e)
  7539. }
  7540. }
  7541. _appendElement(e, t) {
  7542. const n = this.treeAdapter.createElement(e.tagName, t, e.attrs);
  7543. this._attachElementToTree(n, e.location)
  7544. }
  7545. _insertElement(e, t) {
  7546. const n = this.treeAdapter.createElement(e.tagName, t, e.attrs);
  7547. this._attachElementToTree(n, e.location), this.openElements.push(n, e.tagID)
  7548. }
  7549. _insertFakeElement(e, t) {
  7550. const n = this.treeAdapter.createElement(e, vo.HTML, []);
  7551. this._attachElementToTree(n, null), this.openElements.push(n, t)
  7552. }
  7553. _insertTemplate(e) {
  7554. const t = this.treeAdapter.createElement(e.tagName, vo.HTML, e.attrs),
  7555. n = this.treeAdapter.createDocumentFragment();
  7556. this.treeAdapter.setTemplateContent(t, n), this._attachElementToTree(t, e.location), this.openElements.push(t, e.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, null)
  7557. }
  7558. _insertFakeRootElement() {
  7559. const e = this.treeAdapter.createElement(Mo.HTML, vo.HTML, []);
  7560. this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(e, null), this.treeAdapter.appendChild(this.openElements.current, e), this.openElements.push(e, Po.HTML)
  7561. }
  7562. _appendCommentNode(e, t) {
  7563. const n = this.treeAdapter.createCommentNode(e.data);
  7564. this.treeAdapter.appendChild(t, n), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, e.location)
  7565. }
  7566. _insertCharacters(e) {
  7567. let t, n;
  7568. if (this._shouldFosterParentOnInsertion() ? (({
  7569. parent: t,
  7570. beforeElement: n
  7571. } = this._findFosterParentingLocation()), n ? this.treeAdapter.insertTextBefore(t, e.chars, n) : this.treeAdapter.insertText(t, e.chars)) : (t = this.openElements.currentTmplContentOrNode, this.treeAdapter.insertText(t, e.chars)), !e.location) return;
  7572. const r = this.treeAdapter.getChildNodes(t), i = n ? r.lastIndexOf(n) : r.length, s = r[i - 1];
  7573. if (this.treeAdapter.getNodeSourceCodeLocation(s)) {
  7574. const {endLine: t, endCol: n, endOffset: r} = e.location;
  7575. this.treeAdapter.updateNodeSourceCodeLocation(s, {endLine: t, endCol: n, endOffset: r})
  7576. } else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(s, e.location)
  7577. }
  7578. _adoptNodes(e, t) {
  7579. for (let n = this.treeAdapter.getFirstChild(e); n; n = this.treeAdapter.getFirstChild(e)) this.treeAdapter.detachNode(n), this.treeAdapter.appendChild(t, n)
  7580. }
  7581. _setEndLocation(e, t) {
  7582. if (this.treeAdapter.getNodeSourceCodeLocation(e) && t.location) {
  7583. const n = t.location, r = this.treeAdapter.getTagName(e), i = t.type === To.END_TAG && r === t.tagName ? {
  7584. endTag: {...n},
  7585. endLine: n.endLine,
  7586. endCol: n.endCol,
  7587. endOffset: n.endOffset
  7588. } : {endLine: n.startLine, endCol: n.startCol, endOffset: n.startOffset};
  7589. this.treeAdapter.updateNodeSourceCodeLocation(e, i)
  7590. }
  7591. }
  7592. shouldProcessStartTagTokenInForeignContent(e) {
  7593. if (!this.currentNotInHTML) return !1;
  7594. let t, n;
  7595. return 0 === this.openElements.stackTop && this.fragmentContext ? (t = this.fragmentContext, n = this.fragmentContextID) : ({
  7596. current: t,
  7597. currentTagId: n
  7598. } = this.openElements), (e.tagID !== Po.SVG || this.treeAdapter.getTagName(t) !== Mo.ANNOTATION_XML || this.treeAdapter.getNamespaceURI(t) !== vo.MATHML) && (this.tokenizer.inForeignNode || (e.tagID === Po.MGLYPH || e.tagID === Po.MALIGNMARK) && !this._isIntegrationPoint(n, t, vo.HTML))
  7599. }
  7600. _processToken(e) {
  7601. switch (e.type) {
  7602. case To.CHARACTER:
  7603. this.onCharacter(e);
  7604. break;
  7605. case To.NULL_CHARACTER:
  7606. this.onNullCharacter(e);
  7607. break;
  7608. case To.COMMENT:
  7609. this.onComment(e);
  7610. break;
  7611. case To.DOCTYPE:
  7612. this.onDoctype(e);
  7613. break;
  7614. case To.START_TAG:
  7615. this._processStartTag(e);
  7616. break;
  7617. case To.END_TAG:
  7618. this.onEndTag(e);
  7619. break;
  7620. case To.EOF:
  7621. this.onEof(e);
  7622. break;
  7623. case To.WHITESPACE_CHARACTER:
  7624. this.onWhitespaceCharacter(e)
  7625. }
  7626. }
  7627. _isIntegrationPoint(e, t, n) {
  7628. return Dc(e, this.treeAdapter.getNamespaceURI(t), this.treeAdapter.getAttrList(t), n)
  7629. }
  7630. _reconstructActiveFormattingElements() {
  7631. const e = this.activeFormattingElements.entries.length;
  7632. if (e) {
  7633. const t = this.activeFormattingElements.entries.findIndex((e => e.type === uc.Marker || this.openElements.contains(e.element)));
  7634. for (let n = t < 0 ? e - 1 : t - 1; n >= 0; n--) {
  7635. const e = this.activeFormattingElements.entries[n];
  7636. this._insertElement(e.token, this.treeAdapter.getNamespaceURI(e.element)), e.element = this.openElements.current
  7637. }
  7638. }
  7639. }
  7640. _closeTableCell() {
  7641. this.openElements.generateImpliedEndTags(), this.openElements.popUntilTableCellPopped(), this.activeFormattingElements.clearToLastMarker(), this.insertionMode = Rc.IN_ROW
  7642. }
  7643. _closePElement() {
  7644. this.openElements.generateImpliedEndTagsWithExclusion(Po.P), this.openElements.popUntilTagNamePopped(Po.P)
  7645. }
  7646. _resetInsertionMode() {
  7647. for (let e = this.openElements.stackTop; e >= 0; e--) switch (0 === e && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[e]) {
  7648. case Po.TR:
  7649. return void (this.insertionMode = Rc.IN_ROW);
  7650. case Po.TBODY:
  7651. case Po.THEAD:
  7652. case Po.TFOOT:
  7653. return void (this.insertionMode = Rc.IN_TABLE_BODY);
  7654. case Po.CAPTION:
  7655. return void (this.insertionMode = Rc.IN_CAPTION);
  7656. case Po.COLGROUP:
  7657. return void (this.insertionMode = Rc.IN_COLUMN_GROUP);
  7658. case Po.TABLE:
  7659. return void (this.insertionMode = Rc.IN_TABLE);
  7660. case Po.BODY:
  7661. return void (this.insertionMode = Rc.IN_BODY);
  7662. case Po.FRAMESET:
  7663. return void (this.insertionMode = Rc.IN_FRAMESET);
  7664. case Po.SELECT:
  7665. return void this._resetInsertionModeForSelect(e);
  7666. case Po.TEMPLATE:
  7667. return void (this.insertionMode = this.tmplInsertionModeStack[0]);
  7668. case Po.HTML:
  7669. return void (this.insertionMode = this.headElement ? Rc.AFTER_HEAD : Rc.BEFORE_HEAD);
  7670. case Po.TD:
  7671. case Po.TH:
  7672. if (e > 0) return void (this.insertionMode = Rc.IN_CELL);
  7673. break;
  7674. case Po.HEAD:
  7675. if (e > 0) return void (this.insertionMode = Rc.IN_HEAD)
  7676. }
  7677. this.insertionMode = Rc.IN_BODY
  7678. }
  7679. _resetInsertionModeForSelect(e) {
  7680. if (e > 0) for (let t = e - 1; t > 0; t--) {
  7681. const e = this.openElements.tagIDs[t];
  7682. if (e === Po.TEMPLATE) break;
  7683. if (e === Po.TABLE) return void (this.insertionMode = Rc.IN_SELECT_IN_TABLE)
  7684. }
  7685. this.insertionMode = Rc.IN_SELECT
  7686. }
  7687. _isElementCausesFosterParenting(e) {
  7688. return Pc.has(e)
  7689. }
  7690. _shouldFosterParentOnInsertion() {
  7691. return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId)
  7692. }
  7693. _findFosterParentingLocation() {
  7694. for (let e = this.openElements.stackTop; e >= 0; e--) {
  7695. const t = this.openElements.items[e];
  7696. switch (this.openElements.tagIDs[e]) {
  7697. case Po.TEMPLATE:
  7698. if (this.treeAdapter.getNamespaceURI(t) === vo.HTML) return {
  7699. parent: this.treeAdapter.getTemplateContent(t),
  7700. beforeElement: null
  7701. };
  7702. break;
  7703. case Po.TABLE: {
  7704. const n = this.treeAdapter.getParentNode(t);
  7705. return n ? {parent: n, beforeElement: t} : {
  7706. parent: this.openElements.items[e - 1],
  7707. beforeElement: null
  7708. }
  7709. }
  7710. }
  7711. }
  7712. return {parent: this.openElements.items[0], beforeElement: null}
  7713. }
  7714. _fosterParentElement(e) {
  7715. const t = this._findFosterParentingLocation();
  7716. t.beforeElement ? this.treeAdapter.insertBefore(t.parent, e, t.beforeElement) : this.treeAdapter.appendChild(t.parent, e)
  7717. }
  7718. _isSpecialElement(e, t) {
  7719. const n = this.treeAdapter.getNamespaceURI(e);
  7720. return Ho[n].has(t)
  7721. }
  7722. onCharacter(e) {
  7723. if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) !function (e, t) {
  7724. e._insertCharacters(t), e.framesetOk = !1
  7725. }(this, e); else switch (this.insertionMode) {
  7726. case Rc.INITIAL:
  7727. Vc(this, e);
  7728. break;
  7729. case Rc.BEFORE_HTML:
  7730. Wc(this, e);
  7731. break;
  7732. case Rc.BEFORE_HEAD:
  7733. Qc(this, e);
  7734. break;
  7735. case Rc.IN_HEAD:
  7736. zc(this, e);
  7737. break;
  7738. case Rc.IN_HEAD_NO_SCRIPT:
  7739. Jc(this, e);
  7740. break;
  7741. case Rc.AFTER_HEAD:
  7742. Zc(this, e);
  7743. break;
  7744. case Rc.IN_BODY:
  7745. case Rc.IN_CAPTION:
  7746. case Rc.IN_CELL:
  7747. case Rc.IN_TEMPLATE:
  7748. nl(this, e);
  7749. break;
  7750. case Rc.TEXT:
  7751. case Rc.IN_SELECT:
  7752. case Rc.IN_SELECT_IN_TABLE:
  7753. this._insertCharacters(e);
  7754. break;
  7755. case Rc.IN_TABLE:
  7756. case Rc.IN_TABLE_BODY:
  7757. case Rc.IN_ROW:
  7758. ul(this, e);
  7759. break;
  7760. case Rc.IN_TABLE_TEXT:
  7761. ml(this, e);
  7762. break;
  7763. case Rc.IN_COLUMN_GROUP:
  7764. gl(this, e);
  7765. break;
  7766. case Rc.AFTER_BODY:
  7767. kl(this, e);
  7768. break;
  7769. case Rc.AFTER_AFTER_BODY:
  7770. vl(this, e)
  7771. }
  7772. }
  7773. onNullCharacter(e) {
  7774. if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) !function (e, t) {
  7775. t.chars = "�", e._insertCharacters(t)
  7776. }(this, e); else switch (this.insertionMode) {
  7777. case Rc.INITIAL:
  7778. Vc(this, e);
  7779. break;
  7780. case Rc.BEFORE_HTML:
  7781. Wc(this, e);
  7782. break;
  7783. case Rc.BEFORE_HEAD:
  7784. Qc(this, e);
  7785. break;
  7786. case Rc.IN_HEAD:
  7787. zc(this, e);
  7788. break;
  7789. case Rc.IN_HEAD_NO_SCRIPT:
  7790. Jc(this, e);
  7791. break;
  7792. case Rc.AFTER_HEAD:
  7793. Zc(this, e);
  7794. break;
  7795. case Rc.TEXT:
  7796. this._insertCharacters(e);
  7797. break;
  7798. case Rc.IN_TABLE:
  7799. case Rc.IN_TABLE_BODY:
  7800. case Rc.IN_ROW:
  7801. ul(this, e);
  7802. break;
  7803. case Rc.IN_COLUMN_GROUP:
  7804. gl(this, e);
  7805. break;
  7806. case Rc.AFTER_BODY:
  7807. kl(this, e);
  7808. break;
  7809. case Rc.AFTER_AFTER_BODY:
  7810. vl(this, e)
  7811. }
  7812. }
  7813. onComment(e) {
  7814. if (this.skipNextNewLine = !1, this.currentNotInHTML) Kc(this, e); else switch (this.insertionMode) {
  7815. case Rc.INITIAL:
  7816. case Rc.BEFORE_HTML:
  7817. case Rc.BEFORE_HEAD:
  7818. case Rc.IN_HEAD:
  7819. case Rc.IN_HEAD_NO_SCRIPT:
  7820. case Rc.AFTER_HEAD:
  7821. case Rc.IN_BODY:
  7822. case Rc.IN_TABLE:
  7823. case Rc.IN_CAPTION:
  7824. case Rc.IN_COLUMN_GROUP:
  7825. case Rc.IN_TABLE_BODY:
  7826. case Rc.IN_ROW:
  7827. case Rc.IN_CELL:
  7828. case Rc.IN_SELECT:
  7829. case Rc.IN_SELECT_IN_TABLE:
  7830. case Rc.IN_TEMPLATE:
  7831. case Rc.IN_FRAMESET:
  7832. case Rc.AFTER_FRAMESET:
  7833. Kc(this, e);
  7834. break;
  7835. case Rc.IN_TABLE_TEXT:
  7836. Tl(this, e);
  7837. break;
  7838. case Rc.AFTER_BODY:
  7839. !function (e, t) {
  7840. e._appendCommentNode(t, e.openElements.items[0])
  7841. }(this, e);
  7842. break;
  7843. case Rc.AFTER_AFTER_BODY:
  7844. case Rc.AFTER_AFTER_FRAMESET:
  7845. !function (e, t) {
  7846. e._appendCommentNode(t, e.document)
  7847. }(this, e)
  7848. }
  7849. }
  7850. onDoctype(e) {
  7851. switch (this.skipNextNewLine = !1, this.insertionMode) {
  7852. case Rc.INITIAL:
  7853. !function (e, t) {
  7854. e._setDocumentType(t);
  7855. const n = t.forceQuirks ? Ro.QUIRKS : function (e) {
  7856. if ("html" !== e.name) return Ro.QUIRKS;
  7857. const {systemId: t} = e;
  7858. if (t && "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" === t.toLowerCase()) return Ro.QUIRKS;
  7859. let {publicId: n} = e;
  7860. if (null !== n) {
  7861. if (n = n.toLowerCase(), _c.has(n)) return Ro.QUIRKS;
  7862. let e = null === t ? Tc : mc;
  7863. if (Nc(n, e)) return Ro.QUIRKS;
  7864. if (e = null === t ? Ac : gc, Nc(n, e)) return Ro.LIMITED_QUIRKS
  7865. }
  7866. return Ro.NO_QUIRKS
  7867. }(t);
  7868. (function (e) {
  7869. return "html" === e.name && null === e.publicId && (null === e.systemId || "about:legacy-compat" === e.systemId)
  7870. })(t) || e._err(t, Eo.nonConformingDoctype);
  7871. e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = Rc.BEFORE_HTML
  7872. }(this, e);
  7873. break;
  7874. case Rc.BEFORE_HEAD:
  7875. case Rc.IN_HEAD:
  7876. case Rc.IN_HEAD_NO_SCRIPT:
  7877. case Rc.AFTER_HEAD:
  7878. this._err(e, Eo.misplacedDoctype);
  7879. break;
  7880. case Rc.IN_TABLE_TEXT:
  7881. Tl(this, e)
  7882. }
  7883. }
  7884. onStartTag(e) {
  7885. this.skipNextNewLine = !1, this.currentToken = e, this._processStartTag(e), e.selfClosing && !e.ackSelfClosing && this._err(e, Eo.nonVoidHtmlElementStartTagWithTrailingSolidus)
  7886. }
  7887. _processStartTag(e) {
  7888. this.shouldProcessStartTagTokenInForeignContent(e) ? function (e, t) {
  7889. if (function (e) {
  7890. const t = e.tagID;
  7891. return t === Po.FONT && e.attrs.some((({name: e}) => e === Do.COLOR || e === Do.SIZE || e === Do.FACE)) || yc.has(t)
  7892. }(t)) Dl(e), e._startTagOutsideForeignContent(t); else {
  7893. const n = e._getAdjustedCurrentElement(), r = e.treeAdapter.getNamespaceURI(n);
  7894. r === vo.MATHML ? Lc(t) : r === vo.SVG && (!function (e) {
  7895. const t = Oc.get(e.tagName);
  7896. null != t && (e.tagName = t, e.tagID = Fo(e.tagName))
  7897. }(t), kc(t)), vc(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0
  7898. }
  7899. }(this, e) : this._startTagOutsideForeignContent(e)
  7900. }
  7901. _startTagOutsideForeignContent(e) {
  7902. switch (this.insertionMode) {
  7903. case Rc.INITIAL:
  7904. Vc(this, e);
  7905. break;
  7906. case Rc.BEFORE_HTML:
  7907. !function (e, t) {
  7908. t.tagID === Po.HTML ? (e._insertElement(t, vo.HTML), e.insertionMode = Rc.BEFORE_HEAD) : Wc(e, t)
  7909. }(this, e);
  7910. break;
  7911. case Rc.BEFORE_HEAD:
  7912. !function (e, t) {
  7913. switch (t.tagID) {
  7914. case Po.HTML:
  7915. ol(e, t);
  7916. break;
  7917. case Po.HEAD:
  7918. e._insertElement(t, vo.HTML), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD;
  7919. break;
  7920. default:
  7921. Qc(e, t)
  7922. }
  7923. }(this, e);
  7924. break;
  7925. case Rc.IN_HEAD:
  7926. Xc(this, e);
  7927. break;
  7928. case Rc.IN_HEAD_NO_SCRIPT:
  7929. !function (e, t) {
  7930. switch (t.tagID) {
  7931. case Po.HTML:
  7932. ol(e, t);
  7933. break;
  7934. case Po.BASEFONT:
  7935. case Po.BGSOUND:
  7936. case Po.HEAD:
  7937. case Po.LINK:
  7938. case Po.META:
  7939. case Po.NOFRAMES:
  7940. case Po.STYLE:
  7941. Xc(e, t);
  7942. break;
  7943. case Po.NOSCRIPT:
  7944. e._err(t, Eo.nestedNoscriptInHead);
  7945. break;
  7946. default:
  7947. Jc(e, t)
  7948. }
  7949. }(this, e);
  7950. break;
  7951. case Rc.AFTER_HEAD:
  7952. !function (e, t) {
  7953. switch (t.tagID) {
  7954. case Po.HTML:
  7955. ol(e, t);
  7956. break;
  7957. case Po.BODY:
  7958. e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_BODY;
  7959. break;
  7960. case Po.FRAMESET:
  7961. e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET;
  7962. break;
  7963. case Po.BASE:
  7964. case Po.BASEFONT:
  7965. case Po.BGSOUND:
  7966. case Po.LINK:
  7967. case Po.META:
  7968. case Po.NOFRAMES:
  7969. case Po.SCRIPT:
  7970. case Po.STYLE:
  7971. case Po.TEMPLATE:
  7972. case Po.TITLE:
  7973. e._err(t, Eo.abandonedHeadElementChild), e.openElements.push(e.headElement, Po.HEAD), Xc(e, t), e.openElements.remove(e.headElement);
  7974. break;
  7975. case Po.HEAD:
  7976. e._err(t, Eo.misplacedStartTagForHeadElement);
  7977. break;
  7978. default:
  7979. Zc(e, t)
  7980. }
  7981. }(this, e);
  7982. break;
  7983. case Rc.IN_BODY:
  7984. ol(this, e);
  7985. break;
  7986. case Rc.IN_TABLE:
  7987. pl(this, e);
  7988. break;
  7989. case Rc.IN_TABLE_TEXT:
  7990. Tl(this, e);
  7991. break;
  7992. case Rc.IN_CAPTION:
  7993. !function (e, t) {
  7994. const n = t.tagID;
  7995. _l.has(n) ? e.openElements.hasInTableScope(Po.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_TABLE, pl(e, t)) : ol(e, t)
  7996. }(this, e);
  7997. break;
  7998. case Rc.IN_COLUMN_GROUP:
  7999. Al(this, e);
  8000. break;
  8001. case Rc.IN_TABLE_BODY:
  8002. Nl(this, e);
  8003. break;
  8004. case Rc.IN_ROW:
  8005. Il(this, e);
  8006. break;
  8007. case Rc.IN_CELL:
  8008. !function (e, t) {
  8009. const n = t.tagID;
  8010. _l.has(n) ? (e.openElements.hasInTableScope(Po.TD) || e.openElements.hasInTableScope(Po.TH)) && (e._closeTableCell(), Il(e, t)) : ol(e, t)
  8011. }(this, e);
  8012. break;
  8013. case Rc.IN_SELECT:
  8014. bl(this, e);
  8015. break;
  8016. case Rc.IN_SELECT_IN_TABLE:
  8017. !function (e, t) {
  8018. const n = t.tagID;
  8019. n === Po.CAPTION || n === Po.TABLE || n === Po.TBODY || n === Po.TFOOT || n === Po.THEAD || n === Po.TR || n === Po.TD || n === Po.TH ? (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), e._processStartTag(t)) : bl(e, t)
  8020. }(this, e);
  8021. break;
  8022. case Rc.IN_TEMPLATE:
  8023. !function (e, t) {
  8024. switch (t.tagID) {
  8025. case Po.BASE:
  8026. case Po.BASEFONT:
  8027. case Po.BGSOUND:
  8028. case Po.LINK:
  8029. case Po.META:
  8030. case Po.NOFRAMES:
  8031. case Po.SCRIPT:
  8032. case Po.STYLE:
  8033. case Po.TEMPLATE:
  8034. case Po.TITLE:
  8035. Xc(e, t);
  8036. break;
  8037. case Po.CAPTION:
  8038. case Po.COLGROUP:
  8039. case Po.TBODY:
  8040. case Po.TFOOT:
  8041. case Po.THEAD:
  8042. e.tmplInsertionModeStack[0] = Rc.IN_TABLE, e.insertionMode = Rc.IN_TABLE, pl(e, t);
  8043. break;
  8044. case Po.COL:
  8045. e.tmplInsertionModeStack[0] = Rc.IN_COLUMN_GROUP, e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t);
  8046. break;
  8047. case Po.TR:
  8048. e.tmplInsertionModeStack[0] = Rc.IN_TABLE_BODY, e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t);
  8049. break;
  8050. case Po.TD:
  8051. case Po.TH:
  8052. e.tmplInsertionModeStack[0] = Rc.IN_ROW, e.insertionMode = Rc.IN_ROW, Il(e, t);
  8053. break;
  8054. default:
  8055. e.tmplInsertionModeStack[0] = Rc.IN_BODY, e.insertionMode = Rc.IN_BODY, ol(e, t)
  8056. }
  8057. }(this, e);
  8058. break;
  8059. case Rc.AFTER_BODY:
  8060. !function (e, t) {
  8061. t.tagID === Po.HTML ? ol(e, t) : kl(e, t)
  8062. }(this, e);
  8063. break;
  8064. case Rc.IN_FRAMESET:
  8065. !function (e, t) {
  8066. switch (t.tagID) {
  8067. case Po.HTML:
  8068. ol(e, t);
  8069. break;
  8070. case Po.FRAMESET:
  8071. e._insertElement(t, vo.HTML);
  8072. break;
  8073. case Po.FRAME:
  8074. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  8075. break;
  8076. case Po.NOFRAMES:
  8077. Xc(e, t)
  8078. }
  8079. }(this, e);
  8080. break;
  8081. case Rc.AFTER_FRAMESET:
  8082. !function (e, t) {
  8083. switch (t.tagID) {
  8084. case Po.HTML:
  8085. ol(e, t);
  8086. break;
  8087. case Po.NOFRAMES:
  8088. Xc(e, t)
  8089. }
  8090. }(this, e);
  8091. break;
  8092. case Rc.AFTER_AFTER_BODY:
  8093. !function (e, t) {
  8094. t.tagID === Po.HTML ? ol(e, t) : vl(e, t)
  8095. }(this, e);
  8096. break;
  8097. case Rc.AFTER_AFTER_FRAMESET:
  8098. !function (e, t) {
  8099. switch (t.tagID) {
  8100. case Po.HTML:
  8101. ol(e, t);
  8102. break;
  8103. case Po.NOFRAMES:
  8104. Xc(e, t)
  8105. }
  8106. }(this, e)
  8107. }
  8108. }
  8109. onEndTag(e) {
  8110. this.skipNextNewLine = !1, this.currentToken = e, this.currentNotInHTML ? function (e, t) {
  8111. if (t.tagID === Po.P || t.tagID === Po.BR) return Dl(e), void e._endTagOutsideForeignContent(t);
  8112. for (let n = e.openElements.stackTop; n > 0; n--) {
  8113. const r = e.openElements.items[n];
  8114. if (e.treeAdapter.getNamespaceURI(r) === vo.HTML) {
  8115. e._endTagOutsideForeignContent(t);
  8116. break
  8117. }
  8118. const i = e.treeAdapter.getTagName(r);
  8119. if (i.toLowerCase() === t.tagName) {
  8120. t.tagName = i, e.openElements.shortenToLength(n);
  8121. break
  8122. }
  8123. }
  8124. }(this, e) : this._endTagOutsideForeignContent(e)
  8125. }
  8126. _endTagOutsideForeignContent(e) {
  8127. switch (this.insertionMode) {
  8128. case Rc.INITIAL:
  8129. Vc(this, e);
  8130. break;
  8131. case Rc.BEFORE_HTML:
  8132. !function (e, t) {
  8133. const n = t.tagID;
  8134. n !== Po.HTML && n !== Po.HEAD && n !== Po.BODY && n !== Po.BR || Wc(e, t)
  8135. }(this, e);
  8136. break;
  8137. case Rc.BEFORE_HEAD:
  8138. !function (e, t) {
  8139. const n = t.tagID;
  8140. n === Po.HEAD || n === Po.BODY || n === Po.HTML || n === Po.BR ? Qc(e, t) : e._err(t, Eo.endTagWithoutMatchingOpenElement)
  8141. }(this, e);
  8142. break;
  8143. case Rc.IN_HEAD:
  8144. !function (e, t) {
  8145. switch (t.tagID) {
  8146. case Po.HEAD:
  8147. e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD;
  8148. break;
  8149. case Po.BODY:
  8150. case Po.BR:
  8151. case Po.HTML:
  8152. zc(e, t);
  8153. break;
  8154. case Po.TEMPLATE:
  8155. $c(e, t);
  8156. break;
  8157. default:
  8158. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  8159. }
  8160. }(this, e);
  8161. break;
  8162. case Rc.IN_HEAD_NO_SCRIPT:
  8163. !function (e, t) {
  8164. switch (t.tagID) {
  8165. case Po.NOSCRIPT:
  8166. e.openElements.pop(), e.insertionMode = Rc.IN_HEAD;
  8167. break;
  8168. case Po.BR:
  8169. Jc(e, t);
  8170. break;
  8171. default:
  8172. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  8173. }
  8174. }(this, e);
  8175. break;
  8176. case Rc.AFTER_HEAD:
  8177. !function (e, t) {
  8178. switch (t.tagID) {
  8179. case Po.BODY:
  8180. case Po.HTML:
  8181. case Po.BR:
  8182. Zc(e, t);
  8183. break;
  8184. case Po.TEMPLATE:
  8185. $c(e, t);
  8186. break;
  8187. default:
  8188. e._err(t, Eo.endTagWithoutMatchingOpenElement)
  8189. }
  8190. }(this, e);
  8191. break;
  8192. case Rc.IN_BODY:
  8193. ll(this, e);
  8194. break;
  8195. case Rc.TEXT:
  8196. !function (e, t) {
  8197. var n;
  8198. t.tagID === Po.SCRIPT && (null === (n = e.scriptHandler) || void 0 === n || n.call(e, e.openElements.current));
  8199. e.openElements.pop(), e.insertionMode = e.originalInsertionMode
  8200. }(this, e);
  8201. break;
  8202. case Rc.IN_TABLE:
  8203. fl(this, e);
  8204. break;
  8205. case Rc.IN_TABLE_TEXT:
  8206. Tl(this, e);
  8207. break;
  8208. case Rc.IN_CAPTION:
  8209. !function (e, t) {
  8210. const n = t.tagID;
  8211. switch (n) {
  8212. case Po.CAPTION:
  8213. case Po.TABLE:
  8214. e.openElements.hasInTableScope(Po.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_TABLE, n === Po.TABLE && fl(e, t));
  8215. break;
  8216. case Po.BODY:
  8217. case Po.COL:
  8218. case Po.COLGROUP:
  8219. case Po.HTML:
  8220. case Po.TBODY:
  8221. case Po.TD:
  8222. case Po.TFOOT:
  8223. case Po.TH:
  8224. case Po.THEAD:
  8225. case Po.TR:
  8226. break;
  8227. default:
  8228. ll(e, t)
  8229. }
  8230. }(this, e);
  8231. break;
  8232. case Rc.IN_COLUMN_GROUP:
  8233. !function (e, t) {
  8234. switch (t.tagID) {
  8235. case Po.COLGROUP:
  8236. e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE);
  8237. break;
  8238. case Po.TEMPLATE:
  8239. $c(e, t);
  8240. break;
  8241. case Po.COL:
  8242. break;
  8243. default:
  8244. gl(e, t)
  8245. }
  8246. }(this, e);
  8247. break;
  8248. case Rc.IN_TABLE_BODY:
  8249. Cl(this, e);
  8250. break;
  8251. case Rc.IN_ROW:
  8252. Sl(this, e);
  8253. break;
  8254. case Rc.IN_CELL:
  8255. !function (e, t) {
  8256. const n = t.tagID;
  8257. switch (n) {
  8258. case Po.TD:
  8259. case Po.TH:
  8260. e.openElements.hasInTableScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_ROW);
  8261. break;
  8262. case Po.TABLE:
  8263. case Po.TBODY:
  8264. case Po.TFOOT:
  8265. case Po.THEAD:
  8266. case Po.TR:
  8267. e.openElements.hasInTableScope(n) && (e._closeTableCell(), Sl(e, t));
  8268. break;
  8269. case Po.BODY:
  8270. case Po.CAPTION:
  8271. case Po.COL:
  8272. case Po.COLGROUP:
  8273. case Po.HTML:
  8274. break;
  8275. default:
  8276. ll(e, t)
  8277. }
  8278. }(this, e);
  8279. break;
  8280. case Rc.IN_SELECT:
  8281. Ol(this, e);
  8282. break;
  8283. case Rc.IN_SELECT_IN_TABLE:
  8284. !function (e, t) {
  8285. const n = t.tagID;
  8286. n === Po.CAPTION || n === Po.TABLE || n === Po.TBODY || n === Po.TFOOT || n === Po.THEAD || n === Po.TR || n === Po.TD || n === Po.TH ? e.openElements.hasInTableScope(n) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), e.onEndTag(t)) : Ol(e, t)
  8287. }(this, e);
  8288. break;
  8289. case Rc.IN_TEMPLATE:
  8290. !function (e, t) {
  8291. t.tagID === Po.TEMPLATE && $c(e, t)
  8292. }(this, e);
  8293. break;
  8294. case Rc.AFTER_BODY:
  8295. Ll(this, e);
  8296. break;
  8297. case Rc.IN_FRAMESET:
  8298. !function (e, t) {
  8299. t.tagID !== Po.FRAMESET || e.openElements.isRootHtmlElementCurrent() || (e.openElements.pop(), e.fragmentContext || e.openElements.currentTagId === Po.FRAMESET || (e.insertionMode = Rc.AFTER_FRAMESET))
  8300. }(this, e);
  8301. break;
  8302. case Rc.AFTER_FRAMESET:
  8303. !function (e, t) {
  8304. t.tagID === Po.HTML && (e.insertionMode = Rc.AFTER_AFTER_FRAMESET)
  8305. }(this, e);
  8306. break;
  8307. case Rc.AFTER_AFTER_BODY:
  8308. vl(this, e)
  8309. }
  8310. }
  8311. onEof(e) {
  8312. switch (this.insertionMode) {
  8313. case Rc.INITIAL:
  8314. Vc(this, e);
  8315. break;
  8316. case Rc.BEFORE_HTML:
  8317. Wc(this, e);
  8318. break;
  8319. case Rc.BEFORE_HEAD:
  8320. Qc(this, e);
  8321. break;
  8322. case Rc.IN_HEAD:
  8323. zc(this, e);
  8324. break;
  8325. case Rc.IN_HEAD_NO_SCRIPT:
  8326. Jc(this, e);
  8327. break;
  8328. case Rc.AFTER_HEAD:
  8329. Zc(this, e);
  8330. break;
  8331. case Rc.IN_BODY:
  8332. case Rc.IN_TABLE:
  8333. case Rc.IN_CAPTION:
  8334. case Rc.IN_COLUMN_GROUP:
  8335. case Rc.IN_TABLE_BODY:
  8336. case Rc.IN_ROW:
  8337. case Rc.IN_CELL:
  8338. case Rc.IN_SELECT:
  8339. case Rc.IN_SELECT_IN_TABLE:
  8340. hl(this, e);
  8341. break;
  8342. case Rc.TEXT:
  8343. !function (e, t) {
  8344. e._err(t, Eo.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t)
  8345. }(this, e);
  8346. break;
  8347. case Rc.IN_TABLE_TEXT:
  8348. Tl(this, e);
  8349. break;
  8350. case Rc.IN_TEMPLATE:
  8351. yl(this, e);
  8352. break;
  8353. case Rc.AFTER_BODY:
  8354. case Rc.IN_FRAMESET:
  8355. case Rc.AFTER_FRAMESET:
  8356. case Rc.AFTER_AFTER_BODY:
  8357. case Rc.AFTER_AFTER_FRAMESET:
  8358. jc(this, e)
  8359. }
  8360. }
  8361. onWhitespaceCharacter(e) {
  8362. if (this.skipNextNewLine && (this.skipNextNewLine = !1, e.chars.charCodeAt(0) === io.LINE_FEED)) {
  8363. if (1 === e.chars.length) return;
  8364. e.chars = e.chars.substr(1)
  8365. }
  8366. if (this.tokenizer.inForeignNode) this._insertCharacters(e); else switch (this.insertionMode) {
  8367. case Rc.IN_HEAD:
  8368. case Rc.IN_HEAD_NO_SCRIPT:
  8369. case Rc.AFTER_HEAD:
  8370. case Rc.TEXT:
  8371. case Rc.IN_COLUMN_GROUP:
  8372. case Rc.IN_SELECT:
  8373. case Rc.IN_SELECT_IN_TABLE:
  8374. case Rc.IN_FRAMESET:
  8375. case Rc.AFTER_FRAMESET:
  8376. this._insertCharacters(e);
  8377. break;
  8378. case Rc.IN_BODY:
  8379. case Rc.IN_CAPTION:
  8380. case Rc.IN_CELL:
  8381. case Rc.IN_TEMPLATE:
  8382. case Rc.AFTER_BODY:
  8383. case Rc.AFTER_AFTER_BODY:
  8384. case Rc.AFTER_AFTER_FRAMESET:
  8385. tl(this, e);
  8386. break;
  8387. case Rc.IN_TABLE:
  8388. case Rc.IN_TABLE_BODY:
  8389. case Rc.IN_ROW:
  8390. ul(this, e);
  8391. break;
  8392. case Rc.IN_TABLE_TEXT:
  8393. El(this, e)
  8394. }
  8395. }
  8396. }
  8397. function Bc(e, t) {
  8398. let n = e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);
  8399. return n ? e.openElements.contains(n.element) ? e.openElements.hasInScope(t.tagID) || (n = null) : (e.activeFormattingElements.removeEntry(n), n = null) : cl(e, t), n
  8400. }
  8401. function Fc(e, t) {
  8402. let n = null, r = e.openElements.stackTop;
  8403. for (; r >= 0; r--) {
  8404. const i = e.openElements.items[r];
  8405. if (i === t.element) break;
  8406. e._isSpecialElement(i, e.openElements.tagIDs[r]) && (n = i)
  8407. }
  8408. return n || (e.openElements.shortenToLength(r < 0 ? 0 : r), e.activeFormattingElements.removeEntry(t)), n
  8409. }
  8410. function Uc(e, t, n) {
  8411. let r = t, i = e.openElements.getCommonAncestor(t);
  8412. for (let s = 0, a = i; a !== n; s++, a = i) {
  8413. i = e.openElements.getCommonAncestor(a);
  8414. const n = e.activeFormattingElements.getElementEntry(a), o = n && s >= 3;
  8415. !n || o ? (o && e.activeFormattingElements.removeEntry(n), e.openElements.remove(a)) : (a = Hc(e, n), r === t && (e.activeFormattingElements.bookmark = n), e.treeAdapter.detachNode(r), e.treeAdapter.appendChild(a, r), r = a)
  8416. }
  8417. return r
  8418. }
  8419. function Hc(e, t) {
  8420. const n = e.treeAdapter.getNamespaceURI(t.element),
  8421. r = e.treeAdapter.createElement(t.token.tagName, n, t.token.attrs);
  8422. return e.openElements.replace(t.element, r), t.element = r, r
  8423. }
  8424. function Gc(e, t, n) {
  8425. const r = Fo(e.treeAdapter.getTagName(t));
  8426. if (e._isElementCausesFosterParenting(r)) e._fosterParentElement(n); else {
  8427. const i = e.treeAdapter.getNamespaceURI(t);
  8428. r === Po.TEMPLATE && i === vo.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n)
  8429. }
  8430. }
  8431. function Yc(e, t, n) {
  8432. const r = e.treeAdapter.getNamespaceURI(n.element), {token: i} = n,
  8433. s = e.treeAdapter.createElement(i.tagName, r, i.attrs);
  8434. e._adoptNodes(t, s), e.treeAdapter.appendChild(t, s), e.activeFormattingElements.insertElementAfterBookmark(s, i), e.activeFormattingElements.removeEntry(n), e.openElements.remove(n.element), e.openElements.insertAfter(t, s, i.tagID)
  8435. }
  8436. function qc(e, t) {
  8437. for (let n = 0; n < 8; n++) {
  8438. const n = Bc(e, t);
  8439. if (!n) break;
  8440. const r = Fc(e, n);
  8441. if (!r) break;
  8442. e.activeFormattingElements.bookmark = n;
  8443. const i = Uc(e, r, n.element), s = e.openElements.getCommonAncestor(n.element);
  8444. e.treeAdapter.detachNode(i), s && Gc(e, s, i), Yc(e, r, n)
  8445. }
  8446. }
  8447. function Kc(e, t) {
  8448. e._appendCommentNode(t, e.openElements.currentTmplContentOrNode)
  8449. }
  8450. function jc(e, t) {
  8451. if (e.stopped = !0, t.location) {
  8452. const n = e.fragmentContext ? 0 : 2;
  8453. for (let r = e.openElements.stackTop; r >= n; r--) e._setEndLocation(e.openElements.items[r], t);
  8454. if (!e.fragmentContext && e.openElements.stackTop >= 0) {
  8455. const n = e.openElements.items[0], r = e.treeAdapter.getNodeSourceCodeLocation(n);
  8456. if (r && !r.endTag && (e._setEndLocation(n, t), e.openElements.stackTop >= 1)) {
  8457. const n = e.openElements.items[1], r = e.treeAdapter.getNodeSourceCodeLocation(n);
  8458. r && !r.endTag && e._setEndLocation(n, t)
  8459. }
  8460. }
  8461. }
  8462. }
  8463. function Vc(e, t) {
  8464. e._err(t, Eo.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Ro.QUIRKS), e.insertionMode = Rc.BEFORE_HTML, e._processToken(t)
  8465. }
  8466. function Wc(e, t) {
  8467. e._insertFakeRootElement(), e.insertionMode = Rc.BEFORE_HEAD, e._processToken(t)
  8468. }
  8469. function Qc(e, t) {
  8470. e._insertFakeElement(Mo.HEAD, Po.HEAD), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD, e._processToken(t)
  8471. }
  8472. function Xc(e, t) {
  8473. switch (t.tagID) {
  8474. case Po.HTML:
  8475. ol(e, t);
  8476. break;
  8477. case Po.BASE:
  8478. case Po.BASEFONT:
  8479. case Po.BGSOUND:
  8480. case Po.LINK:
  8481. case Po.META:
  8482. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  8483. break;
  8484. case Po.TITLE:
  8485. e._switchToTextParsing(t, jo.RCDATA);
  8486. break;
  8487. case Po.NOSCRIPT:
  8488. e.options.scriptingEnabled ? e._switchToTextParsing(t, jo.RAWTEXT) : (e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_HEAD_NO_SCRIPT);
  8489. break;
  8490. case Po.NOFRAMES:
  8491. case Po.STYLE:
  8492. e._switchToTextParsing(t, jo.RAWTEXT);
  8493. break;
  8494. case Po.SCRIPT:
  8495. e._switchToTextParsing(t, jo.SCRIPT_DATA);
  8496. break;
  8497. case Po.TEMPLATE:
  8498. e._insertTemplate(t), e.activeFormattingElements.insertMarker(), e.framesetOk = !1, e.insertionMode = Rc.IN_TEMPLATE, e.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE);
  8499. break;
  8500. case Po.HEAD:
  8501. e._err(t, Eo.misplacedStartTagForHeadElement);
  8502. break;
  8503. default:
  8504. zc(e, t)
  8505. }
  8506. }
  8507. function $c(e, t) {
  8508. e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== Po.TEMPLATE && e._err(t, Eo.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, Eo.endTagWithoutMatchingOpenElement)
  8509. }
  8510. function zc(e, t) {
  8511. e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD, e._processToken(t)
  8512. }
  8513. function Jc(e, t) {
  8514. const n = t.type === To.EOF ? Eo.openElementsLeftAfterEof : Eo.disallowedContentInNoscriptInHead;
  8515. e._err(t, n), e.openElements.pop(), e.insertionMode = Rc.IN_HEAD, e._processToken(t)
  8516. }
  8517. function Zc(e, t) {
  8518. e._insertFakeElement(Mo.BODY, Po.BODY), e.insertionMode = Rc.IN_BODY, el(e, t)
  8519. }
  8520. function el(e, t) {
  8521. switch (t.type) {
  8522. case To.CHARACTER:
  8523. nl(e, t);
  8524. break;
  8525. case To.WHITESPACE_CHARACTER:
  8526. tl(e, t);
  8527. break;
  8528. case To.COMMENT:
  8529. Kc(e, t);
  8530. break;
  8531. case To.START_TAG:
  8532. ol(e, t);
  8533. break;
  8534. case To.END_TAG:
  8535. ll(e, t);
  8536. break;
  8537. case To.EOF:
  8538. hl(e, t)
  8539. }
  8540. }
  8541. function tl(e, t) {
  8542. e._reconstructActiveFormattingElements(), e._insertCharacters(t)
  8543. }
  8544. function nl(e, t) {
  8545. e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1
  8546. }
  8547. function rl(e, t) {
  8548. e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
  8549. }
  8550. function il(e) {
  8551. const t = _o(e, Do.TYPE);
  8552. return null != t && "hidden" === t.toLowerCase()
  8553. }
  8554. function sl(e, t) {
  8555. e._switchToTextParsing(t, jo.RAWTEXT)
  8556. }
  8557. function al(e, t) {
  8558. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML)
  8559. }
  8560. function ol(e, t) {
  8561. switch (t.tagID) {
  8562. case Po.I:
  8563. case Po.S:
  8564. case Po.B:
  8565. case Po.U:
  8566. case Po.EM:
  8567. case Po.TT:
  8568. case Po.BIG:
  8569. case Po.CODE:
  8570. case Po.FONT:
  8571. case Po.SMALL:
  8572. case Po.STRIKE:
  8573. case Po.STRONG:
  8574. !function (e, t) {
  8575. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  8576. }(e, t);
  8577. break;
  8578. case Po.A:
  8579. !function (e, t) {
  8580. const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(Mo.A);
  8581. n && (qc(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  8582. }(e, t);
  8583. break;
  8584. case Po.H1:
  8585. case Po.H2:
  8586. case Po.H3:
  8587. case Po.H4:
  8588. case Po.H5:
  8589. case Po.H6:
  8590. !function (e, t) {
  8591. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), Go(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, vo.HTML)
  8592. }(e, t);
  8593. break;
  8594. case Po.P:
  8595. case Po.DL:
  8596. case Po.OL:
  8597. case Po.UL:
  8598. case Po.DIV:
  8599. case Po.DIR:
  8600. case Po.NAV:
  8601. case Po.MAIN:
  8602. case Po.MENU:
  8603. case Po.ASIDE:
  8604. case Po.CENTER:
  8605. case Po.FIGURE:
  8606. case Po.FOOTER:
  8607. case Po.HEADER:
  8608. case Po.HGROUP:
  8609. case Po.DIALOG:
  8610. case Po.DETAILS:
  8611. case Po.ADDRESS:
  8612. case Po.ARTICLE:
  8613. case Po.SECTION:
  8614. case Po.SUMMARY:
  8615. case Po.FIELDSET:
  8616. case Po.BLOCKQUOTE:
  8617. case Po.FIGCAPTION:
  8618. !function (e, t) {
  8619. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML)
  8620. }(e, t);
  8621. break;
  8622. case Po.LI:
  8623. case Po.DD:
  8624. case Po.DT:
  8625. !function (e, t) {
  8626. e.framesetOk = !1;
  8627. const n = t.tagID;
  8628. for (let t = e.openElements.stackTop; t >= 0; t--) {
  8629. const r = e.openElements.tagIDs[t];
  8630. if (n === Po.LI && r === Po.LI || (n === Po.DD || n === Po.DT) && (r === Po.DD || r === Po.DT)) {
  8631. e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.popUntilTagNamePopped(r);
  8632. break
  8633. }
  8634. if (r !== Po.ADDRESS && r !== Po.DIV && r !== Po.P && e._isSpecialElement(e.openElements.items[t], r)) break
  8635. }
  8636. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML)
  8637. }(e, t);
  8638. break;
  8639. case Po.BR:
  8640. case Po.IMG:
  8641. case Po.WBR:
  8642. case Po.AREA:
  8643. case Po.EMBED:
  8644. case Po.KEYGEN:
  8645. rl(e, t);
  8646. break;
  8647. case Po.HR:
  8648. !function (e, t) {
  8649. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
  8650. }(e, t);
  8651. break;
  8652. case Po.RB:
  8653. case Po.RTC:
  8654. !function (e, t) {
  8655. e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, vo.HTML)
  8656. }(e, t);
  8657. break;
  8658. case Po.RT:
  8659. case Po.RP:
  8660. !function (e, t) {
  8661. e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(Po.RTC), e._insertElement(t, vo.HTML)
  8662. }(e, t);
  8663. break;
  8664. case Po.PRE:
  8665. case Po.LISTING:
  8666. !function (e, t) {
  8667. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.framesetOk = !1
  8668. }(e, t);
  8669. break;
  8670. case Po.XMP:
  8671. !function (e, t) {
  8672. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT)
  8673. }(e, t);
  8674. break;
  8675. case Po.SVG:
  8676. !function (e, t) {
  8677. e._reconstructActiveFormattingElements(), kc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.SVG) : e._insertElement(t, vo.SVG), t.ackSelfClosing = !0
  8678. }(e, t);
  8679. break;
  8680. case Po.HTML:
  8681. !function (e, t) {
  8682. 0 === e.openElements.tmplCount && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs)
  8683. }(e, t);
  8684. break;
  8685. case Po.BASE:
  8686. case Po.LINK:
  8687. case Po.META:
  8688. case Po.STYLE:
  8689. case Po.TITLE:
  8690. case Po.SCRIPT:
  8691. case Po.BGSOUND:
  8692. case Po.BASEFONT:
  8693. case Po.TEMPLATE:
  8694. Xc(e, t);
  8695. break;
  8696. case Po.BODY:
  8697. !function (e, t) {
  8698. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  8699. n && 0 === e.openElements.tmplCount && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(n, t.attrs))
  8700. }(e, t);
  8701. break;
  8702. case Po.FORM:
  8703. !function (e, t) {
  8704. const n = e.openElements.tmplCount > 0;
  8705. e.formElement && !n || (e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), n || (e.formElement = e.openElements.current))
  8706. }(e, t);
  8707. break;
  8708. case Po.NOBR:
  8709. !function (e, t) {
  8710. e._reconstructActiveFormattingElements(), e.openElements.hasInScope(Po.NOBR) && (qc(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
  8711. }(e, t);
  8712. break;
  8713. case Po.MATH:
  8714. !function (e, t) {
  8715. e._reconstructActiveFormattingElements(), Lc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.MATHML) : e._insertElement(t, vo.MATHML), t.ackSelfClosing = !0
  8716. }(e, t);
  8717. break;
  8718. case Po.TABLE:
  8719. !function (e, t) {
  8720. e.treeAdapter.getDocumentMode(e.document) !== Ro.QUIRKS && e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_TABLE
  8721. }(e, t);
  8722. break;
  8723. case Po.INPUT:
  8724. !function (e, t) {
  8725. e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), il(t) || (e.framesetOk = !1), t.ackSelfClosing = !0
  8726. }(e, t);
  8727. break;
  8728. case Po.PARAM:
  8729. case Po.TRACK:
  8730. case Po.SOURCE:
  8731. !function (e, t) {
  8732. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0
  8733. }(e, t);
  8734. break;
  8735. case Po.IMAGE:
  8736. !function (e, t) {
  8737. t.tagName = Mo.IMG, t.tagID = Po.IMG, rl(e, t)
  8738. }(e, t);
  8739. break;
  8740. case Po.BUTTON:
  8741. !function (e, t) {
  8742. e.openElements.hasInScope(Po.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1
  8743. }(e, t);
  8744. break;
  8745. case Po.APPLET:
  8746. case Po.OBJECT:
  8747. case Po.MARQUEE:
  8748. !function (e, t) {
  8749. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1
  8750. }(e, t);
  8751. break;
  8752. case Po.IFRAME:
  8753. !function (e, t) {
  8754. e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT)
  8755. }(e, t);
  8756. break;
  8757. case Po.SELECT:
  8758. !function (e, t) {
  8759. e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === Rc.IN_TABLE || e.insertionMode === Rc.IN_CAPTION || e.insertionMode === Rc.IN_TABLE_BODY || e.insertionMode === Rc.IN_ROW || e.insertionMode === Rc.IN_CELL ? Rc.IN_SELECT_IN_TABLE : Rc.IN_SELECT
  8760. }(e, t);
  8761. break;
  8762. case Po.OPTION:
  8763. case Po.OPTGROUP:
  8764. !function (e, t) {
  8765. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML)
  8766. }(e, t);
  8767. break;
  8768. case Po.NOEMBED:
  8769. sl(e, t);
  8770. break;
  8771. case Po.FRAMESET:
  8772. !function (e, t) {
  8773. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  8774. e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET)
  8775. }(e, t);
  8776. break;
  8777. case Po.TEXTAREA:
  8778. !function (e, t) {
  8779. e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.tokenizer.state = jo.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = Rc.TEXT
  8780. }(e, t);
  8781. break;
  8782. case Po.NOSCRIPT:
  8783. e.options.scriptingEnabled ? sl(e, t) : al(e, t);
  8784. break;
  8785. case Po.PLAINTEXT:
  8786. !function (e, t) {
  8787. e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.tokenizer.state = jo.PLAINTEXT
  8788. }(e, t);
  8789. break;
  8790. case Po.COL:
  8791. case Po.TH:
  8792. case Po.TD:
  8793. case Po.TR:
  8794. case Po.HEAD:
  8795. case Po.FRAME:
  8796. case Po.TBODY:
  8797. case Po.TFOOT:
  8798. case Po.THEAD:
  8799. case Po.CAPTION:
  8800. case Po.COLGROUP:
  8801. break;
  8802. default:
  8803. al(e, t)
  8804. }
  8805. }
  8806. function cl(e, t) {
  8807. const n = t.tagName, r = t.tagID;
  8808. for (let t = e.openElements.stackTop; t > 0; t--) {
  8809. const i = e.openElements.items[t], s = e.openElements.tagIDs[t];
  8810. if (r === s && (r !== Po.UNKNOWN || e.treeAdapter.getTagName(i) === n)) {
  8811. e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.stackTop >= t && e.openElements.shortenToLength(t);
  8812. break
  8813. }
  8814. if (e._isSpecialElement(i, s)) break
  8815. }
  8816. }
  8817. function ll(e, t) {
  8818. switch (t.tagID) {
  8819. case Po.A:
  8820. case Po.B:
  8821. case Po.I:
  8822. case Po.S:
  8823. case Po.U:
  8824. case Po.EM:
  8825. case Po.TT:
  8826. case Po.BIG:
  8827. case Po.CODE:
  8828. case Po.FONT:
  8829. case Po.NOBR:
  8830. case Po.SMALL:
  8831. case Po.STRIKE:
  8832. case Po.STRONG:
  8833. qc(e, t);
  8834. break;
  8835. case Po.P:
  8836. !function (e) {
  8837. e.openElements.hasInButtonScope(Po.P) || e._insertFakeElement(Mo.P, Po.P), e._closePElement()
  8838. }(e);
  8839. break;
  8840. case Po.DL:
  8841. case Po.UL:
  8842. case Po.OL:
  8843. case Po.DIR:
  8844. case Po.DIV:
  8845. case Po.NAV:
  8846. case Po.PRE:
  8847. case Po.MAIN:
  8848. case Po.MENU:
  8849. case Po.ASIDE:
  8850. case Po.BUTTON:
  8851. case Po.CENTER:
  8852. case Po.FIGURE:
  8853. case Po.FOOTER:
  8854. case Po.HEADER:
  8855. case Po.HGROUP:
  8856. case Po.DIALOG:
  8857. case Po.ADDRESS:
  8858. case Po.ARTICLE:
  8859. case Po.DETAILS:
  8860. case Po.SECTION:
  8861. case Po.SUMMARY:
  8862. case Po.LISTING:
  8863. case Po.FIELDSET:
  8864. case Po.BLOCKQUOTE:
  8865. case Po.FIGCAPTION:
  8866. !function (e, t) {
  8867. const n = t.tagID;
  8868. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n))
  8869. }(e, t);
  8870. break;
  8871. case Po.LI:
  8872. !function (e) {
  8873. e.openElements.hasInListItemScope(Po.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(Po.LI), e.openElements.popUntilTagNamePopped(Po.LI))
  8874. }(e);
  8875. break;
  8876. case Po.DD:
  8877. case Po.DT:
  8878. !function (e, t) {
  8879. const n = t.tagID;
  8880. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTagsWithExclusion(n), e.openElements.popUntilTagNamePopped(n))
  8881. }(e, t);
  8882. break;
  8883. case Po.H1:
  8884. case Po.H2:
  8885. case Po.H3:
  8886. case Po.H4:
  8887. case Po.H5:
  8888. case Po.H6:
  8889. !function (e) {
  8890. e.openElements.hasNumberedHeaderInScope() && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilNumberedHeaderPopped())
  8891. }(e);
  8892. break;
  8893. case Po.BR:
  8894. !function (e) {
  8895. e._reconstructActiveFormattingElements(), e._insertFakeElement(Mo.BR, Po.BR), e.openElements.pop(), e.framesetOk = !1
  8896. }(e);
  8897. break;
  8898. case Po.BODY:
  8899. !function (e, t) {
  8900. if (e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, e.options.sourceCodeLocationInfo)) {
  8901. const n = e.openElements.tryPeekProperlyNestedBodyElement();
  8902. n && e._setEndLocation(n, t)
  8903. }
  8904. }(e, t);
  8905. break;
  8906. case Po.HTML:
  8907. !function (e, t) {
  8908. e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, Ll(e, t))
  8909. }(e, t);
  8910. break;
  8911. case Po.FORM:
  8912. !function (e) {
  8913. const t = e.openElements.tmplCount > 0, {formElement: n} = e;
  8914. t || (e.formElement = null), (n || t) && e.openElements.hasInScope(Po.FORM) && (e.openElements.generateImpliedEndTags(), t ? e.openElements.popUntilTagNamePopped(Po.FORM) : n && e.openElements.remove(n))
  8915. }(e);
  8916. break;
  8917. case Po.APPLET:
  8918. case Po.OBJECT:
  8919. case Po.MARQUEE:
  8920. !function (e, t) {
  8921. const n = t.tagID;
  8922. e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker())
  8923. }(e, t);
  8924. break;
  8925. case Po.TEMPLATE:
  8926. $c(e, t);
  8927. break;
  8928. default:
  8929. cl(e, t)
  8930. }
  8931. }
  8932. function hl(e, t) {
  8933. e.tmplInsertionModeStack.length > 0 ? yl(e, t) : jc(e, t)
  8934. }
  8935. function ul(e, t) {
  8936. if (Pc.has(e.openElements.currentTagId)) switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = Rc.IN_TABLE_TEXT, t.type) {
  8937. case To.CHARACTER:
  8938. ml(e, t);
  8939. break;
  8940. case To.WHITESPACE_CHARACTER:
  8941. El(e, t)
  8942. } else dl(e, t)
  8943. }
  8944. function pl(e, t) {
  8945. switch (t.tagID) {
  8946. case Po.TD:
  8947. case Po.TH:
  8948. case Po.TR:
  8949. !function (e, t) {
  8950. e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.TBODY, Po.TBODY), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t)
  8951. }(e, t);
  8952. break;
  8953. case Po.STYLE:
  8954. case Po.SCRIPT:
  8955. case Po.TEMPLATE:
  8956. Xc(e, t);
  8957. break;
  8958. case Po.COL:
  8959. !function (e, t) {
  8960. e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.COLGROUP, Po.COLGROUP), e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t)
  8961. }(e, t);
  8962. break;
  8963. case Po.FORM:
  8964. !function (e, t) {
  8965. e.formElement || 0 !== e.openElements.tmplCount || (e._insertElement(t, vo.HTML), e.formElement = e.openElements.current, e.openElements.pop())
  8966. }(e, t);
  8967. break;
  8968. case Po.TABLE:
  8969. !function (e, t) {
  8970. e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode(), e._processStartTag(t))
  8971. }(e, t);
  8972. break;
  8973. case Po.TBODY:
  8974. case Po.TFOOT:
  8975. case Po.THEAD:
  8976. !function (e, t) {
  8977. e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_TABLE_BODY
  8978. }(e, t);
  8979. break;
  8980. case Po.INPUT:
  8981. !function (e, t) {
  8982. il(t) ? e._appendElement(t, vo.HTML) : dl(e, t), t.ackSelfClosing = !0
  8983. }(e, t);
  8984. break;
  8985. case Po.CAPTION:
  8986. !function (e, t) {
  8987. e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CAPTION
  8988. }(e, t);
  8989. break;
  8990. case Po.COLGROUP:
  8991. !function (e, t) {
  8992. e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_COLUMN_GROUP
  8993. }(e, t);
  8994. break;
  8995. default:
  8996. dl(e, t)
  8997. }
  8998. }
  8999. function fl(e, t) {
  9000. switch (t.tagID) {
  9001. case Po.TABLE:
  9002. e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode());
  9003. break;
  9004. case Po.TEMPLATE:
  9005. $c(e, t);
  9006. break;
  9007. case Po.BODY:
  9008. case Po.CAPTION:
  9009. case Po.COL:
  9010. case Po.COLGROUP:
  9011. case Po.HTML:
  9012. case Po.TBODY:
  9013. case Po.TD:
  9014. case Po.TFOOT:
  9015. case Po.TH:
  9016. case Po.THEAD:
  9017. case Po.TR:
  9018. break;
  9019. default:
  9020. dl(e, t)
  9021. }
  9022. }
  9023. function dl(e, t) {
  9024. const n = e.fosterParentingEnabled;
  9025. e.fosterParentingEnabled = !0, el(e, t), e.fosterParentingEnabled = n
  9026. }
  9027. function El(e, t) {
  9028. e.pendingCharacterTokens.push(t)
  9029. }
  9030. function ml(e, t) {
  9031. e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0
  9032. }
  9033. function Tl(e, t) {
  9034. let n = 0;
  9035. if (e.hasNonWhitespacePendingCharacterToken) for (; n < e.pendingCharacterTokens.length; n++) dl(e, e.pendingCharacterTokens[n]); else for (; n < e.pendingCharacterTokens.length; n++) e._insertCharacters(e.pendingCharacterTokens[n]);
  9036. e.insertionMode = e.originalInsertionMode, e._processToken(t)
  9037. }
  9038. const _l = new Set([Po.CAPTION, Po.COL, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]);
  9039. function Al(e, t) {
  9040. switch (t.tagID) {
  9041. case Po.HTML:
  9042. ol(e, t);
  9043. break;
  9044. case Po.COL:
  9045. e._appendElement(t, vo.HTML), t.ackSelfClosing = !0;
  9046. break;
  9047. case Po.TEMPLATE:
  9048. Xc(e, t);
  9049. break;
  9050. default:
  9051. gl(e, t)
  9052. }
  9053. }
  9054. function gl(e, t) {
  9055. e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, e._processToken(t))
  9056. }
  9057. function Nl(e, t) {
  9058. switch (t.tagID) {
  9059. case Po.TR:
  9060. e.openElements.clearBackToTableBodyContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_ROW;
  9061. break;
  9062. case Po.TH:
  9063. case Po.TD:
  9064. e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(Mo.TR, Po.TR), e.insertionMode = Rc.IN_ROW, Il(e, t);
  9065. break;
  9066. case Po.CAPTION:
  9067. case Po.COL:
  9068. case Po.COLGROUP:
  9069. case Po.TBODY:
  9070. case Po.TFOOT:
  9071. case Po.THEAD:
  9072. e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, pl(e, t));
  9073. break;
  9074. default:
  9075. pl(e, t)
  9076. }
  9077. }
  9078. function Cl(e, t) {
  9079. const n = t.tagID;
  9080. switch (t.tagID) {
  9081. case Po.TBODY:
  9082. case Po.TFOOT:
  9083. case Po.THEAD:
  9084. e.openElements.hasInTableScope(n) && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE);
  9085. break;
  9086. case Po.TABLE:
  9087. e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, fl(e, t));
  9088. break;
  9089. case Po.BODY:
  9090. case Po.CAPTION:
  9091. case Po.COL:
  9092. case Po.COLGROUP:
  9093. case Po.HTML:
  9094. case Po.TD:
  9095. case Po.TH:
  9096. case Po.TR:
  9097. break;
  9098. default:
  9099. fl(e, t)
  9100. }
  9101. }
  9102. function Il(e, t) {
  9103. switch (t.tagID) {
  9104. case Po.TH:
  9105. case Po.TD:
  9106. e.openElements.clearBackToTableRowContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CELL, e.activeFormattingElements.insertMarker();
  9107. break;
  9108. case Po.CAPTION:
  9109. case Po.COL:
  9110. case Po.COLGROUP:
  9111. case Po.TBODY:
  9112. case Po.TFOOT:
  9113. case Po.THEAD:
  9114. case Po.TR:
  9115. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t));
  9116. break;
  9117. default:
  9118. pl(e, t)
  9119. }
  9120. }
  9121. function Sl(e, t) {
  9122. switch (t.tagID) {
  9123. case Po.TR:
  9124. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY);
  9125. break;
  9126. case Po.TABLE:
  9127. e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t));
  9128. break;
  9129. case Po.TBODY:
  9130. case Po.TFOOT:
  9131. case Po.THEAD:
  9132. (e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(Po.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t));
  9133. break;
  9134. case Po.BODY:
  9135. case Po.CAPTION:
  9136. case Po.COL:
  9137. case Po.COLGROUP:
  9138. case Po.HTML:
  9139. case Po.TD:
  9140. case Po.TH:
  9141. break;
  9142. default:
  9143. fl(e, t)
  9144. }
  9145. }
  9146. function bl(e, t) {
  9147. switch (t.tagID) {
  9148. case Po.HTML:
  9149. ol(e, t);
  9150. break;
  9151. case Po.OPTION:
  9152. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._insertElement(t, vo.HTML);
  9153. break;
  9154. case Po.OPTGROUP:
  9155. e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop(), e._insertElement(t, vo.HTML);
  9156. break;
  9157. case Po.INPUT:
  9158. case Po.KEYGEN:
  9159. case Po.TEXTAREA:
  9160. case Po.SELECT:
  9161. e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), t.tagID !== Po.SELECT && e._processStartTag(t));
  9162. break;
  9163. case Po.SCRIPT:
  9164. case Po.TEMPLATE:
  9165. Xc(e, t)
  9166. }
  9167. }
  9168. function Ol(e, t) {
  9169. switch (t.tagID) {
  9170. case Po.OPTGROUP:
  9171. e.openElements.stackTop > 0 && e.openElements.currentTagId === Po.OPTION && e.openElements.tagIDs[e.openElements.stackTop - 1] === Po.OPTGROUP && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop();
  9172. break;
  9173. case Po.OPTION:
  9174. e.openElements.currentTagId === Po.OPTION && e.openElements.pop();
  9175. break;
  9176. case Po.SELECT:
  9177. e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode());
  9178. break;
  9179. case Po.TEMPLATE:
  9180. $c(e, t)
  9181. }
  9182. }
  9183. function yl(e, t) {
  9184. e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : jc(e, t)
  9185. }
  9186. function Ll(e, t) {
  9187. var n;
  9188. if (t.tagID === Po.HTML) {
  9189. if (e.fragmentContext || (e.insertionMode = Rc.AFTER_AFTER_BODY), e.options.sourceCodeLocationInfo && e.openElements.tagIDs[0] === Po.HTML) {
  9190. e._setEndLocation(e.openElements.items[0], t);
  9191. const r = e.openElements.items[1];
  9192. r && !(null === (n = e.treeAdapter.getNodeSourceCodeLocation(r)) || void 0 === n ? void 0 : n.endTag) && e._setEndLocation(r, t)
  9193. }
  9194. } else kl(e, t)
  9195. }
  9196. function kl(e, t) {
  9197. e.insertionMode = Rc.IN_BODY, el(e, t)
  9198. }
  9199. function vl(e, t) {
  9200. e.insertionMode = Rc.IN_BODY, el(e, t)
  9201. }
  9202. function Dl(e) {
  9203. for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== vo.HTML && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current);) e.openElements.pop()
  9204. }
  9205. var Rl = Ke((function (e, t) {
  9206. Object.defineProperty(t, "__esModule", {value: !0}), t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.getCodePoint = t.xmlReplacer = void 0, t.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
  9207. var n = new Map([[34, "&quot;"], [38, "&amp;"], [39, "&apos;"], [60, "&lt;"], [62, "&gt;"]]);
  9208. function r(e) {
  9209. for (var r, i = "", s = 0; null !== (r = t.xmlReplacer.exec(e));) {
  9210. var a = r.index, o = e.charCodeAt(a), c = n.get(o);
  9211. void 0 !== c ? (i += e.substring(s, a) + c, s = a + 1) : (i += "".concat(e.substring(s, a), "&#x").concat((0, t.getCodePoint)(e, a).toString(16), ";"), s = t.xmlReplacer.lastIndex += Number(55296 == (64512 & o)))
  9212. }
  9213. return i + e.substr(s)
  9214. }
  9215. function i(e, t) {
  9216. return function (n) {
  9217. for (var r, i = 0, s = ""; r = e.exec(n);) i !== r.index && (s += n.substring(i, r.index)), s += t.get(r[0].charCodeAt(0)), i = r.index + 1;
  9218. return s + n.substring(i)
  9219. }
  9220. }
  9221. t.getCodePoint = null != String.prototype.codePointAt ? function (e, t) {
  9222. return e.codePointAt(t)
  9223. } : function (e, t) {
  9224. return 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t)
  9225. }, t.encodeXML = r, t.escape = r, t.escapeUTF8 = i(/[&<>'"]/g, n), t.escapeAttribute = i(/["&\u00A0]/g, new Map([[34, "&quot;"], [38, "&amp;"], [160, "&nbsp;"]])), t.escapeText = i(/[&<>\u00A0]/g, new Map([[38, "&amp;"], [60, "&lt;"], [62, "&gt;"], [160, "&nbsp;"]]))
  9226. }));
  9227. qe(Rl);
  9228. var Ml = Rl.escapeText, Pl = Rl.escapeAttribute;
  9229. Rl.escapeUTF8, Rl.escape, Rl.encodeXML, Rl.getCodePoint, Rl.xmlReplacer;
  9230. const xl = new Set([Mo.AREA, Mo.BASE, Mo.BASEFONT, Mo.BGSOUND, Mo.BR, Mo.COL, Mo.EMBED, Mo.FRAME, Mo.HR, Mo.IMG, Mo.INPUT, Mo.KEYGEN, Mo.LINK, Mo.META, Mo.PARAM, Mo.SOURCE, Mo.TRACK, Mo.WBR]);
  9231. const wl = {treeAdapter: Ec, scriptingEnabled: !0};
  9232. function Bl(e, t) {
  9233. return Fl(e, {...wl, ...t})
  9234. }
  9235. function Fl(e, t) {
  9236. return t.treeAdapter.isElementNode(e) ? function (e, t) {
  9237. const n = t.treeAdapter.getTagName(e);
  9238. return `<${n}${function (e, {treeAdapter: t}) {
  9239. let n = "";
  9240. for (const r of t.getAttrList(e)) {
  9241. if (n += " ", r.namespace) switch (r.namespace) {
  9242. case vo.XML:
  9243. n += `xml:${r.name}`;
  9244. break;
  9245. case vo.XMLNS:
  9246. "xmlns" !== r.name && (n += "xmlns:"), n += r.name;
  9247. break;
  9248. case vo.XLINK:
  9249. n += `xlink:${r.name}`;
  9250. break;
  9251. default:
  9252. n += `${r.prefix}:${r.name}`
  9253. } else n += r.name;
  9254. n += `="${Pl(r.value)}"`
  9255. }
  9256. return n
  9257. }(e, t)}>${function (e, t) {
  9258. return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === vo.HTML && xl.has(t.treeAdapter.getTagName(e))
  9259. }(e, t) ? "" : `${function (e, t) {
  9260. let n = "";
  9261. const r = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === Mo.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === vo.HTML ? t.treeAdapter.getTemplateContent(e) : e,
  9262. i = t.treeAdapter.getChildNodes(r);
  9263. if (i) for (const e of i) n += Fl(e, t);
  9264. return n
  9265. }(e, t)}</${n}>`}`
  9266. }(e, t) : t.treeAdapter.isTextNode(e) ? function (e, t) {
  9267. const {treeAdapter: n} = t, r = n.getTextNodeContent(e), i = n.getParentNode(e),
  9268. s = i && n.isElementNode(i) && n.getTagName(i);
  9269. return s && n.getNamespaceURI(i) === vo.HTML && (a = s, o = t.scriptingEnabled, Yo.has(a) || o && a === Mo.NOSCRIPT) ? r : Ml(r);
  9270. var a, o
  9271. }(e, t) : t.treeAdapter.isCommentNode(e) ? function (e, {treeAdapter: t}) {
  9272. return `\x3c!--${t.getCommentNodeContent(e)}--\x3e`
  9273. }(e, t) : t.treeAdapter.isDocumentTypeNode(e) ? function (e, {treeAdapter: t}) {
  9274. return `<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`
  9275. }(e, t) : ""
  9276. }
  9277. function Ul(e) {
  9278. return new m(e)
  9279. }
  9280. function Hl(e) {
  9281. const t = e.includes('"') ? "'" : '"';
  9282. return t + e + t
  9283. }
  9284. const Gl = {
  9285. isCommentNode: O,
  9286. isElementNode: I,
  9287. isTextNode: b,
  9288. createDocument() {
  9289. const e = new N([]);
  9290. return e["x-mode"] = Ro.NO_QUIRKS, e
  9291. },
  9292. createDocumentFragment: () => new N([]),
  9293. createElement(e, t, n) {
  9294. const r = Object.create(null), i = Object.create(null), s = Object.create(null);
  9295. for (let e = 0; e < n.length; e++) {
  9296. const t = n[e].name;
  9297. r[t] = n[e].value, i[t] = n[e].namespace, s[t] = n[e].prefix
  9298. }
  9299. const a = new C(e, r, []);
  9300. return a.namespace = t, a["x-attribsNamespace"] = i, a["x-attribsPrefix"] = s, a
  9301. },
  9302. createCommentNode: e => new T(e),
  9303. appendChild(e, t) {
  9304. const n = e.children[e.children.length - 1];
  9305. n && (n.next = t, t.prev = n), e.children.push(t), t.parent = e
  9306. },
  9307. insertBefore(e, t, n) {
  9308. const r = e.children.indexOf(n), {prev: i} = n;
  9309. i && (i.next = t, t.prev = i), n.prev = t, t.next = n, e.children.splice(r, 0, t), t.parent = e
  9310. },
  9311. setTemplateContent(e, t) {
  9312. Gl.appendChild(e, t)
  9313. },
  9314. getTemplateContent: e => e.children[0],
  9315. setDocumentType(e, t, n, r) {
  9316. const i = function (e, t, n) {
  9317. let r = "!DOCTYPE ";
  9318. return e && (r += e), t ? r += ` PUBLIC ${Hl(t)}` : n && (r += " SYSTEM"), n && (r += ` ${Hl(n)}`), r
  9319. }(t, n, r);
  9320. let s = e.children.find((e => y(e) && "!doctype" === e.name));
  9321. s ? s.data = null != i ? i : null : (s = new _("!doctype", i), Gl.appendChild(e, s)), s["x-name"] = null != t ? t : void 0, s["x-publicId"] = null != n ? n : void 0, s["x-systemId"] = null != r ? r : void 0
  9322. },
  9323. setDocumentMode(e, t) {
  9324. e["x-mode"] = t
  9325. },
  9326. getDocumentMode: e => e["x-mode"],
  9327. detachNode(e) {
  9328. if (e.parent) {
  9329. const t = e.parent.children.indexOf(e), {prev: n, next: r} = e;
  9330. e.prev = null, e.next = null, n && (n.next = r), r && (r.prev = n), e.parent.children.splice(t, 1), e.parent = null
  9331. }
  9332. },
  9333. insertText(e, t) {
  9334. const n = e.children[e.children.length - 1];
  9335. n && b(n) ? n.data += t : Gl.appendChild(e, Ul(t))
  9336. },
  9337. insertTextBefore(e, t, n) {
  9338. const r = e.children[e.children.indexOf(n) - 1];
  9339. r && b(r) ? r.data += t : Gl.insertBefore(e, Ul(t), n)
  9340. },
  9341. adoptAttributes(e, t) {
  9342. for (let n = 0; n < t.length; n++) {
  9343. const r = t[n].name;
  9344. void 0 === e.attribs[r] && (e.attribs[r] = t[n].value, e["x-attribsNamespace"][r] = t[n].namespace, e["x-attribsPrefix"][r] = t[n].prefix)
  9345. }
  9346. },
  9347. getFirstChild: e => e.children[0],
  9348. getChildNodes: e => e.children,
  9349. getParentNode: e => e.parent,
  9350. getAttrList: e => e.attributes,
  9351. getTagName: e => e.name,
  9352. getNamespaceURI: e => e.namespace,
  9353. getTextNodeContent: e => e.data,
  9354. getCommentNodeContent: e => e.data,
  9355. getDocumentTypeNodeName(e) {
  9356. var t;
  9357. return null !== (t = e["x-name"]) && void 0 !== t ? t : ""
  9358. },
  9359. getDocumentTypeNodePublicId(e) {
  9360. var t;
  9361. return null !== (t = e["x-publicId"]) && void 0 !== t ? t : ""
  9362. },
  9363. getDocumentTypeNodeSystemId(e) {
  9364. var t;
  9365. return null !== (t = e["x-systemId"]) && void 0 !== t ? t : ""
  9366. },
  9367. isDocumentTypeNode: e => y(e) && "!doctype" === e.name,
  9368. setNodeSourceCodeLocation(e, t) {
  9369. t && (e.startIndex = t.startOffset, e.endIndex = t.endOffset), e.sourceCodeLocation = t
  9370. },
  9371. getNodeSourceCodeLocation: e => e.sourceCodeLocation,
  9372. updateNodeSourceCodeLocation(e, t) {
  9373. null != t.endOffset && (e.endIndex = t.endOffset), e.sourceCodeLocation = {...e.sourceCodeLocation, ...t}
  9374. }
  9375. };
  9376. var Yl = function (e, t, n) {
  9377. if (n || 2 === arguments.length) for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
  9378. return e.concat(r || Array.prototype.slice.call(t))
  9379. };
  9380. function ql(e, t, n, r) {
  9381. var i = {
  9382. scriptingEnabled: "boolean" != typeof t.scriptingEnabled || t.scriptingEnabled,
  9383. treeAdapter: Gl,
  9384. sourceCodeLocationInfo: t.sourceCodeLocationInfo
  9385. };
  9386. return n ? function (e, t) {
  9387. return wc.parse(e, t)
  9388. }(e, i) : function (e, t, n) {
  9389. "string" == typeof e && (n = t, t = e, e = null);
  9390. const r = wc.getFragmentParser(e, n);
  9391. return r.tokenizer.write(t, !0), r.getFragment()
  9392. }(r, e, i)
  9393. }
  9394. var Kl, jl, Vl, Wl = {treeAdapter: Gl};
  9395. function Ql(e) {
  9396. return e === Kl.Space || e === Kl.NewLine || e === Kl.Tab || e === Kl.FormFeed || e === Kl.CarriageReturn
  9397. }
  9398. function Xl(e) {
  9399. return e === Kl.Slash || e === Kl.Gt || Ql(e)
  9400. }
  9401. function $l(e) {
  9402. return e >= Kl.Zero && e <= Kl.Nine
  9403. }
  9404. !function (e) {
  9405. e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Num = 35] = "Num", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket"
  9406. }(Kl || (Kl = {})), function (e) {
  9407. e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.SpecialStartSequence = 23] = "SpecialStartSequence", e[e.InSpecialTag = 24] = "InSpecialTag", e[e.BeforeEntity = 25] = "BeforeEntity", e[e.BeforeNumericEntity = 26] = "BeforeNumericEntity", e[e.InNamedEntity = 27] = "InNamedEntity", e[e.InNumericEntity = 28] = "InNumericEntity", e[e.InHexEntity = 29] = "InHexEntity"
  9408. }(jl || (jl = {})), function (e) {
  9409. e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double"
  9410. }(Vl || (Vl = {}));
  9411. const zl = {
  9412. Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
  9413. CdataEnd: new Uint8Array([93, 93, 62]),
  9414. CommentEnd: new Uint8Array([45, 45, 62]),
  9415. ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
  9416. StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
  9417. TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101])
  9418. };
  9419. class Jl {
  9420. constructor({xmlMode: e = !1, decodeEntities: t = !0}, n) {
  9421. this.cbs = n, this.state = jl.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = jl.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.sequenceIndex = 0, this.trieIndex = 0, this.trieCurrent = 0, this.entityResult = 0, this.entityExcess = 0, this.xmlMode = e, this.decodeEntities = t, this.entityTrie = e ? xo : wo
  9422. }
  9423. reset() {
  9424. this.state = jl.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = jl.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0
  9425. }
  9426. write(e) {
  9427. this.offset += this.buffer.length, this.buffer = e, this.parse()
  9428. }
  9429. end() {
  9430. this.running && this.finish()
  9431. }
  9432. pause() {
  9433. this.running = !1
  9434. }
  9435. resume() {
  9436. this.running = !0, this.index < this.buffer.length + this.offset && this.parse()
  9437. }
  9438. getIndex() {
  9439. return this.index
  9440. }
  9441. getSectionStart() {
  9442. return this.sectionStart
  9443. }
  9444. stateText(e) {
  9445. e === Kl.Lt || !this.decodeEntities && this.fastForwardTo(Kl.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = jl.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && e === Kl.Amp && (this.state = jl.BeforeEntity)
  9446. }
  9447. stateSpecialStartSequence(e) {
  9448. const t = this.sequenceIndex === this.currentSequence.length;
  9449. if (t ? Xl(e) : (32 | e) === this.currentSequence[this.sequenceIndex]) {
  9450. if (!t) return void this.sequenceIndex++
  9451. } else this.isSpecial = !1;
  9452. this.sequenceIndex = 0, this.state = jl.InTagName, this.stateInTagName(e)
  9453. }
  9454. stateInSpecialTag(e) {
  9455. if (this.sequenceIndex === this.currentSequence.length) {
  9456. if (e === Kl.Gt || Ql(e)) {
  9457. const t = this.index - this.currentSequence.length;
  9458. if (this.sectionStart < t) {
  9459. const e = this.index;
  9460. this.index = t, this.cbs.ontext(this.sectionStart, t), this.index = e
  9461. }
  9462. return this.isSpecial = !1, this.sectionStart = t + 2, void this.stateInClosingTagName(e)
  9463. }
  9464. this.sequenceIndex = 0
  9465. }
  9466. (32 | e) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : 0 === this.sequenceIndex ? this.currentSequence === zl.TitleEnd ? this.decodeEntities && e === Kl.Amp && (this.state = jl.BeforeEntity) : this.fastForwardTo(Kl.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = Number(e === Kl.Lt)
  9467. }
  9468. stateCDATASequence(e) {
  9469. e === zl.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === zl.Cdata.length && (this.state = jl.InCommentLike, this.currentSequence = zl.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = jl.InDeclaration, this.stateInDeclaration(e))
  9470. }
  9471. fastForwardTo(e) {
  9472. for (; ++this.index < this.buffer.length + this.offset;) if (this.buffer.charCodeAt(this.index - this.offset) === e) return !0;
  9473. return this.index = this.buffer.length + this.offset - 1, !1
  9474. }
  9475. stateInCommentLike(e) {
  9476. e === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === zl.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = jl.Text) : 0 === this.sequenceIndex ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : e !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0)
  9477. }
  9478. isTagStartChar(e) {
  9479. return this.xmlMode ? !Xl(e) : function (e) {
  9480. return e >= Kl.LowerA && e <= Kl.LowerZ || e >= Kl.UpperA && e <= Kl.UpperZ
  9481. }(e)
  9482. }
  9483. startSpecial(e, t) {
  9484. this.isSpecial = !0, this.currentSequence = e, this.sequenceIndex = t, this.state = jl.SpecialStartSequence
  9485. }
  9486. stateBeforeTagName(e) {
  9487. if (e === Kl.ExclamationMark) this.state = jl.BeforeDeclaration, this.sectionStart = this.index + 1; else if (e === Kl.Questionmark) this.state = jl.InProcessingInstruction, this.sectionStart = this.index + 1; else if (this.isTagStartChar(e)) {
  9488. const t = 32 | e;
  9489. this.sectionStart = this.index, this.xmlMode || t !== zl.TitleEnd[2] ? this.state = this.xmlMode || t !== zl.ScriptEnd[2] ? jl.InTagName : jl.BeforeSpecialS : this.startSpecial(zl.TitleEnd, 3)
  9490. } else e === Kl.Slash ? this.state = jl.BeforeClosingTagName : (this.state = jl.Text, this.stateText(e))
  9491. }
  9492. stateInTagName(e) {
  9493. Xl(e) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = jl.BeforeAttributeName, this.stateBeforeAttributeName(e))
  9494. }
  9495. stateBeforeClosingTagName(e) {
  9496. Ql(e) || (e === Kl.Gt ? this.state = jl.Text : (this.state = this.isTagStartChar(e) ? jl.InClosingTagName : jl.InSpecialComment, this.sectionStart = this.index))
  9497. }
  9498. stateInClosingTagName(e) {
  9499. (e === Kl.Gt || Ql(e)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = jl.AfterClosingTagName, this.stateAfterClosingTagName(e))
  9500. }
  9501. stateAfterClosingTagName(e) {
  9502. (e === Kl.Gt || this.fastForwardTo(Kl.Gt)) && (this.state = jl.Text, this.sectionStart = this.index + 1)
  9503. }
  9504. stateBeforeAttributeName(e) {
  9505. e === Kl.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = jl.InSpecialTag, this.sequenceIndex = 0) : this.state = jl.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : e === Kl.Slash ? this.state = jl.InSelfClosingTag : Ql(e) || (this.state = jl.InAttributeName, this.sectionStart = this.index)
  9506. }
  9507. stateInSelfClosingTag(e) {
  9508. e === Kl.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = jl.Text, this.baseState = jl.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : Ql(e) || (this.state = jl.BeforeAttributeName, this.stateBeforeAttributeName(e))
  9509. }
  9510. stateInAttributeName(e) {
  9511. (e === Kl.Eq || Xl(e)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = jl.AfterAttributeName, this.stateAfterAttributeName(e))
  9512. }
  9513. stateAfterAttributeName(e) {
  9514. e === Kl.Eq ? this.state = jl.BeforeAttributeValue : e === Kl.Slash || e === Kl.Gt ? (this.cbs.onattribend(Vl.NoValue, this.index), this.state = jl.BeforeAttributeName, this.stateBeforeAttributeName(e)) : Ql(e) || (this.cbs.onattribend(Vl.NoValue, this.index), this.state = jl.InAttributeName, this.sectionStart = this.index)
  9515. }
  9516. stateBeforeAttributeValue(e) {
  9517. e === Kl.DoubleQuote ? (this.state = jl.InAttributeValueDq, this.sectionStart = this.index + 1) : e === Kl.SingleQuote ? (this.state = jl.InAttributeValueSq, this.sectionStart = this.index + 1) : Ql(e) || (this.sectionStart = this.index, this.state = jl.InAttributeValueNq, this.stateInAttributeValueNoQuotes(e))
  9518. }
  9519. handleInAttributeValue(e, t) {
  9520. e === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t === Kl.DoubleQuote ? Vl.Double : Vl.Single, this.index), this.state = jl.BeforeAttributeName) : this.decodeEntities && e === Kl.Amp && (this.baseState = this.state, this.state = jl.BeforeEntity)
  9521. }
  9522. stateInAttributeValueDoubleQuotes(e) {
  9523. this.handleInAttributeValue(e, Kl.DoubleQuote)
  9524. }
  9525. stateInAttributeValueSingleQuotes(e) {
  9526. this.handleInAttributeValue(e, Kl.SingleQuote)
  9527. }
  9528. stateInAttributeValueNoQuotes(e) {
  9529. Ql(e) || e === Kl.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Vl.Unquoted, this.index), this.state = jl.BeforeAttributeName, this.stateBeforeAttributeName(e)) : this.decodeEntities && e === Kl.Amp && (this.baseState = this.state, this.state = jl.BeforeEntity)
  9530. }
  9531. stateBeforeDeclaration(e) {
  9532. e === Kl.OpeningSquareBracket ? (this.state = jl.CDATASequence, this.sequenceIndex = 0) : this.state = e === Kl.Dash ? jl.BeforeComment : jl.InDeclaration
  9533. }
  9534. stateInDeclaration(e) {
  9535. (e === Kl.Gt || this.fastForwardTo(Kl.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = jl.Text, this.sectionStart = this.index + 1)
  9536. }
  9537. stateInProcessingInstruction(e) {
  9538. (e === Kl.Gt || this.fastForwardTo(Kl.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = jl.Text, this.sectionStart = this.index + 1)
  9539. }
  9540. stateBeforeComment(e) {
  9541. e === Kl.Dash ? (this.state = jl.InCommentLike, this.currentSequence = zl.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = jl.InDeclaration
  9542. }
  9543. stateInSpecialComment(e) {
  9544. (e === Kl.Gt || this.fastForwardTo(Kl.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = jl.Text, this.sectionStart = this.index + 1)
  9545. }
  9546. stateBeforeSpecialS(e) {
  9547. const t = 32 | e;
  9548. t === zl.ScriptEnd[3] ? this.startSpecial(zl.ScriptEnd, 4) : t === zl.StyleEnd[3] ? this.startSpecial(zl.StyleEnd, 4) : (this.state = jl.InTagName, this.stateInTagName(e))
  9549. }
  9550. stateBeforeEntity(e) {
  9551. this.entityExcess = 1, this.entityResult = 0, e === Kl.Num ? this.state = jl.BeforeNumericEntity : e === Kl.Amp || (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = jl.InNamedEntity, this.stateInNamedEntity(e))
  9552. }
  9553. stateInNamedEntity(e) {
  9554. if (this.entityExcess += 1, this.trieIndex = Oo(this.entityTrie, this.trieCurrent, this.trieIndex + 1, e), this.trieIndex < 0) return this.emitNamedEntity(), void this.index--;
  9555. this.trieCurrent = this.entityTrie[this.trieIndex];
  9556. const t = this.trieCurrent & yo.VALUE_LENGTH;
  9557. if (t) {
  9558. const n = (t >> 14) - 1;
  9559. if (this.allowLegacyEntity() || e === Kl.Semi) {
  9560. const e = this.index - this.entityExcess + 1;
  9561. e > this.sectionStart && this.emitPartial(this.sectionStart, e), this.entityResult = this.trieIndex, this.trieIndex += n, this.entityExcess = 0, this.sectionStart = this.index + 1, 0 === n && this.emitNamedEntity()
  9562. } else this.trieIndex += n
  9563. }
  9564. }
  9565. emitNamedEntity() {
  9566. if (this.state = this.baseState, 0 === this.entityResult) return;
  9567. switch ((this.entityTrie[this.entityResult] & yo.VALUE_LENGTH) >> 14) {
  9568. case 1:
  9569. this.emitCodePoint(this.entityTrie[this.entityResult] & ~yo.VALUE_LENGTH);
  9570. break;
  9571. case 2:
  9572. this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
  9573. break;
  9574. case 3:
  9575. this.emitCodePoint(this.entityTrie[this.entityResult + 1]), this.emitCodePoint(this.entityTrie[this.entityResult + 2])
  9576. }
  9577. }
  9578. stateBeforeNumericEntity(e) {
  9579. (32 | e) === Kl.LowerX ? (this.entityExcess++, this.state = jl.InHexEntity) : (this.state = jl.InNumericEntity, this.stateInNumericEntity(e))
  9580. }
  9581. emitNumericEntity(e) {
  9582. const t = this.index - this.entityExcess - 1;
  9583. t + 2 + Number(this.state === jl.InHexEntity) !== this.index && (t > this.sectionStart && this.emitPartial(this.sectionStart, t), this.sectionStart = this.index + Number(e), this.emitCodePoint(ko(this.entityResult))), this.state = this.baseState
  9584. }
  9585. stateInNumericEntity(e) {
  9586. e === Kl.Semi ? this.emitNumericEntity(!0) : $l(e) ? (this.entityResult = 10 * this.entityResult + (e - Kl.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--)
  9587. }
  9588. stateInHexEntity(e) {
  9589. e === Kl.Semi ? this.emitNumericEntity(!0) : $l(e) ? (this.entityResult = 16 * this.entityResult + (e - Kl.Zero), this.entityExcess++) : !function (e) {
  9590. return e >= Kl.UpperA && e <= Kl.UpperF || e >= Kl.LowerA && e <= Kl.LowerF
  9591. }(e) ? (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--) : (this.entityResult = 16 * this.entityResult + ((32 | e) - Kl.LowerA + 10), this.entityExcess++)
  9592. }
  9593. allowLegacyEntity() {
  9594. return !this.xmlMode && (this.baseState === jl.Text || this.baseState === jl.InSpecialTag)
  9595. }
  9596. cleanup() {
  9597. this.running && this.sectionStart !== this.index && (this.state === jl.Text || this.state === jl.InSpecialTag && 0 === this.sequenceIndex ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : this.state !== jl.InAttributeValueDq && this.state !== jl.InAttributeValueSq && this.state !== jl.InAttributeValueNq || (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index))
  9598. }
  9599. shouldContinue() {
  9600. return this.index < this.buffer.length + this.offset && this.running
  9601. }
  9602. parse() {
  9603. for (; this.shouldContinue();) {
  9604. const e = this.buffer.charCodeAt(this.index - this.offset);
  9605. this.state === jl.Text ? this.stateText(e) : this.state === jl.SpecialStartSequence ? this.stateSpecialStartSequence(e) : this.state === jl.InSpecialTag ? this.stateInSpecialTag(e) : this.state === jl.CDATASequence ? this.stateCDATASequence(e) : this.state === jl.InAttributeValueDq ? this.stateInAttributeValueDoubleQuotes(e) : this.state === jl.InAttributeName ? this.stateInAttributeName(e) : this.state === jl.InCommentLike ? this.stateInCommentLike(e) : this.state === jl.InSpecialComment ? this.stateInSpecialComment(e) : this.state === jl.BeforeAttributeName ? this.stateBeforeAttributeName(e) : this.state === jl.InTagName ? this.stateInTagName(e) : this.state === jl.InClosingTagName ? this.stateInClosingTagName(e) : this.state === jl.BeforeTagName ? this.stateBeforeTagName(e) : this.state === jl.AfterAttributeName ? this.stateAfterAttributeName(e) : this.state === jl.InAttributeValueSq ? this.stateInAttributeValueSingleQuotes(e) : this.state === jl.BeforeAttributeValue ? this.stateBeforeAttributeValue(e) : this.state === jl.BeforeClosingTagName ? this.stateBeforeClosingTagName(e) : this.state === jl.AfterClosingTagName ? this.stateAfterClosingTagName(e) : this.state === jl.BeforeSpecialS ? this.stateBeforeSpecialS(e) : this.state === jl.InAttributeValueNq ? this.stateInAttributeValueNoQuotes(e) : this.state === jl.InSelfClosingTag ? this.stateInSelfClosingTag(e) : this.state === jl.InDeclaration ? this.stateInDeclaration(e) : this.state === jl.BeforeDeclaration ? this.stateBeforeDeclaration(e) : this.state === jl.BeforeComment ? this.stateBeforeComment(e) : this.state === jl.InProcessingInstruction ? this.stateInProcessingInstruction(e) : this.state === jl.InNamedEntity ? this.stateInNamedEntity(e) : this.state === jl.BeforeEntity ? this.stateBeforeEntity(e) : this.state === jl.InHexEntity ? this.stateInHexEntity(e) : this.state === jl.InNumericEntity ? this.stateInNumericEntity(e) : this.stateBeforeNumericEntity(e), this.index++
  9606. }
  9607. this.cleanup()
  9608. }
  9609. finish() {
  9610. this.state === jl.InNamedEntity && this.emitNamedEntity(), this.sectionStart < this.index && this.handleTrailingData(), this.cbs.onend()
  9611. }
  9612. handleTrailingData() {
  9613. const e = this.buffer.length + this.offset;
  9614. this.state === jl.InCommentLike ? this.currentSequence === zl.CdataEnd ? this.cbs.oncdata(this.sectionStart, e, 0) : this.cbs.oncomment(this.sectionStart, e, 0) : this.state === jl.InNumericEntity && this.allowLegacyEntity() || this.state === jl.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === jl.InTagName || this.state === jl.BeforeAttributeName || this.state === jl.BeforeAttributeValue || this.state === jl.AfterAttributeName || this.state === jl.InAttributeName || this.state === jl.InAttributeValueSq || this.state === jl.InAttributeValueDq || this.state === jl.InAttributeValueNq || this.state === jl.InClosingTagName || this.cbs.ontext(this.sectionStart, e)
  9615. }
  9616. emitPartial(e, t) {
  9617. this.baseState !== jl.Text && this.baseState !== jl.InSpecialTag ? this.cbs.onattribdata(e, t) : this.cbs.ontext(e, t)
  9618. }
  9619. emitCodePoint(e) {
  9620. this.baseState !== jl.Text && this.baseState !== jl.InSpecialTag ? this.cbs.onattribentity(e) : this.cbs.ontextentity(e)
  9621. }
  9622. }
  9623. const Zl = new Set(["input", "option", "optgroup", "select", "button", "datalist", "textarea"]), eh = new Set(["p"]),
  9624. th = new Set(["thead", "tbody"]), nh = new Set(["dd", "dt"]), rh = new Set(["rt", "rp"]),
  9625. ih = new Map([["tr", new Set(["tr", "th", "td"])], ["th", new Set(["th"])], ["td", new Set(["thead", "th", "td"])], ["body", new Set(["head", "link", "script"])], ["li", new Set(["li"])], ["p", eh], ["h1", eh], ["h2", eh], ["h3", eh], ["h4", eh], ["h5", eh], ["h6", eh], ["select", Zl], ["input", Zl], ["output", Zl], ["button", Zl], ["datalist", Zl], ["textarea", Zl], ["option", new Set(["option"])], ["optgroup", new Set(["optgroup", "option"])], ["dd", nh], ["dt", nh], ["address", eh], ["article", eh], ["aside", eh], ["blockquote", eh], ["details", eh], ["div", eh], ["dl", eh], ["fieldset", eh], ["figcaption", eh], ["figure", eh], ["footer", eh], ["form", eh], ["header", eh], ["hr", eh], ["main", eh], ["nav", eh], ["ol", eh], ["pre", eh], ["section", eh], ["table", eh], ["ul", eh], ["rt", rh], ["rp", rh], ["tbody", th], ["tfoot", th]]),
  9626. sh = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]),
  9627. ah = new Set(["math", "svg"]),
  9628. oh = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignobject", "desc", "title"]), ch = /\s|\//;
  9629. class lh {
  9630. constructor(e, t = {}) {
  9631. var n, r, i, s, a;
  9632. this.options = t, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = null != e ? e : {}, this.lowerCaseTagNames = null !== (n = t.lowerCaseTags) && void 0 !== n ? n : !t.xmlMode, this.lowerCaseAttributeNames = null !== (r = t.lowerCaseAttributeNames) && void 0 !== r ? r : !t.xmlMode, this.tokenizer = new (null !== (i = t.Tokenizer) && void 0 !== i ? i : Jl)(this.options, this), null === (a = (s = this.cbs).onparserinit) || void 0 === a || a.call(s, this)
  9633. }
  9634. ontext(e, t) {
  9635. var n, r;
  9636. const i = this.getSlice(e, t);
  9637. this.endIndex = t - 1, null === (r = (n = this.cbs).ontext) || void 0 === r || r.call(n, i), this.startIndex = t
  9638. }
  9639. ontextentity(e) {
  9640. var t, n;
  9641. const r = this.tokenizer.getSectionStart();
  9642. this.endIndex = r - 1, null === (n = (t = this.cbs).ontext) || void 0 === n || n.call(t, Lo(e)), this.startIndex = r
  9643. }
  9644. isVoidElement(e) {
  9645. return !this.options.xmlMode && sh.has(e)
  9646. }
  9647. onopentagname(e, t) {
  9648. this.endIndex = t;
  9649. let n = this.getSlice(e, t);
  9650. this.lowerCaseTagNames && (n = n.toLowerCase()), this.emitOpenTag(n)
  9651. }
  9652. emitOpenTag(e) {
  9653. var t, n, r, i;
  9654. this.openTagStart = this.startIndex, this.tagname = e;
  9655. const s = !this.options.xmlMode && ih.get(e);
  9656. if (s) for (; this.stack.length > 0 && s.has(this.stack[this.stack.length - 1]);) {
  9657. const e = this.stack.pop();
  9658. null === (n = (t = this.cbs).onclosetag) || void 0 === n || n.call(t, e, !0)
  9659. }
  9660. this.isVoidElement(e) || (this.stack.push(e), ah.has(e) ? this.foreignContext.push(!0) : oh.has(e) && this.foreignContext.push(!1)), null === (i = (r = this.cbs).onopentagname) || void 0 === i || i.call(r, e), this.cbs.onopentag && (this.attribs = {})
  9661. }
  9662. endOpenTag(e) {
  9663. var t, n;
  9664. this.startIndex = this.openTagStart, this.attribs && (null === (n = (t = this.cbs).onopentag) || void 0 === n || n.call(t, this.tagname, this.attribs, e), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = ""
  9665. }
  9666. onopentagend(e) {
  9667. this.endIndex = e, this.endOpenTag(!1), this.startIndex = e + 1
  9668. }
  9669. onclosetag(e, t) {
  9670. var n, r, i, s, a, o;
  9671. this.endIndex = t;
  9672. let c = this.getSlice(e, t);
  9673. if (this.lowerCaseTagNames && (c = c.toLowerCase()), (ah.has(c) || oh.has(c)) && this.foreignContext.pop(), this.isVoidElement(c)) this.options.xmlMode || "br" !== c || (null === (r = (n = this.cbs).onopentagname) || void 0 === r || r.call(n, "br"), null === (s = (i = this.cbs).onopentag) || void 0 === s || s.call(i, "br", {}, !0), null === (o = (a = this.cbs).onclosetag) || void 0 === o || o.call(a, "br", !1)); else {
  9674. const e = this.stack.lastIndexOf(c);
  9675. if (-1 !== e) if (this.cbs.onclosetag) {
  9676. let t = this.stack.length - e;
  9677. for (; t--;) this.cbs.onclosetag(this.stack.pop(), 0 !== t)
  9678. } else this.stack.length = e; else this.options.xmlMode || "p" !== c || (this.emitOpenTag("p"), this.closeCurrentTag(!0))
  9679. }
  9680. this.startIndex = t + 1
  9681. }
  9682. onselfclosingtag(e) {
  9683. this.endIndex = e, this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1] ? (this.closeCurrentTag(!1), this.startIndex = e + 1) : this.onopentagend(e)
  9684. }
  9685. closeCurrentTag(e) {
  9686. var t, n;
  9687. const r = this.tagname;
  9688. this.endOpenTag(e), this.stack[this.stack.length - 1] === r && (null === (n = (t = this.cbs).onclosetag) || void 0 === n || n.call(t, r, !e), this.stack.pop())
  9689. }
  9690. onattribname(e, t) {
  9691. this.startIndex = e;
  9692. const n = this.getSlice(e, t);
  9693. this.attribname = this.lowerCaseAttributeNames ? n.toLowerCase() : n
  9694. }
  9695. onattribdata(e, t) {
  9696. this.attribvalue += this.getSlice(e, t)
  9697. }
  9698. onattribentity(e) {
  9699. this.attribvalue += Lo(e)
  9700. }
  9701. onattribend(e, t) {
  9702. var n, r;
  9703. this.endIndex = t, null === (r = (n = this.cbs).onattribute) || void 0 === r || r.call(n, this.attribname, this.attribvalue, e === Vl.Double ? '"' : e === Vl.Single ? "'" : e === Vl.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = ""
  9704. }
  9705. getInstructionName(e) {
  9706. const t = e.search(ch);
  9707. let n = t < 0 ? e : e.substr(0, t);
  9708. return this.lowerCaseTagNames && (n = n.toLowerCase()), n
  9709. }
  9710. ondeclaration(e, t) {
  9711. this.endIndex = t;
  9712. const n = this.getSlice(e, t);
  9713. if (this.cbs.onprocessinginstruction) {
  9714. const e = this.getInstructionName(n);
  9715. this.cbs.onprocessinginstruction(`!${e}`, `!${n}`)
  9716. }
  9717. this.startIndex = t + 1
  9718. }
  9719. onprocessinginstruction(e, t) {
  9720. this.endIndex = t;
  9721. const n = this.getSlice(e, t);
  9722. if (this.cbs.onprocessinginstruction) {
  9723. const e = this.getInstructionName(n);
  9724. this.cbs.onprocessinginstruction(`?${e}`, `?${n}`)
  9725. }
  9726. this.startIndex = t + 1
  9727. }
  9728. oncomment(e, t, n) {
  9729. var r, i, s, a;
  9730. this.endIndex = t, null === (i = (r = this.cbs).oncomment) || void 0 === i || i.call(r, this.getSlice(e, t - n)), null === (a = (s = this.cbs).oncommentend) || void 0 === a || a.call(s), this.startIndex = t + 1
  9731. }
  9732. oncdata(e, t, n) {
  9733. var r, i, s, a, o, c, l, h, u, p;
  9734. this.endIndex = t;
  9735. const f = this.getSlice(e, t - n);
  9736. this.options.xmlMode || this.options.recognizeCDATA ? (null === (i = (r = this.cbs).oncdatastart) || void 0 === i || i.call(r), null === (a = (s = this.cbs).ontext) || void 0 === a || a.call(s, f), null === (c = (o = this.cbs).oncdataend) || void 0 === c || c.call(o)) : (null === (h = (l = this.cbs).oncomment) || void 0 === h || h.call(l, `[CDATA[${f}]]`), null === (p = (u = this.cbs).oncommentend) || void 0 === p || p.call(u)), this.startIndex = t + 1
  9737. }
  9738. onend() {
  9739. var e, t;
  9740. if (this.cbs.onclosetag) {
  9741. this.endIndex = this.startIndex;
  9742. for (let e = this.stack.length; e > 0; this.cbs.onclosetag(this.stack[--e], !0)) ;
  9743. }
  9744. null === (t = (e = this.cbs).onend) || void 0 === t || t.call(e)
  9745. }
  9746. reset() {
  9747. var e, t, n, r;
  9748. null === (t = (e = this.cbs).onreset) || void 0 === t || t.call(e), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, null === (r = (n = this.cbs).onparserinit) || void 0 === r || r.call(n, this), this.buffers.length = 0, this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1
  9749. }
  9750. parseComplete(e) {
  9751. this.reset(), this.end(e)
  9752. }
  9753. getSlice(e, t) {
  9754. for (; e - this.bufferOffset >= this.buffers[0].length;) this.shiftBuffer();
  9755. let n = this.buffers[0].slice(e - this.bufferOffset, t - this.bufferOffset);
  9756. for (; t - this.bufferOffset > this.buffers[0].length;) this.shiftBuffer(), n += this.buffers[0].slice(0, t - this.bufferOffset);
  9757. return n
  9758. }
  9759. shiftBuffer() {
  9760. this.bufferOffset += this.buffers[0].length, this.writeIndex--, this.buffers.shift()
  9761. }
  9762. write(e) {
  9763. var t, n;
  9764. this.ended ? null === (n = (t = this.cbs).onerror) || void 0 === n || n.call(t, new Error(".write() after done!")) : (this.buffers.push(e), this.tokenizer.running && (this.tokenizer.write(e), this.writeIndex++))
  9765. }
  9766. end(e) {
  9767. var t, n;
  9768. this.ended ? null === (n = (t = this.cbs).onerror) || void 0 === n || n.call(t, Error(".end() after done!")) : (e && this.write(e), this.ended = !0, this.tokenizer.end())
  9769. }
  9770. pause() {
  9771. this.tokenizer.pause()
  9772. }
  9773. resume() {
  9774. for (this.tokenizer.resume(); this.tokenizer.running && this.writeIndex < this.buffers.length;) this.tokenizer.write(this.buffers[this.writeIndex++]);
  9775. this.ended && this.tokenizer.end()
  9776. }
  9777. parseChunk(e) {
  9778. this.write(e)
  9779. }
  9780. done(e) {
  9781. this.end(e)
  9782. }
  9783. }
  9784. var hh = function (e) {
  9785. return function (t, n, r, i) {
  9786. if ("undefined" != typeof Buffer && Buffer.isBuffer(t) && (t = t.toString()), "string" == typeof t) return e(t, n, r, i);
  9787. var s = t;
  9788. if (!Array.isArray(s) && L(s)) return s;
  9789. var a = new N([]);
  9790. return Ba(s, a), a
  9791. }
  9792. }((function (e, t, n, r) {
  9793. return t.xmlMode || t._useHtmlParser2 ? function (e, t) {
  9794. const n = new M(void 0, t);
  9795. return new lh(n, t).end(e), n.root
  9796. }(e, t) : ql(e, t, n, r)
  9797. })), uh = function (e, t) {
  9798. return function r(s, a, o) {
  9799. if (void 0 === o && (o = !0), null == s) throw new Error("cheerio.load() expects a string");
  9800. var c = no(no({}, n), i(a)), l = e(s, c, o, null), h = function (n) {
  9801. function r() {
  9802. return null !== n && n.apply(this, arguments) || this
  9803. }
  9804. return to(r, n), r.prototype._make = function (e, t) {
  9805. var n = u(e, t);
  9806. return n.prevObject = this, n
  9807. }, r.prototype._parse = function (t, n, r, i) {
  9808. return e(t, n, r, i)
  9809. }, r.prototype._render = function (e) {
  9810. return t(e, this.options)
  9811. }, r
  9812. }(Za);
  9813. function u(t, n, r, s) {
  9814. if (void 0 === r && (r = l), t && wi(t)) return t;
  9815. var a = no(no({}, c), i(s)), o = "string" == typeof r ? [e(r, a, !1, null)] : "length" in r ? r : [r],
  9816. u = wi(o) ? o : new h(o, null, a);
  9817. if (u._root = u, !t) return new h(void 0, u, a);
  9818. var p,
  9819. f = "string" == typeof t && Ui(t) ? e(t, a, !1, null).children : (p = t).name || "root" === p.type || "text" === p.type || "comment" === p.type ? [t] : Array.isArray(t) ? t : void 0,
  9820. d = new h(f, u, a);
  9821. if (f) return d;
  9822. if ("string" != typeof t) throw new Error("Unexpected type of selector");
  9823. var E = t,
  9824. m = n ? "string" == typeof n ? Ui(n) ? new h([e(n, a, !1, null)], u, a) : (E = "".concat(n, " ").concat(E), u) : wi(n) ? n : new h(Array.isArray(n) ? n : [n], u, a) : u;
  9825. return m ? m.find(E) : d
  9826. }
  9827. return Object.assign(u, xi, {load: r, _root: l, _options: c, fn: h.prototype, prototype: h.prototype}), u
  9828. }
  9829. }(hh, (function (e, t) {
  9830. return t.xmlMode || t._useHtmlParser2 ? V(e, t) : function (e) {
  9831. for (var t, n = ("length" in e ? e : [e]), r = 0; r < n.length; r += 1) L(s = n[r]) && (t = Array.prototype.splice).call.apply(t, Yl([n, r, 1], s.children, !1));
  9832. var i = "";
  9833. for (r = 0; r < n.length; r += 1) {
  9834. var s;
  9835. i += Bl(s = n[r], Wl)
  9836. }
  9837. return i
  9838. }(e)
  9839. }));
  9840. function ph(e, t) {
  9841. return He({path: e, json: t})
  9842. }
  9843. function fh(e) {
  9844. return He(e)
  9845. }
  9846. function dh(e, t) {
  9847. return Ii(e, t)
  9848. }
  9849. var Eh = uh([]), mh = Di, Th = Ri, _h = ki, Ah = vi;
  9850. export {
  9851. mh as contains,
  9852. Eh as default,
  9853. Oi as html,
  9854. dh as jinja2,
  9855. ph as jp,
  9856. fh as jpo,
  9857. uh as load,
  9858. Th as merge,
  9859. _h as parseHTML,
  9860. Ah as root,
  9861. Li as text,
  9862. yi as xml
  9863. };