12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378 |
- import "./chunk-MKUMB4YM.js";
- import "./chunk-S6VK5PVK.js";
- import {
- Fragment,
- computed,
- createBaseVNode,
- createBlock,
- createCommentVNode,
- createElementBlock,
- createVNode,
- defineComponent,
- openBlock,
- ref,
- renderList,
- renderSlot,
- unref,
- watch
- } from "./chunk-YVHZHMSQ.js";
- import {
- normalizeClass,
- normalizeStyle,
- toDisplayString
- } from "./chunk-VNBICN6T.js";
- import "./chunk-2LSFTFF7.js";
- // node_modules/.pnpm/v-code-diff@1.12.0_vue@3.4.27/node_modules/v-code-diff/dist/index.es.js
- (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);
- }
- })();
- function ae() {
- }
- ae.prototype = {
- diff: function(r, l) {
- var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, g = f.callback;
- typeof f == "function" && (g = f, f = {}), this.options = f;
- var n = this;
- function t(p) {
- return g ? (setTimeout(function() {
- g(void 0, p);
- }, 0), true) : p;
- }
- r = this.castInput(r), l = this.castInput(l), r = this.removeEmpty(this.tokenize(r)), l = this.removeEmpty(this.tokenize(l));
- var i = l.length, s = r.length, a = 1, o = i + s;
- f.maxEditLength && (o = Math.min(o, f.maxEditLength));
- var c = [{
- newPos: -1,
- components: []
- }], u = this.extractCommon(c[0], l, r, 0);
- if (c[0].newPos + 1 >= i && u + 1 >= s)
- return t([{
- value: this.join(l),
- count: l.length
- }]);
- function d() {
- for (var p = -1 * a; p <= a; p += 2) {
- var _ = void 0, E = c[p - 1], m = c[p + 1], v = (m ? m.newPos : 0) - p;
- E && (c[p - 1] = void 0);
- var A = E && E.newPos + 1 < i, D = m && 0 <= v && v < s;
- if (!A && !D) {
- c[p] = void 0;
- continue;
- }
- if (!A || D && E.newPos < m.newPos ? (_ = Yn(m), n.pushComponent(_.components, void 0, true)) : (_ = E, _.newPos++, n.pushComponent(_.components, true, void 0)), v = n.extractCommon(_, l, r, p), _.newPos + 1 >= i && v + 1 >= s)
- return t(Zn(n, _.components, l, r, n.useLongestToken));
- c[p] = _;
- }
- a++;
- }
- if (g)
- (function p() {
- setTimeout(function() {
- if (a > o)
- return g();
- d() || p();
- }, 0);
- })();
- else
- for (; a <= o; ) {
- var h = d();
- if (h)
- return h;
- }
- },
- pushComponent: function(r, l, f) {
- var g = r[r.length - 1];
- g && g.added === l && g.removed === f ? r[r.length - 1] = {
- count: g.count + 1,
- added: l,
- removed: f
- } : r.push({
- count: 1,
- added: l,
- removed: f
- });
- },
- extractCommon: function(r, l, f, g) {
- 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]); )
- i++, s++, a++;
- return a && r.components.push({
- count: a
- }), r.newPos = i, s;
- },
- equals: function(r, l) {
- return this.options.comparator ? this.options.comparator(r, l) : r === l || this.options.ignoreCase && r.toLowerCase() === l.toLowerCase();
- },
- removeEmpty: function(r) {
- for (var l = [], f = 0; f < r.length; f++)
- r[f] && l.push(r[f]);
- return l;
- },
- castInput: function(r) {
- return r;
- },
- tokenize: function(r) {
- return r.split("");
- },
- join: function(r) {
- return r.join("");
- }
- };
- function Zn(e, r, l, f, g) {
- for (var n = 0, t = r.length, i = 0, s = 0; n < t; n++) {
- var a = r[n];
- if (a.removed) {
- if (a.value = e.join(f.slice(s, s + a.count)), s += a.count, n && r[n - 1].added) {
- var c = r[n - 1];
- r[n - 1] = r[n], r[n] = c;
- }
- } else {
- if (!a.added && g) {
- var o = l.slice(i, i + a.count);
- o = o.map(function(d, h) {
- var p = f[s + h];
- return p.length > d.length ? p : d;
- }), a.value = e.join(o);
- } else
- a.value = e.join(l.slice(i, i + a.count));
- i += a.count, a.added || (s += a.count);
- }
- }
- var u = r[t - 1];
- return t > 1 && typeof u.value == "string" && (u.added || u.removed) && e.equals("", u.value) && (r[t - 2].value += u.value, r.pop()), r;
- }
- function Yn(e) {
- return {
- newPos: e.newPos,
- components: e.components.slice(0)
- };
- }
- var Xn = new ae();
- function Vn(e, r, l) {
- return Xn.diff(e, r, l);
- }
- function jn(e, r) {
- if (typeof e == "function")
- r.callback = e;
- else if (e)
- for (var l in e)
- e.hasOwnProperty(l) && (r[l] = e[l]);
- return r;
- }
- var rn = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
- var sn = /\S/;
- var We = new ae();
- We.equals = function(e, r) {
- return this.options.ignoreCase && (e = e.toLowerCase(), r = r.toLowerCase()), e === r || this.options.ignoreWhitespace && !sn.test(e) && !sn.test(r);
- };
- We.tokenize = function(e) {
- for (var r = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), l = 0; l < r.length - 1; l++)
- !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--);
- return r;
- };
- function qn(e, r, l) {
- return l = jn(l, {
- ignoreWhitespace: true
- }), We.diff(e, r, l);
- }
- var bn = new ae();
- bn.tokenize = function(e) {
- var r = [], l = e.split(/(\n|\r\n)/);
- l[l.length - 1] || l.pop();
- for (var f = 0; f < l.length; f++) {
- var g = l[f];
- f % 2 && !this.options.newlineIsToken ? r[r.length - 1] += g : (this.options.ignoreWhitespace && (g = g.trim()), r.push(g));
- }
- return r;
- };
- var Jn = new ae();
- Jn.tokenize = function(e) {
- return e.split(/(\S.+?[.!?])(?=\s+|$)/);
- };
- var et = new ae();
- et.tokenize = function(e) {
- return e.split(/([{}:;,]|\s+)/);
- };
- function Ce(e) {
- "@babel/helpers - typeof";
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ce = function(r) {
- return typeof r;
- } : Ce = function(r) {
- return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
- }, Ce(e);
- }
- var nt = Object.prototype.toString;
- var we = new ae();
- we.useLongestToken = true;
- we.tokenize = bn.tokenize;
- we.castInput = function(e) {
- var r = this.options, l = r.undefinedReplacement, f = r.stringifyReplacer, g = f === void 0 ? function(n, t) {
- return typeof t == "undefined" ? l : t;
- } : f;
- return typeof e == "string" ? e : JSON.stringify(xe(e, null, null, g), g, " ");
- };
- we.equals = function(e, r) {
- return ae.prototype.equals.call(we, e.replace(/,([\r\n])/g, "$1"), r.replace(/,([\r\n])/g, "$1"));
- };
- function xe(e, r, l, f, g) {
- r = r || [], l = l || [], f && (e = f(g, e));
- var n;
- for (n = 0; n < r.length; n += 1)
- if (r[n] === e)
- return l[n];
- var t;
- if (nt.call(e) === "[object Array]") {
- for (r.push(e), t = new Array(e.length), l.push(t), n = 0; n < e.length; n += 1)
- t[n] = xe(e[n], r, l, f, g);
- return r.pop(), l.pop(), t;
- }
- if (e && e.toJSON && (e = e.toJSON()), Ce(e) === "object" && e !== null) {
- r.push(e), t = {}, l.push(t);
- var i = [], s;
- for (s in e)
- e.hasOwnProperty(s) && i.push(s);
- for (i.sort(), n = 0; n < i.length; n += 1)
- s = i[n], t[s] = xe(e[s], r, l, f, s);
- r.pop(), l.pop();
- } else
- t = e;
- return t;
- }
- var Ge = new ae();
- Ge.tokenize = function(e) {
- return e.slice();
- };
- Ge.join = Ge.removeEmpty = function(e) {
- return e;
- };
- function tt(e) {
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
- }
- var En = { exports: {} };
- (function(e) {
- var r = function() {
- 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;
- }, l = -1, f = 1, g = 0;
- r.Diff = function(n, t) {
- return [n, t];
- }, r.prototype.diff_main = function(n, t, i, s) {
- typeof s == "undefined" && (this.Diff_Timeout <= 0 ? s = Number.MAX_VALUE : s = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
- var a = s;
- if (n == null || t == null)
- throw new Error("Null input. (diff_main)");
- if (n == t)
- return n ? [new r.Diff(g, n)] : [];
- typeof i == "undefined" && (i = true);
- var o = i, c = this.diff_commonPrefix(n, t), u = n.substring(0, c);
- n = n.substring(c), t = t.substring(c), c = this.diff_commonSuffix(n, t);
- var d = n.substring(n.length - c);
- n = n.substring(0, n.length - c), t = t.substring(0, t.length - c);
- var h = this.diff_compute_(n, t, o, a);
- return u && h.unshift(new r.Diff(g, u)), d && h.push(new r.Diff(g, d)), this.diff_cleanupMerge(h), h;
- }, r.prototype.diff_compute_ = function(n, t, i, s) {
- var a;
- if (!n)
- return [new r.Diff(f, t)];
- if (!t)
- return [new r.Diff(l, n)];
- var o = n.length > t.length ? n : t, c = n.length > t.length ? t : n, u = o.indexOf(c);
- if (u != -1)
- return a = [
- new r.Diff(f, o.substring(0, u)),
- new r.Diff(g, c),
- new r.Diff(
- f,
- o.substring(u + c.length)
- )
- ], n.length > t.length && (a[0][0] = a[2][0] = l), a;
- if (c.length == 1)
- return [
- new r.Diff(l, n),
- new r.Diff(f, t)
- ];
- var d = this.diff_halfMatch_(n, t);
- if (d) {
- 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);
- return v.concat(
- [new r.Diff(g, m)],
- A
- );
- }
- return i && n.length > 100 && t.length > 100 ? this.diff_lineMode_(n, t, s) : this.diff_bisect_(n, t, s);
- }, r.prototype.diff_lineMode_ = function(n, t, i) {
- var s = this.diff_linesToChars_(n, t);
- n = s.chars1, t = s.chars2;
- var a = s.lineArray, o = this.diff_main(n, t, false, i);
- this.diff_charsToLines_(o, a), this.diff_cleanupSemantic(o), o.push(new r.Diff(g, ""));
- for (var c = 0, u = 0, d = 0, h = "", p = ""; c < o.length; ) {
- switch (o[c][0]) {
- case f:
- d++, p += o[c][1];
- break;
- case l:
- u++, h += o[c][1];
- break;
- case g:
- if (u >= 1 && d >= 1) {
- o.splice(
- c - u - d,
- u + d
- ), c = c - u - d;
- for (var _ = this.diff_main(h, p, false, i), E = _.length - 1; E >= 0; E--)
- o.splice(c, 0, _[E]);
- c = c + _.length;
- }
- d = 0, u = 0, h = "", p = "";
- break;
- }
- c++;
- }
- return o.pop(), o;
- }, r.prototype.diff_bisect_ = function(n, t, i) {
- 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++)
- d[p] = -1, h[p] = -1;
- d[c + 1] = 0, h[c + 1] = 0;
- 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++) {
- for (var M = -S + m; M <= S - v; M += 2) {
- var R = c + M, L;
- M == -S || M != S && d[R - 1] < d[R + 1] ? L = d[R + 1] : L = d[R - 1] + 1;
- for (var I = L - M; L < s && I < a && n.charAt(L) == t.charAt(I); )
- L++, I++;
- if (d[R] = L, L > s)
- v += 2;
- else if (I > a)
- m += 2;
- else if (E) {
- var P = c + _ - M;
- if (P >= 0 && P < u && h[P] != -1) {
- var $ = s - h[P];
- if (L >= $)
- return this.diff_bisectSplit_(n, t, L, I, i);
- }
- }
- }
- for (var K = -S + A; K <= S - D; K += 2) {
- var P = c + K, $;
- K == -S || K != S && h[P - 1] < h[P + 1] ? $ = h[P + 1] : $ = h[P - 1] + 1;
- for (var Y = $ - K; $ < s && Y < a && n.charAt(s - $ - 1) == t.charAt(a - Y - 1); )
- $++, Y++;
- if (h[P] = $, $ > s)
- D += 2;
- else if (Y > a)
- A += 2;
- else if (!E) {
- var R = c + _ - K;
- if (R >= 0 && R < u && d[R] != -1) {
- var L = d[R], I = c + L - R;
- if ($ = s - $, L >= $)
- return this.diff_bisectSplit_(n, t, L, I, i);
- }
- }
- }
- }
- return [
- new r.Diff(l, n),
- new r.Diff(f, t)
- ];
- }, r.prototype.diff_bisectSplit_ = function(n, t, i, s, a) {
- 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, false, a), p = this.diff_main(u, d, false, a);
- return h.concat(p);
- }, r.prototype.diff_linesToChars_ = function(n, t) {
- var i = [], s = {};
- i[0] = "";
- function a(d) {
- for (var h = "", p = 0, _ = -1, E = i.length; _ < d.length - 1; ) {
- _ = d.indexOf(`
- `, p), _ == -1 && (_ = d.length - 1);
- var m = d.substring(p, _ + 1);
- (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;
- }
- return h;
- }
- var o = 4e4, c = a(n);
- o = 65535;
- var u = a(t);
- return { chars1: c, chars2: u, lineArray: i };
- }, r.prototype.diff_charsToLines_ = function(n, t) {
- for (var i = 0; i < n.length; i++) {
- for (var s = n[i][1], a = [], o = 0; o < s.length; o++)
- a[o] = t[s.charCodeAt(o)];
- n[i][1] = a.join("");
- }
- }, r.prototype.diff_commonPrefix = function(n, t) {
- if (!n || !t || n.charAt(0) != t.charAt(0))
- return 0;
- for (var i = 0, s = Math.min(n.length, t.length), a = s, o = 0; i < a; )
- n.substring(o, a) == t.substring(o, a) ? (i = a, o = i) : s = a, a = Math.floor((s - i) / 2 + i);
- return a;
- }, r.prototype.diff_commonSuffix = function(n, t) {
- if (!n || !t || n.charAt(n.length - 1) != t.charAt(t.length - 1))
- return 0;
- for (var i = 0, s = Math.min(n.length, t.length), a = s, o = 0; i < a; )
- 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);
- return a;
- }, r.prototype.diff_commonOverlap_ = function(n, t) {
- var i = n.length, s = t.length;
- if (i == 0 || s == 0)
- return 0;
- i > s ? n = n.substring(i - s) : i < s && (t = t.substring(0, i));
- var a = Math.min(i, s);
- if (n == t)
- return a;
- for (var o = 0, c = 1; ; ) {
- var u = n.substring(a - c), d = t.indexOf(u);
- if (d == -1)
- return o;
- c += d, (d == 0 || n.substring(a - c) == t.substring(0, c)) && (o = c, c++);
- }
- }, r.prototype.diff_halfMatch_ = function(n, t) {
- if (this.Diff_Timeout <= 0)
- return null;
- var i = n.length > t.length ? n : t, s = n.length > t.length ? t : n;
- if (i.length < 4 || s.length * 2 < i.length)
- return null;
- var a = this;
- function o(v, A, D) {
- 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; ) {
- var K = a.diff_commonPrefix(
- v.substring(D),
- A.substring(M)
- ), Y = a.diff_commonSuffix(
- v.substring(0, D),
- A.substring(0, M)
- );
- 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));
- }
- return R.length * 2 >= v.length ? [
- L,
- I,
- P,
- $,
- R
- ] : null;
- }
- var c = o(
- i,
- s,
- Math.ceil(i.length / 4)
- ), u = o(
- i,
- s,
- Math.ceil(i.length / 2)
- ), d;
- if (!c && !u)
- return null;
- u ? c ? d = c[4].length > u[4].length ? c : u : d = u : d = c;
- var h, p, _, E;
- 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]);
- var m = d[4];
- return [h, p, _, E, m];
- }, r.prototype.diff_cleanupSemantic = function(n) {
- for (var t = false, i = [], s = 0, a = null, o = 0, c = 0, u = 0, d = 0, h = 0; o < n.length; )
- 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(
- d,
- h
- ) && (n.splice(
- i[s - 1],
- 0,
- new r.Diff(l, a)
- ), 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 = true)), o++;
- for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n), o = 1; o < n.length; ) {
- if (n[o - 1][0] == l && n[o][0] == f) {
- var p = n[o - 1][1], _ = n[o][1], E = this.diff_commonOverlap_(p, _), m = this.diff_commonOverlap_(_, p);
- E >= m ? (E >= p.length / 2 || E >= _.length / 2) && (n.splice(o, 0, new r.Diff(
- g,
- _.substring(0, E)
- )), 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(
- g,
- p.substring(0, m)
- )), 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++;
- }
- o++;
- }
- }, r.prototype.diff_cleanupSemanticLossless = function(n) {
- function t(m, v) {
- if (!m || !v)
- return 6;
- 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_);
- return $ || K ? 5 : I || P ? 4 : S && !R && L ? 3 : R || L ? 2 : S || M ? 1 : 0;
- }
- for (var i = 1; i < n.length - 1; ) {
- if (n[i - 1][0] == g && n[i + 1][0] == g) {
- var s = n[i - 1][1], a = n[i][1], o = n[i + 1][1], c = this.diff_commonSuffix(s, a);
- if (c) {
- var u = a.substring(a.length - c);
- s = s.substring(0, s.length - c), a = u + a.substring(0, a.length - c), o = u + o;
- }
- for (var d = s, h = a, p = o, _ = t(s, a) + t(a, o); a.charAt(0) === o.charAt(0); ) {
- s += a.charAt(0), a = a.substring(1) + o.charAt(0), o = o.substring(1);
- var E = t(s, a) + t(a, o);
- E >= _ && (_ = E, d = s, h = a, p = o);
- }
- 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--));
- }
- i++;
- }
- }, 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) {
- for (var t = false, i = [], s = 0, a = null, o = 0, c = false, u = false, d = false, h = false; o < n.length; )
- 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 = false) : (n[o][0] == l ? h = true : d = true, a && (c && u && d && h || a.length < this.Diff_EditCost / 2 && c + u + d + h == 3) && (n.splice(
- i[s - 1],
- 0,
- new r.Diff(l, a)
- ), n[i[s - 1] + 1][0] = f, s--, a = null, c && u ? (d = h = true, s = 0) : (s--, o = s > 0 ? i[s - 1] : -1, d = h = false), t = true)), o++;
- t && this.diff_cleanupMerge(n);
- }, r.prototype.diff_cleanupMerge = function(n) {
- n.push(new r.Diff(g, ""));
- for (var t = 0, i = 0, s = 0, a = "", o = "", c; t < n.length; )
- switch (n[t][0]) {
- case f:
- s++, o += n[t][1], t++;
- break;
- case l:
- i++, a += n[t][1], t++;
- break;
- case g:
- 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(
- g,
- o.substring(0, c)
- )), 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(
- t,
- 0,
- new r.Diff(l, a)
- ), t++), o.length && (n.splice(
- t,
- 0,
- new r.Diff(f, o)
- ), 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 = "";
- break;
- }
- n[n.length - 1][1] === "" && n.pop();
- var u = false;
- for (t = 1; t < n.length - 1; )
- 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 = true) : 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 = true)), t++;
- u && this.diff_cleanupMerge(n);
- }, r.prototype.diff_xIndex = function(n, t) {
- var i = 0, s = 0, a = 0, o = 0, c;
- 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++)
- a = i, o = s;
- return n.length != c && n[c][0] === l ? o : o + (t - a);
- }, r.prototype.diff_prettyHtml = function(n) {
- for (var t = [], i = /&/g, s = /</g, a = />/g, o = /\n/g, c = 0; c < n.length; c++) {
- var u = n[c][0], d = n[c][1], h = d.replace(i, "&").replace(s, "<").replace(a, ">").replace(o, "¶<br>");
- switch (u) {
- case f:
- t[c] = '<ins style="background:#e6ffe6;">' + h + "</ins>";
- break;
- case l:
- t[c] = '<del style="background:#ffe6e6;">' + h + "</del>";
- break;
- case g:
- t[c] = "<span>" + h + "</span>";
- break;
- }
- }
- return t.join("");
- }, r.prototype.diff_text1 = function(n) {
- for (var t = [], i = 0; i < n.length; i++)
- n[i][0] !== f && (t[i] = n[i][1]);
- return t.join("");
- }, r.prototype.diff_text2 = function(n) {
- for (var t = [], i = 0; i < n.length; i++)
- n[i][0] !== l && (t[i] = n[i][1]);
- return t.join("");
- }, r.prototype.diff_levenshtein = function(n) {
- for (var t = 0, i = 0, s = 0, a = 0; a < n.length; a++) {
- var o = n[a][0], c = n[a][1];
- switch (o) {
- case f:
- i += c.length;
- break;
- case l:
- s += c.length;
- break;
- case g:
- t += Math.max(i, s), i = 0, s = 0;
- break;
- }
- }
- return t += Math.max(i, s), t;
- }, r.prototype.diff_toDelta = function(n) {
- for (var t = [], i = 0; i < n.length; i++)
- switch (n[i][0]) {
- case f:
- t[i] = "+" + encodeURI(n[i][1]);
- break;
- case l:
- t[i] = "-" + n[i][1].length;
- break;
- case g:
- t[i] = "=" + n[i][1].length;
- break;
- }
- return t.join(" ").replace(/%20/g, " ");
- }, r.prototype.diff_fromDelta = function(n, t) {
- for (var i = [], s = 0, a = 0, o = t.split(/\t/g), c = 0; c < o.length; c++) {
- var u = o[c].substring(1);
- switch (o[c].charAt(0)) {
- case "+":
- try {
- i[s++] = new r.Diff(f, decodeURI(u));
- } catch (p) {
- throw new Error("Illegal escape in diff_fromDelta: " + u);
- }
- break;
- case "-":
- case "=":
- var d = parseInt(u, 10);
- if (isNaN(d) || d < 0)
- throw new Error("Invalid number in diff_fromDelta: " + u);
- var h = n.substring(a, a += d);
- o[c].charAt(0) == "=" ? i[s++] = new r.Diff(g, h) : i[s++] = new r.Diff(l, h);
- break;
- default:
- if (o[c])
- throw new Error("Invalid diff operation in diff_fromDelta: " + o[c]);
- }
- }
- if (a != n.length)
- throw new Error("Delta length (" + a + ") does not equal source text length (" + n.length + ").");
- return i;
- }, r.prototype.match_main = function(n, t, i) {
- if (n == null || t == null || i == null)
- throw new Error("Null input. (match_main)");
- 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;
- }, r.prototype.match_bitap_ = function(n, t, i) {
- if (t.length > this.Match_MaxBits)
- throw new Error("Pattern too long for this browser.");
- var s = this.match_alphabet_(t), a = this;
- function o(L, I) {
- var P = L / t.length, $ = Math.abs(i - I);
- return a.Match_Distance ? P + $ / a.Match_Distance : $ ? 1 : P;
- }
- var c = this.Match_Threshold, u = n.indexOf(t, i);
- 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)));
- var d = 1 << t.length - 1;
- u = -1;
- for (var h, p, _ = t.length + n.length, E, m = 0; m < t.length; m++) {
- for (h = 0, p = _; h < p; )
- o(m, i + p) <= c ? h = p : _ = p, p = Math.floor((_ - h) / 2 + h);
- _ = p;
- var v = Math.max(1, i - p + 1), A = Math.min(i + p, n.length) + t.length, D = Array(A + 2);
- D[A + 1] = (1 << m) - 1;
- for (var S = A; S >= v; S--) {
- var M = s[n.charAt(S - 1)];
- 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) {
- var R = o(m, S - 1);
- if (R <= c)
- if (c = R, u = S - 1, u > i)
- v = Math.max(1, 2 * i - u);
- else
- break;
- }
- }
- if (o(m + 1, i) > c)
- break;
- E = D;
- }
- return u;
- }, r.prototype.match_alphabet_ = function(n) {
- for (var t = {}, i = 0; i < n.length; i++)
- t[n.charAt(i)] = 0;
- for (var i = 0; i < n.length; i++)
- t[n.charAt(i)] |= 1 << n.length - i - 1;
- return t;
- }, r.prototype.patch_addContext_ = function(n, t) {
- if (t.length != 0) {
- if (n.start2 === null)
- throw Error("patch not initialized");
- 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; )
- s += this.Patch_Margin, i = t.substring(
- n.start2 - s,
- n.start2 + n.length1 + s
- );
- s += this.Patch_Margin;
- var a = t.substring(n.start2 - s, n.start2);
- a && n.diffs.unshift(new r.Diff(g, a));
- var o = t.substring(
- n.start2 + n.length1,
- n.start2 + n.length1 + s
- );
- 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;
- }
- }, r.prototype.patch_make = function(n, t, i) {
- var s, a;
- if (typeof n == "string" && typeof t == "string" && typeof i == "undefined")
- s = /** @type {string} */
- n, a = this.diff_main(
- s,
- /** @type {string} */
- t,
- true
- ), a.length > 2 && (this.diff_cleanupSemantic(a), this.diff_cleanupEfficiency(a));
- else if (n && typeof n == "object" && typeof t == "undefined" && typeof i == "undefined")
- a = /** @type {!Array.<!diff_match_patch.Diff>} */
- n, s = this.diff_text1(a);
- else if (typeof n == "string" && t && typeof t == "object" && typeof i == "undefined")
- s = /** @type {string} */
- n, a = /** @type {!Array.<!diff_match_patch.Diff>} */
- t;
- else if (typeof n == "string" && typeof t == "string" && i && typeof i == "object")
- s = /** @type {string} */
- n, a = /** @type {!Array.<!diff_match_patch.Diff>} */
- i;
- else
- throw new Error("Unknown call format to patch_make.");
- if (a.length === 0)
- return [];
- for (var o = [], c = new r.patch_obj(), u = 0, d = 0, h = 0, p = s, _ = s, E = 0; E < a.length; E++) {
- var m = a[E][0], v = a[E][1];
- switch (!u && m !== g && (c.start1 = d, c.start2 = h), m) {
- case f:
- c.diffs[u++] = a[E], c.length2 += v.length, _ = _.substring(0, h) + v + _.substring(h);
- break;
- case l:
- c.length1 += v.length, c.diffs[u++] = a[E], _ = _.substring(0, h) + _.substring(h + v.length);
- break;
- case g:
- 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);
- break;
- }
- m !== f && (d += v.length), m !== l && (h += v.length);
- }
- return u && (this.patch_addContext_(c, p), o.push(c)), o;
- }, r.prototype.patch_deepCopy = function(n) {
- for (var t = [], i = 0; i < n.length; i++) {
- var s = n[i], a = new r.patch_obj();
- a.diffs = [];
- for (var o = 0; o < s.diffs.length; o++)
- a.diffs[o] = new r.Diff(s.diffs[o][0], s.diffs[o][1]);
- a.start1 = s.start1, a.start2 = s.start2, a.length1 = s.length1, a.length2 = s.length2, t[i] = a;
- }
- return t;
- }, r.prototype.patch_apply = function(n, t) {
- if (n.length == 0)
- return [t, []];
- n = this.patch_deepCopy(n);
- var i = this.patch_addPadding(n);
- t = i + t + i, this.patch_splitMax(n);
- for (var s = 0, a = [], o = 0; o < n.length; o++) {
- var c = n[o].start2 + s, u = this.diff_text1(n[o].diffs), d, h = -1;
- if (u.length > this.Match_MaxBits ? (d = this.match_main(
- t,
- u.substring(0, this.Match_MaxBits),
- c
- ), d != -1 && (h = this.match_main(
- t,
- u.substring(u.length - this.Match_MaxBits),
- c + u.length - this.Match_MaxBits
- ), (h == -1 || d >= h) && (d = -1))) : d = this.match_main(t, u, c), d == -1)
- a[o] = false, s -= n[o].length2 - n[o].length1;
- else {
- a[o] = true, s = d - c;
- var p;
- if (h == -1 ? p = t.substring(d, d + u.length) : p = t.substring(d, h + this.Match_MaxBits), u == p)
- t = t.substring(0, d) + this.diff_text2(n[o].diffs) + t.substring(d + u.length);
- else {
- var _ = this.diff_main(u, p, false);
- if (u.length > this.Match_MaxBits && this.diff_levenshtein(_) / u.length > this.Patch_DeleteThreshold)
- a[o] = false;
- else {
- this.diff_cleanupSemanticLossless(_);
- for (var E = 0, m, v = 0; v < n[o].diffs.length; v++) {
- var A = n[o].diffs[v];
- 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(
- _,
- E + A[1].length
- ))), A[0] !== l && (E += A[1].length);
- }
- }
- }
- }
- }
- return t = t.substring(i.length, t.length - i.length), [t, a];
- }, r.prototype.patch_addPadding = function(n) {
- for (var t = this.Patch_Margin, i = "", s = 1; s <= t; s++)
- i += String.fromCharCode(s);
- for (var s = 0; s < n.length; s++)
- n[s].start1 += t, n[s].start2 += t;
- var a = n[0], o = a.diffs;
- if (o.length == 0 || o[0][0] != g)
- o.unshift(new r.Diff(g, i)), a.start1 -= t, a.start2 -= t, a.length1 += t, a.length2 += t;
- else if (t > o[0][1].length) {
- var c = t - o[0][1].length;
- o[0][1] = i.substring(o[0][1].length) + o[0][1], a.start1 -= c, a.start2 -= c, a.length1 += c, a.length2 += c;
- }
- if (a = n[n.length - 1], o = a.diffs, o.length == 0 || o[o.length - 1][0] != g)
- o.push(new r.Diff(g, i)), a.length1 += t, a.length2 += t;
- else if (t > o[o.length - 1][1].length) {
- var c = t - o[o.length - 1][1].length;
- o[o.length - 1][1] += i.substring(0, c), a.length1 += c, a.length2 += c;
- }
- return i;
- }, r.prototype.patch_splitMax = function(n) {
- for (var t = this.Match_MaxBits, i = 0; i < n.length; i++)
- if (!(n[i].length1 <= t)) {
- var s = n[i];
- n.splice(i--, 1);
- for (var a = s.start1, o = s.start2, c = ""; s.diffs.length !== 0; ) {
- var u = new r.patch_obj(), d = true;
- 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; ) {
- var h = s.diffs[0][0], p = s.diffs[0][1];
- h === f ? (u.length2 += p.length, o += p.length, u.diffs.push(s.diffs.shift()), d = false) : h === l && u.diffs.length == 1 && u.diffs[0][0] == g && p.length > 2 * t ? (u.length1 += p.length, a += p.length, d = false, u.diffs.push(new r.Diff(h, p)), s.diffs.shift()) : (p = p.substring(
- 0,
- t - u.length1 - this.Patch_Margin
- ), u.length1 += p.length, a += p.length, h === g ? (u.length2 += p.length, o += p.length) : d = false, 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));
- }
- c = this.diff_text2(u.diffs), c = c.substring(c.length - this.Patch_Margin);
- var _ = this.diff_text1(s.diffs).substring(0, this.Patch_Margin);
- _ !== "" && (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);
- }
- }
- }, r.prototype.patch_toText = function(n) {
- for (var t = [], i = 0; i < n.length; i++)
- t[i] = n[i];
- return t.join("");
- }, r.prototype.patch_fromText = function(n) {
- var t = [];
- if (!n)
- return t;
- for (var i = n.split(`
- `), s = 0, a = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; s < i.length; ) {
- var o = i[s].match(a);
- if (!o)
- throw new Error("Invalid patch string: " + i[s]);
- var c = new r.patch_obj();
- 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; ) {
- var u = i[s].charAt(0);
- try {
- var d = decodeURI(i[s].substring(1));
- } catch (h) {
- throw new Error("Illegal escape in patch_fromText: " + d);
- }
- if (u == "-")
- c.diffs.push(new r.Diff(l, d));
- else if (u == "+")
- c.diffs.push(new r.Diff(f, d));
- else if (u == " ")
- c.diffs.push(new r.Diff(g, d));
- else {
- if (u == "@")
- break;
- if (u !== "")
- throw new Error('Invalid patch mode "' + u + '" in: ' + d);
- }
- s++;
- }
- }
- return t;
- }, r.patch_obj = function() {
- this.diffs = [], this.start1 = null, this.start2 = null, this.length1 = 0, this.length2 = 0;
- }, r.patch_obj.prototype.toString = function() {
- var n, t;
- 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;
- for (var i = ["@@ -" + n + " +" + t + ` @@
- `], s, a = 0; a < this.diffs.length; a++) {
- switch (this.diffs[a][0]) {
- case f:
- s = "+";
- break;
- case l:
- s = "-";
- break;
- case g:
- s = " ";
- break;
- }
- i[a + 1] = s + encodeURI(this.diffs[a][1]) + `
- `;
- }
- return i.join("").replace(/%20/g, " ");
- }, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT = f, e.exports.DIFF_EQUAL = g;
- })(En);
- var Fe = En.exports;
- function mn(e) {
- return e instanceof Map ? e.clear = e.delete = e.set = function() {
- throw new Error("map is read-only");
- } : e instanceof Set && (e.add = e.clear = e.delete = function() {
- throw new Error("set is read-only");
- }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((r) => {
- const l = e[r], f = typeof l;
- (f === "object" || f === "function") && !Object.isFrozen(l) && mn(l);
- }), e;
- }
- var an = class {
- /**
- * @param {CompiledMode} mode
- */
- constructor(r) {
- r.data === void 0 && (r.data = {}), this.data = r.data, this.isMatchIgnored = false;
- }
- ignoreMatch() {
- this.isMatchIgnored = true;
- }
- };
- function vn(e) {
- return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
- }
- function le(e, ...r) {
- const l = /* @__PURE__ */ Object.create(null);
- for (const f in e)
- l[f] = e[f];
- return r.forEach(function(f) {
- for (const g in f)
- l[g] = f[g];
- }), /** @type {T} */
- l;
- }
- var rt = "</span>";
- var on = (e) => !!e.scope;
- var it = (e, { prefix: r }) => {
- if (e.startsWith("language:"))
- return e.replace("language:", "language-");
- if (e.includes(".")) {
- const l = e.split(".");
- return [
- `${r}${l.shift()}`,
- ...l.map((f, g) => `${f}${"_".repeat(g + 1)}`)
- ].join(" ");
- }
- return `${r}${e}`;
- };
- var st = class {
- /**
- * Creates a new HTMLRenderer
- *
- * @param {Tree} parseTree - the parse tree (must support `walk` API)
- * @param {{classPrefix: string}} options
- */
- constructor(r, l) {
- this.buffer = "", this.classPrefix = l.classPrefix, r.walk(this);
- }
- /**
- * Adds texts to the output stream
- *
- * @param {string} text */
- addText(r) {
- this.buffer += vn(r);
- }
- /**
- * Adds a node open to the output stream (if needed)
- *
- * @param {Node} node */
- openNode(r) {
- if (!on(r))
- return;
- const l = it(
- r.scope,
- { prefix: this.classPrefix }
- );
- this.span(l);
- }
- /**
- * Adds a node close to the output stream (if needed)
- *
- * @param {Node} node */
- closeNode(r) {
- on(r) && (this.buffer += rt);
- }
- /**
- * returns the accumulated buffer
- */
- value() {
- return this.buffer;
- }
- // helpers
- /**
- * Builds a span element
- *
- * @param {string} className */
- span(r) {
- this.buffer += `<span class="${r}">`;
- }
- };
- var ln = (e = {}) => {
- const r = { children: [] };
- return Object.assign(r, e), r;
- };
- var Qe = class _Qe {
- constructor() {
- this.rootNode = ln(), this.stack = [this.rootNode];
- }
- get top() {
- return this.stack[this.stack.length - 1];
- }
- get root() {
- return this.rootNode;
- }
- /** @param {Node} node */
- add(r) {
- this.top.children.push(r);
- }
- /** @param {string} scope */
- openNode(r) {
- const l = ln({ scope: r });
- this.add(l), this.stack.push(l);
- }
- closeNode() {
- if (this.stack.length > 1)
- return this.stack.pop();
- }
- closeAllNodes() {
- for (; this.closeNode(); )
- ;
- }
- toJSON() {
- return JSON.stringify(this.rootNode, null, 4);
- }
- /**
- * @typedef { import("./html_renderer").Renderer } Renderer
- * @param {Renderer} builder
- */
- walk(r) {
- return this.constructor._walk(r, this.rootNode);
- }
- /**
- * @param {Renderer} builder
- * @param {Node} node
- */
- static _walk(r, l) {
- return typeof l == "string" ? r.addText(l) : l.children && (r.openNode(l), l.children.forEach((f) => this._walk(r, f)), r.closeNode(l)), r;
- }
- /**
- * @param {Node} node
- */
- static _collapse(r) {
- typeof r != "string" && r.children && (r.children.every((l) => typeof l == "string") ? r.children = [r.children.join("")] : r.children.forEach((l) => {
- _Qe._collapse(l);
- }));
- }
- };
- var at = class extends Qe {
- /**
- * @param {*} options
- */
- constructor(r) {
- super(), this.options = r;
- }
- /**
- * @param {string} text
- */
- addText(r) {
- r !== "" && this.add(r);
- }
- /** @param {string} scope */
- startScope(r) {
- this.openNode(r);
- }
- endScope() {
- this.closeNode();
- }
- /**
- * @param {Emitter & {root: DataNode}} emitter
- * @param {string} name
- */
- __addSublanguage(r, l) {
- const f = r.root;
- l && (f.scope = `language:${l}`), this.add(f);
- }
- toHTML() {
- return new st(this, this.options).value();
- }
- finalize() {
- return this.closeAllNodes(), true;
- }
- };
- function ye(e) {
- return e ? typeof e == "string" ? e : e.source : null;
- }
- function wn(e) {
- return fe("(?=", e, ")");
- }
- function ot(e) {
- return fe("(?:", e, ")*");
- }
- function lt(e) {
- return fe("(?:", e, ")?");
- }
- function fe(...e) {
- return e.map((l) => ye(l)).join("");
- }
- function ct(e) {
- const r = e[e.length - 1];
- return typeof r == "object" && r.constructor === Object ? (e.splice(e.length - 1, 1), r) : {};
- }
- function Ze(...e) {
- return "(" + (ct(e).capture ? "" : "?:") + e.map((f) => ye(f)).join("|") + ")";
- }
- function yn(e) {
- return new RegExp(e.toString() + "|").exec("").length - 1;
- }
- function ut(e, r) {
- const l = e && e.exec(r);
- return l && l.index === 0;
- }
- var ft = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
- function Ye(e, { joinWith: r }) {
- let l = 0;
- return e.map((f) => {
- l += 1;
- const g = l;
- let n = ye(f), t = "";
- for (; n.length > 0; ) {
- const i = ft.exec(n);
- if (!i) {
- t += n;
- break;
- }
- 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++);
- }
- return t;
- }).map((f) => `(${f})`).join(r);
- }
- var gt = /\b\B/;
- var Nn = "[a-zA-Z]\\w*";
- var Xe = "[a-zA-Z_]\\w*";
- var An = "\\b\\d+(\\.\\d+)?";
- var Mn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";
- var Tn = "\\b(0b[01]+)";
- var ht = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";
- var dt = (e = {}) => {
- const r = /^#![ ]*\//;
- return e.binary && (e.begin = fe(
- r,
- /.*\b/,
- e.binary,
- /\b.*/
- )), le({
- scope: "meta",
- begin: r,
- end: /$/,
- relevance: 0,
- /** @type {ModeCallback} */
- "on:begin": (l, f) => {
- l.index !== 0 && f.ignoreMatch();
- }
- }, e);
- };
- var Ne = {
- begin: "\\\\[\\s\\S]",
- relevance: 0
- };
- var pt = {
- scope: "string",
- begin: "'",
- end: "'",
- illegal: "\\n",
- contains: [Ne]
- };
- var _t = {
- scope: "string",
- begin: '"',
- end: '"',
- illegal: "\\n",
- contains: [Ne]
- };
- var bt = {
- 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/
- };
- var $e = function(e, r, l = {}) {
- const f = le(
- {
- scope: "comment",
- begin: e,
- end: r,
- contains: []
- },
- l
- );
- f.contains.push({
- scope: "doctag",
- // hack to avoid the space from being included. the space is necessary to
- // match here to prevent the plain text rule below from gobbling up doctags
- begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
- end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
- excludeBegin: true,
- relevance: 0
- });
- const g = Ze(
- // list of common 1 and 2 letter words in English
- "I",
- "a",
- "is",
- "so",
- "us",
- "to",
- "at",
- "if",
- "in",
- "it",
- "on",
- // note: this is not an exhaustive list of contractions, just popular ones
- /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
- // contractions - can't we'd they're let's, etc
- /[A-Za-z]+[-][a-z]+/,
- // `no-way`, etc.
- /[A-Za-z][a-z]{2,}/
- // allow capitalized words at beginning of sentences
- );
- return f.contains.push(
- {
- // TODO: how to include ", (, ) without breaking grammars that use these for
- // comment delimiters?
- // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
- // ---
- // this tries to find sequences of 3 english words in a row (without any
- // "programming" type syntax) this gives us a strong signal that we've
- // TRULY found a comment - vs perhaps scanning with the wrong language.
- // It's possible to find something that LOOKS like the start of the
- // comment - but then if there is no readable text - good chance it is a
- // false match and not a comment.
- //
- // for a visual example please see:
- // https://github.com/highlightjs/highlight.js/issues/2827
- begin: fe(
- /[ ]+/,
- // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
- "(",
- g,
- /[.]?[:]?([.][ ]|[ ])/,
- "){3}"
- )
- // look for 3 words in a row
- }
- ), f;
- };
- var Et = $e("//", "$");
- var mt = $e("/\\*", "\\*/");
- var vt = $e("#", "$");
- var wt = {
- scope: "number",
- begin: An,
- relevance: 0
- };
- var yt = {
- scope: "number",
- begin: Mn,
- relevance: 0
- };
- var Nt = {
- scope: "number",
- begin: Tn,
- relevance: 0
- };
- var At = {
- scope: "regexp",
- begin: /\/(?=[^/\n]*\/)/,
- end: /\/[gimuy]*/,
- contains: [
- Ne,
- {
- begin: /\[/,
- end: /\]/,
- relevance: 0,
- contains: [Ne]
- }
- ]
- };
- var Mt = {
- scope: "title",
- begin: Nn,
- relevance: 0
- };
- var Tt = {
- scope: "title",
- begin: Xe,
- relevance: 0
- };
- var St = {
- // excludes method names from keyword processing
- begin: "\\.\\s*" + Xe,
- relevance: 0
- };
- var Dt = function(e) {
- return Object.assign(
- e,
- {
- /** @type {ModeCallback} */
- "on:begin": (r, l) => {
- l.data._beginMatch = r[1];
- },
- /** @type {ModeCallback} */
- "on:end": (r, l) => {
- l.data._beginMatch !== r[1] && l.ignoreMatch();
- }
- }
- );
- };
- var Le = Object.freeze({
- __proto__: null,
- APOS_STRING_MODE: pt,
- BACKSLASH_ESCAPE: Ne,
- BINARY_NUMBER_MODE: Nt,
- BINARY_NUMBER_RE: Tn,
- COMMENT: $e,
- C_BLOCK_COMMENT_MODE: mt,
- C_LINE_COMMENT_MODE: Et,
- C_NUMBER_MODE: yt,
- C_NUMBER_RE: Mn,
- END_SAME_AS_BEGIN: Dt,
- HASH_COMMENT_MODE: vt,
- IDENT_RE: Nn,
- MATCH_NOTHING_RE: gt,
- METHOD_GUARD: St,
- NUMBER_MODE: wt,
- NUMBER_RE: An,
- PHRASAL_WORDS_MODE: bt,
- QUOTE_STRING_MODE: _t,
- REGEXP_MODE: At,
- RE_STARTERS_RE: ht,
- SHEBANG: dt,
- TITLE_MODE: Mt,
- UNDERSCORE_IDENT_RE: Xe,
- UNDERSCORE_TITLE_MODE: Tt
- });
- function Lt(e, r) {
- e.input[e.index - 1] === "." && r.ignoreMatch();
- }
- function Rt(e, r) {
- e.className !== void 0 && (e.scope = e.className, delete e.className);
- }
- function Ot(e, r) {
- 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));
- }
- function Ct(e, r) {
- Array.isArray(e.illegal) && (e.illegal = Ze(...e.illegal));
- }
- function It(e, r) {
- if (e.match) {
- if (e.begin || e.end)
- throw new Error("begin & end are not supported with match");
- e.begin = e.match, delete e.match;
- }
- }
- function kt(e, r) {
- e.relevance === void 0 && (e.relevance = 1);
- }
- var Bt = (e, r) => {
- if (!e.beforeMatch)
- return;
- if (e.starts)
- throw new Error("beforeMatch cannot be used with starts");
- const l = Object.assign({}, e);
- Object.keys(e).forEach((f) => {
- delete e[f];
- }), e.keywords = l.keywords, e.begin = fe(l.beforeMatch, wn(l.begin)), e.starts = {
- relevance: 0,
- contains: [
- Object.assign(l, { endsParent: true })
- ]
- }, e.relevance = 0, delete l.beforeMatch;
- };
- var $t = [
- "of",
- "and",
- "for",
- "in",
- "not",
- "or",
- "if",
- "then",
- "parent",
- // common variable name
- "list",
- // common variable name
- "value"
- // common variable name
- ];
- var Pt = "keyword";
- function Sn(e, r, l = Pt) {
- const f = /* @__PURE__ */ Object.create(null);
- return typeof e == "string" ? g(l, e.split(" ")) : Array.isArray(e) ? g(l, e) : Object.keys(e).forEach(function(n) {
- Object.assign(
- f,
- Sn(e[n], r, n)
- );
- }), f;
- function g(n, t) {
- r && (t = t.map((i) => i.toLowerCase())), t.forEach(function(i) {
- const s = i.split("|");
- f[s[0]] = [n, Ut(s[0], s[1])];
- });
- }
- }
- function Ut(e, r) {
- return r ? Number(r) : Ht(e) ? 0 : 1;
- }
- function Ht(e) {
- return $t.includes(e.toLowerCase());
- }
- var cn = {};
- var ue = (e) => {
- console.error(e);
- };
- var un = (e, ...r) => {
- console.log(`WARN: ${e}`, ...r);
- };
- var he = (e, r) => {
- cn[`${e}/${r}`] || (console.log(`Deprecated as of ${e}. ${r}`), cn[`${e}/${r}`] = true);
- };
- var ke = new Error();
- function Dn(e, r, { key: l }) {
- let f = 0;
- const g = e[l], n = {}, t = {};
- for (let i = 1; i <= r.length; i++)
- t[i + f] = g[i], n[i + f] = true, f += yn(r[i - 1]);
- e[l] = t, e[l]._emit = n, e[l]._multi = true;
- }
- function Ft(e) {
- if (Array.isArray(e.begin)) {
- if (e.skip || e.excludeBegin || e.returnBegin)
- throw ue("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), ke;
- if (typeof e.beginScope != "object" || e.beginScope === null)
- throw ue("beginScope must be object"), ke;
- Dn(e, e.begin, { key: "beginScope" }), e.begin = Ye(e.begin, { joinWith: "" });
- }
- }
- function zt(e) {
- if (Array.isArray(e.end)) {
- if (e.skip || e.excludeEnd || e.returnEnd)
- throw ue("skip, excludeEnd, returnEnd not compatible with endScope: {}"), ke;
- if (typeof e.endScope != "object" || e.endScope === null)
- throw ue("endScope must be object"), ke;
- Dn(e, e.end, { key: "endScope" }), e.end = Ye(e.end, { joinWith: "" });
- }
- }
- function xt(e) {
- e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
- }
- function Gt(e) {
- xt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Ft(e), zt(e);
- }
- function Kt(e) {
- function r(t, i) {
- return new RegExp(
- ye(t),
- "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
- );
- }
- class l {
- constructor() {
- this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
- }
- // @ts-ignore
- addRule(i, s) {
- s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt += yn(i) + 1;
- }
- compile() {
- this.regexes.length === 0 && (this.exec = () => null);
- const i = this.regexes.map((s) => s[1]);
- this.matcherRe = r(Ye(i, { joinWith: "|" }), true), this.lastIndex = 0;
- }
- /** @param {string} s */
- exec(i) {
- this.matcherRe.lastIndex = this.lastIndex;
- const s = this.matcherRe.exec(i);
- if (!s)
- return null;
- const a = s.findIndex((c, u) => u > 0 && c !== void 0), o = this.matchIndexes[a];
- return s.splice(0, a), Object.assign(s, o);
- }
- }
- class f {
- constructor() {
- this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
- }
- // @ts-ignore
- getMatcher(i) {
- if (this.multiRegexes[i])
- return this.multiRegexes[i];
- const s = new l();
- return this.rules.slice(i).forEach(([a, o]) => s.addRule(a, o)), s.compile(), this.multiRegexes[i] = s, s;
- }
- resumingScanAtSamePosition() {
- return this.regexIndex !== 0;
- }
- considerAll() {
- this.regexIndex = 0;
- }
- // @ts-ignore
- addRule(i, s) {
- this.rules.push([i, s]), s.type === "begin" && this.count++;
- }
- /** @param {string} s */
- exec(i) {
- const s = this.getMatcher(this.regexIndex);
- s.lastIndex = this.lastIndex;
- let a = s.exec(i);
- if (this.resumingScanAtSamePosition() && !(a && a.index === this.lastIndex)) {
- const o = this.getMatcher(0);
- o.lastIndex = this.lastIndex + 1, a = o.exec(i);
- }
- return a && (this.regexIndex += a.position + 1, this.regexIndex === this.count && this.considerAll()), a;
- }
- }
- function g(t) {
- const i = new f();
- 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;
- }
- function n(t, i) {
- const s = (
- /** @type CompiledMode */
- t
- );
- if (t.isCompiled)
- return s;
- [
- Rt,
- // do this early so compiler extensions generally don't have to worry about
- // the distinction between match/begin
- It,
- Gt,
- Bt
- ].forEach((o) => o(t, i)), e.compilerExtensions.forEach((o) => o(t, i)), t.__beforeBegin = null, [
- Ot,
- // do this later so compiler extensions that come earlier have access to the
- // raw array if they wanted to perhaps manipulate it, etc.
- Ct,
- // default to 1 relevance if not specified
- kt
- ].forEach((o) => o(t, i)), t.isCompiled = true;
- let a = null;
- 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, true), 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(
- /** @type {RegExp | string} */
- t.illegal
- )), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(o) {
- return Wt(o === "self" ? t : o);
- })), t.contains.forEach(function(o) {
- n(
- /** @type Mode */
- o,
- s
- );
- }), t.starts && n(t.starts, i), s.matcher = g(s), s;
- }
- if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
- throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
- return e.classNameAliases = le(e.classNameAliases || {}), n(
- /** @type Mode */
- e
- );
- }
- function Ln(e) {
- return e ? e.endsWithParent || Ln(e.starts) : false;
- }
- function Wt(e) {
- return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(r) {
- return le(e, { variants: null }, r);
- })), e.cachedVariants ? e.cachedVariants : Ln(e) ? le(e, { starts: e.starts ? le(e.starts) : null }) : Object.isFrozen(e) ? le(e) : e;
- }
- var Qt = "11.9.0";
- var Zt = class extends Error {
- constructor(r, l) {
- super(r), this.name = "HTMLInjectionError", this.html = l;
- }
- };
- var ze = vn;
- var fn = le;
- var gn = Symbol("nomatch");
- var Yt = 7;
- var Rn = function(e) {
- const r = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ Object.create(null), f = [];
- let g = true;
- const n = "Could not find the language '{}', did you forget to load/include a language module?", t = { disableAutodetect: true, name: "Plain text", contains: [] };
- let i = {
- ignoreUnescapedHTML: false,
- throwUnescapedHTML: false,
- noHighlightRe: /^(no-?highlight)$/i,
- languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
- classPrefix: "hljs-",
- cssSelector: "pre code",
- languages: null,
- // beta configuration options, subject to change, welcome to discuss
- // https://github.com/highlightjs/highlight.js/issues/1086
- __emitter: at
- };
- function s(b) {
- return i.noHighlightRe.test(b);
- }
- function a(b) {
- let N = b.className + " ";
- N += b.parentNode ? b.parentNode.className : "";
- const O = i.languageDetectRe.exec(N);
- if (O) {
- const U = L(O[1]);
- return U || (un(n.replace("{}", O[1])), un("Falling back to no-highlight mode for this block.", b)), U ? O[1] : "no-highlight";
- }
- return N.split(/\s+/).find((U) => s(U) || L(U));
- }
- function o(b, N, O) {
- let U = "", x = "";
- 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.
- https://github.com/highlightjs/highlight.js/issues/2277`), x = b, U = N), O === void 0 && (O = true);
- const X = {
- code: U,
- language: x
- };
- oe("before:highlight", X);
- const J = X.result ? X.result : c(X.language, X.code, O);
- return J.code = X.code, oe("after:highlight", J), J;
- }
- function c(b, N, O, U) {
- const x = /* @__PURE__ */ Object.create(null);
- function X(w, T) {
- return w.keywords[T];
- }
- function J() {
- if (!C.keywords) {
- Q.addText(z);
- return;
- }
- let w = 0;
- C.keywordPatternRe.lastIndex = 0;
- let T = C.keywordPatternRe.exec(z), k = "";
- for (; T; ) {
- k += z.substring(w, T.index);
- const H = te.case_insensitive ? T[0].toLowerCase() : T[0], Z = X(C, H);
- if (Z) {
- const [re, Gn] = Z;
- if (Q.addText(k), k = "", x[H] = (x[H] || 0) + 1, x[H] <= Yt && (Se += Gn), re.startsWith("_"))
- k += T[0];
- else {
- const Kn = te.classNameAliases[re] || re;
- ne(T[0], Kn);
- }
- } else
- k += T[0];
- w = C.keywordPatternRe.lastIndex, T = C.keywordPatternRe.exec(z);
- }
- k += z.substring(w), Q.addText(k);
- }
- function Me() {
- if (z === "")
- return;
- let w = null;
- if (typeof C.subLanguage == "string") {
- if (!r[C.subLanguage]) {
- Q.addText(z);
- return;
- }
- w = c(C.subLanguage, z, true, en[C.subLanguage]), en[C.subLanguage] = /** @type {CompiledMode} */
- w._top;
- } else
- w = d(z, C.subLanguage.length ? C.subLanguage : null);
- C.relevance > 0 && (Se += w.relevance), Q.__addSublanguage(w._emitter, w.language);
- }
- function V() {
- C.subLanguage != null ? Me() : J(), z = "";
- }
- function ne(w, T) {
- w !== "" && (Q.startScope(T), Q.addText(w), Q.endScope());
- }
- function Ve(w, T) {
- let k = 1;
- const H = T.length - 1;
- for (; k <= H; ) {
- if (!w._emit[k]) {
- k++;
- continue;
- }
- const Z = te.classNameAliases[w[k]] || w[k], re = T[k];
- Z ? ne(re, Z) : (z = re, J(), z = ""), k++;
- }
- }
- function je(w, T) {
- 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;
- }
- function qe(w, T, k) {
- let H = ut(w.endRe, k);
- if (H) {
- if (w["on:end"]) {
- const Z = new an(w);
- w["on:end"](T, Z), Z.isMatchIgnored && (H = false);
- }
- if (H) {
- for (; w.endsParent && w.parent; )
- w = w.parent;
- return w;
- }
- }
- if (w.endsWithParent)
- return qe(w.parent, T, k);
- }
- function Un(w) {
- return C.matcher.regexIndex === 0 ? (z += w[0], 1) : (He = true, 0);
- }
- function Hn(w) {
- const T = w[0], k = w.rule, H = new an(k), Z = [k.__beforeBegin, k["on:begin"]];
- for (const re of Z)
- if (re && (re(w, H), H.isMatchIgnored))
- return Un(T);
- return k.skip ? z += T : (k.excludeBegin && (z += T), V(), !k.returnBegin && !k.excludeBegin && (z = T)), je(k, w), k.returnBegin ? 0 : T.length;
- }
- function Fn(w) {
- const T = w[0], k = N.substring(w.index), H = qe(C, w, k);
- if (!H)
- return gn;
- const Z = C;
- 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));
- do
- C.scope && Q.closeNode(), !C.skip && !C.subLanguage && (Se += C.relevance), C = C.parent;
- while (C !== H.parent);
- return H.starts && je(H.starts, w), Z.returnEnd ? 0 : T.length;
- }
- function zn() {
- const w = [];
- for (let T = C; T !== te; T = T.parent)
- T.scope && w.unshift(T.scope);
- w.forEach((T) => Q.openNode(T));
- }
- let Te = {};
- function Je(w, T) {
- const k = T && T[0];
- if (z += w, k == null)
- return V(), 0;
- if (Te.type === "begin" && T.type === "end" && Te.index === T.index && k === "") {
- if (z += N.slice(T.index, T.index + 1), !g) {
- const H = new Error(`0 width match regex (${b})`);
- throw H.languageName = b, H.badRule = Te.rule, H;
- }
- return 1;
- }
- if (Te = T, T.type === "begin")
- return Hn(T);
- if (T.type === "illegal" && !O) {
- const H = new Error('Illegal lexeme "' + k + '" for mode "' + (C.scope || "<unnamed>") + '"');
- throw H.mode = C, H;
- } else if (T.type === "end") {
- const H = Fn(T);
- if (H !== gn)
- return H;
- }
- if (T.type === "illegal" && k === "")
- return 1;
- if (Ue > 1e5 && Ue > T.index * 3)
- throw new Error("potential infinite loop, way more iterations than matches");
- return z += k, k.length;
- }
- const te = L(b);
- if (!te)
- throw ue(n.replace("{}", b)), new Error('Unknown language: "' + b + '"');
- const xn = Kt(te);
- let Pe = "", C = U || xn;
- const en = {}, Q = new i.__emitter(i);
- zn();
- let z = "", Se = 0, ce = 0, Ue = 0, He = false;
- try {
- if (te.__emitTokens)
- te.__emitTokens(N, Q);
- else {
- for (C.matcher.considerAll(); ; ) {
- Ue++, He ? He = false : C.matcher.considerAll(), C.matcher.lastIndex = ce;
- const w = C.matcher.exec(N);
- if (!w)
- break;
- const T = N.substring(ce, w.index), k = Je(T, w);
- ce = w.index + k;
- }
- Je(N.substring(ce));
- }
- return Q.finalize(), Pe = Q.toHTML(), {
- language: b,
- value: Pe,
- relevance: Se,
- illegal: false,
- _emitter: Q,
- _top: C
- };
- } catch (w) {
- if (w.message && w.message.includes("Illegal"))
- return {
- language: b,
- value: ze(N),
- illegal: true,
- relevance: 0,
- _illegalBy: {
- message: w.message,
- index: ce,
- context: N.slice(ce - 100, ce + 100),
- mode: w.mode,
- resultSoFar: Pe
- },
- _emitter: Q
- };
- if (g)
- return {
- language: b,
- value: ze(N),
- illegal: false,
- relevance: 0,
- errorRaised: w,
- _emitter: Q,
- _top: C
- };
- throw w;
- }
- }
- function u(b) {
- const N = {
- value: ze(b),
- illegal: false,
- relevance: 0,
- _top: t,
- _emitter: new i.__emitter(i)
- };
- return N._emitter.addText(b), N;
- }
- function d(b, N) {
- N = N || i.languages || Object.keys(r);
- const O = u(b), U = N.filter(L).filter(P).map(
- (V) => c(V, b, false)
- );
- U.unshift(O);
- const x = U.sort((V, ne) => {
- if (V.relevance !== ne.relevance)
- return ne.relevance - V.relevance;
- if (V.language && ne.language) {
- if (L(V.language).supersetOf === ne.language)
- return 1;
- if (L(ne.language).supersetOf === V.language)
- return -1;
- }
- return 0;
- }), [X, J] = x, Me = X;
- return Me.secondBest = J, Me;
- }
- function h(b, N, O) {
- const U = N && l[N] || O;
- b.classList.add("hljs"), b.classList.add(`language-${U}`);
- }
- function p(b) {
- let N = null;
- const O = a(b);
- if (s(O))
- return;
- if (oe(
- "before:highlightElement",
- { el: b, language: O }
- ), b.dataset.highlighted) {
- console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", b);
- return;
- }
- 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))
- throw new Zt(
- "One of your code blocks includes unescaped HTML.",
- b.innerHTML
- );
- N = b;
- const U = N.textContent, x = O ? o(U, { language: O, ignoreIllegals: true }) : d(U);
- b.innerHTML = x.value, b.dataset.highlighted = "yes", h(b, O, x.language), b.result = {
- language: x.language,
- // TODO: remove with version 11.0
- re: x.relevance,
- relevance: x.relevance
- }, x.secondBest && (b.secondBest = {
- language: x.secondBest.language,
- relevance: x.secondBest.relevance
- }), oe("after:highlightElement", { el: b, result: x, text: U });
- }
- function _(b) {
- i = fn(i, b);
- }
- const E = () => {
- A(), he("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
- };
- function m() {
- A(), he("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
- }
- let v = false;
- function A() {
- if (document.readyState === "loading") {
- v = true;
- return;
- }
- document.querySelectorAll(i.cssSelector).forEach(p);
- }
- function D() {
- v && A();
- }
- typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, false);
- function S(b, N) {
- let O = null;
- try {
- O = N(e);
- } catch (U) {
- if (ue("Language definition for '{}' could not be registered.".replace("{}", b)), g)
- ue(U);
- else
- throw U;
- O = t;
- }
- O.name || (O.name = b), r[b] = O, O.rawDefinition = N.bind(null, e), O.aliases && I(O.aliases, { languageName: b });
- }
- function M(b) {
- delete r[b];
- for (const N of Object.keys(l))
- l[N] === b && delete l[N];
- }
- function R() {
- return Object.keys(r);
- }
- function L(b) {
- return b = (b || "").toLowerCase(), r[b] || r[l[b]];
- }
- function I(b, { languageName: N }) {
- typeof b == "string" && (b = [b]), b.forEach((O) => {
- l[O.toLowerCase()] = N;
- });
- }
- function P(b) {
- const N = L(b);
- return N && !N.disableAutodetect;
- }
- function $(b) {
- b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (N) => {
- b["before:highlightBlock"](
- Object.assign({ block: N.el }, N)
- );
- }), b["after:highlightBlock"] && !b["after:highlightElement"] && (b["after:highlightElement"] = (N) => {
- b["after:highlightBlock"](
- Object.assign({ block: N.el }, N)
- );
- });
- }
- function K(b) {
- $(b), f.push(b);
- }
- function Y(b) {
- const N = f.indexOf(b);
- N !== -1 && f.splice(N, 1);
- }
- function oe(b, N) {
- const O = b;
- f.forEach(function(U) {
- U[O] && U[O](N);
- });
- }
- function ge(b) {
- return he("10.7.0", "highlightBlock will be removed entirely in v12.0"), he("10.7.0", "Please use highlightElement now."), p(b);
- }
- Object.assign(e, {
- highlight: o,
- highlightAuto: d,
- highlightAll: A,
- highlightElement: p,
- // TODO: Remove with v12 API
- highlightBlock: ge,
- configure: _,
- initHighlighting: E,
- initHighlightingOnLoad: m,
- registerLanguage: S,
- unregisterLanguage: M,
- listLanguages: R,
- getLanguage: L,
- registerAliases: I,
- autoDetection: P,
- inherit: fn,
- addPlugin: K,
- removePlugin: Y
- }), e.debugMode = function() {
- g = false;
- }, e.safeMode = function() {
- g = true;
- }, e.versionString = Qt, e.regex = {
- concat: fe,
- lookahead: wn,
- either: Ze,
- optional: lt,
- anyNumberOfTimes: ot
- };
- for (const b in Le)
- typeof Le[b] == "object" && mn(Le[b]);
- return Object.assign(e, Le), e;
- };
- var _e = Rn({});
- _e.newInstance = () => Rn({});
- var Xt = _e;
- _e.HighlightJS = _e;
- _e.default = _e;
- var q = tt(Xt);
- function Vt(e) {
- 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 = {
- className: "symbol",
- begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
- }, n = {
- begin: /\s/,
- contains: [
- {
- className: "keyword",
- begin: /#?[a-z_][a-z1-9_-]+/,
- illegal: /\n/
- }
- ]
- }, t = e.inherit(n, {
- begin: /\(/,
- end: /\)/
- }), i = e.inherit(e.APOS_STRING_MODE, { className: "string" }), s = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), a = {
- endsWithParent: true,
- illegal: /</,
- relevance: 0,
- contains: [
- {
- className: "attr",
- begin: f,
- relevance: 0
- },
- {
- begin: /=\s*/,
- relevance: 0,
- contains: [
- {
- className: "string",
- endsParent: true,
- variants: [
- {
- begin: /"/,
- end: /"/,
- contains: [g]
- },
- {
- begin: /'/,
- end: /'/,
- contains: [g]
- },
- { begin: /[^\s"'=<>`]+/ }
- ]
- }
- ]
- }
- ]
- };
- return {
- name: "HTML, XML",
- aliases: [
- "html",
- "xhtml",
- "rss",
- "atom",
- "xjb",
- "xsd",
- "xsl",
- "plist",
- "wsf",
- "svg"
- ],
- case_insensitive: true,
- unicodeRegex: true,
- contains: [
- {
- className: "meta",
- begin: /<![a-z]/,
- end: />/,
- relevance: 10,
- contains: [
- n,
- s,
- i,
- t,
- {
- begin: /\[/,
- end: /\]/,
- contains: [
- {
- className: "meta",
- begin: /<![a-z]/,
- end: />/,
- contains: [
- n,
- t,
- s,
- i
- ]
- }
- ]
- }
- ]
- },
- e.COMMENT(
- /<!--/,
- /-->/,
- { relevance: 10 }
- ),
- {
- begin: /<!\[CDATA\[/,
- end: /\]\]>/,
- relevance: 10
- },
- g,
- // xml processing instructions
- {
- className: "meta",
- end: /\?>/,
- variants: [
- {
- begin: /<\?xml/,
- relevance: 10,
- contains: [
- s
- ]
- },
- {
- begin: /<\?[a-z][a-z0-9]+/
- }
- ]
- },
- {
- className: "tag",
- /*
- The lookahead pattern (?=...) ensures that 'begin' only matches
- '<style' as a single word, followed by a whitespace or an
- ending bracket.
- */
- begin: /<style(?=\s|>)/,
- end: />/,
- keywords: { name: "style" },
- contains: [a],
- starts: {
- end: /<\/style>/,
- returnEnd: true,
- subLanguage: [
- "css",
- "xml"
- ]
- }
- },
- {
- className: "tag",
- // See the comment in the <style tag about the lookahead pattern
- begin: /<script(?=\s|>)/,
- end: />/,
- keywords: { name: "script" },
- contains: [a],
- starts: {
- end: /<\/script>/,
- returnEnd: true,
- subLanguage: [
- "javascript",
- "handlebars",
- "xml"
- ]
- }
- },
- // we need this for now for jSX
- {
- className: "tag",
- begin: /<>|<\/>/
- },
- // open tag
- {
- className: "tag",
- begin: r.concat(
- /</,
- r.lookahead(r.concat(
- l,
- // <tag/>
- // <tag>
- // <tag ...
- r.either(/\/>/, />/, /\s/)
- ))
- ),
- end: /\/?>/,
- contains: [
- {
- className: "name",
- begin: l,
- relevance: 0,
- starts: a
- }
- ]
- },
- // close tag
- {
- className: "tag",
- begin: r.concat(
- /<\//,
- r.lookahead(r.concat(
- l,
- />/
- ))
- ),
- contains: [
- {
- className: "name",
- begin: l,
- relevance: 0
- },
- {
- begin: />/,
- relevance: 0,
- endsParent: true
- }
- ]
- }
- ]
- };
- }
- var hn = "[A-Za-z$_][0-9A-Za-z$_]*";
- var jt = [
- "as",
- // for exports
- "in",
- "of",
- "if",
- "for",
- "while",
- "finally",
- "var",
- "new",
- "function",
- "do",
- "return",
- "void",
- "else",
- "break",
- "catch",
- "instanceof",
- "with",
- "throw",
- "case",
- "default",
- "try",
- "switch",
- "continue",
- "typeof",
- "delete",
- "let",
- "yield",
- "const",
- "class",
- // JS handles these with a special rule
- // "get",
- // "set",
- "debugger",
- "async",
- "await",
- "static",
- "import",
- "from",
- "export",
- "extends"
- ];
- var qt = [
- "true",
- "false",
- "null",
- "undefined",
- "NaN",
- "Infinity"
- ];
- var On = [
- // Fundamental objects
- "Object",
- "Function",
- "Boolean",
- "Symbol",
- // numbers and dates
- "Math",
- "Date",
- "Number",
- "BigInt",
- // text
- "String",
- "RegExp",
- // Indexed collections
- "Array",
- "Float32Array",
- "Float64Array",
- "Int8Array",
- "Uint8Array",
- "Uint8ClampedArray",
- "Int16Array",
- "Int32Array",
- "Uint16Array",
- "Uint32Array",
- "BigInt64Array",
- "BigUint64Array",
- // Keyed collections
- "Set",
- "Map",
- "WeakSet",
- "WeakMap",
- // Structured data
- "ArrayBuffer",
- "SharedArrayBuffer",
- "Atomics",
- "DataView",
- "JSON",
- // Control abstraction objects
- "Promise",
- "Generator",
- "GeneratorFunction",
- "AsyncFunction",
- // Reflection
- "Reflect",
- "Proxy",
- // Internationalization
- "Intl",
- // WebAssembly
- "WebAssembly"
- ];
- var Cn = [
- "Error",
- "EvalError",
- "InternalError",
- "RangeError",
- "ReferenceError",
- "SyntaxError",
- "TypeError",
- "URIError"
- ];
- var In = [
- "setInterval",
- "setTimeout",
- "clearInterval",
- "clearTimeout",
- "require",
- "exports",
- "eval",
- "isFinite",
- "isNaN",
- "parseFloat",
- "parseInt",
- "decodeURI",
- "decodeURIComponent",
- "encodeURI",
- "encodeURIComponent",
- "escape",
- "unescape"
- ];
- var Jt = [
- "arguments",
- "this",
- "super",
- "console",
- "window",
- "document",
- "localStorage",
- "sessionStorage",
- "module",
- "global"
- // Node.js
- ];
- var er = [].concat(
- In,
- On,
- Cn
- );
- function nr(e) {
- const r = e.regex, l = (N, { after: O }) => {
- const U = "</" + N[0].slice(1);
- return N.input.indexOf(U, O) !== -1;
- }, f = hn, g = {
- begin: "<>",
- end: "</>"
- }, n = /<[A-Za-z0-9\\._:-]+\s*\/>/, t = {
- begin: /<[A-Za-z0-9\\._:-]+/,
- end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
- /**
- * @param {RegExpMatchArray} match
- * @param {CallbackResponse} response
- */
- isTrulyOpeningTag: (N, O) => {
- const U = N[0].length + N.index, x = N.input[U];
- if (
- // HTML should not include another raw `<` inside a tag
- // nested type?
- // `<Array<Array<number>>`, etc.
- x === "<" || // the , gives away that this is not HTML
- // `<T, A extends keyof T, V>`
- x === ","
- ) {
- O.ignoreMatch();
- return;
- }
- x === ">" && (l(N, { after: U }) || O.ignoreMatch());
- let X;
- const J = N.input.substring(U);
- if (X = J.match(/^\s*=/)) {
- O.ignoreMatch();
- return;
- }
- if ((X = J.match(/^\s+extends\s+/)) && X.index === 0) {
- O.ignoreMatch();
- return;
- }
- }
- }, i = {
- $pattern: hn,
- keyword: jt,
- literal: qt,
- built_in: er,
- "variable.language": Jt
- }, s = "[0-9](_?[0-9])*", a = `\\.(${s})`, o = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
- className: "number",
- variants: [
- // DecimalLiteral
- { begin: `(\\b(${o})((${a})|\\.)?|(${a}))[eE][+-]?(${s})\\b` },
- { begin: `\\b(${o})\\b((${a})\\b|\\.)?|(${a})\\b` },
- // DecimalBigIntegerLiteral
- { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
- // NonDecimalIntegerLiteral
- { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
- { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
- { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
- // LegacyOctalIntegerLiteral (does not include underscore separators)
- // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
- { begin: "\\b0[0-7]+n?\\b" }
- ],
- relevance: 0
- }, u = {
- className: "subst",
- begin: "\\$\\{",
- end: "\\}",
- keywords: i,
- contains: []
- // defined later
- }, d = {
- begin: "html`",
- end: "",
- starts: {
- end: "`",
- returnEnd: false,
- contains: [
- e.BACKSLASH_ESCAPE,
- u
- ],
- subLanguage: "xml"
- }
- }, h = {
- begin: "css`",
- end: "",
- starts: {
- end: "`",
- returnEnd: false,
- contains: [
- e.BACKSLASH_ESCAPE,
- u
- ],
- subLanguage: "css"
- }
- }, p = {
- begin: "gql`",
- end: "",
- starts: {
- end: "`",
- returnEnd: false,
- contains: [
- e.BACKSLASH_ESCAPE,
- u
- ],
- subLanguage: "graphql"
- }
- }, _ = {
- className: "string",
- begin: "`",
- end: "`",
- contains: [
- e.BACKSLASH_ESCAPE,
- u
- ]
- }, m = {
- className: "comment",
- variants: [
- e.COMMENT(
- /\/\*\*(?!\/)/,
- "\\*/",
- {
- relevance: 0,
- contains: [
- {
- begin: "(?=@[A-Za-z]+)",
- relevance: 0,
- contains: [
- {
- className: "doctag",
- begin: "@[A-Za-z]+"
- },
- {
- className: "type",
- begin: "\\{",
- end: "\\}",
- excludeEnd: true,
- excludeBegin: true,
- relevance: 0
- },
- {
- className: "variable",
- begin: f + "(?=\\s*(-)|$)",
- endsParent: true,
- relevance: 0
- },
- // eat spaces (not newlines) so we can find
- // types or variables
- {
- begin: /(?=[^\n])\s/,
- relevance: 0
- }
- ]
- }
- ]
- }
- ),
- e.C_BLOCK_COMMENT_MODE,
- e.C_LINE_COMMENT_MODE
- ]
- }, v = [
- e.APOS_STRING_MODE,
- e.QUOTE_STRING_MODE,
- d,
- h,
- p,
- _,
- // Skip numbers when they are part of a variable name
- { match: /\$\d+/ },
- c
- // This is intentional:
- // See https://github.com/highlightjs/highlight.js/issues/3288
- // hljs.REGEXP_MODE
- ];
- u.contains = v.concat({
- // we need to pair up {} inside our subst to prevent
- // it from ending too early by matching another }
- begin: /\{/,
- end: /\}/,
- keywords: i,
- contains: [
- "self"
- ].concat(v)
- });
- const A = [].concat(m, u.contains), D = A.concat([
- // eat recursive parens in sub expressions
- {
- begin: /\(/,
- end: /\)/,
- keywords: i,
- contains: ["self"].concat(A)
- }
- ]), S = {
- className: "params",
- begin: /\(/,
- end: /\)/,
- excludeBegin: true,
- excludeEnd: true,
- keywords: i,
- contains: D
- }, M = {
- variants: [
- // class Car extends vehicle
- {
- match: [
- /class/,
- /\s+/,
- f,
- /\s+/,
- /extends/,
- /\s+/,
- r.concat(f, "(", r.concat(/\./, f), ")*")
- ],
- scope: {
- 1: "keyword",
- 3: "title.class",
- 5: "keyword",
- 7: "title.class.inherited"
- }
- },
- // class Car
- {
- match: [
- /class/,
- /\s+/,
- f
- ],
- scope: {
- 1: "keyword",
- 3: "title.class"
- }
- }
- ]
- }, R = {
- relevance: 0,
- match: r.either(
- // Hard coded exceptions
- /\bJSON/,
- // Float32Array, OutT
- /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
- // CSSFactory, CSSFactoryT
- /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
- // FPs, FPsT
- /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
- // P
- // single letters are not highlighted
- // BLAH
- // this will be flagged as a UPPER_CASE_CONSTANT instead
- ),
- className: "title.class",
- keywords: {
- _: [
- // se we still get relevance credit for JS library classes
- ...On,
- ...Cn
- ]
- }
- }, L = {
- label: "use_strict",
- className: "meta",
- relevance: 10,
- begin: /^\s*['"]use (strict|asm)['"]/
- }, I = {
- variants: [
- {
- match: [
- /function/,
- /\s+/,
- f,
- /(?=\s*\()/
- ]
- },
- // anonymous function
- {
- match: [
- /function/,
- /\s*(?=\()/
- ]
- }
- ],
- className: {
- 1: "keyword",
- 3: "title.function"
- },
- label: "func.def",
- contains: [S],
- illegal: /%/
- }, P = {
- relevance: 0,
- match: /\b[A-Z][A-Z_0-9]+\b/,
- className: "variable.constant"
- };
- function $(N) {
- return r.concat("(?!", N.join("|"), ")");
- }
- const K = {
- match: r.concat(
- /\b/,
- $([
- ...In,
- "super",
- "import"
- ]),
- f,
- r.lookahead(/\(/)
- ),
- className: "title.function",
- relevance: 0
- }, Y = {
- begin: r.concat(/\./, r.lookahead(
- r.concat(f, /(?![0-9A-Za-z$_(])/)
- )),
- end: f,
- excludeBegin: true,
- keywords: "prototype",
- className: "property",
- relevance: 0
- }, oe = {
- match: [
- /get|set/,
- /\s+/,
- f,
- /(?=\()/
- ],
- className: {
- 1: "keyword",
- 3: "title.function"
- },
- contains: [
- {
- // eat to avoid empty params
- begin: /\(\)/
- },
- S
- ]
- }, ge = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
- match: [
- /const|var|let/,
- /\s+/,
- f,
- /\s*/,
- /=\s*/,
- /(async\s*)?/,
- // async is optional
- r.lookahead(ge)
- ],
- keywords: "async",
- className: {
- 1: "keyword",
- 3: "title.function"
- },
- contains: [
- S
- ]
- };
- return {
- name: "JavaScript",
- aliases: ["js", "jsx", "mjs", "cjs"],
- keywords: i,
- // this will be extended by TypeScript
- exports: { PARAMS_CONTAINS: D, CLASS_REFERENCE: R },
- illegal: /#(?![$_A-z])/,
- contains: [
- e.SHEBANG({
- label: "shebang",
- binary: "node",
- relevance: 5
- }),
- L,
- e.APOS_STRING_MODE,
- e.QUOTE_STRING_MODE,
- d,
- h,
- p,
- _,
- m,
- // Skip numbers when they are part of a variable name
- { match: /\$\d+/ },
- c,
- R,
- {
- className: "attr",
- begin: f + r.lookahead(":"),
- relevance: 0
- },
- b,
- {
- // "value" container
- begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
- keywords: "return throw case",
- relevance: 0,
- contains: [
- m,
- e.REGEXP_MODE,
- {
- className: "function",
- // we have to count the parens to make sure we actually have the
- // correct bounding ( ) before the =>. There could be any number of
- // sub-expressions inside also surrounded by parens.
- begin: ge,
- returnBegin: true,
- end: "\\s*=>",
- contains: [
- {
- className: "params",
- variants: [
- {
- begin: e.UNDERSCORE_IDENT_RE,
- relevance: 0
- },
- {
- className: null,
- begin: /\(\s*\)/,
- skip: true
- },
- {
- begin: /\(/,
- end: /\)/,
- excludeBegin: true,
- excludeEnd: true,
- keywords: i,
- contains: D
- }
- ]
- }
- ]
- },
- {
- // could be a comma delimited list of params to a function call
- begin: /,/,
- relevance: 0
- },
- {
- match: /\s+/,
- relevance: 0
- },
- {
- // JSX
- variants: [
- { begin: g.begin, end: g.end },
- { match: n },
- {
- begin: t.begin,
- // we carefully check the opening tag to see if it truly
- // is a tag and not a false positive
- "on:begin": t.isTrulyOpeningTag,
- end: t.end
- }
- ],
- subLanguage: "xml",
- contains: [
- {
- begin: t.begin,
- end: t.end,
- skip: true,
- contains: ["self"]
- }
- ]
- }
- ]
- },
- I,
- {
- // prevent this from getting swallowed up by function
- // since they appear "function like"
- beginKeywords: "while if switch catch for"
- },
- {
- // we have to count the parens to make sure we actually have the correct
- // bounding ( ). There could be any number of sub-expressions inside
- // also surrounded by parens.
- begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
- // end parens
- returnBegin: true,
- label: "func.def",
- contains: [
- S,
- e.inherit(e.TITLE_MODE, { begin: f, className: "title.function" })
- ]
- },
- // catch ... so it won't trigger the property rule below
- {
- match: /\.\.\./,
- relevance: 0
- },
- Y,
- // hack: prevents detection of keywords in some circumstances
- // .keyword()
- // $keyword = x
- {
- match: "\\$" + f,
- relevance: 0
- },
- {
- match: [/\bconstructor(?=\s*\()/],
- className: { 1: "title.function" },
- contains: [S]
- },
- K,
- P,
- M,
- oe,
- {
- match: /\$[(.]/
- // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
- }
- ]
- };
- }
- function tr(e) {
- const r = {
- className: "attr",
- begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
- relevance: 1.01
- }, l = {
- match: /[{}[\],:]/,
- className: "punctuation",
- relevance: 0
- }, f = [
- "true",
- "false",
- "null"
- ], g = {
- scope: "literal",
- beginKeywords: f.join(" ")
- };
- return {
- name: "JSON",
- keywords: {
- literal: f
- },
- contains: [
- r,
- l,
- e.QUOTE_STRING_MODE,
- g,
- e.C_NUMBER_MODE,
- e.C_LINE_COMMENT_MODE,
- e.C_BLOCK_COMMENT_MODE
- ],
- illegal: "\\S"
- };
- }
- function rr(e) {
- const r = "true false yes no null", l = "[\\w#;/?:@&=+$,.~*'()[\\]]+", f = {
- className: "attr",
- variants: [
- { begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
- {
- // double quoted keys
- begin: '"\\w[\\w :\\/.-]*":(?=[ ]|$)'
- },
- {
- // single quoted keys
- begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
- }
- ]
- }, g = {
- className: "template-variable",
- variants: [
- {
- // jinja templates Ansible
- begin: /\{\{/,
- end: /\}\}/
- },
- {
- // Ruby i18n
- begin: /%\{/,
- end: /\}/
- }
- ]
- }, n = {
- className: "string",
- relevance: 0,
- variants: [
- {
- begin: /'/,
- end: /'/
- },
- {
- begin: /"/,
- end: /"/
- },
- { begin: /\S+/ }
- ],
- contains: [
- e.BACKSLASH_ESCAPE,
- g
- ]
- }, t = e.inherit(n, { variants: [
- {
- begin: /'/,
- end: /'/
- },
- {
- begin: /"/,
- end: /"/
- },
- { begin: /[^\s,{}[\]]+/ }
- ] }), 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 = {
- className: "number",
- begin: "\\b" + i + s + a + o + "\\b"
- }, u = {
- end: ",",
- endsWithParent: true,
- excludeEnd: true,
- keywords: r,
- relevance: 0
- }, d = {
- begin: /\{/,
- end: /\}/,
- contains: [u],
- illegal: "\\n",
- relevance: 0
- }, h = {
- begin: "\\[",
- end: "\\]",
- contains: [u],
- illegal: "\\n",
- relevance: 0
- }, p = [
- f,
- {
- className: "meta",
- begin: "^---\\s*$",
- relevance: 10
- },
- {
- // multi line string
- // Blocks start with a | or > followed by a newline
- //
- // Indentation of subsequent lines must be the same to
- // be considered part of the block
- className: "string",
- begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
- },
- {
- // Ruby/Rails erb
- begin: "<%[%=-]?",
- end: "[%-]?%>",
- subLanguage: "ruby",
- excludeBegin: true,
- excludeEnd: true,
- relevance: 0
- },
- {
- // named tags
- className: "type",
- begin: "!\\w+!" + l
- },
- // https://yaml.org/spec/1.2/spec.html#id2784064
- {
- // verbatim tags
- className: "type",
- begin: "!<" + l + ">"
- },
- {
- // primary tags
- className: "type",
- begin: "!" + l
- },
- {
- // secondary tags
- className: "type",
- begin: "!!" + l
- },
- {
- // fragment id &ref
- className: "meta",
- begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
- },
- {
- // fragment reference *ref
- className: "meta",
- begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
- },
- {
- // array listing
- className: "bullet",
- // TODO: remove |$ hack when we have proper look-ahead support
- begin: "-(?=[ ]|$)",
- relevance: 0
- },
- e.HASH_COMMENT_MODE,
- {
- beginKeywords: r,
- keywords: { literal: r }
- },
- c,
- // numbers are any valid C-style number that
- // sit isolated from other words
- {
- className: "number",
- begin: e.C_NUMBER_RE + "\\b",
- relevance: 0
- },
- d,
- h,
- n
- ], _ = [...p];
- return _.pop(), _.push(t), u.contains = _, {
- name: "YAML",
- case_insensitive: true,
- aliases: ["yml"],
- contains: p
- };
- }
- function ir(e) {
- return {
- name: "Plain text",
- aliases: [
- "text",
- "txt"
- ],
- disableAutodetect: true
- };
- }
- function sr(e) {
- const r = e.regex, l = /[\p{XID_Start}_]\p{XID_Continue}*/u, f = [
- "and",
- "as",
- "assert",
- "async",
- "await",
- "break",
- "case",
- "class",
- "continue",
- "def",
- "del",
- "elif",
- "else",
- "except",
- "finally",
- "for",
- "from",
- "global",
- "if",
- "import",
- "in",
- "is",
- "lambda",
- "match",
- "nonlocal|10",
- "not",
- "or",
- "pass",
- "raise",
- "return",
- "try",
- "while",
- "with",
- "yield"
- ], i = {
- $pattern: /[A-Za-z]\w+|__\w+__/,
- keyword: f,
- built_in: [
- "__import__",
- "abs",
- "all",
- "any",
- "ascii",
- "bin",
- "bool",
- "breakpoint",
- "bytearray",
- "bytes",
- "callable",
- "chr",
- "classmethod",
- "compile",
- "complex",
- "delattr",
- "dict",
- "dir",
- "divmod",
- "enumerate",
- "eval",
- "exec",
- "filter",
- "float",
- "format",
- "frozenset",
- "getattr",
- "globals",
- "hasattr",
- "hash",
- "help",
- "hex",
- "id",
- "input",
- "int",
- "isinstance",
- "issubclass",
- "iter",
- "len",
- "list",
- "locals",
- "map",
- "max",
- "memoryview",
- "min",
- "next",
- "object",
- "oct",
- "open",
- "ord",
- "pow",
- "print",
- "property",
- "range",
- "repr",
- "reversed",
- "round",
- "set",
- "setattr",
- "slice",
- "sorted",
- "staticmethod",
- "str",
- "sum",
- "super",
- "tuple",
- "type",
- "vars",
- "zip"
- ],
- literal: [
- "__debug__",
- "Ellipsis",
- "False",
- "None",
- "NotImplemented",
- "True"
- ],
- type: [
- "Any",
- "Callable",
- "Coroutine",
- "Dict",
- "List",
- "Literal",
- "Generic",
- "Optional",
- "Sequence",
- "Set",
- "Tuple",
- "Type",
- "Union"
- ]
- }, s = {
- className: "meta",
- begin: /^(>>>|\.\.\.) /
- }, a = {
- className: "subst",
- begin: /\{/,
- end: /\}/,
- keywords: i,
- illegal: /#/
- }, o = {
- begin: /\{\{/,
- relevance: 0
- }, c = {
- className: "string",
- contains: [e.BACKSLASH_ESCAPE],
- variants: [
- {
- begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
- end: /'''/,
- contains: [
- e.BACKSLASH_ESCAPE,
- s
- ],
- relevance: 10
- },
- {
- begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
- end: /"""/,
- contains: [
- e.BACKSLASH_ESCAPE,
- s
- ],
- relevance: 10
- },
- {
- begin: /([fF][rR]|[rR][fF]|[fF])'''/,
- end: /'''/,
- contains: [
- e.BACKSLASH_ESCAPE,
- s,
- o,
- a
- ]
- },
- {
- begin: /([fF][rR]|[rR][fF]|[fF])"""/,
- end: /"""/,
- contains: [
- e.BACKSLASH_ESCAPE,
- s,
- o,
- a
- ]
- },
- {
- begin: /([uU]|[rR])'/,
- end: /'/,
- relevance: 10
- },
- {
- begin: /([uU]|[rR])"/,
- end: /"/,
- relevance: 10
- },
- {
- begin: /([bB]|[bB][rR]|[rR][bB])'/,
- end: /'/
- },
- {
- begin: /([bB]|[bB][rR]|[rR][bB])"/,
- end: /"/
- },
- {
- begin: /([fF][rR]|[rR][fF]|[fF])'/,
- end: /'/,
- contains: [
- e.BACKSLASH_ESCAPE,
- o,
- a
- ]
- },
- {
- begin: /([fF][rR]|[rR][fF]|[fF])"/,
- end: /"/,
- contains: [
- e.BACKSLASH_ESCAPE,
- o,
- a
- ]
- },
- e.APOS_STRING_MODE,
- e.QUOTE_STRING_MODE
- ]
- }, u = "[0-9](_?[0-9])*", d = `(\\b(${u}))?\\.(${u})|\\b(${u})\\.`, h = `\\b|${f.join("|")}`, p = {
- className: "number",
- relevance: 0,
- variants: [
- // exponentfloat, pointfloat
- // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
- // optionally imaginary
- // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
- // Note: no leading \b because floats can start with a decimal point
- // and we don't want to mishandle e.g. `fn(.5)`,
- // no trailing \b for pointfloat because it can end with a decimal point
- // and we don't want to mishandle e.g. `0..hex()`; this should be safe
- // because both MUST contain a decimal point and so cannot be confused with
- // the interior part of an identifier
- {
- begin: `(\\b(${u})|(${d}))[eE][+-]?(${u})[jJ]?(?=${h})`
- },
- {
- begin: `(${d})[jJ]?`
- },
- // decinteger, bininteger, octinteger, hexinteger
- // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
- // optionally "long" in Python 2
- // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
- // decinteger is optionally imaginary
- // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
- {
- begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`
- },
- {
- begin: `\\b0[bB](_?[01])+[lL]?(?=${h})`
- },
- {
- begin: `\\b0[oO](_?[0-7])+[lL]?(?=${h})`
- },
- {
- begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`
- },
- // imagnumber (digitpart-based)
- // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
- {
- begin: `\\b(${u})[jJ](?=${h})`
- }
- ]
- }, _ = {
- className: "comment",
- begin: r.lookahead(/# type:/),
- end: /$/,
- keywords: i,
- contains: [
- {
- // prevent keywords from coloring `type`
- begin: /# type:/
- },
- // comment within a datatype comment includes no keywords
- {
- begin: /#/,
- end: /\b\B/,
- endsWithParent: true
- }
- ]
- }, E = {
- className: "params",
- variants: [
- // Exclude params in functions without params
- {
- className: "",
- begin: /\(\s*\)/,
- skip: true
- },
- {
- begin: /\(/,
- end: /\)/,
- excludeBegin: true,
- excludeEnd: true,
- keywords: i,
- contains: [
- "self",
- s,
- p,
- c,
- e.HASH_COMMENT_MODE
- ]
- }
- ]
- };
- return a.contains = [
- c,
- p,
- s
- ], {
- name: "Python",
- aliases: [
- "py",
- "gyp",
- "ipython"
- ],
- unicodeRegex: true,
- keywords: i,
- illegal: /(<\/|\?)|=>/,
- contains: [
- s,
- p,
- {
- // very common convention
- begin: /\bself\b/
- },
- {
- // eat "if" prior to string so that it won't accidentally be
- // labeled as an f-string
- beginKeywords: "if",
- relevance: 0
- },
- c,
- _,
- e.HASH_COMMENT_MODE,
- {
- match: [
- /\bdef/,
- /\s+/,
- l
- ],
- scope: {
- 1: "keyword",
- 3: "title.function"
- },
- contains: [E]
- },
- {
- variants: [
- {
- match: [
- /\bclass/,
- /\s+/,
- l,
- /\s*/,
- /\(\s*/,
- l,
- /\s*\)/
- ]
- },
- {
- match: [
- /\bclass/,
- /\s+/,
- l
- ]
- }
- ],
- scope: {
- 1: "keyword",
- 3: "title.class",
- 6: "title.class.inherited"
- }
- },
- {
- className: "meta",
- begin: /^[\t ]*@/,
- end: /(?=#)|$/,
- contains: [
- p,
- E,
- c
- ]
- }
- ]
- };
- }
- var de = "[0-9](_*[0-9])*";
- var Re = `\\.(${de})`;
- var Oe = "[0-9a-fA-F](_*[0-9a-fA-F])*";
- var dn = {
- className: "number",
- variants: [
- // DecimalFloatingPointLiteral
- // including ExponentPart
- { begin: `(\\b(${de})((${Re})|\\.)?|(${Re}))[eE][+-]?(${de})[fFdD]?\\b` },
- // excluding ExponentPart
- { begin: `\\b(${de})((${Re})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
- { begin: `(${Re})[fFdD]?\\b` },
- { begin: `\\b(${de})[fFdD]\\b` },
- // HexadecimalFloatingPointLiteral
- { begin: `\\b0[xX]((${Oe})\\.?|(${Oe})?\\.(${Oe}))[pP][+-]?(${de})[fFdD]?\\b` },
- // DecimalIntegerLiteral
- { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
- // HexIntegerLiteral
- { begin: `\\b0[xX](${Oe})[lL]?\\b` },
- // OctalIntegerLiteral
- { begin: "\\b0(_*[0-7])*[lL]?\\b" },
- // BinaryIntegerLiteral
- { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
- ],
- relevance: 0
- };
- function kn(e, r, l) {
- return l === -1 ? "" : e.replace(r, (f) => kn(e, r, l - 1));
- }
- function ar(e) {
- const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", f = l + kn("(?:<" + l + "~~~(?:\\s*,\\s*" + l + "~~~)*>)?", /~~~/g, 2), s = {
- keyword: [
- "synchronized",
- "abstract",
- "private",
- "var",
- "static",
- "if",
- "const ",
- "for",
- "while",
- "strictfp",
- "finally",
- "protected",
- "import",
- "native",
- "final",
- "void",
- "enum",
- "else",
- "break",
- "transient",
- "catch",
- "instanceof",
- "volatile",
- "case",
- "assert",
- "package",
- "default",
- "public",
- "try",
- "switch",
- "continue",
- "throws",
- "protected",
- "public",
- "private",
- "module",
- "requires",
- "exports",
- "do",
- "sealed",
- "yield",
- "permits"
- ],
- literal: [
- "false",
- "true",
- "null"
- ],
- type: [
- "char",
- "boolean",
- "long",
- "float",
- "int",
- "byte",
- "short",
- "double"
- ],
- built_in: [
- "super",
- "this"
- ]
- }, a = {
- className: "meta",
- begin: "@" + l,
- contains: [
- {
- begin: /\(/,
- end: /\)/,
- contains: ["self"]
- // allow nested () inside our annotation
- }
- ]
- }, o = {
- className: "params",
- begin: /\(/,
- end: /\)/,
- keywords: s,
- relevance: 0,
- contains: [e.C_BLOCK_COMMENT_MODE],
- endsParent: true
- };
- return {
- name: "Java",
- aliases: ["jsp"],
- keywords: s,
- illegal: /<\/|#/,
- contains: [
- e.COMMENT(
- "/\\*\\*",
- "\\*/",
- {
- relevance: 0,
- contains: [
- {
- // eat up @'s in emails to prevent them to be recognized as doctags
- begin: /\w+@/,
- relevance: 0
- },
- {
- className: "doctag",
- begin: "@[A-Za-z]+"
- }
- ]
- }
- ),
- // relevance boost
- {
- begin: /import java\.[a-z]+\./,
- keywords: "import",
- relevance: 2
- },
- e.C_LINE_COMMENT_MODE,
- e.C_BLOCK_COMMENT_MODE,
- {
- begin: /"""/,
- end: /"""/,
- className: "string",
- contains: [e.BACKSLASH_ESCAPE]
- },
- e.APOS_STRING_MODE,
- e.QUOTE_STRING_MODE,
- {
- match: [
- /\b(?:class|interface|enum|extends|implements|new)/,
- /\s+/,
- l
- ],
- className: {
- 1: "keyword",
- 3: "title.class"
- }
- },
- {
- // Exceptions for hyphenated keywords
- match: /non-sealed/,
- scope: "keyword"
- },
- {
- begin: [
- r.concat(/(?!else)/, l),
- /\s+/,
- l,
- /\s+/,
- /=(?!=)/
- ],
- className: {
- 1: "type",
- 3: "variable",
- 5: "operator"
- }
- },
- {
- begin: [
- /record/,
- /\s+/,
- l
- ],
- className: {
- 1: "keyword",
- 3: "title.class"
- },
- contains: [
- o,
- e.C_LINE_COMMENT_MODE,
- e.C_BLOCK_COMMENT_MODE
- ]
- },
- {
- // Expression keywords prevent 'keyword Name(...)' from being
- // recognized as a function definition
- beginKeywords: "new throw return else",
- relevance: 0
- },
- {
- begin: [
- "(?:" + f + "\\s+)",
- e.UNDERSCORE_IDENT_RE,
- /\s*(?=\()/
- ],
- className: { 2: "title.function" },
- keywords: s,
- contains: [
- {
- className: "params",
- begin: /\(/,
- end: /\)/,
- keywords: s,
- relevance: 0,
- contains: [
- a,
- e.APOS_STRING_MODE,
- e.QUOTE_STRING_MODE,
- dn,
- e.C_BLOCK_COMMENT_MODE
- ]
- },
- e.C_LINE_COMMENT_MODE,
- e.C_BLOCK_COMMENT_MODE
- ]
- },
- dn,
- a
- ]
- };
- }
- function or(e) {
- const r = e.regex, l = {}, f = {
- begin: /\$\{/,
- end: /\}/,
- contains: [
- "self",
- {
- begin: /:-/,
- contains: [l]
- }
- // default values
- ]
- };
- Object.assign(l, {
- className: "variable",
- variants: [
- { begin: r.concat(
- /\$[\w\d#@][\w\d_]*/,
- // negative look-ahead tries to avoid matching patterns that are not
- // Perl at all like $ident$, @ident@, etc.
- "(?![\\w\\d])(?![$])"
- ) },
- f
- ]
- });
- const g = {
- className: "subst",
- begin: /\$\(/,
- end: /\)/,
- contains: [e.BACKSLASH_ESCAPE]
- }, n = {
- begin: /<<-?\s*(?=\w+)/,
- starts: { contains: [
- e.END_SAME_AS_BEGIN({
- begin: /(\w+)/,
- end: /(\w+)/,
- className: "string"
- })
- ] }
- }, t = {
- className: "string",
- begin: /"/,
- end: /"/,
- contains: [
- e.BACKSLASH_ESCAPE,
- l,
- g
- ]
- };
- g.contains.push(t);
- const i = {
- match: /\\"/
- }, s = {
- className: "string",
- begin: /'/,
- end: /'/
- }, a = {
- match: /\\'/
- }, o = {
- begin: /\$?\(\(/,
- end: /\)\)/,
- contains: [
- {
- begin: /\d+#[0-9a-f]+/,
- className: "number"
- },
- e.NUMBER_MODE,
- l
- ]
- }, c = [
- "fish",
- "bash",
- "zsh",
- "sh",
- "csh",
- "ksh",
- "tcsh",
- "dash",
- "scsh"
- ], u = e.SHEBANG({
- binary: `(${c.join("|")})`,
- relevance: 10
- }), d = {
- className: "function",
- begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
- returnBegin: true,
- contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
- relevance: 0
- }, h = [
- "if",
- "then",
- "else",
- "elif",
- "fi",
- "for",
- "while",
- "until",
- "in",
- "do",
- "done",
- "case",
- "esac",
- "function",
- "select"
- ], p = [
- "true",
- "false"
- ], _ = { match: /(\/[a-z._-]+)+/ }, E = [
- "break",
- "cd",
- "continue",
- "eval",
- "exec",
- "exit",
- "export",
- "getopts",
- "hash",
- "pwd",
- "readonly",
- "return",
- "shift",
- "test",
- "times",
- "trap",
- "umask",
- "unset"
- ], m = [
- "alias",
- "bind",
- "builtin",
- "caller",
- "command",
- "declare",
- "echo",
- "enable",
- "help",
- "let",
- "local",
- "logout",
- "mapfile",
- "printf",
- "read",
- "readarray",
- "source",
- "type",
- "typeset",
- "ulimit",
- "unalias"
- ], v = [
- "autoload",
- "bg",
- "bindkey",
- "bye",
- "cap",
- "chdir",
- "clone",
- "comparguments",
- "compcall",
- "compctl",
- "compdescribe",
- "compfiles",
- "compgroups",
- "compquote",
- "comptags",
- "comptry",
- "compvalues",
- "dirs",
- "disable",
- "disown",
- "echotc",
- "echoti",
- "emulate",
- "fc",
- "fg",
- "float",
- "functions",
- "getcap",
- "getln",
- "history",
- "integer",
- "jobs",
- "kill",
- "limit",
- "log",
- "noglob",
- "popd",
- "print",
- "pushd",
- "pushln",
- "rehash",
- "sched",
- "setcap",
- "setopt",
- "stat",
- "suspend",
- "ttyctl",
- "unfunction",
- "unhash",
- "unlimit",
- "unsetopt",
- "vared",
- "wait",
- "whence",
- "where",
- "which",
- "zcompile",
- "zformat",
- "zftp",
- "zle",
- "zmodload",
- "zparseopts",
- "zprof",
- "zpty",
- "zregexparse",
- "zsocket",
- "zstyle",
- "ztcp"
- ], A = [
- "chcon",
- "chgrp",
- "chown",
- "chmod",
- "cp",
- "dd",
- "df",
- "dir",
- "dircolors",
- "ln",
- "ls",
- "mkdir",
- "mkfifo",
- "mknod",
- "mktemp",
- "mv",
- "realpath",
- "rm",
- "rmdir",
- "shred",
- "sync",
- "touch",
- "truncate",
- "vdir",
- "b2sum",
- "base32",
- "base64",
- "cat",
- "cksum",
- "comm",
- "csplit",
- "cut",
- "expand",
- "fmt",
- "fold",
- "head",
- "join",
- "md5sum",
- "nl",
- "numfmt",
- "od",
- "paste",
- "ptx",
- "pr",
- "sha1sum",
- "sha224sum",
- "sha256sum",
- "sha384sum",
- "sha512sum",
- "shuf",
- "sort",
- "split",
- "sum",
- "tac",
- "tail",
- "tr",
- "tsort",
- "unexpand",
- "uniq",
- "wc",
- "arch",
- "basename",
- "chroot",
- "date",
- "dirname",
- "du",
- "echo",
- "env",
- "expr",
- "factor",
- // "false", // keyword literal already
- "groups",
- "hostid",
- "id",
- "link",
- "logname",
- "nice",
- "nohup",
- "nproc",
- "pathchk",
- "pinky",
- "printenv",
- "printf",
- "pwd",
- "readlink",
- "runcon",
- "seq",
- "sleep",
- "stat",
- "stdbuf",
- "stty",
- "tee",
- "test",
- "timeout",
- // "true", // keyword literal already
- "tty",
- "uname",
- "unlink",
- "uptime",
- "users",
- "who",
- "whoami",
- "yes"
- ];
- return {
- name: "Bash",
- aliases: ["sh"],
- keywords: {
- $pattern: /\b[a-z][a-z0-9._-]+\b/,
- keyword: h,
- literal: p,
- built_in: [
- ...E,
- ...m,
- // Shell modifiers
- "set",
- "shopt",
- ...v,
- ...A
- ]
- },
- contains: [
- u,
- // to catch known shells and boost relevancy
- e.SHEBANG(),
- // to catch unknown shells but still highlight the shebang
- d,
- o,
- e.HASH_COMMENT_MODE,
- n,
- _,
- t,
- i,
- s,
- a,
- l
- ]
- };
- }
- function lr(e) {
- const r = e.regex, l = e.COMMENT("--", "$"), f = {
- className: "string",
- variants: [
- {
- begin: /'/,
- end: /'/,
- contains: [{ begin: /''/ }]
- }
- ]
- }, g = {
- begin: /"/,
- end: /"/,
- contains: [{ begin: /""/ }]
- }, n = [
- "true",
- "false",
- // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
- // "null",
- "unknown"
- ], t = [
- "double precision",
- "large object",
- "with timezone",
- "without timezone"
- ], i = [
- "bigint",
- "binary",
- "blob",
- "boolean",
- "char",
- "character",
- "clob",
- "date",
- "dec",
- "decfloat",
- "decimal",
- "float",
- "int",
- "integer",
- "interval",
- "nchar",
- "nclob",
- "national",
- "numeric",
- "real",
- "row",
- "smallint",
- "time",
- "timestamp",
- "varchar",
- "varying",
- // modifier (character varying)
- "varbinary"
- ], s = [
- "add",
- "asc",
- "collation",
- "desc",
- "final",
- "first",
- "last",
- "view"
- ], a = [
- "abs",
- "acos",
- "all",
- "allocate",
- "alter",
- "and",
- "any",
- "are",
- "array",
- "array_agg",
- "array_max_cardinality",
- "as",
- "asensitive",
- "asin",
- "asymmetric",
- "at",
- "atan",
- "atomic",
- "authorization",
- "avg",
- "begin",
- "begin_frame",
- "begin_partition",
- "between",
- "bigint",
- "binary",
- "blob",
- "boolean",
- "both",
- "by",
- "call",
- "called",
- "cardinality",
- "cascaded",
- "case",
- "cast",
- "ceil",
- "ceiling",
- "char",
- "char_length",
- "character",
- "character_length",
- "check",
- "classifier",
- "clob",
- "close",
- "coalesce",
- "collate",
- "collect",
- "column",
- "commit",
- "condition",
- "connect",
- "constraint",
- "contains",
- "convert",
- "copy",
- "corr",
- "corresponding",
- "cos",
- "cosh",
- "count",
- "covar_pop",
- "covar_samp",
- "create",
- "cross",
- "cube",
- "cume_dist",
- "current",
- "current_catalog",
- "current_date",
- "current_default_transform_group",
- "current_path",
- "current_role",
- "current_row",
- "current_schema",
- "current_time",
- "current_timestamp",
- "current_path",
- "current_role",
- "current_transform_group_for_type",
- "current_user",
- "cursor",
- "cycle",
- "date",
- "day",
- "deallocate",
- "dec",
- "decimal",
- "decfloat",
- "declare",
- "default",
- "define",
- "delete",
- "dense_rank",
- "deref",
- "describe",
- "deterministic",
- "disconnect",
- "distinct",
- "double",
- "drop",
- "dynamic",
- "each",
- "element",
- "else",
- "empty",
- "end",
- "end_frame",
- "end_partition",
- "end-exec",
- "equals",
- "escape",
- "every",
- "except",
- "exec",
- "execute",
- "exists",
- "exp",
- "external",
- "extract",
- "false",
- "fetch",
- "filter",
- "first_value",
- "float",
- "floor",
- "for",
- "foreign",
- "frame_row",
- "free",
- "from",
- "full",
- "function",
- "fusion",
- "get",
- "global",
- "grant",
- "group",
- "grouping",
- "groups",
- "having",
- "hold",
- "hour",
- "identity",
- "in",
- "indicator",
- "initial",
- "inner",
- "inout",
- "insensitive",
- "insert",
- "int",
- "integer",
- "intersect",
- "intersection",
- "interval",
- "into",
- "is",
- "join",
- "json_array",
- "json_arrayagg",
- "json_exists",
- "json_object",
- "json_objectagg",
- "json_query",
- "json_table",
- "json_table_primitive",
- "json_value",
- "lag",
- "language",
- "large",
- "last_value",
- "lateral",
- "lead",
- "leading",
- "left",
- "like",
- "like_regex",
- "listagg",
- "ln",
- "local",
- "localtime",
- "localtimestamp",
- "log",
- "log10",
- "lower",
- "match",
- "match_number",
- "match_recognize",
- "matches",
- "max",
- "member",
- "merge",
- "method",
- "min",
- "minute",
- "mod",
- "modifies",
- "module",
- "month",
- "multiset",
- "national",
- "natural",
- "nchar",
- "nclob",
- "new",
- "no",
- "none",
- "normalize",
- "not",
- "nth_value",
- "ntile",
- "null",
- "nullif",
- "numeric",
- "octet_length",
- "occurrences_regex",
- "of",
- "offset",
- "old",
- "omit",
- "on",
- "one",
- "only",
- "open",
- "or",
- "order",
- "out",
- "outer",
- "over",
- "overlaps",
- "overlay",
- "parameter",
- "partition",
- "pattern",
- "per",
- "percent",
- "percent_rank",
- "percentile_cont",
- "percentile_disc",
- "period",
- "portion",
- "position",
- "position_regex",
- "power",
- "precedes",
- "precision",
- "prepare",
- "primary",
- "procedure",
- "ptf",
- "range",
- "rank",
- "reads",
- "real",
- "recursive",
- "ref",
- "references",
- "referencing",
- "regr_avgx",
- "regr_avgy",
- "regr_count",
- "regr_intercept",
- "regr_r2",
- "regr_slope",
- "regr_sxx",
- "regr_sxy",
- "regr_syy",
- "release",
- "result",
- "return",
- "returns",
- "revoke",
- "right",
- "rollback",
- "rollup",
- "row",
- "row_number",
- "rows",
- "running",
- "savepoint",
- "scope",
- "scroll",
- "search",
- "second",
- "seek",
- "select",
- "sensitive",
- "session_user",
- "set",
- "show",
- "similar",
- "sin",
- "sinh",
- "skip",
- "smallint",
- "some",
- "specific",
- "specifictype",
- "sql",
- "sqlexception",
- "sqlstate",
- "sqlwarning",
- "sqrt",
- "start",
- "static",
- "stddev_pop",
- "stddev_samp",
- "submultiset",
- "subset",
- "substring",
- "substring_regex",
- "succeeds",
- "sum",
- "symmetric",
- "system",
- "system_time",
- "system_user",
- "table",
- "tablesample",
- "tan",
- "tanh",
- "then",
- "time",
- "timestamp",
- "timezone_hour",
- "timezone_minute",
- "to",
- "trailing",
- "translate",
- "translate_regex",
- "translation",
- "treat",
- "trigger",
- "trim",
- "trim_array",
- "true",
- "truncate",
- "uescape",
- "union",
- "unique",
- "unknown",
- "unnest",
- "update",
- "upper",
- "user",
- "using",
- "value",
- "values",
- "value_of",
- "var_pop",
- "var_samp",
- "varbinary",
- "varchar",
- "varying",
- "versioning",
- "when",
- "whenever",
- "where",
- "width_bucket",
- "window",
- "with",
- "within",
- "without",
- "year"
- ], o = [
- "abs",
- "acos",
- "array_agg",
- "asin",
- "atan",
- "avg",
- "cast",
- "ceil",
- "ceiling",
- "coalesce",
- "corr",
- "cos",
- "cosh",
- "count",
- "covar_pop",
- "covar_samp",
- "cume_dist",
- "dense_rank",
- "deref",
- "element",
- "exp",
- "extract",
- "first_value",
- "floor",
- "json_array",
- "json_arrayagg",
- "json_exists",
- "json_object",
- "json_objectagg",
- "json_query",
- "json_table",
- "json_table_primitive",
- "json_value",
- "lag",
- "last_value",
- "lead",
- "listagg",
- "ln",
- "log",
- "log10",
- "lower",
- "max",
- "min",
- "mod",
- "nth_value",
- "ntile",
- "nullif",
- "percent_rank",
- "percentile_cont",
- "percentile_disc",
- "position",
- "position_regex",
- "power",
- "rank",
- "regr_avgx",
- "regr_avgy",
- "regr_count",
- "regr_intercept",
- "regr_r2",
- "regr_slope",
- "regr_sxx",
- "regr_sxy",
- "regr_syy",
- "row_number",
- "sin",
- "sinh",
- "sqrt",
- "stddev_pop",
- "stddev_samp",
- "substring",
- "substring_regex",
- "sum",
- "tan",
- "tanh",
- "translate",
- "translate_regex",
- "treat",
- "trim",
- "trim_array",
- "unnest",
- "upper",
- "value_of",
- "var_pop",
- "var_samp",
- "width_bucket"
- ], c = [
- "current_catalog",
- "current_date",
- "current_default_transform_group",
- "current_path",
- "current_role",
- "current_schema",
- "current_transform_group_for_type",
- "current_user",
- "session_user",
- "system_time",
- "system_user",
- "current_time",
- "localtime",
- "current_timestamp",
- "localtimestamp"
- ], u = [
- "create table",
- "insert into",
- "primary key",
- "foreign key",
- "not null",
- "alter table",
- "add constraint",
- "grouping sets",
- "on overflow",
- "character set",
- "respect nulls",
- "ignore nulls",
- "nulls first",
- "nulls last",
- "depth first",
- "breadth first"
- ], d = o, h = [
- ...a,
- ...s
- ].filter((v) => !o.includes(v)), p = {
- className: "variable",
- begin: /@[a-z0-9][a-z0-9_]*/
- }, _ = {
- className: "operator",
- begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
- relevance: 0
- }, E = {
- begin: r.concat(/\b/, r.either(...d), /\s*\(/),
- relevance: 0,
- keywords: { built_in: d }
- };
- function m(v, {
- exceptions: A,
- when: D
- } = {}) {
- const S = D;
- return A = A || [], v.map((M) => M.match(/\|\d+$/) || A.includes(M) ? M : S(M) ? `${M}|0` : M);
- }
- return {
- name: "SQL",
- case_insensitive: true,
- // does not include {} or HTML tags `</`
- illegal: /[{}]|<\//,
- keywords: {
- $pattern: /\b[\w\.]+/,
- keyword: m(h, { when: (v) => v.length < 3 }),
- literal: n,
- type: i,
- built_in: c
- },
- contains: [
- {
- begin: r.either(...u),
- relevance: 0,
- keywords: {
- $pattern: /[\w\.]+/,
- keyword: h.concat(u),
- literal: n,
- type: i
- }
- },
- {
- className: "type",
- begin: r.either(...t)
- },
- E,
- p,
- f,
- g,
- e.C_NUMBER_MODE,
- e.C_BLOCK_COMMENT_MODE,
- l,
- _
- ]
- };
- }
- q.registerLanguage("xml", Vt);
- q.registerLanguage("javascript", nr);
- q.registerLanguage("json", tr);
- q.registerLanguage("yaml", rr);
- q.registerLanguage("plaintext", ir);
- q.registerLanguage("python", sr);
- q.registerLanguage("java", ar);
- q.registerLanguage("bash", or);
- q.registerLanguage("sql", lr);
- var y = ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(y || {});
- var ie = "<code-diff-modified>";
- var se = "</code-diff-modified>";
- var cr = ie.replace("<", "<").replace(">", ">");
- var ur = se.replace("<", "<").replace(">", ">");
- function be(e) {
- return e === void 0 ? y.EQUAL : e.added ? y.ADD : e.removed ? y.DELETE : y.EQUAL;
- }
- function Be(e, r, l = "word") {
- return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (l === "char" ? Vn : qn)(e, r).filter((g) => be(g) !== y.DELETE).map(
- (g) => be(g) === y.ADD ? `${ie}${g.value}${se}` : g.value
- ).join("");
- }
- function Bn(e, r) {
- 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, false);
- return l.diff_charsToLines_(i, t), i.map((s) => {
- const [a, o] = s;
- return {
- count: o.replace(/\n$/, "").split(`
- `).length,
- value: o,
- removed: a === Fe.DIFF_DELETE,
- added: a === Fe.DIFF_INSERT
- };
- });
- }
- function j(e, r) {
- if (!r.match(new RegExp(`(${ie}|${se})`, "g")))
- return q.highlight(r, { language: e }).value;
- let f = r;
- const g = r.replace(new RegExp(`(${ie}|${se})`, "g"), ""), n = document.createElement("div");
- n.innerHTML = q.highlight(g, { language: e }).value;
- let t = false;
- const i = (s) => {
- s.childNodes.forEach((a) => {
- if (a.nodeType === Node.ELEMENT_NODE && i(a), a.nodeType === Node.TEXT_NODE) {
- if (!a.textContent)
- return;
- let o = a.textContent, c = "";
- for (t && (c = c + ie); o.length; ) {
- if (f.startsWith(ie)) {
- f = f.slice(ie.length), c = c + ie, t = true;
- continue;
- }
- if (f.startsWith(se)) {
- f = f.slice(se.length), c = c + se, t = false;
- continue;
- }
- const u = f.match(new RegExp(`(${ie}|${se})`)), d = u && u.index ? u.index : f.length, h = Math.min(d, o.length);
- c = c + f.substring(0, h), f = f.slice(h), o = o.slice(h);
- }
- t && (c = c + se), a.textContent = c;
- }
- });
- };
- return i(n), n.innerHTML.replace(new RegExp(cr, "g"), '<span class="x">').replace(new RegExp(ur, "g"), "</span>");
- }
- function $n(e, r) {
- const l = (s, a) => (s.match(new RegExp(a, "g")) || []).length, f = (s) => s.filter((a) => r == null ? void 0 : r.test(a)).length;
- let g = 0, n = 0, t = 0, i = 0;
- for (const s of e) {
- if (s.added) {
- const a = f(s.value.trim().split(`
- `));
- g += l(s.value.trim(), `
- `) + 1 - a, t += a;
- continue;
- }
- if (s.removed) {
- const a = f(s.value.trim().split(`
- `));
- n += l(s.value.trim(), `
- `) + 1 - a, i += a;
- continue;
- }
- }
- return {
- additionsNum: g,
- deletionsNum: n,
- ignoreAdditionsNum: t,
- ignoreDeletionsNum: i
- };
- }
- function fr(e, r, l = "plaintext", f = "word", g = false, n = 10, t) {
- 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;
- let c = 0, u = 0, d = false;
- const h = [], p = {
- changes: h,
- collector: [],
- stat: $n(a, o)
- };
- for (let m = 0; m < a.length; m++) {
- if (d) {
- d = false;
- continue;
- }
- const [v, A] = [a[m], a[m + 1]], [D, S] = [be(v), be(A)], M = v.value.replace(/\n$/, "").split(`
- `);
- if (A === void 0) {
- for (const L of M) {
- let I = i(), P = i();
- const $ = j(l, L);
- 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 });
- }
- break;
- }
- if (D === y.EQUAL)
- for (const L of M) {
- c++, u++;
- const I = j(l, L);
- h.push({
- left: s(y.EQUAL, c, I),
- right: s(y.EQUAL, u, I)
- });
- }
- const R = A.value.replace(/\n$/, "").split(`
- `);
- if (D === y.DELETE) {
- if (S === y.EQUAL)
- for (const L of M)
- c++, h.push({
- left: s(y.DELETE, c, j(l, L)),
- right: i()
- });
- if (S === y.ADD) {
- d = true;
- const L = Math.max(v.count, A.count);
- for (let I = 0; I < L; I++) {
- I < v.count && c++, I < A.count && u++;
- 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();
- h.push({ left: N, right: O });
- }
- }
- }
- if (D === y.ADD)
- for (const L of M)
- u++, h.push({
- left: i(),
- right: s(y.ADD, u, j(l, L))
- });
- }
- if (e === r) {
- for (let m = 0; m < h.length; m++)
- h[m].fold = false;
- return p;
- }
- for (let m = 0; m < h.length; m++) {
- const v = h[m];
- if (v.left.type === y.DELETE || v.right.type === y.ADD) {
- const [A, D] = [Math.max(m - n, 0), Math.min(m + n + 1, h.length)];
- for (let S = A; S < D; S++)
- h[S].fold = false;
- }
- v.fold === void 0 && (v.fold = true);
- }
- const _ = [];
- let E = [];
- for (let m = 0; m < h.length; m++) {
- const v = h[m];
- if (v.fold === false) {
- E.length && (E[0].hideIndex = p.collector.length, p.collector.push({
- lines: E,
- fold: true
- }), E = []), _.push(v);
- continue;
- }
- v.hide = true, E.push(v), _.push(v);
- }
- return E.length && (E[0].hideIndex = p.collector.length, p.collector.push({
- lines: E,
- fold: true
- }), E = []), p.changes = _, p;
- }
- function gr(e, r, l = "plaintext", f = "word", g = false, n = 10, t) {
- const i = Bn(e, r), s = t ? new RegExp(t) : void 0;
- let a = 0, o = 0, c = false;
- const u = [], d = {
- changes: u,
- collector: [],
- stat: $n(i, s)
- };
- for (let _ = 0; _ < i.length; _++) {
- if (c) {
- c = false;
- continue;
- }
- const [E, m] = [i[_], i[_ + 1]], [v, A] = [be(E), be(m)], D = E.value.replace(/\n$/, "").split(`
- `);
- if (m === void 0) {
- for (const M of D) {
- v === y.EQUAL && (a++, o++), v === y.DELETE && a++, v === y.ADD && o++;
- const R = j(l, M);
- u.push({
- type: v,
- code: R,
- addNum: v === y.DELETE ? void 0 : o,
- delNum: v === y.ADD ? void 0 : a
- });
- }
- break;
- }
- if (v === y.EQUAL)
- for (const M of D) {
- a++, o++;
- const R = j(l, M);
- u.push({ type: y.EQUAL, code: R, delNum: a, addNum: o });
- }
- const S = m.value.replace(/\n$/, "").split(`
- `);
- if (v === y.DELETE)
- if (A === y.ADD && (D.length === S.length || g)) {
- for (let M = 0; M < D.length; M++) {
- const R = D[M], L = S[M];
- a++;
- const I = j(l, Be(L, R, f));
- u.push({
- type: s != null && s.test(R) ? y.EQUAL : y.DELETE,
- code: I,
- delNum: a
- });
- }
- for (let M = 0; M < S.length; M++) {
- const R = D[M], L = S[M];
- o++;
- const I = j(l, Be(R, L, f));
- u.push({
- type: s != null && s.test(L) ? y.EQUAL : y.ADD,
- code: I,
- addNum: o
- });
- }
- c = true;
- } else
- for (const M of D) {
- a++;
- const R = j(l, M);
- u.push({ type: y.DELETE, code: R, delNum: a });
- }
- if (v === y.ADD)
- for (const M of D) {
- o++;
- const R = j(l, M);
- u.push({ type: y.ADD, code: R, addNum: o });
- }
- }
- for (let _ = 0; _ < u.length; _++) {
- const E = u[_];
- if (E.type === y.DELETE || E.type === y.ADD) {
- const [m, v] = [Math.max(_ - n, 0), Math.min(_ + n + 1, u.length)];
- for (let A = m; A < v; A++)
- u[A].fold = false;
- }
- E.fold === void 0 && (E.fold = true);
- }
- if (e === r) {
- for (let _ = 0; _ < u.length; _++)
- u[_].fold = false;
- return d;
- }
- const h = [];
- let p = [];
- for (let _ = 0; _ < u.length; _++) {
- const E = u[_];
- if (E.fold === false) {
- p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
- lines: p,
- fold: true
- }), p = []), h.push(E);
- continue;
- }
- E.type === "equal" && (E.hide = true, p.push(E)), h.push(E);
- }
- return p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
- lines: p,
- fold: true
- }), p = []), d.changes = h, d;
- }
- var hr = { key: 0 };
- var dr = createBaseVNode("td", {
- class: "blob-code blob-code-hunk",
- align: "left"
- }, " ⋯ ", -1);
- var pr = { key: 1 };
- var _r = ["data-code-marker", "innerHTML"];
- var br = defineComponent({
- __name: "UnifiedLine",
- props: {
- line: {}
- },
- emits: ["expand"],
- setup(e, { emit: r }) {
- const l = r;
- function f(g) {
- return g === y.DELETE ? "-" : g === y.ADD ? "+" : "";
- }
- return (g, n) => g.line.hideIndex !== void 0 && g.line.hide ? (openBlock(), createElementBlock("tr", hr, [
- createBaseVNode("td", {
- class: "blob-num blob-num-hunk text-center",
- colspan: "2",
- onClick: n[0] || (n[0] = (t) => l("expand", g.line))
- }, " > "),
- dr
- ])) : g.line.hide ? createCommentVNode("", true) : (openBlock(), createElementBlock("tr", pr, [
- createBaseVNode("td", {
- class: normalizeClass(["blob-num", {
- "blob-num-deletion": g.line.type === unref(y).DELETE,
- "blob-num-addition": g.line.type === unref(y).ADD,
- "blob-num-context": g.line.type === unref(y).EQUAL,
- "blob-num-hunk": g.line.hide !== void 0
- }])
- }, toDisplayString(g.line.delNum), 3),
- createBaseVNode("td", {
- class: normalizeClass(["blob-num", {
- "blob-num-deletion": g.line.type === unref(y).DELETE,
- "blob-num-addition": g.line.type === unref(y).ADD,
- "blob-num-context": g.line.type === unref(y).EQUAL,
- "blob-num-hunk": g.line.hide !== void 0
- }])
- }, toDisplayString(g.line.addNum), 3),
- createBaseVNode("td", {
- class: normalizeClass(["blob-code", {
- "blob-code-deletion": g.line.type === unref(y).DELETE,
- "blob-code-addition": g.line.type === unref(y).ADD,
- "blob-code-context": g.line.type === unref(y).EQUAL,
- "blob-code-hunk": g.line.hide !== void 0
- }])
- }, [
- createBaseVNode("span", {
- class: "blob-code-inner blob-code-marker",
- "data-code-marker": f(g.line.type),
- innerHTML: g.line.code
- }, null, 8, _r)
- ], 2)
- ]));
- }
- });
- var Er = { class: "diff-table" };
- var mr = defineComponent({
- __name: "UnifiedViewer",
- props: {
- diffChange: {}
- },
- setup(e) {
- const r = e;
- function l({ hideIndex: f }) {
- f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
- g.hide = false, g.fold = false;
- });
- }
- return (f, g) => {
- var n;
- return openBlock(), createElementBlock("table", Er, [
- createBaseVNode("tbody", null, [
- (openBlock(true), createElementBlock(Fragment, null, renderList((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (openBlock(), createBlock(br, {
- key: i,
- line: t,
- onExpand: l
- }, null, 8, ["line"]))), 128))
- ])
- ]);
- };
- }
- });
- var vr = { key: 0 };
- var wr = createBaseVNode("td", {
- class: "blob-code blob-code-inner blob-code-hunk",
- colspan: "3",
- align: "left"
- }, " ⋯ ", -1);
- var yr = { key: 1 };
- var Nr = createBaseVNode("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1);
- var Ar = createBaseVNode("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1);
- var Mr = ["onMousedown"];
- var Tr = ["data-code-marker", "innerHTML"];
- var Sr = defineComponent({
- __name: "SplitLine",
- props: {
- splitLine: {}
- },
- emits: ["expand"],
- setup(e, { emit: r }) {
- const l = r;
- function f(n) {
- return n === y.DELETE ? "-" : n === y.ADD ? "+" : "";
- }
- function g(n) {
- window.getSelection().removeAllRanges();
- const t = document.querySelectorAll(".file-diff-split .split-side-left"), i = document.querySelectorAll(".file-diff-split .split-side-right");
- for (const s of i)
- s.classList.toggle("no-select", n === "left");
- for (const s of t)
- s.classList.toggle("no-select", n === "right");
- }
- return (n, t) => n.splitLine.hideIndex !== void 0 && n.splitLine.hide ? (openBlock(), createElementBlock("tr", vr, [
- createBaseVNode("td", {
- class: "blob-num blob-num-hunk",
- colspan: "1",
- onClick: t[0] || (t[0] = (i) => l("expand", n.splitLine))
- }, " > "),
- wr
- ])) : n.splitLine.hide ? createCommentVNode("", true) : (openBlock(), createElementBlock("tr", yr, [
- (openBlock(true), createElementBlock(Fragment, null, renderList([n.splitLine.left, n.splitLine.right], (i, s) => (openBlock(), createElementBlock(Fragment, null, [
- i.type === unref(y).EMPTY ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
- Nr,
- Ar
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
- createBaseVNode("td", {
- class: normalizeClass(["blob-num", {
- "blob-num-deletion": i.type === unref(y).DELETE,
- "blob-num-addition": i.type === unref(y).ADD,
- "blob-num-context": i.type === unref(y).EQUAL,
- "blob-num-hunk": n.splitLine.hide !== void 0
- }])
- }, toDisplayString(i.num), 3),
- createBaseVNode("td", {
- class: normalizeClass(["blob-code", {
- "blob-code-deletion": i.type === unref(y).DELETE,
- "blob-code-addition": i.type === unref(y).ADD,
- "blob-code-context": i.type === unref(y).EQUAL,
- "blob-code-hunk": n.splitLine.hide !== void 0,
- "split-side-left": s === 0,
- "split-side-right": s === 1
- }]),
- onMousedown: (a) => g(s === 0 ? "left" : "right")
- }, [
- createBaseVNode("span", {
- class: "blob-code-inner blob-code-marker",
- "data-code-marker": f(i.type),
- innerHTML: i.code
- }, null, 8, Tr)
- ], 42, Mr)
- ], 64))
- ], 64))), 256))
- ]));
- }
- });
- var Dr = { class: "file-diff-split diff-table" };
- var Lr = createBaseVNode("colgroup", null, [
- createBaseVNode("col", { width: "44" }),
- createBaseVNode("col"),
- createBaseVNode("col", { width: "44" }),
- createBaseVNode("col")
- ], -1);
- var Rr = defineComponent({
- __name: "SplitViewer",
- props: {
- diffChange: {}
- },
- setup(e) {
- const r = e;
- function l({ hideIndex: f }) {
- f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
- g.hide = false, g.fold = false;
- });
- }
- return (f, g) => {
- var n;
- return openBlock(), createElementBlock("table", Dr, [
- Lr,
- createBaseVNode("tbody", null, [
- (openBlock(true), createElementBlock(Fragment, null, renderList((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (openBlock(), createBlock(Sr, {
- key: i,
- "split-line": t,
- onExpand: l
- }, null, 8, ["split-line"]))), 128))
- ])
- ]);
- };
- }
- });
- var Pn = (e, r) => {
- const l = e.__vccOpts || e;
- for (const [f, g] of r)
- l[f] = g;
- return l;
- };
- var Or = {
- name: "DownArrowIcon"
- };
- var Cr = {
- width: "1rem",
- viewBox: "0 0 512 512",
- xmlns: "http://www.w3.org/2000/svg"
- };
- var Ir = createBaseVNode("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);
- var kr = [
- Ir
- ];
- function Br(e, r, l, f, g, n) {
- return openBlock(), createElementBlock("svg", Cr, kr);
- }
- var pn = Pn(Or, [["render", Br]]);
- var $r = {
- name: "UpArrowIcon"
- };
- var Pr = {
- width: "1rem",
- viewBox: "0 0 512 512",
- xmlns: "http://www.w3.org/2000/svg"
- };
- var Ur = createBaseVNode("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);
- var Hr = [
- Ur
- ];
- function Fr(e, r, l, f, g, n) {
- return openBlock(), createElementBlock("svg", Pr, Hr);
- }
- var _n = Pn($r, [["render", Fr]]);
- var zr = ["theme"];
- var xr = {
- key: 0,
- class: "file-header"
- };
- var Gr = {
- key: 0,
- class: "file-info"
- };
- var Kr = { class: "info-left" };
- var Wr = { class: "info-left" };
- var Qr = { class: "diff-commandbar" };
- var Zr = {
- key: 0,
- class: "diff-stat"
- };
- var Yr = { class: "diff-stat-added" };
- var Xr = { class: "diff-stat-deleted" };
- var Vr = {
- key: 1,
- class: "file-info"
- };
- var jr = { class: "info-left" };
- var qr = { class: "info-right" };
- var Jr = { style: { "margin-left": "20px" } };
- var ei = { class: "diff-commandbar" };
- var ni = {
- key: 0,
- class: "diff-stat"
- };
- var ti = { class: "diff-stat-added" };
- var ri = { class: "diff-stat-deleted" };
- var ii = defineComponent({
- __name: "CodeDiff",
- props: {
- newString: {},
- oldString: {},
- language: { default: "plaintext" },
- context: { default: 10 },
- diffStyle: { default: "word" },
- forceInlineComparison: { type: Boolean, default: false },
- outputFormat: { default: "line-by-line" },
- trim: { type: Boolean, default: false },
- noDiffLineFeed: { type: Boolean, default: false },
- maxHeight: { default: void 0 },
- filename: { default: void 0 },
- newFilename: { default: void 0 },
- hideHeader: { type: Boolean, default: false },
- hideStat: { type: Boolean, default: false },
- theme: { default: "light" },
- ignoreMatchingLines: { default: void 0 }
- },
- emits: ["diff"],
- setup(e, { emit: r }) {
- const l = e, f = r, g = computed(() => l.outputFormat === "line-by-line"), n = computed(() => {
- let h = l.oldString || "";
- return h = l.trim ? h.trim() : h, h = l.noDiffLineFeed ? h.replace(/(\r\n)/g, `
- `) : h, h;
- }), t = computed(() => {
- let h = l.newString || "";
- return h = l.trim ? h.trim() : h, h = l.noDiffLineFeed ? h.replace(/(\r\n)/g, `
- `) : h, h;
- }), i = computed(
- () => 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)
- ), s = ref(i.value), a = computed(() => s.value.stat.additionsNum === 0 && s.value.stat.deletionsNum === 0), o = ref(-1);
- function c() {
- const h = document.querySelectorAll(".blob-code-addition");
- o.value < h.length - 1 && (o.value++, d(h));
- }
- function u() {
- const h = document.querySelectorAll(".blob-code-addition");
- o.value > 0 && (o.value--, d(h));
- }
- function d(h) {
- h.forEach((_) => _.classList.remove("current-diff"));
- const p = h[o.value];
- p && (p.classList.add("current-diff"), p.scrollIntoView({ behavior: "smooth", block: "center" }));
- }
- return watch(() => l, () => {
- s.value = i.value, f("diff", {
- stat: {
- isChanged: !a.value,
- addNum: s.value.stat.additionsNum,
- delNum: s.value.stat.deletionsNum
- }
- });
- }, { deep: true, immediate: true }), (h, p) => (openBlock(), createElementBlock("div", {
- class: "code-diff-view",
- theme: h.theme,
- style: normalizeStyle({ maxHeight: h.maxHeight })
- }, [
- h.hideHeader ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", xr, [
- unref(g) ? (openBlock(), createElementBlock("div", Gr, [
- createBaseVNode("span", null, [
- createBaseVNode("div", Kr, toDisplayString(h.filename), 1),
- createBaseVNode("div", Wr, toDisplayString(h.newFilename), 1)
- ]),
- createBaseVNode("span", Qr, [
- createBaseVNode("button", {
- class: "command-item-button",
- title: "Next Change",
- onClick: c
- }, [
- createVNode(pn)
- ]),
- createBaseVNode("button", {
- class: "command-item-button",
- title: "Previous Change",
- onClick: u
- }, [
- createVNode(_n)
- ])
- ]),
- h.hideStat ? createCommentVNode("", true) : (openBlock(), createElementBlock("span", Zr, [
- renderSlot(h.$slots, "stat", {
- stat: unref(s).stat
- }, () => [
- createBaseVNode("span", Yr, "+" + toDisplayString(unref(s).stat.additionsNum) + " additions", 1),
- createBaseVNode("span", Xr, "-" + toDisplayString(unref(s).stat.deletionsNum) + " deletions", 1)
- ])
- ]))
- ])) : (openBlock(), createElementBlock("div", Vr, [
- createBaseVNode("span", jr, toDisplayString(h.filename), 1),
- createBaseVNode("span", qr, [
- createBaseVNode("span", Jr, toDisplayString(h.newFilename), 1),
- createBaseVNode("span", ei, [
- createBaseVNode("button", {
- class: "command-item-button",
- title: "Next Change",
- onClick: c
- }, [
- createVNode(pn)
- ]),
- createBaseVNode("button", {
- class: "command-item-button",
- title: "Previous Change",
- onClick: u
- }, [
- createVNode(_n)
- ])
- ]),
- h.hideStat ? createCommentVNode("", true) : (openBlock(), createElementBlock("span", ni, [
- renderSlot(h.$slots, "stat", {
- stat: unref(s).stat
- }, () => [
- createBaseVNode("span", ti, "+" + toDisplayString(unref(s).stat.additionsNum) + " additions", 1),
- createBaseVNode("span", ri, "-" + toDisplayString(unref(s).stat.deletionsNum) + " deletions", 1)
- ])
- ]))
- ])
- ]))
- ])),
- unref(g) ? (openBlock(), createBlock(mr, {
- key: 1,
- "diff-change": unref(s)
- }, null, 8, ["diff-change"])) : (openBlock(), createBlock(Rr, {
- key: 2,
- "diff-change": unref(s)
- }, null, 8, ["diff-change"]))
- ], 12, zr));
- }
- });
- function si(e) {
- e.component("CodeDiff", ii);
- }
- var oi = {
- install: si,
- hljs: q
- };
- export {
- ii as CodeDiff,
- oi as default,
- q as hljs
- };
- //# sourceMappingURL=v-code-diff.js.map
|