index.es.js 182 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247
  1. (function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#ffffff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
  2. import { defineComponent as Ae, openBlock as G, createElementBlock as W, createElementVNode as B, normalizeClass as me, unref as F, toDisplayString as ee, createCommentVNode as ve, Fragment as pe, renderList as Ke, createBlock as Ie, computed as Ee, ref as nn, watch as Wn, normalizeStyle as Qn, createVNode as De, renderSlot as tn } from "vue";
  3. function ae() {
  4. }
  5. ae.prototype = {
  6. diff: function(r, l) {
  7. var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, g = f.callback;
  8. typeof f == "function" && (g = f, f = {}), this.options = f;
  9. var n = this;
  10. function t(p) {
  11. return g ? (setTimeout(function() {
  12. g(void 0, p);
  13. }, 0), !0) : p;
  14. }
  15. r = this.castInput(r), l = this.castInput(l), r = this.removeEmpty(this.tokenize(r)), l = this.removeEmpty(this.tokenize(l));
  16. var i = l.length, s = r.length, a = 1, o = i + s;
  17. f.maxEditLength && (o = Math.min(o, f.maxEditLength));
  18. var c = [{
  19. newPos: -1,
  20. components: []
  21. }], u = this.extractCommon(c[0], l, r, 0);
  22. if (c[0].newPos + 1 >= i && u + 1 >= s)
  23. return t([{
  24. value: this.join(l),
  25. count: l.length
  26. }]);
  27. function d() {
  28. for (var p = -1 * a; p <= a; p += 2) {
  29. var _ = void 0, E = c[p - 1], m = c[p + 1], v = (m ? m.newPos : 0) - p;
  30. E && (c[p - 1] = void 0);
  31. var A = E && E.newPos + 1 < i, D = m && 0 <= v && v < s;
  32. if (!A && !D) {
  33. c[p] = void 0;
  34. continue;
  35. }
  36. if (!A || D && E.newPos < m.newPos ? (_ = Yn(m), n.pushComponent(_.components, void 0, !0)) : (_ = E, _.newPos++, n.pushComponent(_.components, !0, void 0)), v = n.extractCommon(_, l, r, p), _.newPos + 1 >= i && v + 1 >= s)
  37. return t(Zn(n, _.components, l, r, n.useLongestToken));
  38. c[p] = _;
  39. }
  40. a++;
  41. }
  42. if (g)
  43. (function p() {
  44. setTimeout(function() {
  45. if (a > o)
  46. return g();
  47. d() || p();
  48. }, 0);
  49. })();
  50. else
  51. for (; a <= o; ) {
  52. var h = d();
  53. if (h)
  54. return h;
  55. }
  56. },
  57. pushComponent: function(r, l, f) {
  58. var g = r[r.length - 1];
  59. g && g.added === l && g.removed === f ? r[r.length - 1] = {
  60. count: g.count + 1,
  61. added: l,
  62. removed: f
  63. } : r.push({
  64. count: 1,
  65. added: l,
  66. removed: f
  67. });
  68. },
  69. extractCommon: function(r, l, f, g) {
  70. for (var n = l.length, t = f.length, i = r.newPos, s = i - g, a = 0; i + 1 < n && s + 1 < t && this.equals(l[i + 1], f[s + 1]); )
  71. i++, s++, a++;
  72. return a && r.components.push({
  73. count: a
  74. }), r.newPos = i, s;
  75. },
  76. equals: function(r, l) {
  77. return this.options.comparator ? this.options.comparator(r, l) : r === l || this.options.ignoreCase && r.toLowerCase() === l.toLowerCase();
  78. },
  79. removeEmpty: function(r) {
  80. for (var l = [], f = 0; f < r.length; f++)
  81. r[f] && l.push(r[f]);
  82. return l;
  83. },
  84. castInput: function(r) {
  85. return r;
  86. },
  87. tokenize: function(r) {
  88. return r.split("");
  89. },
  90. join: function(r) {
  91. return r.join("");
  92. }
  93. };
  94. function Zn(e, r, l, f, g) {
  95. for (var n = 0, t = r.length, i = 0, s = 0; n < t; n++) {
  96. var a = r[n];
  97. if (a.removed) {
  98. if (a.value = e.join(f.slice(s, s + a.count)), s += a.count, n && r[n - 1].added) {
  99. var c = r[n - 1];
  100. r[n - 1] = r[n], r[n] = c;
  101. }
  102. } else {
  103. if (!a.added && g) {
  104. var o = l.slice(i, i + a.count);
  105. o = o.map(function(d, h) {
  106. var p = f[s + h];
  107. return p.length > d.length ? p : d;
  108. }), a.value = e.join(o);
  109. } else
  110. a.value = e.join(l.slice(i, i + a.count));
  111. i += a.count, a.added || (s += a.count);
  112. }
  113. }
  114. var u = r[t - 1];
  115. return t > 1 && typeof u.value == "string" && (u.added || u.removed) && e.equals("", u.value) && (r[t - 2].value += u.value, r.pop()), r;
  116. }
  117. function Yn(e) {
  118. return {
  119. newPos: e.newPos,
  120. components: e.components.slice(0)
  121. };
  122. }
  123. var Xn = new ae();
  124. function Vn(e, r, l) {
  125. return Xn.diff(e, r, l);
  126. }
  127. function jn(e, r) {
  128. if (typeof e == "function")
  129. r.callback = e;
  130. else if (e)
  131. for (var l in e)
  132. e.hasOwnProperty(l) && (r[l] = e[l]);
  133. return r;
  134. }
  135. var rn = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, sn = /\S/, We = new ae();
  136. We.equals = function(e, r) {
  137. return this.options.ignoreCase && (e = e.toLowerCase(), r = r.toLowerCase()), e === r || this.options.ignoreWhitespace && !sn.test(e) && !sn.test(r);
  138. };
  139. We.tokenize = function(e) {
  140. for (var r = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), l = 0; l < r.length - 1; l++)
  141. !r[l + 1] && r[l + 2] && rn.test(r[l]) && rn.test(r[l + 2]) && (r[l] += r[l + 2], r.splice(l + 1, 2), l--);
  142. return r;
  143. };
  144. function qn(e, r, l) {
  145. return l = jn(l, {
  146. ignoreWhitespace: !0
  147. }), We.diff(e, r, l);
  148. }
  149. var bn = new ae();
  150. bn.tokenize = function(e) {
  151. var r = [], l = e.split(/(\n|\r\n)/);
  152. l[l.length - 1] || l.pop();
  153. for (var f = 0; f < l.length; f++) {
  154. var g = l[f];
  155. f % 2 && !this.options.newlineIsToken ? r[r.length - 1] += g : (this.options.ignoreWhitespace && (g = g.trim()), r.push(g));
  156. }
  157. return r;
  158. };
  159. var Jn = new ae();
  160. Jn.tokenize = function(e) {
  161. return e.split(/(\S.+?[.!?])(?=\s+|$)/);
  162. };
  163. var et = new ae();
  164. et.tokenize = function(e) {
  165. return e.split(/([{}:;,]|\s+)/);
  166. };
  167. function Ce(e) {
  168. "@babel/helpers - typeof";
  169. return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ce = function(r) {
  170. return typeof r;
  171. } : Ce = function(r) {
  172. return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
  173. }, Ce(e);
  174. }
  175. var nt = Object.prototype.toString, we = new ae();
  176. we.useLongestToken = !0;
  177. we.tokenize = bn.tokenize;
  178. we.castInput = function(e) {
  179. var r = this.options, l = r.undefinedReplacement, f = r.stringifyReplacer, g = f === void 0 ? function(n, t) {
  180. return typeof t == "undefined" ? l : t;
  181. } : f;
  182. return typeof e == "string" ? e : JSON.stringify(xe(e, null, null, g), g, " ");
  183. };
  184. we.equals = function(e, r) {
  185. return ae.prototype.equals.call(we, e.replace(/,([\r\n])/g, "$1"), r.replace(/,([\r\n])/g, "$1"));
  186. };
  187. function xe(e, r, l, f, g) {
  188. r = r || [], l = l || [], f && (e = f(g, e));
  189. var n;
  190. for (n = 0; n < r.length; n += 1)
  191. if (r[n] === e)
  192. return l[n];
  193. var t;
  194. if (nt.call(e) === "[object Array]") {
  195. for (r.push(e), t = new Array(e.length), l.push(t), n = 0; n < e.length; n += 1)
  196. t[n] = xe(e[n], r, l, f, g);
  197. return r.pop(), l.pop(), t;
  198. }
  199. if (e && e.toJSON && (e = e.toJSON()), Ce(e) === "object" && e !== null) {
  200. r.push(e), t = {}, l.push(t);
  201. var i = [], s;
  202. for (s in e)
  203. e.hasOwnProperty(s) && i.push(s);
  204. for (i.sort(), n = 0; n < i.length; n += 1)
  205. s = i[n], t[s] = xe(e[s], r, l, f, s);
  206. r.pop(), l.pop();
  207. } else
  208. t = e;
  209. return t;
  210. }
  211. var Ge = new ae();
  212. Ge.tokenize = function(e) {
  213. return e.slice();
  214. };
  215. Ge.join = Ge.removeEmpty = function(e) {
  216. return e;
  217. };
  218. function tt(e) {
  219. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  220. }
  221. var En = { exports: {} };
  222. (function(e) {
  223. var r = function() {
  224. this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
  225. }, l = -1, f = 1, g = 0;
  226. r.Diff = function(n, t) {
  227. return [n, t];
  228. }, r.prototype.diff_main = function(n, t, i, s) {
  229. typeof s == "undefined" && (this.Diff_Timeout <= 0 ? s = Number.MAX_VALUE : s = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
  230. var a = s;
  231. if (n == null || t == null)
  232. throw new Error("Null input. (diff_main)");
  233. if (n == t)
  234. return n ? [new r.Diff(g, n)] : [];
  235. typeof i == "undefined" && (i = !0);
  236. var o = i, c = this.diff_commonPrefix(n, t), u = n.substring(0, c);
  237. n = n.substring(c), t = t.substring(c), c = this.diff_commonSuffix(n, t);
  238. var d = n.substring(n.length - c);
  239. n = n.substring(0, n.length - c), t = t.substring(0, t.length - c);
  240. var h = this.diff_compute_(n, t, o, a);
  241. return u && h.unshift(new r.Diff(g, u)), d && h.push(new r.Diff(g, d)), this.diff_cleanupMerge(h), h;
  242. }, r.prototype.diff_compute_ = function(n, t, i, s) {
  243. var a;
  244. if (!n)
  245. return [new r.Diff(f, t)];
  246. if (!t)
  247. return [new r.Diff(l, n)];
  248. var o = n.length > t.length ? n : t, c = n.length > t.length ? t : n, u = o.indexOf(c);
  249. if (u != -1)
  250. return a = [
  251. new r.Diff(f, o.substring(0, u)),
  252. new r.Diff(g, c),
  253. new r.Diff(
  254. f,
  255. o.substring(u + c.length)
  256. )
  257. ], n.length > t.length && (a[0][0] = a[2][0] = l), a;
  258. if (c.length == 1)
  259. return [
  260. new r.Diff(l, n),
  261. new r.Diff(f, t)
  262. ];
  263. var d = this.diff_halfMatch_(n, t);
  264. if (d) {
  265. var h = d[0], p = d[1], _ = d[2], E = d[3], m = d[4], v = this.diff_main(h, _, i, s), A = this.diff_main(p, E, i, s);
  266. return v.concat(
  267. [new r.Diff(g, m)],
  268. A
  269. );
  270. }
  271. return i && n.length > 100 && t.length > 100 ? this.diff_lineMode_(n, t, s) : this.diff_bisect_(n, t, s);
  272. }, r.prototype.diff_lineMode_ = function(n, t, i) {
  273. var s = this.diff_linesToChars_(n, t);
  274. n = s.chars1, t = s.chars2;
  275. var a = s.lineArray, o = this.diff_main(n, t, !1, i);
  276. this.diff_charsToLines_(o, a), this.diff_cleanupSemantic(o), o.push(new r.Diff(g, ""));
  277. for (var c = 0, u = 0, d = 0, h = "", p = ""; c < o.length; ) {
  278. switch (o[c][0]) {
  279. case f:
  280. d++, p += o[c][1];
  281. break;
  282. case l:
  283. u++, h += o[c][1];
  284. break;
  285. case g:
  286. if (u >= 1 && d >= 1) {
  287. o.splice(
  288. c - u - d,
  289. u + d
  290. ), c = c - u - d;
  291. for (var _ = this.diff_main(h, p, !1, i), E = _.length - 1; E >= 0; E--)
  292. o.splice(c, 0, _[E]);
  293. c = c + _.length;
  294. }
  295. d = 0, u = 0, h = "", p = "";
  296. break;
  297. }
  298. c++;
  299. }
  300. return o.pop(), o;
  301. }, r.prototype.diff_bisect_ = function(n, t, i) {
  302. for (var s = n.length, a = t.length, o = Math.ceil((s + a) / 2), c = o, u = 2 * o, d = new Array(u), h = new Array(u), p = 0; p < u; p++)
  303. d[p] = -1, h[p] = -1;
  304. d[c + 1] = 0, h[c + 1] = 0;
  305. for (var _ = s - a, E = _ % 2 != 0, m = 0, v = 0, A = 0, D = 0, S = 0; S < o && !((/* @__PURE__ */ new Date()).getTime() > i); S++) {
  306. for (var M = -S + m; M <= S - v; M += 2) {
  307. var R = c + M, L;
  308. M == -S || M != S && d[R - 1] < d[R + 1] ? L = d[R + 1] : L = d[R - 1] + 1;
  309. for (var I = L - M; L < s && I < a && n.charAt(L) == t.charAt(I); )
  310. L++, I++;
  311. if (d[R] = L, L > s)
  312. v += 2;
  313. else if (I > a)
  314. m += 2;
  315. else if (E) {
  316. var P = c + _ - M;
  317. if (P >= 0 && P < u && h[P] != -1) {
  318. var $ = s - h[P];
  319. if (L >= $)
  320. return this.diff_bisectSplit_(n, t, L, I, i);
  321. }
  322. }
  323. }
  324. for (var K = -S + A; K <= S - D; K += 2) {
  325. var P = c + K, $;
  326. K == -S || K != S && h[P - 1] < h[P + 1] ? $ = h[P + 1] : $ = h[P - 1] + 1;
  327. for (var Y = $ - K; $ < s && Y < a && n.charAt(s - $ - 1) == t.charAt(a - Y - 1); )
  328. $++, Y++;
  329. if (h[P] = $, $ > s)
  330. D += 2;
  331. else if (Y > a)
  332. A += 2;
  333. else if (!E) {
  334. var R = c + _ - K;
  335. if (R >= 0 && R < u && d[R] != -1) {
  336. var L = d[R], I = c + L - R;
  337. if ($ = s - $, L >= $)
  338. return this.diff_bisectSplit_(n, t, L, I, i);
  339. }
  340. }
  341. }
  342. }
  343. return [
  344. new r.Diff(l, n),
  345. new r.Diff(f, t)
  346. ];
  347. }, r.prototype.diff_bisectSplit_ = function(n, t, i, s, a) {
  348. var o = n.substring(0, i), c = t.substring(0, s), u = n.substring(i), d = t.substring(s), h = this.diff_main(o, c, !1, a), p = this.diff_main(u, d, !1, a);
  349. return h.concat(p);
  350. }, r.prototype.diff_linesToChars_ = function(n, t) {
  351. var i = [], s = {};
  352. i[0] = "";
  353. function a(d) {
  354. for (var h = "", p = 0, _ = -1, E = i.length; _ < d.length - 1; ) {
  355. _ = d.indexOf(`
  356. `, p), _ == -1 && (_ = d.length - 1);
  357. var m = d.substring(p, _ + 1);
  358. (s.hasOwnProperty ? s.hasOwnProperty(m) : s[m] !== void 0) ? h += String.fromCharCode(s[m]) : (E == o && (m = d.substring(p), _ = d.length), h += String.fromCharCode(E), s[m] = E, i[E++] = m), p = _ + 1;
  359. }
  360. return h;
  361. }
  362. var o = 4e4, c = a(n);
  363. o = 65535;
  364. var u = a(t);
  365. return { chars1: c, chars2: u, lineArray: i };
  366. }, r.prototype.diff_charsToLines_ = function(n, t) {
  367. for (var i = 0; i < n.length; i++) {
  368. for (var s = n[i][1], a = [], o = 0; o < s.length; o++)
  369. a[o] = t[s.charCodeAt(o)];
  370. n[i][1] = a.join("");
  371. }
  372. }, r.prototype.diff_commonPrefix = function(n, t) {
  373. if (!n || !t || n.charAt(0) != t.charAt(0))
  374. return 0;
  375. for (var i = 0, s = Math.min(n.length, t.length), a = s, o = 0; i < a; )
  376. n.substring(o, a) == t.substring(o, a) ? (i = a, o = i) : s = a, a = Math.floor((s - i) / 2 + i);
  377. return a;
  378. }, r.prototype.diff_commonSuffix = function(n, t) {
  379. if (!n || !t || n.charAt(n.length - 1) != t.charAt(t.length - 1))
  380. return 0;
  381. for (var i = 0, s = Math.min(n.length, t.length), a = s, o = 0; i < a; )
  382. n.substring(n.length - a, n.length - o) == t.substring(t.length - a, t.length - o) ? (i = a, o = i) : s = a, a = Math.floor((s - i) / 2 + i);
  383. return a;
  384. }, r.prototype.diff_commonOverlap_ = function(n, t) {
  385. var i = n.length, s = t.length;
  386. if (i == 0 || s == 0)
  387. return 0;
  388. i > s ? n = n.substring(i - s) : i < s && (t = t.substring(0, i));
  389. var a = Math.min(i, s);
  390. if (n == t)
  391. return a;
  392. for (var o = 0, c = 1; ; ) {
  393. var u = n.substring(a - c), d = t.indexOf(u);
  394. if (d == -1)
  395. return o;
  396. c += d, (d == 0 || n.substring(a - c) == t.substring(0, c)) && (o = c, c++);
  397. }
  398. }, r.prototype.diff_halfMatch_ = function(n, t) {
  399. if (this.Diff_Timeout <= 0)
  400. return null;
  401. var i = n.length > t.length ? n : t, s = n.length > t.length ? t : n;
  402. if (i.length < 4 || s.length * 2 < i.length)
  403. return null;
  404. var a = this;
  405. function o(v, A, D) {
  406. for (var S = v.substring(D, D + Math.floor(v.length / 4)), M = -1, R = "", L, I, P, $; (M = A.indexOf(S, M + 1)) != -1; ) {
  407. var K = a.diff_commonPrefix(
  408. v.substring(D),
  409. A.substring(M)
  410. ), Y = a.diff_commonSuffix(
  411. v.substring(0, D),
  412. A.substring(0, M)
  413. );
  414. R.length < Y + K && (R = A.substring(M - Y, M) + A.substring(M, M + K), L = v.substring(0, D - Y), I = v.substring(D + K), P = A.substring(0, M - Y), $ = A.substring(M + K));
  415. }
  416. return R.length * 2 >= v.length ? [
  417. L,
  418. I,
  419. P,
  420. $,
  421. R
  422. ] : null;
  423. }
  424. var c = o(
  425. i,
  426. s,
  427. Math.ceil(i.length / 4)
  428. ), u = o(
  429. i,
  430. s,
  431. Math.ceil(i.length / 2)
  432. ), d;
  433. if (!c && !u)
  434. return null;
  435. u ? c ? d = c[4].length > u[4].length ? c : u : d = u : d = c;
  436. var h, p, _, E;
  437. n.length > t.length ? (h = d[0], p = d[1], _ = d[2], E = d[3]) : (_ = d[0], E = d[1], h = d[2], p = d[3]);
  438. var m = d[4];
  439. return [h, p, _, E, m];
  440. }, r.prototype.diff_cleanupSemantic = function(n) {
  441. for (var t = !1, i = [], s = 0, a = null, o = 0, c = 0, u = 0, d = 0, h = 0; o < n.length; )
  442. n[o][0] == g ? (i[s++] = o, c = d, u = h, d = 0, h = 0, a = n[o][1]) : (n[o][0] == f ? d += n[o][1].length : h += n[o][1].length, a && a.length <= Math.max(c, u) && a.length <= Math.max(
  443. d,
  444. h
  445. ) && (n.splice(
  446. i[s - 1],
  447. 0,
  448. new r.Diff(l, a)
  449. ), n[i[s - 1] + 1][0] = f, s--, s--, o = s > 0 ? i[s - 1] : -1, c = 0, u = 0, d = 0, h = 0, a = null, t = !0)), o++;
  450. for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n), o = 1; o < n.length; ) {
  451. if (n[o - 1][0] == l && n[o][0] == f) {
  452. var p = n[o - 1][1], _ = n[o][1], E = this.diff_commonOverlap_(p, _), m = this.diff_commonOverlap_(_, p);
  453. E >= m ? (E >= p.length / 2 || E >= _.length / 2) && (n.splice(o, 0, new r.Diff(
  454. g,
  455. _.substring(0, E)
  456. )), n[o - 1][1] = p.substring(0, p.length - E), n[o + 1][1] = _.substring(E), o++) : (m >= p.length / 2 || m >= _.length / 2) && (n.splice(o, 0, new r.Diff(
  457. g,
  458. p.substring(0, m)
  459. )), n[o - 1][0] = f, n[o - 1][1] = _.substring(0, _.length - m), n[o + 1][0] = l, n[o + 1][1] = p.substring(m), o++), o++;
  460. }
  461. o++;
  462. }
  463. }, r.prototype.diff_cleanupSemanticLossless = function(n) {
  464. function t(m, v) {
  465. if (!m || !v)
  466. return 6;
  467. var A = m.charAt(m.length - 1), D = v.charAt(0), S = A.match(r.nonAlphaNumericRegex_), M = D.match(r.nonAlphaNumericRegex_), R = S && A.match(r.whitespaceRegex_), L = M && D.match(r.whitespaceRegex_), I = R && A.match(r.linebreakRegex_), P = L && D.match(r.linebreakRegex_), $ = I && m.match(r.blanklineEndRegex_), K = P && v.match(r.blanklineStartRegex_);
  468. return $ || K ? 5 : I || P ? 4 : S && !R && L ? 3 : R || L ? 2 : S || M ? 1 : 0;
  469. }
  470. for (var i = 1; i < n.length - 1; ) {
  471. if (n[i - 1][0] == g && n[i + 1][0] == g) {
  472. var s = n[i - 1][1], a = n[i][1], o = n[i + 1][1], c = this.diff_commonSuffix(s, a);
  473. if (c) {
  474. var u = a.substring(a.length - c);
  475. s = s.substring(0, s.length - c), a = u + a.substring(0, a.length - c), o = u + o;
  476. }
  477. for (var d = s, h = a, p = o, _ = t(s, a) + t(a, o); a.charAt(0) === o.charAt(0); ) {
  478. s += a.charAt(0), a = a.substring(1) + o.charAt(0), o = o.substring(1);
  479. var E = t(s, a) + t(a, o);
  480. E >= _ && (_ = E, d = s, h = a, p = o);
  481. }
  482. n[i - 1][1] != d && (d ? n[i - 1][1] = d : (n.splice(i - 1, 1), i--), n[i][1] = h, p ? n[i + 1][1] = p : (n.splice(i + 1, 1), i--));
  483. }
  484. i++;
  485. }
  486. }, r.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, r.whitespaceRegex_ = /\s/, r.linebreakRegex_ = /[\r\n]/, r.blanklineEndRegex_ = /\n\r?\n$/, r.blanklineStartRegex_ = /^\r?\n\r?\n/, r.prototype.diff_cleanupEfficiency = function(n) {
  487. for (var t = !1, i = [], s = 0, a = null, o = 0, c = !1, u = !1, d = !1, h = !1; o < n.length; )
  488. n[o][0] == g ? (n[o][1].length < this.Diff_EditCost && (d || h) ? (i[s++] = o, c = d, u = h, a = n[o][1]) : (s = 0, a = null), d = h = !1) : (n[o][0] == l ? h = !0 : d = !0, a && (c && u && d && h || a.length < this.Diff_EditCost / 2 && c + u + d + h == 3) && (n.splice(
  489. i[s - 1],
  490. 0,
  491. new r.Diff(l, a)
  492. ), n[i[s - 1] + 1][0] = f, s--, a = null, c && u ? (d = h = !0, s = 0) : (s--, o = s > 0 ? i[s - 1] : -1, d = h = !1), t = !0)), o++;
  493. t && this.diff_cleanupMerge(n);
  494. }, r.prototype.diff_cleanupMerge = function(n) {
  495. n.push(new r.Diff(g, ""));
  496. for (var t = 0, i = 0, s = 0, a = "", o = "", c; t < n.length; )
  497. switch (n[t][0]) {
  498. case f:
  499. s++, o += n[t][1], t++;
  500. break;
  501. case l:
  502. i++, a += n[t][1], t++;
  503. break;
  504. case g:
  505. i + s > 1 ? (i !== 0 && s !== 0 && (c = this.diff_commonPrefix(o, a), c !== 0 && (t - i - s > 0 && n[t - i - s - 1][0] == g ? n[t - i - s - 1][1] += o.substring(0, c) : (n.splice(0, 0, new r.Diff(
  506. g,
  507. o.substring(0, c)
  508. )), t++), o = o.substring(c), a = a.substring(c)), c = this.diff_commonSuffix(o, a), c !== 0 && (n[t][1] = o.substring(o.length - c) + n[t][1], o = o.substring(0, o.length - c), a = a.substring(0, a.length - c))), t -= i + s, n.splice(t, i + s), a.length && (n.splice(
  509. t,
  510. 0,
  511. new r.Diff(l, a)
  512. ), t++), o.length && (n.splice(
  513. t,
  514. 0,
  515. new r.Diff(f, o)
  516. ), t++), t++) : t !== 0 && n[t - 1][0] == g ? (n[t - 1][1] += n[t][1], n.splice(t, 1)) : t++, s = 0, i = 0, a = "", o = "";
  517. break;
  518. }
  519. n[n.length - 1][1] === "" && n.pop();
  520. var u = !1;
  521. for (t = 1; t < n.length - 1; )
  522. n[t - 1][0] == g && n[t + 1][0] == g && (n[t][1].substring(n[t][1].length - n[t - 1][1].length) == n[t - 1][1] ? (n[t][1] = n[t - 1][1] + n[t][1].substring(0, n[t][1].length - n[t - 1][1].length), n[t + 1][1] = n[t - 1][1] + n[t + 1][1], n.splice(t - 1, 1), u = !0) : n[t][1].substring(0, n[t + 1][1].length) == n[t + 1][1] && (n[t - 1][1] += n[t + 1][1], n[t][1] = n[t][1].substring(n[t + 1][1].length) + n[t + 1][1], n.splice(t + 1, 1), u = !0)), t++;
  523. u && this.diff_cleanupMerge(n);
  524. }, r.prototype.diff_xIndex = function(n, t) {
  525. var i = 0, s = 0, a = 0, o = 0, c;
  526. for (c = 0; c < n.length && (n[c][0] !== f && (i += n[c][1].length), n[c][0] !== l && (s += n[c][1].length), !(i > t)); c++)
  527. a = i, o = s;
  528. return n.length != c && n[c][0] === l ? o : o + (t - a);
  529. }, r.prototype.diff_prettyHtml = function(n) {
  530. for (var t = [], i = /&/g, s = /</g, a = />/g, o = /\n/g, c = 0; c < n.length; c++) {
  531. var u = n[c][0], d = n[c][1], h = d.replace(i, "&amp;").replace(s, "&lt;").replace(a, "&gt;").replace(o, "&para;<br>");
  532. switch (u) {
  533. case f:
  534. t[c] = '<ins style="background:#e6ffe6;">' + h + "</ins>";
  535. break;
  536. case l:
  537. t[c] = '<del style="background:#ffe6e6;">' + h + "</del>";
  538. break;
  539. case g:
  540. t[c] = "<span>" + h + "</span>";
  541. break;
  542. }
  543. }
  544. return t.join("");
  545. }, r.prototype.diff_text1 = function(n) {
  546. for (var t = [], i = 0; i < n.length; i++)
  547. n[i][0] !== f && (t[i] = n[i][1]);
  548. return t.join("");
  549. }, r.prototype.diff_text2 = function(n) {
  550. for (var t = [], i = 0; i < n.length; i++)
  551. n[i][0] !== l && (t[i] = n[i][1]);
  552. return t.join("");
  553. }, r.prototype.diff_levenshtein = function(n) {
  554. for (var t = 0, i = 0, s = 0, a = 0; a < n.length; a++) {
  555. var o = n[a][0], c = n[a][1];
  556. switch (o) {
  557. case f:
  558. i += c.length;
  559. break;
  560. case l:
  561. s += c.length;
  562. break;
  563. case g:
  564. t += Math.max(i, s), i = 0, s = 0;
  565. break;
  566. }
  567. }
  568. return t += Math.max(i, s), t;
  569. }, r.prototype.diff_toDelta = function(n) {
  570. for (var t = [], i = 0; i < n.length; i++)
  571. switch (n[i][0]) {
  572. case f:
  573. t[i] = "+" + encodeURI(n[i][1]);
  574. break;
  575. case l:
  576. t[i] = "-" + n[i][1].length;
  577. break;
  578. case g:
  579. t[i] = "=" + n[i][1].length;
  580. break;
  581. }
  582. return t.join(" ").replace(/%20/g, " ");
  583. }, r.prototype.diff_fromDelta = function(n, t) {
  584. for (var i = [], s = 0, a = 0, o = t.split(/\t/g), c = 0; c < o.length; c++) {
  585. var u = o[c].substring(1);
  586. switch (o[c].charAt(0)) {
  587. case "+":
  588. try {
  589. i[s++] = new r.Diff(f, decodeURI(u));
  590. } catch (p) {
  591. throw new Error("Illegal escape in diff_fromDelta: " + u);
  592. }
  593. break;
  594. case "-":
  595. case "=":
  596. var d = parseInt(u, 10);
  597. if (isNaN(d) || d < 0)
  598. throw new Error("Invalid number in diff_fromDelta: " + u);
  599. var h = n.substring(a, a += d);
  600. o[c].charAt(0) == "=" ? i[s++] = new r.Diff(g, h) : i[s++] = new r.Diff(l, h);
  601. break;
  602. default:
  603. if (o[c])
  604. throw new Error("Invalid diff operation in diff_fromDelta: " + o[c]);
  605. }
  606. }
  607. if (a != n.length)
  608. throw new Error("Delta length (" + a + ") does not equal source text length (" + n.length + ").");
  609. return i;
  610. }, r.prototype.match_main = function(n, t, i) {
  611. if (n == null || t == null || i == null)
  612. throw new Error("Null input. (match_main)");
  613. return i = Math.max(0, Math.min(i, n.length)), n == t ? 0 : n.length ? n.substring(i, i + t.length) == t ? i : this.match_bitap_(n, t, i) : -1;
  614. }, r.prototype.match_bitap_ = function(n, t, i) {
  615. if (t.length > this.Match_MaxBits)
  616. throw new Error("Pattern too long for this browser.");
  617. var s = this.match_alphabet_(t), a = this;
  618. function o(L, I) {
  619. var P = L / t.length, $ = Math.abs(i - I);
  620. return a.Match_Distance ? P + $ / a.Match_Distance : $ ? 1 : P;
  621. }
  622. var c = this.Match_Threshold, u = n.indexOf(t, i);
  623. u != -1 && (c = Math.min(o(0, u), c), u = n.lastIndexOf(t, i + t.length), u != -1 && (c = Math.min(o(0, u), c)));
  624. var d = 1 << t.length - 1;
  625. u = -1;
  626. for (var h, p, _ = t.length + n.length, E, m = 0; m < t.length; m++) {
  627. for (h = 0, p = _; h < p; )
  628. o(m, i + p) <= c ? h = p : _ = p, p = Math.floor((_ - h) / 2 + h);
  629. _ = p;
  630. var v = Math.max(1, i - p + 1), A = Math.min(i + p, n.length) + t.length, D = Array(A + 2);
  631. D[A + 1] = (1 << m) - 1;
  632. for (var S = A; S >= v; S--) {
  633. var M = s[n.charAt(S - 1)];
  634. if (m === 0 ? D[S] = (D[S + 1] << 1 | 1) & M : D[S] = (D[S + 1] << 1 | 1) & M | ((E[S + 1] | E[S]) << 1 | 1) | E[S + 1], D[S] & d) {
  635. var R = o(m, S - 1);
  636. if (R <= c)
  637. if (c = R, u = S - 1, u > i)
  638. v = Math.max(1, 2 * i - u);
  639. else
  640. break;
  641. }
  642. }
  643. if (o(m + 1, i) > c)
  644. break;
  645. E = D;
  646. }
  647. return u;
  648. }, r.prototype.match_alphabet_ = function(n) {
  649. for (var t = {}, i = 0; i < n.length; i++)
  650. t[n.charAt(i)] = 0;
  651. for (var i = 0; i < n.length; i++)
  652. t[n.charAt(i)] |= 1 << n.length - i - 1;
  653. return t;
  654. }, r.prototype.patch_addContext_ = function(n, t) {
  655. if (t.length != 0) {
  656. if (n.start2 === null)
  657. throw Error("patch not initialized");
  658. for (var i = t.substring(n.start2, n.start2 + n.length1), s = 0; t.indexOf(i) != t.lastIndexOf(i) && i.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; )
  659. s += this.Patch_Margin, i = t.substring(
  660. n.start2 - s,
  661. n.start2 + n.length1 + s
  662. );
  663. s += this.Patch_Margin;
  664. var a = t.substring(n.start2 - s, n.start2);
  665. a && n.diffs.unshift(new r.Diff(g, a));
  666. var o = t.substring(
  667. n.start2 + n.length1,
  668. n.start2 + n.length1 + s
  669. );
  670. o && n.diffs.push(new r.Diff(g, o)), n.start1 -= a.length, n.start2 -= a.length, n.length1 += a.length + o.length, n.length2 += a.length + o.length;
  671. }
  672. }, r.prototype.patch_make = function(n, t, i) {
  673. var s, a;
  674. if (typeof n == "string" && typeof t == "string" && typeof i == "undefined")
  675. s = /** @type {string} */
  676. n, a = this.diff_main(
  677. s,
  678. /** @type {string} */
  679. t,
  680. !0
  681. ), a.length > 2 && (this.diff_cleanupSemantic(a), this.diff_cleanupEfficiency(a));
  682. else if (n && typeof n == "object" && typeof t == "undefined" && typeof i == "undefined")
  683. a = /** @type {!Array.<!diff_match_patch.Diff>} */
  684. n, s = this.diff_text1(a);
  685. else if (typeof n == "string" && t && typeof t == "object" && typeof i == "undefined")
  686. s = /** @type {string} */
  687. n, a = /** @type {!Array.<!diff_match_patch.Diff>} */
  688. t;
  689. else if (typeof n == "string" && typeof t == "string" && i && typeof i == "object")
  690. s = /** @type {string} */
  691. n, a = /** @type {!Array.<!diff_match_patch.Diff>} */
  692. i;
  693. else
  694. throw new Error("Unknown call format to patch_make.");
  695. if (a.length === 0)
  696. return [];
  697. for (var o = [], c = new r.patch_obj(), u = 0, d = 0, h = 0, p = s, _ = s, E = 0; E < a.length; E++) {
  698. var m = a[E][0], v = a[E][1];
  699. switch (!u && m !== g && (c.start1 = d, c.start2 = h), m) {
  700. case f:
  701. c.diffs[u++] = a[E], c.length2 += v.length, _ = _.substring(0, h) + v + _.substring(h);
  702. break;
  703. case l:
  704. c.length1 += v.length, c.diffs[u++] = a[E], _ = _.substring(0, h) + _.substring(h + v.length);
  705. break;
  706. case g:
  707. v.length <= 2 * this.Patch_Margin && u && a.length != E + 1 ? (c.diffs[u++] = a[E], c.length1 += v.length, c.length2 += v.length) : v.length >= 2 * this.Patch_Margin && u && (this.patch_addContext_(c, p), o.push(c), c = new r.patch_obj(), u = 0, p = _, d = h);
  708. break;
  709. }
  710. m !== f && (d += v.length), m !== l && (h += v.length);
  711. }
  712. return u && (this.patch_addContext_(c, p), o.push(c)), o;
  713. }, r.prototype.patch_deepCopy = function(n) {
  714. for (var t = [], i = 0; i < n.length; i++) {
  715. var s = n[i], a = new r.patch_obj();
  716. a.diffs = [];
  717. for (var o = 0; o < s.diffs.length; o++)
  718. a.diffs[o] = new r.Diff(s.diffs[o][0], s.diffs[o][1]);
  719. a.start1 = s.start1, a.start2 = s.start2, a.length1 = s.length1, a.length2 = s.length2, t[i] = a;
  720. }
  721. return t;
  722. }, r.prototype.patch_apply = function(n, t) {
  723. if (n.length == 0)
  724. return [t, []];
  725. n = this.patch_deepCopy(n);
  726. var i = this.patch_addPadding(n);
  727. t = i + t + i, this.patch_splitMax(n);
  728. for (var s = 0, a = [], o = 0; o < n.length; o++) {
  729. var c = n[o].start2 + s, u = this.diff_text1(n[o].diffs), d, h = -1;
  730. if (u.length > this.Match_MaxBits ? (d = this.match_main(
  731. t,
  732. u.substring(0, this.Match_MaxBits),
  733. c
  734. ), d != -1 && (h = this.match_main(
  735. t,
  736. u.substring(u.length - this.Match_MaxBits),
  737. c + u.length - this.Match_MaxBits
  738. ), (h == -1 || d >= h) && (d = -1))) : d = this.match_main(t, u, c), d == -1)
  739. a[o] = !1, s -= n[o].length2 - n[o].length1;
  740. else {
  741. a[o] = !0, s = d - c;
  742. var p;
  743. if (h == -1 ? p = t.substring(d, d + u.length) : p = t.substring(d, h + this.Match_MaxBits), u == p)
  744. t = t.substring(0, d) + this.diff_text2(n[o].diffs) + t.substring(d + u.length);
  745. else {
  746. var _ = this.diff_main(u, p, !1);
  747. if (u.length > this.Match_MaxBits && this.diff_levenshtein(_) / u.length > this.Patch_DeleteThreshold)
  748. a[o] = !1;
  749. else {
  750. this.diff_cleanupSemanticLossless(_);
  751. for (var E = 0, m, v = 0; v < n[o].diffs.length; v++) {
  752. var A = n[o].diffs[v];
  753. A[0] !== g && (m = this.diff_xIndex(_, E)), A[0] === f ? t = t.substring(0, d + m) + A[1] + t.substring(d + m) : A[0] === l && (t = t.substring(0, d + m) + t.substring(d + this.diff_xIndex(
  754. _,
  755. E + A[1].length
  756. ))), A[0] !== l && (E += A[1].length);
  757. }
  758. }
  759. }
  760. }
  761. }
  762. return t = t.substring(i.length, t.length - i.length), [t, a];
  763. }, r.prototype.patch_addPadding = function(n) {
  764. for (var t = this.Patch_Margin, i = "", s = 1; s <= t; s++)
  765. i += String.fromCharCode(s);
  766. for (var s = 0; s < n.length; s++)
  767. n[s].start1 += t, n[s].start2 += t;
  768. var a = n[0], o = a.diffs;
  769. if (o.length == 0 || o[0][0] != g)
  770. o.unshift(new r.Diff(g, i)), a.start1 -= t, a.start2 -= t, a.length1 += t, a.length2 += t;
  771. else if (t > o[0][1].length) {
  772. var c = t - o[0][1].length;
  773. o[0][1] = i.substring(o[0][1].length) + o[0][1], a.start1 -= c, a.start2 -= c, a.length1 += c, a.length2 += c;
  774. }
  775. if (a = n[n.length - 1], o = a.diffs, o.length == 0 || o[o.length - 1][0] != g)
  776. o.push(new r.Diff(g, i)), a.length1 += t, a.length2 += t;
  777. else if (t > o[o.length - 1][1].length) {
  778. var c = t - o[o.length - 1][1].length;
  779. o[o.length - 1][1] += i.substring(0, c), a.length1 += c, a.length2 += c;
  780. }
  781. return i;
  782. }, r.prototype.patch_splitMax = function(n) {
  783. for (var t = this.Match_MaxBits, i = 0; i < n.length; i++)
  784. if (!(n[i].length1 <= t)) {
  785. var s = n[i];
  786. n.splice(i--, 1);
  787. for (var a = s.start1, o = s.start2, c = ""; s.diffs.length !== 0; ) {
  788. var u = new r.patch_obj(), d = !0;
  789. for (u.start1 = a - c.length, u.start2 = o - c.length, c !== "" && (u.length1 = u.length2 = c.length, u.diffs.push(new r.Diff(g, c))); s.diffs.length !== 0 && u.length1 < t - this.Patch_Margin; ) {
  790. var h = s.diffs[0][0], p = s.diffs[0][1];
  791. h === f ? (u.length2 += p.length, o += p.length, u.diffs.push(s.diffs.shift()), d = !1) : h === l && u.diffs.length == 1 && u.diffs[0][0] == g && p.length > 2 * t ? (u.length1 += p.length, a += p.length, d = !1, u.diffs.push(new r.Diff(h, p)), s.diffs.shift()) : (p = p.substring(
  792. 0,
  793. t - u.length1 - this.Patch_Margin
  794. ), u.length1 += p.length, a += p.length, h === g ? (u.length2 += p.length, o += p.length) : d = !1, u.diffs.push(new r.Diff(h, p)), p == s.diffs[0][1] ? s.diffs.shift() : s.diffs[0][1] = s.diffs[0][1].substring(p.length));
  795. }
  796. c = this.diff_text2(u.diffs), c = c.substring(c.length - this.Patch_Margin);
  797. var _ = this.diff_text1(s.diffs).substring(0, this.Patch_Margin);
  798. _ !== "" && (u.length1 += _.length, u.length2 += _.length, u.diffs.length !== 0 && u.diffs[u.diffs.length - 1][0] === g ? u.diffs[u.diffs.length - 1][1] += _ : u.diffs.push(new r.Diff(g, _))), d || n.splice(++i, 0, u);
  799. }
  800. }
  801. }, r.prototype.patch_toText = function(n) {
  802. for (var t = [], i = 0; i < n.length; i++)
  803. t[i] = n[i];
  804. return t.join("");
  805. }, r.prototype.patch_fromText = function(n) {
  806. var t = [];
  807. if (!n)
  808. return t;
  809. for (var i = n.split(`
  810. `), s = 0, a = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; s < i.length; ) {
  811. var o = i[s].match(a);
  812. if (!o)
  813. throw new Error("Invalid patch string: " + i[s]);
  814. var c = new r.patch_obj();
  815. for (t.push(c), c.start1 = parseInt(o[1], 10), o[2] === "" ? (c.start1--, c.length1 = 1) : o[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(o[2], 10)), c.start2 = parseInt(o[3], 10), o[4] === "" ? (c.start2--, c.length2 = 1) : o[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(o[4], 10)), s++; s < i.length; ) {
  816. var u = i[s].charAt(0);
  817. try {
  818. var d = decodeURI(i[s].substring(1));
  819. } catch (h) {
  820. throw new Error("Illegal escape in patch_fromText: " + d);
  821. }
  822. if (u == "-")
  823. c.diffs.push(new r.Diff(l, d));
  824. else if (u == "+")
  825. c.diffs.push(new r.Diff(f, d));
  826. else if (u == " ")
  827. c.diffs.push(new r.Diff(g, d));
  828. else {
  829. if (u == "@")
  830. break;
  831. if (u !== "")
  832. throw new Error('Invalid patch mode "' + u + '" in: ' + d);
  833. }
  834. s++;
  835. }
  836. }
  837. return t;
  838. }, r.patch_obj = function() {
  839. this.diffs = [], this.start1 = null, this.start2 = null, this.length1 = 0, this.length2 = 0;
  840. }, r.patch_obj.prototype.toString = function() {
  841. var n, t;
  842. this.length1 === 0 ? n = this.start1 + ",0" : this.length1 == 1 ? n = this.start1 + 1 : n = this.start1 + 1 + "," + this.length1, this.length2 === 0 ? t = this.start2 + ",0" : this.length2 == 1 ? t = this.start2 + 1 : t = this.start2 + 1 + "," + this.length2;
  843. for (var i = ["@@ -" + n + " +" + t + ` @@
  844. `], s, a = 0; a < this.diffs.length; a++) {
  845. switch (this.diffs[a][0]) {
  846. case f:
  847. s = "+";
  848. break;
  849. case l:
  850. s = "-";
  851. break;
  852. case g:
  853. s = " ";
  854. break;
  855. }
  856. i[a + 1] = s + encodeURI(this.diffs[a][1]) + `
  857. `;
  858. }
  859. return i.join("").replace(/%20/g, " ");
  860. }, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT = f, e.exports.DIFF_EQUAL = g;
  861. })(En);
  862. var Fe = En.exports;
  863. function mn(e) {
  864. return e instanceof Map ? e.clear = e.delete = e.set = function() {
  865. throw new Error("map is read-only");
  866. } : e instanceof Set && (e.add = e.clear = e.delete = function() {
  867. throw new Error("set is read-only");
  868. }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((r) => {
  869. const l = e[r], f = typeof l;
  870. (f === "object" || f === "function") && !Object.isFrozen(l) && mn(l);
  871. }), e;
  872. }
  873. class an {
  874. /**
  875. * @param {CompiledMode} mode
  876. */
  877. constructor(r) {
  878. r.data === void 0 && (r.data = {}), this.data = r.data, this.isMatchIgnored = !1;
  879. }
  880. ignoreMatch() {
  881. this.isMatchIgnored = !0;
  882. }
  883. }
  884. function vn(e) {
  885. return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
  886. }
  887. function le(e, ...r) {
  888. const l = /* @__PURE__ */ Object.create(null);
  889. for (const f in e)
  890. l[f] = e[f];
  891. return r.forEach(function(f) {
  892. for (const g in f)
  893. l[g] = f[g];
  894. }), /** @type {T} */
  895. l;
  896. }
  897. const rt = "</span>", on = (e) => !!e.scope, it = (e, { prefix: r }) => {
  898. if (e.startsWith("language:"))
  899. return e.replace("language:", "language-");
  900. if (e.includes(".")) {
  901. const l = e.split(".");
  902. return [
  903. `${r}${l.shift()}`,
  904. ...l.map((f, g) => `${f}${"_".repeat(g + 1)}`)
  905. ].join(" ");
  906. }
  907. return `${r}${e}`;
  908. };
  909. class st {
  910. /**
  911. * Creates a new HTMLRenderer
  912. *
  913. * @param {Tree} parseTree - the parse tree (must support `walk` API)
  914. * @param {{classPrefix: string}} options
  915. */
  916. constructor(r, l) {
  917. this.buffer = "", this.classPrefix = l.classPrefix, r.walk(this);
  918. }
  919. /**
  920. * Adds texts to the output stream
  921. *
  922. * @param {string} text */
  923. addText(r) {
  924. this.buffer += vn(r);
  925. }
  926. /**
  927. * Adds a node open to the output stream (if needed)
  928. *
  929. * @param {Node} node */
  930. openNode(r) {
  931. if (!on(r))
  932. return;
  933. const l = it(
  934. r.scope,
  935. { prefix: this.classPrefix }
  936. );
  937. this.span(l);
  938. }
  939. /**
  940. * Adds a node close to the output stream (if needed)
  941. *
  942. * @param {Node} node */
  943. closeNode(r) {
  944. on(r) && (this.buffer += rt);
  945. }
  946. /**
  947. * returns the accumulated buffer
  948. */
  949. value() {
  950. return this.buffer;
  951. }
  952. // helpers
  953. /**
  954. * Builds a span element
  955. *
  956. * @param {string} className */
  957. span(r) {
  958. this.buffer += `<span class="${r}">`;
  959. }
  960. }
  961. const ln = (e = {}) => {
  962. const r = { children: [] };
  963. return Object.assign(r, e), r;
  964. };
  965. class Qe {
  966. constructor() {
  967. this.rootNode = ln(), this.stack = [this.rootNode];
  968. }
  969. get top() {
  970. return this.stack[this.stack.length - 1];
  971. }
  972. get root() {
  973. return this.rootNode;
  974. }
  975. /** @param {Node} node */
  976. add(r) {
  977. this.top.children.push(r);
  978. }
  979. /** @param {string} scope */
  980. openNode(r) {
  981. const l = ln({ scope: r });
  982. this.add(l), this.stack.push(l);
  983. }
  984. closeNode() {
  985. if (this.stack.length > 1)
  986. return this.stack.pop();
  987. }
  988. closeAllNodes() {
  989. for (; this.closeNode(); )
  990. ;
  991. }
  992. toJSON() {
  993. return JSON.stringify(this.rootNode, null, 4);
  994. }
  995. /**
  996. * @typedef { import("./html_renderer").Renderer } Renderer
  997. * @param {Renderer} builder
  998. */
  999. walk(r) {
  1000. return this.constructor._walk(r, this.rootNode);
  1001. }
  1002. /**
  1003. * @param {Renderer} builder
  1004. * @param {Node} node
  1005. */
  1006. static _walk(r, l) {
  1007. return typeof l == "string" ? r.addText(l) : l.children && (r.openNode(l), l.children.forEach((f) => this._walk(r, f)), r.closeNode(l)), r;
  1008. }
  1009. /**
  1010. * @param {Node} node
  1011. */
  1012. static _collapse(r) {
  1013. typeof r != "string" && r.children && (r.children.every((l) => typeof l == "string") ? r.children = [r.children.join("")] : r.children.forEach((l) => {
  1014. Qe._collapse(l);
  1015. }));
  1016. }
  1017. }
  1018. class at extends Qe {
  1019. /**
  1020. * @param {*} options
  1021. */
  1022. constructor(r) {
  1023. super(), this.options = r;
  1024. }
  1025. /**
  1026. * @param {string} text
  1027. */
  1028. addText(r) {
  1029. r !== "" && this.add(r);
  1030. }
  1031. /** @param {string} scope */
  1032. startScope(r) {
  1033. this.openNode(r);
  1034. }
  1035. endScope() {
  1036. this.closeNode();
  1037. }
  1038. /**
  1039. * @param {Emitter & {root: DataNode}} emitter
  1040. * @param {string} name
  1041. */
  1042. __addSublanguage(r, l) {
  1043. const f = r.root;
  1044. l && (f.scope = `language:${l}`), this.add(f);
  1045. }
  1046. toHTML() {
  1047. return new st(this, this.options).value();
  1048. }
  1049. finalize() {
  1050. return this.closeAllNodes(), !0;
  1051. }
  1052. }
  1053. function ye(e) {
  1054. return e ? typeof e == "string" ? e : e.source : null;
  1055. }
  1056. function wn(e) {
  1057. return fe("(?=", e, ")");
  1058. }
  1059. function ot(e) {
  1060. return fe("(?:", e, ")*");
  1061. }
  1062. function lt(e) {
  1063. return fe("(?:", e, ")?");
  1064. }
  1065. function fe(...e) {
  1066. return e.map((l) => ye(l)).join("");
  1067. }
  1068. function ct(e) {
  1069. const r = e[e.length - 1];
  1070. return typeof r == "object" && r.constructor === Object ? (e.splice(e.length - 1, 1), r) : {};
  1071. }
  1072. function Ze(...e) {
  1073. return "(" + (ct(e).capture ? "" : "?:") + e.map((f) => ye(f)).join("|") + ")";
  1074. }
  1075. function yn(e) {
  1076. return new RegExp(e.toString() + "|").exec("").length - 1;
  1077. }
  1078. function ut(e, r) {
  1079. const l = e && e.exec(r);
  1080. return l && l.index === 0;
  1081. }
  1082. const ft = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
  1083. function Ye(e, { joinWith: r }) {
  1084. let l = 0;
  1085. return e.map((f) => {
  1086. l += 1;
  1087. const g = l;
  1088. let n = ye(f), t = "";
  1089. for (; n.length > 0; ) {
  1090. const i = ft.exec(n);
  1091. if (!i) {
  1092. t += n;
  1093. break;
  1094. }
  1095. t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) + g) : (t += i[0], i[0] === "(" && l++);
  1096. }
  1097. return t;
  1098. }).map((f) => `(${f})`).join(r);
  1099. }
  1100. const gt = /\b\B/, Nn = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", An = "\\b\\d+(\\.\\d+)?", Mn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Tn = "\\b(0b[01]+)", ht = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", dt = (e = {}) => {
  1101. const r = /^#![ ]*\//;
  1102. return e.binary && (e.begin = fe(
  1103. r,
  1104. /.*\b/,
  1105. e.binary,
  1106. /\b.*/
  1107. )), le({
  1108. scope: "meta",
  1109. begin: r,
  1110. end: /$/,
  1111. relevance: 0,
  1112. /** @type {ModeCallback} */
  1113. "on:begin": (l, f) => {
  1114. l.index !== 0 && f.ignoreMatch();
  1115. }
  1116. }, e);
  1117. }, Ne = {
  1118. begin: "\\\\[\\s\\S]",
  1119. relevance: 0
  1120. }, pt = {
  1121. scope: "string",
  1122. begin: "'",
  1123. end: "'",
  1124. illegal: "\\n",
  1125. contains: [Ne]
  1126. }, _t = {
  1127. scope: "string",
  1128. begin: '"',
  1129. end: '"',
  1130. illegal: "\\n",
  1131. contains: [Ne]
  1132. }, bt = {
  1133. begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
  1134. }, $e = function(e, r, l = {}) {
  1135. const f = le(
  1136. {
  1137. scope: "comment",
  1138. begin: e,
  1139. end: r,
  1140. contains: []
  1141. },
  1142. l
  1143. );
  1144. f.contains.push({
  1145. scope: "doctag",
  1146. // hack to avoid the space from being included. the space is necessary to
  1147. // match here to prevent the plain text rule below from gobbling up doctags
  1148. begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
  1149. end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
  1150. excludeBegin: !0,
  1151. relevance: 0
  1152. });
  1153. const g = Ze(
  1154. // list of common 1 and 2 letter words in English
  1155. "I",
  1156. "a",
  1157. "is",
  1158. "so",
  1159. "us",
  1160. "to",
  1161. "at",
  1162. "if",
  1163. "in",
  1164. "it",
  1165. "on",
  1166. // note: this is not an exhaustive list of contractions, just popular ones
  1167. /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
  1168. // contractions - can't we'd they're let's, etc
  1169. /[A-Za-z]+[-][a-z]+/,
  1170. // `no-way`, etc.
  1171. /[A-Za-z][a-z]{2,}/
  1172. // allow capitalized words at beginning of sentences
  1173. );
  1174. return f.contains.push(
  1175. {
  1176. // TODO: how to include ", (, ) without breaking grammars that use these for
  1177. // comment delimiters?
  1178. // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
  1179. // ---
  1180. // this tries to find sequences of 3 english words in a row (without any
  1181. // "programming" type syntax) this gives us a strong signal that we've
  1182. // TRULY found a comment - vs perhaps scanning with the wrong language.
  1183. // It's possible to find something that LOOKS like the start of the
  1184. // comment - but then if there is no readable text - good chance it is a
  1185. // false match and not a comment.
  1186. //
  1187. // for a visual example please see:
  1188. // https://github.com/highlightjs/highlight.js/issues/2827
  1189. begin: fe(
  1190. /[ ]+/,
  1191. // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
  1192. "(",
  1193. g,
  1194. /[.]?[:]?([.][ ]|[ ])/,
  1195. "){3}"
  1196. )
  1197. // look for 3 words in a row
  1198. }
  1199. ), f;
  1200. }, Et = $e("//", "$"), mt = $e("/\\*", "\\*/"), vt = $e("#", "$"), wt = {
  1201. scope: "number",
  1202. begin: An,
  1203. relevance: 0
  1204. }, yt = {
  1205. scope: "number",
  1206. begin: Mn,
  1207. relevance: 0
  1208. }, Nt = {
  1209. scope: "number",
  1210. begin: Tn,
  1211. relevance: 0
  1212. }, At = {
  1213. scope: "regexp",
  1214. begin: /\/(?=[^/\n]*\/)/,
  1215. end: /\/[gimuy]*/,
  1216. contains: [
  1217. Ne,
  1218. {
  1219. begin: /\[/,
  1220. end: /\]/,
  1221. relevance: 0,
  1222. contains: [Ne]
  1223. }
  1224. ]
  1225. }, Mt = {
  1226. scope: "title",
  1227. begin: Nn,
  1228. relevance: 0
  1229. }, Tt = {
  1230. scope: "title",
  1231. begin: Xe,
  1232. relevance: 0
  1233. }, St = {
  1234. // excludes method names from keyword processing
  1235. begin: "\\.\\s*" + Xe,
  1236. relevance: 0
  1237. }, Dt = function(e) {
  1238. return Object.assign(
  1239. e,
  1240. {
  1241. /** @type {ModeCallback} */
  1242. "on:begin": (r, l) => {
  1243. l.data._beginMatch = r[1];
  1244. },
  1245. /** @type {ModeCallback} */
  1246. "on:end": (r, l) => {
  1247. l.data._beginMatch !== r[1] && l.ignoreMatch();
  1248. }
  1249. }
  1250. );
  1251. };
  1252. var Le = /* @__PURE__ */ Object.freeze({
  1253. __proto__: null,
  1254. APOS_STRING_MODE: pt,
  1255. BACKSLASH_ESCAPE: Ne,
  1256. BINARY_NUMBER_MODE: Nt,
  1257. BINARY_NUMBER_RE: Tn,
  1258. COMMENT: $e,
  1259. C_BLOCK_COMMENT_MODE: mt,
  1260. C_LINE_COMMENT_MODE: Et,
  1261. C_NUMBER_MODE: yt,
  1262. C_NUMBER_RE: Mn,
  1263. END_SAME_AS_BEGIN: Dt,
  1264. HASH_COMMENT_MODE: vt,
  1265. IDENT_RE: Nn,
  1266. MATCH_NOTHING_RE: gt,
  1267. METHOD_GUARD: St,
  1268. NUMBER_MODE: wt,
  1269. NUMBER_RE: An,
  1270. PHRASAL_WORDS_MODE: bt,
  1271. QUOTE_STRING_MODE: _t,
  1272. REGEXP_MODE: At,
  1273. RE_STARTERS_RE: ht,
  1274. SHEBANG: dt,
  1275. TITLE_MODE: Mt,
  1276. UNDERSCORE_IDENT_RE: Xe,
  1277. UNDERSCORE_TITLE_MODE: Tt
  1278. });
  1279. function Lt(e, r) {
  1280. e.input[e.index - 1] === "." && r.ignoreMatch();
  1281. }
  1282. function Rt(e, r) {
  1283. e.className !== void 0 && (e.scope = e.className, delete e.className);
  1284. }
  1285. function Ot(e, r) {
  1286. r && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Lt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
  1287. }
  1288. function Ct(e, r) {
  1289. Array.isArray(e.illegal) && (e.illegal = Ze(...e.illegal));
  1290. }
  1291. function It(e, r) {
  1292. if (e.match) {
  1293. if (e.begin || e.end)
  1294. throw new Error("begin & end are not supported with match");
  1295. e.begin = e.match, delete e.match;
  1296. }
  1297. }
  1298. function kt(e, r) {
  1299. e.relevance === void 0 && (e.relevance = 1);
  1300. }
  1301. const Bt = (e, r) => {
  1302. if (!e.beforeMatch)
  1303. return;
  1304. if (e.starts)
  1305. throw new Error("beforeMatch cannot be used with starts");
  1306. const l = Object.assign({}, e);
  1307. Object.keys(e).forEach((f) => {
  1308. delete e[f];
  1309. }), e.keywords = l.keywords, e.begin = fe(l.beforeMatch, wn(l.begin)), e.starts = {
  1310. relevance: 0,
  1311. contains: [
  1312. Object.assign(l, { endsParent: !0 })
  1313. ]
  1314. }, e.relevance = 0, delete l.beforeMatch;
  1315. }, $t = [
  1316. "of",
  1317. "and",
  1318. "for",
  1319. "in",
  1320. "not",
  1321. "or",
  1322. "if",
  1323. "then",
  1324. "parent",
  1325. // common variable name
  1326. "list",
  1327. // common variable name
  1328. "value"
  1329. // common variable name
  1330. ], Pt = "keyword";
  1331. function Sn(e, r, l = Pt) {
  1332. const f = /* @__PURE__ */ Object.create(null);
  1333. return typeof e == "string" ? g(l, e.split(" ")) : Array.isArray(e) ? g(l, e) : Object.keys(e).forEach(function(n) {
  1334. Object.assign(
  1335. f,
  1336. Sn(e[n], r, n)
  1337. );
  1338. }), f;
  1339. function g(n, t) {
  1340. r && (t = t.map((i) => i.toLowerCase())), t.forEach(function(i) {
  1341. const s = i.split("|");
  1342. f[s[0]] = [n, Ut(s[0], s[1])];
  1343. });
  1344. }
  1345. }
  1346. function Ut(e, r) {
  1347. return r ? Number(r) : Ht(e) ? 0 : 1;
  1348. }
  1349. function Ht(e) {
  1350. return $t.includes(e.toLowerCase());
  1351. }
  1352. const cn = {}, ue = (e) => {
  1353. console.error(e);
  1354. }, un = (e, ...r) => {
  1355. console.log(`WARN: ${e}`, ...r);
  1356. }, he = (e, r) => {
  1357. cn[`${e}/${r}`] || (console.log(`Deprecated as of ${e}. ${r}`), cn[`${e}/${r}`] = !0);
  1358. }, ke = new Error();
  1359. function Dn(e, r, { key: l }) {
  1360. let f = 0;
  1361. const g = e[l], n = {}, t = {};
  1362. for (let i = 1; i <= r.length; i++)
  1363. t[i + f] = g[i], n[i + f] = !0, f += yn(r[i - 1]);
  1364. e[l] = t, e[l]._emit = n, e[l]._multi = !0;
  1365. }
  1366. function Ft(e) {
  1367. if (Array.isArray(e.begin)) {
  1368. if (e.skip || e.excludeBegin || e.returnBegin)
  1369. throw ue("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), ke;
  1370. if (typeof e.beginScope != "object" || e.beginScope === null)
  1371. throw ue("beginScope must be object"), ke;
  1372. Dn(e, e.begin, { key: "beginScope" }), e.begin = Ye(e.begin, { joinWith: "" });
  1373. }
  1374. }
  1375. function zt(e) {
  1376. if (Array.isArray(e.end)) {
  1377. if (e.skip || e.excludeEnd || e.returnEnd)
  1378. throw ue("skip, excludeEnd, returnEnd not compatible with endScope: {}"), ke;
  1379. if (typeof e.endScope != "object" || e.endScope === null)
  1380. throw ue("endScope must be object"), ke;
  1381. Dn(e, e.end, { key: "endScope" }), e.end = Ye(e.end, { joinWith: "" });
  1382. }
  1383. }
  1384. function xt(e) {
  1385. e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
  1386. }
  1387. function Gt(e) {
  1388. xt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Ft(e), zt(e);
  1389. }
  1390. function Kt(e) {
  1391. function r(t, i) {
  1392. return new RegExp(
  1393. ye(t),
  1394. "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
  1395. );
  1396. }
  1397. class l {
  1398. constructor() {
  1399. this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
  1400. }
  1401. // @ts-ignore
  1402. addRule(i, s) {
  1403. s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt += yn(i) + 1;
  1404. }
  1405. compile() {
  1406. this.regexes.length === 0 && (this.exec = () => null);
  1407. const i = this.regexes.map((s) => s[1]);
  1408. this.matcherRe = r(Ye(i, { joinWith: "|" }), !0), this.lastIndex = 0;
  1409. }
  1410. /** @param {string} s */
  1411. exec(i) {
  1412. this.matcherRe.lastIndex = this.lastIndex;
  1413. const s = this.matcherRe.exec(i);
  1414. if (!s)
  1415. return null;
  1416. const a = s.findIndex((c, u) => u > 0 && c !== void 0), o = this.matchIndexes[a];
  1417. return s.splice(0, a), Object.assign(s, o);
  1418. }
  1419. }
  1420. class f {
  1421. constructor() {
  1422. this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
  1423. }
  1424. // @ts-ignore
  1425. getMatcher(i) {
  1426. if (this.multiRegexes[i])
  1427. return this.multiRegexes[i];
  1428. const s = new l();
  1429. return this.rules.slice(i).forEach(([a, o]) => s.addRule(a, o)), s.compile(), this.multiRegexes[i] = s, s;
  1430. }
  1431. resumingScanAtSamePosition() {
  1432. return this.regexIndex !== 0;
  1433. }
  1434. considerAll() {
  1435. this.regexIndex = 0;
  1436. }
  1437. // @ts-ignore
  1438. addRule(i, s) {
  1439. this.rules.push([i, s]), s.type === "begin" && this.count++;
  1440. }
  1441. /** @param {string} s */
  1442. exec(i) {
  1443. const s = this.getMatcher(this.regexIndex);
  1444. s.lastIndex = this.lastIndex;
  1445. let a = s.exec(i);
  1446. if (this.resumingScanAtSamePosition() && !(a && a.index === this.lastIndex)) {
  1447. const o = this.getMatcher(0);
  1448. o.lastIndex = this.lastIndex + 1, a = o.exec(i);
  1449. }
  1450. return a && (this.regexIndex += a.position + 1, this.regexIndex === this.count && this.considerAll()), a;
  1451. }
  1452. }
  1453. function g(t) {
  1454. const i = new f();
  1455. return t.contains.forEach((s) => i.addRule(s.begin, { rule: s, type: "begin" })), t.terminatorEnd && i.addRule(t.terminatorEnd, { type: "end" }), t.illegal && i.addRule(t.illegal, { type: "illegal" }), i;
  1456. }
  1457. function n(t, i) {
  1458. const s = (
  1459. /** @type CompiledMode */
  1460. t
  1461. );
  1462. if (t.isCompiled)
  1463. return s;
  1464. [
  1465. Rt,
  1466. // do this early so compiler extensions generally don't have to worry about
  1467. // the distinction between match/begin
  1468. It,
  1469. Gt,
  1470. Bt
  1471. ].forEach((o) => o(t, i)), e.compilerExtensions.forEach((o) => o(t, i)), t.__beforeBegin = null, [
  1472. Ot,
  1473. // do this later so compiler extensions that come earlier have access to the
  1474. // raw array if they wanted to perhaps manipulate it, etc.
  1475. Ct,
  1476. // default to 1 relevance if not specified
  1477. kt
  1478. ].forEach((o) => o(t, i)), t.isCompiled = !0;
  1479. let a = null;
  1480. return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), a = t.keywords.$pattern, delete t.keywords.$pattern), a = a || /\w+/, t.keywords && (t.keywords = Sn(t.keywords, e.case_insensitive)), s.keywordPatternRe = r(a, !0), i && (t.begin || (t.begin = /\B|\b/), s.beginRe = r(s.begin), !t.end && !t.endsWithParent && (t.end = /\B|\b/), t.end && (s.endRe = r(s.end)), s.terminatorEnd = ye(s.end) || "", t.endsWithParent && i.terminatorEnd && (s.terminatorEnd += (t.end ? "|" : "") + i.terminatorEnd)), t.illegal && (s.illegalRe = r(
  1481. /** @type {RegExp | string} */
  1482. t.illegal
  1483. )), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(o) {
  1484. return Wt(o === "self" ? t : o);
  1485. })), t.contains.forEach(function(o) {
  1486. n(
  1487. /** @type Mode */
  1488. o,
  1489. s
  1490. );
  1491. }), t.starts && n(t.starts, i), s.matcher = g(s), s;
  1492. }
  1493. if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
  1494. throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
  1495. return e.classNameAliases = le(e.classNameAliases || {}), n(
  1496. /** @type Mode */
  1497. e
  1498. );
  1499. }
  1500. function Ln(e) {
  1501. return e ? e.endsWithParent || Ln(e.starts) : !1;
  1502. }
  1503. function Wt(e) {
  1504. return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(r) {
  1505. return le(e, { variants: null }, r);
  1506. })), e.cachedVariants ? e.cachedVariants : Ln(e) ? le(e, { starts: e.starts ? le(e.starts) : null }) : Object.isFrozen(e) ? le(e) : e;
  1507. }
  1508. var Qt = "11.9.0";
  1509. class Zt extends Error {
  1510. constructor(r, l) {
  1511. super(r), this.name = "HTMLInjectionError", this.html = l;
  1512. }
  1513. }
  1514. const ze = vn, fn = le, gn = Symbol("nomatch"), Yt = 7, Rn = function(e) {
  1515. const r = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ Object.create(null), f = [];
  1516. let g = !0;
  1517. const n = "Could not find the language '{}', did you forget to load/include a language module?", t = { disableAutodetect: !0, name: "Plain text", contains: [] };
  1518. let i = {
  1519. ignoreUnescapedHTML: !1,
  1520. throwUnescapedHTML: !1,
  1521. noHighlightRe: /^(no-?highlight)$/i,
  1522. languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
  1523. classPrefix: "hljs-",
  1524. cssSelector: "pre code",
  1525. languages: null,
  1526. // beta configuration options, subject to change, welcome to discuss
  1527. // https://github.com/highlightjs/highlight.js/issues/1086
  1528. __emitter: at
  1529. };
  1530. function s(b) {
  1531. return i.noHighlightRe.test(b);
  1532. }
  1533. function a(b) {
  1534. let N = b.className + " ";
  1535. N += b.parentNode ? b.parentNode.className : "";
  1536. const O = i.languageDetectRe.exec(N);
  1537. if (O) {
  1538. const U = L(O[1]);
  1539. return U || (un(n.replace("{}", O[1])), un("Falling back to no-highlight mode for this block.", b)), U ? O[1] : "no-highlight";
  1540. }
  1541. return N.split(/\s+/).find((U) => s(U) || L(U));
  1542. }
  1543. function o(b, N, O) {
  1544. let U = "", x = "";
  1545. typeof N == "object" ? (U = b, O = N.ignoreIllegals, x = N.language) : (he("10.7.0", "highlight(lang, code, ...args) has been deprecated."), he("10.7.0", `Please use highlight(code, options) instead.
  1546. https://github.com/highlightjs/highlight.js/issues/2277`), x = b, U = N), O === void 0 && (O = !0);
  1547. const X = {
  1548. code: U,
  1549. language: x
  1550. };
  1551. oe("before:highlight", X);
  1552. const J = X.result ? X.result : c(X.language, X.code, O);
  1553. return J.code = X.code, oe("after:highlight", J), J;
  1554. }
  1555. function c(b, N, O, U) {
  1556. const x = /* @__PURE__ */ Object.create(null);
  1557. function X(w, T) {
  1558. return w.keywords[T];
  1559. }
  1560. function J() {
  1561. if (!C.keywords) {
  1562. Q.addText(z);
  1563. return;
  1564. }
  1565. let w = 0;
  1566. C.keywordPatternRe.lastIndex = 0;
  1567. let T = C.keywordPatternRe.exec(z), k = "";
  1568. for (; T; ) {
  1569. k += z.substring(w, T.index);
  1570. const H = te.case_insensitive ? T[0].toLowerCase() : T[0], Z = X(C, H);
  1571. if (Z) {
  1572. const [re, Gn] = Z;
  1573. if (Q.addText(k), k = "", x[H] = (x[H] || 0) + 1, x[H] <= Yt && (Se += Gn), re.startsWith("_"))
  1574. k += T[0];
  1575. else {
  1576. const Kn = te.classNameAliases[re] || re;
  1577. ne(T[0], Kn);
  1578. }
  1579. } else
  1580. k += T[0];
  1581. w = C.keywordPatternRe.lastIndex, T = C.keywordPatternRe.exec(z);
  1582. }
  1583. k += z.substring(w), Q.addText(k);
  1584. }
  1585. function Me() {
  1586. if (z === "")
  1587. return;
  1588. let w = null;
  1589. if (typeof C.subLanguage == "string") {
  1590. if (!r[C.subLanguage]) {
  1591. Q.addText(z);
  1592. return;
  1593. }
  1594. w = c(C.subLanguage, z, !0, en[C.subLanguage]), en[C.subLanguage] = /** @type {CompiledMode} */
  1595. w._top;
  1596. } else
  1597. w = d(z, C.subLanguage.length ? C.subLanguage : null);
  1598. C.relevance > 0 && (Se += w.relevance), Q.__addSublanguage(w._emitter, w.language);
  1599. }
  1600. function V() {
  1601. C.subLanguage != null ? Me() : J(), z = "";
  1602. }
  1603. function ne(w, T) {
  1604. w !== "" && (Q.startScope(T), Q.addText(w), Q.endScope());
  1605. }
  1606. function Ve(w, T) {
  1607. let k = 1;
  1608. const H = T.length - 1;
  1609. for (; k <= H; ) {
  1610. if (!w._emit[k]) {
  1611. k++;
  1612. continue;
  1613. }
  1614. const Z = te.classNameAliases[w[k]] || w[k], re = T[k];
  1615. Z ? ne(re, Z) : (z = re, J(), z = ""), k++;
  1616. }
  1617. }
  1618. function je(w, T) {
  1619. return w.scope && typeof w.scope == "string" && Q.openNode(te.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (ne(z, te.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), z = "") : w.beginScope._multi && (Ve(w.beginScope, T), z = "")), C = Object.create(w, { parent: { value: C } }), C;
  1620. }
  1621. function qe(w, T, k) {
  1622. let H = ut(w.endRe, k);
  1623. if (H) {
  1624. if (w["on:end"]) {
  1625. const Z = new an(w);
  1626. w["on:end"](T, Z), Z.isMatchIgnored && (H = !1);
  1627. }
  1628. if (H) {
  1629. for (; w.endsParent && w.parent; )
  1630. w = w.parent;
  1631. return w;
  1632. }
  1633. }
  1634. if (w.endsWithParent)
  1635. return qe(w.parent, T, k);
  1636. }
  1637. function Un(w) {
  1638. return C.matcher.regexIndex === 0 ? (z += w[0], 1) : (He = !0, 0);
  1639. }
  1640. function Hn(w) {
  1641. const T = w[0], k = w.rule, H = new an(k), Z = [k.__beforeBegin, k["on:begin"]];
  1642. for (const re of Z)
  1643. if (re && (re(w, H), H.isMatchIgnored))
  1644. return Un(T);
  1645. return k.skip ? z += T : (k.excludeBegin && (z += T), V(), !k.returnBegin && !k.excludeBegin && (z = T)), je(k, w), k.returnBegin ? 0 : T.length;
  1646. }
  1647. function Fn(w) {
  1648. const T = w[0], k = N.substring(w.index), H = qe(C, w, k);
  1649. if (!H)
  1650. return gn;
  1651. const Z = C;
  1652. C.endScope && C.endScope._wrap ? (V(), ne(T, C.endScope._wrap)) : C.endScope && C.endScope._multi ? (V(), Ve(C.endScope, w)) : Z.skip ? z += T : (Z.returnEnd || Z.excludeEnd || (z += T), V(), Z.excludeEnd && (z = T));
  1653. do
  1654. C.scope && Q.closeNode(), !C.skip && !C.subLanguage && (Se += C.relevance), C = C.parent;
  1655. while (C !== H.parent);
  1656. return H.starts && je(H.starts, w), Z.returnEnd ? 0 : T.length;
  1657. }
  1658. function zn() {
  1659. const w = [];
  1660. for (let T = C; T !== te; T = T.parent)
  1661. T.scope && w.unshift(T.scope);
  1662. w.forEach((T) => Q.openNode(T));
  1663. }
  1664. let Te = {};
  1665. function Je(w, T) {
  1666. const k = T && T[0];
  1667. if (z += w, k == null)
  1668. return V(), 0;
  1669. if (Te.type === "begin" && T.type === "end" && Te.index === T.index && k === "") {
  1670. if (z += N.slice(T.index, T.index + 1), !g) {
  1671. const H = new Error(`0 width match regex (${b})`);
  1672. throw H.languageName = b, H.badRule = Te.rule, H;
  1673. }
  1674. return 1;
  1675. }
  1676. if (Te = T, T.type === "begin")
  1677. return Hn(T);
  1678. if (T.type === "illegal" && !O) {
  1679. const H = new Error('Illegal lexeme "' + k + '" for mode "' + (C.scope || "<unnamed>") + '"');
  1680. throw H.mode = C, H;
  1681. } else if (T.type === "end") {
  1682. const H = Fn(T);
  1683. if (H !== gn)
  1684. return H;
  1685. }
  1686. if (T.type === "illegal" && k === "")
  1687. return 1;
  1688. if (Ue > 1e5 && Ue > T.index * 3)
  1689. throw new Error("potential infinite loop, way more iterations than matches");
  1690. return z += k, k.length;
  1691. }
  1692. const te = L(b);
  1693. if (!te)
  1694. throw ue(n.replace("{}", b)), new Error('Unknown language: "' + b + '"');
  1695. const xn = Kt(te);
  1696. let Pe = "", C = U || xn;
  1697. const en = {}, Q = new i.__emitter(i);
  1698. zn();
  1699. let z = "", Se = 0, ce = 0, Ue = 0, He = !1;
  1700. try {
  1701. if (te.__emitTokens)
  1702. te.__emitTokens(N, Q);
  1703. else {
  1704. for (C.matcher.considerAll(); ; ) {
  1705. Ue++, He ? He = !1 : C.matcher.considerAll(), C.matcher.lastIndex = ce;
  1706. const w = C.matcher.exec(N);
  1707. if (!w)
  1708. break;
  1709. const T = N.substring(ce, w.index), k = Je(T, w);
  1710. ce = w.index + k;
  1711. }
  1712. Je(N.substring(ce));
  1713. }
  1714. return Q.finalize(), Pe = Q.toHTML(), {
  1715. language: b,
  1716. value: Pe,
  1717. relevance: Se,
  1718. illegal: !1,
  1719. _emitter: Q,
  1720. _top: C
  1721. };
  1722. } catch (w) {
  1723. if (w.message && w.message.includes("Illegal"))
  1724. return {
  1725. language: b,
  1726. value: ze(N),
  1727. illegal: !0,
  1728. relevance: 0,
  1729. _illegalBy: {
  1730. message: w.message,
  1731. index: ce,
  1732. context: N.slice(ce - 100, ce + 100),
  1733. mode: w.mode,
  1734. resultSoFar: Pe
  1735. },
  1736. _emitter: Q
  1737. };
  1738. if (g)
  1739. return {
  1740. language: b,
  1741. value: ze(N),
  1742. illegal: !1,
  1743. relevance: 0,
  1744. errorRaised: w,
  1745. _emitter: Q,
  1746. _top: C
  1747. };
  1748. throw w;
  1749. }
  1750. }
  1751. function u(b) {
  1752. const N = {
  1753. value: ze(b),
  1754. illegal: !1,
  1755. relevance: 0,
  1756. _top: t,
  1757. _emitter: new i.__emitter(i)
  1758. };
  1759. return N._emitter.addText(b), N;
  1760. }
  1761. function d(b, N) {
  1762. N = N || i.languages || Object.keys(r);
  1763. const O = u(b), U = N.filter(L).filter(P).map(
  1764. (V) => c(V, b, !1)
  1765. );
  1766. U.unshift(O);
  1767. const x = U.sort((V, ne) => {
  1768. if (V.relevance !== ne.relevance)
  1769. return ne.relevance - V.relevance;
  1770. if (V.language && ne.language) {
  1771. if (L(V.language).supersetOf === ne.language)
  1772. return 1;
  1773. if (L(ne.language).supersetOf === V.language)
  1774. return -1;
  1775. }
  1776. return 0;
  1777. }), [X, J] = x, Me = X;
  1778. return Me.secondBest = J, Me;
  1779. }
  1780. function h(b, N, O) {
  1781. const U = N && l[N] || O;
  1782. b.classList.add("hljs"), b.classList.add(`language-${U}`);
  1783. }
  1784. function p(b) {
  1785. let N = null;
  1786. const O = a(b);
  1787. if (s(O))
  1788. return;
  1789. if (oe(
  1790. "before:highlightElement",
  1791. { el: b, language: O }
  1792. ), b.dataset.highlighted) {
  1793. console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", b);
  1794. return;
  1795. }
  1796. if (b.children.length > 0 && (i.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(b)), i.throwUnescapedHTML))
  1797. throw new Zt(
  1798. "One of your code blocks includes unescaped HTML.",
  1799. b.innerHTML
  1800. );
  1801. N = b;
  1802. const U = N.textContent, x = O ? o(U, { language: O, ignoreIllegals: !0 }) : d(U);
  1803. b.innerHTML = x.value, b.dataset.highlighted = "yes", h(b, O, x.language), b.result = {
  1804. language: x.language,
  1805. // TODO: remove with version 11.0
  1806. re: x.relevance,
  1807. relevance: x.relevance
  1808. }, x.secondBest && (b.secondBest = {
  1809. language: x.secondBest.language,
  1810. relevance: x.secondBest.relevance
  1811. }), oe("after:highlightElement", { el: b, result: x, text: U });
  1812. }
  1813. function _(b) {
  1814. i = fn(i, b);
  1815. }
  1816. const E = () => {
  1817. A(), he("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
  1818. };
  1819. function m() {
  1820. A(), he("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
  1821. }
  1822. let v = !1;
  1823. function A() {
  1824. if (document.readyState === "loading") {
  1825. v = !0;
  1826. return;
  1827. }
  1828. document.querySelectorAll(i.cssSelector).forEach(p);
  1829. }
  1830. function D() {
  1831. v && A();
  1832. }
  1833. typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
  1834. function S(b, N) {
  1835. let O = null;
  1836. try {
  1837. O = N(e);
  1838. } catch (U) {
  1839. if (ue("Language definition for '{}' could not be registered.".replace("{}", b)), g)
  1840. ue(U);
  1841. else
  1842. throw U;
  1843. O = t;
  1844. }
  1845. O.name || (O.name = b), r[b] = O, O.rawDefinition = N.bind(null, e), O.aliases && I(O.aliases, { languageName: b });
  1846. }
  1847. function M(b) {
  1848. delete r[b];
  1849. for (const N of Object.keys(l))
  1850. l[N] === b && delete l[N];
  1851. }
  1852. function R() {
  1853. return Object.keys(r);
  1854. }
  1855. function L(b) {
  1856. return b = (b || "").toLowerCase(), r[b] || r[l[b]];
  1857. }
  1858. function I(b, { languageName: N }) {
  1859. typeof b == "string" && (b = [b]), b.forEach((O) => {
  1860. l[O.toLowerCase()] = N;
  1861. });
  1862. }
  1863. function P(b) {
  1864. const N = L(b);
  1865. return N && !N.disableAutodetect;
  1866. }
  1867. function $(b) {
  1868. b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (N) => {
  1869. b["before:highlightBlock"](
  1870. Object.assign({ block: N.el }, N)
  1871. );
  1872. }), b["after:highlightBlock"] && !b["after:highlightElement"] && (b["after:highlightElement"] = (N) => {
  1873. b["after:highlightBlock"](
  1874. Object.assign({ block: N.el }, N)
  1875. );
  1876. });
  1877. }
  1878. function K(b) {
  1879. $(b), f.push(b);
  1880. }
  1881. function Y(b) {
  1882. const N = f.indexOf(b);
  1883. N !== -1 && f.splice(N, 1);
  1884. }
  1885. function oe(b, N) {
  1886. const O = b;
  1887. f.forEach(function(U) {
  1888. U[O] && U[O](N);
  1889. });
  1890. }
  1891. function ge(b) {
  1892. return he("10.7.0", "highlightBlock will be removed entirely in v12.0"), he("10.7.0", "Please use highlightElement now."), p(b);
  1893. }
  1894. Object.assign(e, {
  1895. highlight: o,
  1896. highlightAuto: d,
  1897. highlightAll: A,
  1898. highlightElement: p,
  1899. // TODO: Remove with v12 API
  1900. highlightBlock: ge,
  1901. configure: _,
  1902. initHighlighting: E,
  1903. initHighlightingOnLoad: m,
  1904. registerLanguage: S,
  1905. unregisterLanguage: M,
  1906. listLanguages: R,
  1907. getLanguage: L,
  1908. registerAliases: I,
  1909. autoDetection: P,
  1910. inherit: fn,
  1911. addPlugin: K,
  1912. removePlugin: Y
  1913. }), e.debugMode = function() {
  1914. g = !1;
  1915. }, e.safeMode = function() {
  1916. g = !0;
  1917. }, e.versionString = Qt, e.regex = {
  1918. concat: fe,
  1919. lookahead: wn,
  1920. either: Ze,
  1921. optional: lt,
  1922. anyNumberOfTimes: ot
  1923. };
  1924. for (const b in Le)
  1925. typeof Le[b] == "object" && mn(Le[b]);
  1926. return Object.assign(e, Le), e;
  1927. }, _e = Rn({});
  1928. _e.newInstance = () => Rn({});
  1929. var Xt = _e;
  1930. _e.HighlightJS = _e;
  1931. _e.default = _e;
  1932. const q = /* @__PURE__ */ tt(Xt);
  1933. function Vt(e) {
  1934. const r = e.regex, l = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), f = /[\p{L}0-9._:-]+/u, g = {
  1935. className: "symbol",
  1936. begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
  1937. }, n = {
  1938. begin: /\s/,
  1939. contains: [
  1940. {
  1941. className: "keyword",
  1942. begin: /#?[a-z_][a-z1-9_-]+/,
  1943. illegal: /\n/
  1944. }
  1945. ]
  1946. }, t = e.inherit(n, {
  1947. begin: /\(/,
  1948. end: /\)/
  1949. }), i = e.inherit(e.APOS_STRING_MODE, { className: "string" }), s = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), a = {
  1950. endsWithParent: !0,
  1951. illegal: /</,
  1952. relevance: 0,
  1953. contains: [
  1954. {
  1955. className: "attr",
  1956. begin: f,
  1957. relevance: 0
  1958. },
  1959. {
  1960. begin: /=\s*/,
  1961. relevance: 0,
  1962. contains: [
  1963. {
  1964. className: "string",
  1965. endsParent: !0,
  1966. variants: [
  1967. {
  1968. begin: /"/,
  1969. end: /"/,
  1970. contains: [g]
  1971. },
  1972. {
  1973. begin: /'/,
  1974. end: /'/,
  1975. contains: [g]
  1976. },
  1977. { begin: /[^\s"'=<>`]+/ }
  1978. ]
  1979. }
  1980. ]
  1981. }
  1982. ]
  1983. };
  1984. return {
  1985. name: "HTML, XML",
  1986. aliases: [
  1987. "html",
  1988. "xhtml",
  1989. "rss",
  1990. "atom",
  1991. "xjb",
  1992. "xsd",
  1993. "xsl",
  1994. "plist",
  1995. "wsf",
  1996. "svg"
  1997. ],
  1998. case_insensitive: !0,
  1999. unicodeRegex: !0,
  2000. contains: [
  2001. {
  2002. className: "meta",
  2003. begin: /<![a-z]/,
  2004. end: />/,
  2005. relevance: 10,
  2006. contains: [
  2007. n,
  2008. s,
  2009. i,
  2010. t,
  2011. {
  2012. begin: /\[/,
  2013. end: /\]/,
  2014. contains: [
  2015. {
  2016. className: "meta",
  2017. begin: /<![a-z]/,
  2018. end: />/,
  2019. contains: [
  2020. n,
  2021. t,
  2022. s,
  2023. i
  2024. ]
  2025. }
  2026. ]
  2027. }
  2028. ]
  2029. },
  2030. e.COMMENT(
  2031. /<!--/,
  2032. /-->/,
  2033. { relevance: 10 }
  2034. ),
  2035. {
  2036. begin: /<!\[CDATA\[/,
  2037. end: /\]\]>/,
  2038. relevance: 10
  2039. },
  2040. g,
  2041. // xml processing instructions
  2042. {
  2043. className: "meta",
  2044. end: /\?>/,
  2045. variants: [
  2046. {
  2047. begin: /<\?xml/,
  2048. relevance: 10,
  2049. contains: [
  2050. s
  2051. ]
  2052. },
  2053. {
  2054. begin: /<\?[a-z][a-z0-9]+/
  2055. }
  2056. ]
  2057. },
  2058. {
  2059. className: "tag",
  2060. /*
  2061. The lookahead pattern (?=...) ensures that 'begin' only matches
  2062. '<style' as a single word, followed by a whitespace or an
  2063. ending bracket.
  2064. */
  2065. begin: /<style(?=\s|>)/,
  2066. end: />/,
  2067. keywords: { name: "style" },
  2068. contains: [a],
  2069. starts: {
  2070. end: /<\/style>/,
  2071. returnEnd: !0,
  2072. subLanguage: [
  2073. "css",
  2074. "xml"
  2075. ]
  2076. }
  2077. },
  2078. {
  2079. className: "tag",
  2080. // See the comment in the <style tag about the lookahead pattern
  2081. begin: /<script(?=\s|>)/,
  2082. end: />/,
  2083. keywords: { name: "script" },
  2084. contains: [a],
  2085. starts: {
  2086. end: /<\/script>/,
  2087. returnEnd: !0,
  2088. subLanguage: [
  2089. "javascript",
  2090. "handlebars",
  2091. "xml"
  2092. ]
  2093. }
  2094. },
  2095. // we need this for now for jSX
  2096. {
  2097. className: "tag",
  2098. begin: /<>|<\/>/
  2099. },
  2100. // open tag
  2101. {
  2102. className: "tag",
  2103. begin: r.concat(
  2104. /</,
  2105. r.lookahead(r.concat(
  2106. l,
  2107. // <tag/>
  2108. // <tag>
  2109. // <tag ...
  2110. r.either(/\/>/, />/, /\s/)
  2111. ))
  2112. ),
  2113. end: /\/?>/,
  2114. contains: [
  2115. {
  2116. className: "name",
  2117. begin: l,
  2118. relevance: 0,
  2119. starts: a
  2120. }
  2121. ]
  2122. },
  2123. // close tag
  2124. {
  2125. className: "tag",
  2126. begin: r.concat(
  2127. /<\//,
  2128. r.lookahead(r.concat(
  2129. l,
  2130. />/
  2131. ))
  2132. ),
  2133. contains: [
  2134. {
  2135. className: "name",
  2136. begin: l,
  2137. relevance: 0
  2138. },
  2139. {
  2140. begin: />/,
  2141. relevance: 0,
  2142. endsParent: !0
  2143. }
  2144. ]
  2145. }
  2146. ]
  2147. };
  2148. }
  2149. const hn = "[A-Za-z$_][0-9A-Za-z$_]*", jt = [
  2150. "as",
  2151. // for exports
  2152. "in",
  2153. "of",
  2154. "if",
  2155. "for",
  2156. "while",
  2157. "finally",
  2158. "var",
  2159. "new",
  2160. "function",
  2161. "do",
  2162. "return",
  2163. "void",
  2164. "else",
  2165. "break",
  2166. "catch",
  2167. "instanceof",
  2168. "with",
  2169. "throw",
  2170. "case",
  2171. "default",
  2172. "try",
  2173. "switch",
  2174. "continue",
  2175. "typeof",
  2176. "delete",
  2177. "let",
  2178. "yield",
  2179. "const",
  2180. "class",
  2181. // JS handles these with a special rule
  2182. // "get",
  2183. // "set",
  2184. "debugger",
  2185. "async",
  2186. "await",
  2187. "static",
  2188. "import",
  2189. "from",
  2190. "export",
  2191. "extends"
  2192. ], qt = [
  2193. "true",
  2194. "false",
  2195. "null",
  2196. "undefined",
  2197. "NaN",
  2198. "Infinity"
  2199. ], On = [
  2200. // Fundamental objects
  2201. "Object",
  2202. "Function",
  2203. "Boolean",
  2204. "Symbol",
  2205. // numbers and dates
  2206. "Math",
  2207. "Date",
  2208. "Number",
  2209. "BigInt",
  2210. // text
  2211. "String",
  2212. "RegExp",
  2213. // Indexed collections
  2214. "Array",
  2215. "Float32Array",
  2216. "Float64Array",
  2217. "Int8Array",
  2218. "Uint8Array",
  2219. "Uint8ClampedArray",
  2220. "Int16Array",
  2221. "Int32Array",
  2222. "Uint16Array",
  2223. "Uint32Array",
  2224. "BigInt64Array",
  2225. "BigUint64Array",
  2226. // Keyed collections
  2227. "Set",
  2228. "Map",
  2229. "WeakSet",
  2230. "WeakMap",
  2231. // Structured data
  2232. "ArrayBuffer",
  2233. "SharedArrayBuffer",
  2234. "Atomics",
  2235. "DataView",
  2236. "JSON",
  2237. // Control abstraction objects
  2238. "Promise",
  2239. "Generator",
  2240. "GeneratorFunction",
  2241. "AsyncFunction",
  2242. // Reflection
  2243. "Reflect",
  2244. "Proxy",
  2245. // Internationalization
  2246. "Intl",
  2247. // WebAssembly
  2248. "WebAssembly"
  2249. ], Cn = [
  2250. "Error",
  2251. "EvalError",
  2252. "InternalError",
  2253. "RangeError",
  2254. "ReferenceError",
  2255. "SyntaxError",
  2256. "TypeError",
  2257. "URIError"
  2258. ], In = [
  2259. "setInterval",
  2260. "setTimeout",
  2261. "clearInterval",
  2262. "clearTimeout",
  2263. "require",
  2264. "exports",
  2265. "eval",
  2266. "isFinite",
  2267. "isNaN",
  2268. "parseFloat",
  2269. "parseInt",
  2270. "decodeURI",
  2271. "decodeURIComponent",
  2272. "encodeURI",
  2273. "encodeURIComponent",
  2274. "escape",
  2275. "unescape"
  2276. ], Jt = [
  2277. "arguments",
  2278. "this",
  2279. "super",
  2280. "console",
  2281. "window",
  2282. "document",
  2283. "localStorage",
  2284. "sessionStorage",
  2285. "module",
  2286. "global"
  2287. // Node.js
  2288. ], er = [].concat(
  2289. In,
  2290. On,
  2291. Cn
  2292. );
  2293. function nr(e) {
  2294. const r = e.regex, l = (N, { after: O }) => {
  2295. const U = "</" + N[0].slice(1);
  2296. return N.input.indexOf(U, O) !== -1;
  2297. }, f = hn, g = {
  2298. begin: "<>",
  2299. end: "</>"
  2300. }, n = /<[A-Za-z0-9\\._:-]+\s*\/>/, t = {
  2301. begin: /<[A-Za-z0-9\\._:-]+/,
  2302. end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
  2303. /**
  2304. * @param {RegExpMatchArray} match
  2305. * @param {CallbackResponse} response
  2306. */
  2307. isTrulyOpeningTag: (N, O) => {
  2308. const U = N[0].length + N.index, x = N.input[U];
  2309. if (
  2310. // HTML should not include another raw `<` inside a tag
  2311. // nested type?
  2312. // `<Array<Array<number>>`, etc.
  2313. x === "<" || // the , gives away that this is not HTML
  2314. // `<T, A extends keyof T, V>`
  2315. x === ","
  2316. ) {
  2317. O.ignoreMatch();
  2318. return;
  2319. }
  2320. x === ">" && (l(N, { after: U }) || O.ignoreMatch());
  2321. let X;
  2322. const J = N.input.substring(U);
  2323. if (X = J.match(/^\s*=/)) {
  2324. O.ignoreMatch();
  2325. return;
  2326. }
  2327. if ((X = J.match(/^\s+extends\s+/)) && X.index === 0) {
  2328. O.ignoreMatch();
  2329. return;
  2330. }
  2331. }
  2332. }, i = {
  2333. $pattern: hn,
  2334. keyword: jt,
  2335. literal: qt,
  2336. built_in: er,
  2337. "variable.language": Jt
  2338. }, s = "[0-9](_?[0-9])*", a = `\\.(${s})`, o = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
  2339. className: "number",
  2340. variants: [
  2341. // DecimalLiteral
  2342. { begin: `(\\b(${o})((${a})|\\.)?|(${a}))[eE][+-]?(${s})\\b` },
  2343. { begin: `\\b(${o})\\b((${a})\\b|\\.)?|(${a})\\b` },
  2344. // DecimalBigIntegerLiteral
  2345. { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
  2346. // NonDecimalIntegerLiteral
  2347. { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
  2348. { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
  2349. { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
  2350. // LegacyOctalIntegerLiteral (does not include underscore separators)
  2351. // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
  2352. { begin: "\\b0[0-7]+n?\\b" }
  2353. ],
  2354. relevance: 0
  2355. }, u = {
  2356. className: "subst",
  2357. begin: "\\$\\{",
  2358. end: "\\}",
  2359. keywords: i,
  2360. contains: []
  2361. // defined later
  2362. }, d = {
  2363. begin: "html`",
  2364. end: "",
  2365. starts: {
  2366. end: "`",
  2367. returnEnd: !1,
  2368. contains: [
  2369. e.BACKSLASH_ESCAPE,
  2370. u
  2371. ],
  2372. subLanguage: "xml"
  2373. }
  2374. }, h = {
  2375. begin: "css`",
  2376. end: "",
  2377. starts: {
  2378. end: "`",
  2379. returnEnd: !1,
  2380. contains: [
  2381. e.BACKSLASH_ESCAPE,
  2382. u
  2383. ],
  2384. subLanguage: "css"
  2385. }
  2386. }, p = {
  2387. begin: "gql`",
  2388. end: "",
  2389. starts: {
  2390. end: "`",
  2391. returnEnd: !1,
  2392. contains: [
  2393. e.BACKSLASH_ESCAPE,
  2394. u
  2395. ],
  2396. subLanguage: "graphql"
  2397. }
  2398. }, _ = {
  2399. className: "string",
  2400. begin: "`",
  2401. end: "`",
  2402. contains: [
  2403. e.BACKSLASH_ESCAPE,
  2404. u
  2405. ]
  2406. }, m = {
  2407. className: "comment",
  2408. variants: [
  2409. e.COMMENT(
  2410. /\/\*\*(?!\/)/,
  2411. "\\*/",
  2412. {
  2413. relevance: 0,
  2414. contains: [
  2415. {
  2416. begin: "(?=@[A-Za-z]+)",
  2417. relevance: 0,
  2418. contains: [
  2419. {
  2420. className: "doctag",
  2421. begin: "@[A-Za-z]+"
  2422. },
  2423. {
  2424. className: "type",
  2425. begin: "\\{",
  2426. end: "\\}",
  2427. excludeEnd: !0,
  2428. excludeBegin: !0,
  2429. relevance: 0
  2430. },
  2431. {
  2432. className: "variable",
  2433. begin: f + "(?=\\s*(-)|$)",
  2434. endsParent: !0,
  2435. relevance: 0
  2436. },
  2437. // eat spaces (not newlines) so we can find
  2438. // types or variables
  2439. {
  2440. begin: /(?=[^\n])\s/,
  2441. relevance: 0
  2442. }
  2443. ]
  2444. }
  2445. ]
  2446. }
  2447. ),
  2448. e.C_BLOCK_COMMENT_MODE,
  2449. e.C_LINE_COMMENT_MODE
  2450. ]
  2451. }, v = [
  2452. e.APOS_STRING_MODE,
  2453. e.QUOTE_STRING_MODE,
  2454. d,
  2455. h,
  2456. p,
  2457. _,
  2458. // Skip numbers when they are part of a variable name
  2459. { match: /\$\d+/ },
  2460. c
  2461. // This is intentional:
  2462. // See https://github.com/highlightjs/highlight.js/issues/3288
  2463. // hljs.REGEXP_MODE
  2464. ];
  2465. u.contains = v.concat({
  2466. // we need to pair up {} inside our subst to prevent
  2467. // it from ending too early by matching another }
  2468. begin: /\{/,
  2469. end: /\}/,
  2470. keywords: i,
  2471. contains: [
  2472. "self"
  2473. ].concat(v)
  2474. });
  2475. const A = [].concat(m, u.contains), D = A.concat([
  2476. // eat recursive parens in sub expressions
  2477. {
  2478. begin: /\(/,
  2479. end: /\)/,
  2480. keywords: i,
  2481. contains: ["self"].concat(A)
  2482. }
  2483. ]), S = {
  2484. className: "params",
  2485. begin: /\(/,
  2486. end: /\)/,
  2487. excludeBegin: !0,
  2488. excludeEnd: !0,
  2489. keywords: i,
  2490. contains: D
  2491. }, M = {
  2492. variants: [
  2493. // class Car extends vehicle
  2494. {
  2495. match: [
  2496. /class/,
  2497. /\s+/,
  2498. f,
  2499. /\s+/,
  2500. /extends/,
  2501. /\s+/,
  2502. r.concat(f, "(", r.concat(/\./, f), ")*")
  2503. ],
  2504. scope: {
  2505. 1: "keyword",
  2506. 3: "title.class",
  2507. 5: "keyword",
  2508. 7: "title.class.inherited"
  2509. }
  2510. },
  2511. // class Car
  2512. {
  2513. match: [
  2514. /class/,
  2515. /\s+/,
  2516. f
  2517. ],
  2518. scope: {
  2519. 1: "keyword",
  2520. 3: "title.class"
  2521. }
  2522. }
  2523. ]
  2524. }, R = {
  2525. relevance: 0,
  2526. match: r.either(
  2527. // Hard coded exceptions
  2528. /\bJSON/,
  2529. // Float32Array, OutT
  2530. /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
  2531. // CSSFactory, CSSFactoryT
  2532. /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
  2533. // FPs, FPsT
  2534. /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
  2535. // P
  2536. // single letters are not highlighted
  2537. // BLAH
  2538. // this will be flagged as a UPPER_CASE_CONSTANT instead
  2539. ),
  2540. className: "title.class",
  2541. keywords: {
  2542. _: [
  2543. // se we still get relevance credit for JS library classes
  2544. ...On,
  2545. ...Cn
  2546. ]
  2547. }
  2548. }, L = {
  2549. label: "use_strict",
  2550. className: "meta",
  2551. relevance: 10,
  2552. begin: /^\s*['"]use (strict|asm)['"]/
  2553. }, I = {
  2554. variants: [
  2555. {
  2556. match: [
  2557. /function/,
  2558. /\s+/,
  2559. f,
  2560. /(?=\s*\()/
  2561. ]
  2562. },
  2563. // anonymous function
  2564. {
  2565. match: [
  2566. /function/,
  2567. /\s*(?=\()/
  2568. ]
  2569. }
  2570. ],
  2571. className: {
  2572. 1: "keyword",
  2573. 3: "title.function"
  2574. },
  2575. label: "func.def",
  2576. contains: [S],
  2577. illegal: /%/
  2578. }, P = {
  2579. relevance: 0,
  2580. match: /\b[A-Z][A-Z_0-9]+\b/,
  2581. className: "variable.constant"
  2582. };
  2583. function $(N) {
  2584. return r.concat("(?!", N.join("|"), ")");
  2585. }
  2586. const K = {
  2587. match: r.concat(
  2588. /\b/,
  2589. $([
  2590. ...In,
  2591. "super",
  2592. "import"
  2593. ]),
  2594. f,
  2595. r.lookahead(/\(/)
  2596. ),
  2597. className: "title.function",
  2598. relevance: 0
  2599. }, Y = {
  2600. begin: r.concat(/\./, r.lookahead(
  2601. r.concat(f, /(?![0-9A-Za-z$_(])/)
  2602. )),
  2603. end: f,
  2604. excludeBegin: !0,
  2605. keywords: "prototype",
  2606. className: "property",
  2607. relevance: 0
  2608. }, oe = {
  2609. match: [
  2610. /get|set/,
  2611. /\s+/,
  2612. f,
  2613. /(?=\()/
  2614. ],
  2615. className: {
  2616. 1: "keyword",
  2617. 3: "title.function"
  2618. },
  2619. contains: [
  2620. {
  2621. // eat to avoid empty params
  2622. begin: /\(\)/
  2623. },
  2624. S
  2625. ]
  2626. }, ge = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
  2627. match: [
  2628. /const|var|let/,
  2629. /\s+/,
  2630. f,
  2631. /\s*/,
  2632. /=\s*/,
  2633. /(async\s*)?/,
  2634. // async is optional
  2635. r.lookahead(ge)
  2636. ],
  2637. keywords: "async",
  2638. className: {
  2639. 1: "keyword",
  2640. 3: "title.function"
  2641. },
  2642. contains: [
  2643. S
  2644. ]
  2645. };
  2646. return {
  2647. name: "JavaScript",
  2648. aliases: ["js", "jsx", "mjs", "cjs"],
  2649. keywords: i,
  2650. // this will be extended by TypeScript
  2651. exports: { PARAMS_CONTAINS: D, CLASS_REFERENCE: R },
  2652. illegal: /#(?![$_A-z])/,
  2653. contains: [
  2654. e.SHEBANG({
  2655. label: "shebang",
  2656. binary: "node",
  2657. relevance: 5
  2658. }),
  2659. L,
  2660. e.APOS_STRING_MODE,
  2661. e.QUOTE_STRING_MODE,
  2662. d,
  2663. h,
  2664. p,
  2665. _,
  2666. m,
  2667. // Skip numbers when they are part of a variable name
  2668. { match: /\$\d+/ },
  2669. c,
  2670. R,
  2671. {
  2672. className: "attr",
  2673. begin: f + r.lookahead(":"),
  2674. relevance: 0
  2675. },
  2676. b,
  2677. {
  2678. // "value" container
  2679. begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
  2680. keywords: "return throw case",
  2681. relevance: 0,
  2682. contains: [
  2683. m,
  2684. e.REGEXP_MODE,
  2685. {
  2686. className: "function",
  2687. // we have to count the parens to make sure we actually have the
  2688. // correct bounding ( ) before the =>. There could be any number of
  2689. // sub-expressions inside also surrounded by parens.
  2690. begin: ge,
  2691. returnBegin: !0,
  2692. end: "\\s*=>",
  2693. contains: [
  2694. {
  2695. className: "params",
  2696. variants: [
  2697. {
  2698. begin: e.UNDERSCORE_IDENT_RE,
  2699. relevance: 0
  2700. },
  2701. {
  2702. className: null,
  2703. begin: /\(\s*\)/,
  2704. skip: !0
  2705. },
  2706. {
  2707. begin: /\(/,
  2708. end: /\)/,
  2709. excludeBegin: !0,
  2710. excludeEnd: !0,
  2711. keywords: i,
  2712. contains: D
  2713. }
  2714. ]
  2715. }
  2716. ]
  2717. },
  2718. {
  2719. // could be a comma delimited list of params to a function call
  2720. begin: /,/,
  2721. relevance: 0
  2722. },
  2723. {
  2724. match: /\s+/,
  2725. relevance: 0
  2726. },
  2727. {
  2728. // JSX
  2729. variants: [
  2730. { begin: g.begin, end: g.end },
  2731. { match: n },
  2732. {
  2733. begin: t.begin,
  2734. // we carefully check the opening tag to see if it truly
  2735. // is a tag and not a false positive
  2736. "on:begin": t.isTrulyOpeningTag,
  2737. end: t.end
  2738. }
  2739. ],
  2740. subLanguage: "xml",
  2741. contains: [
  2742. {
  2743. begin: t.begin,
  2744. end: t.end,
  2745. skip: !0,
  2746. contains: ["self"]
  2747. }
  2748. ]
  2749. }
  2750. ]
  2751. },
  2752. I,
  2753. {
  2754. // prevent this from getting swallowed up by function
  2755. // since they appear "function like"
  2756. beginKeywords: "while if switch catch for"
  2757. },
  2758. {
  2759. // we have to count the parens to make sure we actually have the correct
  2760. // bounding ( ). There could be any number of sub-expressions inside
  2761. // also surrounded by parens.
  2762. begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
  2763. // end parens
  2764. returnBegin: !0,
  2765. label: "func.def",
  2766. contains: [
  2767. S,
  2768. e.inherit(e.TITLE_MODE, { begin: f, className: "title.function" })
  2769. ]
  2770. },
  2771. // catch ... so it won't trigger the property rule below
  2772. {
  2773. match: /\.\.\./,
  2774. relevance: 0
  2775. },
  2776. Y,
  2777. // hack: prevents detection of keywords in some circumstances
  2778. // .keyword()
  2779. // $keyword = x
  2780. {
  2781. match: "\\$" + f,
  2782. relevance: 0
  2783. },
  2784. {
  2785. match: [/\bconstructor(?=\s*\()/],
  2786. className: { 1: "title.function" },
  2787. contains: [S]
  2788. },
  2789. K,
  2790. P,
  2791. M,
  2792. oe,
  2793. {
  2794. match: /\$[(.]/
  2795. // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
  2796. }
  2797. ]
  2798. };
  2799. }
  2800. function tr(e) {
  2801. const r = {
  2802. className: "attr",
  2803. begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
  2804. relevance: 1.01
  2805. }, l = {
  2806. match: /[{}[\],:]/,
  2807. className: "punctuation",
  2808. relevance: 0
  2809. }, f = [
  2810. "true",
  2811. "false",
  2812. "null"
  2813. ], g = {
  2814. scope: "literal",
  2815. beginKeywords: f.join(" ")
  2816. };
  2817. return {
  2818. name: "JSON",
  2819. keywords: {
  2820. literal: f
  2821. },
  2822. contains: [
  2823. r,
  2824. l,
  2825. e.QUOTE_STRING_MODE,
  2826. g,
  2827. e.C_NUMBER_MODE,
  2828. e.C_LINE_COMMENT_MODE,
  2829. e.C_BLOCK_COMMENT_MODE
  2830. ],
  2831. illegal: "\\S"
  2832. };
  2833. }
  2834. function rr(e) {
  2835. const r = "true false yes no null", l = "[\\w#;/?:@&=+$,.~*'()[\\]]+", f = {
  2836. className: "attr",
  2837. variants: [
  2838. { begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
  2839. {
  2840. // double quoted keys
  2841. begin: '"\\w[\\w :\\/.-]*":(?=[ ]|$)'
  2842. },
  2843. {
  2844. // single quoted keys
  2845. begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
  2846. }
  2847. ]
  2848. }, g = {
  2849. className: "template-variable",
  2850. variants: [
  2851. {
  2852. // jinja templates Ansible
  2853. begin: /\{\{/,
  2854. end: /\}\}/
  2855. },
  2856. {
  2857. // Ruby i18n
  2858. begin: /%\{/,
  2859. end: /\}/
  2860. }
  2861. ]
  2862. }, n = {
  2863. className: "string",
  2864. relevance: 0,
  2865. variants: [
  2866. {
  2867. begin: /'/,
  2868. end: /'/
  2869. },
  2870. {
  2871. begin: /"/,
  2872. end: /"/
  2873. },
  2874. { begin: /\S+/ }
  2875. ],
  2876. contains: [
  2877. e.BACKSLASH_ESCAPE,
  2878. g
  2879. ]
  2880. }, t = e.inherit(n, { variants: [
  2881. {
  2882. begin: /'/,
  2883. end: /'/
  2884. },
  2885. {
  2886. begin: /"/,
  2887. end: /"/
  2888. },
  2889. { begin: /[^\s,{}[\]]+/ }
  2890. ] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", s = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", a = "(\\.[0-9]*)?", o = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
  2891. className: "number",
  2892. begin: "\\b" + i + s + a + o + "\\b"
  2893. }, u = {
  2894. end: ",",
  2895. endsWithParent: !0,
  2896. excludeEnd: !0,
  2897. keywords: r,
  2898. relevance: 0
  2899. }, d = {
  2900. begin: /\{/,
  2901. end: /\}/,
  2902. contains: [u],
  2903. illegal: "\\n",
  2904. relevance: 0
  2905. }, h = {
  2906. begin: "\\[",
  2907. end: "\\]",
  2908. contains: [u],
  2909. illegal: "\\n",
  2910. relevance: 0
  2911. }, p = [
  2912. f,
  2913. {
  2914. className: "meta",
  2915. begin: "^---\\s*$",
  2916. relevance: 10
  2917. },
  2918. {
  2919. // multi line string
  2920. // Blocks start with a | or > followed by a newline
  2921. //
  2922. // Indentation of subsequent lines must be the same to
  2923. // be considered part of the block
  2924. className: "string",
  2925. begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
  2926. },
  2927. {
  2928. // Ruby/Rails erb
  2929. begin: "<%[%=-]?",
  2930. end: "[%-]?%>",
  2931. subLanguage: "ruby",
  2932. excludeBegin: !0,
  2933. excludeEnd: !0,
  2934. relevance: 0
  2935. },
  2936. {
  2937. // named tags
  2938. className: "type",
  2939. begin: "!\\w+!" + l
  2940. },
  2941. // https://yaml.org/spec/1.2/spec.html#id2784064
  2942. {
  2943. // verbatim tags
  2944. className: "type",
  2945. begin: "!<" + l + ">"
  2946. },
  2947. {
  2948. // primary tags
  2949. className: "type",
  2950. begin: "!" + l
  2951. },
  2952. {
  2953. // secondary tags
  2954. className: "type",
  2955. begin: "!!" + l
  2956. },
  2957. {
  2958. // fragment id &ref
  2959. className: "meta",
  2960. begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
  2961. },
  2962. {
  2963. // fragment reference *ref
  2964. className: "meta",
  2965. begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
  2966. },
  2967. {
  2968. // array listing
  2969. className: "bullet",
  2970. // TODO: remove |$ hack when we have proper look-ahead support
  2971. begin: "-(?=[ ]|$)",
  2972. relevance: 0
  2973. },
  2974. e.HASH_COMMENT_MODE,
  2975. {
  2976. beginKeywords: r,
  2977. keywords: { literal: r }
  2978. },
  2979. c,
  2980. // numbers are any valid C-style number that
  2981. // sit isolated from other words
  2982. {
  2983. className: "number",
  2984. begin: e.C_NUMBER_RE + "\\b",
  2985. relevance: 0
  2986. },
  2987. d,
  2988. h,
  2989. n
  2990. ], _ = [...p];
  2991. return _.pop(), _.push(t), u.contains = _, {
  2992. name: "YAML",
  2993. case_insensitive: !0,
  2994. aliases: ["yml"],
  2995. contains: p
  2996. };
  2997. }
  2998. function ir(e) {
  2999. return {
  3000. name: "Plain text",
  3001. aliases: [
  3002. "text",
  3003. "txt"
  3004. ],
  3005. disableAutodetect: !0
  3006. };
  3007. }
  3008. function sr(e) {
  3009. const r = e.regex, l = /[\p{XID_Start}_]\p{XID_Continue}*/u, f = [
  3010. "and",
  3011. "as",
  3012. "assert",
  3013. "async",
  3014. "await",
  3015. "break",
  3016. "case",
  3017. "class",
  3018. "continue",
  3019. "def",
  3020. "del",
  3021. "elif",
  3022. "else",
  3023. "except",
  3024. "finally",
  3025. "for",
  3026. "from",
  3027. "global",
  3028. "if",
  3029. "import",
  3030. "in",
  3031. "is",
  3032. "lambda",
  3033. "match",
  3034. "nonlocal|10",
  3035. "not",
  3036. "or",
  3037. "pass",
  3038. "raise",
  3039. "return",
  3040. "try",
  3041. "while",
  3042. "with",
  3043. "yield"
  3044. ], i = {
  3045. $pattern: /[A-Za-z]\w+|__\w+__/,
  3046. keyword: f,
  3047. built_in: [
  3048. "__import__",
  3049. "abs",
  3050. "all",
  3051. "any",
  3052. "ascii",
  3053. "bin",
  3054. "bool",
  3055. "breakpoint",
  3056. "bytearray",
  3057. "bytes",
  3058. "callable",
  3059. "chr",
  3060. "classmethod",
  3061. "compile",
  3062. "complex",
  3063. "delattr",
  3064. "dict",
  3065. "dir",
  3066. "divmod",
  3067. "enumerate",
  3068. "eval",
  3069. "exec",
  3070. "filter",
  3071. "float",
  3072. "format",
  3073. "frozenset",
  3074. "getattr",
  3075. "globals",
  3076. "hasattr",
  3077. "hash",
  3078. "help",
  3079. "hex",
  3080. "id",
  3081. "input",
  3082. "int",
  3083. "isinstance",
  3084. "issubclass",
  3085. "iter",
  3086. "len",
  3087. "list",
  3088. "locals",
  3089. "map",
  3090. "max",
  3091. "memoryview",
  3092. "min",
  3093. "next",
  3094. "object",
  3095. "oct",
  3096. "open",
  3097. "ord",
  3098. "pow",
  3099. "print",
  3100. "property",
  3101. "range",
  3102. "repr",
  3103. "reversed",
  3104. "round",
  3105. "set",
  3106. "setattr",
  3107. "slice",
  3108. "sorted",
  3109. "staticmethod",
  3110. "str",
  3111. "sum",
  3112. "super",
  3113. "tuple",
  3114. "type",
  3115. "vars",
  3116. "zip"
  3117. ],
  3118. literal: [
  3119. "__debug__",
  3120. "Ellipsis",
  3121. "False",
  3122. "None",
  3123. "NotImplemented",
  3124. "True"
  3125. ],
  3126. type: [
  3127. "Any",
  3128. "Callable",
  3129. "Coroutine",
  3130. "Dict",
  3131. "List",
  3132. "Literal",
  3133. "Generic",
  3134. "Optional",
  3135. "Sequence",
  3136. "Set",
  3137. "Tuple",
  3138. "Type",
  3139. "Union"
  3140. ]
  3141. }, s = {
  3142. className: "meta",
  3143. begin: /^(>>>|\.\.\.) /
  3144. }, a = {
  3145. className: "subst",
  3146. begin: /\{/,
  3147. end: /\}/,
  3148. keywords: i,
  3149. illegal: /#/
  3150. }, o = {
  3151. begin: /\{\{/,
  3152. relevance: 0
  3153. }, c = {
  3154. className: "string",
  3155. contains: [e.BACKSLASH_ESCAPE],
  3156. variants: [
  3157. {
  3158. begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
  3159. end: /'''/,
  3160. contains: [
  3161. e.BACKSLASH_ESCAPE,
  3162. s
  3163. ],
  3164. relevance: 10
  3165. },
  3166. {
  3167. begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
  3168. end: /"""/,
  3169. contains: [
  3170. e.BACKSLASH_ESCAPE,
  3171. s
  3172. ],
  3173. relevance: 10
  3174. },
  3175. {
  3176. begin: /([fF][rR]|[rR][fF]|[fF])'''/,
  3177. end: /'''/,
  3178. contains: [
  3179. e.BACKSLASH_ESCAPE,
  3180. s,
  3181. o,
  3182. a
  3183. ]
  3184. },
  3185. {
  3186. begin: /([fF][rR]|[rR][fF]|[fF])"""/,
  3187. end: /"""/,
  3188. contains: [
  3189. e.BACKSLASH_ESCAPE,
  3190. s,
  3191. o,
  3192. a
  3193. ]
  3194. },
  3195. {
  3196. begin: /([uU]|[rR])'/,
  3197. end: /'/,
  3198. relevance: 10
  3199. },
  3200. {
  3201. begin: /([uU]|[rR])"/,
  3202. end: /"/,
  3203. relevance: 10
  3204. },
  3205. {
  3206. begin: /([bB]|[bB][rR]|[rR][bB])'/,
  3207. end: /'/
  3208. },
  3209. {
  3210. begin: /([bB]|[bB][rR]|[rR][bB])"/,
  3211. end: /"/
  3212. },
  3213. {
  3214. begin: /([fF][rR]|[rR][fF]|[fF])'/,
  3215. end: /'/,
  3216. contains: [
  3217. e.BACKSLASH_ESCAPE,
  3218. o,
  3219. a
  3220. ]
  3221. },
  3222. {
  3223. begin: /([fF][rR]|[rR][fF]|[fF])"/,
  3224. end: /"/,
  3225. contains: [
  3226. e.BACKSLASH_ESCAPE,
  3227. o,
  3228. a
  3229. ]
  3230. },
  3231. e.APOS_STRING_MODE,
  3232. e.QUOTE_STRING_MODE
  3233. ]
  3234. }, u = "[0-9](_?[0-9])*", d = `(\\b(${u}))?\\.(${u})|\\b(${u})\\.`, h = `\\b|${f.join("|")}`, p = {
  3235. className: "number",
  3236. relevance: 0,
  3237. variants: [
  3238. // exponentfloat, pointfloat
  3239. // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
  3240. // optionally imaginary
  3241. // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
  3242. // Note: no leading \b because floats can start with a decimal point
  3243. // and we don't want to mishandle e.g. `fn(.5)`,
  3244. // no trailing \b for pointfloat because it can end with a decimal point
  3245. // and we don't want to mishandle e.g. `0..hex()`; this should be safe
  3246. // because both MUST contain a decimal point and so cannot be confused with
  3247. // the interior part of an identifier
  3248. {
  3249. begin: `(\\b(${u})|(${d}))[eE][+-]?(${u})[jJ]?(?=${h})`
  3250. },
  3251. {
  3252. begin: `(${d})[jJ]?`
  3253. },
  3254. // decinteger, bininteger, octinteger, hexinteger
  3255. // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
  3256. // optionally "long" in Python 2
  3257. // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
  3258. // decinteger is optionally imaginary
  3259. // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
  3260. {
  3261. begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`
  3262. },
  3263. {
  3264. begin: `\\b0[bB](_?[01])+[lL]?(?=${h})`
  3265. },
  3266. {
  3267. begin: `\\b0[oO](_?[0-7])+[lL]?(?=${h})`
  3268. },
  3269. {
  3270. begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`
  3271. },
  3272. // imagnumber (digitpart-based)
  3273. // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
  3274. {
  3275. begin: `\\b(${u})[jJ](?=${h})`
  3276. }
  3277. ]
  3278. }, _ = {
  3279. className: "comment",
  3280. begin: r.lookahead(/# type:/),
  3281. end: /$/,
  3282. keywords: i,
  3283. contains: [
  3284. {
  3285. // prevent keywords from coloring `type`
  3286. begin: /# type:/
  3287. },
  3288. // comment within a datatype comment includes no keywords
  3289. {
  3290. begin: /#/,
  3291. end: /\b\B/,
  3292. endsWithParent: !0
  3293. }
  3294. ]
  3295. }, E = {
  3296. className: "params",
  3297. variants: [
  3298. // Exclude params in functions without params
  3299. {
  3300. className: "",
  3301. begin: /\(\s*\)/,
  3302. skip: !0
  3303. },
  3304. {
  3305. begin: /\(/,
  3306. end: /\)/,
  3307. excludeBegin: !0,
  3308. excludeEnd: !0,
  3309. keywords: i,
  3310. contains: [
  3311. "self",
  3312. s,
  3313. p,
  3314. c,
  3315. e.HASH_COMMENT_MODE
  3316. ]
  3317. }
  3318. ]
  3319. };
  3320. return a.contains = [
  3321. c,
  3322. p,
  3323. s
  3324. ], {
  3325. name: "Python",
  3326. aliases: [
  3327. "py",
  3328. "gyp",
  3329. "ipython"
  3330. ],
  3331. unicodeRegex: !0,
  3332. keywords: i,
  3333. illegal: /(<\/|\?)|=>/,
  3334. contains: [
  3335. s,
  3336. p,
  3337. {
  3338. // very common convention
  3339. begin: /\bself\b/
  3340. },
  3341. {
  3342. // eat "if" prior to string so that it won't accidentally be
  3343. // labeled as an f-string
  3344. beginKeywords: "if",
  3345. relevance: 0
  3346. },
  3347. c,
  3348. _,
  3349. e.HASH_COMMENT_MODE,
  3350. {
  3351. match: [
  3352. /\bdef/,
  3353. /\s+/,
  3354. l
  3355. ],
  3356. scope: {
  3357. 1: "keyword",
  3358. 3: "title.function"
  3359. },
  3360. contains: [E]
  3361. },
  3362. {
  3363. variants: [
  3364. {
  3365. match: [
  3366. /\bclass/,
  3367. /\s+/,
  3368. l,
  3369. /\s*/,
  3370. /\(\s*/,
  3371. l,
  3372. /\s*\)/
  3373. ]
  3374. },
  3375. {
  3376. match: [
  3377. /\bclass/,
  3378. /\s+/,
  3379. l
  3380. ]
  3381. }
  3382. ],
  3383. scope: {
  3384. 1: "keyword",
  3385. 3: "title.class",
  3386. 6: "title.class.inherited"
  3387. }
  3388. },
  3389. {
  3390. className: "meta",
  3391. begin: /^[\t ]*@/,
  3392. end: /(?=#)|$/,
  3393. contains: [
  3394. p,
  3395. E,
  3396. c
  3397. ]
  3398. }
  3399. ]
  3400. };
  3401. }
  3402. var de = "[0-9](_*[0-9])*", Re = `\\.(${de})`, Oe = "[0-9a-fA-F](_*[0-9a-fA-F])*", dn = {
  3403. className: "number",
  3404. variants: [
  3405. // DecimalFloatingPointLiteral
  3406. // including ExponentPart
  3407. { begin: `(\\b(${de})((${Re})|\\.)?|(${Re}))[eE][+-]?(${de})[fFdD]?\\b` },
  3408. // excluding ExponentPart
  3409. { begin: `\\b(${de})((${Re})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
  3410. { begin: `(${Re})[fFdD]?\\b` },
  3411. { begin: `\\b(${de})[fFdD]\\b` },
  3412. // HexadecimalFloatingPointLiteral
  3413. { begin: `\\b0[xX]((${Oe})\\.?|(${Oe})?\\.(${Oe}))[pP][+-]?(${de})[fFdD]?\\b` },
  3414. // DecimalIntegerLiteral
  3415. { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
  3416. // HexIntegerLiteral
  3417. { begin: `\\b0[xX](${Oe})[lL]?\\b` },
  3418. // OctalIntegerLiteral
  3419. { begin: "\\b0(_*[0-7])*[lL]?\\b" },
  3420. // BinaryIntegerLiteral
  3421. { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
  3422. ],
  3423. relevance: 0
  3424. };
  3425. function kn(e, r, l) {
  3426. return l === -1 ? "" : e.replace(r, (f) => kn(e, r, l - 1));
  3427. }
  3428. function ar(e) {
  3429. const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", f = l + kn("(?:<" + l + "~~~(?:\\s*,\\s*" + l + "~~~)*>)?", /~~~/g, 2), s = {
  3430. keyword: [
  3431. "synchronized",
  3432. "abstract",
  3433. "private",
  3434. "var",
  3435. "static",
  3436. "if",
  3437. "const ",
  3438. "for",
  3439. "while",
  3440. "strictfp",
  3441. "finally",
  3442. "protected",
  3443. "import",
  3444. "native",
  3445. "final",
  3446. "void",
  3447. "enum",
  3448. "else",
  3449. "break",
  3450. "transient",
  3451. "catch",
  3452. "instanceof",
  3453. "volatile",
  3454. "case",
  3455. "assert",
  3456. "package",
  3457. "default",
  3458. "public",
  3459. "try",
  3460. "switch",
  3461. "continue",
  3462. "throws",
  3463. "protected",
  3464. "public",
  3465. "private",
  3466. "module",
  3467. "requires",
  3468. "exports",
  3469. "do",
  3470. "sealed",
  3471. "yield",
  3472. "permits"
  3473. ],
  3474. literal: [
  3475. "false",
  3476. "true",
  3477. "null"
  3478. ],
  3479. type: [
  3480. "char",
  3481. "boolean",
  3482. "long",
  3483. "float",
  3484. "int",
  3485. "byte",
  3486. "short",
  3487. "double"
  3488. ],
  3489. built_in: [
  3490. "super",
  3491. "this"
  3492. ]
  3493. }, a = {
  3494. className: "meta",
  3495. begin: "@" + l,
  3496. contains: [
  3497. {
  3498. begin: /\(/,
  3499. end: /\)/,
  3500. contains: ["self"]
  3501. // allow nested () inside our annotation
  3502. }
  3503. ]
  3504. }, o = {
  3505. className: "params",
  3506. begin: /\(/,
  3507. end: /\)/,
  3508. keywords: s,
  3509. relevance: 0,
  3510. contains: [e.C_BLOCK_COMMENT_MODE],
  3511. endsParent: !0
  3512. };
  3513. return {
  3514. name: "Java",
  3515. aliases: ["jsp"],
  3516. keywords: s,
  3517. illegal: /<\/|#/,
  3518. contains: [
  3519. e.COMMENT(
  3520. "/\\*\\*",
  3521. "\\*/",
  3522. {
  3523. relevance: 0,
  3524. contains: [
  3525. {
  3526. // eat up @'s in emails to prevent them to be recognized as doctags
  3527. begin: /\w+@/,
  3528. relevance: 0
  3529. },
  3530. {
  3531. className: "doctag",
  3532. begin: "@[A-Za-z]+"
  3533. }
  3534. ]
  3535. }
  3536. ),
  3537. // relevance boost
  3538. {
  3539. begin: /import java\.[a-z]+\./,
  3540. keywords: "import",
  3541. relevance: 2
  3542. },
  3543. e.C_LINE_COMMENT_MODE,
  3544. e.C_BLOCK_COMMENT_MODE,
  3545. {
  3546. begin: /"""/,
  3547. end: /"""/,
  3548. className: "string",
  3549. contains: [e.BACKSLASH_ESCAPE]
  3550. },
  3551. e.APOS_STRING_MODE,
  3552. e.QUOTE_STRING_MODE,
  3553. {
  3554. match: [
  3555. /\b(?:class|interface|enum|extends|implements|new)/,
  3556. /\s+/,
  3557. l
  3558. ],
  3559. className: {
  3560. 1: "keyword",
  3561. 3: "title.class"
  3562. }
  3563. },
  3564. {
  3565. // Exceptions for hyphenated keywords
  3566. match: /non-sealed/,
  3567. scope: "keyword"
  3568. },
  3569. {
  3570. begin: [
  3571. r.concat(/(?!else)/, l),
  3572. /\s+/,
  3573. l,
  3574. /\s+/,
  3575. /=(?!=)/
  3576. ],
  3577. className: {
  3578. 1: "type",
  3579. 3: "variable",
  3580. 5: "operator"
  3581. }
  3582. },
  3583. {
  3584. begin: [
  3585. /record/,
  3586. /\s+/,
  3587. l
  3588. ],
  3589. className: {
  3590. 1: "keyword",
  3591. 3: "title.class"
  3592. },
  3593. contains: [
  3594. o,
  3595. e.C_LINE_COMMENT_MODE,
  3596. e.C_BLOCK_COMMENT_MODE
  3597. ]
  3598. },
  3599. {
  3600. // Expression keywords prevent 'keyword Name(...)' from being
  3601. // recognized as a function definition
  3602. beginKeywords: "new throw return else",
  3603. relevance: 0
  3604. },
  3605. {
  3606. begin: [
  3607. "(?:" + f + "\\s+)",
  3608. e.UNDERSCORE_IDENT_RE,
  3609. /\s*(?=\()/
  3610. ],
  3611. className: { 2: "title.function" },
  3612. keywords: s,
  3613. contains: [
  3614. {
  3615. className: "params",
  3616. begin: /\(/,
  3617. end: /\)/,
  3618. keywords: s,
  3619. relevance: 0,
  3620. contains: [
  3621. a,
  3622. e.APOS_STRING_MODE,
  3623. e.QUOTE_STRING_MODE,
  3624. dn,
  3625. e.C_BLOCK_COMMENT_MODE
  3626. ]
  3627. },
  3628. e.C_LINE_COMMENT_MODE,
  3629. e.C_BLOCK_COMMENT_MODE
  3630. ]
  3631. },
  3632. dn,
  3633. a
  3634. ]
  3635. };
  3636. }
  3637. function or(e) {
  3638. const r = e.regex, l = {}, f = {
  3639. begin: /\$\{/,
  3640. end: /\}/,
  3641. contains: [
  3642. "self",
  3643. {
  3644. begin: /:-/,
  3645. contains: [l]
  3646. }
  3647. // default values
  3648. ]
  3649. };
  3650. Object.assign(l, {
  3651. className: "variable",
  3652. variants: [
  3653. { begin: r.concat(
  3654. /\$[\w\d#@][\w\d_]*/,
  3655. // negative look-ahead tries to avoid matching patterns that are not
  3656. // Perl at all like $ident$, @ident@, etc.
  3657. "(?![\\w\\d])(?![$])"
  3658. ) },
  3659. f
  3660. ]
  3661. });
  3662. const g = {
  3663. className: "subst",
  3664. begin: /\$\(/,
  3665. end: /\)/,
  3666. contains: [e.BACKSLASH_ESCAPE]
  3667. }, n = {
  3668. begin: /<<-?\s*(?=\w+)/,
  3669. starts: { contains: [
  3670. e.END_SAME_AS_BEGIN({
  3671. begin: /(\w+)/,
  3672. end: /(\w+)/,
  3673. className: "string"
  3674. })
  3675. ] }
  3676. }, t = {
  3677. className: "string",
  3678. begin: /"/,
  3679. end: /"/,
  3680. contains: [
  3681. e.BACKSLASH_ESCAPE,
  3682. l,
  3683. g
  3684. ]
  3685. };
  3686. g.contains.push(t);
  3687. const i = {
  3688. match: /\\"/
  3689. }, s = {
  3690. className: "string",
  3691. begin: /'/,
  3692. end: /'/
  3693. }, a = {
  3694. match: /\\'/
  3695. }, o = {
  3696. begin: /\$?\(\(/,
  3697. end: /\)\)/,
  3698. contains: [
  3699. {
  3700. begin: /\d+#[0-9a-f]+/,
  3701. className: "number"
  3702. },
  3703. e.NUMBER_MODE,
  3704. l
  3705. ]
  3706. }, c = [
  3707. "fish",
  3708. "bash",
  3709. "zsh",
  3710. "sh",
  3711. "csh",
  3712. "ksh",
  3713. "tcsh",
  3714. "dash",
  3715. "scsh"
  3716. ], u = e.SHEBANG({
  3717. binary: `(${c.join("|")})`,
  3718. relevance: 10
  3719. }), d = {
  3720. className: "function",
  3721. begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
  3722. returnBegin: !0,
  3723. contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
  3724. relevance: 0
  3725. }, h = [
  3726. "if",
  3727. "then",
  3728. "else",
  3729. "elif",
  3730. "fi",
  3731. "for",
  3732. "while",
  3733. "until",
  3734. "in",
  3735. "do",
  3736. "done",
  3737. "case",
  3738. "esac",
  3739. "function",
  3740. "select"
  3741. ], p = [
  3742. "true",
  3743. "false"
  3744. ], _ = { match: /(\/[a-z._-]+)+/ }, E = [
  3745. "break",
  3746. "cd",
  3747. "continue",
  3748. "eval",
  3749. "exec",
  3750. "exit",
  3751. "export",
  3752. "getopts",
  3753. "hash",
  3754. "pwd",
  3755. "readonly",
  3756. "return",
  3757. "shift",
  3758. "test",
  3759. "times",
  3760. "trap",
  3761. "umask",
  3762. "unset"
  3763. ], m = [
  3764. "alias",
  3765. "bind",
  3766. "builtin",
  3767. "caller",
  3768. "command",
  3769. "declare",
  3770. "echo",
  3771. "enable",
  3772. "help",
  3773. "let",
  3774. "local",
  3775. "logout",
  3776. "mapfile",
  3777. "printf",
  3778. "read",
  3779. "readarray",
  3780. "source",
  3781. "type",
  3782. "typeset",
  3783. "ulimit",
  3784. "unalias"
  3785. ], v = [
  3786. "autoload",
  3787. "bg",
  3788. "bindkey",
  3789. "bye",
  3790. "cap",
  3791. "chdir",
  3792. "clone",
  3793. "comparguments",
  3794. "compcall",
  3795. "compctl",
  3796. "compdescribe",
  3797. "compfiles",
  3798. "compgroups",
  3799. "compquote",
  3800. "comptags",
  3801. "comptry",
  3802. "compvalues",
  3803. "dirs",
  3804. "disable",
  3805. "disown",
  3806. "echotc",
  3807. "echoti",
  3808. "emulate",
  3809. "fc",
  3810. "fg",
  3811. "float",
  3812. "functions",
  3813. "getcap",
  3814. "getln",
  3815. "history",
  3816. "integer",
  3817. "jobs",
  3818. "kill",
  3819. "limit",
  3820. "log",
  3821. "noglob",
  3822. "popd",
  3823. "print",
  3824. "pushd",
  3825. "pushln",
  3826. "rehash",
  3827. "sched",
  3828. "setcap",
  3829. "setopt",
  3830. "stat",
  3831. "suspend",
  3832. "ttyctl",
  3833. "unfunction",
  3834. "unhash",
  3835. "unlimit",
  3836. "unsetopt",
  3837. "vared",
  3838. "wait",
  3839. "whence",
  3840. "where",
  3841. "which",
  3842. "zcompile",
  3843. "zformat",
  3844. "zftp",
  3845. "zle",
  3846. "zmodload",
  3847. "zparseopts",
  3848. "zprof",
  3849. "zpty",
  3850. "zregexparse",
  3851. "zsocket",
  3852. "zstyle",
  3853. "ztcp"
  3854. ], A = [
  3855. "chcon",
  3856. "chgrp",
  3857. "chown",
  3858. "chmod",
  3859. "cp",
  3860. "dd",
  3861. "df",
  3862. "dir",
  3863. "dircolors",
  3864. "ln",
  3865. "ls",
  3866. "mkdir",
  3867. "mkfifo",
  3868. "mknod",
  3869. "mktemp",
  3870. "mv",
  3871. "realpath",
  3872. "rm",
  3873. "rmdir",
  3874. "shred",
  3875. "sync",
  3876. "touch",
  3877. "truncate",
  3878. "vdir",
  3879. "b2sum",
  3880. "base32",
  3881. "base64",
  3882. "cat",
  3883. "cksum",
  3884. "comm",
  3885. "csplit",
  3886. "cut",
  3887. "expand",
  3888. "fmt",
  3889. "fold",
  3890. "head",
  3891. "join",
  3892. "md5sum",
  3893. "nl",
  3894. "numfmt",
  3895. "od",
  3896. "paste",
  3897. "ptx",
  3898. "pr",
  3899. "sha1sum",
  3900. "sha224sum",
  3901. "sha256sum",
  3902. "sha384sum",
  3903. "sha512sum",
  3904. "shuf",
  3905. "sort",
  3906. "split",
  3907. "sum",
  3908. "tac",
  3909. "tail",
  3910. "tr",
  3911. "tsort",
  3912. "unexpand",
  3913. "uniq",
  3914. "wc",
  3915. "arch",
  3916. "basename",
  3917. "chroot",
  3918. "date",
  3919. "dirname",
  3920. "du",
  3921. "echo",
  3922. "env",
  3923. "expr",
  3924. "factor",
  3925. // "false", // keyword literal already
  3926. "groups",
  3927. "hostid",
  3928. "id",
  3929. "link",
  3930. "logname",
  3931. "nice",
  3932. "nohup",
  3933. "nproc",
  3934. "pathchk",
  3935. "pinky",
  3936. "printenv",
  3937. "printf",
  3938. "pwd",
  3939. "readlink",
  3940. "runcon",
  3941. "seq",
  3942. "sleep",
  3943. "stat",
  3944. "stdbuf",
  3945. "stty",
  3946. "tee",
  3947. "test",
  3948. "timeout",
  3949. // "true", // keyword literal already
  3950. "tty",
  3951. "uname",
  3952. "unlink",
  3953. "uptime",
  3954. "users",
  3955. "who",
  3956. "whoami",
  3957. "yes"
  3958. ];
  3959. return {
  3960. name: "Bash",
  3961. aliases: ["sh"],
  3962. keywords: {
  3963. $pattern: /\b[a-z][a-z0-9._-]+\b/,
  3964. keyword: h,
  3965. literal: p,
  3966. built_in: [
  3967. ...E,
  3968. ...m,
  3969. // Shell modifiers
  3970. "set",
  3971. "shopt",
  3972. ...v,
  3973. ...A
  3974. ]
  3975. },
  3976. contains: [
  3977. u,
  3978. // to catch known shells and boost relevancy
  3979. e.SHEBANG(),
  3980. // to catch unknown shells but still highlight the shebang
  3981. d,
  3982. o,
  3983. e.HASH_COMMENT_MODE,
  3984. n,
  3985. _,
  3986. t,
  3987. i,
  3988. s,
  3989. a,
  3990. l
  3991. ]
  3992. };
  3993. }
  3994. function lr(e) {
  3995. const r = e.regex, l = e.COMMENT("--", "$"), f = {
  3996. className: "string",
  3997. variants: [
  3998. {
  3999. begin: /'/,
  4000. end: /'/,
  4001. contains: [{ begin: /''/ }]
  4002. }
  4003. ]
  4004. }, g = {
  4005. begin: /"/,
  4006. end: /"/,
  4007. contains: [{ begin: /""/ }]
  4008. }, n = [
  4009. "true",
  4010. "false",
  4011. // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
  4012. // "null",
  4013. "unknown"
  4014. ], t = [
  4015. "double precision",
  4016. "large object",
  4017. "with timezone",
  4018. "without timezone"
  4019. ], i = [
  4020. "bigint",
  4021. "binary",
  4022. "blob",
  4023. "boolean",
  4024. "char",
  4025. "character",
  4026. "clob",
  4027. "date",
  4028. "dec",
  4029. "decfloat",
  4030. "decimal",
  4031. "float",
  4032. "int",
  4033. "integer",
  4034. "interval",
  4035. "nchar",
  4036. "nclob",
  4037. "national",
  4038. "numeric",
  4039. "real",
  4040. "row",
  4041. "smallint",
  4042. "time",
  4043. "timestamp",
  4044. "varchar",
  4045. "varying",
  4046. // modifier (character varying)
  4047. "varbinary"
  4048. ], s = [
  4049. "add",
  4050. "asc",
  4051. "collation",
  4052. "desc",
  4053. "final",
  4054. "first",
  4055. "last",
  4056. "view"
  4057. ], a = [
  4058. "abs",
  4059. "acos",
  4060. "all",
  4061. "allocate",
  4062. "alter",
  4063. "and",
  4064. "any",
  4065. "are",
  4066. "array",
  4067. "array_agg",
  4068. "array_max_cardinality",
  4069. "as",
  4070. "asensitive",
  4071. "asin",
  4072. "asymmetric",
  4073. "at",
  4074. "atan",
  4075. "atomic",
  4076. "authorization",
  4077. "avg",
  4078. "begin",
  4079. "begin_frame",
  4080. "begin_partition",
  4081. "between",
  4082. "bigint",
  4083. "binary",
  4084. "blob",
  4085. "boolean",
  4086. "both",
  4087. "by",
  4088. "call",
  4089. "called",
  4090. "cardinality",
  4091. "cascaded",
  4092. "case",
  4093. "cast",
  4094. "ceil",
  4095. "ceiling",
  4096. "char",
  4097. "char_length",
  4098. "character",
  4099. "character_length",
  4100. "check",
  4101. "classifier",
  4102. "clob",
  4103. "close",
  4104. "coalesce",
  4105. "collate",
  4106. "collect",
  4107. "column",
  4108. "commit",
  4109. "condition",
  4110. "connect",
  4111. "constraint",
  4112. "contains",
  4113. "convert",
  4114. "copy",
  4115. "corr",
  4116. "corresponding",
  4117. "cos",
  4118. "cosh",
  4119. "count",
  4120. "covar_pop",
  4121. "covar_samp",
  4122. "create",
  4123. "cross",
  4124. "cube",
  4125. "cume_dist",
  4126. "current",
  4127. "current_catalog",
  4128. "current_date",
  4129. "current_default_transform_group",
  4130. "current_path",
  4131. "current_role",
  4132. "current_row",
  4133. "current_schema",
  4134. "current_time",
  4135. "current_timestamp",
  4136. "current_path",
  4137. "current_role",
  4138. "current_transform_group_for_type",
  4139. "current_user",
  4140. "cursor",
  4141. "cycle",
  4142. "date",
  4143. "day",
  4144. "deallocate",
  4145. "dec",
  4146. "decimal",
  4147. "decfloat",
  4148. "declare",
  4149. "default",
  4150. "define",
  4151. "delete",
  4152. "dense_rank",
  4153. "deref",
  4154. "describe",
  4155. "deterministic",
  4156. "disconnect",
  4157. "distinct",
  4158. "double",
  4159. "drop",
  4160. "dynamic",
  4161. "each",
  4162. "element",
  4163. "else",
  4164. "empty",
  4165. "end",
  4166. "end_frame",
  4167. "end_partition",
  4168. "end-exec",
  4169. "equals",
  4170. "escape",
  4171. "every",
  4172. "except",
  4173. "exec",
  4174. "execute",
  4175. "exists",
  4176. "exp",
  4177. "external",
  4178. "extract",
  4179. "false",
  4180. "fetch",
  4181. "filter",
  4182. "first_value",
  4183. "float",
  4184. "floor",
  4185. "for",
  4186. "foreign",
  4187. "frame_row",
  4188. "free",
  4189. "from",
  4190. "full",
  4191. "function",
  4192. "fusion",
  4193. "get",
  4194. "global",
  4195. "grant",
  4196. "group",
  4197. "grouping",
  4198. "groups",
  4199. "having",
  4200. "hold",
  4201. "hour",
  4202. "identity",
  4203. "in",
  4204. "indicator",
  4205. "initial",
  4206. "inner",
  4207. "inout",
  4208. "insensitive",
  4209. "insert",
  4210. "int",
  4211. "integer",
  4212. "intersect",
  4213. "intersection",
  4214. "interval",
  4215. "into",
  4216. "is",
  4217. "join",
  4218. "json_array",
  4219. "json_arrayagg",
  4220. "json_exists",
  4221. "json_object",
  4222. "json_objectagg",
  4223. "json_query",
  4224. "json_table",
  4225. "json_table_primitive",
  4226. "json_value",
  4227. "lag",
  4228. "language",
  4229. "large",
  4230. "last_value",
  4231. "lateral",
  4232. "lead",
  4233. "leading",
  4234. "left",
  4235. "like",
  4236. "like_regex",
  4237. "listagg",
  4238. "ln",
  4239. "local",
  4240. "localtime",
  4241. "localtimestamp",
  4242. "log",
  4243. "log10",
  4244. "lower",
  4245. "match",
  4246. "match_number",
  4247. "match_recognize",
  4248. "matches",
  4249. "max",
  4250. "member",
  4251. "merge",
  4252. "method",
  4253. "min",
  4254. "minute",
  4255. "mod",
  4256. "modifies",
  4257. "module",
  4258. "month",
  4259. "multiset",
  4260. "national",
  4261. "natural",
  4262. "nchar",
  4263. "nclob",
  4264. "new",
  4265. "no",
  4266. "none",
  4267. "normalize",
  4268. "not",
  4269. "nth_value",
  4270. "ntile",
  4271. "null",
  4272. "nullif",
  4273. "numeric",
  4274. "octet_length",
  4275. "occurrences_regex",
  4276. "of",
  4277. "offset",
  4278. "old",
  4279. "omit",
  4280. "on",
  4281. "one",
  4282. "only",
  4283. "open",
  4284. "or",
  4285. "order",
  4286. "out",
  4287. "outer",
  4288. "over",
  4289. "overlaps",
  4290. "overlay",
  4291. "parameter",
  4292. "partition",
  4293. "pattern",
  4294. "per",
  4295. "percent",
  4296. "percent_rank",
  4297. "percentile_cont",
  4298. "percentile_disc",
  4299. "period",
  4300. "portion",
  4301. "position",
  4302. "position_regex",
  4303. "power",
  4304. "precedes",
  4305. "precision",
  4306. "prepare",
  4307. "primary",
  4308. "procedure",
  4309. "ptf",
  4310. "range",
  4311. "rank",
  4312. "reads",
  4313. "real",
  4314. "recursive",
  4315. "ref",
  4316. "references",
  4317. "referencing",
  4318. "regr_avgx",
  4319. "regr_avgy",
  4320. "regr_count",
  4321. "regr_intercept",
  4322. "regr_r2",
  4323. "regr_slope",
  4324. "regr_sxx",
  4325. "regr_sxy",
  4326. "regr_syy",
  4327. "release",
  4328. "result",
  4329. "return",
  4330. "returns",
  4331. "revoke",
  4332. "right",
  4333. "rollback",
  4334. "rollup",
  4335. "row",
  4336. "row_number",
  4337. "rows",
  4338. "running",
  4339. "savepoint",
  4340. "scope",
  4341. "scroll",
  4342. "search",
  4343. "second",
  4344. "seek",
  4345. "select",
  4346. "sensitive",
  4347. "session_user",
  4348. "set",
  4349. "show",
  4350. "similar",
  4351. "sin",
  4352. "sinh",
  4353. "skip",
  4354. "smallint",
  4355. "some",
  4356. "specific",
  4357. "specifictype",
  4358. "sql",
  4359. "sqlexception",
  4360. "sqlstate",
  4361. "sqlwarning",
  4362. "sqrt",
  4363. "start",
  4364. "static",
  4365. "stddev_pop",
  4366. "stddev_samp",
  4367. "submultiset",
  4368. "subset",
  4369. "substring",
  4370. "substring_regex",
  4371. "succeeds",
  4372. "sum",
  4373. "symmetric",
  4374. "system",
  4375. "system_time",
  4376. "system_user",
  4377. "table",
  4378. "tablesample",
  4379. "tan",
  4380. "tanh",
  4381. "then",
  4382. "time",
  4383. "timestamp",
  4384. "timezone_hour",
  4385. "timezone_minute",
  4386. "to",
  4387. "trailing",
  4388. "translate",
  4389. "translate_regex",
  4390. "translation",
  4391. "treat",
  4392. "trigger",
  4393. "trim",
  4394. "trim_array",
  4395. "true",
  4396. "truncate",
  4397. "uescape",
  4398. "union",
  4399. "unique",
  4400. "unknown",
  4401. "unnest",
  4402. "update",
  4403. "upper",
  4404. "user",
  4405. "using",
  4406. "value",
  4407. "values",
  4408. "value_of",
  4409. "var_pop",
  4410. "var_samp",
  4411. "varbinary",
  4412. "varchar",
  4413. "varying",
  4414. "versioning",
  4415. "when",
  4416. "whenever",
  4417. "where",
  4418. "width_bucket",
  4419. "window",
  4420. "with",
  4421. "within",
  4422. "without",
  4423. "year"
  4424. ], o = [
  4425. "abs",
  4426. "acos",
  4427. "array_agg",
  4428. "asin",
  4429. "atan",
  4430. "avg",
  4431. "cast",
  4432. "ceil",
  4433. "ceiling",
  4434. "coalesce",
  4435. "corr",
  4436. "cos",
  4437. "cosh",
  4438. "count",
  4439. "covar_pop",
  4440. "covar_samp",
  4441. "cume_dist",
  4442. "dense_rank",
  4443. "deref",
  4444. "element",
  4445. "exp",
  4446. "extract",
  4447. "first_value",
  4448. "floor",
  4449. "json_array",
  4450. "json_arrayagg",
  4451. "json_exists",
  4452. "json_object",
  4453. "json_objectagg",
  4454. "json_query",
  4455. "json_table",
  4456. "json_table_primitive",
  4457. "json_value",
  4458. "lag",
  4459. "last_value",
  4460. "lead",
  4461. "listagg",
  4462. "ln",
  4463. "log",
  4464. "log10",
  4465. "lower",
  4466. "max",
  4467. "min",
  4468. "mod",
  4469. "nth_value",
  4470. "ntile",
  4471. "nullif",
  4472. "percent_rank",
  4473. "percentile_cont",
  4474. "percentile_disc",
  4475. "position",
  4476. "position_regex",
  4477. "power",
  4478. "rank",
  4479. "regr_avgx",
  4480. "regr_avgy",
  4481. "regr_count",
  4482. "regr_intercept",
  4483. "regr_r2",
  4484. "regr_slope",
  4485. "regr_sxx",
  4486. "regr_sxy",
  4487. "regr_syy",
  4488. "row_number",
  4489. "sin",
  4490. "sinh",
  4491. "sqrt",
  4492. "stddev_pop",
  4493. "stddev_samp",
  4494. "substring",
  4495. "substring_regex",
  4496. "sum",
  4497. "tan",
  4498. "tanh",
  4499. "translate",
  4500. "translate_regex",
  4501. "treat",
  4502. "trim",
  4503. "trim_array",
  4504. "unnest",
  4505. "upper",
  4506. "value_of",
  4507. "var_pop",
  4508. "var_samp",
  4509. "width_bucket"
  4510. ], c = [
  4511. "current_catalog",
  4512. "current_date",
  4513. "current_default_transform_group",
  4514. "current_path",
  4515. "current_role",
  4516. "current_schema",
  4517. "current_transform_group_for_type",
  4518. "current_user",
  4519. "session_user",
  4520. "system_time",
  4521. "system_user",
  4522. "current_time",
  4523. "localtime",
  4524. "current_timestamp",
  4525. "localtimestamp"
  4526. ], u = [
  4527. "create table",
  4528. "insert into",
  4529. "primary key",
  4530. "foreign key",
  4531. "not null",
  4532. "alter table",
  4533. "add constraint",
  4534. "grouping sets",
  4535. "on overflow",
  4536. "character set",
  4537. "respect nulls",
  4538. "ignore nulls",
  4539. "nulls first",
  4540. "nulls last",
  4541. "depth first",
  4542. "breadth first"
  4543. ], d = o, h = [
  4544. ...a,
  4545. ...s
  4546. ].filter((v) => !o.includes(v)), p = {
  4547. className: "variable",
  4548. begin: /@[a-z0-9][a-z0-9_]*/
  4549. }, _ = {
  4550. className: "operator",
  4551. begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
  4552. relevance: 0
  4553. }, E = {
  4554. begin: r.concat(/\b/, r.either(...d), /\s*\(/),
  4555. relevance: 0,
  4556. keywords: { built_in: d }
  4557. };
  4558. function m(v, {
  4559. exceptions: A,
  4560. when: D
  4561. } = {}) {
  4562. const S = D;
  4563. return A = A || [], v.map((M) => M.match(/\|\d+$/) || A.includes(M) ? M : S(M) ? `${M}|0` : M);
  4564. }
  4565. return {
  4566. name: "SQL",
  4567. case_insensitive: !0,
  4568. // does not include {} or HTML tags `</`
  4569. illegal: /[{}]|<\//,
  4570. keywords: {
  4571. $pattern: /\b[\w\.]+/,
  4572. keyword: m(h, { when: (v) => v.length < 3 }),
  4573. literal: n,
  4574. type: i,
  4575. built_in: c
  4576. },
  4577. contains: [
  4578. {
  4579. begin: r.either(...u),
  4580. relevance: 0,
  4581. keywords: {
  4582. $pattern: /[\w\.]+/,
  4583. keyword: h.concat(u),
  4584. literal: n,
  4585. type: i
  4586. }
  4587. },
  4588. {
  4589. className: "type",
  4590. begin: r.either(...t)
  4591. },
  4592. E,
  4593. p,
  4594. f,
  4595. g,
  4596. e.C_NUMBER_MODE,
  4597. e.C_BLOCK_COMMENT_MODE,
  4598. l,
  4599. _
  4600. ]
  4601. };
  4602. }
  4603. q.registerLanguage("xml", Vt);
  4604. q.registerLanguage("javascript", nr);
  4605. q.registerLanguage("json", tr);
  4606. q.registerLanguage("yaml", rr);
  4607. q.registerLanguage("plaintext", ir);
  4608. q.registerLanguage("python", sr);
  4609. q.registerLanguage("java", ar);
  4610. q.registerLanguage("bash", or);
  4611. q.registerLanguage("sql", lr);
  4612. var y = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(y || {});
  4613. const ie = "<code-diff-modified>", se = "</code-diff-modified>", cr = ie.replace("<", "&lt;").replace(">", "&gt;"), ur = se.replace("<", "&lt;").replace(">", "&gt;");
  4614. function be(e) {
  4615. return e === void 0 ? y.EQUAL : e.added ? y.ADD : e.removed ? y.DELETE : y.EQUAL;
  4616. }
  4617. function Be(e, r, l = "word") {
  4618. return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (l === "char" ? Vn : qn)(e, r).filter((g) => be(g) !== y.DELETE).map(
  4619. (g) => be(g) === y.ADD ? `${ie}${g.value}${se}` : g.value
  4620. ).join("");
  4621. }
  4622. function Bn(e, r) {
  4623. const l = new Fe.diff_match_patch(), f = l.diff_linesToChars_(e, r), g = f.chars1, n = f.chars2, t = f.lineArray, i = l.diff_main(g, n, !1);
  4624. return l.diff_charsToLines_(i, t), i.map((s) => {
  4625. const [a, o] = s;
  4626. return {
  4627. count: o.replace(/\n$/, "").split(`
  4628. `).length,
  4629. value: o,
  4630. removed: a === Fe.DIFF_DELETE,
  4631. added: a === Fe.DIFF_INSERT
  4632. };
  4633. });
  4634. }
  4635. function j(e, r) {
  4636. if (!r.match(new RegExp(`(${ie}|${se})`, "g")))
  4637. return q.highlight(r, { language: e }).value;
  4638. let f = r;
  4639. const g = r.replace(new RegExp(`(${ie}|${se})`, "g"), ""), n = document.createElement("div");
  4640. n.innerHTML = q.highlight(g, { language: e }).value;
  4641. let t = !1;
  4642. const i = (s) => {
  4643. s.childNodes.forEach((a) => {
  4644. if (a.nodeType === Node.ELEMENT_NODE && i(a), a.nodeType === Node.TEXT_NODE) {
  4645. if (!a.textContent)
  4646. return;
  4647. let o = a.textContent, c = "";
  4648. for (t && (c = c + ie); o.length; ) {
  4649. if (f.startsWith(ie)) {
  4650. f = f.slice(ie.length), c = c + ie, t = !0;
  4651. continue;
  4652. }
  4653. if (f.startsWith(se)) {
  4654. f = f.slice(se.length), c = c + se, t = !1;
  4655. continue;
  4656. }
  4657. const u = f.match(new RegExp(`(${ie}|${se})`)), d = u && u.index ? u.index : f.length, h = Math.min(d, o.length);
  4658. c = c + f.substring(0, h), f = f.slice(h), o = o.slice(h);
  4659. }
  4660. t && (c = c + se), a.textContent = c;
  4661. }
  4662. });
  4663. };
  4664. return i(n), n.innerHTML.replace(new RegExp(cr, "g"), '<span class="x">').replace(new RegExp(ur, "g"), "</span>");
  4665. }
  4666. function $n(e, r) {
  4667. const l = (s, a) => (s.match(new RegExp(a, "g")) || []).length, f = (s) => s.filter((a) => r == null ? void 0 : r.test(a)).length;
  4668. let g = 0, n = 0, t = 0, i = 0;
  4669. for (const s of e) {
  4670. if (s.added) {
  4671. const a = f(s.value.trim().split(`
  4672. `));
  4673. g += l(s.value.trim(), `
  4674. `) + 1 - a, t += a;
  4675. continue;
  4676. }
  4677. if (s.removed) {
  4678. const a = f(s.value.trim().split(`
  4679. `));
  4680. n += l(s.value.trim(), `
  4681. `) + 1 - a, i += a;
  4682. continue;
  4683. }
  4684. }
  4685. return {
  4686. additionsNum: g,
  4687. deletionsNum: n,
  4688. ignoreAdditionsNum: t,
  4689. ignoreDeletionsNum: i
  4690. };
  4691. }
  4692. function fr(e, r, l = "plaintext", f = "word", g = !1, n = 10, t) {
  4693. const i = () => ({ type: y.EMPTY }), s = (m, v, A) => ({ type: m, num: v, code: A }), a = Bn(e, r), o = t ? new RegExp(t) : void 0;
  4694. let c = 0, u = 0, d = !1;
  4695. const h = [], p = {
  4696. changes: h,
  4697. collector: [],
  4698. stat: $n(a, o)
  4699. };
  4700. for (let m = 0; m < a.length; m++) {
  4701. if (d) {
  4702. d = !1;
  4703. continue;
  4704. }
  4705. const [v, A] = [a[m], a[m + 1]], [D, S] = [be(v), be(A)], M = v.value.replace(/\n$/, "").split(`
  4706. `);
  4707. if (A === void 0) {
  4708. for (const L of M) {
  4709. let I = i(), P = i();
  4710. const $ = j(l, L);
  4711. D === y.EQUAL && (c++, u++, I = s(y.EQUAL, c, $), P = s(y.EQUAL, u, $)), D === y.DELETE && (c++, I = s(y.DELETE, c, $), P = i()), D === y.ADD && (u++, I = i(), P = s(y.ADD, u, $)), h.push({ left: I, right: P });
  4712. }
  4713. break;
  4714. }
  4715. if (D === y.EQUAL)
  4716. for (const L of M) {
  4717. c++, u++;
  4718. const I = j(l, L);
  4719. h.push({
  4720. left: s(y.EQUAL, c, I),
  4721. right: s(y.EQUAL, u, I)
  4722. });
  4723. }
  4724. const R = A.value.replace(/\n$/, "").split(`
  4725. `);
  4726. if (D === y.DELETE) {
  4727. if (S === y.EQUAL)
  4728. for (const L of M)
  4729. c++, h.push({
  4730. left: s(y.DELETE, c, j(l, L)),
  4731. right: i()
  4732. });
  4733. if (S === y.ADD) {
  4734. d = !0;
  4735. const L = Math.max(v.count, A.count);
  4736. for (let I = 0; I < L; I++) {
  4737. I < v.count && c++, I < A.count && u++;
  4738. const [P, $] = [M[I], R[I]], K = g || M.length === R.length, Y = K ? Be($, P, f) : P, oe = K ? Be(P, $, f) : $, ge = o != null && o.test(P) ? y.EQUAL : y.DELETE, b = o != null && o.test($) ? y.EQUAL : y.ADD, N = I < v.count ? s(ge, c, j(l, Y)) : i(), O = I < A.count ? s(b, u, j(l, oe)) : i();
  4739. h.push({ left: N, right: O });
  4740. }
  4741. }
  4742. }
  4743. if (D === y.ADD)
  4744. for (const L of M)
  4745. u++, h.push({
  4746. left: i(),
  4747. right: s(y.ADD, u, j(l, L))
  4748. });
  4749. }
  4750. if (e === r) {
  4751. for (let m = 0; m < h.length; m++)
  4752. h[m].fold = !1;
  4753. return p;
  4754. }
  4755. for (let m = 0; m < h.length; m++) {
  4756. const v = h[m];
  4757. if (v.left.type === y.DELETE || v.right.type === y.ADD) {
  4758. const [A, D] = [Math.max(m - n, 0), Math.min(m + n + 1, h.length)];
  4759. for (let S = A; S < D; S++)
  4760. h[S].fold = !1;
  4761. }
  4762. v.fold === void 0 && (v.fold = !0);
  4763. }
  4764. const _ = [];
  4765. let E = [];
  4766. for (let m = 0; m < h.length; m++) {
  4767. const v = h[m];
  4768. if (v.fold === !1) {
  4769. E.length && (E[0].hideIndex = p.collector.length, p.collector.push({
  4770. lines: E,
  4771. fold: !0
  4772. }), E = []), _.push(v);
  4773. continue;
  4774. }
  4775. v.hide = !0, E.push(v), _.push(v);
  4776. }
  4777. return E.length && (E[0].hideIndex = p.collector.length, p.collector.push({
  4778. lines: E,
  4779. fold: !0
  4780. }), E = []), p.changes = _, p;
  4781. }
  4782. function gr(e, r, l = "plaintext", f = "word", g = !1, n = 10, t) {
  4783. const i = Bn(e, r), s = t ? new RegExp(t) : void 0;
  4784. let a = 0, o = 0, c = !1;
  4785. const u = [], d = {
  4786. changes: u,
  4787. collector: [],
  4788. stat: $n(i, s)
  4789. };
  4790. for (let _ = 0; _ < i.length; _++) {
  4791. if (c) {
  4792. c = !1;
  4793. continue;
  4794. }
  4795. const [E, m] = [i[_], i[_ + 1]], [v, A] = [be(E), be(m)], D = E.value.replace(/\n$/, "").split(`
  4796. `);
  4797. if (m === void 0) {
  4798. for (const M of D) {
  4799. v === y.EQUAL && (a++, o++), v === y.DELETE && a++, v === y.ADD && o++;
  4800. const R = j(l, M);
  4801. u.push({
  4802. type: v,
  4803. code: R,
  4804. addNum: v === y.DELETE ? void 0 : o,
  4805. delNum: v === y.ADD ? void 0 : a
  4806. });
  4807. }
  4808. break;
  4809. }
  4810. if (v === y.EQUAL)
  4811. for (const M of D) {
  4812. a++, o++;
  4813. const R = j(l, M);
  4814. u.push({ type: y.EQUAL, code: R, delNum: a, addNum: o });
  4815. }
  4816. const S = m.value.replace(/\n$/, "").split(`
  4817. `);
  4818. if (v === y.DELETE)
  4819. if (A === y.ADD && (D.length === S.length || g)) {
  4820. for (let M = 0; M < D.length; M++) {
  4821. const R = D[M], L = S[M];
  4822. a++;
  4823. const I = j(l, Be(L, R, f));
  4824. u.push({
  4825. type: s != null && s.test(R) ? y.EQUAL : y.DELETE,
  4826. code: I,
  4827. delNum: a
  4828. });
  4829. }
  4830. for (let M = 0; M < S.length; M++) {
  4831. const R = D[M], L = S[M];
  4832. o++;
  4833. const I = j(l, Be(R, L, f));
  4834. u.push({
  4835. type: s != null && s.test(L) ? y.EQUAL : y.ADD,
  4836. code: I,
  4837. addNum: o
  4838. });
  4839. }
  4840. c = !0;
  4841. } else
  4842. for (const M of D) {
  4843. a++;
  4844. const R = j(l, M);
  4845. u.push({ type: y.DELETE, code: R, delNum: a });
  4846. }
  4847. if (v === y.ADD)
  4848. for (const M of D) {
  4849. o++;
  4850. const R = j(l, M);
  4851. u.push({ type: y.ADD, code: R, addNum: o });
  4852. }
  4853. }
  4854. for (let _ = 0; _ < u.length; _++) {
  4855. const E = u[_];
  4856. if (E.type === y.DELETE || E.type === y.ADD) {
  4857. const [m, v] = [Math.max(_ - n, 0), Math.min(_ + n + 1, u.length)];
  4858. for (let A = m; A < v; A++)
  4859. u[A].fold = !1;
  4860. }
  4861. E.fold === void 0 && (E.fold = !0);
  4862. }
  4863. if (e === r) {
  4864. for (let _ = 0; _ < u.length; _++)
  4865. u[_].fold = !1;
  4866. return d;
  4867. }
  4868. const h = [];
  4869. let p = [];
  4870. for (let _ = 0; _ < u.length; _++) {
  4871. const E = u[_];
  4872. if (E.fold === !1) {
  4873. p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
  4874. lines: p,
  4875. fold: !0
  4876. }), p = []), h.push(E);
  4877. continue;
  4878. }
  4879. E.type === "equal" && (E.hide = !0, p.push(E)), h.push(E);
  4880. }
  4881. return p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
  4882. lines: p,
  4883. fold: !0
  4884. }), p = []), d.changes = h, d;
  4885. }
  4886. const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
  4887. class: "blob-code blob-code-hunk",
  4888. align: "left"
  4889. }, " ⋯ ", -1), pr = { key: 1 }, _r = ["data-code-marker", "innerHTML"], br = /* @__PURE__ */ Ae({
  4890. __name: "UnifiedLine",
  4891. props: {
  4892. line: {}
  4893. },
  4894. emits: ["expand"],
  4895. setup(e, { emit: r }) {
  4896. const l = r;
  4897. function f(g) {
  4898. return g === y.DELETE ? "-" : g === y.ADD ? "+" : "";
  4899. }
  4900. return (g, n) => g.line.hideIndex !== void 0 && g.line.hide ? (G(), W("tr", hr, [
  4901. B("td", {
  4902. class: "blob-num blob-num-hunk text-center",
  4903. colspan: "2",
  4904. onClick: n[0] || (n[0] = (t) => l("expand", g.line))
  4905. }, " > "),
  4906. dr
  4907. ])) : g.line.hide ? ve("", !0) : (G(), W("tr", pr, [
  4908. B("td", {
  4909. class: me(["blob-num", {
  4910. "blob-num-deletion": g.line.type === F(y).DELETE,
  4911. "blob-num-addition": g.line.type === F(y).ADD,
  4912. "blob-num-context": g.line.type === F(y).EQUAL,
  4913. "blob-num-hunk": g.line.hide !== void 0
  4914. }])
  4915. }, ee(g.line.delNum), 3),
  4916. B("td", {
  4917. class: me(["blob-num", {
  4918. "blob-num-deletion": g.line.type === F(y).DELETE,
  4919. "blob-num-addition": g.line.type === F(y).ADD,
  4920. "blob-num-context": g.line.type === F(y).EQUAL,
  4921. "blob-num-hunk": g.line.hide !== void 0
  4922. }])
  4923. }, ee(g.line.addNum), 3),
  4924. B("td", {
  4925. class: me(["blob-code", {
  4926. "blob-code-deletion": g.line.type === F(y).DELETE,
  4927. "blob-code-addition": g.line.type === F(y).ADD,
  4928. "blob-code-context": g.line.type === F(y).EQUAL,
  4929. "blob-code-hunk": g.line.hide !== void 0
  4930. }])
  4931. }, [
  4932. B("span", {
  4933. class: "blob-code-inner blob-code-marker",
  4934. "data-code-marker": f(g.line.type),
  4935. innerHTML: g.line.code
  4936. }, null, 8, _r)
  4937. ], 2)
  4938. ]));
  4939. }
  4940. }), Er = { class: "diff-table" }, mr = /* @__PURE__ */ Ae({
  4941. __name: "UnifiedViewer",
  4942. props: {
  4943. diffChange: {}
  4944. },
  4945. setup(e) {
  4946. const r = e;
  4947. function l({ hideIndex: f }) {
  4948. f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
  4949. g.hide = !1, g.fold = !1;
  4950. });
  4951. }
  4952. return (f, g) => {
  4953. var n;
  4954. return G(), W("table", Er, [
  4955. B("tbody", null, [
  4956. (G(!0), W(pe, null, Ke((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (G(), Ie(br, {
  4957. key: i,
  4958. line: t,
  4959. onExpand: l
  4960. }, null, 8, ["line"]))), 128))
  4961. ])
  4962. ]);
  4963. };
  4964. }
  4965. }), vr = { key: 0 }, wr = /* @__PURE__ */ B("td", {
  4966. class: "blob-code blob-code-inner blob-code-hunk",
  4967. colspan: "3",
  4968. align: "left"
  4969. }, " ⋯ ", -1), yr = { key: 1 }, Nr = /* @__PURE__ */ B("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1), Ar = /* @__PURE__ */ B("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1), Mr = ["onMousedown"], Tr = ["data-code-marker", "innerHTML"], Sr = /* @__PURE__ */ Ae({
  4970. __name: "SplitLine",
  4971. props: {
  4972. splitLine: {}
  4973. },
  4974. emits: ["expand"],
  4975. setup(e, { emit: r }) {
  4976. const l = r;
  4977. function f(n) {
  4978. return n === y.DELETE ? "-" : n === y.ADD ? "+" : "";
  4979. }
  4980. function g(n) {
  4981. window.getSelection().removeAllRanges();
  4982. const t = document.querySelectorAll(".file-diff-split .split-side-left"), i = document.querySelectorAll(".file-diff-split .split-side-right");
  4983. for (const s of i)
  4984. s.classList.toggle("no-select", n === "left");
  4985. for (const s of t)
  4986. s.classList.toggle("no-select", n === "right");
  4987. }
  4988. return (n, t) => n.splitLine.hideIndex !== void 0 && n.splitLine.hide ? (G(), W("tr", vr, [
  4989. B("td", {
  4990. class: "blob-num blob-num-hunk",
  4991. colspan: "1",
  4992. onClick: t[0] || (t[0] = (i) => l("expand", n.splitLine))
  4993. }, " > "),
  4994. wr
  4995. ])) : n.splitLine.hide ? ve("", !0) : (G(), W("tr", yr, [
  4996. (G(!0), W(pe, null, Ke([n.splitLine.left, n.splitLine.right], (i, s) => (G(), W(pe, null, [
  4997. i.type === F(y).EMPTY ? (G(), W(pe, { key: 0 }, [
  4998. Nr,
  4999. Ar
  5000. ], 64)) : (G(), W(pe, { key: 1 }, [
  5001. B("td", {
  5002. class: me(["blob-num", {
  5003. "blob-num-deletion": i.type === F(y).DELETE,
  5004. "blob-num-addition": i.type === F(y).ADD,
  5005. "blob-num-context": i.type === F(y).EQUAL,
  5006. "blob-num-hunk": n.splitLine.hide !== void 0
  5007. }])
  5008. }, ee(i.num), 3),
  5009. B("td", {
  5010. class: me(["blob-code", {
  5011. "blob-code-deletion": i.type === F(y).DELETE,
  5012. "blob-code-addition": i.type === F(y).ADD,
  5013. "blob-code-context": i.type === F(y).EQUAL,
  5014. "blob-code-hunk": n.splitLine.hide !== void 0,
  5015. "split-side-left": s === 0,
  5016. "split-side-right": s === 1
  5017. }]),
  5018. onMousedown: (a) => g(s === 0 ? "left" : "right")
  5019. }, [
  5020. B("span", {
  5021. class: "blob-code-inner blob-code-marker",
  5022. "data-code-marker": f(i.type),
  5023. innerHTML: i.code
  5024. }, null, 8, Tr)
  5025. ], 42, Mr)
  5026. ], 64))
  5027. ], 64))), 256))
  5028. ]));
  5029. }
  5030. }), Dr = { class: "file-diff-split diff-table" }, Lr = /* @__PURE__ */ B("colgroup", null, [
  5031. /* @__PURE__ */ B("col", { width: "44" }),
  5032. /* @__PURE__ */ B("col"),
  5033. /* @__PURE__ */ B("col", { width: "44" }),
  5034. /* @__PURE__ */ B("col")
  5035. ], -1), Rr = /* @__PURE__ */ Ae({
  5036. __name: "SplitViewer",
  5037. props: {
  5038. diffChange: {}
  5039. },
  5040. setup(e) {
  5041. const r = e;
  5042. function l({ hideIndex: f }) {
  5043. f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
  5044. g.hide = !1, g.fold = !1;
  5045. });
  5046. }
  5047. return (f, g) => {
  5048. var n;
  5049. return G(), W("table", Dr, [
  5050. Lr,
  5051. B("tbody", null, [
  5052. (G(!0), W(pe, null, Ke((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (G(), Ie(Sr, {
  5053. key: i,
  5054. "split-line": t,
  5055. onExpand: l
  5056. }, null, 8, ["split-line"]))), 128))
  5057. ])
  5058. ]);
  5059. };
  5060. }
  5061. }), Pn = (e, r) => {
  5062. const l = e.__vccOpts || e;
  5063. for (const [f, g] of r)
  5064. l[f] = g;
  5065. return l;
  5066. }, Or = {
  5067. name: "DownArrowIcon"
  5068. }, Cr = {
  5069. width: "1rem",
  5070. viewBox: "0 0 512 512",
  5071. xmlns: "http://www.w3.org/2000/svg"
  5072. }, Ir = /* @__PURE__ */ B("path", { d: "M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z" }, null, -1), kr = [
  5073. Ir
  5074. ];
  5075. function Br(e, r, l, f, g, n) {
  5076. return G(), W("svg", Cr, kr);
  5077. }
  5078. const pn = /* @__PURE__ */ Pn(Or, [["render", Br]]), $r = {
  5079. name: "UpArrowIcon"
  5080. }, Pr = {
  5081. width: "1rem",
  5082. viewBox: "0 0 512 512",
  5083. xmlns: "http://www.w3.org/2000/svg"
  5084. }, Ur = /* @__PURE__ */ B("path", { d: "M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z" }, null, -1), Hr = [
  5085. Ur
  5086. ];
  5087. function Fr(e, r, l, f, g, n) {
  5088. return G(), W("svg", Pr, Hr);
  5089. }
  5090. const _n = /* @__PURE__ */ Pn($r, [["render", Fr]]);
  5091. const zr = ["theme"], xr = {
  5092. key: 0,
  5093. class: "file-header"
  5094. }, Gr = {
  5095. key: 0,
  5096. class: "file-info"
  5097. }, Kr = { class: "info-left" }, Wr = { class: "info-left" }, Qr = { class: "diff-commandbar" }, Zr = {
  5098. key: 0,
  5099. class: "diff-stat"
  5100. }, Yr = { class: "diff-stat-added" }, Xr = { class: "diff-stat-deleted" }, Vr = {
  5101. key: 1,
  5102. class: "file-info"
  5103. }, jr = { class: "info-left" }, qr = { class: "info-right" }, Jr = { style: { "margin-left": "20px" } }, ei = { class: "diff-commandbar" }, ni = {
  5104. key: 0,
  5105. class: "diff-stat"
  5106. }, ti = { class: "diff-stat-added" }, ri = { class: "diff-stat-deleted" }, ii = /* @__PURE__ */ Ae({
  5107. __name: "CodeDiff",
  5108. props: {
  5109. newString: {},
  5110. oldString: {},
  5111. language: { default: "plaintext" },
  5112. context: { default: 10 },
  5113. diffStyle: { default: "word" },
  5114. forceInlineComparison: { type: Boolean, default: !1 },
  5115. outputFormat: { default: "line-by-line" },
  5116. trim: { type: Boolean, default: !1 },
  5117. noDiffLineFeed: { type: Boolean, default: !1 },
  5118. maxHeight: { default: void 0 },
  5119. filename: { default: void 0 },
  5120. newFilename: { default: void 0 },
  5121. hideHeader: { type: Boolean, default: !1 },
  5122. hideStat: { type: Boolean, default: !1 },
  5123. theme: { default: "light" },
  5124. ignoreMatchingLines: { default: void 0 }
  5125. },
  5126. emits: ["diff"],
  5127. setup(e, { emit: r }) {
  5128. const l = e, f = r, g = Ee(() => l.outputFormat === "line-by-line"), n = Ee(() => {
  5129. let h = l.oldString || "";
  5130. return h = l.trim ? h.trim() : h, h = l.noDiffLineFeed ? h.replace(/(\r\n)/g, `
  5131. `) : h, h;
  5132. }), t = Ee(() => {
  5133. let h = l.newString || "";
  5134. return h = l.trim ? h.trim() : h, h = l.noDiffLineFeed ? h.replace(/(\r\n)/g, `
  5135. `) : h, h;
  5136. }), i = Ee(
  5137. () => g.value ? gr(n.value, t.value, l.language, l.diffStyle, l.forceInlineComparison, l.context, l.ignoreMatchingLines) : fr(n.value, t.value, l.language, l.diffStyle, l.forceInlineComparison, l.context, l.ignoreMatchingLines)
  5138. ), s = nn(i.value), a = Ee(() => s.value.stat.additionsNum === 0 && s.value.stat.deletionsNum === 0), o = nn(-1);
  5139. function c() {
  5140. const h = document.querySelectorAll(".blob-code-addition");
  5141. o.value < h.length - 1 && (o.value++, d(h));
  5142. }
  5143. function u() {
  5144. const h = document.querySelectorAll(".blob-code-addition");
  5145. o.value > 0 && (o.value--, d(h));
  5146. }
  5147. function d(h) {
  5148. h.forEach((_) => _.classList.remove("current-diff"));
  5149. const p = h[o.value];
  5150. p && (p.classList.add("current-diff"), p.scrollIntoView({ behavior: "smooth", block: "center" }));
  5151. }
  5152. return Wn(() => l, () => {
  5153. s.value = i.value, f("diff", {
  5154. stat: {
  5155. isChanged: !a.value,
  5156. addNum: s.value.stat.additionsNum,
  5157. delNum: s.value.stat.deletionsNum
  5158. }
  5159. });
  5160. }, { deep: !0, immediate: !0 }), (h, p) => (G(), W("div", {
  5161. class: "code-diff-view",
  5162. theme: h.theme,
  5163. style: Qn({ maxHeight: h.maxHeight })
  5164. }, [
  5165. h.hideHeader ? ve("", !0) : (G(), W("div", xr, [
  5166. F(g) ? (G(), W("div", Gr, [
  5167. B("span", null, [
  5168. B("div", Kr, ee(h.filename), 1),
  5169. B("div", Wr, ee(h.newFilename), 1)
  5170. ]),
  5171. B("span", Qr, [
  5172. B("button", {
  5173. class: "command-item-button",
  5174. title: "Next Change",
  5175. onClick: c
  5176. }, [
  5177. De(pn)
  5178. ]),
  5179. B("button", {
  5180. class: "command-item-button",
  5181. title: "Previous Change",
  5182. onClick: u
  5183. }, [
  5184. De(_n)
  5185. ])
  5186. ]),
  5187. h.hideStat ? ve("", !0) : (G(), W("span", Zr, [
  5188. tn(h.$slots, "stat", {
  5189. stat: F(s).stat
  5190. }, () => [
  5191. B("span", Yr, "+" + ee(F(s).stat.additionsNum) + " additions", 1),
  5192. B("span", Xr, "-" + ee(F(s).stat.deletionsNum) + " deletions", 1)
  5193. ])
  5194. ]))
  5195. ])) : (G(), W("div", Vr, [
  5196. B("span", jr, ee(h.filename), 1),
  5197. B("span", qr, [
  5198. B("span", Jr, ee(h.newFilename), 1),
  5199. B("span", ei, [
  5200. B("button", {
  5201. class: "command-item-button",
  5202. title: "Next Change",
  5203. onClick: c
  5204. }, [
  5205. De(pn)
  5206. ]),
  5207. B("button", {
  5208. class: "command-item-button",
  5209. title: "Previous Change",
  5210. onClick: u
  5211. }, [
  5212. De(_n)
  5213. ])
  5214. ]),
  5215. h.hideStat ? ve("", !0) : (G(), W("span", ni, [
  5216. tn(h.$slots, "stat", {
  5217. stat: F(s).stat
  5218. }, () => [
  5219. B("span", ti, "+" + ee(F(s).stat.additionsNum) + " additions", 1),
  5220. B("span", ri, "-" + ee(F(s).stat.deletionsNum) + " deletions", 1)
  5221. ])
  5222. ]))
  5223. ])
  5224. ]))
  5225. ])),
  5226. F(g) ? (G(), Ie(mr, {
  5227. key: 1,
  5228. "diff-change": F(s)
  5229. }, null, 8, ["diff-change"])) : (G(), Ie(Rr, {
  5230. key: 2,
  5231. "diff-change": F(s)
  5232. }, null, 8, ["diff-change"]))
  5233. ], 12, zr));
  5234. }
  5235. });
  5236. function si(e) {
  5237. e.component("CodeDiff", ii);
  5238. }
  5239. const oi = {
  5240. install: si,
  5241. hljs: q
  5242. };
  5243. export {
  5244. ii as CodeDiff,
  5245. oi as default,
  5246. q as hljs
  5247. };