chunk-FBUDSZGC.js 533 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485
  1. import {
  2. __esm
  3. } from "./chunk-2LSFTFF7.js";
  4. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/errors.js
  5. function onUnexpectedError(e) {
  6. if (!isCancellationError(e)) {
  7. errorHandler.onUnexpectedError(e);
  8. }
  9. return void 0;
  10. }
  11. function onUnexpectedExternalError(e) {
  12. if (!isCancellationError(e)) {
  13. errorHandler.onUnexpectedExternalError(e);
  14. }
  15. return void 0;
  16. }
  17. function transformErrorForSerialization(error) {
  18. if (error instanceof Error) {
  19. const { name, message } = error;
  20. const stack = error.stacktrace || error.stack;
  21. return {
  22. $isError: true,
  23. name,
  24. message,
  25. stack,
  26. noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error)
  27. };
  28. }
  29. return error;
  30. }
  31. function isCancellationError(error) {
  32. if (error instanceof CancellationError) {
  33. return true;
  34. }
  35. return error instanceof Error && error.name === canceledName && error.message === canceledName;
  36. }
  37. function canceled() {
  38. const error = new Error(canceledName);
  39. error.name = error.message;
  40. return error;
  41. }
  42. function illegalArgument(name) {
  43. if (name) {
  44. return new Error(`Illegal argument: ${name}`);
  45. } else {
  46. return new Error("Illegal argument");
  47. }
  48. }
  49. function illegalState(name) {
  50. if (name) {
  51. return new Error(`Illegal state: ${name}`);
  52. } else {
  53. return new Error("Illegal state");
  54. }
  55. }
  56. var ErrorHandler, errorHandler, canceledName, CancellationError, NotSupportedError, ErrorNoTelemetry, BugIndicatingError;
  57. var init_errors = __esm({
  58. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/errors.js"() {
  59. ErrorHandler = class {
  60. constructor() {
  61. this.listeners = [];
  62. this.unexpectedErrorHandler = function(e) {
  63. setTimeout(() => {
  64. if (e.stack) {
  65. if (ErrorNoTelemetry.isErrorNoTelemetry(e)) {
  66. throw new ErrorNoTelemetry(e.message + "\n\n" + e.stack);
  67. }
  68. throw new Error(e.message + "\n\n" + e.stack);
  69. }
  70. throw e;
  71. }, 0);
  72. };
  73. }
  74. emit(e) {
  75. this.listeners.forEach((listener) => {
  76. listener(e);
  77. });
  78. }
  79. onUnexpectedError(e) {
  80. this.unexpectedErrorHandler(e);
  81. this.emit(e);
  82. }
  83. // For external errors, we don't want the listeners to be called
  84. onUnexpectedExternalError(e) {
  85. this.unexpectedErrorHandler(e);
  86. }
  87. };
  88. errorHandler = new ErrorHandler();
  89. canceledName = "Canceled";
  90. CancellationError = class extends Error {
  91. constructor() {
  92. super(canceledName);
  93. this.name = this.message;
  94. }
  95. };
  96. NotSupportedError = class extends Error {
  97. constructor(message) {
  98. super("NotSupported");
  99. if (message) {
  100. this.message = message;
  101. }
  102. }
  103. };
  104. ErrorNoTelemetry = class _ErrorNoTelemetry extends Error {
  105. constructor(msg) {
  106. super(msg);
  107. this.name = "CodeExpectedError";
  108. }
  109. static fromError(err) {
  110. if (err instanceof _ErrorNoTelemetry) {
  111. return err;
  112. }
  113. const result = new _ErrorNoTelemetry();
  114. result.message = err.message;
  115. result.stack = err.stack;
  116. return result;
  117. }
  118. static isErrorNoTelemetry(err) {
  119. return err.name === "CodeExpectedError";
  120. }
  121. };
  122. BugIndicatingError = class _BugIndicatingError extends Error {
  123. constructor(message) {
  124. super(message || "An unexpected bug occurred.");
  125. Object.setPrototypeOf(this, _BugIndicatingError.prototype);
  126. debugger;
  127. }
  128. };
  129. }
  130. });
  131. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/functional.js
  132. function once(fn) {
  133. const _this = this;
  134. let didCall = false;
  135. let result;
  136. return function() {
  137. if (didCall) {
  138. return result;
  139. }
  140. didCall = true;
  141. result = fn.apply(_this, arguments);
  142. return result;
  143. };
  144. }
  145. var init_functional = __esm({
  146. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/functional.js"() {
  147. }
  148. });
  149. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/iterator.js
  150. var Iterable;
  151. var init_iterator = __esm({
  152. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/iterator.js"() {
  153. (function(Iterable2) {
  154. function is(thing) {
  155. return thing && typeof thing === "object" && typeof thing[Symbol.iterator] === "function";
  156. }
  157. Iterable2.is = is;
  158. const _empty2 = Object.freeze([]);
  159. function empty() {
  160. return _empty2;
  161. }
  162. Iterable2.empty = empty;
  163. function* single(element) {
  164. yield element;
  165. }
  166. Iterable2.single = single;
  167. function wrap(iterableOrElement) {
  168. if (is(iterableOrElement)) {
  169. return iterableOrElement;
  170. } else {
  171. return single(iterableOrElement);
  172. }
  173. }
  174. Iterable2.wrap = wrap;
  175. function from(iterable) {
  176. return iterable || _empty2;
  177. }
  178. Iterable2.from = from;
  179. function isEmpty(iterable) {
  180. return !iterable || iterable[Symbol.iterator]().next().done === true;
  181. }
  182. Iterable2.isEmpty = isEmpty;
  183. function first(iterable) {
  184. return iterable[Symbol.iterator]().next().value;
  185. }
  186. Iterable2.first = first;
  187. function some(iterable, predicate) {
  188. for (const element of iterable) {
  189. if (predicate(element)) {
  190. return true;
  191. }
  192. }
  193. return false;
  194. }
  195. Iterable2.some = some;
  196. function find(iterable, predicate) {
  197. for (const element of iterable) {
  198. if (predicate(element)) {
  199. return element;
  200. }
  201. }
  202. return void 0;
  203. }
  204. Iterable2.find = find;
  205. function* filter(iterable, predicate) {
  206. for (const element of iterable) {
  207. if (predicate(element)) {
  208. yield element;
  209. }
  210. }
  211. }
  212. Iterable2.filter = filter;
  213. function* map(iterable, fn) {
  214. let index = 0;
  215. for (const element of iterable) {
  216. yield fn(element, index++);
  217. }
  218. }
  219. Iterable2.map = map;
  220. function* concat(...iterables) {
  221. for (const iterable of iterables) {
  222. for (const element of iterable) {
  223. yield element;
  224. }
  225. }
  226. }
  227. Iterable2.concat = concat;
  228. function reduce(iterable, reducer, initialValue) {
  229. let value = initialValue;
  230. for (const element of iterable) {
  231. value = reducer(value, element);
  232. }
  233. return value;
  234. }
  235. Iterable2.reduce = reduce;
  236. function* slice(arr, from2, to = arr.length) {
  237. if (from2 < 0) {
  238. from2 += arr.length;
  239. }
  240. if (to < 0) {
  241. to += arr.length;
  242. } else if (to > arr.length) {
  243. to = arr.length;
  244. }
  245. for (; from2 < to; from2++) {
  246. yield arr[from2];
  247. }
  248. }
  249. Iterable2.slice = slice;
  250. function consume(iterable, atMost = Number.POSITIVE_INFINITY) {
  251. const consumed = [];
  252. if (atMost === 0) {
  253. return [consumed, iterable];
  254. }
  255. const iterator = iterable[Symbol.iterator]();
  256. for (let i = 0; i < atMost; i++) {
  257. const next = iterator.next();
  258. if (next.done) {
  259. return [consumed, Iterable2.empty()];
  260. }
  261. consumed.push(next.value);
  262. }
  263. return [consumed, { [Symbol.iterator]() {
  264. return iterator;
  265. } }];
  266. }
  267. Iterable2.consume = consume;
  268. })(Iterable || (Iterable = {}));
  269. }
  270. });
  271. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/lifecycle.js
  272. function setDisposableTracker(tracker) {
  273. disposableTracker = tracker;
  274. }
  275. function trackDisposable(x) {
  276. disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.trackDisposable(x);
  277. return x;
  278. }
  279. function markAsDisposed(disposable) {
  280. disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsDisposed(disposable);
  281. }
  282. function setParentOfDisposable(child, parent) {
  283. disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.setParent(child, parent);
  284. }
  285. function setParentOfDisposables(children, parent) {
  286. if (!disposableTracker) {
  287. return;
  288. }
  289. for (const child of children) {
  290. disposableTracker.setParent(child, parent);
  291. }
  292. }
  293. function markAsSingleton(singleton) {
  294. disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsSingleton(singleton);
  295. return singleton;
  296. }
  297. function isDisposable(thing) {
  298. return typeof thing.dispose === "function" && thing.dispose.length === 0;
  299. }
  300. function dispose(arg) {
  301. if (Iterable.is(arg)) {
  302. const errors = [];
  303. for (const d of arg) {
  304. if (d) {
  305. try {
  306. d.dispose();
  307. } catch (e) {
  308. errors.push(e);
  309. }
  310. }
  311. }
  312. if (errors.length === 1) {
  313. throw errors[0];
  314. } else if (errors.length > 1) {
  315. throw new AggregateError(errors, "Encountered errors while disposing of store");
  316. }
  317. return Array.isArray(arg) ? [] : arg;
  318. } else if (arg) {
  319. arg.dispose();
  320. return arg;
  321. }
  322. }
  323. function combinedDisposable(...disposables) {
  324. const parent = toDisposable(() => dispose(disposables));
  325. setParentOfDisposables(disposables, parent);
  326. return parent;
  327. }
  328. function toDisposable(fn) {
  329. const self2 = trackDisposable({
  330. dispose: once(() => {
  331. markAsDisposed(self2);
  332. fn();
  333. })
  334. });
  335. return self2;
  336. }
  337. var TRACK_DISPOSABLES, disposableTracker, DisposableStore, Disposable, MutableDisposable, RefCountedDisposable, SafeDisposable, ImmortalReference, DisposableMap;
  338. var init_lifecycle = __esm({
  339. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"() {
  340. init_functional();
  341. init_iterator();
  342. TRACK_DISPOSABLES = false;
  343. disposableTracker = null;
  344. if (TRACK_DISPOSABLES) {
  345. const __is_disposable_tracked__ = "__is_disposable_tracked__";
  346. setDisposableTracker(new class {
  347. trackDisposable(x) {
  348. const stack = new Error("Potentially leaked disposable").stack;
  349. setTimeout(() => {
  350. if (!x[__is_disposable_tracked__]) {
  351. console.log(stack);
  352. }
  353. }, 3e3);
  354. }
  355. setParent(child, parent) {
  356. if (child && child !== Disposable.None) {
  357. try {
  358. child[__is_disposable_tracked__] = true;
  359. } catch (_a3) {
  360. }
  361. }
  362. }
  363. markAsDisposed(disposable) {
  364. if (disposable && disposable !== Disposable.None) {
  365. try {
  366. disposable[__is_disposable_tracked__] = true;
  367. } catch (_a3) {
  368. }
  369. }
  370. }
  371. markAsSingleton(disposable) {
  372. }
  373. }());
  374. }
  375. DisposableStore = class _DisposableStore {
  376. constructor() {
  377. this._toDispose = /* @__PURE__ */ new Set();
  378. this._isDisposed = false;
  379. trackDisposable(this);
  380. }
  381. /**
  382. * Dispose of all registered disposables and mark this object as disposed.
  383. *
  384. * Any future disposables added to this object will be disposed of on `add`.
  385. */
  386. dispose() {
  387. if (this._isDisposed) {
  388. return;
  389. }
  390. markAsDisposed(this);
  391. this._isDisposed = true;
  392. this.clear();
  393. }
  394. /**
  395. * @return `true` if this object has been disposed of.
  396. */
  397. get isDisposed() {
  398. return this._isDisposed;
  399. }
  400. /**
  401. * Dispose of all registered disposables but do not mark this object as disposed.
  402. */
  403. clear() {
  404. if (this._toDispose.size === 0) {
  405. return;
  406. }
  407. try {
  408. dispose(this._toDispose);
  409. } finally {
  410. this._toDispose.clear();
  411. }
  412. }
  413. /**
  414. * Add a new {@link IDisposable disposable} to the collection.
  415. */
  416. add(o) {
  417. if (!o) {
  418. return o;
  419. }
  420. if (o === this) {
  421. throw new Error("Cannot register a disposable on itself!");
  422. }
  423. setParentOfDisposable(o, this);
  424. if (this._isDisposed) {
  425. if (!_DisposableStore.DISABLE_DISPOSED_WARNING) {
  426. console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack);
  427. }
  428. } else {
  429. this._toDispose.add(o);
  430. }
  431. return o;
  432. }
  433. };
  434. DisposableStore.DISABLE_DISPOSED_WARNING = false;
  435. Disposable = class {
  436. constructor() {
  437. this._store = new DisposableStore();
  438. trackDisposable(this);
  439. setParentOfDisposable(this._store, this);
  440. }
  441. dispose() {
  442. markAsDisposed(this);
  443. this._store.dispose();
  444. }
  445. /**
  446. * Adds `o` to the collection of disposables managed by this object.
  447. */
  448. _register(o) {
  449. if (o === this) {
  450. throw new Error("Cannot register a disposable on itself!");
  451. }
  452. return this._store.add(o);
  453. }
  454. };
  455. Disposable.None = Object.freeze({ dispose() {
  456. } });
  457. MutableDisposable = class {
  458. constructor() {
  459. this._isDisposed = false;
  460. trackDisposable(this);
  461. }
  462. get value() {
  463. return this._isDisposed ? void 0 : this._value;
  464. }
  465. set value(value) {
  466. var _a3;
  467. if (this._isDisposed || value === this._value) {
  468. return;
  469. }
  470. (_a3 = this._value) === null || _a3 === void 0 ? void 0 : _a3.dispose();
  471. if (value) {
  472. setParentOfDisposable(value, this);
  473. }
  474. this._value = value;
  475. }
  476. /**
  477. * Resets the stored value and disposed of the previously stored value.
  478. */
  479. clear() {
  480. this.value = void 0;
  481. }
  482. dispose() {
  483. var _a3;
  484. this._isDisposed = true;
  485. markAsDisposed(this);
  486. (_a3 = this._value) === null || _a3 === void 0 ? void 0 : _a3.dispose();
  487. this._value = void 0;
  488. }
  489. };
  490. RefCountedDisposable = class {
  491. constructor(_disposable) {
  492. this._disposable = _disposable;
  493. this._counter = 1;
  494. }
  495. acquire() {
  496. this._counter++;
  497. return this;
  498. }
  499. release() {
  500. if (--this._counter === 0) {
  501. this._disposable.dispose();
  502. }
  503. return this;
  504. }
  505. };
  506. SafeDisposable = class {
  507. constructor() {
  508. this.dispose = () => {
  509. };
  510. this.unset = () => {
  511. };
  512. this.isset = () => false;
  513. trackDisposable(this);
  514. }
  515. set(fn) {
  516. let callback = fn;
  517. this.unset = () => callback = void 0;
  518. this.isset = () => callback !== void 0;
  519. this.dispose = () => {
  520. if (callback) {
  521. callback();
  522. callback = void 0;
  523. markAsDisposed(this);
  524. }
  525. };
  526. return this;
  527. }
  528. };
  529. ImmortalReference = class {
  530. constructor(object) {
  531. this.object = object;
  532. }
  533. dispose() {
  534. }
  535. };
  536. DisposableMap = class {
  537. constructor() {
  538. this._store = /* @__PURE__ */ new Map();
  539. this._isDisposed = false;
  540. trackDisposable(this);
  541. }
  542. /**
  543. * Disposes of all stored values and mark this object as disposed.
  544. *
  545. * Trying to use this object after it has been disposed of is an error.
  546. */
  547. dispose() {
  548. markAsDisposed(this);
  549. this._isDisposed = true;
  550. this.clearAndDisposeAll();
  551. }
  552. /**
  553. * Disposes of all stored values and clear the map, but DO NOT mark this object as disposed.
  554. */
  555. clearAndDisposeAll() {
  556. if (!this._store.size) {
  557. return;
  558. }
  559. try {
  560. dispose(this._store.values());
  561. } finally {
  562. this._store.clear();
  563. }
  564. }
  565. get(key) {
  566. return this._store.get(key);
  567. }
  568. set(key, value, skipDisposeOnOverwrite = false) {
  569. var _a3;
  570. if (this._isDisposed) {
  571. console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack);
  572. }
  573. if (!skipDisposeOnOverwrite) {
  574. (_a3 = this._store.get(key)) === null || _a3 === void 0 ? void 0 : _a3.dispose();
  575. }
  576. this._store.set(key, value);
  577. }
  578. /**
  579. * Delete the value stored for `key` from this map and also dispose of it.
  580. */
  581. deleteAndDispose(key) {
  582. var _a3;
  583. (_a3 = this._store.get(key)) === null || _a3 === void 0 ? void 0 : _a3.dispose();
  584. this._store.delete(key);
  585. }
  586. [Symbol.iterator]() {
  587. return this._store[Symbol.iterator]();
  588. }
  589. };
  590. }
  591. });
  592. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/linkedList.js
  593. var Node, LinkedList;
  594. var init_linkedList = __esm({
  595. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/linkedList.js"() {
  596. Node = class _Node {
  597. constructor(element) {
  598. this.element = element;
  599. this.next = _Node.Undefined;
  600. this.prev = _Node.Undefined;
  601. }
  602. };
  603. Node.Undefined = new Node(void 0);
  604. LinkedList = class {
  605. constructor() {
  606. this._first = Node.Undefined;
  607. this._last = Node.Undefined;
  608. this._size = 0;
  609. }
  610. get size() {
  611. return this._size;
  612. }
  613. isEmpty() {
  614. return this._first === Node.Undefined;
  615. }
  616. clear() {
  617. let node = this._first;
  618. while (node !== Node.Undefined) {
  619. const next = node.next;
  620. node.prev = Node.Undefined;
  621. node.next = Node.Undefined;
  622. node = next;
  623. }
  624. this._first = Node.Undefined;
  625. this._last = Node.Undefined;
  626. this._size = 0;
  627. }
  628. unshift(element) {
  629. return this._insert(element, false);
  630. }
  631. push(element) {
  632. return this._insert(element, true);
  633. }
  634. _insert(element, atTheEnd) {
  635. const newNode = new Node(element);
  636. if (this._first === Node.Undefined) {
  637. this._first = newNode;
  638. this._last = newNode;
  639. } else if (atTheEnd) {
  640. const oldLast = this._last;
  641. this._last = newNode;
  642. newNode.prev = oldLast;
  643. oldLast.next = newNode;
  644. } else {
  645. const oldFirst = this._first;
  646. this._first = newNode;
  647. newNode.next = oldFirst;
  648. oldFirst.prev = newNode;
  649. }
  650. this._size += 1;
  651. let didRemove = false;
  652. return () => {
  653. if (!didRemove) {
  654. didRemove = true;
  655. this._remove(newNode);
  656. }
  657. };
  658. }
  659. shift() {
  660. if (this._first === Node.Undefined) {
  661. return void 0;
  662. } else {
  663. const res = this._first.element;
  664. this._remove(this._first);
  665. return res;
  666. }
  667. }
  668. pop() {
  669. if (this._last === Node.Undefined) {
  670. return void 0;
  671. } else {
  672. const res = this._last.element;
  673. this._remove(this._last);
  674. return res;
  675. }
  676. }
  677. _remove(node) {
  678. if (node.prev !== Node.Undefined && node.next !== Node.Undefined) {
  679. const anchor = node.prev;
  680. anchor.next = node.next;
  681. node.next.prev = anchor;
  682. } else if (node.prev === Node.Undefined && node.next === Node.Undefined) {
  683. this._first = Node.Undefined;
  684. this._last = Node.Undefined;
  685. } else if (node.next === Node.Undefined) {
  686. this._last = this._last.prev;
  687. this._last.next = Node.Undefined;
  688. } else if (node.prev === Node.Undefined) {
  689. this._first = this._first.next;
  690. this._first.prev = Node.Undefined;
  691. }
  692. this._size -= 1;
  693. }
  694. *[Symbol.iterator]() {
  695. let node = this._first;
  696. while (node !== Node.Undefined) {
  697. yield node.element;
  698. node = node.next;
  699. }
  700. }
  701. };
  702. }
  703. });
  704. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/nls.js
  705. function _format(message, args) {
  706. let result;
  707. if (args.length === 0) {
  708. result = message;
  709. } else {
  710. result = message.replace(/\{(\d+)\}/g, (match, rest) => {
  711. const index = rest[0];
  712. const arg = args[index];
  713. let result2 = match;
  714. if (typeof arg === "string") {
  715. result2 = arg;
  716. } else if (typeof arg === "number" || typeof arg === "boolean" || arg === void 0 || arg === null) {
  717. result2 = String(arg);
  718. }
  719. return result2;
  720. });
  721. }
  722. if (isPseudo) {
  723. result = "[" + result.replace(/[aouei]/g, "$&$&") + "]";
  724. }
  725. return result;
  726. }
  727. function localize(data, message, ...args) {
  728. return _format(message, args);
  729. }
  730. function getConfiguredDefaultLocale(_) {
  731. return void 0;
  732. }
  733. var isPseudo;
  734. var init_nls = __esm({
  735. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/nls.js"() {
  736. isPseudo = typeof document !== "undefined" && document.location && document.location.hash.indexOf("pseudo=true") >= 0;
  737. }
  738. });
  739. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/platform.js
  740. function isLittleEndian() {
  741. if (!_isLittleEndianComputed) {
  742. _isLittleEndianComputed = true;
  743. const test = new Uint8Array(2);
  744. test[0] = 1;
  745. test[1] = 2;
  746. const view = new Uint16Array(test.buffer);
  747. _isLittleEndian = view[0] === (2 << 8) + 1;
  748. }
  749. return _isLittleEndian;
  750. }
  751. var _a, LANGUAGE_DEFAULT, _isWindows, _isMacintosh, _isLinux, _isLinuxSnap, _isNative, _isWeb, _isElectron, _isIOS, _isCI, _isMobile, _locale, _language, _platformLocale, _translationsConfigFile, _userAgent, globals, nodeProcess, isElectronProcess, isElectronRenderer, _platform, isWindows, isMacintosh, isLinux, isNative, isWeb, isWebWorker, isIOS, isMobile, userAgent, language, setTimeout0IsFaster, setTimeout0, OS, _isLittleEndian, _isLittleEndianComputed, isChrome, isFirefox, isSafari, isEdge, isAndroid;
  752. var init_platform = __esm({
  753. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/platform.js"() {
  754. init_nls();
  755. LANGUAGE_DEFAULT = "en";
  756. _isWindows = false;
  757. _isMacintosh = false;
  758. _isLinux = false;
  759. _isLinuxSnap = false;
  760. _isNative = false;
  761. _isWeb = false;
  762. _isElectron = false;
  763. _isIOS = false;
  764. _isCI = false;
  765. _isMobile = false;
  766. _locale = void 0;
  767. _language = LANGUAGE_DEFAULT;
  768. _platformLocale = LANGUAGE_DEFAULT;
  769. _translationsConfigFile = void 0;
  770. _userAgent = void 0;
  771. globals = typeof self === "object" ? self : typeof global === "object" ? global : {};
  772. nodeProcess = void 0;
  773. if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== "undefined") {
  774. nodeProcess = globals.vscode.process;
  775. } else if (typeof process !== "undefined") {
  776. nodeProcess = process;
  777. }
  778. isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === "string";
  779. isElectronRenderer = isElectronProcess && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.type) === "renderer";
  780. if (typeof navigator === "object" && !isElectronRenderer) {
  781. _userAgent = navigator.userAgent;
  782. _isWindows = _userAgent.indexOf("Windows") >= 0;
  783. _isMacintosh = _userAgent.indexOf("Macintosh") >= 0;
  784. _isIOS = (_userAgent.indexOf("Macintosh") >= 0 || _userAgent.indexOf("iPad") >= 0 || _userAgent.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
  785. _isLinux = _userAgent.indexOf("Linux") >= 0;
  786. _isMobile = (_userAgent === null || _userAgent === void 0 ? void 0 : _userAgent.indexOf("Mobi")) >= 0;
  787. _isWeb = true;
  788. const configuredLocale = getConfiguredDefaultLocale(
  789. // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale`
  790. // to ensure that the NLS AMD Loader plugin has been loaded and configured.
  791. // This is because the loader plugin decides what the default locale is based on
  792. // how it's able to resolve the strings.
  793. localize({ key: "ensureLoaderPluginIsLoaded", comment: ["{Locked}"] }, "_")
  794. );
  795. _locale = configuredLocale || LANGUAGE_DEFAULT;
  796. _language = _locale;
  797. _platformLocale = navigator.language;
  798. } else if (typeof nodeProcess === "object") {
  799. _isWindows = nodeProcess.platform === "win32";
  800. _isMacintosh = nodeProcess.platform === "darwin";
  801. _isLinux = nodeProcess.platform === "linux";
  802. _isLinuxSnap = _isLinux && !!nodeProcess.env["SNAP"] && !!nodeProcess.env["SNAP_REVISION"];
  803. _isElectron = isElectronProcess;
  804. _isCI = !!nodeProcess.env["CI"] || !!nodeProcess.env["BUILD_ARTIFACTSTAGINGDIRECTORY"];
  805. _locale = LANGUAGE_DEFAULT;
  806. _language = LANGUAGE_DEFAULT;
  807. const rawNlsConfig = nodeProcess.env["VSCODE_NLS_CONFIG"];
  808. if (rawNlsConfig) {
  809. try {
  810. const nlsConfig = JSON.parse(rawNlsConfig);
  811. const resolved = nlsConfig.availableLanguages["*"];
  812. _locale = nlsConfig.locale;
  813. _platformLocale = nlsConfig.osLocale;
  814. _language = resolved ? resolved : LANGUAGE_DEFAULT;
  815. _translationsConfigFile = nlsConfig._translationsConfigFile;
  816. } catch (e) {
  817. }
  818. }
  819. _isNative = true;
  820. } else {
  821. console.error("Unable to resolve platform.");
  822. }
  823. _platform = 0;
  824. if (_isMacintosh) {
  825. _platform = 1;
  826. } else if (_isWindows) {
  827. _platform = 3;
  828. } else if (_isLinux) {
  829. _platform = 2;
  830. }
  831. isWindows = _isWindows;
  832. isMacintosh = _isMacintosh;
  833. isLinux = _isLinux;
  834. isNative = _isNative;
  835. isWeb = _isWeb;
  836. isWebWorker = _isWeb && typeof globals.importScripts === "function";
  837. isIOS = _isIOS;
  838. isMobile = _isMobile;
  839. userAgent = _userAgent;
  840. language = _language;
  841. setTimeout0IsFaster = typeof globals.postMessage === "function" && !globals.importScripts;
  842. setTimeout0 = (() => {
  843. if (setTimeout0IsFaster) {
  844. const pending = [];
  845. globals.addEventListener("message", (e) => {
  846. if (e.data && e.data.vscodeScheduleAsyncWork) {
  847. for (let i = 0, len = pending.length; i < len; i++) {
  848. const candidate = pending[i];
  849. if (candidate.id === e.data.vscodeScheduleAsyncWork) {
  850. pending.splice(i, 1);
  851. candidate.callback();
  852. return;
  853. }
  854. }
  855. }
  856. });
  857. let lastId = 0;
  858. return (callback) => {
  859. const myId = ++lastId;
  860. pending.push({
  861. id: myId,
  862. callback
  863. });
  864. globals.postMessage({ vscodeScheduleAsyncWork: myId }, "*");
  865. };
  866. }
  867. return (callback) => setTimeout(callback);
  868. })();
  869. OS = _isMacintosh || _isIOS ? 2 : _isWindows ? 1 : 3;
  870. _isLittleEndian = true;
  871. _isLittleEndianComputed = false;
  872. isChrome = !!(userAgent && userAgent.indexOf("Chrome") >= 0);
  873. isFirefox = !!(userAgent && userAgent.indexOf("Firefox") >= 0);
  874. isSafari = !!(!isChrome && (userAgent && userAgent.indexOf("Safari") >= 0));
  875. isEdge = !!(userAgent && userAgent.indexOf("Edg/") >= 0);
  876. isAndroid = !!(userAgent && userAgent.indexOf("Android") >= 0);
  877. }
  878. });
  879. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/stopwatch.js
  880. var hasPerformanceNow, StopWatch;
  881. var init_stopwatch = __esm({
  882. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/stopwatch.js"() {
  883. init_platform();
  884. hasPerformanceNow = globals.performance && typeof globals.performance.now === "function";
  885. StopWatch = class _StopWatch {
  886. static create(highResolution = true) {
  887. return new _StopWatch(highResolution);
  888. }
  889. constructor(highResolution) {
  890. this._highResolution = hasPerformanceNow && highResolution;
  891. this._startTime = this._now();
  892. this._stopTime = -1;
  893. }
  894. stop() {
  895. this._stopTime = this._now();
  896. }
  897. elapsed() {
  898. if (this._stopTime !== -1) {
  899. return this._stopTime - this._startTime;
  900. }
  901. return this._now() - this._startTime;
  902. }
  903. _now() {
  904. return this._highResolution ? globals.performance.now() : Date.now();
  905. }
  906. };
  907. }
  908. });
  909. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/event.js
  910. var _enableDisposeWithListenerWarning, _enableSnapshotPotentialLeakWarning, Event, EventProfiling, _globalLeakWarningThreshold, LeakageMonitor, Stacktrace, Listener, Emitter, EventDeliveryQueue, PrivateEventDeliveryQueue, EventDeliveryQueueElement, PauseableEmitter, DebounceEmitter, MicrotaskEmitter, EventMultiplexer, EventBufferer, Relay;
  911. var init_event = __esm({
  912. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/event.js"() {
  913. init_errors();
  914. init_functional();
  915. init_lifecycle();
  916. init_linkedList();
  917. init_stopwatch();
  918. _enableDisposeWithListenerWarning = false;
  919. _enableSnapshotPotentialLeakWarning = false;
  920. (function(Event2) {
  921. Event2.None = () => Disposable.None;
  922. function _addLeakageTraceLogic(options) {
  923. if (_enableSnapshotPotentialLeakWarning) {
  924. const { onDidAddListener: origListenerDidAdd } = options;
  925. const stack = Stacktrace.create();
  926. let count = 0;
  927. options.onDidAddListener = () => {
  928. if (++count === 2) {
  929. console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here");
  930. stack.print();
  931. }
  932. origListenerDidAdd === null || origListenerDidAdd === void 0 ? void 0 : origListenerDidAdd();
  933. };
  934. }
  935. }
  936. function defer(event, disposable) {
  937. return debounce(event, () => void 0, 0, void 0, true, void 0, disposable);
  938. }
  939. Event2.defer = defer;
  940. function once3(event) {
  941. return (listener, thisArgs = null, disposables) => {
  942. let didFire = false;
  943. let result = void 0;
  944. result = event((e) => {
  945. if (didFire) {
  946. return;
  947. } else if (result) {
  948. result.dispose();
  949. } else {
  950. didFire = true;
  951. }
  952. return listener.call(thisArgs, e);
  953. }, null, disposables);
  954. if (didFire) {
  955. result.dispose();
  956. }
  957. return result;
  958. };
  959. }
  960. Event2.once = once3;
  961. function map(event, map2, disposable) {
  962. return snapshot((listener, thisArgs = null, disposables) => event((i) => listener.call(thisArgs, map2(i)), null, disposables), disposable);
  963. }
  964. Event2.map = map;
  965. function forEach(event, each, disposable) {
  966. return snapshot((listener, thisArgs = null, disposables) => event((i) => {
  967. each(i);
  968. listener.call(thisArgs, i);
  969. }, null, disposables), disposable);
  970. }
  971. Event2.forEach = forEach;
  972. function filter(event, filter2, disposable) {
  973. return snapshot((listener, thisArgs = null, disposables) => event((e) => filter2(e) && listener.call(thisArgs, e), null, disposables), disposable);
  974. }
  975. Event2.filter = filter;
  976. function signal(event) {
  977. return event;
  978. }
  979. Event2.signal = signal;
  980. function any(...events) {
  981. return (listener, thisArgs = null, disposables) => combinedDisposable(...events.map((event) => event((e) => listener.call(thisArgs, e), null, disposables)));
  982. }
  983. Event2.any = any;
  984. function reduce(event, merge, initial, disposable) {
  985. let output = initial;
  986. return map(event, (e) => {
  987. output = merge(output, e);
  988. return output;
  989. }, disposable);
  990. }
  991. Event2.reduce = reduce;
  992. function snapshot(event, disposable) {
  993. let listener;
  994. const options = {
  995. onWillAddFirstListener() {
  996. listener = event(emitter.fire, emitter);
  997. },
  998. onDidRemoveLastListener() {
  999. listener === null || listener === void 0 ? void 0 : listener.dispose();
  1000. }
  1001. };
  1002. if (!disposable) {
  1003. _addLeakageTraceLogic(options);
  1004. }
  1005. const emitter = new Emitter(options);
  1006. disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter);
  1007. return emitter.event;
  1008. }
  1009. function debounce(event, merge, delay = 100, leading = false, flushOnListenerRemove = false, leakWarningThreshold, disposable) {
  1010. let subscription;
  1011. let output = void 0;
  1012. let handle = void 0;
  1013. let numDebouncedCalls = 0;
  1014. let doFire;
  1015. const options = {
  1016. leakWarningThreshold,
  1017. onWillAddFirstListener() {
  1018. subscription = event((cur) => {
  1019. numDebouncedCalls++;
  1020. output = merge(output, cur);
  1021. if (leading && !handle) {
  1022. emitter.fire(output);
  1023. output = void 0;
  1024. }
  1025. doFire = () => {
  1026. const _output = output;
  1027. output = void 0;
  1028. handle = void 0;
  1029. if (!leading || numDebouncedCalls > 1) {
  1030. emitter.fire(_output);
  1031. }
  1032. numDebouncedCalls = 0;
  1033. };
  1034. if (typeof delay === "number") {
  1035. clearTimeout(handle);
  1036. handle = setTimeout(doFire, delay);
  1037. } else {
  1038. if (handle === void 0) {
  1039. handle = 0;
  1040. queueMicrotask(doFire);
  1041. }
  1042. }
  1043. });
  1044. },
  1045. onWillRemoveListener() {
  1046. if (flushOnListenerRemove && numDebouncedCalls > 0) {
  1047. doFire === null || doFire === void 0 ? void 0 : doFire();
  1048. }
  1049. },
  1050. onDidRemoveLastListener() {
  1051. doFire = void 0;
  1052. subscription.dispose();
  1053. }
  1054. };
  1055. if (!disposable) {
  1056. _addLeakageTraceLogic(options);
  1057. }
  1058. const emitter = new Emitter(options);
  1059. disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter);
  1060. return emitter.event;
  1061. }
  1062. Event2.debounce = debounce;
  1063. function accumulate(event, delay = 0, disposable) {
  1064. return Event2.debounce(event, (last, e) => {
  1065. if (!last) {
  1066. return [e];
  1067. }
  1068. last.push(e);
  1069. return last;
  1070. }, delay, void 0, true, void 0, disposable);
  1071. }
  1072. Event2.accumulate = accumulate;
  1073. function latch(event, equals3 = (a, b) => a === b, disposable) {
  1074. let firstCall = true;
  1075. let cache;
  1076. return filter(event, (value) => {
  1077. const shouldEmit = firstCall || !equals3(value, cache);
  1078. firstCall = false;
  1079. cache = value;
  1080. return shouldEmit;
  1081. }, disposable);
  1082. }
  1083. Event2.latch = latch;
  1084. function split(event, isT, disposable) {
  1085. return [
  1086. Event2.filter(event, isT, disposable),
  1087. Event2.filter(event, (e) => !isT(e), disposable)
  1088. ];
  1089. }
  1090. Event2.split = split;
  1091. function buffer(event, flushAfterTimeout = false, _buffer = []) {
  1092. let buffer2 = _buffer.slice();
  1093. let listener = event((e) => {
  1094. if (buffer2) {
  1095. buffer2.push(e);
  1096. } else {
  1097. emitter.fire(e);
  1098. }
  1099. });
  1100. const flush = () => {
  1101. buffer2 === null || buffer2 === void 0 ? void 0 : buffer2.forEach((e) => emitter.fire(e));
  1102. buffer2 = null;
  1103. };
  1104. const emitter = new Emitter({
  1105. onWillAddFirstListener() {
  1106. if (!listener) {
  1107. listener = event((e) => emitter.fire(e));
  1108. }
  1109. },
  1110. onDidAddFirstListener() {
  1111. if (buffer2) {
  1112. if (flushAfterTimeout) {
  1113. setTimeout(flush);
  1114. } else {
  1115. flush();
  1116. }
  1117. }
  1118. },
  1119. onDidRemoveLastListener() {
  1120. if (listener) {
  1121. listener.dispose();
  1122. }
  1123. listener = null;
  1124. }
  1125. });
  1126. return emitter.event;
  1127. }
  1128. Event2.buffer = buffer;
  1129. class ChainableEvent {
  1130. constructor(event) {
  1131. this.event = event;
  1132. this.disposables = new DisposableStore();
  1133. }
  1134. /** @see {@link Event.map} */
  1135. map(fn) {
  1136. return new ChainableEvent(map(this.event, fn, this.disposables));
  1137. }
  1138. /** @see {@link Event.forEach} */
  1139. forEach(fn) {
  1140. return new ChainableEvent(forEach(this.event, fn, this.disposables));
  1141. }
  1142. filter(fn) {
  1143. return new ChainableEvent(filter(this.event, fn, this.disposables));
  1144. }
  1145. /** @see {@link Event.reduce} */
  1146. reduce(merge, initial) {
  1147. return new ChainableEvent(reduce(this.event, merge, initial, this.disposables));
  1148. }
  1149. /** @see {@link Event.reduce} */
  1150. latch() {
  1151. return new ChainableEvent(latch(this.event, void 0, this.disposables));
  1152. }
  1153. debounce(merge, delay = 100, leading = false, flushOnListenerRemove = false, leakWarningThreshold) {
  1154. return new ChainableEvent(debounce(this.event, merge, delay, leading, flushOnListenerRemove, leakWarningThreshold, this.disposables));
  1155. }
  1156. /**
  1157. * Attach a listener to the event.
  1158. */
  1159. on(listener, thisArgs, disposables) {
  1160. return this.event(listener, thisArgs, disposables);
  1161. }
  1162. /** @see {@link Event.once} */
  1163. once(listener, thisArgs, disposables) {
  1164. return once3(this.event)(listener, thisArgs, disposables);
  1165. }
  1166. dispose() {
  1167. this.disposables.dispose();
  1168. }
  1169. }
  1170. function chain(event) {
  1171. return new ChainableEvent(event);
  1172. }
  1173. Event2.chain = chain;
  1174. function fromNodeEventEmitter(emitter, eventName, map2 = (id) => id) {
  1175. const fn = (...args) => result.fire(map2(...args));
  1176. const onFirstListenerAdd = () => emitter.on(eventName, fn);
  1177. const onLastListenerRemove = () => emitter.removeListener(eventName, fn);
  1178. const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove });
  1179. return result.event;
  1180. }
  1181. Event2.fromNodeEventEmitter = fromNodeEventEmitter;
  1182. function fromDOMEventEmitter(emitter, eventName, map2 = (id) => id) {
  1183. const fn = (...args) => result.fire(map2(...args));
  1184. const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn);
  1185. const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn);
  1186. const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove });
  1187. return result.event;
  1188. }
  1189. Event2.fromDOMEventEmitter = fromDOMEventEmitter;
  1190. function toPromise(event) {
  1191. return new Promise((resolve2) => once3(event)(resolve2));
  1192. }
  1193. Event2.toPromise = toPromise;
  1194. function runAndSubscribe(event, handler) {
  1195. handler(void 0);
  1196. return event((e) => handler(e));
  1197. }
  1198. Event2.runAndSubscribe = runAndSubscribe;
  1199. function runAndSubscribeWithStore(event, handler) {
  1200. let store = null;
  1201. function run(e) {
  1202. store === null || store === void 0 ? void 0 : store.dispose();
  1203. store = new DisposableStore();
  1204. handler(e, store);
  1205. }
  1206. run(void 0);
  1207. const disposable = event((e) => run(e));
  1208. return toDisposable(() => {
  1209. disposable.dispose();
  1210. store === null || store === void 0 ? void 0 : store.dispose();
  1211. });
  1212. }
  1213. Event2.runAndSubscribeWithStore = runAndSubscribeWithStore;
  1214. class EmitterObserver {
  1215. constructor(_observable, store) {
  1216. this._observable = _observable;
  1217. this._counter = 0;
  1218. this._hasChanged = false;
  1219. const options = {
  1220. onWillAddFirstListener: () => {
  1221. _observable.addObserver(this);
  1222. },
  1223. onDidRemoveLastListener: () => {
  1224. _observable.removeObserver(this);
  1225. }
  1226. };
  1227. if (!store) {
  1228. _addLeakageTraceLogic(options);
  1229. }
  1230. this.emitter = new Emitter(options);
  1231. if (store) {
  1232. store.add(this.emitter);
  1233. }
  1234. }
  1235. beginUpdate(_observable) {
  1236. this._counter++;
  1237. }
  1238. handlePossibleChange(_observable) {
  1239. }
  1240. handleChange(_observable, _change) {
  1241. this._hasChanged = true;
  1242. }
  1243. endUpdate(_observable) {
  1244. this._counter--;
  1245. if (this._counter === 0) {
  1246. this._observable.reportChanges();
  1247. if (this._hasChanged) {
  1248. this._hasChanged = false;
  1249. this.emitter.fire(this._observable.get());
  1250. }
  1251. }
  1252. }
  1253. }
  1254. function fromObservable(obs, store) {
  1255. const observer = new EmitterObserver(obs, store);
  1256. return observer.emitter.event;
  1257. }
  1258. Event2.fromObservable = fromObservable;
  1259. function fromObservableLight(observable) {
  1260. return (listener) => {
  1261. let count = 0;
  1262. let didChange = false;
  1263. const observer = {
  1264. beginUpdate() {
  1265. count++;
  1266. },
  1267. endUpdate() {
  1268. count--;
  1269. if (count === 0) {
  1270. observable.reportChanges();
  1271. if (didChange) {
  1272. didChange = false;
  1273. listener();
  1274. }
  1275. }
  1276. },
  1277. handlePossibleChange() {
  1278. },
  1279. handleChange() {
  1280. didChange = true;
  1281. }
  1282. };
  1283. observable.addObserver(observer);
  1284. return {
  1285. dispose() {
  1286. observable.removeObserver(observer);
  1287. }
  1288. };
  1289. };
  1290. }
  1291. Event2.fromObservableLight = fromObservableLight;
  1292. })(Event || (Event = {}));
  1293. EventProfiling = class _EventProfiling {
  1294. constructor(name) {
  1295. this.listenerCount = 0;
  1296. this.invocationCount = 0;
  1297. this.elapsedOverall = 0;
  1298. this.durations = [];
  1299. this.name = `${name}_${_EventProfiling._idPool++}`;
  1300. _EventProfiling.all.add(this);
  1301. }
  1302. start(listenerCount) {
  1303. this._stopWatch = new StopWatch(true);
  1304. this.listenerCount = listenerCount;
  1305. }
  1306. stop() {
  1307. if (this._stopWatch) {
  1308. const elapsed = this._stopWatch.elapsed();
  1309. this.durations.push(elapsed);
  1310. this.elapsedOverall += elapsed;
  1311. this.invocationCount += 1;
  1312. this._stopWatch = void 0;
  1313. }
  1314. }
  1315. };
  1316. EventProfiling.all = /* @__PURE__ */ new Set();
  1317. EventProfiling._idPool = 0;
  1318. _globalLeakWarningThreshold = -1;
  1319. LeakageMonitor = class {
  1320. constructor(threshold, name = Math.random().toString(18).slice(2, 5)) {
  1321. this.threshold = threshold;
  1322. this.name = name;
  1323. this._warnCountdown = 0;
  1324. }
  1325. dispose() {
  1326. var _a3;
  1327. (_a3 = this._stacks) === null || _a3 === void 0 ? void 0 : _a3.clear();
  1328. }
  1329. check(stack, listenerCount) {
  1330. const threshold = this.threshold;
  1331. if (threshold <= 0 || listenerCount < threshold) {
  1332. return void 0;
  1333. }
  1334. if (!this._stacks) {
  1335. this._stacks = /* @__PURE__ */ new Map();
  1336. }
  1337. const count = this._stacks.get(stack.value) || 0;
  1338. this._stacks.set(stack.value, count + 1);
  1339. this._warnCountdown -= 1;
  1340. if (this._warnCountdown <= 0) {
  1341. this._warnCountdown = threshold * 0.5;
  1342. let topStack;
  1343. let topCount = 0;
  1344. for (const [stack2, count2] of this._stacks) {
  1345. if (!topStack || topCount < count2) {
  1346. topStack = stack2;
  1347. topCount = count2;
  1348. }
  1349. }
  1350. console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`);
  1351. console.warn(topStack);
  1352. }
  1353. return () => {
  1354. const count2 = this._stacks.get(stack.value) || 0;
  1355. this._stacks.set(stack.value, count2 - 1);
  1356. };
  1357. }
  1358. };
  1359. Stacktrace = class _Stacktrace {
  1360. static create() {
  1361. var _a3;
  1362. return new _Stacktrace((_a3 = new Error().stack) !== null && _a3 !== void 0 ? _a3 : "");
  1363. }
  1364. constructor(value) {
  1365. this.value = value;
  1366. }
  1367. print() {
  1368. console.warn(this.value.split("\n").slice(2).join("\n"));
  1369. }
  1370. };
  1371. Listener = class {
  1372. constructor(callback, callbackThis, stack) {
  1373. this.callback = callback;
  1374. this.callbackThis = callbackThis;
  1375. this.stack = stack;
  1376. this.subscription = new SafeDisposable();
  1377. }
  1378. invoke(e) {
  1379. this.callback.call(this.callbackThis, e);
  1380. }
  1381. };
  1382. Emitter = class {
  1383. constructor(options) {
  1384. var _a3, _b, _c, _d, _e;
  1385. this._disposed = false;
  1386. this._options = options;
  1387. this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.leakWarningThreshold) ? new LeakageMonitor((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : void 0;
  1388. this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : void 0;
  1389. this._deliveryQueue = (_e = this._options) === null || _e === void 0 ? void 0 : _e.deliveryQueue;
  1390. }
  1391. dispose() {
  1392. var _a3, _b, _c, _d;
  1393. if (!this._disposed) {
  1394. this._disposed = true;
  1395. if (this._listeners) {
  1396. if (_enableDisposeWithListenerWarning) {
  1397. const listeners = Array.from(this._listeners);
  1398. queueMicrotask(() => {
  1399. var _a4;
  1400. for (const listener of listeners) {
  1401. if (listener.subscription.isset()) {
  1402. listener.subscription.unset();
  1403. (_a4 = listener.stack) === null || _a4 === void 0 ? void 0 : _a4.print();
  1404. }
  1405. }
  1406. });
  1407. }
  1408. this._listeners.clear();
  1409. }
  1410. (_a3 = this._deliveryQueue) === null || _a3 === void 0 ? void 0 : _a3.clear(this);
  1411. (_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b);
  1412. (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose();
  1413. }
  1414. }
  1415. /**
  1416. * For the public to allow to subscribe
  1417. * to events from this Emitter
  1418. */
  1419. get event() {
  1420. if (!this._event) {
  1421. this._event = (callback, thisArgs, disposables) => {
  1422. var _a3, _b, _c;
  1423. if (!this._listeners) {
  1424. this._listeners = new LinkedList();
  1425. }
  1426. if (this._leakageMon && this._listeners.size > this._leakageMon.threshold * 3) {
  1427. console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`);
  1428. return Disposable.None;
  1429. }
  1430. const firstListener = this._listeners.isEmpty();
  1431. if (firstListener && ((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.onWillAddFirstListener)) {
  1432. this._options.onWillAddFirstListener(this);
  1433. }
  1434. let removeMonitor;
  1435. let stack;
  1436. if (this._leakageMon && this._listeners.size >= Math.ceil(this._leakageMon.threshold * 0.2)) {
  1437. stack = Stacktrace.create();
  1438. removeMonitor = this._leakageMon.check(stack, this._listeners.size + 1);
  1439. }
  1440. if (_enableDisposeWithListenerWarning) {
  1441. stack = stack !== null && stack !== void 0 ? stack : Stacktrace.create();
  1442. }
  1443. const listener = new Listener(callback, thisArgs, stack);
  1444. const removeListener = this._listeners.push(listener);
  1445. if (firstListener && ((_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidAddFirstListener)) {
  1446. this._options.onDidAddFirstListener(this);
  1447. }
  1448. if ((_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddListener) {
  1449. this._options.onDidAddListener(this, callback, thisArgs);
  1450. }
  1451. const result = listener.subscription.set(() => {
  1452. var _a4, _b2;
  1453. removeMonitor === null || removeMonitor === void 0 ? void 0 : removeMonitor();
  1454. if (!this._disposed) {
  1455. (_b2 = (_a4 = this._options) === null || _a4 === void 0 ? void 0 : _a4.onWillRemoveListener) === null || _b2 === void 0 ? void 0 : _b2.call(_a4, this);
  1456. removeListener();
  1457. if (this._options && this._options.onDidRemoveLastListener) {
  1458. const hasListeners = this._listeners && !this._listeners.isEmpty();
  1459. if (!hasListeners) {
  1460. this._options.onDidRemoveLastListener(this);
  1461. }
  1462. }
  1463. }
  1464. });
  1465. if (disposables instanceof DisposableStore) {
  1466. disposables.add(result);
  1467. } else if (Array.isArray(disposables)) {
  1468. disposables.push(result);
  1469. }
  1470. return result;
  1471. };
  1472. }
  1473. return this._event;
  1474. }
  1475. /**
  1476. * To be kept private to fire an event to
  1477. * subscribers
  1478. */
  1479. fire(event) {
  1480. var _a3, _b, _c;
  1481. if (this._listeners) {
  1482. if (!this._deliveryQueue) {
  1483. this._deliveryQueue = new PrivateEventDeliveryQueue((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.onListenerError);
  1484. }
  1485. for (const listener of this._listeners) {
  1486. this._deliveryQueue.push(this, listener, event);
  1487. }
  1488. (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.start(this._deliveryQueue.size);
  1489. this._deliveryQueue.deliver();
  1490. (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.stop();
  1491. }
  1492. }
  1493. hasListeners() {
  1494. if (!this._listeners) {
  1495. return false;
  1496. }
  1497. return !this._listeners.isEmpty();
  1498. }
  1499. };
  1500. EventDeliveryQueue = class {
  1501. constructor(_onListenerError = onUnexpectedError) {
  1502. this._onListenerError = _onListenerError;
  1503. this._queue = new LinkedList();
  1504. }
  1505. get size() {
  1506. return this._queue.size;
  1507. }
  1508. push(emitter, listener, event) {
  1509. this._queue.push(new EventDeliveryQueueElement(emitter, listener, event));
  1510. }
  1511. clear(emitter) {
  1512. const newQueue = new LinkedList();
  1513. for (const element of this._queue) {
  1514. if (element.emitter !== emitter) {
  1515. newQueue.push(element);
  1516. }
  1517. }
  1518. this._queue = newQueue;
  1519. }
  1520. deliver() {
  1521. while (this._queue.size > 0) {
  1522. const element = this._queue.shift();
  1523. try {
  1524. element.listener.invoke(element.event);
  1525. } catch (e) {
  1526. this._onListenerError(e);
  1527. }
  1528. }
  1529. }
  1530. };
  1531. PrivateEventDeliveryQueue = class extends EventDeliveryQueue {
  1532. clear(emitter) {
  1533. this._queue.clear();
  1534. }
  1535. };
  1536. EventDeliveryQueueElement = class {
  1537. constructor(emitter, listener, event) {
  1538. this.emitter = emitter;
  1539. this.listener = listener;
  1540. this.event = event;
  1541. }
  1542. };
  1543. PauseableEmitter = class extends Emitter {
  1544. constructor(options) {
  1545. super(options);
  1546. this._isPaused = 0;
  1547. this._eventQueue = new LinkedList();
  1548. this._mergeFn = options === null || options === void 0 ? void 0 : options.merge;
  1549. }
  1550. pause() {
  1551. this._isPaused++;
  1552. }
  1553. resume() {
  1554. if (this._isPaused !== 0 && --this._isPaused === 0) {
  1555. if (this._mergeFn) {
  1556. if (this._eventQueue.size > 0) {
  1557. const events = Array.from(this._eventQueue);
  1558. this._eventQueue.clear();
  1559. super.fire(this._mergeFn(events));
  1560. }
  1561. } else {
  1562. while (!this._isPaused && this._eventQueue.size !== 0) {
  1563. super.fire(this._eventQueue.shift());
  1564. }
  1565. }
  1566. }
  1567. }
  1568. fire(event) {
  1569. if (this._listeners) {
  1570. if (this._isPaused !== 0) {
  1571. this._eventQueue.push(event);
  1572. } else {
  1573. super.fire(event);
  1574. }
  1575. }
  1576. }
  1577. };
  1578. DebounceEmitter = class extends PauseableEmitter {
  1579. constructor(options) {
  1580. var _a3;
  1581. super(options);
  1582. this._delay = (_a3 = options.delay) !== null && _a3 !== void 0 ? _a3 : 100;
  1583. }
  1584. fire(event) {
  1585. if (!this._handle) {
  1586. this.pause();
  1587. this._handle = setTimeout(() => {
  1588. this._handle = void 0;
  1589. this.resume();
  1590. }, this._delay);
  1591. }
  1592. super.fire(event);
  1593. }
  1594. };
  1595. MicrotaskEmitter = class extends Emitter {
  1596. constructor(options) {
  1597. super(options);
  1598. this._queuedEvents = [];
  1599. this._mergeFn = options === null || options === void 0 ? void 0 : options.merge;
  1600. }
  1601. fire(event) {
  1602. if (!this.hasListeners()) {
  1603. return;
  1604. }
  1605. this._queuedEvents.push(event);
  1606. if (this._queuedEvents.length === 1) {
  1607. queueMicrotask(() => {
  1608. if (this._mergeFn) {
  1609. super.fire(this._mergeFn(this._queuedEvents));
  1610. } else {
  1611. this._queuedEvents.forEach((e) => super.fire(e));
  1612. }
  1613. this._queuedEvents = [];
  1614. });
  1615. }
  1616. }
  1617. };
  1618. EventMultiplexer = class {
  1619. constructor() {
  1620. this.hasListeners = false;
  1621. this.events = [];
  1622. this.emitter = new Emitter({
  1623. onWillAddFirstListener: () => this.onFirstListenerAdd(),
  1624. onDidRemoveLastListener: () => this.onLastListenerRemove()
  1625. });
  1626. }
  1627. get event() {
  1628. return this.emitter.event;
  1629. }
  1630. add(event) {
  1631. const e = { event, listener: null };
  1632. this.events.push(e);
  1633. if (this.hasListeners) {
  1634. this.hook(e);
  1635. }
  1636. const dispose2 = () => {
  1637. if (this.hasListeners) {
  1638. this.unhook(e);
  1639. }
  1640. const idx = this.events.indexOf(e);
  1641. this.events.splice(idx, 1);
  1642. };
  1643. return toDisposable(once(dispose2));
  1644. }
  1645. onFirstListenerAdd() {
  1646. this.hasListeners = true;
  1647. this.events.forEach((e) => this.hook(e));
  1648. }
  1649. onLastListenerRemove() {
  1650. this.hasListeners = false;
  1651. this.events.forEach((e) => this.unhook(e));
  1652. }
  1653. hook(e) {
  1654. e.listener = e.event((r) => this.emitter.fire(r));
  1655. }
  1656. unhook(e) {
  1657. if (e.listener) {
  1658. e.listener.dispose();
  1659. }
  1660. e.listener = null;
  1661. }
  1662. dispose() {
  1663. this.emitter.dispose();
  1664. }
  1665. };
  1666. EventBufferer = class {
  1667. constructor() {
  1668. this.buffers = [];
  1669. }
  1670. wrapEvent(event) {
  1671. return (listener, thisArgs, disposables) => {
  1672. return event((i) => {
  1673. const buffer = this.buffers[this.buffers.length - 1];
  1674. if (buffer) {
  1675. buffer.push(() => listener.call(thisArgs, i));
  1676. } else {
  1677. listener.call(thisArgs, i);
  1678. }
  1679. }, void 0, disposables);
  1680. };
  1681. }
  1682. bufferEvents(fn) {
  1683. const buffer = [];
  1684. this.buffers.push(buffer);
  1685. const r = fn();
  1686. this.buffers.pop();
  1687. buffer.forEach((flush) => flush());
  1688. return r;
  1689. }
  1690. };
  1691. Relay = class {
  1692. constructor() {
  1693. this.listening = false;
  1694. this.inputEvent = Event.None;
  1695. this.inputEventListener = Disposable.None;
  1696. this.emitter = new Emitter({
  1697. onDidAddFirstListener: () => {
  1698. this.listening = true;
  1699. this.inputEventListener = this.inputEvent(this.emitter.fire, this.emitter);
  1700. },
  1701. onDidRemoveLastListener: () => {
  1702. this.listening = false;
  1703. this.inputEventListener.dispose();
  1704. }
  1705. });
  1706. this.event = this.emitter.event;
  1707. }
  1708. set input(event) {
  1709. this.inputEvent = event;
  1710. if (this.listening) {
  1711. this.inputEventListener.dispose();
  1712. this.inputEventListener = event(this.emitter.fire, this.emitter);
  1713. }
  1714. }
  1715. dispose() {
  1716. this.inputEventListener.dispose();
  1717. this.emitter.dispose();
  1718. }
  1719. };
  1720. }
  1721. });
  1722. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/types.js
  1723. function isString(str) {
  1724. return typeof str === "string";
  1725. }
  1726. function isObject(obj) {
  1727. return typeof obj === "object" && obj !== null && !Array.isArray(obj) && !(obj instanceof RegExp) && !(obj instanceof Date);
  1728. }
  1729. function isTypedArray(obj) {
  1730. const TypedArray = Object.getPrototypeOf(Uint8Array);
  1731. return typeof obj === "object" && obj instanceof TypedArray;
  1732. }
  1733. function isNumber(obj) {
  1734. return typeof obj === "number" && !isNaN(obj);
  1735. }
  1736. function isIterable(obj) {
  1737. return !!obj && typeof obj[Symbol.iterator] === "function";
  1738. }
  1739. function isBoolean(obj) {
  1740. return obj === true || obj === false;
  1741. }
  1742. function isUndefined(obj) {
  1743. return typeof obj === "undefined";
  1744. }
  1745. function isDefined(arg) {
  1746. return !isUndefinedOrNull(arg);
  1747. }
  1748. function isUndefinedOrNull(obj) {
  1749. return isUndefined(obj) || obj === null;
  1750. }
  1751. function assertType(condition, type) {
  1752. if (!condition) {
  1753. throw new Error(type ? `Unexpected type, expected '${type}'` : "Unexpected type");
  1754. }
  1755. }
  1756. function assertIsDefined(arg) {
  1757. if (isUndefinedOrNull(arg)) {
  1758. throw new Error("Assertion Failed: argument is undefined or null");
  1759. }
  1760. return arg;
  1761. }
  1762. function isFunction(obj) {
  1763. return typeof obj === "function";
  1764. }
  1765. function validateConstraints(args, constraints) {
  1766. const len = Math.min(args.length, constraints.length);
  1767. for (let i = 0; i < len; i++) {
  1768. validateConstraint(args[i], constraints[i]);
  1769. }
  1770. }
  1771. function validateConstraint(arg, constraint) {
  1772. if (isString(constraint)) {
  1773. if (typeof arg !== constraint) {
  1774. throw new Error(`argument does not match constraint: typeof ${constraint}`);
  1775. }
  1776. } else if (isFunction(constraint)) {
  1777. try {
  1778. if (arg instanceof constraint) {
  1779. return;
  1780. }
  1781. } catch (_a3) {
  1782. }
  1783. if (!isUndefinedOrNull(arg) && arg.constructor === constraint) {
  1784. return;
  1785. }
  1786. if (constraint.length === 1 && constraint.call(void 0, arg) === true) {
  1787. return;
  1788. }
  1789. throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`);
  1790. }
  1791. }
  1792. function withNullAsUndefined(x) {
  1793. return x === null ? void 0 : x;
  1794. }
  1795. function withUndefinedAsNull(x) {
  1796. return typeof x === "undefined" ? null : x;
  1797. }
  1798. var init_types = __esm({
  1799. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/types.js"() {
  1800. }
  1801. });
  1802. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/objects.js
  1803. function deepClone(obj) {
  1804. if (!obj || typeof obj !== "object") {
  1805. return obj;
  1806. }
  1807. if (obj instanceof RegExp) {
  1808. return obj;
  1809. }
  1810. const result = Array.isArray(obj) ? [] : {};
  1811. Object.entries(obj).forEach(([key, value]) => {
  1812. result[key] = value && typeof value === "object" ? deepClone(value) : value;
  1813. });
  1814. return result;
  1815. }
  1816. function deepFreeze(obj) {
  1817. if (!obj || typeof obj !== "object") {
  1818. return obj;
  1819. }
  1820. const stack = [obj];
  1821. while (stack.length > 0) {
  1822. const obj2 = stack.shift();
  1823. Object.freeze(obj2);
  1824. for (const key in obj2) {
  1825. if (_hasOwnProperty.call(obj2, key)) {
  1826. const prop = obj2[key];
  1827. if (typeof prop === "object" && !Object.isFrozen(prop) && !isTypedArray(prop)) {
  1828. stack.push(prop);
  1829. }
  1830. }
  1831. }
  1832. }
  1833. return obj;
  1834. }
  1835. function cloneAndChange(obj, changer) {
  1836. return _cloneAndChange(obj, changer, /* @__PURE__ */ new Set());
  1837. }
  1838. function _cloneAndChange(obj, changer, seen) {
  1839. if (isUndefinedOrNull(obj)) {
  1840. return obj;
  1841. }
  1842. const changed = changer(obj);
  1843. if (typeof changed !== "undefined") {
  1844. return changed;
  1845. }
  1846. if (Array.isArray(obj)) {
  1847. const r1 = [];
  1848. for (const e of obj) {
  1849. r1.push(_cloneAndChange(e, changer, seen));
  1850. }
  1851. return r1;
  1852. }
  1853. if (isObject(obj)) {
  1854. if (seen.has(obj)) {
  1855. throw new Error("Cannot clone recursive data-structure");
  1856. }
  1857. seen.add(obj);
  1858. const r2 = {};
  1859. for (const i2 in obj) {
  1860. if (_hasOwnProperty.call(obj, i2)) {
  1861. r2[i2] = _cloneAndChange(obj[i2], changer, seen);
  1862. }
  1863. }
  1864. seen.delete(obj);
  1865. return r2;
  1866. }
  1867. return obj;
  1868. }
  1869. function mixin(destination, source, overwrite = true) {
  1870. if (!isObject(destination)) {
  1871. return source;
  1872. }
  1873. if (isObject(source)) {
  1874. Object.keys(source).forEach((key) => {
  1875. if (key in destination) {
  1876. if (overwrite) {
  1877. if (isObject(destination[key]) && isObject(source[key])) {
  1878. mixin(destination[key], source[key], overwrite);
  1879. } else {
  1880. destination[key] = source[key];
  1881. }
  1882. }
  1883. } else {
  1884. destination[key] = source[key];
  1885. }
  1886. });
  1887. }
  1888. return destination;
  1889. }
  1890. function equals(one, other) {
  1891. if (one === other) {
  1892. return true;
  1893. }
  1894. if (one === null || one === void 0 || other === null || other === void 0) {
  1895. return false;
  1896. }
  1897. if (typeof one !== typeof other) {
  1898. return false;
  1899. }
  1900. if (typeof one !== "object") {
  1901. return false;
  1902. }
  1903. if (Array.isArray(one) !== Array.isArray(other)) {
  1904. return false;
  1905. }
  1906. let i;
  1907. let key;
  1908. if (Array.isArray(one)) {
  1909. if (one.length !== other.length) {
  1910. return false;
  1911. }
  1912. for (i = 0; i < one.length; i++) {
  1913. if (!equals(one[i], other[i])) {
  1914. return false;
  1915. }
  1916. }
  1917. } else {
  1918. const oneKeys = [];
  1919. for (key in one) {
  1920. oneKeys.push(key);
  1921. }
  1922. oneKeys.sort();
  1923. const otherKeys = [];
  1924. for (key in other) {
  1925. otherKeys.push(key);
  1926. }
  1927. otherKeys.sort();
  1928. if (!equals(oneKeys, otherKeys)) {
  1929. return false;
  1930. }
  1931. for (i = 0; i < oneKeys.length; i++) {
  1932. if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {
  1933. return false;
  1934. }
  1935. }
  1936. }
  1937. return true;
  1938. }
  1939. function getAllPropertyNames(obj) {
  1940. let res = [];
  1941. let proto = Object.getPrototypeOf(obj);
  1942. while (Object.prototype !== proto) {
  1943. res = res.concat(Object.getOwnPropertyNames(proto));
  1944. proto = Object.getPrototypeOf(proto);
  1945. }
  1946. return res;
  1947. }
  1948. function getAllMethodNames(obj) {
  1949. const methods = [];
  1950. for (const prop of getAllPropertyNames(obj)) {
  1951. if (typeof obj[prop] === "function") {
  1952. methods.push(prop);
  1953. }
  1954. }
  1955. return methods;
  1956. }
  1957. function createProxyObject(methodNames, invoke) {
  1958. const createProxyMethod = (method) => {
  1959. return function() {
  1960. const args = Array.prototype.slice.call(arguments, 0);
  1961. return invoke(method, args);
  1962. };
  1963. };
  1964. const result = {};
  1965. for (const methodName of methodNames) {
  1966. result[methodName] = createProxyMethod(methodName);
  1967. }
  1968. return result;
  1969. }
  1970. var _hasOwnProperty;
  1971. var init_objects = __esm({
  1972. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/objects.js"() {
  1973. init_types();
  1974. _hasOwnProperty = Object.prototype.hasOwnProperty;
  1975. }
  1976. });
  1977. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/cache.js
  1978. var LRUCachedFunction, CachedFunction;
  1979. var init_cache = __esm({
  1980. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/cache.js"() {
  1981. LRUCachedFunction = class {
  1982. constructor(fn) {
  1983. this.fn = fn;
  1984. this.lastCache = void 0;
  1985. this.lastArgKey = void 0;
  1986. }
  1987. get(arg) {
  1988. const key = JSON.stringify(arg);
  1989. if (this.lastArgKey !== key) {
  1990. this.lastArgKey = key;
  1991. this.lastCache = this.fn(arg);
  1992. }
  1993. return this.lastCache;
  1994. }
  1995. };
  1996. CachedFunction = class {
  1997. get cachedValues() {
  1998. return this._map;
  1999. }
  2000. constructor(fn) {
  2001. this.fn = fn;
  2002. this._map = /* @__PURE__ */ new Map();
  2003. }
  2004. get(arg) {
  2005. if (this._map.has(arg)) {
  2006. return this._map.get(arg);
  2007. }
  2008. const value = this.fn(arg);
  2009. this._map.set(arg, value);
  2010. return value;
  2011. }
  2012. };
  2013. }
  2014. });
  2015. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/lazy.js
  2016. var Lazy;
  2017. var init_lazy = __esm({
  2018. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/lazy.js"() {
  2019. Lazy = class {
  2020. constructor(executor) {
  2021. this.executor = executor;
  2022. this._didRun = false;
  2023. }
  2024. /**
  2025. * Get the wrapped value.
  2026. *
  2027. * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only
  2028. * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value
  2029. */
  2030. get value() {
  2031. if (!this._didRun) {
  2032. try {
  2033. this._value = this.executor();
  2034. } catch (err) {
  2035. this._error = err;
  2036. } finally {
  2037. this._didRun = true;
  2038. }
  2039. }
  2040. if (this._error) {
  2041. throw this._error;
  2042. }
  2043. return this._value;
  2044. }
  2045. /**
  2046. * Get the wrapped value without forcing evaluation.
  2047. */
  2048. get rawValue() {
  2049. return this._value;
  2050. }
  2051. };
  2052. }
  2053. });
  2054. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/strings.js
  2055. function isFalsyOrWhitespace(str) {
  2056. if (!str || typeof str !== "string") {
  2057. return true;
  2058. }
  2059. return str.trim().length === 0;
  2060. }
  2061. function format(value, ...args) {
  2062. if (args.length === 0) {
  2063. return value;
  2064. }
  2065. return value.replace(_formatRegexp, function(match, group2) {
  2066. const idx = parseInt(group2, 10);
  2067. return isNaN(idx) || idx < 0 || idx >= args.length ? match : args[idx];
  2068. });
  2069. }
  2070. function escape(html) {
  2071. return html.replace(/[<>&]/g, function(match) {
  2072. switch (match) {
  2073. case "<":
  2074. return "&lt;";
  2075. case ">":
  2076. return "&gt;";
  2077. case "&":
  2078. return "&amp;";
  2079. default:
  2080. return match;
  2081. }
  2082. });
  2083. }
  2084. function escapeRegExpCharacters(value) {
  2085. return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&");
  2086. }
  2087. function trim(haystack, needle = " ") {
  2088. const trimmed = ltrim(haystack, needle);
  2089. return rtrim(trimmed, needle);
  2090. }
  2091. function ltrim(haystack, needle) {
  2092. if (!haystack || !needle) {
  2093. return haystack;
  2094. }
  2095. const needleLen = needle.length;
  2096. if (needleLen === 0 || haystack.length === 0) {
  2097. return haystack;
  2098. }
  2099. let offset = 0;
  2100. while (haystack.indexOf(needle, offset) === offset) {
  2101. offset = offset + needleLen;
  2102. }
  2103. return haystack.substring(offset);
  2104. }
  2105. function rtrim(haystack, needle) {
  2106. if (!haystack || !needle) {
  2107. return haystack;
  2108. }
  2109. const needleLen = needle.length, haystackLen = haystack.length;
  2110. if (needleLen === 0 || haystackLen === 0) {
  2111. return haystack;
  2112. }
  2113. let offset = haystackLen, idx = -1;
  2114. while (true) {
  2115. idx = haystack.lastIndexOf(needle, offset - 1);
  2116. if (idx === -1 || idx + needleLen !== offset) {
  2117. break;
  2118. }
  2119. if (idx === 0) {
  2120. return "";
  2121. }
  2122. offset = idx;
  2123. }
  2124. return haystack.substring(0, offset);
  2125. }
  2126. function convertSimple2RegExpPattern(pattern) {
  2127. return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*");
  2128. }
  2129. function stripWildcards(pattern) {
  2130. return pattern.replace(/\*/g, "");
  2131. }
  2132. function createRegExp(searchString, isRegex, options = {}) {
  2133. if (!searchString) {
  2134. throw new Error("Cannot create regex from empty string");
  2135. }
  2136. if (!isRegex) {
  2137. searchString = escapeRegExpCharacters(searchString);
  2138. }
  2139. if (options.wholeWord) {
  2140. if (!/\B/.test(searchString.charAt(0))) {
  2141. searchString = "\\b" + searchString;
  2142. }
  2143. if (!/\B/.test(searchString.charAt(searchString.length - 1))) {
  2144. searchString = searchString + "\\b";
  2145. }
  2146. }
  2147. let modifiers = "";
  2148. if (options.global) {
  2149. modifiers += "g";
  2150. }
  2151. if (!options.matchCase) {
  2152. modifiers += "i";
  2153. }
  2154. if (options.multiline) {
  2155. modifiers += "m";
  2156. }
  2157. if (options.unicode) {
  2158. modifiers += "u";
  2159. }
  2160. return new RegExp(searchString, modifiers);
  2161. }
  2162. function regExpLeadsToEndlessLoop(regexp) {
  2163. if (regexp.source === "^" || regexp.source === "^$" || regexp.source === "$" || regexp.source === "^\\s*$") {
  2164. return false;
  2165. }
  2166. const match = regexp.exec("");
  2167. return !!(match && regexp.lastIndex === 0);
  2168. }
  2169. function regExpFlags(regexp) {
  2170. return (regexp.global ? "g" : "") + (regexp.ignoreCase ? "i" : "") + (regexp.multiline ? "m" : "") + (regexp.unicode ? "u" : "");
  2171. }
  2172. function splitLines(str) {
  2173. return str.split(/\r\n|\r|\n/);
  2174. }
  2175. function firstNonWhitespaceIndex(str) {
  2176. for (let i = 0, len = str.length; i < len; i++) {
  2177. const chCode = str.charCodeAt(i);
  2178. if (chCode !== 32 && chCode !== 9) {
  2179. return i;
  2180. }
  2181. }
  2182. return -1;
  2183. }
  2184. function getLeadingWhitespace(str, start = 0, end = str.length) {
  2185. for (let i = start; i < end; i++) {
  2186. const chCode = str.charCodeAt(i);
  2187. if (chCode !== 32 && chCode !== 9) {
  2188. return str.substring(start, i);
  2189. }
  2190. }
  2191. return str.substring(start, end);
  2192. }
  2193. function lastNonWhitespaceIndex(str, startIndex = str.length - 1) {
  2194. for (let i = startIndex; i >= 0; i--) {
  2195. const chCode = str.charCodeAt(i);
  2196. if (chCode !== 32 && chCode !== 9) {
  2197. return i;
  2198. }
  2199. }
  2200. return -1;
  2201. }
  2202. function compare(a, b) {
  2203. if (a < b) {
  2204. return -1;
  2205. } else if (a > b) {
  2206. return 1;
  2207. } else {
  2208. return 0;
  2209. }
  2210. }
  2211. function compareSubstring(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {
  2212. for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {
  2213. const codeA = a.charCodeAt(aStart);
  2214. const codeB = b.charCodeAt(bStart);
  2215. if (codeA < codeB) {
  2216. return -1;
  2217. } else if (codeA > codeB) {
  2218. return 1;
  2219. }
  2220. }
  2221. const aLen = aEnd - aStart;
  2222. const bLen = bEnd - bStart;
  2223. if (aLen < bLen) {
  2224. return -1;
  2225. } else if (aLen > bLen) {
  2226. return 1;
  2227. }
  2228. return 0;
  2229. }
  2230. function compareIgnoreCase(a, b) {
  2231. return compareSubstringIgnoreCase(a, b, 0, a.length, 0, b.length);
  2232. }
  2233. function compareSubstringIgnoreCase(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) {
  2234. for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {
  2235. let codeA = a.charCodeAt(aStart);
  2236. let codeB = b.charCodeAt(bStart);
  2237. if (codeA === codeB) {
  2238. continue;
  2239. }
  2240. if (codeA >= 128 || codeB >= 128) {
  2241. return compareSubstring(a.toLowerCase(), b.toLowerCase(), aStart, aEnd, bStart, bEnd);
  2242. }
  2243. if (isLowerAsciiLetter(codeA)) {
  2244. codeA -= 32;
  2245. }
  2246. if (isLowerAsciiLetter(codeB)) {
  2247. codeB -= 32;
  2248. }
  2249. const diff = codeA - codeB;
  2250. if (diff === 0) {
  2251. continue;
  2252. }
  2253. return diff;
  2254. }
  2255. const aLen = aEnd - aStart;
  2256. const bLen = bEnd - bStart;
  2257. if (aLen < bLen) {
  2258. return -1;
  2259. } else if (aLen > bLen) {
  2260. return 1;
  2261. }
  2262. return 0;
  2263. }
  2264. function isAsciiDigit(code) {
  2265. return code >= 48 && code <= 57;
  2266. }
  2267. function isLowerAsciiLetter(code) {
  2268. return code >= 97 && code <= 122;
  2269. }
  2270. function isUpperAsciiLetter(code) {
  2271. return code >= 65 && code <= 90;
  2272. }
  2273. function equalsIgnoreCase(a, b) {
  2274. return a.length === b.length && compareSubstringIgnoreCase(a, b) === 0;
  2275. }
  2276. function startsWithIgnoreCase(str, candidate) {
  2277. const candidateLength = candidate.length;
  2278. if (candidate.length > str.length) {
  2279. return false;
  2280. }
  2281. return compareSubstringIgnoreCase(str, candidate, 0, candidateLength) === 0;
  2282. }
  2283. function commonPrefixLength(a, b) {
  2284. const len = Math.min(a.length, b.length);
  2285. let i;
  2286. for (i = 0; i < len; i++) {
  2287. if (a.charCodeAt(i) !== b.charCodeAt(i)) {
  2288. return i;
  2289. }
  2290. }
  2291. return len;
  2292. }
  2293. function commonSuffixLength(a, b) {
  2294. const len = Math.min(a.length, b.length);
  2295. let i;
  2296. const aLastIndex = a.length - 1;
  2297. const bLastIndex = b.length - 1;
  2298. for (i = 0; i < len; i++) {
  2299. if (a.charCodeAt(aLastIndex - i) !== b.charCodeAt(bLastIndex - i)) {
  2300. return i;
  2301. }
  2302. }
  2303. return len;
  2304. }
  2305. function isHighSurrogate(charCode) {
  2306. return 55296 <= charCode && charCode <= 56319;
  2307. }
  2308. function isLowSurrogate(charCode) {
  2309. return 56320 <= charCode && charCode <= 57343;
  2310. }
  2311. function computeCodePoint(highSurrogate, lowSurrogate) {
  2312. return (highSurrogate - 55296 << 10) + (lowSurrogate - 56320) + 65536;
  2313. }
  2314. function getNextCodePoint(str, len, offset) {
  2315. const charCode = str.charCodeAt(offset);
  2316. if (isHighSurrogate(charCode) && offset + 1 < len) {
  2317. const nextCharCode = str.charCodeAt(offset + 1);
  2318. if (isLowSurrogate(nextCharCode)) {
  2319. return computeCodePoint(charCode, nextCharCode);
  2320. }
  2321. }
  2322. return charCode;
  2323. }
  2324. function getPrevCodePoint(str, offset) {
  2325. const charCode = str.charCodeAt(offset - 1);
  2326. if (isLowSurrogate(charCode) && offset > 1) {
  2327. const prevCharCode = str.charCodeAt(offset - 2);
  2328. if (isHighSurrogate(prevCharCode)) {
  2329. return computeCodePoint(prevCharCode, charCode);
  2330. }
  2331. }
  2332. return charCode;
  2333. }
  2334. function nextCharLength(str, initialOffset) {
  2335. const iterator = new GraphemeIterator(str, initialOffset);
  2336. return iterator.nextGraphemeLength();
  2337. }
  2338. function prevCharLength(str, initialOffset) {
  2339. const iterator = new GraphemeIterator(str, initialOffset);
  2340. return iterator.prevGraphemeLength();
  2341. }
  2342. function getCharContainingOffset(str, offset) {
  2343. if (offset > 0 && isLowSurrogate(str.charCodeAt(offset))) {
  2344. offset--;
  2345. }
  2346. const endOffset = offset + nextCharLength(str, offset);
  2347. const startOffset = endOffset - prevCharLength(str, endOffset);
  2348. return [startOffset, endOffset];
  2349. }
  2350. function makeContainsRtl() {
  2351. return /(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;
  2352. }
  2353. function containsRTL(str) {
  2354. if (!CONTAINS_RTL) {
  2355. CONTAINS_RTL = makeContainsRtl();
  2356. }
  2357. return CONTAINS_RTL.test(str);
  2358. }
  2359. function isBasicASCII(str) {
  2360. return IS_BASIC_ASCII.test(str);
  2361. }
  2362. function containsUnusualLineTerminators(str) {
  2363. return UNUSUAL_LINE_TERMINATORS.test(str);
  2364. }
  2365. function isFullWidthCharacter(charCode) {
  2366. return charCode >= 11904 && charCode <= 55215 || charCode >= 63744 && charCode <= 64255 || charCode >= 65281 && charCode <= 65374;
  2367. }
  2368. function isEmojiImprecise(x) {
  2369. return x >= 127462 && x <= 127487 || x === 8986 || x === 8987 || x === 9200 || x === 9203 || x >= 9728 && x <= 10175 || x === 11088 || x === 11093 || x >= 127744 && x <= 128591 || x >= 128640 && x <= 128764 || x >= 128992 && x <= 129008 || x >= 129280 && x <= 129535 || x >= 129648 && x <= 129782;
  2370. }
  2371. function startsWithUTF8BOM(str) {
  2372. return !!(str && str.length > 0 && str.charCodeAt(0) === 65279);
  2373. }
  2374. function containsUppercaseCharacter(target, ignoreEscapedChars = false) {
  2375. if (!target) {
  2376. return false;
  2377. }
  2378. if (ignoreEscapedChars) {
  2379. target = target.replace(/\\./g, "");
  2380. }
  2381. return target.toLowerCase() !== target;
  2382. }
  2383. function singleLetterHash(n) {
  2384. const LETTERS_CNT = 90 - 65 + 1;
  2385. n = n % (2 * LETTERS_CNT);
  2386. if (n < LETTERS_CNT) {
  2387. return String.fromCharCode(97 + n);
  2388. }
  2389. return String.fromCharCode(65 + n - LETTERS_CNT);
  2390. }
  2391. function breakBetweenGraphemeBreakType(breakTypeA, breakTypeB) {
  2392. if (breakTypeA === 0) {
  2393. return breakTypeB !== 5 && breakTypeB !== 7;
  2394. }
  2395. if (breakTypeA === 2) {
  2396. if (breakTypeB === 3) {
  2397. return false;
  2398. }
  2399. }
  2400. if (breakTypeA === 4 || breakTypeA === 2 || breakTypeA === 3) {
  2401. return true;
  2402. }
  2403. if (breakTypeB === 4 || breakTypeB === 2 || breakTypeB === 3) {
  2404. return true;
  2405. }
  2406. if (breakTypeA === 8) {
  2407. if (breakTypeB === 8 || breakTypeB === 9 || breakTypeB === 11 || breakTypeB === 12) {
  2408. return false;
  2409. }
  2410. }
  2411. if (breakTypeA === 11 || breakTypeA === 9) {
  2412. if (breakTypeB === 9 || breakTypeB === 10) {
  2413. return false;
  2414. }
  2415. }
  2416. if (breakTypeA === 12 || breakTypeA === 10) {
  2417. if (breakTypeB === 10) {
  2418. return false;
  2419. }
  2420. }
  2421. if (breakTypeB === 5 || breakTypeB === 13) {
  2422. return false;
  2423. }
  2424. if (breakTypeB === 7) {
  2425. return false;
  2426. }
  2427. if (breakTypeA === 1) {
  2428. return false;
  2429. }
  2430. if (breakTypeA === 13 && breakTypeB === 14) {
  2431. return false;
  2432. }
  2433. if (breakTypeA === 6 && breakTypeB === 6) {
  2434. return false;
  2435. }
  2436. return true;
  2437. }
  2438. function getGraphemeBreakRawData() {
  2439. return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]");
  2440. }
  2441. function getLeftDeleteOffset(offset, str) {
  2442. if (offset === 0) {
  2443. return 0;
  2444. }
  2445. const emojiOffset = getOffsetBeforeLastEmojiComponent(offset, str);
  2446. if (emojiOffset !== void 0) {
  2447. return emojiOffset;
  2448. }
  2449. const iterator = new CodePointIterator(str, offset);
  2450. iterator.prevCodePoint();
  2451. return iterator.offset;
  2452. }
  2453. function getOffsetBeforeLastEmojiComponent(initialOffset, str) {
  2454. const iterator = new CodePointIterator(str, initialOffset);
  2455. let codePoint = iterator.prevCodePoint();
  2456. while (isEmojiModifier(codePoint) || codePoint === 65039 || codePoint === 8419) {
  2457. if (iterator.offset === 0) {
  2458. return void 0;
  2459. }
  2460. codePoint = iterator.prevCodePoint();
  2461. }
  2462. if (!isEmojiImprecise(codePoint)) {
  2463. return void 0;
  2464. }
  2465. let resultOffset = iterator.offset;
  2466. if (resultOffset > 0) {
  2467. const optionalZwjCodePoint = iterator.prevCodePoint();
  2468. if (optionalZwjCodePoint === 8205) {
  2469. resultOffset = iterator.offset;
  2470. }
  2471. }
  2472. return resultOffset;
  2473. }
  2474. function isEmojiModifier(codePoint) {
  2475. return 127995 <= codePoint && codePoint <= 127999;
  2476. }
  2477. var _a2, _formatRegexp, CodePointIterator, GraphemeIterator, CONTAINS_RTL, IS_BASIC_ASCII, UNUSUAL_LINE_TERMINATORS, UTF8_BOM_CHARACTER, GraphemeBreakTree, noBreakWhitespace, AmbiguousCharacters, InvisibleCharacters;
  2478. var init_strings = __esm({
  2479. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/strings.js"() {
  2480. init_cache();
  2481. init_lazy();
  2482. _formatRegexp = /{(\d+)}/g;
  2483. CodePointIterator = class {
  2484. get offset() {
  2485. return this._offset;
  2486. }
  2487. constructor(str, offset = 0) {
  2488. this._str = str;
  2489. this._len = str.length;
  2490. this._offset = offset;
  2491. }
  2492. setOffset(offset) {
  2493. this._offset = offset;
  2494. }
  2495. prevCodePoint() {
  2496. const codePoint = getPrevCodePoint(this._str, this._offset);
  2497. this._offset -= codePoint >= 65536 ? 2 : 1;
  2498. return codePoint;
  2499. }
  2500. nextCodePoint() {
  2501. const codePoint = getNextCodePoint(this._str, this._len, this._offset);
  2502. this._offset += codePoint >= 65536 ? 2 : 1;
  2503. return codePoint;
  2504. }
  2505. eol() {
  2506. return this._offset >= this._len;
  2507. }
  2508. };
  2509. GraphemeIterator = class {
  2510. get offset() {
  2511. return this._iterator.offset;
  2512. }
  2513. constructor(str, offset = 0) {
  2514. this._iterator = new CodePointIterator(str, offset);
  2515. }
  2516. nextGraphemeLength() {
  2517. const graphemeBreakTree = GraphemeBreakTree.getInstance();
  2518. const iterator = this._iterator;
  2519. const initialOffset = iterator.offset;
  2520. let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.nextCodePoint());
  2521. while (!iterator.eol()) {
  2522. const offset = iterator.offset;
  2523. const nextGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.nextCodePoint());
  2524. if (breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) {
  2525. iterator.setOffset(offset);
  2526. break;
  2527. }
  2528. graphemeBreakType = nextGraphemeBreakType;
  2529. }
  2530. return iterator.offset - initialOffset;
  2531. }
  2532. prevGraphemeLength() {
  2533. const graphemeBreakTree = GraphemeBreakTree.getInstance();
  2534. const iterator = this._iterator;
  2535. const initialOffset = iterator.offset;
  2536. let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.prevCodePoint());
  2537. while (iterator.offset > 0) {
  2538. const offset = iterator.offset;
  2539. const prevGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(iterator.prevCodePoint());
  2540. if (breakBetweenGraphemeBreakType(prevGraphemeBreakType, graphemeBreakType)) {
  2541. iterator.setOffset(offset);
  2542. break;
  2543. }
  2544. graphemeBreakType = prevGraphemeBreakType;
  2545. }
  2546. return initialOffset - iterator.offset;
  2547. }
  2548. eol() {
  2549. return this._iterator.eol();
  2550. }
  2551. };
  2552. CONTAINS_RTL = void 0;
  2553. IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/;
  2554. UNUSUAL_LINE_TERMINATORS = /[\u2028\u2029]/;
  2555. UTF8_BOM_CHARACTER = String.fromCharCode(
  2556. 65279
  2557. /* CharCode.UTF8_BOM */
  2558. );
  2559. GraphemeBreakTree = class _GraphemeBreakTree {
  2560. static getInstance() {
  2561. if (!_GraphemeBreakTree._INSTANCE) {
  2562. _GraphemeBreakTree._INSTANCE = new _GraphemeBreakTree();
  2563. }
  2564. return _GraphemeBreakTree._INSTANCE;
  2565. }
  2566. constructor() {
  2567. this._data = getGraphemeBreakRawData();
  2568. }
  2569. getGraphemeBreakType(codePoint) {
  2570. if (codePoint < 32) {
  2571. if (codePoint === 10) {
  2572. return 3;
  2573. }
  2574. if (codePoint === 13) {
  2575. return 2;
  2576. }
  2577. return 4;
  2578. }
  2579. if (codePoint < 127) {
  2580. return 0;
  2581. }
  2582. const data = this._data;
  2583. const nodeCount = data.length / 3;
  2584. let nodeIndex = 1;
  2585. while (nodeIndex <= nodeCount) {
  2586. if (codePoint < data[3 * nodeIndex]) {
  2587. nodeIndex = 2 * nodeIndex;
  2588. } else if (codePoint > data[3 * nodeIndex + 1]) {
  2589. nodeIndex = 2 * nodeIndex + 1;
  2590. } else {
  2591. return data[3 * nodeIndex + 2];
  2592. }
  2593. }
  2594. return 0;
  2595. }
  2596. };
  2597. GraphemeBreakTree._INSTANCE = null;
  2598. noBreakWhitespace = " ";
  2599. AmbiguousCharacters = class _AmbiguousCharacters {
  2600. static getInstance(locales) {
  2601. return _AmbiguousCharacters.cache.get(Array.from(locales));
  2602. }
  2603. static getLocales() {
  2604. return _AmbiguousCharacters._locales.value;
  2605. }
  2606. constructor(confusableDictionary) {
  2607. this.confusableDictionary = confusableDictionary;
  2608. }
  2609. isAmbiguous(codePoint) {
  2610. return this.confusableDictionary.has(codePoint);
  2611. }
  2612. /**
  2613. * Returns the non basic ASCII code point that the given code point can be confused,
  2614. * or undefined if such code point does note exist.
  2615. */
  2616. getPrimaryConfusable(codePoint) {
  2617. return this.confusableDictionary.get(codePoint);
  2618. }
  2619. getConfusableCodePoints() {
  2620. return new Set(this.confusableDictionary.keys());
  2621. }
  2622. };
  2623. _a2 = AmbiguousCharacters;
  2624. AmbiguousCharacters.ambiguousCharacterData = new Lazy(() => {
  2625. return JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}');
  2626. });
  2627. AmbiguousCharacters.cache = new LRUCachedFunction((locales) => {
  2628. function arrayToMap(arr) {
  2629. const result = /* @__PURE__ */ new Map();
  2630. for (let i = 0; i < arr.length; i += 2) {
  2631. result.set(arr[i], arr[i + 1]);
  2632. }
  2633. return result;
  2634. }
  2635. function mergeMaps(map1, map2) {
  2636. const result = new Map(map1);
  2637. for (const [key, value] of map2) {
  2638. result.set(key, value);
  2639. }
  2640. return result;
  2641. }
  2642. function intersectMaps(map1, map2) {
  2643. if (!map1) {
  2644. return map2;
  2645. }
  2646. const result = /* @__PURE__ */ new Map();
  2647. for (const [key, value] of map1) {
  2648. if (map2.has(key)) {
  2649. result.set(key, value);
  2650. }
  2651. }
  2652. return result;
  2653. }
  2654. const data = _a2.ambiguousCharacterData.value;
  2655. let filteredLocales = locales.filter((l) => !l.startsWith("_") && l in data);
  2656. if (filteredLocales.length === 0) {
  2657. filteredLocales = ["_default"];
  2658. }
  2659. let languageSpecificMap = void 0;
  2660. for (const locale of filteredLocales) {
  2661. const map2 = arrayToMap(data[locale]);
  2662. languageSpecificMap = intersectMaps(languageSpecificMap, map2);
  2663. }
  2664. const commonMap = arrayToMap(data["_common"]);
  2665. const map = mergeMaps(commonMap, languageSpecificMap);
  2666. return new AmbiguousCharacters(map);
  2667. });
  2668. AmbiguousCharacters._locales = new Lazy(() => Object.keys(AmbiguousCharacters.ambiguousCharacterData.value).filter((k) => !k.startsWith("_")));
  2669. InvisibleCharacters = class _InvisibleCharacters {
  2670. static getRawData() {
  2671. return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]");
  2672. }
  2673. static getData() {
  2674. if (!this._data) {
  2675. this._data = new Set(_InvisibleCharacters.getRawData());
  2676. }
  2677. return this._data;
  2678. }
  2679. static isInvisibleCharacter(codePoint) {
  2680. return _InvisibleCharacters.getData().has(codePoint);
  2681. }
  2682. static get codePoints() {
  2683. return _InvisibleCharacters.getData();
  2684. }
  2685. };
  2686. InvisibleCharacters._data = void 0;
  2687. }
  2688. });
  2689. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/hash.js
  2690. function hash(obj) {
  2691. return doHash(obj, 0);
  2692. }
  2693. function doHash(obj, hashVal) {
  2694. switch (typeof obj) {
  2695. case "object":
  2696. if (obj === null) {
  2697. return numberHash(349, hashVal);
  2698. } else if (Array.isArray(obj)) {
  2699. return arrayHash(obj, hashVal);
  2700. }
  2701. return objectHash(obj, hashVal);
  2702. case "string":
  2703. return stringHash(obj, hashVal);
  2704. case "boolean":
  2705. return booleanHash(obj, hashVal);
  2706. case "number":
  2707. return numberHash(obj, hashVal);
  2708. case "undefined":
  2709. return numberHash(937, hashVal);
  2710. default:
  2711. return numberHash(617, hashVal);
  2712. }
  2713. }
  2714. function numberHash(val, initialHashVal) {
  2715. return (initialHashVal << 5) - initialHashVal + val | 0;
  2716. }
  2717. function booleanHash(b, initialHashVal) {
  2718. return numberHash(b ? 433 : 863, initialHashVal);
  2719. }
  2720. function stringHash(s, hashVal) {
  2721. hashVal = numberHash(149417, hashVal);
  2722. for (let i = 0, length = s.length; i < length; i++) {
  2723. hashVal = numberHash(s.charCodeAt(i), hashVal);
  2724. }
  2725. return hashVal;
  2726. }
  2727. function arrayHash(arr, initialHashVal) {
  2728. initialHashVal = numberHash(104579, initialHashVal);
  2729. return arr.reduce((hashVal, item) => doHash(item, hashVal), initialHashVal);
  2730. }
  2731. function objectHash(obj, initialHashVal) {
  2732. initialHashVal = numberHash(181387, initialHashVal);
  2733. return Object.keys(obj).sort().reduce((hashVal, key) => {
  2734. hashVal = stringHash(key, hashVal);
  2735. return doHash(obj[key], hashVal);
  2736. }, initialHashVal);
  2737. }
  2738. function leftRotate(value, bits, totalBits = 32) {
  2739. const delta = totalBits - bits;
  2740. const mask = ~((1 << delta) - 1);
  2741. return (value << bits | (mask & value) >>> delta) >>> 0;
  2742. }
  2743. function fill(dest, index = 0, count = dest.byteLength, value = 0) {
  2744. for (let i = 0; i < count; i++) {
  2745. dest[index + i] = value;
  2746. }
  2747. }
  2748. function leftPad(value, length, char = "0") {
  2749. while (value.length < length) {
  2750. value = char + value;
  2751. }
  2752. return value;
  2753. }
  2754. function toHexString(bufferOrValue, bitsize = 32) {
  2755. if (bufferOrValue instanceof ArrayBuffer) {
  2756. return Array.from(new Uint8Array(bufferOrValue)).map((b) => b.toString(16).padStart(2, "0")).join("");
  2757. }
  2758. return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4);
  2759. }
  2760. var StringSHA1;
  2761. var init_hash = __esm({
  2762. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/hash.js"() {
  2763. init_strings();
  2764. StringSHA1 = class _StringSHA1 {
  2765. constructor() {
  2766. this._h0 = 1732584193;
  2767. this._h1 = 4023233417;
  2768. this._h2 = 2562383102;
  2769. this._h3 = 271733878;
  2770. this._h4 = 3285377520;
  2771. this._buff = new Uint8Array(
  2772. 64 + 3
  2773. /* to fit any utf-8 */
  2774. );
  2775. this._buffDV = new DataView(this._buff.buffer);
  2776. this._buffLen = 0;
  2777. this._totalLen = 0;
  2778. this._leftoverHighSurrogate = 0;
  2779. this._finished = false;
  2780. }
  2781. update(str) {
  2782. const strLen = str.length;
  2783. if (strLen === 0) {
  2784. return;
  2785. }
  2786. const buff = this._buff;
  2787. let buffLen = this._buffLen;
  2788. let leftoverHighSurrogate = this._leftoverHighSurrogate;
  2789. let charCode;
  2790. let offset;
  2791. if (leftoverHighSurrogate !== 0) {
  2792. charCode = leftoverHighSurrogate;
  2793. offset = -1;
  2794. leftoverHighSurrogate = 0;
  2795. } else {
  2796. charCode = str.charCodeAt(0);
  2797. offset = 0;
  2798. }
  2799. while (true) {
  2800. let codePoint = charCode;
  2801. if (isHighSurrogate(charCode)) {
  2802. if (offset + 1 < strLen) {
  2803. const nextCharCode = str.charCodeAt(offset + 1);
  2804. if (isLowSurrogate(nextCharCode)) {
  2805. offset++;
  2806. codePoint = computeCodePoint(charCode, nextCharCode);
  2807. } else {
  2808. codePoint = 65533;
  2809. }
  2810. } else {
  2811. leftoverHighSurrogate = charCode;
  2812. break;
  2813. }
  2814. } else if (isLowSurrogate(charCode)) {
  2815. codePoint = 65533;
  2816. }
  2817. buffLen = this._push(buff, buffLen, codePoint);
  2818. offset++;
  2819. if (offset < strLen) {
  2820. charCode = str.charCodeAt(offset);
  2821. } else {
  2822. break;
  2823. }
  2824. }
  2825. this._buffLen = buffLen;
  2826. this._leftoverHighSurrogate = leftoverHighSurrogate;
  2827. }
  2828. _push(buff, buffLen, codePoint) {
  2829. if (codePoint < 128) {
  2830. buff[buffLen++] = codePoint;
  2831. } else if (codePoint < 2048) {
  2832. buff[buffLen++] = 192 | (codePoint & 1984) >>> 6;
  2833. buff[buffLen++] = 128 | (codePoint & 63) >>> 0;
  2834. } else if (codePoint < 65536) {
  2835. buff[buffLen++] = 224 | (codePoint & 61440) >>> 12;
  2836. buff[buffLen++] = 128 | (codePoint & 4032) >>> 6;
  2837. buff[buffLen++] = 128 | (codePoint & 63) >>> 0;
  2838. } else {
  2839. buff[buffLen++] = 240 | (codePoint & 1835008) >>> 18;
  2840. buff[buffLen++] = 128 | (codePoint & 258048) >>> 12;
  2841. buff[buffLen++] = 128 | (codePoint & 4032) >>> 6;
  2842. buff[buffLen++] = 128 | (codePoint & 63) >>> 0;
  2843. }
  2844. if (buffLen >= 64) {
  2845. this._step();
  2846. buffLen -= 64;
  2847. this._totalLen += 64;
  2848. buff[0] = buff[64 + 0];
  2849. buff[1] = buff[64 + 1];
  2850. buff[2] = buff[64 + 2];
  2851. }
  2852. return buffLen;
  2853. }
  2854. digest() {
  2855. if (!this._finished) {
  2856. this._finished = true;
  2857. if (this._leftoverHighSurrogate) {
  2858. this._leftoverHighSurrogate = 0;
  2859. this._buffLen = this._push(
  2860. this._buff,
  2861. this._buffLen,
  2862. 65533
  2863. /* SHA1Constant.UNICODE_REPLACEMENT */
  2864. );
  2865. }
  2866. this._totalLen += this._buffLen;
  2867. this._wrapUp();
  2868. }
  2869. return toHexString(this._h0) + toHexString(this._h1) + toHexString(this._h2) + toHexString(this._h3) + toHexString(this._h4);
  2870. }
  2871. _wrapUp() {
  2872. this._buff[this._buffLen++] = 128;
  2873. fill(this._buff, this._buffLen);
  2874. if (this._buffLen > 56) {
  2875. this._step();
  2876. fill(this._buff);
  2877. }
  2878. const ml = 8 * this._totalLen;
  2879. this._buffDV.setUint32(56, Math.floor(ml / 4294967296), false);
  2880. this._buffDV.setUint32(60, ml % 4294967296, false);
  2881. this._step();
  2882. }
  2883. _step() {
  2884. const bigBlock32 = _StringSHA1._bigBlock32;
  2885. const data = this._buffDV;
  2886. for (let j = 0; j < 64; j += 4) {
  2887. bigBlock32.setUint32(j, data.getUint32(j, false), false);
  2888. }
  2889. for (let j = 64; j < 320; j += 4) {
  2890. bigBlock32.setUint32(j, leftRotate(bigBlock32.getUint32(j - 12, false) ^ bigBlock32.getUint32(j - 32, false) ^ bigBlock32.getUint32(j - 56, false) ^ bigBlock32.getUint32(j - 64, false), 1), false);
  2891. }
  2892. let a = this._h0;
  2893. let b = this._h1;
  2894. let c = this._h2;
  2895. let d = this._h3;
  2896. let e = this._h4;
  2897. let f, k;
  2898. let temp;
  2899. for (let j = 0; j < 80; j++) {
  2900. if (j < 20) {
  2901. f = b & c | ~b & d;
  2902. k = 1518500249;
  2903. } else if (j < 40) {
  2904. f = b ^ c ^ d;
  2905. k = 1859775393;
  2906. } else if (j < 60) {
  2907. f = b & c | b & d | c & d;
  2908. k = 2400959708;
  2909. } else {
  2910. f = b ^ c ^ d;
  2911. k = 3395469782;
  2912. }
  2913. temp = leftRotate(a, 5) + f + e + k + bigBlock32.getUint32(j * 4, false) & 4294967295;
  2914. e = d;
  2915. d = c;
  2916. c = leftRotate(b, 30);
  2917. b = a;
  2918. a = temp;
  2919. }
  2920. this._h0 = this._h0 + a & 4294967295;
  2921. this._h1 = this._h1 + b & 4294967295;
  2922. this._h2 = this._h2 + c & 4294967295;
  2923. this._h3 = this._h3 + d & 4294967295;
  2924. this._h4 = this._h4 + e & 4294967295;
  2925. }
  2926. };
  2927. StringSHA1._bigBlock32 = new DataView(new ArrayBuffer(320));
  2928. }
  2929. });
  2930. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/process.js
  2931. var safeProcess, cwd, env, platform;
  2932. var init_process = __esm({
  2933. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/process.js"() {
  2934. init_platform();
  2935. if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== "undefined") {
  2936. const sandboxProcess = globals.vscode.process;
  2937. safeProcess = {
  2938. get platform() {
  2939. return sandboxProcess.platform;
  2940. },
  2941. get arch() {
  2942. return sandboxProcess.arch;
  2943. },
  2944. get env() {
  2945. return sandboxProcess.env;
  2946. },
  2947. cwd() {
  2948. return sandboxProcess.cwd();
  2949. }
  2950. };
  2951. } else if (typeof process !== "undefined") {
  2952. safeProcess = {
  2953. get platform() {
  2954. return process.platform;
  2955. },
  2956. get arch() {
  2957. return process.arch;
  2958. },
  2959. get env() {
  2960. return process.env;
  2961. },
  2962. cwd() {
  2963. return process.env["VSCODE_CWD"] || process.cwd();
  2964. }
  2965. };
  2966. } else {
  2967. safeProcess = {
  2968. // Supported
  2969. get platform() {
  2970. return isWindows ? "win32" : isMacintosh ? "darwin" : "linux";
  2971. },
  2972. get arch() {
  2973. return void 0;
  2974. },
  2975. // Unsupported
  2976. get env() {
  2977. return {};
  2978. },
  2979. cwd() {
  2980. return "/";
  2981. }
  2982. };
  2983. }
  2984. cwd = safeProcess.cwd;
  2985. env = safeProcess.env;
  2986. platform = safeProcess.platform;
  2987. }
  2988. });
  2989. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/path.js
  2990. function validateObject(pathObject, name) {
  2991. if (pathObject === null || typeof pathObject !== "object") {
  2992. throw new ErrorInvalidArgType(name, "Object", pathObject);
  2993. }
  2994. }
  2995. function validateString(value, name) {
  2996. if (typeof value !== "string") {
  2997. throw new ErrorInvalidArgType(name, "string", value);
  2998. }
  2999. }
  3000. function isPathSeparator(code) {
  3001. return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
  3002. }
  3003. function isPosixPathSeparator(code) {
  3004. return code === CHAR_FORWARD_SLASH;
  3005. }
  3006. function isWindowsDeviceRoot(code) {
  3007. return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z || code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z;
  3008. }
  3009. function normalizeString(path, allowAboveRoot, separator, isPathSeparator2) {
  3010. let res = "";
  3011. let lastSegmentLength = 0;
  3012. let lastSlash = -1;
  3013. let dots = 0;
  3014. let code = 0;
  3015. for (let i = 0; i <= path.length; ++i) {
  3016. if (i < path.length) {
  3017. code = path.charCodeAt(i);
  3018. } else if (isPathSeparator2(code)) {
  3019. break;
  3020. } else {
  3021. code = CHAR_FORWARD_SLASH;
  3022. }
  3023. if (isPathSeparator2(code)) {
  3024. if (lastSlash === i - 1 || dots === 1) {
  3025. } else if (dots === 2) {
  3026. if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {
  3027. if (res.length > 2) {
  3028. const lastSlashIndex = res.lastIndexOf(separator);
  3029. if (lastSlashIndex === -1) {
  3030. res = "";
  3031. lastSegmentLength = 0;
  3032. } else {
  3033. res = res.slice(0, lastSlashIndex);
  3034. lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
  3035. }
  3036. lastSlash = i;
  3037. dots = 0;
  3038. continue;
  3039. } else if (res.length !== 0) {
  3040. res = "";
  3041. lastSegmentLength = 0;
  3042. lastSlash = i;
  3043. dots = 0;
  3044. continue;
  3045. }
  3046. }
  3047. if (allowAboveRoot) {
  3048. res += res.length > 0 ? `${separator}..` : "..";
  3049. lastSegmentLength = 2;
  3050. }
  3051. } else {
  3052. if (res.length > 0) {
  3053. res += `${separator}${path.slice(lastSlash + 1, i)}`;
  3054. } else {
  3055. res = path.slice(lastSlash + 1, i);
  3056. }
  3057. lastSegmentLength = i - lastSlash - 1;
  3058. }
  3059. lastSlash = i;
  3060. dots = 0;
  3061. } else if (code === CHAR_DOT && dots !== -1) {
  3062. ++dots;
  3063. } else {
  3064. dots = -1;
  3065. }
  3066. }
  3067. return res;
  3068. }
  3069. function _format2(sep2, pathObject) {
  3070. validateObject(pathObject, "pathObject");
  3071. const dir = pathObject.dir || pathObject.root;
  3072. const base = pathObject.base || `${pathObject.name || ""}${pathObject.ext || ""}`;
  3073. if (!dir) {
  3074. return base;
  3075. }
  3076. return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep2}${base}`;
  3077. }
  3078. var CHAR_UPPERCASE_A, CHAR_LOWERCASE_A, CHAR_UPPERCASE_Z, CHAR_LOWERCASE_Z, CHAR_DOT, CHAR_FORWARD_SLASH, CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_QUESTION_MARK, ErrorInvalidArgType, platformIsWin32, win32, posixCwd, posix, normalize, resolve, relative, dirname, basename, extname, sep;
  3079. var init_path = __esm({
  3080. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/path.js"() {
  3081. init_process();
  3082. CHAR_UPPERCASE_A = 65;
  3083. CHAR_LOWERCASE_A = 97;
  3084. CHAR_UPPERCASE_Z = 90;
  3085. CHAR_LOWERCASE_Z = 122;
  3086. CHAR_DOT = 46;
  3087. CHAR_FORWARD_SLASH = 47;
  3088. CHAR_BACKWARD_SLASH = 92;
  3089. CHAR_COLON = 58;
  3090. CHAR_QUESTION_MARK = 63;
  3091. ErrorInvalidArgType = class extends Error {
  3092. constructor(name, expected, actual) {
  3093. let determiner;
  3094. if (typeof expected === "string" && expected.indexOf("not ") === 0) {
  3095. determiner = "must not be";
  3096. expected = expected.replace(/^not /, "");
  3097. } else {
  3098. determiner = "must be";
  3099. }
  3100. const type = name.indexOf(".") !== -1 ? "property" : "argument";
  3101. let msg = `The "${name}" ${type} ${determiner} of type ${expected}`;
  3102. msg += `. Received type ${typeof actual}`;
  3103. super(msg);
  3104. this.code = "ERR_INVALID_ARG_TYPE";
  3105. }
  3106. };
  3107. platformIsWin32 = platform === "win32";
  3108. win32 = {
  3109. // path.resolve([from ...], to)
  3110. resolve(...pathSegments) {
  3111. let resolvedDevice = "";
  3112. let resolvedTail = "";
  3113. let resolvedAbsolute = false;
  3114. for (let i = pathSegments.length - 1; i >= -1; i--) {
  3115. let path;
  3116. if (i >= 0) {
  3117. path = pathSegments[i];
  3118. validateString(path, "path");
  3119. if (path.length === 0) {
  3120. continue;
  3121. }
  3122. } else if (resolvedDevice.length === 0) {
  3123. path = cwd();
  3124. } else {
  3125. path = env[`=${resolvedDevice}`] || cwd();
  3126. if (path === void 0 || path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() && path.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
  3127. path = `${resolvedDevice}\\`;
  3128. }
  3129. }
  3130. const len = path.length;
  3131. let rootEnd = 0;
  3132. let device = "";
  3133. let isAbsolute = false;
  3134. const code = path.charCodeAt(0);
  3135. if (len === 1) {
  3136. if (isPathSeparator(code)) {
  3137. rootEnd = 1;
  3138. isAbsolute = true;
  3139. }
  3140. } else if (isPathSeparator(code)) {
  3141. isAbsolute = true;
  3142. if (isPathSeparator(path.charCodeAt(1))) {
  3143. let j = 2;
  3144. let last = j;
  3145. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3146. j++;
  3147. }
  3148. if (j < len && j !== last) {
  3149. const firstPart = path.slice(last, j);
  3150. last = j;
  3151. while (j < len && isPathSeparator(path.charCodeAt(j))) {
  3152. j++;
  3153. }
  3154. if (j < len && j !== last) {
  3155. last = j;
  3156. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3157. j++;
  3158. }
  3159. if (j === len || j !== last) {
  3160. device = `\\\\${firstPart}\\${path.slice(last, j)}`;
  3161. rootEnd = j;
  3162. }
  3163. }
  3164. }
  3165. } else {
  3166. rootEnd = 1;
  3167. }
  3168. } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
  3169. device = path.slice(0, 2);
  3170. rootEnd = 2;
  3171. if (len > 2 && isPathSeparator(path.charCodeAt(2))) {
  3172. isAbsolute = true;
  3173. rootEnd = 3;
  3174. }
  3175. }
  3176. if (device.length > 0) {
  3177. if (resolvedDevice.length > 0) {
  3178. if (device.toLowerCase() !== resolvedDevice.toLowerCase()) {
  3179. continue;
  3180. }
  3181. } else {
  3182. resolvedDevice = device;
  3183. }
  3184. }
  3185. if (resolvedAbsolute) {
  3186. if (resolvedDevice.length > 0) {
  3187. break;
  3188. }
  3189. } else {
  3190. resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
  3191. resolvedAbsolute = isAbsolute;
  3192. if (isAbsolute && resolvedDevice.length > 0) {
  3193. break;
  3194. }
  3195. }
  3196. }
  3197. resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator);
  3198. return resolvedAbsolute ? `${resolvedDevice}\\${resolvedTail}` : `${resolvedDevice}${resolvedTail}` || ".";
  3199. },
  3200. normalize(path) {
  3201. validateString(path, "path");
  3202. const len = path.length;
  3203. if (len === 0) {
  3204. return ".";
  3205. }
  3206. let rootEnd = 0;
  3207. let device;
  3208. let isAbsolute = false;
  3209. const code = path.charCodeAt(0);
  3210. if (len === 1) {
  3211. return isPosixPathSeparator(code) ? "\\" : path;
  3212. }
  3213. if (isPathSeparator(code)) {
  3214. isAbsolute = true;
  3215. if (isPathSeparator(path.charCodeAt(1))) {
  3216. let j = 2;
  3217. let last = j;
  3218. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3219. j++;
  3220. }
  3221. if (j < len && j !== last) {
  3222. const firstPart = path.slice(last, j);
  3223. last = j;
  3224. while (j < len && isPathSeparator(path.charCodeAt(j))) {
  3225. j++;
  3226. }
  3227. if (j < len && j !== last) {
  3228. last = j;
  3229. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3230. j++;
  3231. }
  3232. if (j === len) {
  3233. return `\\\\${firstPart}\\${path.slice(last)}\\`;
  3234. }
  3235. if (j !== last) {
  3236. device = `\\\\${firstPart}\\${path.slice(last, j)}`;
  3237. rootEnd = j;
  3238. }
  3239. }
  3240. }
  3241. } else {
  3242. rootEnd = 1;
  3243. }
  3244. } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
  3245. device = path.slice(0, 2);
  3246. rootEnd = 2;
  3247. if (len > 2 && isPathSeparator(path.charCodeAt(2))) {
  3248. isAbsolute = true;
  3249. rootEnd = 3;
  3250. }
  3251. }
  3252. let tail3 = rootEnd < len ? normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator) : "";
  3253. if (tail3.length === 0 && !isAbsolute) {
  3254. tail3 = ".";
  3255. }
  3256. if (tail3.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {
  3257. tail3 += "\\";
  3258. }
  3259. if (device === void 0) {
  3260. return isAbsolute ? `\\${tail3}` : tail3;
  3261. }
  3262. return isAbsolute ? `${device}\\${tail3}` : `${device}${tail3}`;
  3263. },
  3264. isAbsolute(path) {
  3265. validateString(path, "path");
  3266. const len = path.length;
  3267. if (len === 0) {
  3268. return false;
  3269. }
  3270. const code = path.charCodeAt(0);
  3271. return isPathSeparator(code) || // Possible device root
  3272. len > 2 && isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON && isPathSeparator(path.charCodeAt(2));
  3273. },
  3274. join(...paths) {
  3275. if (paths.length === 0) {
  3276. return ".";
  3277. }
  3278. let joined;
  3279. let firstPart;
  3280. for (let i = 0; i < paths.length; ++i) {
  3281. const arg = paths[i];
  3282. validateString(arg, "path");
  3283. if (arg.length > 0) {
  3284. if (joined === void 0) {
  3285. joined = firstPart = arg;
  3286. } else {
  3287. joined += `\\${arg}`;
  3288. }
  3289. }
  3290. }
  3291. if (joined === void 0) {
  3292. return ".";
  3293. }
  3294. let needsReplace = true;
  3295. let slashCount = 0;
  3296. if (typeof firstPart === "string" && isPathSeparator(firstPart.charCodeAt(0))) {
  3297. ++slashCount;
  3298. const firstLen = firstPart.length;
  3299. if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {
  3300. ++slashCount;
  3301. if (firstLen > 2) {
  3302. if (isPathSeparator(firstPart.charCodeAt(2))) {
  3303. ++slashCount;
  3304. } else {
  3305. needsReplace = false;
  3306. }
  3307. }
  3308. }
  3309. }
  3310. if (needsReplace) {
  3311. while (slashCount < joined.length && isPathSeparator(joined.charCodeAt(slashCount))) {
  3312. slashCount++;
  3313. }
  3314. if (slashCount >= 2) {
  3315. joined = `\\${joined.slice(slashCount)}`;
  3316. }
  3317. }
  3318. return win32.normalize(joined);
  3319. },
  3320. // It will solve the relative path from `from` to `to`, for instance:
  3321. // from = 'C:\\orandea\\test\\aaa'
  3322. // to = 'C:\\orandea\\impl\\bbb'
  3323. // The output of the function should be: '..\\..\\impl\\bbb'
  3324. relative(from, to) {
  3325. validateString(from, "from");
  3326. validateString(to, "to");
  3327. if (from === to) {
  3328. return "";
  3329. }
  3330. const fromOrig = win32.resolve(from);
  3331. const toOrig = win32.resolve(to);
  3332. if (fromOrig === toOrig) {
  3333. return "";
  3334. }
  3335. from = fromOrig.toLowerCase();
  3336. to = toOrig.toLowerCase();
  3337. if (from === to) {
  3338. return "";
  3339. }
  3340. let fromStart = 0;
  3341. while (fromStart < from.length && from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {
  3342. fromStart++;
  3343. }
  3344. let fromEnd = from.length;
  3345. while (fromEnd - 1 > fromStart && from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {
  3346. fromEnd--;
  3347. }
  3348. const fromLen = fromEnd - fromStart;
  3349. let toStart = 0;
  3350. while (toStart < to.length && to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {
  3351. toStart++;
  3352. }
  3353. let toEnd = to.length;
  3354. while (toEnd - 1 > toStart && to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {
  3355. toEnd--;
  3356. }
  3357. const toLen = toEnd - toStart;
  3358. const length = fromLen < toLen ? fromLen : toLen;
  3359. let lastCommonSep = -1;
  3360. let i = 0;
  3361. for (; i < length; i++) {
  3362. const fromCode = from.charCodeAt(fromStart + i);
  3363. if (fromCode !== to.charCodeAt(toStart + i)) {
  3364. break;
  3365. } else if (fromCode === CHAR_BACKWARD_SLASH) {
  3366. lastCommonSep = i;
  3367. }
  3368. }
  3369. if (i !== length) {
  3370. if (lastCommonSep === -1) {
  3371. return toOrig;
  3372. }
  3373. } else {
  3374. if (toLen > length) {
  3375. if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {
  3376. return toOrig.slice(toStart + i + 1);
  3377. }
  3378. if (i === 2) {
  3379. return toOrig.slice(toStart + i);
  3380. }
  3381. }
  3382. if (fromLen > length) {
  3383. if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {
  3384. lastCommonSep = i;
  3385. } else if (i === 2) {
  3386. lastCommonSep = 3;
  3387. }
  3388. }
  3389. if (lastCommonSep === -1) {
  3390. lastCommonSep = 0;
  3391. }
  3392. }
  3393. let out = "";
  3394. for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
  3395. if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {
  3396. out += out.length === 0 ? ".." : "\\..";
  3397. }
  3398. }
  3399. toStart += lastCommonSep;
  3400. if (out.length > 0) {
  3401. return `${out}${toOrig.slice(toStart, toEnd)}`;
  3402. }
  3403. if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {
  3404. ++toStart;
  3405. }
  3406. return toOrig.slice(toStart, toEnd);
  3407. },
  3408. toNamespacedPath(path) {
  3409. if (typeof path !== "string" || path.length === 0) {
  3410. return path;
  3411. }
  3412. const resolvedPath = win32.resolve(path);
  3413. if (resolvedPath.length <= 2) {
  3414. return path;
  3415. }
  3416. if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {
  3417. if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {
  3418. const code = resolvedPath.charCodeAt(2);
  3419. if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {
  3420. return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
  3421. }
  3422. }
  3423. } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) && resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
  3424. return `\\\\?\\${resolvedPath}`;
  3425. }
  3426. return path;
  3427. },
  3428. dirname(path) {
  3429. validateString(path, "path");
  3430. const len = path.length;
  3431. if (len === 0) {
  3432. return ".";
  3433. }
  3434. let rootEnd = -1;
  3435. let offset = 0;
  3436. const code = path.charCodeAt(0);
  3437. if (len === 1) {
  3438. return isPathSeparator(code) ? path : ".";
  3439. }
  3440. if (isPathSeparator(code)) {
  3441. rootEnd = offset = 1;
  3442. if (isPathSeparator(path.charCodeAt(1))) {
  3443. let j = 2;
  3444. let last = j;
  3445. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3446. j++;
  3447. }
  3448. if (j < len && j !== last) {
  3449. last = j;
  3450. while (j < len && isPathSeparator(path.charCodeAt(j))) {
  3451. j++;
  3452. }
  3453. if (j < len && j !== last) {
  3454. last = j;
  3455. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3456. j++;
  3457. }
  3458. if (j === len) {
  3459. return path;
  3460. }
  3461. if (j !== last) {
  3462. rootEnd = offset = j + 1;
  3463. }
  3464. }
  3465. }
  3466. }
  3467. } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
  3468. rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;
  3469. offset = rootEnd;
  3470. }
  3471. let end = -1;
  3472. let matchedSlash = true;
  3473. for (let i = len - 1; i >= offset; --i) {
  3474. if (isPathSeparator(path.charCodeAt(i))) {
  3475. if (!matchedSlash) {
  3476. end = i;
  3477. break;
  3478. }
  3479. } else {
  3480. matchedSlash = false;
  3481. }
  3482. }
  3483. if (end === -1) {
  3484. if (rootEnd === -1) {
  3485. return ".";
  3486. }
  3487. end = rootEnd;
  3488. }
  3489. return path.slice(0, end);
  3490. },
  3491. basename(path, ext) {
  3492. if (ext !== void 0) {
  3493. validateString(ext, "ext");
  3494. }
  3495. validateString(path, "path");
  3496. let start = 0;
  3497. let end = -1;
  3498. let matchedSlash = true;
  3499. let i;
  3500. if (path.length >= 2 && isWindowsDeviceRoot(path.charCodeAt(0)) && path.charCodeAt(1) === CHAR_COLON) {
  3501. start = 2;
  3502. }
  3503. if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
  3504. if (ext === path) {
  3505. return "";
  3506. }
  3507. let extIdx = ext.length - 1;
  3508. let firstNonSlashEnd = -1;
  3509. for (i = path.length - 1; i >= start; --i) {
  3510. const code = path.charCodeAt(i);
  3511. if (isPathSeparator(code)) {
  3512. if (!matchedSlash) {
  3513. start = i + 1;
  3514. break;
  3515. }
  3516. } else {
  3517. if (firstNonSlashEnd === -1) {
  3518. matchedSlash = false;
  3519. firstNonSlashEnd = i + 1;
  3520. }
  3521. if (extIdx >= 0) {
  3522. if (code === ext.charCodeAt(extIdx)) {
  3523. if (--extIdx === -1) {
  3524. end = i;
  3525. }
  3526. } else {
  3527. extIdx = -1;
  3528. end = firstNonSlashEnd;
  3529. }
  3530. }
  3531. }
  3532. }
  3533. if (start === end) {
  3534. end = firstNonSlashEnd;
  3535. } else if (end === -1) {
  3536. end = path.length;
  3537. }
  3538. return path.slice(start, end);
  3539. }
  3540. for (i = path.length - 1; i >= start; --i) {
  3541. if (isPathSeparator(path.charCodeAt(i))) {
  3542. if (!matchedSlash) {
  3543. start = i + 1;
  3544. break;
  3545. }
  3546. } else if (end === -1) {
  3547. matchedSlash = false;
  3548. end = i + 1;
  3549. }
  3550. }
  3551. if (end === -1) {
  3552. return "";
  3553. }
  3554. return path.slice(start, end);
  3555. },
  3556. extname(path) {
  3557. validateString(path, "path");
  3558. let start = 0;
  3559. let startDot = -1;
  3560. let startPart = 0;
  3561. let end = -1;
  3562. let matchedSlash = true;
  3563. let preDotState = 0;
  3564. if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) {
  3565. start = startPart = 2;
  3566. }
  3567. for (let i = path.length - 1; i >= start; --i) {
  3568. const code = path.charCodeAt(i);
  3569. if (isPathSeparator(code)) {
  3570. if (!matchedSlash) {
  3571. startPart = i + 1;
  3572. break;
  3573. }
  3574. continue;
  3575. }
  3576. if (end === -1) {
  3577. matchedSlash = false;
  3578. end = i + 1;
  3579. }
  3580. if (code === CHAR_DOT) {
  3581. if (startDot === -1) {
  3582. startDot = i;
  3583. } else if (preDotState !== 1) {
  3584. preDotState = 1;
  3585. }
  3586. } else if (startDot !== -1) {
  3587. preDotState = -1;
  3588. }
  3589. }
  3590. if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
  3591. preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
  3592. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  3593. return "";
  3594. }
  3595. return path.slice(startDot, end);
  3596. },
  3597. format: _format2.bind(null, "\\"),
  3598. parse(path) {
  3599. validateString(path, "path");
  3600. const ret = { root: "", dir: "", base: "", ext: "", name: "" };
  3601. if (path.length === 0) {
  3602. return ret;
  3603. }
  3604. const len = path.length;
  3605. let rootEnd = 0;
  3606. let code = path.charCodeAt(0);
  3607. if (len === 1) {
  3608. if (isPathSeparator(code)) {
  3609. ret.root = ret.dir = path;
  3610. return ret;
  3611. }
  3612. ret.base = ret.name = path;
  3613. return ret;
  3614. }
  3615. if (isPathSeparator(code)) {
  3616. rootEnd = 1;
  3617. if (isPathSeparator(path.charCodeAt(1))) {
  3618. let j = 2;
  3619. let last = j;
  3620. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3621. j++;
  3622. }
  3623. if (j < len && j !== last) {
  3624. last = j;
  3625. while (j < len && isPathSeparator(path.charCodeAt(j))) {
  3626. j++;
  3627. }
  3628. if (j < len && j !== last) {
  3629. last = j;
  3630. while (j < len && !isPathSeparator(path.charCodeAt(j))) {
  3631. j++;
  3632. }
  3633. if (j === len) {
  3634. rootEnd = j;
  3635. } else if (j !== last) {
  3636. rootEnd = j + 1;
  3637. }
  3638. }
  3639. }
  3640. }
  3641. } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
  3642. if (len <= 2) {
  3643. ret.root = ret.dir = path;
  3644. return ret;
  3645. }
  3646. rootEnd = 2;
  3647. if (isPathSeparator(path.charCodeAt(2))) {
  3648. if (len === 3) {
  3649. ret.root = ret.dir = path;
  3650. return ret;
  3651. }
  3652. rootEnd = 3;
  3653. }
  3654. }
  3655. if (rootEnd > 0) {
  3656. ret.root = path.slice(0, rootEnd);
  3657. }
  3658. let startDot = -1;
  3659. let startPart = rootEnd;
  3660. let end = -1;
  3661. let matchedSlash = true;
  3662. let i = path.length - 1;
  3663. let preDotState = 0;
  3664. for (; i >= rootEnd; --i) {
  3665. code = path.charCodeAt(i);
  3666. if (isPathSeparator(code)) {
  3667. if (!matchedSlash) {
  3668. startPart = i + 1;
  3669. break;
  3670. }
  3671. continue;
  3672. }
  3673. if (end === -1) {
  3674. matchedSlash = false;
  3675. end = i + 1;
  3676. }
  3677. if (code === CHAR_DOT) {
  3678. if (startDot === -1) {
  3679. startDot = i;
  3680. } else if (preDotState !== 1) {
  3681. preDotState = 1;
  3682. }
  3683. } else if (startDot !== -1) {
  3684. preDotState = -1;
  3685. }
  3686. }
  3687. if (end !== -1) {
  3688. if (startDot === -1 || // We saw a non-dot character immediately before the dot
  3689. preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
  3690. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  3691. ret.base = ret.name = path.slice(startPart, end);
  3692. } else {
  3693. ret.name = path.slice(startPart, startDot);
  3694. ret.base = path.slice(startPart, end);
  3695. ret.ext = path.slice(startDot, end);
  3696. }
  3697. }
  3698. if (startPart > 0 && startPart !== rootEnd) {
  3699. ret.dir = path.slice(0, startPart - 1);
  3700. } else {
  3701. ret.dir = ret.root;
  3702. }
  3703. return ret;
  3704. },
  3705. sep: "\\",
  3706. delimiter: ";",
  3707. win32: null,
  3708. posix: null
  3709. };
  3710. posixCwd = (() => {
  3711. if (platformIsWin32) {
  3712. const regexp = /\\/g;
  3713. return () => {
  3714. const cwd2 = cwd().replace(regexp, "/");
  3715. return cwd2.slice(cwd2.indexOf("/"));
  3716. };
  3717. }
  3718. return () => cwd();
  3719. })();
  3720. posix = {
  3721. // path.resolve([from ...], to)
  3722. resolve(...pathSegments) {
  3723. let resolvedPath = "";
  3724. let resolvedAbsolute = false;
  3725. for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  3726. const path = i >= 0 ? pathSegments[i] : posixCwd();
  3727. validateString(path, "path");
  3728. if (path.length === 0) {
  3729. continue;
  3730. }
  3731. resolvedPath = `${path}/${resolvedPath}`;
  3732. resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
  3733. }
  3734. resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator);
  3735. if (resolvedAbsolute) {
  3736. return `/${resolvedPath}`;
  3737. }
  3738. return resolvedPath.length > 0 ? resolvedPath : ".";
  3739. },
  3740. normalize(path) {
  3741. validateString(path, "path");
  3742. if (path.length === 0) {
  3743. return ".";
  3744. }
  3745. const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
  3746. const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;
  3747. path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator);
  3748. if (path.length === 0) {
  3749. if (isAbsolute) {
  3750. return "/";
  3751. }
  3752. return trailingSeparator ? "./" : ".";
  3753. }
  3754. if (trailingSeparator) {
  3755. path += "/";
  3756. }
  3757. return isAbsolute ? `/${path}` : path;
  3758. },
  3759. isAbsolute(path) {
  3760. validateString(path, "path");
  3761. return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;
  3762. },
  3763. join(...paths) {
  3764. if (paths.length === 0) {
  3765. return ".";
  3766. }
  3767. let joined;
  3768. for (let i = 0; i < paths.length; ++i) {
  3769. const arg = paths[i];
  3770. validateString(arg, "path");
  3771. if (arg.length > 0) {
  3772. if (joined === void 0) {
  3773. joined = arg;
  3774. } else {
  3775. joined += `/${arg}`;
  3776. }
  3777. }
  3778. }
  3779. if (joined === void 0) {
  3780. return ".";
  3781. }
  3782. return posix.normalize(joined);
  3783. },
  3784. relative(from, to) {
  3785. validateString(from, "from");
  3786. validateString(to, "to");
  3787. if (from === to) {
  3788. return "";
  3789. }
  3790. from = posix.resolve(from);
  3791. to = posix.resolve(to);
  3792. if (from === to) {
  3793. return "";
  3794. }
  3795. const fromStart = 1;
  3796. const fromEnd = from.length;
  3797. const fromLen = fromEnd - fromStart;
  3798. const toStart = 1;
  3799. const toLen = to.length - toStart;
  3800. const length = fromLen < toLen ? fromLen : toLen;
  3801. let lastCommonSep = -1;
  3802. let i = 0;
  3803. for (; i < length; i++) {
  3804. const fromCode = from.charCodeAt(fromStart + i);
  3805. if (fromCode !== to.charCodeAt(toStart + i)) {
  3806. break;
  3807. } else if (fromCode === CHAR_FORWARD_SLASH) {
  3808. lastCommonSep = i;
  3809. }
  3810. }
  3811. if (i === length) {
  3812. if (toLen > length) {
  3813. if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {
  3814. return to.slice(toStart + i + 1);
  3815. }
  3816. if (i === 0) {
  3817. return to.slice(toStart + i);
  3818. }
  3819. } else if (fromLen > length) {
  3820. if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {
  3821. lastCommonSep = i;
  3822. } else if (i === 0) {
  3823. lastCommonSep = 0;
  3824. }
  3825. }
  3826. }
  3827. let out = "";
  3828. for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
  3829. if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {
  3830. out += out.length === 0 ? ".." : "/..";
  3831. }
  3832. }
  3833. return `${out}${to.slice(toStart + lastCommonSep)}`;
  3834. },
  3835. toNamespacedPath(path) {
  3836. return path;
  3837. },
  3838. dirname(path) {
  3839. validateString(path, "path");
  3840. if (path.length === 0) {
  3841. return ".";
  3842. }
  3843. const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
  3844. let end = -1;
  3845. let matchedSlash = true;
  3846. for (let i = path.length - 1; i >= 1; --i) {
  3847. if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {
  3848. if (!matchedSlash) {
  3849. end = i;
  3850. break;
  3851. }
  3852. } else {
  3853. matchedSlash = false;
  3854. }
  3855. }
  3856. if (end === -1) {
  3857. return hasRoot ? "/" : ".";
  3858. }
  3859. if (hasRoot && end === 1) {
  3860. return "//";
  3861. }
  3862. return path.slice(0, end);
  3863. },
  3864. basename(path, ext) {
  3865. if (ext !== void 0) {
  3866. validateString(ext, "ext");
  3867. }
  3868. validateString(path, "path");
  3869. let start = 0;
  3870. let end = -1;
  3871. let matchedSlash = true;
  3872. let i;
  3873. if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
  3874. if (ext === path) {
  3875. return "";
  3876. }
  3877. let extIdx = ext.length - 1;
  3878. let firstNonSlashEnd = -1;
  3879. for (i = path.length - 1; i >= 0; --i) {
  3880. const code = path.charCodeAt(i);
  3881. if (code === CHAR_FORWARD_SLASH) {
  3882. if (!matchedSlash) {
  3883. start = i + 1;
  3884. break;
  3885. }
  3886. } else {
  3887. if (firstNonSlashEnd === -1) {
  3888. matchedSlash = false;
  3889. firstNonSlashEnd = i + 1;
  3890. }
  3891. if (extIdx >= 0) {
  3892. if (code === ext.charCodeAt(extIdx)) {
  3893. if (--extIdx === -1) {
  3894. end = i;
  3895. }
  3896. } else {
  3897. extIdx = -1;
  3898. end = firstNonSlashEnd;
  3899. }
  3900. }
  3901. }
  3902. }
  3903. if (start === end) {
  3904. end = firstNonSlashEnd;
  3905. } else if (end === -1) {
  3906. end = path.length;
  3907. }
  3908. return path.slice(start, end);
  3909. }
  3910. for (i = path.length - 1; i >= 0; --i) {
  3911. if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {
  3912. if (!matchedSlash) {
  3913. start = i + 1;
  3914. break;
  3915. }
  3916. } else if (end === -1) {
  3917. matchedSlash = false;
  3918. end = i + 1;
  3919. }
  3920. }
  3921. if (end === -1) {
  3922. return "";
  3923. }
  3924. return path.slice(start, end);
  3925. },
  3926. extname(path) {
  3927. validateString(path, "path");
  3928. let startDot = -1;
  3929. let startPart = 0;
  3930. let end = -1;
  3931. let matchedSlash = true;
  3932. let preDotState = 0;
  3933. for (let i = path.length - 1; i >= 0; --i) {
  3934. const code = path.charCodeAt(i);
  3935. if (code === CHAR_FORWARD_SLASH) {
  3936. if (!matchedSlash) {
  3937. startPart = i + 1;
  3938. break;
  3939. }
  3940. continue;
  3941. }
  3942. if (end === -1) {
  3943. matchedSlash = false;
  3944. end = i + 1;
  3945. }
  3946. if (code === CHAR_DOT) {
  3947. if (startDot === -1) {
  3948. startDot = i;
  3949. } else if (preDotState !== 1) {
  3950. preDotState = 1;
  3951. }
  3952. } else if (startDot !== -1) {
  3953. preDotState = -1;
  3954. }
  3955. }
  3956. if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
  3957. preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
  3958. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  3959. return "";
  3960. }
  3961. return path.slice(startDot, end);
  3962. },
  3963. format: _format2.bind(null, "/"),
  3964. parse(path) {
  3965. validateString(path, "path");
  3966. const ret = { root: "", dir: "", base: "", ext: "", name: "" };
  3967. if (path.length === 0) {
  3968. return ret;
  3969. }
  3970. const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
  3971. let start;
  3972. if (isAbsolute) {
  3973. ret.root = "/";
  3974. start = 1;
  3975. } else {
  3976. start = 0;
  3977. }
  3978. let startDot = -1;
  3979. let startPart = 0;
  3980. let end = -1;
  3981. let matchedSlash = true;
  3982. let i = path.length - 1;
  3983. let preDotState = 0;
  3984. for (; i >= start; --i) {
  3985. const code = path.charCodeAt(i);
  3986. if (code === CHAR_FORWARD_SLASH) {
  3987. if (!matchedSlash) {
  3988. startPart = i + 1;
  3989. break;
  3990. }
  3991. continue;
  3992. }
  3993. if (end === -1) {
  3994. matchedSlash = false;
  3995. end = i + 1;
  3996. }
  3997. if (code === CHAR_DOT) {
  3998. if (startDot === -1) {
  3999. startDot = i;
  4000. } else if (preDotState !== 1) {
  4001. preDotState = 1;
  4002. }
  4003. } else if (startDot !== -1) {
  4004. preDotState = -1;
  4005. }
  4006. }
  4007. if (end !== -1) {
  4008. const start2 = startPart === 0 && isAbsolute ? 1 : startPart;
  4009. if (startDot === -1 || // We saw a non-dot character immediately before the dot
  4010. preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
  4011. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  4012. ret.base = ret.name = path.slice(start2, end);
  4013. } else {
  4014. ret.name = path.slice(start2, startDot);
  4015. ret.base = path.slice(start2, end);
  4016. ret.ext = path.slice(startDot, end);
  4017. }
  4018. }
  4019. if (startPart > 0) {
  4020. ret.dir = path.slice(0, startPart - 1);
  4021. } else if (isAbsolute) {
  4022. ret.dir = "/";
  4023. }
  4024. return ret;
  4025. },
  4026. sep: "/",
  4027. delimiter: ":",
  4028. win32: null,
  4029. posix: null
  4030. };
  4031. posix.win32 = win32.win32 = win32;
  4032. posix.posix = win32.posix = posix;
  4033. normalize = platformIsWin32 ? win32.normalize : posix.normalize;
  4034. resolve = platformIsWin32 ? win32.resolve : posix.resolve;
  4035. relative = platformIsWin32 ? win32.relative : posix.relative;
  4036. dirname = platformIsWin32 ? win32.dirname : posix.dirname;
  4037. basename = platformIsWin32 ? win32.basename : posix.basename;
  4038. extname = platformIsWin32 ? win32.extname : posix.extname;
  4039. sep = platformIsWin32 ? win32.sep : posix.sep;
  4040. }
  4041. });
  4042. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/uri.js
  4043. function _validateUri(ret, _strict) {
  4044. if (!ret.scheme && _strict) {
  4045. throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
  4046. }
  4047. if (ret.scheme && !_schemePattern.test(ret.scheme)) {
  4048. throw new Error("[UriError]: Scheme contains illegal characters.");
  4049. }
  4050. if (ret.path) {
  4051. if (ret.authority) {
  4052. if (!_singleSlashStart.test(ret.path)) {
  4053. throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
  4054. }
  4055. } else {
  4056. if (_doubleSlashStart.test(ret.path)) {
  4057. throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
  4058. }
  4059. }
  4060. }
  4061. }
  4062. function _schemeFix(scheme, _strict) {
  4063. if (!scheme && !_strict) {
  4064. return "file";
  4065. }
  4066. return scheme;
  4067. }
  4068. function _referenceResolution(scheme, path) {
  4069. switch (scheme) {
  4070. case "https":
  4071. case "http":
  4072. case "file":
  4073. if (!path) {
  4074. path = _slash;
  4075. } else if (path[0] !== _slash) {
  4076. path = _slash + path;
  4077. }
  4078. break;
  4079. }
  4080. return path;
  4081. }
  4082. function encodeURIComponentFast(uriComponent, isPath, isAuthority) {
  4083. let res = void 0;
  4084. let nativeEncodePos = -1;
  4085. for (let pos = 0; pos < uriComponent.length; pos++) {
  4086. const code = uriComponent.charCodeAt(pos);
  4087. if (code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 48 && code <= 57 || code === 45 || code === 46 || code === 95 || code === 126 || isPath && code === 47 || isAuthority && code === 91 || isAuthority && code === 93 || isAuthority && code === 58) {
  4088. if (nativeEncodePos !== -1) {
  4089. res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
  4090. nativeEncodePos = -1;
  4091. }
  4092. if (res !== void 0) {
  4093. res += uriComponent.charAt(pos);
  4094. }
  4095. } else {
  4096. if (res === void 0) {
  4097. res = uriComponent.substr(0, pos);
  4098. }
  4099. const escaped = encodeTable[code];
  4100. if (escaped !== void 0) {
  4101. if (nativeEncodePos !== -1) {
  4102. res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
  4103. nativeEncodePos = -1;
  4104. }
  4105. res += escaped;
  4106. } else if (nativeEncodePos === -1) {
  4107. nativeEncodePos = pos;
  4108. }
  4109. }
  4110. }
  4111. if (nativeEncodePos !== -1) {
  4112. res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
  4113. }
  4114. return res !== void 0 ? res : uriComponent;
  4115. }
  4116. function encodeURIComponentMinimal(path) {
  4117. let res = void 0;
  4118. for (let pos = 0; pos < path.length; pos++) {
  4119. const code = path.charCodeAt(pos);
  4120. if (code === 35 || code === 63) {
  4121. if (res === void 0) {
  4122. res = path.substr(0, pos);
  4123. }
  4124. res += encodeTable[code];
  4125. } else {
  4126. if (res !== void 0) {
  4127. res += path[pos];
  4128. }
  4129. }
  4130. }
  4131. return res !== void 0 ? res : path;
  4132. }
  4133. function uriToFsPath(uri, keepDriveLetterCasing) {
  4134. let value;
  4135. if (uri.authority && uri.path.length > 1 && uri.scheme === "file") {
  4136. value = `//${uri.authority}${uri.path}`;
  4137. } else if (uri.path.charCodeAt(0) === 47 && (uri.path.charCodeAt(1) >= 65 && uri.path.charCodeAt(1) <= 90 || uri.path.charCodeAt(1) >= 97 && uri.path.charCodeAt(1) <= 122) && uri.path.charCodeAt(2) === 58) {
  4138. if (!keepDriveLetterCasing) {
  4139. value = uri.path[1].toLowerCase() + uri.path.substr(2);
  4140. } else {
  4141. value = uri.path.substr(1);
  4142. }
  4143. } else {
  4144. value = uri.path;
  4145. }
  4146. if (isWindows) {
  4147. value = value.replace(/\//g, "\\");
  4148. }
  4149. return value;
  4150. }
  4151. function _asFormatted(uri, skipEncoding) {
  4152. const encoder = !skipEncoding ? encodeURIComponentFast : encodeURIComponentMinimal;
  4153. let res = "";
  4154. let { scheme, authority, path, query, fragment } = uri;
  4155. if (scheme) {
  4156. res += scheme;
  4157. res += ":";
  4158. }
  4159. if (authority || scheme === "file") {
  4160. res += _slash;
  4161. res += _slash;
  4162. }
  4163. if (authority) {
  4164. let idx = authority.indexOf("@");
  4165. if (idx !== -1) {
  4166. const userinfo = authority.substr(0, idx);
  4167. authority = authority.substr(idx + 1);
  4168. idx = userinfo.lastIndexOf(":");
  4169. if (idx === -1) {
  4170. res += encoder(userinfo, false, false);
  4171. } else {
  4172. res += encoder(userinfo.substr(0, idx), false, false);
  4173. res += ":";
  4174. res += encoder(userinfo.substr(idx + 1), false, true);
  4175. }
  4176. res += "@";
  4177. }
  4178. authority = authority.toLowerCase();
  4179. idx = authority.lastIndexOf(":");
  4180. if (idx === -1) {
  4181. res += encoder(authority, false, true);
  4182. } else {
  4183. res += encoder(authority.substr(0, idx), false, true);
  4184. res += authority.substr(idx);
  4185. }
  4186. }
  4187. if (path) {
  4188. if (path.length >= 3 && path.charCodeAt(0) === 47 && path.charCodeAt(2) === 58) {
  4189. const code = path.charCodeAt(1);
  4190. if (code >= 65 && code <= 90) {
  4191. path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`;
  4192. }
  4193. } else if (path.length >= 2 && path.charCodeAt(1) === 58) {
  4194. const code = path.charCodeAt(0);
  4195. if (code >= 65 && code <= 90) {
  4196. path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`;
  4197. }
  4198. }
  4199. res += encoder(path, true, false);
  4200. }
  4201. if (query) {
  4202. res += "?";
  4203. res += encoder(query, false, false);
  4204. }
  4205. if (fragment) {
  4206. res += "#";
  4207. res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;
  4208. }
  4209. return res;
  4210. }
  4211. function decodeURIComponentGraceful(str) {
  4212. try {
  4213. return decodeURIComponent(str);
  4214. } catch (_a3) {
  4215. if (str.length > 3) {
  4216. return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
  4217. } else {
  4218. return str;
  4219. }
  4220. }
  4221. }
  4222. function percentDecode(str) {
  4223. if (!str.match(_rEncodedAsHex)) {
  4224. return str;
  4225. }
  4226. return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));
  4227. }
  4228. var _schemePattern, _singleSlashStart, _doubleSlashStart, _empty, _slash, _regexp, URI, _pathSepMarker, Uri, encodeTable, _rEncodedAsHex;
  4229. var init_uri = __esm({
  4230. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/uri.js"() {
  4231. init_path();
  4232. init_platform();
  4233. _schemePattern = /^\w[\w\d+.-]*$/;
  4234. _singleSlashStart = /^\//;
  4235. _doubleSlashStart = /^\/\//;
  4236. _empty = "";
  4237. _slash = "/";
  4238. _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
  4239. URI = class _URI {
  4240. static isUri(thing) {
  4241. if (thing instanceof _URI) {
  4242. return true;
  4243. }
  4244. if (!thing) {
  4245. return false;
  4246. }
  4247. return typeof thing.authority === "string" && typeof thing.fragment === "string" && typeof thing.path === "string" && typeof thing.query === "string" && typeof thing.scheme === "string" && typeof thing.fsPath === "string" && typeof thing.with === "function" && typeof thing.toString === "function";
  4248. }
  4249. /**
  4250. * @internal
  4251. */
  4252. constructor(schemeOrData, authority, path, query, fragment, _strict = false) {
  4253. if (typeof schemeOrData === "object") {
  4254. this.scheme = schemeOrData.scheme || _empty;
  4255. this.authority = schemeOrData.authority || _empty;
  4256. this.path = schemeOrData.path || _empty;
  4257. this.query = schemeOrData.query || _empty;
  4258. this.fragment = schemeOrData.fragment || _empty;
  4259. } else {
  4260. this.scheme = _schemeFix(schemeOrData, _strict);
  4261. this.authority = authority || _empty;
  4262. this.path = _referenceResolution(this.scheme, path || _empty);
  4263. this.query = query || _empty;
  4264. this.fragment = fragment || _empty;
  4265. _validateUri(this, _strict);
  4266. }
  4267. }
  4268. // ---- filesystem path -----------------------
  4269. /**
  4270. * Returns a string representing the corresponding file system path of this URI.
  4271. * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
  4272. * platform specific path separator.
  4273. *
  4274. * * Will *not* validate the path for invalid characters and semantics.
  4275. * * Will *not* look at the scheme of this URI.
  4276. * * The result shall *not* be used for display purposes but for accessing a file on disk.
  4277. *
  4278. *
  4279. * The *difference* to `URI#path` is the use of the platform specific separator and the handling
  4280. * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
  4281. *
  4282. * ```ts
  4283. const u = URI.parse('file://server/c$/folder/file.txt')
  4284. u.authority === 'server'
  4285. u.path === '/shares/c$/file.txt'
  4286. u.fsPath === '\\server\c$\folder\file.txt'
  4287. ```
  4288. *
  4289. * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
  4290. * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
  4291. * with URIs that represent files on disk (`file` scheme).
  4292. */
  4293. get fsPath() {
  4294. return uriToFsPath(this, false);
  4295. }
  4296. // ---- modify to new -------------------------
  4297. with(change) {
  4298. if (!change) {
  4299. return this;
  4300. }
  4301. let { scheme, authority, path, query, fragment } = change;
  4302. if (scheme === void 0) {
  4303. scheme = this.scheme;
  4304. } else if (scheme === null) {
  4305. scheme = _empty;
  4306. }
  4307. if (authority === void 0) {
  4308. authority = this.authority;
  4309. } else if (authority === null) {
  4310. authority = _empty;
  4311. }
  4312. if (path === void 0) {
  4313. path = this.path;
  4314. } else if (path === null) {
  4315. path = _empty;
  4316. }
  4317. if (query === void 0) {
  4318. query = this.query;
  4319. } else if (query === null) {
  4320. query = _empty;
  4321. }
  4322. if (fragment === void 0) {
  4323. fragment = this.fragment;
  4324. } else if (fragment === null) {
  4325. fragment = _empty;
  4326. }
  4327. if (scheme === this.scheme && authority === this.authority && path === this.path && query === this.query && fragment === this.fragment) {
  4328. return this;
  4329. }
  4330. return new Uri(scheme, authority, path, query, fragment);
  4331. }
  4332. // ---- parse & validate ------------------------
  4333. /**
  4334. * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,
  4335. * `file:///usr/home`, or `scheme:with/path`.
  4336. *
  4337. * @param value A string which represents an URI (see `URI#toString`).
  4338. */
  4339. static parse(value, _strict = false) {
  4340. const match = _regexp.exec(value);
  4341. if (!match) {
  4342. return new Uri(_empty, _empty, _empty, _empty, _empty);
  4343. }
  4344. return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
  4345. }
  4346. /**
  4347. * Creates a new URI from a file system path, e.g. `c:\my\files`,
  4348. * `/usr/home`, or `\\server\share\some\path`.
  4349. *
  4350. * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
  4351. * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
  4352. * `URI.parse('file://' + path)` because the path might contain characters that are
  4353. * interpreted (# and ?). See the following sample:
  4354. * ```ts
  4355. const good = URI.file('/coding/c#/project1');
  4356. good.scheme === 'file';
  4357. good.path === '/coding/c#/project1';
  4358. good.fragment === '';
  4359. const bad = URI.parse('file://' + '/coding/c#/project1');
  4360. bad.scheme === 'file';
  4361. bad.path === '/coding/c'; // path is now broken
  4362. bad.fragment === '/project1';
  4363. ```
  4364. *
  4365. * @param path A file system path (see `URI#fsPath`)
  4366. */
  4367. static file(path) {
  4368. let authority = _empty;
  4369. if (isWindows) {
  4370. path = path.replace(/\\/g, _slash);
  4371. }
  4372. if (path[0] === _slash && path[1] === _slash) {
  4373. const idx = path.indexOf(_slash, 2);
  4374. if (idx === -1) {
  4375. authority = path.substring(2);
  4376. path = _slash;
  4377. } else {
  4378. authority = path.substring(2, idx);
  4379. path = path.substring(idx) || _slash;
  4380. }
  4381. }
  4382. return new Uri("file", authority, path, _empty, _empty);
  4383. }
  4384. static from(components) {
  4385. const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment);
  4386. _validateUri(result, true);
  4387. return result;
  4388. }
  4389. /**
  4390. * Join a URI path with path fragments and normalizes the resulting path.
  4391. *
  4392. * @param uri The input URI.
  4393. * @param pathFragment The path fragment to add to the URI path.
  4394. * @returns The resulting URI.
  4395. */
  4396. static joinPath(uri, ...pathFragment) {
  4397. if (!uri.path) {
  4398. throw new Error(`[UriError]: cannot call joinPath on URI without path`);
  4399. }
  4400. let newPath;
  4401. if (isWindows && uri.scheme === "file") {
  4402. newPath = _URI.file(win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
  4403. } else {
  4404. newPath = posix.join(uri.path, ...pathFragment);
  4405. }
  4406. return uri.with({ path: newPath });
  4407. }
  4408. // ---- printing/externalize ---------------------------
  4409. /**
  4410. * Creates a string representation for this URI. It's guaranteed that calling
  4411. * `URI.parse` with the result of this function creates an URI which is equal
  4412. * to this URI.
  4413. *
  4414. * * The result shall *not* be used for display purposes but for externalization or transport.
  4415. * * The result will be encoded using the percentage encoding and encoding happens mostly
  4416. * ignore the scheme-specific encoding rules.
  4417. *
  4418. * @param skipEncoding Do not encode the result, default is `false`
  4419. */
  4420. toString(skipEncoding = false) {
  4421. return _asFormatted(this, skipEncoding);
  4422. }
  4423. toJSON() {
  4424. return this;
  4425. }
  4426. static revive(data) {
  4427. if (!data) {
  4428. return data;
  4429. } else if (data instanceof _URI) {
  4430. return data;
  4431. } else {
  4432. const result = new Uri(data);
  4433. result._formatted = data.external;
  4434. result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
  4435. return result;
  4436. }
  4437. }
  4438. };
  4439. _pathSepMarker = isWindows ? 1 : void 0;
  4440. Uri = class extends URI {
  4441. constructor() {
  4442. super(...arguments);
  4443. this._formatted = null;
  4444. this._fsPath = null;
  4445. }
  4446. get fsPath() {
  4447. if (!this._fsPath) {
  4448. this._fsPath = uriToFsPath(this, false);
  4449. }
  4450. return this._fsPath;
  4451. }
  4452. toString(skipEncoding = false) {
  4453. if (!skipEncoding) {
  4454. if (!this._formatted) {
  4455. this._formatted = _asFormatted(this, false);
  4456. }
  4457. return this._formatted;
  4458. } else {
  4459. return _asFormatted(this, true);
  4460. }
  4461. }
  4462. toJSON() {
  4463. const res = {
  4464. $mid: 1
  4465. /* MarshalledId.Uri */
  4466. };
  4467. if (this._fsPath) {
  4468. res.fsPath = this._fsPath;
  4469. res._sep = _pathSepMarker;
  4470. }
  4471. if (this._formatted) {
  4472. res.external = this._formatted;
  4473. }
  4474. if (this.path) {
  4475. res.path = this.path;
  4476. }
  4477. if (this.scheme) {
  4478. res.scheme = this.scheme;
  4479. }
  4480. if (this.authority) {
  4481. res.authority = this.authority;
  4482. }
  4483. if (this.query) {
  4484. res.query = this.query;
  4485. }
  4486. if (this.fragment) {
  4487. res.fragment = this.fragment;
  4488. }
  4489. return res;
  4490. }
  4491. };
  4492. encodeTable = {
  4493. [
  4494. 58
  4495. /* CharCode.Colon */
  4496. ]: "%3A",
  4497. [
  4498. 47
  4499. /* CharCode.Slash */
  4500. ]: "%2F",
  4501. [
  4502. 63
  4503. /* CharCode.QuestionMark */
  4504. ]: "%3F",
  4505. [
  4506. 35
  4507. /* CharCode.Hash */
  4508. ]: "%23",
  4509. [
  4510. 91
  4511. /* CharCode.OpenSquareBracket */
  4512. ]: "%5B",
  4513. [
  4514. 93
  4515. /* CharCode.CloseSquareBracket */
  4516. ]: "%5D",
  4517. [
  4518. 64
  4519. /* CharCode.AtSign */
  4520. ]: "%40",
  4521. [
  4522. 33
  4523. /* CharCode.ExclamationMark */
  4524. ]: "%21",
  4525. [
  4526. 36
  4527. /* CharCode.DollarSign */
  4528. ]: "%24",
  4529. [
  4530. 38
  4531. /* CharCode.Ampersand */
  4532. ]: "%26",
  4533. [
  4534. 39
  4535. /* CharCode.SingleQuote */
  4536. ]: "%27",
  4537. [
  4538. 40
  4539. /* CharCode.OpenParen */
  4540. ]: "%28",
  4541. [
  4542. 41
  4543. /* CharCode.CloseParen */
  4544. ]: "%29",
  4545. [
  4546. 42
  4547. /* CharCode.Asterisk */
  4548. ]: "%2A",
  4549. [
  4550. 43
  4551. /* CharCode.Plus */
  4552. ]: "%2B",
  4553. [
  4554. 44
  4555. /* CharCode.Comma */
  4556. ]: "%2C",
  4557. [
  4558. 59
  4559. /* CharCode.Semicolon */
  4560. ]: "%3B",
  4561. [
  4562. 61
  4563. /* CharCode.Equals */
  4564. ]: "%3D",
  4565. [
  4566. 32
  4567. /* CharCode.Space */
  4568. ]: "%20"
  4569. };
  4570. _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
  4571. }
  4572. });
  4573. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/position.js
  4574. var Position;
  4575. var init_position = __esm({
  4576. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/position.js"() {
  4577. Position = class _Position {
  4578. constructor(lineNumber, column) {
  4579. this.lineNumber = lineNumber;
  4580. this.column = column;
  4581. }
  4582. /**
  4583. * Create a new position from this position.
  4584. *
  4585. * @param newLineNumber new line number
  4586. * @param newColumn new column
  4587. */
  4588. with(newLineNumber = this.lineNumber, newColumn = this.column) {
  4589. if (newLineNumber === this.lineNumber && newColumn === this.column) {
  4590. return this;
  4591. } else {
  4592. return new _Position(newLineNumber, newColumn);
  4593. }
  4594. }
  4595. /**
  4596. * Derive a new position from this position.
  4597. *
  4598. * @param deltaLineNumber line number delta
  4599. * @param deltaColumn column delta
  4600. */
  4601. delta(deltaLineNumber = 0, deltaColumn = 0) {
  4602. return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn);
  4603. }
  4604. /**
  4605. * Test if this position equals other position
  4606. */
  4607. equals(other) {
  4608. return _Position.equals(this, other);
  4609. }
  4610. /**
  4611. * Test if position `a` equals position `b`
  4612. */
  4613. static equals(a, b) {
  4614. if (!a && !b) {
  4615. return true;
  4616. }
  4617. return !!a && !!b && a.lineNumber === b.lineNumber && a.column === b.column;
  4618. }
  4619. /**
  4620. * Test if this position is before other position.
  4621. * If the two positions are equal, the result will be false.
  4622. */
  4623. isBefore(other) {
  4624. return _Position.isBefore(this, other);
  4625. }
  4626. /**
  4627. * Test if position `a` is before position `b`.
  4628. * If the two positions are equal, the result will be false.
  4629. */
  4630. static isBefore(a, b) {
  4631. if (a.lineNumber < b.lineNumber) {
  4632. return true;
  4633. }
  4634. if (b.lineNumber < a.lineNumber) {
  4635. return false;
  4636. }
  4637. return a.column < b.column;
  4638. }
  4639. /**
  4640. * Test if this position is before other position.
  4641. * If the two positions are equal, the result will be true.
  4642. */
  4643. isBeforeOrEqual(other) {
  4644. return _Position.isBeforeOrEqual(this, other);
  4645. }
  4646. /**
  4647. * Test if position `a` is before position `b`.
  4648. * If the two positions are equal, the result will be true.
  4649. */
  4650. static isBeforeOrEqual(a, b) {
  4651. if (a.lineNumber < b.lineNumber) {
  4652. return true;
  4653. }
  4654. if (b.lineNumber < a.lineNumber) {
  4655. return false;
  4656. }
  4657. return a.column <= b.column;
  4658. }
  4659. /**
  4660. * A function that compares positions, useful for sorting
  4661. */
  4662. static compare(a, b) {
  4663. const aLineNumber = a.lineNumber | 0;
  4664. const bLineNumber = b.lineNumber | 0;
  4665. if (aLineNumber === bLineNumber) {
  4666. const aColumn = a.column | 0;
  4667. const bColumn = b.column | 0;
  4668. return aColumn - bColumn;
  4669. }
  4670. return aLineNumber - bLineNumber;
  4671. }
  4672. /**
  4673. * Clone this position.
  4674. */
  4675. clone() {
  4676. return new _Position(this.lineNumber, this.column);
  4677. }
  4678. /**
  4679. * Convert to a human-readable representation.
  4680. */
  4681. toString() {
  4682. return "(" + this.lineNumber + "," + this.column + ")";
  4683. }
  4684. // ---
  4685. /**
  4686. * Create a `Position` from an `IPosition`.
  4687. */
  4688. static lift(pos) {
  4689. return new _Position(pos.lineNumber, pos.column);
  4690. }
  4691. /**
  4692. * Test if `obj` is an `IPosition`.
  4693. */
  4694. static isIPosition(obj) {
  4695. return obj && typeof obj.lineNumber === "number" && typeof obj.column === "number";
  4696. }
  4697. };
  4698. }
  4699. });
  4700. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/range.js
  4701. var Range;
  4702. var init_range = __esm({
  4703. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/range.js"() {
  4704. init_position();
  4705. Range = class _Range {
  4706. constructor(startLineNumber, startColumn, endLineNumber, endColumn) {
  4707. if (startLineNumber > endLineNumber || startLineNumber === endLineNumber && startColumn > endColumn) {
  4708. this.startLineNumber = endLineNumber;
  4709. this.startColumn = endColumn;
  4710. this.endLineNumber = startLineNumber;
  4711. this.endColumn = startColumn;
  4712. } else {
  4713. this.startLineNumber = startLineNumber;
  4714. this.startColumn = startColumn;
  4715. this.endLineNumber = endLineNumber;
  4716. this.endColumn = endColumn;
  4717. }
  4718. }
  4719. /**
  4720. * Test if this range is empty.
  4721. */
  4722. isEmpty() {
  4723. return _Range.isEmpty(this);
  4724. }
  4725. /**
  4726. * Test if `range` is empty.
  4727. */
  4728. static isEmpty(range2) {
  4729. return range2.startLineNumber === range2.endLineNumber && range2.startColumn === range2.endColumn;
  4730. }
  4731. /**
  4732. * Test if position is in this range. If the position is at the edges, will return true.
  4733. */
  4734. containsPosition(position) {
  4735. return _Range.containsPosition(this, position);
  4736. }
  4737. /**
  4738. * Test if `position` is in `range`. If the position is at the edges, will return true.
  4739. */
  4740. static containsPosition(range2, position) {
  4741. if (position.lineNumber < range2.startLineNumber || position.lineNumber > range2.endLineNumber) {
  4742. return false;
  4743. }
  4744. if (position.lineNumber === range2.startLineNumber && position.column < range2.startColumn) {
  4745. return false;
  4746. }
  4747. if (position.lineNumber === range2.endLineNumber && position.column > range2.endColumn) {
  4748. return false;
  4749. }
  4750. return true;
  4751. }
  4752. /**
  4753. * Test if `position` is in `range`. If the position is at the edges, will return false.
  4754. * @internal
  4755. */
  4756. static strictContainsPosition(range2, position) {
  4757. if (position.lineNumber < range2.startLineNumber || position.lineNumber > range2.endLineNumber) {
  4758. return false;
  4759. }
  4760. if (position.lineNumber === range2.startLineNumber && position.column <= range2.startColumn) {
  4761. return false;
  4762. }
  4763. if (position.lineNumber === range2.endLineNumber && position.column >= range2.endColumn) {
  4764. return false;
  4765. }
  4766. return true;
  4767. }
  4768. /**
  4769. * Test if range is in this range. If the range is equal to this range, will return true.
  4770. */
  4771. containsRange(range2) {
  4772. return _Range.containsRange(this, range2);
  4773. }
  4774. /**
  4775. * Test if `otherRange` is in `range`. If the ranges are equal, will return true.
  4776. */
  4777. static containsRange(range2, otherRange) {
  4778. if (otherRange.startLineNumber < range2.startLineNumber || otherRange.endLineNumber < range2.startLineNumber) {
  4779. return false;
  4780. }
  4781. if (otherRange.startLineNumber > range2.endLineNumber || otherRange.endLineNumber > range2.endLineNumber) {
  4782. return false;
  4783. }
  4784. if (otherRange.startLineNumber === range2.startLineNumber && otherRange.startColumn < range2.startColumn) {
  4785. return false;
  4786. }
  4787. if (otherRange.endLineNumber === range2.endLineNumber && otherRange.endColumn > range2.endColumn) {
  4788. return false;
  4789. }
  4790. return true;
  4791. }
  4792. /**
  4793. * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.
  4794. */
  4795. strictContainsRange(range2) {
  4796. return _Range.strictContainsRange(this, range2);
  4797. }
  4798. /**
  4799. * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
  4800. */
  4801. static strictContainsRange(range2, otherRange) {
  4802. if (otherRange.startLineNumber < range2.startLineNumber || otherRange.endLineNumber < range2.startLineNumber) {
  4803. return false;
  4804. }
  4805. if (otherRange.startLineNumber > range2.endLineNumber || otherRange.endLineNumber > range2.endLineNumber) {
  4806. return false;
  4807. }
  4808. if (otherRange.startLineNumber === range2.startLineNumber && otherRange.startColumn <= range2.startColumn) {
  4809. return false;
  4810. }
  4811. if (otherRange.endLineNumber === range2.endLineNumber && otherRange.endColumn >= range2.endColumn) {
  4812. return false;
  4813. }
  4814. return true;
  4815. }
  4816. /**
  4817. * A reunion of the two ranges.
  4818. * The smallest position will be used as the start point, and the largest one as the end point.
  4819. */
  4820. plusRange(range2) {
  4821. return _Range.plusRange(this, range2);
  4822. }
  4823. /**
  4824. * A reunion of the two ranges.
  4825. * The smallest position will be used as the start point, and the largest one as the end point.
  4826. */
  4827. static plusRange(a, b) {
  4828. let startLineNumber;
  4829. let startColumn;
  4830. let endLineNumber;
  4831. let endColumn;
  4832. if (b.startLineNumber < a.startLineNumber) {
  4833. startLineNumber = b.startLineNumber;
  4834. startColumn = b.startColumn;
  4835. } else if (b.startLineNumber === a.startLineNumber) {
  4836. startLineNumber = b.startLineNumber;
  4837. startColumn = Math.min(b.startColumn, a.startColumn);
  4838. } else {
  4839. startLineNumber = a.startLineNumber;
  4840. startColumn = a.startColumn;
  4841. }
  4842. if (b.endLineNumber > a.endLineNumber) {
  4843. endLineNumber = b.endLineNumber;
  4844. endColumn = b.endColumn;
  4845. } else if (b.endLineNumber === a.endLineNumber) {
  4846. endLineNumber = b.endLineNumber;
  4847. endColumn = Math.max(b.endColumn, a.endColumn);
  4848. } else {
  4849. endLineNumber = a.endLineNumber;
  4850. endColumn = a.endColumn;
  4851. }
  4852. return new _Range(startLineNumber, startColumn, endLineNumber, endColumn);
  4853. }
  4854. /**
  4855. * A intersection of the two ranges.
  4856. */
  4857. intersectRanges(range2) {
  4858. return _Range.intersectRanges(this, range2);
  4859. }
  4860. /**
  4861. * A intersection of the two ranges.
  4862. */
  4863. static intersectRanges(a, b) {
  4864. let resultStartLineNumber = a.startLineNumber;
  4865. let resultStartColumn = a.startColumn;
  4866. let resultEndLineNumber = a.endLineNumber;
  4867. let resultEndColumn = a.endColumn;
  4868. const otherStartLineNumber = b.startLineNumber;
  4869. const otherStartColumn = b.startColumn;
  4870. const otherEndLineNumber = b.endLineNumber;
  4871. const otherEndColumn = b.endColumn;
  4872. if (resultStartLineNumber < otherStartLineNumber) {
  4873. resultStartLineNumber = otherStartLineNumber;
  4874. resultStartColumn = otherStartColumn;
  4875. } else if (resultStartLineNumber === otherStartLineNumber) {
  4876. resultStartColumn = Math.max(resultStartColumn, otherStartColumn);
  4877. }
  4878. if (resultEndLineNumber > otherEndLineNumber) {
  4879. resultEndLineNumber = otherEndLineNumber;
  4880. resultEndColumn = otherEndColumn;
  4881. } else if (resultEndLineNumber === otherEndLineNumber) {
  4882. resultEndColumn = Math.min(resultEndColumn, otherEndColumn);
  4883. }
  4884. if (resultStartLineNumber > resultEndLineNumber) {
  4885. return null;
  4886. }
  4887. if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) {
  4888. return null;
  4889. }
  4890. return new _Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn);
  4891. }
  4892. /**
  4893. * Test if this range equals other.
  4894. */
  4895. equalsRange(other) {
  4896. return _Range.equalsRange(this, other);
  4897. }
  4898. /**
  4899. * Test if range `a` equals `b`.
  4900. */
  4901. static equalsRange(a, b) {
  4902. if (!a && !b) {
  4903. return true;
  4904. }
  4905. return !!a && !!b && a.startLineNumber === b.startLineNumber && a.startColumn === b.startColumn && a.endLineNumber === b.endLineNumber && a.endColumn === b.endColumn;
  4906. }
  4907. /**
  4908. * Return the end position (which will be after or equal to the start position)
  4909. */
  4910. getEndPosition() {
  4911. return _Range.getEndPosition(this);
  4912. }
  4913. /**
  4914. * Return the end position (which will be after or equal to the start position)
  4915. */
  4916. static getEndPosition(range2) {
  4917. return new Position(range2.endLineNumber, range2.endColumn);
  4918. }
  4919. /**
  4920. * Return the start position (which will be before or equal to the end position)
  4921. */
  4922. getStartPosition() {
  4923. return _Range.getStartPosition(this);
  4924. }
  4925. /**
  4926. * Return the start position (which will be before or equal to the end position)
  4927. */
  4928. static getStartPosition(range2) {
  4929. return new Position(range2.startLineNumber, range2.startColumn);
  4930. }
  4931. /**
  4932. * Transform to a user presentable string representation.
  4933. */
  4934. toString() {
  4935. return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]";
  4936. }
  4937. /**
  4938. * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
  4939. */
  4940. setEndPosition(endLineNumber, endColumn) {
  4941. return new _Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn);
  4942. }
  4943. /**
  4944. * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
  4945. */
  4946. setStartPosition(startLineNumber, startColumn) {
  4947. return new _Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn);
  4948. }
  4949. /**
  4950. * Create a new empty range using this range's start position.
  4951. */
  4952. collapseToStart() {
  4953. return _Range.collapseToStart(this);
  4954. }
  4955. /**
  4956. * Create a new empty range using this range's start position.
  4957. */
  4958. static collapseToStart(range2) {
  4959. return new _Range(range2.startLineNumber, range2.startColumn, range2.startLineNumber, range2.startColumn);
  4960. }
  4961. /**
  4962. * Create a new empty range using this range's end position.
  4963. */
  4964. collapseToEnd() {
  4965. return _Range.collapseToEnd(this);
  4966. }
  4967. /**
  4968. * Create a new empty range using this range's end position.
  4969. */
  4970. static collapseToEnd(range2) {
  4971. return new _Range(range2.endLineNumber, range2.endColumn, range2.endLineNumber, range2.endColumn);
  4972. }
  4973. /**
  4974. * Moves the range by the given amount of lines.
  4975. */
  4976. delta(lineCount) {
  4977. return new _Range(this.startLineNumber + lineCount, this.startColumn, this.endLineNumber + lineCount, this.endColumn);
  4978. }
  4979. // ---
  4980. static fromPositions(start, end = start) {
  4981. return new _Range(start.lineNumber, start.column, end.lineNumber, end.column);
  4982. }
  4983. static lift(range2) {
  4984. if (!range2) {
  4985. return null;
  4986. }
  4987. return new _Range(range2.startLineNumber, range2.startColumn, range2.endLineNumber, range2.endColumn);
  4988. }
  4989. /**
  4990. * Test if `obj` is an `IRange`.
  4991. */
  4992. static isIRange(obj) {
  4993. return obj && typeof obj.startLineNumber === "number" && typeof obj.startColumn === "number" && typeof obj.endLineNumber === "number" && typeof obj.endColumn === "number";
  4994. }
  4995. /**
  4996. * Test if the two ranges are touching in any way.
  4997. */
  4998. static areIntersectingOrTouching(a, b) {
  4999. if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn) {
  5000. return false;
  5001. }
  5002. if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn) {
  5003. return false;
  5004. }
  5005. return true;
  5006. }
  5007. /**
  5008. * Test if the two ranges are intersecting. If the ranges are touching it returns true.
  5009. */
  5010. static areIntersecting(a, b) {
  5011. if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn) {
  5012. return false;
  5013. }
  5014. if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn) {
  5015. return false;
  5016. }
  5017. return true;
  5018. }
  5019. /**
  5020. * A function that compares ranges, useful for sorting ranges
  5021. * It will first compare ranges on the startPosition and then on the endPosition
  5022. */
  5023. static compareRangesUsingStarts(a, b) {
  5024. if (a && b) {
  5025. const aStartLineNumber = a.startLineNumber | 0;
  5026. const bStartLineNumber = b.startLineNumber | 0;
  5027. if (aStartLineNumber === bStartLineNumber) {
  5028. const aStartColumn = a.startColumn | 0;
  5029. const bStartColumn = b.startColumn | 0;
  5030. if (aStartColumn === bStartColumn) {
  5031. const aEndLineNumber = a.endLineNumber | 0;
  5032. const bEndLineNumber = b.endLineNumber | 0;
  5033. if (aEndLineNumber === bEndLineNumber) {
  5034. const aEndColumn = a.endColumn | 0;
  5035. const bEndColumn = b.endColumn | 0;
  5036. return aEndColumn - bEndColumn;
  5037. }
  5038. return aEndLineNumber - bEndLineNumber;
  5039. }
  5040. return aStartColumn - bStartColumn;
  5041. }
  5042. return aStartLineNumber - bStartLineNumber;
  5043. }
  5044. const aExists = a ? 1 : 0;
  5045. const bExists = b ? 1 : 0;
  5046. return aExists - bExists;
  5047. }
  5048. /**
  5049. * A function that compares ranges, useful for sorting ranges
  5050. * It will first compare ranges on the endPosition and then on the startPosition
  5051. */
  5052. static compareRangesUsingEnds(a, b) {
  5053. if (a.endLineNumber === b.endLineNumber) {
  5054. if (a.endColumn === b.endColumn) {
  5055. if (a.startLineNumber === b.startLineNumber) {
  5056. return a.startColumn - b.startColumn;
  5057. }
  5058. return a.startLineNumber - b.startLineNumber;
  5059. }
  5060. return a.endColumn - b.endColumn;
  5061. }
  5062. return a.endLineNumber - b.endLineNumber;
  5063. }
  5064. /**
  5065. * Test if the range spans multiple lines.
  5066. */
  5067. static spansMultipleLines(range2) {
  5068. return range2.endLineNumber > range2.startLineNumber;
  5069. }
  5070. toJSON() {
  5071. return this;
  5072. }
  5073. };
  5074. }
  5075. });
  5076. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/arrays.js
  5077. function tail(array, n = 0) {
  5078. return array[array.length - (1 + n)];
  5079. }
  5080. function tail2(arr) {
  5081. if (arr.length === 0) {
  5082. throw new Error("Invalid tail call");
  5083. }
  5084. return [arr.slice(0, arr.length - 1), arr[arr.length - 1]];
  5085. }
  5086. function equals2(one, other, itemEquals = (a, b) => a === b) {
  5087. if (one === other) {
  5088. return true;
  5089. }
  5090. if (!one || !other) {
  5091. return false;
  5092. }
  5093. if (one.length !== other.length) {
  5094. return false;
  5095. }
  5096. for (let i = 0, len = one.length; i < len; i++) {
  5097. if (!itemEquals(one[i], other[i])) {
  5098. return false;
  5099. }
  5100. }
  5101. return true;
  5102. }
  5103. function removeFastWithoutKeepingOrder(array, index) {
  5104. const last = array.length - 1;
  5105. if (index < last) {
  5106. array[index] = array[last];
  5107. }
  5108. array.pop();
  5109. }
  5110. function binarySearch(array, key, comparator) {
  5111. return binarySearch2(array.length, (i) => comparator(array[i], key));
  5112. }
  5113. function binarySearch2(length, compareToKey) {
  5114. let low = 0, high = length - 1;
  5115. while (low <= high) {
  5116. const mid = (low + high) / 2 | 0;
  5117. const comp = compareToKey(mid);
  5118. if (comp < 0) {
  5119. low = mid + 1;
  5120. } else if (comp > 0) {
  5121. high = mid - 1;
  5122. } else {
  5123. return mid;
  5124. }
  5125. }
  5126. return -(low + 1);
  5127. }
  5128. function findFirstInSorted(array, p) {
  5129. let low = 0, high = array.length;
  5130. if (high === 0) {
  5131. return 0;
  5132. }
  5133. while (low < high) {
  5134. const mid = Math.floor((low + high) / 2);
  5135. if (p(array[mid])) {
  5136. high = mid;
  5137. } else {
  5138. low = mid + 1;
  5139. }
  5140. }
  5141. return low;
  5142. }
  5143. function quickSelect(nth, data, compare2) {
  5144. nth = nth | 0;
  5145. if (nth >= data.length) {
  5146. throw new TypeError("invalid index");
  5147. }
  5148. const pivotValue = data[Math.floor(data.length * Math.random())];
  5149. const lower = [];
  5150. const higher = [];
  5151. const pivots = [];
  5152. for (const value of data) {
  5153. const val = compare2(value, pivotValue);
  5154. if (val < 0) {
  5155. lower.push(value);
  5156. } else if (val > 0) {
  5157. higher.push(value);
  5158. } else {
  5159. pivots.push(value);
  5160. }
  5161. }
  5162. if (nth < lower.length) {
  5163. return quickSelect(nth, lower, compare2);
  5164. } else if (nth < lower.length + pivots.length) {
  5165. return pivots[0];
  5166. } else {
  5167. return quickSelect(nth - (lower.length + pivots.length), higher, compare2);
  5168. }
  5169. }
  5170. function groupBy(data, compare2) {
  5171. const result = [];
  5172. let currentGroup = void 0;
  5173. for (const element of data.slice(0).sort(compare2)) {
  5174. if (!currentGroup || compare2(currentGroup[0], element) !== 0) {
  5175. currentGroup = [element];
  5176. result.push(currentGroup);
  5177. } else {
  5178. currentGroup.push(element);
  5179. }
  5180. }
  5181. return result;
  5182. }
  5183. function coalesce(array) {
  5184. return array.filter((e) => !!e);
  5185. }
  5186. function coalesceInPlace(array) {
  5187. let to = 0;
  5188. for (let i = 0; i < array.length; i++) {
  5189. if (!!array[i]) {
  5190. array[to] = array[i];
  5191. to += 1;
  5192. }
  5193. }
  5194. array.length = to;
  5195. }
  5196. function isFalsyOrEmpty(obj) {
  5197. return !Array.isArray(obj) || obj.length === 0;
  5198. }
  5199. function isNonEmptyArray(obj) {
  5200. return Array.isArray(obj) && obj.length > 0;
  5201. }
  5202. function distinct(array, keyFn = (value) => value) {
  5203. const seen = /* @__PURE__ */ new Set();
  5204. return array.filter((element) => {
  5205. const key = keyFn(element);
  5206. if (seen.has(key)) {
  5207. return false;
  5208. }
  5209. seen.add(key);
  5210. return true;
  5211. });
  5212. }
  5213. function findLast(arr, predicate) {
  5214. const idx = lastIndex(arr, predicate);
  5215. if (idx === -1) {
  5216. return void 0;
  5217. }
  5218. return arr[idx];
  5219. }
  5220. function lastIndex(array, fn) {
  5221. for (let i = array.length - 1; i >= 0; i--) {
  5222. const element = array[i];
  5223. if (fn(element)) {
  5224. return i;
  5225. }
  5226. }
  5227. return -1;
  5228. }
  5229. function firstOrDefault(array, notFoundValue) {
  5230. return array.length > 0 ? array[0] : notFoundValue;
  5231. }
  5232. function range(arg, to) {
  5233. let from = typeof to === "number" ? arg : 0;
  5234. if (typeof to === "number") {
  5235. from = arg;
  5236. } else {
  5237. from = 0;
  5238. to = arg;
  5239. }
  5240. const result = [];
  5241. if (from <= to) {
  5242. for (let i = from; i < to; i++) {
  5243. result.push(i);
  5244. }
  5245. } else {
  5246. for (let i = from; i > to; i--) {
  5247. result.push(i);
  5248. }
  5249. }
  5250. return result;
  5251. }
  5252. function arrayInsert(target, insertIndex, insertArr) {
  5253. const before = target.slice(0, insertIndex);
  5254. const after = target.slice(insertIndex);
  5255. return before.concat(insertArr, after);
  5256. }
  5257. function pushToStart(arr, value) {
  5258. const index = arr.indexOf(value);
  5259. if (index > -1) {
  5260. arr.splice(index, 1);
  5261. arr.unshift(value);
  5262. }
  5263. }
  5264. function pushToEnd(arr, value) {
  5265. const index = arr.indexOf(value);
  5266. if (index > -1) {
  5267. arr.splice(index, 1);
  5268. arr.push(value);
  5269. }
  5270. }
  5271. function pushMany(arr, items) {
  5272. for (const item of items) {
  5273. arr.push(item);
  5274. }
  5275. }
  5276. function asArray(x) {
  5277. return Array.isArray(x) ? x : [x];
  5278. }
  5279. function mapFind(array, mapFn) {
  5280. for (const value of array) {
  5281. const mapped = mapFn(value);
  5282. if (mapped !== void 0) {
  5283. return mapped;
  5284. }
  5285. }
  5286. return void 0;
  5287. }
  5288. function insertInto(array, start, newItems) {
  5289. const startIdx = getActualStartIndex(array, start);
  5290. const originalLength = array.length;
  5291. const newItemsLength = newItems.length;
  5292. array.length = originalLength + newItemsLength;
  5293. for (let i = originalLength - 1; i >= startIdx; i--) {
  5294. array[i + newItemsLength] = array[i];
  5295. }
  5296. for (let i = 0; i < newItemsLength; i++) {
  5297. array[i + startIdx] = newItems[i];
  5298. }
  5299. }
  5300. function splice(array, start, deleteCount, newItems) {
  5301. const index = getActualStartIndex(array, start);
  5302. const result = array.splice(index, deleteCount);
  5303. insertInto(array, index, newItems);
  5304. return result;
  5305. }
  5306. function getActualStartIndex(array, start) {
  5307. return start < 0 ? Math.max(start + array.length, 0) : Math.min(start, array.length);
  5308. }
  5309. function compareBy(selector, comparator) {
  5310. return (a, b) => comparator(selector(a), selector(b));
  5311. }
  5312. function findMaxBy(items, comparator) {
  5313. if (items.length === 0) {
  5314. return void 0;
  5315. }
  5316. let max = items[0];
  5317. for (let i = 1; i < items.length; i++) {
  5318. const item = items[i];
  5319. if (comparator(item, max) > 0) {
  5320. max = item;
  5321. }
  5322. }
  5323. return max;
  5324. }
  5325. function findLastMaxBy(items, comparator) {
  5326. if (items.length === 0) {
  5327. return void 0;
  5328. }
  5329. let max = items[0];
  5330. for (let i = 1; i < items.length; i++) {
  5331. const item = items[i];
  5332. if (comparator(item, max) >= 0) {
  5333. max = item;
  5334. }
  5335. }
  5336. return max;
  5337. }
  5338. function findMinBy(items, comparator) {
  5339. return findMaxBy(items, (a, b) => -comparator(a, b));
  5340. }
  5341. var CompareResult, numberComparator, ArrayQueue, CallbackIterable;
  5342. var init_arrays = __esm({
  5343. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/arrays.js"() {
  5344. (function(CompareResult2) {
  5345. function isLessThan(result) {
  5346. return result < 0;
  5347. }
  5348. CompareResult2.isLessThan = isLessThan;
  5349. function isGreaterThan(result) {
  5350. return result > 0;
  5351. }
  5352. CompareResult2.isGreaterThan = isGreaterThan;
  5353. function isNeitherLessOrGreaterThan(result) {
  5354. return result === 0;
  5355. }
  5356. CompareResult2.isNeitherLessOrGreaterThan = isNeitherLessOrGreaterThan;
  5357. CompareResult2.greaterThan = 1;
  5358. CompareResult2.lessThan = -1;
  5359. CompareResult2.neitherLessOrGreaterThan = 0;
  5360. })(CompareResult || (CompareResult = {}));
  5361. numberComparator = (a, b) => a - b;
  5362. ArrayQueue = class {
  5363. /**
  5364. * Constructs a queue that is backed by the given array. Runtime is O(1).
  5365. */
  5366. constructor(items) {
  5367. this.items = items;
  5368. this.firstIdx = 0;
  5369. this.lastIdx = this.items.length - 1;
  5370. }
  5371. get length() {
  5372. return this.lastIdx - this.firstIdx + 1;
  5373. }
  5374. /**
  5375. * Consumes elements from the beginning of the queue as long as the predicate returns true.
  5376. * If no elements were consumed, `null` is returned. Has a runtime of O(result.length).
  5377. */
  5378. takeWhile(predicate) {
  5379. let startIdx = this.firstIdx;
  5380. while (startIdx < this.items.length && predicate(this.items[startIdx])) {
  5381. startIdx++;
  5382. }
  5383. const result = startIdx === this.firstIdx ? null : this.items.slice(this.firstIdx, startIdx);
  5384. this.firstIdx = startIdx;
  5385. return result;
  5386. }
  5387. /**
  5388. * Consumes elements from the end of the queue as long as the predicate returns true.
  5389. * If no elements were consumed, `null` is returned.
  5390. * The result has the same order as the underlying array!
  5391. */
  5392. takeFromEndWhile(predicate) {
  5393. let endIdx = this.lastIdx;
  5394. while (endIdx >= 0 && predicate(this.items[endIdx])) {
  5395. endIdx--;
  5396. }
  5397. const result = endIdx === this.lastIdx ? null : this.items.slice(endIdx + 1, this.lastIdx + 1);
  5398. this.lastIdx = endIdx;
  5399. return result;
  5400. }
  5401. peek() {
  5402. if (this.length === 0) {
  5403. return void 0;
  5404. }
  5405. return this.items[this.firstIdx];
  5406. }
  5407. dequeue() {
  5408. const result = this.items[this.firstIdx];
  5409. this.firstIdx++;
  5410. return result;
  5411. }
  5412. takeCount(count) {
  5413. const result = this.items.slice(this.firstIdx, this.firstIdx + count);
  5414. this.firstIdx += count;
  5415. return result;
  5416. }
  5417. };
  5418. CallbackIterable = class _CallbackIterable {
  5419. constructor(iterate) {
  5420. this.iterate = iterate;
  5421. }
  5422. toArray() {
  5423. const result = [];
  5424. this.iterate((item) => {
  5425. result.push(item);
  5426. return true;
  5427. });
  5428. return result;
  5429. }
  5430. filter(predicate) {
  5431. return new _CallbackIterable((cb) => this.iterate((item) => predicate(item) ? cb(item) : true));
  5432. }
  5433. map(mapFn) {
  5434. return new _CallbackIterable((cb) => this.iterate((item) => cb(mapFn(item))));
  5435. }
  5436. findLast(predicate) {
  5437. let result;
  5438. this.iterate((item) => {
  5439. if (predicate(item)) {
  5440. result = item;
  5441. }
  5442. return true;
  5443. });
  5444. return result;
  5445. }
  5446. findLastMaxBy(comparator) {
  5447. let result;
  5448. let first = true;
  5449. this.iterate((item) => {
  5450. if (first || CompareResult.isGreaterThan(comparator(item, result))) {
  5451. first = false;
  5452. result = item;
  5453. }
  5454. return true;
  5455. });
  5456. return result;
  5457. }
  5458. };
  5459. CallbackIterable.empty = new CallbackIterable((_callback) => {
  5460. });
  5461. }
  5462. });
  5463. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/uint.js
  5464. function toUint8(v) {
  5465. if (v < 0) {
  5466. return 0;
  5467. }
  5468. if (v > 255) {
  5469. return 255;
  5470. }
  5471. return v | 0;
  5472. }
  5473. function toUint32(v) {
  5474. if (v < 0) {
  5475. return 0;
  5476. }
  5477. if (v > 4294967295) {
  5478. return 4294967295;
  5479. }
  5480. return v | 0;
  5481. }
  5482. var init_uint = __esm({
  5483. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/uint.js"() {
  5484. }
  5485. });
  5486. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js
  5487. function createWordRegExp(allowInWords = "") {
  5488. let source = "(-?\\d*\\.\\d\\w*)|([^";
  5489. for (const sep2 of USUAL_WORD_SEPARATORS) {
  5490. if (allowInWords.indexOf(sep2) >= 0) {
  5491. continue;
  5492. }
  5493. source += "\\" + sep2;
  5494. }
  5495. source += "\\s]+)";
  5496. return new RegExp(source, "g");
  5497. }
  5498. function ensureValidWordDefinition(wordDefinition) {
  5499. let result = DEFAULT_WORD_REGEXP;
  5500. if (wordDefinition && wordDefinition instanceof RegExp) {
  5501. if (!wordDefinition.global) {
  5502. let flags = "g";
  5503. if (wordDefinition.ignoreCase) {
  5504. flags += "i";
  5505. }
  5506. if (wordDefinition.multiline) {
  5507. flags += "m";
  5508. }
  5509. if (wordDefinition.unicode) {
  5510. flags += "u";
  5511. }
  5512. result = new RegExp(wordDefinition.source, flags);
  5513. } else {
  5514. result = wordDefinition;
  5515. }
  5516. }
  5517. result.lastIndex = 0;
  5518. return result;
  5519. }
  5520. function getWordAtText(column, wordDefinition, text, textOffset, config) {
  5521. if (!config) {
  5522. config = Iterable.first(_defaultConfig);
  5523. }
  5524. if (text.length > config.maxLen) {
  5525. let start = column - config.maxLen / 2;
  5526. if (start < 0) {
  5527. start = 0;
  5528. } else {
  5529. textOffset += start;
  5530. }
  5531. text = text.substring(start, column + config.maxLen / 2);
  5532. return getWordAtText(column, wordDefinition, text, textOffset, config);
  5533. }
  5534. const t1 = Date.now();
  5535. const pos = column - 1 - textOffset;
  5536. let prevRegexIndex = -1;
  5537. let match = null;
  5538. for (let i = 1; ; i++) {
  5539. if (Date.now() - t1 >= config.timeBudget) {
  5540. break;
  5541. }
  5542. const regexIndex = pos - config.windowSize * i;
  5543. wordDefinition.lastIndex = Math.max(0, regexIndex);
  5544. const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex);
  5545. if (!thisMatch && match) {
  5546. break;
  5547. }
  5548. match = thisMatch;
  5549. if (regexIndex <= 0) {
  5550. break;
  5551. }
  5552. prevRegexIndex = regexIndex;
  5553. }
  5554. if (match) {
  5555. const result = {
  5556. word: match[0],
  5557. startColumn: textOffset + 1 + match.index,
  5558. endColumn: textOffset + 1 + match.index + match[0].length
  5559. };
  5560. wordDefinition.lastIndex = 0;
  5561. return result;
  5562. }
  5563. return null;
  5564. }
  5565. function _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) {
  5566. let match;
  5567. while (match = wordDefinition.exec(text)) {
  5568. const matchIndex = match.index || 0;
  5569. if (matchIndex <= pos && wordDefinition.lastIndex >= pos) {
  5570. return match;
  5571. } else if (stopPos > 0 && matchIndex > stopPos) {
  5572. return null;
  5573. }
  5574. }
  5575. return null;
  5576. }
  5577. var USUAL_WORD_SEPARATORS, DEFAULT_WORD_REGEXP, _defaultConfig;
  5578. var init_wordHelper = __esm({
  5579. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js"() {
  5580. init_iterator();
  5581. init_linkedList();
  5582. USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";
  5583. DEFAULT_WORD_REGEXP = createWordRegExp();
  5584. _defaultConfig = new LinkedList();
  5585. _defaultConfig.unshift({
  5586. maxLen: 1e3,
  5587. windowSize: 15,
  5588. timeBudget: 150
  5589. });
  5590. }
  5591. });
  5592. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js
  5593. var CharacterClassifier, CharacterSet;
  5594. var init_characterClassifier = __esm({
  5595. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"() {
  5596. init_uint();
  5597. CharacterClassifier = class _CharacterClassifier {
  5598. constructor(_defaultValue) {
  5599. const defaultValue = toUint8(_defaultValue);
  5600. this._defaultValue = defaultValue;
  5601. this._asciiMap = _CharacterClassifier._createAsciiMap(defaultValue);
  5602. this._map = /* @__PURE__ */ new Map();
  5603. }
  5604. static _createAsciiMap(defaultValue) {
  5605. const asciiMap = new Uint8Array(256);
  5606. asciiMap.fill(defaultValue);
  5607. return asciiMap;
  5608. }
  5609. set(charCode, _value) {
  5610. const value = toUint8(_value);
  5611. if (charCode >= 0 && charCode < 256) {
  5612. this._asciiMap[charCode] = value;
  5613. } else {
  5614. this._map.set(charCode, value);
  5615. }
  5616. }
  5617. get(charCode) {
  5618. if (charCode >= 0 && charCode < 256) {
  5619. return this._asciiMap[charCode];
  5620. } else {
  5621. return this._map.get(charCode) || this._defaultValue;
  5622. }
  5623. }
  5624. clear() {
  5625. this._asciiMap.fill(this._defaultValue);
  5626. this._map.clear();
  5627. }
  5628. };
  5629. CharacterSet = class {
  5630. constructor() {
  5631. this._actual = new CharacterClassifier(
  5632. 0
  5633. /* Boolean.False */
  5634. );
  5635. }
  5636. add(charCode) {
  5637. this._actual.set(
  5638. charCode,
  5639. 1
  5640. /* Boolean.True */
  5641. );
  5642. }
  5643. has(charCode) {
  5644. return this._actual.get(charCode) === 1;
  5645. }
  5646. clear() {
  5647. return this._actual.clear();
  5648. }
  5649. };
  5650. }
  5651. });
  5652. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/cancellation.js
  5653. var shortcutEvent, CancellationToken, MutableToken, CancellationTokenSource;
  5654. var init_cancellation = __esm({
  5655. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/cancellation.js"() {
  5656. init_event();
  5657. shortcutEvent = Object.freeze(function(callback, context) {
  5658. const handle = setTimeout(callback.bind(context), 0);
  5659. return { dispose() {
  5660. clearTimeout(handle);
  5661. } };
  5662. });
  5663. (function(CancellationToken2) {
  5664. function isCancellationToken(thing) {
  5665. if (thing === CancellationToken2.None || thing === CancellationToken2.Cancelled) {
  5666. return true;
  5667. }
  5668. if (thing instanceof MutableToken) {
  5669. return true;
  5670. }
  5671. if (!thing || typeof thing !== "object") {
  5672. return false;
  5673. }
  5674. return typeof thing.isCancellationRequested === "boolean" && typeof thing.onCancellationRequested === "function";
  5675. }
  5676. CancellationToken2.isCancellationToken = isCancellationToken;
  5677. CancellationToken2.None = Object.freeze({
  5678. isCancellationRequested: false,
  5679. onCancellationRequested: Event.None
  5680. });
  5681. CancellationToken2.Cancelled = Object.freeze({
  5682. isCancellationRequested: true,
  5683. onCancellationRequested: shortcutEvent
  5684. });
  5685. })(CancellationToken || (CancellationToken = {}));
  5686. MutableToken = class {
  5687. constructor() {
  5688. this._isCancelled = false;
  5689. this._emitter = null;
  5690. }
  5691. cancel() {
  5692. if (!this._isCancelled) {
  5693. this._isCancelled = true;
  5694. if (this._emitter) {
  5695. this._emitter.fire(void 0);
  5696. this.dispose();
  5697. }
  5698. }
  5699. }
  5700. get isCancellationRequested() {
  5701. return this._isCancelled;
  5702. }
  5703. get onCancellationRequested() {
  5704. if (this._isCancelled) {
  5705. return shortcutEvent;
  5706. }
  5707. if (!this._emitter) {
  5708. this._emitter = new Emitter();
  5709. }
  5710. return this._emitter.event;
  5711. }
  5712. dispose() {
  5713. if (this._emitter) {
  5714. this._emitter.dispose();
  5715. this._emitter = null;
  5716. }
  5717. }
  5718. };
  5719. CancellationTokenSource = class {
  5720. constructor(parent) {
  5721. this._token = void 0;
  5722. this._parentListener = void 0;
  5723. this._parentListener = parent && parent.onCancellationRequested(this.cancel, this);
  5724. }
  5725. get token() {
  5726. if (!this._token) {
  5727. this._token = new MutableToken();
  5728. }
  5729. return this._token;
  5730. }
  5731. cancel() {
  5732. if (!this._token) {
  5733. this._token = CancellationToken.Cancelled;
  5734. } else if (this._token instanceof MutableToken) {
  5735. this._token.cancel();
  5736. }
  5737. }
  5738. dispose(cancel = false) {
  5739. var _a3;
  5740. if (cancel) {
  5741. this.cancel();
  5742. }
  5743. (_a3 = this._parentListener) === null || _a3 === void 0 ? void 0 : _a3.dispose();
  5744. if (!this._token) {
  5745. this._token = CancellationToken.None;
  5746. } else if (this._token instanceof MutableToken) {
  5747. this._token.dispose();
  5748. }
  5749. }
  5750. };
  5751. }
  5752. });
  5753. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/keyCodes.js
  5754. function KeyChord(firstPart, secondPart) {
  5755. const chordPart = (secondPart & 65535) << 16 >>> 0;
  5756. return (firstPart | chordPart) >>> 0;
  5757. }
  5758. var KeyCodeStrMap, uiMap, userSettingsUSMap, userSettingsGeneralMap, EVENT_KEY_CODE_MAP, NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE, scanCodeIntToStr, scanCodeStrToInt, scanCodeLowerCaseStrToInt, IMMUTABLE_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE, KeyCodeUtils;
  5759. var init_keyCodes = __esm({
  5760. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"() {
  5761. KeyCodeStrMap = class {
  5762. constructor() {
  5763. this._keyCodeToStr = [];
  5764. this._strToKeyCode = /* @__PURE__ */ Object.create(null);
  5765. }
  5766. define(keyCode, str) {
  5767. this._keyCodeToStr[keyCode] = str;
  5768. this._strToKeyCode[str.toLowerCase()] = keyCode;
  5769. }
  5770. keyCodeToStr(keyCode) {
  5771. return this._keyCodeToStr[keyCode];
  5772. }
  5773. strToKeyCode(str) {
  5774. return this._strToKeyCode[str.toLowerCase()] || 0;
  5775. }
  5776. };
  5777. uiMap = new KeyCodeStrMap();
  5778. userSettingsUSMap = new KeyCodeStrMap();
  5779. userSettingsGeneralMap = new KeyCodeStrMap();
  5780. EVENT_KEY_CODE_MAP = new Array(230);
  5781. NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {};
  5782. scanCodeIntToStr = [];
  5783. scanCodeStrToInt = /* @__PURE__ */ Object.create(null);
  5784. scanCodeLowerCaseStrToInt = /* @__PURE__ */ Object.create(null);
  5785. IMMUTABLE_CODE_TO_KEY_CODE = [];
  5786. IMMUTABLE_KEY_CODE_TO_CODE = [];
  5787. for (let i = 0; i <= 193; i++) {
  5788. IMMUTABLE_CODE_TO_KEY_CODE[i] = -1;
  5789. }
  5790. for (let i = 0; i <= 132; i++) {
  5791. IMMUTABLE_KEY_CODE_TO_CODE[i] = -1;
  5792. }
  5793. (function() {
  5794. const empty = "";
  5795. const mappings = [
  5796. // immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel
  5797. [1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", empty, empty],
  5798. [1, 1, "Hyper", 0, empty, 0, empty, empty, empty],
  5799. [1, 2, "Super", 0, empty, 0, empty, empty, empty],
  5800. [1, 3, "Fn", 0, empty, 0, empty, empty, empty],
  5801. [1, 4, "FnLock", 0, empty, 0, empty, empty, empty],
  5802. [1, 5, "Suspend", 0, empty, 0, empty, empty, empty],
  5803. [1, 6, "Resume", 0, empty, 0, empty, empty, empty],
  5804. [1, 7, "Turbo", 0, empty, 0, empty, empty, empty],
  5805. [1, 8, "Sleep", 0, empty, 0, "VK_SLEEP", empty, empty],
  5806. [1, 9, "WakeUp", 0, empty, 0, empty, empty, empty],
  5807. [0, 10, "KeyA", 31, "A", 65, "VK_A", empty, empty],
  5808. [0, 11, "KeyB", 32, "B", 66, "VK_B", empty, empty],
  5809. [0, 12, "KeyC", 33, "C", 67, "VK_C", empty, empty],
  5810. [0, 13, "KeyD", 34, "D", 68, "VK_D", empty, empty],
  5811. [0, 14, "KeyE", 35, "E", 69, "VK_E", empty, empty],
  5812. [0, 15, "KeyF", 36, "F", 70, "VK_F", empty, empty],
  5813. [0, 16, "KeyG", 37, "G", 71, "VK_G", empty, empty],
  5814. [0, 17, "KeyH", 38, "H", 72, "VK_H", empty, empty],
  5815. [0, 18, "KeyI", 39, "I", 73, "VK_I", empty, empty],
  5816. [0, 19, "KeyJ", 40, "J", 74, "VK_J", empty, empty],
  5817. [0, 20, "KeyK", 41, "K", 75, "VK_K", empty, empty],
  5818. [0, 21, "KeyL", 42, "L", 76, "VK_L", empty, empty],
  5819. [0, 22, "KeyM", 43, "M", 77, "VK_M", empty, empty],
  5820. [0, 23, "KeyN", 44, "N", 78, "VK_N", empty, empty],
  5821. [0, 24, "KeyO", 45, "O", 79, "VK_O", empty, empty],
  5822. [0, 25, "KeyP", 46, "P", 80, "VK_P", empty, empty],
  5823. [0, 26, "KeyQ", 47, "Q", 81, "VK_Q", empty, empty],
  5824. [0, 27, "KeyR", 48, "R", 82, "VK_R", empty, empty],
  5825. [0, 28, "KeyS", 49, "S", 83, "VK_S", empty, empty],
  5826. [0, 29, "KeyT", 50, "T", 84, "VK_T", empty, empty],
  5827. [0, 30, "KeyU", 51, "U", 85, "VK_U", empty, empty],
  5828. [0, 31, "KeyV", 52, "V", 86, "VK_V", empty, empty],
  5829. [0, 32, "KeyW", 53, "W", 87, "VK_W", empty, empty],
  5830. [0, 33, "KeyX", 54, "X", 88, "VK_X", empty, empty],
  5831. [0, 34, "KeyY", 55, "Y", 89, "VK_Y", empty, empty],
  5832. [0, 35, "KeyZ", 56, "Z", 90, "VK_Z", empty, empty],
  5833. [0, 36, "Digit1", 22, "1", 49, "VK_1", empty, empty],
  5834. [0, 37, "Digit2", 23, "2", 50, "VK_2", empty, empty],
  5835. [0, 38, "Digit3", 24, "3", 51, "VK_3", empty, empty],
  5836. [0, 39, "Digit4", 25, "4", 52, "VK_4", empty, empty],
  5837. [0, 40, "Digit5", 26, "5", 53, "VK_5", empty, empty],
  5838. [0, 41, "Digit6", 27, "6", 54, "VK_6", empty, empty],
  5839. [0, 42, "Digit7", 28, "7", 55, "VK_7", empty, empty],
  5840. [0, 43, "Digit8", 29, "8", 56, "VK_8", empty, empty],
  5841. [0, 44, "Digit9", 30, "9", 57, "VK_9", empty, empty],
  5842. [0, 45, "Digit0", 21, "0", 48, "VK_0", empty, empty],
  5843. [1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", empty, empty],
  5844. [1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", empty, empty],
  5845. [1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", empty, empty],
  5846. [1, 49, "Tab", 2, "Tab", 9, "VK_TAB", empty, empty],
  5847. [1, 50, "Space", 10, "Space", 32, "VK_SPACE", empty, empty],
  5848. [0, 51, "Minus", 88, "-", 189, "VK_OEM_MINUS", "-", "OEM_MINUS"],
  5849. [0, 52, "Equal", 86, "=", 187, "VK_OEM_PLUS", "=", "OEM_PLUS"],
  5850. [0, 53, "BracketLeft", 92, "[", 219, "VK_OEM_4", "[", "OEM_4"],
  5851. [0, 54, "BracketRight", 94, "]", 221, "VK_OEM_6", "]", "OEM_6"],
  5852. [0, 55, "Backslash", 93, "\\", 220, "VK_OEM_5", "\\", "OEM_5"],
  5853. [0, 56, "IntlHash", 0, empty, 0, empty, empty, empty],
  5854. [0, 57, "Semicolon", 85, ";", 186, "VK_OEM_1", ";", "OEM_1"],
  5855. [0, 58, "Quote", 95, "'", 222, "VK_OEM_7", "'", "OEM_7"],
  5856. [0, 59, "Backquote", 91, "`", 192, "VK_OEM_3", "`", "OEM_3"],
  5857. [0, 60, "Comma", 87, ",", 188, "VK_OEM_COMMA", ",", "OEM_COMMA"],
  5858. [0, 61, "Period", 89, ".", 190, "VK_OEM_PERIOD", ".", "OEM_PERIOD"],
  5859. [0, 62, "Slash", 90, "/", 191, "VK_OEM_2", "/", "OEM_2"],
  5860. [1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", empty, empty],
  5861. [1, 64, "F1", 59, "F1", 112, "VK_F1", empty, empty],
  5862. [1, 65, "F2", 60, "F2", 113, "VK_F2", empty, empty],
  5863. [1, 66, "F3", 61, "F3", 114, "VK_F3", empty, empty],
  5864. [1, 67, "F4", 62, "F4", 115, "VK_F4", empty, empty],
  5865. [1, 68, "F5", 63, "F5", 116, "VK_F5", empty, empty],
  5866. [1, 69, "F6", 64, "F6", 117, "VK_F6", empty, empty],
  5867. [1, 70, "F7", 65, "F7", 118, "VK_F7", empty, empty],
  5868. [1, 71, "F8", 66, "F8", 119, "VK_F8", empty, empty],
  5869. [1, 72, "F9", 67, "F9", 120, "VK_F9", empty, empty],
  5870. [1, 73, "F10", 68, "F10", 121, "VK_F10", empty, empty],
  5871. [1, 74, "F11", 69, "F11", 122, "VK_F11", empty, empty],
  5872. [1, 75, "F12", 70, "F12", 123, "VK_F12", empty, empty],
  5873. [1, 76, "PrintScreen", 0, empty, 0, empty, empty, empty],
  5874. [1, 77, "ScrollLock", 84, "ScrollLock", 145, "VK_SCROLL", empty, empty],
  5875. [1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", empty, empty],
  5876. [1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", empty, empty],
  5877. [1, 80, "Home", 14, "Home", 36, "VK_HOME", empty, empty],
  5878. [1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", empty, empty],
  5879. [1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", empty, empty],
  5880. [1, 83, "End", 13, "End", 35, "VK_END", empty, empty],
  5881. [1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", empty, empty],
  5882. [1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", empty],
  5883. [1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", empty],
  5884. [1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", empty],
  5885. [1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", empty],
  5886. [1, 89, "NumLock", 83, "NumLock", 144, "VK_NUMLOCK", empty, empty],
  5887. [1, 90, "NumpadDivide", 113, "NumPad_Divide", 111, "VK_DIVIDE", empty, empty],
  5888. [1, 91, "NumpadMultiply", 108, "NumPad_Multiply", 106, "VK_MULTIPLY", empty, empty],
  5889. [1, 92, "NumpadSubtract", 111, "NumPad_Subtract", 109, "VK_SUBTRACT", empty, empty],
  5890. [1, 93, "NumpadAdd", 109, "NumPad_Add", 107, "VK_ADD", empty, empty],
  5891. [1, 94, "NumpadEnter", 3, empty, 0, empty, empty, empty],
  5892. [1, 95, "Numpad1", 99, "NumPad1", 97, "VK_NUMPAD1", empty, empty],
  5893. [1, 96, "Numpad2", 100, "NumPad2", 98, "VK_NUMPAD2", empty, empty],
  5894. [1, 97, "Numpad3", 101, "NumPad3", 99, "VK_NUMPAD3", empty, empty],
  5895. [1, 98, "Numpad4", 102, "NumPad4", 100, "VK_NUMPAD4", empty, empty],
  5896. [1, 99, "Numpad5", 103, "NumPad5", 101, "VK_NUMPAD5", empty, empty],
  5897. [1, 100, "Numpad6", 104, "NumPad6", 102, "VK_NUMPAD6", empty, empty],
  5898. [1, 101, "Numpad7", 105, "NumPad7", 103, "VK_NUMPAD7", empty, empty],
  5899. [1, 102, "Numpad8", 106, "NumPad8", 104, "VK_NUMPAD8", empty, empty],
  5900. [1, 103, "Numpad9", 107, "NumPad9", 105, "VK_NUMPAD9", empty, empty],
  5901. [1, 104, "Numpad0", 98, "NumPad0", 96, "VK_NUMPAD0", empty, empty],
  5902. [1, 105, "NumpadDecimal", 112, "NumPad_Decimal", 110, "VK_DECIMAL", empty, empty],
  5903. [0, 106, "IntlBackslash", 97, "OEM_102", 226, "VK_OEM_102", empty, empty],
  5904. [1, 107, "ContextMenu", 58, "ContextMenu", 93, empty, empty, empty],
  5905. [1, 108, "Power", 0, empty, 0, empty, empty, empty],
  5906. [1, 109, "NumpadEqual", 0, empty, 0, empty, empty, empty],
  5907. [1, 110, "F13", 71, "F13", 124, "VK_F13", empty, empty],
  5908. [1, 111, "F14", 72, "F14", 125, "VK_F14", empty, empty],
  5909. [1, 112, "F15", 73, "F15", 126, "VK_F15", empty, empty],
  5910. [1, 113, "F16", 74, "F16", 127, "VK_F16", empty, empty],
  5911. [1, 114, "F17", 75, "F17", 128, "VK_F17", empty, empty],
  5912. [1, 115, "F18", 76, "F18", 129, "VK_F18", empty, empty],
  5913. [1, 116, "F19", 77, "F19", 130, "VK_F19", empty, empty],
  5914. [1, 117, "F20", 78, "F20", 0, "VK_F20", empty, empty],
  5915. [1, 118, "F21", 79, "F21", 0, "VK_F21", empty, empty],
  5916. [1, 119, "F22", 80, "F22", 0, "VK_F22", empty, empty],
  5917. [1, 120, "F23", 81, "F23", 0, "VK_F23", empty, empty],
  5918. [1, 121, "F24", 82, "F24", 0, "VK_F24", empty, empty],
  5919. [1, 122, "Open", 0, empty, 0, empty, empty, empty],
  5920. [1, 123, "Help", 0, empty, 0, empty, empty, empty],
  5921. [1, 124, "Select", 0, empty, 0, empty, empty, empty],
  5922. [1, 125, "Again", 0, empty, 0, empty, empty, empty],
  5923. [1, 126, "Undo", 0, empty, 0, empty, empty, empty],
  5924. [1, 127, "Cut", 0, empty, 0, empty, empty, empty],
  5925. [1, 128, "Copy", 0, empty, 0, empty, empty, empty],
  5926. [1, 129, "Paste", 0, empty, 0, empty, empty, empty],
  5927. [1, 130, "Find", 0, empty, 0, empty, empty, empty],
  5928. [1, 131, "AudioVolumeMute", 117, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", empty, empty],
  5929. [1, 132, "AudioVolumeUp", 118, "AudioVolumeUp", 175, "VK_VOLUME_UP", empty, empty],
  5930. [1, 133, "AudioVolumeDown", 119, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", empty, empty],
  5931. [1, 134, "NumpadComma", 110, "NumPad_Separator", 108, "VK_SEPARATOR", empty, empty],
  5932. [0, 135, "IntlRo", 115, "ABNT_C1", 193, "VK_ABNT_C1", empty, empty],
  5933. [1, 136, "KanaMode", 0, empty, 0, empty, empty, empty],
  5934. [0, 137, "IntlYen", 0, empty, 0, empty, empty, empty],
  5935. [1, 138, "Convert", 0, empty, 0, empty, empty, empty],
  5936. [1, 139, "NonConvert", 0, empty, 0, empty, empty, empty],
  5937. [1, 140, "Lang1", 0, empty, 0, empty, empty, empty],
  5938. [1, 141, "Lang2", 0, empty, 0, empty, empty, empty],
  5939. [1, 142, "Lang3", 0, empty, 0, empty, empty, empty],
  5940. [1, 143, "Lang4", 0, empty, 0, empty, empty, empty],
  5941. [1, 144, "Lang5", 0, empty, 0, empty, empty, empty],
  5942. [1, 145, "Abort", 0, empty, 0, empty, empty, empty],
  5943. [1, 146, "Props", 0, empty, 0, empty, empty, empty],
  5944. [1, 147, "NumpadParenLeft", 0, empty, 0, empty, empty, empty],
  5945. [1, 148, "NumpadParenRight", 0, empty, 0, empty, empty, empty],
  5946. [1, 149, "NumpadBackspace", 0, empty, 0, empty, empty, empty],
  5947. [1, 150, "NumpadMemoryStore", 0, empty, 0, empty, empty, empty],
  5948. [1, 151, "NumpadMemoryRecall", 0, empty, 0, empty, empty, empty],
  5949. [1, 152, "NumpadMemoryClear", 0, empty, 0, empty, empty, empty],
  5950. [1, 153, "NumpadMemoryAdd", 0, empty, 0, empty, empty, empty],
  5951. [1, 154, "NumpadMemorySubtract", 0, empty, 0, empty, empty, empty],
  5952. [1, 155, "NumpadClear", 131, "Clear", 12, "VK_CLEAR", empty, empty],
  5953. [1, 156, "NumpadClearEntry", 0, empty, 0, empty, empty, empty],
  5954. [1, 0, empty, 5, "Ctrl", 17, "VK_CONTROL", empty, empty],
  5955. [1, 0, empty, 4, "Shift", 16, "VK_SHIFT", empty, empty],
  5956. [1, 0, empty, 6, "Alt", 18, "VK_MENU", empty, empty],
  5957. [1, 0, empty, 57, "Meta", 91, "VK_COMMAND", empty, empty],
  5958. [1, 157, "ControlLeft", 5, empty, 0, "VK_LCONTROL", empty, empty],
  5959. [1, 158, "ShiftLeft", 4, empty, 0, "VK_LSHIFT", empty, empty],
  5960. [1, 159, "AltLeft", 6, empty, 0, "VK_LMENU", empty, empty],
  5961. [1, 160, "MetaLeft", 57, empty, 0, "VK_LWIN", empty, empty],
  5962. [1, 161, "ControlRight", 5, empty, 0, "VK_RCONTROL", empty, empty],
  5963. [1, 162, "ShiftRight", 4, empty, 0, "VK_RSHIFT", empty, empty],
  5964. [1, 163, "AltRight", 6, empty, 0, "VK_RMENU", empty, empty],
  5965. [1, 164, "MetaRight", 57, empty, 0, "VK_RWIN", empty, empty],
  5966. [1, 165, "BrightnessUp", 0, empty, 0, empty, empty, empty],
  5967. [1, 166, "BrightnessDown", 0, empty, 0, empty, empty, empty],
  5968. [1, 167, "MediaPlay", 0, empty, 0, empty, empty, empty],
  5969. [1, 168, "MediaRecord", 0, empty, 0, empty, empty, empty],
  5970. [1, 169, "MediaFastForward", 0, empty, 0, empty, empty, empty],
  5971. [1, 170, "MediaRewind", 0, empty, 0, empty, empty, empty],
  5972. [1, 171, "MediaTrackNext", 124, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", empty, empty],
  5973. [1, 172, "MediaTrackPrevious", 125, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", empty, empty],
  5974. [1, 173, "MediaStop", 126, "MediaStop", 178, "VK_MEDIA_STOP", empty, empty],
  5975. [1, 174, "Eject", 0, empty, 0, empty, empty, empty],
  5976. [1, 175, "MediaPlayPause", 127, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", empty, empty],
  5977. [1, 176, "MediaSelect", 128, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", empty, empty],
  5978. [1, 177, "LaunchMail", 129, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", empty, empty],
  5979. [1, 178, "LaunchApp2", 130, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", empty, empty],
  5980. [1, 179, "LaunchApp1", 0, empty, 0, "VK_MEDIA_LAUNCH_APP1", empty, empty],
  5981. [1, 180, "SelectTask", 0, empty, 0, empty, empty, empty],
  5982. [1, 181, "LaunchScreenSaver", 0, empty, 0, empty, empty, empty],
  5983. [1, 182, "BrowserSearch", 120, "BrowserSearch", 170, "VK_BROWSER_SEARCH", empty, empty],
  5984. [1, 183, "BrowserHome", 121, "BrowserHome", 172, "VK_BROWSER_HOME", empty, empty],
  5985. [1, 184, "BrowserBack", 122, "BrowserBack", 166, "VK_BROWSER_BACK", empty, empty],
  5986. [1, 185, "BrowserForward", 123, "BrowserForward", 167, "VK_BROWSER_FORWARD", empty, empty],
  5987. [1, 186, "BrowserStop", 0, empty, 0, "VK_BROWSER_STOP", empty, empty],
  5988. [1, 187, "BrowserRefresh", 0, empty, 0, "VK_BROWSER_REFRESH", empty, empty],
  5989. [1, 188, "BrowserFavorites", 0, empty, 0, "VK_BROWSER_FAVORITES", empty, empty],
  5990. [1, 189, "ZoomToggle", 0, empty, 0, empty, empty, empty],
  5991. [1, 190, "MailReply", 0, empty, 0, empty, empty, empty],
  5992. [1, 191, "MailForward", 0, empty, 0, empty, empty, empty],
  5993. [1, 192, "MailSend", 0, empty, 0, empty, empty, empty],
  5994. // See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html
  5995. // If an Input Method Editor is processing key input and the event is keydown, return 229.
  5996. [1, 0, empty, 114, "KeyInComposition", 229, empty, empty, empty],
  5997. [1, 0, empty, 116, "ABNT_C2", 194, "VK_ABNT_C2", empty, empty],
  5998. [1, 0, empty, 96, "OEM_8", 223, "VK_OEM_8", empty, empty],
  5999. [1, 0, empty, 0, empty, 0, "VK_KANA", empty, empty],
  6000. [1, 0, empty, 0, empty, 0, "VK_HANGUL", empty, empty],
  6001. [1, 0, empty, 0, empty, 0, "VK_JUNJA", empty, empty],
  6002. [1, 0, empty, 0, empty, 0, "VK_FINAL", empty, empty],
  6003. [1, 0, empty, 0, empty, 0, "VK_HANJA", empty, empty],
  6004. [1, 0, empty, 0, empty, 0, "VK_KANJI", empty, empty],
  6005. [1, 0, empty, 0, empty, 0, "VK_CONVERT", empty, empty],
  6006. [1, 0, empty, 0, empty, 0, "VK_NONCONVERT", empty, empty],
  6007. [1, 0, empty, 0, empty, 0, "VK_ACCEPT", empty, empty],
  6008. [1, 0, empty, 0, empty, 0, "VK_MODECHANGE", empty, empty],
  6009. [1, 0, empty, 0, empty, 0, "VK_SELECT", empty, empty],
  6010. [1, 0, empty, 0, empty, 0, "VK_PRINT", empty, empty],
  6011. [1, 0, empty, 0, empty, 0, "VK_EXECUTE", empty, empty],
  6012. [1, 0, empty, 0, empty, 0, "VK_SNAPSHOT", empty, empty],
  6013. [1, 0, empty, 0, empty, 0, "VK_HELP", empty, empty],
  6014. [1, 0, empty, 0, empty, 0, "VK_APPS", empty, empty],
  6015. [1, 0, empty, 0, empty, 0, "VK_PROCESSKEY", empty, empty],
  6016. [1, 0, empty, 0, empty, 0, "VK_PACKET", empty, empty],
  6017. [1, 0, empty, 0, empty, 0, "VK_DBE_SBCSCHAR", empty, empty],
  6018. [1, 0, empty, 0, empty, 0, "VK_DBE_DBCSCHAR", empty, empty],
  6019. [1, 0, empty, 0, empty, 0, "VK_ATTN", empty, empty],
  6020. [1, 0, empty, 0, empty, 0, "VK_CRSEL", empty, empty],
  6021. [1, 0, empty, 0, empty, 0, "VK_EXSEL", empty, empty],
  6022. [1, 0, empty, 0, empty, 0, "VK_EREOF", empty, empty],
  6023. [1, 0, empty, 0, empty, 0, "VK_PLAY", empty, empty],
  6024. [1, 0, empty, 0, empty, 0, "VK_ZOOM", empty, empty],
  6025. [1, 0, empty, 0, empty, 0, "VK_NONAME", empty, empty],
  6026. [1, 0, empty, 0, empty, 0, "VK_PA1", empty, empty],
  6027. [1, 0, empty, 0, empty, 0, "VK_OEM_CLEAR", empty, empty]
  6028. ];
  6029. const seenKeyCode = [];
  6030. const seenScanCode = [];
  6031. for (const mapping of mappings) {
  6032. const [immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel] = mapping;
  6033. if (!seenScanCode[scanCode]) {
  6034. seenScanCode[scanCode] = true;
  6035. scanCodeIntToStr[scanCode] = scanCodeStr;
  6036. scanCodeStrToInt[scanCodeStr] = scanCode;
  6037. scanCodeLowerCaseStrToInt[scanCodeStr.toLowerCase()] = scanCode;
  6038. if (immutable) {
  6039. IMMUTABLE_CODE_TO_KEY_CODE[scanCode] = keyCode;
  6040. if (keyCode !== 0 && keyCode !== 3 && keyCode !== 5 && keyCode !== 4 && keyCode !== 6 && keyCode !== 57) {
  6041. IMMUTABLE_KEY_CODE_TO_CODE[keyCode] = scanCode;
  6042. }
  6043. }
  6044. }
  6045. if (!seenKeyCode[keyCode]) {
  6046. seenKeyCode[keyCode] = true;
  6047. if (!keyCodeStr) {
  6048. throw new Error(`String representation missing for key code ${keyCode} around scan code ${scanCodeStr}`);
  6049. }
  6050. uiMap.define(keyCode, keyCodeStr);
  6051. userSettingsUSMap.define(keyCode, usUserSettingsLabel || keyCodeStr);
  6052. userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel || usUserSettingsLabel || keyCodeStr);
  6053. }
  6054. if (eventKeyCode) {
  6055. EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode;
  6056. }
  6057. if (vkey) {
  6058. NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode;
  6059. }
  6060. }
  6061. IMMUTABLE_KEY_CODE_TO_CODE[
  6062. 3
  6063. /* KeyCode.Enter */
  6064. ] = 46;
  6065. })();
  6066. (function(KeyCodeUtils2) {
  6067. function toString(keyCode) {
  6068. return uiMap.keyCodeToStr(keyCode);
  6069. }
  6070. KeyCodeUtils2.toString = toString;
  6071. function fromString(key) {
  6072. return uiMap.strToKeyCode(key);
  6073. }
  6074. KeyCodeUtils2.fromString = fromString;
  6075. function toUserSettingsUS(keyCode) {
  6076. return userSettingsUSMap.keyCodeToStr(keyCode);
  6077. }
  6078. KeyCodeUtils2.toUserSettingsUS = toUserSettingsUS;
  6079. function toUserSettingsGeneral(keyCode) {
  6080. return userSettingsGeneralMap.keyCodeToStr(keyCode);
  6081. }
  6082. KeyCodeUtils2.toUserSettingsGeneral = toUserSettingsGeneral;
  6083. function fromUserSettings(key) {
  6084. return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key);
  6085. }
  6086. KeyCodeUtils2.fromUserSettings = fromUserSettings;
  6087. function toElectronAccelerator(keyCode) {
  6088. if (keyCode >= 98 && keyCode <= 113) {
  6089. return null;
  6090. }
  6091. switch (keyCode) {
  6092. case 16:
  6093. return "Up";
  6094. case 18:
  6095. return "Down";
  6096. case 15:
  6097. return "Left";
  6098. case 17:
  6099. return "Right";
  6100. }
  6101. return uiMap.keyCodeToStr(keyCode);
  6102. }
  6103. KeyCodeUtils2.toElectronAccelerator = toElectronAccelerator;
  6104. })(KeyCodeUtils || (KeyCodeUtils = {}));
  6105. }
  6106. });
  6107. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/selection.js
  6108. var Selection;
  6109. var init_selection = __esm({
  6110. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"() {
  6111. init_position();
  6112. init_range();
  6113. Selection = class _Selection extends Range {
  6114. constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) {
  6115. super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn);
  6116. this.selectionStartLineNumber = selectionStartLineNumber;
  6117. this.selectionStartColumn = selectionStartColumn;
  6118. this.positionLineNumber = positionLineNumber;
  6119. this.positionColumn = positionColumn;
  6120. }
  6121. /**
  6122. * Transform to a human-readable representation.
  6123. */
  6124. toString() {
  6125. return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]";
  6126. }
  6127. /**
  6128. * Test if equals other selection.
  6129. */
  6130. equalsSelection(other) {
  6131. return _Selection.selectionsEqual(this, other);
  6132. }
  6133. /**
  6134. * Test if the two selections are equal.
  6135. */
  6136. static selectionsEqual(a, b) {
  6137. return a.selectionStartLineNumber === b.selectionStartLineNumber && a.selectionStartColumn === b.selectionStartColumn && a.positionLineNumber === b.positionLineNumber && a.positionColumn === b.positionColumn;
  6138. }
  6139. /**
  6140. * Get directions (LTR or RTL).
  6141. */
  6142. getDirection() {
  6143. if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) {
  6144. return 0;
  6145. }
  6146. return 1;
  6147. }
  6148. /**
  6149. * Create a new selection with a different `positionLineNumber` and `positionColumn`.
  6150. */
  6151. setEndPosition(endLineNumber, endColumn) {
  6152. if (this.getDirection() === 0) {
  6153. return new _Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn);
  6154. }
  6155. return new _Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn);
  6156. }
  6157. /**
  6158. * Get the position at `positionLineNumber` and `positionColumn`.
  6159. */
  6160. getPosition() {
  6161. return new Position(this.positionLineNumber, this.positionColumn);
  6162. }
  6163. /**
  6164. * Get the position at the start of the selection.
  6165. */
  6166. getSelectionStart() {
  6167. return new Position(this.selectionStartLineNumber, this.selectionStartColumn);
  6168. }
  6169. /**
  6170. * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
  6171. */
  6172. setStartPosition(startLineNumber, startColumn) {
  6173. if (this.getDirection() === 0) {
  6174. return new _Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn);
  6175. }
  6176. return new _Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn);
  6177. }
  6178. // ----
  6179. /**
  6180. * Create a `Selection` from one or two positions
  6181. */
  6182. static fromPositions(start, end = start) {
  6183. return new _Selection(start.lineNumber, start.column, end.lineNumber, end.column);
  6184. }
  6185. /**
  6186. * Creates a `Selection` from a range, given a direction.
  6187. */
  6188. static fromRange(range2, direction) {
  6189. if (direction === 0) {
  6190. return new _Selection(range2.startLineNumber, range2.startColumn, range2.endLineNumber, range2.endColumn);
  6191. } else {
  6192. return new _Selection(range2.endLineNumber, range2.endColumn, range2.startLineNumber, range2.startColumn);
  6193. }
  6194. }
  6195. /**
  6196. * Create a `Selection` from an `ISelection`.
  6197. */
  6198. static liftSelection(sel) {
  6199. return new _Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);
  6200. }
  6201. /**
  6202. * `a` equals `b`.
  6203. */
  6204. static selectionsArrEqual(a, b) {
  6205. if (a && !b || !a && b) {
  6206. return false;
  6207. }
  6208. if (!a && !b) {
  6209. return true;
  6210. }
  6211. if (a.length !== b.length) {
  6212. return false;
  6213. }
  6214. for (let i = 0, len = a.length; i < len; i++) {
  6215. if (!this.selectionsEqual(a[i], b[i])) {
  6216. return false;
  6217. }
  6218. }
  6219. return true;
  6220. }
  6221. /**
  6222. * Test if `obj` is an `ISelection`.
  6223. */
  6224. static isISelection(obj) {
  6225. return obj && typeof obj.selectionStartLineNumber === "number" && typeof obj.selectionStartColumn === "number" && typeof obj.positionLineNumber === "number" && typeof obj.positionColumn === "number";
  6226. }
  6227. /**
  6228. * Create with a direction.
  6229. */
  6230. static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) {
  6231. if (direction === 0) {
  6232. return new _Selection(startLineNumber, startColumn, endLineNumber, endColumn);
  6233. }
  6234. return new _Selection(endLineNumber, endColumn, startLineNumber, startColumn);
  6235. }
  6236. };
  6237. }
  6238. });
  6239. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/codicons.js
  6240. function register(id, fontCharacter) {
  6241. if (isString(fontCharacter)) {
  6242. const val = _codiconFontCharacters[fontCharacter];
  6243. if (val === void 0) {
  6244. throw new Error(`${id} references an unknown codicon: ${fontCharacter}`);
  6245. }
  6246. fontCharacter = val;
  6247. }
  6248. _codiconFontCharacters[id] = fontCharacter;
  6249. return { id };
  6250. }
  6251. function getCodiconFontCharacters() {
  6252. return _codiconFontCharacters;
  6253. }
  6254. var _codiconFontCharacters, Codicon;
  6255. var init_codicons = __esm({
  6256. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/codicons.js"() {
  6257. init_types();
  6258. _codiconFontCharacters = /* @__PURE__ */ Object.create(null);
  6259. Codicon = {
  6260. // built-in icons, with image name
  6261. add: register("add", 6e4),
  6262. plus: register("plus", 6e4),
  6263. gistNew: register("gist-new", 6e4),
  6264. repoCreate: register("repo-create", 6e4),
  6265. lightbulb: register("lightbulb", 60001),
  6266. lightBulb: register("light-bulb", 60001),
  6267. repo: register("repo", 60002),
  6268. repoDelete: register("repo-delete", 60002),
  6269. gistFork: register("gist-fork", 60003),
  6270. repoForked: register("repo-forked", 60003),
  6271. gitPullRequest: register("git-pull-request", 60004),
  6272. gitPullRequestAbandoned: register("git-pull-request-abandoned", 60004),
  6273. recordKeys: register("record-keys", 60005),
  6274. keyboard: register("keyboard", 60005),
  6275. tag: register("tag", 60006),
  6276. tagAdd: register("tag-add", 60006),
  6277. tagRemove: register("tag-remove", 60006),
  6278. person: register("person", 60007),
  6279. personFollow: register("person-follow", 60007),
  6280. personOutline: register("person-outline", 60007),
  6281. personFilled: register("person-filled", 60007),
  6282. gitBranch: register("git-branch", 60008),
  6283. gitBranchCreate: register("git-branch-create", 60008),
  6284. gitBranchDelete: register("git-branch-delete", 60008),
  6285. sourceControl: register("source-control", 60008),
  6286. mirror: register("mirror", 60009),
  6287. mirrorPublic: register("mirror-public", 60009),
  6288. star: register("star", 60010),
  6289. starAdd: register("star-add", 60010),
  6290. starDelete: register("star-delete", 60010),
  6291. starEmpty: register("star-empty", 60010),
  6292. comment: register("comment", 60011),
  6293. commentAdd: register("comment-add", 60011),
  6294. alert: register("alert", 60012),
  6295. warning: register("warning", 60012),
  6296. search: register("search", 60013),
  6297. searchSave: register("search-save", 60013),
  6298. logOut: register("log-out", 60014),
  6299. signOut: register("sign-out", 60014),
  6300. logIn: register("log-in", 60015),
  6301. signIn: register("sign-in", 60015),
  6302. eye: register("eye", 60016),
  6303. eyeUnwatch: register("eye-unwatch", 60016),
  6304. eyeWatch: register("eye-watch", 60016),
  6305. circleFilled: register("circle-filled", 60017),
  6306. primitiveDot: register("primitive-dot", 60017),
  6307. closeDirty: register("close-dirty", 60017),
  6308. debugBreakpoint: register("debug-breakpoint", 60017),
  6309. debugBreakpointDisabled: register("debug-breakpoint-disabled", 60017),
  6310. debugHint: register("debug-hint", 60017),
  6311. primitiveSquare: register("primitive-square", 60018),
  6312. edit: register("edit", 60019),
  6313. pencil: register("pencil", 60019),
  6314. info: register("info", 60020),
  6315. issueOpened: register("issue-opened", 60020),
  6316. gistPrivate: register("gist-private", 60021),
  6317. gitForkPrivate: register("git-fork-private", 60021),
  6318. lock: register("lock", 60021),
  6319. mirrorPrivate: register("mirror-private", 60021),
  6320. close: register("close", 60022),
  6321. removeClose: register("remove-close", 60022),
  6322. x: register("x", 60022),
  6323. repoSync: register("repo-sync", 60023),
  6324. sync: register("sync", 60023),
  6325. clone: register("clone", 60024),
  6326. desktopDownload: register("desktop-download", 60024),
  6327. beaker: register("beaker", 60025),
  6328. microscope: register("microscope", 60025),
  6329. vm: register("vm", 60026),
  6330. deviceDesktop: register("device-desktop", 60026),
  6331. file: register("file", 60027),
  6332. fileText: register("file-text", 60027),
  6333. more: register("more", 60028),
  6334. ellipsis: register("ellipsis", 60028),
  6335. kebabHorizontal: register("kebab-horizontal", 60028),
  6336. mailReply: register("mail-reply", 60029),
  6337. reply: register("reply", 60029),
  6338. organization: register("organization", 60030),
  6339. organizationFilled: register("organization-filled", 60030),
  6340. organizationOutline: register("organization-outline", 60030),
  6341. newFile: register("new-file", 60031),
  6342. fileAdd: register("file-add", 60031),
  6343. newFolder: register("new-folder", 60032),
  6344. fileDirectoryCreate: register("file-directory-create", 60032),
  6345. trash: register("trash", 60033),
  6346. trashcan: register("trashcan", 60033),
  6347. history: register("history", 60034),
  6348. clock: register("clock", 60034),
  6349. folder: register("folder", 60035),
  6350. fileDirectory: register("file-directory", 60035),
  6351. symbolFolder: register("symbol-folder", 60035),
  6352. logoGithub: register("logo-github", 60036),
  6353. markGithub: register("mark-github", 60036),
  6354. github: register("github", 60036),
  6355. terminal: register("terminal", 60037),
  6356. console: register("console", 60037),
  6357. repl: register("repl", 60037),
  6358. zap: register("zap", 60038),
  6359. symbolEvent: register("symbol-event", 60038),
  6360. error: register("error", 60039),
  6361. stop: register("stop", 60039),
  6362. variable: register("variable", 60040),
  6363. symbolVariable: register("symbol-variable", 60040),
  6364. array: register("array", 60042),
  6365. symbolArray: register("symbol-array", 60042),
  6366. symbolModule: register("symbol-module", 60043),
  6367. symbolPackage: register("symbol-package", 60043),
  6368. symbolNamespace: register("symbol-namespace", 60043),
  6369. symbolObject: register("symbol-object", 60043),
  6370. symbolMethod: register("symbol-method", 60044),
  6371. symbolFunction: register("symbol-function", 60044),
  6372. symbolConstructor: register("symbol-constructor", 60044),
  6373. symbolBoolean: register("symbol-boolean", 60047),
  6374. symbolNull: register("symbol-null", 60047),
  6375. symbolNumeric: register("symbol-numeric", 60048),
  6376. symbolNumber: register("symbol-number", 60048),
  6377. symbolStructure: register("symbol-structure", 60049),
  6378. symbolStruct: register("symbol-struct", 60049),
  6379. symbolParameter: register("symbol-parameter", 60050),
  6380. symbolTypeParameter: register("symbol-type-parameter", 60050),
  6381. symbolKey: register("symbol-key", 60051),
  6382. symbolText: register("symbol-text", 60051),
  6383. symbolReference: register("symbol-reference", 60052),
  6384. goToFile: register("go-to-file", 60052),
  6385. symbolEnum: register("symbol-enum", 60053),
  6386. symbolValue: register("symbol-value", 60053),
  6387. symbolRuler: register("symbol-ruler", 60054),
  6388. symbolUnit: register("symbol-unit", 60054),
  6389. activateBreakpoints: register("activate-breakpoints", 60055),
  6390. archive: register("archive", 60056),
  6391. arrowBoth: register("arrow-both", 60057),
  6392. arrowDown: register("arrow-down", 60058),
  6393. arrowLeft: register("arrow-left", 60059),
  6394. arrowRight: register("arrow-right", 60060),
  6395. arrowSmallDown: register("arrow-small-down", 60061),
  6396. arrowSmallLeft: register("arrow-small-left", 60062),
  6397. arrowSmallRight: register("arrow-small-right", 60063),
  6398. arrowSmallUp: register("arrow-small-up", 60064),
  6399. arrowUp: register("arrow-up", 60065),
  6400. bell: register("bell", 60066),
  6401. bold: register("bold", 60067),
  6402. book: register("book", 60068),
  6403. bookmark: register("bookmark", 60069),
  6404. debugBreakpointConditionalUnverified: register("debug-breakpoint-conditional-unverified", 60070),
  6405. debugBreakpointConditional: register("debug-breakpoint-conditional", 60071),
  6406. debugBreakpointConditionalDisabled: register("debug-breakpoint-conditional-disabled", 60071),
  6407. debugBreakpointDataUnverified: register("debug-breakpoint-data-unverified", 60072),
  6408. debugBreakpointData: register("debug-breakpoint-data", 60073),
  6409. debugBreakpointDataDisabled: register("debug-breakpoint-data-disabled", 60073),
  6410. debugBreakpointLogUnverified: register("debug-breakpoint-log-unverified", 60074),
  6411. debugBreakpointLog: register("debug-breakpoint-log", 60075),
  6412. debugBreakpointLogDisabled: register("debug-breakpoint-log-disabled", 60075),
  6413. briefcase: register("briefcase", 60076),
  6414. broadcast: register("broadcast", 60077),
  6415. browser: register("browser", 60078),
  6416. bug: register("bug", 60079),
  6417. calendar: register("calendar", 60080),
  6418. caseSensitive: register("case-sensitive", 60081),
  6419. check: register("check", 60082),
  6420. checklist: register("checklist", 60083),
  6421. chevronDown: register("chevron-down", 60084),
  6422. dropDownButton: register("drop-down-button", 60084),
  6423. chevronLeft: register("chevron-left", 60085),
  6424. chevronRight: register("chevron-right", 60086),
  6425. chevronUp: register("chevron-up", 60087),
  6426. chromeClose: register("chrome-close", 60088),
  6427. chromeMaximize: register("chrome-maximize", 60089),
  6428. chromeMinimize: register("chrome-minimize", 60090),
  6429. chromeRestore: register("chrome-restore", 60091),
  6430. circle: register("circle", 60092),
  6431. circleOutline: register("circle-outline", 60092),
  6432. debugBreakpointUnverified: register("debug-breakpoint-unverified", 60092),
  6433. circleSlash: register("circle-slash", 60093),
  6434. circuitBoard: register("circuit-board", 60094),
  6435. clearAll: register("clear-all", 60095),
  6436. clippy: register("clippy", 60096),
  6437. closeAll: register("close-all", 60097),
  6438. cloudDownload: register("cloud-download", 60098),
  6439. cloudUpload: register("cloud-upload", 60099),
  6440. code: register("code", 60100),
  6441. collapseAll: register("collapse-all", 60101),
  6442. colorMode: register("color-mode", 60102),
  6443. commentDiscussion: register("comment-discussion", 60103),
  6444. compareChanges: register("compare-changes", 60157),
  6445. creditCard: register("credit-card", 60105),
  6446. dash: register("dash", 60108),
  6447. dashboard: register("dashboard", 60109),
  6448. database: register("database", 60110),
  6449. debugContinue: register("debug-continue", 60111),
  6450. debugDisconnect: register("debug-disconnect", 60112),
  6451. debugPause: register("debug-pause", 60113),
  6452. debugRestart: register("debug-restart", 60114),
  6453. debugStart: register("debug-start", 60115),
  6454. debugStepInto: register("debug-step-into", 60116),
  6455. debugStepOut: register("debug-step-out", 60117),
  6456. debugStepOver: register("debug-step-over", 60118),
  6457. debugStop: register("debug-stop", 60119),
  6458. debug: register("debug", 60120),
  6459. deviceCameraVideo: register("device-camera-video", 60121),
  6460. deviceCamera: register("device-camera", 60122),
  6461. deviceMobile: register("device-mobile", 60123),
  6462. diffAdded: register("diff-added", 60124),
  6463. diffIgnored: register("diff-ignored", 60125),
  6464. diffModified: register("diff-modified", 60126),
  6465. diffRemoved: register("diff-removed", 60127),
  6466. diffRenamed: register("diff-renamed", 60128),
  6467. diff: register("diff", 60129),
  6468. discard: register("discard", 60130),
  6469. editorLayout: register("editor-layout", 60131),
  6470. emptyWindow: register("empty-window", 60132),
  6471. exclude: register("exclude", 60133),
  6472. extensions: register("extensions", 60134),
  6473. eyeClosed: register("eye-closed", 60135),
  6474. fileBinary: register("file-binary", 60136),
  6475. fileCode: register("file-code", 60137),
  6476. fileMedia: register("file-media", 60138),
  6477. filePdf: register("file-pdf", 60139),
  6478. fileSubmodule: register("file-submodule", 60140),
  6479. fileSymlinkDirectory: register("file-symlink-directory", 60141),
  6480. fileSymlinkFile: register("file-symlink-file", 60142),
  6481. fileZip: register("file-zip", 60143),
  6482. files: register("files", 60144),
  6483. filter: register("filter", 60145),
  6484. flame: register("flame", 60146),
  6485. foldDown: register("fold-down", 60147),
  6486. foldUp: register("fold-up", 60148),
  6487. fold: register("fold", 60149),
  6488. folderActive: register("folder-active", 60150),
  6489. folderOpened: register("folder-opened", 60151),
  6490. gear: register("gear", 60152),
  6491. gift: register("gift", 60153),
  6492. gistSecret: register("gist-secret", 60154),
  6493. gist: register("gist", 60155),
  6494. gitCommit: register("git-commit", 60156),
  6495. gitCompare: register("git-compare", 60157),
  6496. gitMerge: register("git-merge", 60158),
  6497. githubAction: register("github-action", 60159),
  6498. githubAlt: register("github-alt", 60160),
  6499. globe: register("globe", 60161),
  6500. grabber: register("grabber", 60162),
  6501. graph: register("graph", 60163),
  6502. gripper: register("gripper", 60164),
  6503. heart: register("heart", 60165),
  6504. home: register("home", 60166),
  6505. horizontalRule: register("horizontal-rule", 60167),
  6506. hubot: register("hubot", 60168),
  6507. inbox: register("inbox", 60169),
  6508. issueClosed: register("issue-closed", 60324),
  6509. issueReopened: register("issue-reopened", 60171),
  6510. issues: register("issues", 60172),
  6511. italic: register("italic", 60173),
  6512. jersey: register("jersey", 60174),
  6513. json: register("json", 60175),
  6514. bracket: register("bracket", 60175),
  6515. kebabVertical: register("kebab-vertical", 60176),
  6516. key: register("key", 60177),
  6517. law: register("law", 60178),
  6518. lightbulbAutofix: register("lightbulb-autofix", 60179),
  6519. linkExternal: register("link-external", 60180),
  6520. link: register("link", 60181),
  6521. listOrdered: register("list-ordered", 60182),
  6522. listUnordered: register("list-unordered", 60183),
  6523. liveShare: register("live-share", 60184),
  6524. loading: register("loading", 60185),
  6525. location: register("location", 60186),
  6526. mailRead: register("mail-read", 60187),
  6527. mail: register("mail", 60188),
  6528. markdown: register("markdown", 60189),
  6529. megaphone: register("megaphone", 60190),
  6530. mention: register("mention", 60191),
  6531. milestone: register("milestone", 60192),
  6532. mortarBoard: register("mortar-board", 60193),
  6533. move: register("move", 60194),
  6534. multipleWindows: register("multiple-windows", 60195),
  6535. mute: register("mute", 60196),
  6536. noNewline: register("no-newline", 60197),
  6537. note: register("note", 60198),
  6538. octoface: register("octoface", 60199),
  6539. openPreview: register("open-preview", 60200),
  6540. package_: register("package", 60201),
  6541. paintcan: register("paintcan", 60202),
  6542. pin: register("pin", 60203),
  6543. play: register("play", 60204),
  6544. run: register("run", 60204),
  6545. plug: register("plug", 60205),
  6546. preserveCase: register("preserve-case", 60206),
  6547. preview: register("preview", 60207),
  6548. project: register("project", 60208),
  6549. pulse: register("pulse", 60209),
  6550. question: register("question", 60210),
  6551. quote: register("quote", 60211),
  6552. radioTower: register("radio-tower", 60212),
  6553. reactions: register("reactions", 60213),
  6554. references: register("references", 60214),
  6555. refresh: register("refresh", 60215),
  6556. regex: register("regex", 60216),
  6557. remoteExplorer: register("remote-explorer", 60217),
  6558. remote: register("remote", 60218),
  6559. remove: register("remove", 60219),
  6560. replaceAll: register("replace-all", 60220),
  6561. replace: register("replace", 60221),
  6562. repoClone: register("repo-clone", 60222),
  6563. repoForcePush: register("repo-force-push", 60223),
  6564. repoPull: register("repo-pull", 60224),
  6565. repoPush: register("repo-push", 60225),
  6566. report: register("report", 60226),
  6567. requestChanges: register("request-changes", 60227),
  6568. rocket: register("rocket", 60228),
  6569. rootFolderOpened: register("root-folder-opened", 60229),
  6570. rootFolder: register("root-folder", 60230),
  6571. rss: register("rss", 60231),
  6572. ruby: register("ruby", 60232),
  6573. saveAll: register("save-all", 60233),
  6574. saveAs: register("save-as", 60234),
  6575. save: register("save", 60235),
  6576. screenFull: register("screen-full", 60236),
  6577. screenNormal: register("screen-normal", 60237),
  6578. searchStop: register("search-stop", 60238),
  6579. server: register("server", 60240),
  6580. settingsGear: register("settings-gear", 60241),
  6581. settings: register("settings", 60242),
  6582. shield: register("shield", 60243),
  6583. smiley: register("smiley", 60244),
  6584. sortPrecedence: register("sort-precedence", 60245),
  6585. splitHorizontal: register("split-horizontal", 60246),
  6586. splitVertical: register("split-vertical", 60247),
  6587. squirrel: register("squirrel", 60248),
  6588. starFull: register("star-full", 60249),
  6589. starHalf: register("star-half", 60250),
  6590. symbolClass: register("symbol-class", 60251),
  6591. symbolColor: register("symbol-color", 60252),
  6592. symbolCustomColor: register("symbol-customcolor", 60252),
  6593. symbolConstant: register("symbol-constant", 60253),
  6594. symbolEnumMember: register("symbol-enum-member", 60254),
  6595. symbolField: register("symbol-field", 60255),
  6596. symbolFile: register("symbol-file", 60256),
  6597. symbolInterface: register("symbol-interface", 60257),
  6598. symbolKeyword: register("symbol-keyword", 60258),
  6599. symbolMisc: register("symbol-misc", 60259),
  6600. symbolOperator: register("symbol-operator", 60260),
  6601. symbolProperty: register("symbol-property", 60261),
  6602. wrench: register("wrench", 60261),
  6603. wrenchSubaction: register("wrench-subaction", 60261),
  6604. symbolSnippet: register("symbol-snippet", 60262),
  6605. tasklist: register("tasklist", 60263),
  6606. telescope: register("telescope", 60264),
  6607. textSize: register("text-size", 60265),
  6608. threeBars: register("three-bars", 60266),
  6609. thumbsdown: register("thumbsdown", 60267),
  6610. thumbsup: register("thumbsup", 60268),
  6611. tools: register("tools", 60269),
  6612. triangleDown: register("triangle-down", 60270),
  6613. triangleLeft: register("triangle-left", 60271),
  6614. triangleRight: register("triangle-right", 60272),
  6615. triangleUp: register("triangle-up", 60273),
  6616. twitter: register("twitter", 60274),
  6617. unfold: register("unfold", 60275),
  6618. unlock: register("unlock", 60276),
  6619. unmute: register("unmute", 60277),
  6620. unverified: register("unverified", 60278),
  6621. verified: register("verified", 60279),
  6622. versions: register("versions", 60280),
  6623. vmActive: register("vm-active", 60281),
  6624. vmOutline: register("vm-outline", 60282),
  6625. vmRunning: register("vm-running", 60283),
  6626. watch: register("watch", 60284),
  6627. whitespace: register("whitespace", 60285),
  6628. wholeWord: register("whole-word", 60286),
  6629. window: register("window", 60287),
  6630. wordWrap: register("word-wrap", 60288),
  6631. zoomIn: register("zoom-in", 60289),
  6632. zoomOut: register("zoom-out", 60290),
  6633. listFilter: register("list-filter", 60291),
  6634. listFlat: register("list-flat", 60292),
  6635. listSelection: register("list-selection", 60293),
  6636. selection: register("selection", 60293),
  6637. listTree: register("list-tree", 60294),
  6638. debugBreakpointFunctionUnverified: register("debug-breakpoint-function-unverified", 60295),
  6639. debugBreakpointFunction: register("debug-breakpoint-function", 60296),
  6640. debugBreakpointFunctionDisabled: register("debug-breakpoint-function-disabled", 60296),
  6641. debugStackframeActive: register("debug-stackframe-active", 60297),
  6642. circleSmallFilled: register("circle-small-filled", 60298),
  6643. debugStackframeDot: register("debug-stackframe-dot", 60298),
  6644. debugStackframe: register("debug-stackframe", 60299),
  6645. debugStackframeFocused: register("debug-stackframe-focused", 60299),
  6646. debugBreakpointUnsupported: register("debug-breakpoint-unsupported", 60300),
  6647. symbolString: register("symbol-string", 60301),
  6648. debugReverseContinue: register("debug-reverse-continue", 60302),
  6649. debugStepBack: register("debug-step-back", 60303),
  6650. debugRestartFrame: register("debug-restart-frame", 60304),
  6651. callIncoming: register("call-incoming", 60306),
  6652. callOutgoing: register("call-outgoing", 60307),
  6653. menu: register("menu", 60308),
  6654. expandAll: register("expand-all", 60309),
  6655. feedback: register("feedback", 60310),
  6656. groupByRefType: register("group-by-ref-type", 60311),
  6657. ungroupByRefType: register("ungroup-by-ref-type", 60312),
  6658. account: register("account", 60313),
  6659. bellDot: register("bell-dot", 60314),
  6660. debugConsole: register("debug-console", 60315),
  6661. library: register("library", 60316),
  6662. output: register("output", 60317),
  6663. runAll: register("run-all", 60318),
  6664. syncIgnored: register("sync-ignored", 60319),
  6665. pinned: register("pinned", 60320),
  6666. githubInverted: register("github-inverted", 60321),
  6667. debugAlt: register("debug-alt", 60305),
  6668. serverProcess: register("server-process", 60322),
  6669. serverEnvironment: register("server-environment", 60323),
  6670. pass: register("pass", 60324),
  6671. stopCircle: register("stop-circle", 60325),
  6672. playCircle: register("play-circle", 60326),
  6673. record: register("record", 60327),
  6674. debugAltSmall: register("debug-alt-small", 60328),
  6675. vmConnect: register("vm-connect", 60329),
  6676. cloud: register("cloud", 60330),
  6677. merge: register("merge", 60331),
  6678. exportIcon: register("export", 60332),
  6679. graphLeft: register("graph-left", 60333),
  6680. magnet: register("magnet", 60334),
  6681. notebook: register("notebook", 60335),
  6682. redo: register("redo", 60336),
  6683. checkAll: register("check-all", 60337),
  6684. pinnedDirty: register("pinned-dirty", 60338),
  6685. passFilled: register("pass-filled", 60339),
  6686. circleLargeFilled: register("circle-large-filled", 60340),
  6687. circleLarge: register("circle-large", 60341),
  6688. circleLargeOutline: register("circle-large-outline", 60341),
  6689. combine: register("combine", 60342),
  6690. gather: register("gather", 60342),
  6691. table: register("table", 60343),
  6692. variableGroup: register("variable-group", 60344),
  6693. typeHierarchy: register("type-hierarchy", 60345),
  6694. typeHierarchySub: register("type-hierarchy-sub", 60346),
  6695. typeHierarchySuper: register("type-hierarchy-super", 60347),
  6696. gitPullRequestCreate: register("git-pull-request-create", 60348),
  6697. runAbove: register("run-above", 60349),
  6698. runBelow: register("run-below", 60350),
  6699. notebookTemplate: register("notebook-template", 60351),
  6700. debugRerun: register("debug-rerun", 60352),
  6701. workspaceTrusted: register("workspace-trusted", 60353),
  6702. workspaceUntrusted: register("workspace-untrusted", 60354),
  6703. workspaceUnspecified: register("workspace-unspecified", 60355),
  6704. terminalCmd: register("terminal-cmd", 60356),
  6705. terminalDebian: register("terminal-debian", 60357),
  6706. terminalLinux: register("terminal-linux", 60358),
  6707. terminalPowershell: register("terminal-powershell", 60359),
  6708. terminalTmux: register("terminal-tmux", 60360),
  6709. terminalUbuntu: register("terminal-ubuntu", 60361),
  6710. terminalBash: register("terminal-bash", 60362),
  6711. arrowSwap: register("arrow-swap", 60363),
  6712. copy: register("copy", 60364),
  6713. personAdd: register("person-add", 60365),
  6714. filterFilled: register("filter-filled", 60366),
  6715. wand: register("wand", 60367),
  6716. debugLineByLine: register("debug-line-by-line", 60368),
  6717. inspect: register("inspect", 60369),
  6718. layers: register("layers", 60370),
  6719. layersDot: register("layers-dot", 60371),
  6720. layersActive: register("layers-active", 60372),
  6721. compass: register("compass", 60373),
  6722. compassDot: register("compass-dot", 60374),
  6723. compassActive: register("compass-active", 60375),
  6724. azure: register("azure", 60376),
  6725. issueDraft: register("issue-draft", 60377),
  6726. gitPullRequestClosed: register("git-pull-request-closed", 60378),
  6727. gitPullRequestDraft: register("git-pull-request-draft", 60379),
  6728. debugAll: register("debug-all", 60380),
  6729. debugCoverage: register("debug-coverage", 60381),
  6730. runErrors: register("run-errors", 60382),
  6731. folderLibrary: register("folder-library", 60383),
  6732. debugContinueSmall: register("debug-continue-small", 60384),
  6733. beakerStop: register("beaker-stop", 60385),
  6734. graphLine: register("graph-line", 60386),
  6735. graphScatter: register("graph-scatter", 60387),
  6736. pieChart: register("pie-chart", 60388),
  6737. bracketDot: register("bracket-dot", 60389),
  6738. bracketError: register("bracket-error", 60390),
  6739. lockSmall: register("lock-small", 60391),
  6740. azureDevops: register("azure-devops", 60392),
  6741. verifiedFilled: register("verified-filled", 60393),
  6742. newLine: register("newline", 60394),
  6743. layout: register("layout", 60395),
  6744. layoutActivitybarLeft: register("layout-activitybar-left", 60396),
  6745. layoutActivitybarRight: register("layout-activitybar-right", 60397),
  6746. layoutPanelLeft: register("layout-panel-left", 60398),
  6747. layoutPanelCenter: register("layout-panel-center", 60399),
  6748. layoutPanelJustify: register("layout-panel-justify", 60400),
  6749. layoutPanelRight: register("layout-panel-right", 60401),
  6750. layoutPanel: register("layout-panel", 60402),
  6751. layoutSidebarLeft: register("layout-sidebar-left", 60403),
  6752. layoutSidebarRight: register("layout-sidebar-right", 60404),
  6753. layoutStatusbar: register("layout-statusbar", 60405),
  6754. layoutMenubar: register("layout-menubar", 60406),
  6755. layoutCentered: register("layout-centered", 60407),
  6756. layoutSidebarRightOff: register("layout-sidebar-right-off", 60416),
  6757. layoutPanelOff: register("layout-panel-off", 60417),
  6758. layoutSidebarLeftOff: register("layout-sidebar-left-off", 60418),
  6759. target: register("target", 60408),
  6760. indent: register("indent", 60409),
  6761. recordSmall: register("record-small", 60410),
  6762. errorSmall: register("error-small", 60411),
  6763. arrowCircleDown: register("arrow-circle-down", 60412),
  6764. arrowCircleLeft: register("arrow-circle-left", 60413),
  6765. arrowCircleRight: register("arrow-circle-right", 60414),
  6766. arrowCircleUp: register("arrow-circle-up", 60415),
  6767. heartFilled: register("heart-filled", 60420),
  6768. map: register("map", 60421),
  6769. mapFilled: register("map-filled", 60422),
  6770. circleSmall: register("circle-small", 60423),
  6771. bellSlash: register("bell-slash", 60424),
  6772. bellSlashDot: register("bell-slash-dot", 60425),
  6773. commentUnresolved: register("comment-unresolved", 60426),
  6774. gitPullRequestGoToChanges: register("git-pull-request-go-to-changes", 60427),
  6775. gitPullRequestNewChanges: register("git-pull-request-new-changes", 60428),
  6776. searchFuzzy: register("search-fuzzy", 60429),
  6777. commentDraft: register("comment-draft", 60430),
  6778. send: register("send", 60431),
  6779. sparkle: register("sparkle", 60432),
  6780. insert: register("insert", 60433),
  6781. // derived icons, that could become separate icons
  6782. dialogError: register("dialog-error", "error"),
  6783. dialogWarning: register("dialog-warning", "warning"),
  6784. dialogInfo: register("dialog-info", "info"),
  6785. dialogClose: register("dialog-close", "close"),
  6786. treeItemExpanded: register("tree-item-expanded", "chevron-down"),
  6787. treeFilterOnTypeOn: register("tree-filter-on-type-on", "list-filter"),
  6788. treeFilterOnTypeOff: register("tree-filter-on-type-off", "list-selection"),
  6789. treeFilterClear: register("tree-filter-clear", "close"),
  6790. treeItemLoading: register("tree-item-loading", "loading"),
  6791. menuSelection: register("menu-selection", "check"),
  6792. menuSubmenu: register("menu-submenu", "chevron-right"),
  6793. menuBarMore: register("menubar-more", "more"),
  6794. scrollbarButtonLeft: register("scrollbar-button-left", "triangle-left"),
  6795. scrollbarButtonRight: register("scrollbar-button-right", "triangle-right"),
  6796. scrollbarButtonUp: register("scrollbar-button-up", "triangle-up"),
  6797. scrollbarButtonDown: register("scrollbar-button-down", "triangle-down"),
  6798. toolBarMore: register("toolbar-more", "more"),
  6799. quickInputBack: register("quick-input-back", "arrow-left")
  6800. };
  6801. }
  6802. });
  6803. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/tokenizationRegistry.js
  6804. var __awaiter, TokenizationRegistry, TokenizationSupportFactoryData;
  6805. var init_tokenizationRegistry = __esm({
  6806. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/tokenizationRegistry.js"() {
  6807. init_event();
  6808. init_lifecycle();
  6809. __awaiter = function(thisArg, _arguments, P, generator) {
  6810. function adopt(value) {
  6811. return value instanceof P ? value : new P(function(resolve2) {
  6812. resolve2(value);
  6813. });
  6814. }
  6815. return new (P || (P = Promise))(function(resolve2, reject) {
  6816. function fulfilled(value) {
  6817. try {
  6818. step(generator.next(value));
  6819. } catch (e) {
  6820. reject(e);
  6821. }
  6822. }
  6823. function rejected(value) {
  6824. try {
  6825. step(generator["throw"](value));
  6826. } catch (e) {
  6827. reject(e);
  6828. }
  6829. }
  6830. function step(result) {
  6831. result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
  6832. }
  6833. step((generator = generator.apply(thisArg, _arguments || [])).next());
  6834. });
  6835. };
  6836. TokenizationRegistry = class {
  6837. constructor() {
  6838. this._tokenizationSupports = /* @__PURE__ */ new Map();
  6839. this._factories = /* @__PURE__ */ new Map();
  6840. this._onDidChange = new Emitter();
  6841. this.onDidChange = this._onDidChange.event;
  6842. this._colorMap = null;
  6843. }
  6844. handleChange(languageIds) {
  6845. this._onDidChange.fire({
  6846. changedLanguages: languageIds,
  6847. changedColorMap: false
  6848. });
  6849. }
  6850. register(languageId, support) {
  6851. this._tokenizationSupports.set(languageId, support);
  6852. this.handleChange([languageId]);
  6853. return toDisposable(() => {
  6854. if (this._tokenizationSupports.get(languageId) !== support) {
  6855. return;
  6856. }
  6857. this._tokenizationSupports.delete(languageId);
  6858. this.handleChange([languageId]);
  6859. });
  6860. }
  6861. get(languageId) {
  6862. return this._tokenizationSupports.get(languageId) || null;
  6863. }
  6864. registerFactory(languageId, factory) {
  6865. var _a3;
  6866. (_a3 = this._factories.get(languageId)) === null || _a3 === void 0 ? void 0 : _a3.dispose();
  6867. const myData = new TokenizationSupportFactoryData(this, languageId, factory);
  6868. this._factories.set(languageId, myData);
  6869. return toDisposable(() => {
  6870. const v = this._factories.get(languageId);
  6871. if (!v || v !== myData) {
  6872. return;
  6873. }
  6874. this._factories.delete(languageId);
  6875. v.dispose();
  6876. });
  6877. }
  6878. getOrCreate(languageId) {
  6879. return __awaiter(this, void 0, void 0, function* () {
  6880. const tokenizationSupport = this.get(languageId);
  6881. if (tokenizationSupport) {
  6882. return tokenizationSupport;
  6883. }
  6884. const factory = this._factories.get(languageId);
  6885. if (!factory || factory.isResolved) {
  6886. return null;
  6887. }
  6888. yield factory.resolve();
  6889. return this.get(languageId);
  6890. });
  6891. }
  6892. isResolved(languageId) {
  6893. const tokenizationSupport = this.get(languageId);
  6894. if (tokenizationSupport) {
  6895. return true;
  6896. }
  6897. const factory = this._factories.get(languageId);
  6898. if (!factory || factory.isResolved) {
  6899. return true;
  6900. }
  6901. return false;
  6902. }
  6903. setColorMap(colorMap) {
  6904. this._colorMap = colorMap;
  6905. this._onDidChange.fire({
  6906. changedLanguages: Array.from(this._tokenizationSupports.keys()),
  6907. changedColorMap: true
  6908. });
  6909. }
  6910. getColorMap() {
  6911. return this._colorMap;
  6912. }
  6913. getDefaultBackground() {
  6914. if (this._colorMap && this._colorMap.length > 2) {
  6915. return this._colorMap[
  6916. 2
  6917. /* ColorId.DefaultBackground */
  6918. ];
  6919. }
  6920. return null;
  6921. }
  6922. };
  6923. TokenizationSupportFactoryData = class extends Disposable {
  6924. get isResolved() {
  6925. return this._isResolved;
  6926. }
  6927. constructor(_registry, _languageId, _factory) {
  6928. super();
  6929. this._registry = _registry;
  6930. this._languageId = _languageId;
  6931. this._factory = _factory;
  6932. this._isDisposed = false;
  6933. this._resolvePromise = null;
  6934. this._isResolved = false;
  6935. }
  6936. dispose() {
  6937. this._isDisposed = true;
  6938. super.dispose();
  6939. }
  6940. resolve() {
  6941. return __awaiter(this, void 0, void 0, function* () {
  6942. if (!this._resolvePromise) {
  6943. this._resolvePromise = this._create();
  6944. }
  6945. return this._resolvePromise;
  6946. });
  6947. }
  6948. _create() {
  6949. return __awaiter(this, void 0, void 0, function* () {
  6950. const value = yield this._factory.tokenizationSupport;
  6951. this._isResolved = true;
  6952. if (value && !this._isDisposed) {
  6953. this._register(this._registry.register(this._languageId, value));
  6954. }
  6955. });
  6956. }
  6957. };
  6958. }
  6959. });
  6960. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/languages.js
  6961. function isLocationLink(thing) {
  6962. return thing && URI.isUri(thing.uri) && Range.isIRange(thing.range) && (Range.isIRange(thing.originSelectionRange) || Range.isIRange(thing.targetSelectionRange));
  6963. }
  6964. var Token, TokenizationResult, EncodedTokenizationResult, CompletionItemKinds, InlineCompletionTriggerKind, SelectedSuggestionInfo, SignatureHelpTriggerKind, DocumentHighlightKind, SymbolKinds, FoldingRangeKind, Command, InlayHintKind, LazyTokenizationSupport, TokenizationRegistry2;
  6965. var init_languages = __esm({
  6966. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/languages.js"() {
  6967. init_codicons();
  6968. init_uri();
  6969. init_range();
  6970. init_tokenizationRegistry();
  6971. Token = class {
  6972. constructor(offset, type, language2) {
  6973. this.offset = offset;
  6974. this.type = type;
  6975. this.language = language2;
  6976. this._tokenBrand = void 0;
  6977. }
  6978. toString() {
  6979. return "(" + this.offset + ", " + this.type + ")";
  6980. }
  6981. };
  6982. TokenizationResult = class {
  6983. constructor(tokens, endState) {
  6984. this.tokens = tokens;
  6985. this.endState = endState;
  6986. this._tokenizationResultBrand = void 0;
  6987. }
  6988. };
  6989. EncodedTokenizationResult = class {
  6990. constructor(tokens, endState) {
  6991. this.tokens = tokens;
  6992. this.endState = endState;
  6993. this._encodedTokenizationResultBrand = void 0;
  6994. }
  6995. };
  6996. (function(CompletionItemKinds2) {
  6997. const byKind = /* @__PURE__ */ new Map();
  6998. byKind.set(0, Codicon.symbolMethod);
  6999. byKind.set(1, Codicon.symbolFunction);
  7000. byKind.set(2, Codicon.symbolConstructor);
  7001. byKind.set(3, Codicon.symbolField);
  7002. byKind.set(4, Codicon.symbolVariable);
  7003. byKind.set(5, Codicon.symbolClass);
  7004. byKind.set(6, Codicon.symbolStruct);
  7005. byKind.set(7, Codicon.symbolInterface);
  7006. byKind.set(8, Codicon.symbolModule);
  7007. byKind.set(9, Codicon.symbolProperty);
  7008. byKind.set(10, Codicon.symbolEvent);
  7009. byKind.set(11, Codicon.symbolOperator);
  7010. byKind.set(12, Codicon.symbolUnit);
  7011. byKind.set(13, Codicon.symbolValue);
  7012. byKind.set(15, Codicon.symbolEnum);
  7013. byKind.set(14, Codicon.symbolConstant);
  7014. byKind.set(15, Codicon.symbolEnum);
  7015. byKind.set(16, Codicon.symbolEnumMember);
  7016. byKind.set(17, Codicon.symbolKeyword);
  7017. byKind.set(27, Codicon.symbolSnippet);
  7018. byKind.set(18, Codicon.symbolText);
  7019. byKind.set(19, Codicon.symbolColor);
  7020. byKind.set(20, Codicon.symbolFile);
  7021. byKind.set(21, Codicon.symbolReference);
  7022. byKind.set(22, Codicon.symbolCustomColor);
  7023. byKind.set(23, Codicon.symbolFolder);
  7024. byKind.set(24, Codicon.symbolTypeParameter);
  7025. byKind.set(25, Codicon.account);
  7026. byKind.set(26, Codicon.issues);
  7027. function toIcon(kind) {
  7028. let codicon = byKind.get(kind);
  7029. if (!codicon) {
  7030. console.info("No codicon found for CompletionItemKind " + kind);
  7031. codicon = Codicon.symbolProperty;
  7032. }
  7033. return codicon;
  7034. }
  7035. CompletionItemKinds2.toIcon = toIcon;
  7036. const data = /* @__PURE__ */ new Map();
  7037. data.set(
  7038. "method",
  7039. 0
  7040. /* CompletionItemKind.Method */
  7041. );
  7042. data.set(
  7043. "function",
  7044. 1
  7045. /* CompletionItemKind.Function */
  7046. );
  7047. data.set(
  7048. "constructor",
  7049. 2
  7050. /* CompletionItemKind.Constructor */
  7051. );
  7052. data.set(
  7053. "field",
  7054. 3
  7055. /* CompletionItemKind.Field */
  7056. );
  7057. data.set(
  7058. "variable",
  7059. 4
  7060. /* CompletionItemKind.Variable */
  7061. );
  7062. data.set(
  7063. "class",
  7064. 5
  7065. /* CompletionItemKind.Class */
  7066. );
  7067. data.set(
  7068. "struct",
  7069. 6
  7070. /* CompletionItemKind.Struct */
  7071. );
  7072. data.set(
  7073. "interface",
  7074. 7
  7075. /* CompletionItemKind.Interface */
  7076. );
  7077. data.set(
  7078. "module",
  7079. 8
  7080. /* CompletionItemKind.Module */
  7081. );
  7082. data.set(
  7083. "property",
  7084. 9
  7085. /* CompletionItemKind.Property */
  7086. );
  7087. data.set(
  7088. "event",
  7089. 10
  7090. /* CompletionItemKind.Event */
  7091. );
  7092. data.set(
  7093. "operator",
  7094. 11
  7095. /* CompletionItemKind.Operator */
  7096. );
  7097. data.set(
  7098. "unit",
  7099. 12
  7100. /* CompletionItemKind.Unit */
  7101. );
  7102. data.set(
  7103. "value",
  7104. 13
  7105. /* CompletionItemKind.Value */
  7106. );
  7107. data.set(
  7108. "constant",
  7109. 14
  7110. /* CompletionItemKind.Constant */
  7111. );
  7112. data.set(
  7113. "enum",
  7114. 15
  7115. /* CompletionItemKind.Enum */
  7116. );
  7117. data.set(
  7118. "enum-member",
  7119. 16
  7120. /* CompletionItemKind.EnumMember */
  7121. );
  7122. data.set(
  7123. "enumMember",
  7124. 16
  7125. /* CompletionItemKind.EnumMember */
  7126. );
  7127. data.set(
  7128. "keyword",
  7129. 17
  7130. /* CompletionItemKind.Keyword */
  7131. );
  7132. data.set(
  7133. "snippet",
  7134. 27
  7135. /* CompletionItemKind.Snippet */
  7136. );
  7137. data.set(
  7138. "text",
  7139. 18
  7140. /* CompletionItemKind.Text */
  7141. );
  7142. data.set(
  7143. "color",
  7144. 19
  7145. /* CompletionItemKind.Color */
  7146. );
  7147. data.set(
  7148. "file",
  7149. 20
  7150. /* CompletionItemKind.File */
  7151. );
  7152. data.set(
  7153. "reference",
  7154. 21
  7155. /* CompletionItemKind.Reference */
  7156. );
  7157. data.set(
  7158. "customcolor",
  7159. 22
  7160. /* CompletionItemKind.Customcolor */
  7161. );
  7162. data.set(
  7163. "folder",
  7164. 23
  7165. /* CompletionItemKind.Folder */
  7166. );
  7167. data.set(
  7168. "type-parameter",
  7169. 24
  7170. /* CompletionItemKind.TypeParameter */
  7171. );
  7172. data.set(
  7173. "typeParameter",
  7174. 24
  7175. /* CompletionItemKind.TypeParameter */
  7176. );
  7177. data.set(
  7178. "account",
  7179. 25
  7180. /* CompletionItemKind.User */
  7181. );
  7182. data.set(
  7183. "issue",
  7184. 26
  7185. /* CompletionItemKind.Issue */
  7186. );
  7187. function fromString(value, strict) {
  7188. let res = data.get(value);
  7189. if (typeof res === "undefined" && !strict) {
  7190. res = 9;
  7191. }
  7192. return res;
  7193. }
  7194. CompletionItemKinds2.fromString = fromString;
  7195. })(CompletionItemKinds || (CompletionItemKinds = {}));
  7196. (function(InlineCompletionTriggerKind3) {
  7197. InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic";
  7198. InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit";
  7199. })(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));
  7200. SelectedSuggestionInfo = class {
  7201. constructor(range2, text, completionKind, isSnippetText) {
  7202. this.range = range2;
  7203. this.text = text;
  7204. this.completionKind = completionKind;
  7205. this.isSnippetText = isSnippetText;
  7206. }
  7207. equals(other) {
  7208. return Range.lift(this.range).equalsRange(other.range) && this.text === other.text && this.completionKind === other.completionKind && this.isSnippetText === other.isSnippetText;
  7209. }
  7210. };
  7211. (function(SignatureHelpTriggerKind3) {
  7212. SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke";
  7213. SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter";
  7214. SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange";
  7215. })(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));
  7216. (function(DocumentHighlightKind3) {
  7217. DocumentHighlightKind3[DocumentHighlightKind3["Text"] = 0] = "Text";
  7218. DocumentHighlightKind3[DocumentHighlightKind3["Read"] = 1] = "Read";
  7219. DocumentHighlightKind3[DocumentHighlightKind3["Write"] = 2] = "Write";
  7220. })(DocumentHighlightKind || (DocumentHighlightKind = {}));
  7221. (function(SymbolKinds2) {
  7222. const byKind = /* @__PURE__ */ new Map();
  7223. byKind.set(0, Codicon.symbolFile);
  7224. byKind.set(1, Codicon.symbolModule);
  7225. byKind.set(2, Codicon.symbolNamespace);
  7226. byKind.set(3, Codicon.symbolPackage);
  7227. byKind.set(4, Codicon.symbolClass);
  7228. byKind.set(5, Codicon.symbolMethod);
  7229. byKind.set(6, Codicon.symbolProperty);
  7230. byKind.set(7, Codicon.symbolField);
  7231. byKind.set(8, Codicon.symbolConstructor);
  7232. byKind.set(9, Codicon.symbolEnum);
  7233. byKind.set(10, Codicon.symbolInterface);
  7234. byKind.set(11, Codicon.symbolFunction);
  7235. byKind.set(12, Codicon.symbolVariable);
  7236. byKind.set(13, Codicon.symbolConstant);
  7237. byKind.set(14, Codicon.symbolString);
  7238. byKind.set(15, Codicon.symbolNumber);
  7239. byKind.set(16, Codicon.symbolBoolean);
  7240. byKind.set(17, Codicon.symbolArray);
  7241. byKind.set(18, Codicon.symbolObject);
  7242. byKind.set(19, Codicon.symbolKey);
  7243. byKind.set(20, Codicon.symbolNull);
  7244. byKind.set(21, Codicon.symbolEnumMember);
  7245. byKind.set(22, Codicon.symbolStruct);
  7246. byKind.set(23, Codicon.symbolEvent);
  7247. byKind.set(24, Codicon.symbolOperator);
  7248. byKind.set(25, Codicon.symbolTypeParameter);
  7249. function toIcon(kind) {
  7250. let icon = byKind.get(kind);
  7251. if (!icon) {
  7252. console.info("No codicon found for SymbolKind " + kind);
  7253. icon = Codicon.symbolProperty;
  7254. }
  7255. return icon;
  7256. }
  7257. SymbolKinds2.toIcon = toIcon;
  7258. })(SymbolKinds || (SymbolKinds = {}));
  7259. FoldingRangeKind = class _FoldingRangeKind {
  7260. /**
  7261. * Returns a {@link FoldingRangeKind} for the given value.
  7262. *
  7263. * @param value of the kind.
  7264. */
  7265. static fromValue(value) {
  7266. switch (value) {
  7267. case "comment":
  7268. return _FoldingRangeKind.Comment;
  7269. case "imports":
  7270. return _FoldingRangeKind.Imports;
  7271. case "region":
  7272. return _FoldingRangeKind.Region;
  7273. }
  7274. return new _FoldingRangeKind(value);
  7275. }
  7276. /**
  7277. * Creates a new {@link FoldingRangeKind}.
  7278. *
  7279. * @param value of the kind.
  7280. */
  7281. constructor(value) {
  7282. this.value = value;
  7283. }
  7284. };
  7285. FoldingRangeKind.Comment = new FoldingRangeKind("comment");
  7286. FoldingRangeKind.Imports = new FoldingRangeKind("imports");
  7287. FoldingRangeKind.Region = new FoldingRangeKind("region");
  7288. (function(Command2) {
  7289. function is(obj) {
  7290. if (!obj || typeof obj !== "object") {
  7291. return false;
  7292. }
  7293. return typeof obj.id === "string" && typeof obj.title === "string";
  7294. }
  7295. Command2.is = is;
  7296. })(Command || (Command = {}));
  7297. (function(InlayHintKind3) {
  7298. InlayHintKind3[InlayHintKind3["Type"] = 1] = "Type";
  7299. InlayHintKind3[InlayHintKind3["Parameter"] = 2] = "Parameter";
  7300. })(InlayHintKind || (InlayHintKind = {}));
  7301. LazyTokenizationSupport = class {
  7302. constructor(createSupport) {
  7303. this.createSupport = createSupport;
  7304. this._tokenizationSupport = null;
  7305. }
  7306. dispose() {
  7307. if (this._tokenizationSupport) {
  7308. this._tokenizationSupport.then((support) => {
  7309. if (support) {
  7310. support.dispose();
  7311. }
  7312. });
  7313. }
  7314. }
  7315. get tokenizationSupport() {
  7316. if (!this._tokenizationSupport) {
  7317. this._tokenizationSupport = this.createSupport();
  7318. }
  7319. return this._tokenizationSupport;
  7320. }
  7321. };
  7322. TokenizationRegistry2 = new TokenizationRegistry();
  7323. }
  7324. });
  7325. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js
  7326. function once2(computeFn) {
  7327. const cache = {};
  7328. return (input) => {
  7329. if (!cache.hasOwnProperty(input)) {
  7330. cache[input] = computeFn(input);
  7331. }
  7332. return cache[input];
  7333. };
  7334. }
  7335. var WordCharacterClassifier, getMapForWordSeparators;
  7336. var init_wordCharacterClassifier = __esm({
  7337. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js"() {
  7338. init_characterClassifier();
  7339. WordCharacterClassifier = class extends CharacterClassifier {
  7340. constructor(wordSeparators) {
  7341. super(
  7342. 0
  7343. /* WordCharacterClass.Regular */
  7344. );
  7345. for (let i = 0, len = wordSeparators.length; i < len; i++) {
  7346. this.set(
  7347. wordSeparators.charCodeAt(i),
  7348. 2
  7349. /* WordCharacterClass.WordSeparator */
  7350. );
  7351. }
  7352. this.set(
  7353. 32,
  7354. 1
  7355. /* WordCharacterClass.Whitespace */
  7356. );
  7357. this.set(
  7358. 9,
  7359. 1
  7360. /* WordCharacterClass.Whitespace */
  7361. );
  7362. }
  7363. };
  7364. getMapForWordSeparators = once2((input) => new WordCharacterClassifier(input));
  7365. }
  7366. });
  7367. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model.js
  7368. function isITextSnapshot(obj) {
  7369. return obj && typeof obj.read === "function";
  7370. }
  7371. function shouldSynchronizeModel(model) {
  7372. return !model.isTooLargeForSyncing() && !model.isForSimpleWidget;
  7373. }
  7374. var OverviewRulerLane2, GlyphMarginLane2, MinimapPosition2, InjectedTextCursorStops2, TextModelResolvedOptions, FindMatch, ValidAnnotatedEditOperation, SearchData, ApplyEditsResult;
  7375. var init_model = __esm({
  7376. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model.js"() {
  7377. init_objects();
  7378. (function(OverviewRulerLane3) {
  7379. OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left";
  7380. OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center";
  7381. OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right";
  7382. OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full";
  7383. })(OverviewRulerLane2 || (OverviewRulerLane2 = {}));
  7384. (function(GlyphMarginLane3) {
  7385. GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left";
  7386. GlyphMarginLane3[GlyphMarginLane3["Right"] = 2] = "Right";
  7387. })(GlyphMarginLane2 || (GlyphMarginLane2 = {}));
  7388. (function(MinimapPosition3) {
  7389. MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline";
  7390. MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter";
  7391. })(MinimapPosition2 || (MinimapPosition2 = {}));
  7392. (function(InjectedTextCursorStops3) {
  7393. InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both";
  7394. InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right";
  7395. InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left";
  7396. InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None";
  7397. })(InjectedTextCursorStops2 || (InjectedTextCursorStops2 = {}));
  7398. TextModelResolvedOptions = class {
  7399. get originalIndentSize() {
  7400. return this._indentSizeIsTabSize ? "tabSize" : this.indentSize;
  7401. }
  7402. /**
  7403. * @internal
  7404. */
  7405. constructor(src) {
  7406. this._textModelResolvedOptionsBrand = void 0;
  7407. this.tabSize = Math.max(1, src.tabSize | 0);
  7408. if (src.indentSize === "tabSize") {
  7409. this.indentSize = this.tabSize;
  7410. this._indentSizeIsTabSize = true;
  7411. } else {
  7412. this.indentSize = Math.max(1, src.indentSize | 0);
  7413. this._indentSizeIsTabSize = false;
  7414. }
  7415. this.insertSpaces = Boolean(src.insertSpaces);
  7416. this.defaultEOL = src.defaultEOL | 0;
  7417. this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace);
  7418. this.bracketPairColorizationOptions = src.bracketPairColorizationOptions;
  7419. }
  7420. /**
  7421. * @internal
  7422. */
  7423. equals(other) {
  7424. return this.tabSize === other.tabSize && this._indentSizeIsTabSize === other._indentSizeIsTabSize && this.indentSize === other.indentSize && this.insertSpaces === other.insertSpaces && this.defaultEOL === other.defaultEOL && this.trimAutoWhitespace === other.trimAutoWhitespace && equals(this.bracketPairColorizationOptions, other.bracketPairColorizationOptions);
  7425. }
  7426. /**
  7427. * @internal
  7428. */
  7429. createChangeEvent(newOpts) {
  7430. return {
  7431. tabSize: this.tabSize !== newOpts.tabSize,
  7432. indentSize: this.indentSize !== newOpts.indentSize,
  7433. insertSpaces: this.insertSpaces !== newOpts.insertSpaces,
  7434. trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace
  7435. };
  7436. }
  7437. };
  7438. FindMatch = class {
  7439. /**
  7440. * @internal
  7441. */
  7442. constructor(range2, matches) {
  7443. this._findMatchBrand = void 0;
  7444. this.range = range2;
  7445. this.matches = matches;
  7446. }
  7447. };
  7448. ValidAnnotatedEditOperation = class {
  7449. constructor(identifier, range2, text, forceMoveMarkers, isAutoWhitespaceEdit, _isTracked) {
  7450. this.identifier = identifier;
  7451. this.range = range2;
  7452. this.text = text;
  7453. this.forceMoveMarkers = forceMoveMarkers;
  7454. this.isAutoWhitespaceEdit = isAutoWhitespaceEdit;
  7455. this._isTracked = _isTracked;
  7456. }
  7457. };
  7458. SearchData = class {
  7459. constructor(regex, wordSeparators, simpleSearch) {
  7460. this.regex = regex;
  7461. this.wordSeparators = wordSeparators;
  7462. this.simpleSearch = simpleSearch;
  7463. }
  7464. };
  7465. ApplyEditsResult = class {
  7466. constructor(reverseEdits, changes, trimAutoWhitespaceLineNumbers) {
  7467. this.reverseEdits = reverseEdits;
  7468. this.changes = changes;
  7469. this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers;
  7470. }
  7471. };
  7472. }
  7473. });
  7474. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js
  7475. function isMultilineRegexSource(searchString) {
  7476. if (!searchString || searchString.length === 0) {
  7477. return false;
  7478. }
  7479. for (let i = 0, len = searchString.length; i < len; i++) {
  7480. const chCode = searchString.charCodeAt(i);
  7481. if (chCode === 10) {
  7482. return true;
  7483. }
  7484. if (chCode === 92) {
  7485. i++;
  7486. if (i >= len) {
  7487. break;
  7488. }
  7489. const nextChCode = searchString.charCodeAt(i);
  7490. if (nextChCode === 110 || nextChCode === 114 || nextChCode === 87) {
  7491. return true;
  7492. }
  7493. }
  7494. }
  7495. return false;
  7496. }
  7497. function createFindMatch(range2, rawMatches, captureMatches) {
  7498. if (!captureMatches) {
  7499. return new FindMatch(range2, null);
  7500. }
  7501. const matches = [];
  7502. for (let i = 0, len = rawMatches.length; i < len; i++) {
  7503. matches[i] = rawMatches[i];
  7504. }
  7505. return new FindMatch(range2, matches);
  7506. }
  7507. function leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {
  7508. if (matchStartIndex === 0) {
  7509. return true;
  7510. }
  7511. const charBefore = text.charCodeAt(matchStartIndex - 1);
  7512. if (wordSeparators.get(charBefore) !== 0) {
  7513. return true;
  7514. }
  7515. if (charBefore === 13 || charBefore === 10) {
  7516. return true;
  7517. }
  7518. if (matchLength > 0) {
  7519. const firstCharInMatch = text.charCodeAt(matchStartIndex);
  7520. if (wordSeparators.get(firstCharInMatch) !== 0) {
  7521. return true;
  7522. }
  7523. }
  7524. return false;
  7525. }
  7526. function rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) {
  7527. if (matchStartIndex + matchLength === textLength) {
  7528. return true;
  7529. }
  7530. const charAfter = text.charCodeAt(matchStartIndex + matchLength);
  7531. if (wordSeparators.get(charAfter) !== 0) {
  7532. return true;
  7533. }
  7534. if (charAfter === 13 || charAfter === 10) {
  7535. return true;
  7536. }
  7537. if (matchLength > 0) {
  7538. const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1);
  7539. if (wordSeparators.get(lastCharInMatch) !== 0) {
  7540. return true;
  7541. }
  7542. }
  7543. return false;
  7544. }
  7545. function isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) {
  7546. return leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength);
  7547. }
  7548. var LIMIT_FIND_COUNT, SearchParams, LineFeedCounter, TextModelSearch, Searcher;
  7549. var init_textModelSearch = __esm({
  7550. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js"() {
  7551. init_strings();
  7552. init_wordCharacterClassifier();
  7553. init_position();
  7554. init_range();
  7555. init_model();
  7556. LIMIT_FIND_COUNT = 999;
  7557. SearchParams = class {
  7558. constructor(searchString, isRegex, matchCase, wordSeparators) {
  7559. this.searchString = searchString;
  7560. this.isRegex = isRegex;
  7561. this.matchCase = matchCase;
  7562. this.wordSeparators = wordSeparators;
  7563. }
  7564. parseSearchRequest() {
  7565. if (this.searchString === "") {
  7566. return null;
  7567. }
  7568. let multiline;
  7569. if (this.isRegex) {
  7570. multiline = isMultilineRegexSource(this.searchString);
  7571. } else {
  7572. multiline = this.searchString.indexOf("\n") >= 0;
  7573. }
  7574. let regex = null;
  7575. try {
  7576. regex = createRegExp(this.searchString, this.isRegex, {
  7577. matchCase: this.matchCase,
  7578. wholeWord: false,
  7579. multiline,
  7580. global: true,
  7581. unicode: true
  7582. });
  7583. } catch (err) {
  7584. return null;
  7585. }
  7586. if (!regex) {
  7587. return null;
  7588. }
  7589. let canUseSimpleSearch = !this.isRegex && !multiline;
  7590. if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) {
  7591. canUseSimpleSearch = this.matchCase;
  7592. }
  7593. return new SearchData(regex, this.wordSeparators ? getMapForWordSeparators(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null);
  7594. }
  7595. };
  7596. LineFeedCounter = class {
  7597. constructor(text) {
  7598. const lineFeedsOffsets = [];
  7599. let lineFeedsOffsetsLen = 0;
  7600. for (let i = 0, textLen = text.length; i < textLen; i++) {
  7601. if (text.charCodeAt(i) === 10) {
  7602. lineFeedsOffsets[lineFeedsOffsetsLen++] = i;
  7603. }
  7604. }
  7605. this._lineFeedsOffsets = lineFeedsOffsets;
  7606. }
  7607. findLineFeedCountBeforeOffset(offset) {
  7608. const lineFeedsOffsets = this._lineFeedsOffsets;
  7609. let min = 0;
  7610. let max = lineFeedsOffsets.length - 1;
  7611. if (max === -1) {
  7612. return 0;
  7613. }
  7614. if (offset <= lineFeedsOffsets[0]) {
  7615. return 0;
  7616. }
  7617. while (min < max) {
  7618. const mid = min + ((max - min) / 2 >> 0);
  7619. if (lineFeedsOffsets[mid] >= offset) {
  7620. max = mid - 1;
  7621. } else {
  7622. if (lineFeedsOffsets[mid + 1] >= offset) {
  7623. min = mid;
  7624. max = mid;
  7625. } else {
  7626. min = mid + 1;
  7627. }
  7628. }
  7629. }
  7630. return min + 1;
  7631. }
  7632. };
  7633. TextModelSearch = class {
  7634. static findMatches(model, searchParams, searchRange, captureMatches, limitResultCount) {
  7635. const searchData = searchParams.parseSearchRequest();
  7636. if (!searchData) {
  7637. return [];
  7638. }
  7639. if (searchData.regex.multiline) {
  7640. return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount);
  7641. }
  7642. return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount);
  7643. }
  7644. /**
  7645. * Multiline search always executes on the lines concatenated with \n.
  7646. * We must therefore compensate for the count of \n in case the model is CRLF
  7647. */
  7648. static _getMultilineMatchRange(model, deltaOffset, text, lfCounter, matchIndex, match0) {
  7649. let startOffset;
  7650. let lineFeedCountBeforeMatch = 0;
  7651. if (lfCounter) {
  7652. lineFeedCountBeforeMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex);
  7653. startOffset = deltaOffset + matchIndex + lineFeedCountBeforeMatch;
  7654. } else {
  7655. startOffset = deltaOffset + matchIndex;
  7656. }
  7657. let endOffset;
  7658. if (lfCounter) {
  7659. const lineFeedCountBeforeEndOfMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex + match0.length);
  7660. const lineFeedCountInMatch = lineFeedCountBeforeEndOfMatch - lineFeedCountBeforeMatch;
  7661. endOffset = startOffset + match0.length + lineFeedCountInMatch;
  7662. } else {
  7663. endOffset = startOffset + match0.length;
  7664. }
  7665. const startPosition = model.getPositionAt(startOffset);
  7666. const endPosition = model.getPositionAt(endOffset);
  7667. return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column);
  7668. }
  7669. static _doFindMatchesMultiline(model, searchRange, searcher, captureMatches, limitResultCount) {
  7670. const deltaOffset = model.getOffsetAt(searchRange.getStartPosition());
  7671. const text = model.getValueInRange(
  7672. searchRange,
  7673. 1
  7674. /* EndOfLinePreference.LF */
  7675. );
  7676. const lfCounter = model.getEOL() === "\r\n" ? new LineFeedCounter(text) : null;
  7677. const result = [];
  7678. let counter = 0;
  7679. let m;
  7680. searcher.reset(0);
  7681. while (m = searcher.next(text)) {
  7682. result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);
  7683. if (counter >= limitResultCount) {
  7684. return result;
  7685. }
  7686. }
  7687. return result;
  7688. }
  7689. static _doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount) {
  7690. const result = [];
  7691. let resultLen = 0;
  7692. if (searchRange.startLineNumber === searchRange.endLineNumber) {
  7693. const text2 = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1, searchRange.endColumn - 1);
  7694. resultLen = this._findMatchesInLine(searchData, text2, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);
  7695. return result;
  7696. }
  7697. const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1);
  7698. resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount);
  7699. for (let lineNumber = searchRange.startLineNumber + 1; lineNumber < searchRange.endLineNumber && resultLen < limitResultCount; lineNumber++) {
  7700. resultLen = this._findMatchesInLine(searchData, model.getLineContent(lineNumber), lineNumber, 0, resultLen, result, captureMatches, limitResultCount);
  7701. }
  7702. if (resultLen < limitResultCount) {
  7703. const text2 = model.getLineContent(searchRange.endLineNumber).substring(0, searchRange.endColumn - 1);
  7704. resultLen = this._findMatchesInLine(searchData, text2, searchRange.endLineNumber, 0, resultLen, result, captureMatches, limitResultCount);
  7705. }
  7706. return result;
  7707. }
  7708. static _findMatchesInLine(searchData, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) {
  7709. const wordSeparators = searchData.wordSeparators;
  7710. if (!captureMatches && searchData.simpleSearch) {
  7711. const searchString = searchData.simpleSearch;
  7712. const searchStringLen = searchString.length;
  7713. const textLength = text.length;
  7714. let lastMatchIndex = -searchStringLen;
  7715. while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) {
  7716. if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) {
  7717. result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null);
  7718. if (resultLen >= limitResultCount) {
  7719. return resultLen;
  7720. }
  7721. }
  7722. }
  7723. return resultLen;
  7724. }
  7725. const searcher = new Searcher(searchData.wordSeparators, searchData.regex);
  7726. let m;
  7727. searcher.reset(0);
  7728. do {
  7729. m = searcher.next(text);
  7730. if (m) {
  7731. result[resultLen++] = createFindMatch(new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches);
  7732. if (resultLen >= limitResultCount) {
  7733. return resultLen;
  7734. }
  7735. }
  7736. } while (m);
  7737. return resultLen;
  7738. }
  7739. static findNextMatch(model, searchParams, searchStart, captureMatches) {
  7740. const searchData = searchParams.parseSearchRequest();
  7741. if (!searchData) {
  7742. return null;
  7743. }
  7744. const searcher = new Searcher(searchData.wordSeparators, searchData.regex);
  7745. if (searchData.regex.multiline) {
  7746. return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches);
  7747. }
  7748. return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches);
  7749. }
  7750. static _doFindNextMatchMultiline(model, searchStart, searcher, captureMatches) {
  7751. const searchTextStart = new Position(searchStart.lineNumber, 1);
  7752. const deltaOffset = model.getOffsetAt(searchTextStart);
  7753. const lineCount = model.getLineCount();
  7754. const text = model.getValueInRange(
  7755. new Range(searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)),
  7756. 1
  7757. /* EndOfLinePreference.LF */
  7758. );
  7759. const lfCounter = model.getEOL() === "\r\n" ? new LineFeedCounter(text) : null;
  7760. searcher.reset(searchStart.column - 1);
  7761. const m = searcher.next(text);
  7762. if (m) {
  7763. return createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches);
  7764. }
  7765. if (searchStart.lineNumber !== 1 || searchStart.column !== 1) {
  7766. return this._doFindNextMatchMultiline(model, new Position(1, 1), searcher, captureMatches);
  7767. }
  7768. return null;
  7769. }
  7770. static _doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches) {
  7771. const lineCount = model.getLineCount();
  7772. const startLineNumber = searchStart.lineNumber;
  7773. const text = model.getLineContent(startLineNumber);
  7774. const r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches);
  7775. if (r) {
  7776. return r;
  7777. }
  7778. for (let i = 1; i <= lineCount; i++) {
  7779. const lineIndex = (startLineNumber + i - 1) % lineCount;
  7780. const text2 = model.getLineContent(lineIndex + 1);
  7781. const r2 = this._findFirstMatchInLine(searcher, text2, lineIndex + 1, 1, captureMatches);
  7782. if (r2) {
  7783. return r2;
  7784. }
  7785. }
  7786. return null;
  7787. }
  7788. static _findFirstMatchInLine(searcher, text, lineNumber, fromColumn, captureMatches) {
  7789. searcher.reset(fromColumn - 1);
  7790. const m = searcher.next(text);
  7791. if (m) {
  7792. return createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);
  7793. }
  7794. return null;
  7795. }
  7796. static findPreviousMatch(model, searchParams, searchStart, captureMatches) {
  7797. const searchData = searchParams.parseSearchRequest();
  7798. if (!searchData) {
  7799. return null;
  7800. }
  7801. const searcher = new Searcher(searchData.wordSeparators, searchData.regex);
  7802. if (searchData.regex.multiline) {
  7803. return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches);
  7804. }
  7805. return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches);
  7806. }
  7807. static _doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches) {
  7808. const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT);
  7809. if (matches.length > 0) {
  7810. return matches[matches.length - 1];
  7811. }
  7812. const lineCount = model.getLineCount();
  7813. if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) {
  7814. return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches);
  7815. }
  7816. return null;
  7817. }
  7818. static _doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches) {
  7819. const lineCount = model.getLineCount();
  7820. const startLineNumber = searchStart.lineNumber;
  7821. const text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1);
  7822. const r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches);
  7823. if (r) {
  7824. return r;
  7825. }
  7826. for (let i = 1; i <= lineCount; i++) {
  7827. const lineIndex = (lineCount + startLineNumber - i - 1) % lineCount;
  7828. const text2 = model.getLineContent(lineIndex + 1);
  7829. const r2 = this._findLastMatchInLine(searcher, text2, lineIndex + 1, captureMatches);
  7830. if (r2) {
  7831. return r2;
  7832. }
  7833. }
  7834. return null;
  7835. }
  7836. static _findLastMatchInLine(searcher, text, lineNumber, captureMatches) {
  7837. let bestResult = null;
  7838. let m;
  7839. searcher.reset(0);
  7840. while (m = searcher.next(text)) {
  7841. bestResult = createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches);
  7842. }
  7843. return bestResult;
  7844. }
  7845. };
  7846. Searcher = class {
  7847. constructor(wordSeparators, searchRegex) {
  7848. this._wordSeparators = wordSeparators;
  7849. this._searchRegex = searchRegex;
  7850. this._prevMatchStartIndex = -1;
  7851. this._prevMatchLength = 0;
  7852. }
  7853. reset(lastIndex2) {
  7854. this._searchRegex.lastIndex = lastIndex2;
  7855. this._prevMatchStartIndex = -1;
  7856. this._prevMatchLength = 0;
  7857. }
  7858. next(text) {
  7859. const textLength = text.length;
  7860. let m;
  7861. do {
  7862. if (this._prevMatchStartIndex + this._prevMatchLength === textLength) {
  7863. return null;
  7864. }
  7865. m = this._searchRegex.exec(text);
  7866. if (!m) {
  7867. return null;
  7868. }
  7869. const matchStartIndex = m.index;
  7870. const matchLength = m[0].length;
  7871. if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) {
  7872. if (matchLength === 0) {
  7873. if (getNextCodePoint(text, textLength, this._searchRegex.lastIndex) > 65535) {
  7874. this._searchRegex.lastIndex += 2;
  7875. } else {
  7876. this._searchRegex.lastIndex += 1;
  7877. }
  7878. continue;
  7879. }
  7880. return null;
  7881. }
  7882. this._prevMatchStartIndex = matchStartIndex;
  7883. this._prevMatchLength = matchLength;
  7884. if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) {
  7885. return m;
  7886. }
  7887. } while (m);
  7888. return null;
  7889. }
  7890. };
  7891. }
  7892. });
  7893. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/assert.js
  7894. function ok(value, message) {
  7895. if (!value) {
  7896. throw new Error(message ? `Assertion failed (${message})` : "Assertion Failed");
  7897. }
  7898. }
  7899. function assertNever(value, message = "Unreachable") {
  7900. throw new Error(message);
  7901. }
  7902. function assertFn(condition) {
  7903. if (!condition()) {
  7904. debugger;
  7905. condition();
  7906. onUnexpectedError(new BugIndicatingError("Assertion Failed"));
  7907. }
  7908. }
  7909. function checkAdjacentItems(items, predicate) {
  7910. let i = 0;
  7911. while (i < items.length - 1) {
  7912. const a = items[i];
  7913. const b = items[i + 1];
  7914. if (!predicate(a, b)) {
  7915. return false;
  7916. }
  7917. i++;
  7918. }
  7919. return true;
  7920. }
  7921. var init_assert = __esm({
  7922. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/assert.js"() {
  7923. init_errors();
  7924. }
  7925. });
  7926. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js
  7927. var LineRange;
  7928. var init_lineRange = __esm({
  7929. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js"() {
  7930. init_errors();
  7931. LineRange = class _LineRange {
  7932. /**
  7933. * @param lineRanges An array of sorted line ranges.
  7934. */
  7935. static joinMany(lineRanges) {
  7936. if (lineRanges.length === 0) {
  7937. return [];
  7938. }
  7939. let result = lineRanges[0];
  7940. for (let i = 1; i < lineRanges.length; i++) {
  7941. result = this.join(result, lineRanges[i]);
  7942. }
  7943. return result;
  7944. }
  7945. /**
  7946. * @param lineRanges1 Must be sorted.
  7947. * @param lineRanges2 Must be sorted.
  7948. */
  7949. static join(lineRanges1, lineRanges2) {
  7950. if (lineRanges1.length === 0) {
  7951. return lineRanges2;
  7952. }
  7953. if (lineRanges2.length === 0) {
  7954. return lineRanges1;
  7955. }
  7956. const result = [];
  7957. let i1 = 0;
  7958. let i2 = 0;
  7959. let current = null;
  7960. while (i1 < lineRanges1.length || i2 < lineRanges2.length) {
  7961. let next = null;
  7962. if (i1 < lineRanges1.length && i2 < lineRanges2.length) {
  7963. const lineRange1 = lineRanges1[i1];
  7964. const lineRange2 = lineRanges2[i2];
  7965. if (lineRange1.startLineNumber < lineRange2.startLineNumber) {
  7966. next = lineRange1;
  7967. i1++;
  7968. } else {
  7969. next = lineRange2;
  7970. i2++;
  7971. }
  7972. } else if (i1 < lineRanges1.length) {
  7973. next = lineRanges1[i1];
  7974. i1++;
  7975. } else {
  7976. next = lineRanges2[i2];
  7977. i2++;
  7978. }
  7979. if (current === null) {
  7980. current = next;
  7981. } else {
  7982. if (current.endLineNumberExclusive >= next.startLineNumber) {
  7983. current = new _LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive));
  7984. } else {
  7985. result.push(current);
  7986. current = next;
  7987. }
  7988. }
  7989. }
  7990. if (current !== null) {
  7991. result.push(current);
  7992. }
  7993. return result;
  7994. }
  7995. constructor(startLineNumber, endLineNumberExclusive) {
  7996. if (startLineNumber > endLineNumberExclusive) {
  7997. throw new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`);
  7998. }
  7999. this.startLineNumber = startLineNumber;
  8000. this.endLineNumberExclusive = endLineNumberExclusive;
  8001. }
  8002. /**
  8003. * Indicates if this line range contains the given line number.
  8004. */
  8005. contains(lineNumber) {
  8006. return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive;
  8007. }
  8008. /**
  8009. * Indicates if this line range is empty.
  8010. */
  8011. get isEmpty() {
  8012. return this.startLineNumber === this.endLineNumberExclusive;
  8013. }
  8014. /**
  8015. * Moves this line range by the given offset of line numbers.
  8016. */
  8017. delta(offset) {
  8018. return new _LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset);
  8019. }
  8020. /**
  8021. * The number of lines this line range spans.
  8022. */
  8023. get length() {
  8024. return this.endLineNumberExclusive - this.startLineNumber;
  8025. }
  8026. /**
  8027. * Creates a line range that combines this and the given line range.
  8028. */
  8029. join(other) {
  8030. return new _LineRange(Math.min(this.startLineNumber, other.startLineNumber), Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive));
  8031. }
  8032. toString() {
  8033. return `[${this.startLineNumber},${this.endLineNumberExclusive})`;
  8034. }
  8035. /**
  8036. * The resulting range is empty if the ranges do not intersect, but touch.
  8037. * If the ranges don't even touch, the result is undefined.
  8038. */
  8039. intersect(other) {
  8040. const startLineNumber = Math.max(this.startLineNumber, other.startLineNumber);
  8041. const endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive);
  8042. if (startLineNumber <= endLineNumberExclusive) {
  8043. return new _LineRange(startLineNumber, endLineNumberExclusive);
  8044. }
  8045. return void 0;
  8046. }
  8047. overlapOrTouch(other) {
  8048. return this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive;
  8049. }
  8050. equals(b) {
  8051. return this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive;
  8052. }
  8053. };
  8054. }
  8055. });
  8056. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js
  8057. var OffsetRange;
  8058. var init_offsetRange = __esm({
  8059. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js"() {
  8060. init_errors();
  8061. OffsetRange = class _OffsetRange {
  8062. static addRange(range2, sortedRanges) {
  8063. let i = 0;
  8064. while (i < sortedRanges.length && sortedRanges[i].endExclusive < range2.start) {
  8065. i++;
  8066. }
  8067. let j = i;
  8068. while (j < sortedRanges.length && sortedRanges[j].start <= range2.endExclusive) {
  8069. j++;
  8070. }
  8071. if (i === j) {
  8072. sortedRanges.splice(i, 0, range2);
  8073. } else {
  8074. const start = Math.min(range2.start, sortedRanges[i].start);
  8075. const end = Math.max(range2.endExclusive, sortedRanges[j - 1].endExclusive);
  8076. sortedRanges.splice(i, j - i, new _OffsetRange(start, end));
  8077. }
  8078. }
  8079. static tryCreate(start, endExclusive) {
  8080. if (start > endExclusive) {
  8081. return void 0;
  8082. }
  8083. return new _OffsetRange(start, endExclusive);
  8084. }
  8085. constructor(start, endExclusive) {
  8086. this.start = start;
  8087. this.endExclusive = endExclusive;
  8088. if (start > endExclusive) {
  8089. throw new BugIndicatingError(`Invalid range: ${this.toString()}`);
  8090. }
  8091. }
  8092. get isEmpty() {
  8093. return this.start === this.endExclusive;
  8094. }
  8095. delta(offset) {
  8096. return new _OffsetRange(this.start + offset, this.endExclusive + offset);
  8097. }
  8098. get length() {
  8099. return this.endExclusive - this.start;
  8100. }
  8101. toString() {
  8102. return `[${this.start}, ${this.endExclusive})`;
  8103. }
  8104. equals(other) {
  8105. return this.start === other.start && this.endExclusive === other.endExclusive;
  8106. }
  8107. containsRange(other) {
  8108. return this.start <= other.start && other.endExclusive <= this.endExclusive;
  8109. }
  8110. /**
  8111. * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n)
  8112. * The joined range is the smallest range that contains both ranges.
  8113. */
  8114. join(other) {
  8115. return new _OffsetRange(Math.min(this.start, other.start), Math.max(this.endExclusive, other.endExclusive));
  8116. }
  8117. /**
  8118. * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n)
  8119. *
  8120. * The resulting range is empty if the ranges do not intersect, but touch.
  8121. * If the ranges don't even touch, the result is undefined.
  8122. */
  8123. intersect(other) {
  8124. const start = Math.max(this.start, other.start);
  8125. const end = Math.min(this.endExclusive, other.endExclusive);
  8126. if (start <= end) {
  8127. return new _OffsetRange(start, end);
  8128. }
  8129. return void 0;
  8130. }
  8131. };
  8132. }
  8133. });
  8134. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/color.js
  8135. function roundFloat(number, decimalPoints) {
  8136. const decimal = Math.pow(10, decimalPoints);
  8137. return Math.round(number * decimal) / decimal;
  8138. }
  8139. var RGBA, HSLA, HSVA, Color;
  8140. var init_color = __esm({
  8141. "node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/color.js"() {
  8142. RGBA = class {
  8143. constructor(r, g, b, a = 1) {
  8144. this._rgbaBrand = void 0;
  8145. this.r = Math.min(255, Math.max(0, r)) | 0;
  8146. this.g = Math.min(255, Math.max(0, g)) | 0;
  8147. this.b = Math.min(255, Math.max(0, b)) | 0;
  8148. this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);
  8149. }
  8150. static equals(a, b) {
  8151. return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a;
  8152. }
  8153. };
  8154. HSLA = class _HSLA {
  8155. constructor(h, s, l, a) {
  8156. this._hslaBrand = void 0;
  8157. this.h = Math.max(Math.min(360, h), 0) | 0;
  8158. this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);
  8159. this.l = roundFloat(Math.max(Math.min(1, l), 0), 3);
  8160. this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);
  8161. }
  8162. static equals(a, b) {
  8163. return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a;
  8164. }
  8165. /**
  8166. * Converts an RGB color value to HSL. Conversion formula
  8167. * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
  8168. * Assumes r, g, and b are contained in the set [0, 255] and
  8169. * returns h in the set [0, 360], s, and l in the set [0, 1].
  8170. */
  8171. static fromRGBA(rgba) {
  8172. const r = rgba.r / 255;
  8173. const g = rgba.g / 255;
  8174. const b = rgba.b / 255;
  8175. const a = rgba.a;
  8176. const max = Math.max(r, g, b);
  8177. const min = Math.min(r, g, b);
  8178. let h = 0;
  8179. let s = 0;
  8180. const l = (min + max) / 2;
  8181. const chroma = max - min;
  8182. if (chroma > 0) {
  8183. s = Math.min(l <= 0.5 ? chroma / (2 * l) : chroma / (2 - 2 * l), 1);
  8184. switch (max) {
  8185. case r:
  8186. h = (g - b) / chroma + (g < b ? 6 : 0);
  8187. break;
  8188. case g:
  8189. h = (b - r) / chroma + 2;
  8190. break;
  8191. case b:
  8192. h = (r - g) / chroma + 4;
  8193. break;
  8194. }
  8195. h *= 60;
  8196. h = Math.round(h);
  8197. }
  8198. return new _HSLA(h, s, l, a);
  8199. }
  8200. static _hue2rgb(p, q, t) {
  8201. if (t < 0) {
  8202. t += 1;
  8203. }
  8204. if (t > 1) {
  8205. t -= 1;
  8206. }
  8207. if (t < 1 / 6) {
  8208. return p + (q - p) * 6 * t;
  8209. }
  8210. if (t < 1 / 2) {
  8211. return q;
  8212. }
  8213. if (t < 2 / 3) {
  8214. return p + (q - p) * (2 / 3 - t) * 6;
  8215. }
  8216. return p;
  8217. }
  8218. /**
  8219. * Converts an HSL color value to RGB. Conversion formula
  8220. * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
  8221. * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
  8222. * returns r, g, and b in the set [0, 255].
  8223. */
  8224. static toRGBA(hsla) {
  8225. const h = hsla.h / 360;
  8226. const { s, l, a } = hsla;
  8227. let r, g, b;
  8228. if (s === 0) {
  8229. r = g = b = l;
  8230. } else {
  8231. const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  8232. const p = 2 * l - q;
  8233. r = _HSLA._hue2rgb(p, q, h + 1 / 3);
  8234. g = _HSLA._hue2rgb(p, q, h);
  8235. b = _HSLA._hue2rgb(p, q, h - 1 / 3);
  8236. }
  8237. return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a);
  8238. }
  8239. };
  8240. HSVA = class _HSVA {
  8241. constructor(h, s, v, a) {
  8242. this._hsvaBrand = void 0;
  8243. this.h = Math.max(Math.min(360, h), 0) | 0;
  8244. this.s = roundFloat(Math.max(Math.min(1, s), 0), 3);
  8245. this.v = roundFloat(Math.max(Math.min(1, v), 0), 3);
  8246. this.a = roundFloat(Math.max(Math.min(1, a), 0), 3);
  8247. }
  8248. static equals(a, b) {
  8249. return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a;
  8250. }
  8251. // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm
  8252. static fromRGBA(rgba) {
  8253. const r = rgba.r / 255;
  8254. const g = rgba.g / 255;
  8255. const b = rgba.b / 255;
  8256. const cmax = Math.max(r, g, b);
  8257. const cmin = Math.min(r, g, b);
  8258. const delta = cmax - cmin;
  8259. const s = cmax === 0 ? 0 : delta / cmax;
  8260. let m;
  8261. if (delta === 0) {
  8262. m = 0;
  8263. } else if (cmax === r) {
  8264. m = ((g - b) / delta % 6 + 6) % 6;
  8265. } else if (cmax === g) {
  8266. m = (b - r) / delta + 2;
  8267. } else {
  8268. m = (r - g) / delta + 4;
  8269. }
  8270. return new _HSVA(Math.round(m * 60), s, cmax, rgba.a);
  8271. }
  8272. // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm
  8273. static toRGBA(hsva) {
  8274. const { h, s, v, a } = hsva;
  8275. const c = v * s;
  8276. const x = c * (1 - Math.abs(h / 60 % 2 - 1));
  8277. const m = v - c;
  8278. let [r, g, b] = [0, 0, 0];
  8279. if (h < 60) {
  8280. r = c;
  8281. g = x;
  8282. } else if (h < 120) {
  8283. r = x;
  8284. g = c;
  8285. } else if (h < 180) {
  8286. g = c;
  8287. b = x;
  8288. } else if (h < 240) {
  8289. g = x;
  8290. b = c;
  8291. } else if (h < 300) {
  8292. r = x;
  8293. b = c;
  8294. } else if (h <= 360) {
  8295. r = c;
  8296. b = x;
  8297. }
  8298. r = Math.round((r + m) * 255);
  8299. g = Math.round((g + m) * 255);
  8300. b = Math.round((b + m) * 255);
  8301. return new RGBA(r, g, b, a);
  8302. }
  8303. };
  8304. Color = class _Color {
  8305. static fromHex(hex) {
  8306. return _Color.Format.CSS.parseHex(hex) || _Color.red;
  8307. }
  8308. static equals(a, b) {
  8309. if (!a && !b) {
  8310. return true;
  8311. }
  8312. if (!a || !b) {
  8313. return false;
  8314. }
  8315. return a.equals(b);
  8316. }
  8317. get hsla() {
  8318. if (this._hsla) {
  8319. return this._hsla;
  8320. } else {
  8321. return HSLA.fromRGBA(this.rgba);
  8322. }
  8323. }
  8324. get hsva() {
  8325. if (this._hsva) {
  8326. return this._hsva;
  8327. }
  8328. return HSVA.fromRGBA(this.rgba);
  8329. }
  8330. constructor(arg) {
  8331. if (!arg) {
  8332. throw new Error("Color needs a value");
  8333. } else if (arg instanceof RGBA) {
  8334. this.rgba = arg;
  8335. } else if (arg instanceof HSLA) {
  8336. this._hsla = arg;
  8337. this.rgba = HSLA.toRGBA(arg);
  8338. } else if (arg instanceof HSVA) {
  8339. this._hsva = arg;
  8340. this.rgba = HSVA.toRGBA(arg);
  8341. } else {
  8342. throw new Error("Invalid color ctor argument");
  8343. }
  8344. }
  8345. equals(other) {
  8346. return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva);
  8347. }
  8348. /**
  8349. * http://www.w3.org/TR/WCAG20/#relativeluminancedef
  8350. * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
  8351. */
  8352. getRelativeLuminance() {
  8353. const R = _Color._relativeLuminanceForComponent(this.rgba.r);
  8354. const G = _Color._relativeLuminanceForComponent(this.rgba.g);
  8355. const B = _Color._relativeLuminanceForComponent(this.rgba.b);
  8356. const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B;
  8357. return roundFloat(luminance, 4);
  8358. }
  8359. static _relativeLuminanceForComponent(color) {
  8360. const c = color / 255;
  8361. return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
  8362. }
  8363. /**
  8364. * http://24ways.org/2010/calculating-color-contrast
  8365. * Return 'true' if lighter color otherwise 'false'
  8366. */
  8367. isLighter() {
  8368. const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1e3;
  8369. return yiq >= 128;
  8370. }
  8371. isLighterThan(another) {
  8372. const lum1 = this.getRelativeLuminance();
  8373. const lum2 = another.getRelativeLuminance();
  8374. return lum1 > lum2;
  8375. }
  8376. isDarkerThan(another) {
  8377. const lum1 = this.getRelativeLuminance();
  8378. const lum2 = another.getRelativeLuminance();
  8379. return lum1 < lum2;
  8380. }
  8381. lighten(factor) {
  8382. return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a));
  8383. }
  8384. darken(factor) {
  8385. return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a));
  8386. }
  8387. transparent(factor) {
  8388. const { r, g, b, a } = this.rgba;
  8389. return new _Color(new RGBA(r, g, b, a * factor));
  8390. }
  8391. isTransparent() {
  8392. return this.rgba.a === 0;
  8393. }
  8394. isOpaque() {
  8395. return this.rgba.a === 1;
  8396. }
  8397. opposite() {
  8398. return new _Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a));
  8399. }
  8400. makeOpaque(opaqueBackground) {
  8401. if (this.isOpaque() || opaqueBackground.rgba.a !== 1) {
  8402. return this;
  8403. }
  8404. const { r, g, b, a } = this.rgba;
  8405. return new _Color(new RGBA(opaqueBackground.rgba.r - a * (opaqueBackground.rgba.r - r), opaqueBackground.rgba.g - a * (opaqueBackground.rgba.g - g), opaqueBackground.rgba.b - a * (opaqueBackground.rgba.b - b), 1));
  8406. }
  8407. toString() {
  8408. if (!this._toString) {
  8409. this._toString = _Color.Format.CSS.format(this);
  8410. }
  8411. return this._toString;
  8412. }
  8413. static getLighterColor(of, relative2, factor) {
  8414. if (of.isLighterThan(relative2)) {
  8415. return of;
  8416. }
  8417. factor = factor ? factor : 0.5;
  8418. const lum1 = of.getRelativeLuminance();
  8419. const lum2 = relative2.getRelativeLuminance();
  8420. factor = factor * (lum2 - lum1) / lum2;
  8421. return of.lighten(factor);
  8422. }
  8423. static getDarkerColor(of, relative2, factor) {
  8424. if (of.isDarkerThan(relative2)) {
  8425. return of;
  8426. }
  8427. factor = factor ? factor : 0.5;
  8428. const lum1 = of.getRelativeLuminance();
  8429. const lum2 = relative2.getRelativeLuminance();
  8430. factor = factor * (lum1 - lum2) / lum1;
  8431. return of.darken(factor);
  8432. }
  8433. };
  8434. Color.white = new Color(new RGBA(255, 255, 255, 1));
  8435. Color.black = new Color(new RGBA(0, 0, 0, 1));
  8436. Color.red = new Color(new RGBA(255, 0, 0, 1));
  8437. Color.blue = new Color(new RGBA(0, 0, 255, 1));
  8438. Color.green = new Color(new RGBA(0, 255, 0, 1));
  8439. Color.cyan = new Color(new RGBA(0, 255, 255, 1));
  8440. Color.lightgrey = new Color(new RGBA(211, 211, 211, 1));
  8441. Color.transparent = new Color(new RGBA(0, 0, 0, 0));
  8442. (function(Color2) {
  8443. let Format;
  8444. (function(Format2) {
  8445. let CSS;
  8446. (function(CSS2) {
  8447. function formatRGB(color) {
  8448. if (color.rgba.a === 1) {
  8449. return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`;
  8450. }
  8451. return Color2.Format.CSS.formatRGBA(color);
  8452. }
  8453. CSS2.formatRGB = formatRGB;
  8454. function formatRGBA(color) {
  8455. return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+color.rgba.a.toFixed(2)})`;
  8456. }
  8457. CSS2.formatRGBA = formatRGBA;
  8458. function formatHSL(color) {
  8459. if (color.hsla.a === 1) {
  8460. return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`;
  8461. }
  8462. return Color2.Format.CSS.formatHSLA(color);
  8463. }
  8464. CSS2.formatHSL = formatHSL;
  8465. function formatHSLA(color) {
  8466. return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`;
  8467. }
  8468. CSS2.formatHSLA = formatHSLA;
  8469. function _toTwoDigitHex(n) {
  8470. const r = n.toString(16);
  8471. return r.length !== 2 ? "0" + r : r;
  8472. }
  8473. function formatHex(color) {
  8474. return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`;
  8475. }
  8476. CSS2.formatHex = formatHex;
  8477. function formatHexA(color, compact = false) {
  8478. if (compact && color.rgba.a === 1) {
  8479. return Color2.Format.CSS.formatHex(color);
  8480. }
  8481. return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`;
  8482. }
  8483. CSS2.formatHexA = formatHexA;
  8484. function format2(color) {
  8485. if (color.isOpaque()) {
  8486. return Color2.Format.CSS.formatHex(color);
  8487. }
  8488. return Color2.Format.CSS.formatRGBA(color);
  8489. }
  8490. CSS2.format = format2;
  8491. function parseHex(hex) {
  8492. const length = hex.length;
  8493. if (length === 0) {
  8494. return null;
  8495. }
  8496. if (hex.charCodeAt(0) !== 35) {
  8497. return null;
  8498. }
  8499. if (length === 7) {
  8500. const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));
  8501. const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));
  8502. const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));
  8503. return new Color2(new RGBA(r, g, b, 1));
  8504. }
  8505. if (length === 9) {
  8506. const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));
  8507. const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));
  8508. const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));
  8509. const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));
  8510. return new Color2(new RGBA(r, g, b, a / 255));
  8511. }
  8512. if (length === 4) {
  8513. const r = _parseHexDigit(hex.charCodeAt(1));
  8514. const g = _parseHexDigit(hex.charCodeAt(2));
  8515. const b = _parseHexDigit(hex.charCodeAt(3));
  8516. return new Color2(new RGBA(16 * r + r, 16 * g + g, 16 * b + b));
  8517. }
  8518. if (length === 5) {
  8519. const r = _parseHexDigit(hex.charCodeAt(1));
  8520. const g = _parseHexDigit(hex.charCodeAt(2));
  8521. const b = _parseHexDigit(hex.charCodeAt(3));
  8522. const a = _parseHexDigit(hex.charCodeAt(4));
  8523. return new Color2(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255));
  8524. }
  8525. return null;
  8526. }
  8527. CSS2.parseHex = parseHex;
  8528. function _parseHexDigit(charCode) {
  8529. switch (charCode) {
  8530. case 48:
  8531. return 0;
  8532. case 49:
  8533. return 1;
  8534. case 50:
  8535. return 2;
  8536. case 51:
  8537. return 3;
  8538. case 52:
  8539. return 4;
  8540. case 53:
  8541. return 5;
  8542. case 54:
  8543. return 6;
  8544. case 55:
  8545. return 7;
  8546. case 56:
  8547. return 8;
  8548. case 57:
  8549. return 9;
  8550. case 97:
  8551. return 10;
  8552. case 65:
  8553. return 10;
  8554. case 98:
  8555. return 11;
  8556. case 66:
  8557. return 11;
  8558. case 99:
  8559. return 12;
  8560. case 67:
  8561. return 12;
  8562. case 100:
  8563. return 13;
  8564. case 68:
  8565. return 13;
  8566. case 101:
  8567. return 14;
  8568. case 69:
  8569. return 14;
  8570. case 102:
  8571. return 15;
  8572. case 70:
  8573. return 15;
  8574. }
  8575. return 0;
  8576. }
  8577. })(CSS = Format2.CSS || (Format2.CSS = {}));
  8578. })(Format = Color2.Format || (Color2.Format = {}));
  8579. })(Color || (Color = {}));
  8580. }
  8581. });
  8582. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js
  8583. init_errors();
  8584. init_event();
  8585. init_lifecycle();
  8586. init_objects();
  8587. init_platform();
  8588. init_strings();
  8589. var INITIALIZE = "$initialize";
  8590. var webWorkerWarningLogged = false;
  8591. function logOnceWebWorkerWarning(err) {
  8592. if (!isWeb) {
  8593. return;
  8594. }
  8595. if (!webWorkerWarningLogged) {
  8596. webWorkerWarningLogged = true;
  8597. console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq");
  8598. }
  8599. console.warn(err.message);
  8600. }
  8601. var RequestMessage = class {
  8602. constructor(vsWorker, req, method, args) {
  8603. this.vsWorker = vsWorker;
  8604. this.req = req;
  8605. this.method = method;
  8606. this.args = args;
  8607. this.type = 0;
  8608. }
  8609. };
  8610. var ReplyMessage = class {
  8611. constructor(vsWorker, seq, res, err) {
  8612. this.vsWorker = vsWorker;
  8613. this.seq = seq;
  8614. this.res = res;
  8615. this.err = err;
  8616. this.type = 1;
  8617. }
  8618. };
  8619. var SubscribeEventMessage = class {
  8620. constructor(vsWorker, req, eventName, arg) {
  8621. this.vsWorker = vsWorker;
  8622. this.req = req;
  8623. this.eventName = eventName;
  8624. this.arg = arg;
  8625. this.type = 2;
  8626. }
  8627. };
  8628. var EventMessage = class {
  8629. constructor(vsWorker, req, event) {
  8630. this.vsWorker = vsWorker;
  8631. this.req = req;
  8632. this.event = event;
  8633. this.type = 3;
  8634. }
  8635. };
  8636. var UnsubscribeEventMessage = class {
  8637. constructor(vsWorker, req) {
  8638. this.vsWorker = vsWorker;
  8639. this.req = req;
  8640. this.type = 4;
  8641. }
  8642. };
  8643. var SimpleWorkerProtocol = class {
  8644. constructor(handler) {
  8645. this._workerId = -1;
  8646. this._handler = handler;
  8647. this._lastSentReq = 0;
  8648. this._pendingReplies = /* @__PURE__ */ Object.create(null);
  8649. this._pendingEmitters = /* @__PURE__ */ new Map();
  8650. this._pendingEvents = /* @__PURE__ */ new Map();
  8651. }
  8652. setWorkerId(workerId) {
  8653. this._workerId = workerId;
  8654. }
  8655. sendMessage(method, args) {
  8656. const req = String(++this._lastSentReq);
  8657. return new Promise((resolve2, reject) => {
  8658. this._pendingReplies[req] = {
  8659. resolve: resolve2,
  8660. reject
  8661. };
  8662. this._send(new RequestMessage(this._workerId, req, method, args));
  8663. });
  8664. }
  8665. listen(eventName, arg) {
  8666. let req = null;
  8667. const emitter = new Emitter({
  8668. onWillAddFirstListener: () => {
  8669. req = String(++this._lastSentReq);
  8670. this._pendingEmitters.set(req, emitter);
  8671. this._send(new SubscribeEventMessage(this._workerId, req, eventName, arg));
  8672. },
  8673. onDidRemoveLastListener: () => {
  8674. this._pendingEmitters.delete(req);
  8675. this._send(new UnsubscribeEventMessage(this._workerId, req));
  8676. req = null;
  8677. }
  8678. });
  8679. return emitter.event;
  8680. }
  8681. handleMessage(message) {
  8682. if (!message || !message.vsWorker) {
  8683. return;
  8684. }
  8685. if (this._workerId !== -1 && message.vsWorker !== this._workerId) {
  8686. return;
  8687. }
  8688. this._handleMessage(message);
  8689. }
  8690. _handleMessage(msg) {
  8691. switch (msg.type) {
  8692. case 1:
  8693. return this._handleReplyMessage(msg);
  8694. case 0:
  8695. return this._handleRequestMessage(msg);
  8696. case 2:
  8697. return this._handleSubscribeEventMessage(msg);
  8698. case 3:
  8699. return this._handleEventMessage(msg);
  8700. case 4:
  8701. return this._handleUnsubscribeEventMessage(msg);
  8702. }
  8703. }
  8704. _handleReplyMessage(replyMessage) {
  8705. if (!this._pendingReplies[replyMessage.seq]) {
  8706. console.warn("Got reply to unknown seq");
  8707. return;
  8708. }
  8709. const reply = this._pendingReplies[replyMessage.seq];
  8710. delete this._pendingReplies[replyMessage.seq];
  8711. if (replyMessage.err) {
  8712. let err = replyMessage.err;
  8713. if (replyMessage.err.$isError) {
  8714. err = new Error();
  8715. err.name = replyMessage.err.name;
  8716. err.message = replyMessage.err.message;
  8717. err.stack = replyMessage.err.stack;
  8718. }
  8719. reply.reject(err);
  8720. return;
  8721. }
  8722. reply.resolve(replyMessage.res);
  8723. }
  8724. _handleRequestMessage(requestMessage) {
  8725. const req = requestMessage.req;
  8726. const result = this._handler.handleMessage(requestMessage.method, requestMessage.args);
  8727. result.then((r) => {
  8728. this._send(new ReplyMessage(this._workerId, req, r, void 0));
  8729. }, (e) => {
  8730. if (e.detail instanceof Error) {
  8731. e.detail = transformErrorForSerialization(e.detail);
  8732. }
  8733. this._send(new ReplyMessage(this._workerId, req, void 0, transformErrorForSerialization(e)));
  8734. });
  8735. }
  8736. _handleSubscribeEventMessage(msg) {
  8737. const req = msg.req;
  8738. const disposable = this._handler.handleEvent(msg.eventName, msg.arg)((event) => {
  8739. this._send(new EventMessage(this._workerId, req, event));
  8740. });
  8741. this._pendingEvents.set(req, disposable);
  8742. }
  8743. _handleEventMessage(msg) {
  8744. if (!this._pendingEmitters.has(msg.req)) {
  8745. console.warn("Got event for unknown req");
  8746. return;
  8747. }
  8748. this._pendingEmitters.get(msg.req).fire(msg.event);
  8749. }
  8750. _handleUnsubscribeEventMessage(msg) {
  8751. if (!this._pendingEvents.has(msg.req)) {
  8752. console.warn("Got unsubscribe for unknown req");
  8753. return;
  8754. }
  8755. this._pendingEvents.get(msg.req).dispose();
  8756. this._pendingEvents.delete(msg.req);
  8757. }
  8758. _send(msg) {
  8759. const transfer = [];
  8760. if (msg.type === 0) {
  8761. for (let i = 0; i < msg.args.length; i++) {
  8762. if (msg.args[i] instanceof ArrayBuffer) {
  8763. transfer.push(msg.args[i]);
  8764. }
  8765. }
  8766. } else if (msg.type === 1) {
  8767. if (msg.res instanceof ArrayBuffer) {
  8768. transfer.push(msg.res);
  8769. }
  8770. }
  8771. this._handler.sendMessage(msg, transfer);
  8772. }
  8773. };
  8774. var SimpleWorkerClient = class extends Disposable {
  8775. constructor(workerFactory, moduleId, host) {
  8776. super();
  8777. let lazyProxyReject = null;
  8778. this._worker = this._register(workerFactory.create("vs/base/common/worker/simpleWorker", (msg) => {
  8779. this._protocol.handleMessage(msg);
  8780. }, (err) => {
  8781. lazyProxyReject === null || lazyProxyReject === void 0 ? void 0 : lazyProxyReject(err);
  8782. }));
  8783. this._protocol = new SimpleWorkerProtocol({
  8784. sendMessage: (msg, transfer) => {
  8785. this._worker.postMessage(msg, transfer);
  8786. },
  8787. handleMessage: (method, args) => {
  8788. if (typeof host[method] !== "function") {
  8789. return Promise.reject(new Error("Missing method " + method + " on main thread host."));
  8790. }
  8791. try {
  8792. return Promise.resolve(host[method].apply(host, args));
  8793. } catch (e) {
  8794. return Promise.reject(e);
  8795. }
  8796. },
  8797. handleEvent: (eventName, arg) => {
  8798. if (propertyIsDynamicEvent(eventName)) {
  8799. const event = host[eventName].call(host, arg);
  8800. if (typeof event !== "function") {
  8801. throw new Error(`Missing dynamic event ${eventName} on main thread host.`);
  8802. }
  8803. return event;
  8804. }
  8805. if (propertyIsEvent(eventName)) {
  8806. const event = host[eventName];
  8807. if (typeof event !== "function") {
  8808. throw new Error(`Missing event ${eventName} on main thread host.`);
  8809. }
  8810. return event;
  8811. }
  8812. throw new Error(`Malformed event name ${eventName}`);
  8813. }
  8814. });
  8815. this._protocol.setWorkerId(this._worker.getId());
  8816. let loaderConfiguration = null;
  8817. const globalRequire = globalThis.require;
  8818. if (typeof globalRequire !== "undefined" && typeof globalRequire.getConfig === "function") {
  8819. loaderConfiguration = globalRequire.getConfig();
  8820. } else if (typeof globalThis.requirejs !== "undefined") {
  8821. loaderConfiguration = globalThis.requirejs.s.contexts._.config;
  8822. }
  8823. const hostMethods = getAllMethodNames(host);
  8824. this._onModuleLoaded = this._protocol.sendMessage(INITIALIZE, [
  8825. this._worker.getId(),
  8826. JSON.parse(JSON.stringify(loaderConfiguration)),
  8827. moduleId,
  8828. hostMethods
  8829. ]);
  8830. const proxyMethodRequest = (method, args) => {
  8831. return this._request(method, args);
  8832. };
  8833. const proxyListen = (eventName, arg) => {
  8834. return this._protocol.listen(eventName, arg);
  8835. };
  8836. this._lazyProxy = new Promise((resolve2, reject) => {
  8837. lazyProxyReject = reject;
  8838. this._onModuleLoaded.then((availableMethods) => {
  8839. resolve2(createProxyObject2(availableMethods, proxyMethodRequest, proxyListen));
  8840. }, (e) => {
  8841. reject(e);
  8842. this._onError("Worker failed to load " + moduleId, e);
  8843. });
  8844. });
  8845. }
  8846. getProxyObject() {
  8847. return this._lazyProxy;
  8848. }
  8849. _request(method, args) {
  8850. return new Promise((resolve2, reject) => {
  8851. this._onModuleLoaded.then(() => {
  8852. this._protocol.sendMessage(method, args).then(resolve2, reject);
  8853. }, reject);
  8854. });
  8855. }
  8856. _onError(message, error) {
  8857. console.error(message);
  8858. console.info(error);
  8859. }
  8860. };
  8861. function propertyIsEvent(name) {
  8862. return name[0] === "o" && name[1] === "n" && isUpperAsciiLetter(name.charCodeAt(2));
  8863. }
  8864. function propertyIsDynamicEvent(name) {
  8865. return /^onDynamic/.test(name) && isUpperAsciiLetter(name.charCodeAt(9));
  8866. }
  8867. function createProxyObject2(methodNames, invoke, proxyListen) {
  8868. const createProxyMethod = (method) => {
  8869. return function() {
  8870. const args = Array.prototype.slice.call(arguments, 0);
  8871. return invoke(method, args);
  8872. };
  8873. };
  8874. const createProxyDynamicEvent = (eventName) => {
  8875. return function(arg) {
  8876. return proxyListen(eventName, arg);
  8877. };
  8878. };
  8879. const result = {};
  8880. for (const methodName of methodNames) {
  8881. if (propertyIsDynamicEvent(methodName)) {
  8882. result[methodName] = createProxyDynamicEvent(methodName);
  8883. continue;
  8884. }
  8885. if (propertyIsEvent(methodName)) {
  8886. result[methodName] = proxyListen(methodName, void 0);
  8887. continue;
  8888. }
  8889. result[methodName] = createProxyMethod(methodName);
  8890. }
  8891. return result;
  8892. }
  8893. var SimpleWorkerServer = class {
  8894. constructor(postMessage, requestHandlerFactory) {
  8895. this._requestHandlerFactory = requestHandlerFactory;
  8896. this._requestHandler = null;
  8897. this._protocol = new SimpleWorkerProtocol({
  8898. sendMessage: (msg, transfer) => {
  8899. postMessage(msg, transfer);
  8900. },
  8901. handleMessage: (method, args) => this._handleMessage(method, args),
  8902. handleEvent: (eventName, arg) => this._handleEvent(eventName, arg)
  8903. });
  8904. }
  8905. onmessage(msg) {
  8906. this._protocol.handleMessage(msg);
  8907. }
  8908. _handleMessage(method, args) {
  8909. if (method === INITIALIZE) {
  8910. return this.initialize(args[0], args[1], args[2], args[3]);
  8911. }
  8912. if (!this._requestHandler || typeof this._requestHandler[method] !== "function") {
  8913. return Promise.reject(new Error("Missing requestHandler or method: " + method));
  8914. }
  8915. try {
  8916. return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args));
  8917. } catch (e) {
  8918. return Promise.reject(e);
  8919. }
  8920. }
  8921. _handleEvent(eventName, arg) {
  8922. if (!this._requestHandler) {
  8923. throw new Error(`Missing requestHandler`);
  8924. }
  8925. if (propertyIsDynamicEvent(eventName)) {
  8926. const event = this._requestHandler[eventName].call(this._requestHandler, arg);
  8927. if (typeof event !== "function") {
  8928. throw new Error(`Missing dynamic event ${eventName} on request handler.`);
  8929. }
  8930. return event;
  8931. }
  8932. if (propertyIsEvent(eventName)) {
  8933. const event = this._requestHandler[eventName];
  8934. if (typeof event !== "function") {
  8935. throw new Error(`Missing event ${eventName} on request handler.`);
  8936. }
  8937. return event;
  8938. }
  8939. throw new Error(`Malformed event name ${eventName}`);
  8940. }
  8941. initialize(workerId, loaderConfig, moduleId, hostMethods) {
  8942. this._protocol.setWorkerId(workerId);
  8943. const proxyMethodRequest = (method, args) => {
  8944. return this._protocol.sendMessage(method, args);
  8945. };
  8946. const proxyListen = (eventName, arg) => {
  8947. return this._protocol.listen(eventName, arg);
  8948. };
  8949. const hostProxy = createProxyObject2(hostMethods, proxyMethodRequest, proxyListen);
  8950. if (this._requestHandlerFactory) {
  8951. this._requestHandler = this._requestHandlerFactory(hostProxy);
  8952. return Promise.resolve(getAllMethodNames(this._requestHandler));
  8953. }
  8954. if (loaderConfig) {
  8955. if (typeof loaderConfig.baseUrl !== "undefined") {
  8956. delete loaderConfig["baseUrl"];
  8957. }
  8958. if (typeof loaderConfig.paths !== "undefined") {
  8959. if (typeof loaderConfig.paths.vs !== "undefined") {
  8960. delete loaderConfig.paths["vs"];
  8961. }
  8962. }
  8963. if (typeof loaderConfig.trustedTypesPolicy !== void 0) {
  8964. delete loaderConfig["trustedTypesPolicy"];
  8965. }
  8966. loaderConfig.catchError = true;
  8967. globalThis.require.config(loaderConfig);
  8968. }
  8969. return new Promise((resolve2, reject) => {
  8970. const req = globalThis.require;
  8971. req([moduleId], (module) => {
  8972. this._requestHandler = module.create(hostProxy);
  8973. if (!this._requestHandler) {
  8974. reject(new Error(`No RequestHandler!`));
  8975. return;
  8976. }
  8977. resolve2(getAllMethodNames(this._requestHandler));
  8978. }, reject);
  8979. });
  8980. }
  8981. };
  8982. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js
  8983. var DiffChange = class {
  8984. /**
  8985. * Constructs a new DiffChange with the given sequence information
  8986. * and content.
  8987. */
  8988. constructor(originalStart, originalLength, modifiedStart, modifiedLength) {
  8989. this.originalStart = originalStart;
  8990. this.originalLength = originalLength;
  8991. this.modifiedStart = modifiedStart;
  8992. this.modifiedLength = modifiedLength;
  8993. }
  8994. /**
  8995. * The end point (exclusive) of the change in the original sequence.
  8996. */
  8997. getOriginalEnd() {
  8998. return this.originalStart + this.originalLength;
  8999. }
  9000. /**
  9001. * The end point (exclusive) of the change in the modified sequence.
  9002. */
  9003. getModifiedEnd() {
  9004. return this.modifiedStart + this.modifiedLength;
  9005. }
  9006. };
  9007. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/base/common/diff/diff.js
  9008. init_hash();
  9009. var StringDiffSequence = class {
  9010. constructor(source) {
  9011. this.source = source;
  9012. }
  9013. getElements() {
  9014. const source = this.source;
  9015. const characters = new Int32Array(source.length);
  9016. for (let i = 0, len = source.length; i < len; i++) {
  9017. characters[i] = source.charCodeAt(i);
  9018. }
  9019. return characters;
  9020. }
  9021. };
  9022. function stringDiff(original, modified, pretty) {
  9023. return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes;
  9024. }
  9025. var Debug = class {
  9026. static Assert(condition, message) {
  9027. if (!condition) {
  9028. throw new Error(message);
  9029. }
  9030. }
  9031. };
  9032. var MyArray = class {
  9033. /**
  9034. * Copies a range of elements from an Array starting at the specified source index and pastes
  9035. * them to another Array starting at the specified destination index. The length and the indexes
  9036. * are specified as 64-bit integers.
  9037. * sourceArray:
  9038. * The Array that contains the data to copy.
  9039. * sourceIndex:
  9040. * A 64-bit integer that represents the index in the sourceArray at which copying begins.
  9041. * destinationArray:
  9042. * The Array that receives the data.
  9043. * destinationIndex:
  9044. * A 64-bit integer that represents the index in the destinationArray at which storing begins.
  9045. * length:
  9046. * A 64-bit integer that represents the number of elements to copy.
  9047. */
  9048. static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {
  9049. for (let i = 0; i < length; i++) {
  9050. destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];
  9051. }
  9052. }
  9053. static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {
  9054. for (let i = 0; i < length; i++) {
  9055. destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];
  9056. }
  9057. }
  9058. };
  9059. var DiffChangeHelper = class {
  9060. /**
  9061. * Constructs a new DiffChangeHelper for the given DiffSequences.
  9062. */
  9063. constructor() {
  9064. this.m_changes = [];
  9065. this.m_originalStart = 1073741824;
  9066. this.m_modifiedStart = 1073741824;
  9067. this.m_originalCount = 0;
  9068. this.m_modifiedCount = 0;
  9069. }
  9070. /**
  9071. * Marks the beginning of the next change in the set of differences.
  9072. */
  9073. MarkNextChange() {
  9074. if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {
  9075. this.m_changes.push(new DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount));
  9076. }
  9077. this.m_originalCount = 0;
  9078. this.m_modifiedCount = 0;
  9079. this.m_originalStart = 1073741824;
  9080. this.m_modifiedStart = 1073741824;
  9081. }
  9082. /**
  9083. * Adds the original element at the given position to the elements
  9084. * affected by the current change. The modified index gives context
  9085. * to the change position with respect to the original sequence.
  9086. * @param originalIndex The index of the original element to add.
  9087. * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence.
  9088. */
  9089. AddOriginalElement(originalIndex, modifiedIndex) {
  9090. this.m_originalStart = Math.min(this.m_originalStart, originalIndex);
  9091. this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);
  9092. this.m_originalCount++;
  9093. }
  9094. /**
  9095. * Adds the modified element at the given position to the elements
  9096. * affected by the current change. The original index gives context
  9097. * to the change position with respect to the modified sequence.
  9098. * @param originalIndex The index of the original element that provides corresponding position in the original sequence.
  9099. * @param modifiedIndex The index of the modified element to add.
  9100. */
  9101. AddModifiedElement(originalIndex, modifiedIndex) {
  9102. this.m_originalStart = Math.min(this.m_originalStart, originalIndex);
  9103. this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);
  9104. this.m_modifiedCount++;
  9105. }
  9106. /**
  9107. * Retrieves all of the changes marked by the class.
  9108. */
  9109. getChanges() {
  9110. if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {
  9111. this.MarkNextChange();
  9112. }
  9113. return this.m_changes;
  9114. }
  9115. /**
  9116. * Retrieves all of the changes marked by the class in the reverse order
  9117. */
  9118. getReverseChanges() {
  9119. if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {
  9120. this.MarkNextChange();
  9121. }
  9122. this.m_changes.reverse();
  9123. return this.m_changes;
  9124. }
  9125. };
  9126. var LcsDiff = class _LcsDiff {
  9127. /**
  9128. * Constructs the DiffFinder
  9129. */
  9130. constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) {
  9131. this.ContinueProcessingPredicate = continueProcessingPredicate;
  9132. this._originalSequence = originalSequence;
  9133. this._modifiedSequence = modifiedSequence;
  9134. const [originalStringElements, originalElementsOrHash, originalHasStrings] = _LcsDiff._getElements(originalSequence);
  9135. const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = _LcsDiff._getElements(modifiedSequence);
  9136. this._hasStrings = originalHasStrings && modifiedHasStrings;
  9137. this._originalStringElements = originalStringElements;
  9138. this._originalElementsOrHash = originalElementsOrHash;
  9139. this._modifiedStringElements = modifiedStringElements;
  9140. this._modifiedElementsOrHash = modifiedElementsOrHash;
  9141. this.m_forwardHistory = [];
  9142. this.m_reverseHistory = [];
  9143. }
  9144. static _isStringArray(arr) {
  9145. return arr.length > 0 && typeof arr[0] === "string";
  9146. }
  9147. static _getElements(sequence) {
  9148. const elements = sequence.getElements();
  9149. if (_LcsDiff._isStringArray(elements)) {
  9150. const hashes = new Int32Array(elements.length);
  9151. for (let i = 0, len = elements.length; i < len; i++) {
  9152. hashes[i] = stringHash(elements[i], 0);
  9153. }
  9154. return [elements, hashes, true];
  9155. }
  9156. if (elements instanceof Int32Array) {
  9157. return [[], elements, false];
  9158. }
  9159. return [[], new Int32Array(elements), false];
  9160. }
  9161. ElementsAreEqual(originalIndex, newIndex) {
  9162. if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) {
  9163. return false;
  9164. }
  9165. return this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true;
  9166. }
  9167. ElementsAreStrictEqual(originalIndex, newIndex) {
  9168. if (!this.ElementsAreEqual(originalIndex, newIndex)) {
  9169. return false;
  9170. }
  9171. const originalElement = _LcsDiff._getStrictElement(this._originalSequence, originalIndex);
  9172. const modifiedElement = _LcsDiff._getStrictElement(this._modifiedSequence, newIndex);
  9173. return originalElement === modifiedElement;
  9174. }
  9175. static _getStrictElement(sequence, index) {
  9176. if (typeof sequence.getStrictElement === "function") {
  9177. return sequence.getStrictElement(index);
  9178. }
  9179. return null;
  9180. }
  9181. OriginalElementsAreEqual(index1, index2) {
  9182. if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) {
  9183. return false;
  9184. }
  9185. return this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true;
  9186. }
  9187. ModifiedElementsAreEqual(index1, index2) {
  9188. if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) {
  9189. return false;
  9190. }
  9191. return this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true;
  9192. }
  9193. ComputeDiff(pretty) {
  9194. return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty);
  9195. }
  9196. /**
  9197. * Computes the differences between the original and modified input
  9198. * sequences on the bounded range.
  9199. * @returns An array of the differences between the two input sequences.
  9200. */
  9201. _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) {
  9202. const quitEarlyArr = [false];
  9203. let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr);
  9204. if (pretty) {
  9205. changes = this.PrettifyChanges(changes);
  9206. }
  9207. return {
  9208. quitEarly: quitEarlyArr[0],
  9209. changes
  9210. };
  9211. }
  9212. /**
  9213. * Private helper method which computes the differences on the bounded range
  9214. * recursively.
  9215. * @returns An array of the differences between the two input sequences.
  9216. */
  9217. ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) {
  9218. quitEarlyArr[0] = false;
  9219. while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) {
  9220. originalStart++;
  9221. modifiedStart++;
  9222. }
  9223. while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) {
  9224. originalEnd--;
  9225. modifiedEnd--;
  9226. }
  9227. if (originalStart > originalEnd || modifiedStart > modifiedEnd) {
  9228. let changes;
  9229. if (modifiedStart <= modifiedEnd) {
  9230. Debug.Assert(originalStart === originalEnd + 1, "originalStart should only be one more than originalEnd");
  9231. changes = [
  9232. new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1)
  9233. ];
  9234. } else if (originalStart <= originalEnd) {
  9235. Debug.Assert(modifiedStart === modifiedEnd + 1, "modifiedStart should only be one more than modifiedEnd");
  9236. changes = [
  9237. new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0)
  9238. ];
  9239. } else {
  9240. Debug.Assert(originalStart === originalEnd + 1, "originalStart should only be one more than originalEnd");
  9241. Debug.Assert(modifiedStart === modifiedEnd + 1, "modifiedStart should only be one more than modifiedEnd");
  9242. changes = [];
  9243. }
  9244. return changes;
  9245. }
  9246. const midOriginalArr = [0];
  9247. const midModifiedArr = [0];
  9248. const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr);
  9249. const midOriginal = midOriginalArr[0];
  9250. const midModified = midModifiedArr[0];
  9251. if (result !== null) {
  9252. return result;
  9253. } else if (!quitEarlyArr[0]) {
  9254. const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr);
  9255. let rightChanges = [];
  9256. if (!quitEarlyArr[0]) {
  9257. rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr);
  9258. } else {
  9259. rightChanges = [
  9260. new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1)
  9261. ];
  9262. }
  9263. return this.ConcatenateChanges(leftChanges, rightChanges);
  9264. }
  9265. return [
  9266. new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)
  9267. ];
  9268. }
  9269. WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) {
  9270. let forwardChanges = null;
  9271. let reverseChanges = null;
  9272. let changeHelper = new DiffChangeHelper();
  9273. let diagonalMin = diagonalForwardStart;
  9274. let diagonalMax = diagonalForwardEnd;
  9275. let diagonalRelative = midOriginalArr[0] - midModifiedArr[0] - diagonalForwardOffset;
  9276. let lastOriginalIndex = -1073741824;
  9277. let historyIndex = this.m_forwardHistory.length - 1;
  9278. do {
  9279. const diagonal = diagonalRelative + diagonalForwardBase;
  9280. if (diagonal === diagonalMin || diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) {
  9281. originalIndex = forwardPoints[diagonal + 1];
  9282. modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;
  9283. if (originalIndex < lastOriginalIndex) {
  9284. changeHelper.MarkNextChange();
  9285. }
  9286. lastOriginalIndex = originalIndex;
  9287. changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);
  9288. diagonalRelative = diagonal + 1 - diagonalForwardBase;
  9289. } else {
  9290. originalIndex = forwardPoints[diagonal - 1] + 1;
  9291. modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;
  9292. if (originalIndex < lastOriginalIndex) {
  9293. changeHelper.MarkNextChange();
  9294. }
  9295. lastOriginalIndex = originalIndex - 1;
  9296. changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1);
  9297. diagonalRelative = diagonal - 1 - diagonalForwardBase;
  9298. }
  9299. if (historyIndex >= 0) {
  9300. forwardPoints = this.m_forwardHistory[historyIndex];
  9301. diagonalForwardBase = forwardPoints[0];
  9302. diagonalMin = 1;
  9303. diagonalMax = forwardPoints.length - 1;
  9304. }
  9305. } while (--historyIndex >= -1);
  9306. forwardChanges = changeHelper.getReverseChanges();
  9307. if (quitEarlyArr[0]) {
  9308. let originalStartPoint = midOriginalArr[0] + 1;
  9309. let modifiedStartPoint = midModifiedArr[0] + 1;
  9310. if (forwardChanges !== null && forwardChanges.length > 0) {
  9311. const lastForwardChange = forwardChanges[forwardChanges.length - 1];
  9312. originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd());
  9313. modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd());
  9314. }
  9315. reverseChanges = [
  9316. new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)
  9317. ];
  9318. } else {
  9319. changeHelper = new DiffChangeHelper();
  9320. diagonalMin = diagonalReverseStart;
  9321. diagonalMax = diagonalReverseEnd;
  9322. diagonalRelative = midOriginalArr[0] - midModifiedArr[0] - diagonalReverseOffset;
  9323. lastOriginalIndex = 1073741824;
  9324. historyIndex = deltaIsEven ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;
  9325. do {
  9326. const diagonal = diagonalRelative + diagonalReverseBase;
  9327. if (diagonal === diagonalMin || diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1]) {
  9328. originalIndex = reversePoints[diagonal + 1] - 1;
  9329. modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;
  9330. if (originalIndex > lastOriginalIndex) {
  9331. changeHelper.MarkNextChange();
  9332. }
  9333. lastOriginalIndex = originalIndex + 1;
  9334. changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1);
  9335. diagonalRelative = diagonal + 1 - diagonalReverseBase;
  9336. } else {
  9337. originalIndex = reversePoints[diagonal - 1];
  9338. modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;
  9339. if (originalIndex > lastOriginalIndex) {
  9340. changeHelper.MarkNextChange();
  9341. }
  9342. lastOriginalIndex = originalIndex;
  9343. changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1);
  9344. diagonalRelative = diagonal - 1 - diagonalReverseBase;
  9345. }
  9346. if (historyIndex >= 0) {
  9347. reversePoints = this.m_reverseHistory[historyIndex];
  9348. diagonalReverseBase = reversePoints[0];
  9349. diagonalMin = 1;
  9350. diagonalMax = reversePoints.length - 1;
  9351. }
  9352. } while (--historyIndex >= -1);
  9353. reverseChanges = changeHelper.getChanges();
  9354. }
  9355. return this.ConcatenateChanges(forwardChanges, reverseChanges);
  9356. }
  9357. /**
  9358. * Given the range to compute the diff on, this method finds the point:
  9359. * (midOriginal, midModified)
  9360. * that exists in the middle of the LCS of the two sequences and
  9361. * is the point at which the LCS problem may be broken down recursively.
  9362. * This method will try to keep the LCS trace in memory. If the LCS recursion
  9363. * point is calculated and the full trace is available in memory, then this method
  9364. * will return the change list.
  9365. * @param originalStart The start bound of the original sequence range
  9366. * @param originalEnd The end bound of the original sequence range
  9367. * @param modifiedStart The start bound of the modified sequence range
  9368. * @param modifiedEnd The end bound of the modified sequence range
  9369. * @param midOriginal The middle point of the original sequence range
  9370. * @param midModified The middle point of the modified sequence range
  9371. * @returns The diff changes, if available, otherwise null
  9372. */
  9373. ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) {
  9374. let originalIndex = 0, modifiedIndex = 0;
  9375. let diagonalForwardStart = 0, diagonalForwardEnd = 0;
  9376. let diagonalReverseStart = 0, diagonalReverseEnd = 0;
  9377. originalStart--;
  9378. modifiedStart--;
  9379. midOriginalArr[0] = 0;
  9380. midModifiedArr[0] = 0;
  9381. this.m_forwardHistory = [];
  9382. this.m_reverseHistory = [];
  9383. const maxDifferences = originalEnd - originalStart + (modifiedEnd - modifiedStart);
  9384. const numDiagonals = maxDifferences + 1;
  9385. const forwardPoints = new Int32Array(numDiagonals);
  9386. const reversePoints = new Int32Array(numDiagonals);
  9387. const diagonalForwardBase = modifiedEnd - modifiedStart;
  9388. const diagonalReverseBase = originalEnd - originalStart;
  9389. const diagonalForwardOffset = originalStart - modifiedStart;
  9390. const diagonalReverseOffset = originalEnd - modifiedEnd;
  9391. const delta = diagonalReverseBase - diagonalForwardBase;
  9392. const deltaIsEven = delta % 2 === 0;
  9393. forwardPoints[diagonalForwardBase] = originalStart;
  9394. reversePoints[diagonalReverseBase] = originalEnd;
  9395. quitEarlyArr[0] = false;
  9396. for (let numDifferences = 1; numDifferences <= maxDifferences / 2 + 1; numDifferences++) {
  9397. let furthestOriginalIndex = 0;
  9398. let furthestModifiedIndex = 0;
  9399. diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals);
  9400. diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals);
  9401. for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) {
  9402. if (diagonal === diagonalForwardStart || diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) {
  9403. originalIndex = forwardPoints[diagonal + 1];
  9404. } else {
  9405. originalIndex = forwardPoints[diagonal - 1] + 1;
  9406. }
  9407. modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset;
  9408. const tempOriginalIndex = originalIndex;
  9409. while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) {
  9410. originalIndex++;
  9411. modifiedIndex++;
  9412. }
  9413. forwardPoints[diagonal] = originalIndex;
  9414. if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) {
  9415. furthestOriginalIndex = originalIndex;
  9416. furthestModifiedIndex = modifiedIndex;
  9417. }
  9418. if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= numDifferences - 1) {
  9419. if (originalIndex >= reversePoints[diagonal]) {
  9420. midOriginalArr[0] = originalIndex;
  9421. midModifiedArr[0] = modifiedIndex;
  9422. if (tempOriginalIndex <= reversePoints[diagonal] && 1447 > 0 && numDifferences <= 1447 + 1) {
  9423. return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);
  9424. } else {
  9425. return null;
  9426. }
  9427. }
  9428. }
  9429. }
  9430. const matchLengthOfLongest = (furthestOriginalIndex - originalStart + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2;
  9431. if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) {
  9432. quitEarlyArr[0] = true;
  9433. midOriginalArr[0] = furthestOriginalIndex;
  9434. midModifiedArr[0] = furthestModifiedIndex;
  9435. if (matchLengthOfLongest > 0 && 1447 > 0 && numDifferences <= 1447 + 1) {
  9436. return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);
  9437. } else {
  9438. originalStart++;
  9439. modifiedStart++;
  9440. return [
  9441. new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)
  9442. ];
  9443. }
  9444. }
  9445. diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals);
  9446. diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals);
  9447. for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) {
  9448. if (diagonal === diagonalReverseStart || diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1]) {
  9449. originalIndex = reversePoints[diagonal + 1] - 1;
  9450. } else {
  9451. originalIndex = reversePoints[diagonal - 1];
  9452. }
  9453. modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset;
  9454. const tempOriginalIndex = originalIndex;
  9455. while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) {
  9456. originalIndex--;
  9457. modifiedIndex--;
  9458. }
  9459. reversePoints[diagonal] = originalIndex;
  9460. if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) {
  9461. if (originalIndex <= forwardPoints[diagonal]) {
  9462. midOriginalArr[0] = originalIndex;
  9463. midModifiedArr[0] = modifiedIndex;
  9464. if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 > 0 && numDifferences <= 1447 + 1) {
  9465. return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);
  9466. } else {
  9467. return null;
  9468. }
  9469. }
  9470. }
  9471. }
  9472. if (numDifferences <= 1447) {
  9473. let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2);
  9474. temp[0] = diagonalForwardBase - diagonalForwardStart + 1;
  9475. MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1);
  9476. this.m_forwardHistory.push(temp);
  9477. temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2);
  9478. temp[0] = diagonalReverseBase - diagonalReverseStart + 1;
  9479. MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1);
  9480. this.m_reverseHistory.push(temp);
  9481. }
  9482. }
  9483. return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);
  9484. }
  9485. /**
  9486. * Shifts the given changes to provide a more intuitive diff.
  9487. * While the first element in a diff matches the first element after the diff,
  9488. * we shift the diff down.
  9489. *
  9490. * @param changes The list of changes to shift
  9491. * @returns The shifted changes
  9492. */
  9493. PrettifyChanges(changes) {
  9494. for (let i = 0; i < changes.length; i++) {
  9495. const change = changes[i];
  9496. const originalStop = i < changes.length - 1 ? changes[i + 1].originalStart : this._originalElementsOrHash.length;
  9497. const modifiedStop = i < changes.length - 1 ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length;
  9498. const checkOriginal = change.originalLength > 0;
  9499. const checkModified = change.modifiedLength > 0;
  9500. while (change.originalStart + change.originalLength < originalStop && change.modifiedStart + change.modifiedLength < modifiedStop && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) {
  9501. const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart);
  9502. const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength);
  9503. if (endStrictEqual && !startStrictEqual) {
  9504. break;
  9505. }
  9506. change.originalStart++;
  9507. change.modifiedStart++;
  9508. }
  9509. const mergedChangeArr = [null];
  9510. if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) {
  9511. changes[i] = mergedChangeArr[0];
  9512. changes.splice(i + 1, 1);
  9513. i--;
  9514. continue;
  9515. }
  9516. }
  9517. for (let i = changes.length - 1; i >= 0; i--) {
  9518. const change = changes[i];
  9519. let originalStop = 0;
  9520. let modifiedStop = 0;
  9521. if (i > 0) {
  9522. const prevChange = changes[i - 1];
  9523. originalStop = prevChange.originalStart + prevChange.originalLength;
  9524. modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength;
  9525. }
  9526. const checkOriginal = change.originalLength > 0;
  9527. const checkModified = change.modifiedLength > 0;
  9528. let bestDelta = 0;
  9529. let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength);
  9530. for (let delta = 1; ; delta++) {
  9531. const originalStart = change.originalStart - delta;
  9532. const modifiedStart = change.modifiedStart - delta;
  9533. if (originalStart < originalStop || modifiedStart < modifiedStop) {
  9534. break;
  9535. }
  9536. if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) {
  9537. break;
  9538. }
  9539. if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) {
  9540. break;
  9541. }
  9542. const touchingPreviousChange = originalStart === originalStop && modifiedStart === modifiedStop;
  9543. const score2 = (touchingPreviousChange ? 5 : 0) + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength);
  9544. if (score2 > bestScore) {
  9545. bestScore = score2;
  9546. bestDelta = delta;
  9547. }
  9548. }
  9549. change.originalStart -= bestDelta;
  9550. change.modifiedStart -= bestDelta;
  9551. const mergedChangeArr = [null];
  9552. if (i > 0 && this.ChangesOverlap(changes[i - 1], changes[i], mergedChangeArr)) {
  9553. changes[i - 1] = mergedChangeArr[0];
  9554. changes.splice(i, 1);
  9555. i++;
  9556. continue;
  9557. }
  9558. }
  9559. if (this._hasStrings) {
  9560. for (let i = 1, len = changes.length; i < len; i++) {
  9561. const aChange = changes[i - 1];
  9562. const bChange = changes[i];
  9563. const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength;
  9564. const aOriginalStart = aChange.originalStart;
  9565. const bOriginalEnd = bChange.originalStart + bChange.originalLength;
  9566. const abOriginalLength = bOriginalEnd - aOriginalStart;
  9567. const aModifiedStart = aChange.modifiedStart;
  9568. const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength;
  9569. const abModifiedLength = bModifiedEnd - aModifiedStart;
  9570. if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) {
  9571. const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength);
  9572. if (t) {
  9573. const [originalMatchStart, modifiedMatchStart] = t;
  9574. if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) {
  9575. aChange.originalLength = originalMatchStart - aChange.originalStart;
  9576. aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart;
  9577. bChange.originalStart = originalMatchStart + matchedLength;
  9578. bChange.modifiedStart = modifiedMatchStart + matchedLength;
  9579. bChange.originalLength = bOriginalEnd - bChange.originalStart;
  9580. bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart;
  9581. }
  9582. }
  9583. }
  9584. }
  9585. }
  9586. return changes;
  9587. }
  9588. _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) {
  9589. if (originalLength < desiredLength || modifiedLength < desiredLength) {
  9590. return null;
  9591. }
  9592. const originalMax = originalStart + originalLength - desiredLength + 1;
  9593. const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1;
  9594. let bestScore = 0;
  9595. let bestOriginalStart = 0;
  9596. let bestModifiedStart = 0;
  9597. for (let i = originalStart; i < originalMax; i++) {
  9598. for (let j = modifiedStart; j < modifiedMax; j++) {
  9599. const score2 = this._contiguousSequenceScore(i, j, desiredLength);
  9600. if (score2 > 0 && score2 > bestScore) {
  9601. bestScore = score2;
  9602. bestOriginalStart = i;
  9603. bestModifiedStart = j;
  9604. }
  9605. }
  9606. }
  9607. if (bestScore > 0) {
  9608. return [bestOriginalStart, bestModifiedStart];
  9609. }
  9610. return null;
  9611. }
  9612. _contiguousSequenceScore(originalStart, modifiedStart, length) {
  9613. let score2 = 0;
  9614. for (let l = 0; l < length; l++) {
  9615. if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) {
  9616. return 0;
  9617. }
  9618. score2 += this._originalStringElements[originalStart + l].length;
  9619. }
  9620. return score2;
  9621. }
  9622. _OriginalIsBoundary(index) {
  9623. if (index <= 0 || index >= this._originalElementsOrHash.length - 1) {
  9624. return true;
  9625. }
  9626. return this._hasStrings && /^\s*$/.test(this._originalStringElements[index]);
  9627. }
  9628. _OriginalRegionIsBoundary(originalStart, originalLength) {
  9629. if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) {
  9630. return true;
  9631. }
  9632. if (originalLength > 0) {
  9633. const originalEnd = originalStart + originalLength;
  9634. if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) {
  9635. return true;
  9636. }
  9637. }
  9638. return false;
  9639. }
  9640. _ModifiedIsBoundary(index) {
  9641. if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) {
  9642. return true;
  9643. }
  9644. return this._hasStrings && /^\s*$/.test(this._modifiedStringElements[index]);
  9645. }
  9646. _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) {
  9647. if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) {
  9648. return true;
  9649. }
  9650. if (modifiedLength > 0) {
  9651. const modifiedEnd = modifiedStart + modifiedLength;
  9652. if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) {
  9653. return true;
  9654. }
  9655. }
  9656. return false;
  9657. }
  9658. _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) {
  9659. const originalScore = this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0;
  9660. const modifiedScore = this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0;
  9661. return originalScore + modifiedScore;
  9662. }
  9663. /**
  9664. * Concatenates the two input DiffChange lists and returns the resulting
  9665. * list.
  9666. * @param The left changes
  9667. * @param The right changes
  9668. * @returns The concatenated list
  9669. */
  9670. ConcatenateChanges(left, right) {
  9671. const mergedChangeArr = [];
  9672. if (left.length === 0 || right.length === 0) {
  9673. return right.length > 0 ? right : left;
  9674. } else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) {
  9675. const result = new Array(left.length + right.length - 1);
  9676. MyArray.Copy(left, 0, result, 0, left.length - 1);
  9677. result[left.length - 1] = mergedChangeArr[0];
  9678. MyArray.Copy(right, 1, result, left.length, right.length - 1);
  9679. return result;
  9680. } else {
  9681. const result = new Array(left.length + right.length);
  9682. MyArray.Copy(left, 0, result, 0, left.length);
  9683. MyArray.Copy(right, 0, result, left.length, right.length);
  9684. return result;
  9685. }
  9686. }
  9687. /**
  9688. * Returns true if the two changes overlap and can be merged into a single
  9689. * change
  9690. * @param left The left change
  9691. * @param right The right change
  9692. * @param mergedChange The merged change if the two overlap, null otherwise
  9693. * @returns True if the two changes overlap
  9694. */
  9695. ChangesOverlap(left, right, mergedChangeArr) {
  9696. Debug.Assert(left.originalStart <= right.originalStart, "Left change is not less than or equal to right change");
  9697. Debug.Assert(left.modifiedStart <= right.modifiedStart, "Left change is not less than or equal to right change");
  9698. if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) {
  9699. const originalStart = left.originalStart;
  9700. let originalLength = left.originalLength;
  9701. const modifiedStart = left.modifiedStart;
  9702. let modifiedLength = left.modifiedLength;
  9703. if (left.originalStart + left.originalLength >= right.originalStart) {
  9704. originalLength = right.originalStart + right.originalLength - left.originalStart;
  9705. }
  9706. if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) {
  9707. modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart;
  9708. }
  9709. mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength);
  9710. return true;
  9711. } else {
  9712. mergedChangeArr[0] = null;
  9713. return false;
  9714. }
  9715. }
  9716. /**
  9717. * Helper method used to clip a diagonal index to the range of valid
  9718. * diagonals. This also decides whether or not the diagonal index,
  9719. * if it exceeds the boundary, should be clipped to the boundary or clipped
  9720. * one inside the boundary depending on the Even/Odd status of the boundary
  9721. * and numDifferences.
  9722. * @param diagonal The index of the diagonal to clip.
  9723. * @param numDifferences The current number of differences being iterated upon.
  9724. * @param diagonalBaseIndex The base reference diagonal.
  9725. * @param numDiagonals The total number of diagonals.
  9726. * @returns The clipped diagonal index.
  9727. */
  9728. ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) {
  9729. if (diagonal >= 0 && diagonal < numDiagonals) {
  9730. return diagonal;
  9731. }
  9732. const diagonalsBelow = diagonalBaseIndex;
  9733. const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1;
  9734. const diffEven = numDifferences % 2 === 0;
  9735. if (diagonal < 0) {
  9736. const lowerBoundEven = diagonalsBelow % 2 === 0;
  9737. return diffEven === lowerBoundEven ? 0 : 1;
  9738. } else {
  9739. const upperBoundEven = diagonalsAbove % 2 === 0;
  9740. return diffEven === upperBoundEven ? numDiagonals - 1 : numDiagonals - 2;
  9741. }
  9742. }
  9743. };
  9744. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
  9745. init_uri();
  9746. init_position();
  9747. init_range();
  9748. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js
  9749. init_strings();
  9750. init_position();
  9751. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model/prefixSumComputer.js
  9752. init_arrays();
  9753. init_uint();
  9754. var PrefixSumComputer = class {
  9755. constructor(values) {
  9756. this.values = values;
  9757. this.prefixSum = new Uint32Array(values.length);
  9758. this.prefixSumValidIndex = new Int32Array(1);
  9759. this.prefixSumValidIndex[0] = -1;
  9760. }
  9761. insertValues(insertIndex, insertValues) {
  9762. insertIndex = toUint32(insertIndex);
  9763. const oldValues = this.values;
  9764. const oldPrefixSum = this.prefixSum;
  9765. const insertValuesLen = insertValues.length;
  9766. if (insertValuesLen === 0) {
  9767. return false;
  9768. }
  9769. this.values = new Uint32Array(oldValues.length + insertValuesLen);
  9770. this.values.set(oldValues.subarray(0, insertIndex), 0);
  9771. this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen);
  9772. this.values.set(insertValues, insertIndex);
  9773. if (insertIndex - 1 < this.prefixSumValidIndex[0]) {
  9774. this.prefixSumValidIndex[0] = insertIndex - 1;
  9775. }
  9776. this.prefixSum = new Uint32Array(this.values.length);
  9777. if (this.prefixSumValidIndex[0] >= 0) {
  9778. this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));
  9779. }
  9780. return true;
  9781. }
  9782. setValue(index, value) {
  9783. index = toUint32(index);
  9784. value = toUint32(value);
  9785. if (this.values[index] === value) {
  9786. return false;
  9787. }
  9788. this.values[index] = value;
  9789. if (index - 1 < this.prefixSumValidIndex[0]) {
  9790. this.prefixSumValidIndex[0] = index - 1;
  9791. }
  9792. return true;
  9793. }
  9794. removeValues(startIndex, count) {
  9795. startIndex = toUint32(startIndex);
  9796. count = toUint32(count);
  9797. const oldValues = this.values;
  9798. const oldPrefixSum = this.prefixSum;
  9799. if (startIndex >= oldValues.length) {
  9800. return false;
  9801. }
  9802. const maxCount = oldValues.length - startIndex;
  9803. if (count >= maxCount) {
  9804. count = maxCount;
  9805. }
  9806. if (count === 0) {
  9807. return false;
  9808. }
  9809. this.values = new Uint32Array(oldValues.length - count);
  9810. this.values.set(oldValues.subarray(0, startIndex), 0);
  9811. this.values.set(oldValues.subarray(startIndex + count), startIndex);
  9812. this.prefixSum = new Uint32Array(this.values.length);
  9813. if (startIndex - 1 < this.prefixSumValidIndex[0]) {
  9814. this.prefixSumValidIndex[0] = startIndex - 1;
  9815. }
  9816. if (this.prefixSumValidIndex[0] >= 0) {
  9817. this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));
  9818. }
  9819. return true;
  9820. }
  9821. getTotalSum() {
  9822. if (this.values.length === 0) {
  9823. return 0;
  9824. }
  9825. return this._getPrefixSum(this.values.length - 1);
  9826. }
  9827. /**
  9828. * Returns the sum of the first `index + 1` many items.
  9829. * @returns `SUM(0 <= j <= index, values[j])`.
  9830. */
  9831. getPrefixSum(index) {
  9832. if (index < 0) {
  9833. return 0;
  9834. }
  9835. index = toUint32(index);
  9836. return this._getPrefixSum(index);
  9837. }
  9838. _getPrefixSum(index) {
  9839. if (index <= this.prefixSumValidIndex[0]) {
  9840. return this.prefixSum[index];
  9841. }
  9842. let startIndex = this.prefixSumValidIndex[0] + 1;
  9843. if (startIndex === 0) {
  9844. this.prefixSum[0] = this.values[0];
  9845. startIndex++;
  9846. }
  9847. if (index >= this.values.length) {
  9848. index = this.values.length - 1;
  9849. }
  9850. for (let i = startIndex; i <= index; i++) {
  9851. this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i];
  9852. }
  9853. this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index);
  9854. return this.prefixSum[index];
  9855. }
  9856. getIndexOf(sum) {
  9857. sum = Math.floor(sum);
  9858. this.getTotalSum();
  9859. let low = 0;
  9860. let high = this.values.length - 1;
  9861. let mid = 0;
  9862. let midStop = 0;
  9863. let midStart = 0;
  9864. while (low <= high) {
  9865. mid = low + (high - low) / 2 | 0;
  9866. midStop = this.prefixSum[mid];
  9867. midStart = midStop - this.values[mid];
  9868. if (sum < midStart) {
  9869. high = mid - 1;
  9870. } else if (sum >= midStop) {
  9871. low = mid + 1;
  9872. } else {
  9873. break;
  9874. }
  9875. }
  9876. return new PrefixSumIndexOfResult(mid, sum - midStart);
  9877. }
  9878. };
  9879. var ConstantTimePrefixSumComputer = class {
  9880. constructor(values) {
  9881. this._values = values;
  9882. this._isValid = false;
  9883. this._validEndIndex = -1;
  9884. this._prefixSum = [];
  9885. this._indexBySum = [];
  9886. }
  9887. /**
  9888. * @returns SUM(0 <= j < values.length, values[j])
  9889. */
  9890. getTotalSum() {
  9891. this._ensureValid();
  9892. return this._indexBySum.length;
  9893. }
  9894. /**
  9895. * Returns the sum of the first `count` many items.
  9896. * @returns `SUM(0 <= j < count, values[j])`.
  9897. */
  9898. getPrefixSum(count) {
  9899. this._ensureValid();
  9900. if (count === 0) {
  9901. return 0;
  9902. }
  9903. return this._prefixSum[count - 1];
  9904. }
  9905. /**
  9906. * @returns `result`, such that `getPrefixSum(result.index) + result.remainder = sum`
  9907. */
  9908. getIndexOf(sum) {
  9909. this._ensureValid();
  9910. const idx = this._indexBySum[sum];
  9911. const viewLinesAbove = idx > 0 ? this._prefixSum[idx - 1] : 0;
  9912. return new PrefixSumIndexOfResult(idx, sum - viewLinesAbove);
  9913. }
  9914. removeValues(start, deleteCount) {
  9915. this._values.splice(start, deleteCount);
  9916. this._invalidate(start);
  9917. }
  9918. insertValues(insertIndex, insertArr) {
  9919. this._values = arrayInsert(this._values, insertIndex, insertArr);
  9920. this._invalidate(insertIndex);
  9921. }
  9922. _invalidate(index) {
  9923. this._isValid = false;
  9924. this._validEndIndex = Math.min(this._validEndIndex, index - 1);
  9925. }
  9926. _ensureValid() {
  9927. if (this._isValid) {
  9928. return;
  9929. }
  9930. for (let i = this._validEndIndex + 1, len = this._values.length; i < len; i++) {
  9931. const value = this._values[i];
  9932. const sumAbove = i > 0 ? this._prefixSum[i - 1] : 0;
  9933. this._prefixSum[i] = sumAbove + value;
  9934. for (let j = 0; j < value; j++) {
  9935. this._indexBySum[sumAbove + j] = i;
  9936. }
  9937. }
  9938. this._prefixSum.length = this._values.length;
  9939. this._indexBySum.length = this._prefixSum[this._prefixSum.length - 1];
  9940. this._isValid = true;
  9941. this._validEndIndex = this._values.length - 1;
  9942. }
  9943. setValue(index, value) {
  9944. if (this._values[index] === value) {
  9945. return;
  9946. }
  9947. this._values[index] = value;
  9948. this._invalidate(index);
  9949. }
  9950. };
  9951. var PrefixSumIndexOfResult = class {
  9952. constructor(index, remainder) {
  9953. this.index = index;
  9954. this.remainder = remainder;
  9955. this._prefixSumIndexOfResultBrand = void 0;
  9956. this.index = index;
  9957. this.remainder = remainder;
  9958. }
  9959. };
  9960. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js
  9961. var MirrorTextModel = class {
  9962. constructor(uri, lines, eol, versionId) {
  9963. this._uri = uri;
  9964. this._lines = lines;
  9965. this._eol = eol;
  9966. this._versionId = versionId;
  9967. this._lineStarts = null;
  9968. this._cachedTextValue = null;
  9969. }
  9970. dispose() {
  9971. this._lines.length = 0;
  9972. }
  9973. get version() {
  9974. return this._versionId;
  9975. }
  9976. getText() {
  9977. if (this._cachedTextValue === null) {
  9978. this._cachedTextValue = this._lines.join(this._eol);
  9979. }
  9980. return this._cachedTextValue;
  9981. }
  9982. onEvents(e) {
  9983. if (e.eol && e.eol !== this._eol) {
  9984. this._eol = e.eol;
  9985. this._lineStarts = null;
  9986. }
  9987. const changes = e.changes;
  9988. for (const change of changes) {
  9989. this._acceptDeleteRange(change.range);
  9990. this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text);
  9991. }
  9992. this._versionId = e.versionId;
  9993. this._cachedTextValue = null;
  9994. }
  9995. _ensureLineStarts() {
  9996. if (!this._lineStarts) {
  9997. const eolLength = this._eol.length;
  9998. const linesLength = this._lines.length;
  9999. const lineStartValues = new Uint32Array(linesLength);
  10000. for (let i = 0; i < linesLength; i++) {
  10001. lineStartValues[i] = this._lines[i].length + eolLength;
  10002. }
  10003. this._lineStarts = new PrefixSumComputer(lineStartValues);
  10004. }
  10005. }
  10006. /**
  10007. * All changes to a line's text go through this method
  10008. */
  10009. _setLineText(lineIndex, newValue) {
  10010. this._lines[lineIndex] = newValue;
  10011. if (this._lineStarts) {
  10012. this._lineStarts.setValue(lineIndex, this._lines[lineIndex].length + this._eol.length);
  10013. }
  10014. }
  10015. _acceptDeleteRange(range2) {
  10016. if (range2.startLineNumber === range2.endLineNumber) {
  10017. if (range2.startColumn === range2.endColumn) {
  10018. return;
  10019. }
  10020. this._setLineText(range2.startLineNumber - 1, this._lines[range2.startLineNumber - 1].substring(0, range2.startColumn - 1) + this._lines[range2.startLineNumber - 1].substring(range2.endColumn - 1));
  10021. return;
  10022. }
  10023. this._setLineText(range2.startLineNumber - 1, this._lines[range2.startLineNumber - 1].substring(0, range2.startColumn - 1) + this._lines[range2.endLineNumber - 1].substring(range2.endColumn - 1));
  10024. this._lines.splice(range2.startLineNumber, range2.endLineNumber - range2.startLineNumber);
  10025. if (this._lineStarts) {
  10026. this._lineStarts.removeValues(range2.startLineNumber, range2.endLineNumber - range2.startLineNumber);
  10027. }
  10028. }
  10029. _acceptInsertText(position, insertText) {
  10030. if (insertText.length === 0) {
  10031. return;
  10032. }
  10033. const insertLines = splitLines(insertText);
  10034. if (insertLines.length === 1) {
  10035. this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0] + this._lines[position.lineNumber - 1].substring(position.column - 1));
  10036. return;
  10037. }
  10038. insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1);
  10039. this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0]);
  10040. const newLengths = new Uint32Array(insertLines.length - 1);
  10041. for (let i = 1; i < insertLines.length; i++) {
  10042. this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]);
  10043. newLengths[i - 1] = insertLines[i].length + this._eol.length;
  10044. }
  10045. if (this._lineStarts) {
  10046. this._lineStarts.insertValues(position.lineNumber, newLengths);
  10047. }
  10048. }
  10049. };
  10050. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
  10051. init_wordHelper();
  10052. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/languages/linkComputer.js
  10053. init_characterClassifier();
  10054. var Uint8Matrix = class {
  10055. constructor(rows, cols, defaultValue) {
  10056. const data = new Uint8Array(rows * cols);
  10057. for (let i = 0, len = rows * cols; i < len; i++) {
  10058. data[i] = defaultValue;
  10059. }
  10060. this._data = data;
  10061. this.rows = rows;
  10062. this.cols = cols;
  10063. }
  10064. get(row, col) {
  10065. return this._data[row * this.cols + col];
  10066. }
  10067. set(row, col, value) {
  10068. this._data[row * this.cols + col] = value;
  10069. }
  10070. };
  10071. var StateMachine = class {
  10072. constructor(edges) {
  10073. let maxCharCode = 0;
  10074. let maxState = 0;
  10075. for (let i = 0, len = edges.length; i < len; i++) {
  10076. const [from, chCode, to] = edges[i];
  10077. if (chCode > maxCharCode) {
  10078. maxCharCode = chCode;
  10079. }
  10080. if (from > maxState) {
  10081. maxState = from;
  10082. }
  10083. if (to > maxState) {
  10084. maxState = to;
  10085. }
  10086. }
  10087. maxCharCode++;
  10088. maxState++;
  10089. const states = new Uint8Matrix(
  10090. maxState,
  10091. maxCharCode,
  10092. 0
  10093. /* State.Invalid */
  10094. );
  10095. for (let i = 0, len = edges.length; i < len; i++) {
  10096. const [from, chCode, to] = edges[i];
  10097. states.set(from, chCode, to);
  10098. }
  10099. this._states = states;
  10100. this._maxCharCode = maxCharCode;
  10101. }
  10102. nextState(currentState, chCode) {
  10103. if (chCode < 0 || chCode >= this._maxCharCode) {
  10104. return 0;
  10105. }
  10106. return this._states.get(currentState, chCode);
  10107. }
  10108. };
  10109. var _stateMachine = null;
  10110. function getStateMachine() {
  10111. if (_stateMachine === null) {
  10112. _stateMachine = new StateMachine([
  10113. [
  10114. 1,
  10115. 104,
  10116. 2
  10117. /* State.H */
  10118. ],
  10119. [
  10120. 1,
  10121. 72,
  10122. 2
  10123. /* State.H */
  10124. ],
  10125. [
  10126. 1,
  10127. 102,
  10128. 6
  10129. /* State.F */
  10130. ],
  10131. [
  10132. 1,
  10133. 70,
  10134. 6
  10135. /* State.F */
  10136. ],
  10137. [
  10138. 2,
  10139. 116,
  10140. 3
  10141. /* State.HT */
  10142. ],
  10143. [
  10144. 2,
  10145. 84,
  10146. 3
  10147. /* State.HT */
  10148. ],
  10149. [
  10150. 3,
  10151. 116,
  10152. 4
  10153. /* State.HTT */
  10154. ],
  10155. [
  10156. 3,
  10157. 84,
  10158. 4
  10159. /* State.HTT */
  10160. ],
  10161. [
  10162. 4,
  10163. 112,
  10164. 5
  10165. /* State.HTTP */
  10166. ],
  10167. [
  10168. 4,
  10169. 80,
  10170. 5
  10171. /* State.HTTP */
  10172. ],
  10173. [
  10174. 5,
  10175. 115,
  10176. 9
  10177. /* State.BeforeColon */
  10178. ],
  10179. [
  10180. 5,
  10181. 83,
  10182. 9
  10183. /* State.BeforeColon */
  10184. ],
  10185. [
  10186. 5,
  10187. 58,
  10188. 10
  10189. /* State.AfterColon */
  10190. ],
  10191. [
  10192. 6,
  10193. 105,
  10194. 7
  10195. /* State.FI */
  10196. ],
  10197. [
  10198. 6,
  10199. 73,
  10200. 7
  10201. /* State.FI */
  10202. ],
  10203. [
  10204. 7,
  10205. 108,
  10206. 8
  10207. /* State.FIL */
  10208. ],
  10209. [
  10210. 7,
  10211. 76,
  10212. 8
  10213. /* State.FIL */
  10214. ],
  10215. [
  10216. 8,
  10217. 101,
  10218. 9
  10219. /* State.BeforeColon */
  10220. ],
  10221. [
  10222. 8,
  10223. 69,
  10224. 9
  10225. /* State.BeforeColon */
  10226. ],
  10227. [
  10228. 9,
  10229. 58,
  10230. 10
  10231. /* State.AfterColon */
  10232. ],
  10233. [
  10234. 10,
  10235. 47,
  10236. 11
  10237. /* State.AlmostThere */
  10238. ],
  10239. [
  10240. 11,
  10241. 47,
  10242. 12
  10243. /* State.End */
  10244. ]
  10245. ]);
  10246. }
  10247. return _stateMachine;
  10248. }
  10249. var _classifier = null;
  10250. function getClassifier() {
  10251. if (_classifier === null) {
  10252. _classifier = new CharacterClassifier(
  10253. 0
  10254. /* CharacterClass.None */
  10255. );
  10256. const FORCE_TERMINATION_CHARACTERS = ` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;
  10257. for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) {
  10258. _classifier.set(
  10259. FORCE_TERMINATION_CHARACTERS.charCodeAt(i),
  10260. 1
  10261. /* CharacterClass.ForceTermination */
  10262. );
  10263. }
  10264. const CANNOT_END_WITH_CHARACTERS = ".,;:";
  10265. for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) {
  10266. _classifier.set(
  10267. CANNOT_END_WITH_CHARACTERS.charCodeAt(i),
  10268. 2
  10269. /* CharacterClass.CannotEndIn */
  10270. );
  10271. }
  10272. }
  10273. return _classifier;
  10274. }
  10275. var LinkComputer = class _LinkComputer {
  10276. static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) {
  10277. let lastIncludedCharIndex = linkEndIndex - 1;
  10278. do {
  10279. const chCode = line.charCodeAt(lastIncludedCharIndex);
  10280. const chClass = classifier.get(chCode);
  10281. if (chClass !== 2) {
  10282. break;
  10283. }
  10284. lastIncludedCharIndex--;
  10285. } while (lastIncludedCharIndex > linkBeginIndex);
  10286. if (linkBeginIndex > 0) {
  10287. const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1);
  10288. const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex);
  10289. if (charCodeBeforeLink === 40 && lastCharCodeInLink === 41 || charCodeBeforeLink === 91 && lastCharCodeInLink === 93 || charCodeBeforeLink === 123 && lastCharCodeInLink === 125) {
  10290. lastIncludedCharIndex--;
  10291. }
  10292. }
  10293. return {
  10294. range: {
  10295. startLineNumber: lineNumber,
  10296. startColumn: linkBeginIndex + 1,
  10297. endLineNumber: lineNumber,
  10298. endColumn: lastIncludedCharIndex + 2
  10299. },
  10300. url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1)
  10301. };
  10302. }
  10303. static computeLinks(model, stateMachine = getStateMachine()) {
  10304. const classifier = getClassifier();
  10305. const result = [];
  10306. for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) {
  10307. const line = model.getLineContent(i);
  10308. const len = line.length;
  10309. let j = 0;
  10310. let linkBeginIndex = 0;
  10311. let linkBeginChCode = 0;
  10312. let state = 1;
  10313. let hasOpenParens = false;
  10314. let hasOpenSquareBracket = false;
  10315. let inSquareBrackets = false;
  10316. let hasOpenCurlyBracket = false;
  10317. while (j < len) {
  10318. let resetStateMachine = false;
  10319. const chCode = line.charCodeAt(j);
  10320. if (state === 13) {
  10321. let chClass;
  10322. switch (chCode) {
  10323. case 40:
  10324. hasOpenParens = true;
  10325. chClass = 0;
  10326. break;
  10327. case 41:
  10328. chClass = hasOpenParens ? 0 : 1;
  10329. break;
  10330. case 91:
  10331. inSquareBrackets = true;
  10332. hasOpenSquareBracket = true;
  10333. chClass = 0;
  10334. break;
  10335. case 93:
  10336. inSquareBrackets = false;
  10337. chClass = hasOpenSquareBracket ? 0 : 1;
  10338. break;
  10339. case 123:
  10340. hasOpenCurlyBracket = true;
  10341. chClass = 0;
  10342. break;
  10343. case 125:
  10344. chClass = hasOpenCurlyBracket ? 0 : 1;
  10345. break;
  10346. case 39:
  10347. case 34:
  10348. case 96:
  10349. if (linkBeginChCode === chCode) {
  10350. chClass = 1;
  10351. } else if (linkBeginChCode === 39 || linkBeginChCode === 34 || linkBeginChCode === 96) {
  10352. chClass = 0;
  10353. } else {
  10354. chClass = 1;
  10355. }
  10356. break;
  10357. case 42:
  10358. chClass = linkBeginChCode === 42 ? 1 : 0;
  10359. break;
  10360. case 124:
  10361. chClass = linkBeginChCode === 124 ? 1 : 0;
  10362. break;
  10363. case 32:
  10364. chClass = inSquareBrackets ? 0 : 1;
  10365. break;
  10366. default:
  10367. chClass = classifier.get(chCode);
  10368. }
  10369. if (chClass === 1) {
  10370. result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, j));
  10371. resetStateMachine = true;
  10372. }
  10373. } else if (state === 12) {
  10374. let chClass;
  10375. if (chCode === 91) {
  10376. hasOpenSquareBracket = true;
  10377. chClass = 0;
  10378. } else {
  10379. chClass = classifier.get(chCode);
  10380. }
  10381. if (chClass === 1) {
  10382. resetStateMachine = true;
  10383. } else {
  10384. state = 13;
  10385. }
  10386. } else {
  10387. state = stateMachine.nextState(state, chCode);
  10388. if (state === 0) {
  10389. resetStateMachine = true;
  10390. }
  10391. }
  10392. if (resetStateMachine) {
  10393. state = 1;
  10394. hasOpenParens = false;
  10395. hasOpenSquareBracket = false;
  10396. hasOpenCurlyBracket = false;
  10397. linkBeginIndex = j + 1;
  10398. linkBeginChCode = chCode;
  10399. }
  10400. j++;
  10401. }
  10402. if (state === 13) {
  10403. result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, len));
  10404. }
  10405. }
  10406. return result;
  10407. }
  10408. };
  10409. function computeLinks(model) {
  10410. if (!model || typeof model.getLineCount !== "function" || typeof model.getLineContent !== "function") {
  10411. return [];
  10412. }
  10413. return LinkComputer.computeLinks(model);
  10414. }
  10415. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/languages/supports/inplaceReplaceSupport.js
  10416. var BasicInplaceReplace = class {
  10417. constructor() {
  10418. this._defaultValueSet = [
  10419. ["true", "false"],
  10420. ["True", "False"],
  10421. ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"],
  10422. ["public", "protected", "private"]
  10423. ];
  10424. }
  10425. navigateValueSet(range1, text1, range2, text2, up) {
  10426. if (range1 && text1) {
  10427. const result = this.doNavigateValueSet(text1, up);
  10428. if (result) {
  10429. return {
  10430. range: range1,
  10431. value: result
  10432. };
  10433. }
  10434. }
  10435. if (range2 && text2) {
  10436. const result = this.doNavigateValueSet(text2, up);
  10437. if (result) {
  10438. return {
  10439. range: range2,
  10440. value: result
  10441. };
  10442. }
  10443. }
  10444. return null;
  10445. }
  10446. doNavigateValueSet(text, up) {
  10447. const numberResult = this.numberReplace(text, up);
  10448. if (numberResult !== null) {
  10449. return numberResult;
  10450. }
  10451. return this.textReplace(text, up);
  10452. }
  10453. numberReplace(value, up) {
  10454. const precision = Math.pow(10, value.length - (value.lastIndexOf(".") + 1));
  10455. let n1 = Number(value);
  10456. const n2 = parseFloat(value);
  10457. if (!isNaN(n1) && !isNaN(n2) && n1 === n2) {
  10458. if (n1 === 0 && !up) {
  10459. return null;
  10460. } else {
  10461. n1 = Math.floor(n1 * precision);
  10462. n1 += up ? precision : -precision;
  10463. return String(n1 / precision);
  10464. }
  10465. }
  10466. return null;
  10467. }
  10468. textReplace(value, up) {
  10469. return this.valueSetsReplace(this._defaultValueSet, value, up);
  10470. }
  10471. valueSetsReplace(valueSets, value, up) {
  10472. let result = null;
  10473. for (let i = 0, len = valueSets.length; result === null && i < len; i++) {
  10474. result = this.valueSetReplace(valueSets[i], value, up);
  10475. }
  10476. return result;
  10477. }
  10478. valueSetReplace(valueSet, value, up) {
  10479. let idx = valueSet.indexOf(value);
  10480. if (idx >= 0) {
  10481. idx += up ? 1 : -1;
  10482. if (idx < 0) {
  10483. idx = valueSet.length - 1;
  10484. } else {
  10485. idx %= valueSet.length;
  10486. }
  10487. return valueSet[idx];
  10488. }
  10489. return null;
  10490. }
  10491. };
  10492. BasicInplaceReplace.INSTANCE = new BasicInplaceReplace();
  10493. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js
  10494. init_cancellation();
  10495. init_event();
  10496. init_keyCodes();
  10497. init_uri();
  10498. init_position();
  10499. init_range();
  10500. init_selection();
  10501. init_languages();
  10502. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js
  10503. var AccessibilitySupport;
  10504. (function(AccessibilitySupport2) {
  10505. AccessibilitySupport2[AccessibilitySupport2["Unknown"] = 0] = "Unknown";
  10506. AccessibilitySupport2[AccessibilitySupport2["Disabled"] = 1] = "Disabled";
  10507. AccessibilitySupport2[AccessibilitySupport2["Enabled"] = 2] = "Enabled";
  10508. })(AccessibilitySupport || (AccessibilitySupport = {}));
  10509. var CodeActionTriggerType;
  10510. (function(CodeActionTriggerType2) {
  10511. CodeActionTriggerType2[CodeActionTriggerType2["Invoke"] = 1] = "Invoke";
  10512. CodeActionTriggerType2[CodeActionTriggerType2["Auto"] = 2] = "Auto";
  10513. })(CodeActionTriggerType || (CodeActionTriggerType = {}));
  10514. var CompletionItemInsertTextRule;
  10515. (function(CompletionItemInsertTextRule2) {
  10516. CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["None"] = 0] = "None";
  10517. CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["KeepWhitespace"] = 1] = "KeepWhitespace";
  10518. CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["InsertAsSnippet"] = 4] = "InsertAsSnippet";
  10519. })(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {}));
  10520. var CompletionItemKind;
  10521. (function(CompletionItemKind2) {
  10522. CompletionItemKind2[CompletionItemKind2["Method"] = 0] = "Method";
  10523. CompletionItemKind2[CompletionItemKind2["Function"] = 1] = "Function";
  10524. CompletionItemKind2[CompletionItemKind2["Constructor"] = 2] = "Constructor";
  10525. CompletionItemKind2[CompletionItemKind2["Field"] = 3] = "Field";
  10526. CompletionItemKind2[CompletionItemKind2["Variable"] = 4] = "Variable";
  10527. CompletionItemKind2[CompletionItemKind2["Class"] = 5] = "Class";
  10528. CompletionItemKind2[CompletionItemKind2["Struct"] = 6] = "Struct";
  10529. CompletionItemKind2[CompletionItemKind2["Interface"] = 7] = "Interface";
  10530. CompletionItemKind2[CompletionItemKind2["Module"] = 8] = "Module";
  10531. CompletionItemKind2[CompletionItemKind2["Property"] = 9] = "Property";
  10532. CompletionItemKind2[CompletionItemKind2["Event"] = 10] = "Event";
  10533. CompletionItemKind2[CompletionItemKind2["Operator"] = 11] = "Operator";
  10534. CompletionItemKind2[CompletionItemKind2["Unit"] = 12] = "Unit";
  10535. CompletionItemKind2[CompletionItemKind2["Value"] = 13] = "Value";
  10536. CompletionItemKind2[CompletionItemKind2["Constant"] = 14] = "Constant";
  10537. CompletionItemKind2[CompletionItemKind2["Enum"] = 15] = "Enum";
  10538. CompletionItemKind2[CompletionItemKind2["EnumMember"] = 16] = "EnumMember";
  10539. CompletionItemKind2[CompletionItemKind2["Keyword"] = 17] = "Keyword";
  10540. CompletionItemKind2[CompletionItemKind2["Text"] = 18] = "Text";
  10541. CompletionItemKind2[CompletionItemKind2["Color"] = 19] = "Color";
  10542. CompletionItemKind2[CompletionItemKind2["File"] = 20] = "File";
  10543. CompletionItemKind2[CompletionItemKind2["Reference"] = 21] = "Reference";
  10544. CompletionItemKind2[CompletionItemKind2["Customcolor"] = 22] = "Customcolor";
  10545. CompletionItemKind2[CompletionItemKind2["Folder"] = 23] = "Folder";
  10546. CompletionItemKind2[CompletionItemKind2["TypeParameter"] = 24] = "TypeParameter";
  10547. CompletionItemKind2[CompletionItemKind2["User"] = 25] = "User";
  10548. CompletionItemKind2[CompletionItemKind2["Issue"] = 26] = "Issue";
  10549. CompletionItemKind2[CompletionItemKind2["Snippet"] = 27] = "Snippet";
  10550. })(CompletionItemKind || (CompletionItemKind = {}));
  10551. var CompletionItemTag;
  10552. (function(CompletionItemTag2) {
  10553. CompletionItemTag2[CompletionItemTag2["Deprecated"] = 1] = "Deprecated";
  10554. })(CompletionItemTag || (CompletionItemTag = {}));
  10555. var CompletionTriggerKind;
  10556. (function(CompletionTriggerKind2) {
  10557. CompletionTriggerKind2[CompletionTriggerKind2["Invoke"] = 0] = "Invoke";
  10558. CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 1] = "TriggerCharacter";
  10559. CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions";
  10560. })(CompletionTriggerKind || (CompletionTriggerKind = {}));
  10561. var ContentWidgetPositionPreference;
  10562. (function(ContentWidgetPositionPreference2) {
  10563. ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["EXACT"] = 0] = "EXACT";
  10564. ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["ABOVE"] = 1] = "ABOVE";
  10565. ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["BELOW"] = 2] = "BELOW";
  10566. })(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {}));
  10567. var CursorChangeReason;
  10568. (function(CursorChangeReason2) {
  10569. CursorChangeReason2[CursorChangeReason2["NotSet"] = 0] = "NotSet";
  10570. CursorChangeReason2[CursorChangeReason2["ContentFlush"] = 1] = "ContentFlush";
  10571. CursorChangeReason2[CursorChangeReason2["RecoverFromMarkers"] = 2] = "RecoverFromMarkers";
  10572. CursorChangeReason2[CursorChangeReason2["Explicit"] = 3] = "Explicit";
  10573. CursorChangeReason2[CursorChangeReason2["Paste"] = 4] = "Paste";
  10574. CursorChangeReason2[CursorChangeReason2["Undo"] = 5] = "Undo";
  10575. CursorChangeReason2[CursorChangeReason2["Redo"] = 6] = "Redo";
  10576. })(CursorChangeReason || (CursorChangeReason = {}));
  10577. var DefaultEndOfLine;
  10578. (function(DefaultEndOfLine2) {
  10579. DefaultEndOfLine2[DefaultEndOfLine2["LF"] = 1] = "LF";
  10580. DefaultEndOfLine2[DefaultEndOfLine2["CRLF"] = 2] = "CRLF";
  10581. })(DefaultEndOfLine || (DefaultEndOfLine = {}));
  10582. var DocumentHighlightKind2;
  10583. (function(DocumentHighlightKind3) {
  10584. DocumentHighlightKind3[DocumentHighlightKind3["Text"] = 0] = "Text";
  10585. DocumentHighlightKind3[DocumentHighlightKind3["Read"] = 1] = "Read";
  10586. DocumentHighlightKind3[DocumentHighlightKind3["Write"] = 2] = "Write";
  10587. })(DocumentHighlightKind2 || (DocumentHighlightKind2 = {}));
  10588. var EditorAutoIndentStrategy;
  10589. (function(EditorAutoIndentStrategy2) {
  10590. EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["None"] = 0] = "None";
  10591. EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Keep"] = 1] = "Keep";
  10592. EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Brackets"] = 2] = "Brackets";
  10593. EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Advanced"] = 3] = "Advanced";
  10594. EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Full"] = 4] = "Full";
  10595. })(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {}));
  10596. var EditorOption;
  10597. (function(EditorOption2) {
  10598. EditorOption2[EditorOption2["acceptSuggestionOnCommitCharacter"] = 0] = "acceptSuggestionOnCommitCharacter";
  10599. EditorOption2[EditorOption2["acceptSuggestionOnEnter"] = 1] = "acceptSuggestionOnEnter";
  10600. EditorOption2[EditorOption2["accessibilitySupport"] = 2] = "accessibilitySupport";
  10601. EditorOption2[EditorOption2["accessibilityPageSize"] = 3] = "accessibilityPageSize";
  10602. EditorOption2[EditorOption2["ariaLabel"] = 4] = "ariaLabel";
  10603. EditorOption2[EditorOption2["autoClosingBrackets"] = 5] = "autoClosingBrackets";
  10604. EditorOption2[EditorOption2["screenReaderAnnounceInlineSuggestion"] = 6] = "screenReaderAnnounceInlineSuggestion";
  10605. EditorOption2[EditorOption2["autoClosingDelete"] = 7] = "autoClosingDelete";
  10606. EditorOption2[EditorOption2["autoClosingOvertype"] = 8] = "autoClosingOvertype";
  10607. EditorOption2[EditorOption2["autoClosingQuotes"] = 9] = "autoClosingQuotes";
  10608. EditorOption2[EditorOption2["autoIndent"] = 10] = "autoIndent";
  10609. EditorOption2[EditorOption2["automaticLayout"] = 11] = "automaticLayout";
  10610. EditorOption2[EditorOption2["autoSurround"] = 12] = "autoSurround";
  10611. EditorOption2[EditorOption2["bracketPairColorization"] = 13] = "bracketPairColorization";
  10612. EditorOption2[EditorOption2["guides"] = 14] = "guides";
  10613. EditorOption2[EditorOption2["codeLens"] = 15] = "codeLens";
  10614. EditorOption2[EditorOption2["codeLensFontFamily"] = 16] = "codeLensFontFamily";
  10615. EditorOption2[EditorOption2["codeLensFontSize"] = 17] = "codeLensFontSize";
  10616. EditorOption2[EditorOption2["colorDecorators"] = 18] = "colorDecorators";
  10617. EditorOption2[EditorOption2["colorDecoratorsLimit"] = 19] = "colorDecoratorsLimit";
  10618. EditorOption2[EditorOption2["columnSelection"] = 20] = "columnSelection";
  10619. EditorOption2[EditorOption2["comments"] = 21] = "comments";
  10620. EditorOption2[EditorOption2["contextmenu"] = 22] = "contextmenu";
  10621. EditorOption2[EditorOption2["copyWithSyntaxHighlighting"] = 23] = "copyWithSyntaxHighlighting";
  10622. EditorOption2[EditorOption2["cursorBlinking"] = 24] = "cursorBlinking";
  10623. EditorOption2[EditorOption2["cursorSmoothCaretAnimation"] = 25] = "cursorSmoothCaretAnimation";
  10624. EditorOption2[EditorOption2["cursorStyle"] = 26] = "cursorStyle";
  10625. EditorOption2[EditorOption2["cursorSurroundingLines"] = 27] = "cursorSurroundingLines";
  10626. EditorOption2[EditorOption2["cursorSurroundingLinesStyle"] = 28] = "cursorSurroundingLinesStyle";
  10627. EditorOption2[EditorOption2["cursorWidth"] = 29] = "cursorWidth";
  10628. EditorOption2[EditorOption2["disableLayerHinting"] = 30] = "disableLayerHinting";
  10629. EditorOption2[EditorOption2["disableMonospaceOptimizations"] = 31] = "disableMonospaceOptimizations";
  10630. EditorOption2[EditorOption2["domReadOnly"] = 32] = "domReadOnly";
  10631. EditorOption2[EditorOption2["dragAndDrop"] = 33] = "dragAndDrop";
  10632. EditorOption2[EditorOption2["dropIntoEditor"] = 34] = "dropIntoEditor";
  10633. EditorOption2[EditorOption2["emptySelectionClipboard"] = 35] = "emptySelectionClipboard";
  10634. EditorOption2[EditorOption2["experimentalWhitespaceRendering"] = 36] = "experimentalWhitespaceRendering";
  10635. EditorOption2[EditorOption2["extraEditorClassName"] = 37] = "extraEditorClassName";
  10636. EditorOption2[EditorOption2["fastScrollSensitivity"] = 38] = "fastScrollSensitivity";
  10637. EditorOption2[EditorOption2["find"] = 39] = "find";
  10638. EditorOption2[EditorOption2["fixedOverflowWidgets"] = 40] = "fixedOverflowWidgets";
  10639. EditorOption2[EditorOption2["folding"] = 41] = "folding";
  10640. EditorOption2[EditorOption2["foldingStrategy"] = 42] = "foldingStrategy";
  10641. EditorOption2[EditorOption2["foldingHighlight"] = 43] = "foldingHighlight";
  10642. EditorOption2[EditorOption2["foldingImportsByDefault"] = 44] = "foldingImportsByDefault";
  10643. EditorOption2[EditorOption2["foldingMaximumRegions"] = 45] = "foldingMaximumRegions";
  10644. EditorOption2[EditorOption2["unfoldOnClickAfterEndOfLine"] = 46] = "unfoldOnClickAfterEndOfLine";
  10645. EditorOption2[EditorOption2["fontFamily"] = 47] = "fontFamily";
  10646. EditorOption2[EditorOption2["fontInfo"] = 48] = "fontInfo";
  10647. EditorOption2[EditorOption2["fontLigatures"] = 49] = "fontLigatures";
  10648. EditorOption2[EditorOption2["fontSize"] = 50] = "fontSize";
  10649. EditorOption2[EditorOption2["fontWeight"] = 51] = "fontWeight";
  10650. EditorOption2[EditorOption2["fontVariations"] = 52] = "fontVariations";
  10651. EditorOption2[EditorOption2["formatOnPaste"] = 53] = "formatOnPaste";
  10652. EditorOption2[EditorOption2["formatOnType"] = 54] = "formatOnType";
  10653. EditorOption2[EditorOption2["glyphMargin"] = 55] = "glyphMargin";
  10654. EditorOption2[EditorOption2["gotoLocation"] = 56] = "gotoLocation";
  10655. EditorOption2[EditorOption2["hideCursorInOverviewRuler"] = 57] = "hideCursorInOverviewRuler";
  10656. EditorOption2[EditorOption2["hover"] = 58] = "hover";
  10657. EditorOption2[EditorOption2["inDiffEditor"] = 59] = "inDiffEditor";
  10658. EditorOption2[EditorOption2["inlineSuggest"] = 60] = "inlineSuggest";
  10659. EditorOption2[EditorOption2["letterSpacing"] = 61] = "letterSpacing";
  10660. EditorOption2[EditorOption2["lightbulb"] = 62] = "lightbulb";
  10661. EditorOption2[EditorOption2["lineDecorationsWidth"] = 63] = "lineDecorationsWidth";
  10662. EditorOption2[EditorOption2["lineHeight"] = 64] = "lineHeight";
  10663. EditorOption2[EditorOption2["lineNumbers"] = 65] = "lineNumbers";
  10664. EditorOption2[EditorOption2["lineNumbersMinChars"] = 66] = "lineNumbersMinChars";
  10665. EditorOption2[EditorOption2["linkedEditing"] = 67] = "linkedEditing";
  10666. EditorOption2[EditorOption2["links"] = 68] = "links";
  10667. EditorOption2[EditorOption2["matchBrackets"] = 69] = "matchBrackets";
  10668. EditorOption2[EditorOption2["minimap"] = 70] = "minimap";
  10669. EditorOption2[EditorOption2["mouseStyle"] = 71] = "mouseStyle";
  10670. EditorOption2[EditorOption2["mouseWheelScrollSensitivity"] = 72] = "mouseWheelScrollSensitivity";
  10671. EditorOption2[EditorOption2["mouseWheelZoom"] = 73] = "mouseWheelZoom";
  10672. EditorOption2[EditorOption2["multiCursorMergeOverlapping"] = 74] = "multiCursorMergeOverlapping";
  10673. EditorOption2[EditorOption2["multiCursorModifier"] = 75] = "multiCursorModifier";
  10674. EditorOption2[EditorOption2["multiCursorPaste"] = 76] = "multiCursorPaste";
  10675. EditorOption2[EditorOption2["multiCursorLimit"] = 77] = "multiCursorLimit";
  10676. EditorOption2[EditorOption2["occurrencesHighlight"] = 78] = "occurrencesHighlight";
  10677. EditorOption2[EditorOption2["overviewRulerBorder"] = 79] = "overviewRulerBorder";
  10678. EditorOption2[EditorOption2["overviewRulerLanes"] = 80] = "overviewRulerLanes";
  10679. EditorOption2[EditorOption2["padding"] = 81] = "padding";
  10680. EditorOption2[EditorOption2["parameterHints"] = 82] = "parameterHints";
  10681. EditorOption2[EditorOption2["peekWidgetDefaultFocus"] = 83] = "peekWidgetDefaultFocus";
  10682. EditorOption2[EditorOption2["definitionLinkOpensInPeek"] = 84] = "definitionLinkOpensInPeek";
  10683. EditorOption2[EditorOption2["quickSuggestions"] = 85] = "quickSuggestions";
  10684. EditorOption2[EditorOption2["quickSuggestionsDelay"] = 86] = "quickSuggestionsDelay";
  10685. EditorOption2[EditorOption2["readOnly"] = 87] = "readOnly";
  10686. EditorOption2[EditorOption2["renameOnType"] = 88] = "renameOnType";
  10687. EditorOption2[EditorOption2["renderControlCharacters"] = 89] = "renderControlCharacters";
  10688. EditorOption2[EditorOption2["renderFinalNewline"] = 90] = "renderFinalNewline";
  10689. EditorOption2[EditorOption2["renderLineHighlight"] = 91] = "renderLineHighlight";
  10690. EditorOption2[EditorOption2["renderLineHighlightOnlyWhenFocus"] = 92] = "renderLineHighlightOnlyWhenFocus";
  10691. EditorOption2[EditorOption2["renderValidationDecorations"] = 93] = "renderValidationDecorations";
  10692. EditorOption2[EditorOption2["renderWhitespace"] = 94] = "renderWhitespace";
  10693. EditorOption2[EditorOption2["revealHorizontalRightPadding"] = 95] = "revealHorizontalRightPadding";
  10694. EditorOption2[EditorOption2["roundedSelection"] = 96] = "roundedSelection";
  10695. EditorOption2[EditorOption2["rulers"] = 97] = "rulers";
  10696. EditorOption2[EditorOption2["scrollbar"] = 98] = "scrollbar";
  10697. EditorOption2[EditorOption2["scrollBeyondLastColumn"] = 99] = "scrollBeyondLastColumn";
  10698. EditorOption2[EditorOption2["scrollBeyondLastLine"] = 100] = "scrollBeyondLastLine";
  10699. EditorOption2[EditorOption2["scrollPredominantAxis"] = 101] = "scrollPredominantAxis";
  10700. EditorOption2[EditorOption2["selectionClipboard"] = 102] = "selectionClipboard";
  10701. EditorOption2[EditorOption2["selectionHighlight"] = 103] = "selectionHighlight";
  10702. EditorOption2[EditorOption2["selectOnLineNumbers"] = 104] = "selectOnLineNumbers";
  10703. EditorOption2[EditorOption2["showFoldingControls"] = 105] = "showFoldingControls";
  10704. EditorOption2[EditorOption2["showUnused"] = 106] = "showUnused";
  10705. EditorOption2[EditorOption2["snippetSuggestions"] = 107] = "snippetSuggestions";
  10706. EditorOption2[EditorOption2["smartSelect"] = 108] = "smartSelect";
  10707. EditorOption2[EditorOption2["smoothScrolling"] = 109] = "smoothScrolling";
  10708. EditorOption2[EditorOption2["stickyScroll"] = 110] = "stickyScroll";
  10709. EditorOption2[EditorOption2["stickyTabStops"] = 111] = "stickyTabStops";
  10710. EditorOption2[EditorOption2["stopRenderingLineAfter"] = 112] = "stopRenderingLineAfter";
  10711. EditorOption2[EditorOption2["suggest"] = 113] = "suggest";
  10712. EditorOption2[EditorOption2["suggestFontSize"] = 114] = "suggestFontSize";
  10713. EditorOption2[EditorOption2["suggestLineHeight"] = 115] = "suggestLineHeight";
  10714. EditorOption2[EditorOption2["suggestOnTriggerCharacters"] = 116] = "suggestOnTriggerCharacters";
  10715. EditorOption2[EditorOption2["suggestSelection"] = 117] = "suggestSelection";
  10716. EditorOption2[EditorOption2["tabCompletion"] = 118] = "tabCompletion";
  10717. EditorOption2[EditorOption2["tabIndex"] = 119] = "tabIndex";
  10718. EditorOption2[EditorOption2["unicodeHighlighting"] = 120] = "unicodeHighlighting";
  10719. EditorOption2[EditorOption2["unusualLineTerminators"] = 121] = "unusualLineTerminators";
  10720. EditorOption2[EditorOption2["useShadowDOM"] = 122] = "useShadowDOM";
  10721. EditorOption2[EditorOption2["useTabStops"] = 123] = "useTabStops";
  10722. EditorOption2[EditorOption2["wordBreak"] = 124] = "wordBreak";
  10723. EditorOption2[EditorOption2["wordSeparators"] = 125] = "wordSeparators";
  10724. EditorOption2[EditorOption2["wordWrap"] = 126] = "wordWrap";
  10725. EditorOption2[EditorOption2["wordWrapBreakAfterCharacters"] = 127] = "wordWrapBreakAfterCharacters";
  10726. EditorOption2[EditorOption2["wordWrapBreakBeforeCharacters"] = 128] = "wordWrapBreakBeforeCharacters";
  10727. EditorOption2[EditorOption2["wordWrapColumn"] = 129] = "wordWrapColumn";
  10728. EditorOption2[EditorOption2["wordWrapOverride1"] = 130] = "wordWrapOverride1";
  10729. EditorOption2[EditorOption2["wordWrapOverride2"] = 131] = "wordWrapOverride2";
  10730. EditorOption2[EditorOption2["wrappingIndent"] = 132] = "wrappingIndent";
  10731. EditorOption2[EditorOption2["wrappingStrategy"] = 133] = "wrappingStrategy";
  10732. EditorOption2[EditorOption2["showDeprecated"] = 134] = "showDeprecated";
  10733. EditorOption2[EditorOption2["inlayHints"] = 135] = "inlayHints";
  10734. EditorOption2[EditorOption2["editorClassName"] = 136] = "editorClassName";
  10735. EditorOption2[EditorOption2["pixelRatio"] = 137] = "pixelRatio";
  10736. EditorOption2[EditorOption2["tabFocusMode"] = 138] = "tabFocusMode";
  10737. EditorOption2[EditorOption2["layoutInfo"] = 139] = "layoutInfo";
  10738. EditorOption2[EditorOption2["wrappingInfo"] = 140] = "wrappingInfo";
  10739. EditorOption2[EditorOption2["defaultColorDecorators"] = 141] = "defaultColorDecorators";
  10740. })(EditorOption || (EditorOption = {}));
  10741. var EndOfLinePreference;
  10742. (function(EndOfLinePreference2) {
  10743. EndOfLinePreference2[EndOfLinePreference2["TextDefined"] = 0] = "TextDefined";
  10744. EndOfLinePreference2[EndOfLinePreference2["LF"] = 1] = "LF";
  10745. EndOfLinePreference2[EndOfLinePreference2["CRLF"] = 2] = "CRLF";
  10746. })(EndOfLinePreference || (EndOfLinePreference = {}));
  10747. var EndOfLineSequence;
  10748. (function(EndOfLineSequence2) {
  10749. EndOfLineSequence2[EndOfLineSequence2["LF"] = 0] = "LF";
  10750. EndOfLineSequence2[EndOfLineSequence2["CRLF"] = 1] = "CRLF";
  10751. })(EndOfLineSequence || (EndOfLineSequence = {}));
  10752. var GlyphMarginLane;
  10753. (function(GlyphMarginLane3) {
  10754. GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left";
  10755. GlyphMarginLane3[GlyphMarginLane3["Right"] = 2] = "Right";
  10756. })(GlyphMarginLane || (GlyphMarginLane = {}));
  10757. var IndentAction;
  10758. (function(IndentAction2) {
  10759. IndentAction2[IndentAction2["None"] = 0] = "None";
  10760. IndentAction2[IndentAction2["Indent"] = 1] = "Indent";
  10761. IndentAction2[IndentAction2["IndentOutdent"] = 2] = "IndentOutdent";
  10762. IndentAction2[IndentAction2["Outdent"] = 3] = "Outdent";
  10763. })(IndentAction || (IndentAction = {}));
  10764. var InjectedTextCursorStops;
  10765. (function(InjectedTextCursorStops3) {
  10766. InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both";
  10767. InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right";
  10768. InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left";
  10769. InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None";
  10770. })(InjectedTextCursorStops || (InjectedTextCursorStops = {}));
  10771. var InlayHintKind2;
  10772. (function(InlayHintKind3) {
  10773. InlayHintKind3[InlayHintKind3["Type"] = 1] = "Type";
  10774. InlayHintKind3[InlayHintKind3["Parameter"] = 2] = "Parameter";
  10775. })(InlayHintKind2 || (InlayHintKind2 = {}));
  10776. var InlineCompletionTriggerKind2;
  10777. (function(InlineCompletionTriggerKind3) {
  10778. InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic";
  10779. InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit";
  10780. })(InlineCompletionTriggerKind2 || (InlineCompletionTriggerKind2 = {}));
  10781. var KeyCode;
  10782. (function(KeyCode2) {
  10783. KeyCode2[KeyCode2["DependsOnKbLayout"] = -1] = "DependsOnKbLayout";
  10784. KeyCode2[KeyCode2["Unknown"] = 0] = "Unknown";
  10785. KeyCode2[KeyCode2["Backspace"] = 1] = "Backspace";
  10786. KeyCode2[KeyCode2["Tab"] = 2] = "Tab";
  10787. KeyCode2[KeyCode2["Enter"] = 3] = "Enter";
  10788. KeyCode2[KeyCode2["Shift"] = 4] = "Shift";
  10789. KeyCode2[KeyCode2["Ctrl"] = 5] = "Ctrl";
  10790. KeyCode2[KeyCode2["Alt"] = 6] = "Alt";
  10791. KeyCode2[KeyCode2["PauseBreak"] = 7] = "PauseBreak";
  10792. KeyCode2[KeyCode2["CapsLock"] = 8] = "CapsLock";
  10793. KeyCode2[KeyCode2["Escape"] = 9] = "Escape";
  10794. KeyCode2[KeyCode2["Space"] = 10] = "Space";
  10795. KeyCode2[KeyCode2["PageUp"] = 11] = "PageUp";
  10796. KeyCode2[KeyCode2["PageDown"] = 12] = "PageDown";
  10797. KeyCode2[KeyCode2["End"] = 13] = "End";
  10798. KeyCode2[KeyCode2["Home"] = 14] = "Home";
  10799. KeyCode2[KeyCode2["LeftArrow"] = 15] = "LeftArrow";
  10800. KeyCode2[KeyCode2["UpArrow"] = 16] = "UpArrow";
  10801. KeyCode2[KeyCode2["RightArrow"] = 17] = "RightArrow";
  10802. KeyCode2[KeyCode2["DownArrow"] = 18] = "DownArrow";
  10803. KeyCode2[KeyCode2["Insert"] = 19] = "Insert";
  10804. KeyCode2[KeyCode2["Delete"] = 20] = "Delete";
  10805. KeyCode2[KeyCode2["Digit0"] = 21] = "Digit0";
  10806. KeyCode2[KeyCode2["Digit1"] = 22] = "Digit1";
  10807. KeyCode2[KeyCode2["Digit2"] = 23] = "Digit2";
  10808. KeyCode2[KeyCode2["Digit3"] = 24] = "Digit3";
  10809. KeyCode2[KeyCode2["Digit4"] = 25] = "Digit4";
  10810. KeyCode2[KeyCode2["Digit5"] = 26] = "Digit5";
  10811. KeyCode2[KeyCode2["Digit6"] = 27] = "Digit6";
  10812. KeyCode2[KeyCode2["Digit7"] = 28] = "Digit7";
  10813. KeyCode2[KeyCode2["Digit8"] = 29] = "Digit8";
  10814. KeyCode2[KeyCode2["Digit9"] = 30] = "Digit9";
  10815. KeyCode2[KeyCode2["KeyA"] = 31] = "KeyA";
  10816. KeyCode2[KeyCode2["KeyB"] = 32] = "KeyB";
  10817. KeyCode2[KeyCode2["KeyC"] = 33] = "KeyC";
  10818. KeyCode2[KeyCode2["KeyD"] = 34] = "KeyD";
  10819. KeyCode2[KeyCode2["KeyE"] = 35] = "KeyE";
  10820. KeyCode2[KeyCode2["KeyF"] = 36] = "KeyF";
  10821. KeyCode2[KeyCode2["KeyG"] = 37] = "KeyG";
  10822. KeyCode2[KeyCode2["KeyH"] = 38] = "KeyH";
  10823. KeyCode2[KeyCode2["KeyI"] = 39] = "KeyI";
  10824. KeyCode2[KeyCode2["KeyJ"] = 40] = "KeyJ";
  10825. KeyCode2[KeyCode2["KeyK"] = 41] = "KeyK";
  10826. KeyCode2[KeyCode2["KeyL"] = 42] = "KeyL";
  10827. KeyCode2[KeyCode2["KeyM"] = 43] = "KeyM";
  10828. KeyCode2[KeyCode2["KeyN"] = 44] = "KeyN";
  10829. KeyCode2[KeyCode2["KeyO"] = 45] = "KeyO";
  10830. KeyCode2[KeyCode2["KeyP"] = 46] = "KeyP";
  10831. KeyCode2[KeyCode2["KeyQ"] = 47] = "KeyQ";
  10832. KeyCode2[KeyCode2["KeyR"] = 48] = "KeyR";
  10833. KeyCode2[KeyCode2["KeyS"] = 49] = "KeyS";
  10834. KeyCode2[KeyCode2["KeyT"] = 50] = "KeyT";
  10835. KeyCode2[KeyCode2["KeyU"] = 51] = "KeyU";
  10836. KeyCode2[KeyCode2["KeyV"] = 52] = "KeyV";
  10837. KeyCode2[KeyCode2["KeyW"] = 53] = "KeyW";
  10838. KeyCode2[KeyCode2["KeyX"] = 54] = "KeyX";
  10839. KeyCode2[KeyCode2["KeyY"] = 55] = "KeyY";
  10840. KeyCode2[KeyCode2["KeyZ"] = 56] = "KeyZ";
  10841. KeyCode2[KeyCode2["Meta"] = 57] = "Meta";
  10842. KeyCode2[KeyCode2["ContextMenu"] = 58] = "ContextMenu";
  10843. KeyCode2[KeyCode2["F1"] = 59] = "F1";
  10844. KeyCode2[KeyCode2["F2"] = 60] = "F2";
  10845. KeyCode2[KeyCode2["F3"] = 61] = "F3";
  10846. KeyCode2[KeyCode2["F4"] = 62] = "F4";
  10847. KeyCode2[KeyCode2["F5"] = 63] = "F5";
  10848. KeyCode2[KeyCode2["F6"] = 64] = "F6";
  10849. KeyCode2[KeyCode2["F7"] = 65] = "F7";
  10850. KeyCode2[KeyCode2["F8"] = 66] = "F8";
  10851. KeyCode2[KeyCode2["F9"] = 67] = "F9";
  10852. KeyCode2[KeyCode2["F10"] = 68] = "F10";
  10853. KeyCode2[KeyCode2["F11"] = 69] = "F11";
  10854. KeyCode2[KeyCode2["F12"] = 70] = "F12";
  10855. KeyCode2[KeyCode2["F13"] = 71] = "F13";
  10856. KeyCode2[KeyCode2["F14"] = 72] = "F14";
  10857. KeyCode2[KeyCode2["F15"] = 73] = "F15";
  10858. KeyCode2[KeyCode2["F16"] = 74] = "F16";
  10859. KeyCode2[KeyCode2["F17"] = 75] = "F17";
  10860. KeyCode2[KeyCode2["F18"] = 76] = "F18";
  10861. KeyCode2[KeyCode2["F19"] = 77] = "F19";
  10862. KeyCode2[KeyCode2["F20"] = 78] = "F20";
  10863. KeyCode2[KeyCode2["F21"] = 79] = "F21";
  10864. KeyCode2[KeyCode2["F22"] = 80] = "F22";
  10865. KeyCode2[KeyCode2["F23"] = 81] = "F23";
  10866. KeyCode2[KeyCode2["F24"] = 82] = "F24";
  10867. KeyCode2[KeyCode2["NumLock"] = 83] = "NumLock";
  10868. KeyCode2[KeyCode2["ScrollLock"] = 84] = "ScrollLock";
  10869. KeyCode2[KeyCode2["Semicolon"] = 85] = "Semicolon";
  10870. KeyCode2[KeyCode2["Equal"] = 86] = "Equal";
  10871. KeyCode2[KeyCode2["Comma"] = 87] = "Comma";
  10872. KeyCode2[KeyCode2["Minus"] = 88] = "Minus";
  10873. KeyCode2[KeyCode2["Period"] = 89] = "Period";
  10874. KeyCode2[KeyCode2["Slash"] = 90] = "Slash";
  10875. KeyCode2[KeyCode2["Backquote"] = 91] = "Backquote";
  10876. KeyCode2[KeyCode2["BracketLeft"] = 92] = "BracketLeft";
  10877. KeyCode2[KeyCode2["Backslash"] = 93] = "Backslash";
  10878. KeyCode2[KeyCode2["BracketRight"] = 94] = "BracketRight";
  10879. KeyCode2[KeyCode2["Quote"] = 95] = "Quote";
  10880. KeyCode2[KeyCode2["OEM_8"] = 96] = "OEM_8";
  10881. KeyCode2[KeyCode2["IntlBackslash"] = 97] = "IntlBackslash";
  10882. KeyCode2[KeyCode2["Numpad0"] = 98] = "Numpad0";
  10883. KeyCode2[KeyCode2["Numpad1"] = 99] = "Numpad1";
  10884. KeyCode2[KeyCode2["Numpad2"] = 100] = "Numpad2";
  10885. KeyCode2[KeyCode2["Numpad3"] = 101] = "Numpad3";
  10886. KeyCode2[KeyCode2["Numpad4"] = 102] = "Numpad4";
  10887. KeyCode2[KeyCode2["Numpad5"] = 103] = "Numpad5";
  10888. KeyCode2[KeyCode2["Numpad6"] = 104] = "Numpad6";
  10889. KeyCode2[KeyCode2["Numpad7"] = 105] = "Numpad7";
  10890. KeyCode2[KeyCode2["Numpad8"] = 106] = "Numpad8";
  10891. KeyCode2[KeyCode2["Numpad9"] = 107] = "Numpad9";
  10892. KeyCode2[KeyCode2["NumpadMultiply"] = 108] = "NumpadMultiply";
  10893. KeyCode2[KeyCode2["NumpadAdd"] = 109] = "NumpadAdd";
  10894. KeyCode2[KeyCode2["NUMPAD_SEPARATOR"] = 110] = "NUMPAD_SEPARATOR";
  10895. KeyCode2[KeyCode2["NumpadSubtract"] = 111] = "NumpadSubtract";
  10896. KeyCode2[KeyCode2["NumpadDecimal"] = 112] = "NumpadDecimal";
  10897. KeyCode2[KeyCode2["NumpadDivide"] = 113] = "NumpadDivide";
  10898. KeyCode2[KeyCode2["KEY_IN_COMPOSITION"] = 114] = "KEY_IN_COMPOSITION";
  10899. KeyCode2[KeyCode2["ABNT_C1"] = 115] = "ABNT_C1";
  10900. KeyCode2[KeyCode2["ABNT_C2"] = 116] = "ABNT_C2";
  10901. KeyCode2[KeyCode2["AudioVolumeMute"] = 117] = "AudioVolumeMute";
  10902. KeyCode2[KeyCode2["AudioVolumeUp"] = 118] = "AudioVolumeUp";
  10903. KeyCode2[KeyCode2["AudioVolumeDown"] = 119] = "AudioVolumeDown";
  10904. KeyCode2[KeyCode2["BrowserSearch"] = 120] = "BrowserSearch";
  10905. KeyCode2[KeyCode2["BrowserHome"] = 121] = "BrowserHome";
  10906. KeyCode2[KeyCode2["BrowserBack"] = 122] = "BrowserBack";
  10907. KeyCode2[KeyCode2["BrowserForward"] = 123] = "BrowserForward";
  10908. KeyCode2[KeyCode2["MediaTrackNext"] = 124] = "MediaTrackNext";
  10909. KeyCode2[KeyCode2["MediaTrackPrevious"] = 125] = "MediaTrackPrevious";
  10910. KeyCode2[KeyCode2["MediaStop"] = 126] = "MediaStop";
  10911. KeyCode2[KeyCode2["MediaPlayPause"] = 127] = "MediaPlayPause";
  10912. KeyCode2[KeyCode2["LaunchMediaPlayer"] = 128] = "LaunchMediaPlayer";
  10913. KeyCode2[KeyCode2["LaunchMail"] = 129] = "LaunchMail";
  10914. KeyCode2[KeyCode2["LaunchApp2"] = 130] = "LaunchApp2";
  10915. KeyCode2[KeyCode2["Clear"] = 131] = "Clear";
  10916. KeyCode2[KeyCode2["MAX_VALUE"] = 132] = "MAX_VALUE";
  10917. })(KeyCode || (KeyCode = {}));
  10918. var MarkerSeverity;
  10919. (function(MarkerSeverity2) {
  10920. MarkerSeverity2[MarkerSeverity2["Hint"] = 1] = "Hint";
  10921. MarkerSeverity2[MarkerSeverity2["Info"] = 2] = "Info";
  10922. MarkerSeverity2[MarkerSeverity2["Warning"] = 4] = "Warning";
  10923. MarkerSeverity2[MarkerSeverity2["Error"] = 8] = "Error";
  10924. })(MarkerSeverity || (MarkerSeverity = {}));
  10925. var MarkerTag;
  10926. (function(MarkerTag2) {
  10927. MarkerTag2[MarkerTag2["Unnecessary"] = 1] = "Unnecessary";
  10928. MarkerTag2[MarkerTag2["Deprecated"] = 2] = "Deprecated";
  10929. })(MarkerTag || (MarkerTag = {}));
  10930. var MinimapPosition;
  10931. (function(MinimapPosition3) {
  10932. MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline";
  10933. MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter";
  10934. })(MinimapPosition || (MinimapPosition = {}));
  10935. var MouseTargetType;
  10936. (function(MouseTargetType2) {
  10937. MouseTargetType2[MouseTargetType2["UNKNOWN"] = 0] = "UNKNOWN";
  10938. MouseTargetType2[MouseTargetType2["TEXTAREA"] = 1] = "TEXTAREA";
  10939. MouseTargetType2[MouseTargetType2["GUTTER_GLYPH_MARGIN"] = 2] = "GUTTER_GLYPH_MARGIN";
  10940. MouseTargetType2[MouseTargetType2["GUTTER_LINE_NUMBERS"] = 3] = "GUTTER_LINE_NUMBERS";
  10941. MouseTargetType2[MouseTargetType2["GUTTER_LINE_DECORATIONS"] = 4] = "GUTTER_LINE_DECORATIONS";
  10942. MouseTargetType2[MouseTargetType2["GUTTER_VIEW_ZONE"] = 5] = "GUTTER_VIEW_ZONE";
  10943. MouseTargetType2[MouseTargetType2["CONTENT_TEXT"] = 6] = "CONTENT_TEXT";
  10944. MouseTargetType2[MouseTargetType2["CONTENT_EMPTY"] = 7] = "CONTENT_EMPTY";
  10945. MouseTargetType2[MouseTargetType2["CONTENT_VIEW_ZONE"] = 8] = "CONTENT_VIEW_ZONE";
  10946. MouseTargetType2[MouseTargetType2["CONTENT_WIDGET"] = 9] = "CONTENT_WIDGET";
  10947. MouseTargetType2[MouseTargetType2["OVERVIEW_RULER"] = 10] = "OVERVIEW_RULER";
  10948. MouseTargetType2[MouseTargetType2["SCROLLBAR"] = 11] = "SCROLLBAR";
  10949. MouseTargetType2[MouseTargetType2["OVERLAY_WIDGET"] = 12] = "OVERLAY_WIDGET";
  10950. MouseTargetType2[MouseTargetType2["OUTSIDE_EDITOR"] = 13] = "OUTSIDE_EDITOR";
  10951. })(MouseTargetType || (MouseTargetType = {}));
  10952. var OverlayWidgetPositionPreference;
  10953. (function(OverlayWidgetPositionPreference2) {
  10954. OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_RIGHT_CORNER"] = 0] = "TOP_RIGHT_CORNER";
  10955. OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["BOTTOM_RIGHT_CORNER"] = 1] = "BOTTOM_RIGHT_CORNER";
  10956. OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_CENTER"] = 2] = "TOP_CENTER";
  10957. })(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {}));
  10958. var OverviewRulerLane;
  10959. (function(OverviewRulerLane3) {
  10960. OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left";
  10961. OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center";
  10962. OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right";
  10963. OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full";
  10964. })(OverviewRulerLane || (OverviewRulerLane = {}));
  10965. var PositionAffinity;
  10966. (function(PositionAffinity2) {
  10967. PositionAffinity2[PositionAffinity2["Left"] = 0] = "Left";
  10968. PositionAffinity2[PositionAffinity2["Right"] = 1] = "Right";
  10969. PositionAffinity2[PositionAffinity2["None"] = 2] = "None";
  10970. PositionAffinity2[PositionAffinity2["LeftOfInjectedText"] = 3] = "LeftOfInjectedText";
  10971. PositionAffinity2[PositionAffinity2["RightOfInjectedText"] = 4] = "RightOfInjectedText";
  10972. })(PositionAffinity || (PositionAffinity = {}));
  10973. var RenderLineNumbersType;
  10974. (function(RenderLineNumbersType2) {
  10975. RenderLineNumbersType2[RenderLineNumbersType2["Off"] = 0] = "Off";
  10976. RenderLineNumbersType2[RenderLineNumbersType2["On"] = 1] = "On";
  10977. RenderLineNumbersType2[RenderLineNumbersType2["Relative"] = 2] = "Relative";
  10978. RenderLineNumbersType2[RenderLineNumbersType2["Interval"] = 3] = "Interval";
  10979. RenderLineNumbersType2[RenderLineNumbersType2["Custom"] = 4] = "Custom";
  10980. })(RenderLineNumbersType || (RenderLineNumbersType = {}));
  10981. var RenderMinimap;
  10982. (function(RenderMinimap2) {
  10983. RenderMinimap2[RenderMinimap2["None"] = 0] = "None";
  10984. RenderMinimap2[RenderMinimap2["Text"] = 1] = "Text";
  10985. RenderMinimap2[RenderMinimap2["Blocks"] = 2] = "Blocks";
  10986. })(RenderMinimap || (RenderMinimap = {}));
  10987. var ScrollType;
  10988. (function(ScrollType2) {
  10989. ScrollType2[ScrollType2["Smooth"] = 0] = "Smooth";
  10990. ScrollType2[ScrollType2["Immediate"] = 1] = "Immediate";
  10991. })(ScrollType || (ScrollType = {}));
  10992. var ScrollbarVisibility;
  10993. (function(ScrollbarVisibility2) {
  10994. ScrollbarVisibility2[ScrollbarVisibility2["Auto"] = 1] = "Auto";
  10995. ScrollbarVisibility2[ScrollbarVisibility2["Hidden"] = 2] = "Hidden";
  10996. ScrollbarVisibility2[ScrollbarVisibility2["Visible"] = 3] = "Visible";
  10997. })(ScrollbarVisibility || (ScrollbarVisibility = {}));
  10998. var SelectionDirection;
  10999. (function(SelectionDirection2) {
  11000. SelectionDirection2[SelectionDirection2["LTR"] = 0] = "LTR";
  11001. SelectionDirection2[SelectionDirection2["RTL"] = 1] = "RTL";
  11002. })(SelectionDirection || (SelectionDirection = {}));
  11003. var SignatureHelpTriggerKind2;
  11004. (function(SignatureHelpTriggerKind3) {
  11005. SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke";
  11006. SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter";
  11007. SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange";
  11008. })(SignatureHelpTriggerKind2 || (SignatureHelpTriggerKind2 = {}));
  11009. var SymbolKind;
  11010. (function(SymbolKind2) {
  11011. SymbolKind2[SymbolKind2["File"] = 0] = "File";
  11012. SymbolKind2[SymbolKind2["Module"] = 1] = "Module";
  11013. SymbolKind2[SymbolKind2["Namespace"] = 2] = "Namespace";
  11014. SymbolKind2[SymbolKind2["Package"] = 3] = "Package";
  11015. SymbolKind2[SymbolKind2["Class"] = 4] = "Class";
  11016. SymbolKind2[SymbolKind2["Method"] = 5] = "Method";
  11017. SymbolKind2[SymbolKind2["Property"] = 6] = "Property";
  11018. SymbolKind2[SymbolKind2["Field"] = 7] = "Field";
  11019. SymbolKind2[SymbolKind2["Constructor"] = 8] = "Constructor";
  11020. SymbolKind2[SymbolKind2["Enum"] = 9] = "Enum";
  11021. SymbolKind2[SymbolKind2["Interface"] = 10] = "Interface";
  11022. SymbolKind2[SymbolKind2["Function"] = 11] = "Function";
  11023. SymbolKind2[SymbolKind2["Variable"] = 12] = "Variable";
  11024. SymbolKind2[SymbolKind2["Constant"] = 13] = "Constant";
  11025. SymbolKind2[SymbolKind2["String"] = 14] = "String";
  11026. SymbolKind2[SymbolKind2["Number"] = 15] = "Number";
  11027. SymbolKind2[SymbolKind2["Boolean"] = 16] = "Boolean";
  11028. SymbolKind2[SymbolKind2["Array"] = 17] = "Array";
  11029. SymbolKind2[SymbolKind2["Object"] = 18] = "Object";
  11030. SymbolKind2[SymbolKind2["Key"] = 19] = "Key";
  11031. SymbolKind2[SymbolKind2["Null"] = 20] = "Null";
  11032. SymbolKind2[SymbolKind2["EnumMember"] = 21] = "EnumMember";
  11033. SymbolKind2[SymbolKind2["Struct"] = 22] = "Struct";
  11034. SymbolKind2[SymbolKind2["Event"] = 23] = "Event";
  11035. SymbolKind2[SymbolKind2["Operator"] = 24] = "Operator";
  11036. SymbolKind2[SymbolKind2["TypeParameter"] = 25] = "TypeParameter";
  11037. })(SymbolKind || (SymbolKind = {}));
  11038. var SymbolTag;
  11039. (function(SymbolTag2) {
  11040. SymbolTag2[SymbolTag2["Deprecated"] = 1] = "Deprecated";
  11041. })(SymbolTag || (SymbolTag = {}));
  11042. var TextEditorCursorBlinkingStyle;
  11043. (function(TextEditorCursorBlinkingStyle2) {
  11044. TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Hidden"] = 0] = "Hidden";
  11045. TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Blink"] = 1] = "Blink";
  11046. TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Smooth"] = 2] = "Smooth";
  11047. TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Phase"] = 3] = "Phase";
  11048. TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Expand"] = 4] = "Expand";
  11049. TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Solid"] = 5] = "Solid";
  11050. })(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {}));
  11051. var TextEditorCursorStyle;
  11052. (function(TextEditorCursorStyle2) {
  11053. TextEditorCursorStyle2[TextEditorCursorStyle2["Line"] = 1] = "Line";
  11054. TextEditorCursorStyle2[TextEditorCursorStyle2["Block"] = 2] = "Block";
  11055. TextEditorCursorStyle2[TextEditorCursorStyle2["Underline"] = 3] = "Underline";
  11056. TextEditorCursorStyle2[TextEditorCursorStyle2["LineThin"] = 4] = "LineThin";
  11057. TextEditorCursorStyle2[TextEditorCursorStyle2["BlockOutline"] = 5] = "BlockOutline";
  11058. TextEditorCursorStyle2[TextEditorCursorStyle2["UnderlineThin"] = 6] = "UnderlineThin";
  11059. })(TextEditorCursorStyle || (TextEditorCursorStyle = {}));
  11060. var TrackedRangeStickiness;
  11061. (function(TrackedRangeStickiness2) {
  11062. TrackedRangeStickiness2[TrackedRangeStickiness2["AlwaysGrowsWhenTypingAtEdges"] = 0] = "AlwaysGrowsWhenTypingAtEdges";
  11063. TrackedRangeStickiness2[TrackedRangeStickiness2["NeverGrowsWhenTypingAtEdges"] = 1] = "NeverGrowsWhenTypingAtEdges";
  11064. TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingBefore"] = 2] = "GrowsOnlyWhenTypingBefore";
  11065. TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingAfter"] = 3] = "GrowsOnlyWhenTypingAfter";
  11066. })(TrackedRangeStickiness || (TrackedRangeStickiness = {}));
  11067. var WrappingIndent;
  11068. (function(WrappingIndent2) {
  11069. WrappingIndent2[WrappingIndent2["None"] = 0] = "None";
  11070. WrappingIndent2[WrappingIndent2["Same"] = 1] = "Same";
  11071. WrappingIndent2[WrappingIndent2["Indent"] = 2] = "Indent";
  11072. WrappingIndent2[WrappingIndent2["DeepIndent"] = 3] = "DeepIndent";
  11073. })(WrappingIndent || (WrappingIndent = {}));
  11074. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js
  11075. var KeyMod = class {
  11076. static chord(firstPart, secondPart) {
  11077. return KeyChord(firstPart, secondPart);
  11078. }
  11079. };
  11080. KeyMod.CtrlCmd = 2048;
  11081. KeyMod.Shift = 1024;
  11082. KeyMod.Alt = 512;
  11083. KeyMod.WinCtrl = 256;
  11084. function createMonacoBaseAPI() {
  11085. return {
  11086. editor: void 0,
  11087. languages: void 0,
  11088. CancellationTokenSource,
  11089. Emitter,
  11090. KeyCode,
  11091. KeyMod,
  11092. Position,
  11093. Range,
  11094. Selection,
  11095. SelectionDirection,
  11096. MarkerSeverity,
  11097. MarkerTag,
  11098. Uri: URI,
  11099. Token
  11100. };
  11101. }
  11102. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
  11103. init_stopwatch();
  11104. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js
  11105. init_range();
  11106. init_textModelSearch();
  11107. init_strings();
  11108. init_assert();
  11109. init_wordHelper();
  11110. var UnicodeTextModelHighlighter = class {
  11111. static computeUnicodeHighlights(model, options, range2) {
  11112. const startLine = range2 ? range2.startLineNumber : 1;
  11113. const endLine = range2 ? range2.endLineNumber : model.getLineCount();
  11114. const codePointHighlighter = new CodePointHighlighter(options);
  11115. const candidates = codePointHighlighter.getCandidateCodePoints();
  11116. let regex;
  11117. if (candidates === "allNonBasicAscii") {
  11118. regex = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g");
  11119. } else {
  11120. regex = new RegExp(`${buildRegExpCharClassExpr(Array.from(candidates))}`, "g");
  11121. }
  11122. const searcher = new Searcher(null, regex);
  11123. const ranges = [];
  11124. let hasMore = false;
  11125. let m;
  11126. let ambiguousCharacterCount = 0;
  11127. let invisibleCharacterCount = 0;
  11128. let nonBasicAsciiCharacterCount = 0;
  11129. forLoop:
  11130. for (let lineNumber = startLine, lineCount = endLine; lineNumber <= lineCount; lineNumber++) {
  11131. const lineContent = model.getLineContent(lineNumber);
  11132. const lineLength = lineContent.length;
  11133. searcher.reset(0);
  11134. do {
  11135. m = searcher.next(lineContent);
  11136. if (m) {
  11137. let startIndex = m.index;
  11138. let endIndex = m.index + m[0].length;
  11139. if (startIndex > 0) {
  11140. const charCodeBefore = lineContent.charCodeAt(startIndex - 1);
  11141. if (isHighSurrogate(charCodeBefore)) {
  11142. startIndex--;
  11143. }
  11144. }
  11145. if (endIndex + 1 < lineLength) {
  11146. const charCodeBefore = lineContent.charCodeAt(endIndex - 1);
  11147. if (isHighSurrogate(charCodeBefore)) {
  11148. endIndex++;
  11149. }
  11150. }
  11151. const str = lineContent.substring(startIndex, endIndex);
  11152. let word = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0);
  11153. if (word && word.endColumn <= startIndex + 1) {
  11154. word = null;
  11155. }
  11156. const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word ? word.word : null);
  11157. if (highlightReason !== 0) {
  11158. if (highlightReason === 3) {
  11159. ambiguousCharacterCount++;
  11160. } else if (highlightReason === 2) {
  11161. invisibleCharacterCount++;
  11162. } else if (highlightReason === 1) {
  11163. nonBasicAsciiCharacterCount++;
  11164. } else {
  11165. assertNever(highlightReason);
  11166. }
  11167. const MAX_RESULT_LENGTH = 1e3;
  11168. if (ranges.length >= MAX_RESULT_LENGTH) {
  11169. hasMore = true;
  11170. break forLoop;
  11171. }
  11172. ranges.push(new Range(lineNumber, startIndex + 1, lineNumber, endIndex + 1));
  11173. }
  11174. }
  11175. } while (m);
  11176. }
  11177. return {
  11178. ranges,
  11179. hasMore,
  11180. ambiguousCharacterCount,
  11181. invisibleCharacterCount,
  11182. nonBasicAsciiCharacterCount
  11183. };
  11184. }
  11185. static computeUnicodeHighlightReason(char, options) {
  11186. const codePointHighlighter = new CodePointHighlighter(options);
  11187. const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null);
  11188. switch (reason) {
  11189. case 0:
  11190. return null;
  11191. case 2:
  11192. return {
  11193. kind: 1
  11194. /* UnicodeHighlighterReasonKind.Invisible */
  11195. };
  11196. case 3: {
  11197. const codePoint = char.codePointAt(0);
  11198. const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint);
  11199. const notAmbiguousInLocales = AmbiguousCharacters.getLocales().filter((l) => !AmbiguousCharacters.getInstance(/* @__PURE__ */ new Set([...options.allowedLocales, l])).isAmbiguous(codePoint));
  11200. return { kind: 0, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales };
  11201. }
  11202. case 1:
  11203. return {
  11204. kind: 2
  11205. /* UnicodeHighlighterReasonKind.NonBasicAscii */
  11206. };
  11207. }
  11208. }
  11209. };
  11210. function buildRegExpCharClassExpr(codePoints, flags) {
  11211. const src = `[${escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(""))}]`;
  11212. return src;
  11213. }
  11214. var CodePointHighlighter = class {
  11215. constructor(options) {
  11216. this.options = options;
  11217. this.allowedCodePoints = new Set(options.allowedCodePoints);
  11218. this.ambiguousCharacters = AmbiguousCharacters.getInstance(new Set(options.allowedLocales));
  11219. }
  11220. getCandidateCodePoints() {
  11221. if (this.options.nonBasicASCII) {
  11222. return "allNonBasicAscii";
  11223. }
  11224. const set = /* @__PURE__ */ new Set();
  11225. if (this.options.invisibleCharacters) {
  11226. for (const cp of InvisibleCharacters.codePoints) {
  11227. if (!isAllowedInvisibleCharacter(String.fromCodePoint(cp))) {
  11228. set.add(cp);
  11229. }
  11230. }
  11231. }
  11232. if (this.options.ambiguousCharacters) {
  11233. for (const cp of this.ambiguousCharacters.getConfusableCodePoints()) {
  11234. set.add(cp);
  11235. }
  11236. }
  11237. for (const cp of this.allowedCodePoints) {
  11238. set.delete(cp);
  11239. }
  11240. return set;
  11241. }
  11242. shouldHighlightNonBasicASCII(character, wordContext) {
  11243. const codePoint = character.codePointAt(0);
  11244. if (this.allowedCodePoints.has(codePoint)) {
  11245. return 0;
  11246. }
  11247. if (this.options.nonBasicASCII) {
  11248. return 1;
  11249. }
  11250. let hasBasicASCIICharacters = false;
  11251. let hasNonConfusableNonBasicAsciiCharacter = false;
  11252. if (wordContext) {
  11253. for (const char of wordContext) {
  11254. const codePoint2 = char.codePointAt(0);
  11255. const isBasicASCII2 = isBasicASCII(char);
  11256. hasBasicASCIICharacters = hasBasicASCIICharacters || isBasicASCII2;
  11257. if (!isBasicASCII2 && !this.ambiguousCharacters.isAmbiguous(codePoint2) && !InvisibleCharacters.isInvisibleCharacter(codePoint2)) {
  11258. hasNonConfusableNonBasicAsciiCharacter = true;
  11259. }
  11260. }
  11261. }
  11262. if (
  11263. /* Don't allow mixing weird looking characters with ASCII */
  11264. !hasBasicASCIICharacters && /* Is there an obviously weird looking character? */
  11265. hasNonConfusableNonBasicAsciiCharacter
  11266. ) {
  11267. return 0;
  11268. }
  11269. if (this.options.invisibleCharacters) {
  11270. if (!isAllowedInvisibleCharacter(character) && InvisibleCharacters.isInvisibleCharacter(codePoint)) {
  11271. return 2;
  11272. }
  11273. }
  11274. if (this.options.ambiguousCharacters) {
  11275. if (this.ambiguousCharacters.isAmbiguous(codePoint)) {
  11276. return 3;
  11277. }
  11278. }
  11279. return 0;
  11280. }
  11281. };
  11282. function isAllowedInvisibleCharacter(character) {
  11283. return character === " " || character === "\n" || character === " ";
  11284. }
  11285. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputer.js
  11286. var LinesDiff = class {
  11287. constructor(changes, hitTimeout) {
  11288. this.changes = changes;
  11289. this.hitTimeout = hitTimeout;
  11290. }
  11291. };
  11292. var LineRangeMapping = class {
  11293. constructor(originalRange, modifiedRange, innerChanges) {
  11294. this.originalRange = originalRange;
  11295. this.modifiedRange = modifiedRange;
  11296. this.innerChanges = innerChanges;
  11297. }
  11298. toString() {
  11299. return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`;
  11300. }
  11301. get changedLineCount() {
  11302. return Math.max(this.originalRange.length, this.modifiedRange.length);
  11303. }
  11304. };
  11305. var RangeMapping = class {
  11306. constructor(originalRange, modifiedRange) {
  11307. this.originalRange = originalRange;
  11308. this.modifiedRange = modifiedRange;
  11309. }
  11310. toString() {
  11311. return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`;
  11312. }
  11313. };
  11314. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/smartLinesDiffComputer.js
  11315. init_strings();
  11316. init_range();
  11317. init_assert();
  11318. init_lineRange();
  11319. var MINIMUM_MATCHING_CHARACTER_LENGTH = 3;
  11320. var SmartLinesDiffComputer = class {
  11321. computeDiff(originalLines, modifiedLines, options) {
  11322. var _a3;
  11323. const diffComputer = new DiffComputer(originalLines, modifiedLines, {
  11324. maxComputationTime: options.maxComputationTimeMs,
  11325. shouldIgnoreTrimWhitespace: options.ignoreTrimWhitespace,
  11326. shouldComputeCharChanges: true,
  11327. shouldMakePrettyDiff: true,
  11328. shouldPostProcessCharChanges: true
  11329. });
  11330. const result = diffComputer.computeDiff();
  11331. const changes = [];
  11332. let lastChange = null;
  11333. for (const c of result.changes) {
  11334. let originalRange;
  11335. if (c.originalEndLineNumber === 0) {
  11336. originalRange = new LineRange(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1);
  11337. } else {
  11338. originalRange = new LineRange(c.originalStartLineNumber, c.originalEndLineNumber + 1);
  11339. }
  11340. let modifiedRange;
  11341. if (c.modifiedEndLineNumber === 0) {
  11342. modifiedRange = new LineRange(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1);
  11343. } else {
  11344. modifiedRange = new LineRange(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1);
  11345. }
  11346. let change = new LineRangeMapping(originalRange, modifiedRange, (_a3 = c.charChanges) === null || _a3 === void 0 ? void 0 : _a3.map((c2) => new RangeMapping(new Range(c2.originalStartLineNumber, c2.originalStartColumn, c2.originalEndLineNumber, c2.originalEndColumn), new Range(c2.modifiedStartLineNumber, c2.modifiedStartColumn, c2.modifiedEndLineNumber, c2.modifiedEndColumn))));
  11347. if (lastChange) {
  11348. if (lastChange.modifiedRange.endLineNumberExclusive === change.modifiedRange.startLineNumber || lastChange.originalRange.endLineNumberExclusive === change.originalRange.startLineNumber) {
  11349. change = new LineRangeMapping(lastChange.originalRange.join(change.originalRange), lastChange.modifiedRange.join(change.modifiedRange), lastChange.innerChanges && change.innerChanges ? lastChange.innerChanges.concat(change.innerChanges) : void 0);
  11350. changes.pop();
  11351. }
  11352. }
  11353. changes.push(change);
  11354. lastChange = change;
  11355. }
  11356. assertFn(() => {
  11357. return checkAdjacentItems(changes, (m1, m2) => m2.originalRange.startLineNumber - m1.originalRange.endLineNumberExclusive === m2.modifiedRange.startLineNumber - m1.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined)
  11358. m1.originalRange.endLineNumberExclusive < m2.originalRange.startLineNumber && m1.modifiedRange.endLineNumberExclusive < m2.modifiedRange.startLineNumber);
  11359. });
  11360. return new LinesDiff(changes, result.quitEarly);
  11361. }
  11362. };
  11363. function computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) {
  11364. const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate);
  11365. return diffAlgo.ComputeDiff(pretty);
  11366. }
  11367. var LineSequence = class {
  11368. constructor(lines) {
  11369. const startColumns = [];
  11370. const endColumns = [];
  11371. for (let i = 0, length = lines.length; i < length; i++) {
  11372. startColumns[i] = getFirstNonBlankColumn(lines[i], 1);
  11373. endColumns[i] = getLastNonBlankColumn(lines[i], 1);
  11374. }
  11375. this.lines = lines;
  11376. this._startColumns = startColumns;
  11377. this._endColumns = endColumns;
  11378. }
  11379. getElements() {
  11380. const elements = [];
  11381. for (let i = 0, len = this.lines.length; i < len; i++) {
  11382. elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1);
  11383. }
  11384. return elements;
  11385. }
  11386. getStrictElement(index) {
  11387. return this.lines[index];
  11388. }
  11389. getStartLineNumber(i) {
  11390. return i + 1;
  11391. }
  11392. getEndLineNumber(i) {
  11393. return i + 1;
  11394. }
  11395. createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) {
  11396. const charCodes = [];
  11397. const lineNumbers = [];
  11398. const columns = [];
  11399. let len = 0;
  11400. for (let index = startIndex; index <= endIndex; index++) {
  11401. const lineContent = this.lines[index];
  11402. const startColumn = shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1;
  11403. const endColumn = shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1;
  11404. for (let col = startColumn; col < endColumn; col++) {
  11405. charCodes[len] = lineContent.charCodeAt(col - 1);
  11406. lineNumbers[len] = index + 1;
  11407. columns[len] = col;
  11408. len++;
  11409. }
  11410. if (!shouldIgnoreTrimWhitespace && index < endIndex) {
  11411. charCodes[len] = 10;
  11412. lineNumbers[len] = index + 1;
  11413. columns[len] = lineContent.length + 1;
  11414. len++;
  11415. }
  11416. }
  11417. return new CharSequence(charCodes, lineNumbers, columns);
  11418. }
  11419. };
  11420. var CharSequence = class {
  11421. constructor(charCodes, lineNumbers, columns) {
  11422. this._charCodes = charCodes;
  11423. this._lineNumbers = lineNumbers;
  11424. this._columns = columns;
  11425. }
  11426. toString() {
  11427. return "[" + this._charCodes.map((s, idx) => (s === 10 ? "\\n" : String.fromCharCode(s)) + `-(${this._lineNumbers[idx]},${this._columns[idx]})`).join(", ") + "]";
  11428. }
  11429. _assertIndex(index, arr) {
  11430. if (index < 0 || index >= arr.length) {
  11431. throw new Error(`Illegal index`);
  11432. }
  11433. }
  11434. getElements() {
  11435. return this._charCodes;
  11436. }
  11437. getStartLineNumber(i) {
  11438. if (i > 0 && i === this._lineNumbers.length) {
  11439. return this.getEndLineNumber(i - 1);
  11440. }
  11441. this._assertIndex(i, this._lineNumbers);
  11442. return this._lineNumbers[i];
  11443. }
  11444. getEndLineNumber(i) {
  11445. if (i === -1) {
  11446. return this.getStartLineNumber(i + 1);
  11447. }
  11448. this._assertIndex(i, this._lineNumbers);
  11449. if (this._charCodes[i] === 10) {
  11450. return this._lineNumbers[i] + 1;
  11451. }
  11452. return this._lineNumbers[i];
  11453. }
  11454. getStartColumn(i) {
  11455. if (i > 0 && i === this._columns.length) {
  11456. return this.getEndColumn(i - 1);
  11457. }
  11458. this._assertIndex(i, this._columns);
  11459. return this._columns[i];
  11460. }
  11461. getEndColumn(i) {
  11462. if (i === -1) {
  11463. return this.getStartColumn(i + 1);
  11464. }
  11465. this._assertIndex(i, this._columns);
  11466. if (this._charCodes[i] === 10) {
  11467. return 1;
  11468. }
  11469. return this._columns[i] + 1;
  11470. }
  11471. };
  11472. var CharChange = class _CharChange {
  11473. constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) {
  11474. this.originalStartLineNumber = originalStartLineNumber;
  11475. this.originalStartColumn = originalStartColumn;
  11476. this.originalEndLineNumber = originalEndLineNumber;
  11477. this.originalEndColumn = originalEndColumn;
  11478. this.modifiedStartLineNumber = modifiedStartLineNumber;
  11479. this.modifiedStartColumn = modifiedStartColumn;
  11480. this.modifiedEndLineNumber = modifiedEndLineNumber;
  11481. this.modifiedEndColumn = modifiedEndColumn;
  11482. }
  11483. static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) {
  11484. const originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart);
  11485. const originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart);
  11486. const originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);
  11487. const originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1);
  11488. const modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart);
  11489. const modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart);
  11490. const modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);
  11491. const modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1);
  11492. return new _CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn);
  11493. }
  11494. };
  11495. function postProcessCharChanges(rawChanges) {
  11496. if (rawChanges.length <= 1) {
  11497. return rawChanges;
  11498. }
  11499. const result = [rawChanges[0]];
  11500. let prevChange = result[0];
  11501. for (let i = 1, len = rawChanges.length; i < len; i++) {
  11502. const currChange = rawChanges[i];
  11503. const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength);
  11504. const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength);
  11505. const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength);
  11506. if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) {
  11507. prevChange.originalLength = currChange.originalStart + currChange.originalLength - prevChange.originalStart;
  11508. prevChange.modifiedLength = currChange.modifiedStart + currChange.modifiedLength - prevChange.modifiedStart;
  11509. } else {
  11510. result.push(currChange);
  11511. prevChange = currChange;
  11512. }
  11513. }
  11514. return result;
  11515. }
  11516. var LineChange = class _LineChange {
  11517. constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) {
  11518. this.originalStartLineNumber = originalStartLineNumber;
  11519. this.originalEndLineNumber = originalEndLineNumber;
  11520. this.modifiedStartLineNumber = modifiedStartLineNumber;
  11521. this.modifiedEndLineNumber = modifiedEndLineNumber;
  11522. this.charChanges = charChanges;
  11523. }
  11524. static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) {
  11525. let originalStartLineNumber;
  11526. let originalEndLineNumber;
  11527. let modifiedStartLineNumber;
  11528. let modifiedEndLineNumber;
  11529. let charChanges = void 0;
  11530. if (diffChange.originalLength === 0) {
  11531. originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1;
  11532. originalEndLineNumber = 0;
  11533. } else {
  11534. originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart);
  11535. originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1);
  11536. }
  11537. if (diffChange.modifiedLength === 0) {
  11538. modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1;
  11539. modifiedEndLineNumber = 0;
  11540. } else {
  11541. modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart);
  11542. modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1);
  11543. }
  11544. if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) {
  11545. const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1);
  11546. const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1);
  11547. if (originalCharSequence.getElements().length > 0 && modifiedCharSequence.getElements().length > 0) {
  11548. let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes;
  11549. if (shouldPostProcessCharChanges) {
  11550. rawChanges = postProcessCharChanges(rawChanges);
  11551. }
  11552. charChanges = [];
  11553. for (let i = 0, length = rawChanges.length; i < length; i++) {
  11554. charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence));
  11555. }
  11556. }
  11557. }
  11558. return new _LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges);
  11559. }
  11560. };
  11561. var DiffComputer = class {
  11562. constructor(originalLines, modifiedLines, opts) {
  11563. this.shouldComputeCharChanges = opts.shouldComputeCharChanges;
  11564. this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges;
  11565. this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace;
  11566. this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff;
  11567. this.originalLines = originalLines;
  11568. this.modifiedLines = modifiedLines;
  11569. this.original = new LineSequence(originalLines);
  11570. this.modified = new LineSequence(modifiedLines);
  11571. this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime);
  11572. this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5e3));
  11573. }
  11574. computeDiff() {
  11575. if (this.original.lines.length === 1 && this.original.lines[0].length === 0) {
  11576. if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {
  11577. return {
  11578. quitEarly: false,
  11579. changes: []
  11580. };
  11581. }
  11582. return {
  11583. quitEarly: false,
  11584. changes: [{
  11585. originalStartLineNumber: 1,
  11586. originalEndLineNumber: 1,
  11587. modifiedStartLineNumber: 1,
  11588. modifiedEndLineNumber: this.modified.lines.length,
  11589. charChanges: void 0
  11590. }]
  11591. };
  11592. }
  11593. if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {
  11594. return {
  11595. quitEarly: false,
  11596. changes: [{
  11597. originalStartLineNumber: 1,
  11598. originalEndLineNumber: this.original.lines.length,
  11599. modifiedStartLineNumber: 1,
  11600. modifiedEndLineNumber: 1,
  11601. charChanges: void 0
  11602. }]
  11603. };
  11604. }
  11605. const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff);
  11606. const rawChanges = diffResult.changes;
  11607. const quitEarly = diffResult.quitEarly;
  11608. if (this.shouldIgnoreTrimWhitespace) {
  11609. const lineChanges = [];
  11610. for (let i = 0, length = rawChanges.length; i < length; i++) {
  11611. lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));
  11612. }
  11613. return {
  11614. quitEarly,
  11615. changes: lineChanges
  11616. };
  11617. }
  11618. const result = [];
  11619. let originalLineIndex = 0;
  11620. let modifiedLineIndex = 0;
  11621. for (let i = -1, len = rawChanges.length; i < len; i++) {
  11622. const nextChange = i + 1 < len ? rawChanges[i + 1] : null;
  11623. const originalStop = nextChange ? nextChange.originalStart : this.originalLines.length;
  11624. const modifiedStop = nextChange ? nextChange.modifiedStart : this.modifiedLines.length;
  11625. while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) {
  11626. const originalLine = this.originalLines[originalLineIndex];
  11627. const modifiedLine = this.modifiedLines[modifiedLineIndex];
  11628. if (originalLine !== modifiedLine) {
  11629. {
  11630. let originalStartColumn = getFirstNonBlankColumn(originalLine, 1);
  11631. let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1);
  11632. while (originalStartColumn > 1 && modifiedStartColumn > 1) {
  11633. const originalChar = originalLine.charCodeAt(originalStartColumn - 2);
  11634. const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2);
  11635. if (originalChar !== modifiedChar) {
  11636. break;
  11637. }
  11638. originalStartColumn--;
  11639. modifiedStartColumn--;
  11640. }
  11641. if (originalStartColumn > 1 || modifiedStartColumn > 1) {
  11642. this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn);
  11643. }
  11644. }
  11645. {
  11646. let originalEndColumn = getLastNonBlankColumn(originalLine, 1);
  11647. let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1);
  11648. const originalMaxColumn = originalLine.length + 1;
  11649. const modifiedMaxColumn = modifiedLine.length + 1;
  11650. while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) {
  11651. const originalChar = originalLine.charCodeAt(originalEndColumn - 1);
  11652. const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1);
  11653. if (originalChar !== modifiedChar) {
  11654. break;
  11655. }
  11656. originalEndColumn++;
  11657. modifiedEndColumn++;
  11658. }
  11659. if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) {
  11660. this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn);
  11661. }
  11662. }
  11663. }
  11664. originalLineIndex++;
  11665. modifiedLineIndex++;
  11666. }
  11667. if (nextChange) {
  11668. result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));
  11669. originalLineIndex += nextChange.originalLength;
  11670. modifiedLineIndex += nextChange.modifiedLength;
  11671. }
  11672. }
  11673. return {
  11674. quitEarly,
  11675. changes: result
  11676. };
  11677. }
  11678. _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {
  11679. if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) {
  11680. return;
  11681. }
  11682. let charChanges = void 0;
  11683. if (this.shouldComputeCharChanges) {
  11684. charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)];
  11685. }
  11686. result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges));
  11687. }
  11688. _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) {
  11689. const len = result.length;
  11690. if (len === 0) {
  11691. return false;
  11692. }
  11693. const prevChange = result[len - 1];
  11694. if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) {
  11695. return false;
  11696. }
  11697. if (prevChange.originalEndLineNumber === originalLineNumber && prevChange.modifiedEndLineNumber === modifiedLineNumber) {
  11698. if (this.shouldComputeCharChanges && prevChange.charChanges) {
  11699. prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));
  11700. }
  11701. return true;
  11702. }
  11703. if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) {
  11704. prevChange.originalEndLineNumber = originalLineNumber;
  11705. prevChange.modifiedEndLineNumber = modifiedLineNumber;
  11706. if (this.shouldComputeCharChanges && prevChange.charChanges) {
  11707. prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn));
  11708. }
  11709. return true;
  11710. }
  11711. return false;
  11712. }
  11713. };
  11714. function getFirstNonBlankColumn(txt, defaultValue) {
  11715. const r = firstNonWhitespaceIndex(txt);
  11716. if (r === -1) {
  11717. return defaultValue;
  11718. }
  11719. return r + 1;
  11720. }
  11721. function getLastNonBlankColumn(txt, defaultValue) {
  11722. const r = lastNonWhitespaceIndex(txt);
  11723. if (r === -1) {
  11724. return defaultValue;
  11725. }
  11726. return r + 2;
  11727. }
  11728. function createContinueProcessingPredicate(maximumRuntime) {
  11729. if (maximumRuntime === 0) {
  11730. return () => true;
  11731. }
  11732. const startTime = Date.now();
  11733. return () => {
  11734. return Date.now() - startTime < maximumRuntime;
  11735. };
  11736. }
  11737. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/standardLinesDiffComputer.js
  11738. init_assert();
  11739. init_lineRange();
  11740. init_offsetRange();
  11741. init_position();
  11742. init_range();
  11743. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/diffAlgorithm.js
  11744. init_errors();
  11745. init_offsetRange();
  11746. var DiffAlgorithmResult = class _DiffAlgorithmResult {
  11747. static trivial(seq1, seq2) {
  11748. return new _DiffAlgorithmResult([new SequenceDiff(new OffsetRange(0, seq1.length), new OffsetRange(0, seq2.length))], false);
  11749. }
  11750. static trivialTimedOut(seq1, seq2) {
  11751. return new _DiffAlgorithmResult([new SequenceDiff(new OffsetRange(0, seq1.length), new OffsetRange(0, seq2.length))], true);
  11752. }
  11753. constructor(diffs, hitTimeout) {
  11754. this.diffs = diffs;
  11755. this.hitTimeout = hitTimeout;
  11756. }
  11757. };
  11758. var SequenceDiff = class _SequenceDiff {
  11759. constructor(seq1Range, seq2Range) {
  11760. this.seq1Range = seq1Range;
  11761. this.seq2Range = seq2Range;
  11762. }
  11763. reverse() {
  11764. return new _SequenceDiff(this.seq2Range, this.seq1Range);
  11765. }
  11766. toString() {
  11767. return `${this.seq1Range} <-> ${this.seq2Range}`;
  11768. }
  11769. join(other) {
  11770. return new _SequenceDiff(this.seq1Range.join(other.seq1Range), this.seq2Range.join(other.seq2Range));
  11771. }
  11772. };
  11773. var InfiniteTimeout = class {
  11774. isValid() {
  11775. return true;
  11776. }
  11777. };
  11778. InfiniteTimeout.instance = new InfiniteTimeout();
  11779. var DateTimeout = class {
  11780. constructor(timeout) {
  11781. this.timeout = timeout;
  11782. this.startTime = Date.now();
  11783. this.valid = true;
  11784. if (timeout <= 0) {
  11785. throw new BugIndicatingError("timeout must be positive");
  11786. }
  11787. }
  11788. // Recommendation: Set a log-point `{this.disable()}` in the body
  11789. isValid() {
  11790. const valid = Date.now() - this.startTime < this.timeout;
  11791. if (!valid && this.valid) {
  11792. this.valid = false;
  11793. debugger;
  11794. }
  11795. return this.valid;
  11796. }
  11797. };
  11798. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/dynamicProgrammingDiffing.js
  11799. init_offsetRange();
  11800. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/utils.js
  11801. var Array2D = class {
  11802. constructor(width, height) {
  11803. this.width = width;
  11804. this.height = height;
  11805. this.array = [];
  11806. this.array = new Array(width * height);
  11807. }
  11808. get(x, y) {
  11809. return this.array[x + y * this.width];
  11810. }
  11811. set(x, y, value) {
  11812. this.array[x + y * this.width] = value;
  11813. }
  11814. };
  11815. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/dynamicProgrammingDiffing.js
  11816. var DynamicProgrammingDiffing = class {
  11817. compute(sequence1, sequence2, timeout = InfiniteTimeout.instance, equalityScore) {
  11818. if (sequence1.length === 0 || sequence2.length === 0) {
  11819. return DiffAlgorithmResult.trivial(sequence1, sequence2);
  11820. }
  11821. const lcsLengths = new Array2D(sequence1.length, sequence2.length);
  11822. const directions = new Array2D(sequence1.length, sequence2.length);
  11823. const lengths = new Array2D(sequence1.length, sequence2.length);
  11824. for (let s12 = 0; s12 < sequence1.length; s12++) {
  11825. for (let s22 = 0; s22 < sequence2.length; s22++) {
  11826. if (!timeout.isValid()) {
  11827. return DiffAlgorithmResult.trivialTimedOut(sequence1, sequence2);
  11828. }
  11829. const horizontalLen = s12 === 0 ? 0 : lcsLengths.get(s12 - 1, s22);
  11830. const verticalLen = s22 === 0 ? 0 : lcsLengths.get(s12, s22 - 1);
  11831. let extendedSeqScore;
  11832. if (sequence1.getElement(s12) === sequence2.getElement(s22)) {
  11833. if (s12 === 0 || s22 === 0) {
  11834. extendedSeqScore = 0;
  11835. } else {
  11836. extendedSeqScore = lcsLengths.get(s12 - 1, s22 - 1);
  11837. }
  11838. if (s12 > 0 && s22 > 0 && directions.get(s12 - 1, s22 - 1) === 3) {
  11839. extendedSeqScore += lengths.get(s12 - 1, s22 - 1);
  11840. }
  11841. extendedSeqScore += equalityScore ? equalityScore(s12, s22) : 1;
  11842. } else {
  11843. extendedSeqScore = -1;
  11844. }
  11845. const newValue = Math.max(horizontalLen, verticalLen, extendedSeqScore);
  11846. if (newValue === extendedSeqScore) {
  11847. const prevLen = s12 > 0 && s22 > 0 ? lengths.get(s12 - 1, s22 - 1) : 0;
  11848. lengths.set(s12, s22, prevLen + 1);
  11849. directions.set(s12, s22, 3);
  11850. } else if (newValue === horizontalLen) {
  11851. lengths.set(s12, s22, 0);
  11852. directions.set(s12, s22, 1);
  11853. } else if (newValue === verticalLen) {
  11854. lengths.set(s12, s22, 0);
  11855. directions.set(s12, s22, 2);
  11856. }
  11857. lcsLengths.set(s12, s22, newValue);
  11858. }
  11859. }
  11860. const result = [];
  11861. let lastAligningPosS1 = sequence1.length;
  11862. let lastAligningPosS2 = sequence2.length;
  11863. function reportDecreasingAligningPositions(s12, s22) {
  11864. if (s12 + 1 !== lastAligningPosS1 || s22 + 1 !== lastAligningPosS2) {
  11865. result.push(new SequenceDiff(new OffsetRange(s12 + 1, lastAligningPosS1), new OffsetRange(s22 + 1, lastAligningPosS2)));
  11866. }
  11867. lastAligningPosS1 = s12;
  11868. lastAligningPosS2 = s22;
  11869. }
  11870. let s1 = sequence1.length - 1;
  11871. let s2 = sequence2.length - 1;
  11872. while (s1 >= 0 && s2 >= 0) {
  11873. if (directions.get(s1, s2) === 3) {
  11874. reportDecreasingAligningPositions(s1, s2);
  11875. s1--;
  11876. s2--;
  11877. } else {
  11878. if (directions.get(s1, s2) === 1) {
  11879. s1--;
  11880. } else {
  11881. s2--;
  11882. }
  11883. }
  11884. }
  11885. reportDecreasingAligningPositions(-1, -1);
  11886. result.reverse();
  11887. return new DiffAlgorithmResult(result, false);
  11888. }
  11889. };
  11890. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/joinSequenceDiffs.js
  11891. init_offsetRange();
  11892. function optimizeSequenceDiffs(sequence1, sequence2, sequenceDiffs) {
  11893. let result = sequenceDiffs;
  11894. result = joinSequenceDiffs(sequence1, sequence2, result);
  11895. result = shiftSequenceDiffs(sequence1, sequence2, result);
  11896. return result;
  11897. }
  11898. function smoothenSequenceDiffs(sequence1, sequence2, sequenceDiffs) {
  11899. const result = [];
  11900. for (const s of sequenceDiffs) {
  11901. const last = result[result.length - 1];
  11902. if (!last) {
  11903. result.push(s);
  11904. continue;
  11905. }
  11906. if (s.seq1Range.start - last.seq1Range.endExclusive <= 2 || s.seq2Range.start - last.seq2Range.endExclusive <= 2) {
  11907. result[result.length - 1] = new SequenceDiff(last.seq1Range.join(s.seq1Range), last.seq2Range.join(s.seq2Range));
  11908. } else {
  11909. result.push(s);
  11910. }
  11911. }
  11912. return result;
  11913. }
  11914. function joinSequenceDiffs(sequence1, sequence2, sequenceDiffs) {
  11915. const result = [];
  11916. if (sequenceDiffs.length > 0) {
  11917. result.push(sequenceDiffs[0]);
  11918. }
  11919. for (let i = 1; i < sequenceDiffs.length; i++) {
  11920. const lastResult = result[result.length - 1];
  11921. const cur = sequenceDiffs[i];
  11922. if (cur.seq1Range.isEmpty) {
  11923. let all = true;
  11924. const length = cur.seq1Range.start - lastResult.seq1Range.endExclusive;
  11925. for (let i2 = 1; i2 <= length; i2++) {
  11926. if (sequence2.getElement(cur.seq2Range.start - i2) !== sequence2.getElement(cur.seq2Range.endExclusive - i2)) {
  11927. all = false;
  11928. break;
  11929. }
  11930. }
  11931. if (all) {
  11932. result[result.length - 1] = new SequenceDiff(lastResult.seq1Range, new OffsetRange(lastResult.seq2Range.start, cur.seq2Range.endExclusive - length));
  11933. continue;
  11934. }
  11935. }
  11936. result.push(cur);
  11937. }
  11938. return result;
  11939. }
  11940. function shiftSequenceDiffs(sequence1, sequence2, sequenceDiffs) {
  11941. if (!sequence1.getBoundaryScore || !sequence2.getBoundaryScore) {
  11942. return sequenceDiffs;
  11943. }
  11944. for (let i = 0; i < sequenceDiffs.length; i++) {
  11945. const diff = sequenceDiffs[i];
  11946. if (diff.seq1Range.isEmpty) {
  11947. const seq2PrevEndExclusive = i > 0 ? sequenceDiffs[i - 1].seq2Range.endExclusive : -1;
  11948. const seq2NextStart = i + 1 < sequenceDiffs.length ? sequenceDiffs[i + 1].seq2Range.start : sequence2.length;
  11949. sequenceDiffs[i] = shiftDiffToBetterPosition(diff, sequence1, sequence2, seq2NextStart, seq2PrevEndExclusive);
  11950. } else if (diff.seq2Range.isEmpty) {
  11951. const seq1PrevEndExclusive = i > 0 ? sequenceDiffs[i - 1].seq1Range.endExclusive : -1;
  11952. const seq1NextStart = i + 1 < sequenceDiffs.length ? sequenceDiffs[i + 1].seq1Range.start : sequence1.length;
  11953. sequenceDiffs[i] = shiftDiffToBetterPosition(diff.reverse(), sequence2, sequence1, seq1NextStart, seq1PrevEndExclusive).reverse();
  11954. }
  11955. }
  11956. return sequenceDiffs;
  11957. }
  11958. function shiftDiffToBetterPosition(diff, sequence1, sequence2, seq2NextStart, seq2PrevEndExclusive) {
  11959. const maxShiftLimit = 20;
  11960. let deltaBefore = 1;
  11961. while (diff.seq2Range.start - deltaBefore > seq2PrevEndExclusive && sequence2.getElement(diff.seq2Range.start - deltaBefore) === sequence2.getElement(diff.seq2Range.endExclusive - deltaBefore) && deltaBefore < maxShiftLimit) {
  11962. deltaBefore++;
  11963. }
  11964. deltaBefore--;
  11965. let deltaAfter = 0;
  11966. while (diff.seq2Range.start + deltaAfter < seq2NextStart && sequence2.getElement(diff.seq2Range.start + deltaAfter) === sequence2.getElement(diff.seq2Range.endExclusive + deltaAfter) && deltaAfter < maxShiftLimit) {
  11967. deltaAfter++;
  11968. }
  11969. if (deltaBefore === 0 && deltaAfter === 0) {
  11970. return diff;
  11971. }
  11972. let bestDelta = 0;
  11973. let bestScore = -1;
  11974. for (let delta = -deltaBefore; delta <= deltaAfter; delta++) {
  11975. const seq2OffsetStart = diff.seq2Range.start + delta;
  11976. const seq2OffsetEndExclusive = diff.seq2Range.endExclusive + delta;
  11977. const seq1Offset = diff.seq1Range.start + delta;
  11978. const score2 = sequence1.getBoundaryScore(seq1Offset) + sequence2.getBoundaryScore(seq2OffsetStart) + sequence2.getBoundaryScore(seq2OffsetEndExclusive);
  11979. if (score2 > bestScore) {
  11980. bestScore = score2;
  11981. bestDelta = delta;
  11982. }
  11983. }
  11984. if (bestDelta !== 0) {
  11985. return new SequenceDiff(diff.seq1Range.delta(bestDelta), diff.seq2Range.delta(bestDelta));
  11986. }
  11987. return diff;
  11988. }
  11989. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/myersDiffAlgorithm.js
  11990. init_offsetRange();
  11991. var MyersDiffAlgorithm = class {
  11992. compute(seq1, seq2, timeout = InfiniteTimeout.instance) {
  11993. if (seq1.length === 0 || seq2.length === 0) {
  11994. return DiffAlgorithmResult.trivial(seq1, seq2);
  11995. }
  11996. function getXAfterSnake(x, y) {
  11997. while (x < seq1.length && y < seq2.length && seq1.getElement(x) === seq2.getElement(y)) {
  11998. x++;
  11999. y++;
  12000. }
  12001. return x;
  12002. }
  12003. let d = 0;
  12004. const V = new FastInt32Array();
  12005. V.set(0, getXAfterSnake(0, 0));
  12006. const paths = new FastArrayNegativeIndices();
  12007. paths.set(0, V.get(0) === 0 ? null : new SnakePath(null, 0, 0, V.get(0)));
  12008. let k = 0;
  12009. loop:
  12010. while (true) {
  12011. d++;
  12012. for (k = -d; k <= d; k += 2) {
  12013. if (!timeout.isValid()) {
  12014. return DiffAlgorithmResult.trivialTimedOut(seq1, seq2);
  12015. }
  12016. const maxXofDLineTop = k === d ? -1 : V.get(k + 1);
  12017. const maxXofDLineLeft = k === -d ? -1 : V.get(k - 1) + 1;
  12018. const x = Math.min(Math.max(maxXofDLineTop, maxXofDLineLeft), seq1.length);
  12019. const y = x - k;
  12020. const newMaxX = getXAfterSnake(x, y);
  12021. V.set(k, newMaxX);
  12022. const lastPath = x === maxXofDLineTop ? paths.get(k + 1) : paths.get(k - 1);
  12023. paths.set(k, newMaxX !== x ? new SnakePath(lastPath, x, y, newMaxX - x) : lastPath);
  12024. if (V.get(k) === seq1.length && V.get(k) - k === seq2.length) {
  12025. break loop;
  12026. }
  12027. }
  12028. }
  12029. let path = paths.get(k);
  12030. const result = [];
  12031. let lastAligningPosS1 = seq1.length;
  12032. let lastAligningPosS2 = seq2.length;
  12033. while (true) {
  12034. const endX = path ? path.x + path.length : 0;
  12035. const endY = path ? path.y + path.length : 0;
  12036. if (endX !== lastAligningPosS1 || endY !== lastAligningPosS2) {
  12037. result.push(new SequenceDiff(new OffsetRange(endX, lastAligningPosS1), new OffsetRange(endY, lastAligningPosS2)));
  12038. }
  12039. if (!path) {
  12040. break;
  12041. }
  12042. lastAligningPosS1 = path.x;
  12043. lastAligningPosS2 = path.y;
  12044. path = path.prev;
  12045. }
  12046. result.reverse();
  12047. return new DiffAlgorithmResult(result, false);
  12048. }
  12049. };
  12050. var SnakePath = class {
  12051. constructor(prev, x, y, length) {
  12052. this.prev = prev;
  12053. this.x = x;
  12054. this.y = y;
  12055. this.length = length;
  12056. }
  12057. };
  12058. var FastInt32Array = class {
  12059. constructor() {
  12060. this.positiveArr = new Int32Array(10);
  12061. this.negativeArr = new Int32Array(10);
  12062. }
  12063. get(idx) {
  12064. if (idx < 0) {
  12065. idx = -idx - 1;
  12066. return this.negativeArr[idx];
  12067. } else {
  12068. return this.positiveArr[idx];
  12069. }
  12070. }
  12071. set(idx, value) {
  12072. if (idx < 0) {
  12073. idx = -idx - 1;
  12074. if (idx >= this.negativeArr.length) {
  12075. const arr = this.negativeArr;
  12076. this.negativeArr = new Int32Array(arr.length * 2);
  12077. this.negativeArr.set(arr);
  12078. }
  12079. this.negativeArr[idx] = value;
  12080. } else {
  12081. if (idx >= this.positiveArr.length) {
  12082. const arr = this.positiveArr;
  12083. this.positiveArr = new Int32Array(arr.length * 2);
  12084. this.positiveArr.set(arr);
  12085. }
  12086. this.positiveArr[idx] = value;
  12087. }
  12088. }
  12089. };
  12090. var FastArrayNegativeIndices = class {
  12091. constructor() {
  12092. this.positiveArr = [];
  12093. this.negativeArr = [];
  12094. }
  12095. get(idx) {
  12096. if (idx < 0) {
  12097. idx = -idx - 1;
  12098. return this.negativeArr[idx];
  12099. } else {
  12100. return this.positiveArr[idx];
  12101. }
  12102. }
  12103. set(idx, value) {
  12104. if (idx < 0) {
  12105. idx = -idx - 1;
  12106. this.negativeArr[idx] = value;
  12107. } else {
  12108. this.positiveArr[idx] = value;
  12109. }
  12110. }
  12111. };
  12112. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/standardLinesDiffComputer.js
  12113. var StandardLinesDiffComputer = class {
  12114. constructor() {
  12115. this.dynamicProgrammingDiffing = new DynamicProgrammingDiffing();
  12116. this.myersDiffingAlgorithm = new MyersDiffAlgorithm();
  12117. }
  12118. computeDiff(originalLines, modifiedLines, options) {
  12119. const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs);
  12120. const considerWhitespaceChanges = !options.ignoreTrimWhitespace;
  12121. const perfectHashes = /* @__PURE__ */ new Map();
  12122. function getOrCreateHash(text) {
  12123. let hash2 = perfectHashes.get(text);
  12124. if (hash2 === void 0) {
  12125. hash2 = perfectHashes.size;
  12126. perfectHashes.set(text, hash2);
  12127. }
  12128. return hash2;
  12129. }
  12130. const srcDocLines = originalLines.map((l) => getOrCreateHash(l.trim()));
  12131. const tgtDocLines = modifiedLines.map((l) => getOrCreateHash(l.trim()));
  12132. const sequence1 = new LineSequence2(srcDocLines, originalLines);
  12133. const sequence2 = new LineSequence2(tgtDocLines, modifiedLines);
  12134. const lineAlignmentResult = (() => {
  12135. if (sequence1.length + sequence2.length < 1500) {
  12136. return this.dynamicProgrammingDiffing.compute(sequence1, sequence2, timeout, (offset1, offset2) => originalLines[offset1] === modifiedLines[offset2] ? modifiedLines[offset2].length === 0 ? 0.1 : 1 + Math.log(1 + modifiedLines[offset2].length) : 0.99);
  12137. }
  12138. return this.myersDiffingAlgorithm.compute(sequence1, sequence2);
  12139. })();
  12140. let lineAlignments = lineAlignmentResult.diffs;
  12141. let hitTimeout = lineAlignmentResult.hitTimeout;
  12142. lineAlignments = optimizeSequenceDiffs(sequence1, sequence2, lineAlignments);
  12143. const alignments = [];
  12144. const scanForWhitespaceChanges = (equalLinesCount) => {
  12145. if (!considerWhitespaceChanges) {
  12146. return;
  12147. }
  12148. for (let i = 0; i < equalLinesCount; i++) {
  12149. const seq1Offset = seq1LastStart + i;
  12150. const seq2Offset = seq2LastStart + i;
  12151. if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) {
  12152. const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges);
  12153. for (const a of characterDiffs.mappings) {
  12154. alignments.push(a);
  12155. }
  12156. if (characterDiffs.hitTimeout) {
  12157. hitTimeout = true;
  12158. }
  12159. }
  12160. }
  12161. };
  12162. let seq1LastStart = 0;
  12163. let seq2LastStart = 0;
  12164. for (const diff of lineAlignments) {
  12165. assertFn(() => diff.seq1Range.start - seq1LastStart === diff.seq2Range.start - seq2LastStart);
  12166. const equalLinesCount = diff.seq1Range.start - seq1LastStart;
  12167. scanForWhitespaceChanges(equalLinesCount);
  12168. seq1LastStart = diff.seq1Range.endExclusive;
  12169. seq2LastStart = diff.seq2Range.endExclusive;
  12170. const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges);
  12171. if (characterDiffs.hitTimeout) {
  12172. hitTimeout = true;
  12173. }
  12174. for (const a of characterDiffs.mappings) {
  12175. alignments.push(a);
  12176. }
  12177. }
  12178. scanForWhitespaceChanges(originalLines.length - seq1LastStart);
  12179. const changes = lineRangeMappingFromRangeMappings(alignments, originalLines, modifiedLines);
  12180. return new LinesDiff(changes, hitTimeout);
  12181. }
  12182. refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges) {
  12183. const sourceSlice = new Slice(originalLines, diff.seq1Range, considerWhitespaceChanges);
  12184. const targetSlice = new Slice(modifiedLines, diff.seq2Range, considerWhitespaceChanges);
  12185. const diffResult = sourceSlice.length + targetSlice.length < 500 ? this.dynamicProgrammingDiffing.compute(sourceSlice, targetSlice, timeout) : this.myersDiffingAlgorithm.compute(sourceSlice, targetSlice, timeout);
  12186. let diffs = diffResult.diffs;
  12187. diffs = optimizeSequenceDiffs(sourceSlice, targetSlice, diffs);
  12188. diffs = coverFullWords(sourceSlice, targetSlice, diffs);
  12189. diffs = smoothenSequenceDiffs(sourceSlice, targetSlice, diffs);
  12190. const result = diffs.map((d) => new RangeMapping(sourceSlice.translateRange(d.seq1Range), targetSlice.translateRange(d.seq2Range)));
  12191. return {
  12192. mappings: result,
  12193. hitTimeout: diffResult.hitTimeout
  12194. };
  12195. }
  12196. };
  12197. function coverFullWords(sequence1, sequence2, sequenceDiffs) {
  12198. const additional = [];
  12199. let lastModifiedWord = void 0;
  12200. function maybePushWordToAdditional() {
  12201. if (!lastModifiedWord) {
  12202. return;
  12203. }
  12204. const originalLength1 = lastModifiedWord.s1Range.length - lastModifiedWord.deleted;
  12205. const originalLength2 = lastModifiedWord.s2Range.length - lastModifiedWord.added;
  12206. if (originalLength1 !== originalLength2) {
  12207. }
  12208. if (Math.max(lastModifiedWord.deleted, lastModifiedWord.added) + (lastModifiedWord.count - 1) > originalLength1) {
  12209. additional.push(new SequenceDiff(lastModifiedWord.s1Range, lastModifiedWord.s2Range));
  12210. }
  12211. lastModifiedWord = void 0;
  12212. }
  12213. for (const s of sequenceDiffs) {
  12214. let processWord = function(s1Range, s2Range) {
  12215. var _a3, _b, _c, _d;
  12216. if (!lastModifiedWord || !lastModifiedWord.s1Range.containsRange(s1Range) || !lastModifiedWord.s2Range.containsRange(s2Range)) {
  12217. if (lastModifiedWord && !(lastModifiedWord.s1Range.endExclusive < s1Range.start && lastModifiedWord.s2Range.endExclusive < s2Range.start)) {
  12218. const s1Added = OffsetRange.tryCreate(lastModifiedWord.s1Range.endExclusive, s1Range.start);
  12219. const s2Added = OffsetRange.tryCreate(lastModifiedWord.s2Range.endExclusive, s2Range.start);
  12220. lastModifiedWord.deleted += (_a3 = s1Added === null || s1Added === void 0 ? void 0 : s1Added.length) !== null && _a3 !== void 0 ? _a3 : 0;
  12221. lastModifiedWord.added += (_b = s2Added === null || s2Added === void 0 ? void 0 : s2Added.length) !== null && _b !== void 0 ? _b : 0;
  12222. lastModifiedWord.s1Range = lastModifiedWord.s1Range.join(s1Range);
  12223. lastModifiedWord.s2Range = lastModifiedWord.s2Range.join(s2Range);
  12224. } else {
  12225. maybePushWordToAdditional();
  12226. lastModifiedWord = { added: 0, deleted: 0, count: 0, s1Range, s2Range };
  12227. }
  12228. }
  12229. const changedS1 = s1Range.intersect(s.seq1Range);
  12230. const changedS2 = s2Range.intersect(s.seq2Range);
  12231. lastModifiedWord.count++;
  12232. lastModifiedWord.deleted += (_c = changedS1 === null || changedS1 === void 0 ? void 0 : changedS1.length) !== null && _c !== void 0 ? _c : 0;
  12233. lastModifiedWord.added += (_d = changedS2 === null || changedS2 === void 0 ? void 0 : changedS2.length) !== null && _d !== void 0 ? _d : 0;
  12234. };
  12235. const w1Before = sequence1.findWordContaining(s.seq1Range.start - 1);
  12236. const w2Before = sequence2.findWordContaining(s.seq2Range.start - 1);
  12237. const w1After = sequence1.findWordContaining(s.seq1Range.endExclusive);
  12238. const w2After = sequence2.findWordContaining(s.seq2Range.endExclusive);
  12239. if (w1Before && w1After && w2Before && w2After && w1Before.equals(w1After) && w2Before.equals(w2After)) {
  12240. processWord(w1Before, w2Before);
  12241. } else {
  12242. if (w1Before && w2Before) {
  12243. processWord(w1Before, w2Before);
  12244. }
  12245. if (w1After && w2After) {
  12246. processWord(w1After, w2After);
  12247. }
  12248. }
  12249. }
  12250. maybePushWordToAdditional();
  12251. const merged = mergeSequenceDiffs(sequenceDiffs, additional);
  12252. return merged;
  12253. }
  12254. function mergeSequenceDiffs(sequenceDiffs1, sequenceDiffs2) {
  12255. const result = [];
  12256. while (sequenceDiffs1.length > 0 || sequenceDiffs2.length > 0) {
  12257. const sd1 = sequenceDiffs1[0];
  12258. const sd2 = sequenceDiffs2[0];
  12259. let next;
  12260. if (sd1 && (!sd2 || sd1.seq1Range.start < sd2.seq1Range.start)) {
  12261. next = sequenceDiffs1.shift();
  12262. } else {
  12263. next = sequenceDiffs2.shift();
  12264. }
  12265. if (result.length > 0 && result[result.length - 1].seq1Range.endExclusive >= next.seq1Range.start) {
  12266. result[result.length - 1] = result[result.length - 1].join(next);
  12267. } else {
  12268. result.push(next);
  12269. }
  12270. }
  12271. return result;
  12272. }
  12273. function lineRangeMappingFromRangeMappings(alignments, originalLines, modifiedLines) {
  12274. const changes = [];
  12275. for (const g of group(alignments.map((a) => getLineRangeMapping(a, originalLines, modifiedLines)), (a1, a2) => a1.originalRange.overlapOrTouch(a2.originalRange) || a1.modifiedRange.overlapOrTouch(a2.modifiedRange))) {
  12276. const first = g[0];
  12277. const last = g[g.length - 1];
  12278. changes.push(new LineRangeMapping(first.originalRange.join(last.originalRange), first.modifiedRange.join(last.modifiedRange), g.map((a) => a.innerChanges[0])));
  12279. }
  12280. assertFn(() => {
  12281. return checkAdjacentItems(changes, (m1, m2) => m2.originalRange.startLineNumber - m1.originalRange.endLineNumberExclusive === m2.modifiedRange.startLineNumber - m1.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined)
  12282. m1.originalRange.endLineNumberExclusive < m2.originalRange.startLineNumber && m1.modifiedRange.endLineNumberExclusive < m2.modifiedRange.startLineNumber);
  12283. });
  12284. return changes;
  12285. }
  12286. function getLineRangeMapping(rangeMapping, originalLines, modifiedLines) {
  12287. let lineStartDelta = 0;
  12288. let lineEndDelta = 0;
  12289. if (rangeMapping.modifiedRange.startColumn - 1 >= modifiedLines[rangeMapping.modifiedRange.startLineNumber - 1].length && rangeMapping.originalRange.startColumn - 1 >= originalLines[rangeMapping.originalRange.startLineNumber - 1].length) {
  12290. lineStartDelta = 1;
  12291. }
  12292. if (rangeMapping.modifiedRange.endColumn === 1 && rangeMapping.originalRange.endColumn === 1 && rangeMapping.originalRange.startLineNumber + lineStartDelta <= rangeMapping.originalRange.endLineNumber && rangeMapping.modifiedRange.startLineNumber + lineStartDelta <= rangeMapping.modifiedRange.endLineNumber) {
  12293. lineEndDelta = -1;
  12294. }
  12295. const originalLineRange = new LineRange(rangeMapping.originalRange.startLineNumber + lineStartDelta, rangeMapping.originalRange.endLineNumber + 1 + lineEndDelta);
  12296. const modifiedLineRange = new LineRange(rangeMapping.modifiedRange.startLineNumber + lineStartDelta, rangeMapping.modifiedRange.endLineNumber + 1 + lineEndDelta);
  12297. return new LineRangeMapping(originalLineRange, modifiedLineRange, [rangeMapping]);
  12298. }
  12299. function* group(items, shouldBeGrouped) {
  12300. let currentGroup;
  12301. let last;
  12302. for (const item of items) {
  12303. if (last !== void 0 && shouldBeGrouped(last, item)) {
  12304. currentGroup.push(item);
  12305. } else {
  12306. if (currentGroup) {
  12307. yield currentGroup;
  12308. }
  12309. currentGroup = [item];
  12310. }
  12311. last = item;
  12312. }
  12313. if (currentGroup) {
  12314. yield currentGroup;
  12315. }
  12316. }
  12317. var LineSequence2 = class {
  12318. constructor(trimmedHash, lines) {
  12319. this.trimmedHash = trimmedHash;
  12320. this.lines = lines;
  12321. }
  12322. getElement(offset) {
  12323. return this.trimmedHash[offset];
  12324. }
  12325. get length() {
  12326. return this.trimmedHash.length;
  12327. }
  12328. getBoundaryScore(length) {
  12329. const indentationBefore = length === 0 ? 0 : getIndentation(this.lines[length - 1]);
  12330. const indentationAfter = length === this.lines.length ? 0 : getIndentation(this.lines[length]);
  12331. return 1e3 - (indentationBefore + indentationAfter);
  12332. }
  12333. };
  12334. function getIndentation(str) {
  12335. let i = 0;
  12336. while (i < str.length && (str.charCodeAt(i) === 32 || str.charCodeAt(i) === 9)) {
  12337. i++;
  12338. }
  12339. return i;
  12340. }
  12341. var Slice = class {
  12342. constructor(lines, lineRange, considerWhitespaceChanges) {
  12343. this.lines = lines;
  12344. this.considerWhitespaceChanges = considerWhitespaceChanges;
  12345. this.elements = [];
  12346. this.firstCharOffsetByLineMinusOne = [];
  12347. this.offsetByLine = [];
  12348. let trimFirstLineFully = false;
  12349. if (lineRange.start > 0 && lineRange.endExclusive >= lines.length) {
  12350. lineRange = new OffsetRange(lineRange.start - 1, lineRange.endExclusive);
  12351. trimFirstLineFully = true;
  12352. }
  12353. this.lineRange = lineRange;
  12354. for (let i = this.lineRange.start; i < this.lineRange.endExclusive; i++) {
  12355. let line = lines[i];
  12356. let offset = 0;
  12357. if (trimFirstLineFully) {
  12358. offset = line.length;
  12359. line = "";
  12360. trimFirstLineFully = false;
  12361. } else if (!considerWhitespaceChanges) {
  12362. const trimmedStartLine = line.trimStart();
  12363. offset = line.length - trimmedStartLine.length;
  12364. line = trimmedStartLine.trimEnd();
  12365. }
  12366. this.offsetByLine.push(offset);
  12367. for (let i2 = 0; i2 < line.length; i2++) {
  12368. this.elements.push(line.charCodeAt(i2));
  12369. }
  12370. if (i < lines.length - 1) {
  12371. this.elements.push("\n".charCodeAt(0));
  12372. this.firstCharOffsetByLineMinusOne[i - this.lineRange.start] = this.elements.length;
  12373. }
  12374. }
  12375. this.offsetByLine.push(0);
  12376. }
  12377. toString() {
  12378. return `Slice: "${this.text}"`;
  12379. }
  12380. get text() {
  12381. return [...this.elements].map((e) => String.fromCharCode(e)).join("");
  12382. }
  12383. getElement(offset) {
  12384. return this.elements[offset];
  12385. }
  12386. get length() {
  12387. return this.elements.length;
  12388. }
  12389. getBoundaryScore(length) {
  12390. const prevCategory = getCategory(length > 0 ? this.elements[length - 1] : -1);
  12391. const nextCategory = getCategory(length < this.elements.length ? this.elements[length] : -1);
  12392. if (prevCategory === 6 && nextCategory === 7) {
  12393. return 0;
  12394. }
  12395. let score2 = 0;
  12396. if (prevCategory !== nextCategory) {
  12397. score2 += 10;
  12398. if (nextCategory === 1) {
  12399. score2 += 1;
  12400. }
  12401. }
  12402. score2 += getCategoryBoundaryScore(prevCategory);
  12403. score2 += getCategoryBoundaryScore(nextCategory);
  12404. return score2;
  12405. }
  12406. translateOffset(offset) {
  12407. if (this.lineRange.isEmpty) {
  12408. return new Position(this.lineRange.start + 1, 1);
  12409. }
  12410. let i = 0;
  12411. let j = this.firstCharOffsetByLineMinusOne.length;
  12412. while (i < j) {
  12413. const k = Math.floor((i + j) / 2);
  12414. if (this.firstCharOffsetByLineMinusOne[k] > offset) {
  12415. j = k;
  12416. } else {
  12417. i = k + 1;
  12418. }
  12419. }
  12420. const offsetOfPrevLineBreak = i === 0 ? 0 : this.firstCharOffsetByLineMinusOne[i - 1];
  12421. return new Position(this.lineRange.start + i + 1, offset - offsetOfPrevLineBreak + 1 + this.offsetByLine[i]);
  12422. }
  12423. translateRange(range2) {
  12424. return Range.fromPositions(this.translateOffset(range2.start), this.translateOffset(range2.endExclusive));
  12425. }
  12426. /**
  12427. * Finds the word that contains the character at the given offset
  12428. */
  12429. findWordContaining(offset) {
  12430. if (offset < 0 || offset >= this.elements.length) {
  12431. return void 0;
  12432. }
  12433. if (!isWordChar(this.elements[offset])) {
  12434. return void 0;
  12435. }
  12436. let start = offset;
  12437. while (start > 0 && isWordChar(this.elements[start - 1])) {
  12438. start--;
  12439. }
  12440. let end = offset;
  12441. while (end < this.elements.length && isWordChar(this.elements[end])) {
  12442. end++;
  12443. }
  12444. return new OffsetRange(start, end);
  12445. }
  12446. };
  12447. function isWordChar(charCode) {
  12448. return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90 || charCode >= 48 && charCode <= 57;
  12449. }
  12450. var score = {
  12451. [
  12452. 0
  12453. /* CharBoundaryCategory.WordLower */
  12454. ]: 0,
  12455. [
  12456. 1
  12457. /* CharBoundaryCategory.WordUpper */
  12458. ]: 0,
  12459. [
  12460. 2
  12461. /* CharBoundaryCategory.WordNumber */
  12462. ]: 0,
  12463. [
  12464. 3
  12465. /* CharBoundaryCategory.End */
  12466. ]: 10,
  12467. [
  12468. 4
  12469. /* CharBoundaryCategory.Other */
  12470. ]: 2,
  12471. [
  12472. 5
  12473. /* CharBoundaryCategory.Space */
  12474. ]: 3,
  12475. [
  12476. 6
  12477. /* CharBoundaryCategory.LineBreakCR */
  12478. ]: 10,
  12479. [
  12480. 7
  12481. /* CharBoundaryCategory.LineBreakLF */
  12482. ]: 10
  12483. };
  12484. function getCategoryBoundaryScore(category) {
  12485. return score[category];
  12486. }
  12487. function getCategory(charCode) {
  12488. if (charCode === 10) {
  12489. return 7;
  12490. } else if (charCode === 13) {
  12491. return 6;
  12492. } else if (isSpace(charCode)) {
  12493. return 5;
  12494. } else if (charCode >= 97 && charCode <= 122) {
  12495. return 0;
  12496. } else if (charCode >= 65 && charCode <= 90) {
  12497. return 1;
  12498. } else if (charCode >= 48 && charCode <= 57) {
  12499. return 2;
  12500. } else if (charCode === -1) {
  12501. return 3;
  12502. } else {
  12503. return 4;
  12504. }
  12505. }
  12506. function isSpace(charCode) {
  12507. return charCode === 32 || charCode === 9;
  12508. }
  12509. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputers.js
  12510. var linesDiffComputers = {
  12511. legacy: new SmartLinesDiffComputer(),
  12512. advanced: new StandardLinesDiffComputer()
  12513. };
  12514. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
  12515. init_objects();
  12516. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js
  12517. init_color();
  12518. function _parseCaptureGroups(captureGroups) {
  12519. const values = [];
  12520. for (const captureGroup of captureGroups) {
  12521. const parsedNumber = Number(captureGroup);
  12522. if (parsedNumber || parsedNumber === 0 && captureGroup.replace(/\s/g, "") !== "") {
  12523. values.push(parsedNumber);
  12524. }
  12525. }
  12526. return values;
  12527. }
  12528. function _toIColor(r, g, b, a) {
  12529. return {
  12530. red: r / 255,
  12531. blue: b / 255,
  12532. green: g / 255,
  12533. alpha: a
  12534. };
  12535. }
  12536. function _findRange(model, match) {
  12537. const index = match.index;
  12538. const length = match[0].length;
  12539. if (!index) {
  12540. return;
  12541. }
  12542. const startPosition = model.positionAt(index);
  12543. const range2 = {
  12544. startLineNumber: startPosition.lineNumber,
  12545. startColumn: startPosition.column,
  12546. endLineNumber: startPosition.lineNumber,
  12547. endColumn: startPosition.column + length
  12548. };
  12549. return range2;
  12550. }
  12551. function _findHexColorInformation(range2, hexValue) {
  12552. if (!range2) {
  12553. return;
  12554. }
  12555. const parsedHexColor = Color.Format.CSS.parseHex(hexValue);
  12556. if (!parsedHexColor) {
  12557. return;
  12558. }
  12559. return {
  12560. range: range2,
  12561. color: _toIColor(parsedHexColor.rgba.r, parsedHexColor.rgba.g, parsedHexColor.rgba.b, parsedHexColor.rgba.a)
  12562. };
  12563. }
  12564. function _findRGBColorInformation(range2, matches, isAlpha) {
  12565. if (!range2 || matches.length !== 1) {
  12566. return;
  12567. }
  12568. const match = matches[0];
  12569. const captureGroups = match.values();
  12570. const parsedRegex = _parseCaptureGroups(captureGroups);
  12571. return {
  12572. range: range2,
  12573. color: _toIColor(parsedRegex[0], parsedRegex[1], parsedRegex[2], isAlpha ? parsedRegex[3] : 1)
  12574. };
  12575. }
  12576. function _findHSLColorInformation(range2, matches, isAlpha) {
  12577. if (!range2 || matches.length !== 1) {
  12578. return;
  12579. }
  12580. const match = matches[0];
  12581. const captureGroups = match.values();
  12582. const parsedRegex = _parseCaptureGroups(captureGroups);
  12583. const colorEquivalent = new Color(new HSLA(parsedRegex[0], parsedRegex[1] / 100, parsedRegex[2] / 100, isAlpha ? parsedRegex[3] : 1));
  12584. return {
  12585. range: range2,
  12586. color: _toIColor(colorEquivalent.rgba.r, colorEquivalent.rgba.g, colorEquivalent.rgba.b, colorEquivalent.rgba.a)
  12587. };
  12588. }
  12589. function _findMatches(model, regex) {
  12590. if (typeof model === "string") {
  12591. return [...model.matchAll(regex)];
  12592. } else {
  12593. return model.findMatches(regex);
  12594. }
  12595. }
  12596. function computeColors(model) {
  12597. const result = [];
  12598. const initialValidationRegex = /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm;
  12599. const initialValidationMatches = _findMatches(model, initialValidationRegex);
  12600. if (initialValidationMatches.length > 0) {
  12601. for (const initialMatch of initialValidationMatches) {
  12602. const initialCaptureGroups = initialMatch.filter((captureGroup) => captureGroup !== void 0);
  12603. const colorScheme = initialCaptureGroups[1];
  12604. const colorParameters = initialCaptureGroups[2];
  12605. if (!colorParameters) {
  12606. continue;
  12607. }
  12608. let colorInformation;
  12609. if (colorScheme === "rgb") {
  12610. const regexParameters = /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;
  12611. colorInformation = _findRGBColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), false);
  12612. } else if (colorScheme === "rgba") {
  12613. const regexParameters = /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;
  12614. colorInformation = _findRGBColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), true);
  12615. } else if (colorScheme === "hsl") {
  12616. const regexParameters = /^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;
  12617. colorInformation = _findHSLColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), false);
  12618. } else if (colorScheme === "hsla") {
  12619. const regexParameters = /^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;
  12620. colorInformation = _findHSLColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), true);
  12621. } else if (colorScheme === "#") {
  12622. colorInformation = _findHexColorInformation(_findRange(model, initialMatch), colorScheme + colorParameters);
  12623. }
  12624. if (colorInformation) {
  12625. result.push(colorInformation);
  12626. }
  12627. }
  12628. }
  12629. return result;
  12630. }
  12631. function computeDefaultDocumentColors(model) {
  12632. if (!model || typeof model.getValue !== "function" || typeof model.positionAt !== "function") {
  12633. return [];
  12634. }
  12635. return computeColors(model);
  12636. }
  12637. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js
  12638. var __awaiter2 = function(thisArg, _arguments, P, generator) {
  12639. function adopt(value) {
  12640. return value instanceof P ? value : new P(function(resolve2) {
  12641. resolve2(value);
  12642. });
  12643. }
  12644. return new (P || (P = Promise))(function(resolve2, reject) {
  12645. function fulfilled(value) {
  12646. try {
  12647. step(generator.next(value));
  12648. } catch (e) {
  12649. reject(e);
  12650. }
  12651. }
  12652. function rejected(value) {
  12653. try {
  12654. step(generator["throw"](value));
  12655. } catch (e) {
  12656. reject(e);
  12657. }
  12658. }
  12659. function step(result) {
  12660. result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
  12661. }
  12662. step((generator = generator.apply(thisArg, _arguments || [])).next());
  12663. });
  12664. };
  12665. var MirrorModel = class extends MirrorTextModel {
  12666. get uri() {
  12667. return this._uri;
  12668. }
  12669. get eol() {
  12670. return this._eol;
  12671. }
  12672. getValue() {
  12673. return this.getText();
  12674. }
  12675. findMatches(regex) {
  12676. const matches = [];
  12677. for (let i = 0; i < this._lines.length; i++) {
  12678. const line = this._lines[i];
  12679. const offsetToAdd = this.offsetAt(new Position(i + 1, 1));
  12680. const iteratorOverMatches = line.matchAll(regex);
  12681. for (const match of iteratorOverMatches) {
  12682. if (match.index || match.index === 0) {
  12683. match.index = match.index + offsetToAdd;
  12684. }
  12685. matches.push(match);
  12686. }
  12687. }
  12688. return matches;
  12689. }
  12690. getLinesContent() {
  12691. return this._lines.slice(0);
  12692. }
  12693. getLineCount() {
  12694. return this._lines.length;
  12695. }
  12696. getLineContent(lineNumber) {
  12697. return this._lines[lineNumber - 1];
  12698. }
  12699. getWordAtPosition(position, wordDefinition) {
  12700. const wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0);
  12701. if (wordAtText) {
  12702. return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn);
  12703. }
  12704. return null;
  12705. }
  12706. words(wordDefinition) {
  12707. const lines = this._lines;
  12708. const wordenize = this._wordenize.bind(this);
  12709. let lineNumber = 0;
  12710. let lineText = "";
  12711. let wordRangesIdx = 0;
  12712. let wordRanges = [];
  12713. return {
  12714. *[Symbol.iterator]() {
  12715. while (true) {
  12716. if (wordRangesIdx < wordRanges.length) {
  12717. const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end);
  12718. wordRangesIdx += 1;
  12719. yield value;
  12720. } else {
  12721. if (lineNumber < lines.length) {
  12722. lineText = lines[lineNumber];
  12723. wordRanges = wordenize(lineText, wordDefinition);
  12724. wordRangesIdx = 0;
  12725. lineNumber += 1;
  12726. } else {
  12727. break;
  12728. }
  12729. }
  12730. }
  12731. }
  12732. };
  12733. }
  12734. getLineWords(lineNumber, wordDefinition) {
  12735. const content = this._lines[lineNumber - 1];
  12736. const ranges = this._wordenize(content, wordDefinition);
  12737. const words = [];
  12738. for (const range2 of ranges) {
  12739. words.push({
  12740. word: content.substring(range2.start, range2.end),
  12741. startColumn: range2.start + 1,
  12742. endColumn: range2.end + 1
  12743. });
  12744. }
  12745. return words;
  12746. }
  12747. _wordenize(content, wordDefinition) {
  12748. const result = [];
  12749. let match;
  12750. wordDefinition.lastIndex = 0;
  12751. while (match = wordDefinition.exec(content)) {
  12752. if (match[0].length === 0) {
  12753. break;
  12754. }
  12755. result.push({ start: match.index, end: match.index + match[0].length });
  12756. }
  12757. return result;
  12758. }
  12759. getValueInRange(range2) {
  12760. range2 = this._validateRange(range2);
  12761. if (range2.startLineNumber === range2.endLineNumber) {
  12762. return this._lines[range2.startLineNumber - 1].substring(range2.startColumn - 1, range2.endColumn - 1);
  12763. }
  12764. const lineEnding = this._eol;
  12765. const startLineIndex = range2.startLineNumber - 1;
  12766. const endLineIndex = range2.endLineNumber - 1;
  12767. const resultLines = [];
  12768. resultLines.push(this._lines[startLineIndex].substring(range2.startColumn - 1));
  12769. for (let i = startLineIndex + 1; i < endLineIndex; i++) {
  12770. resultLines.push(this._lines[i]);
  12771. }
  12772. resultLines.push(this._lines[endLineIndex].substring(0, range2.endColumn - 1));
  12773. return resultLines.join(lineEnding);
  12774. }
  12775. offsetAt(position) {
  12776. position = this._validatePosition(position);
  12777. this._ensureLineStarts();
  12778. return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1);
  12779. }
  12780. positionAt(offset) {
  12781. offset = Math.floor(offset);
  12782. offset = Math.max(0, offset);
  12783. this._ensureLineStarts();
  12784. const out = this._lineStarts.getIndexOf(offset);
  12785. const lineLength = this._lines[out.index].length;
  12786. return {
  12787. lineNumber: 1 + out.index,
  12788. column: 1 + Math.min(out.remainder, lineLength)
  12789. };
  12790. }
  12791. _validateRange(range2) {
  12792. const start = this._validatePosition({ lineNumber: range2.startLineNumber, column: range2.startColumn });
  12793. const end = this._validatePosition({ lineNumber: range2.endLineNumber, column: range2.endColumn });
  12794. if (start.lineNumber !== range2.startLineNumber || start.column !== range2.startColumn || end.lineNumber !== range2.endLineNumber || end.column !== range2.endColumn) {
  12795. return {
  12796. startLineNumber: start.lineNumber,
  12797. startColumn: start.column,
  12798. endLineNumber: end.lineNumber,
  12799. endColumn: end.column
  12800. };
  12801. }
  12802. return range2;
  12803. }
  12804. _validatePosition(position) {
  12805. if (!Position.isIPosition(position)) {
  12806. throw new Error("bad position");
  12807. }
  12808. let { lineNumber, column } = position;
  12809. let hasChanged = false;
  12810. if (lineNumber < 1) {
  12811. lineNumber = 1;
  12812. column = 1;
  12813. hasChanged = true;
  12814. } else if (lineNumber > this._lines.length) {
  12815. lineNumber = this._lines.length;
  12816. column = this._lines[lineNumber - 1].length + 1;
  12817. hasChanged = true;
  12818. } else {
  12819. const maxCharacter = this._lines[lineNumber - 1].length + 1;
  12820. if (column < 1) {
  12821. column = 1;
  12822. hasChanged = true;
  12823. } else if (column > maxCharacter) {
  12824. column = maxCharacter;
  12825. hasChanged = true;
  12826. }
  12827. }
  12828. if (!hasChanged) {
  12829. return position;
  12830. } else {
  12831. return { lineNumber, column };
  12832. }
  12833. }
  12834. };
  12835. var EditorSimpleWorker = class _EditorSimpleWorker {
  12836. constructor(host, foreignModuleFactory) {
  12837. this._host = host;
  12838. this._models = /* @__PURE__ */ Object.create(null);
  12839. this._foreignModuleFactory = foreignModuleFactory;
  12840. this._foreignModule = null;
  12841. }
  12842. dispose() {
  12843. this._models = /* @__PURE__ */ Object.create(null);
  12844. }
  12845. _getModel(uri) {
  12846. return this._models[uri];
  12847. }
  12848. _getModels() {
  12849. const all = [];
  12850. Object.keys(this._models).forEach((key) => all.push(this._models[key]));
  12851. return all;
  12852. }
  12853. acceptNewModel(data) {
  12854. this._models[data.url] = new MirrorModel(URI.parse(data.url), data.lines, data.EOL, data.versionId);
  12855. }
  12856. acceptModelChanged(strURL, e) {
  12857. if (!this._models[strURL]) {
  12858. return;
  12859. }
  12860. const model = this._models[strURL];
  12861. model.onEvents(e);
  12862. }
  12863. acceptRemovedModel(strURL) {
  12864. if (!this._models[strURL]) {
  12865. return;
  12866. }
  12867. delete this._models[strURL];
  12868. }
  12869. computeUnicodeHighlights(url, options, range2) {
  12870. return __awaiter2(this, void 0, void 0, function* () {
  12871. const model = this._getModel(url);
  12872. if (!model) {
  12873. return { ranges: [], hasMore: false, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 };
  12874. }
  12875. return UnicodeTextModelHighlighter.computeUnicodeHighlights(model, options, range2);
  12876. });
  12877. }
  12878. // ---- BEGIN diff --------------------------------------------------------------------------
  12879. computeDiff(originalUrl, modifiedUrl, options, algorithm) {
  12880. return __awaiter2(this, void 0, void 0, function* () {
  12881. const original = this._getModel(originalUrl);
  12882. const modified = this._getModel(modifiedUrl);
  12883. if (!original || !modified) {
  12884. return null;
  12885. }
  12886. return _EditorSimpleWorker.computeDiff(original, modified, options, algorithm);
  12887. });
  12888. }
  12889. static computeDiff(originalTextModel, modifiedTextModel, options, algorithm) {
  12890. const diffAlgorithm = algorithm === "advanced" ? linesDiffComputers.advanced : linesDiffComputers.legacy;
  12891. const originalLines = originalTextModel.getLinesContent();
  12892. const modifiedLines = modifiedTextModel.getLinesContent();
  12893. const result = diffAlgorithm.computeDiff(originalLines, modifiedLines, options);
  12894. const identical = result.changes.length > 0 ? false : this._modelsAreIdentical(originalTextModel, modifiedTextModel);
  12895. return {
  12896. identical,
  12897. quitEarly: result.hitTimeout,
  12898. changes: result.changes.map((m) => {
  12899. var _a3;
  12900. return [m.originalRange.startLineNumber, m.originalRange.endLineNumberExclusive, m.modifiedRange.startLineNumber, m.modifiedRange.endLineNumberExclusive, (_a3 = m.innerChanges) === null || _a3 === void 0 ? void 0 : _a3.map((m2) => [
  12901. m2.originalRange.startLineNumber,
  12902. m2.originalRange.startColumn,
  12903. m2.originalRange.endLineNumber,
  12904. m2.originalRange.endColumn,
  12905. m2.modifiedRange.startLineNumber,
  12906. m2.modifiedRange.startColumn,
  12907. m2.modifiedRange.endLineNumber,
  12908. m2.modifiedRange.endColumn
  12909. ])];
  12910. })
  12911. };
  12912. }
  12913. static _modelsAreIdentical(original, modified) {
  12914. const originalLineCount = original.getLineCount();
  12915. const modifiedLineCount = modified.getLineCount();
  12916. if (originalLineCount !== modifiedLineCount) {
  12917. return false;
  12918. }
  12919. for (let line = 1; line <= originalLineCount; line++) {
  12920. const originalLine = original.getLineContent(line);
  12921. const modifiedLine = modified.getLineContent(line);
  12922. if (originalLine !== modifiedLine) {
  12923. return false;
  12924. }
  12925. }
  12926. return true;
  12927. }
  12928. computeMoreMinimalEdits(modelUrl, edits, pretty) {
  12929. return __awaiter2(this, void 0, void 0, function* () {
  12930. const model = this._getModel(modelUrl);
  12931. if (!model) {
  12932. return edits;
  12933. }
  12934. const result = [];
  12935. let lastEol = void 0;
  12936. edits = edits.slice(0).sort((a, b) => {
  12937. if (a.range && b.range) {
  12938. return Range.compareRangesUsingStarts(a.range, b.range);
  12939. }
  12940. const aRng = a.range ? 0 : 1;
  12941. const bRng = b.range ? 0 : 1;
  12942. return aRng - bRng;
  12943. });
  12944. for (let { range: range2, text, eol } of edits) {
  12945. if (typeof eol === "number") {
  12946. lastEol = eol;
  12947. }
  12948. if (Range.isEmpty(range2) && !text) {
  12949. continue;
  12950. }
  12951. const original = model.getValueInRange(range2);
  12952. text = text.replace(/\r\n|\n|\r/g, model.eol);
  12953. if (original === text) {
  12954. continue;
  12955. }
  12956. if (Math.max(text.length, original.length) > _EditorSimpleWorker._diffLimit) {
  12957. result.push({ range: range2, text });
  12958. continue;
  12959. }
  12960. const changes = stringDiff(original, text, pretty);
  12961. const editOffset = model.offsetAt(Range.lift(range2).getStartPosition());
  12962. for (const change of changes) {
  12963. const start = model.positionAt(editOffset + change.originalStart);
  12964. const end = model.positionAt(editOffset + change.originalStart + change.originalLength);
  12965. const newEdit = {
  12966. text: text.substr(change.modifiedStart, change.modifiedLength),
  12967. range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column }
  12968. };
  12969. if (model.getValueInRange(newEdit.range) !== newEdit.text) {
  12970. result.push(newEdit);
  12971. }
  12972. }
  12973. }
  12974. if (typeof lastEol === "number") {
  12975. result.push({ eol: lastEol, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } });
  12976. }
  12977. return result;
  12978. });
  12979. }
  12980. // ---- END minimal edits ---------------------------------------------------------------
  12981. computeLinks(modelUrl) {
  12982. return __awaiter2(this, void 0, void 0, function* () {
  12983. const model = this._getModel(modelUrl);
  12984. if (!model) {
  12985. return null;
  12986. }
  12987. return computeLinks(model);
  12988. });
  12989. }
  12990. // --- BEGIN default document colors -----------------------------------------------------------
  12991. computeDefaultDocumentColors(modelUrl) {
  12992. return __awaiter2(this, void 0, void 0, function* () {
  12993. const model = this._getModel(modelUrl);
  12994. if (!model) {
  12995. return null;
  12996. }
  12997. return computeDefaultDocumentColors(model);
  12998. });
  12999. }
  13000. textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) {
  13001. return __awaiter2(this, void 0, void 0, function* () {
  13002. const sw = new StopWatch(true);
  13003. const wordDefRegExp = new RegExp(wordDef, wordDefFlags);
  13004. const seen = /* @__PURE__ */ new Set();
  13005. outer:
  13006. for (const url of modelUrls) {
  13007. const model = this._getModel(url);
  13008. if (!model) {
  13009. continue;
  13010. }
  13011. for (const word of model.words(wordDefRegExp)) {
  13012. if (word === leadingWord || !isNaN(Number(word))) {
  13013. continue;
  13014. }
  13015. seen.add(word);
  13016. if (seen.size > _EditorSimpleWorker._suggestionsLimit) {
  13017. break outer;
  13018. }
  13019. }
  13020. }
  13021. return { words: Array.from(seen), duration: sw.elapsed() };
  13022. });
  13023. }
  13024. // ---- END suggest --------------------------------------------------------------------------
  13025. //#region -- word ranges --
  13026. computeWordRanges(modelUrl, range2, wordDef, wordDefFlags) {
  13027. return __awaiter2(this, void 0, void 0, function* () {
  13028. const model = this._getModel(modelUrl);
  13029. if (!model) {
  13030. return /* @__PURE__ */ Object.create(null);
  13031. }
  13032. const wordDefRegExp = new RegExp(wordDef, wordDefFlags);
  13033. const result = /* @__PURE__ */ Object.create(null);
  13034. for (let line = range2.startLineNumber; line < range2.endLineNumber; line++) {
  13035. const words = model.getLineWords(line, wordDefRegExp);
  13036. for (const word of words) {
  13037. if (!isNaN(Number(word.word))) {
  13038. continue;
  13039. }
  13040. let array = result[word.word];
  13041. if (!array) {
  13042. array = [];
  13043. result[word.word] = array;
  13044. }
  13045. array.push({
  13046. startLineNumber: line,
  13047. startColumn: word.startColumn,
  13048. endLineNumber: line,
  13049. endColumn: word.endColumn
  13050. });
  13051. }
  13052. }
  13053. return result;
  13054. });
  13055. }
  13056. //#endregion
  13057. navigateValueSet(modelUrl, range2, up, wordDef, wordDefFlags) {
  13058. return __awaiter2(this, void 0, void 0, function* () {
  13059. const model = this._getModel(modelUrl);
  13060. if (!model) {
  13061. return null;
  13062. }
  13063. const wordDefRegExp = new RegExp(wordDef, wordDefFlags);
  13064. if (range2.startColumn === range2.endColumn) {
  13065. range2 = {
  13066. startLineNumber: range2.startLineNumber,
  13067. startColumn: range2.startColumn,
  13068. endLineNumber: range2.endLineNumber,
  13069. endColumn: range2.endColumn + 1
  13070. };
  13071. }
  13072. const selectionText = model.getValueInRange(range2);
  13073. const wordRange = model.getWordAtPosition({ lineNumber: range2.startLineNumber, column: range2.startColumn }, wordDefRegExp);
  13074. if (!wordRange) {
  13075. return null;
  13076. }
  13077. const word = model.getValueInRange(wordRange);
  13078. const result = BasicInplaceReplace.INSTANCE.navigateValueSet(range2, selectionText, wordRange, word, up);
  13079. return result;
  13080. });
  13081. }
  13082. // ---- BEGIN foreign module support --------------------------------------------------------------------------
  13083. loadForeignModule(moduleId, createData, foreignHostMethods) {
  13084. const proxyMethodRequest = (method, args) => {
  13085. return this._host.fhr(method, args);
  13086. };
  13087. const foreignHost = createProxyObject(foreignHostMethods, proxyMethodRequest);
  13088. const ctx = {
  13089. host: foreignHost,
  13090. getMirrorModels: () => {
  13091. return this._getModels();
  13092. }
  13093. };
  13094. if (this._foreignModuleFactory) {
  13095. this._foreignModule = this._foreignModuleFactory(ctx, createData);
  13096. return Promise.resolve(getAllMethodNames(this._foreignModule));
  13097. }
  13098. return Promise.reject(new Error(`Unexpected usage`));
  13099. }
  13100. // foreign method request
  13101. fmr(method, args) {
  13102. if (!this._foreignModule || typeof this._foreignModule[method] !== "function") {
  13103. return Promise.reject(new Error("Missing requestHandler or method: " + method));
  13104. }
  13105. try {
  13106. return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args));
  13107. } catch (e) {
  13108. return Promise.reject(e);
  13109. }
  13110. }
  13111. };
  13112. EditorSimpleWorker._diffLimit = 1e5;
  13113. EditorSimpleWorker._suggestionsLimit = 1e4;
  13114. if (typeof importScripts === "function") {
  13115. globalThis.monaco = createMonacoBaseAPI();
  13116. }
  13117. export {
  13118. onUnexpectedError,
  13119. onUnexpectedExternalError,
  13120. isCancellationError,
  13121. CancellationError,
  13122. canceled,
  13123. illegalArgument,
  13124. illegalState,
  13125. NotSupportedError,
  13126. BugIndicatingError,
  13127. init_errors,
  13128. once,
  13129. init_functional,
  13130. Iterable,
  13131. init_iterator,
  13132. markAsSingleton,
  13133. isDisposable,
  13134. dispose,
  13135. combinedDisposable,
  13136. toDisposable,
  13137. DisposableStore,
  13138. Disposable,
  13139. MutableDisposable,
  13140. RefCountedDisposable,
  13141. ImmortalReference,
  13142. DisposableMap,
  13143. init_lifecycle,
  13144. LinkedList,
  13145. init_linkedList,
  13146. localize,
  13147. init_nls,
  13148. globals,
  13149. isWindows,
  13150. isMacintosh,
  13151. isLinux,
  13152. isNative,
  13153. isWeb,
  13154. isWebWorker,
  13155. isIOS,
  13156. isMobile,
  13157. language,
  13158. setTimeout0,
  13159. OS,
  13160. isLittleEndian,
  13161. isChrome,
  13162. isFirefox,
  13163. isSafari,
  13164. isEdge,
  13165. init_platform,
  13166. StopWatch,
  13167. init_stopwatch,
  13168. Event,
  13169. Emitter,
  13170. EventDeliveryQueue,
  13171. PauseableEmitter,
  13172. DebounceEmitter,
  13173. MicrotaskEmitter,
  13174. EventMultiplexer,
  13175. EventBufferer,
  13176. Relay,
  13177. init_event,
  13178. isString,
  13179. isObject,
  13180. isNumber,
  13181. isIterable,
  13182. isBoolean,
  13183. isUndefined,
  13184. isDefined,
  13185. isUndefinedOrNull,
  13186. assertType,
  13187. assertIsDefined,
  13188. isFunction,
  13189. validateConstraints,
  13190. withNullAsUndefined,
  13191. withUndefinedAsNull,
  13192. init_types,
  13193. deepClone,
  13194. deepFreeze,
  13195. cloneAndChange,
  13196. mixin,
  13197. equals,
  13198. getAllMethodNames,
  13199. init_objects,
  13200. CachedFunction,
  13201. init_cache,
  13202. Lazy,
  13203. init_lazy,
  13204. isFalsyOrWhitespace,
  13205. format,
  13206. escape,
  13207. escapeRegExpCharacters,
  13208. trim,
  13209. ltrim,
  13210. rtrim,
  13211. convertSimple2RegExpPattern,
  13212. stripWildcards,
  13213. createRegExp,
  13214. regExpLeadsToEndlessLoop,
  13215. regExpFlags,
  13216. splitLines,
  13217. firstNonWhitespaceIndex,
  13218. getLeadingWhitespace,
  13219. lastNonWhitespaceIndex,
  13220. compare,
  13221. compareSubstring,
  13222. compareIgnoreCase,
  13223. compareSubstringIgnoreCase,
  13224. isAsciiDigit,
  13225. isLowerAsciiLetter,
  13226. isUpperAsciiLetter,
  13227. equalsIgnoreCase,
  13228. startsWithIgnoreCase,
  13229. commonPrefixLength,
  13230. commonSuffixLength,
  13231. isHighSurrogate,
  13232. isLowSurrogate,
  13233. getNextCodePoint,
  13234. GraphemeIterator,
  13235. nextCharLength,
  13236. prevCharLength,
  13237. getCharContainingOffset,
  13238. containsRTL,
  13239. isBasicASCII,
  13240. UNUSUAL_LINE_TERMINATORS,
  13241. containsUnusualLineTerminators,
  13242. isFullWidthCharacter,
  13243. isEmojiImprecise,
  13244. UTF8_BOM_CHARACTER,
  13245. startsWithUTF8BOM,
  13246. containsUppercaseCharacter,
  13247. singleLetterHash,
  13248. getLeftDeleteOffset,
  13249. noBreakWhitespace,
  13250. InvisibleCharacters,
  13251. init_strings,
  13252. logOnceWebWorkerWarning,
  13253. SimpleWorkerClient,
  13254. SimpleWorkerServer,
  13255. hash,
  13256. doHash,
  13257. StringSHA1,
  13258. init_hash,
  13259. LcsDiff,
  13260. posix,
  13261. normalize,
  13262. resolve,
  13263. relative,
  13264. dirname,
  13265. basename,
  13266. extname,
  13267. sep,
  13268. init_path,
  13269. URI,
  13270. uriToFsPath,
  13271. init_uri,
  13272. Position,
  13273. init_position,
  13274. Range,
  13275. init_range,
  13276. tail,
  13277. tail2,
  13278. equals2,
  13279. removeFastWithoutKeepingOrder,
  13280. binarySearch,
  13281. findFirstInSorted,
  13282. quickSelect,
  13283. groupBy,
  13284. coalesce,
  13285. coalesceInPlace,
  13286. isFalsyOrEmpty,
  13287. isNonEmptyArray,
  13288. distinct,
  13289. findLast,
  13290. firstOrDefault,
  13291. range,
  13292. arrayInsert,
  13293. pushToStart,
  13294. pushToEnd,
  13295. pushMany,
  13296. asArray,
  13297. mapFind,
  13298. splice,
  13299. compareBy,
  13300. numberComparator,
  13301. findMaxBy,
  13302. findLastMaxBy,
  13303. findMinBy,
  13304. ArrayQueue,
  13305. CallbackIterable,
  13306. init_arrays,
  13307. toUint8,
  13308. init_uint,
  13309. ConstantTimePrefixSumComputer,
  13310. USUAL_WORD_SEPARATORS,
  13311. DEFAULT_WORD_REGEXP,
  13312. ensureValidWordDefinition,
  13313. getWordAtText,
  13314. init_wordHelper,
  13315. CharacterClassifier,
  13316. CharacterSet,
  13317. init_characterClassifier,
  13318. CancellationToken,
  13319. CancellationTokenSource,
  13320. init_cancellation,
  13321. EVENT_KEY_CODE_MAP,
  13322. IMMUTABLE_CODE_TO_KEY_CODE,
  13323. KeyCodeUtils,
  13324. KeyChord,
  13325. init_keyCodes,
  13326. Selection,
  13327. init_selection,
  13328. getCodiconFontCharacters,
  13329. Codicon,
  13330. init_codicons,
  13331. Token,
  13332. TokenizationResult,
  13333. EncodedTokenizationResult,
  13334. CompletionItemKinds,
  13335. InlineCompletionTriggerKind,
  13336. SelectedSuggestionInfo,
  13337. SignatureHelpTriggerKind,
  13338. DocumentHighlightKind,
  13339. isLocationLink,
  13340. SymbolKinds,
  13341. FoldingRangeKind,
  13342. Command,
  13343. InlayHintKind,
  13344. LazyTokenizationSupport,
  13345. TokenizationRegistry2 as TokenizationRegistry,
  13346. init_languages,
  13347. AccessibilitySupport,
  13348. CodeActionTriggerType,
  13349. CompletionItemInsertTextRule,
  13350. CompletionItemKind,
  13351. CompletionItemTag,
  13352. CompletionTriggerKind,
  13353. ContentWidgetPositionPreference,
  13354. CursorChangeReason,
  13355. DefaultEndOfLine,
  13356. DocumentHighlightKind2,
  13357. EditorAutoIndentStrategy,
  13358. EditorOption,
  13359. EndOfLinePreference,
  13360. EndOfLineSequence,
  13361. GlyphMarginLane,
  13362. IndentAction,
  13363. InjectedTextCursorStops,
  13364. InlayHintKind2,
  13365. InlineCompletionTriggerKind2,
  13366. MinimapPosition,
  13367. MouseTargetType,
  13368. OverlayWidgetPositionPreference,
  13369. OverviewRulerLane,
  13370. PositionAffinity,
  13371. RenderLineNumbersType,
  13372. RenderMinimap,
  13373. ScrollType,
  13374. ScrollbarVisibility,
  13375. SignatureHelpTriggerKind2,
  13376. SymbolKind,
  13377. SymbolTag,
  13378. TextEditorCursorBlinkingStyle,
  13379. TextEditorCursorStyle,
  13380. TrackedRangeStickiness,
  13381. WrappingIndent,
  13382. createMonacoBaseAPI,
  13383. getMapForWordSeparators,
  13384. init_wordCharacterClassifier,
  13385. OverviewRulerLane2,
  13386. GlyphMarginLane2,
  13387. MinimapPosition2,
  13388. InjectedTextCursorStops2,
  13389. TextModelResolvedOptions,
  13390. FindMatch,
  13391. isITextSnapshot,
  13392. ValidAnnotatedEditOperation,
  13393. ApplyEditsResult,
  13394. shouldSynchronizeModel,
  13395. init_model,
  13396. SearchParams,
  13397. createFindMatch,
  13398. TextModelSearch,
  13399. isValidMatch,
  13400. Searcher,
  13401. init_textModelSearch,
  13402. ok,
  13403. assertNever,
  13404. init_assert,
  13405. UnicodeTextModelHighlighter,
  13406. LineRangeMapping,
  13407. RangeMapping,
  13408. LineRange,
  13409. init_lineRange,
  13410. OffsetRange,
  13411. init_offsetRange,
  13412. RGBA,
  13413. HSVA,
  13414. Color,
  13415. init_color,
  13416. EditorSimpleWorker
  13417. };
  13418. //# sourceMappingURL=chunk-FBUDSZGC.js.map