| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245512465124751248512495125051251512525125351254512555125651257512585125951260512615126251263512645126551266512675126851269512705127151272512735127451275512765127751278512795128051281512825128351284512855128651287512885128951290512915129251293512945129551296512975129851299513005130151302513035130451305513065130751308513095131051311513125131351314513155131651317513185131951320513215132251323513245132551326513275132851329513305133151332513335133451335513365133751338513395134051341513425134351344513455134651347513485134951350513515135251353513545135551356513575135851359513605136151362513635136451365513665136751368513695137051371513725137351374513755137651377513785137951380513815138251383513845138551386513875138851389513905139151392513935139451395513965139751398513995140051401514025140351404514055140651407514085140951410514115141251413514145141551416514175141851419514205142151422514235142451425514265142751428514295143051431514325143351434514355143651437514385143951440514415144251443514445144551446514475144851449514505145151452514535145451455514565145751458514595146051461514625146351464514655146651467514685146951470514715147251473514745147551476514775147851479514805148151482514835148451485514865148751488514895149051491514925149351494514955149651497514985149951500515015150251503515045150551506515075150851509515105151151512515135151451515515165151751518515195152051521515225152351524515255152651527515285152951530515315153251533515345153551536515375153851539515405154151542515435154451545515465154751548515495155051551515525155351554515555155651557515585155951560515615156251563515645156551566515675156851569515705157151572515735157451575515765157751578515795158051581515825158351584515855158651587515885158951590515915159251593515945159551596515975159851599516005160151602516035160451605516065160751608516095161051611516125161351614516155161651617516185161951620516215162251623516245162551626516275162851629516305163151632516335163451635516365163751638516395164051641516425164351644516455164651647516485164951650516515165251653516545165551656516575165851659516605166151662516635166451665516665166751668516695167051671516725167351674516755167651677516785167951680516815168251683516845168551686516875168851689516905169151692516935169451695516965169751698516995170051701517025170351704517055170651707517085170951710517115171251713517145171551716517175171851719517205172151722517235172451725517265172751728517295173051731517325173351734517355173651737517385173951740517415174251743517445174551746517475174851749517505175151752517535175451755517565175751758517595176051761517625176351764517655176651767517685176951770517715177251773517745177551776517775177851779517805178151782517835178451785517865178751788517895179051791517925179351794517955179651797517985179951800518015180251803518045180551806518075180851809518105181151812518135181451815518165181751818518195182051821518225182351824518255182651827518285182951830518315183251833518345183551836518375183851839518405184151842518435184451845518465184751848518495185051851518525185351854518555185651857518585185951860518615186251863518645186551866518675186851869518705187151872518735187451875518765187751878518795188051881518825188351884518855188651887518885188951890518915189251893518945189551896518975189851899519005190151902519035190451905519065190751908519095191051911519125191351914519155191651917519185191951920519215192251923519245192551926519275192851929519305193151932519335193451935519365193751938519395194051941519425194351944519455194651947519485194951950519515195251953519545195551956519575195851959519605196151962519635196451965519665196751968519695197051971519725197351974519755197651977519785197951980519815198251983519845198551986519875198851989519905199151992519935199451995519965199751998519995200052001520025200352004520055200652007520085200952010520115201252013520145201552016520175201852019520205202152022520235202452025520265202752028520295203052031520325203352034520355203652037520385203952040520415204252043520445204552046520475204852049520505205152052520535205452055520565205752058520595206052061520625206352064520655206652067520685206952070520715207252073520745207552076520775207852079520805208152082520835208452085520865208752088520895209052091520925209352094520955209652097520985209952100521015210252103521045210552106521075210852109521105211152112521135211452115521165211752118521195212052121521225212352124521255212652127521285212952130521315213252133521345213552136521375213852139521405214152142521435214452145521465214752148521495215052151521525215352154521555215652157521585215952160521615216252163521645216552166521675216852169521705217152172521735217452175521765217752178521795218052181521825218352184521855218652187521885218952190521915219252193521945219552196521975219852199522005220152202522035220452205522065220752208522095221052211522125221352214522155221652217522185221952220522215222252223522245222552226522275222852229522305223152232522335223452235522365223752238522395224052241522425224352244522455224652247522485224952250522515225252253522545225552256522575225852259522605226152262522635226452265522665226752268522695227052271522725227352274522755227652277522785227952280522815228252283522845228552286522875228852289522905229152292522935229452295522965229752298522995230052301523025230352304523055230652307523085230952310523115231252313523145231552316523175231852319523205232152322523235232452325523265232752328523295233052331523325233352334523355233652337523385233952340523415234252343523445234552346523475234852349523505235152352523535235452355523565235752358523595236052361523625236352364523655236652367523685236952370523715237252373523745237552376523775237852379523805238152382523835238452385523865238752388523895239052391523925239352394523955239652397523985239952400524015240252403524045240552406524075240852409524105241152412524135241452415524165241752418524195242052421524225242352424524255242652427524285242952430524315243252433524345243552436524375243852439524405244152442524435244452445524465244752448524495245052451524525245352454524555245652457524585245952460524615246252463524645246552466524675246852469524705247152472524735247452475524765247752478524795248052481524825248352484524855248652487524885248952490524915249252493524945249552496524975249852499525005250152502525035250452505525065250752508525095251052511525125251352514525155251652517525185251952520525215252252523525245252552526525275252852529525305253152532525335253452535525365253752538525395254052541525425254352544525455254652547525485254952550525515255252553525545255552556525575255852559525605256152562525635256452565525665256752568525695257052571525725257352574525755257652577525785257952580525815258252583525845258552586525875258852589525905259152592525935259452595525965259752598525995260052601526025260352604526055260652607526085260952610526115261252613526145261552616526175261852619526205262152622526235262452625526265262752628526295263052631526325263352634526355263652637526385263952640526415264252643526445264552646526475264852649526505265152652526535265452655526565265752658526595266052661526625266352664526655266652667526685266952670526715267252673526745267552676526775267852679526805268152682526835268452685526865268752688526895269052691526925269352694526955269652697526985269952700527015270252703527045270552706527075270852709527105271152712527135271452715527165271752718527195272052721527225272352724527255272652727527285272952730527315273252733527345273552736527375273852739527405274152742527435274452745527465274752748527495275052751527525275352754527555275652757527585275952760527615276252763527645276552766527675276852769527705277152772527735277452775527765277752778527795278052781527825278352784527855278652787527885278952790527915279252793527945279552796527975279852799528005280152802528035280452805528065280752808528095281052811528125281352814528155281652817528185281952820528215282252823528245282552826528275282852829528305283152832528335283452835528365283752838528395284052841528425284352844528455284652847528485284952850528515285252853528545285552856528575285852859528605286152862528635286452865528665286752868528695287052871528725287352874528755287652877528785287952880528815288252883528845288552886528875288852889528905289152892528935289452895528965289752898528995290052901529025290352904529055290652907529085290952910529115291252913529145291552916529175291852919529205292152922529235292452925529265292752928529295293052931529325293352934529355293652937529385293952940529415294252943529445294552946529475294852949529505295152952529535295452955529565295752958529595296052961529625296352964529655296652967529685296952970529715297252973529745297552976529775297852979529805298152982529835298452985529865298752988529895299052991529925299352994529955299652997529985299953000530015300253003530045300553006530075300853009530105301153012530135301453015530165301753018530195302053021530225302353024530255302653027530285302953030530315303253033530345303553036530375303853039530405304153042530435304453045530465304753048530495305053051530525305353054530555305653057530585305953060530615306253063530645306553066530675306853069530705307153072530735307453075530765307753078530795308053081530825308353084530855308653087530885308953090530915309253093530945309553096530975309853099531005310153102531035310453105531065310753108531095311053111531125311353114531155311653117531185311953120531215312253123531245312553126531275312853129531305313153132531335313453135531365313753138531395314053141531425314353144531455314653147531485314953150531515315253153531545315553156531575315853159531605316153162531635316453165531665316753168531695317053171531725317353174531755317653177531785317953180531815318253183531845318553186531875318853189531905319153192531935319453195531965319753198531995320053201532025320353204532055320653207532085320953210532115321253213532145321553216532175321853219532205322153222532235322453225532265322753228532295323053231532325323353234532355323653237532385323953240532415324253243532445324553246532475324853249532505325153252532535325453255532565325753258532595326053261532625326353264532655326653267532685326953270532715327253273532745327553276532775327853279532805328153282532835328453285532865328753288532895329053291532925329353294532955329653297532985329953300533015330253303533045330553306533075330853309533105331153312533135331453315533165331753318533195332053321533225332353324533255332653327533285332953330533315333253333533345333553336533375333853339533405334153342533435334453345533465334753348533495335053351533525335353354533555335653357533585335953360533615336253363533645336553366533675336853369533705337153372533735337453375533765337753378533795338053381533825338353384533855338653387533885338953390533915339253393533945339553396533975339853399534005340153402534035340453405534065340753408534095341053411534125341353414534155341653417534185341953420534215342253423534245342553426534275342853429534305343153432534335343453435534365343753438534395344053441534425344353444534455344653447534485344953450534515345253453534545345553456534575345853459534605346153462534635346453465534665346753468534695347053471534725347353474534755347653477534785347953480534815348253483534845348553486534875348853489534905349153492534935349453495534965349753498534995350053501535025350353504535055350653507535085350953510535115351253513535145351553516535175351853519535205352153522535235352453525535265352753528535295353053531535325353353534535355353653537535385353953540535415354253543535445354553546535475354853549535505355153552535535355453555535565355753558535595356053561535625356353564535655356653567535685356953570535715357253573535745357553576535775357853579535805358153582535835358453585535865358753588535895359053591535925359353594535955359653597535985359953600536015360253603536045360553606536075360853609536105361153612536135361453615536165361753618536195362053621536225362353624536255362653627536285362953630536315363253633536345363553636536375363853639536405364153642536435364453645536465364753648536495365053651536525365353654536555365653657536585365953660536615366253663536645366553666536675366853669536705367153672536735367453675536765367753678536795368053681536825368353684536855368653687536885368953690536915369253693536945369553696536975369853699537005370153702537035370453705537065370753708537095371053711537125371353714537155371653717537185371953720537215372253723537245372553726537275372853729537305373153732537335373453735537365373753738537395374053741537425374353744537455374653747537485374953750537515375253753537545375553756537575375853759537605376153762537635376453765537665376753768537695377053771537725377353774537755377653777537785377953780537815378253783537845378553786537875378853789537905379153792537935379453795537965379753798537995380053801538025380353804538055380653807538085380953810538115381253813538145381553816538175381853819538205382153822538235382453825538265382753828538295383053831538325383353834538355383653837538385383953840538415384253843538445384553846538475384853849538505385153852538535385453855538565385753858538595386053861538625386353864538655386653867538685386953870538715387253873538745387553876538775387853879538805388153882538835388453885538865388753888538895389053891538925389353894538955389653897538985389953900539015390253903539045390553906539075390853909539105391153912539135391453915539165391753918539195392053921539225392353924539255392653927539285392953930539315393253933539345393553936539375393853939539405394153942539435394453945539465394753948539495395053951539525395353954539555395653957539585395953960539615396253963539645396553966539675396853969539705397153972539735397453975539765397753978539795398053981539825398353984539855398653987539885398953990539915399253993539945399553996539975399853999540005400154002540035400454005540065400754008540095401054011540125401354014540155401654017540185401954020540215402254023540245402554026540275402854029540305403154032540335403454035540365403754038540395404054041540425404354044540455404654047540485404954050540515405254053540545405554056540575405854059540605406154062540635406454065540665406754068540695407054071540725407354074540755407654077540785407954080540815408254083540845408554086540875408854089540905409154092540935409454095540965409754098540995410054101541025410354104541055410654107541085410954110541115411254113541145411554116541175411854119541205412154122541235412454125541265412754128541295413054131541325413354134541355413654137541385413954140541415414254143541445414554146541475414854149541505415154152541535415454155541565415754158541595416054161541625416354164541655416654167541685416954170541715417254173541745417554176541775417854179541805418154182541835418454185541865418754188541895419054191541925419354194541955419654197541985419954200542015420254203542045420554206542075420854209542105421154212542135421454215542165421754218542195422054221542225422354224542255422654227542285422954230542315423254233542345423554236542375423854239542405424154242542435424454245542465424754248542495425054251542525425354254542555425654257542585425954260542615426254263542645426554266542675426854269542705427154272542735427454275542765427754278542795428054281542825428354284542855428654287542885428954290542915429254293542945429554296542975429854299543005430154302543035430454305543065430754308543095431054311543125431354314543155431654317543185431954320543215432254323543245432554326543275432854329543305433154332543335433454335543365433754338543395434054341543425434354344543455434654347543485434954350543515435254353543545435554356543575435854359543605436154362543635436454365543665436754368543695437054371543725437354374543755437654377543785437954380543815438254383543845438554386543875438854389543905439154392543935439454395543965439754398543995440054401544025440354404544055440654407544085440954410544115441254413544145441554416544175441854419544205442154422544235442454425544265442754428544295443054431544325443354434544355443654437544385443954440544415444254443544445444554446544475444854449544505445154452544535445454455544565445754458544595446054461544625446354464544655446654467544685446954470544715447254473544745447554476544775447854479544805448154482544835448454485544865448754488544895449054491544925449354494544955449654497544985449954500545015450254503545045450554506545075450854509545105451154512545135451454515545165451754518545195452054521545225452354524545255452654527545285452954530545315453254533545345453554536545375453854539545405454154542545435454454545545465454754548545495455054551545525455354554545555455654557545585455954560545615456254563545645456554566545675456854569545705457154572545735457454575545765457754578545795458054581545825458354584545855458654587545885458954590545915459254593545945459554596545975459854599546005460154602546035460454605546065460754608546095461054611546125461354614546155461654617546185461954620546215462254623546245462554626546275462854629546305463154632546335463454635546365463754638546395464054641546425464354644546455464654647546485464954650546515465254653546545465554656546575465854659546605466154662546635466454665546665466754668546695467054671546725467354674546755467654677546785467954680546815468254683546845468554686546875468854689546905469154692546935469454695546965469754698546995470054701547025470354704547055470654707547085470954710547115471254713547145471554716547175471854719547205472154722547235472454725547265472754728547295473054731547325473354734547355473654737547385473954740547415474254743547445474554746547475474854749547505475154752547535475454755547565475754758547595476054761547625476354764547655476654767547685476954770547715477254773547745477554776547775477854779547805478154782547835478454785547865478754788547895479054791547925479354794547955479654797547985479954800548015480254803548045480554806548075480854809548105481154812548135481454815548165481754818548195482054821548225482354824548255482654827548285482954830548315483254833548345483554836548375483854839548405484154842548435484454845548465484754848548495485054851548525485354854548555485654857548585485954860548615486254863548645486554866548675486854869548705487154872548735487454875548765487754878548795488054881548825488354884548855488654887548885488954890548915489254893548945489554896548975489854899549005490154902549035490454905549065490754908549095491054911549125491354914549155491654917549185491954920549215492254923549245492554926549275492854929549305493154932549335493454935549365493754938549395494054941549425494354944549455494654947549485494954950549515495254953549545495554956549575495854959549605496154962549635496454965549665496754968549695497054971549725497354974549755497654977549785497954980549815498254983549845498554986549875498854989549905499154992549935499454995549965499754998549995500055001550025500355004550055500655007550085500955010550115501255013550145501555016550175501855019550205502155022550235502455025550265502755028550295503055031550325503355034550355503655037550385503955040550415504255043550445504555046550475504855049550505505155052550535505455055550565505755058550595506055061550625506355064550655506655067550685506955070550715507255073550745507555076550775507855079550805508155082550835508455085550865508755088550895509055091550925509355094550955509655097550985509955100551015510255103551045510555106551075510855109551105511155112551135511455115551165511755118551195512055121551225512355124551255512655127551285512955130551315513255133551345513555136551375513855139551405514155142551435514455145551465514755148551495515055151551525515355154551555515655157551585515955160551615516255163551645516555166551675516855169551705517155172551735517455175551765517755178551795518055181551825518355184551855518655187551885518955190551915519255193551945519555196551975519855199552005520155202552035520455205552065520755208552095521055211552125521355214552155521655217552185521955220552215522255223552245522555226552275522855229552305523155232552335523455235552365523755238552395524055241552425524355244552455524655247552485524955250552515525255253552545525555256552575525855259552605526155262552635526455265552665526755268552695527055271552725527355274552755527655277552785527955280552815528255283552845528555286552875528855289552905529155292552935529455295552965529755298552995530055301553025530355304553055530655307553085530955310553115531255313553145531555316553175531855319553205532155322553235532455325553265532755328553295533055331553325533355334553355533655337553385533955340553415534255343553445534555346553475534855349553505535155352553535535455355553565535755358553595536055361553625536355364553655536655367553685536955370553715537255373553745537555376553775537855379553805538155382553835538455385553865538755388553895539055391553925539355394553955539655397553985539955400554015540255403554045540555406554075540855409554105541155412554135541455415554165541755418554195542055421554225542355424554255542655427554285542955430554315543255433554345543555436554375543855439554405544155442554435544455445554465544755448554495545055451554525545355454554555545655457554585545955460554615546255463554645546555466554675546855469554705547155472554735547455475554765547755478554795548055481554825548355484554855548655487554885548955490554915549255493554945549555496554975549855499555005550155502555035550455505555065550755508555095551055511555125551355514555155551655517555185551955520555215552255523555245552555526555275552855529555305553155532555335553455535555365553755538555395554055541555425554355544555455554655547555485554955550555515555255553555545555555556555575555855559555605556155562555635556455565555665556755568555695557055571555725557355574555755557655577555785557955580555815558255583555845558555586555875558855589555905559155592555935559455595555965559755598555995560055601556025560355604556055560655607556085560955610556115561255613556145561555616556175561855619556205562155622556235562455625556265562755628556295563055631556325563355634556355563655637556385563955640556415564255643556445564555646556475564855649556505565155652556535565455655556565565755658556595566055661556625566355664556655566655667556685566955670556715567255673556745567555676556775567855679556805568155682556835568455685556865568755688556895569055691556925569355694556955569655697556985569955700557015570255703557045570555706557075570855709557105571155712557135571455715557165571755718557195572055721557225572355724557255572655727557285572955730557315573255733557345573555736557375573855739557405574155742557435574455745557465574755748557495575055751557525575355754557555575655757557585575955760557615576255763557645576555766557675576855769557705577155772557735577455775557765577755778557795578055781557825578355784557855578655787557885578955790557915579255793557945579555796557975579855799558005580155802558035580455805558065580755808558095581055811558125581355814558155581655817558185581955820558215582255823558245582555826558275582855829558305583155832558335583455835558365583755838558395584055841558425584355844558455584655847558485584955850558515585255853558545585555856558575585855859558605586155862558635586455865558665586755868558695587055871558725587355874558755587655877558785587955880558815588255883558845588555886558875588855889558905589155892558935589455895558965589755898558995590055901559025590355904559055590655907559085590955910559115591255913559145591555916559175591855919559205592155922559235592455925559265592755928559295593055931559325593355934559355593655937559385593955940559415594255943559445594555946559475594855949559505595155952559535595455955559565595755958559595596055961559625596355964559655596655967559685596955970559715597255973559745597555976559775597855979559805598155982559835598455985559865598755988559895599055991559925599355994559955599655997559985599956000560015600256003560045600556006560075600856009560105601156012560135601456015560165601756018560195602056021560225602356024560255602656027560285602956030560315603256033560345603556036560375603856039560405604156042560435604456045560465604756048560495605056051560525605356054560555605656057560585605956060560615606256063560645606556066560675606856069560705607156072560735607456075560765607756078560795608056081560825608356084560855608656087560885608956090560915609256093560945609556096560975609856099561005610156102561035610456105561065610756108561095611056111561125611356114561155611656117561185611956120561215612256123561245612556126561275612856129561305613156132561335613456135561365613756138561395614056141561425614356144561455614656147561485614956150561515615256153561545615556156561575615856159561605616156162561635616456165561665616756168561695617056171561725617356174561755617656177561785617956180561815618256183561845618556186561875618856189561905619156192561935619456195561965619756198561995620056201562025620356204562055620656207562085620956210562115621256213562145621556216562175621856219562205622156222562235622456225562265622756228562295623056231562325623356234562355623656237562385623956240562415624256243562445624556246562475624856249562505625156252562535625456255562565625756258562595626056261562625626356264562655626656267562685626956270562715627256273562745627556276562775627856279562805628156282562835628456285562865628756288562895629056291562925629356294562955629656297562985629956300563015630256303563045630556306563075630856309563105631156312563135631456315563165631756318563195632056321563225632356324563255632656327563285632956330563315633256333563345633556336563375633856339563405634156342563435634456345563465634756348563495635056351563525635356354563555635656357563585635956360563615636256363563645636556366563675636856369563705637156372563735637456375563765637756378563795638056381563825638356384563855638656387563885638956390563915639256393563945639556396563975639856399564005640156402564035640456405564065640756408564095641056411564125641356414564155641656417564185641956420564215642256423564245642556426564275642856429564305643156432564335643456435564365643756438564395644056441564425644356444564455644656447564485644956450564515645256453564545645556456564575645856459564605646156462564635646456465564665646756468564695647056471564725647356474564755647656477564785647956480564815648256483564845648556486564875648856489564905649156492564935649456495564965649756498564995650056501565025650356504565055650656507565085650956510565115651256513565145651556516565175651856519565205652156522565235652456525565265652756528565295653056531565325653356534565355653656537565385653956540565415654256543565445654556546565475654856549565505655156552565535655456555565565655756558565595656056561565625656356564565655656656567565685656956570565715657256573565745657556576565775657856579565805658156582565835658456585565865658756588565895659056591565925659356594565955659656597565985659956600566015660256603566045660556606566075660856609566105661156612566135661456615566165661756618566195662056621566225662356624566255662656627566285662956630566315663256633566345663556636566375663856639566405664156642566435664456645566465664756648566495665056651566525665356654566555665656657566585665956660566615666256663566645666556666566675666856669566705667156672566735667456675566765667756678566795668056681566825668356684566855668656687566885668956690566915669256693566945669556696566975669856699567005670156702567035670456705567065670756708567095671056711567125671356714567155671656717567185671956720567215672256723567245672556726567275672856729567305673156732567335673456735567365673756738567395674056741567425674356744567455674656747567485674956750567515675256753567545675556756567575675856759567605676156762567635676456765567665676756768567695677056771567725677356774567755677656777567785677956780567815678256783567845678556786567875678856789567905679156792567935679456795567965679756798567995680056801568025680356804568055680656807568085680956810568115681256813568145681556816568175681856819568205682156822568235682456825568265682756828568295683056831568325683356834568355683656837568385683956840568415684256843568445684556846568475684856849568505685156852568535685456855568565685756858568595686056861568625686356864568655686656867568685686956870568715687256873568745687556876568775687856879568805688156882568835688456885568865688756888568895689056891568925689356894568955689656897568985689956900569015690256903569045690556906569075690856909569105691156912569135691456915569165691756918569195692056921569225692356924569255692656927569285692956930569315693256933569345693556936569375693856939569405694156942569435694456945569465694756948569495695056951569525695356954569555695656957569585695956960569615696256963569645696556966569675696856969569705697156972569735697456975569765697756978569795698056981569825698356984569855698656987569885698956990569915699256993569945699556996569975699856999570005700157002570035700457005570065700757008570095701057011570125701357014570155701657017570185701957020570215702257023570245702557026570275702857029570305703157032570335703457035570365703757038570395704057041570425704357044570455704657047570485704957050570515705257053570545705557056570575705857059570605706157062570635706457065570665706757068570695707057071570725707357074570755707657077570785707957080570815708257083570845708557086570875708857089570905709157092570935709457095570965709757098570995710057101571025710357104571055710657107571085710957110571115711257113571145711557116571175711857119571205712157122571235712457125571265712757128571295713057131571325713357134571355713657137571385713957140571415714257143571445714557146571475714857149571505715157152571535715457155571565715757158571595716057161571625716357164571655716657167571685716957170571715717257173571745717557176571775717857179571805718157182571835718457185571865718757188571895719057191571925719357194571955719657197571985719957200572015720257203572045720557206572075720857209572105721157212572135721457215572165721757218572195722057221572225722357224572255722657227572285722957230572315723257233572345723557236572375723857239572405724157242572435724457245572465724757248572495725057251572525725357254572555725657257572585725957260572615726257263572645726557266572675726857269572705727157272572735727457275572765727757278572795728057281572825728357284572855728657287572885728957290572915729257293572945729557296572975729857299573005730157302573035730457305573065730757308573095731057311573125731357314573155731657317573185731957320573215732257323573245732557326573275732857329573305733157332573335733457335573365733757338573395734057341573425734357344573455734657347573485734957350573515735257353573545735557356573575735857359573605736157362573635736457365573665736757368573695737057371573725737357374573755737657377573785737957380573815738257383573845738557386573875738857389573905739157392573935739457395573965739757398573995740057401574025740357404574055740657407574085740957410574115741257413574145741557416574175741857419574205742157422574235742457425574265742757428574295743057431574325743357434574355743657437574385743957440574415744257443574445744557446574475744857449574505745157452574535745457455574565745757458574595746057461574625746357464574655746657467574685746957470574715747257473574745747557476574775747857479574805748157482574835748457485574865748757488574895749057491574925749357494574955749657497574985749957500575015750257503575045750557506575075750857509575105751157512575135751457515575165751757518575195752057521575225752357524575255752657527575285752957530575315753257533575345753557536575375753857539575405754157542575435754457545575465754757548575495755057551575525755357554575555755657557575585755957560575615756257563575645756557566575675756857569575705757157572575735757457575575765757757578575795758057581575825758357584575855758657587575885758957590575915759257593575945759557596575975759857599576005760157602576035760457605576065760757608576095761057611576125761357614576155761657617576185761957620576215762257623576245762557626576275762857629576305763157632576335763457635576365763757638576395764057641576425764357644576455764657647576485764957650576515765257653576545765557656576575765857659576605766157662576635766457665576665766757668576695767057671576725767357674576755767657677576785767957680576815768257683576845768557686576875768857689576905769157692576935769457695576965769757698576995770057701577025770357704577055770657707577085770957710577115771257713577145771557716577175771857719577205772157722577235772457725577265772757728577295773057731577325773357734577355773657737577385773957740577415774257743577445774557746577475774857749577505775157752577535775457755577565775757758577595776057761577625776357764577655776657767577685776957770577715777257773577745777557776577775777857779577805778157782577835778457785577865778757788577895779057791577925779357794577955779657797577985779957800578015780257803578045780557806578075780857809578105781157812578135781457815578165781757818578195782057821578225782357824578255782657827578285782957830578315783257833578345783557836578375783857839578405784157842578435784457845578465784757848578495785057851578525785357854578555785657857578585785957860578615786257863578645786557866578675786857869578705787157872578735787457875578765787757878578795788057881578825788357884578855788657887578885788957890578915789257893578945789557896578975789857899579005790157902579035790457905579065790757908579095791057911579125791357914579155791657917579185791957920579215792257923579245792557926579275792857929579305793157932579335793457935579365793757938579395794057941579425794357944579455794657947579485794957950579515795257953579545795557956579575795857959579605796157962579635796457965579665796757968579695797057971579725797357974579755797657977579785797957980579815798257983579845798557986579875798857989579905799157992579935799457995579965799757998579995800058001580025800358004580055800658007580085800958010580115801258013580145801558016580175801858019580205802158022580235802458025580265802758028580295803058031580325803358034580355803658037580385803958040580415804258043580445804558046580475804858049580505805158052580535805458055580565805758058580595806058061580625806358064580655806658067580685806958070580715807258073580745807558076580775807858079580805808158082580835808458085580865808758088580895809058091580925809358094580955809658097580985809958100581015810258103581045810558106581075810858109581105811158112581135811458115581165811758118581195812058121581225812358124581255812658127581285812958130581315813258133581345813558136581375813858139581405814158142581435814458145581465814758148581495815058151581525815358154581555815658157581585815958160581615816258163581645816558166581675816858169581705817158172581735817458175581765817758178581795818058181581825818358184581855818658187581885818958190581915819258193581945819558196581975819858199582005820158202582035820458205582065820758208582095821058211582125821358214582155821658217582185821958220582215822258223582245822558226582275822858229582305823158232582335823458235582365823758238582395824058241582425824358244582455824658247582485824958250582515825258253582545825558256582575825858259582605826158262582635826458265582665826758268582695827058271582725827358274582755827658277582785827958280582815828258283582845828558286582875828858289582905829158292582935829458295582965829758298582995830058301583025830358304583055830658307583085830958310583115831258313583145831558316583175831858319583205832158322583235832458325583265832758328583295833058331583325833358334583355833658337583385833958340583415834258343583445834558346583475834858349583505835158352583535835458355583565835758358583595836058361583625836358364583655836658367583685836958370583715837258373583745837558376583775837858379583805838158382583835838458385583865838758388583895839058391583925839358394583955839658397583985839958400584015840258403584045840558406584075840858409584105841158412584135841458415584165841758418584195842058421584225842358424584255842658427584285842958430584315843258433584345843558436584375843858439584405844158442584435844458445584465844758448584495845058451584525845358454584555845658457584585845958460584615846258463584645846558466584675846858469584705847158472584735847458475584765847758478584795848058481584825848358484584855848658487584885848958490584915849258493584945849558496584975849858499585005850158502585035850458505585065850758508585095851058511585125851358514585155851658517585185851958520585215852258523585245852558526585275852858529585305853158532585335853458535585365853758538585395854058541585425854358544585455854658547585485854958550585515855258553585545855558556585575855858559585605856158562585635856458565585665856758568585695857058571585725857358574585755857658577585785857958580585815858258583585845858558586585875858858589585905859158592585935859458595585965859758598585995860058601586025860358604586055860658607586085860958610586115861258613586145861558616586175861858619586205862158622586235862458625586265862758628586295863058631586325863358634586355863658637586385863958640586415864258643586445864558646586475864858649586505865158652586535865458655586565865758658586595866058661586625866358664586655866658667586685866958670586715867258673586745867558676586775867858679586805868158682586835868458685586865868758688586895869058691586925869358694586955869658697586985869958700587015870258703587045870558706587075870858709587105871158712587135871458715587165871758718587195872058721587225872358724587255872658727587285872958730587315873258733587345873558736587375873858739587405874158742587435874458745587465874758748587495875058751587525875358754587555875658757587585875958760587615876258763587645876558766587675876858769587705877158772587735877458775587765877758778587795878058781587825878358784587855878658787587885878958790587915879258793587945879558796587975879858799588005880158802588035880458805588065880758808588095881058811588125881358814588155881658817588185881958820588215882258823588245882558826588275882858829588305883158832588335883458835588365883758838588395884058841588425884358844588455884658847588485884958850588515885258853588545885558856588575885858859588605886158862588635886458865588665886758868588695887058871588725887358874588755887658877588785887958880588815888258883588845888558886588875888858889588905889158892588935889458895588965889758898588995890058901589025890358904589055890658907589085890958910589115891258913589145891558916589175891858919589205892158922589235892458925589265892758928589295893058931589325893358934589355893658937589385893958940589415894258943589445894558946589475894858949589505895158952589535895458955589565895758958589595896058961589625896358964589655896658967589685896958970589715897258973589745897558976589775897858979589805898158982589835898458985589865898758988589895899058991589925899358994589955899658997589985899959000590015900259003590045900559006590075900859009590105901159012590135901459015590165901759018590195902059021590225902359024590255902659027590285902959030590315903259033 |
- /*!-----------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.20.0(6363745c0a33c27b149b89342a7b96d354fb554c)
- * Released under the MIT license
- * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
- *-----------------------------------------------------------*/
- (function () {
- var e, t,
- n = ["require", "exports", "vs/base/common/lifecycle", "vs/editor/common/core/range", "vs/base/common/event", "vs/base/common/strings", "vs/base/browser/dom", "vs/nls", "vs/nls!vs/editor/editor.main", "vs/css!vs/editor/editor.main", "vs/base/common/errors", "vs/platform/instantiation/common/instantiation", "vs/editor/browser/editorExtensions", "vs/editor/common/core/position", "vs/platform/theme/common/themeService", "vs/base/common/async", "vs/base/common/platform", "vs/editor/common/modes", "vs/platform/contextkey/common/contextkey", "vs/base/common/arrays", "vs/platform/theme/common/colorRegistry", "vs/base/common/types", "vs/editor/common/core/selection", "vs/editor/common/editorContextKeys", "vs/base/browser/browser", "vs/base/common/uri", "vs/base/common/cancellation", "vs/base/common/color", "vs/base/browser/fastDomNode", "vs/platform/commands/common/commands", "vs/editor/common/model/textModel", "vs/base/common/objects", "vs/editor/browser/services/codeEditorService", "vs/editor/common/config/editorOptions", "vs/platform/keybinding/common/keybinding", "vs/platform/notification/common/notification", "vs/base/common/keyCodes", "vs/editor/browser/view/viewPart", "vs/base/common/map", "vs/base/common/resources", "vs/editor/common/controller/cursorCommon", "vs/editor/common/modes/languageConfigurationRegistry", "vs/platform/registry/common/platform", "vs/platform/configuration/common/configuration", "vs/editor/common/view/editorColorRegistry", "vs/base/browser/mouseEvent", "vs/base/common/network", "vs/base/browser/ui/widget", "vs/editor/common/model", "vs/editor/common/services/modelService", "vs/base/browser/ui/aria/aria", "vs/platform/opener/common/opener", "vs/base/browser/event", "vs/base/browser/ui/scrollbar/scrollableElement", "vs/base/common/iterator", "vs/base/common/actions", "vs/base/browser/keyboardEvent", "vs/base/browser/touch", "vs/editor/common/core/editOperation", "vs/editor/common/standaloneStrings", "vs/editor/browser/config/configuration", "vs/base/common/filters", "vs/editor/common/services/editorWorkerService", "vs/editor/common/modes/nullMode", "vs/platform/accessibility/common/accessibility", "vs/platform/actions/common/actions", "vs/platform/contextview/browser/contextView", "vs/editor/browser/core/editorState", "vs/editor/common/editorCommon", "vs/editor/common/viewModel/viewModel", "vs/base/browser/ui/actionbar/actionbar", "vs/editor/common/services/modeService", "vs/platform/markers/common/markers", "vs/platform/progress/common/progress", "vs/platform/storage/common/storage", "vs/base/common/htmlContent", "vs/base/common/linkedList", "vs/base/common/path", "vs/base/browser/globalMouseMoveMonitor", "vs/editor/common/core/characterClassifier", "vs/editor/common/commands/replaceCommand", "vs/editor/common/view/viewEvents", "vs/editor/browser/view/dynamicViewOverlay", "vs/platform/instantiation/common/extensions", "vs/editor/common/services/resolverService", "vs/platform/configuration/common/configurationRegistry", "vs/platform/keybinding/common/keybindingsRegistry", "vs/base/common/collections", "vs/base/browser/canIUse", "vs/editor/common/controller/wordCharacterClassifier", "vs/editor/common/modes/languageConfiguration", "vs/editor/common/view/renderingContext", "vs/editor/common/viewModel/viewEventHandler", "vs/editor/common/core/lineTokens", "vs/editor/standalone/common/standaloneThemeService", "vs/platform/log/common/log", "vs/platform/telemetry/common/telemetry", "vs/platform/theme/common/styler", "vs/base/browser/dnd", "vs/base/browser/ui/tree/tree", "vs/base/common/codicons", "vs/base/common/decorators", "vs/base/common/functional", "vs/base/common/range", "vs/base/browser/ui/sash/sash", "vs/editor/common/config/editorZoom", "vs/editor/common/core/stringBuilder", "vs/editor/common/core/token", "vs/editor/browser/editorBrowser", "vs/editor/common/model/wordHelper", "vs/editor/common/viewLayout/viewLineRenderer", "vs/editor/contrib/codeAction/types", "vs/base/common/severity", "vs/editor/contrib/gotoSymbol/referencesModel", "vs/editor/common/services/textResourceConfigurationService", "vs/platform/instantiation/common/serviceCollection", "vs/platform/label/common/label", "vs/editor/contrib/markdown/markdownRenderer", "vs/editor/common/modes/modesRegistry", "vs/editor/contrib/codeAction/codeAction", "vs/editor/contrib/suggest/suggest", "vs/editor/browser/widget/codeEditorWidget", "vs/editor/contrib/message/messageController", "vs/editor/contrib/peekView/peekView", "vs/base/common/assert", "vs/base/common/hash", "vs/base/common/diff/diff", "vs/base/common/idGenerator", "vs/base/common/lazy", "vs/base/browser/ui/tree/indexTreeModel", "vs/base/browser/ui/tree/objectTreeModel", "vs/base/common/numbers", "vs/base/common/stopwatch", "vs/base/browser/ui/highlightedlabel/highlightedLabel", "vs/base/browser/formattedTextRenderer", "vs/base/browser/ui/scrollbar/scrollbarArrow", "vs/base/common/labels", "vs/base/parts/tree/browser/treeDefaults", "vs/base/browser/ui/checkbox/checkbox", "vs/base/browser/ui/iconLabel/iconLabel", "vs/base/browser/ui/list/listView", "vs/editor/browser/editorDom", "vs/editor/common/config/fontInfo", "vs/editor/browser/view/viewLayer", "vs/editor/common/model/textModelSearch", "vs/editor/common/modes/supports", "vs/editor/common/modes/supports/richEditBrackets", "vs/editor/common/standalone/standaloneEnums", "vs/editor/common/viewLayout/lineDecorations", "vs/editor/browser/viewParts/glyphMargin/glyphMargin", "vs/editor/contrib/folding/foldingRanges", "vs/editor/contrib/snippet/snippetParser", "vs/base/browser/ui/inputbox/inputBox", "vs/base/browser/ui/list/listWidget", "vs/base/browser/ui/tree/abstractTree", "vs/base/parts/quickopen/browser/quickOpenModel", "vs/editor/browser/services/bulkEditService", "vs/editor/common/model/tokensStore", "vs/editor/common/controller/cursorMoveOperations", "vs/editor/common/controller/cursorTypeOperations", "vs/editor/common/controller/cursorWordOperations", "vs/editor/common/viewModel/splitLinesCollection", "vs/platform/clipboard/common/clipboardService", "vs/editor/common/config/commonEditorConfig", "vs/editor/browser/controller/coreCommands", "vs/editor/contrib/parameterHints/provideSignatureHelp", "vs/editor/browser/controller/mouseTarget", "vs/editor/browser/widget/embeddedCodeEditorWidget", "vs/editor/contrib/find/findModel", "vs/editor/standalone/browser/quickOpen/editorQuickOpen", "vs/platform/list/browser/listService", "vs/platform/workspace/common/workspace", "vs/editor/standalone/browser/simpleServices", "vs/editor/contrib/snippet/snippetController2", "vs/base/browser/iframe", "vs/base/browser/ui/scrollbar/scrollbarState", "vs/base/common/scrollable", "vs/base/common/extpath", "vs/base/common/glob", "vs/base/common/uint", "vs/base/common/marshalling", "vs/base/browser/ui/scrollbar/abstractScrollbar", "vs/base/common/worker/simpleWorker", "vs/base/browser/ui/codiconLabel/codiconLabel", "vs/css!vs/base/browser/ui/findinput/findInput", "vs/editor/browser/config/elementSizeObserver", "vs/editor/browser/viewParts/minimap/minimapCharSheet", "vs/editor/browser/controller/textAreaState", "vs/editor/browser/widget/diffNavigator", "vs/editor/browser/controller/textAreaInput", "vs/editor/common/editorAction", "vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase", "vs/editor/common/standalone/standaloneBase", "vs/editor/common/view/overviewZoneManager", "vs/editor/common/viewModel/prefixSumComputer", "vs/editor/browser/viewParts/margin/margin", "vs/editor/contrib/comment/blockCommentCommand", "vs/editor/contrib/folding/syntaxRangeProvider", "vs/editor/contrib/format/formattingEdit", "vs/editor/contrib/gotoSymbol/link/clickLinkGesture", "vs/editor/contrib/hover/hoverOperation", "vs/editor/contrib/hover/hoverWidgets", "vs/editor/contrib/smartSelect/bracketSelections", "vs/editor/standalone/common/monarch/monarchCommon", "vs/base/browser/ui/findinput/findInputCheckboxes", "vs/base/browser/ui/menu/menu", "vs/base/browser/ui/tree/objectTree", "vs/base/common/keybindingLabels", "vs/platform/files/common/files", "vs/platform/instantiation/common/descriptors", "vs/editor/common/services/markersDecorationService", "vs/editor/common/commands/shiftCommand", "vs/editor/common/controller/cursorDeleteOperations", "vs/editor/common/controller/cursorMoveCommands", "vs/editor/common/modes/textToHtmlTokenizer", "vs/editor/common/viewModel/minimapTokensColorTracker", "vs/editor/standalone/common/monarch/monarchLexer", "vs/platform/keybinding/common/keybindingResolver", "vs/platform/layout/browser/layoutService", "vs/editor/common/services/editorWorkerServiceImpl", "vs/platform/jsonschemas/common/jsonContributionRegistry", "vs/editor/contrib/codelens/codelens", "vs/editor/contrib/colorPicker/color", "vs/editor/contrib/colorPicker/colorDetector", "vs/editor/contrib/gotoSymbol/goToSymbol", "vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode", "vs/editor/contrib/wordOperations/wordOperations", "vs/editor/browser/viewParts/lines/viewLine", "vs/editor/browser/view/viewOutgoingEvents", "vs/editor/browser/viewParts/lineNumbers/lineNumbers", "vs/editor/browser/widget/diffEditorWidget", "vs/editor/contrib/documentSymbols/outlineTree", "vs/editor/contrib/find/findController", "vs/editor/contrib/codeAction/codeActionCommands", "vs/editor/contrib/gotoSymbol/peek/referencesController", "vs/editor/contrib/gotoSymbol/goToCommands", "vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", "vs/editor/contrib/gotoError/gotoError", "vs/editor/standalone/browser/standaloneServices", "vs/base/browser/ui/list/list", "vs/base/browser/ui/list/splice", "vs/base/common/diff/diffChange", "vs/base/common/history", "vs/base/browser/ui/tree/compressedObjectTreeModel", "vs/base/browser/ui/scrollbar/scrollbarVisibilityController", "vs/base/common/process", "vs/base/browser/ui/list/rangeMap", "vs/base/common/search", "vs/base/browser/markdownRenderer", "vs/base/browser/ui/list/rowCache", "vs/base/browser/ui/scrollbar/horizontalScrollbar", "vs/base/browser/ui/scrollbar/verticalScrollbar", "vs/base/common/mime", "vs/base/parts/quickopen/browser/quickOpenViewer", "vs/base/parts/tree/browser/tree", "vs/base/parts/tree/browser/treeDnd", "vs/base/parts/tree/browser/treeModel", "vs/base/parts/tree/browser/treeViewModel", "vs/base/worker/defaultWorkerFactory", "vs/css!vs/base/browser/ui/actionbar/actionbar", "vs/css!vs/base/browser/ui/aria/aria", "vs/css!vs/base/browser/ui/checkbox/checkbox", "vs/css!vs/base/browser/ui/codiconLabel/codicon/codicon", "vs/css!vs/base/browser/ui/codiconLabel/codicon/codicon-animations", "vs/css!vs/base/browser/ui/contextview/contextview", "vs/base/browser/ui/contextview/contextview", "vs/css!vs/base/browser/ui/countBadge/countBadge", "vs/base/browser/ui/countBadge/countBadge", "vs/css!vs/base/browser/ui/iconLabel/iconlabel", "vs/css!vs/base/browser/ui/inputbox/inputBox", "vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel", "vs/css!vs/base/browser/ui/list/list", "vs/css!vs/base/browser/ui/menu/menu", "vs/css!vs/base/browser/ui/progressbar/progressbar", "vs/base/browser/ui/progressbar/progressbar", "vs/css!vs/base/browser/ui/sash/sash", "vs/css!vs/base/browser/ui/scrollbar/media/scrollbars", "vs/base/parts/tree/browser/treeView", "vs/css!vs/base/browser/ui/splitview/splitview", "vs/base/browser/ui/splitview/splitview", "vs/css!vs/base/browser/ui/tree/media/tree", "vs/css!vs/base/parts/quickopen/browser/quickopen", "vs/css!vs/base/parts/tree/browser/tree", "vs/base/parts/tree/browser/treeImpl", "vs/css!vs/editor/browser/controller/textAreaHandler", "vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight", "vs/css!vs/editor/browser/viewParts/decorations/decorations", "vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin", "vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides", "vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers", "vs/css!vs/editor/browser/viewParts/lines/viewLines", "vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations", "vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations", "vs/css!vs/editor/browser/viewParts/minimap/minimap", "vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets", "vs/css!vs/editor/browser/viewParts/rulers/rulers", "vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration", "vs/css!vs/editor/browser/viewParts/selections/selections", "vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors", "vs/css!vs/editor/browser/widget/media/diffEditor", "vs/css!vs/editor/browser/widget/media/diffReview", "vs/css!vs/editor/browser/widget/media/editor", "vs/css!vs/editor/contrib/bracketMatching/bracketMatching", "vs/css!vs/editor/contrib/clipboard/clipboard", "vs/css!vs/editor/contrib/codeAction/lightBulbWidget", "vs/css!vs/editor/contrib/codelens/codelensWidget", "vs/css!vs/editor/contrib/colorPicker/colorPicker", "vs/css!vs/editor/contrib/dnd/dnd", "vs/css!vs/editor/contrib/documentSymbols/media/outlineTree", "vs/css!vs/editor/contrib/documentSymbols/media/symbol-icons", "vs/css!vs/editor/contrib/find/findWidget", "vs/css!vs/editor/contrib/folding/folding", "vs/css!vs/editor/contrib/gotoError/media/gotoErrorWidget", "vs/css!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", "vs/css!vs/editor/contrib/gotoSymbol/peek/referencesWidget", "vs/css!vs/editor/contrib/hover/hover", "vs/css!vs/editor/contrib/links/links", "vs/css!vs/editor/contrib/message/messageController", "vs/css!vs/editor/contrib/parameterHints/parameterHints", "vs/css!vs/editor/contrib/peekView/media/peekViewWidget", "vs/css!vs/editor/contrib/rename/renameInputField", "vs/css!vs/editor/contrib/snippet/snippetSession", "vs/css!vs/editor/contrib/suggest/media/suggest", "vs/css!vs/editor/contrib/suggest/media/suggestStatusBar", "vs/css!vs/editor/contrib/zoneWidget/zoneWidget", "vs/css!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp", "vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard", "vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens", "vs/css!vs/editor/standalone/browser/quickOpen/editorQuickOpen", "vs/css!vs/editor/standalone/browser/quickOpen/gotoLine", "vs/css!vs/editor/standalone/browser/quickOpen/quickOutline", "vs/css!vs/editor/standalone/browser/standalone-tokens", "vs/css!vs/platform/contextview/browser/contextMenuHandler", "vs/editor/browser/config/charWidthReader", "vs/editor/browser/services/abstractCodeEditorService", "vs/editor/browser/viewParts/minimap/minimapCharRenderer", "vs/editor/browser/viewParts/minimap/minimapPreBaked", "vs/editor/browser/viewParts/minimap/minimapCharRendererFactory", "vs/editor/common/commands/trimTrailingWhitespaceCommand", "vs/editor/common/core/rgba", "vs/editor/common/commands/surroundSelectionCommand", "vs/editor/common/diff/diffComputer", "vs/editor/common/model/editStack", "vs/editor/common/model/indentationGuesser", "vs/editor/common/model/intervalTree", "vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase", "vs/editor/common/model/textModelEvents", "vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer", "vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder", "vs/editor/common/modes/abstractMode", "vs/editor/common/modes/languageSelector", "vs/editor/common/modes/linkComputer", "vs/editor/common/modes/supports/characterPair", "vs/editor/common/modes/supports/indentRules", "vs/editor/common/modes/supports/inplaceReplaceSupport", "vs/editor/common/modes/supports/onEnter", "vs/editor/common/modes/supports/electricCharacter", "vs/editor/common/modes/supports/tokenization", "vs/editor/common/modes/tokenizationRegistry", "vs/editor/browser/viewParts/lines/rangeUtil", "vs/editor/common/view/viewContext", "vs/editor/common/view/viewEventDispatcher", "vs/editor/common/viewLayout/linesLayout", "vs/editor/common/viewLayout/viewLinesViewportData", "vs/editor/common/model/mirrorTextModel", "vs/editor/common/services/editorSimpleWorker", "vs/editor/browser/viewParts/contentWidgets/contentWidgets", "vs/editor/browser/viewParts/decorations/decorations", "vs/editor/browser/viewParts/linesDecorations/linesDecorations", "vs/editor/browser/viewParts/marginDecorations/marginDecorations", "vs/editor/browser/viewParts/overlayWidgets/overlayWidgets", "vs/editor/browser/viewParts/overviewRuler/overviewRuler", "vs/editor/browser/viewParts/viewZones/viewZones", "vs/editor/common/viewLayout/viewLayout", "vs/editor/contrib/caretOperations/moveCaretCommand", "vs/editor/contrib/colorPicker/colorPickerModel", "vs/editor/contrib/comment/lineCommentCommand", "vs/editor/contrib/dnd/dragAndDropCommand", "vs/editor/contrib/find/findState", "vs/editor/contrib/find/replaceAllCommand", "vs/editor/contrib/find/replacePattern", "vs/editor/contrib/folding/foldingModel", "vs/editor/contrib/folding/hiddenRangeModel", "vs/editor/contrib/folding/intializingRangeProvider", "vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand", "vs/editor/contrib/indentation/indentUtils", "vs/editor/contrib/linesOperations/copyLinesCommand", "vs/editor/contrib/linesOperations/sortLinesCommand", "vs/editor/contrib/smartSelect/wordSelections", "vs/editor/contrib/suggest/completionModel", "vs/editor/contrib/suggest/suggestCommitCharacters", "vs/editor/contrib/suggest/suggestRangeHighlighter", "vs/editor/contrib/suggest/wordDistance", "vs/editor/standalone/common/monarch/monarchCompile", "vs/nls!vs/base/browser/ui/actionbar/actionbar", "vs/nls!vs/base/browser/ui/aria/aria", "vs/nls!vs/base/browser/ui/findinput/findInput", "vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes", "vs/nls!vs/base/browser/ui/findinput/replaceInput", "vs/nls!vs/base/browser/ui/inputbox/inputBox", "vs/base/browser/ui/findinput/findInput", "vs/base/browser/ui/findinput/replaceInput", "vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel", "vs/nls!vs/base/browser/ui/list/listWidget", "vs/nls!vs/base/browser/ui/menu/menu", "vs/base/browser/contextmenu", "vs/nls!vs/base/browser/ui/tree/abstractTree", "vs/base/browser/ui/tree/dataTree", "vs/base/browser/ui/tree/asyncDataTree", "vs/nls!vs/base/common/keybindingLabels", "vs/base/browser/ui/keybindingLabel/keybindingLabel", "vs/nls!vs/base/common/severity", "vs/nls!vs/base/parts/quickopen/browser/quickOpenModel", "vs/nls!vs/base/parts/quickopen/browser/quickOpenWidget", "vs/base/parts/quickopen/browser/quickOpenWidget", "vs/nls!vs/editor/browser/controller/coreCommands", "vs/nls!vs/editor/browser/controller/textAreaHandler", "vs/nls!vs/editor/browser/widget/codeEditorWidget", "vs/nls!vs/editor/browser/widget/diffEditorWidget", "vs/nls!vs/editor/browser/widget/diffReview", "vs/nls!vs/editor/browser/widget/inlineDiffMargin", "vs/editor/browser/widget/inlineDiffMargin", "vs/nls!vs/editor/common/config/commonEditorConfig", "vs/nls!vs/editor/common/config/editorOptions", "vs/editor/common/viewModel/viewModelDecorations", "vs/nls!vs/editor/common/modes/modesRegistry", "vs/nls!vs/editor/common/standaloneStrings", "vs/nls!vs/editor/common/view/editorColorRegistry", "vs/nls!vs/editor/contrib/bracketMatching/bracketMatching", "vs/nls!vs/editor/contrib/caretOperations/caretOperations", "vs/nls!vs/editor/contrib/caretOperations/transpose", "vs/nls!vs/editor/contrib/clipboard/clipboard", "vs/nls!vs/editor/contrib/codeAction/codeActionCommands", "vs/nls!vs/editor/contrib/codeAction/lightBulbWidget", "vs/nls!vs/editor/contrib/comment/comment", "vs/nls!vs/editor/contrib/contextmenu/contextmenu", "vs/nls!vs/editor/contrib/cursorUndo/cursorUndo", "vs/nls!vs/editor/contrib/documentSymbols/outlineTree", "vs/nls!vs/editor/contrib/find/findController", "vs/nls!vs/editor/contrib/find/findWidget", "vs/nls!vs/editor/contrib/folding/folding", "vs/nls!vs/editor/contrib/fontZoom/fontZoom", "vs/nls!vs/editor/contrib/format/format", "vs/nls!vs/editor/contrib/format/formatActions", "vs/nls!vs/editor/contrib/gotoError/gotoError", "vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget", "vs/nls!vs/editor/contrib/gotoSymbol/goToCommands", "vs/nls!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", "vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesController", "vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesTree", "vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesWidget", "vs/nls!vs/editor/contrib/gotoSymbol/referencesModel", "vs/nls!vs/editor/contrib/gotoSymbol/symbolNavigation", "vs/nls!vs/editor/contrib/hover/hover", "vs/nls!vs/editor/contrib/hover/modesContentHover", "vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace", "vs/nls!vs/editor/contrib/linesOperations/linesOperations", "vs/nls!vs/editor/contrib/links/links", "vs/nls!vs/editor/contrib/message/messageController", "vs/nls!vs/editor/contrib/multicursor/multicursor", "vs/nls!vs/editor/contrib/parameterHints/parameterHints", "vs/nls!vs/editor/contrib/parameterHints/parameterHintsWidget", "vs/nls!vs/editor/contrib/peekView/peekView", "vs/nls!vs/editor/contrib/rename/rename", "vs/nls!vs/editor/contrib/rename/renameInputField", "vs/nls!vs/editor/contrib/smartSelect/smartSelect", "vs/nls!vs/editor/contrib/snippet/snippetVariables", "vs/nls!vs/editor/contrib/suggest/suggestController", "vs/nls!vs/editor/contrib/suggest/suggestWidget", "vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode", "vs/nls!vs/editor/contrib/tokenization/tokenization", "vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter", "vs/nls!vs/platform/configuration/common/configurationRegistry", "vs/nls!vs/platform/keybinding/common/abstractKeybindingService", "vs/nls!vs/platform/list/browser/listService", "vs/nls!vs/platform/markers/common/markers", "vs/nls!vs/platform/theme/common/colorRegistry", "vs/platform/contextkey/common/contextkeys", "vs/platform/editor/common/editor", "vs/platform/extensions/common/extensions", "vs/platform/instantiation/common/graph", "vs/editor/common/modes/languageFeatureRegistry", "vs/editor/common/model/textModelTokens", "vs/editor/common/controller/cursorColumnSelection", "vs/editor/common/controller/oneCursor", "vs/editor/common/controller/cursorCollection", "vs/editor/common/controller/cursor", "vs/editor/common/viewModel/monospaceLineBreaksComputer", "vs/editor/common/viewModel/viewModelImpl", "vs/editor/contrib/documentSymbols/outlineModel", "vs/editor/contrib/folding/foldingDecorations", "vs/editor/contrib/folding/indentRangeProvider", "vs/editor/contrib/linesOperations/moveLinesCommand", "vs/editor/contrib/zoneWidget/zoneWidget", "vs/editor/standalone/browser/colorizer", "vs/editor/contrib/links/getLinks", "vs/editor/contrib/quickOpen/quickOpen", "vs/editor/contrib/suggest/suggestAlternatives", "vs/editor/contrib/suggest/wordContextKey", "vs/platform/actions/common/menuService", "vs/platform/dialogs/common/dialogs", "vs/platform/instantiation/common/instantiationService", "vs/platform/keybinding/common/abstractKeybindingService", "vs/platform/keybinding/common/baseResolvedKeybinding", "vs/platform/keybinding/common/resolvedKeybindingItem", "vs/platform/keybinding/common/usLayoutResolvedKeybinding", "vs/platform/contextview/browser/contextViewService", "vs/editor/common/services/webWorker", "vs/platform/markers/common/markerService", "vs/editor/browser/services/openerService", "vs/editor/contrib/hover/modesGlyphHover", "vs/editor/common/services/getIconClasses", "vs/editor/browser/view/domLineBreaksComputer", "vs/editor/browser/view/viewOverlays", "vs/editor/browser/viewParts/viewCursors/viewCursor", "vs/editor/common/services/languagesRegistry", "vs/editor/common/services/modeServiceImpl", "vs/platform/accessibility/common/accessibilityService", "vs/platform/configuration/common/configurationModels", "vs/platform/contextkey/browser/contextKeyService", "vs/platform/browser/contextScopedHistoryWidget", "vs/editor/contrib/suggest/suggestMemory", "vs/editor/browser/core/keybindingCancellation", "vs/editor/browser/view/viewController", "vs/editor/contrib/caretOperations/caretOperations", "vs/editor/contrib/caretOperations/transpose", "vs/editor/contrib/clipboard/clipboard", "vs/editor/contrib/codeAction/codeActionMenu", "vs/editor/contrib/codeAction/codeActionModel", "vs/editor/contrib/codelens/codeLensCache", "vs/editor/contrib/comment/comment", "vs/editor/contrib/contextmenu/contextmenu", "vs/editor/contrib/cursorUndo/cursorUndo", "vs/editor/contrib/dnd/dnd", "vs/editor/contrib/fontZoom/fontZoom", "vs/editor/contrib/format/format", "vs/editor/contrib/format/formatActions", "vs/editor/contrib/gotoSymbol/symbolNavigation", "vs/editor/contrib/hover/getHover", "vs/editor/contrib/linesOperations/linesOperations", "vs/editor/contrib/parameterHints/parameterHintsModel", "vs/editor/contrib/smartSelect/smartSelect", "vs/editor/contrib/tokenization/tokenization", "vs/editor/contrib/wordPartOperations/wordPartOperations", "vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard", "vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast", "vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget", "vs/platform/contextview/browser/contextMenuHandler", "vs/editor/browser/services/codeEditorServiceImpl", "vs/editor/browser/viewParts/editorScrollbar/editorScrollbar", "vs/editor/browser/controller/mouseHandler", "vs/editor/browser/controller/pointerHandler", "vs/editor/browser/viewParts/lines/viewLines", "vs/editor/browser/viewParts/minimap/minimap", "vs/editor/browser/viewParts/scrollDecoration/scrollDecoration", "vs/editor/browser/viewParts/selections/selections", "vs/editor/common/services/modelServiceImpl", "vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight", "vs/editor/browser/viewParts/indentGuides/indentGuides", "vs/editor/browser/controller/textAreaHandler", "vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler", "vs/editor/browser/viewParts/rulers/rulers", "vs/editor/browser/viewParts/viewCursors/viewCursors", "vs/editor/browser/view/viewImpl", "vs/editor/browser/widget/diffReview", "vs/editor/common/services/markerDecorationsServiceImpl", "vs/editor/contrib/bracketMatching/bracketMatching", "vs/editor/contrib/codeAction/lightBulbWidget", "vs/editor/contrib/codelens/codelensWidget", "vs/editor/contrib/codelens/codelensController", "vs/editor/contrib/colorPicker/colorPickerWidget", "vs/editor/contrib/find/findDecorations", "vs/editor/contrib/find/findOptionsWidget", "vs/editor/contrib/find/findWidget", "vs/editor/contrib/folding/folding", "vs/editor/contrib/gotoSymbol/peek/referencesTree", "vs/editor/contrib/inPlaceReplace/inPlaceReplace", "vs/editor/contrib/links/links", "vs/editor/contrib/codeAction/codeActionUi", "vs/editor/contrib/codeAction/codeActionContributions", "vs/editor/contrib/multicursor/multicursor", "vs/editor/contrib/parameterHints/parameterHintsWidget", "vs/editor/contrib/parameterHints/parameterHints", "vs/editor/contrib/rename/renameInputField", "vs/editor/contrib/rename/rename", "vs/editor/contrib/suggest/suggestWidget", "vs/editor/contrib/wordHighlighter/wordHighlighter", "vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp", "vs/editor/standalone/browser/inspectTokens/inspectTokens", "vs/editor/standalone/browser/quickOpen/gotoLine", "vs/editor/standalone/browser/quickOpen/quickCommand", "vs/editor/standalone/browser/quickOpen/quickOutline", "vs/editor/standalone/browser/standaloneCodeServiceImpl", "vs/editor/standalone/common/themes", "vs/editor/standalone/browser/standaloneThemeServiceImpl", "vs/platform/contextview/browser/contextMenuService", "vs/editor/contrib/gotoSymbol/peek/referencesWidget", "vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch", "vs/platform/severityIcon/common/severityIcon", "vs/editor/contrib/gotoError/gotoErrorWidget", "vs/editor/contrib/hover/modesContentHover", "vs/editor/contrib/hover/hover", "vs/editor/standalone/browser/standaloneCodeEditor", "vs/editor/standalone/browser/standaloneEditor", "vs/editor/standalone/browser/standaloneLanguages", "vs/editor/editor.api", "vs/platform/workspaces/common/workspaces", "vs/editor/contrib/snippet/snippetVariables", "vs/editor/contrib/snippet/snippetSession", "vs/editor/contrib/suggest/suggestModel", "vs/editor/contrib/suggest/suggestController", "vs/editor/editor.all", "vs/base/common/marked/marked", "vs/base/common/insane/insane", "vs/editor/common/standalone/promise-polyfill/polyfill", "vs/editor/edcore.main"],
- i = function (e) {
- for (var t = [], i = 0, o = e.length; i < o; i++) t[i] = n[e[i]];
- return t
- };
- !function (e) {
- var t = function () {
- function e() {
- this._pendingLoads = 0
- }
- return e.prototype.attachListeners = function (e, t, n, i) {
- var o = function () {
- t.removeEventListener("load", r), t.removeEventListener("error", s)
- }, r = function (e) {
- o(), n()
- }, s = function (e) {
- o(), i(e)
- };
- t.addEventListener("load", r), t.addEventListener("error", s)
- }, e.prototype._onLoad = function (e, t) {
- this._pendingLoads--, t()
- }, e.prototype._onLoadError = function (e, t, n) {
- this._pendingLoads--, t(n)
- }, e.prototype._insertLinkNode = function (e) {
- this._pendingLoads++;
- var t = document.head || document.getElementsByTagName("head")[0],
- n = t.getElementsByTagName("link") || document.head.getElementsByTagName("script");
- n.length > 0 ? t.insertBefore(e, n[n.length - 1]) : t.appendChild(e)
- }, e.prototype.createLinkTag = function (e, t, n, i) {
- var o = this, r = document.createElement("link");
- r.setAttribute("rel", "stylesheet"), r.setAttribute("type", "text/css"), r.setAttribute("data-name", e);
- return this.attachListeners(e, r, (function () {
- return o._onLoad(e, n)
- }), (function (t) {
- return o._onLoadError(e, i, t)
- })), r.setAttribute("href", t), r
- }, e.prototype._linkTagExists = function (e, t) {
- var n, i, o, r, s = document.getElementsByTagName("link");
- for (n = 0, i = s.length; n < i; n++) if (o = s[n].getAttribute("data-name"), r = s[n].getAttribute("href"), o === e || r === t) return !0;
- return !1
- }, e.prototype.load = function (e, t, n, i) {
- if (this._linkTagExists(e, t)) n(); else {
- var o = this.createLinkTag(e, t, n, i);
- this._insertLinkNode(o)
- }
- }, e
- }(), n = function () {
- function e() {
- this._cssLoader = new t
- }
- return e.prototype.load = function (e, t, n) {
- var i = t.toUrl(e + ".css");
- this._cssLoader.load(e, i, (function (e) {
- n({})
- }), (function (e) {
- "function" == typeof n.error && n.error("Could not find " + i + " or it was empty")
- }))
- }, e
- }();
- e.CSSPlugin = n, define("vs/css", new n)
- }(e || (e = {})), function (e) {
- var t = function () {
- function e() {
- this._detected = !1, this._isPseudo = !1
- }
- return Object.defineProperty(e.prototype, "isPseudo", {
- get: function () {
- return this._detect(), this._isPseudo
- }, enumerable: !0, configurable: !0
- }), e.prototype._detect = function () {
- this._detected || (this._detected = !0,
- this._isPseudo = "undefined" != typeof document && document.location && document.location.hash.indexOf("pseudo=true") >= 0)
- }, e
- }();
- function n(e, t, n) {
- var i;
- return i = 0 === t.length ? e : e.replace(/\{(\d+)\}/g, (function (e, n) {
- var i = n[0], o = t[i], r = e;
- return "string" == typeof o ? r = o : "number" != typeof o && "boolean" != typeof o && null != o || (r = String(o)), r
- })), n.isPseudo && (i = "[" + i.replace(/[aouei]/g, "$&$&") + "]"), i
- }
- function i(e, t, i) {
- for (var o = [], r = 3; r < arguments.length; r++) o[r - 3] = arguments[r];
- return n(i, o, e)
- }
- function o(e, t) {
- return function (i, o) {
- var r = Array.prototype.slice.call(arguments, 2);
- return n(e[i], r, t)
- }
- }
- var r = function () {
- function e(e) {
- var t = this;
- this._env = e, this.localize = function (e, n) {
- for (var o = [], r = 2; r < arguments.length; r++) o[r - 2] = arguments[r];
- return i.apply(void 0, [t._env, e, n].concat(o))
- }
- }
- return e.prototype.setPseudoTranslation = function (e) {
- this._env._isPseudo = e
- }, e.prototype.create = function (e, t) {
- return {localize: o(t[e], this._env)}
- }, e.prototype.load = function (t, n, i, r) {
- var s = this;
- if (r = r || {}, t && 0 !== t.length) {
- var a = r["vs/nls"] || {}, l = a.availableLanguages ? function (e, t) {
- var n = e[t];
- return n || ((n = e["*"]) || null)
- }(a.availableLanguages, t) : null, u = ".nls";
- null !== l && l !== e.DEFAULT_TAG && (u = u + "." + l);
- var d = function (e) {
- Array.isArray(e) ? e.localize = o(e, s._env) : e.localize = o(e[t], s._env), i(e)
- };
- "function" == typeof a.loadBundle ? a.loadBundle(t, l, (function (e, i) {
- e ? n([t + ".nls"], d) : d(i)
- })) : n([t + u], d)
- } else i({localize: this.localize})
- }, e.DEFAULT_TAG = "i-default", e
- }();
- e.NLSPlugin = r, define("vs/nls", new r(new t))
- }(t || (t = {})), define(n[98], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.DataTransfers = {
- RESOURCES: "ResourceURLs",
- DOWNLOAD_URL: "DownloadURL",
- FILES: "Files",
- TEXT: "text/plain"
- };
- var n = function () {
- function e(e) {
- this.data = e
- }
- return e.prototype.update = function () {
- }, e.prototype.getData = function () {
- return this.data
- }, e
- }();
- t.DragAndDropData = n, t.StaticDND = {CurrentDragAndDropData: void 0}
- })), define(n[174], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = !1, i = null
- ;
- function o(e) {
- if (!e.parent || e.parent === e) return null;
- try {
- var t = e.location, i = e.parent.location;
- if (t.protocol !== i.protocol || t.hostname !== i.hostname || t.port !== i.port) return n = !0, null
- } catch (e) {
- return n = !0, null
- }
- return e.parent
- }
- function r(e, t) {
- for (var n, i = e.document.getElementsByTagName("iframe"), o = 0, r = i.length; o < r; o++) if ((n = i[o]).contentWindow === t) return n;
- return null
- }
- var s = function () {
- function e() {
- }
- return e.getSameOriginWindowChain = function () {
- if (!i) {
- i = [];
- var e, t = window;
- do {
- (e = o(t)) ? i.push({window: t, iframeElement: r(e, t)}) : i.push({
- window: t,
- iframeElement: null
- }), t = e
- } while (t)
- }
- return i.slice(0)
- }, e.hasDifferentOriginAncestor = function () {
- return i || this.getSameOriginWindowChain(), n
- }, e.getPositionOfChildWindowRelativeToAncestorWindow = function (e, t) {
- if (!t || e === t) return {top: 0, left: 0};
- for (var n = 0, i = 0, o = 0, r = this.getSameOriginWindowChain(); o < r.length; o++) {
- var s = r[o];
- if (s.window === t) break;
- if (!s.iframeElement) break;
- var a = s.iframeElement.getBoundingClientRect();
- n += a.top, i += a.left
- }
- return {top: n, left: i}
- }, e
- }();
- t.IframeUtils = s
- }))
- ;var o, r = this && this.__extends || (o = function (e, t) {
- return (o = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (e, t) {
- e.__proto__ = t
- } || function (e, t) {
- for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n])
- })(e, t)
- }, function (e, t) {
- function n() {
- this.constructor = e
- }
- o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
- });
- /*
- The MIT License (MIT)
- Copyright © 2015 Nicolas Bevacqua
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
- let s;
- define(n[239], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.TREE = "tree", e.FORM = "form"
- }(t.ListAriaRootRole || (t.ListAriaRootRole = {}));
- var n = function (e) {
- function t(t, n) {
- return e.call(this, "ListError [" + t + "] " + n) || this
- }
- return r(t, e), t
- }(Error);
- t.ListError = n
- })), define(n[240], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this.spliceables = e
- }
- return e.prototype.splice = function (e, t, n) {
- this.spliceables.forEach((function (i) {
- return i.splice(e, t, n)
- }))
- }, e
- }();
- t.CombinedSpliceable = n
- })), define(n[175], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t, n, i, o, r) {
- this._scrollbarSize = Math.round(t), this._oppositeScrollbarSize = Math.round(n), this._arrowSize = Math.round(e), this._visibleSize = i, this._scrollSize = o, this._scrollPosition = r, this._computedAvailableSize = 0, this._computedIsNeeded = !1, this._computedSliderSize = 0, this._computedSliderRatio = 0,
- this._computedSliderPosition = 0, this._refreshComputedValues()
- }
- return e.prototype.clone = function () {
- return new e(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition)
- }, e.prototype.setVisibleSize = function (e) {
- var t = Math.round(e);
- return this._visibleSize !== t && (this._visibleSize = t, this._refreshComputedValues(), !0)
- }, e.prototype.setScrollSize = function (e) {
- var t = Math.round(e);
- return this._scrollSize !== t && (this._scrollSize = t, this._refreshComputedValues(), !0)
- }, e.prototype.setScrollPosition = function (e) {
- var t = Math.round(e);
- return this._scrollPosition !== t && (this._scrollPosition = t, this._refreshComputedValues(), !0)
- }, e._computeValues = function (e, t, n, i, o) {
- var r = Math.max(0, n - e), s = Math.max(0, r - 2 * t), a = i > 0 && i > n;
- if (!a) return {
- computedAvailableSize: Math.round(r),
- computedIsNeeded: a,
- computedSliderSize: Math.round(s),
- computedSliderRatio: 0,
- computedSliderPosition: 0
- };
- var l = Math.round(Math.max(20, Math.floor(n * s / i))), u = (s - l) / (i - n), d = o * u;
- return {
- computedAvailableSize: Math.round(r),
- computedIsNeeded: a,
- computedSliderSize: Math.round(l),
- computedSliderRatio: u,
- computedSliderPosition: Math.round(d)
- }
- }, e.prototype._refreshComputedValues = function () {
- var t = e._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);
- this._computedAvailableSize = t.computedAvailableSize, this._computedIsNeeded = t.computedIsNeeded, this._computedSliderSize = t.computedSliderSize, this._computedSliderRatio = t.computedSliderRatio, this._computedSliderPosition = t.computedSliderPosition
- }, e.prototype.getArrowSize = function () {
- return this._arrowSize
- }, e.prototype.getScrollPosition = function () {
- return this._scrollPosition
- }, e.prototype.getRectangleLargeSize = function () {
- return this._computedAvailableSize
- }, e.prototype.getRectangleSmallSize = function () {
- return this._scrollbarSize
- }, e.prototype.isNeeded = function () {
- return this._computedIsNeeded
- }, e.prototype.getSliderSize = function () {
- return this._computedSliderSize
- }, e.prototype.getSliderPosition = function () {
- return this._computedSliderPosition
- },
- e.prototype.getDesiredScrollPositionFromOffset = function (e) {
- if (!this._computedIsNeeded) return 0;
- var t = e - this._arrowSize - this._computedSliderSize / 2;
- return Math.round(t / this._computedSliderRatio)
- }, e.prototype.getDesiredScrollPositionFromDelta = function (e) {
- if (!this._computedIsNeeded) return 0;
- var t = this._computedSliderPosition + e;
- return Math.round(t / this._computedSliderRatio)
- }, e
- }();
- t.ScrollbarState = n
- })), define(n[99], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function (e) {
- function t(t, n) {
- return e.call(this, "TreeError [" + t + "] " + n) || this
- }
- return r(t, e), t
- }(Error);
- t.TreeError = n;
- var i = function () {
- function e(e) {
- this.fn = e, this._map = new WeakMap
- }
- return e.prototype.map = function (e) {
- var t = this._map.get(e);
- return t || (t = this.fn(e), this._map.set(e, t)), t
- }, e
- }();
- t.WeakMapper = i
- })), define(n[19], i([0, 1]), (function (e, t) {
- "use strict";
- function n(e, t) {
- return function e(t, n, i, o, r) {
- if (o <= i) return;
- var s = i + (o - i) / 2 | 0;
- e(t, n, i, s, r);
- e(t, n, s + 1, o, r);
- if (n(t[s], t[s + 1]) <= 0) return;
- !function (e, t, n, i, o, r) {
- for (var s = n, a = i + 1, l = n; l <= o; l++) r[l] = e[l];
- for (l = n; l <= o; l++) s > i ? e[l] = r[a++] : a > o ? e[l] = r[s++] : t(r[a], r[s]) < 0 ? e[l] = r[a++] : e[l] = r[s++]
- }(t, n, i, s, o, r)
- }(e, t, 0, e.length - 1, []), e
- }
- function i(e, t) {
- for (var n = 0; n < e.length; n++) {
- if (t(e[n])) return n
- }
- return -1
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.tail = function (e, t) {
- return void 0 === t && (t = 0), e[e.length - (1 + t)]
- }, t.tail2 = function (e) {
- if (0 === e.length) throw new Error("Invalid tail call");
- return [e.slice(0, e.length - 1), e[e.length - 1]]
- }, t.equals = function (e, t, n) {
- if (void 0 === n && (n = function (e, t) {
- return e === t
- }), e === t) return !0;
- if (!e || !t) return !1;
- if (e.length !== t.length) return !1;
- for (var i = 0, o = e.length; i < o; i++) if (!n(e[i], t[i])) return !1;
- return !0
- }, t.binarySearch = function (e, t, n) {
- for (var i = 0, o = e.length - 1; i <= o;) {
- var r = (i + o) / 2 | 0, s = n(e[r], t);
- if (s < 0) i = r + 1; else {
- if (!(s > 0)) return r;
- o = r - 1
- }
- }
- return -(i + 1)
- }, t.findFirstInSorted = function (e, t) {
- var n = 0, i = e.length;
- if (0 === i) return 0;
- for (; n < i;) {
- var o = Math.floor((n + i) / 2);
- t(e[o]) ? i = o : n = o + 1
- }
- return n
- }, t.mergeSort = n, t.groupBy = function (e, t) {
- for (var i = [], o = void 0, r = 0, s = n(e.slice(0), t); r < s.length; r++) {
- var a = s[r];
- o && 0 === t(o[0], a) ? o.push(a) : (o = [a], i.push(o))
- }
- return i
- }, t.coalesce = function (e) {
- return e.filter((function (e) {
- return !!e
- }))
- }, t.isFalsyOrEmpty = function (e) {
- return !Array.isArray(e) || 0 === e.length
- }, t.isNonEmptyArray = function (e) {
- return Array.isArray(e) && e.length > 0
- }, t.distinct = function (e, t) {
- if (!t) return e.filter((function (t, n) {
- return e.indexOf(t) === n
- }));
- var n = Object.create(null);
- return e.filter((function (e) {
- var i = t(e);
- return !n[i] && (n[i] = !0, !0)
- }))
- }, t.distinctES6 = function (e) {
- var t = new Set;
- return e.filter((function (e) {
- return !t.has(e) && (t.add(e), !0)
- }))
- }, t.fromSet = function (e) {
- var t = [];
- return e.forEach((function (e) {
- return t.push(e)
- })), t
- }, t.firstIndex = i, t.first = function (e, t, n) {
- void 0 === n && (n = void 0);
- var o = i(e, t);
- return o < 0 ? n : e[o]
- }, t.firstOrDefault = function (e, t) {
- return e.length > 0 ? e[0] : t
- }, t.flatten = function (e) {
- var t;
- return (t = []).concat.apply(t, e)
- }, t.range = function (e, t) {
- var n = "number" == typeof t ? e : 0;
- "number" == typeof t ? n = e : (n = 0, t = e);
- var i = []
- ;
- if (n <= t) for (var o = n; o < t; o++) i.push(o); else for (o = n; o > t; o--) i.push(o);
- return i
- }, t.arrayInsert = function (e, t, n) {
- var i = e.slice(0, t), o = e.slice(t);
- return i.concat(n, o)
- }, t.pushToStart = function (e, t) {
- var n = e.indexOf(t);
- n > -1 && (e.splice(n, 1), e.unshift(t))
- }, t.pushToEnd = function (e, t) {
- var n = e.indexOf(t);
- n > -1 && (e.splice(n, 1), e.push(t))
- }, t.find = function (e, t) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- if (t(i, n, e)) return i
- }
- }, t.asArray = function (e) {
- return Array.isArray(e) ? e : [e]
- }
- })), define(n[124], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ok = function (e, t) {
- if (!e) throw new Error(t ? "Assertion failed (" + t + ")" : "Assertion Failed")
- }
- })), define(n[100], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = /(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;
- t.escapeCodicons = function (e) {
- return e.replace(n, (function (e, t) {
- return t ? e : "\\" + e
- }))
- };
- var i = /\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;
- t.markdownEscapeEscapedCodicons = function (e) {
- return e.replace(i, (function (e) {
- return "\\" + e
- }))
- };
- var o = /(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi;
- t.renderCodicons = function (e) {
- return e.replace(o, (function (e, t, n, i, o) {
- return t ? "$(" + n + ")" : '<span class="codicon codicon-' + i + (o ? " codicon-animation-" + o : "") + '"></span>'
- }))
- }
- })), define(n[87], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = Object.prototype.hasOwnProperty;
- t.values = function (e) {
- var t = [];
- for (var i in e) n.call(e, i) && t.push(e[i]);
- return t
- }, t.first = function (e) {
- for (var t in e) if (n.call(e, t)) return e[t]
- }, t.forEach = function (e, t) {
- var i = function (i) {
- if (n.call(e, i) && !1 === t({key: i, value: e[i]}, (function () {
- delete e[i]
- }))) return {value: void 0}
- };
- for (var o in e) {
- var r = i(o);
- if ("object" == typeof r) return r.value
- }
- };
- var i = function () {
- function e() {
- this.map = new Map
- }
- return e.prototype.add = function (e, t) {
- var n = this.map.get(e);
- n || (n = new Set, this.map.set(e, n)), n.add(t)
- }, e.prototype.delete = function (e, t) {
- var n = this.map.get(e);
- n && (n.delete(t), 0 === n.size && this.map.delete(e))
- }, e.prototype.forEach = function (e, t) {
- var n = this.map.get(e);
- n && n.forEach(t)
- }, e
- }();
- t.SetMap = i
- })), define(n[27], i([0, 1]), (function (e, t) {
- "use strict";
- function n(e, t) {
- var n = Math.pow(10, t);
- return Math.round(e * n) / n
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, i, o) {
- void 0 === o && (o = 1), this.r = 0 | Math.min(255, Math.max(0, e)), this.g = 0 | Math.min(255, Math.max(0, t)), this.b = 0 | Math.min(255, Math.max(0, i)), this.a = n(Math.max(Math.min(1, o), 0), 3)
- }
- return e.equals = function (e, t) {
- return e.r === t.r && e.g === t.g && e.b === t.b && e.a === t.a
- }, e
- }();
- t.RGBA = i;
- var o = function () {
- function e(e, t, i, o) {
- this.h = 0 | Math.max(Math.min(360, e), 0), this.s = n(Math.max(Math.min(1, t), 0), 3), this.l = n(Math.max(Math.min(1, i), 0), 3), this.a = n(Math.max(Math.min(1, o), 0), 3)
- }
- return e.equals = function (e, t) {
- return e.h === t.h && e.s === t.s && e.l === t.l && e.a === t.a
- }, e.fromRGBA = function (t) {
- var n = t.r / 255, i = t.g / 255, o = t.b / 255, r = t.a, s = Math.max(n, i, o), a = Math.min(n, i, o),
- l = 0, u = 0, d = (a + s) / 2, c = s - a;
- if (c > 0) {
- switch (u = Math.min(d <= .5 ? c / (2 * d) : c / (2 - 2 * d), 1), s) {
- case n:
- l = (i - o) / c + (i < o ? 6 : 0);
- break;
- case i:
- l = (o - n) / c + 2;
- break
- ;
- case o:
- l = (n - i) / c + 4
- }
- l *= 60, l = Math.round(l)
- }
- return new e(l, u, d, r)
- }, e._hue2rgb = function (e, t, n) {
- return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + 6 * (t - e) * n : n < .5 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e
- }, e.toRGBA = function (t) {
- var n, o, r, s = t.h / 360, a = t.s, l = t.l, u = t.a;
- if (0 === a) n = o = r = l; else {
- var d = l < .5 ? l * (1 + a) : l + a - l * a, c = 2 * l - d;
- n = e._hue2rgb(c, d, s + 1 / 3), o = e._hue2rgb(c, d, s), r = e._hue2rgb(c, d, s - 1 / 3)
- }
- return new i(Math.round(255 * n), Math.round(255 * o), Math.round(255 * r), u)
- }, e
- }();
- t.HSLA = o;
- var r = function () {
- function e(e, t, i, o) {
- this.h = 0 | Math.max(Math.min(360, e), 0), this.s = n(Math.max(Math.min(1, t), 0), 3), this.v = n(Math.max(Math.min(1, i), 0), 3), this.a = n(Math.max(Math.min(1, o), 0), 3)
- }
- return e.equals = function (e, t) {
- return e.h === t.h && e.s === t.s && e.v === t.v && e.a === t.a
- }, e.fromRGBA = function (t) {
- var n, i = t.r / 255, o = t.g / 255, r = t.b / 255, s = Math.max(i, o, r), a = s - Math.min(i, o, r),
- l = 0 === s ? 0 : a / s;
- return n = 0 === a ? 0 : s === i ? ((o - r) / a % 6 + 6) % 6 : s === o ? (r - i) / a + 2 : (i - o) / a + 4, new e(Math.round(60 * n), l, s, t.a)
- }, e.toRGBA = function (e) {
- var t = e.h, n = e.s, o = e.v, r = e.a, s = o * n, a = s * (1 - Math.abs(t / 60 % 2 - 1)), l = o - s,
- u = [0, 0, 0], d = u[0], c = u[1], h = u[2];
- return t < 60 ? (d = s, c = a) : t < 120 ? (d = a, c = s) : t < 180 ? (c = s, h = a) : t < 240 ? (c = a, h = s) : t < 300 ? (d = a, h = s) : t < 360 && (d = s, h = a), d = Math.round(255 * (d + l)), c = Math.round(255 * (c + l)), h = Math.round(255 * (h + l)), new i(d, c, h, r)
- }, e
- }();
- t.HSVA = r;
- var s = function () {
- function e(e) {
- if (!e) throw new Error("Color needs a value");
- if (e instanceof i) this.rgba = e; else if (e instanceof o) this._hsla = e, this.rgba = o.toRGBA(e); else {
- if (!(e instanceof r)) throw new Error("Invalid color ctor argument");
- this._hsva = e, this.rgba = r.toRGBA(e)
- }
- }
- return e.fromHex = function (t) {
- return e.Format.CSS.parseHex(t) || e.red
- }, Object.defineProperty(e.prototype, "hsla", {
- get: function () {
- return this._hsla ? this._hsla : o.fromRGBA(this.rgba)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "hsva", {
- get: function () {
- return this._hsva ? this._hsva : r.fromRGBA(this.rgba)
- }, enumerable: !0, configurable: !0
- }), e.prototype.equals = function (e) {
- return !!e && i.equals(this.rgba, e.rgba) && o.equals(this.hsla, e.hsla) && r.equals(this.hsva, e.hsva)
- }, e.prototype.getRelativeLuminance = function () {
- return n(.2126 * e._relativeLuminanceForComponent(this.rgba.r) + .7152 * e._relativeLuminanceForComponent(this.rgba.g) + .0722 * e._relativeLuminanceForComponent(this.rgba.b), 4)
- }, e._relativeLuminanceForComponent = function (e) {
- var t = e / 255;
- return t <= .03928 ? t / 12.92 : Math.pow((t + .055) / 1.055, 2.4)
- }, e.prototype.isLighter = function () {
- return (299 * this.rgba.r + 587 * this.rgba.g + 114 * this.rgba.b) / 1e3 >= 128
- }, e.prototype.isLighterThan = function (e) {
- return this.getRelativeLuminance() > e.getRelativeLuminance()
- }, e.prototype.isDarkerThan = function (e) {
- return this.getRelativeLuminance() < e.getRelativeLuminance()
- }, e.prototype.lighten = function (t) {
- return new e(new o(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * t, this.hsla.a))
- }, e.prototype.darken = function (t) {
- return new e(new o(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * t, this.hsla.a))
- }, e.prototype.transparent = function (t) {
- var n = this.rgba, o = n.r, r = n.g, s = n.b, a = n.a
- ;
- return new e(new i(o, r, s, a * t))
- }, e.prototype.isTransparent = function () {
- return 0 === this.rgba.a
- }, e.prototype.isOpaque = function () {
- return 1 === this.rgba.a
- }, e.prototype.opposite = function () {
- return new e(new i(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a))
- }, e.prototype.toString = function () {
- return "" + e.Format.CSS.format(this)
- }, e.getLighterColor = function (e, t, n) {
- if (e.isLighterThan(t)) return e;
- n = n || .5;
- var i = e.getRelativeLuminance(), o = t.getRelativeLuminance();
- return n = n * (o - i) / o, e.lighten(n)
- }, e.getDarkerColor = function (e, t, n) {
- if (e.isDarkerThan(t)) return e;
- n = n || .5;
- var i = e.getRelativeLuminance();
- return n = n * (i - t.getRelativeLuminance()) / i, e.darken(n)
- }, e.white = new e(new i(255, 255, 255, 1)), e.black = new e(new i(0, 0, 0, 1)), e.red = new e(new i(255, 0, 0, 1)), e.blue = new e(new i(0, 0, 255, 1)), e.cyan = new e(new i(0, 255, 255, 1)), e.lightgrey = new e(new i(211, 211, 211, 1)), e.transparent = new e(new i(0, 0, 0, 0)), e
- }();
- t.Color = s, function (e) {
- !function (t) {
- !function (t) {
- function n(e) {
- var t = e.toString(16);
- return 2 !== t.length ? "0" + t : t
- }
- function o(e) {
- switch (e) {
- case 48:
- return 0;
- case 49:
- return 1;
- case 50:
- return 2;
- case 51:
- return 3;
- case 52:
- return 4;
- case 53:
- return 5;
- case 54:
- return 6;
- case 55:
- return 7;
- case 56:
- return 8;
- case 57:
- return 9;
- case 97:
- case 65:
- return 10;
- case 98:
- case 66:
- return 11;
- case 99:
- case 67:
- return 12;
- case 100:
- case 68:
- return 13;
- case 101:
- case 69:
- return 14;
- case 102:
- case 70:
- return 15
- }
- return 0
- }
- t.formatRGB = function (t) {
- return 1 === t.rgba.a ? "rgb(" + t.rgba.r + ", " + t.rgba.g + ", " + t.rgba.b + ")" : e.Format.CSS.formatRGBA(t)
- }, t.formatRGBA = function (e) {
- return "rgba(" + e.rgba.r + ", " + e.rgba.g + ", " + e.rgba.b + ", " + +e.rgba.a.toFixed(2) + ")"
- }, t.formatHSL = function (t) {
- return 1 === t.hsla.a ? "hsl(" + t.hsla.h + ", " + (100 * t.hsla.s).toFixed(2) + "%, " + (100 * t.hsla.l).toFixed(2) + "%)" : e.Format.CSS.formatHSLA(t)
- }, t.formatHSLA = function (e) {
- return "hsla(" + e.hsla.h + ", " + (100 * e.hsla.s).toFixed(2) + "%, " + (100 * e.hsla.l).toFixed(2) + "%, " + e.hsla.a.toFixed(2) + ")"
- }, t.formatHex = function (e) {
- return "#" + n(e.rgba.r) + n(e.rgba.g) + n(e.rgba.b)
- }, t.formatHexA = function (t, i) {
- return void 0 === i && (i = !1),
- i && 1 === t.rgba.a ? e.Format.CSS.formatHex(t) : "#" + n(t.rgba.r) + n(t.rgba.g) + n(t.rgba.b) + n(Math.round(255 * t.rgba.a))
- }, t.format = function (t) {
- return t.isOpaque() ? e.Format.CSS.formatHex(t) : e.Format.CSS.formatRGBA(t)
- }, t.parseHex = function (t) {
- var n = t.length;
- if (0 === n) return null;
- if (35 !== t.charCodeAt(0)) return null;
- if (7 === n) {
- var r = 16 * o(t.charCodeAt(1)) + o(t.charCodeAt(2)),
- s = 16 * o(t.charCodeAt(3)) + o(t.charCodeAt(4)),
- a = 16 * o(t.charCodeAt(5)) + o(t.charCodeAt(6));
- return new e(new i(r, s, a, 1))
- }
- if (9 === n) {
- r = 16 * o(t.charCodeAt(1)) + o(t.charCodeAt(2)), s = 16 * o(t.charCodeAt(3)) + o(t.charCodeAt(4)), a = 16 * o(t.charCodeAt(5)) + o(t.charCodeAt(6));
- var l = 16 * o(t.charCodeAt(7)) + o(t.charCodeAt(8));
- return new e(new i(r, s, a, l / 255))
- }
- if (4 === n) {
- r = o(t.charCodeAt(1)), s = o(t.charCodeAt(2)), a = o(t.charCodeAt(3));
- return new e(new i(16 * r + r, 16 * s + s, 16 * a + a))
- }
- if (5 === n) {
- r = o(t.charCodeAt(1)), s = o(t.charCodeAt(2)), a = o(t.charCodeAt(3)), l = o(t.charCodeAt(4));
- return new e(new i(16 * r + r, 16 * s + s, 16 * a + a, (16 * l + l) / 255))
- }
- return null
- }
- }(t.CSS || (t.CSS = {}))
- }(e.Format || (e.Format = {}))
- }(s = t.Color || (t.Color = {})), t.Color = s
- })), define(n[101], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = 0;
- function i() {
- var e = "$memoize" + n++, t = void 0, i = function (n, i, o) {
- var r = null, s = null;
- if ("function" == typeof o.value ? (r = "value", 0 !== (s = o.value).length && console.warn("Memoize should only be used in functions with zero parameters")) : "function" == typeof o.get && (r = "get", s = o.get), !s) throw new Error("not supported");
- var a = e + ":" + i;
- o[r] = function () {
- for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
- return t = this, this.hasOwnProperty(a) || Object.defineProperty(this, a, {
- configurable: !0,
- enumerable: !1,
- writable: !0,
- value: s.apply(this, e)
- }), this[a]
- }
- };
- return i.clear = function () {
- void 0 !== t && Object.getOwnPropertyNames(t).forEach((function (n) {
- 0 === n.indexOf(e) && delete t[n]
- }))
- }, i
- }
- t.createMemoizer = i, t.memoize = function (e, t, n) {
- return i()(e, t, n)
- }
- })), define(n[241], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t, n, i) {
- this.originalStart = e, this.originalLength = t, this.modifiedStart = n, this.modifiedLength = i
- }
- return e.prototype.getOriginalEnd = function () {
- return this.originalStart + this.originalLength
- }, e.prototype.getModifiedEnd = function () {
- return this.modifiedStart + this.modifiedLength
- }, e
- }();
- t.DiffChange = n
- })), define(n[10], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e() {
- this.listeners = [], this.unexpectedErrorHandler = function (e) {
- setTimeout((function () {
- if (e.stack) throw new Error(e.message + "\n\n" + e.stack);
- throw e
- }), 0)
- }
- }
- return e.prototype.emit = function (e) {
- this.listeners.forEach((function (t) {
- t(e)
- }))
- }, e.prototype.onUnexpectedError = function (e) {
- this.unexpectedErrorHandler(e), this.emit(e)
- }, e.prototype.onUnexpectedExternalError = function (e) {
- this.unexpectedErrorHandler(e)
- }, e
- }();
- t.ErrorHandler = n, t.errorHandler = new n, t.onUnexpectedError = function (e) {
- o(e) || t.errorHandler.onUnexpectedError(e)
- }, t.onUnexpectedExternalError = function (e) {
- o(e) || t.errorHandler.onUnexpectedExternalError(e)
- },
- t.transformErrorForSerialization = function (e) {
- return e instanceof Error ? {
- $isError: !0,
- name: e.name,
- message: e.message,
- stack: e.stacktrace || e.stack
- } : e
- };
- var i = "Canceled";
- function o(e) {
- return e instanceof Error && e.name === i && e.message === i
- }
- t.isPromiseCanceledError = o, t.canceled = function () {
- var e = new Error(i);
- return e.name = e.message, e
- }, t.illegalArgument = function (e) {
- return e ? new Error("Illegal argument: " + e) : new Error("Illegal argument")
- }, t.illegalState = function (e) {
- return e ? new Error("Illegal state: " + e) : new Error("Illegal state")
- }
- })), define(n[102], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.once = function (e) {
- var t, n = this, i = !1;
- return function () {
- return i ? t : (i = !0, t = e.apply(n, arguments))
- }
- }
- })), define(n[125], i([0, 1]), (function (e, t) {
- "use strict";
- function n(e, t) {
- switch (void 0 === t && (t = 0), typeof e) {
- case"object":
- return null === e ? i(349, t) : Array.isArray(e) ? (r = e, s = i(104579, s = t), r.reduce((function (e, t) {
- return n(t, e)
- }), s)) : function (e, t) {
- return t = i(181387, t),
- Object.keys(e).sort().reduce((function (t, i) {
- return t = o(i, t), n(e[i], t)
- }), t)
- }(e, t);
- case"string":
- return o(e, t);
- case"boolean":
- return function (e, t) {
- return i(e ? 433 : 863, t)
- }(e, t);
- case"number":
- return i(e, t);
- case"undefined":
- return i(0, 937);
- default:
- return i(0, 617)
- }
- var r, s
- }
- function i(e, t) {
- return (t << 5) - t + e | 0
- }
- function o(e, t) {
- t = i(149417, t);
- for (var n = 0, o = e.length; n < o; n++) t = i(e.charCodeAt(n), t);
- return t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.hash = n, t.stringHash = o
- })), define(n[126], i([0, 1, 241, 125]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e) {
- this.source = e
- }
- return e.prototype.getElements = function () {
- for (var e = this.source, t = new Int32Array(e.length), n = 0, i = e.length; n < i; n++) t[n] = e.charCodeAt(n);
- return t
- }, e
- }();
- t.StringDiffSequence = o, t.stringDiff = function (e, t, n) {
- return new l(new o(e), new o(t)).ComputeDiff(n).changes
- };
- var r = function () {
- function e() {
- }
- return e.Assert = function (e, t) {
- if (!e) throw new Error(t)
- }, e
- }();
- t.Debug = r;
- var s = function () {
- function e() {
- }
- return e.Copy = function (e, t, n, i, o) {
- for (var r = 0; r < o; r++) n[i + r] = e[t + r]
- }, e.Copy2 = function (e, t, n, i, o) {
- for (var r = 0; r < o; r++) n[i + r] = e[t + r]
- }, e
- }();
- t.MyArray = s;
- var a = function () {
- function e() {
- this.m_changes = [], this.m_originalStart = 1073741824, this.m_modifiedStart = 1073741824, this.m_originalCount = 0, this.m_modifiedCount = 0
- }
- return e.prototype.MarkNextChange = function () {
- (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.m_changes.push(new n.DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount)), this.m_originalCount = 0, this.m_modifiedCount = 0, this.m_originalStart = 1073741824, this.m_modifiedStart = 1073741824
- }, e.prototype.AddOriginalElement = function (e, t) {
- this.m_originalStart = Math.min(this.m_originalStart, e), this.m_modifiedStart = Math.min(this.m_modifiedStart, t), this.m_originalCount++
- }, e.prototype.AddModifiedElement = function (e, t) {
- this.m_originalStart = Math.min(this.m_originalStart, e), this.m_modifiedStart = Math.min(this.m_modifiedStart, t), this.m_modifiedCount++
- }, e.prototype.getChanges = function () {
- return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes
- }, e.prototype.getReverseChanges = function () {
- return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes.reverse(), this.m_changes
- }, e
- }(), l = function () {
- function e(t, n, i) {
- void 0 === i && (i = null), this.ContinueProcessingPredicate = i;
- var o = e._getElements(t), r = o[0], s = o[1], a = o[2], l = e._getElements(n), u = l[0], d = l[1],
- c = l[2];
- this._hasStrings = a && c, this._originalStringElements = r, this._originalElementsOrHash = s, this._modifiedStringElements = u, this._modifiedElementsOrHash = d, this.m_forwardHistory = [], this.m_reverseHistory = []
- }
- return e._isStringArray = function (e) {
- return e.length > 0 && "string" == typeof e[0]
- }, e._getElements = function (t) {
- var n = t.getElements();
- if (e._isStringArray(n)) {
- for (var o = new Int32Array(n.length), r = 0, s = n.length; r < s; r++) o[r] = i.stringHash(n[r], 0);
- return [n, o, !0]
- }
- return n instanceof Int32Array ? [[], n, !1] : [[], new Int32Array(n), !1]
- }, e.prototype.ElementsAreEqual = function (e, t) {
- return this._originalElementsOrHash[e] === this._modifiedElementsOrHash[t] && (!this._hasStrings || this._originalStringElements[e] === this._modifiedStringElements[t])
- }, e.prototype.OriginalElementsAreEqual = function (e, t) {
- return this._originalElementsOrHash[e] === this._originalElementsOrHash[t] && (!this._hasStrings || this._originalStringElements[e] === this._originalStringElements[t])
- }, e.prototype.ModifiedElementsAreEqual = function (e, t) {
- return this._modifiedElementsOrHash[e] === this._modifiedElementsOrHash[t] && (!this._hasStrings || this._modifiedStringElements[e] === this._modifiedStringElements[t])
- }, e.prototype.ComputeDiff = function (e) {
- return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, e)
- }, e.prototype._ComputeDiff = function (e, t, n, i, o) {
- var r = [!1], s = this.ComputeDiffRecursive(e, t, n, i, r);
- return o && (s = this.PrettifyChanges(s)), {quitEarly: r[0], changes: s}
- }, e.prototype.ComputeDiffRecursive = function (e, t, i, o, s) {
- for (s[0] = !1; e <= t && i <= o && this.ElementsAreEqual(e, i);) e++, i++
- ;
- for (; t >= e && o >= i && this.ElementsAreEqual(t, o);) t--, o--;
- if (e > t || i > o) {
- var a = void 0;
- return i <= o ? (r.Assert(e === t + 1, "originalStart should only be one more than originalEnd"), a = [new n.DiffChange(e, 0, i, o - i + 1)]) : e <= t ? (r.Assert(i === o + 1, "modifiedStart should only be one more than modifiedEnd"), a = [new n.DiffChange(e, t - e + 1, i, 0)]) : (r.Assert(e === t + 1, "originalStart should only be one more than originalEnd"), r.Assert(i === o + 1, "modifiedStart should only be one more than modifiedEnd"), a = []), a
- }
- var l = [0], u = [0], d = this.ComputeRecursionPoint(e, t, i, o, l, u, s), c = l[0], h = u[0];
- if (null !== d) return d;
- if (!s[0]) {
- var p = this.ComputeDiffRecursive(e, c, i, h, s), g = [];
- return g = s[0] ? [new n.DiffChange(c + 1, t - (c + 1) + 1, h + 1, o - (h + 1) + 1)] : this.ComputeDiffRecursive(c + 1, t, h + 1, o, s), this.ConcatenateChanges(p, g)
- }
- return [new n.DiffChange(e, t - e + 1, i, o - i + 1)]
- }, e.prototype.WALKTRACE = function (e, t, i, o, r, s, l, u, d, c, h, p, g, f, m, v, _, y) {
- var C, b = null, S = new a, w = t, E = i, L = g[0] - v[0] - o, D = -1073741824,
- N = this.m_forwardHistory.length - 1;
- do {
- (k = L + e) === w || k < E && d[k - 1] < d[k + 1] ? (f = (h = d[k + 1]) - L - o,
- h < D && S.MarkNextChange(), D = h, S.AddModifiedElement(h + 1, f), L = k + 1 - e) : (f = (h = d[k - 1] + 1) - L - o, h < D && S.MarkNextChange(), D = h - 1, S.AddOriginalElement(h, f + 1), L = k - 1 - e), N >= 0 && (e = (d = this.m_forwardHistory[N])[0], w = 1, E = d.length - 1)
- } while (--N >= -1);
- if (C = S.getReverseChanges(), y[0]) {
- var x = g[0] + 1, I = v[0] + 1;
- if (null !== C && C.length > 0) {
- var M = C[C.length - 1];
- x = Math.max(x, M.getOriginalEnd()), I = Math.max(I, M.getModifiedEnd())
- }
- b = [new n.DiffChange(x, p - x + 1, I, m - I + 1)]
- } else {
- S = new a, w = s, E = l, L = g[0] - v[0] - u, D = 1073741824, N = _ ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;
- do {
- var k;
- (k = L + r) === w || k < E && c[k - 1] >= c[k + 1] ? (f = (h = c[k + 1] - 1) - L - u, h > D && S.MarkNextChange(), D = h + 1, S.AddOriginalElement(h + 1, f + 1), L = k + 1 - r) : (f = (h = c[k - 1]) - L - u, h > D && S.MarkNextChange(), D = h, S.AddModifiedElement(h + 1, f + 1), L = k - 1 - r), N >= 0 && (r = (c = this.m_reverseHistory[N])[0], w = 1, E = c.length - 1)
- } while (--N >= -1);
- b = S.getChanges()
- }
- return this.ConcatenateChanges(C, b)
- }, e.prototype.ComputeRecursionPoint = function (e, t, i, o, r, a, l) {
- var u = 0, d = 0, c = 0, h = 0, p = 0, g = 0;
- e--, i--, r[0] = 0, a[0] = 0, this.m_forwardHistory = [],
- this.m_reverseHistory = [];
- var f = t - e + (o - i), m = f + 1, v = new Int32Array(m), _ = new Int32Array(m), y = o - i, C = t - e,
- b = e - i, S = t - o, w = (C - y) % 2 == 0;
- v[y] = e, _[C] = t, l[0] = !1;
- for (var E = 1; E <= f / 2 + 1; E++) {
- var L = 0, D = 0;
- c = this.ClipDiagonalBound(y - E, E, y, m), h = this.ClipDiagonalBound(y + E, E, y, m);
- for (var N = c; N <= h; N += 2) {
- d = (u = N === c || N < h && v[N - 1] < v[N + 1] ? v[N + 1] : v[N - 1] + 1) - (N - y) - b;
- for (var x = u; u < t && d < o && this.ElementsAreEqual(u + 1, d + 1);) u++, d++;
- if (v[N] = u, u + d > L + D && (L = u, D = d), !w && Math.abs(N - C) <= E - 1 && u >= _[N]) return r[0] = u, a[0] = d, x <= _[N] && E <= 1448 ? this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l) : null
- }
- var I = (L - e + (D - i) - E) / 2;
- if (null !== this.ContinueProcessingPredicate && !this.ContinueProcessingPredicate(L, I)) return l[0] = !0, r[0] = L, a[0] = D, I > 0 && E <= 1448 ? this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l) : (e++, i++, [new n.DiffChange(e, t - e + 1, i, o - i + 1)]);
- p = this.ClipDiagonalBound(C - E, E, C, m), g = this.ClipDiagonalBound(C + E, E, C, m);
- for (N = p; N <= g; N += 2) {
- d = (u = N === p || N < g && _[N - 1] >= _[N + 1] ? _[N + 1] - 1 : _[N - 1]) - (N - C) - S;
- for (x = u; u > e && d > i && this.ElementsAreEqual(u, d);) u--, d--;
- if (_[N] = u,
- w && Math.abs(N - y) <= E && u <= v[N]) return r[0] = u, a[0] = d, x >= v[N] && E <= 1448 ? this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l) : null
- }
- if (E <= 1447) {
- var M = new Int32Array(h - c + 2);
- M[0] = y - c + 1, s.Copy2(v, c, M, 1, h - c + 1), this.m_forwardHistory.push(M), (M = new Int32Array(g - p + 2))[0] = C - p + 1, s.Copy2(_, p, M, 1, g - p + 1), this.m_reverseHistory.push(M)
- }
- }
- return this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l)
- }, e.prototype.PrettifyChanges = function (e) {
- for (var t = 0; t < e.length; t++) {
- for (var n = e[t], i = t < e.length - 1 ? e[t + 1].originalStart : this._originalElementsOrHash.length, o = t < e.length - 1 ? e[t + 1].modifiedStart : this._modifiedElementsOrHash.length, r = n.originalLength > 0, s = n.modifiedLength > 0; n.originalStart + n.originalLength < i && n.modifiedStart + n.modifiedLength < o && (!r || this.OriginalElementsAreEqual(n.originalStart, n.originalStart + n.originalLength)) && (!s || this.ModifiedElementsAreEqual(n.modifiedStart, n.modifiedStart + n.modifiedLength));) n.originalStart++, n.modifiedStart++;
- var a = [null];
- t < e.length - 1 && this.ChangesOverlap(e[t], e[t + 1], a) && (e[t] = a[0], e.splice(t + 1, 1), t--)
- }
- for (t = e.length - 1; t >= 0; t--) {
- n = e[t], i = 0, o = 0;
- if (t > 0) {
- var l = e[t - 1];
- l.originalLength > 0 && (i = l.originalStart + l.originalLength), l.modifiedLength > 0 && (o = l.modifiedStart + l.modifiedLength)
- }
- r = n.originalLength > 0, s = n.modifiedLength > 0;
- for (var u = 0, d = this._boundaryScore(n.originalStart, n.originalLength, n.modifiedStart, n.modifiedLength), c = 1; ; c++) {
- var h = n.originalStart - c, p = n.modifiedStart - c;
- if (h < i || p < o) break;
- if (r && !this.OriginalElementsAreEqual(h, h + n.originalLength)) break;
- if (s && !this.ModifiedElementsAreEqual(p, p + n.modifiedLength)) break;
- var g = this._boundaryScore(h, n.originalLength, p, n.modifiedLength);
- g > d && (d = g, u = c)
- }
- n.originalStart -= u, n.modifiedStart -= u
- }
- return e
- }, e.prototype._OriginalIsBoundary = function (e) {
- return e <= 0 || e >= this._originalElementsOrHash.length - 1 || this._hasStrings && /^\s*$/.test(this._originalStringElements[e])
- }, e.prototype._OriginalRegionIsBoundary = function (e, t) {
- if (this._OriginalIsBoundary(e) || this._OriginalIsBoundary(e - 1)) return !0;
- if (t > 0) {
- var n = e + t
- ;
- if (this._OriginalIsBoundary(n - 1) || this._OriginalIsBoundary(n)) return !0
- }
- return !1
- }, e.prototype._ModifiedIsBoundary = function (e) {
- return e <= 0 || e >= this._modifiedElementsOrHash.length - 1 || this._hasStrings && /^\s*$/.test(this._modifiedStringElements[e])
- }, e.prototype._ModifiedRegionIsBoundary = function (e, t) {
- if (this._ModifiedIsBoundary(e) || this._ModifiedIsBoundary(e - 1)) return !0;
- if (t > 0) {
- var n = e + t;
- if (this._ModifiedIsBoundary(n - 1) || this._ModifiedIsBoundary(n)) return !0
- }
- return !1
- }, e.prototype._boundaryScore = function (e, t, n, i) {
- return (this._OriginalRegionIsBoundary(e, t) ? 1 : 0) + (this._ModifiedRegionIsBoundary(n, i) ? 1 : 0)
- }, e.prototype.ConcatenateChanges = function (e, t) {
- var n = [];
- if (0 === e.length || 0 === t.length) return t.length > 0 ? t : e;
- if (this.ChangesOverlap(e[e.length - 1], t[0], n)) {
- var i = new Array(e.length + t.length - 1);
- return s.Copy(e, 0, i, 0, e.length - 1), i[e.length - 1] = n[0], s.Copy(t, 1, i, e.length, t.length - 1), i
- }
- i = new Array(e.length + t.length);
- return s.Copy(e, 0, i, 0, e.length), s.Copy(t, 0, i, e.length, t.length), i
- }, e.prototype.ChangesOverlap = function (e, t, i) {
- if (r.Assert(e.originalStart <= t.originalStart, "Left change is not less than or equal to right change"), r.Assert(e.modifiedStart <= t.modifiedStart, "Left change is not less than or equal to right change"), e.originalStart + e.originalLength >= t.originalStart || e.modifiedStart + e.modifiedLength >= t.modifiedStart) {
- var o = e.originalStart, s = e.originalLength, a = e.modifiedStart, l = e.modifiedLength;
- return e.originalStart + e.originalLength >= t.originalStart && (s = t.originalStart + t.originalLength - e.originalStart), e.modifiedStart + e.modifiedLength >= t.modifiedStart && (l = t.modifiedStart + t.modifiedLength - e.modifiedStart), i[0] = new n.DiffChange(o, s, a, l), !0
- }
- return i[0] = null, !1
- }, e.prototype.ClipDiagonalBound = function (e, t, n, i) {
- if (e >= 0 && e < i) return e;
- var o = t % 2 == 0;
- return e < 0 ? o === (n % 2 == 0) ? 0 : 1 : o === ((i - n - 1) % 2 == 0) ? i - 1 : i - 2
- }, e
- }();
- t.LcsDiff = l
- })), define(n[75], i([0, 1, 19, 100]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t) {
- var n, i;
- void 0 === e && (e = ""), void 0 === t && (t = !1), this._value = e,
- "boolean" == typeof t ? (this._isTrusted = t, this._supportThemeIcons = !1) : (this._isTrusted = null !== (n = t.isTrusted) && void 0 !== n && n, this._supportThemeIcons = null !== (i = t.supportThemeIcons) && void 0 !== i && i)
- }
- return Object.defineProperty(e.prototype, "value", {
- get: function () {
- return this._value
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "isTrusted", {
- get: function () {
- return this._isTrusted
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "supportThemeIcons", {
- get: function () {
- return this._supportThemeIcons
- }, enumerable: !0, configurable: !0
- }), e.prototype.appendText = function (e) {
- return this._value += (this._supportThemeIcons ? i.escapeCodicons(e) : e).replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&").replace("\n", "\n\n"), this
- }, e.prototype.appendMarkdown = function (e) {
- return this._value += e, this
- }, e.prototype.appendCodeblock = function (e, t) {
- return this._value += "\n```", this._value += e, this._value += "\n", this._value += t, this._value += "\n```\n", this
- }, e
- }();
- function r(e) {
- return e instanceof o || !(!e || "object" != typeof e) && !("string" != typeof e.value || "boolean" != typeof e.isTrusted && void 0 !== e.isTrusted || "boolean" != typeof e.supportThemeIcons && void 0 !== e.supportThemeIcons)
- }
- function s(e, t) {
- return e === t || !(!e || !t) && (e.value === t.value && e.isTrusted === t.isTrusted && e.supportThemeIcons === t.supportThemeIcons)
- }
- t.MarkdownString = o, t.isEmptyMarkdownString = function e(t) {
- return r(t) ? !t.value : !Array.isArray(t) || t.every(e)
- }, t.isMarkdownString = r, t.markedStringsEquals = function (e, t) {
- return !e && !t || !(!e || !t) && (Array.isArray(e) && Array.isArray(t) ? n.equals(e, t, s) : !(!r(e) || !r(t)) && s(e, t))
- }, t.removeMarkdownEscapes = function (e) {
- return e ? e.replace(/\\([\\`*_{}[\]()#+\-.!])/g, "$1") : e
- }, t.parseHrefAndDimensions = function (e) {
- var t = [], n = e.split("|").map((function (e) {
- return e.trim()
- }));
- e = n[0];
- var i = n[1];
- if (i) {
- var o = /height=(\d+)/.exec(i), r = /width=(\d+)/.exec(i), s = o ? o[1] : "", a = r ? r[1] : "",
- l = isFinite(parseInt(a)), u = isFinite(parseInt(s));
- l && t.push('width="' + a + '"'), u && t.push('height="' + s + '"')
- }
- return {href: e, dimensions: t}
- }
- })), define(n[127], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this._prefix = e, this._lastId = 0
- }
- return e.prototype.nextId = function () {
- return this._prefix + ++this._lastId
- }, e
- }();
- t.IdGenerator = n, t.defaultGenerator = new n("id#")
- })), function e(t, n, i) {
- function o(s, a) {
- if (!n[s]) {
- if (!t[s]) {
- var l = "function" == typeof require && require;
- if (!a && l) return l(s, !0);
- if (r) return r(s, !0);
- var u = new Error("Cannot find module '" + s + "'");
- throw u.code = "MODULE_NOT_FOUND", u
- }
- var d = n[s] = {exports: {}};
- t[s][0].call(d.exports, (function (e) {
- return o(t[s][1][e] || e)
- }), d, d.exports, e, t, n, i)
- }
- return n[s].exports
- }
- for (var r = "function" == typeof require && require, s = 0; s < i.length; s++) o(i[s]);
- return o
- }({
- 1: [function (e, t, n) {
- "use strict";
- var i = e("./toMap");
- t.exports = {uris: i(["background", "base", "cite", "href", "longdesc", "src", "usemap"])}
- }, {"./toMap": 10}], 2: [function (e, t, n) {
- "use strict";
- t.exports = {
- allowedAttributes: {
- "*": ["title", "accesskey"], a: ["href", "name", "target", "aria-label"],
- iframe: ["allowfullscreen", "frameborder", "src"], img: ["src", "alt", "title", "aria-label"]
- },
- allowedClasses: {},
- allowedSchemes: ["http", "https", "mailto"],
- allowedTags: ["a", "abbr", "article", "b", "blockquote", "br", "caption", "code", "del", "details", "div", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li", "main", "mark", "ol", "p", "pre", "section", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", "tr", "u", "ul"],
- filter: null
- }
- }, {}], 3: [function (e, t, n) {
- "use strict";
- var i = e("./toMap");
- t.exports = {voids: i(["area", "br", "col", "hr", "img", "wbr", "input", "base", "basefont", "link", "meta"])}
- }, {"./toMap": 10}], 4: [function (e, t, n) {
- "use strict";
- e("he");
- var i = e("assignment"), o = e("./parser"), r = e("./sanitizer"), a = e("./defaults");
- function l(e, t, n) {
- var s = [], l = !0 === n ? t : i({}, a, t), u = r(s, l);
- return o(e, u), s.join("")
- }
- l.defaults = a, t.exports = l, s = l
- }, {"./defaults": 2, "./parser": 7, "./sanitizer": 8, assignment: 6, he: 9}], 5: [function (e, t, n) {
- "use strict";
- t.exports = function (e) {
- return "string" == typeof e ? e.toLowerCase() : e
- }
- }, {}],
- 6: [function (e, t, n) {
- "use strict";
- t.exports = function e(t) {
- for (var n, i, o = Array.prototype.slice.call(arguments, 1); o.length;) for (i in n = o.shift()) n.hasOwnProperty(i) && ("[object Object]" === Object.prototype.toString.call(t[i]) ? t[i] = e(t[i], n[i]) : t[i] = n[i]);
- return t
- }
- }, {}], 7: [function (e, t, n) {
- "use strict";
- var i = e("he"), o = e("./lowercase"), r = (e("./attributes"), e("./elements")),
- s = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
- a = /^<\s*\/\s*([\w:-]+)[^>]*>/,
- l = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, u = /^</, d = /^<\s*\//;
- t.exports = function (e, t) {
- for (var n, c = function () {
- var e = [];
- return e.lastItem = function () {
- return e[e.length - 1]
- }, e
- }(), h = e; e;) p();
- function p() {
- n = !0, function () {
- "\x3c!--" === e.substr(0, 4) ? (i = e.indexOf("--\x3e")) >= 0 && (t.comment && t.comment(e.substring(4, i)), e = e.substring(i + 3), n = !1) : d.test(e) ? g(a, m) : u.test(e) && g(s, f);
- var i;
- !function () {
- if (!n) return;
- var i, o = e.indexOf("<");
- o >= 0 ? (i = e.substring(0, o), e = e.substring(o)) : (i = e, e = "");
- t.chars && t.chars(i)
- }()
- }();
- var i = e === h;
- h = e, i && (e = "")
- }
- function g(t, i) {
- var o = e.match(t);
- o && (e = e.substring(o[0].length), o[0].replace(t, i), n = !1)
- }
- function f(e, n, s, a) {
- var u = {}, d = o(n), h = r.voids[d] || !!a;
- s.replace(l, (function (e, t, n, o, r) {
- u[t] = void 0 === n && void 0 === o && void 0 === r ? void 0 : i.decode(n || o || r || "")
- })), h || c.push(d), t.start && t.start(d, u, h)
- }
- function m(e, n) {
- var i, r = 0, s = o(n);
- if (s) for (r = c.length - 1; r >= 0 && c[r] !== s; r--) ;
- if (r >= 0) {
- for (i = c.length - 1; i >= r; i--) t.end && t.end(c[i]);
- c.length = r
- }
- }
- m()
- }
- }, {"./attributes": 1, "./elements": 3, "./lowercase": 5, he: 9}], 8: [function (e, t, n) {
- "use strict";
- var i = e("he"), o = e("./lowercase"), r = e("./attributes"), s = e("./elements");
- t.exports = function (e, t) {
- var n, a = t || {};
- return c(), {
- start: function (e, t, s) {
- var d = o(e);
- if (n.ignoring) return void u(d);
- if (-1 === (a.allowedTags || []).indexOf(d)) return void u(d);
- if (a.filter && !a.filter({tag: d, attrs: t})) return void u(d);
- l("<"), l(d), Object.keys(t).forEach((function (e) {
- var n = t[e], s = (a.allowedClasses || {})[d] || [],
- u = (a.allowedAttributes || {})[d] || [];
- u = u.concat((a.allowedAttributes || {})["*"] || [])
- ;var c = o(e);
- ("class" === c && -1 === u.indexOf(c) ? (n = n.split(" ").filter((function (e) {
- return s && -1 !== s.indexOf(e)
- })).join(" ").trim()).length : -1 !== u.indexOf(c) && (!0 !== r.uris[c] || function (e) {
- var t = e[0];
- if ("#" === t || "/" === t) return !0;
- var n = e.indexOf(":");
- if (-1 === n) return !0;
- var i = e.indexOf("?");
- if (-1 !== i && n > i) return !0;
- var o = e.indexOf("#");
- if (-1 !== o && n > o) return !0;
- return a.allowedSchemes.some((function (t) {
- return 0 === e.indexOf(t + ":")
- }))
- }(n))) && (l(" "), l(e), "string" == typeof n && (l('="'), l(i.encode(n)), l('"')))
- })), l(s ? "/>" : ">")
- }, end: function (e) {
- var t = o(e);
- -1 !== (a.allowedTags || []).indexOf(t) && !1 === n.ignoring ? (l("</"), l(t), l(">")) : d(t)
- }, chars: function (e) {
- !1 === n.ignoring && l(a.transformText ? a.transformText(e) : e)
- }
- };
- function l(t) {
- e.push(t)
- }
- function u(e) {
- s.voids[e] || (!1 === n.ignoring ? n = {ignoring: e, depth: 1} : n.ignoring === e && n.depth++)
- }
- function d(e) {
- n.ignoring === e && --n.depth <= 0 && c()
- }
- function c() {
- n = {ignoring: !1, depth: 0}
- }
- }
- }, {"./attributes": 1, "./elements": 3, "./lowercase": 5, he: 9}], 9: [function (e, t, n) {
- "use strict";
- var i = {
- "&": "&",
- "<": "<", ">": ">", '"': """, "'": "'"
- }, o = {"&": "&", "<": "<", ">": ">", """: '"', "'": "'"},
- r = /(&|<|>|"|')/g, s = /[&<>"']/g;
- function a(e) {
- return i[e]
- }
- function l(e) {
- return o[e]
- }
- function u(e) {
- return null == e ? "" : String(e).replace(s, a)
- }
- function d(e) {
- return null == e ? "" : String(e).replace(r, l)
- }
- u.options = d.options = {}, t.exports = {
- encode: u,
- escape: u,
- decode: d,
- unescape: d,
- version: "1.0.0-browser"
- }
- }, {}], 10: [function (e, t, n) {
- "use strict";
- function i(e, t) {
- return e[t] = !0, e
- }
- t.exports = function (e) {
- return e.reduce(i, {})
- }
- }, {}]
- }, {}, [4]), define("vs/base/common/insane/insane", (function () {
- return {insane: s}
- })), define(n[54], i([0, 1]), (function (e, t) {
- "use strict";
- var n;
- Object.defineProperty(t, "__esModule", {value: !0}), t.FIN = {done: !0, value: void 0}, function (e) {
- var n = {
- next: function () {
- return t.FIN
- }
- };
- e.empty = function () {
- return n
- }, e.single = function (e) {
- var n = !1;
- return {
- next: function () {
- return n ? t.FIN : (n = !0, {done: !1, value: e})
- }
- }
- }, e.fromArray = function (e, n, i) {
- return void 0 === n && (n = 0), void 0 === i && (i = e.length), {
- next: function () {
- return n >= i ? t.FIN : {done: !1, value: e[n++]}
- }
- }
- }, e.fromNativeIterator = function (e) {
- return {
- next: function () {
- var n = e.next();
- return n.done ? t.FIN : {done: !1, value: n.value}
- }
- }
- }, e.from = function (t) {
- return t ? Array.isArray(t) ? e.fromArray(t) : t : e.empty()
- }, e.map = function (e, n) {
- return {
- next: function () {
- var i = e.next();
- return i.done ? t.FIN : {done: !1, value: n(i.value)}
- }
- }
- }, e.filter = function (e, n) {
- return {
- next: function () {
- for (; ;) {
- var i = e.next();
- if (i.done) return t.FIN;
- if (n(i.value)) return {done: !1, value: i.value}
- }
- }
- }
- }, e.forEach = function (e, t) {
- for (var n = e.next(); !n.done; n = e.next()) t(n.value)
- }, e.collect = function (e, t) {
- void 0 === t && (t = Number.POSITIVE_INFINITY);
- var n = [];
- if (0 === t) return n;
- for (var i = 0, o = e.next(); !o.done && (n.push(o.value), !(++i >= t)); o = e.next()) ;
- return n
- }, e.concat = function () {
- for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
- var i = 0;
- return {
- next: function () {
- if (i >= e.length) return t.FIN;
- var n = e[i].next();
- return n.done ? (i++, this.next()) : n
- }
- }
- }, e.chain = function (e) {
- return new i(e)
- }
- }(n = t.Iterator || (t.Iterator = {}));
- var i = function () {
- function e(e) {
- this.it = e
- }
- return e.prototype.next = function () {
- return this.it.next()
- }, e
- }();
- t.ChainableIterator = i, t.getSequenceIterator = function (e) {
- return Array.isArray(e) ? n.fromArray(e) : e || n.empty()
- };
- var o = function () {
- function e(e, t, n, i) {
- void 0 === t && (t = 0), void 0 === n && (n = e.length), void 0 === i && (i = t - 1), this.items = e, this.start = t, this.end = n, this.index = i
- }
- return e.prototype.first = function () {
- return this.index = this.start, this.current()
- }, e.prototype.next = function () {
- return this.index = Math.min(this.index + 1, this.end), this.current()
- }, e.prototype.current = function () {
- return this.index === this.start - 1 || this.index === this.end ? null : this.items[this.index]
- }, e
- }();
- t.ArrayIterator = o;
- var s = function (e) {
- function t(t, n, i, o) {
- return void 0 === n && (n = 0), void 0 === i && (i = t.length), void 0 === o && (o = n - 1), e.call(this, t, n, i, o) || this
- }
- return r(t, e), t.prototype.current = function () {
- return e.prototype.current.call(this)
- }, t.prototype.previous = function () {
- return this.index = Math.max(this.index - 1, this.start - 1), this.current()
- }, t.prototype.first = function () {
- return this.index = this.start, this.current()
- }, t.prototype.last = function () {
- return this.index = this.end - 1, this.current()
- }, t.prototype.parent = function () {
- return null
- }, t
- }(o);
- t.ArrayNavigator = s;
- var a = function () {
- function e(e, t) {
- this.iterator = e, this.fn = t
- }
- return e.prototype.next = function () {
- return this.fn(this.iterator.next())
- }, e
- }();
- t.MappedIterator = a
- })), define(n[242], i([0, 1, 54]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t) {
- void 0 === e && (e = []), void 0 === t && (t = 10), this._initialize(e), this._limit = t, this._onChange()
- }
- return e.prototype.add = function (e) {
- this._history.delete(e), this._history.add(e), this._onChange()
- }, e.prototype.next = function () {
- return this._navigator.next()
- }, e.prototype.previous = function () {
- return this._navigator.previous()
- }, e.prototype.current = function () {
- return this._navigator.current()
- }, e.prototype.parent = function () {
- return null
- }, e.prototype.first = function () {
- return this._navigator.first()
- }, e.prototype.last = function () {
- return this._navigator.last()
- },
- e.prototype.has = function (e) {
- return this._history.has(e)
- }, e.prototype._onChange = function () {
- this._reduceToLimit();
- var e = this._elements;
- this._navigator = new n.ArrayNavigator(e, 0, e.length, e.length)
- }, e.prototype._reduceToLimit = function () {
- var e = this._elements;
- e.length > this._limit && this._initialize(e.slice(e.length - this._limit))
- }, e.prototype._initialize = function (e) {
- this._history = new Set;
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t];
- this._history.add(i)
- }
- }, Object.defineProperty(e.prototype, "_elements", {
- get: function () {
- var e = [];
- return this._history.forEach((function (t) {
- return e.push(t)
- })), e
- }, enumerable: !0, configurable: !0
- }), e
- }();
- t.HistoryNavigator = i
- })), define(n[36], i([0, 1, 10]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e() {
- this._keyCodeToStr = [], this._strToKeyCode = Object.create(null)
- }
- return e.prototype.define = function (e, t) {
- this._keyCodeToStr[e] = t, this._strToKeyCode[t.toLowerCase()] = e
- }, e.prototype.keyCodeToStr = function (e) {
- return this._keyCodeToStr[e]
- },
- e.prototype.strToKeyCode = function (e) {
- return this._strToKeyCode[e.toLowerCase()] || 0
- }, e
- }(), o = new i, r = new i, s = new i;
- function a(e, t) {
- var n = !!(2048 & e), i = !!(256 & e);
- return new l(2 === t ? i : n, !!(1024 & e), !!(512 & e), 2 === t ? n : i, 255 & e)
- }
- !function () {
- function e(e, t, n, i) {
- void 0 === n && (n = t), void 0 === i && (i = n), o.define(e, t), r.define(e, n), s.define(e, i)
- }
- e(0, "unknown"), e(1, "Backspace"), e(2, "Tab"), e(3, "Enter"), e(4, "Shift"), e(5, "Ctrl"), e(6, "Alt"), e(7, "PauseBreak"), e(8, "CapsLock"), e(9, "Escape"), e(10, "Space"), e(11, "PageUp"), e(12, "PageDown"), e(13, "End"), e(14, "Home"), e(15, "LeftArrow", "Left"), e(16, "UpArrow", "Up"), e(17, "RightArrow", "Right"), e(18, "DownArrow", "Down"), e(19, "Insert"), e(20, "Delete"), e(21, "0"), e(22, "1"), e(23, "2"), e(24, "3"), e(25, "4"), e(26, "5"), e(27, "6"), e(28, "7"), e(29, "8"), e(30, "9"), e(31, "A"), e(32, "B"), e(33, "C"), e(34, "D"), e(35, "E"), e(36, "F"), e(37, "G"), e(38, "H"), e(39, "I"), e(40, "J"), e(41, "K"), e(42, "L"), e(43, "M"), e(44, "N"), e(45, "O"), e(46, "P"), e(47, "Q"), e(48, "R"), e(49, "S"), e(50, "T"), e(51, "U"), e(52, "V"), e(53, "W"), e(54, "X"), e(55, "Y"),
- e(56, "Z"), e(57, "Meta"), e(58, "ContextMenu"), e(59, "F1"), e(60, "F2"), e(61, "F3"), e(62, "F4"), e(63, "F5"), e(64, "F6"), e(65, "F7"), e(66, "F8"), e(67, "F9"), e(68, "F10"), e(69, "F11"), e(70, "F12"), e(71, "F13"), e(72, "F14"), e(73, "F15"), e(74, "F16"), e(75, "F17"), e(76, "F18"), e(77, "F19"), e(78, "NumLock"), e(79, "ScrollLock"), e(80, ";", ";", "OEM_1"), e(81, "=", "=", "OEM_PLUS"), e(82, ",", ",", "OEM_COMMA"), e(83, "-", "-", "OEM_MINUS"), e(84, ".", ".", "OEM_PERIOD"), e(85, "/", "/", "OEM_2"), e(86, "`", "`", "OEM_3"), e(110, "ABNT_C1"), e(111, "ABNT_C2"), e(87, "[", "[", "OEM_4"), e(88, "\\", "\\", "OEM_5"), e(89, "]", "]", "OEM_6"), e(90, "'", "'", "OEM_7"), e(91, "OEM_8"), e(92, "OEM_102"), e(93, "NumPad0"), e(94, "NumPad1"), e(95, "NumPad2"), e(96, "NumPad3"), e(97, "NumPad4"), e(98, "NumPad5"),e(99, "NumPad6"),e(100, "NumPad7"),e(101, "NumPad8"),e(102, "NumPad9"),e(103, "NumPad_Multiply"),e(104, "NumPad_Add"),e(105, "NumPad_Separator"),e(106, "NumPad_Subtract"),e(107, "NumPad_Decimal"),e(108, "NumPad_Divide")
- }(), function (e) {
- e.toString = function (e) {
- return o.keyCodeToStr(e)
- }, e.fromString = function (e) {
- return o.strToKeyCode(e)
- }, e.toUserSettingsUS = function (e) {
- return r.keyCodeToStr(e)
- }, e.toUserSettingsGeneral = function (e) {
- return s.keyCodeToStr(e)
- }, e.fromUserSettings = function (e) {
- return r.strToKeyCode(e) || s.strToKeyCode(e)
- }
- }(t.KeyCodeUtils || (t.KeyCodeUtils = {})), t.KeyChord = function (e, t) {
- return (e | (65535 & t) << 16 >>> 0) >>> 0
- }, t.createKeybinding = function (e, t) {
- if (0 === e) return null;
- var n = (65535 & e) >>> 0, i = (4294901760 & e) >>> 16;
- return new u(0 !== i ? [a(n, t), a(i, t)] : [a(n, t)])
- }, t.createSimpleKeybinding = a;
- var l = function () {
- function e(e, t, n, i, o) {
- this.ctrlKey = e, this.shiftKey = t, this.altKey = n, this.metaKey = i, this.keyCode = o
- }
- return e.prototype.equals = function (e) {
- return this.ctrlKey === e.ctrlKey && this.shiftKey === e.shiftKey && this.altKey === e.altKey && this.metaKey === e.metaKey && this.keyCode === e.keyCode
- }, e.prototype.isModifierKey = function () {
- return 0 === this.keyCode || 5 === this.keyCode || 57 === this.keyCode || 6 === this.keyCode || 4 === this.keyCode
- }, e.prototype.toChord = function () {
- return new u([this])
- }, e.prototype.isDuplicateModifierCase = function () {
- return this.ctrlKey && 5 === this.keyCode || this.shiftKey && 4 === this.keyCode || this.altKey && 6 === this.keyCode || this.metaKey && 57 === this.keyCode
- }, e
- }();
- t.SimpleKeybinding = l;
- var u = function () {
- function e(e) {
- if (0 === e.length) throw n.illegalArgument("parts");
- this.parts = e
- }
- return e.prototype.equals = function (e) {
- if (null === e) return !1;
- if (this.parts.length !== e.parts.length) return !1;
- for (var t = 0; t < this.parts.length; t++) if (!this.parts[t].equals(e.parts[t])) return !1;
- return !0
- }, e
- }();
- t.ChordKeybinding = u;
- var d = function (e, t, n, i, o, r) {
- this.ctrlKey = e, this.shiftKey = t, this.altKey = n, this.metaKey = i, this.keyLabel = o, this.keyAriaLabel = r
- };
- t.ResolvedKeybindingPart = d;
- var c = function () {
- };
- t.ResolvedKeybinding = c
- })), define(n[128], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this.executor = e, this._didRun = !1
- }
- return e.prototype.getValue = function () {
- if (!this._didRun) try {
- this._value = this.executor()
- } catch (e) {
- this._error = e
- } finally {
- this._didRun = !0
- }
- if (this._error) throw this._error;
- return this._value
- }, Object.defineProperty(e.prototype, "rawValue", {
- get: function () {
- return this._value
- }, enumerable: !0, configurable: !0
- }), e
- }();
- t.Lazy = n
- })), define(n[2], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = !1, i = "__is_disposable_tracked__";
- function o(e) {
- if (n && e && e !== l.None) try {
- e[i] = !0
- } catch (e) {
- }
- }
- function r(e) {
- if (!n) return e;
- var t = new Error("Potentially leaked disposable").stack;
- return setTimeout((function () {
- e[i] || console.log(t)
- }), 3e3), e
- }
- function s(e) {
- return Array.isArray(e) ? (e.forEach((function (e) {
- e && (o(e), e.dispose())
- })), []) : e ? (o(e), e.dispose(), e) : void 0
- }
- t.isDisposable = function (e) {
- return "function" == typeof e.dispose && 0 === e.dispose.length
- }, t.dispose = s, t.combinedDisposable = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return e.forEach(o), r({
- dispose: function () {
- return s(e)
- }
- })
- }, t.toDisposable = function (e) {
- var t = r({
- dispose: function () {
- o(t), e()
- }
- });
- return t
- };
- var a = function () {
- function e() {
- this._toDispose = new Set, this._isDisposed = !1
- }
- return e.prototype.dispose = function () {
- this._isDisposed || (o(this), this._isDisposed = !0, this.clear())
- }, e.prototype.clear = function () {
- this._toDispose.forEach((function (e) {
- return e.dispose()
- })), this._toDispose.clear()
- }, e.prototype.add = function (e) {
- if (!e) return e;
- if (e === this) throw new Error("Cannot register a disposable on itself!");
- return o(e), this._isDisposed ? 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) : this._toDispose.add(e), e
- }, e
- }();
- t.DisposableStore = a;
- var l = function () {
- function e() {
- this._store = new a, r(this)
- }
- return e.prototype.dispose = function () {
- o(this), this._store.dispose()
- }, e.prototype._register = function (e) {
- if (e === this) throw new Error("Cannot register a disposable on itself!");
- return this._store.add(e)
- }, e.None = Object.freeze({
- dispose: function () {
- }
- }), e
- }();
- t.Disposable = l;
- var u = function () {
- function e() {
- this._isDisposed = !1, r(this)
- }
- return Object.defineProperty(e.prototype, "value", {
- get: function () {
- return this._isDisposed ? void 0 : this._value
- }, set: function (e) {
- this._isDisposed || e === this._value || (this._value && this._value.dispose(), e && o(e), this._value = e)
- }, enumerable: !0, configurable: !0
- }), e.prototype.clear = function () {
- this.value = void 0
- }, e.prototype.dispose = function () {
- this._isDisposed = !0, o(this), this._value && this._value.dispose(), this._value = void 0
- }, e
- }();
- t.MutableDisposable = u;
- var d = function () {
- function e(e) {
- this.object = e
- }
- return e.prototype.dispose = function () {
- }, e
- }();
- t.ImmortalReference = d
- })), define(n[76], i([0, 1, 54]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(t) {
- this.element = t, this.next = e.Undefined, this.prev = e.Undefined
- }
- return e.Undefined = new e(void 0), e
- }(), o = function () {
- function e() {
- this._first = i.Undefined, this._last = i.Undefined, this._size = 0
- }
- return Object.defineProperty(e.prototype, "size", {
- get: function () {
- return this._size
- }, enumerable: !0, configurable: !0
- }), e.prototype.isEmpty = function () {
- return this._first === i.Undefined
- }, e.prototype.clear = function () {
- this._first = i.Undefined, this._last = i.Undefined, this._size = 0
- }, e.prototype.unshift = function (e) {
- return this._insert(e, !1)
- }, e.prototype.push = function (e) {
- return this._insert(e, !0)
- }, e.prototype._insert = function (e, t) {
- var n = this, o = new i(e);
- if (this._first === i.Undefined) this._first = o, this._last = o; else if (t) {
- var r = this._last;
- this._last = o, o.prev = r, r.next = o
- } else {
- var s = this._first;
- this._first = o, o.next = s, s.prev = o
- }
- this._size += 1;
- var a = !1;
- return function () {
- a || (a = !0, n._remove(o))
- }
- }, e.prototype.shift = function () {
- if (this._first !== i.Undefined) {
- var e = this._first.element;
- return this._remove(this._first), e
- }
- }, e.prototype.pop = function () {
- if (this._last !== i.Undefined) {
- var e = this._last.element;
- return this._remove(this._last), e
- }
- }, e.prototype._remove = function (e) {
- if (e.prev !== i.Undefined && e.next !== i.Undefined) {
- var t = e.prev;
- t.next = e.next, e.next.prev = t
- } else e.prev === i.Undefined && e.next === i.Undefined ? (this._first = i.Undefined, this._last = i.Undefined) : e.next === i.Undefined ? (this._last = this._last.prev,
- this._last.next = i.Undefined) : e.prev === i.Undefined && (this._first = this._first.next, this._first.prev = i.Undefined);
- this._size -= 1
- }, e.prototype.iterator = function () {
- var e, t = this._first;
- return {
- next: function () {
- return t === i.Undefined ? n.FIN : (e ? e.value = t.element : e = {
- done: !1,
- value: t.element
- }, t = t.next, e)
- }
- }
- }, e.prototype.toArray = function () {
- for (var e = [], t = this._first; t !== i.Undefined; t = t.next) e.push(t.element);
- return e
- }, e
- }();
- t.LinkedList = o
- })), define(n[4], i([0, 1, 10, 102, 2, 76]), (function (e, t, n, i, o, s) {
- "use strict";
- var a;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- function t(e) {
- return function (t, n, i) {
- void 0 === n && (n = null);
- var o, r = !1;
- return o = e((function (e) {
- if (!r) return o ? o.dispose() : r = !0, t.call(n, e)
- }), null, i), r && o.dispose(), o
- }
- }
- function n(e, t) {
- return a((function (n, i, o) {
- return void 0 === i && (i = null), e((function (e) {
- return n.call(i, t(e))
- }), null, o)
- }))
- }
- function i(e, t) {
- return a((function (n, i, o) {
- return void 0 === i && (i = null), e((function (e) {
- t(e), n.call(i, e)
- }), null, o)
- }))
- }
- function r(e, t) {
- return a((function (n, i, o) {
- return void 0 === i && (i = null), e((function (e) {
- return t(e) && n.call(i, e)
- }), null, o)
- }))
- }
- function s(e, t, i) {
- var o = i;
- return n(e, (function (e) {
- return o = t(o, e)
- }))
- }
- function a(e) {
- var t, n = new d({
- onFirstListenerAdd: function () {
- t = e(n.fire, n)
- }, onLastListenerRemove: function () {
- t.dispose()
- }
- });
- return n.event
- }
- function l(e, t, n, i, o) {
- var r;
- void 0 === n && (n = 100), void 0 === i && (i = !1);
- var s = void 0, a = void 0, l = 0, u = new d({
- leakWarningThreshold: o, onFirstListenerAdd: function () {
- r = e((function (e) {
- l++, s = t(s, e), i && !a && (u.fire(s), s = void 0), clearTimeout(a), a = setTimeout((function () {
- var e = s;
- s = void 0, a = void 0, (!i || l > 1) && u.fire(e), l = 0
- }), n)
- }))
- }, onLastListenerRemove: function () {
- r.dispose()
- }
- });
- return u.event
- }
- function u(e) {
- var t, n = !0;
- return r(e, (function (e) {
- var i = n || e !== t;
- return n = !1, t = e, i
- }))
- }
- e.None = function () {
- return o.Disposable.None
- }, e.once = t, e.map = n, e.forEach = i, e.filter = r, e.signal = function (e) {
- return e
- }, e.any = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return function (t, n, i) {
- return void 0 === n && (n = null),
- o.combinedDisposable.apply(void 0, e.map((function (e) {
- return e((function (e) {
- return t.call(n, e)
- }), null, i)
- })))
- }
- }, e.reduce = s, e.snapshot = a, e.debounce = l, e.stopwatch = function (e) {
- var i = (new Date).getTime();
- return n(t(e), (function (e) {
- return (new Date).getTime() - i
- }))
- }, e.latch = u, e.buffer = function (e, t, n) {
- void 0 === t && (t = !1), void 0 === n && (n = []);
- var i = n.slice(), o = e((function (e) {
- i ? i.push(e) : s.fire(e)
- })), r = function () {
- i && i.forEach((function (e) {
- return s.fire(e)
- })), i = null
- }, s = new d({
- onFirstListenerAdd: function () {
- o || (o = e((function (e) {
- return s.fire(e)
- })))
- }, onFirstListenerDidAdd: function () {
- i && (t ? setTimeout(r) : r())
- }, onLastListenerRemove: function () {
- o && o.dispose(), o = null
- }
- });
- return s.event
- };
- var c = function () {
- function e(e) {
- this.event = e
- }
- return e.prototype.map = function (t) {
- return new e(n(this.event, t))
- }, e.prototype.forEach = function (t) {
- return new e(i(this.event, t))
- }, e.prototype.filter = function (t) {
- return new e(r(this.event, t))
- }, e.prototype.reduce = function (t, n) {
- return new e(s(this.event, t, n))
- }, e.prototype.latch = function () {
- return new e(u(this.event))
- }, e.prototype.debounce = function (t, n, i, o) {
- return void 0 === n && (n = 100), void 0 === i && (i = !1), new e(l(this.event, t, n, i, o))
- }, e.prototype.on = function (e, t, n) {
- return this.event(e, t, n)
- }, e.prototype.once = function (e, n, i) {
- return t(this.event)(e, n, i)
- }, e
- }();
- e.chain = function (e) {
- return new c(e)
- }, e.fromNodeEventEmitter = function (e, t, n) {
- void 0 === n && (n = function (e) {
- return e
- });
- var i = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return o.fire(n.apply(void 0, e))
- }, o = new d({
- onFirstListenerAdd: function () {
- return e.on(t, i)
- }, onLastListenerRemove: function () {
- return e.removeListener(t, i)
- }
- });
- return o.event
- }, e.fromDOMEventEmitter = function (e, t, n) {
- void 0 === n && (n = function (e) {
- return e
- });
- var i = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return o.fire(n.apply(void 0, e))
- }, o = new d({
- onFirstListenerAdd: function () {
- return e.addEventListener(t, i)
- }, onLastListenerRemove: function () {
- return e.removeEventListener(t, i)
- }
- });
- return o.event
- }, e.fromPromise = function (e) {
- var t = new d, n = !1
- ;
- return e.then(void 0, (function () {
- return null
- })).then((function () {
- n ? t.fire(void 0) : setTimeout((function () {
- return t.fire(void 0)
- }), 0)
- })), n = !0, t.event
- }, e.toPromise = function (e) {
- return new Promise((function (n) {
- return t(e)(n)
- }))
- }
- }(a = t.Event || (t.Event = {}));
- var l = -1, u = function () {
- function e(e, t) {
- void 0 === t && (t = Math.random().toString(18).slice(2, 5)), this.customThreshold = e, this.name = t, this._warnCountdown = 0
- }
- return e.prototype.dispose = function () {
- this._stacks && this._stacks.clear()
- }, e.prototype.check = function (e) {
- var t = this, n = l;
- if ("number" == typeof this.customThreshold && (n = this.customThreshold), !(n <= 0 || e < n)) {
- this._stacks || (this._stacks = new Map);
- var i = (new Error).stack.split("\n").slice(3).join("\n"), o = this._stacks.get(i) || 0;
- if (this._stacks.set(i, o + 1), this._warnCountdown -= 1, this._warnCountdown <= 0) {
- var r;
- this._warnCountdown = .5 * n;
- var s = 0;
- this._stacks.forEach((function (e, t) {
- (!r || s < e) && (r = t, s = e)
- })), console.warn("[" + this.name + "] potential listener LEAK detected, having " + e + " listeners already. MOST frequent listener (" + s + "):"),
- console.warn(r)
- }
- return function () {
- var e = t._stacks.get(i) || 0;
- t._stacks.set(i, e - 1)
- }
- }
- }, e
- }(), d = function () {
- function e(e) {
- this._disposed = !1, this._options = e, this._leakageMon = l > 0 ? new u(this._options && this._options.leakWarningThreshold) : void 0
- }
- return Object.defineProperty(e.prototype, "event", {
- get: function () {
- var t = this;
- return this._event || (this._event = function (n, i, r) {
- t._listeners || (t._listeners = new s.LinkedList);
- var a = t._listeners.isEmpty();
- a && t._options && t._options.onFirstListenerAdd && t._options.onFirstListenerAdd(t);
- var l, u, d = t._listeners.push(i ? [n, i] : n);
- return a && t._options && t._options.onFirstListenerDidAdd && t._options.onFirstListenerDidAdd(t), t._options && t._options.onListenerDidAdd && t._options.onListenerDidAdd(t, n, i), t._leakageMon && (l = t._leakageMon.check(t._listeners.size)), u = {
- dispose: function () {
- (l && l(), u.dispose = e._noop, t._disposed) || (d(), t._options && t._options.onLastListenerRemove && (t._listeners && !t._listeners.isEmpty() || t._options.onLastListenerRemove(t)))
- }
- },
- r instanceof o.DisposableStore ? r.add(u) : Array.isArray(r) && r.push(u), u
- }), this._event
- }, enumerable: !0, configurable: !0
- }), e.prototype.fire = function (e) {
- if (this._listeners) {
- this._deliveryQueue || (this._deliveryQueue = new s.LinkedList);
- for (var t = this._listeners.iterator(), i = t.next(); !i.done; i = t.next()) this._deliveryQueue.push([i.value, e]);
- for (; this._deliveryQueue.size > 0;) {
- var o = this._deliveryQueue.shift(), r = o[0], a = o[1];
- try {
- "function" == typeof r ? r.call(void 0, a) : r[0].call(r[1], a)
- } catch (i) {
- n.onUnexpectedError(i)
- }
- }
- }
- }, e.prototype.dispose = function () {
- this._listeners && this._listeners.clear(), this._deliveryQueue && this._deliveryQueue.clear(), this._leakageMon && this._leakageMon.dispose(), this._disposed = !0
- }, e._noop = function () {
- }, e
- }();
- t.Emitter = d;
- var c = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._isPaused = 0, n._eventQueue = new s.LinkedList, n._mergeFn = t && t.merge, n
- }
- return r(t, e), t.prototype.pause = function () {
- this._isPaused++
- }, t.prototype.resume = function () {
- if (0 !== this._isPaused && 0 == --this._isPaused) if (this._mergeFn) {
- var t = this._eventQueue.toArray();
- this._eventQueue.clear(), e.prototype.fire.call(this, this._mergeFn(t))
- } else for (; !this._isPaused && 0 !== this._eventQueue.size;) e.prototype.fire.call(this, this._eventQueue.shift())
- }, t.prototype.fire = function (t) {
- this._listeners && (0 !== this._isPaused ? this._eventQueue.push(t) : e.prototype.fire.call(this, t))
- }, t
- }(d);
- t.PauseableEmitter = c;
- var h = function () {
- function e() {
- var e = this;
- this.hasListeners = !1, this.events = [], this.emitter = new d({
- onFirstListenerAdd: function () {
- return e.onFirstListenerAdd()
- }, onLastListenerRemove: function () {
- return e.onLastListenerRemove()
- }
- })
- }
- return Object.defineProperty(e.prototype, "event", {
- get: function () {
- return this.emitter.event
- }, enumerable: !0, configurable: !0
- }), e.prototype.add = function (e) {
- var t = this, n = {event: e, listener: null};
- this.events.push(n), this.hasListeners && this.hook(n);
- return o.toDisposable(i.once((function () {
- t.hasListeners && t.unhook(n);
- var e = t.events.indexOf(n);
- t.events.splice(e, 1)
- })))
- }, e.prototype.onFirstListenerAdd = function () {
- var e = this;
- this.hasListeners = !0,
- this.events.forEach((function (t) {
- return e.hook(t)
- }))
- }, e.prototype.onLastListenerRemove = function () {
- var e = this;
- this.hasListeners = !1, this.events.forEach((function (t) {
- return e.unhook(t)
- }))
- }, e.prototype.hook = function (e) {
- var t = this;
- e.listener = e.event((function (e) {
- return t.emitter.fire(e)
- }))
- }, e.prototype.unhook = function (e) {
- e.listener && e.listener.dispose(), e.listener = null
- }, e.prototype.dispose = function () {
- this.emitter.dispose()
- }, e
- }();
- t.EventMultiplexer = h;
- var p = function () {
- function e() {
- this.buffers = []
- }
- return e.prototype.wrapEvent = function (e) {
- var t = this;
- return function (n, i, o) {
- return e((function (e) {
- var o = t.buffers[t.buffers.length - 1];
- o ? o.push((function () {
- return n.call(i, e)
- })) : n.call(i, e)
- }), void 0, o)
- }
- }, e.prototype.bufferEvents = function (e) {
- var t = [];
- this.buffers.push(t);
- var n = e();
- return this.buffers.pop(), t.forEach((function (e) {
- return e()
- })), n
- }, e
- }();
- t.EventBufferer = p;
- var g = function () {
- function e() {
- var e = this;
- this.listening = !1, this.inputEvent = a.None, this.inputEventListener = o.Disposable.None, this.emitter = new d({
- onFirstListenerDidAdd: function () {
- e.listening = !0, e.inputEventListener = e.inputEvent(e.emitter.fire, e.emitter)
- }, onLastListenerRemove: function () {
- e.listening = !1, e.inputEventListener.dispose()
- }
- }), this.event = this.emitter.event
- }
- return Object.defineProperty(e.prototype, "input", {
- set: function (e) {
- this.inputEvent = e, this.listening && (this.inputEventListener.dispose(), this.inputEventListener = e(this.emitter.fire, this.emitter))
- }, enumerable: !0, configurable: !0
- }), e.prototype.dispose = function () {
- this.inputEventListener.dispose(), this.emitter.dispose()
- }, e
- }();
- t.Relay = g
- })), define(n[24], i([0, 1, 4]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e() {
- this._zoomLevel = 0, this._lastZoomLevelChangeTime = 0, this._onDidChangeZoomLevel = new n.Emitter, this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event
- }
- return e.prototype.getZoomLevel = function () {
- return this._zoomLevel
- }, e.prototype.getTimeSinceLastZoomLevelChanged = function () {
- return Date.now() - this._lastZoomLevelChangeTime
- },
- e.prototype.getPixelRatio = function () {
- var e = document.createElement("canvas").getContext("2d");
- return (window.devicePixelRatio || 1) / (e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1)
- }, e.INSTANCE = new e, e
- }();
- t.getZoomLevel = function () {
- return i.INSTANCE.getZoomLevel()
- }, t.getTimeSinceLastZoomLevelChanged = function () {
- return i.INSTANCE.getTimeSinceLastZoomLevelChanged()
- }, t.onDidChangeZoomLevel = function (e) {
- return i.INSTANCE.onDidChangeZoomLevel(e)
- }, t.getPixelRatio = function () {
- return i.INSTANCE.getPixelRatio()
- };
- var o = navigator.userAgent;
- t.isIE = o.indexOf("Trident") >= 0, t.isEdge = o.indexOf("Edge/") >= 0, t.isEdgeOrIE = t.isIE || t.isEdge, t.isFirefox = o.indexOf("Firefox") >= 0, t.isWebKit = o.indexOf("AppleWebKit") >= 0, t.isChrome = o.indexOf("Chrome") >= 0, t.isSafari = !t.isChrome && o.indexOf("Safari") >= 0, t.isWebkitWebView = !t.isChrome && !t.isSafari && t.isWebKit, t.isIPad = o.indexOf("iPad") >= 0 || t.isSafari && navigator.maxTouchPoints > 0,
- t.isEdgeWebView = t.isEdge && o.indexOf("WebView/") >= 0, t.isStandalone = window.matchMedia && window.matchMedia("(display-mode: standalone)").matches
- })), define(n[52], i([0, 1, 4]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.domEvent = function (e, t, i) {
- var o = function (e) {
- return r.fire(e)
- }, r = new n.Emitter({
- onFirstListenerAdd: function () {
- e.addEventListener(t, o, i)
- }, onLastListenerRemove: function () {
- e.removeEventListener(t, o, i)
- }
- });
- return r.event
- }, t.stop = function (e) {
- return n.Event.map(e, (function (e) {
- return e.preventDefault(), e.stopPropagation(), e
- }))
- }
- }));
- var a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[129], i([0, 1, 99, 19, 4, 54]), (function (e, t, n, i, o, r) {
- "use strict";
- function s(e) {
- return "object" == typeof e && "visibility" in e && "data" in e
- }
- function l(e) {
- switch (e) {
- case!0:
- return 1;
- case!1:
- return 0;
- default:
- return e
- }
- }
- function u(e) {
- return "boolean" == typeof e.collapsible
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.isFilterResult = s, t.getVisibleState = l;
- var d = function () {
- function e(e, t, n, i) {
- void 0 === i && (i = {}), this.user = e, this.list = t, this.rootRef = [], this.eventBufferer = new o.EventBufferer, this._onDidChangeCollapseState = new o.Emitter, this.onDidChangeCollapseState = this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event), this._onDidChangeRenderNodeCount = new o.Emitter, this.onDidChangeRenderNodeCount = this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event), this._onDidSplice = new o.Emitter, this.onDidSplice = this._onDidSplice.event, this.collapseByDefault = void 0 !== i.collapseByDefault && i.collapseByDefault, this.filter = i.filter, this.autoExpandSingleChildren = void 0 !== i.autoExpandSingleChildren && i.autoExpandSingleChildren, this.root = {
- parent: void 0,
- element: n,
- children: [],
- depth: 0,
- visibleChildrenCount: 0,
- visibleChildIndex: -1,
- collapsible: !1,
- collapsed: !1,
- renderNodeCount: 0,
- visible: !0,
- filterData: void 0
- }
- }
- return e.prototype.splice = function (e, t, i, o, s) {
- var l, u = this;
- if (0 === e.length) throw new n.TreeError(this.user, "Invalid tree location");
- for (var d = this.getParentNodeWithListIndex(e), c = d.parentNode, h = d.listIndex, p = d.revealed, g = d.visible, f = [], m = r.Iterator.map(r.Iterator.from(i), (function (e) {
- return u.createTreeNode(e, c, c.visible ? 1 : 0, p, f, o)
- })), v = e[e.length - 1], _ = 0, y = v; y >= 0 && y < c.children.length; y--) {
- if ((N = c.children[y]).visible) {
- _ = N.visibleChildIndex;
- break
- }
- }
- var C = [], b = 0, S = 0;
- r.Iterator.forEach(m, (function (e) {
- C.push(e), S += e.renderNodeCount, e.visible && (e.visibleChildIndex = _ + b++)
- }));
- for (var w = (l = c.children).splice.apply(l, a([v, t], C)), E = 0, L = 0, D = w; L < D.length; L++) {
- (N = D[L]).visible && E++
- }
- if (0 !== E) for (y = v + C.length; y < c.children.length; y++) {
- var N;
- (N = c.children[y]).visible && (N.visibleChildIndex -= E)
- }
- if (c.visibleChildrenCount += b - E, p && g) {
- var x = w.reduce((function (e, t) {
- return e + (t.visible ? t.renderNodeCount : 0)
- }), 0);
- this._updateAncestorsRenderNodeCount(c, S - x), this.list.splice(h, x, f)
- }
- if (w.length > 0 && s) {
- var I = function (e) {
- s(e),
- e.children.forEach(I)
- };
- w.forEach(I)
- }
- this._onDidSplice.fire({insertedNodes: C, deletedNodes: w})
- }, e.prototype.rerender = function (e) {
- if (0 === e.length) throw new n.TreeError(this.user, "Invalid tree location");
- var t = this.getTreeNodeWithListIndex(e), i = t.node, o = t.listIndex;
- t.revealed && this.list.splice(o, 1, [i])
- }, e.prototype.has = function (e) {
- return this.hasTreeNode(e)
- }, e.prototype.getListIndex = function (e) {
- var t = this.getTreeNodeWithListIndex(e), n = t.listIndex, i = t.visible, o = t.revealed;
- return i && o ? n : -1
- }, e.prototype.getListRenderCount = function (e) {
- return this.getTreeNode(e).renderNodeCount
- }, e.prototype.isCollapsible = function (e) {
- return this.getTreeNode(e).collapsible
- }, e.prototype.setCollapsible = function (e, t) {
- var n = this, i = this.getTreeNode(e);
- void 0 === t && (t = !i.collapsible);
- var o = {collapsible: t};
- return this.eventBufferer.bufferEvents((function () {
- return n._setCollapseState(e, o)
- }))
- }, e.prototype.isCollapsed = function (e) {
- return this.getTreeNode(e).collapsed
- }, e.prototype.setCollapsed = function (e, t, n) {
- var i = this, o = this.getTreeNode(e)
- ;void 0 === t && (t = !o.collapsed);
- var r = {collapsed: t, recursive: n || !1};
- return this.eventBufferer.bufferEvents((function () {
- return i._setCollapseState(e, r)
- }))
- }, e.prototype._setCollapseState = function (e, t) {
- var n = this.getTreeNodeWithListIndex(e), i = n.node, o = n.listIndex, r = n.revealed,
- s = this._setListNodeCollapseState(i, o, r, t);
- if (i !== this.root && this.autoExpandSingleChildren && s && !u(t) && i.collapsible && !i.collapsed && !t.recursive) {
- for (var l = -1, d = 0; d < i.children.length; d++) {
- if (i.children[d].visible) {
- if (l > -1) {
- l = -1;
- break
- }
- l = d
- }
- }
- l > -1 && this._setCollapseState(a(e, [l]), t)
- }
- return s
- }, e.prototype._setListNodeCollapseState = function (e, t, n, i) {
- var o = this._setNodeCollapseState(e, i, !1);
- if (!n || !e.visible || !o) return o;
- var r = e.renderNodeCount, s = this.updateNodeAfterCollapseChange(e), a = r - (-1 === t ? 0 : 1);
- return this.list.splice(t + 1, a, s.slice(1)), o
- }, e.prototype._setNodeCollapseState = function (e, t, n) {
- var i;
- if (e === this.root ? i = !1 : (u(t) ? (i = e.collapsible !== t.collapsible, e.collapsible = t.collapsible) : e.collapsible ? (i = e.collapsed !== t.collapsed,
- e.collapsed = t.collapsed) : i = !1, i && this._onDidChangeCollapseState.fire({
- node: e,
- deep: n
- })), !u(t) && t.recursive) for (var o = 0, r = e.children; o < r.length; o++) {
- var s = r[o];
- i = this._setNodeCollapseState(s, t, !0) || i
- }
- return i
- }, e.prototype.expandTo = function (e) {
- var t = this;
- this.eventBufferer.bufferEvents((function () {
- for (var n = t.getTreeNode(e); n.parent;) n = n.parent, e = e.slice(0, e.length - 1), n.collapsed && t._setCollapseState(e, {
- collapsed: !1,
- recursive: !1
- })
- }))
- }, e.prototype.refilter = function () {
- var e = this.root.renderNodeCount, t = this.updateNodeAfterFilterChange(this.root);
- this.list.splice(0, e, t)
- }, e.prototype.createTreeNode = function (e, t, n, i, o, s) {
- var a = this, l = {
- parent: t,
- element: e.element,
- children: [],
- depth: t.depth + 1,
- visibleChildrenCount: 0,
- visibleChildIndex: -1,
- collapsible: "boolean" == typeof e.collapsible ? e.collapsible : void 0 !== e.collapsed,
- collapsed: void 0 === e.collapsed ? this.collapseByDefault : e.collapsed,
- renderNodeCount: 1,
- visible: !0,
- filterData: void 0
- }, u = this._filterNode(l, n);
- i && o.push(l)
- ;var d = r.Iterator.from(e.children), c = i && 0 !== u && !l.collapsed,
- h = r.Iterator.map(d, (function (e) {
- return a.createTreeNode(e, l, u, c, o, s)
- })), p = 0, g = 1;
- return r.Iterator.forEach(h, (function (e) {
- l.children.push(e), g += e.renderNodeCount, e.visible && (e.visibleChildIndex = p++)
- })), l.collapsible = l.collapsible || l.children.length > 0, l.visibleChildrenCount = p, l.visible = 2 === u ? p > 0 : 1 === u, l.visible ? l.collapsed || (l.renderNodeCount = g) : (l.renderNodeCount = 0, i && o.pop()), s && s(l), l
- }, e.prototype.updateNodeAfterCollapseChange = function (e) {
- var t = e.renderNodeCount, n = [];
- return this._updateNodeAfterCollapseChange(e, n), this._updateAncestorsRenderNodeCount(e.parent, n.length - t), n
- }, e.prototype._updateNodeAfterCollapseChange = function (e, t) {
- if (!1 === e.visible) return 0;
- if (t.push(e), e.renderNodeCount = 1, !e.collapsed) for (var n = 0, i = e.children; n < i.length; n++) {
- var o = i[n];
- e.renderNodeCount += this._updateNodeAfterCollapseChange(o, t)
- }
- return this._onDidChangeRenderNodeCount.fire(e), e.renderNodeCount
- }, e.prototype.updateNodeAfterFilterChange = function (e) {
- var t = e.renderNodeCount, n = [];
- return this._updateNodeAfterFilterChange(e, e.visible ? 1 : 0, n), this._updateAncestorsRenderNodeCount(e.parent, n.length - t), n
- }, e.prototype._updateNodeAfterFilterChange = function (e, t, n, i) {
- var o;
- if (void 0 === i && (i = !0), e !== this.root) {
- if (0 === (o = this._filterNode(e, t))) return e.visible = !1, e.renderNodeCount = 0, !1;
- i && n.push(e)
- }
- var r = n.length;
- e.renderNodeCount = e === this.root ? 0 : 1;
- var s = !1;
- if (e.collapsed && 0 === o) e.visibleChildrenCount = 0; else {
- for (var a = 0, l = 0, u = e.children; l < u.length; l++) {
- var d = u[l];
- s = this._updateNodeAfterFilterChange(d, o, n, i && !e.collapsed) || s, d.visible && (d.visibleChildIndex = a++)
- }
- e.visibleChildrenCount = a
- }
- return e !== this.root && (e.visible = 2 === o ? s : 1 === o), e.visible ? e.collapsed || (e.renderNodeCount += n.length - r) : (e.renderNodeCount = 0, i && n.pop()), this._onDidChangeRenderNodeCount.fire(e), e.visible
- }, e.prototype._updateAncestorsRenderNodeCount = function (e, t) {
- if (0 !== t) for (; e;) e.renderNodeCount += t, this._onDidChangeRenderNodeCount.fire(e), e = e.parent
- }, e.prototype._filterNode = function (e, t) {
- var n = this.filter ? this.filter.filter(e.element, t) : 1;
- return "boolean" == typeof n ? (e.filterData = void 0, n ? 1 : 0) : s(n) ? (e.filterData = n.data, l(n.visibility)) : (e.filterData = void 0, l(n))
- }, e.prototype.hasTreeNode = function (e, t) {
- if (void 0 === t && (t = this.root), !e || 0 === e.length) return !0;
- var n = e[0], i = e.slice(1);
- return !(n < 0 || n > t.children.length) && this.hasTreeNode(i, t.children[n])
- }, e.prototype.getTreeNode = function (e, t) {
- if (void 0 === t && (t = this.root), !e || 0 === e.length) return t;
- var i = e[0], o = e.slice(1);
- if (i < 0 || i > t.children.length) throw new n.TreeError(this.user, "Invalid tree location");
- return this.getTreeNode(o, t.children[i])
- }, e.prototype.getTreeNodeWithListIndex = function (e) {
- if (0 === e.length) return {node: this.root, listIndex: -1, revealed: !0, visible: !1};
- var t = this.getParentNodeWithListIndex(e), i = t.parentNode, o = t.listIndex, r = t.revealed,
- s = t.visible, a = e[e.length - 1];
- if (a < 0 || a > i.children.length) throw new n.TreeError(this.user, "Invalid tree location");
- var l = i.children[a];
- return {node: l, listIndex: o, revealed: r, visible: s && l.visible}
- },
- e.prototype.getParentNodeWithListIndex = function (e, t, i, o, r) {
- void 0 === t && (t = this.root), void 0 === i && (i = 0), void 0 === o && (o = !0), void 0 === r && (r = !0);
- var s = e[0], a = e.slice(1);
- if (s < 0 || s > t.children.length) throw new n.TreeError(this.user, "Invalid tree location");
- for (var l = 0; l < s; l++) i += t.children[l].renderNodeCount;
- return o = o && !t.collapsed, r = r && t.visible, 0 === a.length ? {
- parentNode: t,
- listIndex: i,
- revealed: o,
- visible: r
- } : this.getParentNodeWithListIndex(a, t.children[s], i + 1, o, r)
- }, e.prototype.getNode = function (e) {
- return void 0 === e && (e = []), this.getTreeNode(e)
- }, e.prototype.getNodeLocation = function (e) {
- for (var t = [], n = e; n.parent;) t.push(n.parent.children.indexOf(n)), n = n.parent;
- return t.reverse()
- }, e.prototype.getParentNodeLocation = function (e) {
- return 0 === e.length ? void 0 : 1 === e.length ? [] : i.tail2(e)[0]
- }, e
- }();
- t.IndexTreeModel = d
- }));
- var l = this && this.__assign || function () {
- return (l = Object.assign || function (e) {
- for (var t, n = 1, i = arguments.length; n < i; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
- return e
- }).apply(this, arguments)
- };
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[130], i([0, 1, 54, 129, 99, 19]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e(e, t, n) {
- void 0 === n && (n = {}), this.user = e, this.nodes = new Map, this.nodesByIdentity = new Map, this.model = new i.IndexTreeModel(e, t, null, n), this.onDidSplice = this.model.onDidSplice, this.onDidChangeCollapseState = this.model.onDidChangeCollapseState, this.onDidChangeRenderNodeCount = this.model.onDidChangeRenderNodeCount, n.sorter && (this.sorter = {
- compare: function (e, t) {
- return n.sorter.compare(e.element, t.element)
- }
- }), this.identityProvider = n.identityProvider
- }
- return e.prototype.setChildren = function (e, t, n, i) {
- var o = this.getElementLocation(e);
- this._setChildren(o, this.preserveCollapseState(t), n, i)
- }, e.prototype._setChildren = function (e, t, n, i) {
- var o = this, r = new Set, s = new Set;
- this.model.splice(a(e, [0]), Number.MAX_VALUE, t, (function (e) {
- if (r.add(e.element), o.nodes.set(e.element, e), o.identityProvider) {
- var t = o.identityProvider.getId(e.element).toString();
- s.add(t), o.nodesByIdentity.set(t, e)
- }
- n && n(e)
- }), (function (e) {
- if (r.has(e.element) || o.nodes.delete(e.element), o.identityProvider) {
- var t = o.identityProvider.getId(e.element).toString();
- s.has(t) || o.nodesByIdentity.delete(t)
- }
- i && i(e)
- }))
- }, e.prototype.preserveCollapseState = function (e) {
- var t = this, i = e ? n.getSequenceIterator(e) : n.Iterator.empty();
- return this.sorter && (i = n.Iterator.fromArray(r.mergeSort(n.Iterator.collect(i), this.sorter.compare.bind(this.sorter)))), n.Iterator.map(i, (function (e) {
- var n = t.nodes.get(e.element);
- if (!n && t.identityProvider) {
- var i = t.identityProvider.getId(e.element).toString();
- n = t.nodesByIdentity.get(i)
- }
- if (!n) return l(l({}, e), {children: t.preserveCollapseState(e.children)});
- var o = "boolean" == typeof e.collapsible ? e.collapsible : n.collapsible,
- r = void 0 !== e.collapsed ? e.collapsed : n.collapsed
- ;
- return l(l({}, e), {collapsible: o, collapsed: r, children: t.preserveCollapseState(e.children)})
- }))
- }, e.prototype.rerender = function (e) {
- var t = this.getElementLocation(e);
- this.model.rerender(t)
- }, e.prototype.has = function (e) {
- return this.nodes.has(e)
- }, e.prototype.getListIndex = function (e) {
- var t = this.getElementLocation(e);
- return this.model.getListIndex(t)
- }, e.prototype.getListRenderCount = function (e) {
- var t = this.getElementLocation(e);
- return this.model.getListRenderCount(t)
- }, e.prototype.isCollapsible = function (e) {
- var t = this.getElementLocation(e);
- return this.model.isCollapsible(t)
- }, e.prototype.setCollapsible = function (e, t) {
- var n = this.getElementLocation(e);
- return this.model.setCollapsible(n, t)
- }, e.prototype.isCollapsed = function (e) {
- var t = this.getElementLocation(e);
- return this.model.isCollapsed(t)
- }, e.prototype.setCollapsed = function (e, t, n) {
- var i = this.getElementLocation(e);
- return this.model.setCollapsed(i, t, n)
- }, e.prototype.expandTo = function (e) {
- var t = this.getElementLocation(e);
- this.model.expandTo(t)
- }, e.prototype.refilter = function () {
- this.model.refilter()
- }, e.prototype.getNode = function (e) {
- if (void 0 === e && (e = null), null === e) return this.model.getNode(this.model.rootRef);
- var t = this.nodes.get(e);
- if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
- return t
- }, e.prototype.getNodeLocation = function (e) {
- return e.element
- }, e.prototype.getParentNodeLocation = function (e) {
- if (null === e) throw new o.TreeError(this.user, "Invalid getParentNodeLocation call");
- var t = this.nodes.get(e);
- if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
- var n = this.model.getNodeLocation(t), i = this.model.getParentNodeLocation(n);
- return this.model.getNode(i).element
- }, e.prototype.getElementLocation = function (e) {
- if (null === e) return [];
- var t = this.nodes.get(e);
- if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
- return this.model.getNodeLocation(t)
- }, e
- }();
- t.ObjectTreeModel = s
- })), define(n[243], i([0, 1, 54, 4, 99, 130]), (function (e, t, n, i, o, r) {
- "use strict";
- function s(e) {
- return {
- element: {elements: [e.element], incompressible: e.incompressible || !1},
- children: n.Iterator.map(n.Iterator.from(e.children), s),
- collapsible: e.collapsible,
- collapsed: e.collapsed
- }
- }
- function a(e) {
- for (var t, i, o = [e.element], r = e.incompressible || !1; t = n.Iterator.from(e.children), 1 === (i = n.Iterator.collect(t, 2)).length && !(e = i[0]).incompressible;) o.push(e.element);
- return {
- element: {elements: o, incompressible: r},
- children: n.Iterator.map(n.Iterator.concat(n.Iterator.fromArray(i), t), a),
- collapsible: e.collapsible,
- collapsed: e.collapsed
- }
- }
- function u(e) {
- return function e(t, i) {
- var o;
- return void 0 === i && (i = 0), o = i < t.element.elements.length - 1 ? n.Iterator.single(e(t, i + 1)) : n.Iterator.map(n.Iterator.from(t.children), (function (t) {
- return e(t, 0)
- })), 0 === i && t.element.incompressible ? {
- element: t.element.elements[i],
- children: o,
- incompressible: !0,
- collapsible: t.collapsible,
- collapsed: t.collapsed
- } : {element: t.element.elements[i], children: o, collapsible: t.collapsible, collapsed: t.collapsed}
- }(e, 0)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.compress = a, t.decompress = u;
- var d = function () {
- function e(e, t, n) {
- void 0 === n && (n = {}),
- this.user = e, this.nodes = new Map, this.model = new r.ObjectTreeModel(e, t, n), this.enabled = void 0 === n.compressionEnabled || n.compressionEnabled
- }
- return Object.defineProperty(e.prototype, "onDidSplice", {
- get: function () {
- return this.model.onDidSplice
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidChangeCollapseState", {
- get: function () {
- return this.model.onDidChangeCollapseState
- }, enumerable: !0, configurable: !0
- }), e.prototype.setChildren = function (e, t) {
- if (null !== e) {
- var i = this.nodes.get(e);
- if (!i) throw new Error("Unknown compressed tree node");
- var o = this.model.getNode(i), r = this.model.getParentNodeLocation(i), d = this.model.getNode(r),
- c = function e(t, i, o) {
- return t.element === i ? l(l({}, t), {children: o}) : l(l({}, t), {
- children: n.Iterator.map(n.Iterator.from(t.children), (function (t) {
- return e(t, i, o)
- }))
- })
- }(u(o), e, n.Iterator.from(t)), h = (this.enabled ? a : s)(c),
- p = d.children.map((function (e) {
- return e === o ? h : e
- }));
- this._setChildren(d.element, p)
- } else {
- var g = n.Iterator.map(n.Iterator.from(t), this.enabled ? a : s)
- ;this._setChildren(null, g)
- }
- }, e.prototype.setCompressionEnabled = function (e) {
- if (e !== this.enabled) {
- this.enabled = e;
- var t = this.model.getNode(), i = n.Iterator.from(t.children), o = n.Iterator.map(i, u),
- r = n.Iterator.map(o, e ? a : s);
- this._setChildren(null, r)
- }
- }, e.prototype._setChildren = function (e, t) {
- var n = this, i = new Set;
- this.model.setChildren(e, t, (function (e) {
- for (var t = 0, o = e.element.elements; t < o.length; t++) {
- var r = o[t];
- i.add(r), n.nodes.set(r, e.element)
- }
- }), (function (e) {
- for (var t = 0, o = e.element.elements; t < o.length; t++) {
- var r = o[t];
- i.has(r) || n.nodes.delete(r)
- }
- }))
- }, e.prototype.has = function (e) {
- return this.nodes.has(e)
- }, e.prototype.getListIndex = function (e) {
- var t = this.getCompressedNode(e);
- return this.model.getListIndex(t)
- }, e.prototype.getListRenderCount = function (e) {
- var t = this.getCompressedNode(e);
- return this.model.getListRenderCount(t)
- }, e.prototype.getNode = function (e) {
- if (void 0 === e) return this.model.getNode();
- var t = this.getCompressedNode(e);
- return this.model.getNode(t)
- }, e.prototype.getNodeLocation = function (e) {
- var t = this.model.getNodeLocation(e);
- return null === t ? null : t.elements[t.elements.length - 1]
- }, e.prototype.getParentNodeLocation = function (e) {
- var t = this.getCompressedNode(e), n = this.model.getParentNodeLocation(t);
- return null === n ? null : n.elements[n.elements.length - 1]
- }, e.prototype.isCollapsible = function (e) {
- var t = this.getCompressedNode(e);
- return this.model.isCollapsible(t)
- }, e.prototype.setCollapsible = function (e, t) {
- var n = this.getCompressedNode(e);
- return this.model.setCollapsible(n, t)
- }, e.prototype.isCollapsed = function (e) {
- var t = this.getCompressedNode(e);
- return this.model.isCollapsed(t)
- }, e.prototype.setCollapsed = function (e, t, n) {
- var i = this.getCompressedNode(e);
- return this.model.setCollapsed(i, t, n)
- }, e.prototype.expandTo = function (e) {
- var t = this.getCompressedNode(e);
- this.model.expandTo(t)
- }, e.prototype.rerender = function (e) {
- var t = this.getCompressedNode(e);
- this.model.rerender(t)
- }, e.prototype.refilter = function () {
- this.model.refilter()
- }, e.prototype.getCompressedNode = function (e) {
- if (null === e) return null;
- var t = this.nodes.get(e)
- ;
- if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
- return t
- }, e
- }();
- t.CompressedObjectTreeModel = d, t.DefaultElementMapper = function (e) {
- return e[e.length - 1]
- };
- var c = function () {
- function e(e, t) {
- this.unwrapper = e, this.node = t
- }
- return Object.defineProperty(e.prototype, "element", {
- get: function () {
- return null === this.node.element ? null : this.unwrapper(this.node.element)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "children", {
- get: function () {
- var t = this;
- return this.node.children.map((function (n) {
- return new e(t.unwrapper, n)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "depth", {
- get: function () {
- return this.node.depth
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visibleChildrenCount", {
- get: function () {
- return this.node.visibleChildrenCount
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visibleChildIndex", {
- get: function () {
- return this.node.visibleChildIndex
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "collapsible", {
- get: function () {
- return this.node.collapsible
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "collapsed", {
- get: function () {
- return this.node.collapsed
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visible", {
- get: function () {
- return this.node.visible
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "filterData", {
- get: function () {
- return this.node.filterData
- }, enumerable: !0, configurable: !0
- }), e
- }();
- var h = function () {
- function e(e, n, i) {
- var r = this;
- void 0 === i && (i = {}), this.elementMapper = i.elementMapper || t.DefaultElementMapper;
- var s = function (e) {
- return r.elementMapper(e.elements)
- };
- this.nodeMapper = new o.WeakMapper((function (e) {
- return new c(s, e)
- })), this.model = new d(e, function (e, t) {
- return {
- splice: function (n, i, o) {
- t.splice(n, i, o.map((function (t) {
- return e.map(t)
- })))
- }
- }
- }(this.nodeMapper, n), function (e, t) {
- return l(l({}, t), {
- sorter: t.sorter && {
- compare: function (e, n) {
- return t.sorter.compare(e.elements[0], n.elements[0])
- }
- },
- identityProvider: t.identityProvider && {
- getId: function (n) {
- return t.identityProvider.getId(e(n))
- }
- }, filter: t.filter && {
- filter: function (n, i) {
- return t.filter.filter(e(n), i)
- }
- }
- })
- }(s, i))
- }
- return Object.defineProperty(e.prototype, "onDidSplice", {
- get: function () {
- var e = this;
- return i.Event.map(this.model.onDidSplice, (function (t) {
- var n = t.insertedNodes, i = t.deletedNodes;
- return {
- insertedNodes: n.map((function (t) {
- return e.nodeMapper.map(t)
- })), deletedNodes: i.map((function (t) {
- return e.nodeMapper.map(t)
- }))
- }
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidChangeCollapseState", {
- get: function () {
- var e = this;
- return i.Event.map(this.model.onDidChangeCollapseState, (function (t) {
- var n = t.node, i = t.deep;
- return {node: e.nodeMapper.map(n), deep: i}
- }))
- }, enumerable: !0, configurable: !0
- }), e.prototype.setChildren = function (e, t) {
- this.model.setChildren(e, t)
- }, e.prototype.setCompressionEnabled = function (e) {
- this.model.setCompressionEnabled(e)
- }, e.prototype.has = function (e) {
- return this.model.has(e)
- }, e.prototype.getListIndex = function (e) {
- return this.model.getListIndex(e)
- }, e.prototype.getListRenderCount = function (e) {
- return this.model.getListRenderCount(e)
- }, e.prototype.getNode = function (e) {
- return this.nodeMapper.map(this.model.getNode(e))
- }, e.prototype.getNodeLocation = function (e) {
- return e.element
- }, e.prototype.getParentNodeLocation = function (e) {
- return this.model.getParentNodeLocation(e)
- }, e.prototype.isCollapsible = function (e) {
- return this.model.isCollapsible(e)
- }, e.prototype.setCollapsible = function (e, t) {
- return this.model.setCollapsible(e, t)
- }, e.prototype.isCollapsed = function (e) {
- return this.model.isCollapsed(e)
- }, e.prototype.setCollapsed = function (e, t, n) {
- return this.model.setCollapsed(e, t, n)
- }, e.prototype.expandTo = function (e) {
- return this.model.expandTo(e)
- }, e.prototype.rerender = function (e) {
- return this.model.rerender(e)
- }, e.prototype.refilter = function () {
- return this.model.refilter()
- }, e.prototype.getCompressedTreeNode = function (e) {
- return void 0 === e && (e = null), this.model.getNode(e)
- }, e
- }();
- t.CompressibleObjectTreeModel = h
- }))
- ;var u, d = this && this.__awaiter || function (e, t, n, i) {
- return new (n || (n = Promise))((function (o, r) {
- function s(e) {
- try {
- l(i.next(e))
- } catch (e) {
- r(e)
- }
- }
- function a(e) {
- try {
- l(i.throw(e))
- } catch (e) {
- r(e)
- }
- }
- function l(e) {
- var t;
- e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function (e) {
- e(t)
- }))).then(s, a)
- }
- l((i = i.apply(e, t || [])).next())
- }))
- }, c = this && this.__generator || function (e, t) {
- var n, i, o, r, s = {
- label: 0, sent: function () {
- if (1 & o[0]) throw o[1];
- return o[1]
- }, trys: [], ops: []
- };
- return r = {
- next: a(0),
- throw: a(1),
- return: a(2)
- }, "function" == typeof Symbol && (r[Symbol.iterator] = function () {
- return this
- }), r;
- function a(r) {
- return function (a) {
- return function (r) {
- if (n) throw new TypeError("Generator is already executing.");
- for (; s;) try {
- if (n = 1, i && (o = 2 & r[0] ? i.return : r[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, r[1])).done) return o;
- switch (i = 0, o && (r = [2 & r[0], o.value]), r[0]) {
- case 0:
- case 1:
- o = r;
- break;
- case 4:
- return s.label++, {value: r[1], done: !1};
- case 5:
- s.label++, i = r[1], r = [0];
- continue;
- case 7:
- r = s.ops.pop(), s.trys.pop();
- continue;
- default:
- if (!(o = (o = s.trys).length > 0 && o[o.length - 1]) && (6 === r[0] || 2 === r[0])) {
- s = 0;
- continue
- }
- if (3 === r[0] && (!o || r[1] > o[0] && r[1] < o[3])) {
- s.label = r[1];
- break
- }
- if (6 === r[0] && s.label < o[1]) {
- s.label = o[1], o = r;
- break
- }
- if (o && s.label < o[2]) {
- s.label = o[2], s.ops.push(r);
- break
- }
- o[2] && s.ops.pop(), s.trys.pop();
- continue
- }
- r = t.call(e, s)
- } catch (e) {
- r = [6, e], i = 0
- } finally {
- n = o = 0
- }
- if (5 & r[0]) throw r[1];
- return {value: r[0] ? r[1] : void 0, done: !0}
- }([r, a])
- }
- }
- };
- define(n[55], i([0, 1, 2, 4]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t, n, o, r, s) {
- void 0 === n && (n = ""), void 0 === o && (o = ""), void 0 === r && (r = !0);
- var a = e.call(this) || this;
- return a._onDidChange = a._register(new i.Emitter), a.onDidChange = a._onDidChange.event, a._enabled = !0, a._checked = !1, a._id = t, a._label = n, a._cssClass = o, a._enabled = r, a._actionCallback = s, a
- }
- return r(t, e), Object.defineProperty(t.prototype, "id", {
- get: function () {
- return this._id
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "label", {
- get: function () {
- return this._label
- }, set: function (e) {
- this._setLabel(e)
- }, enumerable: !0, configurable: !0
- }), t.prototype._setLabel = function (e) {
- this._label !== e && (this._label = e, this._onDidChange.fire({label: e}))
- }, Object.defineProperty(t.prototype, "tooltip", {
- get: function () {
- return this._tooltip || ""
- }, set: function (e) {
- this._setTooltip(e)
- }, enumerable: !0, configurable: !0
- }), t.prototype._setTooltip = function (e) {
- this._tooltip !== e && (this._tooltip = e, this._onDidChange.fire({tooltip: e}))
- }, Object.defineProperty(t.prototype, "class", {
- get: function () {
- return this._cssClass
- }, set: function (e) {
- this._setClass(e)
- }, enumerable: !0, configurable: !0
- }), t.prototype._setClass = function (e) {
- this._cssClass !== e && (this._cssClass = e, this._onDidChange.fire({class: e}))
- }, Object.defineProperty(t.prototype, "enabled", {
- get: function () {
- return this._enabled
- }, set: function (e) {
- this._setEnabled(e)
- }, enumerable: !0, configurable: !0
- }), t.prototype._setEnabled = function (e) {
- this._enabled !== e && (this._enabled = e, this._onDidChange.fire({enabled: e}))
- }, Object.defineProperty(t.prototype, "checked", {
- get: function () {
- return this._checked
- },
- set: function (e) {
- this._setChecked(e)
- }, enumerable: !0, configurable: !0
- }), t.prototype._setChecked = function (e) {
- this._checked !== e && (this._checked = e, this._onDidChange.fire({checked: e}))
- }, t.prototype.run = function (e, t) {
- return this._actionCallback ? this._actionCallback(e) : Promise.resolve(!0)
- }, t
- }(n.Disposable);
- t.Action = o;
- var s = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t._onDidBeforeRun = t._register(new i.Emitter), t.onDidBeforeRun = t._onDidBeforeRun.event, t._onDidRun = t._register(new i.Emitter), t.onDidRun = t._onDidRun.event, t
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- if (!e.enabled) return [2, Promise.resolve(null)];
- this._onDidBeforeRun.fire({action: e}), o.label = 1;
- case 1:
- return o.trys.push([1, 3, , 4]), [4, this.runAction(e, t)];
- case 2:
- return n = o.sent(), this._onDidRun.fire({action: e, result: n}), [3, 4];
- case 3:
- return i = o.sent(), this._onDidRun.fire({action: e, error: i}), [3, 4];
- case 4:
- return [2]
- }
- }))
- }))
- },
- t.prototype.runAction = function (e, t) {
- var n = t ? e.run(t) : e.run();
- return Promise.resolve(n)
- }, t
- }(n.Disposable);
- t.ActionRunner = s
- })), define(n[26], i([0, 1, 4]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i, o = Object.freeze((function (e, t) {
- var n = setTimeout(e.bind(t), 0);
- return {
- dispose: function () {
- clearTimeout(n)
- }
- }
- }));
- !function (e) {
- e.isCancellationToken = function (t) {
- return t === e.None || t === e.Cancelled || (t instanceof r || !(!t || "object" != typeof t) && ("boolean" == typeof t.isCancellationRequested && "function" == typeof t.onCancellationRequested))
- }, e.None = Object.freeze({
- isCancellationRequested: !1,
- onCancellationRequested: n.Event.None
- }), e.Cancelled = Object.freeze({isCancellationRequested: !0, onCancellationRequested: o})
- }(i = t.CancellationToken || (t.CancellationToken = {}));
- var r = function () {
- function e() {
- this._isCancelled = !1, this._emitter = null
- }
- return e.prototype.cancel = function () {
- this._isCancelled || (this._isCancelled = !0, this._emitter && (this._emitter.fire(void 0), this.dispose()))
- },
- Object.defineProperty(e.prototype, "isCancellationRequested", {
- get: function () {
- return this._isCancelled
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onCancellationRequested", {
- get: function () {
- return this._isCancelled ? o : (this._emitter || (this._emitter = new n.Emitter), this._emitter.event)
- }, enumerable: !0, configurable: !0
- }), e.prototype.dispose = function () {
- this._emitter && (this._emitter.dispose(), this._emitter = null)
- }, e
- }(), s = function () {
- function e(e) {
- this._token = void 0, this._parentListener = void 0, this._parentListener = e && e.onCancellationRequested(this.cancel, this)
- }
- return Object.defineProperty(e.prototype, "token", {
- get: function () {
- return this._token || (this._token = new r), this._token
- }, enumerable: !0, configurable: !0
- }), e.prototype.cancel = function () {
- this._token ? this._token instanceof r && this._token.cancel() : this._token = i.Cancelled
- }, e.prototype.dispose = function (e) {
- void 0 === e && (e = !1), e && this.cancel(), this._parentListener && this._parentListener.dispose(),
- this._token ? this._token instanceof r && this._token.dispose() : this._token = i.None
- }, e
- }();
- t.CancellationTokenSource = s
- })), define(n[15], i([0, 1, 26, 10, 2]), (function (e, t, n, i, o) {
- "use strict";
- function r(e) {
- var t = new n.CancellationTokenSource, o = e(t.token), r = new Promise((function (e, n) {
- t.token.onCancellationRequested((function () {
- n(i.canceled())
- })), Promise.resolve(o).then((function (n) {
- t.dispose(), e(n)
- }), (function (e) {
- t.dispose(), n(e)
- }))
- }));
- return new (function () {
- function e() {
- }
- return e.prototype.cancel = function () {
- t.cancel()
- }, e.prototype.then = function (e, t) {
- return r.then(e, t)
- }, e.prototype.catch = function (e) {
- return this.then(void 0, e)
- }, e.prototype.finally = function (e) {
- return r.finally(e)
- }, e
- }())
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.isThenable = function (e) {
- return e && "function" == typeof e.then
- }, t.createCancelablePromise = r, t.raceCancellation = function (e, t, n) {
- return Promise.race([e, new Promise((function (e) {
- return t.onCancellationRequested((function () {
- return e(n)
- }))
- }))])
- };
- var s = function () {
- function e(e) {
- this.defaultDelay = e,
- this.timeout = null, this.completionPromise = null, this.doResolve = null, this.doReject = null, this.task = null
- }
- return e.prototype.trigger = function (e, t) {
- var n = this;
- return void 0 === t && (t = this.defaultDelay), this.task = e, this.cancelTimeout(), this.completionPromise || (this.completionPromise = new Promise((function (e, t) {
- n.doResolve = e, n.doReject = t
- })).then((function () {
- if (n.completionPromise = null, n.doResolve = null, n.task) {
- var e = n.task;
- return n.task = null, e()
- }
- }))), this.timeout = setTimeout((function () {
- n.timeout = null, n.doResolve && n.doResolve(null)
- }), t), this.completionPromise
- }, e.prototype.isTriggered = function () {
- return null !== this.timeout
- }, e.prototype.cancel = function () {
- this.cancelTimeout(), this.completionPromise && (this.doReject && this.doReject(i.canceled()), this.completionPromise = null)
- }, e.prototype.cancelTimeout = function () {
- null !== this.timeout && (clearTimeout(this.timeout), this.timeout = null)
- }, e.prototype.dispose = function () {
- this.cancelTimeout()
- }, e
- }();
- t.Delayer = s, t.timeout = function e(t, n) {
- return n ? new Promise((function (e, o) {
- var r = setTimeout(e, t)
- ;n.onCancellationRequested((function () {
- clearTimeout(r), o(i.canceled())
- }))
- })) : r((function (n) {
- return e(t, n)
- }))
- }, t.disposableTimeout = function (e, t) {
- void 0 === t && (t = 0);
- var n = setTimeout(e, t);
- return o.toDisposable((function () {
- return clearTimeout(n)
- }))
- }, t.first = function (e, t, n) {
- void 0 === t && (t = function (e) {
- return !!e
- }), void 0 === n && (n = null);
- var i = 0, o = e.length, r = function () {
- if (i >= o) return Promise.resolve(n);
- var s = e[i++];
- return Promise.resolve(s()).then((function (e) {
- return t(e) ? Promise.resolve(e) : r()
- }))
- };
- return r()
- };
- var a = function () {
- function e(e, t) {
- this._token = -1, "function" == typeof e && "number" == typeof t && this.setIfNotSet(e, t)
- }
- return e.prototype.dispose = function () {
- this.cancel()
- }, e.prototype.cancel = function () {
- -1 !== this._token && (clearTimeout(this._token), this._token = -1)
- }, e.prototype.cancelAndSet = function (e, t) {
- var n = this;
- this.cancel(), this._token = setTimeout((function () {
- n._token = -1, e()
- }), t)
- }, e.prototype.setIfNotSet = function (e, t) {
- var n = this;
- -1 === this._token && (this._token = setTimeout((function () {
- n._token = -1, e()
- }), t))
- }, e
- }()
- ;t.TimeoutTimer = a;
- var l = function () {
- function e() {
- this._token = -1
- }
- return e.prototype.dispose = function () {
- this.cancel()
- }, e.prototype.cancel = function () {
- -1 !== this._token && (clearInterval(this._token), this._token = -1)
- }, e.prototype.cancelAndSet = function (e, t) {
- this.cancel(), this._token = setInterval((function () {
- e()
- }), t)
- }, e
- }();
- t.IntervalTimer = l;
- var u = function () {
- function e(e, t) {
- this.timeoutToken = -1, this.runner = e, this.timeout = t, this.timeoutHandler = this.onTimeout.bind(this)
- }
- return e.prototype.dispose = function () {
- this.cancel(), this.runner = null
- }, e.prototype.cancel = function () {
- this.isScheduled() && (clearTimeout(this.timeoutToken), this.timeoutToken = -1)
- }, e.prototype.schedule = function (e) {
- void 0 === e && (e = this.timeout), this.cancel(), this.timeoutToken = setTimeout(this.timeoutHandler, e)
- }, e.prototype.isScheduled = function () {
- return -1 !== this.timeoutToken
- }, e.prototype.onTimeout = function () {
- this.timeoutToken = -1, this.runner && this.doRun()
- }, e.prototype.doRun = function () {
- this.runner && this.runner()
- }, e
- }();
- t.RunOnceScheduler = u, function () {
- if ("function" != typeof requestIdleCallback || "function" != typeof cancelIdleCallback) {
- var e = Object.freeze({
- didTimeout: !0, timeRemaining: function () {
- return 15
- }
- });
- t.runWhenIdle = function (t) {
- var n = setTimeout((function () {
- return t(e)
- })), i = !1;
- return {
- dispose: function () {
- i || (i = !0, clearTimeout(n))
- }
- }
- }
- } else t.runWhenIdle = function (e, t) {
- var n = requestIdleCallback(e, "number" == typeof t ? {timeout: t} : void 0), i = !1;
- return {
- dispose: function () {
- i || (i = !0, cancelIdleCallback(n))
- }
- }
- }
- }();
- var d = function () {
- function e(e) {
- var n = this;
- this._didRun = !1, this._executor = function () {
- try {
- n._value = e()
- } catch (e) {
- n._error = e
- } finally {
- n._didRun = !0
- }
- }, this._handle = t.runWhenIdle((function () {
- return n._executor()
- }))
- }
- return e.prototype.dispose = function () {
- this._handle.dispose()
- }, e.prototype.getValue = function () {
- if (this._didRun || (this._handle.dispose(), this._executor()), this._error) throw this._error;
- return this._value
- }, e
- }();
- t.IdleValue = d
- })), define(n[244], i([0, 1, 15, 2]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t, i, o) {
- var r = e.call(this) || this;
- return r._visibility = t, r._visibleClassName = i, r._invisibleClassName = o, r._domNode = null, r._isVisible = !1, r._isNeeded = !1, r._shouldBeVisible = !1, r._revealTimer = r._register(new n.TimeoutTimer), r
- }
- return r(t, e), t.prototype.applyVisibilitySetting = function (e) {
- return 2 !== this._visibility && (3 === this._visibility || e)
- }, t.prototype.setShouldBeVisible = function (e) {
- var t = this.applyVisibilitySetting(e);
- this._shouldBeVisible !== t && (this._shouldBeVisible = t, this.ensureVisibility())
- }, t.prototype.setIsNeeded = function (e) {
- this._isNeeded !== e && (this._isNeeded = e, this.ensureVisibility())
- }, t.prototype.setDomNode = function (e) {
- this._domNode = e, this._domNode.setClassName(this._invisibleClassName), this.setShouldBeVisible(!1)
- }, t.prototype.ensureVisibility = function () {
- this._isNeeded ? this._shouldBeVisible ? this._reveal() : this._hide(!0) : this._hide(!1)
- }, t.prototype._reveal = function () {
- var e = this;
- this._isVisible || (this._isVisible = !0, this._revealTimer.setIfNotSet((function () {
- e._domNode && e._domNode.setClassName(e._visibleClassName)
- }), 0))
- }, t.prototype._hide = function (e) {
- this._revealTimer.cancel(), this._isVisible && (this._isVisible = !1, this._domNode && this._domNode.setClassName(this._invisibleClassName + (e ? " fade" : "")))
- }, t
- }(i.Disposable);
- t.ScrollbarVisibilityController = o
- })), define(n[38], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.values = function (e) {
- var t = [];
- return e.forEach((function (e) {
- return t.push(e)
- })), t
- }, t.keys = function (e) {
- var t = [];
- return e.forEach((function (e, n) {
- return t.push(n)
- })), t
- };
- var n = function () {
- function e() {
- this._value = "", this._pos = 0
- }
- return e.prototype.reset = function (e) {
- return this._value = e, this._pos = 0, this
- }, e.prototype.next = function () {
- return this._pos += 1, this
- }, e.prototype.hasNext = function () {
- return this._pos < this._value.length - 1
- }, e.prototype.cmp = function (e) {
- return e.charCodeAt(0) - this._value.charCodeAt(this._pos)
- }, e.prototype.value = function () {
- return this._value[this._pos]
- }, e
- }();
- t.StringIterator = n;
- var i = function () {
- function e(e) {
- void 0 === e && (e = !0), this._splitOnBackslash = e
- }
- return e.prototype.reset = function (e) {
- return this._value = e.replace(/\\$|\/$/, ""), this._from = 0, this._to = 0, this.next()
- }, e.prototype.hasNext = function () {
- return this._to < this._value.length
- }, e.prototype.next = function () {
- this._from = this._to;
- for (var e = !0; this._to < this._value.length; this._to++) {
- var t = this._value.charCodeAt(this._to);
- if (47 === t || this._splitOnBackslash && 92 === t) {
- if (!e) break;
- this._from++
- } else e = !1
- }
- return this
- }, e.prototype.cmp = function (e) {
- for (var t = 0, n = e.length, i = this._from; t < n && i < this._to;) {
- var o = e.charCodeAt(t) - this._value.charCodeAt(i);
- if (0 !== o) return o;
- t += 1, i += 1
- }
- return n === this._to - this._from ? 0 : t < n ? -1 : 1
- }, e.prototype.value = function () {
- return this._value.substring(this._from, this._to)
- }, e
- }();
- t.PathIterator = i;
- var o = function () {
- }, s = function () {
- function e(e) {
- this._iter = e
- }
- return e.forPaths = function () {
- return new e(new i)
- }, e.forStrings = function () {
- return new e(new n)
- }, e.prototype.clear = function () {
- this._root = void 0
- }, e.prototype.set = function (e, t) {
- var n, i = this._iter.reset(e)
- ;
- for (this._root || (this._root = new o, this._root.segment = i.value()), n = this._root; ;) {
- var r = i.cmp(n.segment);
- if (r > 0) n.left || (n.left = new o, n.left.segment = i.value()), n = n.left; else if (r < 0) n.right || (n.right = new o, n.right.segment = i.value()), n = n.right; else {
- if (!i.hasNext()) break;
- i.next(), n.mid || (n.mid = new o, n.mid.segment = i.value()), n = n.mid
- }
- }
- var s = n.value;
- return n.value = t, n.key = e, s
- }, e.prototype.get = function (e) {
- for (var t = this._iter.reset(e), n = this._root; n;) {
- var i = t.cmp(n.segment);
- if (i > 0) n = n.left; else if (i < 0) n = n.right; else {
- if (!t.hasNext()) break;
- t.next(), n = n.mid
- }
- }
- return n ? n.value : void 0
- }, e.prototype.findSubstr = function (e) {
- for (var t = this._iter.reset(e), n = this._root, i = void 0; n;) {
- var o = t.cmp(n.segment);
- if (o > 0) n = n.left; else if (o < 0) n = n.right; else {
- if (!t.hasNext()) break;
- t.next(), i = n.value || i, n = n.mid
- }
- }
- return n && n.value || i
- }, e.prototype.forEach = function (e) {
- this._forEach(this._root, e)
- }, e.prototype._forEach = function (e, t) {
- e && (this._forEach(e.left, t), e.value && t(e.value, e.key), this._forEach(e.mid, t), this._forEach(e.right, t))
- }, e
- }()
- ;t.TernarySearchTree = s;
- var a = function () {
- function e() {
- this.map = new Map, this.ignoreCase = !1
- }
- return e.prototype.set = function (e, t) {
- this.map.set(this.toKey(e), t)
- }, e.prototype.get = function (e) {
- return this.map.get(this.toKey(e))
- }, e.prototype.toKey = function (e) {
- var t = e.toString();
- return this.ignoreCase && (t = t.toLowerCase()), t
- }, e
- }();
- t.ResourceMap = a;
- var l = function () {
- function e() {
- this._map = new Map, this._head = void 0, this._tail = void 0, this._size = 0
- }
- return e.prototype.clear = function () {
- this._map.clear(), this._head = void 0, this._tail = void 0, this._size = 0
- }, Object.defineProperty(e.prototype, "size", {
- get: function () {
- return this._size
- }, enumerable: !0, configurable: !0
- }), e.prototype.get = function (e, t) {
- void 0 === t && (t = 0);
- var n = this._map.get(e);
- if (n) return 0 !== t && this.touch(n, t), n.value
- }, e.prototype.set = function (e, t, n) {
- void 0 === n && (n = 0);
- var i = this._map.get(e);
- if (i) i.value = t, 0 !== n && this.touch(i, n); else {
- switch (i = {key: e, value: t, next: void 0, previous: void 0}, n) {
- case 0:
- this.addItemLast(i);
- break;
- case 1:
- this.addItemFirst(i);
- break;
- case 2:
- default:
- this.addItemLast(i)
- }
- this._map.set(e, i), this._size++
- }
- }, e.prototype.delete = function (e) {
- return !!this.remove(e)
- }, e.prototype.remove = function (e) {
- var t = this._map.get(e);
- if (t) return this._map.delete(e), this.removeItem(t), this._size--, t.value
- }, e.prototype.forEach = function (e, t) {
- for (var n = this._head; n;) t ? e.bind(t)(n.value, n.key, this) : e(n.value, n.key, this), n = n.next
- }, e.prototype.trimOld = function (e) {
- if (!(e >= this.size)) if (0 !== e) {
- for (var t = this._head, n = this.size; t && n > e;) this._map.delete(t.key), t = t.next, n--;
- this._head = t, this._size = n, t && (t.previous = void 0)
- } else this.clear()
- }, e.prototype.addItemFirst = function (e) {
- if (this._head || this._tail) {
- if (!this._head) throw new Error("Invalid list");
- e.next = this._head, this._head.previous = e
- } else this._tail = e;
- this._head = e
- }, e.prototype.addItemLast = function (e) {
- if (this._head || this._tail) {
- if (!this._tail) throw new Error("Invalid list");
- e.previous = this._tail, this._tail.next = e
- } else this._head = e;
- this._tail = e
- }, e.prototype.removeItem = function (e) {
- if (e === this._head && e === this._tail) this._head = void 0,
- this._tail = void 0; else if (e === this._head) {
- if (!e.next) throw new Error("Invalid list");
- e.next.previous = void 0, this._head = e.next
- } else if (e === this._tail) {
- if (!e.previous) throw new Error("Invalid list");
- e.previous.next = void 0, this._tail = e.previous
- } else {
- var t = e.next, n = e.previous;
- if (!t || !n) throw new Error("Invalid list");
- t.previous = n, n.next = t
- }
- e.next = void 0, e.previous = void 0
- }, e.prototype.touch = function (e, t) {
- if (!this._head || !this._tail) throw new Error("Invalid list");
- if (1 === t || 2 === t) if (1 === t) {
- if (e === this._head) return;
- var n = e.next, i = e.previous;
- e === this._tail ? (i.next = void 0, this._tail = i) : (n.previous = i, i.next = n), e.previous = void 0, e.next = this._head, this._head.previous = e, this._head = e
- } else if (2 === t) {
- if (e === this._tail) return;
- n = e.next, i = e.previous;
- e === this._head ? (n.previous = void 0, this._head = n) : (n.previous = i, i.next = n), e.next = void 0, e.previous = this._tail, this._tail.next = e, this._tail = e
- }
- }, e.prototype.toJSON = function () {
- var e = [];
- return this.forEach((function (t, n) {
- e.push([n, t])
- })), e
- }, e
- }();
- t.LinkedMap = l;
- var u = function (e) {
- function t(t, n) {
- void 0 === n && (n = 1);
- var i = e.call(this) || this;
- return i._limit = t, i._ratio = Math.min(Math.max(0, n), 1), i
- }
- return r(t, e), t.prototype.get = function (t) {
- return e.prototype.get.call(this, t, 2)
- }, t.prototype.peek = function (t) {
- return e.prototype.get.call(this, t, 0)
- }, t.prototype.set = function (t, n) {
- e.prototype.set.call(this, t, n, 2), this.checkTrim()
- }, t.prototype.checkTrim = function () {
- this.size > this._limit && this.trimOld(Math.round(this._limit * this._ratio))
- }, t
- }(l);
- t.LRUCache = u
- })), function (e) {
- "use strict";
- var t = {
- newline: /^\n+/,
- code: /^( {4}[^\n]+\n*)+/,
- fences: m,
- hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,
- heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,
- nptable: m,
- blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
- list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
- html: "^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",
- def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
- table: m,
- lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
- paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,
- text: /^[^\n]+/
- };
- function n(e) {
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || b.defaults, this.rules = t.normal, this.options.pedantic ? this.rules = t.pedantic : this.options.gfm && (this.options.tables ? this.rules = t.tables : this.rules = t.gfm)
- }
- t._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,
- t._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/, t.def = h(t.def).replace("label", t._label).replace("title", t._title).getRegex(), t.bullet = /(?:[*+-]|\d{1,9}\.)/, t.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/, t.item = h(t.item, "gm").replace(/bull/g, t.bullet).getRegex(), t.list = h(t.list).replace(/bull/g, t.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + t.def.source + ")").getRegex(), t._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", t._comment = /<!--(?!-?>)[\s\S]*?-->/,
- t.html = h(t.html, "i").replace("comment", t._comment).replace("tag", t._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), t.paragraph = h(t.paragraph).replace("hr", t.hr).replace("heading", t.heading).replace("lheading", t.lheading).replace("tag", t._tag).getRegex(), t.blockquote = h(t.blockquote).replace("paragraph", t.paragraph).getRegex(), t.normal = v({}, t), t.gfm = v({}, t.normal, {
- fences: /^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,
- paragraph: /^/,
- heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/
- }), t.gfm.paragraph = h(t.paragraph).replace("(?!", "(?!" + t.gfm.fences.source.replace("\\1", "\\2") + "|" + t.list.source.replace("\\1", "\\3") + "|").getRegex(), t.tables = v({}, t.gfm, {
- nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
- table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
- }), t.pedantic = v({}, t.normal, {
- html: h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", t._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
- def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/
- }), n.rules = t, n.lex = function (e, t) {
- return new n(t).lex(e)
- }, n.prototype.lex = function (e) {
- return e = e.replace(/\r\n|\r/g, "\n").replace(/\t/g, " ").replace(/\u00a0/g, " ").replace(/\u2424/g, "\n"), this.token(e, !0)
- }, n.prototype.token = function (e, n) {
- var i, o, r, s, a, l, u, d, c, h, p, g, f, m, v, C;
- for (e = e.replace(/^ +$/gm, ""); e;) if ((r = this.rules.newline.exec(e)) && (e = e.substring(r[0].length), r[0].length > 1 && this.tokens.push({type: "space"})), r = this.rules.code.exec(e)) e = e.substring(r[0].length), r = r[0].replace(/^ {4}/gm, ""), this.tokens.push({
- type: "code", text: this.options.pedantic ? r : y(r, "\n")
- }); else if (r = this.rules.fences.exec(e)) e = e.substring(r[0].length), this.tokens.push({
- type: "code",
- lang: r[2] ? r[2].trim() : r[2],
- text: r[3] || ""
- }); else if (r = this.rules.heading.exec(e)) e = e.substring(r[0].length), this.tokens.push({
- type: "heading",
- depth: r[1].length,
- text: r[2]
- }); else if ((r = this.rules.nptable.exec(e)) && (l = {
- type: "table",
- header: _(r[1].replace(/^ *| *\| *$/g, "")),
- align: r[2].replace(/^ *|\| *$/g, "").split(/ *\| */),
- cells: r[3] ? r[3].replace(/\n$/, "").split("\n") : []
- }).header.length === l.align.length) {
- for (e = e.substring(r[0].length), p = 0; p < l.align.length; p++) /^ *-+: *$/.test(l.align[p]) ? l.align[p] = "right" : /^ *:-+: *$/.test(l.align[p]) ? l.align[p] = "center" : /^ *:-+ *$/.test(l.align[p]) ? l.align[p] = "left" : l.align[p] = null;
- for (p = 0; p < l.cells.length; p++) l.cells[p] = _(l.cells[p], l.header.length);
- this.tokens.push(l)
- } else if (r = this.rules.hr.exec(e)) e = e.substring(r[0].length), this.tokens.push({type: "hr"}); else if (r = this.rules.blockquote.exec(e)) e = e.substring(r[0].length), this.tokens.push({type: "blockquote_start"}),
- r = r[0].replace(/^ *> ?/gm, ""), this.token(r, n), this.tokens.push({type: "blockquote_end"}); else if (r = this.rules.list.exec(e)) {
- for (e = e.substring(r[0].length), u = {
- type: "list_start",
- ordered: m = (s = r[2]).length > 1,
- start: m ? +s : "",
- loose: !1
- }, this.tokens.push(u), d = [], i = !1, f = (r = r[0].match(this.rules.item)).length, p = 0; p < f; p++) h = (l = r[p]).length, ~(l = l.replace(/^ *([*+-]|\d+\.) */, "")).indexOf("\n ") && (h -= l.length, l = this.options.pedantic ? l.replace(/^ {1,4}/gm, "") : l.replace(new RegExp("^ {1," + h + "}", "gm"), "")), p !== f - 1 && (a = t.bullet.exec(r[p + 1])[0], (s.length > 1 ? 1 === a.length : a.length > 1 || this.options.smartLists && a !== s) && (e = r.slice(p + 1).join("\n") + e, p = f - 1)), o = i || /\n\n(?!\s*$)/.test(l), p !== f - 1 && (i = "\n" === l.charAt(l.length - 1), o || (o = i)), o && (u.loose = !0), C = void 0, (v = /^\[[ xX]\] /.test(l)) && (C = " " !== l[1], l = l.replace(/^\[[ xX]\] +/, "")), c = {
- type: "list_item_start",
- task: v,
- checked: C,
- loose: o
- }, d.push(c), this.tokens.push(c), this.token(l, !1), this.tokens.push({type: "list_item_end"});
- if (u.loose) for (f = d.length, p = 0; p < f; p++) d[p].loose = !0;
- this.tokens.push({
- type: "list_end"
- })
- } else if (r = this.rules.html.exec(e)) e = e.substring(r[0].length), this.tokens.push({
- type: this.options.sanitize ? "paragraph" : "html",
- pre: !this.options.sanitizer && ("pre" === r[1] || "script" === r[1] || "style" === r[1]),
- text: r[0]
- }); else if (n && (r = this.rules.def.exec(e))) e = e.substring(r[0].length), r[3] && (r[3] = r[3].substring(1, r[3].length - 1)), g = r[1].toLowerCase().replace(/\s+/g, " "), this.tokens.links[g] || (this.tokens.links[g] = {
- href: r[2],
- title: r[3]
- }); else if ((r = this.rules.table.exec(e)) && (l = {
- type: "table",
- header: _(r[1].replace(/^ *| *\| *$/g, "")),
- align: r[2].replace(/^ *|\| *$/g, "").split(/ *\| */),
- cells: r[3] ? r[3].replace(/\n$/, "").split("\n") : []
- }).header.length === l.align.length) {
- for (e = e.substring(r[0].length), p = 0; p < l.align.length; p++) /^ *-+: *$/.test(l.align[p]) ? l.align[p] = "right" : /^ *:-+: *$/.test(l.align[p]) ? l.align[p] = "center" : /^ *:-+ *$/.test(l.align[p]) ? l.align[p] = "left" : l.align[p] = null;
- for (p = 0; p < l.cells.length; p++) l.cells[p] = _(l.cells[p].replace(/^ *\| *| *\| *$/g, ""), l.header.length);
- this.tokens.push(l)
- } else if (r = this.rules.lheading.exec(e)) e = e.substring(r[0].length), this.tokens.push({
- type: "heading",
- depth: "=" === r[2] ? 1 : 2,
- text: r[1]
- }); else if (n && (r = this.rules.paragraph.exec(e))) e = e.substring(r[0].length), this.tokens.push({
- type: "paragraph",
- text: "\n" === r[1].charAt(r[1].length - 1) ? r[1].slice(0, -1) : r[1]
- }); else if (r = this.rules.text.exec(e)) e = e.substring(r[0].length), this.tokens.push({
- type: "text",
- text: r[0]
- }); else if (e) throw new Error("Infinite loop on byte: " + e.charCodeAt(0));
- return this.tokens
- };
- var i = {
- escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
- autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
- url: m,
- tag: "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",
- link: /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,
- reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,
- nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,
- strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,
- em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
- code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
- br: /^( {2,}|\\)\n(?!\s*$)/,
- del: m,
- text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/
- };
- function o(e, t) {
- if (this.options = t || b.defaults, this.links = e, this.rules = i.normal, this.renderer = this.options.renderer || new r, this.renderer.options = this.options, !this.links) throw new Error("Tokens array requires a `links` property.");
- this.options.pedantic ? this.rules = i.pedantic : this.options.gfm && (this.options.breaks ? this.rules = i.breaks : this.rules = i.gfm)
- }
- function r(e) {
- this.options = e || b.defaults
- }
- function s() {
- }
- function a(e) {
- this.tokens = [], this.token = null, this.options = e || b.defaults, this.options.renderer = this.options.renderer || new r,
- this.renderer = this.options.renderer, this.renderer.options = this.options, this.slugger = new l
- }
- function l() {
- this.seen = {}
- }
- function d(e, t) {
- if (t) {
- if (d.escapeTest.test(e)) return e.replace(d.escapeReplace, (function (e) {
- return d.replacements[e]
- }))
- } else if (d.escapeTestNoEncode.test(e)) return e.replace(d.escapeReplaceNoEncode, (function (e) {
- return d.replacements[e]
- }));
- return e
- }
- function c(e) {
- return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi, (function (e, t) {
- return "colon" === (t = t.toLowerCase()) ? ":" : "#" === t.charAt(0) ? "x" === t.charAt(1) ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""
- }))
- }
- function h(e, t) {
- return e = e.source || e, t = t || "", {
- replace: function (t, n) {
- return n = (n = n.source || n).replace(/(^|[^\[])\^/g, "$1"), e = e.replace(t, n), this
- }, getRegex: function () {
- return new RegExp(e, t)
- }
- }
- }
- function p(e, t, n) {
- if (e) {
- try {
- var i = decodeURIComponent(c(n)).replace(/[^\w:]/g, "").toLowerCase()
- } catch (e) {
- return null
- }
- if (0 === i.indexOf("javascript:") || 0 === i.indexOf("vbscript:") || 0 === i.indexOf("data:")) return null
- }
- t && !f.test(n) && (n = function (e, t) {
- g[" " + e] || (/^[^:]+:\/*[^/]*$/.test(e) ? g[" " + e] = e + "/" : g[" " + e] = y(e, "/", !0));
- return e = g[" " + e], "//" === t.slice(0, 2) ? e.replace(/:[\s\S]*/, ":") + t : "/" === t.charAt(0) ? e.replace(/(:\/*[^/]*)[\s\S]*/, "$1") + t : e + t
- }(t, n));
- try {
- n = encodeURI(n).replace(/%25/g, "%")
- } catch (e) {
- return null
- }
- return n
- }
- i._punctuation = "!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~", i.em = h(i.em).replace(/punctuation/g, i._punctuation).getRegex(), i._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g, i._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/, i._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/, i.autolink = h(i.autolink).replace("scheme", i._scheme).replace("email", i._email).getRegex(), i._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/, i.tag = h(i.tag).replace("comment", t._comment).replace("attribute", i._attribute).getRegex(), i._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,
- i._href = /\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/, i._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/, i.link = h(i.link).replace("label", i._label).replace("href", i._href).replace("title", i._title).getRegex(), i.reflink = h(i.reflink).replace("label", i._label).getRegex(), i.normal = v({}, i), i.pedantic = v({}, i.normal, {
- strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
- em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,
- link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", i._label).getRegex(),
- reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", i._label).getRegex()
- }), i.gfm = v({}, i.normal, {
- escape: h(i.escape).replace("])", "~|])").getRegex(),
- _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,
- url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,
- _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,
- del: /^~+(?=\S)([\s\S]*?\S)~+/,
- text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/
- }), i.gfm.url = h(i.gfm.url, "i").replace("email", i.gfm._extended_email).getRegex(), i.breaks = v({}, i.gfm, {
- br: h(i.br).replace("{2,}", "*").getRegex(),
- text: h(i.gfm.text).replace(/\{2,\}/g, "*").getRegex()
- }), o.rules = i, o.output = function (e, t, n) {
- return new o(t, n).output(e)
- }, o.prototype.output = function (e) {
- for (var t, n, i, r, s, a, l = ""; e;) if (s = this.rules.escape.exec(e)) e = e.substring(s[0].length), l += d(s[1]); else if (s = this.rules.tag.exec(e)) !this.inLink && /^<a /i.test(s[0]) ? this.inLink = !0 : this.inLink && /^<\/a>/i.test(s[0]) && (this.inLink = !1), !this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(s[0]) ? this.inRawBlock = !0 : this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0]) && (this.inRawBlock = !1), e = e.substring(s[0].length),
- l += this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(s[0]) : d(s[0]) : s[0]; else if (s = this.rules.link.exec(e)) {
- var u = C(s[2], "()");
- if (u > -1) {
- var c = s[0].length - (s[2].length - u) - (s[3] || "").length;
- s[2] = s[2].substring(0, u), s[0] = s[0].substring(0, c).trim(), s[3] = ""
- }
- e = e.substring(s[0].length), this.inLink = !0, i = s[2], this.options.pedantic ? (t = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i)) ? (i = t[1], r = t[3]) : r = "" : r = s[3] ? s[3].slice(1, -1) : "", i = i.trim().replace(/^<([\s\S]*)>$/, "$1"), l += this.outputLink(s, {
- href: o.escapes(i),
- title: o.escapes(r)
- }), this.inLink = !1
- } else if ((s = this.rules.reflink.exec(e)) || (s = this.rules.nolink.exec(e))) {
- if (e = e.substring(s[0].length), t = (s[2] || s[1]).replace(/\s+/g, " "), !(t = this.links[t.toLowerCase()]) || !t.href) {
- l += s[0].charAt(0), e = s[0].substring(1) + e;
- continue
- }
- this.inLink = !0, l += this.outputLink(s, t), this.inLink = !1
- } else if (s = this.rules.strong.exec(e)) e = e.substring(s[0].length), l += this.renderer.strong(this.output(s[4] || s[3] || s[2] || s[1])); else if (s = this.rules.em.exec(e)) e = e.substring(s[0].length),
- l += this.renderer.em(this.output(s[6] || s[5] || s[4] || s[3] || s[2] || s[1])); else if (s = this.rules.code.exec(e)) e = e.substring(s[0].length), l += this.renderer.codespan(d(s[2].trim(), !0)); else if (s = this.rules.br.exec(e)) e = e.substring(s[0].length), l += this.renderer.br(); else if (s = this.rules.del.exec(e)) e = e.substring(s[0].length), l += this.renderer.del(this.output(s[1])); else if (s = this.rules.autolink.exec(e)) e = e.substring(s[0].length), i = "@" === s[2] ? "mailto:" + (n = d(this.mangle(s[1]))) : n = d(s[1]), l += this.renderer.link(i, null, n); else if (this.inLink || !(s = this.rules.url.exec(e))) {
- if (s = this.rules.text.exec(e)) e = e.substring(s[0].length), this.inRawBlock ? l += this.renderer.text(s[0]) : l += this.renderer.text(d(this.smartypants(s[0]))); else if (e) throw new Error("Infinite loop on byte: " + e.charCodeAt(0))
- } else {
- if ("@" === s[2]) i = "mailto:" + (n = d(s[0])); else {
- do {
- a = s[0], s[0] = this.rules._backpedal.exec(s[0])[0]
- } while (a !== s[0]);
- n = d(s[0]), i = "www." === s[1] ? "http://" + n : n
- }
- e = e.substring(s[0].length), l += this.renderer.link(i, null, n)
- }
- return l
- },
- o.escapes = function (e) {
- return e ? e.replace(o.rules._escapes, "$1") : e
- }, o.prototype.outputLink = function (e, t) {
- var n = t.href, i = t.title ? d(t.title) : null;
- return "!" !== e[0].charAt(0) ? this.renderer.link(n, i, this.output(e[1])) : this.renderer.image(n, i, d(e[1]))
- }, o.prototype.smartypants = function (e) {
- return this.options.smartypants ? e.replace(/---/g, "—").replace(/--/g, "–").replace(/(^|[-\u2014/(\[{"\s])'/g, "$1‘").replace(/'/g, "’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1“").replace(/"/g, "”").replace(/\.{3}/g, "…") : e
- }, o.prototype.mangle = function (e) {
- if (!this.options.mangle) return e;
- for (var t, n = "", i = e.length, o = 0; o < i; o++) t = e.charCodeAt(o), Math.random() > .5 && (t = "x" + t.toString(16)), n += "&#" + t + ";";
- return n
- }, r.prototype.code = function (e, t, n) {
- var i = (t || "").match(/\S*/)[0];
- if (this.options.highlight) {
- var o = this.options.highlight(e, i);
- null != o && o !== e && (n = !0, e = o)
- }
- return i ? '<pre><code class="' + this.options.langPrefix + d(i, !0) + '">' + (n ? e : d(e, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? e : d(e, !0)) + "</code></pre>"
- }, r.prototype.blockquote = function (e) {
- return "<blockquote>\n" + e + "</blockquote>\n"
- }, r.prototype.html = function (e) {
- return e
- }, r.prototype.heading = function (e, t, n, i) {
- return this.options.headerIds ? "<h" + t + ' id="' + this.options.headerPrefix + i.slug(n) + '">' + e + "</h" + t + ">\n" : "<h" + t + ">" + e + "</h" + t + ">\n"
- }, r.prototype.hr = function () {
- return this.options.xhtml ? "<hr/>\n" : "<hr>\n"
- }, r.prototype.list = function (e, t, n) {
- var i = t ? "ol" : "ul";
- return "<" + i + (t && 1 !== n ? ' start="' + n + '"' : "") + ">\n" + e + "</" + i + ">\n"
- }, r.prototype.listitem = function (e) {
- return "<li>" + e + "</li>\n"
- }, r.prototype.checkbox = function (e) {
- return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox"' + (this.options.xhtml ? " /" : "") + "> "
- }, r.prototype.paragraph = function (e) {
- return "<p>" + e + "</p>\n"
- }, r.prototype.table = function (e, t) {
- return t && (t = "<tbody>" + t + "</tbody>"), "<table>\n<thead>\n" + e + "</thead>\n" + t + "</table>\n"
- }, r.prototype.tablerow = function (e) {
- return "<tr>\n" + e + "</tr>\n"
- }, r.prototype.tablecell = function (e, t) {
- var n = t.header ? "th" : "td";
- return (t.align ? "<" + n + ' align="' + t.align + '">' : "<" + n + ">") + e + "</" + n + ">\n"
- },
- r.prototype.strong = function (e) {
- return "<strong>" + e + "</strong>"
- }, r.prototype.em = function (e) {
- return "<em>" + e + "</em>"
- }, r.prototype.codespan = function (e) {
- return "<code>" + e + "</code>"
- }, r.prototype.br = function () {
- return this.options.xhtml ? "<br/>" : "<br>"
- }, r.prototype.del = function (e) {
- return "<del>" + e + "</del>"
- }, r.prototype.link = function (e, t, n) {
- if (null === (e = p(this.options.sanitize, this.options.baseUrl, e))) return n;
- var i = '<a href="' + d(e) + '"';
- return t && (i += ' title="' + t + '"'), i += ">" + n + "</a>"
- }, r.prototype.image = function (e, t, n) {
- if (null === (e = p(this.options.sanitize, this.options.baseUrl, e))) return n;
- var i = '<img src="' + e + '" alt="' + n + '"';
- return t && (i += ' title="' + t + '"'), i += this.options.xhtml ? "/>" : ">"
- }, r.prototype.text = function (e) {
- return e
- }, s.prototype.strong = s.prototype.em = s.prototype.codespan = s.prototype.del = s.prototype.text = function (e) {
- return e
- }, s.prototype.link = s.prototype.image = function (e, t, n) {
- return "" + n
- }, s.prototype.br = function () {
- return ""
- }, a.parse = function (e, t) {
- return new a(t).parse(e)
- }, a.prototype.parse = function (e) {
- this.inline = new o(e.links, this.options), this.inlineText = new o(e.links, v({}, this.options, {renderer: new s})), this.tokens = e.reverse();
- for (var t = ""; this.next();) t += this.tok();
- return t
- }, a.prototype.next = function () {
- return this.token = this.tokens.pop()
- }, a.prototype.peek = function () {
- return this.tokens[this.tokens.length - 1] || 0
- }, a.prototype.parseText = function () {
- for (var e = this.token.text; "text" === this.peek().type;) e += "\n" + this.next().text;
- return this.inline.output(e)
- }, a.prototype.tok = function () {
- switch (this.token.type) {
- case"space":
- return "";
- case"hr":
- return this.renderer.hr();
- case"heading":
- return this.renderer.heading(this.inline.output(this.token.text), this.token.depth, c(this.inlineText.output(this.token.text)), this.slugger);
- case"code":
- return this.renderer.code(this.token.text, this.token.lang, this.token.escaped);
- case"table":
- var e, t, n, i, o = "", r = "";
- for (n = "", e = 0; e < this.token.header.length; e++) n += this.renderer.tablecell(this.inline.output(this.token.header[e]), {
- header: !0,
- align: this.token.align[e]
- })
- ;
- for (o += this.renderer.tablerow(n), e = 0; e < this.token.cells.length; e++) {
- for (t = this.token.cells[e], n = "", i = 0; i < t.length; i++) n += this.renderer.tablecell(this.inline.output(t[i]), {
- header: !1,
- align: this.token.align[i]
- });
- r += this.renderer.tablerow(n)
- }
- return this.renderer.table(o, r);
- case"blockquote_start":
- for (r = ""; "blockquote_end" !== this.next().type;) r += this.tok();
- return this.renderer.blockquote(r);
- case"list_start":
- r = "";
- for (var s = this.token.ordered, a = this.token.start; "list_end" !== this.next().type;) r += this.tok();
- return this.renderer.list(r, s, a);
- case"list_item_start":
- r = "";
- var l = this.token.loose, u = this.token.checked, d = this.token.task;
- for (this.token.task && (r += this.renderer.checkbox(u)); "list_item_end" !== this.next().type;) r += l || "text" !== this.token.type ? this.tok() : this.parseText();
- return this.renderer.listitem(r, d, u);
- case"html":
- return this.renderer.html(this.token.text);
- case"paragraph":
- return this.renderer.paragraph(this.inline.output(this.token.text));
- case"text":
- return this.renderer.paragraph(this.parseText());
- default:
- var h = 'Token with "' + this.token.type + '" type was not found.';
- if (!this.options.silent) throw new Error(h);
- console.log(h)
- }
- }, l.prototype.slug = function (e) {
- var t = e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-");
- if (this.seen.hasOwnProperty(t)) {
- var n = t;
- do {
- this.seen[n]++, t = n + "-" + this.seen[n]
- } while (this.seen.hasOwnProperty(t))
- }
- return this.seen[t] = 0, t
- }, d.escapeTest = /[&<>"']/, d.escapeReplace = /[&<>"']/g, d.replacements = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- }, d.escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/, d.escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g;
- var g = {}, f = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
- function m() {
- }
- function v(e) {
- for (var t, n, i = 1; i < arguments.length; i++) for (n in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
- return e
- }
- function _(e, t) {
- var n = e.replace(/\|/g, (function (e, t, n) {
- for (var i = !1, o = t; --o >= 0 && "\\" === n[o];) i = !i;
- return i ? "|" : " |"
- })).split(/ \|/), i = 0;
- if (n.length > t) n.splice(t); else for (; n.length < t;) n.push("")
- ;
- for (; i < n.length; i++) n[i] = n[i].trim().replace(/\\\|/g, "|");
- return n
- }
- function y(e, t, n) {
- if (0 === e.length) return "";
- for (var i = 0; i < e.length;) {
- var o = e.charAt(e.length - i - 1);
- if (o !== t || n) {
- if (o === t || !n) break;
- i++
- } else i++
- }
- return e.substr(0, e.length - i)
- }
- function C(e, t) {
- if (-1 === e.indexOf(t[1])) return -1;
- for (var n = 0, i = 0; i < e.length; i++) if ("\\" === e[i]) i++; else if (e[i] === t[0]) n++; else if (e[i] === t[1] && --n < 0) return i;
- return -1
- }
- function b(e, t, i) {
- if (null == e) throw new Error("marked(): input parameter is undefined or null");
- if ("string" != typeof e) throw new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected");
- if (i || "function" == typeof t) {
- i || (i = t, t = null);
- var o, r, s = (t = v({}, b.defaults, t || {})).highlight, l = 0;
- try {
- o = n.lex(e, t)
- } catch (e) {
- return i(e)
- }
- r = o.length;
- var u = function (e) {
- if (e) return t.highlight = s, i(e);
- var n;
- try {
- n = a.parse(o, t)
- } catch (t) {
- e = t
- }
- return t.highlight = s, e ? i(e) : i(null, n)
- };
- if (!s || s.length < 3) return u();
- if (delete t.highlight, !r) return u();
- for (; l < o.length; l++) !function (e) {
- "code" !== e.type ? --r || u() : s(e.text, e.lang, (function (t, n) {
- return t ? u(t) : null == n || n === e.text ? --r || u() : (e.text = n, e.escaped = !0, void (--r || u()))
- }))
- }(o[l])
- } else try {
- return t && (t = v({}, b.defaults, t)), a.parse(n.lex(e, t), t)
- } catch (e) {
- if (e.message += "\nPlease report this to https://github.com/markedjs/marked.", (t || b.defaults).silent) return "<p>An error occurred:</p><pre>" + d(e.message + "", !0) + "</pre>";
- throw e
- }
- }
- m.exec = m, b.options = b.setOptions = function (e) {
- return v(b.defaults, e), b
- }, b.getDefaults = function () {
- return {
- baseUrl: null,
- breaks: !1,
- gfm: !0,
- headerIds: !0,
- headerPrefix: "",
- highlight: null,
- langPrefix: "language-",
- mangle: !0,
- pedantic: !1,
- renderer: new r,
- sanitize: !1,
- sanitizer: null,
- silent: !1,
- smartLists: !1,
- smartypants: !1,
- tables: !0,
- xhtml: !1
- }
- }, b.defaults = b.getDefaults(), b.Parser = a, b.parser = a.parse, b.Renderer = r, b.TextRenderer = s, b.Lexer = n, b.lexer = n.lex, b.InlineLexer = o, b.inlineLexer = o.output, b.Slugger = l, b.parse = b, u = b
- }.call(this), define("vs/base/common/marked/marked", (function () {
- return u
- })), define(n[131], i([0, 1]), (function (e, t) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0}), t.clamp = function (e, t, n) {
- return Math.min(Math.max(e, t), n)
- }
- })), define(n[16], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = !1, i = !1, o = !1, r = !1, s = !1, a = !1, l = void 0,
- u = "undefined" != typeof process && void 0 !== process.versions && void 0 !== process.versions.electron && "renderer" === process.type;
- if ("object" != typeof navigator || u) {
- if ("object" == typeof process) {
- n = "win32" === process.platform, i = "darwin" === process.platform, o = "linux" === process.platform, "en", "en";
- var d = process.env.VSCODE_NLS_CONFIG;
- if (d) try {
- var c = JSON.parse(d), h = c.availableLanguages["*"];
- c.locale, h || "en", c._translationsConfigFile
- } catch (e) {
- }
- r = !0
- }
- } else n = (l = navigator.userAgent).indexOf("Windows") >= 0, i = l.indexOf("Macintosh") >= 0, a = l.indexOf("Macintosh") >= 0 && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0, o = l.indexOf("Linux") >= 0, s = !0, navigator.language;
- t.isWindows = n, t.isMacintosh = i, t.isLinux = o, t.isNative = r, t.isWeb = s, t.isIOS = a
- ;var p = "object" == typeof self ? self : "object" == typeof global ? global : {};
- t.globals = p, t.setImmediate = function () {
- if (t.globals.setImmediate) return t.globals.setImmediate.bind(t.globals);
- if ("function" == typeof t.globals.postMessage && !t.globals.importScripts) {
- var e = [];
- t.globals.addEventListener("message", (function (t) {
- if (t.data && t.data.vscodeSetImmediateId) for (var n = 0, i = e.length; n < i; n++) {
- var o = e[n];
- if (o.id === t.data.vscodeSetImmediateId) return e.splice(n, 1), void o.callback()
- }
- }));
- var n = 0;
- return function (i) {
- var o = ++n;
- e.push({id: o, callback: i}), t.globals.postMessage({vscodeSetImmediateId: o}, "*")
- }
- }
- if ("undefined" != typeof process && "function" == typeof process.nextTick) return process.nextTick.bind(process);
- var i = Promise.resolve();
- return function (e) {
- return i.then(e)
- }
- }(), t.OS = i ? 2 : n ? 1 : 3
- })), define(n[88], i([0, 1, 24, 16]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.BrowserFeatures = {
- clipboard: {
- writeText: i.isNative || document.queryCommandSupported && document.queryCommandSupported("copy") || !!(navigator && navigator.clipboard && navigator.clipboard.writeText),
- readText: i.isNative || !!(navigator && navigator.clipboard && navigator.clipboard.readText),
- richText: function () {
- if (n.isIE) return !1;
- if (n.isEdge) {
- var e = navigator.userAgent.indexOf("Edge/"),
- t = parseInt(navigator.userAgent.substring(e + 5, navigator.userAgent.indexOf(".", e)), 10);
- if (!t || t >= 12 && t <= 16) return !1
- }
- return !0
- }()
- },
- keyboard: i.isNative || n.isStandalone ? 0 : navigator.keyboard || n.isSafari ? 1 : 2,
- touch: "ontouchstart" in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0,
- pointerEvents: window.PointerEvent && ("ontouchstart" in window || window.navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0)
- }
- })), define(n[56], i([0, 1, 24, 36, 16]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = new Array(230), s = new Array(112);
- !function () {
- for (var e = 0; e < s.length; e++) s[e] = -1;
- function t(e, t) {
- r[e] = t,
- s[t] = e
- }
- t(3, 7), t(8, 1), t(9, 2), t(13, 3), t(16, 4), t(17, 5), t(18, 6), t(19, 7), t(20, 8), t(27, 9), t(32, 10), t(33, 11), t(34, 12), t(35, 13), t(36, 14), t(37, 15), t(38, 16), t(39, 17), t(40, 18), t(45, 19), t(46, 20), t(48, 21), t(49, 22), t(50, 23), t(51, 24), t(52, 25), t(53, 26), t(54, 27), t(55, 28), t(56, 29), t(57, 30), t(65, 31), t(66, 32), t(67, 33), t(68, 34), t(69, 35), t(70, 36), t(71, 37), t(72, 38), t(73, 39), t(74, 40), t(75, 41), t(76, 42), t(77, 43), t(78, 44), t(79, 45), t(80, 46), t(81, 47), t(82, 48), t(83, 49), t(84, 50), t(85, 51), t(86, 52), t(87, 53), t(88, 54), t(89, 55), t(90, 56), t(93, 58), t(96, 93), t(97, 94), t(98, 95), t(99, 96), t(100, 97), t(101, 98), t(102, 99), t(103, 100), t(104, 101), t(105, 102), t(106, 103), t(107, 104), t(108, 105), t(109, 106), t(110, 107), t(111, 108), t(112, 59), t(113, 60), t(114, 61), t(115, 62), t(116, 63), t(117, 64), t(118, 65), t(119, 66), t(120, 67), t(121, 68), t(122, 69), t(123, 70), t(124, 71), t(125, 72), t(126, 73), t(127, 74), t(128, 75), t(129, 76), t(130, 77), t(144, 78), t(145, 79), t(186, 80), t(187, 81), t(188, 82), t(189, 83), t(190, 84), t(191, 85),t(192, 86),t(193, 110),t(194, 111),t(219, 87),t(220, 88),t(221, 89),t(222, 90),
- t(223, 91),t(226, 92),t(229, 109),n.isIE ? t(91, 57) : n.isFirefox ? (t(59, 80), t(107, 81), t(109, 83), o.isMacintosh && t(224, 57)) : n.isWebKit && (t(91, 57), o.isMacintosh ? t(93, 57) : t(92, 57))
- }();
- var a = o.isMacintosh ? 256 : 2048, l = o.isMacintosh ? 2048 : 256, u = function () {
- function e(e) {
- this._standardKeyboardEventBrand = !0;
- var t = e;
- this.browserEvent = t, this.target = t.target, this.ctrlKey = t.ctrlKey, this.shiftKey = t.shiftKey, this.altKey = t.altKey, this.metaKey = t.metaKey, this.keyCode = function (e) {
- if (e.charCode) {
- var t = String.fromCharCode(e.charCode).toUpperCase();
- return i.KeyCodeUtils.fromString(t)
- }
- return r[e.keyCode] || 0
- }(t), this.code = t.code, this.ctrlKey = this.ctrlKey || 5 === this.keyCode, this.altKey = this.altKey || 6 === this.keyCode, this.shiftKey = this.shiftKey || 4 === this.keyCode, this.metaKey = this.metaKey || 57 === this.keyCode, this._asKeybinding = this._computeKeybinding(), this._asRuntimeKeybinding = this._computeRuntimeKeybinding()
- }
- return e.prototype.preventDefault = function () {
- this.browserEvent && this.browserEvent.preventDefault && this.browserEvent.preventDefault()
- },
- e.prototype.stopPropagation = function () {
- this.browserEvent && this.browserEvent.stopPropagation && this.browserEvent.stopPropagation()
- }, e.prototype.toKeybinding = function () {
- return this._asRuntimeKeybinding
- }, e.prototype.equals = function (e) {
- return this._asKeybinding === e
- }, e.prototype._computeKeybinding = function () {
- var e = 0;
- 5 !== this.keyCode && 4 !== this.keyCode && 6 !== this.keyCode && 57 !== this.keyCode && (e = this.keyCode);
- var t = 0;
- return this.ctrlKey && (t |= a), this.altKey && (t |= 512), this.shiftKey && (t |= 1024), this.metaKey && (t |= l), t |= e
- }, e.prototype._computeRuntimeKeybinding = function () {
- var e = 0;
- return 5 !== this.keyCode && 4 !== this.keyCode && 6 !== this.keyCode && 57 !== this.keyCode && (e = this.keyCode), new i.SimpleKeybinding(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, e)
- }, e
- }();
- t.StandardKeyboardEvent = u
- })), define(n[45], i([0, 1, 24, 174, 16]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e(e) {
- this.timestamp = Date.now(), this.browserEvent = e, this.leftButton = 0 === e.button,
- this.middleButton = 1 === e.button, this.rightButton = 2 === e.button, this.buttons = e.buttons, this.target = e.target, this.detail = e.detail || 1, "dblclick" === e.type && (this.detail = 2), this.ctrlKey = e.ctrlKey, this.shiftKey = e.shiftKey, this.altKey = e.altKey, this.metaKey = e.metaKey, "number" == typeof e.pageX ? (this.posx = e.pageX, this.posy = e.pageY) : (this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop);
- var t = i.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self, e.view);
- this.posx -= t.left, this.posy -= t.top
- }
- return e.prototype.preventDefault = function () {
- this.browserEvent.preventDefault && this.browserEvent.preventDefault()
- }, e.prototype.stopPropagation = function () {
- this.browserEvent.stopPropagation && this.browserEvent.stopPropagation()
- }, e
- }();
- t.StandardMouseEvent = s;
- var a = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n.dataTransfer = t.dataTransfer, n
- }
- return r(t, e), t
- }(s);
- t.DragMouseEvent = a;
- var l = function () {
- function e(e, t, i) {
- if (void 0 === t && (t = 0), void 0 === i && (i = 0), this.browserEvent = e || null, this.target = e ? e.target || e.targetNode || e.srcElement : null, this.deltaY = i, this.deltaX = t, e) {
- var r = e, s = e;
- if (void 0 !== r.wheelDeltaY) this.deltaY = r.wheelDeltaY / 120; else if (void 0 !== s.VERTICAL_AXIS && s.axis === s.VERTICAL_AXIS) this.deltaY = -s.detail / 3; else if ("wheel" === e.type) {
- (a = e).deltaMode === a.DOM_DELTA_LINE ? this.deltaY = -e.deltaY : this.deltaY = -e.deltaY / 40
- }
- if (void 0 !== r.wheelDeltaX) n.isSafari && o.isWindows ? this.deltaX = -r.wheelDeltaX / 120 : this.deltaX = r.wheelDeltaX / 120; else if (void 0 !== s.HORIZONTAL_AXIS && s.axis === s.HORIZONTAL_AXIS) this.deltaX = -e.detail / 3; else if ("wheel" === e.type) {
- var a;
- (a = e).deltaMode === a.DOM_DELTA_LINE ? this.deltaX = -e.deltaX : this.deltaX = -e.deltaX / 40
- }
- 0 === this.deltaY && 0 === this.deltaX && e.wheelDelta && (this.deltaY = e.wheelDelta / 120)
- }
- }
- return e.prototype.preventDefault = function () {
- this.browserEvent && this.browserEvent.preventDefault && this.browserEvent.preventDefault()
- }, e.prototype.stopPropagation = function () {
- this.browserEvent && this.browserEvent.stopPropagation && this.browserEvent.stopPropagation()
- }, e
- }();
- t.StandardWheelEvent = l
- })), define(n[245], i([0, 1, 16]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = "undefined" == typeof process ? {
- cwd: function () {
- return "/"
- }, env: Object.create(null), get platform() {
- return n.isWindows ? "win32" : n.isMacintosh ? "darwin" : "linux"
- }, nextTick: function (e) {
- return n.setImmediate(e)
- }
- } : process;
- t.cwd = i.cwd, t.env = i.env, t.platform = i.platform
- })), define(n[77], i([0, 1, 245]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = 65, o = 97, s = 90, a = 122, l = 46, u = 47, d = 92, c = function (e) {
- function t(t, n, i) {
- var o, r = this;
- "string" == typeof n && 0 === n.indexOf("not ") ? (o = "must not be", n = n.replace(/^not /, "")) : o = "must be";
- var s = -1 !== t.indexOf(".") ? "property" : "argument",
- a = 'The "' + t + '" ' + s + " " + o + " of type " + n;
- return a += ". Received type " + typeof i, (r = e.call(this, a) || this).code = "ERR_INVALID_ARG_TYPE", r
- }
- return r(t, e), t
- }(Error);
- function h(e, t) {
- if ("string" != typeof e) throw new c(t, "string", e)
- }
- function p(e) {
- return e === u || e === d
- }
- function g(e) {
- return e === u
- }
- function f(e) {
- return e >= i && e <= s || e >= o && e <= a
- }
- function m(e, t, n, i) {
- for (var o, r = "", s = 0, a = -1, d = 0, c = 0; c <= e.length; ++c) {
- if (c < e.length) o = e.charCodeAt(c); else {
- if (i(o)) break;
- o = u
- }
- if (i(o)) {
- if (a === c - 1 || 1 === d) ; else if (a !== c - 1 && 2 === d) {
- if (r.length < 2 || 2 !== s || r.charCodeAt(r.length - 1) !== l || r.charCodeAt(r.length - 2) !== l) {
- if (r.length > 2) {
- var h = r.lastIndexOf(n);
- -1 === h ? (r = "", s = 0) : s = (r = r.slice(0, h)).length - 1 - r.lastIndexOf(n), a = c, d = 0;
- continue
- }
- if (2 === r.length || 1 === r.length) {
- r = "", s = 0, a = c, d = 0;
- continue
- }
- }
- t && (r.length > 0 ? r += n + ".." : r = "..", s = 2)
- } else r.length > 0 ? r += n + e.slice(a + 1, c) : r = e.slice(a + 1, c), s = c - a - 1;
- a = c, d = 0
- } else o === l && -1 !== d ? ++d : d = -1
- }
- return r
- }
- function v(e, t) {
- var n = t.dir || t.root, i = t.base || (t.name || "") + (t.ext || "");
- return n ? n === t.root ? n + i : n + e + i : i
- }
- t.win32 = {
- resolve: function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- for (var i = "", o = "", r = !1, s = e.length - 1; s >= -1; s--) {
- var a = void 0
- ;
- if (s >= 0 ? a = e[s] : i ? void 0 !== (a = n.env["=" + i] || n.cwd()) && a.slice(0, 3).toLowerCase() === i.toLowerCase() + "\\" || (a = i + "\\") : a = n.cwd(), h(a, "path"), 0 !== a.length) {
- var l = a.length, u = 0, d = "", c = !1, g = a.charCodeAt(0);
- if (l > 1) if (p(g)) if (c = !0, p(a.charCodeAt(1))) {
- for (var v = 2, _ = v; v < l && !p(a.charCodeAt(v)); ++v) ;
- if (v < l && v !== _) {
- var y = a.slice(_, v);
- for (_ = v; v < l && p(a.charCodeAt(v)); ++v) ;
- if (v < l && v !== _) {
- for (_ = v; v < l && !p(a.charCodeAt(v)); ++v) ;
- v === l ? (d = "\\\\" + y + "\\" + a.slice(_), u = v) : v !== _ && (d = "\\\\" + y + "\\" + a.slice(_, v), u = v)
- }
- }
- } else u = 1; else f(g) && 58 === a.charCodeAt(1) && (d = a.slice(0, 2), u = 2, l > 2 && p(a.charCodeAt(2)) && (c = !0, u = 3)); else p(g) && (u = 1, c = !0);
- if (!(d.length > 0 && i.length > 0 && d.toLowerCase() !== i.toLowerCase()) && (0 === i.length && d.length > 0 && (i = d), r || (o = a.slice(u) + "\\" + o, r = c), i.length > 0 && r)) break
- }
- }
- return i + (r ? "\\" : "") + (o = m(o, !r, "\\", p)) || "."
- }, normalize: function (e) {
- h(e, "path");
- var t = e.length;
- if (0 === t) return ".";
- var n, i, o = 0, r = !1, s = e.charCodeAt(0);
- if (t > 1) if (p(s)) if (r = !0, p(e.charCodeAt(1))) {
- for (var a = 2, l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
- if (a < t && a !== l) {
- var u = e.slice(l, a);
- for (l = a; a < t && p(e.charCodeAt(a)); ++a) ;
- if (a < t && a !== l) {
- for (l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
- if (a === t) return "\\\\" + u + "\\" + e.slice(l) + "\\";
- a !== l && (n = "\\\\" + u + "\\" + e.slice(l, a), o = a)
- }
- }
- } else o = 1; else f(s) && 58 === e.charCodeAt(1) && (n = e.slice(0, 2), o = 2, t > 2 && p(e.charCodeAt(2)) && (r = !0, o = 3)); else if (p(s)) return "\\";
- return 0 !== (i = o < t ? m(e.slice(o), !r, "\\", p) : "").length || r || (i = "."), i.length > 0 && p(e.charCodeAt(t - 1)) && (i += "\\"), void 0 === n ? r ? i.length > 0 ? "\\" + i : "\\" : i.length > 0 ? i : "" : r ? i.length > 0 ? n + "\\" + i : n + "\\" : i.length > 0 ? n + i : n
- }, isAbsolute: function (e) {
- h(e, "path");
- var t = e.length;
- if (0 === t) return !1;
- var n = e.charCodeAt(0);
- return !!p(n) || !!(f(n) && t > 2 && 58 === e.charCodeAt(1) && p(e.charCodeAt(2)))
- }, join: function () {
- for (var e, n, i = [], o = 0; o < arguments.length; o++) i[o] = arguments[o];
- if (0 === i.length) return ".";
- for (var r = 0; r < i.length; ++r) {
- var s = i[r];
- h(s, "path"), s.length > 0 && (void 0 === e ? e = n = s : e += "\\" + s)
- }
- if (void 0 === e) return ".";
- var a = !0, l = 0;
- if ("string" == typeof n && p(n.charCodeAt(0))) {
- ++l;
- var u = n.length;
- u > 1 && p(n.charCodeAt(1)) && (++l,
- u > 2 && (p(n.charCodeAt(2)) ? ++l : a = !1))
- }
- if (a) {
- for (; l < e.length && p(e.charCodeAt(l)); ++l) ;
- l >= 2 && (e = "\\" + e.slice(l))
- }
- return t.win32.normalize(e)
- }, relative: function (e, n) {
- if (h(e, "from"), h(n, "to"), e === n) return "";
- var i = t.win32.resolve(e), o = t.win32.resolve(n);
- if (i === o) return "";
- if ((e = i.toLowerCase()) === (n = o.toLowerCase())) return "";
- for (var r = 0; r < e.length && e.charCodeAt(r) === d; ++r) ;
- for (var s = e.length; s - 1 > r && e.charCodeAt(s - 1) === d; --s) ;
- for (var a = s - r, l = 0; l < n.length && n.charCodeAt(l) === d; ++l) ;
- for (var u = n.length; u - 1 > l && n.charCodeAt(u - 1) === d; --u) ;
- for (var c = u - l, p = a < c ? a : c, g = -1, f = 0; f <= p; ++f) {
- if (f === p) {
- if (c > p) {
- if (n.charCodeAt(l + f) === d) return o.slice(l + f + 1);
- if (2 === f) return o.slice(l + f)
- }
- a > p && (e.charCodeAt(r + f) === d ? g = f : 2 === f && (g = 3));
- break
- }
- var m = e.charCodeAt(r + f);
- if (m !== n.charCodeAt(l + f)) break;
- m === d && (g = f)
- }
- if (f !== p && -1 === g) return o;
- var v = "";
- for (-1 === g && (g = 0), f = r + g + 1; f <= s; ++f) f !== s && e.charCodeAt(f) !== d || (0 === v.length ? v += ".." : v += "\\..");
- return v.length > 0 ? v + o.slice(l + g, u) : (l += g, o.charCodeAt(l) === d && ++l, o.slice(l, u))
- },
- toNamespacedPath: function (e) {
- if ("string" != typeof e) return e;
- if (0 === e.length) return "";
- var n = t.win32.resolve(e);
- if (n.length >= 3) if (n.charCodeAt(0) === d) {
- if (n.charCodeAt(1) === d) {
- var i = n.charCodeAt(2);
- if (63 !== i && i !== l) return "\\\\?\\UNC\\" + n.slice(2)
- }
- } else if (f(n.charCodeAt(0)) && 58 === n.charCodeAt(1) && n.charCodeAt(2) === d) return "\\\\?\\" + n;
- return e
- }, dirname: function (e) {
- h(e, "path");
- var t = e.length;
- if (0 === t) return ".";
- var n = -1, i = -1, o = !0, r = 0, s = e.charCodeAt(0);
- if (t > 1) if (p(s)) {
- if (n = r = 1, p(e.charCodeAt(1))) {
- for (var a = 2, l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
- if (a < t && a !== l) {
- for (l = a; a < t && p(e.charCodeAt(a)); ++a) ;
- if (a < t && a !== l) {
- for (l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
- if (a === t) return e;
- a !== l && (n = r = a + 1)
- }
- }
- }
- } else f(s) && 58 === e.charCodeAt(1) && (n = r = 2, t > 2 && p(e.charCodeAt(2)) && (n = r = 3)); else if (p(s)) return e;
- for (var u = t - 1; u >= r; --u) if (p(e.charCodeAt(u))) {
- if (!o) {
- i = u;
- break
- }
- } else o = !1;
- if (-1 === i) {
- if (-1 === n) return ".";
- i = n
- }
- return e.slice(0, i)
- }, basename: function (e, t) {
- void 0 !== t && h(t, "ext"), h(e, "path");
- var n, i = 0, o = -1, r = !0
- ;e.length >= 2 && (f(e.charCodeAt(0)) && 58 === e.charCodeAt(1) && (i = 2));
- if (void 0 !== t && t.length > 0 && t.length <= e.length) {
- if (t.length === e.length && t === e) return "";
- var s = t.length - 1, a = -1;
- for (n = e.length - 1; n >= i; --n) {
- var l = e.charCodeAt(n);
- if (p(l)) {
- if (!r) {
- i = n + 1;
- break
- }
- } else -1 === a && (r = !1, a = n + 1), s >= 0 && (l === t.charCodeAt(s) ? -1 == --s && (o = n) : (s = -1, o = a))
- }
- return i === o ? o = a : -1 === o && (o = e.length), e.slice(i, o)
- }
- for (n = e.length - 1; n >= i; --n) if (p(e.charCodeAt(n))) {
- if (!r) {
- i = n + 1;
- break
- }
- } else -1 === o && (r = !1, o = n + 1);
- return -1 === o ? "" : e.slice(i, o)
- }, extname: function (e) {
- h(e, "path");
- var t = 0, n = -1, i = 0, o = -1, r = !0, s = 0;
- e.length >= 2 && 58 === e.charCodeAt(1) && f(e.charCodeAt(0)) && (t = i = 2);
- for (var a = e.length - 1; a >= t; --a) {
- var u = e.charCodeAt(a);
- if (p(u)) {
- if (!r) {
- i = a + 1;
- break
- }
- } else -1 === o && (r = !1, o = a + 1), u === l ? -1 === n ? n = a : 1 !== s && (s = 1) : -1 !== n && (s = -1)
- }
- return -1 === n || -1 === o || 0 === s || 1 === s && n === o - 1 && n === i + 1 ? "" : e.slice(n, o)
- }, format: function (e) {
- if (null === e || "object" != typeof e) throw new c("pathObject", "Object", e);
- return v("\\", e)
- }, parse: function (e) {
- h(e, "path");
- var t = {
- root: "", dir: "", base: "",
- ext: "", name: ""
- };
- if (0 === e.length) return t;
- var n = e.length, i = 0, o = e.charCodeAt(0);
- if (n > 1) {
- if (p(o)) {
- if (i = 1, p(e.charCodeAt(1))) {
- for (var r = 2, s = r; r < n && !p(e.charCodeAt(r)); ++r) ;
- if (r < n && r !== s) {
- for (s = r; r < n && p(e.charCodeAt(r)); ++r) ;
- if (r < n && r !== s) {
- for (s = r; r < n && !p(e.charCodeAt(r)); ++r) ;
- r === n ? i = r : r !== s && (i = r + 1)
- }
- }
- }
- } else if (f(o) && 58 === e.charCodeAt(1)) {
- if (i = 2, !(n > 2)) return t.root = t.dir = e, t;
- if (p(e.charCodeAt(2))) {
- if (3 === n) return t.root = t.dir = e, t;
- i = 3
- }
- }
- } else if (p(o)) return t.root = t.dir = e, t;
- i > 0 && (t.root = e.slice(0, i));
- for (var a = -1, u = i, d = -1, c = !0, g = e.length - 1, m = 0; g >= i; --g) if (p(o = e.charCodeAt(g))) {
- if (!c) {
- u = g + 1;
- break
- }
- } else -1 === d && (c = !1, d = g + 1), o === l ? -1 === a ? a = g : 1 !== m && (m = 1) : -1 !== a && (m = -1);
- return -1 === a || -1 === d || 0 === m || 1 === m && a === d - 1 && a === u + 1 ? -1 !== d && (t.base = t.name = e.slice(u, d)) : (t.name = e.slice(u, a), t.base = e.slice(u, d), t.ext = e.slice(a, d)), t.dir = u > 0 && u !== i ? e.slice(0, u - 1) : t.root, t
- }, sep: "\\", delimiter: ";", win32: null, posix: null
- }, t.posix = {
- resolve: function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]
- ;
- for (var i = "", o = !1, r = e.length - 1; r >= -1 && !o; r--) {
- var s = void 0;
- h(s = r >= 0 ? e[r] : n.cwd(), "path"), 0 !== s.length && (i = s + "/" + i, o = s.charCodeAt(0) === u)
- }
- return i = m(i, !o, "/", g), o ? i.length > 0 ? "/" + i : "/" : i.length > 0 ? i : "."
- }, normalize: function (e) {
- if (h(e, "path"), 0 === e.length) return ".";
- var t = e.charCodeAt(0) === u, n = e.charCodeAt(e.length - 1) === u;
- return 0 !== (e = m(e, !t, "/", g)).length || t || (e = "."), e.length > 0 && n && (e += "/"), t ? "/" + e : e
- }, isAbsolute: function (e) {
- return h(e, "path"), e.length > 0 && e.charCodeAt(0) === u
- }, join: function () {
- for (var e, n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
- if (0 === n.length) return ".";
- for (var o = 0; o < n.length; ++o) {
- var r = arguments[o];
- h(r, "path"), r.length > 0 && (void 0 === e ? e = r : e += "/" + r)
- }
- return void 0 === e ? "." : t.posix.normalize(e)
- }, relative: function (e, n) {
- if (h(e, "from"), h(n, "to"), e === n) return "";
- if ((e = t.posix.resolve(e)) === (n = t.posix.resolve(n))) return "";
- for (var i = 1; i < e.length && e.charCodeAt(i) === u; ++i) ;
- for (var o = e.length, r = o - i, s = 1; s < n.length && n.charCodeAt(s) === u; ++s) ;
- for (var a = n.length - s, l = r < a ? r : a, d = -1, c = 0; c <= l; ++c) {
- if (c === l) {
- if (a > l) {
- if (n.charCodeAt(s + c) === u) return n.slice(s + c + 1);
- if (0 === c) return n.slice(s + c)
- } else r > l && (e.charCodeAt(i + c) === u ? d = c : 0 === c && (d = 0));
- break
- }
- var p = e.charCodeAt(i + c);
- if (p !== n.charCodeAt(s + c)) break;
- p === u && (d = c)
- }
- var g = "";
- for (c = i + d + 1; c <= o; ++c) c !== o && e.charCodeAt(c) !== u || (0 === g.length ? g += ".." : g += "/..");
- return g.length > 0 ? g + n.slice(s + d) : (s += d, n.charCodeAt(s) === u && ++s, n.slice(s))
- }, toNamespacedPath: function (e) {
- return e
- }, dirname: function (e) {
- if (h(e, "path"), 0 === e.length) return ".";
- for (var t = e.charCodeAt(0) === u, n = -1, i = !0, o = e.length - 1; o >= 1; --o) if (e.charCodeAt(o) === u) {
- if (!i) {
- n = o;
- break
- }
- } else i = !1;
- return -1 === n ? t ? "/" : "." : t && 1 === n ? "//" : e.slice(0, n)
- }, basename: function (e, t) {
- void 0 !== t && h(t, "ext"), h(e, "path");
- var n, i = 0, o = -1, r = !0;
- if (void 0 !== t && t.length > 0 && t.length <= e.length) {
- if (t.length === e.length && t === e) return "";
- var s = t.length - 1, a = -1;
- for (n = e.length - 1; n >= 0; --n) {
- var l = e.charCodeAt(n);
- if (l === u) {
- if (!r) {
- i = n + 1;
- break
- }
- } else -1 === a && (r = !1, a = n + 1), s >= 0 && (l === t.charCodeAt(s) ? -1 == --s && (o = n) : (s = -1, o = a))
- }
- return i === o ? o = a : -1 === o && (o = e.length),
- e.slice(i, o)
- }
- for (n = e.length - 1; n >= 0; --n) if (e.charCodeAt(n) === u) {
- if (!r) {
- i = n + 1;
- break
- }
- } else -1 === o && (r = !1, o = n + 1);
- return -1 === o ? "" : e.slice(i, o)
- }, extname: function (e) {
- h(e, "path");
- for (var t = -1, n = 0, i = -1, o = !0, r = 0, s = e.length - 1; s >= 0; --s) {
- var a = e.charCodeAt(s);
- if (a !== u) -1 === i && (o = !1, i = s + 1), a === l ? -1 === t ? t = s : 1 !== r && (r = 1) : -1 !== t && (r = -1); else if (!o) {
- n = s + 1;
- break
- }
- }
- return -1 === t || -1 === i || 0 === r || 1 === r && t === i - 1 && t === n + 1 ? "" : e.slice(t, i)
- }, format: function (e) {
- if (null === e || "object" != typeof e) throw new c("pathObject", "Object", e);
- return v("/", e)
- }, parse: function (e) {
- h(e, "path");
- var t = {root: "", dir: "", base: "", ext: "", name: ""};
- if (0 === e.length) return t;
- var n, i = e.charCodeAt(0) === u;
- i ? (t.root = "/", n = 1) : n = 0;
- for (var o = -1, r = 0, s = -1, a = !0, d = e.length - 1, c = 0; d >= n; --d) {
- var p = e.charCodeAt(d);
- if (p !== u) -1 === s && (a = !1, s = d + 1), p === l ? -1 === o ? o = d : 1 !== c && (c = 1) : -1 !== o && (c = -1); else if (!a) {
- r = d + 1;
- break
- }
- }
- return -1 === o || -1 === s || 0 === c || 1 === c && o === s - 1 && o === r + 1 ? -1 !== s && (t.base = t.name = 0 === r && i ? e.slice(1, s) : e.slice(r, s)) : (0 === r && i ? (t.name = e.slice(1, o),
- t.base = e.slice(1, s)) : (t.name = e.slice(r, o), t.base = e.slice(r, s)), t.ext = e.slice(o, s)), r > 0 ? t.dir = e.slice(0, r - 1) : i && (t.dir = "/"), t
- }, sep: "/", delimiter: ":", win32: null, posix: null
- }, t.posix.win32 = t.win32.win32 = t.win32, t.posix.posix = t.win32.posix = t.posix, t.normalize = "win32" === n.platform ? t.win32.normalize : t.posix.normalize, t.join = "win32" === n.platform ? t.win32.join : t.posix.join, t.relative = "win32" === n.platform ? t.win32.relative : t.posix.relative, t.dirname = "win32" === n.platform ? t.win32.dirname : t.posix.dirname, t.basename = "win32" === n.platform ? t.win32.basename : t.posix.basename, t.extname = "win32" === n.platform ? t.win32.extname : t.posix.extname, t.sep = "win32" === n.platform ? t.win32.sep : t.posix.sep
- })), define(n[103], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- function t(e, t) {
- if (e.start >= t.end || t.start >= e.end) return {start: 0, end: 0};
- var n = Math.max(e.start, t.start), i = Math.min(e.end, t.end);
- return i - n <= 0 ? {start: 0, end: 0} : {start: n, end: i}
- }
- function n(e) {
- return e.end - e.start <= 0
- }
- e.intersect = t,
- e.isEmpty = n, e.intersects = function (e, i) {
- return !n(t(e, i))
- }, e.relativeComplement = function (e, t) {
- var i = [], o = {start: e.start, end: Math.min(t.start, e.end)},
- r = {start: Math.max(t.end, e.start), end: e.end};
- return n(o) || i.push(o), n(r) || i.push(r), i
- }
- }(t.Range || (t.Range = {}))
- })), define(n[246], i([0, 1, 103]), (function (e, t, n) {
- "use strict";
- function i(e, t) {
- for (var i = [], o = 0, r = t; o < r.length; o++) {
- var s = r[o];
- if (!(e.start >= s.range.end)) {
- if (e.end < s.range.start) break;
- var a = n.Range.intersect(e, s.range);
- n.Range.isEmpty(a) || i.push({range: a, size: s.size})
- }
- }
- return i
- }
- function o(e, t) {
- return {start: e.start + t, end: e.end + t}
- }
- function r(e) {
- for (var t = [], n = null, i = 0, o = e; i < o.length; i++) {
- var r = o[i], s = r.range.start, a = r.range.end, l = r.size;
- n && l === n.size ? n.range.end = a : (n = {range: {start: s, end: a}, size: l}, t.push(n))
- }
- return t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.groupIntersect = i, t.shift = o, t.consolidate = r;
- var s = function () {
- function e() {
- this.groups = [], this._size = 0
- }
- return e.prototype.splice = function (e, t, n) {
- void 0 === n && (n = []);
- var s = n.length - t, a = i({
- start: 0, end: e
- }, this.groups), l = i({start: e + t, end: Number.POSITIVE_INFINITY}, this.groups).map((function (e) {
- return {range: o(e.range, s), size: e.size}
- })), u = n.map((function (t, n) {
- return {range: {start: e + n, end: e + n + 1}, size: t.size}
- }));
- this.groups = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return r(e.reduce((function (e, t) {
- return e.concat(t)
- }), []))
- }(a, u, l), this._size = this.groups.reduce((function (e, t) {
- return e + t.size * (t.range.end - t.range.start)
- }), 0)
- }, Object.defineProperty(e.prototype, "count", {
- get: function () {
- var e = this.groups.length;
- return e ? this.groups[e - 1].range.end : 0
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "size", {
- get: function () {
- return this._size
- }, enumerable: !0, configurable: !0
- }), e.prototype.indexAt = function (e) {
- if (e < 0) return -1;
- for (var t = 0, n = 0, i = 0, o = this.groups; i < o.length; i++) {
- var r = o[i], s = r.range.end - r.range.start, a = n + s * r.size;
- if (e < a) return t + Math.floor((e - n) / r.size);
- t += s, n = a
- }
- return t
- }, e.prototype.indexAfter = function (e) {
- return Math.min(this.indexAt(e) + 1, this.count)
- },
- e.prototype.positionAt = function (e) {
- if (e < 0) return -1;
- for (var t = 0, n = 0, i = 0, o = this.groups; i < o.length; i++) {
- var r = o[i], s = r.range.end - r.range.start, a = n + s;
- if (e < a) return t + (e - n) * r.size;
- t += s * r.size, n = a
- }
- return -1
- }, e
- }();
- t.RangeMap = s
- })), define(n[176], i([0, 1, 4, 2]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t, n, i, o, r) {
- (e |= 0) < 0 && (e = 0), (n |= 0) + e > (t |= 0) && (n = t - e), n < 0 && (n = 0), (i |= 0) < 0 && (i = 0), (r |= 0) + i > (o |= 0) && (r = o - i), r < 0 && (r = 0), this.width = e, this.scrollWidth = t, this.scrollLeft = n, this.height = i, this.scrollHeight = o, this.scrollTop = r
- }
- return e.prototype.equals = function (e) {
- return this.width === e.width && this.scrollWidth === e.scrollWidth && this.scrollLeft === e.scrollLeft && this.height === e.height && this.scrollHeight === e.scrollHeight && this.scrollTop === e.scrollTop
- }, e.prototype.withScrollDimensions = function (t) {
- return new e(void 0 !== t.width ? t.width : this.width, void 0 !== t.scrollWidth ? t.scrollWidth : this.scrollWidth, this.scrollLeft, void 0 !== t.height ? t.height : this.height, void 0 !== t.scrollHeight ? t.scrollHeight : this.scrollHeight, this.scrollTop)
- }, e.prototype.withScrollPosition = function (t) {
- return new e(this.width, this.scrollWidth, void 0 !== t.scrollLeft ? t.scrollLeft : this.scrollLeft, this.height, this.scrollHeight, void 0 !== t.scrollTop ? t.scrollTop : this.scrollTop)
- }, e.prototype.createScrollEvent = function (e) {
- var t = this.width !== e.width, n = this.scrollWidth !== e.scrollWidth,
- i = this.scrollLeft !== e.scrollLeft, o = this.height !== e.height,
- r = this.scrollHeight !== e.scrollHeight, s = this.scrollTop !== e.scrollTop;
- return {
- width: this.width,
- scrollWidth: this.scrollWidth,
- scrollLeft: this.scrollLeft,
- height: this.height,
- scrollHeight: this.scrollHeight,
- scrollTop: this.scrollTop,
- widthChanged: t,
- scrollWidthChanged: n,
- scrollLeftChanged: i,
- heightChanged: o,
- scrollHeightChanged: r,
- scrollTopChanged: s
- }
- }, e
- }();
- t.ScrollState = o;
- var s = function (e) {
- function t(t, i) {
- var r = e.call(this) || this;
- return r._onScroll = r._register(new n.Emitter), r.onScroll = r._onScroll.event, r._smoothScrollDuration = t, r._scheduleAtNextAnimationFrame = i, r._state = new o(0, 0, 0, 0, 0, 0), r._smoothScrolling = null, r
- }
- return r(t, e), t.prototype.dispose = function () {
- this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), e.prototype.dispose.call(this)
- }, t.prototype.setSmoothScrollDuration = function (e) {
- this._smoothScrollDuration = e
- }, t.prototype.validateScrollPosition = function (e) {
- return this._state.withScrollPosition(e)
- }, t.prototype.getScrollDimensions = function () {
- return this._state
- }, t.prototype.setScrollDimensions = function (e) {
- var t = this._state.withScrollDimensions(e);
- this._setState(t), this._smoothScrolling && this._smoothScrolling.acceptScrollDimensions(this._state)
- }, t.prototype.getFutureScrollPosition = function () {
- return this._smoothScrolling ? this._smoothScrolling.to : this._state
- }, t.prototype.getCurrentScrollPosition = function () {
- return this._state
- }, t.prototype.setScrollPositionNow = function (e) {
- var t = this._state.withScrollPosition(e);
- this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), this._setState(t)
- }, t.prototype.setScrollPositionSmooth = function (e) {
- var t = this;
- if (0 === this._smoothScrollDuration) return this.setScrollPositionNow(e);
- if (this._smoothScrolling) {
- e = {
- scrollLeft: void 0 === e.scrollLeft ? this._smoothScrolling.to.scrollLeft : e.scrollLeft,
- scrollTop: void 0 === e.scrollTop ? this._smoothScrolling.to.scrollTop : e.scrollTop
- };
- var n = this._state.withScrollPosition(e);
- if (this._smoothScrolling.to.scrollLeft === n.scrollLeft && this._smoothScrolling.to.scrollTop === n.scrollTop) return;
- var i = this._smoothScrolling.combine(this._state, n, this._smoothScrollDuration);
- this._smoothScrolling.dispose(), this._smoothScrolling = i
- } else {
- n = this._state.withScrollPosition(e);
- this._smoothScrolling = u.start(this._state, n, this._smoothScrollDuration)
- }
- this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame((function () {
- t._smoothScrolling && (t._smoothScrolling.animationFrameDisposable = null,
- t._performSmoothScrolling())
- }))
- }, t.prototype._performSmoothScrolling = function () {
- var e = this;
- if (this._smoothScrolling) {
- var t = this._smoothScrolling.tick(), n = this._state.withScrollPosition(t);
- if (this._setState(n), t.isDone) return this._smoothScrolling.dispose(), void (this._smoothScrolling = null);
- this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame((function () {
- e._smoothScrolling && (e._smoothScrolling.animationFrameDisposable = null, e._performSmoothScrolling())
- }))
- }
- }, t.prototype._setState = function (e) {
- var t = this._state;
- t.equals(e) || (this._state = e, this._onScroll.fire(this._state.createScrollEvent(t)))
- }, t
- }(i.Disposable);
- t.Scrollable = s;
- var a = function (e, t, n) {
- this.scrollLeft = e, this.scrollTop = t, this.isDone = n
- };
- function l(e, t) {
- var n = t - e;
- return function (t) {
- return e + n * (1 - function (e) {
- return Math.pow(e, 3)
- }(1 - t))
- }
- }
- t.SmoothScrollingUpdate = a;
- var u = function () {
- function e(e, t, n, i) {
- this.from = e, this.to = t, this.duration = i, this._startTime = n, this.animationFrameDisposable = null, this._initAnimations()
- }
- return e.prototype._initAnimations = function () {
- this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, this.to.width), this.scrollTop = this._initAnimation(this.from.scrollTop, this.to.scrollTop, this.to.height)
- }, e.prototype._initAnimation = function (e, t, n) {
- var i, o, r;
- if (Math.abs(e - t) > 2.5 * n) {
- var s = void 0, a = void 0;
- return e < t ? (s = e + .75 * n, a = t - .75 * n) : (s = e - .75 * n, a = t + .75 * n), i = l(e, s), o = l(a, t), r = .33, function (e) {
- return e < r ? i(e / r) : o((e - r) / (1 - r))
- }
- }
- return l(e, t)
- }, e.prototype.dispose = function () {
- null !== this.animationFrameDisposable && (this.animationFrameDisposable.dispose(), this.animationFrameDisposable = null)
- }, e.prototype.acceptScrollDimensions = function (e) {
- this.to = e.withScrollPosition(this.to), this._initAnimations()
- }, e.prototype.tick = function () {
- return this._tick(Date.now())
- }, e.prototype._tick = function (e) {
- var t = (e - this._startTime) / this.duration;
- if (t < 1) {
- var n = this.scrollLeft(t), i = this.scrollTop(t);
- return new a(n, i, !1)
- }
- return new a(this.to.scrollLeft, this.to.scrollTop, !0)
- }, e.prototype.combine = function (t, n, i) {
- return e.start(t, n, i)
- }, e.start = function (t, n, i) {
- return i += 10, new e(t, n, Date.now() - 10, i)
- }, e
- }();
- t.SmoothScrollingOperation = u
- })), define(n[132], i([0, 1, 16]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = n.globals.performance && "function" == typeof n.globals.performance.now, o = function () {
- function e(e) {
- this._highResolution = i && e, this._startTime = this._now(), this._stopTime = -1
- }
- return e.create = function (t) {
- return void 0 === t && (t = !0), new e(t)
- }, e.prototype.stop = function () {
- this._stopTime = this._now()
- }, e.prototype.elapsed = function () {
- return -1 !== this._stopTime ? this._stopTime - this._startTime : this._now() - this._startTime
- }, e.prototype._now = function () {
- return this._highResolution ? n.globals.performance.now() : (new Date).getTime()
- }, e
- }();
- t.StopWatch = o
- })), define(n[5], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.isFalsyOrWhitespace = function (e) {
- return !e || "string" != typeof e || 0 === e.trim().length
- }, t.pad = function (e, t, n) {
- void 0 === n && (n = "0")
- ;
- for (var i = "" + e, o = [i], r = i.length; r < t; r++) o.push(n);
- return o.reverse().join("")
- };
- var n = /{(\d+)}/g;
- function i(e) {
- return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&")
- }
- function o(e, t) {
- if (!e || !t) return e;
- var n = t.length;
- if (0 === n || 0 === e.length) return e;
- for (var i = 0; e.indexOf(t, i) === i;) i += n;
- return e.substring(i)
- }
- function r(e, t) {
- if (!e || !t) return e;
- var n = t.length, i = e.length;
- if (0 === n || 0 === i) return e;
- for (var o = i, r = -1; -1 !== (r = e.lastIndexOf(t, o - 1)) && r + n === o;) {
- if (0 === r) return "";
- o = r
- }
- return e.substring(0, o)
- }
- function s(e, t) {
- return e < t ? -1 : e > t ? 1 : 0
- }
- function a(e) {
- return e >= 97 && e <= 122
- }
- function l(e) {
- return e >= 65 && e <= 90
- }
- function u(e) {
- return a(e) || l(e)
- }
- function d(e, t, n) {
- void 0 === n && (n = e.length);
- for (var i = 0; i < n; i++) {
- var o = e.charCodeAt(i), r = t.charCodeAt(i);
- if (o !== r) if (u(o) && u(r)) {
- var s = Math.abs(o - r);
- if (0 !== s && 32 !== s) return !1
- } else if (String.fromCharCode(o).toLowerCase() !== String.fromCharCode(r).toLowerCase()) return !1
- }
- return !0
- }
- function c(e) {
- return 55296 <= e && e <= 56319
- }
- function h(e) {
- return 56320 <= e && e <= 57343
- }
- function p(e, t, n) {
- var i = e.charCodeAt(n);
- if (c(i) && n + 1 < t) {
- var o = e.charCodeAt(n + 1);
- if (h(o)) return o - 56320 + (i - 55296 << 10) + 65536
- }
- return i
- }
- function g(e, t) {
- var n = e.charCodeAt(t - 1);
- if (h(n) && t > 1) {
- var i = e.charCodeAt(t - 2);
- if (c(i)) return n - 56320 + (i - 55296 << 10) + 65536
- }
- return n
- }
- t.format = function (e) {
- for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
- return 0 === t.length ? e : e.replace(n, (function (e, n) {
- var i = parseInt(n, 10);
- return isNaN(i) || i < 0 || i >= t.length ? e : t[i]
- }))
- }, t.escape = function (e) {
- return e.replace(/[<>&]/g, (function (e) {
- switch (e) {
- case"<":
- return "<";
- case">":
- return ">";
- case"&":
- return "&";
- default:
- return e
- }
- }))
- }, t.escapeRegExpCharacters = i, t.trim = function (e, t) {
- return void 0 === t && (t = " "), r(o(e, t), t)
- }, t.ltrim = o, t.rtrim = r, t.convertSimple2RegExpPattern = function (e) {
- return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*")
- }, t.startsWith = function (e, t) {
- if (e.length < t.length) return !1;
- if (e === t) return !0;
- for (var n = 0; n < t.length; n++) if (e[n] !== t[n]) return !1;
- return !0
- }, t.endsWith = function (e, t) {
- var n = e.length - t.length
- ;
- return n > 0 ? e.indexOf(t, n) === n : 0 === n && e === t
- }, t.createRegExp = function (e, t, n) {
- if (void 0 === n && (n = {}), !e) throw new Error("Cannot create regex from empty string");
- t || (e = i(e)), n.wholeWord && (/\B/.test(e.charAt(0)) || (e = "\\b" + e), /\B/.test(e.charAt(e.length - 1)) || (e += "\\b"));
- var o = "";
- return n.global && (o += "g"), n.matchCase || (o += "i"), n.multiline && (o += "m"), n.unicode && (o += "u"), new RegExp(e, o)
- }, t.regExpLeadsToEndlessLoop = function (e) {
- return "^" !== e.source && "^$" !== e.source && "$" !== e.source && "^\\s*$" !== e.source && !(!e.exec("") || 0 !== e.lastIndex)
- }, t.regExpFlags = function (e) {
- return (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.unicode ? "u" : "")
- }, t.firstNonWhitespaceIndex = function (e) {
- for (var t = 0, n = e.length; t < n; t++) {
- var i = e.charCodeAt(t);
- if (32 !== i && 9 !== i) return t
- }
- return -1
- }, t.getLeadingWhitespace = function (e, t, n) {
- void 0 === t && (t = 0), void 0 === n && (n = e.length);
- for (var i = t; i < n; i++) {
- var o = e.charCodeAt(i);
- if (32 !== o && 9 !== o) return e.substring(t, i)
- }
- return e.substring(t, n)
- }, t.lastNonWhitespaceIndex = function (e, t) {
- void 0 === t && (t = e.length - 1);
- for (var n = t; n >= 0; n--) {
- var i = e.charCodeAt(n);
- if (32 !== i && 9 !== i) return n
- }
- return -1
- }, t.compare = s, t.compareIgnoreCase = function (e, t) {
- for (var n = Math.min(e.length, t.length), i = 0; i < n; i++) {
- var o = e.charCodeAt(i), r = t.charCodeAt(i);
- if (o !== r) {
- l(o) && (o += 32), l(r) && (r += 32);
- var u = o - r;
- if (0 !== u) return a(o) && a(r) ? u : s(e.toLowerCase(), t.toLowerCase())
- }
- }
- return e.length < t.length ? -1 : e.length > t.length ? 1 : 0
- }, t.isLowerAsciiLetter = a, t.isUpperAsciiLetter = l, t.equalsIgnoreCase = function (e, t) {
- return e.length === t.length && d(e, t)
- }, t.startsWithIgnoreCase = function (e, t) {
- var n = t.length;
- return !(t.length > e.length) && d(e, t, n)
- }, t.commonPrefixLength = function (e, t) {
- var n, i = Math.min(e.length, t.length);
- for (n = 0; n < i; n++) if (e.charCodeAt(n) !== t.charCodeAt(n)) return n;
- return i
- }, t.commonSuffixLength = function (e, t) {
- var n, i = Math.min(e.length, t.length), o = e.length - 1, r = t.length - 1;
- for (n = 0; n < i; n++) if (e.charCodeAt(o - n) !== t.charCodeAt(r - n)) return n;
- return i
- }, t.isHighSurrogate = c, t.isLowSurrogate = h, t.getNextCodePoint = p, t.nextCharLength = function (e, t) {
- var n = C.getInstance(), i = t, o = e.length, r = p(e, o, t);
- t += r >= 65536 ? 2 : 1;
- for (var s = n.getGraphemeBreakType(r); t < o;) {
- var a = p(e, o, t), l = n.getGraphemeBreakType(a);
- if (y(s, l)) break;
- t += a >= 65536 ? 2 : 1, s = l
- }
- return t - i
- }, t.prevCharLength = function (e, t) {
- var n = C.getInstance(), i = t, o = g(e, t);
- t -= o >= 65536 ? 2 : 1;
- for (var r = n.getGraphemeBreakType(o); t > 0;) {
- var s = g(e, t), a = n.getGraphemeBreakType(s);
- if (y(a, r)) break;
- t -= s >= 65536 ? 2 : 1, r = a
- }
- return i - t
- };
- var f = /(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;
- t.containsRTL = function (e) {
- return f.test(e)
- }
- ;var m = /(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;
- t.containsEmoji = function (e) {
- return m.test(e)
- };
- var v = /^[\t\n\r\x20-\x7E]*$/;
- function _(e) {
- return (e = +e) >= 11904 && e <= 55215 || e >= 63744 && e <= 64255 || e >= 65281 && e <= 65374
- }
- function y(e, t) {
- return 0 === e ? 5 !== t && 7 !== t : (2 !== e || 3 !== t) && (4 === e || 2 === e || 3 === e || (4 === t || 2 === t || 3 === t || (8 !== e || 8 !== t && 9 !== t && 11 !== t && 12 !== t) && ((11 !== e && 9 !== e || 9 !== t && 10 !== t) && ((12 !== e && 10 !== e || 10 !== t) && (5 !== t && 13 !== t && (7 !== t && (1 !== e && ((13 !== e || 14 !== t) && (6 !== e || 6 !== t)))))))))
- }
- t.isBasicASCII = function (e) {
- return v.test(e)
- }, t.containsFullWidthCharacter = function (e) {
- for (var t = 0, n = e.length; t < n; t++) if (_(e.charCodeAt(t))) return !0;
- return !1
- }, t.isFullWidthCharacter = _, t.isEmojiImprecise = function (e) {
- return e >= 127462 && e <= 127487 || e >= 9728 && e <= 10175 || e >= 127744 && e <= 128591 || e >= 128640 && e <= 128764 || e >= 128992 && e <= 129003 || e >= 129280 && e <= 129535 || e >= 129648 && e <= 129651 || e >= 129656 && e <= 129666 || e >= 129680 && e <= 129685
- }, t.UTF8_BOM_CHARACTER = String.fromCharCode(65279), t.startsWithUTF8BOM = function (e) {
- return !!(e && e.length > 0 && 65279 === e.charCodeAt(0))
- }, t.safeBtoa = function (e) {
- return btoa(encodeURIComponent(e))
- }, t.repeat = function (e, t) {
- for (var n = "", i = 0; i < t; i++) n += e;
- return n
- }, t.containsUppercaseCharacter = function (e, t) {
- return void 0 === t && (t = !1), !!e && (t && (e = e.replace(/\\./g, "")), e.toLowerCase() !== e)
- }, t.singleLetterHash = function (e) {
- return (e %= 52) < 26 ? String.fromCharCode(97 + e) : String.fromCharCode(65 + e - 26)
- }, t.getGraphemeBreakType = function (e) {
- return C.getInstance().getGraphemeBreakType(e)
- }, t.breakBetweenGraphemeBreakType = y;
- var C = function () {
- function e() {
- this._data = JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,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,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,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,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,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,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,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,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,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,2259,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,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,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,6848,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,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,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,9776,9783,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,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,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,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,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")
- }
- return e.getInstance = function () {
- return e._INSTANCE || (e._INSTANCE = new e), e._INSTANCE
- }, e.prototype.getGraphemeBreakType = function (e) {
- if (e < 32) return 10 === e ? 3 : 13 === e ? 2 : 4;
- if (e < 127) return 0;
- for (var t = this._data, n = t.length / 3, i = 1; i <= n;) if (e < t[3 * i]) i *= 2; else {
- if (!(e > t[3 * i + 1])) return t[3 * i + 2];
- i = 2 * i + 1
- }
- return 0
- }, e._INSTANCE = null, e
- }()
- })), define(n[177], i([0, 1, 5, 77]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.toSlashes = function (e) {
- return e.replace(/[\\/]/g, i.posix.sep)
- }, t.isEqualOrParent = function (e, t, o, r) {
- if (void 0 === r && (r = i.sep), e === t) return !0;
- if (!e || !t) return !1;
- if (t.length > e.length) return !1;
- if (o) {
- if (!n.startsWithIgnoreCase(e, t)) return !1;
- if (t.length === e.length) return !0;
- var s = t.length;
- return t.charAt(t.length - 1) === r && s--, e.charAt(s) === r
- }
- return t.charAt(t.length - 1) !== r && (t += r), 0 === e.indexOf(t)
- }, t.isWindowsDriveLetter = function (e) {
- return e >= 65 && e <= 90 || e >= 97 && e <= 122
- }
- })), define(n[61], i([0, 1, 38, 5]), (function (e, t, n, i) {
- "use strict";
- function o() {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return function (t, n) {
- for (var i = 0, o = e.length; i < o; i++) {
- var r = e[i](t, n);
- if (r) return r
- }
- return null
- }
- }
- function r(e, t) {
- var n = t.toLowerCase().indexOf(e.toLowerCase());
- return -1 === n ? null : [{start: n, end: n + e.length}]
- }
- function s(e, t) {
- return function e(t, n, i, o) {
- if (i === t.length) return [];
- if (o === n.length) return null;
- if (t[i] === n[o]) {
- var r;
- return (r = e(t, n, i + 1, o + 1)) ? p({start: o, end: o + 1}, r) : null
- }
- return e(t, n, i, o + 1)
- }(e.toLowerCase(), t.toLowerCase(), 0, 0)
- }
- function a(e) {
- return 97 <= e && e <= 122
- }
- function l(e) {
- return 65 <= e && e <= 90
- }
- function u(e) {
- return 48 <= e && e <= 57
- }
- function d(e) {
- return 32 === e || 9 === e || 10 === e || 13 === e
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.or = o, t.matchesPrefix = function (e, t, n) {
- if (!n || n.length < t.length) return null;
- var o;
- o = e ? i.startsWithIgnoreCase(n, t) : 0 === n.indexOf(t);
- if (!o) return null;
- return t.length > 0 ? [{start: 0, end: t.length}] : []
- }.bind(void 0, !0), t.matchesContiguousSubString = r, t.matchesSubString = s, t.isUpper = l;
- var c = new Set;
- function h(e) {
- return a(e) || l(e) || u(e)
- }
- function p(e, t) {
- return 0 === t.length ? t = [e] : e.end === t[0].start ? t[0].start = e.start : t.unshift(e), t
- }
- function g(e, t) {
- for (var n = t; n < e.length; n++) {
- var i = e.charCodeAt(n);
- if (l(i) || u(i) || n > 0 && !h(e.charCodeAt(n - 1))) return n
- }
- return e.length
- }
- function f(e, t, n, i) {
- if (n === e.length) return [];
- if (i === t.length) return null;
- if (e[n] !== t[i].toLowerCase()) return null;
- var o = null, r = i + 1;
- for (o = f(e, t, n + 1, i + 1); !o && (r = g(t, r)) < t.length;) o = f(e, t, n + 1, r), r++;
- return null === o ? null : p({start: i, end: i + 1}, o)
- }
- function m(e, t) {
- if (!t) return null;
- if (0 === (t = t.trim()).length) return null;
- if (!function (e) {
- for (var t = 0, n = 0, i = 0, o = 0, r = 0; r < e.length; r++) l(i = e.charCodeAt(r)) && t++, a(i) && n++, d(i) && o++;
- return 0 !== t && 0 !== n || 0 !== o ? t <= 5 : e.length <= 30
- }(e)) return null;
- if (t.length > 60) return null;
- var n = function (e) {
- for (var t = 0, n = 0, i = 0, o = 0, r = 0, s = 0; s < e.length; s++) l(r = e.charCodeAt(s)) && t++, a(r) && n++, h(r) && i++, u(r) && o++;
- return {
- upperPercent: t / e.length,
- lowerPercent: n / e.length,
- alphaPercent: i / e.length,
- numericPercent: o / e.length
- }
- }(t);
- if (!function (e) {
- var t = e.upperPercent, n = e.lowerPercent, i = e.alphaPercent, o = e.numericPercent;
- return n > .2 && t < .8 && i > .6 && o < .2
- }(n)) {
- if (!function (e) {
- var t = e.upperPercent;
- return 0 === e.lowerPercent && t > .6
- }(n)) return null;
- t = t.toLowerCase()
- }
- var i = null, o = 0;
- for (e = e.toLowerCase(); o < t.length && null === (i = f(e, t, 0, o));) o = g(t, o + 1);
- return i
- }
- "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((function (e) {
- return c.add(e.charCodeAt(0))
- })), t.matchesCamelCase = m;
- var v = o(t.matchesPrefix, m, r), _ = o(t.matchesPrefix, m, s), y = new n.LRUCache(1e4);
- t.matchesFuzzy = function (e, t, n) {
- if (void 0 === n && (n = !1), "string" != typeof e || "string" != typeof t) return null;
- var o = y.get(e);
- o || (o = new RegExp(i.convertSimple2RegExpPattern(e), "i"), y.set(e, o));
- var r = o.exec(t);
- return r ? [{start: r.index, end: r.index + r[0].length}] : n ? _(e, t) : v(e, t)
- }, t.anyScore = function (e, t, n, i, o, r) {
- var s = M(e, t, 0, i, o, 0, !0);
- if (s) return s;
- for (var a = 0, l = 0, u = r, d = 0; d < t.length && d < C; ++d) {
- var c = o.indexOf(t.charAt(d), u);
- if (c >= 0) l += 1, a += Math.pow(2, c), u = c + 1; else if (0 !== a) break
- }
- return [l, a, r]
- }, t.createMatches = function (e) {
- if (void 0 === e) return [];
- for (var t = e[1].toString(2), n = [], i = e[2]; i < C; i++) if ("1" === t[t.length - (i + 1)]) {
- var o = n[n.length - 1];
- o && o.end === i ? o.end = i + 1 : n.push({start: i, end: i + 1})
- }
- return n
- };
- var C = 128;
- function b() {
- for (var e = [], t = [0], n = 1; n <= C; n++) t.push(-n);
- for (n = 0; n <= C; n++) {
- var i = t.slice(0);
- i[0] = -n, e.push(i)
- }
- return e
- }
- var S = b(), w = b(), E = b(), L = !1;
- function D(e, t, n, i, o) {
- function r(e, t, n) {
- for (void 0 === n && (n = " "); e.length < t;) e = n + e;
- return e
- }
- for (var s = " | |" + i.split("").map((function (e) {
- return r(e, 3)
- })).join("|") + "\n", a = 0; a <= n; a++) s += 0 === a ? " |" : t[a - 1] + "|", s += e[a].slice(0, o + 1).map((function (e) {
- return r(e.toString(), 3)
- })).join("|") + "\n";
- return s
- }
- function N(e, t) {
- if (t < 0 || t >= e.length) return !1;
- switch (e.charCodeAt(t)) {
- case 95:
- case 45:
- case 46:
- case 32:
- case 47:
- case 92:
- case 39:
- case 34:
- case 58:
- case 36:
- return !0;
- default:
- return !1
- }
- }
- function x(e, t, n) {
- return t[e] !== n[e]
- }
- function I(e, t, n, i, o, r) {
- for (; t < n && o < r;) e[t] === i[o] && (t += 1), o += 1;
- return t === n
- }
- function M(e, t, n, i, o, r, s) {
- var a = e.length > C ? C : e.length, l = i.length > C ? C : i.length
- ;
- if (!(n >= a || r >= l || a - n > l - r) && I(t, n, a, o, r, l)) {
- var u = 1, d = 1, c = n, h = r;
- for (u = 1, c = n; c < a; u++, c++) for (d = 1, h = r; h < l; d++, h++) {
- var p = k(e, t, c, n, i, o, h);
- w[u][d] = p;
- var g = S[u - 1][d - 1] + (p > 1 ? 1 : p), f = S[u - 1][d] + -1, m = S[u][d - 1] + -1;
- m >= f ? m > g ? (S[u][d] = m, E[u][d] = 4) : m === g ? (S[u][d] = m, E[u][d] = 6) : (S[u][d] = g, E[u][d] = 2) : f > g ? (S[u][d] = f, E[u][d] = 1) : f === g ? (S[u][d] = f, E[u][d] = 3) : (S[u][d] = g, E[u][d] = 2)
- }
- if (L && function (e, t, n, i) {
- e = e.substr(t), n = n.substr(i), console.log(D(S, e, e.length, n, n.length)), console.log(D(E, e, e.length, n, n.length)), console.log(D(w, e, e.length, n, n.length))
- }(e, n, i, r), T = 0, O = -100, P = r, A = s, function e(t, n, i, o, r) {
- if (T >= 10 || i < -25) return;
- var s = 0;
- for (; t > 0 && n > 0;) {
- var a = w[t][n], l = E[t][n];
- if (4 === l) n -= 1, r ? i -= 5 : 0 !== o && (i -= 1), r = !1, s = 0; else {
- if (!(2 & l)) return;
- if (4 & l && e(t, n - 1, 0 !== o ? i - 1 : i, o, r), i += a, t -= 1, n -= 1, r = !0, o += Math.pow(2, n + P), 1 === a) {
- if (s += 1, 0 === t && !A) return
- } else i += 1 + s * (a - 1), s = 0
- }
- }
- i -= n >= 3 ? 9 : 3 * n;
- T += 1;
- i > O && (O = i, R = o)
- }(u - 1, d - 1, a === l ? 1 : 0, 0, !1), 0 !== T) return [O, R, r]
- }
- }
- function k(e, t, n, i, o, r, s) {
- return t[n] !== r[s] ? -1 : s === n - i ? e[n] === o[s] ? 7 : 5 : !x(s, o, r) || 0 !== s && x(s - 1, o, r) ? !N(r, s) || 0 !== s && N(r, s - 1) ? N(r, s - 1) || function (e, t) {
- if (t < 0 || t >= e.length) return !1;
- switch (e.charCodeAt(t)) {
- case 32:
- case 9:
- return !0;
- default:
- return !1
- }
- }(r, s - 1) ? 5 : 1 : 5 : e[n] === o[s] ? 7 : 5
- }
- t.isPatternInWord = I, function (e) {
- e.Default = Object.freeze([-100, 0, 0]), e.isDefault = function (e) {
- return !e || -100 === e[0] && 0 === e[1] && 0 === e[2]
- }
- }(t.FuzzyScore || (t.FuzzyScore = {})), t.fuzzyScore = M;
- var T = 0, R = 0, O = 0, P = 0, A = !1;
- function F(e, t) {
- if (!(t + 1 >= e.length)) {
- var n = e[t], i = e[t + 1];
- if (n !== i) return e.slice(0, t) + i + n + e.slice(t + 2)
- }
- }
- t.fuzzyScoreGracefulAggressive = function (e, t, n, i, o, r, s) {
- return function (e, t, n, i, o, r, s, a) {
- var l = M(e, t, n, i, o, r, a);
- if (l && !s) return l;
- if (e.length >= 3) for (var u = Math.min(7, e.length - 1), d = n + 1; d < u; d++) {
- var c = F(e, d);
- if (c) {
- var h = M(c, c.toLowerCase(), n, i, o, r, a);
- h && (h[0] -= 3, (!l || h[0] > l[0]) && (l = h))
- }
- }
- return l
- }(e, t, n, i, o, r, !0, s)
- }
- })), define(n[178], i([0, 1, 19, 5, 177, 77, 38, 15]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var l = "**", u = "/", d = "[/\\\\]", c = "[^/\\\\]", h = /\//g;
- function p(e) {
- switch (e) {
- case 0:
- return "";
- case 1:
- return c + "*?";
- default:
- return "(?:" + d + "|" + c + "+" + d + "|" + d + c + "+)*?"
- }
- }
- function g(e, t) {
- if (!e) return [];
- for (var n = [], i = !1, o = !1, r = "", s = 0, a = e; s < a.length; s++) {
- var l = a[s];
- switch (l) {
- case t:
- if (!i && !o) {
- n.push(r), r = "";
- continue
- }
- break;
- case"{":
- i = !0;
- break;
- case"}":
- i = !1;
- break;
- case"[":
- o = !0;
- break;
- case"]":
- o = !1
- }
- r += l
- }
- return r && n.push(r), n
- }
- t.splitGlobAware = g;
- var f = /^\*\*\/\*\.[\w\.-]+$/, m = /^\*\*\/([\w\.-]+)\/?$/,
- v = /^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,
- _ = /^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,
- y = /^\*\*((\/[\w\.-]+)+)\/?$/, C = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/, b = new s.LRUCache(1e4),
- S = function () {
- return !1
- }, w = function () {
- return null
- };
- function E(e, t) {
- if (!e) return w;
- var o, r, s = (o = (o = "string" != typeof e ? e.pattern : e).trim()) + "_" + !!t.trimForExclusions,
- a = b.get(s);
- if (a) return L(a, e);
- if (f.test(o)) {
- var h = o.substr(4);
- a = function (e, t) {
- return "string" == typeof e && i.endsWith(e, h) ? o : null
- }
- } else a = (r = m.exec(D(o, t))) ? function (e, t) {
- var n = "/" + e, o = "\\" + e, r = function (r, s) {
- return "string" != typeof r ? null : s ? s === e ? t : null : r === e || i.endsWith(r, n) || i.endsWith(r, o) ? t : null
- }, s = [e];
- return r.basenames = s, r.patterns = [t], r.allBasenames = s, r
- }(r[1], o) : (t.trimForExclusions ? _ : v).test(o) ? function (e, t) {
- var i = M(e.slice(1, -1).split(",").map((function (e) {
- return E(e, t)
- })).filter((function (e) {
- return e !== w
- })), e), o = i.length;
- if (!o) return w;
- if (1 === o) return i[0];
- var r = function (t, n) {
- for (var o = 0, r = i.length; o < r; o++) if (i[o](t, n)) return e;
- return null
- }, s = n.first(i, (function (e) {
- return !!e.allBasenames
- }));
- s && (r.allBasenames = s.allBasenames);
- var a = i.reduce((function (e, t) {
- return t.allPaths ? e.concat(t.allPaths) : e
- }), []);
- a.length && (r.allPaths = a);
- return r
- }(o, t) : (r = y.exec(D(o, t))) ? N(r[1].substr(1), o, !0) : (r = C.exec(D(o, t))) ? N(r[1], o, !1) : function (e) {
- try {
- var t = new RegExp("^" + function e(t) {
- if (!t) return "";
- var n = "", o = g(t, u);
- if (o.every((function (e) {
- return e === l
- }))) n = ".*"; else {
- var r = !1;
- o.forEach((function (t, s) {
- if (t !== l) {
- for (var a = !1, h = "", f = !1, m = "", v = 0, _ = t; v < _.length; v++) {
- var y = _[v];
- if ("}" !== y && a) h += y; else if (!f || "]" === y && m) switch (y) {
- case"{":
- a = !0;
- continue;
- case"[":
- f = !0;
- continue;
- case"}":
- var C = "(?:" + g(h, ",").map((function (t) {
- return e(t)
- })).join("|") + ")";
- n += C, a = !1, h = "";
- break;
- case"]":
- n += "[" + m + "]", f = !1, m = "";
- break;
- case"?":
- n += c;
- continue;
- case"*":
- n += p(1);
- continue;
- default:
- n += i.escapeRegExpCharacters(y)
- } else {
- m += "-" === y ? y : "^" !== y && "!" !== y || m ? y === u ? "" : i.escapeRegExpCharacters(y) : "^"
- }
- }
- s < o.length - 1 && (o[s + 1] !== l || s + 2 < o.length) && (n += d), r = !1
- } else r || (n += p(2), r = !0)
- }))
- }
- return n
- }(e) + "$");
- return function (n, i) {
- return t.lastIndex = 0, "string" == typeof n && t.test(n) ? e : null
- }
- } catch (e) {
- return w
- }
- }(o);
- return b.set(s, a), L(a, e)
- }
- function L(e, t) {
- return "string" == typeof t ? e : function (n, i) {
- return o.isEqualOrParent(n, t.base) ? e(r.relative(t.base, n), i) : null
- }
- }
- function D(e, t) {
- return t.trimForExclusions && i.endsWith(e, "/**") ? e.substr(0, e.length - 2) : e
- }
- function N(e, t, n) {
- var o = r.sep !== r.posix.sep ? e.replace(h, r.sep) : e, s = r.sep + o, a = n ? function (e, n) {
- return "string" != typeof e || e !== o && !i.endsWith(e, s) ? null : t
- } : function (e, n) {
- return "string" == typeof e && e === o ? t : null
- };
- return a.allPaths = [(n ? "*/" : "./") + e], a
- }
- function x(e, t) {
- if (void 0 === t && (t = {}), !e) return S;
- if ("string" == typeof e || I(e)) {
- var i = E(e, t);
- if (i === w) return S;
- var o = function (e, t) {
- return !!i(e, t)
- };
- return i.allBasenames && (o.allBasenames = i.allBasenames), i.allPaths && (o.allPaths = i.allPaths), o
- }
- return function (e, t) {
- var i = M(Object.getOwnPropertyNames(e).map((function (n) {
- return function (e, t, n) {
- if (!1 === t) return w;
- var i = E(e, n);
- if (i === w) return w;
- if ("boolean" == typeof t) return i;
- if (t) {
- var o = t.when;
- if ("string" == typeof o) {
- var r = function (t, n, r, s) {
- if (!s || !i(t, n)) return null;
- var l = s(o.replace("$(basename)", r));
- return a.isThenable(l) ? l.then((function (t) {
- return t ? e : null
- })) : l ? e : null
- };
- return r.requiresSiblings = !0, r
- }
- }
- return i
- }(n, e[n], t)
- })).filter((function (e) {
- return e !== w
- }))), o = i.length;
- if (!o) return w;
- if (!i.some((function (e) {
- return !!e.requiresSiblings
- }))) {
- if (1 === o) return i[0];
- var s = function (e, t) {
- for (var n = 0, o = i.length; n < o; n++) {
- var r = i[n](e, t);
- if (r) return r
- }
- return null
- }, l = n.first(i, (function (e) {
- return !!e.allBasenames
- }));
- l && (s.allBasenames = l.allBasenames);
- var u = i.reduce((function (e, t) {
- return t.allPaths ? e.concat(t.allPaths) : e
- }), []);
- return u.length && (s.allPaths = u), s
- }
- var d = function (e, t, n) {
- for (var o = void 0, s = 0, a = i.length; s < a; s++) {
- var l = i[s];
- l.requiresSiblings && n && (t || (t = r.basename(e)), o || (o = t.substr(0, t.length - r.extname(e).length)));
- var u = l(e, t, o, n);
- if (u) return u
- }
- return null
- }, c = n.first(i, (function (e) {
- return !!e.allBasenames
- }));
- c && (d.allBasenames = c.allBasenames);
- var h = i.reduce((function (e, t) {
- return t.allPaths ? e.concat(t.allPaths) : e
- }), []);
- h.length && (d.allPaths = h);
- return d
- }(e, t)
- }
- function I(e) {
- var t = e;
- return t && "string" == typeof t.base && "string" == typeof t.pattern
- }
- function M(e, t) {
- var n = e.filter((function (e) {
- return !!e.basenames
- }));
- if (n.length < 2) return e;
- var i, o = n.reduce((function (e, t) {
- var n = t.basenames;
- return n ? e.concat(n) : e
- }), []);
- if (t) {
- i = [];
- for (var r = 0, s = o.length; r < s; r++) i.push(t)
- } else i = n.reduce((function (e, t) {
- var n = t.patterns
- ;
- return n ? e.concat(n) : e
- }), []);
- var a = function (e, t) {
- if ("string" != typeof e) return null;
- if (!t) {
- var n = void 0;
- for (n = e.length; n > 0; n--) {
- var r = e.charCodeAt(n - 1);
- if (47 === r || 92 === r) break
- }
- t = e.substr(n)
- }
- var s = o.indexOf(t);
- return -1 !== s ? i[s] : null
- };
- a.basenames = o, a.patterns = i, a.allBasenames = o;
- var l = e.filter((function (e) {
- return !e.basenames
- }));
- return l.push(a), l
- }
- t.match = function (e, t, n) {
- return !(!e || "string" != typeof t) && x(e)(t, void 0, n)
- }, t.parse = x, t.isRelativePattern = I
- })), define(n[247], i([0, 1, 5]), (function (e, t, n) {
- "use strict";
- function i(e, t) {
- if (e && "" !== e[0]) {
- var i = o(e, t, "-"), s = o(e, t, "_");
- return i && !s ? r(e, t, "-") : !i && s ? r(e, t, "_") : e[0].toUpperCase() === e[0] ? t.toUpperCase() : e[0].toLowerCase() === e[0] ? t.toLowerCase() : n.containsUppercaseCharacter(e[0][0]) ? t[0].toUpperCase() + t.substr(1) : t
- }
- return t
- }
- function o(e, t, n) {
- return -1 !== e[0].indexOf(n) && -1 !== t.indexOf(n) && e[0].split(n).length === t.split(n).length
- }
- function r(e, t, n) {
- var o = t.split(n), r = e[0].split(n), s = "";
- return o.forEach((function (e, t) {
- s += i([r[t]], e) + n
- })), s.slice(0, -1)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.buildReplaceStringWithCasePreserved = i
- })), define(n[21], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = {number: "number", string: "string", undefined: "undefined", object: "object", function: "function"};
- function i(e) {
- return typeof e === n.string || e instanceof String
- }
- function o(e) {
- return !(typeof e !== n.object || null === e || Array.isArray(e) || e instanceof RegExp || e instanceof Date)
- }
- function r(e) {
- return typeof e === n.undefined
- }
- function s(e) {
- return r(e) || null === e
- }
- t.isArray = function (e) {
- return Array.isArray ? Array.isArray(e) : !(!e || typeof e.length !== n.number || e.constructor !== Array)
- }, t.isString = i, t.isObject = o, t.isNumber = function (e) {
- return (typeof e === n.number || e instanceof Number) && !isNaN(e)
- }, t.isBoolean = function (e) {
- return !0 === e || !1 === e
- }, t.isUndefined = r, t.isUndefinedOrNull = s, t.assertType = function (e, t) {
- if (!e) throw new Error(t ? "Unexpected type, expected '" + t + "'" : "Unexpected type")
- };
- var a = Object.prototype.hasOwnProperty;
- function l(e) {
- return typeof e === n.function
- }
- function u(e, t) {
- if (i(t)) {
- if (typeof e !== t) throw new Error("argument does not match constraint: typeof " + t)
- } else if (l(t)) {
- try {
- if (e instanceof t) return
- } catch (e) {
- }
- if (!s(e) && e.constructor === t) return;
- if (1 === t.length && !0 === t.call(void 0, e)) return;
- throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")
- }
- }
- function d(e) {
- for (var t = [], n = Object.getPrototypeOf(e); Object.prototype !== n;) t = t.concat(Object.getOwnPropertyNames(n)), n = Object.getPrototypeOf(n);
- return t
- }
- t.isEmptyObject = function (e) {
- if (!o(e)) return !1;
- for (var t in e) if (a.call(e, t)) return !1;
- return !0
- }, t.isFunction = l, t.validateConstraints = function (e, t) {
- for (var n = Math.min(e.length, t.length), i = 0; i < n; i++) u(e[i], t[i])
- }, t.validateConstraint = u, t.getAllPropertyNames = d, t.getAllMethodNames = function (e) {
- for (var t = [], n = 0, i = d(e); n < i.length; n++) {
- var o = i[n];
- "function" == typeof e[o] && t.push(o)
- }
- return t
- }, t.createProxyObject = function (e, t) {
- for (var n = function (e) {
- return function () {
- var n = Array.prototype.slice.call(arguments, 0);
- return t(e, n)
- }
- }, i = {}, o = 0, r = e; o < r.length; o++) {
- var s = r[o];
- i[s] = n(s)
- }
- return i
- }, t.withNullAsUndefined = function (e) {
- return null === e ? void 0 : e
- }, t.withUndefinedAsNull = function (e) {
- return void 0 === e ? null : e
- }
- })), define(n[31], i([0, 1, 21]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.deepClone = function e(t) {
- if (!t || "object" != typeof t) return t;
- if (t instanceof RegExp) return t;
- var n = Array.isArray(t) ? [] : {};
- return Object.keys(t).forEach((function (i) {
- t[i] && "object" == typeof t[i] ? n[i] = e(t[i]) : n[i] = t[i]
- })), n
- }, t.deepFreeze = function (e) {
- if (!e || "object" != typeof e) return e;
- for (var t = [e]; t.length > 0;) {
- var n = t.shift();
- for (var o in Object.freeze(n), n) if (i.call(n, o)) {
- var r = n[o];
- "object" != typeof r || Object.isFrozen(r) || t.push(r)
- }
- }
- return e
- };
- var i = Object.prototype.hasOwnProperty;
- t.cloneAndChange = function (e, t) {
- return function e(t, o, r) {
- if (n.isUndefinedOrNull(t)) return t;
- var s = o(t);
- if (void 0 !== s) return s;
- if (n.isArray(t)) {
- for (var a = [], l = 0, u = t; l < u.length; l++) {
- var d = u[l];
- a.push(e(d, o, r))
- }
- return a
- }
- if (n.isObject(t)) {
- if (r.has(t)) throw new Error("Cannot clone recursive data-structure");
- r.add(t);
- var c = {};
- for (var h in t) i.call(t, h) && (c[h] = e(t[h], o, r));
- return r.delete(t), c
- }
- return t
- }(e, t, new Set)
- }, t.mixin = function e(t, i, o) {
- return void 0 === o && (o = !0), n.isObject(t) ? (n.isObject(i) && Object.keys(i).forEach((function (r) {
- r in t ? o && (n.isObject(t[r]) && n.isObject(i[r]) ? e(t[r], i[r], o) : t[r] = i[r]) : t[r] = i[r]
- })), t) : i
- }, t.assign = function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- return t.forEach((function (t) {
- return Object.keys(t).forEach((function (n) {
- return e[n] = t[n]
- }))
- })), e
- }, t.equals = function e(t, n) {
- if (t === n) return !0;
- if (null == t || null == n) return !1;
- if (typeof t != typeof n) return !1;
- if ("object" != typeof t) return !1;
- if (Array.isArray(t) !== Array.isArray(n)) return !1;
- var i, o;
- if (Array.isArray(t)) {
- if (t.length !== n.length) return !1;
- for (i = 0; i < t.length; i++) if (!e(t[i], n[i])) return !1
- } else {
- var r = [];
- for (o in t) r.push(o);
- r.sort();
- var s = []
- ;
- for (o in n) s.push(o);
- if (s.sort(), !e(r, s)) return !1;
- for (i = 0; i < r.length; i++) if (!e(t[r[i]], n[r[i]])) return !1
- }
- return !0
- }, t.getOrDefault = function (e, t, n) {
- var i = t(e);
- return void 0 === i ? n : i
- }
- })), define(n[133], i([0, 1, 31, 100, 5]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e, t) {
- this.supportCodicons = t, this.text = "", this.title = "", this.highlights = [], this.didEverRender = !1, this.domNode = document.createElement("span"), this.domNode.className = "monaco-highlighted-label", e.appendChild(this.domNode)
- }
- return Object.defineProperty(e.prototype, "element", {
- get: function () {
- return this.domNode
- }, enumerable: !0, configurable: !0
- }), e.prototype.set = function (t, i, o, r) {
- void 0 === i && (i = []), void 0 === o && (o = ""), t || (t = ""), r && (t = e.escapeNewLines(t, i)), this.didEverRender && this.text === t && this.title === o && n.equals(this.highlights, i) || (Array.isArray(i) || (i = []), this.text = t, this.title = o, this.highlights = i, this.render())
- }, e.prototype.render = function () {
- for (var e = "", t = 0, n = 0, r = this.highlights; n < r.length; n++) {
- var s = r[n];
- if (s.end !== s.start) {
- if (t < s.start) {
- e += "<span>";
- var a = this.text.substring(t, s.start);
- e += this.supportCodicons ? i.renderCodicons(o.escape(a)) : o.escape(a), e += "</span>", t = s.end
- }
- s.extraClasses ? e += '<span class="highlight ' + s.extraClasses + '">' : e += '<span class="highlight">';
- var l = this.text.substring(s.start, s.end);
- e += this.supportCodicons ? i.renderCodicons(o.escape(l)) : o.escape(l), e += "</span>", t = s.end
- }
- }
- if (t < this.text.length) {
- e += "<span>";
- l = this.text.substring(t);
- e += this.supportCodicons ? i.renderCodicons(o.escape(l)) : o.escape(l), e += "</span>"
- }
- this.domNode.innerHTML = e, this.title ? this.domNode.title = this.title : this.domNode.removeAttribute("title"), this.didEverRender = !0
- }, e.escapeNewLines = function (e, t) {
- var n = 0, i = 0;
- return e.replace(/\r\n|\r|\n/g, (function (e, o) {
- i = "\r\n" === e ? -1 : 0, o += n;
- for (var r = 0, s = t; r < s.length; r++) {
- var a = s[r];
- a.end <= o || (a.start >= o && (a.start += i), a.end >= o && (a.end += i))
- }
- return n += i, "⏎"
- }))
- }, e
- }();
- t.HighlightedLabel = r
- })),
- define(n[179], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.toUint8 = function (e) {
- return e < 0 ? 0 : e > 255 ? 255 : 0 | e
- }, t.toUint32 = function (e) {
- return e < 0 ? 0 : e > 4294967295 ? 4294967295 : 0 | e
- }
- })), define(n[25], i([0, 1, 16]), (function (e, t, n) {
- "use strict";
- var i;
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = /^\w[\w\d+.-]*$/, s = /^\//, a = /^\/\//;
- var l = "", u = "/", d = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, c = function () {
- function e(e, t, n, i, r, d) {
- void 0 === d && (d = !1), "object" == typeof e ? (this.scheme = e.scheme || l, this.authority = e.authority || l, this.path = e.path || l, this.query = e.query || l, this.fragment = e.fragment || l) : (this.scheme = function (e, t) {
- return e || t ? e : "file"
- }(e, d), this.authority = t || l, this.path = function (e, t) {
- switch (e) {
- case"https":
- case"http":
- case"file":
- t ? t[0] !== u && (t = u + t) : t = u
- }
- return t
- }(this.scheme, n || l), this.query = i || l, this.fragment = r || l, function (e, t) {
- if (!e.scheme && t) throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "' + e.authority + '", path: "' + e.path + '", query: "' + e.query + '", fragment: "' + e.fragment + '"}');
- if (e.scheme && !o.test(e.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
- if (e.path) if (e.authority) {
- if (!s.test(e.path)) 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')
- } else if (a.test(e.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')
- }(this, d))
- }
- return e.isUri = function (t) {
- return t instanceof e || !!t && ("string" == typeof t.authority && "string" == typeof t.fragment && "string" == typeof t.path && "string" == typeof t.query && "string" == typeof t.scheme && "function" == typeof t.fsPath && "function" == typeof t.with && "function" == typeof t.toString)
- }, Object.defineProperty(e.prototype, "fsPath", {
- get: function () {
- return v(this)
- }, enumerable: !0,
- configurable: !0
- }), e.prototype.with = function (e) {
- if (!e) return this;
- var t = e.scheme, n = e.authority, i = e.path, o = e.query, r = e.fragment;
- return void 0 === t ? t = this.scheme : null === t && (t = l), void 0 === n ? n = this.authority : null === n && (n = l), void 0 === i ? i = this.path : null === i && (i = l), void 0 === o ? o = this.query : null === o && (o = l), void 0 === r ? r = this.fragment : null === r && (r = l), t === this.scheme && n === this.authority && i === this.path && o === this.query && r === this.fragment ? this : new p(t, n, i, o, r)
- }, e.parse = function (e, t) {
- void 0 === t && (t = !1);
- var n = d.exec(e);
- return n ? new p(n[2] || l, C(n[4] || l), C(n[5] || l), C(n[7] || l), C(n[9] || l), t) : new p(l, l, l, l, l)
- }, e.file = function (e) {
- var t = l;
- if (n.isWindows && (e = e.replace(/\\/g, u)), e[0] === u && e[1] === u) {
- var i = e.indexOf(u, 2);
- -1 === i ? (t = e.substring(2), e = u) : (t = e.substring(2, i), e = e.substring(i) || u)
- }
- return new p("file", t, e, l, l)
- }, e.from = function (e) {
- return new p(e.scheme, e.authority, e.path, e.query, e.fragment)
- }, e.prototype.toString = function (e) {
- return void 0 === e && (e = !1), _(this, e)
- }, e.prototype.toJSON = function () {
- return this
- }, e.revive = function (t) {
- if (t) {
- if (t instanceof e) return t;
- var n = new p(t);
- return n._formatted = t.external, n._fsPath = t._sep === h ? t.fsPath : null, n
- }
- return t
- }, e
- }();
- t.URI = c;
- var h = n.isWindows ? 1 : void 0, p = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t._formatted = null, t._fsPath = null, t
- }
- return r(t, e), Object.defineProperty(t.prototype, "fsPath", {
- get: function () {
- return this._fsPath || (this._fsPath = v(this)), this._fsPath
- }, enumerable: !0, configurable: !0
- }), t.prototype.toString = function (e) {
- return void 0 === e && (e = !1), e ? _(this, !0) : (this._formatted || (this._formatted = _(this, !1)), this._formatted)
- }, t.prototype.toJSON = function () {
- var e = {$mid: 1};
- return this._fsPath && (e.fsPath = this._fsPath, e._sep = h), this._formatted && (e.external = this._formatted), this.path && (e.path = this.path), this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = this.authority), this.query && (e.query = this.query), this.fragment && (e.fragment = this.fragment), e
- }, t
- }(c),
- g = ((i = {})[58] = "%3A", i[47] = "%2F", i[63] = "%3F", i[35] = "%23", i[91] = "%5B", i[93] = "%5D", i[64] = "%40", i[33] = "%21",
- i[36] = "%24", i[38] = "%26", i[39] = "%27", i[40] = "%28", i[41] = "%29", i[42] = "%2A", i[43] = "%2B", i[44] = "%2C", i[59] = "%3B", i[61] = "%3D", i[32] = "%20", i);
- function f(e, t) {
- for (var n = void 0, i = -1, o = 0; o < e.length; o++) {
- var r = e.charCodeAt(o);
- if (r >= 97 && r <= 122 || r >= 65 && r <= 90 || r >= 48 && r <= 57 || 45 === r || 46 === r || 95 === r || 126 === r || t && 47 === r) -1 !== i && (n += encodeURIComponent(e.substring(i, o)), i = -1), void 0 !== n && (n += e.charAt(o)); else {
- void 0 === n && (n = e.substr(0, o));
- var s = g[r];
- void 0 !== s ? (-1 !== i && (n += encodeURIComponent(e.substring(i, o)), i = -1), n += s) : -1 === i && (i = o)
- }
- }
- return -1 !== i && (n += encodeURIComponent(e.substring(i))), void 0 !== n ? n : e
- }
- function m(e) {
- for (var t = void 0, n = 0; n < e.length; n++) {
- var i = e.charCodeAt(n);
- 35 === i || 63 === i ? (void 0 === t && (t = e.substr(0, n)), t += g[i]) : void 0 !== t && (t += e[n])
- }
- return void 0 !== t ? t : e
- }
- function v(e) {
- var t
- ;
- return t = e.authority && e.path.length > 1 && "file" === e.scheme ? "//" + e.authority + e.path : 47 === e.path.charCodeAt(0) && (e.path.charCodeAt(1) >= 65 && e.path.charCodeAt(1) <= 90 || e.path.charCodeAt(1) >= 97 && e.path.charCodeAt(1) <= 122) && 58 === e.path.charCodeAt(2) ? e.path[1].toLowerCase() + e.path.substr(2) : e.path, n.isWindows && (t = t.replace(/\//g, "\\")), t
- }
- function _(e, t) {
- var n = t ? m : f, i = "", o = e.scheme, r = e.authority, s = e.path, a = e.query, l = e.fragment;
- if (o && (i += o, i += ":"), (r || "file" === o) && (i += u, i += u), r) {
- var d = r.indexOf("@");
- if (-1 !== d) {
- var c = r.substr(0, d);
- r = r.substr(d + 1), -1 === (d = c.indexOf(":")) ? i += n(c, !1) : (i += n(c.substr(0, d), !1), i += ":", i += n(c.substr(d + 1), !1)), i += "@"
- }
- -1 === (d = (r = r.toLowerCase()).indexOf(":")) ? i += n(r, !1) : (i += n(r.substr(0, d), !1), i += r.substr(d))
- }
- if (s) {
- if (s.length >= 3 && 47 === s.charCodeAt(0) && 58 === s.charCodeAt(2)) (h = s.charCodeAt(1)) >= 65 && h <= 90 && (s = "/" + String.fromCharCode(h + 32) + ":" + s.substr(3)); else if (s.length >= 2 && 58 === s.charCodeAt(1)) {
- var h;
- (h = s.charCodeAt(0)) >= 65 && h <= 90 && (s = String.fromCharCode(h + 32) + ":" + s.substr(2))
- }
- i += n(s, !0)
- }
- return a && (i += "?", i += n(a, !1)), l && (i += "#", i += t ? l : f(l, !1)), i
- }
- var y = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
- function C(e) {
- return e.match(y) ? e.replace(y, (function (e) {
- return function e(t) {
- try {
- return decodeURIComponent(t)
- } catch (n) {
- return t.length > 3 ? t.substr(0, 3) + e(t.substr(3)) : t
- }
- }(e)
- })) : e
- }
- })), define(n[180], i([0, 1, 25]), (function (e, t, n) {
- "use strict";
- function i(e, t) {
- if (void 0 === t && (t = 0), !e || t > 200) return e;
- if ("object" == typeof e) {
- switch (e.$mid) {
- case 1:
- return n.URI.revive(e);
- case 2:
- return new RegExp(e.source, e.flags)
- }
- for (var o in e) Object.hasOwnProperty.call(e, o) && (e[o] = i(e[o], t + 1))
- }
- return e
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.parse = function (e) {
- var t = JSON.parse(e);
- return t = i(t)
- }, t.revive = i
- })), define(n[46], i([0, 1, 25, 16]), (function (e, t, n, i) {
- "use strict";
- var o;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.inMemory = "inmemory", e.vscode = "vscode", e.internal = "private", e.walkThrough = "walkThrough", e.walkThroughSnippet = "walkThroughSnippet", e.http = "http", e.https = "https", e.file = "file", e.mailto = "mailto",
- e.untitled = "untitled", e.data = "data", e.command = "command", e.vscodeRemote = "vscode-remote", e.vscodeRemoteResource = "vscode-remote-resource", e.userData = "vscode-userdata"
- }(o = t.Schemas || (t.Schemas = {}));
- var r = function () {
- function e() {
- this._hosts = Object.create(null), this._ports = Object.create(null), this._connectionTokens = Object.create(null), this._preferredWebSchema = "http", this._delegate = null
- }
- return e.prototype.setPreferredWebSchema = function (e) {
- this._preferredWebSchema = e
- }, e.prototype.rewrite = function (e) {
- if (this._delegate) return this._delegate(e);
- var t = e.authority, r = this._hosts[t];
- r && -1 !== r.indexOf(":") && (r = "[" + r + "]");
- var s = this._ports[t], a = this._connectionTokens[t], l = "path=" + encodeURIComponent(e.path);
- return "string" == typeof a && (l += "&tkn=" + encodeURIComponent(a)), n.URI.from({
- scheme: i.isWeb ? this._preferredWebSchema : o.vscodeRemoteResource,
- authority: r + ":" + s,
- path: "/vscode-remote-resource",
- query: l
- })
- }, e
- }();
- t.RemoteAuthorities = new r
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[6], i([0, 1, 24, 52, 56, 45, 15, 10, 4, 2, 16, 19, 46, 88]), (function (e, t, n, i, o, s, u, d, c, h, p, g, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.clearNode = function (e) {
- for (; e.firstChild;) e.removeChild(e.firstChild)
- }, t.removeNode = function (e) {
- e.parentNode && e.parentNode.removeChild(e)
- }, t.isInDOM = function (e) {
- for (; e;) {
- if (e === document.body) return !0;
- e = e.parentNode || e.host
- }
- return !1
- };
- var v = new (function () {
- function e() {
- this._lastStart = -1, this._lastEnd = -1
- }
- return e.prototype._findClassName = function (e, t) {
- var n = e.className;
- if (n) {
- t = t.trim();
- var i = n.length, o = t.length;
- if (0 !== o) if (i < o) this._lastStart = -1; else {
- if (n === t) return this._lastStart = 0, void (this._lastEnd = i);
- for (var r, s = -1; (s = n.indexOf(t, s + 1)) >= 0;) {
- if (r = s + o, (0 === s || 32 === n.charCodeAt(s - 1)) && 32 === n.charCodeAt(r)) return this._lastStart = s, void (this._lastEnd = r + 1)
- ;
- if (s > 0 && 32 === n.charCodeAt(s - 1) && r === i) return this._lastStart = s - 1, void (this._lastEnd = r);
- if (0 === s && r === i) return this._lastStart = 0, void (this._lastEnd = r)
- }
- this._lastStart = -1
- } else this._lastStart = -1
- } else this._lastStart = -1
- }, e.prototype.hasClass = function (e, t) {
- return this._findClassName(e, t), -1 !== this._lastStart
- }, e.prototype.addClasses = function (e) {
- for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
- n.forEach((function (n) {
- return n.split(" ").forEach((function (n) {
- return t.addClass(e, n)
- }))
- }))
- }, e.prototype.addClass = function (e, t) {
- e.className ? (this._findClassName(e, t), -1 === this._lastStart && (e.className = e.className + " " + t)) : e.className = t
- }, e.prototype.removeClass = function (e, t) {
- this._findClassName(e, t), -1 !== this._lastStart && (e.className = e.className.substring(0, this._lastStart) + e.className.substring(this._lastEnd))
- }, e.prototype.removeClasses = function (e) {
- for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
- n.forEach((function (n) {
- return n.split(" ").forEach((function (n) {
- return t.removeClass(e, n)
- }))
- }))
- }, e.prototype.toggleClass = function (e, t, n) {
- this._findClassName(e, t), -1 === this._lastStart || void 0 !== n && n || this.removeClass(e, t), -1 !== this._lastStart || void 0 !== n && !n || this.addClass(e, t)
- }, e
- }()), _ = new (function () {
- function e() {
- }
- return e.prototype.hasClass = function (e, t) {
- return Boolean(t) && e.classList && e.classList.contains(t)
- }, e.prototype.addClasses = function (e) {
- for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
- n.forEach((function (n) {
- return n.split(" ").forEach((function (n) {
- return t.addClass(e, n)
- }))
- }))
- }, e.prototype.addClass = function (e, t) {
- t && e.classList && e.classList.add(t)
- }, e.prototype.removeClass = function (e, t) {
- t && e.classList && e.classList.remove(t)
- }, e.prototype.removeClasses = function (e) {
- for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
- n.forEach((function (n) {
- return n.split(" ").forEach((function (n) {
- return t.removeClass(e, n)
- }))
- }))
- }, e.prototype.toggleClass = function (e, t, n) {
- e.classList && e.classList.toggle(t, n)
- }, e
- }()), y = n.isIE ? v : _;
- t.hasClass = y.hasClass.bind(y),
- t.addClass = y.addClass.bind(y), t.addClasses = y.addClasses.bind(y), t.removeClass = y.removeClass.bind(y), t.removeClasses = y.removeClasses.bind(y), t.toggleClass = y.toggleClass.bind(y);
- var C = function () {
- function e(e, t, n, i) {
- this._node = e, this._type = t, this._handler = n, this._options = i || !1, this._node.addEventListener(this._type, this._handler, this._options)
- }
- return e.prototype.dispose = function () {
- this._handler && (this._node.removeEventListener(this._type, this._handler, this._options), this._node = null, this._handler = null)
- }, e
- }();
- function b(e, t, n, i) {
- return new C(e, t, n, i)
- }
- function S(e) {
- return function (t) {
- return e(new s.StandardMouseEvent(t))
- }
- }
- function w(e, n, i) {
- return b(e, p.isIOS && m.BrowserFeatures.pointerEvents ? t.EventType.POINTER_DOWN : t.EventType.MOUSE_DOWN, n, i)
- }
- t.addDisposableListener = b, t.addStandardDisposableListener = function (e, t, n, i) {
- var r = n;
- return "click" === t || "mousedown" === t ? r = S(n) : "keydown" !== t && "keypress" !== t && "keyup" !== t || (r = function (e) {
- return function (t) {
- return e(new o.StandardKeyboardEvent(t))
- }
- }(n)), b(e, t, r, i)
- },
- t.addStandardDisposableGenericMouseDownListner = function (e, t, n) {
- return w(e, S(t), n)
- }, t.addDisposableGenericMouseDownListner = w, t.addDisposableGenericMouseUpListner = function (e, n, i) {
- return b(e, p.isIOS && m.BrowserFeatures.pointerEvents ? t.EventType.POINTER_UP : t.EventType.MOUSE_UP, n, i)
- }, t.addDisposableNonBubblingMouseOutListener = function (e, t) {
- return b(e, "mouseout", (function (n) {
- for (var i = n.relatedTarget; i && i !== e;) i = i.parentNode;
- i !== e && t(n)
- }))
- }, t.addDisposableNonBubblingPointerOutListener = function (e, t) {
- return b(e, "pointerout", (function (n) {
- for (var i = n.relatedTarget; i && i !== e;) i = i.parentNode;
- i !== e && t(n)
- }))
- };
- var E = null;
- var L, D, N, x, I, M = function () {
- function e(e, t) {
- void 0 === t && (t = 0), this._runner = e, this.priority = t, this._canceled = !1
- }
- return e.prototype.dispose = function () {
- this._canceled = !0
- }, e.prototype.execute = function () {
- if (!this._canceled)
- // try {
- this._runner()
- // } catch (e) {
- // d.onUnexpectedError(e)
- // }
- }, e.sort = function (e, t) {
- return t.priority - e.priority
- }, e
- }();
- L = [], D = null, N = !1, x = !1, I = function () {
- for (N = !1, D = L, L = [], x = !0; D.length > 0;) D.sort(M.sort),
- D.shift().execute();
- x = !1
- }, t.scheduleAtNextAnimationFrame = function (e, t) {
- void 0 === t && (t = 0);
- var n, i = new M(e, t);
- return L.push(i), N || (N = !0, n = I, E || (E = self.requestAnimationFrame || self.msRequestAnimationFrame || self.webkitRequestAnimationFrame || self.mozRequestAnimationFrame || self.oRequestAnimationFrame || function (e) {
- return setTimeout((function () {
- return e((new Date).getTime())
- }), 0)
- }), E.call(self, n)), i
- }, t.runAtThisOrScheduleAtNextAnimationFrame = function (e, n) {
- if (x) {
- var i = new M(e, n);
- return D.push(i), i
- }
- return t.scheduleAtNextAnimationFrame(e, n)
- };
- var k = 16, T = function (e, t) {
- return t
- }, R = function (e) {
- function t(t, n, i, o, r) {
- void 0 === o && (o = T), void 0 === r && (r = k);
- var s = e.call(this) || this, a = null, l = 0, d = s._register(new u.TimeoutTimer), c = function () {
- l = (new Date).getTime(), i(a), a = null
- };
- return s._register(b(t, n, (function (e) {
- a = o(a, e);
- var t = (new Date).getTime() - l;
- t >= r ? (d.cancel(), c()) : d.setIfNotSet(c, r - t)
- }))), s
- }
- return r(t, e), t
- }(h.Disposable);
- function O(e) {
- return document.defaultView.getComputedStyle(e, null)
- }
- t.addDisposableThrottledListener = function (e, t, n, i, o) {
- return new R(e, t, n, i, o)
- }, t.getComputedStyle = O, t.getClientArea = function (e) {
- if (e !== document.body) return new A(e.clientWidth, e.clientHeight);
- if (p.isIOS && window.visualViewport) {
- var t = window.visualViewport.width, i = window.visualViewport.height - (n.isStandalone ? 24 : 0);
- return new A(t, i)
- }
- if (window.innerWidth && window.innerHeight) return new A(window.innerWidth, window.innerHeight);
- if (document.body && document.body.clientWidth && document.body.clientHeight) return new A(document.body.clientWidth, document.body.clientHeight);
- if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientHeight) return new A(document.documentElement.clientWidth, document.documentElement.clientHeight);
- throw new Error("Unable to figure out browser width and height")
- };
- var P = function () {
- function e() {
- }
- return e.convertToPixels = function (e, t) {
- return parseFloat(t) || 0
- }, e.getDimension = function (t, n, i) {
- var o = O(t), r = "0"
- ;
- return o && (r = o.getPropertyValue ? o.getPropertyValue(n) : o.getAttribute(i)), e.convertToPixels(t, r)
- }, e.getBorderLeftWidth = function (t) {
- return e.getDimension(t, "border-left-width", "borderLeftWidth")
- }, e.getBorderRightWidth = function (t) {
- return e.getDimension(t, "border-right-width", "borderRightWidth")
- }, e.getBorderTopWidth = function (t) {
- return e.getDimension(t, "border-top-width", "borderTopWidth")
- }, e.getBorderBottomWidth = function (t) {
- return e.getDimension(t, "border-bottom-width", "borderBottomWidth")
- }, e.getPaddingLeft = function (t) {
- return e.getDimension(t, "padding-left", "paddingLeft")
- }, e.getPaddingRight = function (t) {
- return e.getDimension(t, "padding-right", "paddingRight")
- }, e.getPaddingTop = function (t) {
- return e.getDimension(t, "padding-top", "paddingTop")
- }, e.getPaddingBottom = function (t) {
- return e.getDimension(t, "padding-bottom", "paddingBottom")
- }, e.getMarginLeft = function (t) {
- return e.getDimension(t, "margin-left", "marginLeft")
- }, e.getMarginTop = function (t) {
- return e.getDimension(t, "margin-top", "marginTop")
- }, e.getMarginRight = function (t) {
- return e.getDimension(t, "margin-right", "marginRight")
- }, e.getMarginBottom = function (t) {
- return e.getDimension(t, "margin-bottom", "marginBottom")
- }, e
- }(), A = function (e, t) {
- this.width = e, this.height = t
- };
- function F(e, t) {
- for (; e;) {
- if (e === t) return !0;
- e = e.parentNode
- }
- return !1
- }
- function W(e) {
- return e && !!e.host && !!e.mode
- }
- function B(e) {
- for (; e.parentNode;) {
- if (e === document.body) return null;
- e = e.parentNode
- }
- return W(e) ? e : null
- }
- function V(e) {
- void 0 === e && (e = document.getElementsByTagName("head")[0]);
- var t = document.createElement("style");
- return t.type = "text/css", t.media = "screen", e.appendChild(t), t
- }
- t.Dimension = A, t.getTopLeftOffset = function (e) {
- for (var t = e.offsetParent, n = e.offsetTop, i = e.offsetLeft; null !== (e = e.parentNode) && e !== document.body && e !== document.documentElement;) {
- n -= e.scrollTop;
- var o = W(e) ? null : O(e);
- o && (i -= "rtl" !== o.direction ? e.scrollLeft : -e.scrollLeft), e === t && (i += P.getBorderLeftWidth(e), n += P.getBorderTopWidth(e), n += e.offsetTop, i += e.offsetLeft, t = e.offsetParent)
- }
- return {left: i, top: n}
- }, t.getDomNodePagePosition = function (e) {
- var n = e.getBoundingClientRect();
- return {
- left: n.left + t.StandardWindow.scrollX,
- top: n.top + t.StandardWindow.scrollY,
- width: n.width,
- height: n.height
- }
- }, t.StandardWindow = new (function () {
- function e() {
- }
- return Object.defineProperty(e.prototype, "scrollX", {
- get: function () {
- return "number" == typeof window.scrollX ? window.scrollX : document.body.scrollLeft + document.documentElement.scrollLeft
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "scrollY", {
- get: function () {
- return "number" == typeof window.scrollY ? window.scrollY : document.body.scrollTop + document.documentElement.scrollTop
- }, enumerable: !0, configurable: !0
- }), e
- }()), t.getTotalWidth = function (e) {
- var t = P.getMarginLeft(e) + P.getMarginRight(e);
- return e.offsetWidth + t
- }, t.getContentWidth = function (e) {
- var t = P.getBorderLeftWidth(e) + P.getBorderRightWidth(e), n = P.getPaddingLeft(e) + P.getPaddingRight(e);
- return e.offsetWidth - t - n
- }, t.getContentHeight = function (e) {
- var t = P.getBorderTopWidth(e) + P.getBorderBottomWidth(e), n = P.getPaddingTop(e) + P.getPaddingBottom(e);
- return e.offsetHeight - t - n
- },
- t.getTotalHeight = function (e) {
- var t = P.getMarginTop(e) + P.getMarginBottom(e);
- return e.offsetHeight + t
- }, t.isAncestor = F, t.findParentWithClass = function (e, n, i) {
- for (; e && e.nodeType === e.ELEMENT_NODE;) {
- if (t.hasClass(e, n)) return e;
- if (i) if ("string" == typeof i) {
- if (t.hasClass(e, i)) return null
- } else if (e === i) return null;
- e = e.parentNode
- }
- return null
- }, t.isShadowRoot = W, t.isInShadowDOM = function (e) {
- return !!B(e)
- }, t.getShadowRoot = B, t.createStyleSheet = V;
- var z = null;
- function H() {
- return z || (z = V()), z
- }
- t.createCSSRule = function (e, t, n) {
- void 0 === n && (n = H()), n && t && n.sheet.insertRule(e + "{" + t + "}", 0)
- }, t.removeCSSRulesContainingSelector = function (e, t) {
- if (void 0 === t && (t = H()), t) {
- for (var n = function (e) {
- return e && e.sheet && e.sheet.rules ? e.sheet.rules : e && e.sheet && e.sheet.cssRules ? e.sheet.cssRules : []
- }(t), i = [], o = 0; o < n.length; o++) {
- -1 !== n[o].selectorText.indexOf(e) && i.push(o)
- }
- for (o = i.length - 1; o >= 0; o--) t.sheet.deleteRule(i[o])
- }
- }, t.isHTMLElement = function (e) {
- return "object" == typeof HTMLElement ? e instanceof HTMLElement : e && "object" == typeof e && 1 === e.nodeType && "string" == typeof e.nodeName
- }, t.EventType = {
- CLICK: "click",
- DBLCLICK: "dblclick",
- MOUSE_UP: "mouseup",
- MOUSE_DOWN: "mousedown",
- MOUSE_OVER: "mouseover",
- MOUSE_MOVE: "mousemove",
- MOUSE_OUT: "mouseout",
- MOUSE_ENTER: "mouseenter",
- MOUSE_LEAVE: "mouseleave",
- POINTER_UP: "pointerup",
- POINTER_DOWN: "pointerdown",
- POINTER_MOVE: "pointermove",
- CONTEXT_MENU: "contextmenu",
- WHEEL: "wheel",
- KEY_DOWN: "keydown",
- KEY_PRESS: "keypress",
- KEY_UP: "keyup",
- LOAD: "load",
- BEFORE_UNLOAD: "beforeunload",
- UNLOAD: "unload",
- ABORT: "abort",
- ERROR: "error",
- RESIZE: "resize",
- SCROLL: "scroll",
- FULLSCREEN_CHANGE: "fullscreenchange",
- WK_FULLSCREEN_CHANGE: "webkitfullscreenchange",
- SELECT: "select",
- CHANGE: "change",
- SUBMIT: "submit",
- RESET: "reset",
- FOCUS: "focus",
- FOCUS_IN: "focusin",
- FOCUS_OUT: "focusout",
- BLUR: "blur",
- INPUT: "input",
- STORAGE: "storage",
- DRAG_START: "dragstart",
- DRAG: "drag",
- DRAG_ENTER: "dragenter",
- DRAG_LEAVE: "dragleave",
- DRAG_OVER: "dragover",
- DROP: "drop",
- DRAG_END: "dragend",
- ANIMATION_START: n.isWebKit ? "webkitAnimationStart" : "animationstart",
- ANIMATION_END: n.isWebKit ? "webkitAnimationEnd" : "animationend",
- ANIMATION_ITERATION: n.isWebKit ? "webkitAnimationIteration" : "animationiteration"
- }, t.EventHelper = {
- stop: function (e, t) {
- e.preventDefault ? e.preventDefault() : e.returnValue = !1, t && (e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0)
- }
- }, t.saveParentsScrollTop = function (e) {
- for (var t = [], n = 0; e && e.nodeType === e.ELEMENT_NODE; n++) t[n] = e.scrollTop, e = e.parentNode;
- return t
- }, t.restoreParentsScrollTop = function (e, t) {
- for (var n = 0; e && e.nodeType === e.ELEMENT_NODE; n++) e.scrollTop !== t[n] && (e.scrollTop = t[n]), e = e.parentNode
- };
- var K = function (e) {
- function n(n) {
- var o = e.call(this) || this;
- o._onDidFocus = o._register(new c.Emitter), o.onDidFocus = o._onDidFocus.event, o._onDidBlur = o._register(new c.Emitter), o.onDidBlur = o._onDidBlur.event;
- var r = F(document.activeElement, n), s = !1, a = function () {
- s = !1, r || (r = !0, o._onDidFocus.fire())
- }, l = function () {
- r && (s = !0, window.setTimeout((function () {
- s && (s = !1, r = !1, o._onDidBlur.fire())
- }), 0))
- }
- ;
- return o._refreshStateHandler = function () {
- F(document.activeElement, n) !== r && (r ? l() : a())
- }, o._register(i.domEvent(n, t.EventType.FOCUS, !0)(a)), o._register(i.domEvent(n, t.EventType.BLUR, !0)(l)), o
- }
- return r(n, e), n
- }(h.Disposable);
- t.trackFocus = function (e) {
- return new K(e)
- }, t.append = function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- return t.forEach((function (t) {
- return e.appendChild(t)
- })), t[t.length - 1]
- };
- var U, j = /([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;
- function q(e, t, n) {
- for (var i = [], o = 3; o < arguments.length; o++) i[o - 3] = arguments[o];
- var r = j.exec(t);
- if (!r) throw new Error("Bad use of emmet");
- n = l({}, n || {});
- var s, a = r[1] || "div";
- return s = e !== U.HTML ? document.createElementNS(e, a) : document.createElement(a), r[3] && (s.id = r[3]), r[4] && (s.className = r[4].replace(/\./g, " ").trim()), Object.keys(n).forEach((function (e) {
- var t = n[e];
- void 0 !== t && (/^on\w+$/.test(e) ? s[e] = t : "selected" === e ? t && s.setAttribute(e, "true") : s.setAttribute(e, t))
- })), g.coalesce(i).forEach((function (e) {
- e instanceof Node ? s.appendChild(e) : s.appendChild(document.createTextNode(e))
- })), s
- }
- function G(e, t) {
- for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
- return q.apply(void 0, a([U.HTML, e, t], n))
- }
- function Y(e) {
- return e && f.Schemas.vscodeRemote === e.scheme ? f.RemoteAuthorities.rewrite(e) : e
- }
- !function (e) {
- e.HTML = "http://www.w3.org/1999/xhtml", e.SVG = "http://www.w3.org/2000/svg"
- }(U = t.Namespace || (t.Namespace = {})), t.$ = G, G.SVG = function (e, t) {
- for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
- return q.apply(void 0, a([U.SVG, e, t], n))
- }, t.show = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- for (var n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- o.style.display = "", o.removeAttribute("aria-hidden")
- }
- }, t.hide = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- for (var n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- o.style.display = "none", o.setAttribute("aria-hidden", "true")
- }
- }, t.removeTabIndexAndUpdateFocus = function (e) {
- if (e && e.hasAttribute("tabIndex")) {
- if (document.activeElement === e) {
- var t = function (e, t) {
- for (; e && e.nodeType === e.ELEMENT_NODE;) {
- if (e instanceof HTMLElement && e.hasAttribute(t)) return e;
- e = e.parentNode
- }
- return null
- }(e.parentElement, "tabIndex");
- t && t.focus()
- }
- e.removeAttribute("tabindex")
- }
- }, t.getElementsByTagName = function (e) {
- return Array.prototype.slice.call(document.getElementsByTagName(e), 0)
- }, t.computeScreenAwareSize = function (e) {
- var t = window.devicePixelRatio * e;
- return Math.max(1, Math.floor(t)) / window.devicePixelRatio
- }, t.windowOpenNoOpener = function (e) {
- if (p.isNative || n.isEdgeWebView) window.open(e); else {
- var t = window.open();
- t && (t.opener = null, t.location.href = e)
- }
- }, t.animate = function (e) {
- var n = function () {
- e(), i = t.scheduleAtNextAnimationFrame(n)
- }, i = t.scheduleAtNextAnimationFrame(n);
- return h.toDisposable((function () {
- return i.dispose()
- }))
- }, f.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href) ? "https" : "http"), t.asDomUri = Y, t.asCSSUrl = function (e) {
- return e ? "url('" + Y(e).toString(!0).replace(/'/g, "%27") + "')" : "url('')"
- }
- })), define(n[28], i([0, 1, 6]), (function (e, t, n) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e) {
- this.domNode = e, this._maxWidth = -1, this._width = -1, this._height = -1, this._top = -1, this._left = -1, this._bottom = -1, this._right = -1, this._fontFamily = "", this._fontWeight = "", this._fontSize = -1, this._fontFeatureSettings = "", this._lineHeight = -1, this._letterSpacing = -100, this._className = "", this._display = "", this._position = "", this._visibility = "", this._backgroundColor = "", this._layerHint = !1, this._contain = "none"
- }
- return e.prototype.setMaxWidth = function (e) {
- this._maxWidth !== e && (this._maxWidth = e, this.domNode.style.maxWidth = this._maxWidth + "px")
- }, e.prototype.setWidth = function (e) {
- this._width !== e && (this._width = e, this.domNode.style.width = this._width + "px")
- }, e.prototype.setHeight = function (e) {
- this._height !== e && (this._height = e, this.domNode.style.height = this._height + "px")
- }, e.prototype.setTop = function (e) {
- this._top !== e && (this._top = e, this.domNode.style.top = this._top + "px")
- }, e.prototype.unsetTop = function () {
- -1 !== this._top && (this._top = -1, this.domNode.style.top = "")
- },
- e.prototype.setLeft = function (e) {
- this._left !== e && (this._left = e, this.domNode.style.left = this._left + "px")
- }, e.prototype.setBottom = function (e) {
- this._bottom !== e && (this._bottom = e, this.domNode.style.bottom = this._bottom + "px")
- }, e.prototype.setRight = function (e) {
- this._right !== e && (this._right = e, this.domNode.style.right = this._right + "px")
- }, e.prototype.setFontFamily = function (e) {
- this._fontFamily !== e && (this._fontFamily = e, this.domNode.style.fontFamily = this._fontFamily)
- }, e.prototype.setFontWeight = function (e) {
- this._fontWeight !== e && (this._fontWeight = e, this.domNode.style.fontWeight = this._fontWeight)
- }, e.prototype.setFontSize = function (e) {
- this._fontSize !== e && (this._fontSize = e, this.domNode.style.fontSize = this._fontSize + "px")
- }, e.prototype.setFontFeatureSettings = function (e) {
- this._fontFeatureSettings !== e && (this._fontFeatureSettings = e, this.domNode.style.fontFeatureSettings = this._fontFeatureSettings)
- }, e.prototype.setLineHeight = function (e) {
- this._lineHeight !== e && (this._lineHeight = e, this.domNode.style.lineHeight = this._lineHeight + "px")
- },
- e.prototype.setLetterSpacing = function (e) {
- this._letterSpacing !== e && (this._letterSpacing = e, this.domNode.style.letterSpacing = this._letterSpacing + "px")
- }, e.prototype.setClassName = function (e) {
- this._className !== e && (this._className = e, this.domNode.className = this._className)
- }, e.prototype.toggleClassName = function (e, t) {
- n.toggleClass(this.domNode, e, t), this._className = this.domNode.className
- }, e.prototype.setDisplay = function (e) {
- this._display !== e && (this._display = e, this.domNode.style.display = this._display)
- }, e.prototype.setPosition = function (e) {
- this._position !== e && (this._position = e, this.domNode.style.position = this._position)
- }, e.prototype.setVisibility = function (e) {
- this._visibility !== e && (this._visibility = e, this.domNode.style.visibility = this._visibility)
- }, e.prototype.setBackgroundColor = function (e) {
- this._backgroundColor !== e && (this._backgroundColor = e, this.domNode.style.backgroundColor = this._backgroundColor)
- }, e.prototype.setLayerHinting = function (e) {
- this._layerHint !== e && (this._layerHint = e,
- this.domNode.style.transform = this._layerHint ? "translate3d(0px, 0px, 0px)" : "")
- }, e.prototype.setContain = function (e) {
- this._contain !== e && (this._contain = e, this.domNode.style.contain = this._contain)
- }, e.prototype.setAttribute = function (e, t) {
- this.domNode.setAttribute(e, t)
- }, e.prototype.removeAttribute = function (e) {
- this.domNode.removeAttribute(e)
- }, e.prototype.appendChild = function (e) {
- this.domNode.appendChild(e.domNode)
- }, e.prototype.removeChild = function (e) {
- this.domNode.removeChild(e.domNode)
- }, e
- }();
- t.FastDomNode = i, t.createFastDomNode = function (e) {
- return new i(e)
- }
- })), define(n[134], i([0, 1, 6]), (function (e, t, n) {
- "use strict";
- function i(e) {
- var t = e.inline ? "span" : "div", n = document.createElement(t);
- return e.className && (n.className = e.className), n
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.renderText = function (e, t) {
- void 0 === t && (t = {});
- var n = i(t);
- return n.textContent = e, n
- }, t.renderFormattedText = function (e, t) {
- void 0 === t && (t = {});
- var s = i(t);
- return function e(t, i, o) {
- var r
- ;
- if (2 === i.type) r = document.createTextNode(i.content || ""); else if (3 === i.type) r = document.createElement("b"); else if (4 === i.type) r = document.createElement("i"); else if (5 === i.type && o) {
- var s = document.createElement("a");
- s.href = "#", o.disposeables.add(n.addStandardDisposableListener(s, "click", (function (e) {
- o.callback(String(i.index), e)
- }))), r = s
- } else 7 === i.type ? r = document.createElement("br") : 1 === i.type && (r = t);
- r && t !== r && t.appendChild(r);
- r && Array.isArray(i.children) && i.children.forEach((function (t) {
- e(r, t, o)
- }))
- }(s, function (e) {
- var t = {type: 1, children: []}, n = 0, i = t, s = [], a = new o(e);
- for (; !a.eos();) {
- var l = a.next(), u = "\\" === l && 0 !== r(a.peek());
- if (u && (l = a.next()), u || 0 === r(l) || l !== a.peek()) if ("\n" === l) 2 === i.type && (i = s.pop()), i.children.push({type: 7}); else if (2 !== i.type) {
- var d = {type: 2, content: l};
- i.children.push(d), s.push(i), i = d
- } else i.content += l; else {
- a.advance(), 2 === i.type && (i = s.pop());
- var c = r(l);
- if (i.type === c || 5 === i.type && 6 === c) i = s.pop(); else {
- var h = {type: c, children: []};
- 5 === c && (h.index = n, n++), i.children.push(h), s.push(i), i = h
- }
- }
- }
- 2 === i.type && (i = s.pop());
- s.length;
- return t
- }(e), t.actionHandler), s
- }, t.createElement = i;
- var o = function () {
- function e(e) {
- this.source = e, this.index = 0
- }
- return e.prototype.eos = function () {
- return this.index >= this.source.length
- }, e.prototype.next = function () {
- var e = this.peek();
- return this.advance(), e
- }, e.prototype.peek = function () {
- return this.source[this.index]
- }, e.prototype.advance = function () {
- this.index++
- }, e
- }();
- function r(e) {
- switch (e) {
- case"*":
- return 3;
- case"_":
- return 4;
- case"[":
- return 5;
- case"]":
- return 6;
- default:
- return 0
- }
- }
- })), define(n[78], i([0, 1, 6, 16, 24, 174, 45, 2, 88]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.standardMouseMoveMerger = function (e, t) {
- var n = new s.StandardMouseEvent(t);
- return n.preventDefault(), {leftButton: n.leftButton, buttons: n.buttons, posx: n.posx, posy: n.posy}
- };
- var u = function () {
- function e() {
- this._hooks = new a.DisposableStore, this._mouseMoveEventMerger = null, this._mouseMoveCallback = null, this._onStopCallback = null
- }
- return e.prototype.dispose = function () {
- this.stopMonitoring(!1), this._hooks.dispose()
- }, e.prototype.stopMonitoring = function (e) {
- if (this.isMonitoring()) {
- this._hooks.clear(), this._mouseMoveEventMerger = null, this._mouseMoveCallback = null;
- var t = this._onStopCallback;
- this._onStopCallback = null, e && t && t()
- }
- }, e.prototype.isMonitoring = function () {
- return !!this._mouseMoveEventMerger
- }, e.prototype.startMonitoring = function (e, t, a, u, d) {
- var c = this;
- if (!this.isMonitoring()) {
- this._mouseMoveEventMerger = a, this._mouseMoveCallback = u, this._onStopCallback = d;
- var h = r.IframeUtils.getSameOriginWindowChain(),
- p = i.isIOS && l.BrowserFeatures.pointerEvents ? "pointermove" : "mousemove",
- g = i.isIOS && l.BrowserFeatures.pointerEvents ? "pointerup" : "mouseup",
- f = h.map((function (e) {
- return e.window.document
- })), m = n.getShadowRoot(e);
- m && f.unshift(m);
- for (var v = 0, _ = f; v < _.length; v++) {
- var y = _[v];
- this._hooks.add(n.addDisposableThrottledListener(y, p, (function (e) {
- o.isIE || e.buttons === t ? c._mouseMoveCallback(e) : c.stopMonitoring(!0)
- }), (function (e, t) {
- return c._mouseMoveEventMerger(e, t)
- }))),
- this._hooks.add(n.addDisposableListener(y, g, (function (e) {
- return c.stopMonitoring(!0)
- })))
- }
- if (r.IframeUtils.hasDifferentOriginAncestor()) {
- var C = h[h.length - 1];
- this._hooks.add(n.addDisposableListener(C.window.document, "mouseout", (function (e) {
- "html" === new s.StandardMouseEvent(e).target.tagName.toLowerCase() && c.stopMonitoring(!0)
- }))), this._hooks.add(n.addDisposableListener(C.window.document, "mouseover", (function (e) {
- "html" === new s.StandardMouseEvent(e).target.tagName.toLowerCase() && c.stopMonitoring(!0)
- }))), this._hooks.add(n.addDisposableListener(C.window.document.body, "mouseleave", (function (e) {
- c.stopMonitoring(!0)
- })))
- }
- }
- }, e
- }();
- t.GlobalMouseMoveMonitor = u
- })), define(n[248], i([0, 1, 6, 134, 10, 75, 127, 612, 613, 180, 31, 5, 25, 46, 100]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.renderMarkdown = function (e, t) {
- void 0 === t && (t = {});
- var f, m = i.createElement(t), v = function (t) {
- var n;
- try {
- n = u.parse(decodeURIComponent(t))
- } catch (e) {
- }
- return n ? (n = d.cloneAndChange(n, (function (t) {
- return e.uris && e.uris[t] ? h.URI.revive(e.uris[t]) : void 0
- })), encodeURIComponent(JSON.stringify(n))) : t
- }, _ = function (t, i) {
- var o = e.uris && e.uris[t];
- if (!o) return t;
- var r = h.URI.revive(o);
- return h.URI.parse(t).toString() === r.toString() ? t : (i && (r = n.asDomUri(r)), r.query && (r = r.with({query: v(r.query)})), r.toString(!0))
- }, y = new Promise((function (e) {
- return f = e
- })), C = new a.Renderer;
- C.image = function (e, t, n) {
- var i, o = [], s = [];
- return e && (e = (i = r.parseHrefAndDimensions(e)).href, o = i.dimensions, e = _(e, !0), s.push('src="' + e + '"')), n && s.push('alt="' + n + '"'), t && s.push('title="' + t + '"'), o.length && (s = s.concat(o)), "<img " + s.join(" ") + ">"
- }, C.link = function (t, n, i) {
- return t === i && (i = r.removeMarkdownEscapes(i)), t = _(t, !1), n = r.removeMarkdownEscapes(n),
- !(t = r.removeMarkdownEscapes(t)) || t.match(/^data:|javascript:/i) || t.match(/^command:/i) && !e.isTrusted || t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i) ? i : '<a href="#" data-href="' + (t = t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'")) + '" title="' + (n || t) + '">' + i + "</a>"
- }, C.paragraph = function (t) {
- return "<p>" + (e.supportThemeIcons ? g.renderCodicons(t) : t) + "</p>"
- }, t.codeBlockRenderer && (C.code = function (e, n) {
- var i = t.codeBlockRenderer(n, e), o = s.defaultGenerator.nextId(),
- r = Promise.all([i, y]).then((function (e) {
- var t = e[0], n = m.querySelector('div[data-code="' + o + '"]');
- n && (n.innerHTML = t)
- })).catch((function (e) {
- }));
- return t.codeBlockRenderCallback && r.then(t.codeBlockRenderCallback), '<div class="code" data-code="' + o + '">' + c.escape(e) + "</div>"
- });
- var b = t.actionHandler;
- b && b.disposeables.add(n.addStandardDisposableListener(m, "click", (function (e) {
- var t = e.target;
- if ("A" === t.tagName || (t = t.parentElement) && "A" === t.tagName) try {
- var n = t.dataset.href;
- n && b.callback(n, e)
- } catch (e) {
- o.onUnexpectedError(e)
- } finally {
- e.preventDefault()
- }
- })));
- var S = {sanitize: !0, renderer: C},
- w = [p.Schemas.http, p.Schemas.https, p.Schemas.mailto, p.Schemas.data, p.Schemas.file, p.Schemas.vscodeRemote, p.Schemas.vscodeRemoteResource];
- e.isTrusted && w.push(p.Schemas.command);
- var E = a.parse(e.supportThemeIcons ? g.markdownEscapeEscapedCodicons(e.value) : e.value, S);
- return m.innerHTML = l.insane(E, {
- allowedSchemes: w,
- allowedAttributes: {
- a: ["href", "name", "target", "data-href"],
- iframe: ["allowfullscreen", "frameborder", "src"],
- img: ["src", "title", "alt", "width", "height"],
- div: ["class", "data-code"],
- span: ["class"]
- }
- }), f(), m
- }
- }));
- var h = this && this.__decorate || function (e, t, n, i) {
- var o, r = arguments.length, s = r < 3 ? t : null === i ? i = Object.getOwnPropertyDescriptor(t, n) : i;
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(e, t, n, i); else for (var a = e.length - 1; a >= 0; a--) (o = e[a]) && (s = (r < 3 ? o(s) : r > 3 ? o(t, n, s) : o(t, n)) || s);
- return r > 3 && s && Object.defineProperty(t, n, s), s
- };
- define(n[57], i([0, 1, 19, 2, 6, 101]), (function (e, t, n, i, o, s) {
- "use strict";
- var a
- ;Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.Tap = "-monaco-gesturetap", e.Change = "-monaco-gesturechange", e.Start = "-monaco-gesturestart", e.End = "-monaco-gesturesend", e.Contextmenu = "-monaco-gesturecontextmenu"
- }(a = t.EventType || (t.EventType = {}));
- var l = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t.dispatched = !1, t.activeTouches = {}, t.handle = null, t.targets = [], t.ignoreTargets = [], t._lastSetTapCountTime = 0, t._register(o.addDisposableListener(document, "touchstart", (function (e) {
- return t.onTouchStart(e)
- }))), t._register(o.addDisposableListener(document, "touchend", (function (e) {
- return t.onTouchEnd(e)
- }))), t._register(o.addDisposableListener(document, "touchmove", (function (e) {
- return t.onTouchMove(e)
- }))), t
- }
- return r(t, e), t.addTarget = function (e) {
- return t.isTouchDevice() ? (t.INSTANCE || (t.INSTANCE = new t), t.INSTANCE.targets.push(e), {
- dispose: function () {
- t.INSTANCE.targets = t.INSTANCE.targets.filter((function (t) {
- return t !== e
- }))
- }
- }) : i.Disposable.None
- }, t.ignoreTarget = function (e) {
- return t.isTouchDevice() ? (t.INSTANCE || (t.INSTANCE = new t), t.INSTANCE.ignoreTargets.push(e), {
- dispose: function () {
- t.INSTANCE.ignoreTargets = t.INSTANCE.ignoreTargets.filter((function (t) {
- return t !== e
- }))
- }
- }) : i.Disposable.None
- }, t.isTouchDevice = function () {
- return "ontouchstart" in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0
- }, t.prototype.dispose = function () {
- this.handle && (this.handle.dispose(), this.handle = null), e.prototype.dispose.call(this)
- }, t.prototype.onTouchStart = function (e) {
- var t = Date.now();
- this.handle && (this.handle.dispose(), this.handle = null);
- for (var n = 0, i = e.targetTouches.length; n < i; n++) {
- var o = e.targetTouches.item(n);
- this.activeTouches[o.identifier] = {
- id: o.identifier,
- initialTarget: o.target,
- initialTimeStamp: t,
- initialPageX: o.pageX,
- initialPageY: o.pageY,
- rollingTimestamps: [t],
- rollingPageX: [o.pageX],
- rollingPageY: [o.pageY]
- };
- var r = this.newGestureEvent(a.Start, o.target);
- r.pageX = o.pageX, r.pageY = o.pageY, this.dispatchEvent(r)
- }
- this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1)
- },
- t.prototype.onTouchEnd = function (e) {
- for (var i = Date.now(), o = Object.keys(this.activeTouches).length, r = function (r, l) {
- var u = e.changedTouches.item(r);
- if (!s.activeTouches.hasOwnProperty(String(u.identifier))) return console.warn("move of an UNKNOWN touch", u), "continue";
- var d = s.activeTouches[u.identifier], c = Date.now() - d.initialTimeStamp;
- if (c < t.HOLD_DELAY && Math.abs(d.initialPageX - n.tail(d.rollingPageX)) < 30 && Math.abs(d.initialPageY - n.tail(d.rollingPageY)) < 30) (h = s.newGestureEvent(a.Tap, d.initialTarget)).pageX = n.tail(d.rollingPageX), h.pageY = n.tail(d.rollingPageY), s.dispatchEvent(h); else if (c >= t.HOLD_DELAY && Math.abs(d.initialPageX - n.tail(d.rollingPageX)) < 30 && Math.abs(d.initialPageY - n.tail(d.rollingPageY)) < 30) {
- var h;
- (h = s.newGestureEvent(a.Contextmenu, d.initialTarget)).pageX = n.tail(d.rollingPageX), h.pageY = n.tail(d.rollingPageY), s.dispatchEvent(h)
- } else if (1 === o) {
- var p = n.tail(d.rollingPageX), g = n.tail(d.rollingPageY),
- f = n.tail(d.rollingTimestamps) - d.rollingTimestamps[0], m = p - d.rollingPageX[0],
- v = g - d.rollingPageY[0], _ = s.targets.filter((function (e) {
- return d.initialTarget instanceof Node && e.contains(d.initialTarget)
- }));
- s.inertia(_, i, Math.abs(m) / f, m > 0 ? 1 : -1, p, Math.abs(v) / f, v > 0 ? 1 : -1, g)
- }
- s.dispatchEvent(s.newGestureEvent(a.End, d.initialTarget)), delete s.activeTouches[u.identifier]
- }, s = this, l = 0, u = e.changedTouches.length; l < u; l++) r(l);
- this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1)
- }, t.prototype.newGestureEvent = function (e, t) {
- var n = document.createEvent("CustomEvent");
- return n.initEvent(e, !1, !0), n.initialTarget = t, n.tapCount = 0, n
- }, t.prototype.dispatchEvent = function (e) {
- var n = this;
- if (e.type === a.Tap) {
- var i = (new Date).getTime(), o = 0;
- o = i - this._lastSetTapCountTime > t.CLEAR_TAP_COUNT_TIME ? 1 : 2, this._lastSetTapCountTime = i, e.tapCount = o
- } else e.type !== a.Change && e.type !== a.Contextmenu || (this._lastSetTapCountTime = 0)
- ;
- for (var r = 0; r < this.ignoreTargets.length; r++) if (e.initialTarget instanceof Node && this.ignoreTargets[r].contains(e.initialTarget)) return;
- this.targets.forEach((function (t) {
- e.initialTarget instanceof Node && t.contains(e.initialTarget) && (t.dispatchEvent(e), n.dispatched = !0)
- }))
- }, t.prototype.inertia = function (e, n, i, r, s, l, u, d) {
- var c = this;
- this.handle = o.scheduleAtNextAnimationFrame((function () {
- var o = Date.now(), h = o - n, p = 0, g = 0, f = !0;
- i += t.SCROLL_FRICTION * h, l += t.SCROLL_FRICTION * h, i > 0 && (f = !1, p = r * i * h), l > 0 && (f = !1, g = u * l * h);
- var m = c.newGestureEvent(a.Change);
- m.translationX = p, m.translationY = g, e.forEach((function (e) {
- return e.dispatchEvent(m)
- })), f || c.inertia(e, o, i, r, s + p, l, u, d + g)
- }))
- }, t.prototype.onTouchMove = function (e) {
- for (var t = Date.now(), i = 0, o = e.changedTouches.length; i < o; i++) {
- var r = e.changedTouches.item(i);
- if (this.activeTouches.hasOwnProperty(String(r.identifier))) {
- var s = this.activeTouches[r.identifier], l = this.newGestureEvent(a.Change, s.initialTarget);
- l.translationX = r.pageX - n.tail(s.rollingPageX),
- l.translationY = r.pageY - n.tail(s.rollingPageY), l.pageX = r.pageX, l.pageY = r.pageY, this.dispatchEvent(l), s.rollingPageX.length > 3 && (s.rollingPageX.shift(), s.rollingPageY.shift(), s.rollingTimestamps.shift()), s.rollingPageX.push(r.pageX), s.rollingPageY.push(r.pageY), s.rollingTimestamps.push(t)
- } else console.warn("end of an UNKNOWN touch", r)
- }
- this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1)
- }, t.SCROLL_FRICTION = -.005, t.HOLD_DELAY = 700, t.CLEAR_TAP_COUNT_TIME = 400, h([s.memoize], t, "isTouchDevice", null), t
- }(i.Disposable);
- t.Gesture = l
- })), define(n[249], i([0, 1, 6]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e) {
- this.renderers = e, this.cache = new Map
- }
- return e.prototype.alloc = function (e) {
- var t = this.getTemplateCache(e).pop();
- if (!t) {
- var i = n.$(".monaco-list-row");
- t = {domNode: i, templateId: e, templateData: this.getRenderer(e).renderTemplate(i)}
- }
- return t
- }, e.prototype.release = function (e) {
- e && this.releaseRow(e)
- }, e.prototype.releaseRow = function (e) {
- var t = e.domNode, i = e.templateId;
- t && (n.removeClass(t, "scrolling"), function (e) {
- try {
- e.parentElement && e.parentElement.removeChild(e)
- } catch (e) {
- }
- }(t)), this.getTemplateCache(i).push(e)
- }, e.prototype.getTemplateCache = function (e) {
- var t = this.cache.get(e);
- return t || (t = [], this.cache.set(e, t)), t
- }, e.prototype.dispose = function () {
- var e = this;
- this.cache.forEach((function (t, n) {
- for (var i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- e.getRenderer(n).disposeTemplate(r.templateData), r.domNode = null, r.templateData = null
- }
- })), this.cache.clear()
- }, e.prototype.getRenderer = function (e) {
- var t = this.renderers.get(e);
- if (!t) throw new Error("No renderer found for " + e);
- return t
- }, e
- }();
- t.RowCache = i
- })), define(n[47], i([0, 1, 6, 56, 45, 2, 57]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.onclick = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.CLICK, (function (e) {
- return t(new o.StandardMouseEvent(e))
- })))
- },
- t.prototype.onmousedown = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.MOUSE_DOWN, (function (e) {
- return t(new o.StandardMouseEvent(e))
- })))
- }, t.prototype.onmouseover = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.MOUSE_OVER, (function (e) {
- return t(new o.StandardMouseEvent(e))
- })))
- }, t.prototype.onnonbubblingmouseout = function (e, t) {
- this._register(n.addDisposableNonBubblingMouseOutListener(e, (function (e) {
- return t(new o.StandardMouseEvent(e))
- })))
- }, t.prototype.onkeydown = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.KEY_DOWN, (function (e) {
- return t(new i.StandardKeyboardEvent(e))
- })))
- }, t.prototype.onkeyup = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.KEY_UP, (function (e) {
- return t(new i.StandardKeyboardEvent(e))
- })))
- }, t.prototype.oninput = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.INPUT, t))
- }, t.prototype.onblur = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.BLUR, t))
- }, t.prototype.onfocus = function (e, t) {
- this._register(n.addDisposableListener(e, n.EventType.FOCUS, t))
- }, t.prototype.ignoreGesture = function (e) {
- a.Gesture.ignoreTarget(e)
- }, t
- }(s.Disposable);
- t.Widget = l
- })), define(n[135], i([0, 1, 78, 47, 15]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ARROW_IMG_SIZE = 11;
- var s = function (e) {
- function i(i) {
- var r = e.call(this) || this;
- return r._onActivate = i.onActivate, r.bgDomNode = document.createElement("div"), r.bgDomNode.className = "arrow-background", r.bgDomNode.style.position = "absolute", r.bgDomNode.style.width = i.bgWidth + "px", r.bgDomNode.style.height = i.bgHeight + "px", void 0 !== i.top && (r.bgDomNode.style.top = "0px"), void 0 !== i.left && (r.bgDomNode.style.left = "0px"), void 0 !== i.bottom && (r.bgDomNode.style.bottom = "0px"), void 0 !== i.right && (r.bgDomNode.style.right = "0px"), r.domNode = document.createElement("div"), r.domNode.className = i.className, r.domNode.style.position = "absolute", r.domNode.style.width = t.ARROW_IMG_SIZE + "px", r.domNode.style.height = t.ARROW_IMG_SIZE + "px",
- void 0 !== i.top && (r.domNode.style.top = i.top + "px"), void 0 !== i.left && (r.domNode.style.left = i.left + "px"), void 0 !== i.bottom && (r.domNode.style.bottom = i.bottom + "px"), void 0 !== i.right && (r.domNode.style.right = i.right + "px"), r._mouseMoveMonitor = r._register(new n.GlobalMouseMoveMonitor), r.onmousedown(r.bgDomNode, (function (e) {
- return r._arrowMouseDown(e)
- })), r.onmousedown(r.domNode, (function (e) {
- return r._arrowMouseDown(e)
- })), r._mousedownRepeatTimer = r._register(new o.IntervalTimer), r._mousedownScheduleRepeatTimer = r._register(new o.TimeoutTimer), r
- }
- return r(i, e), i.prototype._arrowMouseDown = function (e) {
- var t = this;
- this._onActivate(), this._mousedownRepeatTimer.cancel(), this._mousedownScheduleRepeatTimer.cancelAndSet((function () {
- t._mousedownRepeatTimer.cancelAndSet((function () {
- return t._onActivate()
- }), 1e3 / 24)
- }), 200), this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, n.standardMouseMoveMerger, (function (e) {
- }), (function () {
- t._mousedownRepeatTimer.cancel(), t._mousedownScheduleRepeatTimer.cancel()
- })), e.preventDefault()
- }, i
- }(i.Widget);
- t.ScrollbarArrow = s
- })), define(n[181], i([0, 1, 6, 28, 78, 135, 244, 47, 16]), (function (e, t, n, i, o, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._lazyRender = t.lazyRender, n._host = t.host, n._scrollable = t.scrollable, n._scrollbarState = t.scrollbarState, n._visibilityController = n._register(new a.ScrollbarVisibilityController(t.visibility, "visible scrollbar " + t.extraScrollbarClassName, "invisible scrollbar " + t.extraScrollbarClassName)), n._visibilityController.setIsNeeded(n._scrollbarState.isNeeded()), n._mouseMoveMonitor = n._register(new o.GlobalMouseMoveMonitor), n._shouldRender = !0, n.domNode = i.createFastDomNode(document.createElement("div")), n.domNode.setAttribute("role", "presentation"), n.domNode.setAttribute("aria-hidden", "true"), n._visibilityController.setDomNode(n.domNode), n.domNode.setPosition("absolute"), n.onmousedown(n.domNode.domNode, (function (e) {
- return n._domNodeMouseDown(e)
- })), n
- }
- return r(t, e),
- t.prototype._createArrow = function (e) {
- var t = this._register(new s.ScrollbarArrow(e));
- this.domNode.domNode.appendChild(t.bgDomNode), this.domNode.domNode.appendChild(t.domNode)
- }, t.prototype._createSlider = function (e, t, n, o) {
- var r = this;
- this.slider = i.createFastDomNode(document.createElement("div")), this.slider.setClassName("slider"), this.slider.setPosition("absolute"), this.slider.setTop(e), this.slider.setLeft(t), "number" == typeof n && this.slider.setWidth(n), "number" == typeof o && this.slider.setHeight(o), this.slider.setLayerHinting(!0), this.slider.setContain("strict"), this.domNode.domNode.appendChild(this.slider.domNode), this.onmousedown(this.slider.domNode, (function (e) {
- e.leftButton && (e.preventDefault(), r._sliderMouseDown(e, (function () {
- })))
- })), this.onclick(this.slider.domNode, (function (e) {
- e.leftButton && e.stopPropagation()
- }))
- }, t.prototype._onElementSize = function (e) {
- return this._scrollbarState.setVisibleSize(e) && (this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = !0,
- this._lazyRender || this.render()), this._shouldRender
- }, t.prototype._onElementScrollSize = function (e) {
- return this._scrollbarState.setScrollSize(e) && (this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = !0, this._lazyRender || this.render()), this._shouldRender
- }, t.prototype._onElementScrollPosition = function (e) {
- return this._scrollbarState.setScrollPosition(e) && (this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = !0, this._lazyRender || this.render()), this._shouldRender
- }, t.prototype.beginReveal = function () {
- this._visibilityController.setShouldBeVisible(!0)
- }, t.prototype.beginHide = function () {
- this._visibilityController.setShouldBeVisible(!1)
- }, t.prototype.render = function () {
- this._shouldRender && (this._shouldRender = !1, this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()),
- this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()))
- }, t.prototype._domNodeMouseDown = function (e) {
- e.target === this.domNode.domNode && this._onMouseDown(e)
- }, t.prototype.delegateMouseDown = function (e) {
- var t = this.domNode.domNode.getClientRects()[0].top, n = t + this._scrollbarState.getSliderPosition(),
- i = t + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize(),
- o = this._sliderMousePosition(e);
- n <= o && o <= i ? e.leftButton && (e.preventDefault(), this._sliderMouseDown(e, (function () {
- }))) : this._onMouseDown(e)
- }, t.prototype._onMouseDown = function (e) {
- var t, i;
- if (e.target === this.domNode.domNode && "number" == typeof e.browserEvent.offsetX && "number" == typeof e.browserEvent.offsetY) t = e.browserEvent.offsetX, i = e.browserEvent.offsetY; else {
- var o = n.getDomNodePagePosition(this.domNode.domNode);
- t = e.posx - o.left, i = e.posy - o.top
- }
- this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t, i))),
- e.leftButton && (e.preventDefault(), this._sliderMouseDown(e, (function () {
- })))
- }, t.prototype._sliderMouseDown = function (e, t) {
- var n = this, i = this._sliderMousePosition(e), r = this._sliderOrthogonalMousePosition(e),
- s = this._scrollbarState.clone();
- this.slider.toggleClassName("active", !0), this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
- var t = n._sliderOrthogonalMousePosition(e), o = Math.abs(t - r);
- if (u.isWindows && o > 140) n._setDesiredScrollPositionNow(s.getScrollPosition()); else {
- var a = n._sliderMousePosition(e) - i;
- n._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))
- }
- }), (function () {
- n.slider.toggleClassName("active", !1), n._host.onDragEnd(), t()
- })), this._host.onDragStart()
- }, t.prototype._setDesiredScrollPositionNow = function (e) {
- var t = {};
- this.writeScrollPosition(t, e), this._scrollable.setScrollPositionNow(t)
- }, t
- }(l.Widget);
- t.AbstractScrollbar = d
- })), define(n[250], i([0, 1, 45, 181, 135, 175]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var a = function (e) {
- function t(t, i, r) {
- var a = this, l = t.getScrollDimensions(), u = t.getCurrentScrollPosition();
- if (a = e.call(this, {
- lazyRender: i.lazyRender,
- host: r,
- scrollbarState: new s.ScrollbarState(i.horizontalHasArrows ? i.arrowSize : 0, 2 === i.horizontal ? 0 : i.horizontalScrollbarSize, 2 === i.vertical ? 0 : i.verticalScrollbarSize, l.width, l.scrollWidth, u.scrollLeft),
- visibility: i.horizontal,
- extraScrollbarClassName: "horizontal",
- scrollable: t
- }) || this, i.horizontalHasArrows) {
- var d = (i.arrowSize - o.ARROW_IMG_SIZE) / 2,
- c = (i.horizontalScrollbarSize - o.ARROW_IMG_SIZE) / 2;
- a._createArrow({
- className: "left-arrow",
- top: c,
- left: d,
- bottom: void 0,
- right: void 0,
- bgWidth: i.arrowSize,
- bgHeight: i.horizontalScrollbarSize,
- onActivate: function () {
- return a._host.onMouseWheel(new n.StandardWheelEvent(null, 1, 0))
- }
- }), a._createArrow({
- className: "right-arrow",
- top: c,
- left: void 0,
- bottom: void 0,
- right: d,
- bgWidth: i.arrowSize,
- bgHeight: i.horizontalScrollbarSize,
- onActivate: function () {
- return a._host.onMouseWheel(new n.StandardWheelEvent(null, -1, 0))
- }
- })
- }
- return a._createSlider(Math.floor((i.horizontalScrollbarSize - i.horizontalSliderSize) / 2), 0, void 0, i.horizontalSliderSize), a
- }
- return r(t, e), t.prototype._updateSlider = function (e, t) {
- this.slider.setWidth(e), this.slider.setLeft(t)
- }, t.prototype._renderDomNode = function (e, t) {
- this.domNode.setWidth(e), this.domNode.setHeight(t), this.domNode.setLeft(0), this.domNode.setBottom(0)
- }, t.prototype.onDidScroll = function (e) {
- return this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender, this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender, this._shouldRender = this._onElementSize(e.width) || this._shouldRender, this._shouldRender
- }, t.prototype._mouseDownRelativePosition = function (e, t) {
- return e
- }, t.prototype._sliderMousePosition = function (e) {
- return e.posx
- }, t.prototype._sliderOrthogonalMousePosition = function (e) {
- return e.posy
- }, t.prototype.writeScrollPosition = function (e, t) {
- e.scrollLeft = t
- }, t
- }(i.AbstractScrollbar);
- t.HorizontalScrollbar = a
- })),
- define(n[251], i([0, 1, 45, 181, 135, 175]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t, i, r) {
- var a = this, l = t.getScrollDimensions(), u = t.getCurrentScrollPosition();
- if (a = e.call(this, {
- lazyRender: i.lazyRender,
- host: r,
- scrollbarState: new s.ScrollbarState(i.verticalHasArrows ? i.arrowSize : 0, 2 === i.vertical ? 0 : i.verticalScrollbarSize, 0, l.height, l.scrollHeight, u.scrollTop),
- visibility: i.vertical,
- extraScrollbarClassName: "vertical",
- scrollable: t
- }) || this, i.verticalHasArrows) {
- var d = (i.arrowSize - o.ARROW_IMG_SIZE) / 2,
- c = (i.verticalScrollbarSize - o.ARROW_IMG_SIZE) / 2;
- a._createArrow({
- className: "up-arrow",
- top: d,
- left: c,
- bottom: void 0,
- right: void 0,
- bgWidth: i.verticalScrollbarSize,
- bgHeight: i.arrowSize,
- onActivate: function () {
- return a._host.onMouseWheel(new n.StandardWheelEvent(null, 0, 1))
- }
- }), a._createArrow({
- className: "down-arrow",
- top: void 0,
- left: c,
- bottom: d,
- right: void 0,
- bgWidth: i.verticalScrollbarSize,
- bgHeight: i.arrowSize,
- onActivate: function () {
- return a._host.onMouseWheel(new n.StandardWheelEvent(null, 0, -1))
- }
- })
- }
- return a._createSlider(0, Math.floor((i.verticalScrollbarSize - i.verticalSliderSize) / 2), i.verticalSliderSize, void 0), a
- }
- return r(t, e), t.prototype._updateSlider = function (e, t) {
- this.slider.setHeight(e), this.slider.setTop(t)
- }, t.prototype._renderDomNode = function (e, t) {
- this.domNode.setWidth(t), this.domNode.setHeight(e), this.domNode.setRight(0), this.domNode.setTop(0)
- }, t.prototype.onDidScroll = function (e) {
- return this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender, this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender, this._shouldRender = this._onElementSize(e.height) || this._shouldRender, this._shouldRender
- }, t.prototype._mouseDownRelativePosition = function (e, t) {
- return t
- }, t.prototype._sliderMousePosition = function (e) {
- return e.posy
- }, t.prototype._sliderOrthogonalMousePosition = function (e) {
- return e.posx
- }, t.prototype.writeScrollPosition = function (e, t) {
- e.scrollTop = t
- }, t
- }(i.AbstractScrollbar);
- t.VerticalScrollbar = a
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[39], i([0, 1, 177, 77, 25, 5, 46, 16]), (function (e, t, n, i, o, r, s, l) {
- "use strict";
- function u(e) {
- return !e || e.scheme !== s.Schemas.file || !l.isLinux
- }
- function d(e, t) {
- return e === t || r.equalsIgnoreCase(e, t)
- }
- function c(e) {
- return i.posix.basename(e.path)
- }
- function h(e) {
- var t, i = e.path;
- return t = e.authority && i.length > 1 && e.scheme === s.Schemas.file ? "//" + e.authority + i : l.isWindows && 47 === i.charCodeAt(0) && n.isWindowsDriveLetter(i.charCodeAt(1)) && 58 === i.charCodeAt(2) ? i.substr(1) : i, l.isWindows && (t = t.replace(/\//g, "\\")), t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.hasToIgnoreCase = u, t.basenameOrAuthority = function (e) {
- return c(e) || e.authority
- }, t.isEqualAuthority = d, t.isEqual = function (e, t, n) {
- if (void 0 === n && (n = u(e)), e === t) return !0;
- if (!e || !t) return !1;
- if (e.scheme !== t.scheme || !d(e.authority, t.authority)) return !1
- ;
- var i = e.path || "/", o = t.path || "/";
- return i === o || n && r.equalsIgnoreCase(i || "/", o || "/")
- }, t.basename = c, t.dirname = function (e) {
- if (0 === e.path.length) return e;
- if (e.scheme === s.Schemas.file) return o.URI.file(i.dirname(h(e)));
- var t = i.posix.dirname(e.path);
- return e.authority && t.length && 47 !== t.charCodeAt(0) && (console.error('dirname("' + e.toString + ")) resulted in a relative path"), t = "/"), e.with({path: t})
- }, t.joinPath = function (e) {
- for (var t, n, r = [], l = 1; l < arguments.length; l++) r[l - 1] = arguments[l];
- return n = e.scheme === s.Schemas.file ? o.URI.file(i.join.apply(i, a([h(e)], r))).path : (t = i.posix).join.apply(t, a([e.path || "/"], r)), e.with({path: n})
- }, t.normalizePath = function (e) {
- return e.path.length ? (t = e.scheme === s.Schemas.file ? o.URI.file(i.normalize(h(e))).path : i.posix.normalize(e.path), e.with({path: t})) : e;
- var t
- }, t.originalFSPath = h, t.relativePath = function (e, t, o) {
- if (void 0 === o && (o = u(e)), e.scheme === t.scheme && d(e.authority, t.authority)) {
- if (e.scheme === s.Schemas.file) {
- var r = i.relative(e.path, t.path);
- return l.isWindows ? n.toSlashes(r) : r
- }
- var a = e.path || "/", c = t.path || "/";
- if (o) {
- for (var h = 0, p = Math.min(a.length, c.length); h < p && (a.charCodeAt(h) === c.charCodeAt(h) || a.charAt(h).toLowerCase() === c.charAt(h).toLowerCase()); h++) ;
- a = c.substr(0, h) + a.substr(h)
- }
- return i.posix.relative(a, c)
- }
- }, function (e) {
- e.META_DATA_LABEL = "label", e.META_DATA_DESCRIPTION = "description", e.META_DATA_SIZE = "size", e.META_DATA_MIME = "mime", e.parseMetaData = function (t) {
- var n = new Map;
- t.path.substring(t.path.indexOf(";") + 1, t.path.lastIndexOf(";")).split(";").forEach((function (e) {
- var t = e.split(":"), i = t[0], o = t[1];
- i && o && n.set(i, o)
- }));
- var i = t.path.substring(0, t.path.indexOf(";"));
- return i && n.set(e.META_DATA_MIME, i), n
- }
- }(t.DataUri || (t.DataUri = {}))
- })), define(n[136], i([0, 1, 25, 77, 5, 46, 16, 39]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- function l(e) {
- return !(!s.isWindows || !e || ":" !== e[1])
- }
- function u(e) {
- return l(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getPathLabel = function (e, t, o) {
- if ("string" == typeof e && (e = n.URI.file(e)), o) {
- var d = o.getWorkspaceFolder(e)
- ;
- if (d) {
- var h = o.getWorkspace().folders.length > 1, p = void 0;
- if (p = a.isEqual(d.uri, e) ? "" : a.relativePath(d.uri, e), h) {
- var g = d.name ? d.name : a.basename(d.uri);
- p = p ? g + " • " + p : g
- }
- return p
- }
- }
- if (e.scheme !== r.Schemas.file && e.scheme !== r.Schemas.untitled) return e.with({
- query: null,
- fragment: null
- }).toString(!0);
- if (l(e.fsPath)) return i.normalize(u(e.fsPath));
- var f = i.normalize(e.fsPath);
- return !s.isWindows && t && (f = c(f, t.userHome)), f
- }, t.getBaseLabel = function (e) {
- if (e) {
- "string" == typeof e && (e = n.URI.file(e));
- var t = a.basename(e) || (e.scheme === r.Schemas.file ? e.fsPath : e.path);
- return l(t) ? u(t) : t
- }
- }, t.normalizeDriveLetter = u;
- var d = Object.create(null);
- function c(e, t) {
- if (s.isWindows || !e || !t) return e;
- var n = d.original === t ? d.normalized : void 0;
- return n || (n = "" + o.rtrim(t, i.posix.sep) + i.posix.sep, d = {
- original: t,
- normalized: n
- }), (s.isLinux ? o.startsWith(e, n) : o.startsWithIgnoreCase(e, n)) && (e = "~/" + e.substr(n.length)), e
- }
- t.tildify = c
- })), define(n[252], i([0, 1, 77, 5, 178, 46, 39]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}),
- t.MIME_TEXT = "text/plain", t.MIME_UNKNOWN = "application/unknown";
- var a = [], l = [], u = [];
- function d(e, t, n) {
- for (var r = null, s = null, a = null, l = n.length - 1; l >= 0; l--) {
- var u = n[l];
- if (t === u.filenameLowercase) {
- r = u;
- break
- }
- if (u.filepattern && (!s || u.filepattern.length > s.filepattern.length)) {
- var d = u.filepatternOnPath ? e : t;
- o.match(u.filepatternLowercase, d) && (s = u)
- }
- u.extension && (!a || u.extension.length > a.extension.length) && i.endsWith(t, u.extensionLowercase) && (a = u)
- }
- return r ? r.mime : s ? s.mime : a ? a.mime : null
- }
- t.registerTextMime = function (e, t) {
- void 0 === t && (t = !1);
- var i = function (e) {
- return {
- id: e.id,
- mime: e.mime,
- filename: e.filename,
- extension: e.extension,
- filepattern: e.filepattern,
- firstline: e.firstline,
- userConfigured: e.userConfigured,
- filenameLowercase: e.filename ? e.filename.toLowerCase() : void 0,
- extensionLowercase: e.extension ? e.extension.toLowerCase() : void 0,
- filepatternLowercase: e.filepattern ? e.filepattern.toLowerCase() : void 0,
- filepatternOnPath: !!e.filepattern && e.filepattern.indexOf(n.posix.sep) >= 0
- }
- }(e);
- a.push(i), i.userConfigured ? u.push(i) : l.push(i),
- t && !i.userConfigured && a.forEach((function (e) {
- e.mime === i.mime || e.userConfigured || (i.extension && e.extension === i.extension && console.warn("Overwriting extension <<" + i.extension + ">> to now point to mime <<" + i.mime + ">>"), i.filename && e.filename === i.filename && console.warn("Overwriting filename <<" + i.filename + ">> to now point to mime <<" + i.mime + ">>"), i.filepattern && e.filepattern === i.filepattern && console.warn("Overwriting filepattern <<" + i.filepattern + ">> to now point to mime <<" + i.mime + ">>"), i.firstline && e.firstline === i.firstline && console.warn("Overwriting firstline <<" + i.firstline + ">> to now point to mime <<" + i.mime + ">>"))
- }))
- }, t.guessMimeTypes = function (e, o) {
- var c;
- if (e) switch (e.scheme) {
- case r.Schemas.file:
- c = e.fsPath;
- break;
- case r.Schemas.data:
- c = s.DataUri.parseMetaData(e).get(s.DataUri.META_DATA_LABEL);
- break;
- default:
- c = e.path
- }
- if (!c) return [t.MIME_UNKNOWN];
- c = c.toLowerCase();
- var h = n.basename(c), p = d(c, h, u);
- if (p) return [p, t.MIME_TEXT];
- var g = d(c, h, l);
- if (g) return [g, t.MIME_TEXT];
- if (o) {
- var f = function (e) {
- i.startsWithUTF8BOM(e) && (e = e.substr(1));
- if (e.length > 0) for (var t = a.length - 1; t >= 0; t--) {
- var n = a[t];
- if (n.firstline) {
- var o = e.match(n.firstline);
- if (o && o.length > 0) return n.mime
- }
- }
- return null
- }(o);
- if (f) return [f, t.MIME_TEXT]
- }
- return [t.MIME_UNKNOWN]
- }
- })), define(n[182], i([0, 1, 10, 2, 16, 21]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = "$initialize", l = !1;
- t.logOnceWebWorkerWarning = function (e) {
- o.isWeb && (l || (l = !0, 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")), console.warn(e.message))
- };
- var u = function () {
- function e(e) {
- this._workerId = -1, this._handler = e, this._lastSentReq = 0, this._pendingReplies = Object.create(null)
- }
- return e.prototype.setWorkerId = function (e) {
- this._workerId = e
- }, e.prototype.sendMessage = function (e, t) {
- var n = this, i = String(++this._lastSentReq);
- return new Promise((function (o, r) {
- n._pendingReplies[i] = {resolve: o, reject: r}, n._send({
- vsWorker: n._workerId, req: i, method: e, args: t
- })
- }))
- }, e.prototype.handleMessage = function (e) {
- e && e.vsWorker && (-1 !== this._workerId && e.vsWorker !== this._workerId || this._handleMessage(e))
- }, e.prototype._handleMessage = function (e) {
- var t = this;
- if (e.seq) {
- var i = e;
- if (!this._pendingReplies[i.seq]) return void console.warn("Got reply to unknown seq");
- var o = this._pendingReplies[i.seq];
- if (delete this._pendingReplies[i.seq], i.err) {
- var r = i.err;
- return i.err.$isError && ((r = new Error).name = i.err.name, r.message = i.err.message, r.stack = i.err.stack), void o.reject(r)
- }
- o.resolve(i.res)
- } else {
- var s = e, a = s.req;
- this._handler.handleMessage(s.method, s.args).then((function (e) {
- t._send({vsWorker: t._workerId, seq: a, res: e, err: void 0})
- }), (function (e) {
- e.detail instanceof Error && (e.detail = n.transformErrorForSerialization(e.detail)), t._send({
- vsWorker: t._workerId,
- seq: a,
- res: void 0,
- err: n.transformErrorForSerialization(e)
- })
- }))
- }
- }, e.prototype._send = function (e) {
- var t = []
- ;
- if (e.req) for (var n = e, i = 0; i < n.args.length; i++) n.args[i] instanceof ArrayBuffer && t.push(n.args[i]); else (n = e).res instanceof ArrayBuffer && t.push(n.res);
- this._handler.sendMessage(e, t)
- }, e
- }(), d = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this, r = null;
- o._worker = o._register(t.create("vs/base/common/worker/simpleWorker", (function (e) {
- o._protocol.handleMessage(e)
- }), (function (e) {
- r && r(e)
- }))), o._protocol = new u({
- sendMessage: function (e, t) {
- o._worker.postMessage(e, t)
- }, handleMessage: function (e, t) {
- if ("function" != typeof i[e]) return Promise.reject(new Error("Missing method " + e + " on main thread host."));
- try {
- return Promise.resolve(i[e].apply(i, t))
- } catch (e) {
- return Promise.reject(e)
- }
- }
- }), o._protocol.setWorkerId(o._worker.getId());
- var l = null;
- void 0 !== self.require && "function" == typeof self.require.getConfig ? l = self.require.getConfig() : void 0 !== self.requirejs && (l = self.requirejs.s.contexts._.config);
- var d = s.getAllMethodNames(i);
- o._onModuleLoaded = o._protocol.sendMessage(a, [o._worker.getId(), JSON.parse(JSON.stringify(l)), n, d])
- ;var c = function (e, t) {
- return o._request(e, t)
- };
- return o._lazyProxy = new Promise((function (e, t) {
- r = t, o._onModuleLoaded.then((function (t) {
- e(s.createProxyObject(t, c))
- }), (function (e) {
- t(e), o._onError("Worker failed to load " + n, e)
- }))
- })), o
- }
- return r(t, e), t.prototype.getProxyObject = function () {
- return this._lazyProxy
- }, t.prototype._request = function (e, t) {
- var n = this;
- return new Promise((function (i, o) {
- n._onModuleLoaded.then((function () {
- n._protocol.sendMessage(e, t).then(i, o)
- }), o)
- }))
- }, t.prototype._onError = function (e, t) {
- console.error(e), console.info(t)
- }, t
- }(i.Disposable);
- t.SimpleWorkerClient = d;
- var c = function () {
- function e(e, t) {
- var n = this;
- this._requestHandlerFactory = t, this._requestHandler = null, this._protocol = new u({
- sendMessage: function (t, n) {
- e(t, n)
- }, handleMessage: function (e, t) {
- return n._handleMessage(e, t)
- }
- })
- }
- return e.prototype.onmessage = function (e) {
- this._protocol.handleMessage(e)
- }, e.prototype._handleMessage = function (e, t) {
- if (e === a) return this.initialize(t[0], t[1], t[2], t[3])
- ;
- if (!this._requestHandler || "function" != typeof this._requestHandler[e]) return Promise.reject(new Error("Missing requestHandler or method: " + e));
- try {
- return Promise.resolve(this._requestHandler[e].apply(this._requestHandler, t))
- } catch (e) {
- return Promise.reject(e)
- }
- }, e.prototype.initialize = function (e, t, n, i) {
- var o = this;
- this._protocol.setWorkerId(e);
- var r = s.createProxyObject(i, (function (e, t) {
- return o._protocol.sendMessage(e, t)
- }));
- return this._requestHandlerFactory ? (this._requestHandler = this._requestHandlerFactory(r), Promise.resolve(s.getAllMethodNames(this._requestHandler))) : (t && (void 0 !== t.baseUrl && delete t.baseUrl, void 0 !== t.paths && void 0 !== t.paths.vs && delete t.paths.vs, t.catchError = !0, self.require.config(t)), new Promise((function (e, t) {
- self.require([n], (function (n) {
- o._requestHandler = n.create(r), o._requestHandler ? e(s.getAllMethodNames(o._requestHandler)) : t(new Error("No RequestHandler!"))
- }), t)
- })))
- }, e
- }();
- t.SimpleWorkerServer = c, t.create = function (e) {
- return new c(e, null)
- }
- })), define(n[253], i([0, 1, 21]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e) {
- this.modelProvider = n.isFunction(e.getModel) ? e : {
- getModel: function () {
- return e
- }
- }
- }
- return e.prototype.getId = function (e, t) {
- if (!t) return null;
- var n = this.modelProvider.getModel();
- return n === t ? "__root__" : n.dataSource.getId(t)
- }, e.prototype.hasChildren = function (e, t) {
- var n = this.modelProvider.getModel();
- return !!(n && n === t && n.entries.length > 0)
- }, e.prototype.getChildren = function (e, t) {
- var n = this.modelProvider.getModel();
- return Promise.resolve(n === t ? n.entries : [])
- }, e.prototype.getParent = function (e, t) {
- return Promise.resolve(null)
- }, e
- }();
- t.DataSource = i;
- var o = function () {
- function e(e) {
- this.modelProvider = e
- }
- return e.prototype.getAriaLabel = function (e, t) {
- var n = this.modelProvider.getModel();
- return n.accessibilityProvider ? n.accessibilityProvider.getAriaLabel(t) : null
- }, e.prototype.getPosInSet = function (e, t) {
- var n = this.modelProvider.getModel(), i = 0;
- if (n.filter) for (var o = 0, r = n.entries; o < r.length; o++) {
- var s = r[o];
- if (n.filter.isVisible(s) && i++, s === t) break
- } else i = n.entries.indexOf(t) + 1;
- return String(i)
- }, e.prototype.getSetSize = function () {
- var e = this.modelProvider.getModel(), t = 0;
- if (e.filter) for (var n = 0, i = e.entries; n < i.length; n++) {
- var o = i[n];
- e.filter.isVisible(o) && t++
- } else t = e.entries.length;
- return String(t)
- }, e
- }();
- t.AccessibilityProvider = o;
- var r = function () {
- function e(e) {
- this.modelProvider = e
- }
- return e.prototype.isVisible = function (e, t) {
- var n = this.modelProvider.getModel();
- return !n.filter || n.filter.isVisible(t)
- }, e
- }();
- t.Filter = r;
- var s = function () {
- function e(e, t) {
- this.modelProvider = e, this.styles = t
- }
- return e.prototype.updateStyles = function (e) {
- this.styles = e
- }, e.prototype.getHeight = function (e, t) {
- return this.modelProvider.getModel().renderer.getHeight(t)
- }, e.prototype.getTemplateId = function (e, t) {
- return this.modelProvider.getModel().renderer.getTemplateId(t)
- }, e.prototype.renderTemplate = function (e, t, n) {
- return this.modelProvider.getModel().renderer.renderTemplate(t, n, this.styles)
- }, e.prototype.renderElement = function (e, t, n, i) {
- this.modelProvider.getModel().renderer.renderElement(t, n, i, this.styles)
- }, e.prototype.disposeTemplate = function (e, t, n) {
- this.modelProvider.getModel().renderer.disposeTemplate(t, n)
- }, e
- }();
- t.Renderer = s
- })), define(n[254], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t, n) {
- this._posx = e, this._posy = t, this._target = n
- }
- return e.prototype.preventDefault = function () {
- }, e.prototype.stopPropagation = function () {
- }, Object.defineProperty(e.prototype, "target", {
- get: function () {
- return this._target
- }, enumerable: !0, configurable: !0
- }), e
- }();
- t.ContextMenuEvent = n;
- var i = function (e) {
- function t(t) {
- var n = e.call(this, t.posx, t.posy, t.target) || this;
- return n.originalEvent = t, n
- }
- return r(t, e), t.prototype.preventDefault = function () {
- this.originalEvent.preventDefault()
- }, t.prototype.stopPropagation = function () {
- this.originalEvent.stopPropagation()
- }, t
- }(n);
- t.MouseContextMenuEvent = i;
- var o = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, n, i.target) || this;
- return o.originalEvent = i, o
- }
- return r(t, e),
- t.prototype.preventDefault = function () {
- this.originalEvent.preventDefault()
- }, t.prototype.stopPropagation = function () {
- this.originalEvent.stopPropagation()
- }, t
- }(n);
- t.KeyboardContextMenuEvent = o
- })), define(n[137], i([0, 1, 16, 10, 6, 36]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e() {
- this._arr = []
- }
- return e.prototype.set = function (e, t) {
- this._arr.push({keybinding: r.createKeybinding(e, n.OS), callback: t})
- }, e.prototype.dispatch = function (e) {
- for (var t = this._arr.length - 1; t >= 0; t--) {
- var n = this._arr[t];
- if (e.toChord().equals(n.keybinding)) return n.callback
- }
- return null
- }, e
- }();
- t.KeybindingDispatcher = s;
- var a = function () {
- function e(e) {
- var t = this;
- void 0 === e && (e = {
- clickBehavior: 0,
- keyboardSupport: !0,
- openMode: 0
- }), this.options = e, this.downKeyBindingDispatcher = new s, this.upKeyBindingDispatcher = new s, ("boolean" != typeof e.keyboardSupport || e.keyboardSupport) && (this.downKeyBindingDispatcher.set(16, (function (e, n) {
- return t.onUp(e, n)
- })), this.downKeyBindingDispatcher.set(18, (function (e, n) {
- return t.onDown(e, n)
- })), this.downKeyBindingDispatcher.set(15, (function (e, n) {
- return t.onLeft(e, n)
- })), this.downKeyBindingDispatcher.set(17, (function (e, n) {
- return t.onRight(e, n)
- })), n.isMacintosh && (this.downKeyBindingDispatcher.set(2064, (function (e, n) {
- return t.onLeft(e, n)
- })), this.downKeyBindingDispatcher.set(300, (function (e, n) {
- return t.onDown(e, n)
- })), this.downKeyBindingDispatcher.set(302, (function (e, n) {
- return t.onUp(e, n)
- }))), this.downKeyBindingDispatcher.set(11, (function (e, n) {
- return t.onPageUp(e, n)
- })), this.downKeyBindingDispatcher.set(12, (function (e, n) {
- return t.onPageDown(e, n)
- })), this.downKeyBindingDispatcher.set(14, (function (e, n) {
- return t.onHome(e, n)
- })), this.downKeyBindingDispatcher.set(13, (function (e, n) {
- return t.onEnd(e, n)
- })), this.downKeyBindingDispatcher.set(10, (function (e, n) {
- return t.onSpace(e, n)
- })), this.downKeyBindingDispatcher.set(9, (function (e, n) {
- return t.onEscape(e, n)
- })), this.upKeyBindingDispatcher.set(3, this.onEnter.bind(this)), this.upKeyBindingDispatcher.set(2051, this.onEnter.bind(this)))
- }
- return e.prototype.onMouseDown = function (e, t, n, i) {
- if (void 0 === i && (i = "mouse"), 0 === this.options.clickBehavior && (n.leftButton || n.middleButton)) {
- if (n.target) {
- if (n.target.tagName && "input" === n.target.tagName.toLowerCase()) return !1;
- if (o.findParentWithClass(n.target, "scrollbar", "monaco-tree")) return !1;
- if (o.findParentWithClass(n.target, "monaco-action-bar", "row")) return !1
- }
- return this.onLeftClick(e, t, n, i)
- }
- return !1
- }, e.prototype.onClick = function (e, t, i) {
- return n.isMacintosh && i.ctrlKey ? (i.preventDefault(), i.stopPropagation(), !1) : (!i.target || !i.target.tagName || "input" !== i.target.tagName.toLowerCase()) && ((0 !== this.options.clickBehavior || !i.leftButton && !i.middleButton) && this.onLeftClick(e, t, i))
- }, e.prototype.onLeftClick = function (e, t, n, o) {
- void 0 === o && (o = "mouse");
- var r = n, s = {origin: o, originalEvent: n, didClickOnTwistie: this.isClickOnTwistie(r)};
- e.getInput() === t ? (e.clearFocus(s), e.clearSelection(s)) : (n && r.browserEvent && "mousedown" === r.browserEvent.type && 1 === r.browserEvent.detail || n.preventDefault(), n.stopPropagation(), e.domFocus(),
- e.setSelection([t], s), e.setFocus(t, s), this.shouldToggleExpansion(t, r, o) && (e.isExpanded(t) ? e.collapse(t).then(void 0, i.onUnexpectedError) : e.expand(t).then(void 0, i.onUnexpectedError)));
- return !0
- }, e.prototype.shouldToggleExpansion = function (e, t, n) {
- var i = "mouse" === n && 2 === t.detail;
- return this.openOnSingleClick || i || this.isClickOnTwistie(t)
- }, Object.defineProperty(e.prototype, "openOnSingleClick", {
- get: function () {
- return 0 === this.options.openMode
- }, enumerable: !0, configurable: !0
- }), e.prototype.isClickOnTwistie = function (e) {
- var t = e.target;
- if (!o.hasClass(t, "content")) return !1;
- var n = window.getComputedStyle(t, ":before");
- if ("none" === n.backgroundImage || "none" === n.display) return !1;
- var i = parseInt(n.width) + parseInt(n.paddingRight);
- return e.browserEvent.offsetX <= i
- }, e.prototype.onContextMenu = function (e, t, n) {
- return (!n.target || !n.target.tagName || "input" !== n.target.tagName.toLowerCase()) && (n && (n.preventDefault(), n.stopPropagation()), !1)
- }, e.prototype.onTap = function (e, t, n) {
- var i = n.initialTarget
- ;
- return (!i || !i.tagName || "input" !== i.tagName.toLowerCase()) && this.onLeftClick(e, t, n, "touch")
- }, e.prototype.onKeyDown = function (e, t) {
- return this.onKey(this.downKeyBindingDispatcher, e, t)
- }, e.prototype.onKeyUp = function (e, t) {
- return this.onKey(this.upKeyBindingDispatcher, e, t)
- }, e.prototype.onKey = function (e, t, n) {
- var i = e.dispatch(n.toKeybinding());
- return !(!i || !i(t, n)) && (n.preventDefault(), n.stopPropagation(), !0)
- }, e.prototype.onUp = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? e.clearHighlight(n) : (e.focusPrevious(1, n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
- }, e.prototype.onPageUp = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? e.clearHighlight(n) : (e.focusPreviousPage(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
- }, e.prototype.onDown = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? e.clearHighlight(n) : (e.focusNext(1, n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
- },
- e.prototype.onPageDown = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? e.clearHighlight(n) : (e.focusNextPage(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
- }, e.prototype.onHome = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? e.clearHighlight(n) : (e.focusFirst(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
- }, e.prototype.onEnd = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? e.clearHighlight(n) : (e.focusLast(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
- }, e.prototype.onLeft = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- if (e.getHighlight()) e.clearHighlight(n); else {
- var o = e.getFocus();
- e.collapse(o).then((function (t) {
- if (o && !t) return e.focusParent(n), e.reveal(e.getFocus())
- })).then(void 0, i.onUnexpectedError)
- }
- return !0
- }, e.prototype.onRight = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- if (e.getHighlight()) e.clearHighlight(n); else {
- var o = e.getFocus()
- ;e.expand(o).then((function (t) {
- if (o && !t) return e.focusFirstChild(n), e.reveal(e.getFocus())
- })).then(void 0, i.onUnexpectedError)
- }
- return !0
- }, e.prototype.onEnter = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- if (e.getHighlight()) return !1;
- var i = e.getFocus();
- return i && e.setSelection([i], n), !0
- }, e.prototype.onSpace = function (e, t) {
- if (e.getHighlight()) return !1;
- var n = e.getFocus();
- return n && e.toggleExpansion(n), !0
- }, e.prototype.onEscape = function (e, t) {
- var n = {origin: "keyboard", originalEvent: t};
- return e.getHighlight() ? (e.clearHighlight(n), !0) : e.getSelection().length ? (e.clearSelection(n), !0) : !!e.getFocus() && (e.clearFocus(n), !0)
- }, e
- }();
- t.DefaultController = a;
- var l = function () {
- function e() {
- }
- return e.prototype.getDragURI = function (e, t) {
- return null
- }, e.prototype.onDragStart = function (e, t, n) {
- }, e.prototype.onDragOver = function (e, t, n, i) {
- return null
- }, e.prototype.drop = function (e, t, n, i) {
- }, e
- }();
- t.DefaultDragAndDrop = l;
- var u = function () {
- function e() {
- }
- return e.prototype.isVisible = function (e, t) {
- return !0
- }, e
- }();
- t.DefaultFilter = u
- ;var d = function () {
- function e() {
- }
- return e.prototype.getAriaLabel = function (e, t) {
- return null
- }, e
- }();
- t.DefaultAccessibilityProvider = d;
- var c = function () {
- function e(e, t) {
- this.styleElement = e, this.selectorSuffix = t
- }
- return e.prototype.style = function (e) {
- var t = this.selectorSuffix ? "." + this.selectorSuffix : "", n = [];
- e.listFocusBackground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: " + e.listFocusBackground + "; }"), e.listFocusForeground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: " + e.listFocusForeground + "; }"), e.listActiveSelectionBackground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: " + e.listActiveSelectionBackground + "; }"), e.listActiveSelectionForeground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: " + e.listActiveSelectionForeground + "; }"),
- e.listFocusAndSelectionBackground && n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: " + e.listFocusAndSelectionBackground + "; }\n\t\t\t"), e.listFocusAndSelectionForeground && n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: " + e.listFocusAndSelectionForeground + "; }\n\t\t\t"), e.listInactiveSelectionBackground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: " + e.listInactiveSelectionBackground + "; }"), e.listInactiveSelectionForeground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: " + e.listInactiveSelectionForeground + "; }"),
- e.listHoverBackground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: " + e.listHoverBackground + "; }"), e.listHoverForeground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: " + e.listHoverForeground + "; }"), e.listDropBackground && n.push("\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: " + e.listDropBackground + " !important; color: inherit !important; }\n\t\t\t"),
- e.listFocusOutline && n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid " + e.listFocusOutline + "; background: #000; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed " + e.listFocusOutline + "; }\n\t\t\t")
- ;var i = n.join("\n");
- i !== this.styleElement.innerHTML && (this.styleElement.innerHTML = i)
- }, e
- }();
- t.DefaultTreestyler = c
- })), define(n[255], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this.elements = e
- }
- return e.prototype.update = function (e) {
- }, e.prototype.getData = function () {
- return this.elements
- }, e
- }();
- t.ElementsDragAndDropData = n;
- var i = function () {
- function e(e) {
- this.elements = e
- }
- return e.prototype.update = function (e) {
- }, e.prototype.getData = function () {
- return this.elements
- }, e
- }();
- t.ExternalElementsDragAndDropData = i;
- var o = function () {
- function e() {
- this.types = [], this.files = []
- }
- return e.prototype.update = function (e) {
- e.types && (this.types = [], Array.prototype.push.apply(this.types, e.types)), e.files && (this.files = [], Array.prototype.push.apply(this.files, e.files), this.files = this.files.filter((function (e) {
- return e.size || e.type
- })))
- }, e.prototype.getData = function () {
- return {types: this.types, files: this.files}
- }, e
- }();
- t.DesktopDragAndDropData = o
- })),
- define(n[256], i([0, 1, 124, 10, 2, 4]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e) {
- this._onDispose = new s.Emitter, this.onDispose = this._onDispose.event, this._item = e
- }
- return Object.defineProperty(e.prototype, "item", {
- get: function () {
- return this._item
- }, enumerable: !0, configurable: !0
- }), e.prototype.dispose = function () {
- this._onDispose && (this._onDispose.fire(), this._onDispose.dispose(), this._onDispose = void 0)
- }, e
- }();
- t.LockData = a;
- var l = function () {
- function e() {
- this.locks = Object.create({})
- }
- return e.prototype.isLocked = function (e) {
- return !!this.locks[e.id]
- }, e.prototype.run = function (e, t) {
- var n = this, i = this.getLock(e);
- return i ? new Promise((function (o, r) {
- s.Event.once(i.onDispose)((function () {
- return n.run(e, t).then(o, r)
- }))
- })) : new Promise((function (i, o) {
- if (e.isDisposed()) return o(new Error("Item is disposed."));
- var r = n.locks[e.id] = new a(e);
- return t().then((function (t) {
- return delete n.locks[e.id], r.dispose(), t
- })).then(i, o)
- }))
- }, e.prototype.getLock = function (e) {
- var t
- ;
- for (t in this.locks) {
- var n = this.locks[t];
- if (e.intersects(n.item)) return n
- }
- return null
- }, e
- }();
- t.Lock = l;
- var u = function () {
- function e() {
- this._isDisposed = !1, this._onDidRevealItem = new s.EventMultiplexer, this.onDidRevealItem = this._onDidRevealItem.event, this._onExpandItem = new s.EventMultiplexer, this.onExpandItem = this._onExpandItem.event, this._onDidExpandItem = new s.EventMultiplexer, this.onDidExpandItem = this._onDidExpandItem.event, this._onCollapseItem = new s.EventMultiplexer, this.onCollapseItem = this._onCollapseItem.event, this._onDidCollapseItem = new s.EventMultiplexer, this.onDidCollapseItem = this._onDidCollapseItem.event, this._onDidAddTraitItem = new s.EventMultiplexer, this.onDidAddTraitItem = this._onDidAddTraitItem.event, this._onDidRemoveTraitItem = new s.EventMultiplexer, this.onDidRemoveTraitItem = this._onDidRemoveTraitItem.event, this._onDidRefreshItem = new s.EventMultiplexer, this.onDidRefreshItem = this._onDidRefreshItem.event, this._onRefreshItemChildren = new s.EventMultiplexer,
- this.onRefreshItemChildren = this._onRefreshItemChildren.event, this._onDidRefreshItemChildren = new s.EventMultiplexer, this.onDidRefreshItemChildren = this._onDidRefreshItemChildren.event, this._onDidDisposeItem = new s.EventMultiplexer, this.onDidDisposeItem = this._onDidDisposeItem.event, this.items = {}
- }
- return e.prototype.register = function (e) {
- n.ok(!this.isRegistered(e.id), "item already registered: " + e.id);
- var t = o.combinedDisposable(this._onDidRevealItem.add(e.onDidReveal), this._onExpandItem.add(e.onExpand), this._onDidExpandItem.add(e.onDidExpand), this._onCollapseItem.add(e.onCollapse), this._onDidCollapseItem.add(e.onDidCollapse), this._onDidAddTraitItem.add(e.onDidAddTrait), this._onDidRemoveTraitItem.add(e.onDidRemoveTrait), this._onDidRefreshItem.add(e.onDidRefresh), this._onRefreshItemChildren.add(e.onRefreshChildren), this._onDidRefreshItemChildren.add(e.onDidRefreshChildren), this._onDidDisposeItem.add(e.onDidDispose));
- this.items[e.id] = {item: e, disposable: t}
- }, e.prototype.deregister = function (e) {
- n.ok(this.isRegistered(e.id), "item not registered: " + e.id), this.items[e.id].disposable.dispose(), delete this.items[e.id]
- }, e.prototype.isRegistered = function (e) {
- return this.items.hasOwnProperty(e)
- }, e.prototype.getItem = function (e) {
- var t = this.items[e];
- return t ? t.item : null
- }, e.prototype.dispose = function () {
- this.items = {}, this._onDidRevealItem.dispose(), this._onExpandItem.dispose(), this._onDidExpandItem.dispose(), this._onCollapseItem.dispose(), this._onDidCollapseItem.dispose(), this._onDidAddTraitItem.dispose(), this._onDidRemoveTraitItem.dispose(), this._onDidRefreshItem.dispose(), this._onRefreshItemChildren.dispose(), this._onDidRefreshItemChildren.dispose(), this._isDisposed = !0
- }, e.prototype.isDisposed = function () {
- return this._isDisposed
- }, e
- }();
- t.ItemRegistry = u;
- var d = function () {
- function e(e, t, n, i, o) {
- this._onDidCreate = new s.Emitter, this._onDidReveal = new s.Emitter, this.onDidReveal = this._onDidReveal.event, this._onExpand = new s.Emitter, this.onExpand = this._onExpand.event, this._onDidExpand = new s.Emitter,
- this.onDidExpand = this._onDidExpand.event, this._onCollapse = new s.Emitter, this.onCollapse = this._onCollapse.event, this._onDidCollapse = new s.Emitter, this.onDidCollapse = this._onDidCollapse.event, this._onDidAddTrait = new s.Emitter, this.onDidAddTrait = this._onDidAddTrait.event, this._onDidRemoveTrait = new s.Emitter, this.onDidRemoveTrait = this._onDidRemoveTrait.event, this._onDidRefresh = new s.Emitter, this.onDidRefresh = this._onDidRefresh.event, this._onRefreshChildren = new s.Emitter, this.onRefreshChildren = this._onRefreshChildren.event, this._onDidRefreshChildren = new s.Emitter, this.onDidRefreshChildren = this._onDidRefreshChildren.event, this._onDidDispose = new s.Emitter, this.onDidDispose = this._onDidDispose.event, this.registry = t, this.context = n, this.lock = i, this.element = o, this.id = e, this.registry.register(this), this.doesHaveChildren = this.context.dataSource.hasChildren(this.context.tree, this.element), this.needsChildrenRefresh = !0, this.parent = null, this.previous = null, this.next = null, this.firstChild = null, this.lastChild = null, this.traits = {},
- this.depth = 0, this.expanded = !(!this.context.dataSource.shouldAutoexpand || !this.context.dataSource.shouldAutoexpand(this.context.tree, o)), this._onDidCreate.fire(this), this.visible = this._isVisible(), this.height = this._getHeight(), this._isDisposed = !1
- }
- return e.prototype.getElement = function () {
- return this.element
- }, e.prototype.hasChildren = function () {
- return this.doesHaveChildren
- }, e.prototype.getDepth = function () {
- return this.depth
- }, e.prototype.isVisible = function () {
- return this.visible
- }, e.prototype.setVisible = function (e) {
- this.visible = e
- }, e.prototype.isExpanded = function () {
- return this.expanded
- }, e.prototype._setExpanded = function (e) {
- this.expanded = e
- }, e.prototype.reveal = function (e) {
- void 0 === e && (e = null);
- var t = {item: this, relativeTop: e};
- this._onDidReveal.fire(t)
- }, e.prototype.expand = function () {
- var e = this;
- return this.isExpanded() || !this.doesHaveChildren || this.lock.isLocked(this) ? Promise.resolve(!1) : this.lock.run(this, (function () {
- if (e.isExpanded() || !e.doesHaveChildren) return Promise.resolve(!1);
- var t = {item: e}
- ;
- return e._onExpand.fire(t), (e.needsChildrenRefresh ? e.refreshChildren(!1, !0, !0) : Promise.resolve(null)).then((function () {
- return e._setExpanded(!0), e._onDidExpand.fire(t), !0
- }))
- })).then((function (t) {
- return !e.isDisposed() && (e.context.options.autoExpandSingleChildren && t && null !== e.firstChild && e.firstChild === e.lastChild && e.firstChild.isVisible() ? e.firstChild.expand().then((function () {
- return !0
- })) : t)
- }))
- }, e.prototype.collapse = function (e) {
- var t = this;
- if (void 0 === e && (e = !1), e) {
- var n = Promise.resolve(null);
- return this.forEachChild((function (e) {
- n = n.then((function () {
- return e.collapse(!0)
- }))
- })), n.then((function () {
- return t.collapse(!1)
- }))
- }
- return !this.isExpanded() || this.lock.isLocked(this) ? Promise.resolve(!1) : this.lock.run(this, (function () {
- var e = {item: t};
- return t._onCollapse.fire(e), t._setExpanded(!1), t._onDidCollapse.fire(e), Promise.resolve(!0)
- }))
- }, e.prototype.addTrait = function (e) {
- var t = {item: this, trait: e};
- this.traits[e] = !0, this._onDidAddTrait.fire(t)
- }, e.prototype.removeTrait = function (e) {
- var t = {item: this, trait: e}
- ;delete this.traits[e], this._onDidRemoveTrait.fire(t)
- }, e.prototype.hasTrait = function (e) {
- return this.traits[e] || !1
- }, e.prototype.getAllTraits = function () {
- var e, t = [];
- for (e in this.traits) this.traits.hasOwnProperty(e) && this.traits[e] && t.push(e);
- return t
- }, e.prototype.getHeight = function () {
- return this.height
- }, e.prototype.refreshChildren = function (t, n, o) {
- var r = this;
- if (void 0 === n && (n = !1), void 0 === o && (o = !1), !o && !this.isExpanded()) {
- var s = function (e) {
- e.needsChildrenRefresh = !0, e.forEachChild(s)
- };
- return s(this), Promise.resolve(this)
- }
- this.needsChildrenRefresh = !1;
- var a = function () {
- var o = {item: r, isNested: n};
- return r._onRefreshChildren.fire(o), (r.doesHaveChildren ? r.context.dataSource.getChildren(r.context.tree, r.element) : Promise.resolve([])).then((function (n) {
- if (r.isDisposed() || r.registry.isDisposed()) return Promise.resolve(null);
- if (!Array.isArray(n)) return Promise.reject(new Error("Please return an array of children."));
- n = n ? n.slice(0) : [], n = r.sort(n);
- for (var i = {}; null !== r.firstChild;) i[r.firstChild.id] = r.firstChild,
- r.removeChild(r.firstChild);
- for (var o = 0, s = n.length; o < s; o++) {
- var a = n[o], l = r.context.dataSource.getId(r.context.tree, a),
- u = i[l] || new e(l, r.registry, r.context, r.lock, a);
- u.element = a, t && (u.needsChildrenRefresh = t), delete i[l], r.addChild(u)
- }
- for (var d in i) i.hasOwnProperty(d) && i[d].dispose();
- return t ? Promise.all(r.mapEachChild((function (e) {
- return e.doRefresh(t, !0)
- }))) : Promise.all(r.mapEachChild((function (e) {
- return e.isExpanded() && e.needsChildrenRefresh ? e.doRefresh(t, !0) : (e.updateVisibility(), Promise.resolve(null))
- })))
- })).then(void 0, i.onUnexpectedError).then((function () {
- return r._onDidRefreshChildren.fire(o)
- }))
- };
- return n ? a() : this.lock.run(this, a)
- }, e.prototype.doRefresh = function (e, t) {
- return void 0 === t && (t = !1), this.doesHaveChildren = this.context.dataSource.hasChildren(this.context.tree, this.element), this.height = this._getHeight(), this.updateVisibility(), this._onDidRefresh.fire(this), this.refreshChildren(e, t)
- }, e.prototype.updateVisibility = function () {
- this.setVisible(this._isVisible())
- }, e.prototype.refresh = function (e) {
- return this.doRefresh(e)
- }, e.prototype.getNavigator = function () {
- return new h(this)
- }, e.prototype.intersects = function (e) {
- return this.isAncestorOf(e) || e.isAncestorOf(this)
- }, e.prototype.isAncestorOf = function (e) {
- for (var t = e; t;) {
- if (t.id === this.id) return !0;
- t = t.parent
- }
- return !1
- }, e.prototype.addChild = function (e, t) {
- void 0 === t && (t = this.lastChild);
- var n = null === this.firstChild, i = null === t, o = t === this.lastChild;
- if (n) this.firstChild = this.lastChild = e, e.next = e.previous = null; else if (i) {
- if (!this.firstChild) throw new Error("Invalid tree state");
- this.firstChild.previous = e, e.next = this.firstChild, e.previous = null, this.firstChild = e
- } else if (o) {
- if (!this.lastChild) throw new Error("Invalid tree state");
- this.lastChild.next = e, e.next = null, e.previous = this.lastChild, this.lastChild = e
- } else {
- if (e.previous = t, !t) throw new Error("Invalid tree state");
- if (e.next = t.next, !t.next) throw new Error("Invalid tree state");
- t.next.previous = e, t.next = e
- }
- e.parent = this, e.depth = this.depth + 1
- }, e.prototype.removeChild = function (e) {
- var t = this.firstChild === e, n = this.lastChild === e;
- if (t && n) this.firstChild = this.lastChild = null; else if (t) {
- if (!e.next) throw new Error("Invalid tree state");
- e.next.previous = null, this.firstChild = e.next
- } else if (n) {
- if (!e.previous) throw new Error("Invalid tree state");
- e.previous.next = null, this.lastChild = e.previous
- } else {
- if (!e.next) throw new Error("Invalid tree state");
- if (e.next.previous = e.previous, !e.previous) throw new Error("Invalid tree state");
- e.previous.next = e.next
- }
- e.parent = null, e.depth = NaN
- }, e.prototype.forEachChild = function (e) {
- for (var t, n = this.firstChild; n;) t = n.next, e(n), n = t
- }, e.prototype.mapEachChild = function (e) {
- var t = [];
- return this.forEachChild((function (n) {
- t.push(e(n))
- })), t
- }, e.prototype.sort = function (e) {
- var t = this, n = this.context.sorter;
- return n ? e.sort((function (e, i) {
- return n.compare(t.context.tree, e, i)
- })) : e
- }, e.prototype._getHeight = function () {
- return this.context.renderer ? this.context.renderer.getHeight(this.context.tree, this.element) : 0
- }, e.prototype._isVisible = function () {
- return !!this.context.filter && this.context.filter.isVisible(this.context.tree, this.element)
- }, e.prototype.isDisposed = function () {
- return this._isDisposed
- }, e.prototype.dispose = function () {
- this.forEachChild((function (e) {
- return e.dispose()
- })), this.parent = null, this.previous = null, this.next = null, this.firstChild = null, this.lastChild = null, this._onDidDispose.fire(this), this.registry.deregister(this), this._onDidCreate.dispose(), this._onDidReveal.dispose(), this._onExpand.dispose(), this._onDidExpand.dispose(), this._onCollapse.dispose(), this._onDidCollapse.dispose(), this._onDidAddTrait.dispose(), this._onDidRemoveTrait.dispose(), this._onDidRefresh.dispose(), this._onRefreshChildren.dispose(), this._onDidRefreshChildren.dispose(), this._onDidDispose.dispose(), this._isDisposed = !0
- }, e
- }();
- t.Item = d;
- var c = function (e) {
- function t(t, n, i, o, r) {
- return e.call(this, t, n, i, o, r) || this
- }
- return r(t, e), t.prototype.isVisible = function () {
- return !1
- }, t.prototype.setVisible = function (e) {
- }, t.prototype.isExpanded = function () {
- return !0
- },
- t.prototype._setExpanded = function (e) {
- }, t.prototype._getHeight = function () {
- return 0
- }, t.prototype._isVisible = function () {
- return !1
- }, t
- }(d), h = function () {
- function e(e, t) {
- void 0 === t && (t = !0), this.item = e, this.start = t ? e : null
- }
- return e.lastDescendantOf = function (t) {
- return t ? t instanceof c ? e.lastDescendantOf(t.lastChild) : t.isVisible() ? t.isExpanded() && null !== t.lastChild ? e.lastDescendantOf(t.lastChild) : t : e.lastDescendantOf(t.previous) : null
- }, e.prototype.current = function () {
- return this.item || null
- }, e.prototype.next = function () {
- if (this.item) do {
- if ((this.item instanceof c || this.item.isVisible() && this.item.isExpanded()) && this.item.firstChild) this.item = this.item.firstChild; else if (this.item === this.start) this.item = null; else {
- for (; this.item && this.item !== this.start && !this.item.next;) this.item = this.item.parent;
- this.item === this.start && (this.item = null), this.item = this.item ? this.item.next : null
- }
- } while (this.item && !this.item.isVisible());
- return this.item || null
- }, e.prototype.previous = function () {
- if (this.item) do {
- var t = e.lastDescendantOf(this.item.previous);
- t ? this.item = t : this.item.parent && this.item.parent !== this.start && this.item.parent.isVisible() ? this.item = this.item.parent : this.item = null
- } while (this.item && !this.item.isVisible());
- return this.item || null
- }, e.prototype.parent = function () {
- if (this.item) {
- var e = this.item.parent;
- e && e !== this.start && e.isVisible() ? this.item = e : this.item = null
- }
- return this.item || null
- }, e.prototype.first = function () {
- return this.item = this.start, this.next(), this.item || null
- }, e.prototype.last = function () {
- return e.lastDescendantOf(this.start)
- }, e
- }();
- t.TreeNavigator = h;
- var p = function () {
- function e(e) {
- this.registry = new u, this.registryDisposable = o.Disposable.None, this._onSetInput = new s.Emitter, this.onSetInput = this._onSetInput.event, this._onDidSetInput = new s.Emitter, this.onDidSetInput = this._onDidSetInput.event, this._onRefresh = new s.Emitter, this.onRefresh = this._onRefresh.event, this._onDidRefresh = new s.Emitter, this.onDidRefresh = this._onDidRefresh.event, this._onDidHighlight = new s.Emitter,
- this.onDidHighlight = this._onDidHighlight.event, this._onDidSelect = new s.Emitter, this.onDidSelect = this._onDidSelect.event, this._onDidFocus = new s.Emitter, this.onDidFocus = this._onDidFocus.event, this._onDidRevealItem = new s.Relay, this.onDidRevealItem = this._onDidRevealItem.event, this._onExpandItem = new s.Relay, this.onExpandItem = this._onExpandItem.event, this._onDidExpandItem = new s.Relay, this.onDidExpandItem = this._onDidExpandItem.event, this._onCollapseItem = new s.Relay, this.onCollapseItem = this._onCollapseItem.event, this._onDidCollapseItem = new s.Relay, this.onDidCollapseItem = this._onDidCollapseItem.event, this._onDidAddTraitItem = new s.Relay, this.onDidAddTraitItem = this._onDidAddTraitItem.event, this._onDidRemoveTraitItem = new s.Relay, this.onDidRemoveTraitItem = this._onDidRemoveTraitItem.event, this._onDidRefreshItem = new s.Relay, this.onDidRefreshItem = this._onDidRefreshItem.event, this._onRefreshItemChildren = new s.Relay, this.onRefreshItemChildren = this._onRefreshItemChildren.event, this._onDidRefreshItemChildren = new s.Relay,
- this.onDidRefreshItemChildren = this._onDidRefreshItemChildren.event, this._onDidDisposeItem = new s.Relay, this.context = e, this.input = null, this.traitsToItems = {}
- }
- return e.prototype.setInput = function (e) {
- var t = this, n = {item: this.input};
- this._onSetInput.fire(n), this.setSelection([]), this.setFocus(), this.setHighlight(), this.lock = new l, this.input && this.input.dispose(), this.registry && (this.registry.dispose(), this.registryDisposable.dispose()), this.registry = new u, this._onDidRevealItem.input = this.registry.onDidRevealItem, this._onExpandItem.input = this.registry.onExpandItem, this._onDidExpandItem.input = this.registry.onDidExpandItem, this._onCollapseItem.input = this.registry.onCollapseItem, this._onDidCollapseItem.input = this.registry.onDidCollapseItem, this._onDidAddTraitItem.input = this.registry.onDidAddTraitItem, this._onDidRemoveTraitItem.input = this.registry.onDidRemoveTraitItem, this._onDidRefreshItem.input = this.registry.onDidRefreshItem, this._onRefreshItemChildren.input = this.registry.onRefreshItemChildren,
- this._onDidRefreshItemChildren.input = this.registry.onDidRefreshItemChildren, this._onDidDisposeItem.input = this.registry.onDidDisposeItem, this.registryDisposable = this.registry.onDidDisposeItem((function (e) {
- return e.getAllTraits().forEach((function (n) {
- return delete t.traitsToItems[n][e.id]
- }))
- }));
- var i = this.context.dataSource.getId(this.context.tree, e);
- return this.input = new c(i, this.registry, this.context, this.lock, e), n = {item: this.input}, this._onDidSetInput.fire(n), this.refresh(this.input)
- }, e.prototype.getInput = function () {
- return this.input ? this.input.getElement() : null
- }, e.prototype.refresh = function (e, t) {
- var n = this;
- void 0 === e && (e = null), void 0 === t && (t = !0);
- var i = this.getItem(e);
- if (!i) return Promise.resolve(null);
- var o = {item: i, recursive: t};
- return this._onRefresh.fire(o), i.refresh(t).then((function () {
- n._onDidRefresh.fire(o)
- }))
- }, e.prototype.expand = function (e) {
- var t = this.getItem(e);
- return t ? t.expand() : Promise.resolve(!1)
- }, e.prototype.collapse = function (e, t) {
- void 0 === t && (t = !1);
- var n = this.getItem(e)
- ;
- return n ? n.collapse(t) : Promise.resolve(!1)
- }, e.prototype.toggleExpansion = function (e, t) {
- return void 0 === t && (t = !1), this.isExpanded(e) ? this.collapse(e, t) : this.expand(e)
- }, e.prototype.isExpanded = function (e) {
- var t = this.getItem(e);
- return !!t && t.isExpanded()
- }, e.prototype.reveal = function (e, t) {
- var n = this;
- return void 0 === t && (t = null), this.resolveUnknownParentChain(e).then((function (e) {
- var t = Promise.resolve(null);
- return e.forEach((function (e) {
- t = t.then((function () {
- return n.expand(e)
- }))
- })), t
- })).then((function () {
- var i = n.getItem(e);
- if (i) return i.reveal(t)
- }))
- }, e.prototype.resolveUnknownParentChain = function (e) {
- var t = this;
- return this.context.dataSource.getParent(this.context.tree, e).then((function (e) {
- return e ? t.resolveUnknownParentChain(e).then((function (t) {
- return t.push(e), t
- })) : Promise.resolve([])
- }))
- }, e.prototype.setHighlight = function (e, t) {
- this.setTraits("highlighted", e ? [e] : []);
- var n = {highlight: this.getHighlight(), payload: t};
- this._onDidHighlight.fire(n)
- }, e.prototype.getHighlight = function (e) {
- void 0 === e && (e = !1)
- ;var t = this.getElementsWithTrait("highlighted", e);
- return 0 === t.length ? null : t[0]
- }, e.prototype.setSelection = function (e, t) {
- this.setTraits("selected", e);
- var n = {selection: this.getSelection(), payload: t};
- this._onDidSelect.fire(n)
- }, e.prototype.getSelection = function (e) {
- return void 0 === e && (e = !1), this.getElementsWithTrait("selected", e)
- }, e.prototype.setFocus = function (e, t) {
- this.setTraits("focused", e ? [e] : []);
- var n = {focus: this.getFocus(), payload: t};
- this._onDidFocus.fire(n)
- }, e.prototype.getFocus = function (e) {
- void 0 === e && (e = !1);
- var t = this.getElementsWithTrait("focused", e);
- return 0 === t.length ? null : t[0]
- }, e.prototype.focusNext = function (e, t) {
- void 0 === e && (e = 1);
- for (var n, i = this.getFocus() || this.input, o = this.getNavigator(i, !1), r = 0; r < e && (n = o.next()); r++) i = n;
- this.setFocus(i, t)
- }, e.prototype.focusPrevious = function (e, t) {
- void 0 === e && (e = 1);
- for (var n, i = this.getFocus() || this.input, o = this.getNavigator(i, !1), r = 0; r < e && (n = o.previous()); r++) i = n;
- this.setFocus(i, t)
- }, e.prototype.focusParent = function (e) {
- var t = this.getFocus() || this.input, n = this.getNavigator(t, !1).parent();
- n && this.setFocus(n, e)
- }, e.prototype.focusFirstChild = function (e) {
- var t = this.getItem(this.getFocus() || this.input), n = this.getNavigator(t, !1), i = n.next();
- n.parent() === t && this.setFocus(i, e)
- }, e.prototype.focusFirst = function (e, t) {
- this.focusNth(0, e, t)
- }, e.prototype.focusNth = function (e, t, n) {
- for (var i = this.getParent(n), o = this.getNavigator(i), r = o.first(), s = 0; s < e; s++) r = o.next();
- r && this.setFocus(r, t)
- }, e.prototype.focusLast = function (e, t) {
- var n, i = this.getParent(t);
- t && i ? n = i.lastChild : n = this.getNavigator(i).last();
- n && this.setFocus(n, e)
- }, e.prototype.getParent = function (e) {
- if (e) {
- var t = this.getItem(e);
- if (t && t.parent) return t.parent
- }
- return this.getItem(this.input)
- }, e.prototype.getNavigator = function (e, t) {
- return void 0 === e && (e = null), void 0 === t && (t = !0), new h(this.getItem(e), t)
- }, e.prototype.getItem = function (e) {
- return void 0 === e && (e = null),
- null === e ? this.input : e instanceof d ? e : "string" == typeof e ? this.registry.getItem(e) : this.registry.getItem(this.context.dataSource.getId(this.context.tree, e))
- }, e.prototype.removeTraits = function (e, t) {
- var n, i, o = this.traitsToItems[e] || {};
- if (0 === t.length) {
- for (i in o) o.hasOwnProperty(i) && (n = o[i]).removeTrait(e);
- delete this.traitsToItems[e]
- } else for (var r = 0, s = t.length; r < s; r++) (n = this.getItem(t[r])) && (n.removeTrait(e), delete o[n.id])
- }, e.prototype.setTraits = function (e, t) {
- if (0 === t.length) this.removeTraits(e, t); else {
- for (var n = {}, i = void 0, o = 0, r = t.length; o < r; o++) (i = this.getItem(t[o])) && (n[i.id] = i);
- var s = this.traitsToItems[e] || {}, a = [], l = void 0;
- for (l in s) s.hasOwnProperty(l) && (n.hasOwnProperty(l) ? delete n[l] : a.push(s[l]));
- for (o = 0, r = a.length; o < r; o++) (i = a[o]).removeTrait(e), delete s[i.id];
- for (l in n) n.hasOwnProperty(l) && ((i = n[l]).addTrait(e), s[l] = i);
- this.traitsToItems[e] = s
- }
- }, e.prototype.getElementsWithTrait = function (e, t) {
- var n, i = [], o = this.traitsToItems[e] || {}
- ;
- for (n in o) o.hasOwnProperty(n) && (o[n].isVisible() || t) && i.push(o[n].getElement());
- return i
- }, e.prototype.dispose = function () {
- this.registry.dispose(), this._onSetInput.dispose(), this._onDidSetInput.dispose(), this._onRefresh.dispose(), this._onDidRefresh.dispose(), this._onDidHighlight.dispose(), this._onDidSelect.dispose(), this._onDidFocus.dispose(), this._onDidRevealItem.dispose(), this._onExpandItem.dispose(), this._onDidExpandItem.dispose(), this._onCollapseItem.dispose(), this._onDidCollapseItem.dispose(), this._onDidAddTraitItem.dispose(), this._onDidRemoveTraitItem.dispose(), this._onDidRefreshItem.dispose(), this._onRefreshItemChildren.dispose(), this._onDidRefreshItemChildren.dispose(), this._onDidDisposeItem.dispose()
- }, e
- }();
- t.TreeModel = p
- })), define(n[257], i([0, 1, 54]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e() {
- this.heightMap = [], this.indexes = {}
- }
- return e.prototype.getContentHeight = function () {
- var e = this.heightMap[this.heightMap.length - 1]
- ;
- return e ? e.top + e.height : 0
- }, e.prototype.onInsertItems = function (e, t) {
- void 0 === t && (t = null);
- var n, i, o, r, s = null, a = 0;
- if (null === t) i = 0, r = 0; else {
- if (i = this.indexes[t] + 1, !(n = this.heightMap[i - 1])) return void console.error("view item doesnt exist");
- r = n.top + n.height
- }
- for (var l = this.heightMap.splice.bind(this.heightMap, i, 0), u = []; s = e.next();) (n = this.createViewItem(s)).top = r + a, this.indexes[s.id] = i++, u.push(n), a += n.height;
- for (l.apply(this.heightMap, u), o = i; o < this.heightMap.length; o++) (n = this.heightMap[o]).top += a, this.indexes[n.model.id] = o;
- for (o = u.length - 1; o >= 0; o--) this.onInsertItem(u[o]);
- for (o = this.heightMap.length - 1; o >= i; o--) this.onRefreshItem(this.heightMap[o]);
- return a
- }, e.prototype.onInsertItem = function (e) {
- }, e.prototype.onRemoveItems = function (e) {
- for (var t, n = null, i = null, o = 0, r = 0; n = e.next();) {
- if (o = this.indexes[n], !(t = this.heightMap[o])) return void console.error("view item doesnt exist");
- r -= t.height, delete this.indexes[n], this.onRemoveItem(t), null === i && (i = o)
- }
- if (0 !== r && null !== i) for (this.heightMap.splice(i, o - i + 1),
- o = i; o < this.heightMap.length; o++) (t = this.heightMap[o]).top += r, this.indexes[t.model.id] = o, this.onRefreshItem(t)
- }, e.prototype.onRemoveItem = function (e) {
- }, e.prototype.onRefreshItemSet = function (e) {
- var t = this, i = e.sort((function (e, n) {
- return t.indexes[e.id] - t.indexes[n.id]
- }));
- this.onRefreshItems(new n.ArrayIterator(i))
- }, e.prototype.onRefreshItems = function (e) {
- for (var t, n, i, o = null, r = null, s = 0; o = e.next();) {
- for (i = this.indexes[o.id]; 0 !== s && null !== r && r < i; r++) (t = this.heightMap[r]).top += s, this.onRefreshItem(t);
- t = this.heightMap[i], n = o.getHeight(), t.top += s, s += n - t.height, t.height = n, this.onRefreshItem(t, !0), r = i + 1
- }
- if (0 !== s && null !== r) for (; r < this.heightMap.length; r++) (t = this.heightMap[r]).top += s, this.onRefreshItem(t)
- }, e.prototype.onRefreshItem = function (e, t) {
- void 0 === t && (t = !1)
- }, e.prototype.indexAt = function (e) {
- for (var t, n, i = 0, o = this.heightMap.length; i < o;) if (t = Math.floor((i + o) / 2), e < (n = this.heightMap[t]).top) o = t; else {
- if (!(e >= n.top + n.height)) return t;
- if (i === t) break;
- i = t
- }
- return this.heightMap.length
- }, e.prototype.indexAfter = function (e) {
- return Math.min(this.indexAt(e) + 1, this.heightMap.length)
- }, e.prototype.itemAtIndex = function (e) {
- return this.heightMap[e]
- }, e.prototype.itemAfter = function (e) {
- return this.heightMap[this.indexes[e.model.id] + 1] || null
- }, e.prototype.createViewItem = function (e) {
- throw new Error("not implemented")
- }, e.prototype.dispose = function () {
- this.heightMap = [], this.indexes = {}
- }, e
- }();
- t.HeightMap = i
- })), define(n[258], i([0, 1, 16, 182]), (function (e, t, n, i) {
- "use strict";
- function o(t, n) {
- if (/^(http:)|(https:)|(file:)/.test(t)) {
- var i = String(window.location),
- o = i.substr(0, i.length - window.location.hash.length - window.location.search.length - window.location.pathname.length);
- if (t.substring(0, o.length) !== o) {
- var r = "vs/base/worker/defaultWorkerFactory.js", s = e.toUrl(r).slice(0, -r.length);
- return "data:text/javascript;charset=utf-8," + encodeURIComponent("/*" + n + "*/self.MonacoEnvironment={baseUrl: '" + s + "'};importScripts('" + t + "');/*" + n + "*/")
- }
- }
- return t + "#" + n
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getWorkerBootstrapUrl = o;
- var r = function () {
- function t(t, i, r, s, a) {
- this.id = i;
- var l = function (t, i) {
- if (n.globals.MonacoEnvironment) {
- if ("function" == typeof n.globals.MonacoEnvironment.getWorker) return n.globals.MonacoEnvironment.getWorker(t, i);
- if ("function" == typeof n.globals.MonacoEnvironment.getWorkerUrl) return new Worker(n.globals.MonacoEnvironment.getWorkerUrl(t, i))
- }
- if ("function" == typeof e) {
- var r = o(e.toUrl("./" + t), i);
- return new Worker(r, {name: i})
- }
- throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")
- }("workerMain.js", r);
- "function" == typeof l.then ? this.worker = l : this.worker = Promise.resolve(l), this.postMessage(t, []), this.worker.then((function (e) {
- e.onmessage = function (e) {
- s(e.data)
- }, e.onmessageerror = a, "function" == typeof e.addEventListener && e.addEventListener("error", a)
- }))
- }
- return t.prototype.getId = function () {
- return this.id
- }, t.prototype.postMessage = function (e, t) {
- this.worker && this.worker.then((function (n) {
- return n.postMessage(e, t)
- }))
- }, t.prototype.dispose = function () {
- this.worker && this.worker.then((function (e) {
- return e.terminate()
- })), this.worker = null
- }, t
- }(), s = function () {
- function e(e) {
- this._label = e, this._webWorkerFailedBeforeError = !1
- }
- return e.prototype.create = function (t, n, o) {
- var s = this, a = ++e.LAST_WORKER_ID;
- if (this._webWorkerFailedBeforeError) throw this._webWorkerFailedBeforeError;
- return new r(t, a, this._label || "anonymous" + a, n, (function (e) {
- i.logOnceWebWorkerWarning(e), s._webWorkerFailedBeforeError = e, o(e)
- }))
- }, e.LAST_WORKER_ID = 0, e
- }();
- t.DefaultWorkerFactory = s
- })), define(n[259], i([9]), {}), define(n[260], i([9]), {}), define(n[261], i([9]), {}), define(n[138], i([0, 1, 6, 47, 27, 4, 31, 261]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = {
- inputActiveOptionBorder: o.Color.fromHex("#007ACC00"),
- inputActiveOptionBackground: o.Color.fromHex("#0E639C50")
- }, u = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._onChange = n._register(new s.Emitter), n.onChange = n._onChange.event, n._onKeyDown = n._register(new s.Emitter), n.onKeyDown = n._onKeyDown.event, n._opts = a.deepClone(t), a.mixin(n._opts, l, !1),
- n._checked = n._opts.isChecked, n.domNode = document.createElement("div"), n.domNode.title = n._opts.title, n.domNode.className = "monaco-custom-checkbox codicon " + (n._opts.actionClassName || "") + " " + (n._checked ? "checked" : "unchecked"), n.domNode.tabIndex = 0, n.domNode.setAttribute("role", "checkbox"), n.domNode.setAttribute("aria-checked", String(n._checked)), n.domNode.setAttribute("aria-label", n._opts.title), n.applyStyles(), n.onclick(n.domNode, (function (e) {
- n.checked = !n._checked, n._onChange.fire(!1), e.preventDefault()
- })), n.ignoreGesture(n.domNode), n.onkeydown(n.domNode, (function (e) {
- if (10 === e.keyCode || 3 === e.keyCode) return n.checked = !n._checked, n._onChange.fire(!0), void e.preventDefault();
- n._onKeyDown.fire(e)
- })), n
- }
- return r(t, e), Object.defineProperty(t.prototype, "enabled", {
- get: function () {
- return "true" !== this.domNode.getAttribute("aria-disabled")
- }, enumerable: !0, configurable: !0
- }), t.prototype.focus = function () {
- this.domNode.focus()
- }, Object.defineProperty(t.prototype, "checked", {
- get: function () {
- return this._checked
- }, set: function (e) {
- this._checked = e, this.domNode.setAttribute("aria-checked", String(this._checked)), this._checked ? this.domNode.classList.add("checked") : this.domNode.classList.remove("checked"), this.applyStyles()
- }, enumerable: !0, configurable: !0
- }), t.prototype.width = function () {
- return 22
- }, t.prototype.style = function (e) {
- e.inputActiveOptionBorder && (this._opts.inputActiveOptionBorder = e.inputActiveOptionBorder), e.inputActiveOptionBackground && (this._opts.inputActiveOptionBackground = e.inputActiveOptionBackground), this.applyStyles()
- }, t.prototype.applyStyles = function () {
- this.domNode && (this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : "transparent", this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : "transparent")
- }, t.prototype.enable = function () {
- this.domNode.tabIndex = 0, this.domNode.setAttribute("aria-disabled", String(!1))
- }, t.prototype.disable = function () {
- n.removeTabIndexAndUpdateFocus(this.domNode), this.domNode.setAttribute("aria-disabled", String(!0))
- }, t
- }(i.Widget);
- t.Checkbox = u
- })), define(n[262], i([9]), {}), define(n[263], i([9]), {}), define(n[183], i([0, 1, 262, 263]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- })), define(n[264], i([9]), {}), define(n[265], i([0, 1, 6, 16, 2, 103, 88, 264]), (function (e, t, n, i, o, s, a) {
- "use strict";
- function l(e, t, n) {
- var i = n.offset + n.size;
- return 0 === n.position ? t <= e - i ? i : t <= n.offset ? n.offset - t : Math.max(e - t, 0) : t <= n.offset ? n.offset - t : t <= e - i ? i : 0
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.layout = l;
- var u = function (e) {
- function t(t) {
- var i = e.call(this) || this;
- return i.container = null, i.delegate = null, i.toDisposeOnClean = o.Disposable.None, i.toDisposeOnSetContainer = o.Disposable.None, i.view = n.$(".context-view"), n.hide(i.view), i.setContainer(t), i._register(o.toDisposable((function () {
- return i.setContainer(null)
- }))), i
- }
- return r(t, e), t.prototype.setContainer = function (e) {
- var i = this
- ;
- if (this.container && (this.toDisposeOnSetContainer.dispose(), this.container.removeChild(this.view), this.container = null), e) {
- this.container = e, this.container.appendChild(this.view);
- var r = new o.DisposableStore;
- t.BUBBLE_UP_EVENTS.forEach((function (e) {
- r.add(n.addStandardDisposableListener(i.container, e, (function (e) {
- i.onDOMEvent(e, !1)
- })))
- })), t.BUBBLE_DOWN_EVENTS.forEach((function (e) {
- r.add(n.addStandardDisposableListener(i.container, e, (function (e) {
- i.onDOMEvent(e, !0)
- }), !0))
- })), this.toDisposeOnSetContainer = r
- }
- }, t.prototype.show = function (e) {
- this.isVisible() && this.hide(), n.clearNode(this.view), this.view.className = "context-view", this.view.style.top = "0px", this.view.style.left = "0px", n.show(this.view), this.toDisposeOnClean = e.render(this.view) || o.Disposable.None, this.delegate = e, this.doLayout(), this.delegate.focus && this.delegate.focus()
- }, t.prototype.layout = function () {
- this.isVisible() && (!1 !== this.delegate.canRelayout || i.isIOS && a.BrowserFeatures.pointerEvents ? (this.delegate.layout && this.delegate.layout(),
- this.doLayout()) : this.hide())
- }, t.prototype.doLayout = function () {
- if (this.isVisible()) {
- var e, t = this.delegate.getAnchor();
- if (n.isHTMLElement(t)) {
- var i = n.getDomNodePagePosition(t);
- e = {top: i.top, left: i.left, width: i.width, height: i.height}
- } else e = {top: t.y, left: t.x, width: t.width || 1, height: t.height || 2};
- var o, r = n.getTotalWidth(this.view), a = n.getTotalHeight(this.view),
- u = this.delegate.anchorPosition || 0, d = this.delegate.anchorAlignment || 0,
- c = {offset: e.top - window.pageYOffset, size: e.height, position: 0 === u ? 0 : 1};
- o = 0 === d ? {offset: e.left, size: 0, position: 0} : {
- offset: e.left + e.width,
- size: 0,
- position: 1
- };
- var h = l(window.innerHeight, a, c) + window.pageYOffset;
- s.Range.intersects({start: h, end: h + a}, {
- start: c.offset,
- end: c.offset + c.size
- }) && (o.size = e.width, 1 === d && (o.offset = e.left));
- var p = l(window.innerWidth, r, o);
- n.removeClasses(this.view, "top", "bottom", "left", "right"), n.addClass(this.view, 0 === u ? "bottom" : "top"), n.addClass(this.view, 0 === d ? "left" : "right");
- var g = n.getDomNodePagePosition(this.container);
- this.view.style.top = h - g.top + "px",
- this.view.style.left = p - g.left + "px", this.view.style.width = "initial"
- }
- }, t.prototype.hide = function (e) {
- var t = this.delegate;
- this.delegate = null, (null == t ? void 0 : t.onHide) && t.onHide(e), this.toDisposeOnClean.dispose(), n.hide(this.view)
- }, t.prototype.isVisible = function () {
- return !!this.delegate
- }, t.prototype.onDOMEvent = function (e, t) {
- this.delegate && (this.delegate.onDOMEvent ? this.delegate.onDOMEvent(e, document.activeElement) : t && !n.isAncestor(e.target, this.container) && this.hide())
- }, t.prototype.dispose = function () {
- this.hide(), e.prototype.dispose.call(this)
- }, t.BUBBLE_UP_EVENTS = ["click", "keydown", "focus", "blur"], t.BUBBLE_DOWN_EVENTS = ["click"], t
- }(o.Disposable);
- t.ContextView = u
- })), define(n[266], i([9]), {}), define(n[267], i([0, 1, 6, 5, 27, 31, 266]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = {badgeBackground: o.Color.fromHex("#4D4D4D"), badgeForeground: o.Color.fromHex("#FFFFFF")},
- a = function () {
- function e(e, t) {
- this.count = 0, this.options = t || Object.create(null), r.mixin(this.options, s, !1),
- this.badgeBackground = this.options.badgeBackground, this.badgeForeground = this.options.badgeForeground, this.badgeBorder = this.options.badgeBorder, this.element = n.append(e, n.$(".monaco-count-badge")), this.countFormat = this.options.countFormat || "{0}", this.titleFormat = this.options.titleFormat || "", this.setCount(this.options.count || 0)
- }
- return e.prototype.setCount = function (e) {
- this.count = e, this.render()
- }, e.prototype.setTitleFormat = function (e) {
- this.titleFormat = e, this.render()
- }, e.prototype.render = function () {
- this.element.textContent = i.format(this.countFormat, this.count), this.element.title = i.format(this.titleFormat, this.count), this.applyStyles()
- }, e.prototype.style = function (e) {
- this.badgeBackground = e.badgeBackground, this.badgeForeground = e.badgeForeground, this.badgeBorder = e.badgeBorder, this.applyStyles()
- }, e.prototype.applyStyles = function () {
- if (this.element) {
- var e = this.badgeBackground ? this.badgeBackground.toString() : "",
- t = this.badgeForeground ? this.badgeForeground.toString() : "",
- n = this.badgeBorder ? this.badgeBorder.toString() : ""
- ;this.element.style.backgroundColor = e, this.element.style.color = t, this.element.style.borderWidth = n ? "1px" : "", this.element.style.borderStyle = n ? "solid" : "", this.element.style.borderColor = n
- }
- }, e
- }();
- t.CountBadge = a
- })), define(n[184], i([9]), {}), define(n[268], i([9]), {}), define(n[139], i([0, 1, 6, 133, 2, 103, 31, 268]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function () {
- function e(e) {
- this._element = e
- }
- return Object.defineProperty(e.prototype, "element", {
- get: function () {
- return this._element
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "textContent", {
- set: function (e) {
- this.disposed || e === this._textContent || (this._textContent = e, this._element.textContent = e)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "className", {
- set: function (e) {
- this.disposed || e === this._className || (this._className = e, this._element.className = e)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "title", {
- set: function (e) {
- this.disposed || e === this._title || (this._title = e, this._title ? this._element.title = e : this._element.removeAttribute("title"))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "empty", {
- set: function (e) {
- this.disposed || e === this._empty || (this._empty = e, this._element.style.marginLeft = e ? "0" : "")
- }, enumerable: !0, configurable: !0
- }), e.prototype.dispose = function () {
- this.disposed = !0
- }, e
- }(), u = function (e) {
- function t(t, o) {
- var r = e.call(this) || this;
- r.domNode = r._register(new l(n.append(t, n.$(".monaco-icon-label"))));
- var s = n.append(r.domNode.element, n.$(".monaco-icon-label-container")),
- a = n.append(s, n.$("span.monaco-icon-name-container"));
- return r.descriptionContainer = r._register(new l(n.append(s, n.$("span.monaco-icon-description-container")))), (null == o ? void 0 : o.supportHighlights) ? r.nameNode = new c(a, !!o.supportCodicons) : r.nameNode = new d(a), (null == o ? void 0 : o.supportDescriptionHighlights) ? r.descriptionNodeFactory = function () {
- return new i.HighlightedLabel(n.append(r.descriptionContainer.element, n.$("span.label-description")), !!o.supportCodicons)
- } : r.descriptionNodeFactory = function () {
- return r._register(new l(n.append(r.descriptionContainer.element, n.$("span.label-description"))))
- }, r
- }
- return r(t, e), t.prototype.setLabel = function (e, t, n) {
- var o = ["monaco-icon-label"];
- n && (n.extraClasses && o.push.apply(o, n.extraClasses), n.italic && o.push("italic")), this.domNode.className = o.join(" "), this.domNode.title = (null == n ? void 0 : n.title) || "", this.nameNode.setLabel(e, n), (t || this.descriptionNode) && (this.descriptionNode || (this.descriptionNode = this.descriptionNodeFactory()), this.descriptionNode instanceof i.HighlightedLabel ? (this.descriptionNode.set(t || "", n ? n.descriptionMatches : void 0), (null == n ? void 0 : n.descriptionTitle) ? this.descriptionNode.element.title = n.descriptionTitle : this.descriptionNode.element.removeAttribute("title")) : (this.descriptionNode.textContent = t || "", this.descriptionNode.title = (null == n ? void 0 : n.descriptionTitle) || "",
- this.descriptionNode.empty = !t))
- }, t
- }(o.Disposable);
- t.IconLabel = u;
- var d = function () {
- function e(e) {
- this.container = e, this.label = void 0, this.singleLabel = void 0
- }
- return e.prototype.setLabel = function (e, t) {
- if (this.label !== e || !a.equals(this.options, t)) if (this.label = e, this.options = t, "string" == typeof e) this.singleLabel || (this.container.innerHTML = "", n.removeClass(this.container, "multiple"), this.singleLabel = n.append(this.container, n.$("a.label-name", {id: null == t ? void 0 : t.domId}))), this.singleLabel.textContent = e; else {
- this.container.innerHTML = "", n.addClass(this.container, "multiple"), this.singleLabel = void 0;
- for (var i = 0; i < e.length; i++) {
- var o = e[i], r = (null == t ? void 0 : t.domId) && (null == t ? void 0 : t.domId) + "_" + i;
- n.append(this.container, n.$("a.label-name", {
- id: r,
- "data-icon-label-count": e.length,
- "data-icon-label-index": i
- }, o)), i < e.length - 1 && n.append(this.container, n.$("span.label-separator", void 0, (null == t ? void 0 : t.separator) || "/"))
- }
- }
- }, e
- }();
- var c = function () {
- function e(e, t) {
- this.container = e, this.supportCodicons = t, this.label = void 0,
- this.singleLabel = void 0
- }
- return e.prototype.setLabel = function (e, t) {
- if (this.label !== e || !a.equals(this.options, t)) if (this.label = e, this.options = t, "string" == typeof e) this.singleLabel || (this.container.innerHTML = "", n.removeClass(this.container, "multiple"), this.singleLabel = new i.HighlightedLabel(n.append(this.container, n.$("a.label-name", {id: null == t ? void 0 : t.domId})), this.supportCodicons)), this.singleLabel.set(e, null == t ? void 0 : t.matches, null == t ? void 0 : t.title, null == t ? void 0 : t.labelEscapeNewLines); else {
- this.container.innerHTML = "", n.addClass(this.container, "multiple"), this.singleLabel = void 0;
- for (var o = (null == t ? void 0 : t.separator) || "/", r = function (e, t, n) {
- if (n) {
- var i = 0;
- return e.map((function (e) {
- var o = {start: i, end: i + e.length}, r = n.map((function (e) {
- return s.Range.intersect(o, e)
- })).filter((function (e) {
- return !s.Range.isEmpty(e)
- })).map((function (e) {
- var t = e.start, n = e.end;
- return {start: t - i, end: n - i}
- }));
- return i = o.end + t.length, r
- }))
- }
- }(e, o, null == t ? void 0 : t.matches), l = 0; l < e.length; l++) {
- var u = e[l], d = r ? r[l] : void 0,
- c = (null == t ? void 0 : t.domId) && (null == t ? void 0 : t.domId) + "_" + l,
- h = n.$("a.label-name", {
- id: c,
- "data-icon-label-count": e.length,
- "data-icon-label-index": l
- });
- new i.HighlightedLabel(n.append(this.container, h), this.supportCodicons).set(u, d, null == t ? void 0 : t.title, null == t ? void 0 : t.labelEscapeNewLines), l < e.length - 1 && n.append(h, n.$("span.label-separator", void 0, o))
- }
- }
- }, e
- }()
- })), define(n[269], i([9]), {}), define(n[270], i([9]), {}), define(n[271], i([9]), {}), define(n[272], i([9]), {}), define(n[273], i([9]), {}), define(n[274], i([0, 1, 2, 27, 31, 6, 15, 273]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = {progressBarBackground: i.Color.fromHex("#0E70C0")}, u = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i.options = n || Object.create(null), o.mixin(i.options, l, !1), i.workedVal = 0, i.progressBarBackground = i.options.progressBarBackground, i._register(i.showDelayedScheduler = new a.RunOnceScheduler((function () {
- return s.show(i.element)
- }), 0)), i.create(t), i
- }
- return r(t, e),
- t.prototype.create = function (e) {
- this.element = document.createElement("div"), s.addClass(this.element, "monaco-progress-container"), e.appendChild(this.element), this.bit = document.createElement("div"), s.addClass(this.bit, "progress-bit"), this.element.appendChild(this.bit), this.applyStyles()
- }, t.prototype.off = function () {
- this.bit.style.width = "inherit", this.bit.style.opacity = "1", s.removeClasses(this.element, "active", "infinite", "discrete"), this.workedVal = 0, this.totalWork = void 0
- }, t.prototype.stop = function () {
- return this.doDone(!1)
- }, t.prototype.doDone = function (e) {
- var t = this;
- return s.addClass(this.element, "done"), s.hasClass(this.element, "infinite") ? (this.bit.style.opacity = "0", e ? setTimeout((function () {
- return t.off()
- }), 200) : this.off()) : (this.bit.style.width = "inherit", e ? setTimeout((function () {
- return t.off()
- }), 200) : this.off()), this
- }, t.prototype.hide = function () {
- s.hide(this.element), this.showDelayedScheduler.cancel()
- }, t.prototype.style = function (e) {
- this.progressBarBackground = e.progressBarBackground, this.applyStyles()
- },
- t.prototype.applyStyles = function () {
- if (this.bit) {
- var e = this.progressBarBackground ? this.progressBarBackground.toString() : "";
- this.bit.style.backgroundColor = e
- }
- }, t
- }(n.Disposable);
- t.ProgressBar = u
- })), define(n[275], i([9]), {});
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[104], i([0, 1, 2, 24, 16, 21, 57, 45, 4, 6, 52, 275]), (function (e, t, n, i, o, s, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = !1, g = function (e) {
- function t(t, r, s) {
- void 0 === s && (s = {});
- var a = e.call(this) || this;
- return a._state = 3, a._onDidEnablementChange = a._register(new d.Emitter), a.onDidEnablementChange = a._onDidEnablementChange.event, a._onDidStart = a._register(new d.Emitter), a.onDidStart = a._onDidStart.event, a._onDidChange = a._register(new d.Emitter), a.onDidChange = a._onDidChange.event, a._onDidReset = a._register(new d.Emitter), a.onDidReset = a._onDidReset.event,
- a._onDidEnd = a._register(new d.Emitter), a.onDidEnd = a._onDidEnd.event, a.linkedSash = void 0, a.orthogonalStartSashDisposables = a._register(new n.DisposableStore), a.orthogonalEndSashDisposables = a._register(new n.DisposableStore), a.el = c.append(t, c.$(".monaco-sash")), o.isMacintosh && c.addClass(a.el, "mac"), a._register(h.domEvent(a.el, "mousedown")(a.onMouseDown, a)), a._register(h.domEvent(a.el, "dblclick")(a.onMouseDoubleClick, a)), a._register(l.Gesture.addTarget(a.el)), a._register(h.domEvent(a.el, l.EventType.Start)(a.onTouchStart, a)), i.isIPad && c.addClass(a.el, "touch"), a.setOrientation(s.orientation || 0), a.hidden = !1, a.layoutProvider = r, a.orthogonalStartSash = s.orthogonalStartSash, a.orthogonalEndSash = s.orthogonalEndSash, c.toggleClass(a.el, "debug", p), a
- }
- return r(t, e), Object.defineProperty(t.prototype, "state", {
- get: function () {
- return this._state
- }, set: function (e) {
- this._state !== e && (c.toggleClass(this.el, "disabled", 0 === e), c.toggleClass(this.el, "minimum", 1 === e), c.toggleClass(this.el, "maximum", 2 === e), this._state = e,
- this._onDidEnablementChange.fire(e))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "orthogonalStartSash", {
- get: function () {
- return this._orthogonalStartSash
- }, set: function (e) {
- this.orthogonalStartSashDisposables.clear(), e ? (this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this)), this.onOrthogonalStartSashEnablementChange(e.state)) : this.onOrthogonalStartSashEnablementChange(0), this._orthogonalStartSash = e
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "orthogonalEndSash", {
- get: function () {
- return this._orthogonalEndSash
- }, set: function (e) {
- this.orthogonalEndSashDisposables.clear(), e ? (this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this)), this.onOrthogonalEndSashEnablementChange(e.state)) : this.onOrthogonalEndSashEnablementChange(0), this._orthogonalEndSash = e
- }, enumerable: !0, configurable: !0
- }), t.prototype.setOrientation = function (e) {
- this.orientation = e,
- 1 === this.orientation ? (c.addClass(this.el, "horizontal"), c.removeClass(this.el, "vertical")) : (c.removeClass(this.el, "horizontal"), c.addClass(this.el, "vertical")), this.layoutProvider && this.layout()
- }, t.prototype.onMouseDown = function (e) {
- var t = this;
- c.EventHelper.stop(e, !1);
- var i = !1;
- if (!e.__orthogonalSashEvent) {
- var r = this.getOrthogonalSash(e);
- r && (i = !0, e.__orthogonalSashEvent = !0, r.onMouseDown(e))
- }
- if (this.linkedSash && !e.__linkedSashEvent && (e.__linkedSashEvent = !0, this.linkedSash.onMouseDown(e)), this.state) {
- for (var s = a(c.getElementsByTagName("iframe"), c.getElementsByTagName("webview")), l = 0, d = s; l < d.length; l++) {
- d[l].style.pointerEvents = "none"
- }
- var p = new u.StandardMouseEvent(e), g = p.posx, f = p.posy, m = p.altKey,
- v = {startX: g, currentX: g, startY: f, currentY: f, altKey: m};
- c.addClass(this.el, "active"), this._onDidStart.fire(v);
- var _ = c.createStyleSheet(this.el), y = function () {
- var e = ""
- ;e = i ? "all-scroll" : 1 === t.orientation ? 1 === t.state ? "s-resize" : 2 === t.state ? "n-resize" : o.isMacintosh ? "row-resize" : "ns-resize" : 1 === t.state ? "e-resize" : 2 === t.state ? "w-resize" : o.isMacintosh ? "col-resize" : "ew-resize", _.innerHTML = "* { cursor: " + e + " !important; }"
- }, C = new n.DisposableStore;
- y(), i || this.onDidEnablementChange(y, null, C);
- h.domEvent(window, "mousemove")((function (e) {
- c.EventHelper.stop(e, !1);
- var n = new u.StandardMouseEvent(e),
- i = {startX: g, currentX: n.posx, startY: f, currentY: n.posy, altKey: m};
- t._onDidChange.fire(i)
- }), null, C), h.domEvent(window, "mouseup")((function (e) {
- c.EventHelper.stop(e, !1), t.el.removeChild(_), c.removeClass(t.el, "active"), t._onDidEnd.fire(), C.dispose();
- for (var n = 0, i = s; n < i.length; n++) {
- i[n].style.pointerEvents = "auto"
- }
- }), null, C)
- }
- }, t.prototype.onMouseDoubleClick = function (e) {
- var t = this.getOrthogonalSash(e);
- t && t._onDidReset.fire(), this.linkedSash && this.linkedSash._onDidReset.fire(), this._onDidReset.fire()
- }, t.prototype.onTouchStart = function (e) {
- var t = this;
- c.EventHelper.stop(e)
- ;var i = [], o = e.pageX, r = e.pageY, a = e.altKey;
- this._onDidStart.fire({
- startX: o,
- currentX: o,
- startY: r,
- currentY: r,
- altKey: a
- }), i.push(c.addDisposableListener(this.el, l.EventType.Change, (function (e) {
- s.isNumber(e.pageX) && s.isNumber(e.pageY) && t._onDidChange.fire({
- startX: o,
- currentX: e.pageX,
- startY: r,
- currentY: e.pageY,
- altKey: a
- })
- }))), i.push(c.addDisposableListener(this.el, l.EventType.End, (function (e) {
- t._onDidEnd.fire(), n.dispose(i)
- })))
- }, t.prototype.layout = function () {
- var e = i.isIPad ? 20 : 4;
- if (0 === this.orientation) {
- var t = this.layoutProvider;
- this.el.style.left = t.getVerticalSashLeft(this) - e / 2 + "px", t.getVerticalSashTop && (this.el.style.top = t.getVerticalSashTop(this) + "px"), t.getVerticalSashHeight && (this.el.style.height = t.getVerticalSashHeight(this) + "px")
- } else {
- var n = this.layoutProvider;
- this.el.style.top = n.getHorizontalSashTop(this) - e / 2 + "px", n.getHorizontalSashLeft && (this.el.style.left = n.getHorizontalSashLeft(this) + "px"), n.getHorizontalSashWidth && (this.el.style.width = n.getHorizontalSashWidth(this) + "px")
- }
- }, t.prototype.hide = function () {
- this.hidden = !0, this.el.style.display = "none", this.el.setAttribute("aria-hidden", "true")
- }, t.prototype.onOrthogonalStartSashEnablementChange = function (e) {
- c.toggleClass(this.el, "orthogonal-start", 0 !== e)
- }, t.prototype.onOrthogonalEndSashEnablementChange = function (e) {
- c.toggleClass(this.el, "orthogonal-end", 0 !== e)
- }, t.prototype.getOrthogonalSash = function (e) {
- if (0 === this.orientation) {
- if (e.offsetY <= 4) return this.orthogonalStartSash;
- if (e.offsetY >= this.el.clientHeight - 4) return this.orthogonalEndSash
- } else {
- if (e.offsetX <= 4) return this.orthogonalStartSash;
- if (e.offsetX >= this.el.clientWidth - 4) return this.orthogonalEndSash
- }
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.el.remove()
- }, t
- }(n.Disposable);
- t.Sash = g
- })), define(n[276], i([9]), {}), define(n[53], i([0, 1, 24, 6, 28, 45, 250, 251, 47, 15, 4, 2, 16, 176, 276]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var f = function (e, t, n) {
- this.timestamp = e, this.deltaX = t, this.deltaY = n, this.score = 0
- }, m = function () {
- function e() {
- this._capacity = 5, this._memory = [], this._front = -1, this._rear = -1
- }
- return e.prototype.isPhysicalMouseWheel = function () {
- if (-1 === this._front && -1 === this._rear) return !1;
- for (var e = 1, t = 0, n = 1, i = this._rear; ;) {
- var o = i === this._front ? e : Math.pow(2, -n);
- if (e -= o, t += this._memory[i].score * o, i === this._front) break;
- i = (this._capacity + i - 1) % this._capacity, n++
- }
- return t <= .5
- }, e.prototype.accept = function (e, t, n) {
- var i = new f(e, t, n);
- i.score = this._computeScore(i), -1 === this._front && -1 === this._rear ? (this._memory[0] = i, this._front = 0, this._rear = 0) : (this._rear = (this._rear + 1) % this._capacity, this._rear === this._front && (this._front = (this._front + 1) % this._capacity), this._memory[this._rear] = i)
- }, e.prototype._computeScore = function (e) {
- if (Math.abs(e.deltaX) > 0 && Math.abs(e.deltaY) > 0) return 1;
- var t = .5;
- -1 === this._front && -1 === this._rear || this._memory[this._rear];
- return (Math.abs(e.deltaX - Math.round(e.deltaX)) > 0 || Math.abs(e.deltaY - Math.round(e.deltaY)) > 0) && (t += .25), Math.min(Math.max(t, 0), 1)
- }, e.INSTANCE = new e, e
- }();
- t.MouseWheelClassifier = m;
- var v = function (e) {
- function t(t, n, i) {
- var r = e.call(this) || this;
- r._onScroll = r._register(new c.Emitter), r.onScroll = r._onScroll.event, t.style.overflow = "hidden", r._options = b(n), r._scrollable = i, r._register(r._scrollable.onScroll((function (e) {
- r._onDidScroll(e), r._onScroll.fire(e)
- })));
- var s = {
- onMouseWheel: function (e) {
- return r._onMouseWheel(e)
- }, onDragStart: function () {
- return r._onDragStart()
- }, onDragEnd: function () {
- return r._onDragEnd()
- }
- };
- return r._verticalScrollbar = r._register(new l.VerticalScrollbar(r._scrollable, r._options, s)), r._horizontalScrollbar = r._register(new a.HorizontalScrollbar(r._scrollable, r._options, s)), r._domNode = document.createElement("div"), r._domNode.className = "monaco-scrollable-element " + r._options.className, r._domNode.setAttribute("role", "presentation"), r._domNode.style.position = "relative", r._domNode.style.overflow = "hidden", r._domNode.appendChild(t), r._domNode.appendChild(r._horizontalScrollbar.domNode.domNode), r._domNode.appendChild(r._verticalScrollbar.domNode.domNode),
- r._options.useShadows ? (r._leftShadowDomNode = o.createFastDomNode(document.createElement("div")), r._leftShadowDomNode.setClassName("shadow"), r._domNode.appendChild(r._leftShadowDomNode.domNode), r._topShadowDomNode = o.createFastDomNode(document.createElement("div")), r._topShadowDomNode.setClassName("shadow"), r._domNode.appendChild(r._topShadowDomNode.domNode), r._topLeftShadowDomNode = o.createFastDomNode(document.createElement("div")), r._topLeftShadowDomNode.setClassName("shadow top-left-corner"), r._domNode.appendChild(r._topLeftShadowDomNode.domNode)) : (r._leftShadowDomNode = null, r._topShadowDomNode = null, r._topLeftShadowDomNode = null), r._listenOnDomNode = r._options.listenOnDomNode || r._domNode, r._mouseWheelToDispose = [], r._setListeningToMouseWheel(r._options.handleMouseWheel), r.onmouseover(r._listenOnDomNode, (function (e) {
- return r._onMouseOver(e)
- })), r.onnonbubblingmouseout(r._listenOnDomNode, (function (e) {
- return r._onMouseOut(e)
- })), r._hideTimeout = r._register(new d.TimeoutTimer), r._isDragging = !1, r._mouseIsOver = !1,
- r._shouldRender = !0, r._revealOnScroll = !0, r
- }
- return r(t, e), t.prototype.dispose = function () {
- this._mouseWheelToDispose = h.dispose(this._mouseWheelToDispose), e.prototype.dispose.call(this)
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.getOverviewRulerLayoutInfo = function () {
- return {parent: this._domNode, insertBefore: this._verticalScrollbar.domNode.domNode}
- }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
- this._verticalScrollbar.delegateMouseDown(e)
- }, t.prototype.getScrollDimensions = function () {
- return this._scrollable.getScrollDimensions()
- }, t.prototype.setScrollDimensions = function (e) {
- this._scrollable.setScrollDimensions(e)
- }, t.prototype.updateClassName = function (e) {
- this._options.className = e, p.isMacintosh && (this._options.className += " mac"), this._domNode.className = "monaco-scrollable-element " + this._options.className
- }, t.prototype.updateOptions = function (e) {
- var t = b(e);
- this._options.handleMouseWheel = t.handleMouseWheel, this._options.mouseWheelScrollSensitivity = t.mouseWheelScrollSensitivity,
- this._options.fastScrollSensitivity = t.fastScrollSensitivity, this._setListeningToMouseWheel(this._options.handleMouseWheel), this._options.lazyRender || this._render()
- }, t.prototype._setListeningToMouseWheel = function (e) {
- var t = this;
- if (this._mouseWheelToDispose.length > 0 !== e && (this._mouseWheelToDispose = h.dispose(this._mouseWheelToDispose), e)) {
- this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode, n.isEdgeOrIE ? "mousewheel" : "wheel", (function (e) {
- t._onMouseWheel(new s.StandardWheelEvent(e))
- }), {passive: !1}))
- }
- }, t.prototype._onMouseWheel = function (e) {
- var t, n = m.INSTANCE;
- if (n.accept(Date.now(), e.deltaX, e.deltaY), e.deltaY || e.deltaX) {
- var i = e.deltaY * this._options.mouseWheelScrollSensitivity,
- o = e.deltaX * this._options.mouseWheelScrollSensitivity;
- this._options.flipAxes && (i = (t = [o, i])[0], o = t[1]);
- var r = !p.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;
- !this._options.scrollYToX && !r || o || (o = i, i = 0), e.browserEvent && e.browserEvent.altKey && (o *= this._options.fastScrollSensitivity,
- i *= this._options.fastScrollSensitivity);
- var s = this._scrollable.getFutureScrollPosition(), a = {};
- if (i) {
- var l = s.scrollTop - 50 * i;
- this._verticalScrollbar.writeScrollPosition(a, l)
- }
- if (o) {
- var u = s.scrollLeft - 50 * o;
- this._horizontalScrollbar.writeScrollPosition(a, u)
- }
- if (a = this._scrollable.validateScrollPosition(a), s.scrollLeft !== a.scrollLeft || s.scrollTop !== a.scrollTop) this._options.mouseWheelSmoothScroll && n.isPhysicalMouseWheel() ? this._scrollable.setScrollPositionSmooth(a) : this._scrollable.setScrollPositionNow(a), this._shouldRender = !0
- }
- (this._options.alwaysConsumeMouseWheel || this._shouldRender) && (e.preventDefault(), e.stopPropagation())
- }, t.prototype._onDidScroll = function (e) {
- this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender, this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender, this._options.useShadows && (this._shouldRender = !0), this._revealOnScroll && this._reveal(), this._options.lazyRender || this._render()
- }, t.prototype.renderNow = function () {
- if (!this._options.lazyRender) throw new Error("Please use `lazyRender` together with `renderNow`!");
- this._render()
- }, t.prototype._render = function () {
- if (this._shouldRender && (this._shouldRender = !1, this._horizontalScrollbar.render(), this._verticalScrollbar.render(), this._options.useShadows)) {
- var e = this._scrollable.getCurrentScrollPosition(), t = e.scrollTop > 0, n = e.scrollLeft > 0;
- this._leftShadowDomNode.setClassName("shadow" + (n ? " left" : "")), this._topShadowDomNode.setClassName("shadow" + (t ? " top" : "")), this._topLeftShadowDomNode.setClassName("shadow top-left-corner" + (t ? " top" : "") + (n ? " left" : ""))
- }
- }, t.prototype._onDragStart = function () {
- this._isDragging = !0, this._reveal()
- }, t.prototype._onDragEnd = function () {
- this._isDragging = !1, this._hide()
- }, t.prototype._onMouseOut = function (e) {
- this._mouseIsOver = !1, this._hide()
- }, t.prototype._onMouseOver = function (e) {
- this._mouseIsOver = !0, this._reveal()
- }, t.prototype._reveal = function () {
- this._verticalScrollbar.beginReveal(), this._horizontalScrollbar.beginReveal(), this._scheduleHide()
- },
- t.prototype._hide = function () {
- this._mouseIsOver || this._isDragging || (this._verticalScrollbar.beginHide(), this._horizontalScrollbar.beginHide())
- }, t.prototype._scheduleHide = function () {
- var e = this;
- this._mouseIsOver || this._isDragging || this._hideTimeout.cancelAndSet((function () {
- return e._hide()
- }), 500)
- }, t
- }(u.Widget);
- t.AbstractScrollableElement = v;
- var _ = function (e) {
- function t(t, n) {
- var o = this;
- (n = n || {}).mouseWheelSmoothScroll = !1;
- var r = new g.Scrollable(0, (function (e) {
- return i.scheduleAtNextAnimationFrame(e)
- }));
- return (o = e.call(this, t, n, r) || this)._register(r), o
- }
- return r(t, e), t.prototype.setScrollPosition = function (e) {
- this._scrollable.setScrollPositionNow(e)
- }, t.prototype.getScrollPosition = function () {
- return this._scrollable.getCurrentScrollPosition()
- }, t
- }(v);
- t.ScrollableElement = _;
- var y = function (e) {
- function t(t, n, i) {
- return e.call(this, t, n, i) || this
- }
- return r(t, e), t
- }(v);
- t.SmoothScrollableElement = y;
- var C = function (e) {
- function t(t, n) {
- var i = e.call(this, t, n) || this;
- return i._element = t, i.onScroll((function (e) {
- e.scrollTopChanged && (i._element.scrollTop = e.scrollTop), e.scrollLeftChanged && (i._element.scrollLeft = e.scrollLeft)
- })), i.scanDomNode(), i
- }
- return r(t, e), t.prototype.scanDomNode = function () {
- this.setScrollDimensions({
- width: this._element.clientWidth,
- scrollWidth: this._element.scrollWidth,
- height: this._element.clientHeight,
- scrollHeight: this._element.scrollHeight
- }), this.setScrollPosition({scrollLeft: this._element.scrollLeft, scrollTop: this._element.scrollTop})
- }, t
- }(_);
- function b(e) {
- var t = {
- lazyRender: void 0 !== e.lazyRender && e.lazyRender,
- className: void 0 !== e.className ? e.className : "",
- useShadows: void 0 === e.useShadows || e.useShadows,
- handleMouseWheel: void 0 === e.handleMouseWheel || e.handleMouseWheel,
- flipAxes: void 0 !== e.flipAxes && e.flipAxes,
- alwaysConsumeMouseWheel: void 0 !== e.alwaysConsumeMouseWheel && e.alwaysConsumeMouseWheel,
- scrollYToX: void 0 !== e.scrollYToX && e.scrollYToX,
- mouseWheelScrollSensitivity: void 0 !== e.mouseWheelScrollSensitivity ? e.mouseWheelScrollSensitivity : 1,
- fastScrollSensitivity: void 0 !== e.fastScrollSensitivity ? e.fastScrollSensitivity : 5,
- mouseWheelSmoothScroll: void 0 === e.mouseWheelSmoothScroll || e.mouseWheelSmoothScroll,
- arrowSize: void 0 !== e.arrowSize ? e.arrowSize : 11,
- listenOnDomNode: void 0 !== e.listenOnDomNode ? e.listenOnDomNode : null,
- horizontal: void 0 !== e.horizontal ? e.horizontal : 1,
- horizontalScrollbarSize: void 0 !== e.horizontalScrollbarSize ? e.horizontalScrollbarSize : 10,
- horizontalSliderSize: void 0 !== e.horizontalSliderSize ? e.horizontalSliderSize : 0,
- horizontalHasArrows: void 0 !== e.horizontalHasArrows && e.horizontalHasArrows,
- vertical: void 0 !== e.vertical ? e.vertical : 1,
- verticalScrollbarSize: void 0 !== e.verticalScrollbarSize ? e.verticalScrollbarSize : 10,
- verticalHasArrows: void 0 !== e.verticalHasArrows && e.verticalHasArrows,
- verticalSliderSize: void 0 !== e.verticalSliderSize ? e.verticalSliderSize : 0
- };
- return t.horizontalSliderSize = void 0 !== e.horizontalSliderSize ? e.horizontalSliderSize : t.horizontalScrollbarSize,
- t.verticalSliderSize = void 0 !== e.verticalSliderSize ? e.verticalSliderSize : t.verticalScrollbarSize, p.isMacintosh && (t.className += " mac"), t
- }
- t.DomScrollableElement = C
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[140], i([0, 1, 31, 2, 57, 6, 4, 52, 53, 246, 249, 101, 103, 19, 98, 15, 24]), (function (e, t, n, i, o, r, s, l, u, d, c, p, g, f, m, v, _) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var y = {
- useShadows: !0,
- verticalScrollMode: 1,
- setRowLineHeight: !0,
- supportDynamicHeights: !1,
- dnd: {
- getDragElements: function (e) {
- return [e]
- }, getDragURI: function () {
- return null
- }, onDragStart: function () {
- }, onDragOver: function () {
- return !1
- }, drop: function () {
- }
- },
- horizontalScrolling: !1
- }, C = function () {
- function e(e) {
- this.elements = e
- }
- return e.prototype.update = function () {
- }, e.prototype.getData = function () {
- return this.elements
- }, e
- }();
- t.ElementsDragAndDropData = C;
- var b = function () {
- function e(e) {
- this.elements = e
- }
- return e.prototype.update = function () {
- }, e.prototype.getData = function () {
- return this.elements
- }, e
- }();
- t.ExternalElementsDragAndDropData = b;
- var S = function () {
- function e() {
- this.types = [], this.files = []
- }
- return e.prototype.update = function (e) {
- var t;
- if (e.types && (t = this.types).splice.apply(t, a([0, this.types.length], e.types)), e.files) {
- this.files.splice(0, this.files.length);
- for (var n = 0; n < e.files.length; n++) {
- var i = e.files.item(n);
- i && (i.size || i.type) && this.files.push(i)
- }
- }
- }, e.prototype.getData = function () {
- return {types: this.types, files: this.files}
- }, e
- }();
- t.DesktopDragAndDropData = S;
- var w = function () {
- function e(t, a, h, p) {
- var g = this;
- if (void 0 === p && (p = y), this.virtualDelegate = a, this.domId = "list_id_" + ++e.InstanceCount, this.renderers = new Map, this.renderWidth = 0, this._scrollHeight = 0, this.scrollableElementUpdateDisposable = null, this.scrollableElementWidthDelayer = new v.Delayer(50), this.splicing = !1, this.dragOverAnimationStopDisposable = i.Disposable.None, this.dragOverMouseY = 0, this.canDrop = !1,
- this.currentDragFeedbackDisposable = i.Disposable.None, this.onDragLeaveTimeout = i.Disposable.None, this.disposables = new i.DisposableStore, this._onDidChangeContentHeight = new s.Emitter, p.horizontalScrolling && p.supportDynamicHeights) throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");
- this.items = [], this.itemId = 0, this.rangeMap = new d.RangeMap;
- for (var f = 0, m = h; f < m.length; f++) {
- var _ = m[f];
- this.renderers.set(_.templateId, _)
- }
- this.cache = this.disposables.add(new c.RowCache(this.renderers)), this.lastRenderTop = 0, this.lastRenderHeight = 0, this.domNode = document.createElement("div"), this.domNode.className = "monaco-list", r.addClass(this.domNode, this.domId), this.domNode.tabIndex = 0, r.toggleClass(this.domNode, "mouse-support", "boolean" != typeof p.mouseSupport || p.mouseSupport), this.horizontalScrolling = n.getOrDefault(p, (function (e) {
- return e.horizontalScrolling
- }), y.horizontalScrolling), r.toggleClass(this.domNode, "horizontal-scrolling", this.horizontalScrolling),
- this.additionalScrollHeight = void 0 === p.additionalScrollHeight ? 0 : p.additionalScrollHeight, this.ariaProvider = p.ariaProvider || {
- getSetSize: function (e, t, n) {
- return n
- }, getPosInSet: function (e, t) {
- return t + 1
- }
- }, this.rowsContainer = document.createElement("div"), this.rowsContainer.className = "monaco-list-rows", this.rowsContainer.style.transform = "translate3d(0px, 0px, 0px)", this.disposables.add(o.Gesture.addTarget(this.rowsContainer)), this.scrollableElement = this.disposables.add(new u.ScrollableElement(this.rowsContainer, {
- alwaysConsumeMouseWheel: !0,
- horizontal: this.horizontalScrolling ? 1 : 2,
- vertical: n.getOrDefault(p, (function (e) {
- return e.verticalScrollMode
- }), y.verticalScrollMode),
- useShadows: n.getOrDefault(p, (function (e) {
- return e.useShadows
- }), y.useShadows)
- })), this.domNode.appendChild(this.scrollableElement.getDomNode()), t.appendChild(this.domNode), this.scrollableElement.onScroll(this.onScroll, this, this.disposables), l.domEvent(this.rowsContainer, o.EventType.Change)(this.onTouchChange, this, this.disposables),
- l.domEvent(this.scrollableElement.getDomNode(), "scroll")((function (e) {
- return e.target.scrollTop = 0
- }), null, this.disposables), s.Event.map(l.domEvent(this.domNode, "dragover"), (function (e) {
- return g.toDragEvent(e)
- }))(this.onDragOver, this, this.disposables), s.Event.map(l.domEvent(this.domNode, "drop"), (function (e) {
- return g.toDragEvent(e)
- }))(this.onDrop, this, this.disposables), l.domEvent(this.domNode, "dragleave")(this.onDragLeave, this, this.disposables), l.domEvent(window, "dragend")(this.onDragEnd, this, this.disposables), this.setRowLineHeight = n.getOrDefault(p, (function (e) {
- return e.setRowLineHeight
- }), y.setRowLineHeight), this.supportDynamicHeights = n.getOrDefault(p, (function (e) {
- return e.supportDynamicHeights
- }), y.supportDynamicHeights), this.dnd = n.getOrDefault(p, (function (e) {
- return e.dnd
- }), y.dnd), this.layout()
- }
- return Object.defineProperty(e.prototype, "contentHeight", {
- get: function () {
- return this.rangeMap.size
- }, enumerable: !0, configurable: !0
- }), e.prototype.splice = function (e, t, n) {
- if (void 0 === n && (n = []),
- this.splicing) throw new Error("Can't run recursive splices.");
- this.splicing = !0;
- try {
- return this._splice(e, t, n)
- } finally {
- this.splicing = !1, this._onDidChangeContentHeight.fire(this.contentHeight)
- }
- }, e.prototype._splice = function (e, t, n) {
- var o, r = this;
- void 0 === n && (n = []);
- for (var s = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight), l = {
- start: e,
- end: e + t
- }, u = g.Range.intersect(s, l), c = u.start; c < u.end; c++) this.removeItemFromDOM(c);
- var h, p = {start: e + t, end: this.items.length}, f = g.Range.intersect(p, s),
- m = g.Range.relativeComplement(p, s), v = n.map((function (e) {
- return {
- id: String(r.itemId++),
- element: e,
- templateId: r.virtualDelegate.getTemplateId(e),
- size: r.virtualDelegate.getHeight(e),
- width: void 0,
- hasDynamicHeight: !!r.virtualDelegate.hasDynamicHeight && r.virtualDelegate.hasDynamicHeight(e),
- lastDynamicHeightWidth: void 0,
- row: null,
- uri: void 0,
- dropTarget: !1,
- dragStartDisposable: i.Disposable.None
- }
- }));
- 0 === e && t >= this.items.length ? (this.rangeMap = new d.RangeMap, this.rangeMap.splice(0, 0, v), this.items = v, h = []) : (this.rangeMap.splice(e, t, v),
- h = (o = this.items).splice.apply(o, a([e, t], v)));
- var _ = n.length - t, y = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight),
- C = d.shift(f, _), b = g.Range.intersect(y, C);
- for (c = b.start; c < b.end; c++) this.updateItemInDOM(this.items[c], c);
- for (var S = 0, w = g.Range.relativeComplement(C, y); S < w.length; S++) for (c = (M = w[S]).start; c < M.end; c++) this.removeItemFromDOM(c);
- for (var E = m.map((function (e) {
- return d.shift(e, _)
- })), L = {start: e, end: e + n.length}, D = a([L], E).map((function (e) {
- return g.Range.intersect(y, e)
- })), N = this.getNextToLastElement(D), x = 0, I = D; x < I.length; x++) {
- var M;
- for (c = (M = I[x]).start; c < M.end; c++) this.insertItemInDOM(c, N)
- }
- return this.eventuallyUpdateScrollDimensions(), this.supportDynamicHeights && this._rerender(this.scrollTop, this.renderHeight), h.map((function (e) {
- return e.element
- }))
- }, e.prototype.eventuallyUpdateScrollDimensions = function () {
- var e = this;
- this._scrollHeight = this.contentHeight, this.rowsContainer.style.height = this._scrollHeight + "px",
- this.scrollableElementUpdateDisposable || (this.scrollableElementUpdateDisposable = r.scheduleAtNextAnimationFrame((function () {
- e.scrollableElement.setScrollDimensions({scrollHeight: e.scrollHeight}), e.updateScrollWidth(), e.scrollableElementUpdateDisposable = null
- })))
- }, e.prototype.eventuallyUpdateScrollWidth = function () {
- var e = this;
- this.horizontalScrolling && this.scrollableElementWidthDelayer.trigger((function () {
- return e.updateScrollWidth()
- }))
- }, e.prototype.updateScrollWidth = function () {
- if (this.horizontalScrolling) {
- 0 === this.items.length && this.scrollableElement.setScrollDimensions({scrollWidth: 0});
- for (var e = 0, t = 0, n = this.items; t < n.length; t++) {
- var i = n[t];
- void 0 !== i.width && (e = Math.max(e, i.width))
- }
- this.scrollWidth = e, this.scrollableElement.setScrollDimensions({scrollWidth: e + 10})
- }
- }, e.prototype.rerender = function () {
- if (this.supportDynamicHeights) {
- for (var e = 0, t = this.items; e < t.length; e++) {
- t[e].lastDynamicHeightWidth = void 0
- }
- this._rerender(this.lastRenderTop, this.lastRenderHeight)
- }
- }, Object.defineProperty(e.prototype, "length", {
- get: function () {
- return this.items.length
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "renderHeight", {
- get: function () {
- return this.scrollableElement.getScrollDimensions().height
- }, enumerable: !0, configurable: !0
- }), e.prototype.element = function (e) {
- return this.items[e].element
- }, e.prototype.domElement = function (e) {
- var t = this.items[e].row;
- return t && t.domNode
- }, e.prototype.elementHeight = function (e) {
- return this.items[e].size
- }, e.prototype.elementTop = function (e) {
- return this.rangeMap.positionAt(e)
- }, e.prototype.indexAt = function (e) {
- return this.rangeMap.indexAt(e)
- }, e.prototype.indexAfter = function (e) {
- return this.rangeMap.indexAfter(e)
- }, e.prototype.layout = function (e, t) {
- var n = {height: "number" == typeof e ? e : r.getContentHeight(this.domNode)};
- this.scrollableElementUpdateDisposable && (this.scrollableElementUpdateDisposable.dispose(), this.scrollableElementUpdateDisposable = null, n.scrollHeight = this.scrollHeight), this.scrollableElement.setScrollDimensions(n), void 0 !== t && (this.renderWidth = t,
- this.supportDynamicHeights && this._rerender(this.scrollTop, this.renderHeight), this.horizontalScrolling && this.scrollableElement.setScrollDimensions({width: "number" == typeof t ? t : r.getContentWidth(this.domNode)}))
- }, e.prototype.render = function (e, t, n, i) {
- for (var o = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight), r = this.getRenderRange(e, t), s = g.Range.relativeComplement(r, o), a = g.Range.relativeComplement(o, r), l = this.getNextToLastElement(s), u = 0, d = s; u < d.length; u++) for (var c = (f = d[u]).start; c < f.end; c++) this.insertItemInDOM(c, l);
- for (var h = 0, p = a; h < p.length; h++) {
- var f;
- for (c = (f = p[h]).start; c < f.end; c++) this.removeItemFromDOM(c)
- }
- this.rowsContainer.style.left = "-" + n + "px", this.rowsContainer.style.top = "-" + e + "px", this.horizontalScrolling && (this.rowsContainer.style.width = Math.max(i, this.renderWidth) + "px"), this.lastRenderTop = e, this.lastRenderHeight = t
- }, e.prototype.insertItemInDOM = function (e, t) {
- var n = this, i = this.items[e];
- if (!i.row) {
- i.row = this.cache.alloc(i.templateId)
- ;var o = this.ariaProvider.getRole ? this.ariaProvider.getRole(i.element) : "treeitem";
- i.row.domNode.setAttribute("role", o);
- var r = this.ariaProvider.isChecked ? this.ariaProvider.isChecked(i.element) : void 0;
- void 0 !== r && i.row.domNode.setAttribute("aria-checked", String(r))
- }
- i.row.domNode.parentElement || (t ? this.rowsContainer.insertBefore(i.row.domNode, t) : this.rowsContainer.appendChild(i.row.domNode)), this.updateItemInDOM(i, e);
- var s = this.renderers.get(i.templateId);
- if (!s) throw new Error("No renderer found for template id " + i.templateId);
- s && s.renderElement(i.element, e, i.row.templateData, i.size);
- var a = this.dnd.getDragURI(i.element);
- if (i.dragStartDisposable.dispose(), i.row.domNode.draggable = !!a, a) {
- var u = l.domEvent(i.row.domNode, "dragstart");
- i.dragStartDisposable = u((function (e) {
- return n.onDragStart(i.element, a, e)
- }))
- }
- this.horizontalScrolling && (this.measureItemWidth(i), this.eventuallyUpdateScrollWidth())
- }, e.prototype.measureItemWidth = function (e) {
- if (e.row && e.row.domNode) {
- e.row.domNode.style.width = _.isFirefox ? "-moz-fit-content" : "fit-content", e.width = r.getContentWidth(e.row.domNode);
- var t = window.getComputedStyle(e.row.domNode);
- t.paddingLeft && (e.width += parseFloat(t.paddingLeft)), t.paddingRight && (e.width += parseFloat(t.paddingRight)), e.row.domNode.style.width = ""
- }
- }, e.prototype.updateItemInDOM = function (e, t) {
- e.row.domNode.style.top = this.elementTop(t) + "px", e.row.domNode.style.height = e.size + "px", this.setRowLineHeight && (e.row.domNode.style.lineHeight = e.size + "px"), e.row.domNode.setAttribute("data-index", "" + t), e.row.domNode.setAttribute("data-last-element", t === this.length - 1 ? "true" : "false"), e.row.domNode.setAttribute("aria-setsize", String(this.ariaProvider.getSetSize(e.element, t, this.length))), e.row.domNode.setAttribute("aria-posinset", String(this.ariaProvider.getPosInSet(e.element, t))), e.row.domNode.setAttribute("id", this.getElementDomId(t)), r.toggleClass(e.row.domNode, "drop-target", e.dropTarget)
- }, e.prototype.removeItemFromDOM = function (e) {
- var t = this.items[e]
- ;t.dragStartDisposable.dispose();
- var n = this.renderers.get(t.templateId);
- n && n.disposeElement && n.disposeElement(t.element, e, t.row.templateData, t.size), this.cache.release(t.row), t.row = null, this.horizontalScrolling && this.eventuallyUpdateScrollWidth()
- }, e.prototype.getScrollTop = function () {
- return this.scrollableElement.getScrollPosition().scrollTop
- }, e.prototype.setScrollTop = function (e) {
- this.scrollableElementUpdateDisposable && (this.scrollableElementUpdateDisposable.dispose(), this.scrollableElementUpdateDisposable = null, this.scrollableElement.setScrollDimensions({scrollHeight: this.scrollHeight})), this.scrollableElement.setScrollPosition({scrollTop: e})
- }, Object.defineProperty(e.prototype, "scrollTop", {
- get: function () {
- return this.getScrollTop()
- }, set: function (e) {
- this.setScrollTop(e)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "scrollHeight", {
- get: function () {
- return this._scrollHeight + (this.horizontalScrolling ? 10 : 0) + this.additionalScrollHeight
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "onMouseClick", {
- get: function () {
- var e = this;
- return s.Event.map(l.domEvent(this.domNode, "click"), (function (t) {
- return e.toMouseEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseDblClick", {
- get: function () {
- var e = this;
- return s.Event.map(l.domEvent(this.domNode, "dblclick"), (function (t) {
- return e.toMouseEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseMiddleClick", {
- get: function () {
- var e = this;
- return s.Event.filter(s.Event.map(l.domEvent(this.domNode, "auxclick"), (function (t) {
- return e.toMouseEvent(t)
- })), (function (e) {
- return 1 === e.browserEvent.button
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseDown", {
- get: function () {
- var e = this;
- return s.Event.map(l.domEvent(this.domNode, "mousedown"), (function (t) {
- return e.toMouseEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onContextMenu", {
- get: function () {
- var e = this
- ;
- return s.Event.map(l.domEvent(this.domNode, "contextmenu"), (function (t) {
- return e.toMouseEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onTouchStart", {
- get: function () {
- var e = this;
- return s.Event.map(l.domEvent(this.domNode, "touchstart"), (function (t) {
- return e.toTouchEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onTap", {
- get: function () {
- var e = this;
- return s.Event.map(l.domEvent(this.rowsContainer, o.EventType.Tap), (function (t) {
- return e.toGestureEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), e.prototype.toMouseEvent = function (e) {
- var t = this.getItemIndexFromEventTarget(e.target || null), n = void 0 === t ? void 0 : this.items[t];
- return {browserEvent: e, index: t, element: n && n.element}
- }, e.prototype.toTouchEvent = function (e) {
- var t = this.getItemIndexFromEventTarget(e.target || null), n = void 0 === t ? void 0 : this.items[t];
- return {browserEvent: e, index: t, element: n && n.element}
- }, e.prototype.toGestureEvent = function (e) {
- var t = this.getItemIndexFromEventTarget(e.initialTarget || null),
- n = void 0 === t ? void 0 : this.items[t];
- return {browserEvent: e, index: t, element: n && n.element}
- }, e.prototype.toDragEvent = function (e) {
- var t = this.getItemIndexFromEventTarget(e.target || null), n = void 0 === t ? void 0 : this.items[t];
- return {browserEvent: e, index: t, element: n && n.element}
- }, e.prototype.onScroll = function (e) {
- try {
- this.render(e.scrollTop, e.height, e.scrollLeft, e.scrollWidth), this.supportDynamicHeights && this._rerender(e.scrollTop, e.height)
- } catch (t) {
- throw console.error("Got bad scroll event:", e), t
- }
- }, e.prototype.onTouchChange = function (e) {
- e.preventDefault(), e.stopPropagation(), this.scrollTop -= e.translationY
- }, e.prototype.onDragStart = function (e, t, n) {
- if (n.dataTransfer) {
- var i = this.dnd.getDragElements(e);
- if (n.dataTransfer.effectAllowed = "copyMove", n.dataTransfer.setData(m.DataTransfers.RESOURCES, JSON.stringify([t])), n.dataTransfer.setDragImage) {
- var o = void 0;
- this.dnd.getDragLabel && (o = this.dnd.getDragLabel(i, n)), void 0 === o && (o = String(i.length))
- ;var s = r.$(".monaco-drag-image");
- s.textContent = o, document.body.appendChild(s), n.dataTransfer.setDragImage(s, -10, -10), setTimeout((function () {
- return document.body.removeChild(s)
- }), 0)
- }
- this.currentDragData = new C(i), m.StaticDND.CurrentDragAndDropData = new b(i), this.dnd.onDragStart && this.dnd.onDragStart(this.currentDragData, n)
- }
- }, e.prototype.onDragOver = function (e) {
- var t = this;
- if (e.browserEvent.preventDefault(), this.onDragLeaveTimeout.dispose(), m.StaticDND.CurrentDragAndDropData && "vscode-ui" === m.StaticDND.CurrentDragAndDropData.getData()) return !1;
- if (this.setupDragAndDropScrollTopAnimation(e.browserEvent), !e.browserEvent.dataTransfer) return !1;
- if (!this.currentDragData) if (m.StaticDND.CurrentDragAndDropData) this.currentDragData = m.StaticDND.CurrentDragAndDropData; else {
- if (!e.browserEvent.dataTransfer.types) return !1;
- this.currentDragData = new S
- }
- var n, o, s, a = this.dnd.onDragOver(this.currentDragData, e.element, e.index, e.browserEvent);
- if (this.canDrop = "boolean" == typeof a ? a : a.accept,
- !this.canDrop) return this.currentDragFeedback = void 0, this.currentDragFeedbackDisposable.dispose(), !1;
- if (e.browserEvent.dataTransfer.dropEffect = "boolean" != typeof a && 0 === a.effect ? "copy" : "move", n = "boolean" != typeof a && a.feedback ? a.feedback : void 0 === e.index ? [-1] : [e.index], n = -1 === (n = f.distinct(n).filter((function (e) {
- return e >= -1 && e < t.length
- })).sort((function (e, t) {
- return e - t
- })))[0] ? [-1] : n, o = this.currentDragFeedback, s = n, Array.isArray(o) && Array.isArray(s) ? f.equals(o, s) : o === s) return !0;
- if (this.currentDragFeedback = n, this.currentDragFeedbackDisposable.dispose(), -1 === n[0]) r.addClass(this.domNode, "drop-target"), r.addClass(this.rowsContainer, "drop-target"), this.currentDragFeedbackDisposable = i.toDisposable((function () {
- r.removeClass(t.domNode, "drop-target"), r.removeClass(t.rowsContainer, "drop-target")
- })); else {
- for (var l = 0, u = n; l < u.length; l++) {
- var d = u[l], c = this.items[d];
- c.dropTarget = !0, c.row && c.row.domNode && r.addClass(c.row.domNode, "drop-target")
- }
- this.currentDragFeedbackDisposable = i.toDisposable((function () {
- for (var e = 0, i = n; e < i.length; e++) {
- var o = i[e], s = t.items[o];
- s.dropTarget = !1, s.row && s.row.domNode && r.removeClass(s.row.domNode, "drop-target")
- }
- }))
- }
- return !0
- }, e.prototype.onDragLeave = function () {
- var e = this;
- this.onDragLeaveTimeout.dispose(), this.onDragLeaveTimeout = v.disposableTimeout((function () {
- return e.clearDragOverFeedback()
- }), 100)
- }, e.prototype.onDrop = function (e) {
- if (this.canDrop) {
- var t = this.currentDragData;
- this.teardownDragAndDropScrollTopAnimation(), this.clearDragOverFeedback(), this.currentDragData = void 0, m.StaticDND.CurrentDragAndDropData = void 0, t && e.browserEvent.dataTransfer && (e.browserEvent.preventDefault(), t.update(e.browserEvent.dataTransfer), this.dnd.drop(t, e.element, e.index, e.browserEvent))
- }
- }, e.prototype.onDragEnd = function (e) {
- this.canDrop = !1, this.teardownDragAndDropScrollTopAnimation(), this.clearDragOverFeedback(), this.currentDragData = void 0, m.StaticDND.CurrentDragAndDropData = void 0, this.dnd.onDragEnd && this.dnd.onDragEnd(e)
- }, e.prototype.clearDragOverFeedback = function () {
- this.currentDragFeedback = void 0,
- this.currentDragFeedbackDisposable.dispose(), this.currentDragFeedbackDisposable = i.Disposable.None
- }, e.prototype.setupDragAndDropScrollTopAnimation = function (e) {
- var t = this;
- if (!this.dragOverAnimationDisposable) {
- var n = r.getTopLeftOffset(this.domNode).top;
- this.dragOverAnimationDisposable = r.animate(this.animateDragAndDropScrollTop.bind(this, n))
- }
- this.dragOverAnimationStopDisposable.dispose(), this.dragOverAnimationStopDisposable = v.disposableTimeout((function () {
- t.dragOverAnimationDisposable && (t.dragOverAnimationDisposable.dispose(), t.dragOverAnimationDisposable = void 0)
- }), 1e3), this.dragOverMouseY = e.pageY
- }, e.prototype.animateDragAndDropScrollTop = function (e) {
- if (void 0 !== this.dragOverMouseY) {
- var t = this.dragOverMouseY - e, n = this.renderHeight - 35;
- t < 35 ? this.scrollTop += Math.max(-14, Math.floor(.3 * (t - 35))) : t > n && (this.scrollTop += Math.min(14, Math.floor(.3 * (t - n))))
- }
- }, e.prototype.teardownDragAndDropScrollTopAnimation = function () {
- this.dragOverAnimationStopDisposable.dispose(),
- this.dragOverAnimationDisposable && (this.dragOverAnimationDisposable.dispose(), this.dragOverAnimationDisposable = void 0)
- }, e.prototype.getItemIndexFromEventTarget = function (e) {
- for (var t = e; t instanceof HTMLElement && t !== this.rowsContainer;) {
- var n = t.getAttribute("data-index");
- if (n) {
- var i = Number(n);
- if (!isNaN(i)) return i
- }
- t = t.parentElement
- }
- }, e.prototype.getRenderRange = function (e, t) {
- return {start: this.rangeMap.indexAt(e), end: this.rangeMap.indexAfter(e + t - 1)}
- }, e.prototype._rerender = function (e, t) {
- var n, i, o = this.getRenderRange(e, t);
- e === this.elementTop(o.start) ? (n = o.start, i = 0) : o.end - o.start > 1 && (n = o.start + 1, i = this.elementTop(n) - e);
- for (var r = 0; ;) {
- for (var s = this.getRenderRange(e, t), a = !1, l = s.start; l < s.end; l++) {
- var u = this.probeDynamicHeight(l);
- 0 !== u && this.rangeMap.splice(l, 1, [this.items[l]]), r += u, a = a || 0 !== u
- }
- if (!a) {
- 0 !== r && this.eventuallyUpdateScrollDimensions();
- for (var d = 0, c = g.Range.relativeComplement(o, s); d < c.length; d++) for (l = (f = c[d]).start; l < f.end; l++) this.items[l].row && this.removeItemFromDOM(l)
- ;
- for (var h = 0, p = g.Range.relativeComplement(s, o); h < p.length; h++) {
- var f;
- for (l = (f = p[h]).start; l < f.end; l++) {
- var m = l + 1, v = m < this.items.length ? this.items[m].row : null,
- _ = v ? v.domNode : null;
- this.insertItemInDOM(l, _)
- }
- }
- for (l = s.start; l < s.end; l++) this.items[l].row && this.updateItemInDOM(this.items[l], l);
- return "number" == typeof n && (this.scrollTop = this.elementTop(n) - i), void this._onDidChangeContentHeight.fire(this.contentHeight)
- }
- }
- }, e.prototype.probeDynamicHeight = function (e) {
- var t = this.items[e];
- if (!t.hasDynamicHeight || t.lastDynamicHeightWidth === this.renderWidth) return 0;
- var n = t.size, i = this.cache.alloc(t.templateId);
- i.domNode.style.height = "", this.rowsContainer.appendChild(i.domNode);
- var o = this.renderers.get(t.templateId);
- return o && (o.renderElement(t.element, e, i.templateData, void 0), o.disposeElement && o.disposeElement(t.element, e, i.templateData, void 0)), t.size = i.domNode.offsetHeight, this.virtualDelegate.setDynamicHeight && this.virtualDelegate.setDynamicHeight(t.element, t.size), t.lastDynamicHeightWidth = this.renderWidth,
- this.rowsContainer.removeChild(i.domNode), this.cache.release(i), t.size - n
- }, e.prototype.getNextToLastElement = function (e) {
- var t = e[e.length - 1];
- if (!t) return null;
- var n = this.items[t.end];
- return n && n.row ? n.row.domNode : null
- }, e.prototype.getElementDomId = function (e) {
- return this.domId + "_" + e
- }, e.prototype.dispose = function () {
- if (this.items) {
- for (var e = 0, t = this.items; e < t.length; e++) {
- var n = t[e];
- if (n.row) {
- var o = this.renderers.get(n.row.templateId);
- o && o.disposeTemplate(n.row.templateData)
- }
- }
- this.items = []
- }
- this.domNode && this.domNode.parentNode && this.domNode.parentNode.removeChild(this.domNode), i.dispose(this.disposables)
- }, e.InstanceCount = 0, h([p.memoize], e.prototype, "onMouseClick", null), h([p.memoize], e.prototype, "onMouseDblClick", null), h([p.memoize], e.prototype, "onMouseMiddleClick", null), h([p.memoize], e.prototype, "onMouseDown", null), h([p.memoize], e.prototype, "onContextMenu", null), h([p.memoize], e.prototype, "onTouchStart", null), h([p.memoize], e.prototype, "onTap", null), e
- }();
- t.ListView = w
- })),
- define(n[277], i([0, 1, 16, 24, 2, 6, 126, 57, 5, 45, 56, 255, 54, 53, 257, 254, 4, 98, 137, 15]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = function () {
- function e(e) {
- this.context = e, this._cache = {"": []}
- }
- return e.prototype.alloc = function (e) {
- var t = this.cache(e).pop();
- if (!t) {
- var n = document.createElement("div");
- n.className = "content";
- var i = document.createElement("div");
- i.appendChild(n);
- var o = null;
- try {
- o = this.context.renderer.renderTemplate(this.context.tree, e, n)
- } catch (e) {
- console.error("Tree usage error: exception while rendering template"), console.error(e)
- }
- t = {element: i, templateId: e, templateData: o}
- }
- return t
- }, e.prototype.release = function (e, t) {
- !function (e) {
- try {
- e.parentElement.removeChild(e)
- } catch (e) {
- }
- }(t.element), this.cache(e).push(t)
- }, e.prototype.cache = function (e) {
- return this._cache[e] || (this._cache[e] = [])
- }, e.prototype.garbageCollect = function () {
- var e = this;
- this._cache && Object.keys(this._cache).forEach((function (t) {
- e._cache[t].forEach((function (n) {
- e.context.renderer.disposeTemplate(e.context.tree, t, n.templateData), n.element = null, n.templateData = null
- })), delete e._cache[t]
- }))
- }, e.prototype.dispose = function () {
- this.garbageCollect(), this._cache = null
- }, e
- }();
- t.RowCache = b;
- var S = function () {
- function e(e, t) {
- var n = this;
- this.width = 0, this.needsRender = !1, this.uri = null, this.unbindDragStart = o.Disposable.None, this._draggable = !1, this.context = e, this.model = t, this.id = this.model.id, this.row = null, this.top = 0, this.height = t.getHeight(), this._styles = {}, t.getAllTraits().forEach((function (e) {
- return n._styles[e] = !0
- })), t.isExpanded() && this.addClass("expanded")
- }
- return Object.defineProperty(e.prototype, "expanded", {
- set: function (e) {
- e ? this.addClass("expanded") : this.removeClass("expanded")
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "loading", {
- set: function (e) {
- e ? this.addClass("codicon-loading") : this.removeClass("codicon-loading")
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "draggable", {
- get: function () {
- return this._draggable
- }, set: function (e) {
- this._draggable = e, this.render(!0)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "dropTarget", {
- set: function (e) {
- e ? this.addClass("drop-target") : this.removeClass("drop-target")
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "element", {
- get: function () {
- return this.row && this.row.element
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "templateId", {
- get: function () {
- return this._templateId || (this._templateId = this.context.renderer.getTemplateId && this.context.renderer.getTemplateId(this.context.tree, this.model.getElement()))
- }, enumerable: !0, configurable: !0
- }), e.prototype.addClass = function (e) {
- this._styles[e] = !0, this.render(!0)
- }, e.prototype.removeClass = function (e) {
- delete this._styles[e], this.render(!0)
- }, e.prototype.render = function (e) {
- var t = this;
- if (void 0 === e && (e = !1), this.model && this.element) {
- var n = ["monaco-tree-row"];
- n.push.apply(n, Object.keys(this._styles)), this.model.hasChildren() && n.push("has-children"), this.element.className = n.join(" "),
- this.element.draggable = this.draggable, this.element.style.height = this.height + "px", this.element.setAttribute("role", "treeitem");
- var o = this.context.accessibilityProvider,
- r = o.getAriaLabel(this.context.tree, this.model.getElement());
- if (r && this.element.setAttribute("aria-label", r), o.getPosInSet && o.getSetSize && (this.element.setAttribute("aria-setsize", o.getSetSize()), this.element.setAttribute("aria-posinset", o.getPosInSet(this.context.tree, this.model.getElement()))), this.model.hasTrait("focused")) {
- var a = u.safeBtoa(this.model.id);
- this.element.setAttribute("aria-selected", "true"), this.element.setAttribute("id", a)
- } else this.element.setAttribute("aria-selected", "false"), this.element.removeAttribute("id");
- this.model.hasChildren() ? this.element.setAttribute("aria-expanded", String(!!this._styles.expanded)) : this.element.removeAttribute("aria-expanded"), this.element.setAttribute("aria-level", String(this.model.getDepth())),
- this.context.options.paddingOnRow ? this.element.style.paddingLeft = this.context.options.twistiePixels + (this.model.getDepth() - 1) * this.context.options.indentPixels + "px" : (this.element.style.paddingLeft = (this.model.getDepth() - 1) * this.context.options.indentPixels + "px", this.row.element.firstElementChild.style.paddingLeft = this.context.options.twistiePixels + "px");
- var l = this.context.dnd.getDragURI(this.context.tree, this.model.getElement());
- if (l !== this.uri && (this.unbindDragStart && this.unbindDragStart.dispose(), l ? (this.uri = l, this.draggable = !0, this.unbindDragStart = s.addDisposableListener(this.element, "dragstart", (function (e) {
- t.onDragStart(e)
- }))) : this.uri = null), !e && this.element) {
- var d = 0;
- if (this.context.horizontalScrolling) {
- var c = window.getComputedStyle(this.element);
- d = parseFloat(c.paddingLeft)
- }
- this.context.horizontalScrolling && (this.element.style.width = i.isFirefox ? "-moz-fit-content" : "fit-content");
- try {
- this.context.renderer.renderElement(this.context.tree, this.model.getElement(), this.templateId, this.row.templateData)
- } catch (e) {
- console.error("Tree usage error: exception while rendering element"), console.error(e)
- }
- this.context.horizontalScrolling && (this.width = s.getContentWidth(this.element) + d, this.element.style.width = "")
- }
- }
- }, e.prototype.insertInDOM = function (e, t) {
- if (this.row || (this.row = this.context.cache.alloc(this.templateId), this.element[E.BINDING] = this), !this.element.parentElement) {
- if (null === t) e.appendChild(this.element); else try {
- e.insertBefore(this.element, t)
- } catch (t) {
- console.warn("Failed to locate previous tree element"), e.appendChild(this.element)
- }
- this.render()
- }
- }, e.prototype.removeFromDOM = function () {
- this.row && (this.unbindDragStart.dispose(), this.uri = null, this.element[E.BINDING] = null, this.context.cache.release(this.templateId, this.row), this.row = null)
- }, e.prototype.dispose = function () {
- this.row = null
- }, e
- }();
- t.ViewItem = S;
- var w = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, n) || this;
- return o.row = {element: i, templateData: null, templateId: null}, o
- }
- return r(t, e), t.prototype.render = function () {
- if (this.model && this.element) {
- var e = ["monaco-tree-wrapper"];
- e.push.apply(e, Object.keys(this._styles)), this.model.hasChildren() && e.push("has-children"), this.element.className = e.join(" ")
- }
- }, t.prototype.insertInDOM = function (e, t) {
- }, t.prototype.removeFromDOM = function () {
- }, t
- }(S);
- var E = function (e) {
- function t(n, r) {
- var a = e.call(this) || this;
- a.model = null, a.lastPointerType = "", a.lastClickTimeStamp = 0, a.contentWidthUpdateDelayer = new C.Delayer(50), a.isRefreshing = !1, a.refreshingPreviousChildrenIds = {}, a.currentDragAndDropData = null, a.currentDropTarget = null, a.currentDropTargets = null, a.currentDropDisposable = o.Disposable.None, a.gestureDisposable = o.Disposable.None, a.dragAndDropScrollInterval = null, a.dragAndDropScrollTimeout = null, a.dragAndDropMouseY = null, a.highlightedItemWasDraggable = !1, a.onHiddenScrollTop = null, a._onDOMFocus = new v.Emitter, a.onDOMFocus = a._onDOMFocus.event, a._onDOMBlur = new v.Emitter, a._onDidScroll = new v.Emitter, t.counter++, a.instance = t.counter;
- var u = void 0 === n.options.horizontalScrollMode ? 2 : n.options.horizontalScrollMode;
- a.horizontalScrolling = 2 !== u,
- a.context = {
- dataSource: n.dataSource,
- renderer: n.renderer,
- controller: n.controller,
- dnd: n.dnd,
- filter: n.filter,
- sorter: n.sorter,
- tree: n.tree,
- accessibilityProvider: n.accessibilityProvider,
- options: n.options,
- cache: new b(n),
- horizontalScrolling: a.horizontalScrolling
- }, a.modelListeners = [], a.viewListeners = [], a.items = {}, a.domNode = document.createElement("div"), a.domNode.className = "monaco-tree no-focused-item monaco-tree-instance-" + a.instance, a.domNode.tabIndex = n.options.preventRootFocus ? -1 : 0, a.styleElement = s.createStyleSheet(a.domNode), a.treeStyler = n.styler || new y.DefaultTreestyler(a.styleElement, "monaco-tree-instance-" + a.instance), a.domNode.setAttribute("role", "tree"), a.context.options.ariaLabel && a.domNode.setAttribute("aria-label", a.context.options.ariaLabel), a.context.options.alwaysFocused && s.addClass(a.domNode, "focused"), a.context.options.paddingOnRow || s.addClass(a.domNode, "no-row-padding"), a.wrapper = document.createElement("div"), a.wrapper.className = "monaco-tree-wrapper",
- a.scrollableElement = new g.ScrollableElement(a.wrapper, {
- alwaysConsumeMouseWheel: !0,
- horizontal: u,
- vertical: void 0 !== n.options.verticalScrollMode ? n.options.verticalScrollMode : 1,
- useShadows: n.options.useShadows
- }), a.scrollableElement.onScroll((function (e) {
- a.render(e.scrollTop, e.height, e.scrollLeft, e.width, e.scrollWidth), a._onDidScroll.fire()
- })), i.isIE ? (a.wrapper.style.msTouchAction = "none", a.wrapper.style.msContentZooming = "none") : a.gestureDisposable = l.Gesture.addTarget(a.wrapper), a.rowsContainer = document.createElement("div"), a.rowsContainer.className = "monaco-tree-rows", n.options.showTwistie && (a.rowsContainer.className += " show-twisties");
- var d = s.trackFocus(a.domNode);
- return a.viewListeners.push(d.onDidFocus((function () {
- return a.onFocus()
- }))), a.viewListeners.push(d.onDidBlur((function () {
- return a.onBlur()
- }))), a.viewListeners.push(d), a.viewListeners.push(s.addDisposableListener(a.domNode, "keydown", (function (e) {
- return a.onKeyDown(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "keyup", (function (e) {
- return a.onKeyUp(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "mousedown", (function (e) {
- return a.onMouseDown(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "mouseup", (function (e) {
- return a.onMouseUp(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "auxclick", (function (e) {
- e && 1 === e.button && a.onMouseMiddleClick(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "click", (function (e) {
- return a.onClick(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "contextmenu", (function (e) {
- return a.onContextMenu(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, l.EventType.Tap, (function (e) {
- return a.onTap(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, l.EventType.Change, (function (e) {
- return a.onTouchChange(e)
- }))), i.isIE && (a.viewListeners.push(s.addDisposableListener(a.wrapper, "MSPointerDown", (function (e) {
- return a.onMsPointerDown(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "MSGestureTap", (function (e) {
- return a.onMsGestureTap(e)
- }))), a.viewListeners.push(s.addDisposableThrottledListener(a.wrapper, "MSGestureChange", (function (e) {
- return a.onThrottledMsGestureChange(e)
- }), (function (e, t) {
- t.stopPropagation(), t.preventDefault();
- var n = {translationY: t.translationY, translationX: t.translationX};
- return e && (n.translationY += e.translationY, n.translationX += e.translationX), n
- })))), a.viewListeners.push(s.addDisposableListener(window, "dragover", (function (e) {
- return a.onDragOver(e)
- }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "drop", (function (e) {
- return a.onDrop(e)
- }))), a.viewListeners.push(s.addDisposableListener(window, "dragend", (function (e) {
- return a.onDragEnd(e)
- }))), a.viewListeners.push(s.addDisposableListener(window, "dragleave", (function (e) {
- return a.onDragOver(e)
- }))), a.wrapper.appendChild(a.rowsContainer), a.domNode.appendChild(a.scrollableElement.getDomNode()), r.appendChild(a.domNode), a.lastRenderTop = 0, a.lastRenderHeight = 0, a.didJustPressContextMenuKey = !1, a.currentDropTarget = null, a.currentDropTargets = [],
- a.shouldInvalidateDropReaction = !1, a.dragAndDropScrollInterval = null, a.dragAndDropScrollTimeout = null, a.onRowsChanged(), a.layout(), a.setupMSGesture(), a.applyStyles(n.options), a
- }
- return r(t, e), t.prototype.applyStyles = function (e) {
- this.treeStyler.style(e)
- }, t.prototype.createViewItem = function (e) {
- return new S(this.context, e)
- }, t.prototype.getHTMLElement = function () {
- return this.domNode
- }, t.prototype.focus = function () {
- this.domNode.focus()
- }, t.prototype.isFocused = function () {
- return document.activeElement === this.domNode
- }, t.prototype.blur = function () {
- this.domNode.blur()
- }, t.prototype.setupMSGesture = function () {
- var e = this;
- window.MSGesture && (this.msGesture = new MSGesture, setTimeout((function () {
- return e.msGesture.target = e.wrapper
- }), 100))
- }, t.prototype.isTreeVisible = function () {
- return null === this.onHiddenScrollTop
- }, t.prototype.layout = function (e, t) {
- this.isTreeVisible() && (this.viewHeight = e || s.getContentHeight(this.wrapper), this.scrollHeight = this.getContentHeight(),
- this.horizontalScrolling && (this.viewWidth = t || s.getContentWidth(this.wrapper)))
- }, t.prototype.render = function (e, t, n, i, o) {
- var r, s, a = e, l = e + t, u = this.lastRenderTop + this.lastRenderHeight;
- for (r = this.indexAfter(l) - 1, s = this.indexAt(Math.max(u, a)); r >= s; r--) this.insertItemInDOM(this.itemAtIndex(r));
- for (r = Math.min(this.indexAt(this.lastRenderTop), this.indexAfter(l)) - 1, s = this.indexAt(a); r >= s; r--) this.insertItemInDOM(this.itemAtIndex(r));
- for (r = this.indexAt(this.lastRenderTop), s = Math.min(this.indexAt(a), this.indexAfter(u)); r < s; r++) this.removeItemFromDOM(this.itemAtIndex(r));
- for (r = Math.max(this.indexAfter(l), this.indexAt(this.lastRenderTop)), s = this.indexAfter(u); r < s; r++) this.removeItemFromDOM(this.itemAtIndex(r));
- var d = this.itemAtIndex(this.indexAt(a));
- d && (this.rowsContainer.style.top = d.top - a + "px"), this.horizontalScrolling && (this.rowsContainer.style.left = -n + "px", this.rowsContainer.style.width = Math.max(o, i) + "px"), this.lastRenderTop = a, this.lastRenderHeight = l - a
- }, t.prototype.setModel = function (e) {
- this.releaseModel(), this.model = e,
- this.model.onRefresh(this.onRefreshing, this, this.modelListeners), this.model.onDidRefresh(this.onRefreshed, this, this.modelListeners), this.model.onSetInput(this.onClearingInput, this, this.modelListeners), this.model.onDidSetInput(this.onSetInput, this, this.modelListeners), this.model.onDidFocus(this.onModelFocusChange, this, this.modelListeners), this.model.onRefreshItemChildren(this.onItemChildrenRefreshing, this, this.modelListeners), this.model.onDidRefreshItemChildren(this.onItemChildrenRefreshed, this, this.modelListeners), this.model.onDidRefreshItem(this.onItemRefresh, this, this.modelListeners), this.model.onExpandItem(this.onItemExpanding, this, this.modelListeners), this.model.onDidExpandItem(this.onItemExpanded, this, this.modelListeners), this.model.onCollapseItem(this.onItemCollapsing, this, this.modelListeners), this.model.onDidRevealItem(this.onItemReveal, this, this.modelListeners), this.model.onDidAddTraitItem(this.onItemAddTrait, this, this.modelListeners),
- this.model.onDidRemoveTraitItem(this.onItemRemoveTrait, this, this.modelListeners)
- }, t.prototype.onRefreshing = function () {
- this.isRefreshing = !0
- }, t.prototype.onRefreshed = function () {
- this.isRefreshing = !1, this.onRowsChanged()
- }, t.prototype.onRowsChanged = function (e) {
- void 0 === e && (e = this.scrollTop), this.isRefreshing || (this.scrollTop = e, this.updateScrollWidth())
- }, t.prototype.updateScrollWidth = function () {
- var e = this;
- this.horizontalScrolling && this.contentWidthUpdateDelayer.trigger((function () {
- for (var t = 0, n = 0, i = Object.keys(e.items); n < i.length; n++) {
- var o = i[n];
- t = Math.max(t, e.items[o].width)
- }
- e.scrollWidth = t + 10
- }))
- }, t.prototype.focusNextPage = function (e) {
- var t = this, n = this.indexAt(this.scrollTop + this.viewHeight);
- n = 0 === n ? 0 : n - 1;
- var i = this.itemAtIndex(n).model.getElement();
- if (this.model.getFocus() !== i) this.model.setFocus(i, e); else {
- var o = this.scrollTop;
- this.scrollTop += this.viewHeight, this.scrollTop !== o && setTimeout((function () {
- t.focusNextPage(e)
- }), 0)
- }
- }, t.prototype.focusPreviousPage = function (e) {
- var t, n = this
- ;t = 0 === this.scrollTop ? this.indexAt(this.scrollTop) : this.indexAfter(this.scrollTop - 1);
- var i = this.itemAtIndex(t).model.getElement();
- if (this.model.getFocus() !== i) this.model.setFocus(i, e); else {
- var o = this.scrollTop;
- this.scrollTop -= this.viewHeight, this.scrollTop !== o && setTimeout((function () {
- n.focusPreviousPage(e)
- }), 0)
- }
- }, Object.defineProperty(t.prototype, "viewHeight", {
- get: function () {
- return this.scrollableElement.getScrollDimensions().height
- }, set: function (e) {
- this.scrollableElement.setScrollDimensions({height: e})
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "scrollHeight", {
- set: function (e) {
- e += this.horizontalScrolling ? 10 : 0, this.scrollableElement.setScrollDimensions({scrollHeight: e})
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "viewWidth", {
- get: function () {
- return this.scrollableElement.getScrollDimensions().width
- }, set: function (e) {
- this.scrollableElement.setScrollDimensions({width: e})
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "scrollWidth", {
- set: function (e) {
- this.scrollableElement.setScrollDimensions({scrollWidth: e})
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "scrollTop", {
- get: function () {
- return this.scrollableElement.getScrollPosition().scrollTop
- }, set: function (e) {
- var t = this.getContentHeight() + (this.horizontalScrolling ? 10 : 0);
- this.scrollableElement.setScrollDimensions({scrollHeight: t}), this.scrollableElement.setScrollPosition({scrollTop: e})
- }, enumerable: !0, configurable: !0
- }), t.prototype.onClearingInput = function (e) {
- var t = e.item;
- t && (this.onRemoveItems(new p.MappedIterator(t.getNavigator(), (function (e) {
- return e && e.id
- }))), this.onRowsChanged())
- }, t.prototype.onSetInput = function (e) {
- this.context.cache.garbageCollect(), this.inputItem = new w(this.context, e.item, this.wrapper)
- }, t.prototype.onItemChildrenRefreshing = function (e) {
- var n = e.item, i = this.items[n.id];
- if (i && this.context.options.showLoading && (i.loadingTimer = setTimeout((function () {
- i.loadingTimer = 0, i.loading = !0
- }), t.LOADING_DECORATION_DELAY)), !e.isNested) {
- for (var o = [], r = n.getNavigator(), s = void 0; s = r.next();) o.push(s.id);
- this.refreshingPreviousChildrenIds[n.id] = o
- }
- }, t.prototype.onItemChildrenRefreshed = function (e) {
- var t = this, n = e.item, i = this.items[n.id];
- if (i && (i.loadingTimer && (clearTimeout(i.loadingTimer), i.loadingTimer = 0), i.loading = !1), !e.isNested) {
- for (var o = this.refreshingPreviousChildrenIds[n.id], r = [], s = n.getNavigator(), l = void 0; l = s.next();) r.push(l);
- var u = Math.abs(o.length - r.length) > 1e3, d = [], c = !1;
- if (!u) c = (d = new a.LcsDiff({
- getElements: function () {
- return o
- }
- }, {
- getElements: function () {
- return r.map((function (e) {
- return e.id
- }))
- }
- }, null).ComputeDiff(!1).changes).some((function (e) {
- if (e.modifiedLength > 0) for (var n = e.modifiedStart, i = e.modifiedStart + e.modifiedLength; n < i; n++) if (t.items.hasOwnProperty(r[n].id)) return !0;
- return !1
- }));
- if (!u && !c && d.length < 50) for (var h = 0, g = d; h < g.length; h++) {
- var f = g[h];
- if (f.originalLength > 0 && this.onRemoveItems(new p.ArrayIterator(o, f.originalStart, f.originalStart + f.originalLength)), f.modifiedLength > 0) {
- var m = r[f.modifiedStart - 1] || n
- ;m = m.getDepth() > 0 ? m : null, this.onInsertItems(new p.ArrayIterator(r, f.modifiedStart, f.modifiedStart + f.modifiedLength), m ? m.id : null)
- }
- } else (u || d.length) && (this.onRemoveItems(new p.ArrayIterator(o)), this.onInsertItems(new p.ArrayIterator(r), n.getDepth() > 0 ? n.id : null));
- (u || d.length) && this.onRowsChanged()
- }
- }, t.prototype.onItemRefresh = function (e) {
- this.onItemsRefresh([e])
- }, t.prototype.onItemsRefresh = function (e) {
- var t = this;
- this.onRefreshItemSet(e.filter((function (e) {
- return t.items.hasOwnProperty(e.id)
- }))), this.onRowsChanged()
- }, t.prototype.onItemExpanding = function (e) {
- var t = this.items[e.item.id];
- t && (t.expanded = !0)
- }, t.prototype.onItemExpanded = function (e) {
- var t = e.item, n = this.items[t.id];
- if (n) {
- n.expanded = !0;
- var i = this.onInsertItems(t.getNavigator(), t.id) || 0, o = this.scrollTop;
- n.top + n.height <= this.scrollTop && (o += i), this.onRowsChanged(o)
- }
- }, t.prototype.onItemCollapsing = function (e) {
- var t = e.item, n = this.items[t.id];
- n && (n.expanded = !1, this.onRemoveItems(new p.MappedIterator(t.getNavigator(), (function (e) {
- return e && e.id
- }))),
- this.onRowsChanged())
- }, t.prototype.onItemReveal = function (e) {
- var t = e.item, n = e.relativeTop, i = this.items[t.id];
- if (i) if (null !== n) {
- n = (n = n < 0 ? 0 : n) > 1 ? 1 : n;
- var o = i.height - this.viewHeight;
- this.scrollTop = o * n + i.top
- } else {
- var r = i.top + i.height, s = this.scrollTop + this.viewHeight;
- i.top < this.scrollTop ? this.scrollTop = i.top : r >= s && (this.scrollTop = r - this.viewHeight)
- }
- }, t.prototype.onItemAddTrait = function (e) {
- var t = e.item, n = e.trait, i = this.items[t.id];
- i && i.addClass(n), "highlighted" === n && (s.addClass(this.domNode, n), i && (this.highlightedItemWasDraggable = !!i.draggable, i.draggable && (i.draggable = !1)))
- }, t.prototype.onItemRemoveTrait = function (e) {
- var t = e.item, n = e.trait, i = this.items[t.id];
- i && i.removeClass(n), "highlighted" === n && (s.removeClass(this.domNode, n), this.highlightedItemWasDraggable && (i.draggable = !0), this.highlightedItemWasDraggable = !1)
- }, t.prototype.onModelFocusChange = function () {
- var e = this.model && this.model.getFocus();
- s.toggleClass(this.domNode, "no-focused-item", !e),
- e ? this.domNode.setAttribute("aria-activedescendant", u.safeBtoa(this.context.dataSource.getId(this.context.tree, e))) : this.domNode.removeAttribute("aria-activedescendant")
- }, t.prototype.onInsertItem = function (e) {
- var t = this;
- e.onDragStart = function (n) {
- t.onDragStart(e, n)
- }, e.needsRender = !0, this.refreshViewItem(e), this.items[e.id] = e
- }, t.prototype.onRefreshItem = function (e, t) {
- void 0 === t && (t = !1), e.needsRender = e.needsRender || t, this.refreshViewItem(e)
- }, t.prototype.onRemoveItem = function (e) {
- this.removeItemFromDOM(e), e.dispose(), delete this.items[e.id]
- }, t.prototype.refreshViewItem = function (e) {
- e.render(), this.shouldBeRendered(e) ? this.insertItemInDOM(e) : this.removeItemFromDOM(e)
- }, t.prototype.onClick = function (e) {
- if (!this.lastPointerType || "mouse" === this.lastPointerType) {
- var t = new d.StandardMouseEvent(e), n = this.getItemAround(t.target);
- n && (i.isIE && Date.now() - this.lastClickTimeStamp < 300 && (t.detail = 2), this.lastClickTimeStamp = Date.now(), this.context.controller.onClick(this.context.tree, n.model.getElement(), t))
- }
- },
- t.prototype.onMouseMiddleClick = function (e) {
- if (this.context.controller.onMouseMiddleClick) {
- var t = new d.StandardMouseEvent(e), n = this.getItemAround(t.target);
- n && this.context.controller.onMouseMiddleClick(this.context.tree, n.model.getElement(), t)
- }
- }, t.prototype.onMouseDown = function (e) {
- if (this.didJustPressContextMenuKey = !1, this.context.controller.onMouseDown && (!this.lastPointerType || "mouse" === this.lastPointerType)) {
- var t = new d.StandardMouseEvent(e);
- if (!(t.ctrlKey && n.isNative && n.isMacintosh)) {
- var i = this.getItemAround(t.target);
- i && this.context.controller.onMouseDown(this.context.tree, i.model.getElement(), t)
- }
- }
- }, t.prototype.onMouseUp = function (e) {
- if (this.context.controller.onMouseUp && (!this.lastPointerType || "mouse" === this.lastPointerType)) {
- var t = new d.StandardMouseEvent(e);
- if (!(t.ctrlKey && n.isNative && n.isMacintosh)) {
- var i = this.getItemAround(t.target);
- i && this.context.controller.onMouseUp(this.context.tree, i.model.getElement(), t)
- }
- }
- }, t.prototype.onTap = function (e) {
- var t = this.getItemAround(e.initialTarget)
- ;t && this.context.controller.onTap(this.context.tree, t.model.getElement(), e)
- }, t.prototype.onTouchChange = function (e) {
- e.preventDefault(), e.stopPropagation(), this.scrollTop -= e.translationY
- }, t.prototype.onContextMenu = function (e) {
- var t, n;
- if (e instanceof KeyboardEvent || this.didJustPressContextMenuKey) {
- this.didJustPressContextMenuKey = !1;
- var i = new c.StandardKeyboardEvent(e), o = void 0;
- if (n = this.model.getFocus()) {
- var r = this.context.dataSource.getId(this.context.tree, n), a = this.items[r];
- o = s.getDomNodePagePosition(a.element)
- } else n = this.model.getInput(), o = s.getDomNodePagePosition(this.inputItem.element);
- t = new m.KeyboardContextMenuEvent(o.left + o.width, o.top, i)
- } else {
- var l = new d.StandardMouseEvent(e), u = this.getItemAround(l.target);
- if (!u) return;
- n = u.model.getElement(), t = new m.MouseContextMenuEvent(l)
- }
- this.context.controller.onContextMenu(this.context.tree, n, t)
- }, t.prototype.onKeyDown = function (e) {
- var t = new c.StandardKeyboardEvent(e);
- this.didJustPressContextMenuKey = 58 === t.keyCode || t.shiftKey && 68 === t.keyCode,
- t.target && t.target.tagName && "input" === t.target.tagName.toLowerCase() || (this.didJustPressContextMenuKey && (t.preventDefault(), t.stopPropagation()), this.context.controller.onKeyDown(this.context.tree, t))
- }, t.prototype.onKeyUp = function (e) {
- this.didJustPressContextMenuKey && this.onContextMenu(e), this.didJustPressContextMenuKey = !1, this.context.controller.onKeyUp(this.context.tree, new c.StandardKeyboardEvent(e))
- }, t.prototype.onDragStart = function (e, t) {
- if (!this.model.getHighlight()) {
- var n, i = e.model.getElement(), o = this.model.getSelection();
- if (n = o.indexOf(i) > -1 ? o : [i], t.dataTransfer.effectAllowed = "copyMove", t.dataTransfer.setData(_.DataTransfers.RESOURCES, JSON.stringify([e.uri])), t.dataTransfer.setDragImage) {
- var r = void 0;
- r = this.context.dnd.getDragLabel ? this.context.dnd.getDragLabel(this.context.tree, n) : String(n.length);
- var s = document.createElement("div");
- s.className = "monaco-tree-drag-image", s.textContent = r, document.body.appendChild(s), t.dataTransfer.setDragImage(s, -10, -10), setTimeout((function () {
- return document.body.removeChild(s)
- }), 0)
- }
- this.currentDragAndDropData = new h.ElementsDragAndDropData(n), _.StaticDND.CurrentDragAndDropData = new h.ExternalElementsDragAndDropData(n), this.context.dnd.onDragStart(this.context.tree, this.currentDragAndDropData, new d.DragMouseEvent(t))
- }
- }, t.prototype.setupDragAndDropScrollInterval = function () {
- var e = this, t = s.getTopLeftOffset(this.wrapper).top;
- this.dragAndDropScrollInterval || (this.dragAndDropScrollInterval = window.setInterval((function () {
- if (null !== e.dragAndDropMouseY) {
- var n = e.dragAndDropMouseY - t, i = 0, o = e.viewHeight - 35;
- n < 35 ? i = Math.max(-14, .2 * (n - 35)) : n > o && (i = Math.min(14, .2 * (n - o))), e.scrollTop += i
- }
- }), 10), this.cancelDragAndDropScrollTimeout(), this.dragAndDropScrollTimeout = window.setTimeout((function () {
- e.cancelDragAndDropScrollInterval(), e.dragAndDropScrollTimeout = null
- }), 1e3))
- }, t.prototype.cancelDragAndDropScrollInterval = function () {
- this.dragAndDropScrollInterval && (window.clearInterval(this.dragAndDropScrollInterval), this.dragAndDropScrollInterval = null),
- this.cancelDragAndDropScrollTimeout()
- }, t.prototype.cancelDragAndDropScrollTimeout = function () {
- this.dragAndDropScrollTimeout && (window.clearTimeout(this.dragAndDropScrollTimeout), this.dragAndDropScrollTimeout = null)
- }, t.prototype.onDragOver = function (e) {
- var t = this;
- e.preventDefault();
- var n, i = new d.DragMouseEvent(e), r = this.getItemAround(i.target);
- if (!r || 0 === i.posx && 0 === i.posy && i.browserEvent.type === s.EventType.DRAG_LEAVE) return this.currentDropTarget && (this.currentDropTargets.forEach((function (e) {
- return e.dropTarget = !1
- })), this.currentDropTargets = [], this.currentDropDisposable.dispose()), this.cancelDragAndDropScrollInterval(), this.currentDropTarget = null, this.currentDropElement = null, this.dragAndDropMouseY = null, !1;
- if (this.setupDragAndDropScrollInterval(), this.dragAndDropMouseY = i.posy, !this.currentDragAndDropData) if (_.StaticDND.CurrentDragAndDropData) this.currentDragAndDropData = _.StaticDND.CurrentDragAndDropData; else {
- if (!i.dataTransfer.types) return !1;
- this.currentDragAndDropData = new h.DesktopDragAndDropData
- }
- this.currentDragAndDropData.update(i.browserEvent.dataTransfer);
- var a, l = r.model;
- do {
- if (n = l ? l.getElement() : this.model.getInput(), !(a = this.context.dnd.onDragOver(this.context.tree, this.currentDragAndDropData, n, i)) || 1 !== a.bubble) break;
- l = l && l.parent
- } while (l);
- if (!l) return this.currentDropElement = null, !1;
- var u = a && a.accept;
- u ? (this.currentDropElement = l.getElement(), i.preventDefault(), i.dataTransfer.dropEffect = 0 === a.effect ? "copy" : "move") : this.currentDropElement = null;
- var c, p, g = l.id === this.inputItem.id ? this.inputItem : this.items[l.id];
- if ((this.shouldInvalidateDropReaction || this.currentDropTarget !== g || (c = this.currentDropElementReaction, p = a, !(!c && !p || c && p && c.accept === p.accept && c.bubble === p.bubble && c.effect === p.effect))) && (this.shouldInvalidateDropReaction = !1, this.currentDropTarget && (this.currentDropTargets.forEach((function (e) {
- return e.dropTarget = !1
- })), this.currentDropTargets = [], this.currentDropDisposable.dispose()), this.currentDropTarget = g, this.currentDropElementReaction = a, u)) {
- if (this.currentDropTarget && (this.currentDropTarget.dropTarget = !0, this.currentDropTargets.push(this.currentDropTarget)), 0 === a.bubble) for (var f = l.getNavigator(), m = void 0; m = f.next();) (r = this.items[m.id]) && (r.dropTarget = !0, this.currentDropTargets.push(r));
- if (a.autoExpand) {
- var v = C.timeout(500);
- this.currentDropDisposable = o.toDisposable((function () {
- return v.cancel()
- })), v.then((function () {
- return t.context.tree.expand(t.currentDropElement)
- })).then((function () {
- return t.shouldInvalidateDropReaction = !0
- }))
- }
- }
- return !0
- }, t.prototype.onDrop = function (e) {
- if (this.currentDropElement) {
- var t = new d.DragMouseEvent(e);
- t.preventDefault(), this.currentDragAndDropData.update(t.browserEvent.dataTransfer), this.context.dnd.drop(this.context.tree, this.currentDragAndDropData, this.currentDropElement, t), this.onDragEnd(e)
- }
- this.cancelDragAndDropScrollInterval()
- }, t.prototype.onDragEnd = function (e) {
- this.currentDropTarget && (this.currentDropTargets.forEach((function (e) {
- return e.dropTarget = !1
- })), this.currentDropTargets = []),
- this.currentDropDisposable.dispose(), this.cancelDragAndDropScrollInterval(), this.currentDragAndDropData = null, _.StaticDND.CurrentDragAndDropData = void 0, this.currentDropElement = null, this.currentDropTarget = null, this.dragAndDropMouseY = null
- }, t.prototype.onFocus = function () {
- this.context.options.alwaysFocused || s.addClass(this.domNode, "focused"), this._onDOMFocus.fire()
- }, t.prototype.onBlur = function () {
- this.context.options.alwaysFocused || s.removeClass(this.domNode, "focused"), this.domNode.removeAttribute("aria-activedescendant"), this._onDOMBlur.fire()
- }, t.prototype.onMsPointerDown = function (e) {
- if (this.msGesture) {
- var t = e.pointerType;
- t !== (e.MSPOINTER_TYPE_MOUSE || "mouse") ? t === (e.MSPOINTER_TYPE_TOUCH || "touch") && (this.lastPointerType = "touch", e.stopPropagation(), e.preventDefault(), this.msGesture.addPointer(e.pointerId)) : this.lastPointerType = "mouse"
- }
- }, t.prototype.onThrottledMsGestureChange = function (e) {
- this.scrollTop -= e.translationY
- }, t.prototype.onMsGestureTap = function (e) {
- e.initialTarget = document.elementFromPoint(e.clientX, e.clientY), this.onTap(e)
- }, t.prototype.insertItemInDOM = function (e) {
- var t = null, n = this.itemAfter(e);
- n && n.element && (t = n.element), e.insertInDOM(this.rowsContainer, t)
- }, t.prototype.removeItemFromDOM = function (e) {
- e && e.removeFromDOM()
- }, t.prototype.shouldBeRendered = function (e) {
- return e.top < this.lastRenderTop + this.lastRenderHeight && e.top + e.height > this.lastRenderTop
- }, t.prototype.getItemAround = function (e) {
- var n = this.inputItem, i = e;
- do {
- if (i[t.BINDING] && (n = i[t.BINDING]), i === this.wrapper || i === this.domNode) return n;
- if (i === this.scrollableElement.getDomNode() || i === document.body) return
- } while (i = i.parentElement)
- }, t.prototype.releaseModel = function () {
- this.model && (this.modelListeners = o.dispose(this.modelListeners), this.model = null)
- }, t.prototype.dispose = function () {
- var t = this;
- this.scrollableElement.dispose(), this.releaseModel(), this.viewListeners = o.dispose(this.viewListeners), this._onDOMFocus.dispose(), this._onDOMBlur.dispose(),
- this.domNode.parentNode && this.domNode.parentNode.removeChild(this.domNode), this.items && Object.keys(this.items).forEach((function (e) {
- return t.items[e].removeFromDOM()
- })), this.context.cache && this.context.cache.dispose(), this.gestureDisposable.dispose(), e.prototype.dispose.call(this)
- }, t.BINDING = "monaco-tree-row", t.LOADING_DECORATION_DELAY = 800, t.counter = 0, t
- }(f.HeightMap);
- t.TreeView = E
- })), define(n[278], i([9]), {});
- var p;
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[279], i([0, 1, 2, 4, 21, 6, 131, 19, 104, 27, 52, 278]), (function (e, t, n, i, o, s, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p, g = {separatorBorder: c.Color.transparent}, f = function () {
- function e(e, t, n, i) {
- this.container = e, this.view = t, this.disposable = i, this._cachedVisibleSize = void 0, "number" == typeof n ? (this._size = n, this._cachedVisibleSize = void 0,
- s.addClass(e, "visible")) : (this._size = 0, this._cachedVisibleSize = n.cachedVisibleSize)
- }
- return Object.defineProperty(e.prototype, "size", {
- get: function () {
- return this._size
- }, set: function (e) {
- this._size = e
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visible", {
- get: function () {
- return void 0 === this._cachedVisibleSize
- }, enumerable: !0, configurable: !0
- }), e.prototype.setVisible = function (e, t) {
- e !== this.visible && (e ? (this.size = l.clamp(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = "number" == typeof t ? t : this.size, this.size = 0), s.toggleClass(this.container, "visible", e), this.view.setVisible && this.view.setVisible(e))
- }, Object.defineProperty(e.prototype, "minimumSize", {
- get: function () {
- return this.visible ? this.view.minimumSize : 0
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "viewMinimumSize", {
- get: function () {
- return this.view.minimumSize
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "maximumSize", {
- get: function () {
- return this.visible ? this.view.maximumSize : 0
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "viewMaximumSize", {
- get: function () {
- return this.view.maximumSize
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "priority", {
- get: function () {
- return this.view.priority
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "snap", {
- get: function () {
- return !!this.view.snap
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "enabled", {
- set: function (e) {
- this.container.style.pointerEvents = e ? null : "none"
- }, enumerable: !0, configurable: !0
- }), e.prototype.layout = function (e, t) {
- this.layoutContainer(e), this.view.layout(this.size, e, t)
- }, e.prototype.dispose = function () {
- return this.disposable.dispose(), this.view
- }, e
- }(), m = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.layoutContainer = function (e) {
- this.container.style.top = e + "px", this.container.style.height = this.size + "px"
- }, t
- }(f), v = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.layoutContainer = function (e) {
- this.container.style.left = e + "px", this.container.style.width = this.size + "px"
- }, t
- }(f);
- !function (e) {
- e[e.Idle = 0] = "Idle", e[e.Busy = 1] = "Busy"
- }(p || (p = {})), function (e) {
- e.Distribute = {type: "distribute"}, e.Split = function (e) {
- return {type: "split", index: e}
- }, e.Invisible = function (e) {
- return {type: "invisible", cachedVisibleSize: e}
- }
- }(t.Sizing || (t.Sizing = {}));
- var _ = function (e) {
- function t(t, n) {
- void 0 === n && (n = {});
- var r = e.call(this) || this;
- return r.size = 0, r.contentSize = 0, r.proportions = void 0, r.viewItems = [], r.sashItems = [], r.state = p.Idle, r._onDidSashChange = r._register(new i.Emitter), r.onDidSashChange = r._onDidSashChange.event, r._onDidSashReset = r._register(new i.Emitter), r._startSnappingEnabled = !0, r._endSnappingEnabled = !0, r.orientation = o.isUndefined(n.orientation) ? 0 : n.orientation, r.inverseAltBehavior = !!n.inverseAltBehavior, r.proportionalLayout = !!o.isUndefined(n.proportionalLayout) || !!n.proportionalLayout, r.el = document.createElement("div"),
- s.addClass(r.el, "monaco-split-view2"), s.addClass(r.el, 0 === r.orientation ? "vertical" : "horizontal"), t.appendChild(r.el), r.sashContainer = s.append(r.el, s.$(".sash-container")), r.viewContainer = s.append(r.el, s.$(".split-view-container")), r.style(n.styles || g), n.descriptor && (r.size = n.descriptor.size, n.descriptor.views.forEach((function (e, t) {
- var n = o.isUndefined(e.visible) || e.visible ? e.size : {
- type: "invisible",
- cachedVisibleSize: e.size
- }, i = e.view;
- r.doAddView(i, n, t, !0)
- })), r.contentSize = r.viewItems.reduce((function (e, t) {
- return e + t.size
- }), 0), r.saveProportions()), r
- }
- return r(t, e), Object.defineProperty(t.prototype, "orthogonalStartSash", {
- get: function () {
- return this._orthogonalStartSash
- }, set: function (e) {
- for (var t = 0, n = this.sashItems; t < n.length; t++) {
- n[t].sash.orthogonalStartSash = e
- }
- this._orthogonalStartSash = e
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "orthogonalEndSash", {
- get: function () {
- return this._orthogonalEndSash
- }, set: function (e) {
- for (var t = 0, n = this.sashItems; t < n.length; t++) {
- n[t].sash.orthogonalEndSash = e
- }
- this._orthogonalEndSash = e
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "startSnappingEnabled", {
- get: function () {
- return this._startSnappingEnabled
- }, set: function (e) {
- this._startSnappingEnabled !== e && (this._startSnappingEnabled = e, this.updateSashEnablement())
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "endSnappingEnabled", {
- get: function () {
- return this._endSnappingEnabled
- }, set: function (e) {
- this._endSnappingEnabled !== e && (this._endSnappingEnabled = e, this.updateSashEnablement())
- }, enumerable: !0, configurable: !0
- }), t.prototype.style = function (e) {
- e.separatorBorder.isTransparent() ? (s.removeClass(this.el, "separator-border"), this.el.style.removeProperty("--separator-border")) : (s.addClass(this.el, "separator-border"), this.el.style.setProperty("--separator-border", e.separatorBorder.toString()))
- }, t.prototype.addView = function (e, t, n) {
- void 0 === n && (n = this.viewItems.length), this.doAddView(e, t, n, !1)
- }, t.prototype.layout = function (e, t) {
- var n = this, i = Math.max(this.size, this.contentSize);
- if (this.size = e,
- this.layoutContext = t, this.proportions) for (var o = 0; o < this.viewItems.length; o++) {
- var r = this.viewItems[o];
- r.size = l.clamp(Math.round(this.proportions[o] * e), r.minimumSize, r.maximumSize)
- } else {
- var s = u.range(this.viewItems.length), a = s.filter((function (e) {
- return 1 === n.viewItems[e].priority
- })), d = s.filter((function (e) {
- return 2 === n.viewItems[e].priority
- }));
- this.resize(this.viewItems.length - 1, e - i, void 0, a, d)
- }
- this.distributeEmptySpace(), this.layoutViews()
- }, t.prototype.saveProportions = function () {
- var e = this;
- this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((function (t) {
- return t.size / e.contentSize
- })))
- }, t.prototype.onSashStart = function (e) {
- for (var t = this, i = e.sash, o = e.start, r = e.alt, s = 0, a = this.viewItems; s < a.length; s++) {
- a[s].enabled = !1
- }
- var l = u.firstIndex(this.sashItems, (function (e) {
- return e.sash === i
- })), d = n.combinedDisposable(h.domEvent(document.body, "keydown")((function (e) {
- return c(t.sashDragState.current, e.altKey)
- })), h.domEvent(document.body, "keyup")((function () {
- return c(t.sashDragState.current, !1)
- }))), c = function (e, n) {
- var i, o, r = t.viewItems.map((function (e) {
- return e.size
- })), s = Number.NEGATIVE_INFINITY, a = Number.POSITIVE_INFINITY;
- (t.inverseAltBehavior && (n = !n), n) && (l === t.sashItems.length - 1 ? (s = ((b = t.viewItems[l]).minimumSize - b.size) / 2, a = (b.maximumSize - b.size) / 2) : (s = ((b = t.viewItems[l + 1]).size - b.maximumSize) / 2, a = (b.size - b.minimumSize) / 2));
- if (!n) {
- var c = u.range(l, -1), h = u.range(l + 1, t.viewItems.length), p = c.reduce((function (e, n) {
- return e + (t.viewItems[n].minimumSize - r[n])
- }), 0), g = c.reduce((function (e, n) {
- return e + (t.viewItems[n].viewMaximumSize - r[n])
- }), 0), f = 0 === h.length ? Number.POSITIVE_INFINITY : h.reduce((function (e, n) {
- return e + (r[n] - t.viewItems[n].minimumSize)
- }), 0), m = 0 === h.length ? Number.NEGATIVE_INFINITY : h.reduce((function (e, n) {
- return e + (r[n] - t.viewItems[n].viewMaximumSize)
- }), 0), v = Math.max(p, m), _ = Math.min(f, g), y = t.findFirstSnapIndex(c),
- C = t.findFirstSnapIndex(h);
- if ("number" == typeof y) {
- var b = t.viewItems[y], S = Math.floor(b.viewMinimumSize / 2);
- i = {index: y, limitDelta: b.visible ? v - S : v + S, size: b.size}
- }
- if ("number" == typeof C) {
- b = t.viewItems[C], S = Math.floor(b.viewMinimumSize / 2);
- o = {index: C, limitDelta: b.visible ? _ + S : _ - S, size: b.size}
- }
- }
- t.sashDragState = {
- start: e,
- current: e,
- index: l,
- sizes: r,
- minDelta: s,
- maxDelta: a,
- alt: n,
- snapBefore: i,
- snapAfter: o,
- disposable: d
- }
- };
- c(o, r)
- }, t.prototype.onSashChange = function (e) {
- var t = e.current, n = this.sashDragState, i = n.index, o = n.start, r = n.sizes, s = n.alt,
- a = n.minDelta, l = n.maxDelta, u = n.snapBefore, d = n.snapAfter;
- this.sashDragState.current = t;
- var c = t - o, h = this.resize(i, c, r, void 0, void 0, a, l, u, d);
- if (s) {
- var p = i === this.sashItems.length - 1, g = this.viewItems.map((function (e) {
- return e.size
- })), f = p ? i : i + 1, m = this.viewItems[f], v = m.size - m.maximumSize,
- _ = m.size - m.minimumSize, y = p ? i - 1 : i + 1;
- this.resize(y, -h, g, void 0, void 0, v, _)
- }
- this.distributeEmptySpace(), this.layoutViews()
- }, t.prototype.onSashEnd = function (e) {
- this._onDidSashChange.fire(e), this.sashDragState.disposable.dispose(), this.saveProportions();
- for (var t = 0, n = this.viewItems; t < n.length; t++) {
- n[t].enabled = !0
- }
- }, t.prototype.onViewChange = function (e, t) {
- var n = this.viewItems.indexOf(e)
- ;n < 0 || n >= this.viewItems.length || (t = "number" == typeof t ? t : e.size, t = l.clamp(t, e.minimumSize, e.maximumSize), this.inverseAltBehavior && n > 0 ? (this.resize(n - 1, Math.floor((e.size - t) / 2)), this.distributeEmptySpace(), this.layoutViews()) : (e.size = t, this.relayout([n], void 0)))
- }, t.prototype.resizeView = function (e, t) {
- var n = this;
- if (this.state !== p.Idle) throw new Error("Cant modify splitview");
- if (this.state = p.Busy, !(e < 0 || e >= this.viewItems.length)) {
- var i = u.range(this.viewItems.length).filter((function (t) {
- return t !== e
- })), o = a(i.filter((function (e) {
- return 1 === n.viewItems[e].priority
- })), [e]), r = i.filter((function (e) {
- return 2 === n.viewItems[e].priority
- })), s = this.viewItems[e];
- t = Math.round(t), t = l.clamp(t, s.minimumSize, Math.min(s.maximumSize, this.size)), s.size = t, this.relayout(o, r), this.state = p.Idle
- }
- }, t.prototype.distributeViewSizes = function () {
- for (var e = this, t = [], n = 0, i = 0, o = this.viewItems; i < o.length; i++) {
- (d = o[i]).maximumSize - d.minimumSize > 0 && (t.push(d), n += d.size)
- }
- for (var r = Math.floor(n / t.length), s = 0, a = t; s < a.length; s++) {
- var d
- ;(d = a[s]).size = l.clamp(r, d.minimumSize, d.maximumSize)
- }
- var c = u.range(this.viewItems.length), h = c.filter((function (t) {
- return 1 === e.viewItems[t].priority
- })), p = c.filter((function (t) {
- return 2 === e.viewItems[t].priority
- }));
- this.relayout(h, p)
- }, t.prototype.getViewSize = function (e) {
- return e < 0 || e >= this.viewItems.length ? -1 : this.viewItems[e].size
- }, t.prototype.doAddView = function (e, t, o, r) {
- var a = this;
- if (void 0 === o && (o = this.viewItems.length), this.state !== p.Idle) throw new Error("Cant modify splitview");
- this.state = p.Busy;
- var l = s.$(".split-view-view");
- o === this.viewItems.length ? this.viewContainer.appendChild(l) : this.viewContainer.insertBefore(l, this.viewContainer.children.item(o));
- var c, h = e.onDidChange((function (e) {
- return a.onViewChange(y, e)
- })), g = n.toDisposable((function () {
- return a.viewContainer.removeChild(l)
- })), f = n.combinedDisposable(h, g);
- c = "number" == typeof t ? t : "split" === t.type ? this.getViewSize(t.index) / 2 : "invisible" === t.type ? {cachedVisibleSize: t.cachedVisibleSize} : e.minimumSize
- ;var _, y = 0 === this.orientation ? new m(l, e, c, f) : new v(l, e, c, f);
- if (this.viewItems.splice(o, 0, y), this.viewItems.length > 1) {
- var C = 0 === this.orientation ? 1 : 0, b = 0 === this.orientation ? {
- getHorizontalSashTop: function (e) {
- return a.getSashPosition(e)
- }
- } : {
- getVerticalSashLeft: function (e) {
- return a.getSashPosition(e)
- }
- }, S = new d.Sash(this.sashContainer, b, {
- orientation: C,
- orthogonalStartSash: this.orthogonalStartSash,
- orthogonalEndSash: this.orthogonalEndSash
- }), w = 0 === this.orientation ? function (e) {
- return {sash: S, start: e.startY, current: e.currentY, alt: e.altKey}
- } : function (e) {
- return {sash: S, start: e.startX, current: e.currentX, alt: e.altKey}
- }, E = i.Event.map(S.onDidStart, w)(this.onSashStart, this),
- L = i.Event.map(S.onDidChange, w)(this.onSashChange, this),
- D = i.Event.map(S.onDidEnd, (function () {
- return u.firstIndex(a.sashItems, (function (e) {
- return e.sash === S
- }))
- }))(this.onSashEnd, this), N = S.onDidReset((function () {
- var e = u.firstIndex(a.sashItems, (function (e) {
- return e.sash === S
- })), t = u.range(e, -1), n = u.range(e + 1, a.viewItems.length), i = a.findFirstSnapIndex(t),
- o = a.findFirstSnapIndex(n);
- ("number" != typeof i || a.viewItems[i].visible) && ("number" != typeof o || a.viewItems[o].visible) && a._onDidSashReset.fire(e)
- })), x = n.combinedDisposable(E, L, D, N, S), I = {sash: S, disposable: x};
- this.sashItems.splice(o - 1, 0, I)
- }
- l.appendChild(e.element), "number" != typeof t && "split" === t.type && (_ = [t.index]), r || this.relayout([o], _), this.state = p.Idle, r || "number" == typeof t || "distribute" !== t.type || this.distributeViewSizes()
- }, t.prototype.relayout = function (e, t) {
- var n = this.viewItems.reduce((function (e, t) {
- return e + t.size
- }), 0);
- this.resize(this.viewItems.length - 1, this.size - n, void 0, e, t), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions()
- }, t.prototype.resize = function (e, t, n, i, o, r, s, a, d) {
- var c = this;
- if (void 0 === n && (n = this.viewItems.map((function (e) {
- return e.size
- }))), void 0 === r && (r = Number.NEGATIVE_INFINITY), void 0 === s && (s = Number.POSITIVE_INFINITY), e < 0 || e >= this.viewItems.length) return 0
- ;
- var h = u.range(e, -1), p = u.range(e + 1, this.viewItems.length);
- if (o) for (var g = 0, f = o; g < f.length; g++) {
- var m = f[g];
- u.pushToStart(h, m), u.pushToStart(p, m)
- }
- if (i) for (var v = 0, _ = i; v < _.length; v++) {
- var y = _[v];
- u.pushToEnd(h, y), u.pushToEnd(p, y)
- }
- var C = h.map((function (e) {
- return c.viewItems[e]
- })), b = h.map((function (e) {
- return n[e]
- })), S = p.map((function (e) {
- return c.viewItems[e]
- })), w = p.map((function (e) {
- return n[e]
- })), E = h.reduce((function (e, t) {
- return e + (c.viewItems[t].minimumSize - n[t])
- }), 0), L = h.reduce((function (e, t) {
- return e + (c.viewItems[t].maximumSize - n[t])
- }), 0), D = 0 === p.length ? Number.POSITIVE_INFINITY : p.reduce((function (e, t) {
- return e + (n[t] - c.viewItems[t].minimumSize)
- }), 0), N = 0 === p.length ? Number.NEGATIVE_INFINITY : p.reduce((function (e, t) {
- return e + (n[t] - c.viewItems[t].maximumSize)
- }), 0), x = Math.max(E, N, r), I = Math.min(D, L, s), M = !1;
- if (a) {
- var k = this.viewItems[a.index];
- M = (T = t >= a.limitDelta) !== k.visible, k.setVisible(T, a.size)
- }
- if (!M && d) {
- var T;
- k = this.viewItems[d.index];
- M = (T = t < d.limitDelta) !== k.visible, k.setVisible(T, d.size)
- }
- if (M) return this.resize(e, t, n, i, o, r, s);
- for (var R = 0, O = t = l.clamp(t, x, I); R < C.length; R++) {
- var P = C[R];
- O -= (F = l.clamp(b[R] + O, P.minimumSize, P.maximumSize)) - b[R], P.size = F
- }
- R = 0;
- for (var A = t; R < S.length; R++) {
- var F;
- P = S[R];
- A += (F = l.clamp(w[R] - A, P.minimumSize, P.maximumSize)) - w[R], P.size = F
- }
- return t
- }, t.prototype.distributeEmptySpace = function (e) {
- for (var t = this, n = this.viewItems.reduce((function (e, t) {
- return e + t.size
- }), 0), i = this.size - n, o = u.range(this.viewItems.length - 1, -1), r = o.filter((function (e) {
- return 1 === t.viewItems[e].priority
- })), s = 0, a = o.filter((function (e) {
- return 2 === t.viewItems[e].priority
- })); s < a.length; s++) {
- var d = a[s];
- u.pushToStart(o, d)
- }
- for (var c = 0, h = r; c < h.length; c++) {
- d = h[c];
- u.pushToEnd(o, d)
- }
- "number" == typeof e && u.pushToEnd(o, e);
- for (var p = 0; 0 !== i && p < o.length; p++) {
- var g = this.viewItems[o[p]], f = l.clamp(g.size + i, g.minimumSize, g.maximumSize);
- i -= f - g.size, g.size = f
- }
- }, t.prototype.layoutViews = function () {
- this.contentSize = this.viewItems.reduce((function (e, t) {
- return e + t.size
- }), 0);
- for (var e = 0, t = 0, n = this.viewItems; t < n.length; t++) {
- var i = n[t]
- ;i.layout(e, this.layoutContext), e += i.size
- }
- this.sashItems.forEach((function (e) {
- return e.sash.layout()
- })), this.updateSashEnablement()
- }, t.prototype.updateSashEnablement = function () {
- var e = !1, t = this.viewItems.map((function (t) {
- return e = t.size - t.minimumSize > 0 || e
- }));
- e = !1;
- var n = this.viewItems.map((function (t) {
- return e = t.maximumSize - t.size > 0 || e
- })), i = a(this.viewItems).reverse();
- e = !1;
- var o = i.map((function (t) {
- return e = t.size - t.minimumSize > 0 || e
- })).reverse();
- e = !1;
- for (var r = i.map((function (t) {
- return e = t.maximumSize - t.size > 0 || e
- })).reverse(), s = 0, l = 0; l < this.sashItems.length; l++) {
- var d = this.sashItems[l].sash;
- s += this.viewItems[l].size;
- var c = !(t[l] && r[l + 1]), h = !(n[l] && o[l + 1]);
- if (c && h) {
- var p = u.range(l, -1), g = u.range(l + 1, this.viewItems.length),
- f = this.findFirstSnapIndex(p), m = this.findFirstSnapIndex(g),
- v = "number" == typeof f && !this.viewItems[f].visible,
- _ = "number" == typeof m && !this.viewItems[m].visible;
- v && o[l] && (s > 0 || this.startSnappingEnabled) ? d.state = 1 : _ && t[l] && (s < this.contentSize || this.endSnappingEnabled) ? d.state = 2 : d.state = 0
- } else d.state = c && !h ? 1 : !c && h ? 2 : 3
- }
- }, t.prototype.getSashPosition = function (e) {
- for (var t = 0, n = 0; n < this.sashItems.length; n++) if (t += this.viewItems[n].size, this.sashItems[n].sash === e) return Math.min(t, this.contentSize - 2);
- return 0
- }, t.prototype.findFirstSnapIndex = function (e) {
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t];
- if ((s = this.viewItems[i]).visible && s.snap) return i
- }
- for (var o = 0, r = e; o < r.length; o++) {
- var s;
- i = r[o];
- if ((s = this.viewItems[i]).visible && s.maximumSize - s.minimumSize > 0) return;
- if (!s.visible && s.snap) return i
- }
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.viewItems.forEach((function (e) {
- return e.dispose()
- })), this.viewItems = [], this.sashItems.forEach((function (e) {
- return e.disposable.dispose()
- })), this.sashItems = []
- }, t
- }(n.Disposable);
- t.SplitView = _
- })), define(n[280], i([9]), {}), define(n[281], i([9]), {}), define(n[282], i([9]), {}), define(n[283], i([0, 1, 137, 256, 277, 4, 27, 31, 282]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function (e, t, i) {
- if (void 0 === i && (i = {}),
- this.tree = e, this.configuration = t, this.options = i, !t.dataSource) throw new Error("You must provide a Data Source to the tree.");
- this.dataSource = t.dataSource, this.renderer = t.renderer, this.controller = t.controller || new n.DefaultController({
- clickBehavior: 1,
- keyboardSupport: "boolean" != typeof i.keyboardSupport || i.keyboardSupport
- }), this.dnd = t.dnd || new n.DefaultDragAndDrop, this.filter = t.filter || new n.DefaultFilter, this.sorter = t.sorter, this.accessibilityProvider = t.accessibilityProvider || new n.DefaultAccessibilityProvider, this.styler = t.styler
- };
- t.TreeContext = l;
- var u = {
- listFocusBackground: s.Color.fromHex("#073655"),
- listActiveSelectionBackground: s.Color.fromHex("#0E639C"),
- listActiveSelectionForeground: s.Color.fromHex("#FFFFFF"),
- listFocusAndSelectionBackground: s.Color.fromHex("#094771"),
- listFocusAndSelectionForeground: s.Color.fromHex("#FFFFFF"),
- listInactiveSelectionBackground: s.Color.fromHex("#3F3F46"),
- listHoverBackground: s.Color.fromHex("#2A2D2E"),
- listDropBackground: s.Color.fromHex("#383B3D")
- }, d = function () {
- function e(e, t, n) {
- void 0 === n && (n = {}), this._onDidChangeFocus = new r.Relay, this.onDidChangeFocus = this._onDidChangeFocus.event, this._onDidChangeSelection = new r.Relay, this.onDidChangeSelection = this._onDidChangeSelection.event, this._onHighlightChange = new r.Relay, this._onDidExpandItem = new r.Relay, this._onDidCollapseItem = new r.Relay, this._onDispose = new r.Emitter, this.onDidDispose = this._onDispose.event, this.container = e, a.mixin(n, u, !1), n.twistiePixels = "number" == typeof n.twistiePixels ? n.twistiePixels : 32, n.showTwistie = !1 !== n.showTwistie, n.indentPixels = "number" == typeof n.indentPixels ? n.indentPixels : 12, n.alwaysFocused = !0 === n.alwaysFocused, n.useShadows = !1 !== n.useShadows, n.paddingOnRow = !1 !== n.paddingOnRow, n.showLoading = !1 !== n.showLoading, this.context = new l(this, t, n), this.model = new i.TreeModel(this.context), this.view = new o.TreeView(this.context, this.container), this.view.setModel(this.model), this._onDidChangeFocus.input = this.model.onDidFocus, this._onDidChangeSelection.input = this.model.onDidSelect,
- this._onHighlightChange.input = this.model.onDidHighlight, this._onDidExpandItem.input = this.model.onDidExpandItem, this._onDidCollapseItem.input = this.model.onDidCollapseItem
- }
- return e.prototype.style = function (e) {
- this.view.applyStyles(e)
- }, Object.defineProperty(e.prototype, "onDidFocus", {
- get: function () {
- return this.view.onDOMFocus
- }, enumerable: !0, configurable: !0
- }), e.prototype.getHTMLElement = function () {
- return this.view.getHTMLElement()
- }, e.prototype.layout = function (e, t) {
- this.view.layout(e, t)
- }, e.prototype.domFocus = function () {
- this.view.focus()
- }, e.prototype.isDOMFocused = function () {
- return this.view.isFocused()
- }, e.prototype.domBlur = function () {
- this.view.blur()
- }, e.prototype.setInput = function (e) {
- return this.model.setInput(e)
- }, e.prototype.getInput = function () {
- return this.model.getInput()
- }, e.prototype.expand = function (e) {
- return this.model.expand(e)
- }, e.prototype.collapse = function (e, t) {
- return void 0 === t && (t = !1), this.model.collapse(e, t)
- }, e.prototype.toggleExpansion = function (e, t) {
- return void 0 === t && (t = !1), this.model.toggleExpansion(e, t)
- }, e.prototype.isExpanded = function (e) {
- return this.model.isExpanded(e)
- }, e.prototype.reveal = function (e, t) {
- return void 0 === t && (t = null), this.model.reveal(e, t)
- }, e.prototype.getHighlight = function () {
- return this.model.getHighlight()
- }, e.prototype.clearHighlight = function (e) {
- this.model.setHighlight(null, e)
- }, e.prototype.setSelection = function (e, t) {
- this.model.setSelection(e, t)
- }, e.prototype.getSelection = function () {
- return this.model.getSelection()
- }, e.prototype.clearSelection = function (e) {
- this.model.setSelection([], e)
- }, e.prototype.setFocus = function (e, t) {
- this.model.setFocus(e, t)
- }, e.prototype.getFocus = function () {
- return this.model.getFocus()
- }, e.prototype.focusNext = function (e, t) {
- this.model.focusNext(e, t)
- }, e.prototype.focusPrevious = function (e, t) {
- this.model.focusPrevious(e, t)
- }, e.prototype.focusParent = function (e) {
- this.model.focusParent(e)
- }, e.prototype.focusFirstChild = function (e) {
- this.model.focusFirstChild(e)
- }, e.prototype.focusFirst = function (e, t) {
- this.model.focusFirst(e, t)
- }, e.prototype.focusNth = function (e, t) {
- this.model.focusNth(e, t)
- },
- e.prototype.focusLast = function (e, t) {
- this.model.focusLast(e, t)
- }, e.prototype.focusNextPage = function (e) {
- this.view.focusNextPage(e)
- }, e.prototype.focusPreviousPage = function (e) {
- this.view.focusPreviousPage(e)
- }, e.prototype.clearFocus = function (e) {
- this.model.setFocus(null, e)
- }, e.prototype.dispose = function () {
- this._onDispose.fire(), this.model.dispose(), this.view.dispose(), this._onDidChangeFocus.dispose(), this._onDidChangeSelection.dispose(), this._onHighlightChange.dispose(), this._onDidExpandItem.dispose(), this._onDidCollapseItem.dispose(), this._onDispose.dispose()
- }, e
- }();
- t.Tree = d
- })), define(n[284], i([9]), {}), define(n[285], i([9]), {}), define(n[286], i([9]), {}), define(n[287], i([9]), {}), define(n[288], i([9]), {}), define(n[289], i([9]), {}), define(n[290], i([9]), {}), define(n[291], i([9]), {}), define(n[292], i([9]), {}), define(n[293], i([9]), {}), define(n[294], i([9]), {}), define(n[295], i([9]), {}), define(n[296], i([9]), {}), define(n[297], i([9]), {}), define(n[298], i([9]), {}), define(n[299], i([9]), {}), define(n[300], i([9]), {}),
- define(n[301], i([9]), {}), define(n[302], i([9]), {}), define(n[303], i([9]), {}), define(n[304], i([9]), {}), define(n[305], i([9]), {}), define(n[306], i([9]), {}), define(n[307], i([9]), {}), define(n[308], i([9]), {}), define(n[309], i([9]), {}), define(n[310], i([9]), {}), define(n[311], i([9]), {}), define(n[312], i([9]), {}), define(n[313], i([9]), {}), define(n[314], i([9]), {}), define(n[315], i([9]), {}), define(n[316], i([9]), {}), define(n[317], i([9]), {}), define(n[318], i([9]), {}), define(n[319], i([9]), {}), define(n[320], i([9]), {}), define(n[321], i([9]), {}), define(n[322], i([9]), {}), define(n[323], i([9]), {}), define(n[324], i([9]), {}), define(n[325], i([9]), {}), define(n[326], i([9]), {}), define(n[327], i([9]), {}), define(n[328], i([9]), {}), define(n[329], i([9]), {}), define(n[330], i([9]), {}), define(n[331], i([9]), {}), define(n[332], i([9]), {}), define(n[333], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t) {
- this.chr = e, this.type = t, this.width = 0
- }
- return e.prototype.fulfill = function (e) {
- this.width = e
- }, e
- }();
- t.CharWidthRequest = n;
- var i = function () {
- function e(e, t) {
- this._bareFontInfo = e, this._requests = t, this._container = null, this._testElements = null
- }
- return e.prototype.read = function () {
- this._createDomElements(), document.body.appendChild(this._container), this._readFromDomElements(), document.body.removeChild(this._container), this._container = null, this._testElements = null
- }, e.prototype._createDomElements = function () {
- var t = document.createElement("div");
- t.style.position = "absolute", t.style.top = "-50000px", t.style.width = "50000px";
- var n = document.createElement("div");
- n.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), n.style.fontWeight = this._bareFontInfo.fontWeight, n.style.fontSize = this._bareFontInfo.fontSize + "px", n.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, n.style.lineHeight = this._bareFontInfo.lineHeight + "px", n.style.letterSpacing = this._bareFontInfo.letterSpacing + "px", t.appendChild(n);
- var i = document.createElement("div");
- i.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(),
- i.style.fontWeight = "bold", i.style.fontSize = this._bareFontInfo.fontSize + "px", i.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, i.style.lineHeight = this._bareFontInfo.lineHeight + "px", i.style.letterSpacing = this._bareFontInfo.letterSpacing + "px", t.appendChild(i);
- var o = document.createElement("div");
- o.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), o.style.fontWeight = this._bareFontInfo.fontWeight, o.style.fontSize = this._bareFontInfo.fontSize + "px", o.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, o.style.lineHeight = this._bareFontInfo.lineHeight + "px", o.style.letterSpacing = this._bareFontInfo.letterSpacing + "px", o.style.fontStyle = "italic", t.appendChild(o);
- for (var r = [], s = 0, a = this._requests; s < a.length; s++) {
- var l = a[s], u = void 0;
- 0 === l.type && (u = n), 2 === l.type && (u = i), 1 === l.type && (u = o), u.appendChild(document.createElement("br"));
- var d = document.createElement("span");
- e._render(d, l), u.appendChild(d), r.push(d)
- }
- this._container = t, this._testElements = r
- }, e._render = function (e, t) {
- if (" " === t.chr) {
- for (var n = " ", i = 0; i < 8; i++) n += n;
- e.innerHTML = n
- } else {
- var o = t.chr;
- for (i = 0; i < 8; i++) o += o;
- e.textContent = o
- }
- }, e.prototype._readFromDomElements = function () {
- for (var e = 0, t = this._requests.length; e < t; e++) {
- var n = this._requests[e], i = this._testElements[e];
- n.fulfill(i.offsetWidth / 256)
- }
- }, e
- }();
- t.readCharWidths = function (e, t) {
- new i(e, t).read()
- }
- })), define(n[185], i([0, 1, 2, 6]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o.referenceDomElement = t, o.changeCallback = i, o.width = -1, o.height = -1, o.mutationObserver = null, o.windowSizeListener = null, o.measureReferenceDomElement(!1, n), o
- }
- return r(t, e), t.prototype.dispose = function () {
- this.stopObserving(), e.prototype.dispose.call(this)
- }, t.prototype.getWidth = function () {
- return this.width
- }, t.prototype.getHeight = function () {
- return this.height
- }, t.prototype.startObserving = function () {
- var e = this;
- !this.mutationObserver && this.referenceDomElement && (this.mutationObserver = new MutationObserver((function () {
- return e._onDidMutate()
- })), this.mutationObserver.observe(this.referenceDomElement, {attributes: !0})), this.windowSizeListener || (this.windowSizeListener = i.addDisposableListener(window, "resize", (function () {
- return e._onDidResizeWindow()
- })))
- }, t.prototype.stopObserving = function () {
- this.mutationObserver && (this.mutationObserver.disconnect(), this.mutationObserver = null), this.windowSizeListener && (this.windowSizeListener.dispose(), this.windowSizeListener = null)
- }, t.prototype.observe = function (e) {
- this.measureReferenceDomElement(!0, e)
- }, t.prototype._onDidMutate = function () {
- this.measureReferenceDomElement(!0)
- }, t.prototype._onDidResizeWindow = function () {
- this.measureReferenceDomElement(!0)
- }, t.prototype.measureReferenceDomElement = function (e, t) {
- var n = 0, i = 0;
- t ? (n = t.width, i = t.height) : this.referenceDomElement && (n = this.referenceDomElement.clientWidth, i = this.referenceDomElement.clientHeight), n = Math.max(5, n), i = Math.max(5, i), this.width === n && this.height === i || (this.width = n, this.height = i, e && this.changeCallback())
- }, t
- }(n.Disposable)
- ;t.ElementSizeObserver = o
- })), define(n[141], i([0, 1, 6, 78, 45, 2]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e, t) {
- this.x = e, this.y = t
- }
- return e.prototype.toClientCoordinates = function () {
- return new l(this.x - n.StandardWindow.scrollX, this.y - n.StandardWindow.scrollY)
- }, e
- }();
- t.PageCoordinates = a;
- var l = function () {
- function e(e, t) {
- this.clientX = e, this.clientY = t
- }
- return e.prototype.toPageCoordinates = function () {
- return new a(this.clientX + n.StandardWindow.scrollX, this.clientY + n.StandardWindow.scrollY)
- }, e
- }();
- t.ClientCoordinates = l;
- var u = function (e, t, n, i) {
- this.x = e, this.y = t, this.width = n, this.height = i
- };
- function d(e) {
- var t = n.getDomNodePagePosition(e);
- return new u(t.left, t.top, t.width, t.height)
- }
- t.EditorPagePosition = u, t.createEditorPagePosition = d;
- var c = function (e) {
- function t(t, n) {
- var i = e.call(this, t) || this;
- return i.pos = new a(i.posx, i.posy), i.editorPos = d(n), i
- }
- return r(t, e), t
- }(o.StandardMouseEvent);
- t.EditorMouseEvent = c;
- var h = function () {
- function e(e) {
- this._editorViewDomNode = e
- }
- return e.prototype._create = function (e) {
- return new c(e, this._editorViewDomNode)
- }, e.prototype.onContextMenu = function (e, t) {
- var i = this;
- return n.addDisposableListener(e, "contextmenu", (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onMouseUp = function (e, t) {
- var i = this;
- return n.addDisposableListener(e, "mouseup", (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onMouseDown = function (e, t) {
- var i = this;
- return n.addDisposableListener(e, "mousedown", (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onMouseLeave = function (e, t) {
- var i = this;
- return n.addDisposableNonBubblingMouseOutListener(e, (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onMouseMoveThrottled = function (e, t, i, o) {
- var r = this;
- return n.addDisposableThrottledListener(e, "mousemove", t, (function (e, t) {
- return i(e, r._create(t))
- }), o)
- }, e
- }();
- t.EditorMouseEventFactory = h;
- var p = function () {
- function e(e) {
- this._editorViewDomNode = e
- }
- return e.prototype._create = function (e) {
- return new c(e, this._editorViewDomNode)
- }, e.prototype.onPointerUp = function (e, t) {
- var i = this
- ;
- return n.addDisposableListener(e, "pointerup", (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onPointerDown = function (e, t) {
- var i = this;
- return n.addDisposableListener(e, "pointerdown", (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onPointerLeave = function (e, t) {
- var i = this;
- return n.addDisposableNonBubblingPointerOutListener(e, (function (e) {
- t(i._create(e))
- }))
- }, e.prototype.onPointerMoveThrottled = function (e, t, i, o) {
- var r = this;
- return n.addDisposableThrottledListener(e, "pointermove", t, (function (e, t) {
- return i(e, r._create(t))
- }), o)
- }, e
- }();
- t.EditorPointerEventFactory = p;
- var g = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._editorViewDomNode = t, n._globalMouseMoveMonitor = n._register(new i.GlobalMouseMoveMonitor), n._keydownListener = null, n
- }
- return r(t, e), t.prototype.startMonitoring = function (e, t, i, o, r) {
- var s = this;
- this._keydownListener = n.addStandardDisposableListener(document, "keydown", (function (e) {
- e.toKeybinding().isModifierKey() || s._globalMouseMoveMonitor.stopMonitoring(!0)
- }), !0)
- ;this._globalMouseMoveMonitor.startMonitoring(e, t, (function (e, t) {
- return i(e, new c(t, s._editorViewDomNode))
- }), o, (function () {
- s._keydownListener.dispose(), r()
- }))
- }, t
- }(s.Disposable);
- t.GlobalEditorMouseMoveMonitor = g
- })), define(n[334], i([0, 1, 4, 2]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._onCodeEditorAdd = t._register(new n.Emitter), t.onCodeEditorAdd = t._onCodeEditorAdd.event, t._onCodeEditorRemove = t._register(new n.Emitter), t.onCodeEditorRemove = t._onCodeEditorRemove.event, t._onDiffEditorAdd = t._register(new n.Emitter), t._onDiffEditorRemove = t._register(new n.Emitter), t._codeEditors = Object.create(null), t._diffEditors = Object.create(null), t
- }
- return r(t, e), t.prototype.addCodeEditor = function (e) {
- this._codeEditors[e.getId()] = e, this._onCodeEditorAdd.fire(e)
- }, t.prototype.removeCodeEditor = function (e) {
- delete this._codeEditors[e.getId()] && this._onCodeEditorRemove.fire(e)
- }, t.prototype.listCodeEditors = function () {
- var e = this
- ;
- return Object.keys(this._codeEditors).map((function (t) {
- return e._codeEditors[t]
- }))
- }, t.prototype.addDiffEditor = function (e) {
- this._diffEditors[e.getId()] = e, this._onDiffEditorAdd.fire(e)
- }, t.prototype.removeDiffEditor = function (e) {
- delete this._diffEditors[e.getId()] && this._onDiffEditorRemove.fire(e)
- }, t.prototype.listDiffEditors = function () {
- var e = this;
- return Object.keys(this._diffEditors).map((function (t) {
- return e._diffEditors[t]
- }))
- }, t.prototype.getFocusedCodeEditor = function () {
- for (var e = null, t = 0, n = this.listCodeEditors(); t < n.length; t++) {
- var i = n[t];
- if (i.hasTextFocus()) return i;
- i.hasWidgetFocus() && (e = i)
- }
- return e
- }, t
- }(i.Disposable);
- t.AbstractCodeEditorService = o
- })), define(n[186], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.allCharCodes = function () {
- for (var e = [], t = 32; t <= 126; t++) e.push(t);
- return e.push(65533), e
- }(), t.getCharIndex = function (e, t) {
- return (e -= 32) < 0 || e > 96 ? t <= 2 ? (e + 96) % 96 : 95 : e
- }
- })), define(n[335], i([0, 1, 186]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var i = function () {
- function e(t, n) {
- this.scale = n, this.charDataNormal = e.soften(t, .8), this.charDataLight = e.soften(t, 50 / 60)
- }
- return e.soften = function (e, t) {
- for (var n = new Uint8ClampedArray(e.length), i = 0, o = e.length; i < o; i++) n[i] = e[i] * t;
- return n
- }, e.prototype.renderChar = function (e, t, i, o, r, s, a, l) {
- var u = 1 * this.scale, d = 2 * this.scale;
- if (t + u > e.width || i + d > e.height) console.warn("bad render request outside image data"); else for (var c = l ? this.charDataLight : this.charDataNormal, h = n.getCharIndex(o, a), p = 4 * e.width, g = s.r, f = s.g, m = s.b, v = r.r - g, _ = r.g - f, y = r.b - m, C = e.data, b = h * u * d, S = i * p + 4 * t, w = 0; w < d; w++) {
- for (var E = S, L = 0; L < u; L++) {
- var D = c[b++] / 255;
- C[E++] = g + v * D, C[E++] = f + _ * D, C[E++] = m + y * D, E++
- }
- S += p
- }
- }, e.prototype.blockRenderChar = function (e, t, n, i, o, r) {
- var s = 1 * this.scale, a = 2 * this.scale;
- if (t + s > e.width || n + a > e.height) console.warn("bad render request outside image data"); else for (var l = 4 * e.width, u = o.r, d = o.g, c = o.b, h = u + .5 * (i.r - u), p = d + .5 * (i.g - d), g = c + .5 * (i.b - c), f = e.data, m = n * l + 4 * t, v = 0; v < a; v++) {
- for (var _ = m, y = 0; y < s; y++) f[_++] = h, f[_++] = p, f[_++] = g, _++;
- m += l
- }
- }, e
- }();
- t.MinimapCharRenderer = i
- })), define(n[336], i([0, 1, 102]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15},
- o = function (e) {
- for (var t = new Uint8ClampedArray(e.length / 2), n = 0; n < e.length; n += 2) t[n >> 1] = i[e[n]] << 4 | 15 & i[e[n + 1]];
- return t
- };
- t.prebakedMiniMaps = {
- 1: n.once((function () {
- return o("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")
- })), 2: n.once((function () {
- return o("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")
- }))
- }
- })), define(n[337], i([0, 1, 335, 186, 336]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e() {
- }
- return e.create = function (t, i) {
- return this.lastCreated && t === this.lastCreated.scale && i === this.lastFontFamily ? this.lastCreated : (r = o.prebakedMiniMaps[t] ? new n.MinimapCharRenderer(o.prebakedMiniMaps[t](), t) : e.createFromSampleData(e.createSampleData(i).data, t), this.lastFontFamily = i, this.lastCreated = r, r);
- var r
- }, e.createSampleData = function (e) {
- var t = document.createElement("canvas"), n = t.getContext("2d");
- t.style.height = "16px", t.height = 16, t.width = 960, t.style.width = "960px", n.fillStyle = "#ffffff", n.font = "bold 16px " + e, n.textBaseline = "middle";
- for (var o = 0, r = 0, s = i.allCharCodes; r < s.length; r++) {
- var a = s[r];
- n.fillText(String.fromCharCode(a), o, 8), o += 10
- }
- return n.getImageData(0, 0, 960, 16)
- }, e.createFromSampleData = function (t, i) {
- if (61440 !== t.length) throw new Error("Unexpected source in MinimapCharRenderer");
- var o = e._downsample(t, i);
- return new n.MinimapCharRenderer(o, i)
- },
- e._downsampleChar = function (e, t, n, i, o) {
- for (var r = 1 * o, s = 2 * o, a = i, l = 0, u = 0; u < s; u++) for (var d = u / s * 16, c = (u + 1) / s * 16, h = 0; h < r; h++) {
- for (var p = h / r * 10, g = (h + 1) / r * 10, f = 0, m = 0, v = d; v < c; v++) for (var _ = t + 3840 * Math.floor(v), y = 1 - (v - Math.floor(v)), C = p; C < g; C++) {
- var b = 1 - (C - Math.floor(C)), S = _ + 4 * Math.floor(C), w = b * y;
- m += w, f += e[S] * e[S + 3] / 255 * w
- }
- var E = f / m;
- l = Math.max(l, E), n[a++] = E
- }
- return l
- }, e._downsample = function (e, t) {
- for (var n = 2 * t * 1 * t, i = 96 * n, o = new Uint8ClampedArray(i), r = 0, s = 0, a = 0, l = 0; l < 96; l++) a = Math.max(a, this._downsampleChar(e, s, o, r, t)), r += n, s += 40;
- if (a > 0) for (var u = 255 / a, d = 0; d < i; d++) o[d] *= u;
- return o
- }, e
- }();
- t.MinimapCharRendererFactory = r
- })), define(n[105], i([0, 1, 4]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.EditorZoom = new (function () {
- function e() {
- this._zoomLevel = 0, this._onDidChangeZoomLevel = new n.Emitter, this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event
- }
- return e.prototype.getZoomLevel = function () {
- return this._zoomLevel
- }, e.prototype.setZoomLevel = function (e) {
- e = Math.min(Math.max(-5, e), 20),
- this._zoomLevel !== e && (this._zoomLevel = e, this._onDidChangeZoomLevel.fire(this._zoomLevel))
- }, e
- }())
- })), define(n[142], i([0, 1, 16, 105]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = n.isMacintosh ? 1.5 : 1.35, s = function () {
- function e(e) {
- this.zoomLevel = e.zoomLevel, this.fontFamily = String(e.fontFamily), this.fontWeight = String(e.fontWeight), this.fontSize = e.fontSize, this.fontFeatureSettings = e.fontFeatureSettings, this.lineHeight = 0 | e.lineHeight, this.letterSpacing = e.letterSpacing
- }
- return e.createFromValidatedSettings = function (t, n, i) {
- var o = t.get(33), r = t.get(37), s = t.get(36), a = t.get(35), l = t.get(49), u = t.get(46);
- return e._create(o, r, s, a, l, u, n, i)
- }, e._create = function (t, n, r, s, a, l, u, d) {
- 0 === a ? a = Math.round(o * r) : a < 8 && (a = 8);
- var c = 1 + (d ? 0 : .1 * i.EditorZoom.getZoomLevel());
- return new e({
- zoomLevel: u,
- fontFamily: t,
- fontWeight: n,
- fontSize: r *= c,
- fontFeatureSettings: s,
- lineHeight: a *= c,
- letterSpacing: l
- })
- }, e.prototype.getId = function () {
- return this.zoomLevel + "-" + this.fontFamily + "-" + this.fontWeight + "-" + this.fontSize + "-" + this.fontFeatureSettings + "-" + this.lineHeight + "-" + this.letterSpacing
- }, e.prototype.getMassagedFontFamily = function () {
- return /[,"']/.test(this.fontFamily) ? this.fontFamily : /[+ ]/.test(this.fontFamily) ? '"' + this.fontFamily + '"' : this.fontFamily
- }, e
- }();
- t.BareFontInfo = s;
- var a = function (e) {
- function t(t, n) {
- var i = e.call(this, t) || this;
- return i.isTrusted = n, i.isMonospace = t.isMonospace, i.typicalHalfwidthCharacterWidth = t.typicalHalfwidthCharacterWidth, i.typicalFullwidthCharacterWidth = t.typicalFullwidthCharacterWidth, i.canUseHalfwidthRightwardsArrow = t.canUseHalfwidthRightwardsArrow, i.spaceWidth = t.spaceWidth, i.middotWidth = t.middotWidth, i.maxDigitWidth = t.maxDigitWidth, i
- }
- return r(t, e), t.prototype.equals = function (e) {
- return this.fontFamily === e.fontFamily && this.fontWeight === e.fontWeight && this.fontSize === e.fontSize && this.fontFeatureSettings === e.fontFeatureSettings && this.lineHeight === e.lineHeight && this.letterSpacing === e.letterSpacing && this.typicalHalfwidthCharacterWidth === e.typicalHalfwidthCharacterWidth && this.typicalFullwidthCharacterWidth === e.typicalFullwidthCharacterWidth && this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && this.spaceWidth === e.spaceWidth && this.middotWidth === e.middotWidth && this.maxDigitWidth === e.maxDigitWidth
- }, t
- }(s);
- t.FontInfo = a
- })), define(n[79], i([0, 1, 179]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(t) {
- var i = n.toUint8(t);
- this._defaultValue = i, this._asciiMap = e._createAsciiMap(i), this._map = new Map
- }
- return e._createAsciiMap = function (e) {
- for (var t = new Uint8Array(256), n = 0; n < 256; n++) t[n] = e;
- return t
- }, e.prototype.set = function (e, t) {
- var i = n.toUint8(t);
- e >= 0 && e < 256 ? this._asciiMap[e] = i : this._map.set(e, i)
- }, e.prototype.get = function (e) {
- return e >= 0 && e < 256 ? this._asciiMap[e] : this._map.get(e) || this._defaultValue
- }, e
- }();
- t.CharacterClassifier = i;
- var o = function () {
- function e() {
- this._actual = new i(0)
- }
- return e.prototype.add = function (e) {
- this._actual.set(e, 1)
- }, e.prototype.has = function (e) {
- return 1 === this._actual.get(e)
- }, e
- }();
- t.CharacterSet = o
- })), define(n[89], i([0, 1, 79]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i, o, s = function (e) {
- function t(t) {
- for (var n = e.call(this, 0) || this, i = 0, o = t.length; i < o; i++) n.set(t.charCodeAt(i), 2);
- return n.set(32, 1), n.set(9, 1), n
- }
- return r(t, e), t
- }(n.CharacterClassifier);
- t.WordCharacterClassifier = s, t.getMapForWordSeparators = (i = function (e) {
- return new s(e)
- }, o = {}, function (e) {
- return o.hasOwnProperty(e) || (o[e] = i(e)), o[e]
- })
- })), define(n[13], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t) {
- this.lineNumber = e, this.column = t
- }
- return e.prototype.with = function (t, n) {
- return void 0 === t && (t = this.lineNumber), void 0 === n && (n = this.column),
- t === this.lineNumber && n === this.column ? this : new e(t, n)
- }, e.prototype.delta = function (e, t) {
- return void 0 === e && (e = 0), void 0 === t && (t = 0), this.with(this.lineNumber + e, this.column + t)
- }, e.prototype.equals = function (t) {
- return e.equals(this, t)
- }, e.equals = function (e, t) {
- return !e && !t || !!e && !!t && e.lineNumber === t.lineNumber && e.column === t.column
- }, e.prototype.isBefore = function (t) {
- return e.isBefore(this, t)
- }, e.isBefore = function (e, t) {
- return e.lineNumber < t.lineNumber || !(t.lineNumber < e.lineNumber) && e.column < t.column
- }, e.prototype.isBeforeOrEqual = function (t) {
- return e.isBeforeOrEqual(this, t)
- }, e.isBeforeOrEqual = function (e, t) {
- return e.lineNumber < t.lineNumber || !(t.lineNumber < e.lineNumber) && e.column <= t.column
- }, e.compare = function (e, t) {
- var n = 0 | e.lineNumber, i = 0 | t.lineNumber;
- return n === i ? (0 | e.column) - (0 | t.column) : n - i
- }, e.prototype.clone = function () {
- return new e(this.lineNumber, this.column)
- }, e.prototype.toString = function () {
- return "(" + this.lineNumber + "," + this.column + ")"
- }, e.lift = function (t) {
- return new e(t.lineNumber, t.column)
- }, e.isIPosition = function (e) {
- return e && "number" == typeof e.lineNumber && "number" == typeof e.column
- }, e
- }();
- t.Position = n
- })), define(n[3], i([0, 1, 13]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n, i) {
- e > n || e === n && t > i ? (this.startLineNumber = n, this.startColumn = i, this.endLineNumber = e, this.endColumn = t) : (this.startLineNumber = e, this.startColumn = t, this.endLineNumber = n, this.endColumn = i)
- }
- return e.prototype.isEmpty = function () {
- return e.isEmpty(this)
- }, e.isEmpty = function (e) {
- return e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn
- }, e.prototype.containsPosition = function (t) {
- return e.containsPosition(this, t)
- }, e.containsPosition = function (e, t) {
- return !(t.lineNumber < e.startLineNumber || t.lineNumber > e.endLineNumber) && (!(t.lineNumber === e.startLineNumber && t.column < e.startColumn) && !(t.lineNumber === e.endLineNumber && t.column > e.endColumn))
- }, e.prototype.containsRange = function (t) {
- return e.containsRange(this, t)
- }, e.containsRange = function (e, t) {
- return !(t.startLineNumber < e.startLineNumber || t.endLineNumber < e.startLineNumber) && (!(t.startLineNumber > e.endLineNumber || t.endLineNumber > e.endLineNumber) && (!(t.startLineNumber === e.startLineNumber && t.startColumn < e.startColumn) && !(t.endLineNumber === e.endLineNumber && t.endColumn > e.endColumn)))
- }, e.prototype.strictContainsRange = function (t) {
- return e.strictContainsRange(this, t)
- }, e.strictContainsRange = function (e, t) {
- return !(t.startLineNumber < e.startLineNumber || t.endLineNumber < e.startLineNumber) && (!(t.startLineNumber > e.endLineNumber || t.endLineNumber > e.endLineNumber) && (!(t.startLineNumber === e.startLineNumber && t.startColumn <= e.startColumn) && !(t.endLineNumber === e.endLineNumber && t.endColumn >= e.endColumn)))
- }, e.prototype.plusRange = function (t) {
- return e.plusRange(this, t)
- }, e.plusRange = function (t, n) {
- var i, o, r, s;
- return n.startLineNumber < t.startLineNumber ? (i = n.startLineNumber, o = n.startColumn) : n.startLineNumber === t.startLineNumber ? (i = n.startLineNumber, o = Math.min(n.startColumn, t.startColumn)) : (i = t.startLineNumber, o = t.startColumn),
- n.endLineNumber > t.endLineNumber ? (r = n.endLineNumber, s = n.endColumn) : n.endLineNumber === t.endLineNumber ? (r = n.endLineNumber, s = Math.max(n.endColumn, t.endColumn)) : (r = t.endLineNumber, s = t.endColumn), new e(i, o, r, s)
- }, e.prototype.intersectRanges = function (t) {
- return e.intersectRanges(this, t)
- }, e.intersectRanges = function (t, n) {
- var i = t.startLineNumber, o = t.startColumn, r = t.endLineNumber, s = t.endColumn,
- a = n.startLineNumber, l = n.startColumn, u = n.endLineNumber, d = n.endColumn;
- return i < a ? (i = a, o = l) : i === a && (o = Math.max(o, l)), r > u ? (r = u, s = d) : r === u && (s = Math.min(s, d)), i > r ? null : i === r && o > s ? null : new e(i, o, r, s)
- }, e.prototype.equalsRange = function (t) {
- return e.equalsRange(this, t)
- }, e.equalsRange = function (e, t) {
- return !!e && !!t && e.startLineNumber === t.startLineNumber && e.startColumn === t.startColumn && e.endLineNumber === t.endLineNumber && e.endColumn === t.endColumn
- }, e.prototype.getEndPosition = function () {
- return new n.Position(this.endLineNumber, this.endColumn)
- }, e.prototype.getStartPosition = function () {
- return new n.Position(this.startLineNumber, this.startColumn)
- },
- e.prototype.toString = function () {
- return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"
- }, e.prototype.setEndPosition = function (t, n) {
- return new e(this.startLineNumber, this.startColumn, t, n)
- }, e.prototype.setStartPosition = function (t, n) {
- return new e(t, n, this.endLineNumber, this.endColumn)
- }, e.prototype.collapseToStart = function () {
- return e.collapseToStart(this)
- }, e.collapseToStart = function (t) {
- return new e(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn)
- }, e.fromPositions = function (t, n) {
- return void 0 === n && (n = t), new e(t.lineNumber, t.column, n.lineNumber, n.column)
- }, e.lift = function (t) {
- return t ? new e(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : null
- }, e.isIRange = function (e) {
- return e && "number" == typeof e.startLineNumber && "number" == typeof e.startColumn && "number" == typeof e.endLineNumber && "number" == typeof e.endColumn
- }, e.areIntersectingOrTouching = function (e, t) {
- return !(e.endLineNumber < t.startLineNumber || e.endLineNumber === t.startLineNumber && e.endColumn < t.startColumn) && !(t.endLineNumber < e.startLineNumber || t.endLineNumber === e.startLineNumber && t.endColumn < e.startColumn)
- }, e.areIntersecting = function (e, t) {
- return !(e.endLineNumber < t.startLineNumber || e.endLineNumber === t.startLineNumber && e.endColumn <= t.startColumn) && !(t.endLineNumber < e.startLineNumber || t.endLineNumber === e.startLineNumber && t.endColumn <= e.startColumn)
- }, e.compareRangesUsingStarts = function (e, t) {
- if (e && t) {
- var n = 0 | e.startLineNumber, i = 0 | t.startLineNumber;
- if (n === i) {
- var o = 0 | e.startColumn, r = 0 | t.startColumn;
- if (o === r) {
- var s = 0 | e.endLineNumber, a = 0 | t.endLineNumber;
- return s === a ? (0 | e.endColumn) - (0 | t.endColumn) : s - a
- }
- return o - r
- }
- return n - i
- }
- return (e ? 1 : 0) - (t ? 1 : 0)
- }, e.compareRangesUsingEnds = function (e, t) {
- return e.endLineNumber === t.endLineNumber ? e.endColumn === t.endColumn ? e.startLineNumber === t.startLineNumber ? e.startColumn - t.startColumn : e.startLineNumber - t.startLineNumber : e.endColumn - t.endColumn : e.endLineNumber - t.endLineNumber
- },
- e.spansMultipleLines = function (e) {
- return e.endLineNumber > e.startLineNumber
- }, e
- }();
- t.Range = i
- })), define(n[187], i([0, 1, 5, 13, 3]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e, t, n, i, o) {
- this.value = e, this.selectionStart = t, this.selectionEnd = n, this.selectionStartPosition = i, this.selectionEndPosition = o
- }
- return e.prototype.toString = function () {
- return "[ <" + this.value + ">, selectionStart: " + this.selectionStart + ", selectionEnd: " + this.selectionEnd + "]"
- }, e.readFromTextArea = function (t) {
- return new e(t.getValue(), t.getSelectionStart(), t.getSelectionEnd(), null, null)
- }, e.prototype.collapseSelection = function () {
- return new e(this.value, this.value.length, this.value.length, null, null)
- }, e.prototype.writeToTextArea = function (e, t, n) {
- t.setValue(e, this.value), n && t.setSelectionRange(e, this.selectionStart, this.selectionEnd)
- }, e.prototype.deduceEditorPosition = function (e) {
- if (e <= this.selectionStart) {
- var t = this.value.substring(e, this.selectionStart)
- ;
- return this._finishDeduceEditorPosition(this.selectionStartPosition, t, -1)
- }
- if (e >= this.selectionEnd) {
- t = this.value.substring(this.selectionEnd, e);
- return this._finishDeduceEditorPosition(this.selectionEndPosition, t, 1)
- }
- var n = this.value.substring(this.selectionStart, e);
- if (-1 === n.indexOf(String.fromCharCode(8230))) return this._finishDeduceEditorPosition(this.selectionStartPosition, n, 1);
- var i = this.value.substring(e, this.selectionEnd);
- return this._finishDeduceEditorPosition(this.selectionEndPosition, i, -1)
- }, e.prototype._finishDeduceEditorPosition = function (e, t, n) {
- for (var i = 0, o = -1; -1 !== (o = t.indexOf("\n", o + 1));) i++;
- return [e, n * t.length, i]
- }, e.selectedText = function (t) {
- return new e(t, 0, t.length, null, null)
- }, e.deduceInput = function (e, t, i) {
- if (!e) return {text: "", replaceCharCnt: 0};
- var o = e.value, r = e.selectionStart, s = e.selectionEnd, a = t.value, l = t.selectionStart,
- u = t.selectionEnd, d = o.substring(s), c = a.substring(u), h = n.commonSuffixLength(d, c);
- a = a.substring(0, a.length - h)
- ;var p = (o = o.substring(0, o.length - h)).substring(0, r), g = a.substring(0, l),
- f = n.commonPrefixLength(p, g);
- if (a = a.substring(f), o = o.substring(f), l -= f, r -= f, u -= f, s -= f, i && l === u && o.length > 0) {
- var m = null;
- if (l === a.length ? n.startsWith(a, o) && (m = a.substring(o.length)) : n.endsWith(a, o) && (m = a.substring(0, a.length - o.length)), null !== m && m.length > 0 && (/\uFE0F/.test(m) || n.containsEmoji(m))) return {
- text: m,
- replaceCharCnt: 0
- }
- }
- return l === u ? o === a && 0 === r && s === o.length && l === a.length && -1 === a.indexOf("\n") && n.containsFullWidthCharacter(a) ? {
- text: "",
- replaceCharCnt: 0
- } : {text: a, replaceCharCnt: p.length - f} : {text: a, replaceCharCnt: s - r}
- }, e.EMPTY = new e("", 0, 0, null, null), e
- }();
- t.TextAreaState = r;
- var s = function () {
- function e() {
- }
- return e._getPageOfLine = function (e, t) {
- return Math.floor((e - 1) / t)
- }, e._getRangeForPage = function (e, t) {
- var n = e * t, i = n + 1, r = n + t;
- return new o.Range(i, 1, r + 1, 1)
- }, e.fromEditorSelection = function (t, n, s, a, l) {
- var u, d = e._getPageOfLine(s.startLineNumber, a), c = e._getRangeForPage(d, a),
- h = e._getPageOfLine(s.endLineNumber, a), p = e._getRangeForPage(h, a),
- g = c.intersectRanges(new o.Range(1, 1, s.startLineNumber, s.startColumn)),
- f = n.getValueInRange(g, 1), m = n.getLineCount(), v = n.getLineMaxColumn(m),
- _ = p.intersectRanges(new o.Range(s.endLineNumber, s.endColumn, m, v)), y = n.getValueInRange(_, 1);
- if (d === h || d + 1 === h) u = n.getValueInRange(s, 1); else {
- var C = c.intersectRanges(s), b = p.intersectRanges(s);
- u = n.getValueInRange(C, 1) + String.fromCharCode(8230) + n.getValueInRange(b, 1)
- }
- if (l) {
- f.length > 500 && (f = f.substring(f.length - 500, f.length)), y.length > 500 && (y = y.substring(0, 500)), u.length > 1e3 && (u = u.substring(0, 500) + String.fromCharCode(8230) + u.substring(u.length - 500, u.length))
- }
- return new r(f + u + y, f.length, f.length + u.length, new i.Position(s.startLineNumber, s.startColumn), new i.Position(s.endLineNumber, s.endColumn))
- }, e
- }();
- t.PagedScreenReaderStrategy = s
- })), define(n[188], i([0, 1, 124, 4, 2, 31, 3]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var l = {followsCaret: !0, ignoreCharChanges: !0, alwaysRevealFirst: !0}, u = function (e) {
- function t(t, n) {
- void 0 === n && (n = {});
- var o = e.call(this) || this;
- return o._onDidUpdate = o._register(new i.Emitter), o._editor = t, o._options = s.mixin(n, l, !1), o.disposed = !1, o.nextIdx = -1, o.ranges = [], o.ignoreSelectionChange = !1, o.revealFirst = Boolean(o._options.alwaysRevealFirst), o._register(o._editor.onDidDispose((function () {
- return o.dispose()
- }))), o._register(o._editor.onDidUpdateDiff((function () {
- return o._onDiffUpdated()
- }))), o._options.followsCaret && o._register(o._editor.getModifiedEditor().onDidChangeCursorPosition((function (e) {
- o.ignoreSelectionChange || (o.nextIdx = -1)
- }))), o._options.alwaysRevealFirst && o._register(o._editor.getModifiedEditor().onDidChangeModel((function (e) {
- o.revealFirst = !0
- }))), o._init(), o
- }
- return r(t, e), t.prototype._init = function () {
- this._editor.getLineChanges()
- }, t.prototype._onDiffUpdated = function () {
- this._init(), this._compute(this._editor.getLineChanges()),
- this.revealFirst && null !== this._editor.getLineChanges() && (this.revealFirst = !1, this.nextIdx = -1, this.next(1))
- }, t.prototype._compute = function (e) {
- var t = this;
- this.ranges = [], e && e.forEach((function (e) {
- !t._options.ignoreCharChanges && e.charChanges ? e.charChanges.forEach((function (e) {
- t.ranges.push({
- rhs: !0,
- range: new a.Range(e.modifiedStartLineNumber, e.modifiedStartColumn, e.modifiedEndLineNumber, e.modifiedEndColumn)
- })
- })) : t.ranges.push({
- rhs: !0,
- range: new a.Range(e.modifiedStartLineNumber, 1, e.modifiedStartLineNumber, 1)
- })
- })), this.ranges.sort((function (e, t) {
- return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition()) ? -1 : t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition()) ? 1 : 0
- })), this._onDidUpdate.fire(this)
- }, t.prototype._initIdx = function (e) {
- var t = !1, n = this._editor.getPosition();
- if (n) {
- for (var i = 0, o = this.ranges.length; i < o && !t; i++) {
- var r = this.ranges[i].range;
- n.isBeforeOrEqual(r.getStartPosition()) && (this.nextIdx = i + (e ? 0 : -1), t = !0)
- }
- t || (this.nextIdx = e ? 0 : this.ranges.length - 1),
- this.nextIdx < 0 && (this.nextIdx = this.ranges.length - 1)
- } else this.nextIdx = 0
- }, t.prototype._move = function (e, t) {
- if (n.ok(!this.disposed, "Illegal State - diff navigator has been disposed"), this.canNavigate()) {
- -1 === this.nextIdx ? this._initIdx(e) : e ? (this.nextIdx += 1, this.nextIdx >= this.ranges.length && (this.nextIdx = 0)) : (this.nextIdx -= 1, this.nextIdx < 0 && (this.nextIdx = this.ranges.length - 1));
- var i = this.ranges[this.nextIdx];
- this.ignoreSelectionChange = !0;
- try {
- var o = i.range.getStartPosition();
- this._editor.setPosition(o), this._editor.revealPositionInCenter(o, t)
- } finally {
- this.ignoreSelectionChange = !1
- }
- }
- }, t.prototype.canNavigate = function () {
- return this.ranges && this.ranges.length > 0
- }, t.prototype.next = function (e) {
- void 0 === e && (e = 0), this._move(!0, e)
- }, t.prototype.previous = function (e) {
- void 0 === e && (e = 0), this._move(!1, e)
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.ranges = [], this.disposed = !0
- }, t
- }(o.Disposable);
- t.DiffNavigator = u
- })), define(n[58], i([0, 1, 3]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var i = function () {
- function e() {
- }
- return e.insert = function (e, t) {
- return {
- range: new n.Range(e.lineNumber, e.column, e.lineNumber, e.column),
- text: t,
- forceMoveMarkers: !0
- }
- }, e.delete = function (e) {
- return {range: e, text: null}
- }, e.replace = function (e, t) {
- return {range: e, text: t}
- }, e.replaceMove = function (e, t) {
- return {range: e, text: t, forceMoveMarkers: !0}
- }, e
- }();
- t.EditOperation = i
- })), define(n[338], i([0, 1, 5, 58, 3]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e, t) {
- this._selection = e, this._cursors = t, this._selectionId = null
- }
- return e.prototype.getEditOperations = function (e, t) {
- for (var n = s(e, this._cursors), i = 0, o = n.length; i < o; i++) {
- var r = n[i];
- t.addEditOperation(r.range, r.text)
- }
- this._selectionId = t.trackSelection(this._selection)
- }, e.prototype.computeCursorState = function (e, t) {
- return t.getTrackedSelection(this._selectionId)
- }, e
- }();
- function s(e, t) {
- t.sort((function (e, t) {
- return e.lineNumber === t.lineNumber ? e.column - t.column : e.lineNumber - t.lineNumber
- }))
- ;
- for (var r = t.length - 2; r >= 0; r--) t[r].lineNumber === t[r + 1].lineNumber && t.splice(r, 1);
- for (var s = [], a = 0, l = 0, u = t.length, d = 1, c = e.getLineCount(); d <= c; d++) {
- var h = e.getLineContent(d), p = h.length + 1, g = 0;
- if (!(l < u && t[l].lineNumber === d && (g = t[l].column, l++, g === p)) && 0 !== h.length) {
- var f = n.lastNonWhitespaceIndex(h), m = 0;
- if (-1 === f) m = 1; else {
- if (f === h.length - 1) continue;
- m = f + 2
- }
- m = Math.max(g, m), s[a++] = i.EditOperation.delete(new o.Range(d, m, d, p))
- }
- }
- return s
- }
- t.TrimTrailingWhitespaceCommand = r, t.trimTrailingWhitespace = s
- })), define(n[339], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(t, n, i, o) {
- this.r = e._clamp(t), this.g = e._clamp(n), this.b = e._clamp(i), this.a = e._clamp(o)
- }
- return e._clamp = function (e) {
- return e < 0 ? 0 : e > 255 ? 255 : 0 | e
- }, e.Empty = new e(0, 0, 0, 0), e
- }();
- t.RGBA8 = n
- })), define(n[22], i([0, 1, 13, 3]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this, t, n, i, o) || this;
- return r.selectionStartLineNumber = t,
- r.selectionStartColumn = n, r.positionLineNumber = i, r.positionColumn = o, r
- }
- return r(t, e), t.prototype.toString = function () {
- return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"
- }, t.prototype.equalsSelection = function (e) {
- return t.selectionsEqual(this, e)
- }, t.selectionsEqual = function (e, t) {
- return e.selectionStartLineNumber === t.selectionStartLineNumber && e.selectionStartColumn === t.selectionStartColumn && e.positionLineNumber === t.positionLineNumber && e.positionColumn === t.positionColumn
- }, t.prototype.getDirection = function () {
- return this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn ? 0 : 1
- }, t.prototype.setEndPosition = function (e, n) {
- return 0 === this.getDirection() ? new t(this.startLineNumber, this.startColumn, e, n) : new t(e, n, this.startLineNumber, this.startColumn)
- }, t.prototype.getPosition = function () {
- return new n.Position(this.positionLineNumber, this.positionColumn)
- }, t.prototype.setStartPosition = function (e, n) {
- return 0 === this.getDirection() ? new t(e, n, this.endLineNumber, this.endColumn) : new t(this.endLineNumber, this.endColumn, e, n)
- }, t.fromPositions = function (e, n) {
- return void 0 === n && (n = e), new t(e.lineNumber, e.column, n.lineNumber, n.column)
- }, t.liftSelection = function (e) {
- return new t(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn)
- }, t.selectionsArrEqual = function (e, t) {
- if (e && !t || !e && t) return !1;
- if (!e && !t) return !0;
- if (e.length !== t.length) return !1;
- for (var n = 0, i = e.length; n < i; n++) if (!this.selectionsEqual(e[n], t[n])) return !1;
- return !0
- }, t.isISelection = function (e) {
- return e && "number" == typeof e.selectionStartLineNumber && "number" == typeof e.selectionStartColumn && "number" == typeof e.positionLineNumber && "number" == typeof e.positionColumn
- }, t.createWithDirection = function (e, n, i, o, r) {
- return 0 === r ? new t(e, n, i, o) : new t(i, o, e, n)
- }, t
- }(i.Range);
- t.Selection = o
- })), define(n[189], i([0, 1, 24, 6, 15, 4, 2, 16, 5, 187, 22, 88]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}),
- t.CopyOptions = {forceCopyWithSyntaxHighlighting: !1};
- var p = function () {
- function e() {
- this._lastState = null
- }
- return e.prototype.set = function (e, t) {
- this._lastState = {lastCopiedValue: e, data: t}
- }, e.prototype.get = function (e) {
- return this._lastState && this._lastState.lastCopiedValue === e ? this._lastState.data : (this._lastState = null, null)
- }, e.INSTANCE = new e, e
- }(), g = function (e) {
- function t(t, r) {
- var a = e.call(this) || this;
- a.textArea = r, a._onFocus = a._register(new s.Emitter), a.onFocus = a._onFocus.event, a._onBlur = a._register(new s.Emitter), a.onBlur = a._onBlur.event, a._onKeyDown = a._register(new s.Emitter), a.onKeyDown = a._onKeyDown.event, a._onKeyUp = a._register(new s.Emitter), a.onKeyUp = a._onKeyUp.event, a._onCut = a._register(new s.Emitter), a.onCut = a._onCut.event, a._onPaste = a._register(new s.Emitter), a.onPaste = a._onPaste.event, a._onType = a._register(new s.Emitter), a.onType = a._onType.event, a._onCompositionStart = a._register(new s.Emitter), a.onCompositionStart = a._onCompositionStart.event, a._onCompositionUpdate = a._register(new s.Emitter),
- a.onCompositionUpdate = a._onCompositionUpdate.event, a._onCompositionEnd = a._register(new s.Emitter), a.onCompositionEnd = a._onCompositionEnd.event, a._onSelectionChangeRequest = a._register(new s.Emitter), a.onSelectionChangeRequest = a._onSelectionChangeRequest.event, a._host = t, a._textArea = a._register(new m(r)), a._asyncTriggerCut = a._register(new o.RunOnceScheduler((function () {
- return a._onCut.fire()
- }), 0)), a._textAreaState = d.TextAreaState.EMPTY, a._selectionChangeListener = null, a.writeScreenReaderContent("ctor"), a._hasFocus = !1, a._isDoingComposition = !1, a._nextCommand = 0, a._register(i.addStandardDisposableListener(r.domNode, "keydown", (function (e) {
- !a._isDoingComposition || 109 !== e.keyCode && 1 !== e.keyCode || e.stopPropagation(), e.equals(9) && e.preventDefault(), a._onKeyDown.fire(e)
- }))), a._register(i.addStandardDisposableListener(r.domNode, "keyup", (function (e) {
- a._onKeyUp.fire(e)
- }))), a._register(i.addDisposableListener(r.domNode, "compositionstart", (function (e) {
- a._isDoingComposition || (a._isDoingComposition = !0,
- n.isEdgeOrIE || a._setAndWriteTextAreaState("compositionstart", d.TextAreaState.EMPTY), a._onCompositionStart.fire())
- })));
- var c = function (e) {
- var t = a._textAreaState, n = d.TextAreaState.readFromTextArea(a._textArea);
- return [n, d.TextAreaState.deduceInput(t, n, e)]
- }, h = function (e) {
- var t = a._textAreaState, n = d.TextAreaState.selectedText(e);
- return [n, {text: n.value, replaceCharCnt: t.selectionEnd - t.selectionStart}]
- }, p = function (e) {
- return !(!n.isEdgeOrIE || "ja" !== e) || !(!n.isIE || 0 !== e.indexOf("zh-Han"))
- };
- return a._register(i.addDisposableListener(r.domNode, "compositionupdate", (function (e) {
- if (p(e.locale)) {
- var t = c(!1), n = t[0], i = t[1];
- return a._textAreaState = n, a._onType.fire(i), void a._onCompositionUpdate.fire(e)
- }
- var o = h(e.data), r = o[0], s = o[1];
- a._textAreaState = r, a._onType.fire(s), a._onCompositionUpdate.fire(e)
- }))), a._register(i.addDisposableListener(r.domNode, "compositionend", (function (e) {
- if (a._isDoingComposition) {
- if (p(e.locale)) {
- var t = c(!1), i = t[0], o = t[1];
- a._textAreaState = i, a._onType.fire(o)
- } else {
- var r = h(e.data);
- i = r[0], o = r[1]
- ;a._textAreaState = i, a._onType.fire(o)
- }
- (n.isEdgeOrIE || n.isChrome) && (a._textAreaState = d.TextAreaState.readFromTextArea(a._textArea)), a._isDoingComposition && (a._isDoingComposition = !1, a._onCompositionEnd.fire())
- }
- }))), a._register(i.addDisposableListener(r.domNode, "input", (function () {
- if (a._textArea.setIgnoreSelectionChangeTime("received input event"), !a._isDoingComposition) {
- var e = c(l.isMacintosh), t = e[0], n = e[1];
- 0 === n.replaceCharCnt && 1 === n.text.length && u.isHighSurrogate(n.text.charCodeAt(0)) || (a._textAreaState = t, 0 === a._nextCommand ? "" !== n.text && a._onType.fire(n) : ("" === n.text && 0 === n.replaceCharCnt || a._firePaste(n.text, null), a._nextCommand = 0))
- }
- }))), a._register(i.addDisposableListener(r.domNode, "cut", (function (e) {
- a._textArea.setIgnoreSelectionChangeTime("received cut event"), a._ensureClipboardGetsEditorSelection(e), a._asyncTriggerCut.schedule()
- }))), a._register(i.addDisposableListener(r.domNode, "copy", (function (e) {
- a._ensureClipboardGetsEditorSelection(e)
- }))),
- a._register(i.addDisposableListener(r.domNode, "paste", (function (e) {
- if (a._textArea.setIgnoreSelectionChangeTime("received paste event"), f.canUseTextData(e)) {
- var t = f.getTextData(e), n = t[0], i = t[1];
- "" !== n && a._firePaste(n, i)
- } else a._textArea.getSelectionStart() !== a._textArea.getSelectionEnd() && a._setAndWriteTextAreaState("paste", d.TextAreaState.EMPTY), a._nextCommand = 1
- }))), a._register(i.addDisposableListener(r.domNode, "focus", (function () {
- a._setHasFocus(!0)
- }))), a._register(i.addDisposableListener(r.domNode, "blur", (function () {
- a._setHasFocus(!1)
- }))), a
- }
- return r(t, e), t.prototype._installSelectionChangeListener = function () {
- var e = this, t = 0;
- return i.addDisposableListener(document, "selectionchange", (function (i) {
- if (e._hasFocus && !e._isDoingComposition && n.isChrome && l.isWindows) {
- var o = Date.now(), r = o - t;
- if (t = o, !(r < 5)) {
- var s = o - e._textArea.getIgnoreSelectionChangeTime();
- if (e._textArea.resetSelectionChangeTime(), !(s < 100) && e._textAreaState.selectionStartPosition && e._textAreaState.selectionEndPosition) {
- var a = e._textArea.getValue()
- ;
- if (e._textAreaState.value === a) {
- var u = e._textArea.getSelectionStart(), d = e._textArea.getSelectionEnd();
- if (e._textAreaState.selectionStart !== u || e._textAreaState.selectionEnd !== d) {
- var h = e._textAreaState.deduceEditorPosition(u),
- p = e._host.deduceModelPosition(h[0], h[1], h[2]),
- g = e._textAreaState.deduceEditorPosition(d),
- f = e._host.deduceModelPosition(g[0], g[1], g[2]),
- m = new c.Selection(p.lineNumber, p.column, f.lineNumber, f.column);
- e._onSelectionChangeRequest.fire(m)
- }
- }
- }
- }
- }
- }))
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._selectionChangeListener && (this._selectionChangeListener.dispose(), this._selectionChangeListener = null)
- }, t.prototype.focusTextArea = function () {
- this._setHasFocus(!0), this.refreshFocusState()
- }, t.prototype.isFocused = function () {
- return this._hasFocus
- }, t.prototype.refreshFocusState = function () {
- var e = i.getShadowRoot(this.textArea.domNode)
- ;e ? this._setHasFocus(e.activeElement === this.textArea.domNode) : i.isInDOM(this.textArea.domNode) ? this._setHasFocus(document.activeElement === this.textArea.domNode) : this._setHasFocus(!1)
- }, t.prototype._setHasFocus = function (e) {
- this._hasFocus !== e && (this._hasFocus = e, this._selectionChangeListener && (this._selectionChangeListener.dispose(), this._selectionChangeListener = null), this._hasFocus && (this._selectionChangeListener = this._installSelectionChangeListener()), this._hasFocus && (n.isEdge ? this._setAndWriteTextAreaState("focusgain", d.TextAreaState.EMPTY) : this.writeScreenReaderContent("focusgain")), this._hasFocus ? this._onFocus.fire() : this._onBlur.fire())
- }, t.prototype._setAndWriteTextAreaState = function (e, t) {
- this._hasFocus || (t = t.collapseSelection()), t.writeToTextArea(e, this._textArea, this._hasFocus), this._textAreaState = t
- }, t.prototype.writeScreenReaderContent = function (e) {
- this._isDoingComposition || this._setAndWriteTextAreaState(e, this._host.getScreenReaderContent(this._textAreaState))
- },
- t.prototype._ensureClipboardGetsEditorSelection = function (e) {
- var t = this._host.getDataToCopy(f.canUseTextData(e) && h.BrowserFeatures.clipboard.richText), i = {
- version: 1,
- isFromEmptySelection: t.isFromEmptySelection,
- multicursorText: t.multicursorText,
- mode: t.mode
- };
- p.INSTANCE.set(n.isFirefox ? t.text.replace(/\r\n/g, "\n") : t.text, i), f.canUseTextData(e) ? f.setTextData(e, t.text, t.html, i) : this._setAndWriteTextAreaState("copy or cut", d.TextAreaState.selectedText(t.text))
- }, t.prototype._firePaste = function (e, t) {
- t || (t = p.INSTANCE.get(e)), this._onPaste.fire({text: e, metadata: t})
- }, t
- }(a.Disposable);
- t.TextAreaInput = g;
- var f = function () {
- function e() {
- }
- return e.canUseTextData = function (e) {
- return !!e.clipboardData || !!window.clipboardData
- }, e.getTextData = function (e) {
- if (e.clipboardData) {
- e.preventDefault();
- var t = e.clipboardData.getData("text/plain"), n = null,
- i = e.clipboardData.getData("vscode-editor-data");
- if ("string" == typeof i) try {
- 1 !== (n = JSON.parse(i)).version && (n = null)
- } catch (e) {
- }
- return [t, n]
- }
- if (window.clipboardData) return e.preventDefault(),
- [t = window.clipboardData.getData("Text"), null];
- throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")
- }, e.setTextData = function (e, t, n, i) {
- if (e.clipboardData) return e.clipboardData.setData("text/plain", t), "string" == typeof n && e.clipboardData.setData("text/html", n), e.clipboardData.setData("vscode-editor-data", JSON.stringify(i)), void e.preventDefault();
- if (window.clipboardData) return window.clipboardData.setData("Text", t), void e.preventDefault();
- throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")
- }, e
- }(), m = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._actual = t, n._ignoreSelectionChangeTime = 0, n
- }
- return r(t, e), t.prototype.setIgnoreSelectionChangeTime = function (e) {
- this._ignoreSelectionChangeTime = Date.now()
- }, t.prototype.getIgnoreSelectionChangeTime = function () {
- return this._ignoreSelectionChangeTime
- }, t.prototype.resetSelectionChangeTime = function () {
- this._ignoreSelectionChangeTime = 0
- }, t.prototype.getValue = function () {
- return this._actual.domNode.value
- },
- t.prototype.setValue = function (e, t) {
- var n = this._actual.domNode;
- n.value !== t && (this.setIgnoreSelectionChangeTime("setValue"), n.value = t)
- }, t.prototype.getSelectionStart = function () {
- return this._actual.domNode.selectionStart
- }, t.prototype.getSelectionEnd = function () {
- return this._actual.domNode.selectionEnd
- }, t.prototype.setSelectionRange = function (e, t, o) {
- var r = this._actual.domNode, s = i.getShadowRoot(r),
- a = (s ? s.activeElement : document.activeElement) === r, l = r.selectionStart, u = r.selectionEnd;
- if (a && l === t && u === o) n.isFirefox && window.parent !== window && r.focus(); else {
- if (a) return this.setIgnoreSelectionChangeTime("setSelectionRange"), r.setSelectionRange(t, o), void (n.isFirefox && window.parent !== window && r.focus());
- try {
- var d = i.saveParentsScrollTop(r);
- this.setIgnoreSelectionChangeTime("setSelectionRange"), r.focus(), r.setSelectionRange(t, o), i.restoreParentsScrollTop(r, d)
- } catch (e) {
- }
- }
- }, t
- }(a.Disposable)
- })), define(n[80], i([0, 1, 22]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n) {
- void 0 === n && (n = !1), this._range = e, this._text = t, this.insertsAutoWhitespace = n
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(this._range, this._text)
- }, e.prototype.computeCursorState = function (e, t) {
- var i = t.getInverseEditOperations()[0].range;
- return new n.Selection(i.endLineNumber, i.endColumn, i.endLineNumber, i.endColumn)
- }, e
- }();
- t.ReplaceCommand = i;
- var o = function () {
- function e(e, t) {
- this._range = e, this._text = t
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(this._range, this._text)
- }, e.prototype.computeCursorState = function (e, t) {
- var i = t.getInverseEditOperations()[0].range;
- return new n.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn)
- }, e
- }();
- t.ReplaceCommandThatSelectsText = o;
- var r = function () {
- function e(e, t, n) {
- void 0 === n && (n = !1), this._range = e, this._text = t, this.insertsAutoWhitespace = n
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(this._range, this._text)
- }, e.prototype.computeCursorState = function (e, t) {
- var i = t.getInverseEditOperations()[0].range;
- return new n.Selection(i.startLineNumber, i.startColumn, i.startLineNumber, i.startColumn)
- }, e
- }();
- t.ReplaceCommandWithoutChangingPosition = r;
- var s = function () {
- function e(e, t, n, i, o) {
- void 0 === o && (o = !1), this._range = e, this._text = t, this._columnDeltaOffset = i, this._lineNumberDeltaOffset = n, this.insertsAutoWhitespace = o
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(this._range, this._text)
- }, e.prototype.computeCursorState = function (e, t) {
- var i = t.getInverseEditOperations()[0].range;
- return new n.Selection(i.endLineNumber + this._lineNumberDeltaOffset, i.endColumn + this._columnDeltaOffset, i.endLineNumber + this._lineNumberDeltaOffset, i.endColumn + this._columnDeltaOffset)
- }, e
- }();
- t.ReplaceCommandWithOffsetCursorState = s;
- var a = function () {
- function e(e, t, n, i) {
- void 0 === i && (i = !1), this._range = e, this._text = t, this._initialSelection = n, this._forceMoveMarkers = i, this._selectionId = null
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(this._range, this._text, this._forceMoveMarkers), this._selectionId = t.trackSelection(this._initialSelection)
- }, e.prototype.computeCursorState = function (e, t) {
- return t.getTrackedSelection(this._selectionId)
- }, e
- }();
- t.ReplaceCommandThatPreservesSelection = a
- })), define(n[340], i([0, 1, 3, 22]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t, n) {
- this._range = e, this._charBeforeSelection = t, this._charAfterSelection = n
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(new n.Range(this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn), this._charBeforeSelection), t.addTrackedEditOperation(new n.Range(this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, this._range.endColumn), this._charAfterSelection)
- }, e.prototype.computeCursorState = function (e, t) {
- var n = t.getInverseEditOperations(), o = n[0].range, r = n[1].range
- ;
- return new i.Selection(o.endLineNumber, o.endColumn, r.endLineNumber, r.endColumn - this._charAfterSelection.length)
- }, e
- }();
- t.SurroundSelectionCommand = o
- })), define(n[106], i([0, 1, 5]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), "undefined" != typeof TextDecoder ? t.createStringBuilder = function (e) {
- return new i(e)
- } : t.createStringBuilder = function (e) {
- return new o
- };
- var i = function () {
- function e(e) {
- this._decoder = new TextDecoder("UTF-16LE"), this._capacity = 0 | e, this._buffer = new Uint16Array(this._capacity), this._completedStrings = null, this._bufferLength = 0
- }
- return e.prototype.reset = function () {
- this._completedStrings = null, this._bufferLength = 0
- }, e.prototype.build = function () {
- return null !== this._completedStrings ? (this._flushBuffer(), this._completedStrings.join("")) : this._buildBuffer()
- }, e.prototype._buildBuffer = function () {
- if (0 === this._bufferLength) return "";
- var e = new Uint16Array(this._buffer.buffer, 0, this._bufferLength);
- return this._decoder.decode(e)
- }, e.prototype._flushBuffer = function () {
- var e = this._buildBuffer();
- this._bufferLength = 0, null === this._completedStrings ? this._completedStrings = [e] : this._completedStrings[this._completedStrings.length] = e
- }, e.prototype.write1 = function (e) {
- var t = this._capacity - this._bufferLength;
- t <= 1 && (0 === t || n.isHighSurrogate(e)) && this._flushBuffer(), this._buffer[this._bufferLength++] = e
- }, e.prototype.appendASCII = function (e) {
- this._bufferLength === this._capacity && this._flushBuffer(), this._buffer[this._bufferLength++] = e
- }, e.prototype.appendASCIIString = function (e) {
- var t = e.length;
- if (this._bufferLength + t >= this._capacity) return this._flushBuffer(), void (this._completedStrings[this._completedStrings.length] = e);
- for (var n = 0; n < t; n++) this._buffer[this._bufferLength++] = e.charCodeAt(n)
- }, e
- }(), o = function () {
- function e() {
- this._pieces = [], this._piecesLen = 0
- }
- return e.prototype.reset = function () {
- this._pieces = [], this._piecesLen = 0
- }, e.prototype.build = function () {
- return this._pieces.join("")
- }, e.prototype.write1 = function (e) {
- this._pieces[this._piecesLen++] = String.fromCharCode(e)
- },
- e.prototype.appendASCII = function (e) {
- this._pieces[this._piecesLen++] = String.fromCharCode(e)
- }, e.prototype.appendASCIIString = function (e) {
- this._pieces[this._piecesLen++] = e
- }, e
- }()
- })), define(n[143], i([0, 1, 28, 106]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e) {
- this._createLine = e, this._set(1, [])
- }
- return e.prototype.flush = function () {
- this._set(1, [])
- }, e.prototype._set = function (e, t) {
- this._lines = t, this._rendLineNumberStart = e
- }, e.prototype._get = function () {
- return {rendLineNumberStart: this._rendLineNumberStart, lines: this._lines}
- }, e.prototype.getStartLineNumber = function () {
- return this._rendLineNumberStart
- }, e.prototype.getEndLineNumber = function () {
- return this._rendLineNumberStart + this._lines.length - 1
- }, e.prototype.getCount = function () {
- return this._lines.length
- }, e.prototype.getLine = function (e) {
- var t = e - this._rendLineNumberStart;
- if (t < 0 || t >= this._lines.length) throw new Error("Illegal value for lineNumber");
- return this._lines[t]
- }, e.prototype.onLinesDeleted = function (e, t) {
- if (0 === this.getCount()) return null;
- var n = this.getStartLineNumber(), i = this.getEndLineNumber();
- if (t < n) {
- var o = t - e + 1;
- return this._rendLineNumberStart -= o, null
- }
- if (e > i) return null;
- for (var r = 0, s = 0, a = n; a <= i; a++) {
- var l = a - this._rendLineNumberStart;
- e <= a && a <= t && (0 === s ? (r = l, s = 1) : s++)
- }
- if (e < n) {
- var u = 0;
- u = t < n ? t - e + 1 : n - e, this._rendLineNumberStart -= u
- }
- return this._lines.splice(r, s)
- }, e.prototype.onLinesChanged = function (e, t) {
- if (0 === this.getCount()) return !1;
- for (var n = this.getStartLineNumber(), i = this.getEndLineNumber(), o = !1, r = e; r <= t; r++) r >= n && r <= i && (this._lines[r - this._rendLineNumberStart].onContentChanged(), o = !0);
- return o
- }, e.prototype.onLinesInserted = function (e, t) {
- if (0 === this.getCount()) return null;
- var n = t - e + 1, i = this.getStartLineNumber(), o = this.getEndLineNumber();
- if (e <= i) return this._rendLineNumberStart += n, null;
- if (e > o) return null;
- if (n + e > o) return this._lines.splice(e - this._rendLineNumberStart, o - e + 1);
- for (var r = [], s = 0; s < n; s++) r[s] = this._createLine()
- ;
- var a = e - this._rendLineNumberStart, l = this._lines.slice(0, a),
- u = this._lines.slice(a, this._lines.length - n),
- d = this._lines.slice(this._lines.length - n, this._lines.length);
- return this._lines = l.concat(r).concat(u), d
- }, e.prototype.onTokensChanged = function (e) {
- if (0 === this.getCount()) return !1;
- for (var t = this.getStartLineNumber(), n = this.getEndLineNumber(), i = !1, o = 0, r = e.length; o < r; o++) {
- var s = e[o];
- if (!(s.toLineNumber < t || s.fromLineNumber > n)) for (var a = Math.max(t, s.fromLineNumber), l = Math.min(n, s.toLineNumber), u = a; u <= l; u++) {
- var d = u - this._rendLineNumberStart;
- this._lines[d].onTokensChanged(), i = !0
- }
- }
- return i
- }, e
- }();
- t.RenderedLinesCollection = o;
- var r = function () {
- function e(e) {
- var t = this;
- this._host = e, this.domNode = this._createDomNode(), this._linesCollection = new o((function () {
- return t._host.createVisibleLine()
- }))
- }
- return e.prototype._createDomNode = function () {
- var e = n.createFastDomNode(document.createElement("div"));
- return e.setClassName("view-layer"), e.setPosition("absolute"), e.domNode.setAttribute("role", "presentation"),
- e.domNode.setAttribute("aria-hidden", "true"), e
- }, e.prototype.onConfigurationChanged = function (e) {
- return !!e.hasChanged(107)
- }, e.prototype.onFlushed = function (e) {
- return this._linesCollection.flush(), !0
- }, e.prototype.onLinesChanged = function (e) {
- return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber)
- }, e.prototype.onLinesDeleted = function (e) {
- var t = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber);
- if (t) for (var n = 0, i = t.length; n < i; n++) {
- var o = t[n].getDomNode();
- o && this.domNode.domNode.removeChild(o)
- }
- return !0
- }, e.prototype.onLinesInserted = function (e) {
- var t = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber);
- if (t) for (var n = 0, i = t.length; n < i; n++) {
- var o = t[n].getDomNode();
- o && this.domNode.domNode.removeChild(o)
- }
- return !0
- }, e.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- }, e.prototype.onTokensChanged = function (e) {
- return this._linesCollection.onTokensChanged(e.ranges)
- }, e.prototype.onZonesChanged = function (e) {
- return !0
- }, e.prototype.getStartLineNumber = function () {
- return this._linesCollection.getStartLineNumber()
- }, e.prototype.getEndLineNumber = function () {
- return this._linesCollection.getEndLineNumber()
- }, e.prototype.getVisibleLine = function (e) {
- return this._linesCollection.getLine(e)
- }, e.prototype.renderLines = function (e) {
- var t = this._linesCollection._get(), n = new s(this.domNode.domNode, this._host, e),
- i = {rendLineNumberStart: t.rendLineNumberStart, lines: t.lines, linesLength: t.lines.length},
- o = n.render(i, e.startLineNumber, e.endLineNumber, e.relativeVerticalOffset);
- this._linesCollection._set(o.rendLineNumberStart, o.lines)
- }, e
- }();
- t.VisibleLinesCollection = r;
- var s = function () {
- function e(e, t, n) {
- this.domNode = e, this.host = t, this.viewportData = n
- }
- return e.prototype.render = function (e, t, n, i) {
- var o = {
- rendLineNumberStart: e.rendLineNumberStart,
- lines: e.lines.slice(0),
- linesLength: e.linesLength
- };
- if (o.rendLineNumberStart + o.linesLength - 1 < t || n < o.rendLineNumberStart) {
- o.rendLineNumberStart = t, o.linesLength = n - t + 1, o.lines = [];
- for (var r = t; r <= n; r++) o.lines[r - t] = this.host.createVisibleLine()
- ;
- return this._finishRendering(o, !0, i), o
- }
- if (this._renderUntouchedLines(o, Math.max(t - o.rendLineNumberStart, 0), Math.min(n - o.rendLineNumberStart, o.linesLength - 1), i, t), o.rendLineNumberStart > t) (l = t) <= (s = Math.min(n, o.rendLineNumberStart - 1)) && (this._insertLinesBefore(o, l, s, i, t), o.linesLength += s - l + 1); else if (o.rendLineNumberStart < t) {
- (a = Math.min(o.linesLength, t - o.rendLineNumberStart)) > 0 && (this._removeLinesBefore(o, a), o.linesLength -= a)
- }
- if (o.rendLineNumberStart = t, o.rendLineNumberStart + o.linesLength - 1 < n) (l = o.rendLineNumberStart + o.linesLength) <= (s = n) && (this._insertLinesAfter(o, l, s, i, t), o.linesLength += s - l + 1); else if (o.rendLineNumberStart + o.linesLength - 1 > n) {
- var s, a, l = Math.max(0, n - o.rendLineNumberStart + 1);
- (a = (s = o.linesLength - 1) - l + 1) > 0 && (this._removeLinesAfter(o, a), o.linesLength -= a)
- }
- return this._finishRendering(o, !1, i), o
- }, e.prototype._renderUntouchedLines = function (e, t, n, i, o) {
- for (var r = e.rendLineNumberStart, s = e.lines, a = t; a <= n; a++) {
- var l = r + a;
- s[a].layoutLine(l, i[l - o])
- }
- }, e.prototype._insertLinesBefore = function (e, t, n, i, o) {
- for (var r = [], s = 0, a = t; a <= n; a++) r[s++] = this.host.createVisibleLine();
- e.lines = r.concat(e.lines)
- }, e.prototype._removeLinesBefore = function (e, t) {
- for (var n = 0; n < t; n++) {
- var i = e.lines[n].getDomNode();
- i && this.domNode.removeChild(i)
- }
- e.lines.splice(0, t)
- }, e.prototype._insertLinesAfter = function (e, t, n, i, o) {
- for (var r = [], s = 0, a = t; a <= n; a++) r[s++] = this.host.createVisibleLine();
- e.lines = e.lines.concat(r)
- }, e.prototype._removeLinesAfter = function (e, t) {
- for (var n = e.linesLength - t, i = 0; i < t; i++) {
- var o = e.lines[n + i].getDomNode();
- o && this.domNode.removeChild(o)
- }
- e.lines.splice(n, t)
- }, e.prototype._finishRenderingNewLines = function (e, t, n, i) {
- var o = this.domNode.lastChild;
- t || !o ? this.domNode.innerHTML = n : o.insertAdjacentHTML("afterend", n);
- for (var r = this.domNode.lastChild, s = e.linesLength - 1; s >= 0; s--) {
- var a = e.lines[s];
- i[s] && (a.setDomNode(r), r = r.previousSibling)
- }
- }, e.prototype._finishRenderingInvalidLines = function (e, t, n) {
- var i = document.createElement("div");
- i.innerHTML = t;
- for (var o = 0; o < e.linesLength; o++) {
- var r = e.lines[o];
- if (n[o]) {
- var s = i.firstChild, a = r.getDomNode();
- a.parentNode.replaceChild(s, a), r.setDomNode(s)
- }
- }
- }, e.prototype._finishRendering = function (t, n, i) {
- var o = e._sb, r = t.linesLength, s = t.lines, a = t.rendLineNumberStart, l = [];
- o.reset();
- for (var u = !1, d = 0; d < r; d++) {
- var c = s[d];
- if (l[d] = !1, !c.getDomNode()) c.renderLine(d + a, i[d], this.viewportData, o) && (l[d] = !0, u = !0)
- }
- u && this._finishRenderingNewLines(t, n, o.build(), l), o.reset();
- var h = !1, p = [];
- for (d = 0; d < r; d++) {
- c = s[d];
- if (p[d] = !1, !l[d]) c.renderLine(d + a, i[d], this.viewportData, o) && (p[d] = !0, h = !0)
- }
- h && this._finishRenderingInvalidLines(t, o.build(), p)
- }, e._sb = i.createStringBuilder(1e5), e
- }()
- })), define(n[107], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t, n) {
- this.offset = 0 | e, this.type = t, this.language = n
- }
- return e.prototype.toString = function () {
- return "(" + this.offset + ", " + this.type + ")"
- }, e
- }();
- t.Token = n;
- var i = function (e, t) {
- this.tokens = e, this.endState = t
- };
- t.TokenizationResult = i;
- var o = function (e, t) {
- this.tokens = e, this.endState = t
- };
- t.TokenizationResult2 = o
- })), define(n[341], i([0, 1, 126, 5]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = 3;
- function r(e, t, i, o) {
- return new n.LcsDiff(e, t, i).ComputeDiff(o)
- }
- var s = function () {
- function e(e) {
- for (var t = [], n = [], i = 0, o = e.length; i < o; i++) t[i] = c(e[i], 1), n[i] = h(e[i], 1);
- this.lines = e, this._startColumns = t, this._endColumns = n
- }
- return e.prototype.getElements = function () {
- for (var e = [], t = 0, n = this.lines.length; t < n; t++) e[t] = this.lines[t].substring(this._startColumns[t] - 1, this._endColumns[t] - 1);
- return e
- }, e.prototype.getStartLineNumber = function (e) {
- return e + 1
- }, e.prototype.getEndLineNumber = function (e) {
- return e + 1
- }, e.prototype.createCharSequence = function (e, t, n) {
- for (var i = [], o = [], r = [], s = 0, l = t; l <= n; l++) for (var u = this.lines[l], d = e ? this._startColumns[l] : 1, c = e ? this._endColumns[l] : u.length + 1, h = d; h < c; h++) i[s] = u.charCodeAt(h - 1), o[s] = l + 1, r[s] = h, s++;
- return new a(i, o, r)
- }, e
- }(), a = function () {
- function e(e, t, n) {
- this._charCodes = e, this._lineNumbers = t, this._columns = n
- }
- return e.prototype.getElements = function () {
- return this._charCodes
- }, e.prototype.getStartLineNumber = function (e) {
- return this._lineNumbers[e]
- }, e.prototype.getStartColumn = function (e) {
- return this._columns[e]
- }, e.prototype.getEndLineNumber = function (e) {
- return this._lineNumbers[e]
- }, e.prototype.getEndColumn = function (e) {
- return this._columns[e] + 1
- }, e
- }(), l = function () {
- function e(e, t, n, i, o, r, s, a) {
- this.originalStartLineNumber = e, this.originalStartColumn = t, this.originalEndLineNumber = n, this.originalEndColumn = i, this.modifiedStartLineNumber = o, this.modifiedStartColumn = r, this.modifiedEndLineNumber = s, this.modifiedEndColumn = a
- }
- return e.createFromDiffChange = function (t, n, i) {
- var o, r, s, a, l, u, d, c;
- return 0 === t.originalLength ? (o = 0, r = 0, s = 0, a = 0) : (o = n.getStartLineNumber(t.originalStart), r = n.getStartColumn(t.originalStart), s = n.getEndLineNumber(t.originalStart + t.originalLength - 1), a = n.getEndColumn(t.originalStart + t.originalLength - 1)), 0 === t.modifiedLength ? (l = 0, u = 0, d = 0, c = 0) : (l = i.getStartLineNumber(t.modifiedStart), u = i.getStartColumn(t.modifiedStart),
- d = i.getEndLineNumber(t.modifiedStart + t.modifiedLength - 1), c = i.getEndColumn(t.modifiedStart + t.modifiedLength - 1)), new e(o, r, s, a, l, u, d, c)
- }, e
- }();
- var u = function () {
- function e(e, t, n, i, o) {
- this.originalStartLineNumber = e, this.originalEndLineNumber = t, this.modifiedStartLineNumber = n, this.modifiedEndLineNumber = i, this.charChanges = o
- }
- return e.createFromDiffResult = function (t, n, i, s, a, u, d) {
- var c, h, p, g, f = void 0;
- if (0 === n.originalLength ? (c = i.getStartLineNumber(n.originalStart) - 1, h = 0) : (c = i.getStartLineNumber(n.originalStart), h = i.getEndLineNumber(n.originalStart + n.originalLength - 1)), 0 === n.modifiedLength ? (p = s.getStartLineNumber(n.modifiedStart) - 1, g = 0) : (p = s.getStartLineNumber(n.modifiedStart), g = s.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1)), u && n.originalLength > 0 && n.originalLength < 20 && n.modifiedLength > 0 && n.modifiedLength < 20 && a()) {
- var m = i.createCharSequence(t, n.originalStart, n.originalStart + n.originalLength - 1),
- v = s.createCharSequence(t, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1),
- _ = r(m, v, a, !0).changes;
- d && (_ = function (e) {
- if (e.length <= 1) return e;
- for (var t = [e[0]], n = t[0], i = 1, r = e.length; i < r; i++) {
- var s = e[i], a = s.originalStart - (n.originalStart + n.originalLength),
- l = s.modifiedStart - (n.modifiedStart + n.modifiedLength);
- Math.min(a, l) < o ? (n.originalLength = s.originalStart + s.originalLength - n.originalStart, n.modifiedLength = s.modifiedStart + s.modifiedLength - n.modifiedStart) : (t.push(s), n = s)
- }
- return t
- }(_)), f = [];
- for (var y = 0, C = _.length; y < C; y++) f.push(l.createFromDiffChange(_[y], m, v))
- }
- return new e(c, h, p, g, f)
- }, e
- }(), d = function () {
- function e(e, t, n) {
- this.shouldComputeCharChanges = n.shouldComputeCharChanges, this.shouldPostProcessCharChanges = n.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = n.shouldIgnoreTrimWhitespace, this.shouldMakePrettyDiff = n.shouldMakePrettyDiff, this.originalLines = e, this.modifiedLines = t, this.original = new s(e), this.modified = new s(t), this.continueLineDiff = p(n.maxComputationTime), this.continueCharDiff = p(0 === n.maxComputationTime ? 0 : Math.min(n.maxComputationTime, 5e3))
- }
- return e.prototype.computeDiff = function () {
- if (1 === this.original.lines.length && 0 === this.original.lines[0].length) return {
- quitEarly: !1,
- changes: [{
- originalStartLineNumber: 1,
- originalEndLineNumber: 1,
- modifiedStartLineNumber: 1,
- modifiedEndLineNumber: this.modified.lines.length,
- charChanges: [{
- modifiedEndColumn: 0,
- modifiedEndLineNumber: 0,
- modifiedStartColumn: 0,
- modifiedStartLineNumber: 0,
- originalEndColumn: 0,
- originalEndLineNumber: 0,
- originalStartColumn: 0,
- originalStartLineNumber: 0
- }]
- }]
- };
- if (1 === this.modified.lines.length && 0 === this.modified.lines[0].length) return {
- quitEarly: !1,
- changes: [{
- originalStartLineNumber: 1,
- originalEndLineNumber: this.original.lines.length,
- modifiedStartLineNumber: 1,
- modifiedEndLineNumber: 1,
- charChanges: [{
- modifiedEndColumn: 0,
- modifiedEndLineNumber: 0,
- modifiedStartColumn: 0,
- modifiedStartLineNumber: 0,
- originalEndColumn: 0,
- originalEndLineNumber: 0,
- originalStartColumn: 0,
- originalStartLineNumber: 0
- }]
- }]
- };
- var e = r(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff),
- t = e.changes, n = e.quitEarly;
- if (this.shouldIgnoreTrimWhitespace) {
- for (var i = [], o = 0, s = t.length; o < s; o++) i.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace, t[o], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));
- return {quitEarly: n, changes: i}
- }
- for (var a = [], l = 0, d = 0, p = (o = -1, t.length); o < p; o++) {
- for (var g = o + 1 < p ? t[o + 1] : null, f = g ? g.originalStart : this.originalLines.length, m = g ? g.modifiedStart : this.modifiedLines.length; l < f && d < m;) {
- var v = this.originalLines[l], _ = this.modifiedLines[d];
- if (v !== _) {
- for (var y = c(v, 1), C = c(_, 1); y > 1 && C > 1;) {
- if (v.charCodeAt(y - 2) !== _.charCodeAt(C - 2)) break;
- y--, C--
- }
- (y > 1 || C > 1) && this._pushTrimWhitespaceCharChange(a, l + 1, 1, y, d + 1, 1, C);
- for (var b = h(v, 1), S = h(_, 1), w = v.length + 1, E = _.length + 1; b < w && S < E;) {
- if (v.charCodeAt(b - 1) !== v.charCodeAt(S - 1)) break;
- b++, S++
- }
- (b < w || S < E) && this._pushTrimWhitespaceCharChange(a, l + 1, b, w, d + 1, S, E)
- }
- l++, d++
- }
- g && (a.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace, g, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)),
- l += g.originalLength, d += g.modifiedLength)
- }
- return {quitEarly: n, changes: a}
- }, e.prototype._pushTrimWhitespaceCharChange = function (e, t, n, i, o, r, s) {
- if (!this._mergeTrimWhitespaceCharChange(e, t, n, i, o, r, s)) {
- var a = void 0;
- this.shouldComputeCharChanges && (a = [new l(t, n, t, i, o, r, o, s)]), e.push(new u(t, t, o, o, a))
- }
- }, e.prototype._mergeTrimWhitespaceCharChange = function (e, t, n, i, o, r, s) {
- var a = e.length;
- if (0 === a) return !1;
- var u = e[a - 1];
- return 0 !== u.originalEndLineNumber && 0 !== u.modifiedEndLineNumber && (u.originalEndLineNumber + 1 === t && u.modifiedEndLineNumber + 1 === o && (u.originalEndLineNumber = t, u.modifiedEndLineNumber = o, this.shouldComputeCharChanges && u.charChanges && u.charChanges.push(new l(t, n, t, i, o, r, o, s)), !0))
- }, e
- }();
- function c(e, t) {
- var n = i.firstNonWhitespaceIndex(e);
- return -1 === n ? t : n + 1
- }
- function h(e, t) {
- var n = i.lastNonWhitespaceIndex(e);
- return -1 === n ? t : n + 2
- }
- function p(e) {
- if (0 === e) return function () {
- return !0
- };
- var t = Date.now();
- return function () {
- return Date.now() - t < e
- }
- }
- t.DiffComputer = d
- })), define(n[190], i([0, 1]), (function (e, t) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t, n, i, o, r) {
- this.id = e, this.label = t, this.alias = n, this._precondition = i, this._run = o, this._contextKeyService = r
- }
- return e.prototype.isSupported = function () {
- return this._contextKeyService.contextMatchesRules(this._precondition)
- }, e.prototype.run = function () {
- if (!this.isSupported()) return Promise.resolve(void 0);
- var e = this._run();
- return e || Promise.resolve(void 0)
- }, e
- }();
- t.InternalEditorAction = n
- })), define(n[68], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.isThemeColor = function (e) {
- return e && "string" == typeof e.id
- }, t.EditorType = {
- ICodeEditor: "vs.editor.ICodeEditor",
- IDiffEditor: "vs.editor.IDiffEditor"
- }, t.Handler = {
- ExecuteCommand: "executeCommand",
- ExecuteCommands: "executeCommands",
- Type: "type",
- ReplacePreviousChar: "replacePreviousChar",
- CompositionStart: "compositionStart",
- CompositionEnd: "compositionEnd",
- Paste: "paste",
- Cut: "cut",
- Undo: "undo",
- Redo: "redo"
- }
- })), define(n[108], i([0, 1, 68]), (function (e, t, n) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0}), t.isCodeEditor = function (e) {
- return !(!e || "function" != typeof e.getEditorType) && e.getEditorType() === n.EditorType.ICodeEditor
- }
- })), define(n[48], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"
- }(t.OverviewRulerLane || (t.OverviewRulerLane = {})), function (e) {
- e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"
- }(t.MinimapPosition || (t.MinimapPosition = {}));
- var n = function () {
- function e(e) {
- this.tabSize = Math.max(1, 0 | e.tabSize), this.indentSize = 0 | e.tabSize, this.insertSpaces = Boolean(e.insertSpaces), this.defaultEOL = 0 | e.defaultEOL, this.trimAutoWhitespace = Boolean(e.trimAutoWhitespace)
- }
- return e.prototype.equals = function (e) {
- return this.tabSize === e.tabSize && this.indentSize === e.indentSize && this.insertSpaces === e.insertSpaces && this.defaultEOL === e.defaultEOL && this.trimAutoWhitespace === e.trimAutoWhitespace
- }, e.prototype.createChangeEvent = function (e) {
- return {
- tabSize: this.tabSize !== e.tabSize,
- indentSize: this.indentSize !== e.indentSize,
- insertSpaces: this.insertSpaces !== e.insertSpaces,
- trimAutoWhitespace: this.trimAutoWhitespace !== e.trimAutoWhitespace
- }
- }, e
- }();
- t.TextModelResolvedOptions = n;
- var i = function (e, t) {
- this.range = e, this.matches = t
- };
- t.FindMatch = i;
- var o = function (e, t, n) {
- this.reverseEdits = e, this.changes = t, this.trimAutoWhitespaceLineNumbers = n
- };
- t.ApplyEditsResult = o
- })), define(n[342], i([0, 1, 10]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t) {
- this.beforeVersionId = e, this.beforeCursorState = t, this.afterCursorState = null, this.afterVersionId = -1, this.editOperations = []
- }
- return e.prototype.undo = function (e) {
- for (var t = this.editOperations.length - 1; t >= 0; t--) this.editOperations[t] = {operations: e.applyEdits(this.editOperations[t].operations)}
- }, e.prototype.redo = function (e) {
- for (var t = 0; t < this.editOperations.length; t++) this.editOperations[t] = {operations: e.applyEdits(this.editOperations[t].operations)}
- }, e
- }();
- function o(e) {
- return "\n" === e.getEOL() ? 0 : 1
- }
- var r = function () {
- function e(e, t) {
- this.beforeVersionId = e, this.beforeCursorState = null, this.afterCursorState = null, this.afterVersionId = -1, this.eol = t
- }
- return e.prototype.undo = function (e) {
- var t = o(e);
- e.setEOL(this.eol), this.eol = t
- }, e.prototype.redo = function (e) {
- var t = o(e);
- e.setEOL(this.eol), this.eol = t
- }, e
- }(), s = function () {
- function e(e) {
- this.model = e, this.currentOpenStackElement = null, this.past = [], this.future = []
- }
- return e.prototype.pushStackElement = function () {
- null !== this.currentOpenStackElement && (this.past.push(this.currentOpenStackElement), this.currentOpenStackElement = null)
- }, e.prototype.clear = function () {
- this.currentOpenStackElement = null, this.past = [], this.future = []
- }, e.prototype.pushEOL = function (e) {
- this.future = [], this.currentOpenStackElement && this.pushStackElement();
- var t = o(this.model), n = new r(this.model.getAlternativeVersionId(), t);
- this.model.setEOL(e), n.afterVersionId = this.model.getVersionId(), this.currentOpenStackElement = n, this.pushStackElement()
- }, e.prototype.pushEditOperation = function (t, n, o) {
- this.future = [];
- var r = null;
- this.currentOpenStackElement && (this.currentOpenStackElement instanceof i ? r = this.currentOpenStackElement : this.pushStackElement()), this.currentOpenStackElement || (r = new i(this.model.getAlternativeVersionId(), t), this.currentOpenStackElement = r);
- var s = {operations: this.model.applyEdits(n)};
- return r.editOperations.push(s), r.afterCursorState = e._computeCursorState(o, s.operations), r.afterVersionId = this.model.getVersionId(), r.afterCursorState
- }, e._computeCursorState = function (e, t) {
- try {
- return e ? e(t) : null
- } catch (e) {
- return n.onUnexpectedError(e), null
- }
- }, e.prototype.undo = function () {
- if (this.pushStackElement(), this.past.length > 0) {
- var e = this.past.pop();
- try {
- e.undo(this.model)
- } catch (e) {
- return n.onUnexpectedError(e), this.clear(), null
- }
- return this.future.push(e), {selections: e.beforeCursorState, recordedVersionId: e.beforeVersionId}
- }
- return null
- }, e.prototype.canUndo = function () {
- return this.past.length > 0 || null !== this.currentOpenStackElement
- }, e.prototype.redo = function () {
- if (this.future.length > 0) {
- var e = this.future.pop()
- ;
- try {
- e.redo(this.model)
- } catch (e) {
- return n.onUnexpectedError(e), this.clear(), null
- }
- return this.past.push(e), {selections: e.afterCursorState, recordedVersionId: e.afterVersionId}
- }
- return null
- }, e.prototype.canRedo = function () {
- return this.future.length > 0
- }, e
- }();
- t.EditStack = s
- })), define(n[343], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- this.spacesDiff = 0, this.looksLikeAlignment = !1
- };
- function i(e, t, n, i, o) {
- var r;
- for (o.spacesDiff = 0, o.looksLikeAlignment = !1, r = 0; r < t && r < i; r++) {
- if (e.charCodeAt(r) !== n.charCodeAt(r)) break
- }
- for (var s = 0, a = 0, l = r; l < t; l++) {
- 32 === e.charCodeAt(l) ? s++ : a++
- }
- var u = 0, d = 0;
- for (l = r; l < i; l++) {
- 32 === n.charCodeAt(l) ? u++ : d++
- }
- if (!(s > 0 && a > 0 || u > 0 && d > 0)) {
- var c = Math.abs(a - d), h = Math.abs(s - u);
- if (0 === c) return o.spacesDiff = h, void (h > 0 && 0 <= u - 1 && u - 1 < e.length && u < n.length && 32 !== n.charCodeAt(u) && 32 === e.charCodeAt(u - 1) && 44 === e.charCodeAt(e.length - 1) && (o.looksLikeAlignment = !0));
- h % c != 0 || (o.spacesDiff = h / c)
- }
- }
- t.guessIndentation = function (e, t, o) {
- for (var r = Math.min(e.getLineCount(), 1e4), s = 0, a = 0, l = "", u = 0, d = [0, 0, 0, 0, 0, 0, 0, 0, 0], c = new n, h = 1; h <= r; h++) {
- for (var p = e.getLineLength(h), g = e.getLineContent(h), f = p <= 65536, m = !1, v = 0, _ = 0, y = 0, C = 0, b = p; C < b; C++) {
- var S = f ? g.charCodeAt(C) : e.getLineCharCode(h, C);
- if (9 === S) y++; else {
- if (32 !== S) {
- m = !0, v = C;
- break
- }
- _++
- }
- }
- if (m && (y > 0 ? s++ : _ > 1 && a++, i(l, u, g, v, c), !c.looksLikeAlignment || o && t === c.spacesDiff)) {
- var w = c.spacesDiff;
- w <= 8 && d[w]++, l = g, u = v
- }
- }
- var E = o;
- s !== a && (E = s < a);
- var L = t;
- if (E) {
- var D = E ? 0 : .1 * r;
- [2, 4, 6, 8, 3, 5, 7].forEach((function (e) {
- var t = d[e];
- t > D && (D = t, L = e)
- })), 4 === L && d[4] > 0 && d[2] > 0 && d[2] >= d[4] / 2 && (L = 2)
- }
- return {insertSpaces: E, tabSize: L}
- }
- })), define(n[344], i([0, 1]), (function (e, t) {
- "use strict";
- function n(e) {
- return (1 & e.metadata) >>> 0
- }
- function i(e, t) {
- e.metadata = 254 & e.metadata | t << 0
- }
- function o(e) {
- return (2 & e.metadata) >>> 1 == 1
- }
- function r(e, t) {
- e.metadata = 253 & e.metadata | (t ? 1 : 0) << 1
- }
- function s(e) {
- return (4 & e.metadata) >>> 2 == 1
- }
- function a(e, t) {
- e.metadata = 251 & e.metadata | (t ? 1 : 0) << 2
- }
- function l(e, t) {
- e.metadata = 247 & e.metadata | (t ? 1 : 0) << 3
- }
- function u(e, t) {
- e.metadata = 207 & e.metadata | t << 4
- }
- function d(e, t) {
- e.metadata = 191 & e.metadata | (t ? 1 : 0) << 6
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getNodeColor = n, t.getNodeIsInOverviewRuler = function (e) {
- return (8 & e.metadata) >>> 3 == 1
- };
- var c = function () {
- function e(e, t, n) {
- this.metadata = 0, this.parent = this, this.left = this, this.right = this, i(this, 1), this.start = t, this.end = n, this.delta = 0, this.maxEnd = n, this.id = e, this.ownerId = 0, this.options = null, a(this, !1), u(this, 1), l(this, !1), d(this, !1), this.cachedVersionId = 0, this.cachedAbsoluteStart = t, this.cachedAbsoluteEnd = n, this.range = null, r(this, !1)
- }
- return e.prototype.reset = function (e, t, n, i) {
- this.start = t, this.end = n, this.maxEnd = n, this.cachedVersionId = e, this.cachedAbsoluteStart = t, this.cachedAbsoluteEnd = n, this.range = i
- }, e.prototype.setOptions = function (e) {
- this.options = e;
- var t = this.options.className;
- a(this, "squiggly-error" === t || "squiggly-warning" === t || "squiggly-info" === t), u(this, this.options.stickiness), l(this, !(!this.options.overviewRuler || !this.options.overviewRuler.color)),
- d(this, this.options.collapseOnReplaceEdit)
- }, e.prototype.setCachedOffsets = function (e, t, n) {
- this.cachedVersionId !== n && (this.range = null), this.cachedVersionId = n, this.cachedAbsoluteStart = e, this.cachedAbsoluteEnd = t
- }, e.prototype.detach = function () {
- this.parent = null, this.left = null, this.right = null
- }, e
- }();
- t.IntervalNode = c, t.SENTINEL = new c(null, 0, 0), t.SENTINEL.parent = t.SENTINEL, t.SENTINEL.left = t.SENTINEL, t.SENTINEL.right = t.SENTINEL, i(t.SENTINEL, 0);
- var h = function () {
- function e() {
- this.root = t.SENTINEL, this.requestNormalizeDelta = !1
- }
- return e.prototype.intervalSearch = function (e, n, i, a, l) {
- return this.root === t.SENTINEL ? [] : function (e, n, i, a, l, u) {
- var d = e.root, c = 0, h = 0, p = 0, g = [], f = 0;
- for (; d !== t.SENTINEL;) if (o(d)) r(d.left, !1), r(d.right, !1), d === d.parent.right && (c -= d.parent.delta), d = d.parent; else {
- if (!o(d.left)) {
- if (c + d.maxEnd < n) {
- r(d, !0);
- continue
- }
- if (d.left !== t.SENTINEL) {
- d = d.left;
- continue
- }
- }
- if ((h = c + d.start) > i) r(d, !0); else {
- if ((p = c + d.end) >= n) {
- d.setCachedOffsets(h, p, u);
- var m = !0;
- a && d.ownerId && d.ownerId !== a && (m = !1), l && s(d) && (m = !1), m && (g[f++] = d)
- }
- r(d, !0), d.right === t.SENTINEL || o(d.right) || (c += d.delta, d = d.right)
- }
- }
- return r(e.root, !1), g
- }(this, e, n, i, a, l)
- }, e.prototype.search = function (e, n, i) {
- return this.root === t.SENTINEL ? [] : function (e, n, i, a) {
- var l = e.root, u = 0, d = 0, c = 0, h = [], p = 0;
- for (; l !== t.SENTINEL;) if (o(l)) r(l.left, !1), r(l.right, !1), l === l.parent.right && (u -= l.parent.delta), l = l.parent; else if (l.left === t.SENTINEL || o(l.left)) {
- d = u + l.start, c = u + l.end, l.setCachedOffsets(d, c, a);
- var g = !0;
- n && l.ownerId && l.ownerId !== n && (g = !1), i && s(l) && (g = !1), g && (h[p++] = l), r(l, !0), l.right === t.SENTINEL || o(l.right) || (u += l.delta, l = l.right)
- } else l = l.left;
- return r(e.root, !1), h
- }(this, e, n, i)
- }, e.prototype.collectNodesFromOwner = function (e) {
- return function (e, n) {
- var i = e.root, s = [], a = 0;
- for (; i !== t.SENTINEL;) o(i) ? (r(i.left, !1), r(i.right, !1), i = i.parent) : i.left === t.SENTINEL || o(i.left) ? (i.ownerId === n && (s[a++] = i), r(i, !0), i.right === t.SENTINEL || o(i.right) || (i = i.right)) : i = i.left;
- return r(e.root, !1), s
- }(this, e)
- }, e.prototype.collectNodesPostOrder = function () {
- return function (e) {
- var n = e.root, i = [], s = 0
- ;
- for (; n !== t.SENTINEL;) o(n) ? (r(n.left, !1), r(n.right, !1), n = n.parent) : n.left === t.SENTINEL || o(n.left) ? n.right === t.SENTINEL || o(n.right) ? (i[s++] = n, r(n, !0)) : n = n.right : n = n.left;
- return r(e.root, !1), i
- }(this)
- }, e.prototype.insert = function (e) {
- f(this, e), this._normalizeDeltaIfNecessary()
- }, e.prototype.delete = function (e) {
- m(this, e), this._normalizeDeltaIfNecessary()
- }, e.prototype.resolveNode = function (e, t) {
- for (var n = e, i = 0; e !== this.root;) e === e.parent.right && (i += e.parent.delta), e = e.parent;
- var o = n.start + i, r = n.end + i;
- n.setCachedOffsets(o, r, t)
- }, e.prototype.acceptReplace = function (e, n, i, s) {
- for (var a = function (e, n, i) {
- var s = e.root, a = 0, l = 0, u = 0, d = [], c = 0;
- for (; s !== t.SENTINEL;) if (o(s)) r(s.left, !1), r(s.right, !1), s === s.parent.right && (a -= s.parent.delta), s = s.parent; else {
- if (!o(s.left)) {
- if (a + s.maxEnd < n) {
- r(s, !0);
- continue
- }
- if (s.left !== t.SENTINEL) {
- s = s.left;
- continue
- }
- }
- (l = a + s.start) > i ? r(s, !0) : ((u = a + s.end) >= n && (s.setCachedOffsets(l, u, 0), d[c++] = s), r(s, !0), s.right === t.SENTINEL || o(s.right) || (a += s.delta, s = s.right))
- }
- return r(e.root, !1), d
- }(this, e, e + n), l = 0, u = a.length; l < u; l++) {
- m(this, d = a[l])
- }
- this._normalizeDeltaIfNecessary(), function (e, n, i, s) {
- var a = e.root, l = 0, u = s - (i - n);
- for (; a !== t.SENTINEL;) if (o(a)) r(a.left, !1), r(a.right, !1), a === a.parent.right && (l -= a.parent.delta), b(a), a = a.parent; else {
- if (!o(a.left)) {
- if (l + a.maxEnd < n) {
- r(a, !0);
- continue
- }
- if (a.left !== t.SENTINEL) {
- a = a.left;
- continue
- }
- }
- l + a.start > i ? (a.start += u, a.end += u, a.delta += u, (a.delta < -1073741824 || a.delta > 1073741824) && (e.requestNormalizeDelta = !0), r(a, !0)) : (r(a, !0), a.right === t.SENTINEL || o(a.right) || (l += a.delta, a = a.right))
- }
- r(e.root, !1)
- }(this, e, e + n, i), this._normalizeDeltaIfNecessary();
- for (l = 0, u = a.length; l < u; l++) {
- var d;
- (d = a[l]).start = d.cachedAbsoluteStart, d.end = d.cachedAbsoluteEnd, g(d, e, e + n, i, s), d.maxEnd = d.end, f(this, d)
- }
- this._normalizeDeltaIfNecessary()
- }, e.prototype._normalizeDeltaIfNecessary = function () {
- this.requestNormalizeDelta && (this.requestNormalizeDelta = !1, function (e) {
- var n = e.root, i = 0;
- for (; n !== t.SENTINEL;) n.left === t.SENTINEL || o(n.left) ? n.right === t.SENTINEL || o(n.right) ? (n.start = i + n.start, n.end = i + n.end,
- n.delta = 0, b(n), r(n, !0), r(n.left, !1), r(n.right, !1), n === n.parent.right && (i -= n.parent.delta), n = n.parent) : (i += n.delta, n = n.right) : n = n.left;
- r(e.root, !1)
- }(this))
- }, e
- }();
- function p(e, t, n, i) {
- return e < n || !(e > n) && (1 !== i && (2 === i || t))
- }
- function g(e, t, n, i, o) {
- var r = function (e) {
- return (48 & e.metadata) >>> 4
- }(e), s = 0 === r || 2 === r, a = 1 === r || 2 === r, l = n - t, u = i, d = Math.min(l, u), c = e.start,
- h = !1, g = e.end, f = !1;
- t <= c && g <= n && function (e) {
- return (64 & e.metadata) >>> 6 == 1
- }(e) && (e.start = t, h = !0, e.end = t, f = !0);
- var m = o ? 1 : l > 0 ? 2 : 0;
- if (!h && p(c, s, t, m) && (h = !0), !f && p(g, a, t, m) && (f = !0), d > 0 && !o) {
- m = l > u ? 2 : 0;
- !h && p(c, s, t + d, m) && (h = !0), !f && p(g, a, t + d, m) && (f = !0)
- }
- m = o ? 1 : 0;
- !h && p(c, s, n, m) && (e.start = t + u, h = !0), !f && p(g, a, n, m) && (e.end = t + u, f = !0);
- var v = u - l;
- h || (e.start = Math.max(0, c + v)), f || (e.end = Math.max(0, g + v)), e.start > e.end && (e.end = e.start)
- }
- function f(e, o) {
- if (e.root === t.SENTINEL) return o.parent = t.SENTINEL, o.left = t.SENTINEL, o.right = t.SENTINEL, i(o, 0), e.root = o, e.root;
- !function (e, n) {
- var o = 0, r = e.root, s = n.start, a = n.end;
- for (; ;) {
- if (w(s, a, r.start + o, r.end + o) < 0) {
- if (r.left === t.SENTINEL) {
- n.start -= o,
- n.end -= o, n.maxEnd -= o, r.left = n;
- break
- }
- r = r.left
- } else {
- if (r.right === t.SENTINEL) {
- n.start -= o + r.delta, n.end -= o + r.delta, n.maxEnd -= o + r.delta, r.right = n;
- break
- }
- o += r.delta, r = r.right
- }
- }
- n.parent = r, n.left = t.SENTINEL, n.right = t.SENTINEL, i(n, 1)
- }(e, o), S(o.parent);
- for (var r = o; r !== e.root && 1 === n(r.parent);) {
- var s;
- if (r.parent === r.parent.parent.left) 1 === n(s = r.parent.parent.right) ? (i(r.parent, 0), i(s, 0), i(r.parent.parent, 1), r = r.parent.parent) : (r === r.parent.right && _(e, r = r.parent), i(r.parent, 0), i(r.parent.parent, 1), y(e, r.parent.parent)); else 1 === n(s = r.parent.parent.left) ? (i(r.parent, 0), i(s, 0), i(r.parent.parent, 1), r = r.parent.parent) : (r === r.parent.left && y(e, r = r.parent), i(r.parent, 0), i(r.parent.parent, 1), _(e, r.parent.parent))
- }
- return i(e.root, 0), o
- }
- function m(e, o) {
- var r, s;
- if (o.left === t.SENTINEL ? (s = o, (r = o.right).delta += o.delta, (r.delta < -1073741824 || r.delta > 1073741824) && (e.requestNormalizeDelta = !0), r.start += o.delta, r.end += o.delta) : o.right === t.SENTINEL ? (r = o.left, s = o) : ((r = (s = function (e) {
- for (; e.left !== t.SENTINEL;) e = e.left;
- return e
- }(o.right)).right).start += s.delta, r.end += s.delta, r.delta += s.delta, (r.delta < -1073741824 || r.delta > 1073741824) && (e.requestNormalizeDelta = !0), s.start += o.delta, s.end += o.delta, s.delta = o.delta, (s.delta < -1073741824 || s.delta > 1073741824) && (e.requestNormalizeDelta = !0)), s === e.root) return e.root = r, i(r, 0), o.detach(), v(), b(r), void (e.root.parent = t.SENTINEL);
- var a, l = 1 === n(s);
- if (s === s.parent.left ? s.parent.left = r : s.parent.right = r, s === o ? r.parent = s.parent : (s.parent === o ? r.parent = s : r.parent = s.parent, s.left = o.left, s.right = o.right, s.parent = o.parent, i(s, n(o)), o === e.root ? e.root = s : o === o.parent.left ? o.parent.left = s : o.parent.right = s, s.left !== t.SENTINEL && (s.left.parent = s), s.right !== t.SENTINEL && (s.right.parent = s)), o.detach(), l) return S(r.parent), s !== o && (S(s), S(s.parent)), void v();
- for (S(r), S(r.parent), s !== o && (S(s), S(s.parent)); r !== e.root && 0 === n(r);) r === r.parent.left ? (1 === n(a = r.parent.right) && (i(a, 0), i(r.parent, 1), _(e, r.parent), a = r.parent.right), 0 === n(a.left) && 0 === n(a.right) ? (i(a, 1), r = r.parent) : (0 === n(a.right) && (i(a.left, 0), i(a, 1), y(e, a),
- a = r.parent.right), i(a, n(r.parent)), i(r.parent, 0), i(a.right, 0), _(e, r.parent), r = e.root)) : (1 === n(a = r.parent.left) && (i(a, 0), i(r.parent, 1), y(e, r.parent), a = r.parent.left), 0 === n(a.left) && 0 === n(a.right) ? (i(a, 1), r = r.parent) : (0 === n(a.left) && (i(a.right, 0), i(a, 1), _(e, a), a = r.parent.left), i(a, n(r.parent)), i(r.parent, 0), i(a.left, 0), y(e, r.parent), r = e.root));
- i(r, 0), v()
- }
- function v() {
- t.SENTINEL.parent = t.SENTINEL, t.SENTINEL.delta = 0, t.SENTINEL.start = 0, t.SENTINEL.end = 0
- }
- function _(e, n) {
- var i = n.right;
- i.delta += n.delta, (i.delta < -1073741824 || i.delta > 1073741824) && (e.requestNormalizeDelta = !0), i.start += n.delta, i.end += n.delta, n.right = i.left, i.left !== t.SENTINEL && (i.left.parent = n), i.parent = n.parent, n.parent === t.SENTINEL ? e.root = i : n === n.parent.left ? n.parent.left = i : n.parent.right = i, i.left = n, n.parent = i, b(n), b(i)
- }
- function y(e, n) {
- var i = n.left;
- n.delta -= i.delta, (n.delta < -1073741824 || n.delta > 1073741824) && (e.requestNormalizeDelta = !0), n.start -= i.delta, n.end -= i.delta, n.left = i.right, i.right !== t.SENTINEL && (i.right.parent = n), i.parent = n.parent,
- n.parent === t.SENTINEL ? e.root = i : n === n.parent.right ? n.parent.right = i : n.parent.left = i, i.right = n, n.parent = i, b(n), b(i)
- }
- function C(e) {
- var n = e.end;
- if (e.left !== t.SENTINEL) {
- var i = e.left.maxEnd;
- i > n && (n = i)
- }
- if (e.right !== t.SENTINEL) {
- var o = e.right.maxEnd + e.delta;
- o > n && (n = o)
- }
- return n
- }
- function b(e) {
- e.maxEnd = C(e)
- }
- function S(e) {
- for (; e !== t.SENTINEL;) {
- var n = C(e);
- if (e.maxEnd === n) return;
- e.maxEnd = n, e = e.parent
- }
- }
- function w(e, t, n, i) {
- return e === n ? t - i : e - n
- }
- t.IntervalTree = h, t.nodeAcceptEdit = g, t.recomputeMaxEnd = b, t.intervalCompare = w
- })), define(n[345], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t) {
- this.piece = e, this.color = t, this.size_left = 0, this.lf_left = 0, this.parent = this, this.left = this, this.right = this
- }
- return e.prototype.next = function () {
- if (this.right !== t.SENTINEL) return i(this.right);
- for (var e = this; e.parent !== t.SENTINEL && e.parent.left !== e;) e = e.parent;
- return e.parent === t.SENTINEL ? t.SENTINEL : e.parent
- }, e.prototype.prev = function () {
- if (this.left !== t.SENTINEL) return o(this.left)
- ;
- for (var e = this; e.parent !== t.SENTINEL && e.parent.right !== e;) e = e.parent;
- return e.parent === t.SENTINEL ? t.SENTINEL : e.parent
- }, e.prototype.detach = function () {
- this.parent = null, this.left = null, this.right = null
- }, e
- }();
- function i(e) {
- for (; e.left !== t.SENTINEL;) e = e.left;
- return e
- }
- function o(e) {
- for (; e.right !== t.SENTINEL;) e = e.right;
- return e
- }
- function r(e) {
- return e === t.SENTINEL ? 0 : e.size_left + e.piece.length + r(e.right)
- }
- function s(e) {
- return e === t.SENTINEL ? 0 : e.lf_left + e.piece.lineFeedCnt + s(e.right)
- }
- function a() {
- t.SENTINEL.parent = t.SENTINEL
- }
- function l(e, n) {
- var i = n.right;
- i.size_left += n.size_left + (n.piece ? n.piece.length : 0), i.lf_left += n.lf_left + (n.piece ? n.piece.lineFeedCnt : 0), n.right = i.left, i.left !== t.SENTINEL && (i.left.parent = n), i.parent = n.parent, n.parent === t.SENTINEL ? e.root = i : n.parent.left === n ? n.parent.left = i : n.parent.right = i, i.left = n, n.parent = i
- }
- function u(e, n) {
- var i = n.left;
- n.left = i.right, i.right !== t.SENTINEL && (i.right.parent = n), i.parent = n.parent, n.size_left -= i.size_left + (i.piece ? i.piece.length : 0),
- n.lf_left -= i.lf_left + (i.piece ? i.piece.lineFeedCnt : 0), n.parent === t.SENTINEL ? e.root = i : n === n.parent.right ? n.parent.right = i : n.parent.left = i, i.right = n, n.parent = i
- }
- function d(e, n, i, o) {
- for (; n !== e.root && n !== t.SENTINEL;) n.parent.left === n && (n.parent.size_left += i, n.parent.lf_left += o), n = n.parent
- }
- function c(e, t) {
- var n = 0, i = 0;
- if (t !== e.root) {
- if (0 === n) {
- for (; t !== e.root && t === t.parent.right;) t = t.parent;
- if (t === e.root) return;
- n = r((t = t.parent).left) - t.size_left, i = s(t.left) - t.lf_left, t.size_left += n, t.lf_left += i
- }
- for (; t !== e.root && (0 !== n || 0 !== i);) t.parent.left === t && (t.parent.size_left += n, t.parent.lf_left += i), t = t.parent
- }
- }
- t.TreeNode = n, t.SENTINEL = new n(null, 0), t.SENTINEL.parent = t.SENTINEL, t.SENTINEL.left = t.SENTINEL, t.SENTINEL.right = t.SENTINEL, t.SENTINEL.color = 0, t.leftest = i, t.righttest = o, t.calculateSize = r, t.calculateLF = s, t.resetSentinel = a, t.leftRotate = l, t.rightRotate = u, t.rbDelete = function (e, n) {
- var o, h;
- if (o = n.left === t.SENTINEL ? (h = n).right : n.right === t.SENTINEL ? (h = n).left : (h = i(n.right)).right, h === e.root) return e.root = o, o.color = 0, n.detach(), a(),
- void (e.root.parent = t.SENTINEL);
- var p = 1 === h.color;
- if (h === h.parent.left ? h.parent.left = o : h.parent.right = o, h === n ? (o.parent = h.parent, c(e, o)) : (h.parent === n ? o.parent = h : o.parent = h.parent, c(e, o), h.left = n.left, h.right = n.right, h.parent = n.parent, h.color = n.color, n === e.root ? e.root = h : n === n.parent.left ? n.parent.left = h : n.parent.right = h, h.left !== t.SENTINEL && (h.left.parent = h), h.right !== t.SENTINEL && (h.right.parent = h), h.size_left = n.size_left, h.lf_left = n.lf_left, c(e, h)), n.detach(), o.parent.left === o) {
- var g = r(o), f = s(o);
- if (g !== o.parent.size_left || f !== o.parent.lf_left) {
- var m = g - o.parent.size_left, v = f - o.parent.lf_left;
- o.parent.size_left = g, o.parent.lf_left = f, d(e, o.parent, m, v)
- }
- }
- if (c(e, o.parent), p) a(); else {
- for (var _; o !== e.root && 0 === o.color;) o === o.parent.left ? (1 === (_ = o.parent.right).color && (_.color = 0, o.parent.color = 1, l(e, o.parent), _ = o.parent.right), 0 === _.left.color && 0 === _.right.color ? (_.color = 1, o = o.parent) : (0 === _.right.color && (_.left.color = 0, _.color = 1, u(e, _), _ = o.parent.right), _.color = o.parent.color, o.parent.color = 0, _.right.color = 0,
- l(e, o.parent), o = e.root)) : (1 === (_ = o.parent.left).color && (_.color = 0, o.parent.color = 1, u(e, o.parent), _ = o.parent.left), 0 === _.left.color && 0 === _.right.color ? (_.color = 1, o = o.parent) : (0 === _.left.color && (_.right.color = 0, _.color = 1, l(e, _), _ = o.parent.left), _.color = o.parent.color, o.parent.color = 0, _.left.color = 0, u(e, o.parent), o = e.root));
- o.color = 0, a()
- }
- }, t.fixInsert = function (e, t) {
- for (c(e, t); t !== e.root && 1 === t.parent.color;) {
- var n;
- if (t.parent === t.parent.parent.left) 1 === (n = t.parent.parent.right).color ? (t.parent.color = 0, n.color = 0, t.parent.parent.color = 1, t = t.parent.parent) : (t === t.parent.right && l(e, t = t.parent), t.parent.color = 0, t.parent.parent.color = 1, u(e, t.parent.parent)); else 1 === (n = t.parent.parent.left).color ? (t.parent.color = 0, n.color = 0, t.parent.parent.color = 1, t = t.parent.parent) : (t === t.parent.left && u(e, t = t.parent), t.parent.color = 0, t.parent.parent.color = 1, l(e, t.parent.parent))
- }
- e.root.color = 0
- }, t.updateTreeMetadata = d, t.recomputeTreeMetadata = c
- })), define(n[346], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var n = function () {
- this.changeType = 1
- };
- t.ModelRawFlush = n;
- var i = function (e, t) {
- this.changeType = 2, this.lineNumber = e, this.detail = t
- };
- t.ModelRawLineChanged = i;
- var o = function (e, t) {
- this.changeType = 3, this.fromLineNumber = e, this.toLineNumber = t
- };
- t.ModelRawLinesDeleted = o;
- var r = function (e, t, n) {
- this.changeType = 4, this.fromLineNumber = e, this.toLineNumber = t, this.detail = n
- };
- t.ModelRawLinesInserted = r;
- var s = function () {
- this.changeType = 5
- };
- t.ModelRawEOLChanged = s;
- var a = function () {
- function e(e, t, n, i) {
- this.changes = e, this.versionId = t, this.isUndoing = n, this.isRedoing = i
- }
- return e.prototype.containsEvent = function (e) {
- for (var t = 0, n = this.changes.length; t < n; t++) {
- if (this.changes[t].changeType === e) return !0
- }
- return !1
- }, e.merge = function (t, n) {
- return new e([].concat(t.changes).concat(n.changes), n.versionId, t.isUndoing || n.isUndoing, t.isRedoing || n.isRedoing)
- }, e
- }();
- t.ModelRawContentChangedEvent = a;
- var l = function () {
- function e(e, t) {
- this.rawContentChangedEvent = e, this.contentChangedEvent = t
- }
- return e.prototype.merge = function (t) {
- var n = a.merge(this.rawContentChangedEvent, t.rawContentChangedEvent),
- i = e._mergeChangeEvents(this.contentChangedEvent, t.contentChangedEvent);
- return new e(n, i)
- }, e._mergeChangeEvents = function (e, t) {
- return {
- changes: [].concat(e.changes).concat(t.changes),
- eol: t.eol,
- versionId: t.versionId,
- isUndoing: e.isUndoing || t.isUndoing,
- isRedoing: e.isRedoing || t.isRedoing,
- isFlush: e.isFlush || t.isFlush
- }
- }, e
- }();
- t.InternalModelContentChangeEvent = l
- })), define(n[144], i([0, 1, 5, 89, 13, 3, 48]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e, t, n, i) {
- this.searchString = e, this.isRegex = t, this.matchCase = n, this.wordSeparators = i
- }
- return e.prototype.parseSearchRequest = function () {
- if ("" === this.searchString) return null;
- var e;
- e = this.isRegex ? l(this.searchString) : this.searchString.indexOf("\n") >= 0;
- var t = null;
- try {
- t = n.createRegExp(this.searchString, this.isRegex, {
- matchCase: this.matchCase,
- wholeWord: !1,
- multiline: e,
- global: !0,
- unicode: !0
- })
- } catch (e) {
- return null
- }
- if (!t) return null;
- var o = !this.isRegex && !e
- ;
- return o && this.searchString.toLowerCase() !== this.searchString.toUpperCase() && (o = this.matchCase), new u(t, this.wordSeparators ? i.getMapForWordSeparators(this.wordSeparators) : null, o ? this.searchString : null)
- }, e
- }();
- function l(e) {
- if (!e || 0 === e.length) return !1;
- for (var t = 0, n = e.length; t < n; t++) {
- if (92 === e.charCodeAt(t)) {
- if (++t >= n) break;
- var i = e.charCodeAt(t);
- if (110 === i || 114 === i || 87 === i || 119 === i) return !0
- }
- }
- return !1
- }
- t.SearchParams = a, t.isMultilineRegexSource = l;
- var u = function (e, t, n) {
- this.regex = e, this.wordSeparators = t, this.simpleSearch = n
- };
- function d(e, t, n) {
- if (!n) return new s.FindMatch(e, null);
- for (var i = [], o = 0, r = t.length; o < r; o++) i[o] = t[o];
- return new s.FindMatch(e, i)
- }
- t.SearchData = u, t.createFindMatch = d;
- var c = function () {
- function e(e) {
- for (var t = [], n = 0, i = 0, o = e.length; i < o; i++) 10 === e.charCodeAt(i) && (t[n++] = i);
- this._lineFeedsOffsets = t
- }
- return e.prototype.findLineFeedCountBeforeOffset = function (e) {
- var t = this._lineFeedsOffsets, n = 0, i = t.length - 1;
- if (-1 === i) return 0;
- if (e <= t[0]) return 0;
- for (; n < i;) {
- var o = n + ((i - n) / 2 >> 0)
- ;t[o] >= e ? i = o - 1 : t[o + 1] >= e ? (n = o, i = o) : n = o + 1
- }
- return n + 1
- }, e
- }(), h = function () {
- function e() {
- }
- return e.findMatches = function (e, t, n, i, o) {
- var r = t.parseSearchRequest();
- return r ? r.regex.multiline ? this._doFindMatchesMultiline(e, n, new g(r.wordSeparators, r.regex), i, o) : this._doFindMatchesLineByLine(e, n, r, i, o) : []
- }, e._getMultilineMatchRange = function (e, t, n, i, o, s) {
- var a, l, u = 0;
- if (a = i ? t + o + (u = i.findLineFeedCountBeforeOffset(o)) : t + o, i) {
- var d = i.findLineFeedCountBeforeOffset(o + s.length) - u;
- l = a + s.length + d
- } else l = a + s.length;
- var c = e.getPositionAt(a), h = e.getPositionAt(l);
- return new r.Range(c.lineNumber, c.column, h.lineNumber, h.column)
- }, e._doFindMatchesMultiline = function (e, t, n, i, o) {
- var r, s = e.getOffsetAt(t.getStartPosition()), a = e.getValueInRange(t, 1),
- l = "\r\n" === e.getEOL() ? new c(a) : null, u = [], h = 0;
- for (n.reset(0); r = n.next(a);) if (u[h++] = d(this._getMultilineMatchRange(e, s, a, l, r.index, r[0]), r, i), h >= o) return u;
- return u
- }, e._doFindMatchesLineByLine = function (e, t, n, i, o) {
- var r = [], s = 0;
- if (t.startLineNumber === t.endLineNumber) {
- var a = e.getLineContent(t.startLineNumber).substring(t.startColumn - 1, t.endColumn - 1);
- return s = this._findMatchesInLine(n, a, t.startLineNumber, t.startColumn - 1, s, r, i, o), r
- }
- var l = e.getLineContent(t.startLineNumber).substring(t.startColumn - 1);
- s = this._findMatchesInLine(n, l, t.startLineNumber, t.startColumn - 1, s, r, i, o);
- for (var u = t.startLineNumber + 1; u < t.endLineNumber && s < o; u++) s = this._findMatchesInLine(n, e.getLineContent(u), u, 0, s, r, i, o);
- if (s < o) {
- var d = e.getLineContent(t.endLineNumber).substring(0, t.endColumn - 1);
- s = this._findMatchesInLine(n, d, t.endLineNumber, 0, s, r, i, o)
- }
- return r
- }, e._findMatchesInLine = function (e, t, n, i, o, a, l, u) {
- var c = e.wordSeparators;
- if (!l && e.simpleSearch) {
- for (var h = e.simpleSearch, f = h.length, m = t.length, v = -f; -1 !== (v = t.indexOf(h, v + f));) if ((!c || p(c, t, m, v, f)) && (a[o++] = new s.FindMatch(new r.Range(n, v + 1 + i, n, v + 1 + f + i), null), o >= u)) return o;
- return o
- }
- var _, y = new g(e.wordSeparators, e.regex);
- y.reset(0);
- do {
- if ((_ = y.next(t)) && (a[o++] = d(new r.Range(n, _.index + 1 + i, n, _.index + 1 + _[0].length + i), _, l), o >= u)) return o
- } while (_);
- return o
- },
- e.findNextMatch = function (e, t, n, i) {
- var o = t.parseSearchRequest();
- if (!o) return null;
- var r = new g(o.wordSeparators, o.regex);
- return o.regex.multiline ? this._doFindNextMatchMultiline(e, n, r, i) : this._doFindNextMatchLineByLine(e, n, r, i)
- }, e._doFindNextMatchMultiline = function (e, t, n, i) {
- var s = new o.Position(t.lineNumber, 1), a = e.getOffsetAt(s), l = e.getLineCount(),
- u = e.getValueInRange(new r.Range(s.lineNumber, s.column, l, e.getLineMaxColumn(l)), 1),
- h = "\r\n" === e.getEOL() ? new c(u) : null;
- n.reset(t.column - 1);
- var p = n.next(u);
- return p ? d(this._getMultilineMatchRange(e, a, u, h, p.index, p[0]), p, i) : 1 !== t.lineNumber || 1 !== t.column ? this._doFindNextMatchMultiline(e, new o.Position(1, 1), n, i) : null
- }, e._doFindNextMatchLineByLine = function (e, t, n, i) {
- var o = e.getLineCount(), r = t.lineNumber, s = e.getLineContent(r),
- a = this._findFirstMatchInLine(n, s, r, t.column, i);
- if (a) return a;
- for (var l = 1; l <= o; l++) {
- var u = (r + l - 1) % o, d = e.getLineContent(u + 1),
- c = this._findFirstMatchInLine(n, d, u + 1, 1, i);
- if (c) return c
- }
- return null
- }, e._findFirstMatchInLine = function (e, t, n, i, o) {
- e.reset(i - 1)
- ;var s = e.next(t);
- return s ? d(new r.Range(n, s.index + 1, n, s.index + 1 + s[0].length), s, o) : null
- }, e.findPreviousMatch = function (e, t, n, i) {
- var o = t.parseSearchRequest();
- if (!o) return null;
- var r = new g(o.wordSeparators, o.regex);
- return o.regex.multiline ? this._doFindPreviousMatchMultiline(e, n, r, i) : this._doFindPreviousMatchLineByLine(e, n, r, i)
- }, e._doFindPreviousMatchMultiline = function (e, t, n, i) {
- var s = this._doFindMatchesMultiline(e, new r.Range(1, 1, t.lineNumber, t.column), n, i, 9990);
- if (s.length > 0) return s[s.length - 1];
- var a = e.getLineCount();
- return t.lineNumber !== a || t.column !== e.getLineMaxColumn(a) ? this._doFindPreviousMatchMultiline(e, new o.Position(a, e.getLineMaxColumn(a)), n, i) : null
- }, e._doFindPreviousMatchLineByLine = function (e, t, n, i) {
- var o = e.getLineCount(), r = t.lineNumber, s = e.getLineContent(r).substring(0, t.column - 1),
- a = this._findLastMatchInLine(n, s, r, i);
- if (a) return a;
- for (var l = 1; l <= o; l++) {
- var u = (o + r - l - 1) % o, d = e.getLineContent(u + 1),
- c = this._findLastMatchInLine(n, d, u + 1, i);
- if (c) return c
- }
- return null
- }, e._findLastMatchInLine = function (e, t, n, i) {
- var o, s = null;
- for (e.reset(0); o = e.next(t);) s = d(new r.Range(n, o.index + 1, n, o.index + 1 + o[0].length), o, i);
- return s
- }, e
- }();
- function p(e, t, n, i, o) {
- return function (e, t, n, i, o) {
- if (0 === i) return !0;
- var r = t.charCodeAt(i - 1);
- if (0 !== e.get(r)) return !0;
- if (13 === r || 10 === r) return !0;
- if (o > 0) {
- var s = t.charCodeAt(i);
- if (0 !== e.get(s)) return !0
- }
- return !1
- }(e, t, 0, i, o) && function (e, t, n, i, o) {
- if (i + o === n) return !0;
- var r = t.charCodeAt(i + o);
- if (0 !== e.get(r)) return !0;
- if (13 === r || 10 === r) return !0;
- if (o > 0) {
- var s = t.charCodeAt(i + o - 1);
- if (0 !== e.get(s)) return !0
- }
- return !1
- }(e, t, n, i, o)
- }
- t.TextModelSearch = h, t.isValidMatch = p;
- var g = function () {
- function e(e, t) {
- this._wordSeparators = e, this._searchRegex = t, this._prevMatchStartIndex = -1, this._prevMatchLength = 0
- }
- return e.prototype.reset = function (e) {
- this._searchRegex.lastIndex = e, this._prevMatchStartIndex = -1, this._prevMatchLength = 0
- }, e.prototype.next = function (e) {
- var t, n = e.length;
- do {
- if (this._prevMatchStartIndex + this._prevMatchLength === n) return null;
- if (!(t = this._searchRegex.exec(e))) return null;
- var i = t.index, o = t[0].length
- ;
- if (i === this._prevMatchStartIndex && o === this._prevMatchLength) {
- if (0 === o) {
- this._searchRegex.lastIndex += 1;
- continue
- }
- return null
- }
- if (this._prevMatchStartIndex = i, this._prevMatchLength = o, !this._wordSeparators || p(this._wordSeparators, e, n, i, o)) return t
- } while (t);
- return null
- }, e
- }();
- t.Searcher = g
- })), define(n[191], i([0, 1, 13, 3, 48, 345, 144]), (function (e, t, n, i, o, r, s) {
- "use strict";
- function a(e) {
- var t;
- return (t = e[e.length - 1] < 65536 ? new Uint16Array(e.length) : new Uint32Array(e.length)).set(e, 0), t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.AverageBufferSize = 65535, t.createUintArray = a;
- var l = function (e, t, n, i, o) {
- this.lineStarts = e, this.cr = t, this.lf = n, this.crlf = i, this.isBasicASCII = o
- };
- function u(e, t) {
- void 0 === t && (t = !0);
- for (var n = [0], i = 1, o = 0, r = e.length; o < r; o++) {
- var s = e.charCodeAt(o);
- 13 === s ? o + 1 < r && 10 === e.charCodeAt(o + 1) ? (n[i++] = o + 2, o++) : n[i++] = o + 1 : 10 === s && (n[i++] = o + 1)
- }
- return t ? a(n) : n
- }
- t.LineStarts = l, t.createLineStartsFast = u, t.createLineStarts = function (e, t) {
- e.length = 0, e[0] = 0;
- for (var n = 1, i = 0, o = 0, r = 0, s = !0, u = 0, d = t.length; u < d; u++) {
- var c = t.charCodeAt(u);
- 13 === c ? u + 1 < d && 10 === t.charCodeAt(u + 1) ? (r++, e[n++] = u + 2, u++) : (i++, e[n++] = u + 1) : 10 === c ? (o++, e[n++] = u + 1) : s && 9 !== c && (c < 32 || c > 126) && (s = !1)
- }
- var h = new l(a(e), i, o, r, s);
- return e.length = 0, h
- };
- var d = function (e, t, n, i, o) {
- this.bufferIndex = e, this.start = t, this.end = n, this.lineFeedCnt = i, this.length = o
- };
- t.Piece = d;
- var c = function (e, t) {
- this.buffer = e, this.lineStarts = t
- };
- t.StringBuffer = c;
- var h = function () {
- function e(e) {
- this._limit = e, this._cache = []
- }
- return e.prototype.get = function (e) {
- for (var t = this._cache.length - 1; t >= 0; t--) {
- var n = this._cache[t];
- if (n.nodeStartOffset <= e && n.nodeStartOffset + n.node.piece.length >= e) return n
- }
- return null
- }, e.prototype.get2 = function (e) {
- for (var t = this._cache.length - 1; t >= 0; t--) {
- var n = this._cache[t];
- if (n.nodeStartLineNumber && n.nodeStartLineNumber < e && n.nodeStartLineNumber + n.node.piece.lineFeedCnt >= e) return n
- }
- return null
- }, e.prototype.set = function (e) {
- this._cache.length >= this._limit && this._cache.shift(), this._cache.push(e)
- }, e.prototype.valdiate = function (e) {
- for (var t = !1, n = this._cache, i = 0; i < n.length; i++) {
- var o = n[i];
- (null === o.node.parent || o.nodeStartOffset >= e) && (n[i] = null, t = !0)
- }
- if (t) {
- for (var r = [], s = 0, a = n; s < a.length; s++) {
- var l = a[s];
- null !== l && r.push(l)
- }
- this._cache = r
- }
- }, e
- }(), p = function () {
- function e(e, t, n) {
- this.create(e, t, n)
- }
- return e.prototype.create = function (e, t, n) {
- this._buffers = [new c("", [0])], this._lastChangeBufferPos = {
- line: 0,
- column: 0
- }, this.root = r.SENTINEL, this._lineCnt = 1, this._length = 0, this._EOL = t, this._EOLLength = t.length, this._EOLNormalized = n;
- for (var i = null, o = 0, s = e.length; o < s; o++) if (e[o].buffer.length > 0) {
- e[o].lineStarts || (e[o].lineStarts = u(e[o].buffer));
- var a = new d(o + 1, {line: 0, column: 0}, {
- line: e[o].lineStarts.length - 1,
- column: e[o].buffer.length - e[o].lineStarts[e[o].lineStarts.length - 1]
- }, e[o].lineStarts.length - 1, e[o].buffer.length);
- this._buffers.push(e[o]), i = this.rbInsertRight(i, a)
- }
- this._searchCache = new h(1), this._lastVisitedLine = {
- lineNumber: 0,
- value: ""
- }, this.computeBufferMetadata()
- }, e.prototype.normalizeEOL = function (e) {
- var n = this, i = t.AverageBufferSize, o = i - Math.floor(i / 3), r = 2 * o, s = "", a = 0, l = []
- ;
- if (this.iterate(this.root, (function (t) {
- var i = n.getNodeContent(t), d = i.length;
- if (a <= o || a + d < r) return s += i, a += d, !0;
- var h = s.replace(/\r\n|\r|\n/g, e);
- return l.push(new c(h, u(h))), s = i, a = d, !0
- })), a > 0) {
- var d = s.replace(/\r\n|\r|\n/g, e);
- l.push(new c(d, u(d)))
- }
- this.create(l, e, !0)
- }, e.prototype.getEOL = function () {
- return this._EOL
- }, e.prototype.setEOL = function (e) {
- this._EOL = e, this._EOLLength = this._EOL.length, this.normalizeEOL(e)
- }, e.prototype.getOffsetAt = function (e, t) {
- for (var n = 0, i = this.root; i !== r.SENTINEL;) if (i.left !== r.SENTINEL && i.lf_left + 1 >= e) i = i.left; else {
- if (i.lf_left + i.piece.lineFeedCnt + 1 >= e) return (n += i.size_left) + (this.getAccumulatedValue(i, e - i.lf_left - 2) + t - 1);
- e -= i.lf_left + i.piece.lineFeedCnt, n += i.size_left + i.piece.length, i = i.right
- }
- return n
- }, e.prototype.getPositionAt = function (e) {
- e = Math.floor(e), e = Math.max(0, e);
- for (var t = this.root, i = 0, o = e; t !== r.SENTINEL;) if (0 !== t.size_left && t.size_left >= e) t = t.left; else {
- if (t.size_left + t.piece.length >= e) {
- var s = this.getIndexOf(t, e - t.size_left);
- if (i += t.lf_left + s.index, 0 === s.index) {
- var a = o - this.getOffsetAt(i + 1, 1);
- return new n.Position(i + 1, a + 1)
- }
- return new n.Position(i + 1, s.remainder + 1)
- }
- if (e -= t.size_left + t.piece.length, i += t.lf_left + t.piece.lineFeedCnt, t.right === r.SENTINEL) {
- a = o - e - this.getOffsetAt(i + 1, 1);
- return new n.Position(i + 1, a + 1)
- }
- t = t.right
- }
- return new n.Position(1, 1)
- }, e.prototype.getValueInRange = function (e, t) {
- if (e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn) return "";
- var n = this.nodeAt2(e.startLineNumber, e.startColumn), i = this.nodeAt2(e.endLineNumber, e.endColumn),
- o = this.getValueInRange2(n, i);
- return t ? t === this._EOL && this._EOLNormalized && t === this.getEOL() && this._EOLNormalized ? o : o.replace(/\r\n|\r|\n/g, t) : o
- }, e.prototype.getValueInRange2 = function (e, t) {
- if (e.node === t.node) {
- var n = e.node, i = this._buffers[n.piece.bufferIndex].buffer,
- o = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
- return i.substring(o + e.remainder, o + t.remainder)
- }
- var s = e.node, a = this._buffers[s.piece.bufferIndex].buffer,
- l = this.offsetInBuffer(s.piece.bufferIndex, s.piece.start),
- u = a.substring(l + e.remainder, l + s.piece.length);
- for (s = s.next(); s !== r.SENTINEL;) {
- var d = this._buffers[s.piece.bufferIndex].buffer,
- c = this.offsetInBuffer(s.piece.bufferIndex, s.piece.start);
- if (s === t.node) {
- u += d.substring(c, c + t.remainder);
- break
- }
- u += d.substr(c, s.piece.length), s = s.next()
- }
- return u
- }, e.prototype.getLinesContent = function () {
- var e = this, t = [], n = 0, i = "", o = !1;
- return this.iterate(this.root, (function (s) {
- if (s === r.SENTINEL) return !0;
- var a = s.piece, l = a.length;
- if (0 === l) return !0;
- var u = e._buffers[a.bufferIndex].buffer, d = e._buffers[a.bufferIndex].lineStarts,
- c = a.start.line, h = a.end.line, p = d[c] + a.start.column;
- if (o && (10 === u.charCodeAt(p) && (p++, l--), t[n++] = i, i = "", o = !1, 0 === l)) return !0;
- if (c === h) return e._EOLNormalized || 13 !== u.charCodeAt(p + l - 1) ? i += u.substr(p, l) : (o = !0, i += u.substr(p, l - 1)), !0;
- i += e._EOLNormalized ? u.substring(p, Math.max(p, d[c + 1] - e._EOLLength)) : u.substring(p, d[c + 1]).replace(/(\r\n|\r|\n)$/, ""), t[n++] = i
- ;
- for (var g = c + 1; g < h; g++) i = e._EOLNormalized ? u.substring(d[g], d[g + 1] - e._EOLLength) : u.substring(d[g], d[g + 1]).replace(/(\r\n|\r|\n)$/, ""), t[n++] = i;
- return e._EOLNormalized || 13 !== u.charCodeAt(d[h] + a.end.column - 1) ? i = u.substr(d[h], a.end.column) : (o = !0, 0 === a.end.column ? n-- : i = u.substr(d[h], a.end.column - 1)), !0
- })), o && (t[n++] = i, i = ""), t[n++] = i, t
- }, e.prototype.getLength = function () {
- return this._length
- }, e.prototype.getLineCount = function () {
- return this._lineCnt
- }, e.prototype.getLineContent = function (e) {
- return this._lastVisitedLine.lineNumber === e ? this._lastVisitedLine.value : (this._lastVisitedLine.lineNumber = e, e === this._lineCnt ? this._lastVisitedLine.value = this.getLineRawContent(e) : this._EOLNormalized ? this._lastVisitedLine.value = this.getLineRawContent(e, this._EOLLength) : this._lastVisitedLine.value = this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/, ""), this._lastVisitedLine.value)
- }, e.prototype.getLineCharCode = function (e, t) {
- var n = this.nodeAt2(e, t + 1);
- if (n.remainder === n.node.piece.length) {
- var i = n.node.next();
- if (!i) return 0
- ;
- var o = this._buffers[i.piece.bufferIndex],
- r = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start);
- return o.buffer.charCodeAt(r)
- }
- o = this._buffers[n.node.piece.bufferIndex];
- var s = (r = this.offsetInBuffer(n.node.piece.bufferIndex, n.node.piece.start)) + n.remainder;
- return o.buffer.charCodeAt(s)
- }, e.prototype.getLineLength = function (e) {
- if (e === this.getLineCount()) {
- var t = this.getOffsetAt(e, 1);
- return this.getLength() - t
- }
- return this.getOffsetAt(e + 1, 1) - this.getOffsetAt(e, 1) - this._EOLLength
- }, e.prototype.findMatchesInNode = function (e, t, n, o, r, a, l, u, d, c, h) {
- var p, g, f, m = this._buffers[e.piece.bufferIndex],
- v = this.offsetInBuffer(e.piece.bufferIndex, e.piece.start),
- _ = this.offsetInBuffer(e.piece.bufferIndex, r), y = this.offsetInBuffer(e.piece.bufferIndex, a),
- C = {line: 0, column: 0};
- t._wordSeparators ? (g = m.buffer.substring(_, y), f = function (e) {
- return e + _
- }, t.reset(-1)) : (g = m.buffer, f = function (e) {
- return e
- }, t.reset(_));
- do {
- if (p = t.next(g)) {
- if (f(p.index) >= y) return c;
- this.positionInBuffer(e, f(p.index) - v, C)
- ;var b = this.getLineFeedCnt(e.piece.bufferIndex, r, C),
- S = C.line === r.line ? C.column - r.column + o : C.column + 1, w = S + p[0].length;
- if (h[c++] = s.createFindMatch(new i.Range(n + b, S, n + b, w), p, u), f(p.index) + p[0].length >= y) return c;
- if (c >= d) return c
- }
- } while (p);
- return c
- }, e.prototype.findMatchesLineByLine = function (e, t, n, i) {
- var o = [], r = 0, a = new s.Searcher(t.wordSeparators, t.regex),
- l = this.nodeAt2(e.startLineNumber, e.startColumn);
- if (null === l) return [];
- var u = this.nodeAt2(e.endLineNumber, e.endColumn);
- if (null === u) return [];
- var d = this.positionInBuffer(l.node, l.remainder), c = this.positionInBuffer(u.node, u.remainder);
- if (l.node === u.node) return this.findMatchesInNode(l.node, a, e.startLineNumber, e.startColumn, d, c, t, n, i, r, o), o;
- for (var h = e.startLineNumber, p = l.node; p !== u.node;) {
- var g = this.getLineFeedCnt(p.piece.bufferIndex, d, p.piece.end);
- if (g >= 1) {
- var f = this._buffers[p.piece.bufferIndex].lineStarts,
- m = this.offsetInBuffer(p.piece.bufferIndex, p.piece.start), v = f[d.line + g],
- _ = h === e.startLineNumber ? e.startColumn : 1
- ;
- if ((r = this.findMatchesInNode(p, a, h, _, d, this.positionInBuffer(p, v - m), t, n, i, r, o)) >= i) return o;
- h += g
- }
- var y = h === e.startLineNumber ? e.startColumn - 1 : 0;
- if (h === e.endLineNumber) {
- var C = this.getLineContent(h).substring(y, e.endColumn - 1);
- return r = this._findMatchesInLine(t, a, C, e.endLineNumber, y, r, o, n, i), o
- }
- if ((r = this._findMatchesInLine(t, a, this.getLineContent(h).substr(y), h, y, r, o, n, i)) >= i) return o;
- h++, p = (l = this.nodeAt2(h, 1)).node, d = this.positionInBuffer(l.node, l.remainder)
- }
- if (h === e.endLineNumber) {
- var b = h === e.startLineNumber ? e.startColumn - 1 : 0;
- C = this.getLineContent(h).substring(b, e.endColumn - 1);
- return r = this._findMatchesInLine(t, a, C, e.endLineNumber, b, r, o, n, i), o
- }
- var S = h === e.startLineNumber ? e.startColumn : 1;
- return r = this.findMatchesInNode(u.node, a, h, S, d, c, t, n, i, r, o), o
- }, e.prototype._findMatchesInLine = function (e, t, n, r, a, l, u, d, c) {
- var h, p = e.wordSeparators;
- if (!d && e.simpleSearch) {
- for (var g = e.simpleSearch, f = g.length, m = n.length, v = -f; -1 !== (v = n.indexOf(g, v + f));) if ((!p || s.isValidMatch(p, n, m, v, f)) && (u[l++] = new o.FindMatch(new i.Range(r, v + 1 + a, r, v + 1 + f + a), null), l >= c)) return l;
- return l
- }
- t.reset(0);
- do {
- if ((h = t.next(n)) && (u[l++] = s.createFindMatch(new i.Range(r, h.index + 1 + a, r, h.index + 1 + h[0].length + a), h, d), l >= c)) return l
- } while (h);
- return l
- }, e.prototype.insert = function (e, n, i) {
- if (void 0 === i && (i = !1), this._EOLNormalized = this._EOLNormalized && i, this._lastVisitedLine.lineNumber = 0, this._lastVisitedLine.value = "", this.root !== r.SENTINEL) {
- var o = this.nodeAt(e), s = o.node, a = o.remainder, l = o.nodeStartOffset, u = s.piece,
- c = u.bufferIndex, h = this.positionInBuffer(s, a);
- if (0 === s.piece.bufferIndex && u.end.line === this._lastChangeBufferPos.line && u.end.column === this._lastChangeBufferPos.column && l + u.length === e && n.length < t.AverageBufferSize) return this.appendToNode(s, n), void this.computeBufferMetadata();
- if (l === e) this.insertContentToNodeLeft(n, s), this._searchCache.valdiate(e); else if (l + s.piece.length > e) {
- var p = [],
- g = new d(u.bufferIndex, h, u.end, this.getLineFeedCnt(u.bufferIndex, h, u.end), this.offsetInBuffer(c, u.end) - this.offsetInBuffer(c, h));
- if (this.shouldCheckCRLF() && this.endWithCR(n)) if (10 === this.nodeCharCodeAt(s, a)) {
- var f = {line: g.start.line + 1, column: 0};
- g = new d(g.bufferIndex, f, g.end, this.getLineFeedCnt(g.bufferIndex, f, g.end), g.length - 1), n += "\n"
- }
- if (this.shouldCheckCRLF() && this.startWithLF(n)) if (13 === this.nodeCharCodeAt(s, a - 1)) {
- var m = this.positionInBuffer(s, a - 1);
- this.deleteNodeTail(s, m), n = "\r" + n, 0 === s.piece.length && p.push(s)
- } else this.deleteNodeTail(s, h); else this.deleteNodeTail(s, h);
- var v = this.createNewPieces(n);
- g.length > 0 && this.rbInsertRight(s, g);
- for (var _ = s, y = 0; y < v.length; y++) _ = this.rbInsertRight(_, v[y]);
- this.deleteNodes(p)
- } else this.insertContentToNodeRight(n, s)
- } else {
- var C = this.createNewPieces(n);
- for (s = this.rbInsertLeft(null, C[0]), y = 1; y < C.length; y++) s = this.rbInsertRight(s, C[y])
- }
- this.computeBufferMetadata()
- }, e.prototype.delete = function (e, t) {
- if (this._lastVisitedLine.lineNumber = 0, this._lastVisitedLine.value = "",
- !(t <= 0 || this.root === r.SENTINEL)) {
- var n = this.nodeAt(e), i = this.nodeAt(e + t), o = n.node, s = i.node;
- if (o === s) {
- var a = this.positionInBuffer(o, n.remainder), l = this.positionInBuffer(o, i.remainder);
- if (n.nodeStartOffset === e) {
- if (t === o.piece.length) {
- var u = o.next();
- return r.rbDelete(this, o), this.validateCRLFWithPrevNode(u), void this.computeBufferMetadata()
- }
- return this.deleteNodeHead(o, l), this._searchCache.valdiate(e), this.validateCRLFWithPrevNode(o), void this.computeBufferMetadata()
- }
- return n.nodeStartOffset + o.piece.length === e + t ? (this.deleteNodeTail(o, a), this.validateCRLFWithNextNode(o), void this.computeBufferMetadata()) : (this.shrinkNode(o, a, l), void this.computeBufferMetadata())
- }
- var d = [], c = this.positionInBuffer(o, n.remainder);
- this.deleteNodeTail(o, c), this._searchCache.valdiate(e), 0 === o.piece.length && d.push(o);
- var h = this.positionInBuffer(s, i.remainder);
- this.deleteNodeHead(s, h), 0 === s.piece.length && d.push(s);
- for (var p = o.next(); p !== r.SENTINEL && p !== s; p = p.next()) d.push(p);
- var g = 0 === o.piece.length ? o.prev() : o;
- this.deleteNodes(d),
- this.validateCRLFWithNextNode(g), this.computeBufferMetadata()
- }
- }, e.prototype.insertContentToNodeLeft = function (e, t) {
- var n = [];
- if (this.shouldCheckCRLF() && this.endWithCR(e) && this.startWithLF(t)) {
- var i = t.piece, o = {line: i.start.line + 1, column: 0},
- s = new d(i.bufferIndex, o, i.end, this.getLineFeedCnt(i.bufferIndex, o, i.end), i.length - 1);
- t.piece = s, e += "\n", r.updateTreeMetadata(this, t, -1, -1), 0 === t.piece.length && n.push(t)
- }
- for (var a = this.createNewPieces(e), l = this.rbInsertLeft(t, a[a.length - 1]), u = a.length - 2; u >= 0; u--) l = this.rbInsertLeft(l, a[u]);
- this.validateCRLFWithPrevNode(l), this.deleteNodes(n)
- }, e.prototype.insertContentToNodeRight = function (e, t) {
- this.adjustCarriageReturnFromNext(e, t) && (e += "\n");
- for (var n = this.createNewPieces(e), i = this.rbInsertRight(t, n[0]), o = i, r = 1; r < n.length; r++) o = this.rbInsertRight(o, n[r]);
- this.validateCRLFWithPrevNode(i)
- }, e.prototype.positionInBuffer = function (e, t, n) {
- for (var i = e.piece, o = e.piece.bufferIndex, r = this._buffers[o].lineStarts, s = r[i.start.line] + i.start.column + t, a = i.start.line, l = i.end.line, u = 0, d = 0, c = 0; a <= l && (c = r[u = a + (l - a) / 2 | 0], u !== l);) if (d = r[u + 1], s < c) l = u - 1; else {
- if (!(s >= d)) break;
- a = u + 1
- }
- return n ? (n.line = u, n.column = s - c, null) : {line: u, column: s - c}
- }, e.prototype.getLineFeedCnt = function (e, t, n) {
- if (0 === n.column) return n.line - t.line;
- var i = this._buffers[e].lineStarts;
- if (n.line === i.length - 1) return n.line - t.line;
- var o = i[n.line + 1], r = i[n.line] + n.column;
- if (o > r + 1) return n.line - t.line;
- var s = r - 1;
- return 13 === this._buffers[e].buffer.charCodeAt(s) ? n.line - t.line + 1 : n.line - t.line
- }, e.prototype.offsetInBuffer = function (e, t) {
- return this._buffers[e].lineStarts[t.line] + t.column
- }, e.prototype.deleteNodes = function (e) {
- for (var t = 0; t < e.length; t++) r.rbDelete(this, e[t])
- }, e.prototype.createNewPieces = function (e) {
- if (e.length > t.AverageBufferSize) {
- for (var n = []; e.length > t.AverageBufferSize;) {
- var i = e.charCodeAt(t.AverageBufferSize - 1), o = void 0;
- 13 === i || i >= 55296 && i <= 56319 ? (o = e.substring(0, t.AverageBufferSize - 1),
- e = e.substring(t.AverageBufferSize - 1)) : (o = e.substring(0, t.AverageBufferSize), e = e.substring(t.AverageBufferSize));
- var r = u(o);
- n.push(new d(this._buffers.length, {line: 0, column: 0}, {
- line: r.length - 1,
- column: o.length - r[r.length - 1]
- }, r.length - 1, o.length)), this._buffers.push(new c(o, r))
- }
- var s = u(e);
- return n.push(new d(this._buffers.length, {line: 0, column: 0}, {
- line: s.length - 1,
- column: e.length - s[s.length - 1]
- }, s.length - 1, e.length)), this._buffers.push(new c(e, s)), n
- }
- var a = this._buffers[0].buffer.length, l = u(e, !1), h = this._lastChangeBufferPos;
- if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === a && 0 !== a && this.startWithLF(e) && this.endWithCR(this._buffers[0].buffer)) {
- this._lastChangeBufferPos = {
- line: this._lastChangeBufferPos.line,
- column: this._lastChangeBufferPos.column + 1
- }, h = this._lastChangeBufferPos;
- for (var p = 0; p < l.length; p++) l[p] += a + 1;
- this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(l.slice(1)), this._buffers[0].buffer += "_" + e, a += 1
- } else {
- if (0 !== a) for (p = 0; p < l.length; p++) l[p] += a
- ;
- this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(l.slice(1)), this._buffers[0].buffer += e
- }
- var g = this._buffers[0].buffer.length, f = this._buffers[0].lineStarts.length - 1,
- m = {line: f, column: g - this._buffers[0].lineStarts[f]},
- v = new d(0, h, m, this.getLineFeedCnt(0, h, m), g - a);
- return this._lastChangeBufferPos = m, [v]
- }, e.prototype.getLineRawContent = function (e, t) {
- void 0 === t && (t = 0);
- var n = this.root, i = "", o = this._searchCache.get2(e);
- if (o) {
- n = o.node;
- var s = this.getAccumulatedValue(n, e - o.nodeStartLineNumber - 1),
- a = this._buffers[n.piece.bufferIndex].buffer,
- l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
- if (o.nodeStartLineNumber + n.piece.lineFeedCnt !== e) {
- var u = this.getAccumulatedValue(n, e - o.nodeStartLineNumber);
- return a.substring(l + s, l + u - t)
- }
- i = a.substring(l + s, l + n.piece.length)
- } else for (var d = 0, c = e; n !== r.SENTINEL;) if (n.left !== r.SENTINEL && n.lf_left >= e - 1) n = n.left; else {
- if (n.lf_left + n.piece.lineFeedCnt > e - 1) {
- s = this.getAccumulatedValue(n, e - n.lf_left - 2), u = this.getAccumulatedValue(n, e - n.lf_left - 1),
- a = this._buffers[n.piece.bufferIndex].buffer, l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
- return d += n.size_left, this._searchCache.set({
- node: n,
- nodeStartOffset: d,
- nodeStartLineNumber: c - (e - 1 - n.lf_left)
- }), a.substring(l + s, l + u - t)
- }
- if (n.lf_left + n.piece.lineFeedCnt === e - 1) {
- s = this.getAccumulatedValue(n, e - n.lf_left - 2), a = this._buffers[n.piece.bufferIndex].buffer, l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
- i = a.substring(l + s, l + n.piece.length);
- break
- }
- e -= n.lf_left + n.piece.lineFeedCnt, d += n.size_left + n.piece.length, n = n.right
- }
- for (n = n.next(); n !== r.SENTINEL;) {
- a = this._buffers[n.piece.bufferIndex].buffer;
- if (n.piece.lineFeedCnt > 0) {
- u = this.getAccumulatedValue(n, 0), l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
- return i += a.substring(l, l + u - t)
- }
- l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
- i += a.substr(l, n.piece.length), n = n.next()
- }
- return i
- }, e.prototype.computeBufferMetadata = function () {
- for (var e = this.root, t = 1, n = 0; e !== r.SENTINEL;) t += e.lf_left + e.piece.lineFeedCnt, n += e.size_left + e.piece.length,
- e = e.right;
- this._lineCnt = t, this._length = n, this._searchCache.valdiate(this._length)
- }, e.prototype.getIndexOf = function (e, t) {
- var n = e.piece, i = this.positionInBuffer(e, t), o = i.line - n.start.line;
- if (this.offsetInBuffer(n.bufferIndex, n.end) - this.offsetInBuffer(n.bufferIndex, n.start) === t) {
- var r = this.getLineFeedCnt(e.piece.bufferIndex, n.start, i);
- if (r !== o) return {index: r, remainder: 0}
- }
- return {index: o, remainder: i.column}
- }, e.prototype.getAccumulatedValue = function (e, t) {
- if (t < 0) return 0;
- var n = e.piece, i = this._buffers[n.bufferIndex].lineStarts, o = n.start.line + t + 1;
- return o > n.end.line ? i[n.end.line] + n.end.column - i[n.start.line] - n.start.column : i[o] - i[n.start.line] - n.start.column
- }, e.prototype.deleteNodeTail = function (e, t) {
- var n = e.piece, i = n.lineFeedCnt, o = this.offsetInBuffer(n.bufferIndex, n.end), s = t,
- a = this.offsetInBuffer(n.bufferIndex, s), l = this.getLineFeedCnt(n.bufferIndex, n.start, s),
- u = l - i, c = a - o, h = n.length + c;
- e.piece = new d(n.bufferIndex, n.start, s, l, h), r.updateTreeMetadata(this, e, c, u)
- }, e.prototype.deleteNodeHead = function (e, t) {
- var n = e.piece, i = n.lineFeedCnt, o = this.offsetInBuffer(n.bufferIndex, n.start), s = t,
- a = this.getLineFeedCnt(n.bufferIndex, s, n.end), l = a - i,
- u = o - this.offsetInBuffer(n.bufferIndex, s), c = n.length + u;
- e.piece = new d(n.bufferIndex, s, n.end, a, c), r.updateTreeMetadata(this, e, u, l)
- }, e.prototype.shrinkNode = function (e, t, n) {
- var i = e.piece, o = i.start, s = i.end, a = i.length, l = i.lineFeedCnt, u = t,
- c = this.getLineFeedCnt(i.bufferIndex, i.start, u),
- h = this.offsetInBuffer(i.bufferIndex, t) - this.offsetInBuffer(i.bufferIndex, o);
- e.piece = new d(i.bufferIndex, i.start, u, c, h), r.updateTreeMetadata(this, e, h - a, c - l);
- var p = new d(i.bufferIndex, n, s, this.getLineFeedCnt(i.bufferIndex, n, s), this.offsetInBuffer(i.bufferIndex, s) - this.offsetInBuffer(i.bufferIndex, n)),
- g = this.rbInsertRight(e, p);
- this.validateCRLFWithPrevNode(g)
- }, e.prototype.appendToNode = function (e, t) {
- this.adjustCarriageReturnFromNext(t, e) && (t += "\n");
- var n = this.shouldCheckCRLF() && this.startWithLF(t) && this.endWithCR(e),
- i = this._buffers[0].buffer.length;
- this._buffers[0].buffer += t
- ;
- for (var o = u(t, !1), s = 0; s < o.length; s++) o[s] += i;
- if (n) {
- var a = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 2];
- this._buffers[0].lineStarts.pop(), this._lastChangeBufferPos = {
- line: this._lastChangeBufferPos.line - 1,
- column: i - a
- }
- }
- this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(o.slice(1));
- var l = this._buffers[0].lineStarts.length - 1,
- c = {line: l, column: this._buffers[0].buffer.length - this._buffers[0].lineStarts[l]},
- h = e.piece.length + t.length, p = e.piece.lineFeedCnt,
- g = this.getLineFeedCnt(0, e.piece.start, c), f = g - p;
- e.piece = new d(e.piece.bufferIndex, e.piece.start, c, g, h), this._lastChangeBufferPos = c, r.updateTreeMetadata(this, e, t.length, f)
- }, e.prototype.nodeAt = function (e) {
- var t = this.root, n = this._searchCache.get(e);
- if (n) return {node: n.node, nodeStartOffset: n.nodeStartOffset, remainder: e - n.nodeStartOffset};
- for (var i = 0; t !== r.SENTINEL;) if (t.size_left > e) t = t.left; else {
- if (t.size_left + t.piece.length >= e) {
- i += t.size_left;
- var o = {node: t, remainder: e - t.size_left, nodeStartOffset: i};
- return this._searchCache.set(o), o
- }
- e -= t.size_left + t.piece.length, i += t.size_left + t.piece.length, t = t.right
- }
- return null
- }, e.prototype.nodeAt2 = function (e, t) {
- for (var n = this.root, i = 0; n !== r.SENTINEL;) if (n.left !== r.SENTINEL && n.lf_left >= e - 1) n = n.left; else {
- if (n.lf_left + n.piece.lineFeedCnt > e - 1) {
- var o = this.getAccumulatedValue(n, e - n.lf_left - 2),
- s = this.getAccumulatedValue(n, e - n.lf_left - 1);
- return i += n.size_left, {node: n, remainder: Math.min(o + t - 1, s), nodeStartOffset: i}
- }
- if (n.lf_left + n.piece.lineFeedCnt === e - 1) {
- if ((o = this.getAccumulatedValue(n, e - n.lf_left - 2)) + t - 1 <= n.piece.length) return {
- node: n,
- remainder: o + t - 1,
- nodeStartOffset: i
- };
- t -= n.piece.length - o;
- break
- }
- e -= n.lf_left + n.piece.lineFeedCnt, i += n.size_left + n.piece.length, n = n.right
- }
- for (n = n.next(); n !== r.SENTINEL;) {
- if (n.piece.lineFeedCnt > 0) {
- s = this.getAccumulatedValue(n, 0);
- var a = this.offsetOfNode(n);
- return {node: n, remainder: Math.min(t - 1, s), nodeStartOffset: a}
- }
- if (n.piece.length >= t - 1) return {
- node: n,
- remainder: t - 1,
- nodeStartOffset: this.offsetOfNode(n)
- };
- t -= n.piece.length, n = n.next()
- }
- return null
- }, e.prototype.nodeCharCodeAt = function (e, t) {
- if (e.piece.lineFeedCnt < 1) return -1;
- var n = this._buffers[e.piece.bufferIndex],
- i = this.offsetInBuffer(e.piece.bufferIndex, e.piece.start) + t;
- return n.buffer.charCodeAt(i)
- }, e.prototype.offsetOfNode = function (e) {
- if (!e) return 0;
- for (var t = e.size_left; e !== this.root;) e.parent.right === e && (t += e.parent.size_left + e.parent.piece.length), e = e.parent;
- return t
- }, e.prototype.shouldCheckCRLF = function () {
- return !(this._EOLNormalized && "\n" === this._EOL)
- }, e.prototype.startWithLF = function (e) {
- if ("string" == typeof e) return 10 === e.charCodeAt(0);
- if (e === r.SENTINEL || 0 === e.piece.lineFeedCnt) return !1;
- var t = e.piece, n = this._buffers[t.bufferIndex].lineStarts, i = t.start.line,
- o = n[i] + t.start.column;
- return i !== n.length - 1 && (!(n[i + 1] > o + 1) && 10 === this._buffers[t.bufferIndex].buffer.charCodeAt(o))
- }, e.prototype.endWithCR = function (e) {
- return "string" == typeof e ? 13 === e.charCodeAt(e.length - 1) : e !== r.SENTINEL && 0 !== e.piece.lineFeedCnt && 13 === this.nodeCharCodeAt(e, e.piece.length - 1)
- }, e.prototype.validateCRLFWithPrevNode = function (e) {
- if (this.shouldCheckCRLF() && this.startWithLF(e)) {
- var t = e.prev();
- this.endWithCR(t) && this.fixCRLF(t, e)
- }
- }, e.prototype.validateCRLFWithNextNode = function (e) {
- if (this.shouldCheckCRLF() && this.endWithCR(e)) {
- var t = e.next();
- this.startWithLF(t) && this.fixCRLF(e, t)
- }
- }, e.prototype.fixCRLF = function (e, t) {
- var n, i = [], o = this._buffers[e.piece.bufferIndex].lineStarts;
- n = 0 === e.piece.end.column ? {
- line: e.piece.end.line - 1,
- column: o[e.piece.end.line] - o[e.piece.end.line - 1] - 1
- } : {line: e.piece.end.line, column: e.piece.end.column - 1};
- var s = e.piece.length - 1, a = e.piece.lineFeedCnt - 1;
- e.piece = new d(e.piece.bufferIndex, e.piece.start, n, a, s), r.updateTreeMetadata(this, e, -1, -1), 0 === e.piece.length && i.push(e);
- var l = {line: t.piece.start.line + 1, column: 0}, u = t.piece.length - 1,
- c = this.getLineFeedCnt(t.piece.bufferIndex, l, t.piece.end);
- t.piece = new d(t.piece.bufferIndex, l, t.piece.end, c, u), r.updateTreeMetadata(this, t, -1, -1), 0 === t.piece.length && i.push(t);
- var h = this.createNewPieces("\r\n");
- this.rbInsertRight(e, h[0]);
- for (var p = 0; p < i.length; p++) r.rbDelete(this, i[p])
- },
- e.prototype.adjustCarriageReturnFromNext = function (e, t) {
- if (this.shouldCheckCRLF() && this.endWithCR(e)) {
- var n = t.next();
- if (this.startWithLF(n)) {
- if (e += "\n", 1 === n.piece.length) r.rbDelete(this, n); else {
- var i = n.piece, o = {line: i.start.line + 1, column: 0}, s = i.length - 1,
- a = this.getLineFeedCnt(i.bufferIndex, o, i.end);
- n.piece = new d(i.bufferIndex, o, i.end, a, s), r.updateTreeMetadata(this, n, -1, -1)
- }
- return !0
- }
- }
- return !1
- }, e.prototype.iterate = function (e, t) {
- if (e === r.SENTINEL) return t(r.SENTINEL);
- var n = this.iterate(e.left, t);
- return n ? t(e) && this.iterate(e.right, t) : n
- }, e.prototype.getNodeContent = function (e) {
- if (e === r.SENTINEL) return "";
- var t = this._buffers[e.piece.bufferIndex], n = e.piece,
- i = this.offsetInBuffer(n.bufferIndex, n.start), o = this.offsetInBuffer(n.bufferIndex, n.end);
- return t.buffer.substring(i, o)
- }, e.prototype.rbInsertRight = function (e, t) {
- var n = new r.TreeNode(t, 1);
- if (n.left = r.SENTINEL, n.right = r.SENTINEL, n.parent = r.SENTINEL, n.size_left = 0, n.lf_left = 0, this.root === r.SENTINEL) this.root = n, n.color = 0; else if (e.right === r.SENTINEL) e.right = n,
- n.parent = e; else {
- var i = r.leftest(e.right);
- i.left = n, n.parent = i
- }
- return r.fixInsert(this, n), n
- }, e.prototype.rbInsertLeft = function (e, t) {
- var n = new r.TreeNode(t, 1);
- if (n.left = r.SENTINEL, n.right = r.SENTINEL, n.parent = r.SENTINEL, n.size_left = 0, n.lf_left = 0, this.root === r.SENTINEL) this.root = n, n.color = 0; else if (e.left === r.SENTINEL) e.left = n, n.parent = e; else {
- var i = r.righttest(e.left);
- i.right = n, n.parent = i
- }
- return r.fixInsert(this, n), n
- }, e
- }();
- t.PieceTreeBase = p
- })), define(n[347], i([0, 1, 5, 3, 48, 191]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e(e, t, n, i, o, s) {
- this._BOM = t, this._mightContainNonBasicASCII = !o, this._mightContainRTL = i, this._pieceTree = new r.PieceTreeBase(e, n, s)
- }
- return e.prototype.mightContainRTL = function () {
- return this._mightContainRTL
- }, e.prototype.mightContainNonBasicASCII = function () {
- return this._mightContainNonBasicASCII
- }, e.prototype.getBOM = function () {
- return this._BOM
- }, e.prototype.getEOL = function () {
- return this._pieceTree.getEOL()
- },
- e.prototype.getOffsetAt = function (e, t) {
- return this._pieceTree.getOffsetAt(e, t)
- }, e.prototype.getPositionAt = function (e) {
- return this._pieceTree.getPositionAt(e)
- }, e.prototype.getRangeAt = function (e, t) {
- var n = e + t, o = this.getPositionAt(e), r = this.getPositionAt(n);
- return new i.Range(o.lineNumber, o.column, r.lineNumber, r.column)
- }, e.prototype.getValueInRange = function (e, t) {
- if (void 0 === t && (t = 0), e.isEmpty()) return "";
- var n = this._getEndOfLine(t);
- return this._pieceTree.getValueInRange(e, n)
- }, e.prototype.getValueLengthInRange = function (e, t) {
- if (void 0 === t && (t = 0), e.isEmpty()) return 0;
- if (e.startLineNumber === e.endLineNumber) return e.endColumn - e.startColumn;
- var n = this.getOffsetAt(e.startLineNumber, e.startColumn);
- return this.getOffsetAt(e.endLineNumber, e.endColumn) - n
- }, e.prototype.getCharacterCountInRange = function (e, t) {
- if (void 0 === t && (t = 0), this._mightContainNonBasicASCII) {
- for (var i = 0, o = e.startLineNumber, r = e.endLineNumber, s = o; s <= r; s++) for (var a = this.getLineContent(s), l = s === o ? e.startColumn - 1 : 0, u = s === r ? e.endColumn - 1 : a.length, d = l; d < u; d++) n.isHighSurrogate(a.charCodeAt(d)) ? (i += 1, d += 1) : i += 1;
- return i += this._getEndOfLine(t).length * (r - o)
- }
- return this.getValueLengthInRange(e, t)
- }, e.prototype.getLength = function () {
- return this._pieceTree.getLength()
- }, e.prototype.getLineCount = function () {
- return this._pieceTree.getLineCount()
- }, e.prototype.getLinesContent = function () {
- return this._pieceTree.getLinesContent()
- }, e.prototype.getLineContent = function (e) {
- return this._pieceTree.getLineContent(e)
- }, e.prototype.getLineCharCode = function (e, t) {
- return this._pieceTree.getLineCharCode(e, t)
- }, e.prototype.getLineLength = function (e) {
- return this._pieceTree.getLineLength(e)
- }, e.prototype.getLineFirstNonWhitespaceColumn = function (e) {
- var t = n.firstNonWhitespaceIndex(this.getLineContent(e));
- return -1 === t ? 0 : t + 1
- }, e.prototype.getLineLastNonWhitespaceColumn = function (e) {
- var t = n.lastNonWhitespaceIndex(this.getLineContent(e))
- ;
- return -1 === t ? 0 : t + 2
- }, e.prototype._getEndOfLine = function (e) {
- switch (e) {
- case 1:
- return "\n";
- case 2:
- return "\r\n";
- case 0:
- return this.getEOL()
- }
- throw new Error("Unknown EOL preference")
- }, e.prototype.setEOL = function (e) {
- this._pieceTree.setEOL(e)
- }, e.prototype.applyEdits = function (t, i) {
- for (var r = this._mightContainRTL, s = this._mightContainNonBasicASCII, a = !0, l = [], u = 0; u < t.length; u++) {
- var d = t[u];
- a && d._isTracked && (a = !1);
- var c = d.range;
- !r && d.text && (r = n.containsRTL(d.text)), !s && d.text && (s = !n.isBasicASCII(d.text)), l[u] = {
- sortIndex: u,
- identifier: d.identifier || null,
- range: c,
- rangeOffset: this.getOffsetAt(c.startLineNumber, c.startColumn),
- rangeLength: this.getValueLengthInRange(c),
- lines: d.text ? d.text.split(/\r\n|\r|\n/) : null,
- forceMoveMarkers: Boolean(d.forceMoveMarkers),
- isAutoWhitespaceEdit: d.isAutoWhitespaceEdit || !1
- }
- }
- l.sort(e._sortOpsAscending);
- for (var h = !1, p = (u = 0, l.length - 1); u < p; u++) {
- var g = l[u].range.getEndPosition(), f = l[u + 1].range.getStartPosition();
- if (f.isBeforeOrEqual(g)) {
- if (f.isBefore(g)) throw new Error("Overlapping ranges are not allowed!");
- h = !0
- }
- }
- a && (l = this._reduceOperations(l));
- var m = e._getInverseEditRanges(l), v = [];
- for (u = 0; u < l.length; u++) {
- d = l[u];
- var _ = m[u];
- if (i && d.isAutoWhitespaceEdit && d.range.isEmpty()) for (var y = _.startLineNumber; y <= _.endLineNumber; y++) {
- var C = "";
- y === _.startLineNumber && (C = this.getLineContent(d.range.startLineNumber), -1 !== n.firstNonWhitespaceIndex(C)) || v.push({
- lineNumber: y,
- oldContent: C
- })
- }
- }
- var b = [];
- for (u = 0; u < l.length; u++) {
- d = l[u], _ = m[u];
- b[u] = {
- sortIndex: d.sortIndex,
- identifier: d.identifier,
- range: _,
- text: this.getValueInRange(d.range),
- forceMoveMarkers: d.forceMoveMarkers
- }
- }
- h || b.sort((function (e, t) {
- return e.sortIndex - t.sortIndex
- })), this._mightContainRTL = r, this._mightContainNonBasicASCII = s;
- var S = this._doApplyEdits(l), w = null;
- if (i && v.length > 0) {
- v.sort((function (e, t) {
- return t.lineNumber - e.lineNumber
- })), w = [];
- u = 0;
- for (var E = v.length; u < E; u++) {
- y = v[u].lineNumber;
- if (!(u > 0 && v[u - 1].lineNumber === y)) {
- var L = v[u].oldContent, D = this.getLineContent(y)
- ;0 !== D.length && D !== L && -1 === n.firstNonWhitespaceIndex(D) && w.push(y)
- }
- }
- }
- return new o.ApplyEditsResult(b, S, w)
- }, e.prototype._reduceOperations = function (e) {
- return e.length < 1e3 ? e : [this._toSingleEditOperation(e)]
- }, e.prototype._toSingleEditOperation = function (e) {
- for (var t = !1, n = e[0].range, o = e[e.length - 1].range, r = new i.Range(n.startLineNumber, n.startColumn, o.endLineNumber, o.endColumn), s = n.startLineNumber, a = n.startColumn, l = [], u = 0, d = e.length; u < d; u++) {
- var c = e[u], h = c.range;
- t = t || c.forceMoveMarkers;
- for (var p = s; p < h.startLineNumber; p++) p === s ? l.push(this.getLineContent(p).substring(a - 1)) : (l.push("\n"), l.push(this.getLineContent(p)));
- if (h.startLineNumber === s ? l.push(this.getLineContent(h.startLineNumber).substring(a - 1, h.startColumn - 1)) : (l.push("\n"), l.push(this.getLineContent(h.startLineNumber).substring(0, h.startColumn - 1))), c.lines) for (var g = 0, f = c.lines.length; g < f; g++) 0 !== g && l.push("\n"), l.push(c.lines[g]);
- s = c.range.endLineNumber, a = c.range.endColumn
- }
- return {
- sortIndex: 0,
- identifier: e[0].identifier,
- range: r,
- rangeOffset: this.getOffsetAt(r.startLineNumber, r.startColumn),
- rangeLength: this.getValueLengthInRange(r, 0),
- lines: l.join("").split("\n"),
- forceMoveMarkers: t,
- isAutoWhitespaceEdit: !1
- }
- }, e.prototype._doApplyEdits = function (t) {
- t.sort(e._sortOpsDescending);
- for (var n = [], o = 0; o < t.length; o++) {
- var r = t[o], s = r.range.startLineNumber, a = r.range.startColumn, l = r.range.endLineNumber,
- u = r.range.endColumn;
- if (s !== l || a !== u || r.lines && 0 !== r.lines.length) {
- var d = l - s, c = r.lines ? r.lines.length - 1 : 0, h = Math.min(d, c),
- p = r.lines ? r.lines.join(this.getEOL()) : "";
- if (p ? (this._pieceTree.delete(r.rangeOffset, r.rangeLength), this._pieceTree.insert(r.rangeOffset, p, !0)) : this._pieceTree.delete(r.rangeOffset, r.rangeLength), h < c) {
- for (var g = [], f = h + 1; f <= c; f++) g.push(r.lines[f]);
- g[g.length - 1] = this.getLineContent(s + c - 1)
- }
- var m = new i.Range(s, a, l, u);
- n.push({
- range: m,
- rangeLength: r.rangeLength,
- text: p,
- rangeOffset: r.rangeOffset,
- forceMoveMarkers: r.forceMoveMarkers
- })
- }
- }
- return n
- }, e.prototype.findMatchesLineByLine = function (e, t, n, i) {
- return this._pieceTree.findMatchesLineByLine(e, t, n, i)
- }, e._getInverseEditRanges = function (e) {
- for (var t = [], n = 0, o = 0, r = null, s = 0, a = e.length; s < a; s++) {
- var l = e[s], u = void 0, d = void 0;
- r ? r.range.endLineNumber === l.range.startLineNumber ? (u = n, d = o + (l.range.startColumn - r.range.endColumn)) : (u = n + (l.range.startLineNumber - r.range.endLineNumber), d = l.range.startColumn) : (u = l.range.startLineNumber, d = l.range.startColumn);
- var c = void 0;
- if (l.lines && l.lines.length > 0) {
- var h = l.lines.length, p = l.lines[0], g = l.lines[h - 1];
- c = 1 === h ? new i.Range(u, d, u, d + p.length) : new i.Range(u, d, u + h - 1, g.length + 1)
- } else c = new i.Range(u, d, u, d);
- n = c.endLineNumber, o = c.endColumn, t.push(c), r = l
- }
- return t
- }, e._sortOpsAscending = function (e, t) {
- var n = i.Range.compareRangesUsingEnds(e.range, t.range);
- return 0 === n ? e.sortIndex - t.sortIndex : n
- }, e._sortOpsDescending = function (e, t) {
- var n = i.Range.compareRangesUsingEnds(e.range, t.range);
- return 0 === n ? t.sortIndex - e.sortIndex : -n
- }, e
- }();
- t.PieceTreeTextBuffer = s
- })), define(n[348], i([0, 1, 5, 191, 347]), (function (e, t, n, i, o) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e, t, n, i, o, r, s, a) {
- this._chunks = e, this._bom = t, this._cr = n, this._lf = i, this._crlf = o, this._containsRTL = r, this._isBasicASCII = s, this._normalizeEOL = a
- }
- return e.prototype._getEOL = function (e) {
- var t = this._cr + this._lf + this._crlf, n = this._cr + this._crlf;
- return 0 === t ? 1 === e ? "\n" : "\r\n" : n > t / 2 ? "\r\n" : "\n"
- }, e.prototype.create = function (e) {
- var t = this._getEOL(e), n = this._chunks;
- if (this._normalizeEOL && ("\r\n" === t && (this._cr > 0 || this._lf > 0) || "\n" === t && (this._cr > 0 || this._crlf > 0))) for (var r = 0, s = n.length; r < s; r++) {
- var a = n[r].buffer.replace(/\r\n|\r|\n/g, t), l = i.createLineStartsFast(a);
- n[r] = new i.StringBuffer(a, l)
- }
- return new o.PieceTreeTextBuffer(n, this._bom, t, this._containsRTL, this._isBasicASCII, this._normalizeEOL)
- }, e
- }();
- t.PieceTreeTextBufferFactory = r;
- var s = function () {
- function e() {
- this.chunks = [], this.BOM = "", this._hasPreviousChar = !1, this._previousChar = 0, this._tmpLineStarts = [], this.cr = 0, this.lf = 0, this.crlf = 0, this.containsRTL = !1, this.isBasicASCII = !0
- }
- return e.prototype.acceptChunk = function (e) {
- if (0 !== e.length) {
- 0 === this.chunks.length && n.startsWithUTF8BOM(e) && (this.BOM = n.UTF8_BOM_CHARACTER, e = e.substr(1));
- var t = e.charCodeAt(e.length - 1);
- 13 === t || t >= 55296 && t <= 56319 ? (this._acceptChunk1(e.substr(0, e.length - 1), !1), this._hasPreviousChar = !0, this._previousChar = t) : (this._acceptChunk1(e, !1), this._hasPreviousChar = !1, this._previousChar = t)
- }
- }, e.prototype._acceptChunk1 = function (e, t) {
- (t || 0 !== e.length) && (this._hasPreviousChar ? this._acceptChunk2(String.fromCharCode(this._previousChar) + e) : this._acceptChunk2(e))
- }, e.prototype._acceptChunk2 = function (e) {
- var t = i.createLineStarts(this._tmpLineStarts, e);
- this.chunks.push(new i.StringBuffer(e, t.lineStarts)), this.cr += t.cr, this.lf += t.lf, this.crlf += t.crlf, this.isBasicASCII && (this.isBasicASCII = t.isBasicASCII), this.isBasicASCII || this.containsRTL || (this.containsRTL = n.containsRTL(e))
- }, e.prototype.finish = function (e) {
- return void 0 === e && (e = !0), this._finish(), new r(this.chunks, this.BOM, this.cr, this.lf, this.crlf, this.containsRTL, this.isBasicASCII, e)
- }, e.prototype._finish = function () {
- if (0 === this.chunks.length && this._acceptChunk1("", !0), this._hasPreviousChar) {
- this._hasPreviousChar = !1;
- var e = this.chunks[this.chunks.length - 1];
- e.buffer += String.fromCharCode(this._previousChar);
- var t = i.createLineStartsFast(e.buffer);
- e.lineStarts = t, 13 === this._previousChar && this.cr++
- }
- }, e
- }();
- t.PieceTreeTextBufferBuilder = s
- })), define(n[109], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", t.DEFAULT_WORD_REGEXP = function (e) {
- void 0 === e && (e = "");
- for (var n = "(-?\\d*\\.\\d\\w*)|([^", i = 0, o = t.USUAL_WORD_SEPARATORS; i < o.length; i++) {
- var r = o[i];
- e.indexOf(r) >= 0 || (n += "\\" + r)
- }
- return n += "\\s]+)", new RegExp(n, "g")
- }(), t.ensureValidWordDefinition = function (e) {
- var n = t.DEFAULT_WORD_REGEXP;
- if (e && e instanceof RegExp) if (e.global) n = e; else {
- var i = "g";
- e.ignoreCase && (i += "i"), e.multiline && (i += "m"), e.unicode && (i += "u"), n = new RegExp(e.source, i)
- }
- return n.lastIndex = 0, n
- }, t.getWordAtText = function (e, t, n, i) {
- t.lastIndex = 0
- ;var o = t.exec(n);
- if (!o) return null;
- var r = o[0].indexOf(" ") >= 0 ? function (e, t, n, i) {
- var o, r = e - 1 - i;
- for (t.lastIndex = 0; o = t.exec(n);) {
- var s = o.index || 0;
- if (s > r) return null;
- if (t.lastIndex >= r) return {word: o[0], startColumn: i + 1 + s, endColumn: i + 1 + t.lastIndex}
- }
- return null
- }(e, t, n, i) : function (e, t, n, i) {
- var o, r = e - 1 - i, s = n.lastIndexOf(" ", r - 1) + 1;
- for (t.lastIndex = s; o = t.exec(n);) {
- var a = o.index || 0;
- if (a <= r && t.lastIndex >= r) return {
- word: o[0],
- startColumn: i + 1 + a,
- endColumn: i + 1 + t.lastIndex
- }
- }
- return null
- }(e, t, n, i);
- return t.lastIndex = 0, r
- }
- })), define(n[349], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this._languageIdentifier = e
- }
- return e.prototype.getId = function () {
- return this._languageIdentifier.language
- }, e
- }();
- t.FrankensteinMode = n
- })), define(n[90], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent"
- }(t.IndentAction || (t.IndentAction = {}))
- ;var n = function () {
- function e(e) {
- if (this.open = e.open, this.close = e.close, this._standardTokenMask = 0, Array.isArray(e.notIn)) for (var t = 0, n = e.notIn.length; t < n; t++) {
- switch (e.notIn[t]) {
- case"string":
- this._standardTokenMask |= 2;
- break;
- case"comment":
- this._standardTokenMask |= 1;
- break;
- case"regex":
- this._standardTokenMask |= 4
- }
- }
- }
- return e.prototype.isOK = function (e) {
- return 0 == (this._standardTokenMask & e)
- }, e
- }();
- t.StandardAutoClosingPairConditional = n
- })), define(n[350], i([0, 1, 178]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.score = function e(t, i, o, r) {
- if (Array.isArray(t)) {
- for (var s = 0, a = 0, l = t; a < l.length; a++) {
- var u = e(l[a], i, o, r);
- if (10 === u) return u;
- u > s && (s = u)
- }
- return s
- }
- if ("string" == typeof t) return r ? "*" === t ? 5 : t === o ? 10 : 0 : 0;
- if (t) {
- var d = t.language, c = t.pattern, h = t.scheme, p = t.hasAccessToAllModels;
- if (!r && !p) return 0;
- s = 0;
- if (h) if (h === i.scheme) s = 10; else {
- if ("*" !== h) return 0;
- s = 5
- }
- if (d) if (d === o) s = 10; else {
- if ("*" !== d) return 0;
- s = Math.max(s, 5)
- }
- if (c) {
- if (c !== i.fsPath && !n.match(c, i.fsPath)) return 0;
- s = 10
- }
- return s
- }
- return 0
- }
- })), define(n[351], i([0, 1, 79]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n) {
- for (var i = new Uint8Array(e * t), o = 0, r = e * t; o < r; o++) i[o] = n;
- this._data = i, this.rows = e, this.cols = t
- }
- return e.prototype.get = function (e, t) {
- return this._data[e * this.cols + t]
- }, e.prototype.set = function (e, t, n) {
- this._data[e * this.cols + t] = n
- }, e
- }();
- t.Uint8Matrix = i;
- var o = function () {
- function e(e) {
- for (var t = 0, n = 0, o = 0, r = e.length; o < r; o++) {
- var s = e[o], a = s[0];
- (d = s[1]) > t && (t = d), a > n && (n = a), (c = s[2]) > n && (n = c)
- }
- var l = new i(++n, ++t, 0);
- for (o = 0, r = e.length; o < r; o++) {
- var u = e[o], d = (a = u[0], u[1]), c = u[2];
- l.set(a, d, c)
- }
- this._states = l, this._maxCharCode = t
- }
- return e.prototype.nextState = function (e, t) {
- return t < 0 || t >= this._maxCharCode ? 0 : this._states.get(e, t)
- }, e
- }();
- t.StateMachine = o;
- var r = null;
- var s = null;
- var a = function () {
- function e() {
- }
- return e._createLink = function (e, t, n, i, o) {
- var r = o - 1;
- do {
- var s = t.charCodeAt(r);
- if (2 !== e.get(s)) break;
- r--
- } while (r > i);
- if (i > 0) {
- var a = t.charCodeAt(i - 1), l = t.charCodeAt(r)
- ;(40 === a && 41 === l || 91 === a && 93 === l || 123 === a && 125 === l) && r--
- }
- return {
- range: {startLineNumber: n, startColumn: i + 1, endLineNumber: n, endColumn: r + 2},
- url: t.substring(i, r + 1)
- }
- }, e.computeLinks = function (t, i) {
- void 0 === i && (null === r && (r = new o([[1, 104, 2], [1, 72, 2], [1, 102, 6], [1, 70, 6], [2, 116, 3], [2, 84, 3], [3, 116, 4], [3, 84, 4], [4, 112, 5], [4, 80, 5], [5, 115, 9], [5, 83, 9], [5, 58, 10], [6, 105, 7], [6, 73, 7], [7, 108, 8], [7, 76, 8], [8, 101, 9], [8, 69, 9], [9, 58, 10], [10, 47, 11], [11, 47, 12]])), i = r);
- for (var a = function () {
- if (null === s) {
- s = new n.CharacterClassifier(0);
- for (var e = 0; e < " \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length; e++) s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e), 1);
- for (e = 0; e < ".,;".length; e++) s.set(".,;".charCodeAt(e), 2)
- }
- return s
- }(), l = [], u = 1, d = t.getLineCount(); u <= d; u++) {
- for (var c = t.getLineContent(u), h = c.length, p = 0, g = 0, f = 0, m = 1, v = !1, _ = !1, y = !1; p < h;) {
- var C = !1, b = c.charCodeAt(p);
- if (13 === m) {
- var S = void 0;
- switch (b) {
- case 40:
- v = !0, S = 0;
- break;
- case 41:
- S = v ? 0 : 1;
- break;
- case 91:
- _ = !0, S = 0;
- break;
- case 93:
- S = _ ? 0 : 1;
- break;
- case 123:
- y = !0, S = 0;
- break
- ;
- case 125:
- S = y ? 0 : 1;
- break;
- case 39:
- S = 34 === f || 96 === f ? 0 : 1;
- break;
- case 34:
- S = 39 === f || 96 === f ? 0 : 1;
- break;
- case 96:
- S = 39 === f || 34 === f ? 0 : 1;
- break;
- case 42:
- S = 42 === f ? 1 : 0;
- break;
- case 124:
- S = 124 === f ? 1 : 0;
- break;
- default:
- S = a.get(b)
- }
- 1 === S && (l.push(e._createLink(a, c, u, g, p)), C = !0)
- } else if (12 === m) {
- S = void 0;
- 91 === b ? (_ = !0, S = 0) : S = a.get(b), 1 === S ? C = !0 : m = 13
- } else 0 === (m = i.nextState(m, b)) && (C = !0);
- C && (m = 1, v = !1, _ = !1, y = !1, g = p + 1, f = b), p++
- }
- 13 === m && l.push(e._createLink(a, c, u, g, h))
- }
- return l
- }, e
- }();
- t.LinkComputer = a, t.computeLinks = function (e) {
- return e && "function" == typeof e.getLineCount && "function" == typeof e.getLineContent ? a.computeLinks(e) : []
- }
- })), define(n[145], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.createScopedLineTokens = function (e, t) {
- for (var i = e.getCount(), o = e.findTokenIndexAtOffset(t), r = e.getLanguageId(o), s = o; s + 1 < i && e.getLanguageId(s + 1) === r;) s++;
- for (var a = o; a > 0 && e.getLanguageId(a - 1) === r;) a--;
- return new n(e, r, a, s + 1, e.getStartOffset(a), e.getEndOffset(s))
- };
- var n = function () {
- function e(e, t, n, i, o, r) {
- this._actual = e,
- this.languageId = t, this._firstTokenIndex = n, this._lastTokenIndex = i, this.firstCharOffset = o, this._lastCharOffset = r
- }
- return e.prototype.getLineContent = function () {
- return this._actual.getLineContent().substring(this.firstCharOffset, this._lastCharOffset)
- }, e.prototype.getActualLineContentBefore = function (e) {
- return this._actual.getLineContent().substring(0, this.firstCharOffset + e)
- }, e.prototype.getTokenCount = function () {
- return this._lastTokenIndex - this._firstTokenIndex
- }, e.prototype.findTokenIndexAtOffset = function (e) {
- return this._actual.findTokenIndexAtOffset(e + this.firstCharOffset) - this._firstTokenIndex
- }, e.prototype.getStandardTokenType = function (e) {
- return this._actual.getStandardTokenType(e + this._firstTokenIndex)
- }, e
- }();
- t.ScopedLineTokens = n, t.ignoreBracketsInToken = function (e) {
- return 0 != (7 & e)
- }
- })), define(n[352], i([0, 1, 90]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(t) {
- if (t.autoClosingPairs ? this._autoClosingPairs = t.autoClosingPairs.map((function (e) {
- return new n.StandardAutoClosingPairConditional(e)
- })) : t.brackets ? this._autoClosingPairs = t.brackets.map((function (e) {
- return new n.StandardAutoClosingPairConditional({open: e[0], close: e[1]})
- })) : this._autoClosingPairs = [], t.__electricCharacterSupport && t.__electricCharacterSupport.docComment) {
- var i = t.__electricCharacterSupport.docComment;
- this._autoClosingPairs.push(new n.StandardAutoClosingPairConditional({
- open: i.open,
- close: i.close || ""
- }))
- }
- this._autoCloseBefore = "string" == typeof t.autoCloseBefore ? t.autoCloseBefore : e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED, this._surroundingPairs = t.surroundingPairs || this._autoClosingPairs
- }
- return e.prototype.getAutoClosingPairs = function () {
- return this._autoClosingPairs
- }, e.prototype.getAutoCloseBeforeSet = function () {
- return this._autoCloseBefore
- }, e.shouldAutoClosePair = function (e, t, n) {
- if (0 === t.getTokenCount()) return !0;
- var i = t.findTokenIndexAtOffset(n - 2), o = t.getStandardTokenType(i);
- return e.isOK(o)
- }, e.prototype.getSurroundingPairs = function () {
- return this._surroundingPairs
- },
- e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED = ";:.,=}])> \n\t", e
- }();
- t.CharacterPairSupport = i
- })),define(n[353], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this._indentationRules = e
- }
- return e.prototype.shouldIncrease = function (e) {
- return !!(this._indentationRules && this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(e))
- }, e.prototype.shouldDecrease = function (e) {
- return !!(this._indentationRules && this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(e))
- }, e.prototype.shouldIndentNextLine = function (e) {
- return !!(this._indentationRules && this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(e))
- }, e.prototype.shouldIgnore = function (e) {
- return !!(this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(e))
- }, e.prototype.getIndentMetadata = function (e) {
- var t = 0
- ;
- return this.shouldIncrease(e) && (t += 1), this.shouldDecrease(e) && (t += 2), this.shouldIndentNextLine(e) && (t += 4), this.shouldIgnore(e) && (t += 8), t
- }, e
- }();
- t.IndentRulesSupport = n
- })),define(n[354], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e() {
- this._defaultValueSet = [["true", "false"], ["True", "False"], ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"], ["public", "protected", "private"]]
- }
- return e.prototype.navigateValueSet = function (e, t, n, i, o) {
- var r;
- if (e && t && (r = this.doNavigateValueSet(t, o))) return {range: e, value: r};
- if (n && i && (r = this.doNavigateValueSet(i, o))) return {range: n, value: r};
- return null
- }, e.prototype.doNavigateValueSet = function (e, t) {
- var n = this.numberReplace(e, t);
- return null !== n ? n : this.textReplace(e, t)
- }, e.prototype.numberReplace = function (e, t) {
- var n = Math.pow(10, e.length - (e.lastIndexOf(".") + 1)), i = Number(e), o = parseFloat(e);
- return isNaN(i) || isNaN(o) || i !== o ? null : 0 !== i || t ? (i = Math.floor(i * n), i += t ? n : -n, String(i / n)) : null
- },
- e.prototype.textReplace = function (e, t) {
- return this.valueSetsReplace(this._defaultValueSet, e, t)
- }, e.prototype.valueSetsReplace = function (e, t, n) {
- for (var i = null, o = 0, r = e.length; null === i && o < r; o++) i = this.valueSetReplace(e[o], t, n);
- return i
- }, e.prototype.valueSetReplace = function (e, t, n) {
- var i = e.indexOf(t);
- return i >= 0 ? ((i += n ? 1 : -1) < 0 ? i = e.length - 1 : i %= e.length, e[i]) : null
- }, e.INSTANCE = new e, e
- }();
- t.BasicInplaceReplace = n
- })),define(n[355], i([0, 1, 10, 5, 90]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(t) {
- var n = this;
- (t = t || {}).brackets = t.brackets || [["(", ")"], ["{", "}"], ["[", "]"]], this._brackets = [], t.brackets.forEach((function (t) {
- var i = e._createOpenBracketRegExp(t[0]), o = e._createCloseBracketRegExp(t[1]);
- i && o && n._brackets.push({open: t[0], openRegExp: i, close: t[1], closeRegExp: o})
- })), this._regExpRules = t.onEnterRules || []
- }
- return e.prototype.onEnter = function (e, t, n, i) {
- if (e >= 3) for (var r = 0, s = this._regExpRules.length; r < s; r++) {
- var a = this._regExpRules[r];
- if ([{reg: a.beforeText, text: n}, {
- reg: a.afterText, text: i
- }, {reg: a.oneLineAboveText, text: t}].every((function (e) {
- return !e.reg || e.reg.test(e.text)
- }))) return a.action
- }
- if (e >= 2 && n.length > 0 && i.length > 0) for (r = 0, s = this._brackets.length; r < s; r++) {
- if ((l = this._brackets[r]).openRegExp.test(n) && l.closeRegExp.test(i)) return {indentAction: o.IndentAction.IndentOutdent}
- }
- if (e >= 2 && n.length > 0) for (r = 0, s = this._brackets.length; r < s; r++) {
- var l;
- if ((l = this._brackets[r]).openRegExp.test(n)) return {indentAction: o.IndentAction.Indent}
- }
- return null
- }, e._createOpenBracketRegExp = function (t) {
- var n = i.escapeRegExpCharacters(t);
- return /\B/.test(n.charAt(0)) || (n = "\\b" + n), n += "\\s*$", e._safeRegExp(n)
- }, e._createCloseBracketRegExp = function (t) {
- var n = i.escapeRegExpCharacters(t);
- return /\B/.test(n.charAt(n.length - 1)) || (n += "\\b"), n = "^\\s*" + n, e._safeRegExp(n)
- }, e._safeRegExp = function (e) {
- try {
- return new RegExp(e)
- } catch (e) {
- return n.onUnexpectedError(e), null
- }
- }, e
- }();
- t.OnEnterSupport = r
- })),define(n[146], i([0, 1, 5, 3]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var o = function () {
- function e(t, n, i, o, r, s) {
- this.languageIdentifier = t, this.index = n, this.open = i, this.close = o, this.forwardRegex = r, this.reversedRegex = s, this._openSet = e._toSet(this.open), this._closeSet = e._toSet(this.close)
- }
- return e.prototype.isOpen = function (e) {
- return this._openSet.has(e)
- }, e.prototype.isClose = function (e) {
- return this._closeSet.has(e)
- }, e._toSet = function (e) {
- for (var t = new Set, n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- t.add(o)
- }
- return t
- }, e
- }();
- t.RichEditBracket = o;
- var r = function (e, t) {
- var n = function (e) {
- var t = e.length;
- e = e.map((function (e) {
- return [e[0].toLowerCase(), e[1].toLowerCase()]
- }));
- for (var n = [], i = 0; i < t; i++) n[i] = i;
- var o = function (e, t) {
- var n = e[0], i = e[1], o = t[0], r = t[1];
- return n === o || n === r || i === o || i === r
- }, r = function (e, i) {
- for (var o = Math.min(e, i), r = Math.max(e, i), s = 0; s < t; s++) n[s] === r && (n[s] = o)
- };
- for (i = 0; i < t; i++) for (var s = e[i], a = i + 1; a < t; a++) o(s, e[a]) && r(n[i], n[a]);
- for (var l = [], u = 0; u < t; u++) {
- var d = [], c = [];
- for (i = 0; i < t; i++) if (n[i] === u) {
- var h = e[i], p = h[0], g = h[1];
- d.push(p), c.push(g)
- }
- d.length > 0 && l.push({open: d, close: c})
- }
- return l
- }(t);
- this.brackets = n.map((function (t, i) {
- return new o(e, i, t.open, t.close, function (e, t, n, i) {
- var o = [];
- o = (o = o.concat(e)).concat(t);
- for (var r = 0, u = o.length; r < u; r++) s(o[r], n, i, o);
- return (o = l(o)).sort(a), o.reverse(), d(o)
- }(t.open, t.close, n, i), function (e, t, n, i) {
- var o = [];
- o = (o = o.concat(e)).concat(t);
- for (var r = 0, u = o.length; r < u; r++) s(o[r], n, i, o);
- return (o = l(o)).sort(a), o.reverse(), d(o.map(p))
- }(t.open, t.close, n, i))
- })), this.forwardRegex = function (e) {
- for (var t = [], n = 0, i = e; n < i.length; n++) {
- for (var o = i[n], r = 0, s = o.open; r < s.length; r++) {
- var a = s[r];
- t.push(a)
- }
- for (var u = 0, c = o.close; u < c.length; u++) {
- var h = c[u];
- t.push(h)
- }
- }
- return d(t = l(t))
- }(this.brackets), this.reversedRegex = function (e) {
- for (var t = [], n = 0, i = e; n < i.length; n++) {
- for (var o = i[n], r = 0, s = o.open; r < s.length; r++) {
- var a = s[r];
- t.push(a)
- }
- for (var u = 0, c = o.close; u < c.length; u++) {
- var h = c[u];
- t.push(h)
- }
- }
- return d((t = l(t)).map(p))
- }(this.brackets), this.textIsBracket = {}, this.textIsOpenBracket = {}, this.maxBracketLength = 0;
- for (var i = 0, r = this.brackets; i < r.length; i++) {
- for (var u = r[i], c = 0, h = u.open; c < h.length; c++) {
- var g = h[c];
- this.textIsBracket[g] = u, this.textIsOpenBracket[g] = !0, this.maxBracketLength = Math.max(this.maxBracketLength, g.length)
- }
- for (var f = 0, m = u.close; f < m.length; f++) {
- var v = m[f];
- this.textIsBracket[v] = u, this.textIsOpenBracket[v] = !1, this.maxBracketLength = Math.max(this.maxBracketLength, v.length)
- }
- }
- };
- function s(e, t, n, i) {
- for (var o = 0, r = t.length; o < r; o++) if (o !== n) {
- for (var s = t[o], a = 0, l = s.open; a < l.length; a++) {
- var u = l[a];
- u.indexOf(e) >= 0 && i.push(u)
- }
- for (var d = 0, c = s.close; d < c.length; d++) {
- var h = c[d];
- h.indexOf(e) >= 0 && i.push(h)
- }
- }
- }
- function a(e, t) {
- return e.length - t.length
- }
- function l(e) {
- if (e.length <= 1) return e;
- for (var t = [], n = new Set, i = 0, o = e; i < o.length; i++) {
- var r = o[i];
- n.has(r) || (t.push(r), n.add(r))
- }
- return t
- }
- function u(e) {
- var t = /^[\w ]+$/.test(e);
- return e = n.escapeRegExpCharacters(e), t ? "\\b" + e + "\\b" : e
- }
- function d(e) {
- var t = "(" + e.map(u).join(")|(") + ")";
- return n.createRegExp(t, !0)
- }
- t.RichEditBrackets = r;
- var c, h, p = (c = null, h = null, function (e) {
- return c !== e && (h = function (e) {
- for (var t = "", n = e.length - 1; n >= 0; n--) t += e.charAt(n);
- return t
- }(c = e)), h
- }), g = function () {
- function e() {
- }
- return e._findPrevBracketInText = function (e, t, n, o) {
- var r = n.match(e);
- if (!r) return null;
- var s = n.length - (r.index || 0), a = r[0].length, l = o + s;
- return new i.Range(t, l - a + 1, t, l + 1)
- }, e.findPrevBracketInRange = function (e, t, n, i, o) {
- var r = p(n).substring(n.length - o, n.length - i);
- return this._findPrevBracketInText(e, t, r, i)
- }, e.findNextBracketInText = function (e, t, n, o) {
- var r = n.match(e);
- if (!r) return null;
- var s = r.index || 0, a = r[0].length;
- if (0 === a) return null;
- var l = o + s;
- return new i.Range(t, l + 1, t, l + 1 + a)
- }, e.findNextBracketInRange = function (e, t, n, i, o) {
- var r = n.substring(i, o);
- return this.findNextBracketInText(e, t, r, i)
- }, e
- }();
- t.BracketsUtils = g
- })),define(n[356], i([0, 1, 145, 146]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e) {
- this._richEditBrackets = e
- }
- return e.prototype.getElectricCharacters = function () {
- var e = []
- ;
- if (this._richEditBrackets) for (var t = 0, n = this._richEditBrackets.brackets; t < n.length; t++) for (var i = 0, o = n[t].close; i < o.length; i++) {
- var r = o[i], s = r.charAt(r.length - 1);
- e.push(s)
- }
- return e = e.filter((function (e, t, n) {
- return n.indexOf(e) === t
- }))
- }, e.prototype.onElectricCharacter = function (e, t, o) {
- if (!this._richEditBrackets || 0 === this._richEditBrackets.brackets.length) return null;
- var r = t.findTokenIndexAtOffset(o - 1);
- if (n.ignoreBracketsInToken(t.getStandardTokenType(r))) return null;
- var s = this._richEditBrackets.reversedRegex, a = t.getLineContent().substring(0, o - 1) + e,
- l = i.BracketsUtils.findPrevBracketInRange(s, 1, a, 0, a.length);
- if (!l) return null;
- var u = a.substring(l.startColumn - 1, l.endColumn - 1).toLowerCase();
- if (this._richEditBrackets.textIsOpenBracket[u]) return null;
- var d = t.getActualLineContentBefore(l.startColumn - 1);
- return /^\s*$/.test(d) ? {matchOpenBracket: u} : null
- }, e
- }();
- t.BracketElectricCharacterSupport = o
- })),define(n[41], i([0, 1, 4, 2, 5, 109, 90, 145, 352, 356, 353, 355, 146]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var p = function () {
- function e(t, n, i) {
- this._languageIdentifier = t, this._brackets = null, this._electricCharacter = null;
- var o = null;
- n && (o = n._conf), this._conf = e._mergeConf(o, i), this._onEnterSupport = this._conf.brackets || this._conf.indentationRules || this._conf.onEnterRules ? new c.OnEnterSupport(this._conf) : null, this.comments = e._handleComments(this._conf), this.characterPair = new l.CharacterPairSupport(this._conf), this.wordDefinition = this._conf.wordPattern || r.DEFAULT_WORD_REGEXP, this.indentationRules = this._conf.indentationRules, this._conf.indentationRules ? this.indentRulesSupport = new d.IndentRulesSupport(this._conf.indentationRules) : this.indentRulesSupport = null, this.foldingRules = this._conf.folding || {}
- }
- return Object.defineProperty(e.prototype, "brackets", {
- get: function () {
- return !this._brackets && this._conf.brackets && (this._brackets = new h.RichEditBrackets(this._languageIdentifier, this._conf.brackets)), this._brackets
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "electricCharacter", {
- get: function () {
- return this._electricCharacter || (this._electricCharacter = new u.BracketElectricCharacterSupport(this.brackets)), this._electricCharacter
- }, enumerable: !0, configurable: !0
- }), e.prototype.onEnter = function (e, t, n, i) {
- return this._onEnterSupport ? this._onEnterSupport.onEnter(e, t, n, i) : null
- }, e._mergeConf = function (e, t) {
- return {
- comments: e ? t.comments || e.comments : t.comments,
- brackets: e ? t.brackets || e.brackets : t.brackets,
- wordPattern: e ? t.wordPattern || e.wordPattern : t.wordPattern,
- indentationRules: e ? t.indentationRules || e.indentationRules : t.indentationRules,
- onEnterRules: e ? t.onEnterRules || e.onEnterRules : t.onEnterRules,
- autoClosingPairs: e ? t.autoClosingPairs || e.autoClosingPairs : t.autoClosingPairs,
- surroundingPairs: e ? t.surroundingPairs || e.surroundingPairs : t.surroundingPairs,
- autoCloseBefore: e ? t.autoCloseBefore || e.autoCloseBefore : t.autoCloseBefore,
- folding: e ? t.folding || e.folding : t.folding,
- __electricCharacterSupport: e ? t.__electricCharacterSupport || e.__electricCharacterSupport : t.__electricCharacterSupport
- }
- }, e._handleComments = function (e) {
- var t = e.comments;
- if (!t) return null;
- var n = {};
- if (t.lineComment && (n.lineCommentToken = t.lineComment), t.blockComment) {
- var i = t.blockComment, o = i[0], r = i[1];
- n.blockCommentStartToken = o, n.blockCommentEndToken = r
- }
- return n
- }, e
- }();
- t.RichEditSupport = p;
- var g = function (e) {
- this.languageIdentifier = e
- };
- t.LanguageConfigurationChangeEvent = g;
- var f = function () {
- function e() {
- this._entries = new Map, this._onDidChange = new n.Emitter, this.onDidChange = this._onDidChange.event
- }
- return e.prototype.register = function (e, t) {
- var n = this, o = this._getRichEditSupport(e.id), r = new p(e, o, t);
- return this._entries.set(e.id, r), this._onDidChange.fire(new g(e)), i.toDisposable((function () {
- n._entries.get(e.id) === r && (n._entries.set(e.id, o), n._onDidChange.fire(new g(e)))
- }))
- }, e.prototype._getRichEditSupport = function (e) {
- return this._entries.get(e)
- }, e.prototype._getElectricCharacterSupport = function (e) {
- var t = this._getRichEditSupport(e);
- return t && t.electricCharacter || null
- }, e.prototype.getElectricCharacters = function (e) {
- var t = this._getElectricCharacterSupport(e);
- return t ? t.getElectricCharacters() : []
- }, e.prototype.onElectricCharacter = function (e, t, n) {
- var i = a.createScopedLineTokens(t, n - 1), o = this._getElectricCharacterSupport(i.languageId);
- return o ? o.onElectricCharacter(e, i, n - i.firstCharOffset) : null
- }, e.prototype.getComments = function (e) {
- var t = this._getRichEditSupport(e);
- return t && t.comments || null
- }, e.prototype._getCharacterPairSupport = function (e) {
- var t = this._getRichEditSupport(e);
- return t && t.characterPair || null
- }, e.prototype.getAutoClosingPairs = function (e) {
- var t = this._getCharacterPairSupport(e);
- return t ? t.getAutoClosingPairs() : []
- }, e.prototype.getAutoCloseBeforeSet = function (e) {
- var t = this._getCharacterPairSupport(e);
- return t ? t.getAutoCloseBeforeSet() : l.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED
- }, e.prototype.getSurroundingPairs = function (e) {
- var t = this._getCharacterPairSupport(e)
- ;
- return t ? t.getSurroundingPairs() : []
- }, e.prototype.shouldAutoClosePair = function (e, t, n) {
- var i = a.createScopedLineTokens(t, n - 1);
- return l.CharacterPairSupport.shouldAutoClosePair(e, i, n - i.firstCharOffset)
- }, e.prototype.getWordDefinition = function (e) {
- var t = this._getRichEditSupport(e);
- return t ? r.ensureValidWordDefinition(t.wordDefinition || null) : r.ensureValidWordDefinition(null)
- }, e.prototype.getFoldingRules = function (e) {
- var t = this._getRichEditSupport(e);
- return t ? t.foldingRules : {}
- }, e.prototype.getIndentRulesSupport = function (e) {
- var t = this._getRichEditSupport(e);
- return t && t.indentRulesSupport || null
- }, e.prototype.getPrecedingValidLine = function (e, t, n) {
- var i = e.getLanguageIdAtPosition(t, 0);
- if (t > 1) {
- var o = void 0, r = -1;
- for (o = t - 1; o >= 1; o--) {
- if (e.getLanguageIdAtPosition(o, 0) !== i) return r;
- var s = e.getLineContent(o);
- if (!n.shouldIgnore(s) && !/^\s+$/.test(s) && "" !== s) return o;
- r = o
- }
- }
- return -1
- }, e.prototype.getInheritIndentForLine = function (e, t, n, i) {
- if (void 0 === i && (i = !0), e < 4) return null;
- var r = this.getIndentRulesSupport(t.getLanguageIdentifier().id)
- ;
- if (!r) return null;
- if (n <= 1) return {indentation: "", action: null};
- var a = this.getPrecedingValidLine(t, n, r);
- if (a < 0) return null;
- if (a < 1) return {indentation: "", action: null};
- var l = t.getLineContent(a);
- if (r.shouldIncrease(l) || r.shouldIndentNextLine(l)) return {
- indentation: o.getLeadingWhitespace(l),
- action: s.IndentAction.Indent,
- line: a
- };
- if (r.shouldDecrease(l)) return {indentation: o.getLeadingWhitespace(l), action: null, line: a};
- if (1 === a) return {indentation: o.getLeadingWhitespace(t.getLineContent(a)), action: null, line: a};
- var u = a - 1, d = r.getIndentMetadata(t.getLineContent(u));
- if (!(3 & d) && 4 & d) {
- for (var c = 0, h = u - 1; h > 0; h--) if (!r.shouldIndentNextLine(t.getLineContent(h))) {
- c = h;
- break
- }
- return {indentation: o.getLeadingWhitespace(t.getLineContent(c + 1)), action: null, line: c + 1}
- }
- if (i) return {indentation: o.getLeadingWhitespace(t.getLineContent(a)), action: null, line: a};
- for (h = a; h > 0; h--) {
- var p = t.getLineContent(h);
- if (r.shouldIncrease(p)) return {
- indentation: o.getLeadingWhitespace(p),
- action: s.IndentAction.Indent,
- line: h
- };
- if (r.shouldIndentNextLine(p)) {
- c = 0
- ;
- for (var g = h - 1; g > 0; g--) if (!r.shouldIndentNextLine(t.getLineContent(h))) {
- c = g;
- break
- }
- return {indentation: o.getLeadingWhitespace(t.getLineContent(c + 1)), action: null, line: c + 1}
- }
- if (r.shouldDecrease(p)) return {indentation: o.getLeadingWhitespace(p), action: null, line: h}
- }
- return {indentation: o.getLeadingWhitespace(t.getLineContent(1)), action: null, line: 1}
- }, e.prototype.getGoodIndentForLine = function (e, t, n, i, r) {
- if (e < 4) return null;
- var a = this._getRichEditSupport(n);
- if (!a) return null;
- var l = this.getIndentRulesSupport(n);
- if (!l) return null;
- var u = this.getInheritIndentForLine(e, t, i), d = t.getLineContent(i);
- if (u) {
- var c = u.line;
- if (void 0 !== c) {
- var h = a.onEnter(e, "", t.getLineContent(c), "");
- if (h) {
- var p = o.getLeadingWhitespace(t.getLineContent(c));
- return h.removeText && (p = p.substring(0, p.length - h.removeText)), h.indentAction === s.IndentAction.Indent || h.indentAction === s.IndentAction.IndentOutdent ? p = r.shiftIndent(p) : h.indentAction === s.IndentAction.Outdent && (p = r.unshiftIndent(p)), l.shouldDecrease(d) && (p = r.unshiftIndent(p)),
- h.appendText && (p += h.appendText), o.getLeadingWhitespace(p)
- }
- }
- return l.shouldDecrease(d) ? u.action === s.IndentAction.Indent ? u.indentation : r.unshiftIndent(u.indentation) : u.action === s.IndentAction.Indent ? r.shiftIndent(u.indentation) : u.indentation
- }
- return null
- }, e.prototype.getIndentForEnter = function (e, t, n, i) {
- if (e < 4) return null;
- t.forceTokenization(n.startLineNumber);
- var r, l, u = t.getLineTokens(n.startLineNumber), d = a.createScopedLineTokens(u, n.startColumn - 1),
- c = d.getLineContent(), h = !1;
- (d.firstCharOffset > 0 && u.getLanguageId(0) !== d.languageId ? (h = !0, r = c.substr(0, n.startColumn - 1 - d.firstCharOffset)) : r = u.getLineContent().substring(0, n.startColumn - 1), n.isEmpty()) ? l = c.substr(n.startColumn - 1 - d.firstCharOffset) : l = this.getScopedLineTokens(t, n.endLineNumber, n.endColumn).getLineContent().substr(n.endColumn - 1 - d.firstCharOffset);
- var p = this.getIndentRulesSupport(d.languageId);
- if (!p) return null;
- var g = r, f = o.getLeadingWhitespace(r), m = {
- getLineTokens: function (e) {
- return t.getLineTokens(e)
- }, getLanguageIdentifier: function () {
- return t.getLanguageIdentifier()
- }, getLanguageIdAtPosition: function (e, n) {
- return t.getLanguageIdAtPosition(e, n)
- }, getLineContent: function (e) {
- return e === n.startLineNumber ? g : t.getLineContent(e)
- }
- }, v = o.getLeadingWhitespace(u.getLineContent()),
- _ = this.getInheritIndentForLine(e, m, n.startLineNumber + 1);
- if (!_) {
- var y = h ? v : f;
- return {beforeEnter: y, afterEnter: y}
- }
- var C = h ? v : _.indentation;
- return _.action === s.IndentAction.Indent && (C = i.shiftIndent(C)), p.shouldDecrease(l) && (C = i.unshiftIndent(C)), {
- beforeEnter: h ? v : f,
- afterEnter: C
- }
- }, e.prototype.getIndentActionForType = function (e, t, n, i, o) {
- if (e < 4) return null;
- var r = this.getScopedLineTokens(t, n.startLineNumber, n.startColumn),
- a = this.getIndentRulesSupport(r.languageId);
- if (!a) return null;
- var l, u = r.getLineContent(), d = u.substr(0, n.startColumn - 1 - r.firstCharOffset);
- n.isEmpty() ? l = u.substr(n.startColumn - 1 - r.firstCharOffset) : l = this.getScopedLineTokens(t, n.endLineNumber, n.endColumn).getLineContent().substr(n.endColumn - 1 - r.firstCharOffset);
- if (!a.shouldDecrease(d + l) && a.shouldDecrease(d + i + l)) {
- var c = this.getInheritIndentForLine(e, t, n.startLineNumber, !1);
- if (!c) return null;
- var h = c.indentation;
- return c.action !== s.IndentAction.Indent && (h = o.unshiftIndent(h)), h
- }
- return null
- }, e.prototype.getIndentMetadata = function (e, t) {
- var n = this.getIndentRulesSupport(e.getLanguageIdentifier().id);
- return n ? t < 1 || t > e.getLineCount() ? null : n.getIndentMetadata(e.getLineContent(t)) : null
- }, e.prototype.getEnterAction = function (e, t, n) {
- var i = this.getScopedLineTokens(t, n.startLineNumber, n.startColumn),
- o = this._getRichEditSupport(i.languageId);
- if (!o) return null;
- var r, a = i.getLineContent(), l = a.substr(0, n.startColumn - 1 - i.firstCharOffset);
- n.isEmpty() ? r = a.substr(n.startColumn - 1 - i.firstCharOffset) : r = this.getScopedLineTokens(t, n.endLineNumber, n.endColumn).getLineContent().substr(n.endColumn - 1 - i.firstCharOffset);
- var u = "";
- if (n.startLineNumber > 1 && 0 === i.firstCharOffset) {
- var d = this.getScopedLineTokens(t, n.startLineNumber - 1);
- d.languageId === i.languageId && (u = d.getLineContent())
- }
- var c = o.onEnter(e, u, l, r);
- if (!c) return null
- ;
- var h = c.indentAction, p = c.appendText, g = c.removeText || 0;
- p || (p = h === s.IndentAction.Indent || h === s.IndentAction.IndentOutdent ? "\t" : "");
- var f = this.getIndentationAtPosition(t, n.startLineNumber, n.startColumn);
- return g && (f = f.substring(0, f.length - g)), {
- indentAction: h,
- appendText: p,
- removeText: g,
- indentation: f
- }
- }, e.prototype.getIndentationAtPosition = function (e, t, n) {
- var i = e.getLineContent(t), r = o.getLeadingWhitespace(i);
- return r.length > n - 1 && (r = r.substring(0, n - 1)), r
- }, e.prototype.getScopedLineTokens = function (e, t, n) {
- e.forceTokenization(t);
- var i = e.getLineTokens(t), o = void 0 === n ? e.getLineMaxColumn(t) - 1 : n - 1;
- return a.createScopedLineTokens(i, o)
- }, e.prototype.getBracketsSupport = function (e) {
- var t = this._getRichEditSupport(e);
- return t && t.brackets || null
- }, e
- }();
- t.LanguageConfigurationRegistryImpl = f, t.LanguageConfigurationRegistry = new f
- })),define(n[357], i([0, 1, 27]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e, t, n, i, o) {
- this.token = e, this.index = t, this.fontStyle = n, this.foreground = i,
- this.background = o
- };
- function o(e) {
- if (!e || !Array.isArray(e)) return [];
- for (var t = [], n = 0, o = 0, r = e.length; o < r; o++) {
- var s = e[o], a = -1;
- if ("string" == typeof s.fontStyle) {
- a = 0;
- for (var l = s.fontStyle.split(" "), u = 0, d = l.length; u < d; u++) {
- switch (l[u]) {
- case"italic":
- a |= 1;
- break;
- case"bold":
- a |= 2;
- break;
- case"underline":
- a |= 4
- }
- }
- }
- var c = null;
- "string" == typeof s.foreground && (c = s.foreground);
- var h = null;
- "string" == typeof s.background && (h = s.background), t[n++] = new i(s.token || "", o, a, c, h)
- }
- return t
- }
- function r(e, t) {
- e.sort((function (e, t) {
- var n = c(e.token, t.token);
- return 0 !== n ? n : e.index - t.index
- }));
- for (var n = 0, i = "000000", o = "ffffff"; e.length >= 1 && "" === e[0].token;) {
- var r = e.shift();
- -1 !== r.fontStyle && (n = r.fontStyle), null !== r.foreground && (i = r.foreground), null !== r.background && (o = r.background)
- }
- for (var s = new a, u = 0, d = t; u < d.length; u++) {
- var g = d[u];
- s.getId(g)
- }
- for (var f = s.getId(i), m = s.getId(o), v = new h(n, f, m), _ = new p(v), y = 0, C = e.length; y < C; y++) {
- var b = e[y];
- _.insert(b.token, b.fontStyle, s.getId(b.foreground), s.getId(b.background))
- }
- return new l(s, _)
- }
- t.ParsedTokenThemeRule = i,
- t.parseTokenTheme = o;
- var s = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/, a = function () {
- function e() {
- this._lastColorId = 0, this._id2color = [], this._color2id = new Map
- }
- return e.prototype.getId = function (e) {
- if (null === e) return 0;
- var t = e.match(s);
- if (!t) throw new Error("Illegal value for token color: " + e);
- e = t[1].toUpperCase();
- var i = this._color2id.get(e);
- return i || (i = ++this._lastColorId, this._color2id.set(e, i), this._id2color[i] = n.Color.fromHex("#" + e), i)
- }, e.prototype.getColorMap = function () {
- return this._id2color.slice(0)
- }, e
- }();
- t.ColorMap = a;
- var l = function () {
- function e(e, t) {
- this._colorMap = e, this._root = t, this._cache = new Map
- }
- return e.createFromRawTokenTheme = function (e, t) {
- return this.createFromParsedTokenTheme(o(e), t)
- }, e.createFromParsedTokenTheme = function (e, t) {
- return r(e, t)
- }, e.prototype.getColorMap = function () {
- return this._colorMap.getColorMap()
- }, e.prototype._match = function (e) {
- return this._root.match(e)
- }, e.prototype.match = function (e, t) {
- var n = this._cache.get(t);
- if (void 0 === n) {
- var i = this._match(t), o = d(t);
- n = (i.metadata | o << 8) >>> 0,
- this._cache.set(t, n)
- }
- return (n | e << 0) >>> 0
- }, e
- }();
- t.TokenTheme = l;
- var u = /\b(comment|string|regex|regexp)\b/;
- function d(e) {
- var t = e.match(u);
- if (!t) return 0;
- switch (t[1]) {
- case"comment":
- return 1;
- case"string":
- return 2;
- case"regex":
- case"regexp":
- return 4
- }
- throw new Error("Unexpected match for standard token type!")
- }
- function c(e, t) {
- return e < t ? -1 : e > t ? 1 : 0
- }
- t.toStandardTokenType = d, t.strcmp = c;
- var h = function () {
- function e(e, t, n) {
- this._fontStyle = e, this._foreground = t, this._background = n, this.metadata = (this._fontStyle << 11 | this._foreground << 14 | this._background << 23) >>> 0
- }
- return e.prototype.clone = function () {
- return new e(this._fontStyle, this._foreground, this._background)
- }, e.prototype.acceptOverwrite = function (e, t, n) {
- -1 !== e && (this._fontStyle = e), 0 !== t && (this._foreground = t), 0 !== n && (this._background = n), this.metadata = (this._fontStyle << 11 | this._foreground << 14 | this._background << 23) >>> 0
- }, e
- }();
- t.ThemeTrieElementRule = h;
- var p = function () {
- function e(e) {
- this._mainRule = e, this._children = new Map
- }
- return e.prototype.match = function (e) {
- if ("" === e) return this._mainRule;
- var t, n, i = e.indexOf(".");
- -1 === i ? (t = e, n = "") : (t = e.substring(0, i), n = e.substring(i + 1));
- var o = this._children.get(t);
- return void 0 !== o ? o.match(n) : this._mainRule
- }, e.prototype.insert = function (t, n, i, o) {
- if ("" !== t) {
- var r, s, a = t.indexOf(".");
- -1 === a ? (r = t, s = "") : (r = t.substring(0, a), s = t.substring(a + 1));
- var l = this._children.get(r);
- void 0 === l && (l = new e(this._mainRule.clone()), this._children.set(r, l)), l.insert(s, n, i, o)
- } else this._mainRule.acceptOverwrite(n, i, o)
- }, e
- }();
- t.ThemeTrieElement = p, t.generateTokensCSSForColorMap = function (e) {
- for (var t = [], n = 1, i = e.length; n < i; n++) {
- var o = e[n];
- t[n] = ".mtk" + n + " { color: " + o + "; }"
- }
- return t.push(".mtki { font-style: italic; }"), t.push(".mtkb { font-weight: bold; }"), t.push(".mtku { text-decoration: underline; text-underline-position: under; }"), t.join("\n")
- }
- })),define(n[358], i([0, 1, 4, 2, 21, 38]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e() {
- this._map = new Map, this._promises = new Map,
- this._onDidChange = new n.Emitter, this.onDidChange = this._onDidChange.event, this._colorMap = null
- }
- return e.prototype.fire = function (e) {
- this._onDidChange.fire({changedLanguages: e, changedColorMap: !1})
- }, e.prototype.register = function (e, t) {
- var n = this;
- return this._map.set(e, t), this.fire([e]), i.toDisposable((function () {
- n._map.get(e) === t && (n._map.delete(e), n.fire([e]))
- }))
- }, e.prototype.registerPromise = function (e, t) {
- var n = this, o = null, r = !1;
- return this._promises.set(e, t.then((function (t) {
- n._promises.delete(e), !r && t && (o = n.register(e, t))
- }))), i.toDisposable((function () {
- r = !0, o && o.dispose()
- }))
- }, e.prototype.getPromise = function (e) {
- var t = this, n = this.get(e);
- if (n) return Promise.resolve(n);
- var i = this._promises.get(e);
- return i ? i.then((function (n) {
- return t.get(e)
- })) : null
- }, e.prototype.get = function (e) {
- return o.withUndefinedAsNull(this._map.get(e))
- }, e.prototype.setColorMap = function (e) {
- this._colorMap = e, this._onDidChange.fire({changedLanguages: r.keys(this._map), changedColorMap: !0})
- }, e.prototype.getColorMap = function () {
- return this._colorMap
- },
- e.prototype.getDefaultBackground = function () {
- return this._colorMap && this._colorMap.length > 2 ? this._colorMap[2] : null
- }, e
- }();
- t.TokenizationRegistryImpl = s
- })),
- /*!
- Copyright (c) 2014 Taylor Hakes
- Copyright (c) 2014 Forbes Lindesay
- */
- p = function () {
- "use strict";
- function e(e) {
- var t = this.constructor;
- return this.then((function (n) {
- return t.resolve(e()).then((function () {
- return n
- }))
- }), (function (n) {
- return t.resolve(e()).then((function () {
- return t.reject(n)
- }))
- }))
- }
- var t = setTimeout;
- function n() {
- }
- function i(e) {
- if (!(this instanceof i)) throw new TypeError("Promises must be constructed via new");
- if ("function" != typeof e) throw new TypeError("not a function");
- this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], u(e, this)
- }
- function o(e, t) {
- for (; 3 === e._state;) e = e._value;
- 0 !== e._state ? (e._handled = !0, i._immediateFn((function () {
- var n = 1 === e._state ? t.onFulfilled : t.onRejected;
- if (null !== n) {
- var i;
- try {
- i = n(e._value)
- } catch (e) {
- return void s(t.promise, e)
- }
- r(t.promise, i)
- } else (1 === e._state ? r : s)(t.promise, e._value)
- }))) : e._deferreds.push(t)
- }
- function r(e, t) {
- try {
- if (t === e) throw new TypeError("A promise cannot be resolved with itself.");
- if (t && ("object" == typeof t || "function" == typeof t)) {
- var n = t.then;
- if (t instanceof i) return e._state = 3, e._value = t, void a(e)
- ;
- if ("function" == typeof n) return void u((o = n, r = t, function () {
- o.apply(r, arguments)
- }), e)
- }
- e._state = 1, e._value = t, a(e)
- } catch (t) {
- s(e, t)
- }
- var o, r
- }
- function s(e, t) {
- e._state = 2, e._value = t, a(e)
- }
- function a(e) {
- 2 === e._state && 0 === e._deferreds.length && i._immediateFn((function () {
- e._handled || i._unhandledRejectionFn(e._value)
- }));
- for (var t = 0, n = e._deferreds.length; t < n; t++) o(e, e._deferreds[t]);
- e._deferreds = null
- }
- function l(e, t, n) {
- this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.promise = n
- }
- function u(e, t) {
- var n = !1;
- try {
- e((function (e) {
- n || (n = !0, r(t, e))
- }), (function (e) {
- n || (n = !0, s(t, e))
- }))
- } catch (e) {
- if (n) return;
- n = !0, s(t, e)
- }
- }
- i.prototype.catch = function (e) {
- return this.then(null, e)
- }, i.prototype.then = function (e, t) {
- var i = new this.constructor(n);
- return o(this, new l(e, t, i)), i
- }, i.prototype.finally = e, i.all = function (e) {
- return new i((function (t, n) {
- if (!e || void 0 === e.length) throw new TypeError("Promise.all accepts an array");
- var i = Array.prototype.slice.call(e);
- if (0 === i.length) return t([]);
- var o = i.length
- ;
- function r(e, s) {
- try {
- if (s && ("object" == typeof s || "function" == typeof s)) {
- var a = s.then;
- if ("function" == typeof a) return void a.call(s, (function (t) {
- r(e, t)
- }), n)
- }
- i[e] = s, 0 == --o && t(i)
- } catch (e) {
- n(e)
- }
- }
- for (var s = 0; s < i.length; s++) r(s, i[s])
- }))
- }, i.resolve = function (e) {
- return e && "object" == typeof e && e.constructor === i ? e : new i((function (t) {
- t(e)
- }))
- }, i.reject = function (e) {
- return new i((function (t, n) {
- n(e)
- }))
- }, i.race = function (e) {
- return new i((function (t, n) {
- for (var i = 0, o = e.length; i < o; i++) e[i].then(t, n)
- }))
- }, i._immediateFn = "function" == typeof setImmediate && function (e) {
- setImmediate(e)
- } || function (e) {
- t(e, 0)
- }, i._unhandledRejectionFn = function (e) {
- "undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e)
- };
- var d = function () {
- if ("undefined" != typeof self) return self;
- if ("undefined" != typeof window) return window;
- if ("undefined" != typeof global) return global;
- throw new Error("unable to locate global object")
- }();
- "Promise" in d ? d.Promise.prototype.finally || (d.Promise.prototype.finally = e) : d.Promise = i
- },
- "object" == typeof exports && "undefined" != typeof module ? p() : "function" == typeof define && define.amd ? define("vs/editor/common/standalone/promise-polyfill/polyfill", p) : p(),define(n[147], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e[e.Unknown = 0] = "Unknown", e[e.Disabled = 1] = "Disabled", e[e.Enabled = 2] = "Enabled"
- }(t.AccessibilitySupport || (t.AccessibilitySupport = {})), function (e) {
- e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = "InsertAsSnippet"
- }(t.CompletionItemInsertTextRule || (t.CompletionItemInsertTextRule = {})), function (e) {
- e[e.Method = 0] = "Method", e[e.Function = 1] = "Function", e[e.Constructor = 2] = "Constructor", e[e.Field = 3] = "Field", e[e.Variable = 4] = "Variable", e[e.Class = 5] = "Class", e[e.Struct = 6] = "Struct", e[e.Interface = 7] = "Interface", e[e.Module = 8] = "Module", e[e.Property = 9] = "Property", e[e.Event = 10] = "Event", e[e.Operator = 11] = "Operator", e[e.Unit = 12] = "Unit", e[e.Value = 13] = "Value", e[e.Constant = 14] = "Constant", e[e.Enum = 15] = "Enum", e[e.EnumMember = 16] = "EnumMember",
- e[e.Keyword = 17] = "Keyword", e[e.Text = 18] = "Text", e[e.Color = 19] = "Color", e[e.File = 20] = "File", e[e.Reference = 21] = "Reference", e[e.Customcolor = 22] = "Customcolor", e[e.Folder = 23] = "Folder", e[e.TypeParameter = 24] = "TypeParameter", e[e.Snippet = 25] = "Snippet"
- }(t.CompletionItemKind || (t.CompletionItemKind = {})), function (e) {
- e[e.Deprecated = 1] = "Deprecated"
- }(t.CompletionItemTag || (t.CompletionItemTag = {})), function (e) {
- e[e.Invoke = 0] = "Invoke", e[e.TriggerCharacter = 1] = "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"
- }(t.CompletionTriggerKind || (t.CompletionTriggerKind = {})), function (e) {
- e[e.EXACT = 0] = "EXACT", e[e.ABOVE = 1] = "ABOVE", e[e.BELOW = 2] = "BELOW"
- }(t.ContentWidgetPositionPreference || (t.ContentWidgetPositionPreference = {})), function (e) {
- e[e.NotSet = 0] = "NotSet", e[e.ContentFlush = 1] = "ContentFlush", e[e.RecoverFromMarkers = 2] = "RecoverFromMarkers", e[e.Explicit = 3] = "Explicit", e[e.Paste = 4] = "Paste", e[e.Undo = 5] = "Undo", e[e.Redo = 6] = "Redo"
- }(t.CursorChangeReason || (t.CursorChangeReason = {})), function (e) {
- e[e.LF = 1] = "LF",
- e[e.CRLF = 2] = "CRLF"
- }(t.DefaultEndOfLine || (t.DefaultEndOfLine = {})), function (e) {
- e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"
- }(t.DocumentHighlightKind || (t.DocumentHighlightKind = {})), function (e) {
- e[e.None = 0] = "None", e[e.Keep = 1] = "Keep", e[e.Brackets = 2] = "Brackets", e[e.Advanced = 3] = "Advanced", e[e.Full = 4] = "Full"
- }(t.EditorAutoIndentStrategy || (t.EditorAutoIndentStrategy = {})), function (e) {
- e[e.acceptSuggestionOnCommitCharacter = 0] = "acceptSuggestionOnCommitCharacter", e[e.acceptSuggestionOnEnter = 1] = "acceptSuggestionOnEnter", e[e.accessibilitySupport = 2] = "accessibilitySupport", e[e.accessibilityPageSize = 3] = "accessibilityPageSize", e[e.ariaLabel = 4] = "ariaLabel", e[e.autoClosingBrackets = 5] = "autoClosingBrackets", e[e.autoClosingOvertype = 6] = "autoClosingOvertype", e[e.autoClosingQuotes = 7] = "autoClosingQuotes", e[e.autoIndent = 8] = "autoIndent", e[e.automaticLayout = 9] = "automaticLayout", e[e.autoSurround = 10] = "autoSurround", e[e.codeLens = 11] = "codeLens", e[e.colorDecorators = 12] = "colorDecorators", e[e.comments = 13] = "comments",
- e[e.contextmenu = 14] = "contextmenu", e[e.copyWithSyntaxHighlighting = 15] = "copyWithSyntaxHighlighting", e[e.cursorBlinking = 16] = "cursorBlinking", e[e.cursorSmoothCaretAnimation = 17] = "cursorSmoothCaretAnimation", e[e.cursorStyle = 18] = "cursorStyle", e[e.cursorSurroundingLines = 19] = "cursorSurroundingLines", e[e.cursorSurroundingLinesStyle = 20] = "cursorSurroundingLinesStyle", e[e.cursorWidth = 21] = "cursorWidth", e[e.disableLayerHinting = 22] = "disableLayerHinting", e[e.disableMonospaceOptimizations = 23] = "disableMonospaceOptimizations", e[e.dragAndDrop = 24] = "dragAndDrop", e[e.emptySelectionClipboard = 25] = "emptySelectionClipboard", e[e.extraEditorClassName = 26] = "extraEditorClassName", e[e.fastScrollSensitivity = 27] = "fastScrollSensitivity", e[e.find = 28] = "find", e[e.fixedOverflowWidgets = 29] = "fixedOverflowWidgets", e[e.folding = 30] = "folding", e[e.foldingStrategy = 31] = "foldingStrategy", e[e.foldingHighlight = 32] = "foldingHighlight", e[e.fontFamily = 33] = "fontFamily", e[e.fontInfo = 34] = "fontInfo", e[e.fontLigatures = 35] = "fontLigatures", e[e.fontSize = 36] = "fontSize",
- e[e.fontWeight = 37] = "fontWeight", e[e.formatOnPaste = 38] = "formatOnPaste", e[e.formatOnType = 39] = "formatOnType", e[e.glyphMargin = 40] = "glyphMargin", e[e.gotoLocation = 41] = "gotoLocation", e[e.hideCursorInOverviewRuler = 42] = "hideCursorInOverviewRuler", e[e.highlightActiveIndentGuide = 43] = "highlightActiveIndentGuide", e[e.hover = 44] = "hover", e[e.inDiffEditor = 45] = "inDiffEditor", e[e.letterSpacing = 46] = "letterSpacing", e[e.lightbulb = 47] = "lightbulb", e[e.lineDecorationsWidth = 48] = "lineDecorationsWidth", e[e.lineHeight = 49] = "lineHeight", e[e.lineNumbers = 50] = "lineNumbers", e[e.lineNumbersMinChars = 51] = "lineNumbersMinChars", e[e.links = 52] = "links", e[e.matchBrackets = 53] = "matchBrackets", e[e.minimap = 54] = "minimap", e[e.mouseStyle = 55] = "mouseStyle", e[e.mouseWheelScrollSensitivity = 56] = "mouseWheelScrollSensitivity", e[e.mouseWheelZoom = 57] = "mouseWheelZoom", e[e.multiCursorMergeOverlapping = 58] = "multiCursorMergeOverlapping", e[e.multiCursorModifier = 59] = "multiCursorModifier", e[e.multiCursorPaste = 60] = "multiCursorPaste",
- e[e.occurrencesHighlight = 61] = "occurrencesHighlight", e[e.overviewRulerBorder = 62] = "overviewRulerBorder", e[e.overviewRulerLanes = 63] = "overviewRulerLanes", e[e.parameterHints = 64] = "parameterHints", e[e.peekWidgetDefaultFocus = 65] = "peekWidgetDefaultFocus", e[e.quickSuggestions = 66] = "quickSuggestions", e[e.quickSuggestionsDelay = 67] = "quickSuggestionsDelay", e[e.readOnly = 68] = "readOnly", e[e.renderControlCharacters = 69] = "renderControlCharacters", e[e.renderIndentGuides = 70] = "renderIndentGuides", e[e.renderFinalNewline = 71] = "renderFinalNewline", e[e.renderLineHighlight = 72] = "renderLineHighlight", e[e.renderValidationDecorations = 73] = "renderValidationDecorations", e[e.renderWhitespace = 74] = "renderWhitespace", e[e.revealHorizontalRightPadding = 75] = "revealHorizontalRightPadding", e[e.roundedSelection = 76] = "roundedSelection", e[e.rulers = 77] = "rulers", e[e.scrollbar = 78] = "scrollbar", e[e.scrollBeyondLastColumn = 79] = "scrollBeyondLastColumn", e[e.scrollBeyondLastLine = 80] = "scrollBeyondLastLine", e[e.selectionClipboard = 81] = "selectionClipboard",
- e[e.selectionHighlight = 82] = "selectionHighlight", e[e.selectOnLineNumbers = 83] = "selectOnLineNumbers", e[e.showFoldingControls = 84] = "showFoldingControls", e[e.showUnused = 85] = "showUnused", e[e.snippetSuggestions = 86] = "snippetSuggestions", e[e.smoothScrolling = 87] = "smoothScrolling", e[e.stopRenderingLineAfter = 88] = "stopRenderingLineAfter", e[e.suggest = 89] = "suggest", e[e.suggestFontSize = 90] = "suggestFontSize", e[e.suggestLineHeight = 91] = "suggestLineHeight", e[e.suggestOnTriggerCharacters = 92] = "suggestOnTriggerCharacters", e[e.suggestSelection = 93] = "suggestSelection", e[e.tabCompletion = 94] = "tabCompletion", e[e.useTabStops = 95] = "useTabStops", e[e.wordSeparators = 96] = "wordSeparators", e[e.wordWrap = 97] = "wordWrap", e[e.wordWrapBreakAfterCharacters = 98] = "wordWrapBreakAfterCharacters", e[e.wordWrapBreakBeforeCharacters = 99] = "wordWrapBreakBeforeCharacters", e[e.wordWrapColumn = 100] = "wordWrapColumn",e[e.wordWrapMinified = 101] = "wordWrapMinified",e[e.wrappingIndent = 102] = "wrappingIndent",e[e.wrappingStrategy = 103] = "wrappingStrategy",
- e[e.editorClassName = 104] = "editorClassName",e[e.pixelRatio = 105] = "pixelRatio",e[e.tabFocusMode = 106] = "tabFocusMode",e[e.layoutInfo = 107] = "layoutInfo",e[e.wrappingInfo = 108] = "wrappingInfo"
- }(t.EditorOption || (t.EditorOption = {})), function (e) {
- e[e.TextDefined = 0] = "TextDefined", e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF"
- }(t.EndOfLinePreference || (t.EndOfLinePreference = {})), function (e) {
- e[e.LF = 0] = "LF", e[e.CRLF = 1] = "CRLF"
- }(t.EndOfLineSequence || (t.EndOfLineSequence = {})), function (e) {
- e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent"
- }(t.IndentAction || (t.IndentAction = {})), function (e) {
- e[e.Unknown = 0] = "Unknown", e[e.Backspace = 1] = "Backspace", e[e.Tab = 2] = "Tab", e[e.Enter = 3] = "Enter", e[e.Shift = 4] = "Shift", e[e.Ctrl = 5] = "Ctrl", e[e.Alt = 6] = "Alt", e[e.PauseBreak = 7] = "PauseBreak", e[e.CapsLock = 8] = "CapsLock", e[e.Escape = 9] = "Escape", e[e.Space = 10] = "Space", e[e.PageUp = 11] = "PageUp", e[e.PageDown = 12] = "PageDown", e[e.End = 13] = "End", e[e.Home = 14] = "Home", e[e.LeftArrow = 15] = "LeftArrow", e[e.UpArrow = 16] = "UpArrow",
- e[e.RightArrow = 17] = "RightArrow", e[e.DownArrow = 18] = "DownArrow", e[e.Insert = 19] = "Insert", e[e.Delete = 20] = "Delete", e[e.KEY_0 = 21] = "KEY_0", e[e.KEY_1 = 22] = "KEY_1", e[e.KEY_2 = 23] = "KEY_2", e[e.KEY_3 = 24] = "KEY_3", e[e.KEY_4 = 25] = "KEY_4", e[e.KEY_5 = 26] = "KEY_5", e[e.KEY_6 = 27] = "KEY_6", e[e.KEY_7 = 28] = "KEY_7", e[e.KEY_8 = 29] = "KEY_8", e[e.KEY_9 = 30] = "KEY_9", e[e.KEY_A = 31] = "KEY_A", e[e.KEY_B = 32] = "KEY_B", e[e.KEY_C = 33] = "KEY_C", e[e.KEY_D = 34] = "KEY_D", e[e.KEY_E = 35] = "KEY_E", e[e.KEY_F = 36] = "KEY_F", e[e.KEY_G = 37] = "KEY_G", e[e.KEY_H = 38] = "KEY_H", e[e.KEY_I = 39] = "KEY_I", e[e.KEY_J = 40] = "KEY_J", e[e.KEY_K = 41] = "KEY_K", e[e.KEY_L = 42] = "KEY_L", e[e.KEY_M = 43] = "KEY_M", e[e.KEY_N = 44] = "KEY_N", e[e.KEY_O = 45] = "KEY_O", e[e.KEY_P = 46] = "KEY_P", e[e.KEY_Q = 47] = "KEY_Q", e[e.KEY_R = 48] = "KEY_R", e[e.KEY_S = 49] = "KEY_S", e[e.KEY_T = 50] = "KEY_T", e[e.KEY_U = 51] = "KEY_U", e[e.KEY_V = 52] = "KEY_V", e[e.KEY_W = 53] = "KEY_W", e[e.KEY_X = 54] = "KEY_X", e[e.KEY_Y = 55] = "KEY_Y", e[e.KEY_Z = 56] = "KEY_Z", e[e.Meta = 57] = "Meta", e[e.ContextMenu = 58] = "ContextMenu", e[e.F1 = 59] = "F1", e[e.F2 = 60] = "F2", e[e.F3 = 61] = "F3", e[e.F4 = 62] = "F4",
- e[e.F5 = 63] = "F5", e[e.F6 = 64] = "F6", e[e.F7 = 65] = "F7", e[e.F8 = 66] = "F8", e[e.F9 = 67] = "F9", e[e.F10 = 68] = "F10", e[e.F11 = 69] = "F11", e[e.F12 = 70] = "F12", e[e.F13 = 71] = "F13", e[e.F14 = 72] = "F14", e[e.F15 = 73] = "F15", e[e.F16 = 74] = "F16", e[e.F17 = 75] = "F17", e[e.F18 = 76] = "F18", e[e.F19 = 77] = "F19", e[e.NumLock = 78] = "NumLock", e[e.ScrollLock = 79] = "ScrollLock", e[e.US_SEMICOLON = 80] = "US_SEMICOLON", e[e.US_EQUAL = 81] = "US_EQUAL", e[e.US_COMMA = 82] = "US_COMMA", e[e.US_MINUS = 83] = "US_MINUS", e[e.US_DOT = 84] = "US_DOT", e[e.US_SLASH = 85] = "US_SLASH", e[e.US_BACKTICK = 86] = "US_BACKTICK", e[e.US_OPEN_SQUARE_BRACKET = 87] = "US_OPEN_SQUARE_BRACKET", e[e.US_BACKSLASH = 88] = "US_BACKSLASH", e[e.US_CLOSE_SQUARE_BRACKET = 89] = "US_CLOSE_SQUARE_BRACKET", e[e.US_QUOTE = 90] = "US_QUOTE", e[e.OEM_8 = 91] = "OEM_8", e[e.OEM_102 = 92] = "OEM_102", e[e.NUMPAD_0 = 93] = "NUMPAD_0", e[e.NUMPAD_1 = 94] = "NUMPAD_1", e[e.NUMPAD_2 = 95] = "NUMPAD_2", e[e.NUMPAD_3 = 96] = "NUMPAD_3", e[e.NUMPAD_4 = 97] = "NUMPAD_4", e[e.NUMPAD_5 = 98] = "NUMPAD_5", e[e.NUMPAD_6 = 99] = "NUMPAD_6", e[e.NUMPAD_7 = 100] = "NUMPAD_7",e[e.NUMPAD_8 = 101] = "NUMPAD_8",
- e[e.NUMPAD_9 = 102] = "NUMPAD_9",e[e.NUMPAD_MULTIPLY = 103] = "NUMPAD_MULTIPLY",e[e.NUMPAD_ADD = 104] = "NUMPAD_ADD",e[e.NUMPAD_SEPARATOR = 105] = "NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT = 106] = "NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL = 107] = "NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE = 108] = "NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION = 109] = "KEY_IN_COMPOSITION",e[e.ABNT_C1 = 110] = "ABNT_C1",e[e.ABNT_C2 = 111] = "ABNT_C2",e[e.MAX_VALUE = 112] = "MAX_VALUE"
- }(t.KeyCode || (t.KeyCode = {})), function (e) {
- e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error"
- }(t.MarkerSeverity || (t.MarkerSeverity = {})), function (e) {
- e[e.Unnecessary = 1] = "Unnecessary", e[e.Deprecated = 2] = "Deprecated"
- }(t.MarkerTag || (t.MarkerTag = {})), function (e) {
- e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"
- }(t.MinimapPosition || (t.MinimapPosition = {})), function (e) {
- e[e.UNKNOWN = 0] = "UNKNOWN", e[e.TEXTAREA = 1] = "TEXTAREA", e[e.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN", e[e.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS", e[e.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS",
- e[e.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE", e[e.CONTENT_TEXT = 6] = "CONTENT_TEXT", e[e.CONTENT_EMPTY = 7] = "CONTENT_EMPTY", e[e.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE", e[e.CONTENT_WIDGET = 9] = "CONTENT_WIDGET", e[e.OVERVIEW_RULER = 10] = "OVERVIEW_RULER", e[e.SCROLLBAR = 11] = "SCROLLBAR", e[e.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET", e[e.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR"
- }(t.MouseTargetType || (t.MouseTargetType = {})), function (e) {
- e[e.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER", e[e.BOTTOM_RIGHT_CORNER = 1] = "BOTTOM_RIGHT_CORNER", e[e.TOP_CENTER = 2] = "TOP_CENTER"
- }(t.OverlayWidgetPositionPreference || (t.OverlayWidgetPositionPreference = {})), function (e) {
- e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"
- }(t.OverviewRulerLane || (t.OverviewRulerLane = {})), function (e) {
- e[e.Off = 0] = "Off", e[e.On = 1] = "On", e[e.Relative = 2] = "Relative", e[e.Interval = 3] = "Interval", e[e.Custom = 4] = "Custom"
- }(t.RenderLineNumbersType || (t.RenderLineNumbersType = {})), function (e) {
- e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Blocks = 2] = "Blocks"
- }(t.RenderMinimap || (t.RenderMinimap = {})), function (e) {
- e[e.Smooth = 0] = "Smooth", e[e.Immediate = 1] = "Immediate"
- }(t.ScrollType || (t.ScrollType = {})), function (e) {
- e[e.Auto = 1] = "Auto", e[e.Hidden = 2] = "Hidden", e[e.Visible = 3] = "Visible"
- }(t.ScrollbarVisibility || (t.ScrollbarVisibility = {})), function (e) {
- e[e.LTR = 0] = "LTR", e[e.RTL = 1] = "RTL"
- }(t.SelectionDirection || (t.SelectionDirection = {})), function (e) {
- e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"
- }(t.SignatureHelpTriggerKind || (t.SignatureHelpTriggerKind = {})), function (e) {
- e[e.File = 0] = "File", e[e.Module = 1] = "Module", e[e.Namespace = 2] = "Namespace", e[e.Package = 3] = "Package", e[e.Class = 4] = "Class", e[e.Method = 5] = "Method", e[e.Property = 6] = "Property", e[e.Field = 7] = "Field", e[e.Constructor = 8] = "Constructor", e[e.Enum = 9] = "Enum", e[e.Interface = 10] = "Interface", e[e.Function = 11] = "Function", e[e.Variable = 12] = "Variable", e[e.Constant = 13] = "Constant", e[e.String = 14] = "String", e[e.Number = 15] = "Number", e[e.Boolean = 16] = "Boolean", e[e.Array = 17] = "Array",
- e[e.Object = 18] = "Object", e[e.Key = 19] = "Key", e[e.Null = 20] = "Null", e[e.EnumMember = 21] = "EnumMember", e[e.Struct = 22] = "Struct", e[e.Event = 23] = "Event", e[e.Operator = 24] = "Operator", e[e.TypeParameter = 25] = "TypeParameter"
- }(t.SymbolKind || (t.SymbolKind = {})), function (e) {
- e[e.Deprecated = 1] = "Deprecated"
- }(t.SymbolTag || (t.SymbolTag = {})), function (e) {
- e[e.Hidden = 0] = "Hidden", e[e.Blink = 1] = "Blink", e[e.Smooth = 2] = "Smooth", e[e.Phase = 3] = "Phase", e[e.Expand = 4] = "Expand", e[e.Solid = 5] = "Solid"
- }(t.TextEditorCursorBlinkingStyle || (t.TextEditorCursorBlinkingStyle = {})), function (e) {
- e[e.Line = 1] = "Line", e[e.Block = 2] = "Block", e[e.Underline = 3] = "Underline", e[e.LineThin = 4] = "LineThin", e[e.BlockOutline = 5] = "BlockOutline", e[e.UnderlineThin = 6] = "UnderlineThin"
- }(t.TextEditorCursorStyle || (t.TextEditorCursorStyle = {})), function (e) {
- e[e.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", e[e.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", e[e.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore",
- e[e.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"
- }(t.TrackedRangeStickiness || (t.TrackedRangeStickiness = {})), function (e) {
- e[e.None = 0] = "None", e[e.Same = 1] = "Same", e[e.Indent = 2] = "Indent", e[e.DeepIndent = 3] = "DeepIndent"
- }(t.WrappingIndent || (t.WrappingIndent = {}))
- })),define(n[192], i([0, 1, 26, 4, 36, 25, 13, 3, 22, 107, 147, 614]), (function (e, t, n, i, o, r, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function () {
- function e() {
- }
- return e.chord = function (e, t) {
- return o.KeyChord(e, t)
- }, e.CtrlCmd = 2048, e.Shift = 1024, e.Alt = 512, e.WinCtrl = 256, e
- }();
- t.KeyMod = c, t.createMonacoBaseAPI = function () {
- return {
- editor: void 0,
- languages: void 0,
- CancellationTokenSource: n.CancellationTokenSource,
- Emitter: i.Emitter,
- KeyCode: d.KeyCode,
- KeyMod: c,
- Position: s.Position,
- Range: a.Range,
- Selection: l.Selection,
- SelectionDirection: d.SelectionDirection,
- MarkerSeverity: d.MarkerSeverity,
- MarkerTag: d.MarkerTag,
- Uri: r.URI,
- Token: u.Token
- }
- }
- })),define(n[193], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var n = function () {
- function e(e, t, n) {
- this.from = 0 | e, this.to = 0 | t, this.colorId = 0 | n
- }
- return e.compare = function (e, t) {
- return e.colorId === t.colorId ? e.from === t.from ? e.to - t.to : e.from - t.from : e.colorId - t.colorId
- }, e
- }();
- t.ColorZone = n;
- var i = function () {
- function e(e, t, n) {
- this.startLineNumber = e, this.endLineNumber = t, this.color = n, this._colorZone = null
- }
- return e.compare = function (e, t) {
- return e.color === t.color ? e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber : e.color < t.color ? -1 : 1
- }, e.prototype.setColorZone = function (e) {
- this._colorZone = e
- }, e.prototype.getColorZones = function () {
- return this._colorZone
- }, e
- }();
- t.OverviewRulerZone = i;
- var o = function () {
- function e(e) {
- this._getVerticalOffsetForLine = e, this._zones = [], this._colorZonesInvalid = !1, this._lineHeight = 0, this._domWidth = 0, this._domHeight = 0, this._outerHeight = 0, this._pixelRatio = 1, this._lastAssignedId = 0, this._color2Id = Object.create(null), this._id2Color = []
- }
- return e.prototype.getId2Color = function () {
- return this._id2Color
- },
- e.prototype.setZones = function (e) {
- this._zones = e, this._zones.sort(i.compare)
- }, e.prototype.setLineHeight = function (e) {
- return this._lineHeight !== e && (this._lineHeight = e, this._colorZonesInvalid = !0, !0)
- }, e.prototype.setPixelRatio = function (e) {
- this._pixelRatio = e, this._colorZonesInvalid = !0
- }, e.prototype.getDOMWidth = function () {
- return this._domWidth
- }, e.prototype.getCanvasWidth = function () {
- return this._domWidth * this._pixelRatio
- }, e.prototype.setDOMWidth = function (e) {
- return this._domWidth !== e && (this._domWidth = e, this._colorZonesInvalid = !0, !0)
- }, e.prototype.getDOMHeight = function () {
- return this._domHeight
- }, e.prototype.getCanvasHeight = function () {
- return this._domHeight * this._pixelRatio
- }, e.prototype.setDOMHeight = function (e) {
- return this._domHeight !== e && (this._domHeight = e, this._colorZonesInvalid = !0, !0)
- }, e.prototype.getOuterHeight = function () {
- return this._outerHeight
- }, e.prototype.setOuterHeight = function (e) {
- return this._outerHeight !== e && (this._outerHeight = e, this._colorZonesInvalid = !0, !0)
- }, e.prototype.resolveColorZones = function () {
- for (var e = this._colorZonesInvalid, t = Math.floor(this._lineHeight), i = Math.floor(this.getCanvasHeight()), o = i / Math.floor(this._outerHeight), r = Math.floor(4 * this._pixelRatio / 2), s = [], a = 0, l = this._zones.length; a < l; a++) {
- var u = this._zones[a];
- if (!e) {
- var d = u.getColorZones();
- if (d) {
- s.push(d);
- continue
- }
- }
- var c = Math.floor(o * this._getVerticalOffsetForLine(u.startLineNumber)),
- h = Math.floor(o * (this._getVerticalOffsetForLine(u.endLineNumber) + t)),
- p = Math.floor((c + h) / 2), g = h - p;
- g < r && (g = r), p - g < 0 && (p = g), p + g > i && (p = i - g);
- var f = u.color, m = this._color2Id[f];
- m || (m = ++this._lastAssignedId, this._color2Id[f] = m, this._id2Color[m] = f);
- var v = new n(p - g, p + g, m);
- u.setColorZone(v), s.push(v)
- }
- return this._colorZonesInvalid = !1, s.sort(n.compare), s
- }, e
- }();
- t.OverviewZoneManager = o
- })),define(n[91], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t) {
- this._viewLayout = e, this.viewportData = t, this.scrollWidth = this._viewLayout.getScrollWidth(), this.scrollHeight = this._viewLayout.getScrollHeight(),
- this.visibleRange = this.viewportData.visibleRange, this.bigNumbersDelta = this.viewportData.bigNumbersDelta;
- var n = this._viewLayout.getCurrentViewport();
- this.scrollTop = n.top, this.scrollLeft = n.left, this.viewportWidth = n.width, this.viewportHeight = n.height
- }
- return e.prototype.getScrolledTopFromAbsoluteTop = function (e) {
- return e - this.scrollTop
- }, e.prototype.getVerticalOffsetForLineNumber = function (e) {
- return this._viewLayout.getVerticalOffsetForLineNumber(e)
- }, e.prototype.getDecorationsInViewport = function () {
- return this.viewportData.getDecorationsInViewport()
- }, e
- }();
- t.RestrictedRenderingContext = n;
- var i = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, n) || this;
- return o._viewLines = i, o
- }
- return r(t, e), t.prototype.linesVisibleRangesForRange = function (e, t) {
- return this._viewLines.linesVisibleRangesForRange(e, t)
- }, t.prototype.visibleRangeForPosition = function (e) {
- return this._viewLines.visibleRangeForPosition(e)
- }, t
- }(n);
- t.RenderingContext = i;
- var o = function (e, t, n) {
- this.outsideRenderedLine = e, this.lineNumber = t, this.ranges = n
- }
- ;t.LineVisibleRanges = o;
- var s = function () {
- function e(e, t) {
- this.left = Math.round(e), this.width = Math.round(t)
- }
- return e.prototype.toString = function () {
- return "[" + this.left + "," + this.width + "]"
- }, e
- }();
- t.HorizontalRange = s;
- var a = function (e, t) {
- this.outsideRenderedLine = e, this.left = Math.round(t)
- };
- t.HorizontalPosition = a;
- var l = function (e, t) {
- this.outsideRenderedLine = e, this.ranges = t
- };
- t.VisibleRanges = l
- })),define(n[359], i([0, 1, 91]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t) {
- this.left = e, this.width = t
- }
- return e.prototype.toString = function () {
- return "[" + this.left + "," + this.width + "]"
- }, e.compare = function (e, t) {
- return e.left - t.left
- }, e
- }(), o = function () {
- function e() {
- }
- return e._createRange = function () {
- return this._handyReadyRange || (this._handyReadyRange = document.createRange()), this._handyReadyRange
- }, e._detachRange = function (e, t) {
- e.selectNodeContents(t)
- }, e._readClientRects = function (e, t, n, i, o) {
- var r = this._createRange();
- try {
- return r.setStart(e, t), r.setEnd(n, i), r.getClientRects()
- } catch (e) {
- return null
- } finally {
- this._detachRange(r, o)
- }
- }, e._mergeAdjacentRanges = function (e) {
- if (1 === e.length) return [new n.HorizontalRange(e[0].left, e[0].width)];
- e.sort(i.compare);
- for (var t = [], o = 0, r = e[0].left, s = e[0].width, a = 1, l = e.length; a < l; a++) {
- var u = e[a], d = u.left, c = u.width;
- r + s + .9 >= d ? s = Math.max(s, d + c - r) : (t[o++] = new n.HorizontalRange(r, s), r = d, s = c)
- }
- return t[o++] = new n.HorizontalRange(r, s), t
- }, e._createHorizontalRangesFromClientRects = function (e, t) {
- if (!e || 0 === e.length) return null;
- for (var n = [], o = 0, r = e.length; o < r; o++) {
- var s = e[o];
- n[o] = new i(Math.max(0, s.left - t), s.width)
- }
- return this._mergeAdjacentRanges(n)
- }, e.readHorizontalRanges = function (e, t, n, i, o, r, s) {
- var a = e.children.length - 1;
- if (0 > a) return null;
- (t = Math.min(a, Math.max(0, t))) !== (i = Math.min(a, Math.max(0, i))) && i > 0 && 0 === o && (i--, o = 1073741824);
- var l = e.children[t].firstChild, u = e.children[i].firstChild;
- if (l && u || (!l && 0 === n && t > 0 && (l = e.children[t - 1].firstChild, n = 1073741824), !u && 0 === o && i > 0 && (u = e.children[i - 1].firstChild, o = 1073741824)), !l || !u) return null
- ;
- n = Math.min(l.textContent.length, Math.max(0, n)), o = Math.min(u.textContent.length, Math.max(0, o));
- var d = this._readClientRects(l, n, u, o, s);
- return this._createHorizontalRangesFromClientRects(d, r)
- }, e
- }();
- t.RangeUtil = o
- })),define(n[360], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e, t, n, i) {
- this.configuration = e, this.theme = t, this.model = n, this.viewLayout = n.viewLayout, this.privateViewEventBus = i
- }
- return e.prototype.addEventHandler = function (e) {
- this.privateViewEventBus.addEventHandler(e)
- }, e.prototype.removeEventHandler = function (e) {
- this.privateViewEventBus.removeEventHandler(e)
- }, e
- }();
- t.ViewContext = n
- })),define(n[361], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this._eventHandlerGateKeeper = e, this._eventHandlers = [], this._eventQueue = null, this._isConsumingQueue = !1
- }
- return e.prototype.addEventHandler = function (e) {
- for (var t = 0, n = this._eventHandlers.length; t < n; t++) this._eventHandlers[t] === e && console.warn("Detected duplicate listener in ViewEventDispatcher", e);
- this._eventHandlers.push(e)
- }, e.prototype.removeEventHandler = function (e) {
- for (var t = 0; t < this._eventHandlers.length; t++) if (this._eventHandlers[t] === e) {
- this._eventHandlers.splice(t, 1);
- break
- }
- }, e.prototype.emit = function (e) {
- this._eventQueue ? this._eventQueue.push(e) : this._eventQueue = [e], this._isConsumingQueue || this.consumeQueue()
- }, e.prototype.emitMany = function (e) {
- this._eventQueue ? this._eventQueue = this._eventQueue.concat(e) : this._eventQueue = e, this._isConsumingQueue || this.consumeQueue()
- }, e.prototype.consumeQueue = function () {
- var e = this;
- this._eventHandlerGateKeeper((function () {
- try {
- e._isConsumingQueue = !0, e._doConsumeQueue()
- } finally {
- e._isConsumingQueue = !1
- }
- }))
- }, e.prototype._doConsumeQueue = function () {
- for (; this._eventQueue;) {
- var e = this._eventQueue;
- this._eventQueue = null;
- for (var t = this._eventHandlers.slice(0), n = 0, i = t.length; n < i; n++) t[n].handleEvents(e)
- }
- }, e
- }();
- t.ViewEventDispatcher = n
- })),define(n[81], i([0, 1, 10, 2]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e) {
- this.type = 1, this._source = e
- }
- return e.prototype.hasChanged = function (e) {
- return this._source.hasChanged(e)
- }, e
- }();
- t.ViewConfigurationChangedEvent = o;
- var s = function (e) {
- this.type = 2, this.contentWidth = e.contentWidth, this.contentHeight = e.contentHeight, this.contentWidthChanged = e.contentWidthChanged, this.contentHeightChanged = e.contentHeightChanged
- };
- t.ViewContentSizeChangedEvent = s;
- var a = function (e, t) {
- this.type = 3, this.selections = e, this.modelSelections = t
- };
- t.ViewCursorStateChangedEvent = a;
- var l = function () {
- this.type = 4
- };
- t.ViewDecorationsChangedEvent = l;
- var u = function () {
- this.type = 5
- };
- t.ViewFlushedEvent = u;
- var d = function (e) {
- this.type = 6, this.isFocused = e
- };
- t.ViewFocusChangedEvent = d;
- var c = function () {
- this.type = 7
- };
- t.ViewLanguageConfigurationEvent = c;
- var h = function () {
- this.type = 8
- };
- t.ViewLineMappingChangedEvent = h;
- var p = function (e, t) {
- this.type = 9, this.fromLineNumber = e, this.toLineNumber = t
- }
- ;t.ViewLinesChangedEvent = p;
- var g = function (e, t) {
- this.type = 10, this.fromLineNumber = e, this.toLineNumber = t
- };
- t.ViewLinesDeletedEvent = g;
- var f = function (e, t) {
- this.type = 11, this.fromLineNumber = e, this.toLineNumber = t
- };
- t.ViewLinesInsertedEvent = f;
- var m = function (e, t, n, i, o) {
- this.type = 12, this.source = e, this.range = t, this.verticalType = n, this.revealHorizontal = i, this.scrollType = o
- };
- t.ViewRevealRangeRequestEvent = m;
- var v = function (e) {
- this.type = 13, this.scrollWidth = e.scrollWidth, this.scrollLeft = e.scrollLeft, this.scrollHeight = e.scrollHeight, this.scrollTop = e.scrollTop, this.scrollWidthChanged = e.scrollWidthChanged, this.scrollLeftChanged = e.scrollLeftChanged, this.scrollHeightChanged = e.scrollHeightChanged, this.scrollTopChanged = e.scrollTopChanged
- };
- t.ViewScrollChangedEvent = v;
- var _ = function () {
- this.type = 14
- };
- t.ViewThemeChangedEvent = _;
- var y = function (e) {
- this.type = 15, this.ranges = e
- };
- t.ViewTokensChangedEvent = y;
- var C = function () {
- this.type = 16
- };
- t.ViewTokensColorsChangedEvent = C;
- var b = function () {
- this.type = 17
- };
- t.ViewZonesChangedEvent = b;
- var S = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._listeners = [], t._collector = null, t._collectorCnt = 0, t
- }
- return r(t, e), t.prototype.dispose = function () {
- this._listeners = [], e.prototype.dispose.call(this)
- }, t.prototype._beginEmit = function () {
- return this._collectorCnt++, 1 === this._collectorCnt && (this._collector = new w), this._collector
- }, t.prototype._endEmit = function () {
- if (this._collectorCnt--, 0 === this._collectorCnt) {
- var e = this._collector.finalize();
- this._collector = null, e.length > 0 && this._emit(e)
- }
- }, t.prototype._emit = function (e) {
- for (var t = this._listeners.slice(0), n = 0, i = t.length; n < i; n++) E(t[n], e)
- }, t.prototype.addEventListener = function (e) {
- var t = this;
- return this._listeners.push(e), i.toDisposable((function () {
- for (var n = t._listeners, i = 0, o = n.length; i < o; i++) if (n[i] === e) {
- n.splice(i, 1);
- break
- }
- }))
- }, t
- }(i.Disposable);
- t.ViewEventEmitter = S;
- var w = function () {
- function e() {
- this._eventsLen = 0, this._events = [], this._eventsLen = 0
- }
- return e.prototype.emit = function (e) {
- this._events[this._eventsLen++] = e
- }, e.prototype.finalize = function () {
- var e = this._events
- ;
- return this._events = [], e
- }, e
- }();
- function E(e, t) {
- try {
- e(t)
- } catch (e) {
- n.onUnexpectedError(e)
- }
- }
- t.ViewEventsCollector = w
- })),define(n[148], i([0, 1, 5]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n, i) {
- this.startColumn = e, this.endColumn = t, this.className = n, this.type = i
- }
- return e._equals = function (e, t) {
- return e.startColumn === t.startColumn && e.endColumn === t.endColumn && e.className === t.className && e.type === t.type
- }, e.equalsArr = function (t, n) {
- var i = t.length;
- if (i !== n.length) return !1;
- for (var o = 0; o < i; o++) if (!e._equals(t[o], n[o])) return !1;
- return !0
- }, e.filter = function (t, n, i, o) {
- if (0 === t.length) return [];
- for (var r = [], s = 0, a = 0, l = t.length; a < l; a++) {
- var u = t[a], d = u.range;
- if (!(d.endLineNumber < n || d.startLineNumber > n) && (!d.isEmpty() || 0 !== u.type && 3 !== u.type)) {
- var c = d.startLineNumber === n ? d.startColumn : i,
- h = d.endLineNumber === n ? d.endColumn : o;
- r[s++] = new e(c, h, u.inlineClassName, u.type)
- }
- }
- return r
- }, e.compare = function (e, t) {
- return e.startColumn === t.startColumn ? e.endColumn === t.endColumn ? e.className < t.className ? -1 : e.className > t.className ? 1 : 0 : e.endColumn - t.endColumn : e.startColumn - t.startColumn
- }, e
- }();
- t.LineDecoration = i;
- var o = function (e, t, n) {
- this.startOffset = e, this.endOffset = t, this.className = n
- };
- t.DecorationSegment = o;
- var r = function () {
- function e() {
- this.stopOffsets = [], this.classNames = [], this.count = 0
- }
- return e.prototype.consumeLowerThan = function (e, t, n) {
- for (; this.count > 0 && this.stopOffsets[0] < e;) {
- for (var i = 0; i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1];) i++;
- n.push(new o(t, this.stopOffsets[i], this.classNames.join(" "))), t = this.stopOffsets[i] + 1, this.stopOffsets.splice(0, i + 1), this.classNames.splice(0, i + 1), this.count -= i + 1
- }
- return this.count > 0 && t < e && (n.push(new o(t, e - 1, this.classNames.join(" "))), t = e), t
- }, e.prototype.insert = function (e, t) {
- if (0 === this.count || this.stopOffsets[this.count - 1] <= e) this.stopOffsets.push(e), this.classNames.push(t); else for (var n = 0; n < this.count; n++) if (this.stopOffsets[n] >= e) {
- this.stopOffsets.splice(n, 0, e),
- this.classNames.splice(n, 0, t);
- break
- }
- this.count++
- }, e
- }(), s = function () {
- function e() {
- }
- return e.normalize = function (e, t) {
- if (0 === t.length) return [];
- for (var i = [], o = new r, s = 0, a = 0, l = t.length; a < l; a++) {
- var u = t[a], d = u.startColumn, c = u.endColumn, h = u.className;
- if (d > 1) {
- var p = e.charCodeAt(d - 2);
- n.isHighSurrogate(p) && d--
- }
- if (c > 1) {
- p = e.charCodeAt(c - 2);
- n.isHighSurrogate(p) && c--
- }
- var g = d - 1, f = c - 2;
- s = o.consumeLowerThan(g, s, i), 0 === o.count && (s = g), o.insert(f, h)
- }
- return o.consumeLowerThan(1073741824, s, i), i
- }, e
- }();
- t.LineDecorationsNormalizer = s
- })),define(n[362], i([0, 1, 5]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e() {
- this._hasPending = !1, this._inserts = [], this._changes = [], this._removes = []
- }
- return e.prototype.insert = function (e) {
- this._hasPending = !0, this._inserts.push(e)
- }, e.prototype.change = function (e) {
- this._hasPending = !0, this._changes.push(e)
- }, e.prototype.remove = function (e) {
- this._hasPending = !0, this._removes.push(e)
- }, e.prototype.mustCommit = function () {
- return this._hasPending
- },
- e.prototype.commit = function (e) {
- if (this._hasPending) {
- var t = this._inserts, n = this._changes, i = this._removes;
- this._hasPending = !1, this._inserts = [], this._changes = [], this._removes = [], e._commitPendingChanges(t, n, i)
- }
- }, e
- }(), o = function (e, t, n, i, o) {
- this.id = e, this.afterLineNumber = t, this.ordinal = n, this.height = i, this.minWidth = o, this.prefixSum = 0
- };
- t.EditorWhitespace = o;
- var r = function () {
- function e(t, o) {
- this._instanceId = n.singleLetterHash(++e.INSTANCE_COUNT), this._pendingChanges = new i, this._lastWhitespaceId = 0, this._arr = [], this._prefixSumValidIndex = -1, this._minWidth = -1, this._lineCount = t, this._lineHeight = o
- }
- return e.findInsertionIndex = function (e, t, n) {
- for (var i = 0, o = e.length; i < o;) {
- var r = i + o >>> 1;
- t === e[r].afterLineNumber ? n < e[r].ordinal ? o = r : i = r + 1 : t < e[r].afterLineNumber ? o = r : i = r + 1
- }
- return i
- }, e.prototype.setLineHeight = function (e) {
- this._checkPendingChanges(), this._lineHeight = e
- }, e.prototype.onFlushed = function (e) {
- this._checkPendingChanges(), this._lineCount = e
- }, e.prototype.changeWhitespace = function (e) {
- var t = this;
- try {
- return e({
- insertWhitespace: function (e, n, i, r) {
- e |= 0, n |= 0, i |= 0, r |= 0;
- var s = t._instanceId + ++t._lastWhitespaceId;
- return t._pendingChanges.insert(new o(s, e, n, i, r)), s
- }, changeOneWhitespace: function (e, n, i) {
- n |= 0, i |= 0, t._pendingChanges.change({id: e, newAfterLineNumber: n, newHeight: i})
- }, removeWhitespace: function (e) {
- t._pendingChanges.remove({id: e})
- }
- })
- } finally {
- this._pendingChanges.commit(this)
- }
- }, e.prototype._commitPendingChanges = function (e, t, n) {
- if ((e.length > 0 || n.length > 0) && (this._minWidth = -1), e.length + t.length + n.length <= 1) {
- for (var i = 0, o = e; i < o.length; i++) {
- var r = o[i];
- this._insertWhitespace(r)
- }
- for (var s = 0, a = t; s < a.length; s++) {
- var l = a[s];
- this._changeOneWhitespace(l.id, l.newAfterLineNumber, l.newHeight)
- }
- for (var u = 0, d = n; u < d.length; u++) {
- var c = d[u], h = this._findWhitespaceIndex(c.id);
- -1 !== h && this._removeWhitespace(h)
- }
- } else {
- for (var p = new Set, g = 0, f = n; g < f.length; g++) {
- c = f[g];
- p.add(c.id)
- }
- for (var m = new Map, v = 0, _ = t; v < _.length; v++) {
- l = _[v];
- m.set(l.id, l)
- }
- var y = function (e) {
- for (var t = [], n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- if (!p.has(o.id)) {
- if (m.has(o.id)) {
- var r = m.get(o.id);
- o.afterLineNumber = r.newAfterLineNumber, o.height = r.newHeight
- }
- t.push(o)
- }
- }
- return t
- }, C = y(this._arr).concat(y(e));
- C.sort((function (e, t) {
- return e.afterLineNumber === t.afterLineNumber ? e.ordinal - t.ordinal : e.afterLineNumber - t.afterLineNumber
- })), this._arr = C, this._prefixSumValidIndex = -1
- }
- }, e.prototype._checkPendingChanges = function () {
- this._pendingChanges.mustCommit() && this._pendingChanges.commit(this)
- }, e.prototype._insertWhitespace = function (t) {
- var n = e.findInsertionIndex(this._arr, t.afterLineNumber, t.ordinal);
- this._arr.splice(n, 0, t), this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, n - 1)
- }, e.prototype._findWhitespaceIndex = function (e) {
- for (var t = this._arr, n = 0, i = t.length; n < i; n++) if (t[n].id === e) return n;
- return -1
- }, e.prototype._changeOneWhitespace = function (e, t, n) {
- var i = this._findWhitespaceIndex(e);
- if (-1 !== i && (this._arr[i].height !== n && (this._arr[i].height = n, this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, i - 1)), this._arr[i].afterLineNumber !== t)) {
- var o = this._arr[i];
- this._removeWhitespace(i),
- o.afterLineNumber = t, this._insertWhitespace(o)
- }
- }, e.prototype._removeWhitespace = function (e) {
- this._arr.splice(e, 1), this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, e - 1)
- }, e.prototype.onLinesDeleted = function (e, t) {
- this._checkPendingChanges(), e |= 0, t |= 0, this._lineCount -= t - e + 1;
- for (var n = 0, i = this._arr.length; n < i; n++) {
- var o = this._arr[n].afterLineNumber;
- e <= o && o <= t ? this._arr[n].afterLineNumber = e - 1 : o > t && (this._arr[n].afterLineNumber -= t - e + 1)
- }
- }, e.prototype.onLinesInserted = function (e, t) {
- this._checkPendingChanges(), e |= 0, t |= 0, this._lineCount += t - e + 1;
- for (var n = 0, i = this._arr.length; n < i; n++) {
- e <= this._arr[n].afterLineNumber && (this._arr[n].afterLineNumber += t - e + 1)
- }
- }, e.prototype.getWhitespacesTotalHeight = function () {
- return this._checkPendingChanges(), 0 === this._arr.length ? 0 : this.getWhitespacesAccumulatedHeight(this._arr.length - 1)
- }, e.prototype.getWhitespacesAccumulatedHeight = function (e) {
- this._checkPendingChanges(), e |= 0;
- var t = Math.max(0, this._prefixSumValidIndex + 1);
- 0 === t && (this._arr[0].prefixSum = this._arr[0].height, t++)
- ;
- for (var n = t; n <= e; n++) this._arr[n].prefixSum = this._arr[n - 1].prefixSum + this._arr[n].height;
- return this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, e), this._arr[e].prefixSum
- }, e.prototype.getLinesTotalHeight = function () {
- return this._checkPendingChanges(), this._lineHeight * this._lineCount + this.getWhitespacesTotalHeight()
- }, e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber = function (e) {
- this._checkPendingChanges(), e |= 0;
- var t = this._findLastWhitespaceBeforeLineNumber(e);
- return -1 === t ? 0 : this.getWhitespacesAccumulatedHeight(t)
- }, e.prototype._findLastWhitespaceBeforeLineNumber = function (e) {
- e |= 0;
- for (var t = this._arr, n = 0, i = t.length - 1; n <= i;) {
- var o = n + ((i - n | 0) / 2 | 0) | 0;
- if (t[o].afterLineNumber < e) {
- if (o + 1 >= t.length || t[o + 1].afterLineNumber >= e) return o;
- n = o + 1 | 0
- } else i = o - 1 | 0
- }
- return -1
- }, e.prototype._findFirstWhitespaceAfterLineNumber = function (e) {
- e |= 0;
- var t = this._findLastWhitespaceBeforeLineNumber(e) + 1;
- return t < this._arr.length ? t : -1
- }, e.prototype.getFirstWhitespaceIndexAfterLineNumber = function (e) {
- return this._checkPendingChanges(), e |= 0, this._findFirstWhitespaceAfterLineNumber(e)
- }, e.prototype.getVerticalOffsetForLineNumber = function (e) {
- return this._checkPendingChanges(), ((e |= 0) > 1 ? this._lineHeight * (e - 1) : 0) + this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)
- }, e.prototype.getWhitespaceMinWidth = function () {
- if (this._checkPendingChanges(), -1 === this._minWidth) {
- for (var e = 0, t = 0, n = this._arr.length; t < n; t++) e = Math.max(e, this._arr[t].minWidth);
- this._minWidth = e
- }
- return this._minWidth
- }, e.prototype.isAfterLines = function (e) {
- return this._checkPendingChanges(), e > this.getLinesTotalHeight()
- }, e.prototype.getLineNumberAtOrAfterVerticalOffset = function (e) {
- if (this._checkPendingChanges(), (e |= 0) < 0) return 1;
- for (var t = 0 | this._lineCount, n = this._lineHeight, i = 1, o = t; i < o;) {
- var r = (i + o) / 2 | 0, s = 0 | this.getVerticalOffsetForLineNumber(r);
- if (e >= s + n) i = r + 1; else {
- if (e >= s) return r;
- o = r
- }
- }
- return i > t ? t : i
- }, e.prototype.getLinesViewportData = function (e, t) {
- this._checkPendingChanges(), e |= 0, t |= 0
- ;var n, i, o = this._lineHeight, r = 0 | this.getLineNumberAtOrAfterVerticalOffset(e),
- s = 0 | this.getVerticalOffsetForLineNumber(r), a = 0 | this._lineCount,
- l = 0 | this.getFirstWhitespaceIndexAfterLineNumber(r), u = 0 | this.getWhitespacesCount();
- -1 === l ? (l = u, i = a + 1, n = 0) : (i = 0 | this.getAfterLineNumberForWhitespaceIndex(l), n = 0 | this.getHeightForWhitespaceIndex(l));
- var d = s, c = d, h = 0;
- s >= 5e5 && (h = 5e5 * Math.floor(s / 5e5), c -= h = Math.floor(h / o) * o);
- for (var p = [], g = e + (t - e) / 2, f = -1, m = r; m <= a; m++) {
- if (-1 === f) {
- (d <= g && g < d + o || d > g) && (f = m)
- }
- for (d += o, p[m - r] = c, c += o; i === m;) c += n, d += n, ++l >= u ? i = a + 1 : (i = 0 | this.getAfterLineNumberForWhitespaceIndex(l), n = 0 | this.getHeightForWhitespaceIndex(l));
- if (d >= t) {
- a = m;
- break
- }
- }
- -1 === f && (f = a);
- var v = 0 | this.getVerticalOffsetForLineNumber(a), _ = r, y = a;
- return _ < y && s < e && _++, _ < y && v + o > t && y--, {
- bigNumbersDelta: h,
- startLineNumber: r,
- endLineNumber: a,
- relativeVerticalOffset: p,
- centeredLineNumber: f,
- completelyVisibleStartLineNumber: _,
- completelyVisibleEndLineNumber: y
- }
- }, e.prototype.getVerticalOffsetForWhitespaceIndex = function (e) {
- this._checkPendingChanges(), e |= 0
- ;var t = this.getAfterLineNumberForWhitespaceIndex(e);
- return (t >= 1 ? this._lineHeight * t : 0) + (e > 0 ? this.getWhitespacesAccumulatedHeight(e - 1) : 0)
- }, e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset = function (e) {
- this._checkPendingChanges(), e |= 0;
- var t = 0, n = this.getWhitespacesCount() - 1;
- if (n < 0) return -1;
- if (e >= this.getVerticalOffsetForWhitespaceIndex(n) + this.getHeightForWhitespaceIndex(n)) return -1;
- for (; t < n;) {
- var i = Math.floor((t + n) / 2), o = this.getVerticalOffsetForWhitespaceIndex(i);
- if (e >= o + this.getHeightForWhitespaceIndex(i)) t = i + 1; else {
- if (e >= o) return i;
- n = i
- }
- }
- return t
- }, e.prototype.getWhitespaceAtVerticalOffset = function (e) {
- this._checkPendingChanges(), e |= 0;
- var t = this.getWhitespaceIndexAtOrAfterVerticallOffset(e);
- if (t < 0) return null;
- if (t >= this.getWhitespacesCount()) return null;
- var n = this.getVerticalOffsetForWhitespaceIndex(t);
- if (n > e) return null;
- var i = this.getHeightForWhitespaceIndex(t);
- return {
- id: this.getIdForWhitespaceIndex(t),
- afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(t),
- verticalOffset: n,
- height: i
- }
- },
- e.prototype.getWhitespaceViewportData = function (e, t) {
- this._checkPendingChanges(), e |= 0, t |= 0;
- var n = this.getWhitespaceIndexAtOrAfterVerticallOffset(e), i = this.getWhitespacesCount() - 1;
- if (n < 0) return [];
- for (var o = [], r = n; r <= i; r++) {
- var s = this.getVerticalOffsetForWhitespaceIndex(r), a = this.getHeightForWhitespaceIndex(r);
- if (s >= t) break;
- o.push({
- id: this.getIdForWhitespaceIndex(r),
- afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(r),
- verticalOffset: s,
- height: a
- })
- }
- return o
- }, e.prototype.getWhitespaces = function () {
- return this._checkPendingChanges(), this._arr.slice(0)
- }, e.prototype.getWhitespacesCount = function () {
- return this._checkPendingChanges(), this._arr.length
- }, e.prototype.getIdForWhitespaceIndex = function (e) {
- return this._checkPendingChanges(), e |= 0, this._arr[e].id
- }, e.prototype.getAfterLineNumberForWhitespaceIndex = function (e) {
- return this._checkPendingChanges(), e |= 0, this._arr[e].afterLineNumber
- }, e.prototype.getHeightForWhitespaceIndex = function (e) {
- return this._checkPendingChanges(), e |= 0, this._arr[e].height
- }, e.INSTANCE_COUNT = 0, e
- }();
- t.LinesLayout = r
- })),define(n[110], i([0, 1, 5, 106, 148]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function (e, t) {
- this.endIndex = e, this.type = t
- }, s = function () {
- function e(e, t) {
- this.startOffset = e, this.endOffset = t
- }
- return e.prototype.equals = function (e) {
- return this.startOffset === e.startOffset && this.endOffset === e.endOffset
- }, e
- }();
- t.LineRange = s;
- var a = function () {
- function e(e, t, n, i, o, r, s, a, l, u, d, c, h, p, g, f, m, v) {
- this.useMonospaceOptimizations = e, this.canUseHalfwidthRightwardsArrow = t, this.lineContent = n, this.continuesWithWrappedLine = i, this.isBasicASCII = o, this.containsRTL = r, this.fauxIndentLength = s, this.lineTokens = a, this.lineDecorations = l, this.tabSize = u, this.startVisibleColumn = d, this.spaceWidth = c, this.middotWidth = h, this.stopRenderingLineAfter = p, this.renderWhitespace = "all" === g ? 3 : "boundary" === g ? 1 : "selection" === g ? 2 : 0, this.renderControlCharacters = f, this.fontLigatures = m, this.selectionsOnLine = v && v.sort((function (e, t) {
- return e.startOffset < t.startOffset ? -1 : 1
- }))
- }
- return e.prototype.sameSelection = function (e) {
- if (null === this.selectionsOnLine) return null === e;
- if (null === e) return !1;
- if (e.length !== this.selectionsOnLine.length) return !1;
- for (var t = 0; t < this.selectionsOnLine.length; t++) if (!this.selectionsOnLine[t].equals(e[t])) return !1;
- return !0
- }, e.prototype.equals = function (e) {
- return this.useMonospaceOptimizations === e.useMonospaceOptimizations && this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && this.lineContent === e.lineContent && this.continuesWithWrappedLine === e.continuesWithWrappedLine && this.isBasicASCII === e.isBasicASCII && this.containsRTL === e.containsRTL && this.fauxIndentLength === e.fauxIndentLength && this.tabSize === e.tabSize && this.startVisibleColumn === e.startVisibleColumn && this.spaceWidth === e.spaceWidth && this.stopRenderingLineAfter === e.stopRenderingLineAfter && this.renderWhitespace === e.renderWhitespace && this.renderControlCharacters === e.renderControlCharacters && this.fontLigatures === e.fontLigatures && o.LineDecoration.equalsArr(this.lineDecorations, e.lineDecorations) && this.lineTokens.equals(e.lineTokens) && this.sameSelection(e.selectionsOnLine)
- }, e
- }();
- t.RenderLineInput = a;
- var l = function () {
- function e(e, t) {
- this.length = e, this._data = new Uint32Array(this.length), this._absoluteOffsets = new Uint32Array(this.length)
- }
- return e.getPartIndex = function (e) {
- return (4294901760 & e) >>> 16
- },
- e.getCharIndex = function (e) {
- return (65535 & e) >>> 0
- }, e.prototype.setPartData = function (e, t, n, i) {
- var o = (t << 16 | n << 0) >>> 0;
- this._data[e] = o, this._absoluteOffsets[e] = i + n
- }, e.prototype.getAbsoluteOffsets = function () {
- return this._absoluteOffsets
- }, e.prototype.charOffsetToPartData = function (e) {
- return 0 === this.length ? 0 : e < 0 ? this._data[0] : e >= this.length ? this._data[this.length - 1] : this._data[e]
- }, e.prototype.partDataToCharOffset = function (t, n, i) {
- if (0 === this.length) return 0;
- for (var o = (t << 16 | i << 0) >>> 0, r = 0, s = this.length - 1; r + 1 < s;) {
- var a = r + s >>> 1, l = this._data[a];
- if (l === o) return a;
- l > o ? s = a : r = a
- }
- if (r === s) return r;
- var u = this._data[r], d = this._data[s];
- if (u === o) return r;
- if (d === o) return s;
- var c = e.getPartIndex(u);
- return i - e.getCharIndex(u) <= (c !== e.getPartIndex(d) ? n : e.getCharIndex(d)) - i ? r : s
- }, e
- }();
- t.CharacterMapping = l;
- var u = function (e, t, n) {
- this.characterMapping = e, this.containsRTL = t, this.containsForeignElements = n
- };
- function d(e, t) {
- if (0 === e.lineContent.length) {
- var i = 0, s = "<span><span> </span></span>";
- if (e.lineDecorations.length > 0) {
- for (var a = [], d = [], c = 0, p = e.lineDecorations.length; c < p; c++) {
- var g = e.lineDecorations[c];
- 1 === g.type && (a.push(e.lineDecorations[c].className), i |= 1), 2 === g.type && (d.push(e.lineDecorations[c].className), i |= 2)
- }
- if (0 !== i) s = "<span>" + (a.length > 0 ? '<span class="' + a.join(" ") + '"></span>' : "") + (d.length > 0 ? '<span class="' + d.join(" ") + '"></span>' : "") + "</span>"
- }
- return t.appendASCIIString(s), new u(new l(0, 0), !1, i)
- }
- return function (e, t) {
- var i = e.fontIsMonospace, o = e.canUseHalfwidthRightwardsArrow, r = e.containsForeignElements,
- s = e.lineContent, a = e.len, d = e.isOverflowing, c = e.parts, h = e.fauxIndentLength,
- p = e.tabSize, g = e.startVisibleColumn, f = e.containsRTL, m = e.spaceWidth, v = e.middotWidth,
- _ = e.renderWhitespace, y = e.renderControlCharacters, C = v > m ? 11825 : 183,
- b = new l(a + 1, c.length), S = 0, w = g, E = 0, L = 0, D = 0;
- t.appendASCIIString("<span>");
- for (var N = 0, x = c.length; N < x; N++) {
- D += L;
- var I = c[N], M = I.endIndex, k = I.type, T = 0 !== _ && k.indexOf("vs-whitespace") >= 0;
- if (E = 0, t.appendASCIIString('<span class="'), t.appendASCIIString(k), t.appendASCII(34), T) {
- for (var R = 0, O = S, P = w; O < M; O++) {
- var A = s.charCodeAt(O);
- R += F = 0 | (9 === A ? p - P % p : 1), O >= h && (P += F)
- }
- if (!i) !("vs-whitespace" === k) && r || (t.appendASCIIString(' style="display:inline-block;width:'), t.appendASCIIString(String(m * R)), t.appendASCIIString('px"'));
- for (t.appendASCII(62); S < M; S++) {
- b.setPartData(S, N, E, D);
- A = s.charCodeAt(S);
- var F = void 0;
- if (9 === A) {
- F = p - w % p | 0, !o || F > 1 ? t.write1(8594) : t.write1(65515);
- for (var W = 2; W <= F; W++) t.write1(160)
- } else F = 1, t.write1(C);
- E += F, S >= h && (w += F)
- }
- L = R
- } else {
- R = 0;
- for (f && t.appendASCIIString(' dir="ltr"'), t.appendASCII(62); S < M; S++) {
- b.setPartData(S, N, E, D);
- A = s.charCodeAt(S);
- var B = 1;
- F = 1;
- switch (A) {
- case 9:
- F = B = p - w % p;
- for (W = 1; W <= B; W++) t.write1(160);
- break;
- case 32:
- t.write1(160);
- break;
- case 60:
- t.appendASCIIString("<");
- break;
- case 62:
- t.appendASCIIString(">");
- break;
- case 38:
- t.appendASCIIString("&");
- break;
- case 0:
- t.appendASCIIString("�");
- break;
- case 65279:
- case 8232:
- t.write1(65533);
- break;
- default:
- n.isFullWidthCharacter(A) && F++, y && A < 32 ? t.write1(9216 + A) : t.write1(A)
- }
- E += B, R += B, S >= h && (w += F)
- }
- L = R
- }
- t.appendASCIIString("</span>")
- }
- b.setPartData(a, c.length - 1, E, D), d && t.appendASCIIString("<span>…</span>");
- return t.appendASCIIString("</span>"), new u(b, f, r)
- }(function (e) {
- var t, i, s = e.useMonospaceOptimizations, a = e.lineContent;
- -1 !== e.stopRenderingLineAfter && e.stopRenderingLineAfter < a.length ? (t = !0, i = e.stopRenderingLineAfter) : (t = !1, i = a.length);
- var l = function (e, t, n) {
- var i = [], o = 0;
- t > 0 && (i[o++] = new r(t, ""));
- for (var s = 0, a = e.getCount(); s < a; s++) {
- var l = e.getEndOffset(s);
- if (!(l <= t)) {
- var u = e.getClassName(s);
- if (l >= n) {
- i[o++] = new r(n, u);
- break
- }
- i[o++] = new r(l, u)
- }
- }
- return i
- }(e.lineTokens, e.fauxIndentLength, i);
- (3 === e.renderWhitespace || 1 === e.renderWhitespace || 2 === e.renderWhitespace && e.selectionsOnLine) && (l = function (e, t, i, o, s, a, l, u, d, c) {
- var h, p = [], g = 0, f = 0, m = o[f].type, v = o[f].endIndex, _ = o.length,
- y = n.firstNonWhitespaceIndex(e);
- -1 === y ? (y = t, h = t) : h = n.lastNonWhitespaceIndex(e);
- for (var C = !1, b = 0, S = d && d[b], w = l % a, E = s; E < t; E++) {
- var L = e.charCodeAt(E);
- S && E >= S.endOffset && (b++, S = d && d[b]);
- var D = void 0;
- if (E < y || E > h) D = !0; else if (9 === L) D = !0; else if (32 === L) if (c) if (C) D = !0; else {
- var N = E + 1 < t ? e.charCodeAt(E + 1) : 0;
- D = 32 === N || 9 === N
- } else D = !0; else D = !1;
- D && d && (D = !!S && S.startOffset <= E && S.endOffset > E), C ? (!D || !u && w >= a) && (p[g++] = new r(E, "vs-whitespace"), w %= a) : (E === v || D && E > s) && (p[g++] = new r(E, m), w %= a), 9 === L ? w = a : n.isFullWidthCharacter(L) ? w += 2 : w++, C = D, E === v && ++f < _ && (m = o[f].type, v = o[f].endIndex)
- }
- var x = !1;
- if (C) if (i && c) {
- var I = t > 0 ? e.charCodeAt(t - 1) : 0, M = t > 1 ? e.charCodeAt(t - 2) : 0;
- 32 === I && 32 !== M && 9 !== M || (x = !0)
- } else x = !0;
- return p[g++] = new r(t, x ? "vs-whitespace" : m), p
- }(a, i, e.continuesWithWrappedLine, l, e.fauxIndentLength, e.tabSize, e.startVisibleColumn, s, e.selectionsOnLine, 1 === e.renderWhitespace));
- var u = 0;
- if (e.lineDecorations.length > 0) {
- for (var d = 0, c = e.lineDecorations.length; d < c; d++) {
- var p = e.lineDecorations[d];
- 3 === p.type ? u |= 1 : 1 === p.type ? u |= 1 : 2 === p.type && (u |= 2)
- }
- l = function (e, t, n, i) {
- i.sort(o.LineDecoration.compare);
- for (var s = o.LineDecorationsNormalizer.normalize(e, i), a = s.length, l = 0, u = [], d = 0, c = 0, h = 0, p = n.length; h < p; h++) {
- for (var g = n[h], f = g.endIndex, m = g.type; l < a && s[l].startOffset < f;) {
- var v = s[l]
- ;
- if (v.startOffset > c && (c = v.startOffset, u[d++] = new r(c, m)), !(v.endOffset + 1 <= f)) {
- c = f, u[d++] = new r(c, m + " " + v.className);
- break
- }
- c = v.endOffset + 1, u[d++] = new r(c, m + " " + v.className), l++
- }
- f > c && (c = f, u[d++] = new r(c, m))
- }
- var _ = n[n.length - 1].endIndex;
- if (l < a && s[l].startOffset === _) {
- for (var y = []; l < a && s[l].startOffset === _;) y.push(s[l].className), l++;
- u[d++] = new r(c, y.join(" "))
- }
- return u
- }(a, 0, l, e.lineDecorations)
- }
- e.containsRTL || (l = function (e, t, n) {
- var i = 0, o = [], s = 0;
- if (n) for (var a = 0, l = t.length; a < l; a++) {
- var u = (g = t[a]).endIndex;
- if (i + 50 < u) {
- for (var d = g.type, c = -1, h = i, p = i; p < u; p++) 32 === e.charCodeAt(p) && (c = p), -1 !== c && p - h >= 50 && (o[s++] = new r(c + 1, d), h = c + 1, c = -1);
- h !== u && (o[s++] = new r(u, d))
- } else o[s++] = g;
- i = u
- } else for (a = 0, l = t.length; a < l; a++) {
- var g = t[a], f = (u = g.endIndex) - i;
- if (f > 50) {
- d = g.type;
- var m = Math.ceil(f / 50);
- for (p = 1; p < m; p++) {
- var v = i + 50 * p;
- o[s++] = new r(v, d)
- }
- o[s++] = new r(u, d)
- } else o[s++] = g;
- i = u
- }
- return o
- }(a, l, !e.isBasicASCII || e.fontLigatures))
- ;
- return new h(s, e.canUseHalfwidthRightwardsArrow, a, i, t, l, u, e.fauxIndentLength, e.tabSize, e.startVisibleColumn, e.containsRTL, e.spaceWidth, e.middotWidth, e.renderWhitespace, e.renderControlCharacters)
- }(e), t)
- }
- t.RenderLineOutput = u, t.renderViewLine = d;
- var c = function (e, t, n, i) {
- this.characterMapping = e, this.html = t, this.containsRTL = n, this.containsForeignElements = i
- };
- t.RenderLineOutput2 = c, t.renderViewLine2 = function (e) {
- var t = i.createStringBuilder(1e4), n = d(e, t);
- return new c(n.characterMapping, t.build(), n.containsRTL, n.containsForeignElements)
- };
- var h = function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g) {
- this.fontIsMonospace = e, this.canUseHalfwidthRightwardsArrow = t, this.lineContent = n, this.len = i, this.isOverflowing = o, this.parts = r, this.containsForeignElements = s, this.fauxIndentLength = a, this.tabSize = l, this.startVisibleColumn = u, this.containsRTL = d, this.spaceWidth = c, this.middotWidth = h, this.renderWhitespace = p, this.renderControlCharacters = g
- }
- })),define(n[363], i([0, 1, 3]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var i = function () {
- function e(e, t, i, o) {
- this.selections = e, this.startLineNumber = 0 | t.startLineNumber, this.endLineNumber = 0 | t.endLineNumber, this.relativeVerticalOffset = t.relativeVerticalOffset, this.bigNumbersDelta = 0 | t.bigNumbersDelta, this.whitespaceViewportData = i, this._model = o, this.visibleRange = new n.Range(t.startLineNumber, this._model.getLineMinColumn(t.startLineNumber), t.endLineNumber, this._model.getLineMaxColumn(t.endLineNumber))
- }
- return e.prototype.getViewLineRenderingData = function (e) {
- return this._model.getViewLineRenderingData(this.visibleRange, e)
- }, e.prototype.getDecorationsInViewport = function () {
- return this._model.getDecorationsInViewport(this.visibleRange)
- }, e
- }();
- t.ViewportData = i
- })),define(n[194], i([0, 1, 179]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e, t) {
- this.index = e, this.remainder = t
- };
- t.PrefixSumIndexOfResult = i;
- var o = function () {
- function e(e) {
- this.values = e, this.prefixSum = new Uint32Array(e.length), this.prefixSumValidIndex = new Int32Array(1),
- this.prefixSumValidIndex[0] = -1
- }
- return e.prototype.insertValues = function (e, t) {
- e = n.toUint32(e);
- var i = this.values, o = this.prefixSum, r = t.length;
- return 0 !== r && (this.values = new Uint32Array(i.length + r), this.values.set(i.subarray(0, e), 0), this.values.set(i.subarray(e), e + r), this.values.set(t, e), e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), this.prefixSum = new Uint32Array(this.values.length), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(o.subarray(0, this.prefixSumValidIndex[0] + 1)), !0)
- }, e.prototype.changeValue = function (e, t) {
- return e = n.toUint32(e), t = n.toUint32(t), this.values[e] !== t && (this.values[e] = t, e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), !0)
- }, e.prototype.removeValues = function (e, t) {
- e = n.toUint32(e), t = n.toUint32(t);
- var i = this.values, o = this.prefixSum;
- if (e >= i.length) return !1;
- var r = i.length - e;
- return t >= r && (t = r), 0 !== t && (this.values = new Uint32Array(i.length - t), this.values.set(i.subarray(0, e), 0), this.values.set(i.subarray(e + t), e),
- this.prefixSum = new Uint32Array(this.values.length), e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(o.subarray(0, this.prefixSumValidIndex[0] + 1)), !0)
- }, e.prototype.getTotalValue = function () {
- return 0 === this.values.length ? 0 : this._getAccumulatedValue(this.values.length - 1)
- }, e.prototype.getAccumulatedValue = function (e) {
- return e < 0 ? 0 : (e = n.toUint32(e), this._getAccumulatedValue(e))
- }, e.prototype._getAccumulatedValue = function (e) {
- if (e <= this.prefixSumValidIndex[0]) return this.prefixSum[e];
- var t = this.prefixSumValidIndex[0] + 1;
- 0 === t && (this.prefixSum[0] = this.values[0], t++), e >= this.values.length && (e = this.values.length - 1);
- for (var n = t; n <= e; n++) this.prefixSum[n] = this.prefixSum[n - 1] + this.values[n];
- return this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], e), this.prefixSum[e]
- }, e.prototype.getIndexOf = function (e) {
- e = Math.floor(e), this.getTotalValue();
- for (var t = 0, n = this.values.length - 1, o = 0, r = 0, s = 0; t <= n;) if (o = t + (n - t) / 2 | 0,
- e < (s = (r = this.prefixSum[o]) - this.values[o])) n = o - 1; else {
- if (!(e >= r)) break;
- t = o + 1
- }
- return new i(o, e - s)
- }, e
- }();
- t.PrefixSumComputer = o
- })),define(n[364], i([0, 1, 13, 194]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t, n, i) {
- this._uri = e, this._lines = t, this._eol = n, this._versionId = i, this._lineStarts = null
- }
- return e.prototype.dispose = function () {
- this._lines.length = 0
- }, e.prototype.getText = function () {
- return this._lines.join(this._eol)
- }, e.prototype.onEvents = function (e) {
- e.eol && e.eol !== this._eol && (this._eol = e.eol, this._lineStarts = null);
- for (var t = 0, i = e.changes; t < i.length; t++) {
- var o = i[t];
- this._acceptDeleteRange(o.range), this._acceptInsertText(new n.Position(o.range.startLineNumber, o.range.startColumn), o.text)
- }
- this._versionId = e.versionId
- }, e.prototype._ensureLineStarts = function () {
- if (!this._lineStarts) {
- for (var e = this._eol.length, t = this._lines.length, n = new Uint32Array(t), o = 0; o < t; o++) n[o] = this._lines[o].length + e;
- this._lineStarts = new i.PrefixSumComputer(n)
- }
- },
- e.prototype._setLineText = function (e, t) {
- this._lines[e] = t, this._lineStarts && this._lineStarts.changeValue(e, this._lines[e].length + this._eol.length)
- }, e.prototype._acceptDeleteRange = function (e) {
- if (e.startLineNumber !== e.endLineNumber) this._setLineText(e.startLineNumber - 1, this._lines[e.startLineNumber - 1].substring(0, e.startColumn - 1) + this._lines[e.endLineNumber - 1].substring(e.endColumn - 1)), this._lines.splice(e.startLineNumber, e.endLineNumber - e.startLineNumber), this._lineStarts && this._lineStarts.removeValues(e.startLineNumber, e.endLineNumber - e.startLineNumber); else {
- if (e.startColumn === e.endColumn) return;
- this._setLineText(e.startLineNumber - 1, this._lines[e.startLineNumber - 1].substring(0, e.startColumn - 1) + this._lines[e.startLineNumber - 1].substring(e.endColumn - 1))
- }
- }, e.prototype._acceptInsertText = function (e, t) {
- if (0 !== t.length) {
- var n = t.split(/\r\n|\r|\n/);
- if (1 !== n.length) {
- n[n.length - 1] += this._lines[e.lineNumber - 1].substring(e.column - 1), this._setLineText(e.lineNumber - 1, this._lines[e.lineNumber - 1].substring(0, e.column - 1) + n[0])
- ;
- for (var i = new Uint32Array(n.length - 1), o = 1; o < n.length; o++) this._lines.splice(e.lineNumber + o - 1, 0, n[o]), i[o - 1] = n[o].length + this._eol.length;
- this._lineStarts && this._lineStarts.insertValues(e.lineNumber, i)
- } else this._setLineText(e.lineNumber - 1, this._lines[e.lineNumber - 1].substring(0, e.column - 1) + n[0] + this._lines[e.lineNumber - 1].substring(e.column - 1))
- }
- }, e
- }();
- t.MirrorTextModel = o
- })),define(n[365], i([0, 1, 19, 126, 54, 16, 25, 13, 3, 341, 364, 109, 351, 354, 192, 21]), (function (e, t, n, i, o, s, a, l, u, h, p, g, f, m, v, _) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var y = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), Object.defineProperty(t.prototype, "uri", {
- get: function () {
- return this._uri
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "version", {
- get: function () {
- return this._versionId
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "eol", {
- get: function () {
- return this._eol
- }, enumerable: !0, configurable: !0
- }), t.prototype.getValue = function () {
- return this.getText()
- }, t.prototype.getLinesContent = function () {
- return this._lines.slice(0)
- }, t.prototype.getLineCount = function () {
- return this._lines.length
- }, t.prototype.getLineContent = function (e) {
- return this._lines[e - 1]
- }, t.prototype.getWordAtPosition = function (e, t) {
- var n = g.getWordAtText(e.column, g.ensureValidWordDefinition(t), this._lines[e.lineNumber - 1], 0);
- return n ? new u.Range(e.lineNumber, n.startColumn, e.lineNumber, n.endColumn) : null
- }, t.prototype.createWordIterator = function (e) {
- var t, n, i = this, r = 0, s = 0, a = [], l = function () {
- if (s < a.length) {
- var u = n.substring(a[s].start, a[s].end);
- return s += 1, t ? t.value = u : t = {done: !1, value: u}, t
- }
- return r >= i._lines.length ? o.FIN : (n = i._lines[r], a = i._wordenize(n, e), s = 0, r += 1, l())
- };
- return {next: l}
- }, t.prototype.getLineWords = function (e, t) {
- for (var n = this._lines[e - 1], i = [], o = 0, r = this._wordenize(n, t); o < r.length; o++) {
- var s = r[o];
- i.push({word: n.substring(s.start, s.end), startColumn: s.start + 1, endColumn: s.end + 1})
- }
- return i
- }, t.prototype._wordenize = function (e, t) {
- var n, i = []
- ;
- for (t.lastIndex = 0; (n = t.exec(e)) && 0 !== n[0].length;) i.push({
- start: n.index,
- end: n.index + n[0].length
- });
- return i
- }, t.prototype.getValueInRange = function (e) {
- if ((e = this._validateRange(e)).startLineNumber === e.endLineNumber) return this._lines[e.startLineNumber - 1].substring(e.startColumn - 1, e.endColumn - 1);
- var t = this._eol, n = e.startLineNumber - 1, i = e.endLineNumber - 1, o = [];
- o.push(this._lines[n].substring(e.startColumn - 1));
- for (var r = n + 1; r < i; r++) o.push(this._lines[r]);
- return o.push(this._lines[i].substring(0, e.endColumn - 1)), o.join(t)
- }, t.prototype.offsetAt = function (e) {
- return e = this._validatePosition(e), this._ensureLineStarts(), this._lineStarts.getAccumulatedValue(e.lineNumber - 2) + (e.column - 1)
- }, t.prototype.positionAt = function (e) {
- e = Math.floor(e), e = Math.max(0, e), this._ensureLineStarts();
- var t = this._lineStarts.getIndexOf(e), n = this._lines[t.index].length;
- return {lineNumber: 1 + t.index, column: 1 + Math.min(t.remainder, n)}
- }, t.prototype._validateRange = function (e) {
- var t = this._validatePosition({
- lineNumber: e.startLineNumber, column: e.startColumn
- }), n = this._validatePosition({lineNumber: e.endLineNumber, column: e.endColumn});
- return t.lineNumber !== e.startLineNumber || t.column !== e.startColumn || n.lineNumber !== e.endLineNumber || n.column !== e.endColumn ? {
- startLineNumber: t.lineNumber,
- startColumn: t.column,
- endLineNumber: n.lineNumber,
- endColumn: n.column
- } : e
- }, t.prototype._validatePosition = function (e) {
- if (!l.Position.isIPosition(e)) throw new Error("bad position");
- var t = e.lineNumber, n = e.column, i = !1;
- if (t < 1) t = 1, n = 1, i = !0; else if (t > this._lines.length) t = this._lines.length, n = this._lines[t - 1].length + 1, i = !0; else {
- var o = this._lines[t - 1].length + 1;
- n < 1 ? (n = 1, i = !0) : n > o && (n = o, i = !0)
- }
- return i ? {lineNumber: t, column: n} : e
- }, t
- }(p.MirrorTextModel), C = function () {
- function t(e, t) {
- this._host = e, this._models = Object.create(null), this._foreignModuleFactory = t, this._foreignModule = null
- }
- return t.prototype.dispose = function () {
- this._models = Object.create(null)
- }, t.prototype._getModel = function (e) {
- return this._models[e]
- }, t.prototype._getModels = function () {
- var e = this, t = []
- ;
- return Object.keys(this._models).forEach((function (n) {
- return t.push(e._models[n])
- })), t
- }, t.prototype.acceptNewModel = function (e) {
- this._models[e.url] = new y(a.URI.parse(e.url), e.lines, e.EOL, e.versionId)
- }, t.prototype.acceptModelChanged = function (e, t) {
- this._models[e] && this._models[e].onEvents(t)
- }, t.prototype.acceptRemovedModel = function (e) {
- this._models[e] && delete this._models[e]
- }, t.prototype.computeDiff = function (e, t, n, i) {
- return d(this, void 0, void 0, (function () {
- var o, r, s, a, l, u, d;
- return c(this, (function (c) {
- return o = this._getModel(e), r = this._getModel(t), o && r ? (s = o.getLinesContent(), a = r.getLinesContent(), l = new h.DiffComputer(s, a, {
- shouldComputeCharChanges: !0,
- shouldPostProcessCharChanges: !0,
- shouldIgnoreTrimWhitespace: n,
- shouldMakePrettyDiff: !0,
- maxComputationTime: i
- }), u = l.computeDiff(), d = !(u.changes.length > 0) && this._modelsAreIdentical(o, r), [2, {
- quitEarly: u.quitEarly,
- identical: d,
- changes: u.changes
- }]) : [2, null]
- }))
- }))
- }, t.prototype._modelsAreIdentical = function (e, t) {
- var n = e.getLineCount();
- if (n !== t.getLineCount()) return !1
- ;
- for (var i = 1; i <= n; i++) {
- if (e.getLineContent(i) !== t.getLineContent(i)) return !1
- }
- return !0
- }, t.prototype.computeMoreMinimalEdits = function (e, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, a, l, d, h, p, g, f, m, v, _, y, C, b, S, w, E;
- return c(this, (function (c) {
- if (!(r = this._getModel(e))) return [2, o];
- for (s = [], a = void 0, o = n.mergeSort(o, (function (e, t) {
- return e.range && t.range ? u.Range.compareRangesUsingStarts(e.range, t.range) : (e.range ? 0 : 1) - (t.range ? 0 : 1)
- })), l = 0, d = o; l < d.length; l++) if (h = d[l], p = h.range, g = h.text, "number" == typeof (f = h.eol) && (a = f), (!u.Range.isEmpty(p) || g) && (m = r.getValueInRange(p), g = g.replace(/\r\n|\n|\r/g, r.eol), m !== g)) if (Math.max(g.length, m.length) > t._diffLimit) s.push({
- range: p,
- text: g
- }); else for (v = i.stringDiff(m, g, !1), _ = r.offsetAt(u.Range.lift(p).getStartPosition()), y = 0, C = v; y < C.length; y++) b = C[y], S = r.positionAt(_ + b.originalStart), w = r.positionAt(_ + b.originalStart + b.originalLength), E = {
- text: g.substr(b.modifiedStart, b.modifiedLength), range: {
- startLineNumber: S.lineNumber, startColumn: S.column, endLineNumber: w.lineNumber,
- endColumn: w.column
- }
- }, r.getValueInRange(E.range) !== E.text && s.push(E);
- return "number" == typeof a && s.push({
- eol: a,
- text: "",
- range: {startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0}
- }), [2, s]
- }))
- }))
- }, t.prototype.computeLinks = function (e) {
- return d(this, void 0, void 0, (function () {
- var t;
- return c(this, (function (n) {
- return (t = this._getModel(e)) ? [2, f.computeLinks(t)] : [2, null]
- }))
- }))
- }, t.prototype.textualSuggest = function (e, n, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, a, l, u, d, h, p;
- return c(this, (function (c) {
- if (!(r = this._getModel(e))) return [2, null];
- for (s = [], a = new Set, l = new RegExp(i, o), (u = r.getWordAtPosition(n, l)) && a.add(r.getValueInRange(u)), d = r.createWordIterator(l), h = d.next(); !h.done && a.size <= t._suggestionsLimit; h = d.next()) p = h.value, a.has(p) || (a.add(p), isNaN(Number(p)) && s.push(p));
- return [2, s]
- }))
- }))
- }, t.prototype.computeWordRanges = function (e, t, n, i) {
- return d(this, void 0, void 0, (function () {
- var o, r, s, a, l, u, d, h, p;
- return c(this, (function (c) {
- if (!(o = this._getModel(e))) return [2, Object.create(null)];
- for (r = new RegExp(n, i),
- s = Object.create(null), a = t.startLineNumber; a < t.endLineNumber; a++) for (l = o.getLineWords(a, r), u = 0, d = l; u < d.length; u++) h = d[u], isNaN(Number(h.word)) && ((p = s[h.word]) || (p = [], s[h.word] = p), p.push({
- startLineNumber: a,
- startColumn: h.startColumn,
- endLineNumber: a,
- endColumn: h.endColumn
- }));
- return [2, s]
- }))
- }))
- }, t.prototype.navigateValueSet = function (e, t, n, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, a, l, u;
- return c(this, (function (d) {
- return (r = this._getModel(e)) ? (s = new RegExp(i, o), t.startColumn === t.endColumn && (t = {
- startLineNumber: t.startLineNumber,
- startColumn: t.startColumn,
- endLineNumber: t.endLineNumber,
- endColumn: t.endColumn + 1
- }), a = r.getValueInRange(t), (l = r.getWordAtPosition({
- lineNumber: t.startLineNumber,
- column: t.startColumn
- }, s)) ? (u = r.getValueInRange(l), [2, m.BasicInplaceReplace.INSTANCE.navigateValueSet(t, a, l, u, n)]) : [2, null]) : [2, null]
- }))
- }))
- }, t.prototype.loadForeignModule = function (t, n, i) {
- var o = this, r = {
- host: _.createProxyObject(i, (function (e, t) {
- return o._host.fhr(e, t)
- })), getMirrorModels: function () {
- return o._getModels()
- }
- }
- ;
- return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory(r, n), Promise.resolve(_.getAllMethodNames(this._foreignModule))) : new Promise((function (i, s) {
- e([t], (function (e) {
- o._foreignModule = e.create(r, n), i(_.getAllMethodNames(o._foreignModule))
- }), s)
- }))
- }, t.prototype.fmr = function (e, t) {
- if (!this._foreignModule || "function" != typeof this._foreignModule[e]) return Promise.reject(new Error("Missing requestHandler or method: " + e));
- try {
- return Promise.resolve(this._foreignModule[e].apply(this._foreignModule, t))
- } catch (e) {
- return Promise.reject(e)
- }
- }, t._diffLimit = 1e5, t._suggestionsLimit = 1e4, t
- }();
- t.EditorSimpleWorker = C, t.create = function (e) {
- return new C(e, null)
- }, "function" == typeof importScripts && (s.globals.monaco = v.createMonacoBaseAPI())
- })),define(n[92], i([0, 1, 2]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._shouldRender = !0, t
- }
- return r(t, e), t.prototype.shouldRender = function () {
- return this._shouldRender
- },
- t.prototype.forceShouldRender = function () {
- this._shouldRender = !0
- }, t.prototype.setShouldRender = function () {
- this._shouldRender = !0
- }, t.prototype.onDidRender = function () {
- this._shouldRender = !1
- }, t.prototype.onConfigurationChanged = function (e) {
- return !1
- }, t.prototype.onContentSizeChanged = function (e) {
- return !1
- }, t.prototype.onCursorStateChanged = function (e) {
- return !1
- }, t.prototype.onDecorationsChanged = function (e) {
- return !1
- }, t.prototype.onFlushed = function (e) {
- return !1
- }, t.prototype.onFocusChanged = function (e) {
- return !1
- }, t.prototype.onLanguageConfigurationChanged = function (e) {
- return !1
- }, t.prototype.onLineMappingChanged = function (e) {
- return !1
- }, t.prototype.onLinesChanged = function (e) {
- return !1
- }, t.prototype.onLinesDeleted = function (e) {
- return !1
- }, t.prototype.onLinesInserted = function (e) {
- return !1
- }, t.prototype.onRevealRangeRequest = function (e) {
- return !1
- }, t.prototype.onScrollChanged = function (e) {
- return !1
- }, t.prototype.onThemeChanged = function (e) {
- return !1
- }, t.prototype.onTokensChanged = function (e) {
- return !1
- }, t.prototype.onTokensColorsChanged = function (e) {
- return !1
- }, t.prototype.onZonesChanged = function (e) {
- return !1
- }, t.prototype.handleEvents = function (e) {
- for (var t = !1, n = 0, i = e.length; n < i; n++) {
- var o = e[n];
- switch (o.type) {
- case 1:
- this.onConfigurationChanged(o) && (t = !0);
- break;
- case 2:
- this.onContentSizeChanged(o) && (t = !0);
- break;
- case 3:
- this.onCursorStateChanged(o) && (t = !0);
- break;
- case 4:
- this.onDecorationsChanged(o) && (t = !0);
- break;
- case 5:
- this.onFlushed(o) && (t = !0);
- break;
- case 6:
- this.onFocusChanged(o) && (t = !0);
- break;
- case 7:
- this.onLanguageConfigurationChanged(o) && (t = !0);
- break;
- case 8:
- this.onLineMappingChanged(o) && (t = !0);
- break;
- case 9:
- this.onLinesChanged(o) && (t = !0);
- break;
- case 10:
- this.onLinesDeleted(o) && (t = !0);
- break;
- case 11:
- this.onLinesInserted(o) && (t = !0);
- break;
- case 12:
- this.onRevealRangeRequest(o) && (t = !0);
- break;
- case 13:
- this.onScrollChanged(o) && (t = !0);
- break;
- case 15:
- this.onTokensChanged(o) && (t = !0);
- break;
- case 14:
- this.onThemeChanged(o) && (t = !0);
- break;
- case 16:
- this.onTokensColorsChanged(o) && (t = !0);
- break;
- case 17:
- this.onZonesChanged(o) && (t = !0);
- break;
- default:
- console.info("View received unknown event: "), console.info(o)
- }
- }
- t && (this._shouldRender = !0)
- }, t
- }(n.Disposable);
- t.ViewEventHandler = i
- })),define(n[82], i([0, 1, 92]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t
- }(n.ViewEventHandler);
- t.DynamicViewOverlay = i
- })),define(n[37], i([0, 1, 28, 92]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._context = t, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), e.prototype.dispose.call(this)
- }, t
- }(i.ViewEventHandler);
- t.ViewPart = o;
- var s = function () {
- function e() {
- }
- return e.write = function (e, t) {
- n.FastDomNode, e.setAttribute("data-mprt", String(t))
- }, e.read = function (e) {
- var t = e.getAttribute("data-mprt");
- return null === t ? 0 : parseInt(t, 10)
- }, e.collect = function (e, t) {
- for (var n = [], i = 0; e && e !== document.body && e !== t;) e.nodeType === e.ELEMENT_NODE && (n[i++] = this.read(e)), e = e.parentElement;
- for (var o = new Uint8Array(i), r = 0; r < i; r++) o[r] = n[i - r - 1];
- return o
- }, e
- }();
- t.PartFingerprints = s
- })),define(n[366], i([0, 1, 6, 28, 37]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e, t) {
- this.top = e, this.left = t
- }, a = function (e) {
- function t(t, n) {
- var r = e.call(this, t) || this;
- return r._viewDomNode = n, r._widgets = {}, r.domNode = i.createFastDomNode(document.createElement("div")), o.PartFingerprints.write(r.domNode, 1), r.domNode.setClassName("contentWidgets"), r.domNode.setPosition("absolute"), r.domNode.setTop(0), r.overflowingContentWidgetsDomNode = i.createFastDomNode(document.createElement("div")), o.PartFingerprints.write(r.overflowingContentWidgetsDomNode, 2), r.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"), r
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._widgets = {}
- }, t.prototype.onConfigurationChanged = function (e) {
- for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
- var i = n[t];
- this._widgets[i].onConfigurationChanged(e)
- }
- return !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLineMappingChanged = function (e) {
- for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
- var i = n[t];
- this._widgets[i].onLineMappingChanged(e)
- }
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return !0
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.addWidget = function (e) {
- var t = new l(this._context, this._viewDomNode, e);
- this._widgets[t.id] = t, t.allowEditorOverflow ? this.overflowingContentWidgetsDomNode.appendChild(t.domNode) : this.domNode.appendChild(t.domNode), this.setShouldRender()
- }, t.prototype.setWidgetPosition = function (e, t, n) {
- this._widgets[e.getId()].setPosition(t, n), this.setShouldRender()
- },
- t.prototype.removeWidget = function (e) {
- var t = e.getId();
- if (this._widgets.hasOwnProperty(t)) {
- var n = this._widgets[t];
- delete this._widgets[t];
- var i = n.domNode.domNode;
- i.parentNode.removeChild(i), i.removeAttribute("monaco-visible-content-widget"), this.setShouldRender()
- }
- }, t.prototype.shouldSuppressMouseDownOnWidget = function (e) {
- return !!this._widgets.hasOwnProperty(e) && this._widgets[e].suppressMouseDown
- }, t.prototype.onBeforeRender = function (e) {
- for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
- var i = n[t];
- this._widgets[i].onBeforeRender(e)
- }
- }, t.prototype.prepareRender = function (e) {
- for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
- var i = n[t];
- this._widgets[i].prepareRender(e)
- }
- }, t.prototype.render = function (e) {
- for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
- var i = n[t];
- this._widgets[i].render(e)
- }
- }, t
- }(o.ViewPart);
- t.ViewContentWidgets = a;
- var l = function () {
- function e(e, t, n) {
- this._context = e, this._viewDomNode = t, this._actual = n, this.domNode = i.createFastDomNode(this._actual.getDomNode()), this.id = this._actual.getId(),
- this.allowEditorOverflow = this._actual.allowEditorOverflow || !1, this.suppressMouseDown = this._actual.suppressMouseDown || !1;
- var o = this._context.configuration.options, r = o.get(107);
- this._fixedOverflowWidgets = o.get(29), this._contentWidth = r.contentWidth, this._contentLeft = r.contentLeft, this._lineHeight = o.get(49), this._range = null, this._viewRange = null, this._preference = [], this._cachedDomNodeClientWidth = -1, this._cachedDomNodeClientHeight = -1, this._maxWidth = this._getMaxWidth(), this._isVisible = !1, this._renderData = null, this.domNode.setPosition(this._fixedOverflowWidgets && this.allowEditorOverflow ? "fixed" : "absolute"), this.domNode.setVisibility("hidden"), this.domNode.setAttribute("widgetId", this.id), this.domNode.setMaxWidth(this._maxWidth)
- }
- return e.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options;
- if (this._lineHeight = t.get(49), e.hasChanged(107)) {
- var n = t.get(107);
- this._contentLeft = n.contentLeft, this._contentWidth = n.contentWidth, this._maxWidth = this._getMaxWidth()
- }
- },
- e.prototype.onLineMappingChanged = function (e) {
- this._setPosition(this._range)
- }, e.prototype._setPosition = function (e) {
- if (this._range = e, this._viewRange = null, this._range) {
- var t = this._context.model.validateModelRange(this._range);
- (this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition()) || this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition())) && (this._viewRange = this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))
- }
- }, e.prototype._getMaxWidth = function () {
- return this.allowEditorOverflow ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth : this._contentWidth
- }, e.prototype.setPosition = function (e, t) {
- this._setPosition(e), this._preference = t, this._cachedDomNodeClientWidth = -1, this._cachedDomNodeClientHeight = -1
- }, e.prototype._layoutBoxInViewport = function (e, t, n, i, o) {
- var r = e.top, s = r, a = t.top + this._lineHeight, l = r - i, u = s >= i, d = a,
- c = o.viewportHeight - a >= i, h = e.left, p = t.left
- ;
- return h + n > o.scrollLeft + o.viewportWidth && (h = o.scrollLeft + o.viewportWidth - n), p + n > o.scrollLeft + o.viewportWidth && (p = o.scrollLeft + o.viewportWidth - n), h < o.scrollLeft && (h = o.scrollLeft), p < o.scrollLeft && (p = o.scrollLeft), {
- fitsAbove: u,
- aboveTop: l,
- aboveLeft: h,
- fitsBelow: c,
- belowTop: d,
- belowLeft: p
- }
- }, e.prototype._layoutHorizontalSegmentInPage = function (e, t, i, o) {
- var r, s = Math.max(0, t.left - o), a = Math.min(t.left + t.width + o, e.width),
- l = t.left + i - n.StandardWindow.scrollX;
- l + o > a && (l -= r = l - (a - o), i -= r);
- l < s && (l -= r = l - s, i -= r);
- return [i, l]
- }, e.prototype._layoutBoxInPage = function (e, t, i, o, r) {
- var s = e.top - o, a = t.top + this._lineHeight,
- l = n.getDomNodePagePosition(this._viewDomNode.domNode), u = l.top + s - n.StandardWindow.scrollY,
- d = l.top + a - n.StandardWindow.scrollY, c = n.getClientArea(document.body),
- h = this._layoutHorizontalSegmentInPage(c, l, e.left - r.scrollLeft + this._contentLeft, i),
- p = h[0], g = h[1],
- f = this._layoutHorizontalSegmentInPage(c, l, t.left - r.scrollLeft + this._contentLeft, i),
- m = f[0], v = f[1], _ = u >= 22, y = d + o <= c.height - 22;
- return this._fixedOverflowWidgets ? {
- fitsAbove: _,
- aboveTop: Math.max(u, 22), aboveLeft: g, fitsBelow: y, belowTop: d, belowLeft: v
- } : {fitsAbove: _, aboveTop: Math.max(s, 22), aboveLeft: p, fitsBelow: y, belowTop: a, belowLeft: m}
- }, e.prototype._prepareRenderWidgetAtExactPositionOverflowing = function (e) {
- return new s(e.top, e.left + this._contentLeft)
- }, e.prototype._getTopAndBottomLeft = function (e) {
- if (!this._viewRange) return [null, null];
- var t = e.linesVisibleRangesForRange(this._viewRange, !1);
- if (!t || 0 === t.length) return [null, null];
- for (var n = t[0], i = t[0], o = 0, r = t; o < r.length; o++) {
- var a = r[o];
- a.lineNumber < n.lineNumber && (n = a), a.lineNumber > i.lineNumber && (i = a)
- }
- for (var l = 1073741824, u = 0, d = n.ranges; u < d.length; u++) {
- (g = d[u]).left < l && (l = g.left)
- }
- for (var c = 1073741824, h = 0, p = i.ranges; h < p.length; h++) {
- var g;
- (g = p[h]).left < c && (c = g.left)
- }
- var f = e.getVerticalOffsetForLineNumber(n.lineNumber) - e.scrollTop, m = new s(f, l),
- v = e.getVerticalOffsetForLineNumber(i.lineNumber) - e.scrollTop;
- return [m, new s(v, c)]
- }, e.prototype._prepareRenderWidget = function (e) {
- var t, n = this._getTopAndBottomLeft(e), i = n[0], o = n[1];
- if (!i || !o) return null
- ;
- if (-1 === this._cachedDomNodeClientWidth || -1 === this._cachedDomNodeClientHeight) {
- var r = this.domNode.domNode;
- this._cachedDomNodeClientWidth = r.clientWidth, this._cachedDomNodeClientHeight = r.clientHeight
- }
- if (t = this.allowEditorOverflow ? this._layoutBoxInPage(i, o, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, e) : this._layoutBoxInViewport(i, o, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, e), this._preference) for (var a = 1; a <= 2; a++) for (var l = 0, u = this._preference; l < u.length; l++) {
- var d = u[l];
- if (1 === d) {
- if (!t) return null;
- if (2 === a || t.fitsAbove) return new s(t.aboveTop, t.aboveLeft)
- } else {
- if (2 !== d) return this.allowEditorOverflow ? this._prepareRenderWidgetAtExactPositionOverflowing(i) : i;
- if (!t) return null;
- if (2 === a || t.fitsBelow) return new s(t.belowTop, t.belowLeft)
- }
- }
- return null
- }, e.prototype.onBeforeRender = function (e) {
- this._viewRange && this._preference && (this._viewRange.endLineNumber < e.startLineNumber || this._viewRange.startLineNumber > e.endLineNumber || this.domNode.setMaxWidth(this._maxWidth))
- },
- e.prototype.prepareRender = function (e) {
- this._renderData = this._prepareRenderWidget(e)
- }, e.prototype.render = function (e) {
- this._renderData ? (this.allowEditorOverflow ? (this.domNode.setTop(this._renderData.top), this.domNode.setLeft(this._renderData.left)) : (this.domNode.setTop(this._renderData.top + e.scrollTop - e.bigNumbersDelta), this.domNode.setLeft(this._renderData.left)), this._isVisible || (this.domNode.setVisibility("inherit"), this.domNode.setAttribute("monaco-visible-content-widget", "true"), this._isVisible = !0)) : this._isVisible && (this.domNode.removeAttribute("monaco-visible-content-widget"), this._isVisible = !1, this.domNode.setVisibility("hidden"))
- }, e
- }()
- })),define(n[367], i([0, 1, 82, 3, 91, 286]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- n._context = t;
- var i = n._context.configuration.options;
- return n._lineHeight = i.get(49), n._typicalHalfwidthCharacterWidth = i.get(34).typicalHalfwidthCharacterWidth, n._renderResult = null,
- n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options;
- return this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = t.get(34).typicalHalfwidthCharacterWidth, !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged || e.scrollWidthChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.prepareRender = function (e) {
- for (var t = e.getDecorationsInViewport(), n = [], o = 0, r = 0, s = t.length; r < s; r++) {
- var a = t[r];
- a.options.className && (n[o++] = a)
- }
- n = n.sort((function (e, t) {
- if (e.options.zIndex < t.options.zIndex) return -1
- ;
- if (e.options.zIndex > t.options.zIndex) return 1;
- var n = e.options.className, o = t.options.className;
- return n < o ? -1 : n > o ? 1 : i.Range.compareRangesUsingStarts(e.range, t.range)
- }));
- for (var l = e.visibleRange.startLineNumber, u = e.visibleRange.endLineNumber, d = [], c = l; c <= u; c++) {
- d[c - l] = ""
- }
- this._renderWholeLineDecorations(e, n, d), this._renderNormalDecorations(e, n, d), this._renderResult = d
- }, t.prototype._renderWholeLineDecorations = function (e, t, n) {
- for (var i = String(this._lineHeight), o = e.visibleRange.startLineNumber, r = e.visibleRange.endLineNumber, s = 0, a = t.length; s < a; s++) {
- var l = t[s];
- if (l.options.isWholeLine) for (var u = '<div class="cdr ' + l.options.className + '" style="left:0;width:100%;height:' + i + 'px;"></div>', d = Math.max(l.range.startLineNumber, o), c = Math.min(l.range.endLineNumber, r), h = d; h <= c; h++) {
- n[h - o] += u
- }
- }
- }, t.prototype._renderNormalDecorations = function (e, t, n) {
- for (var o = String(this._lineHeight), r = e.visibleRange.startLineNumber, s = null, a = !1, l = null, u = 0, d = t.length; u < d; u++) {
- var c = t[u];
- if (!c.options.isWholeLine) {
- var h = c.options.className, p = Boolean(c.options.showIfCollapsed), g = c.range;
- p && 1 === g.endColumn && g.endLineNumber !== g.startLineNumber && (g = new i.Range(g.startLineNumber, g.startColumn, g.endLineNumber - 1, this._context.model.getLineMaxColumn(g.endLineNumber - 1))), s === h && a === p && i.Range.areIntersectingOrTouching(l, g) ? l = i.Range.plusRange(l, g) : (null !== s && this._renderNormalDecoration(e, l, s, a, o, r, n), s = h, a = p, l = g)
- }
- }
- null !== s && this._renderNormalDecoration(e, l, s, a, o, r, n)
- }, t.prototype._renderNormalDecoration = function (e, t, n, i, r, s, a) {
- var l = e.linesVisibleRangesForRange(t, "findMatch" === n);
- if (l) for (var u = 0, d = l.length; u < d; u++) {
- var c = l[u];
- if (!c.outsideRenderedLine) {
- var h = c.lineNumber - s;
- if (i && 1 === c.ranges.length) {
- var p = c.ranges[0];
- 0 === p.width && (c.ranges[0] = new o.HorizontalRange(p.left, this._typicalHalfwidthCharacterWidth))
- }
- for (var g = 0, f = c.ranges.length; g < f; g++) {
- var m = c.ranges[g],
- v = '<div class="cdr ' + n + '" style="left:' + String(m.left) + "px;width:" + String(m.width) + "px;height:" + r + 'px;"></div>';
- a[h] += v
- }
- }
- }
- }, t.prototype.render = function (e, t) {
- if (!this._renderResult) return "";
- var n = t - e;
- return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
- }, t
- }(n.DynamicViewOverlay);
- t.DecorationsOverlay = s
- })),define(n[149], i([0, 1, 82, 287]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e, t, n) {
- this.startLineNumber = +e, this.endLineNumber = +t, this.className = String(n)
- };
- t.DecorationToRender = i;
- var o = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._render = function (e, t, n) {
- for (var i = [], o = e; o <= t; o++) {
- i[o - e] = []
- }
- if (0 === n.length) return i;
- n.sort((function (e, t) {
- return e.className === t.className ? e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber : e.className < t.className ? -1 : 1
- }));
- for (var r = null, s = 0, a = 0, l = n.length; a < l; a++) {
- var u = n[a], d = u.className, c = Math.max(u.startLineNumber, e) - e,
- h = Math.min(u.endLineNumber, t) - e;
- r === d ? (c = Math.max(s + 1, c), s = Math.max(s, h)) : (r = d, s = h);
- for (var p = c; p <= s; p++) i[p].push(r)
- }
- return i
- }, t
- }(n.DynamicViewOverlay)
- ;t.DedupOverlay = o;
- var s = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- n._context = t;
- var i = n._context.configuration.options, o = i.get(107);
- return n._lineHeight = i.get(49), n._glyphMargin = i.get(40), n._glyphMarginLeft = o.glyphMarginLeft, n._glyphMarginWidth = o.glyphMarginWidth, n._renderResult = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(107);
- return this._lineHeight = t.get(49), this._glyphMargin = t.get(40), this._glyphMarginLeft = n.glyphMarginLeft, this._glyphMarginWidth = n.glyphMarginWidth, !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype._getDecorations = function (e) {
- for (var t = e.getDecorationsInViewport(), n = [], o = 0, r = 0, s = t.length; r < s; r++) {
- var a = t[r], l = a.options.glyphMarginClassName;
- l && (n[o++] = new i(a.range.startLineNumber, a.range.endLineNumber, l))
- }
- return n
- }, t.prototype.prepareRender = function (e) {
- if (this._glyphMargin) {
- for (var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, i = this._render(t, n, this._getDecorations(e)), o = this._lineHeight.toString(), r = '" style="left:' + this._glyphMarginLeft.toString() + "px;width:" + this._glyphMarginWidth.toString() + "px;height:" + o + 'px;"></div>', s = [], a = t; a <= n; a++) {
- var l = a - t, u = i[l];
- 0 === u.length ? s[l] = "" : s[l] = '<div class="cgmr codicon ' + u.join(" ") + r
- }
- this._renderResult = s
- } else this._renderResult = null
- }, t.prototype.render = function (e, t) {
- if (!this._renderResult) return "";
- var n = t - e;
- return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
- }, t
- }(o);
- t.GlyphMarginOverlay = s
- })),define(n[368], i([0, 1, 149, 291]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- n._context = t;
- var i = n._context.configuration.options.get(107);
- return n._decorationsLeft = i.decorationsLeft, n._decorationsWidth = i.decorationsWidth, n._renderResult = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options.get(107);
- return this._decorationsLeft = t.decorationsLeft, this._decorationsWidth = t.decorationsWidth, !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- },
- t.prototype._getDecorations = function (e) {
- for (var t = e.getDecorationsInViewport(), i = [], o = 0, r = 0, s = t.length; r < s; r++) {
- var a = t[r], l = a.options.linesDecorationsClassName;
- l && (i[o++] = new n.DecorationToRender(a.range.startLineNumber, a.range.endLineNumber, l))
- }
- return i
- }, t.prototype.prepareRender = function (e) {
- for (var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, i = this._render(t, n, this._getDecorations(e)), o = '" style="left:' + this._decorationsLeft.toString() + "px;width:" + this._decorationsWidth.toString() + 'px;"></div>', r = [], s = t; s <= n; s++) {
- for (var a = s - t, l = i[a], u = "", d = 0, c = l.length; d < c; d++) u += '<div class="cldr ' + l[d] + o;
- r[a] = u
- }
- this._renderResult = r
- }, t.prototype.render = function (e, t) {
- return this._renderResult ? this._renderResult[t - e] : ""
- }, t
- }(n.DedupOverlay);
- t.LinesDecorationsOverlay = i
- })),define(n[195], i([0, 1, 28, 37]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(i) {
- var o = e.call(this, i) || this, r = o._context.configuration.options, s = r.get(107)
- ;
- return o._canUseLayerHinting = !r.get(22), o._contentLeft = s.contentLeft, o._glyphMarginLeft = s.glyphMarginLeft, o._glyphMarginWidth = s.glyphMarginWidth, o._domNode = n.createFastDomNode(document.createElement("div")), o._domNode.setClassName(t.OUTER_CLASS_NAME), o._domNode.setPosition("absolute"), o._domNode.setAttribute("role", "presentation"), o._domNode.setAttribute("aria-hidden", "true"), o._glyphMarginBackgroundDomNode = n.createFastDomNode(document.createElement("div")), o._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME), o._domNode.appendChild(o._glyphMarginBackgroundDomNode), o
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(107);
- return this._canUseLayerHinting = !t.get(22), this._contentLeft = n.contentLeft, this._glyphMarginLeft = n.glyphMarginLeft, this._glyphMarginWidth = n.glyphMarginWidth, !0
- }, t.prototype.onScrollChanged = function (t) {
- return e.prototype.onScrollChanged.call(this, t) || t.scrollTopChanged
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- this._domNode.setLayerHinting(this._canUseLayerHinting), this._domNode.setContain("strict");
- var t = e.scrollTop - e.bigNumbersDelta;
- this._domNode.setTop(-t);
- var n = Math.min(e.scrollHeight, 1e6);
- this._domNode.setHeight(n), this._domNode.setWidth(this._contentLeft), this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft), this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth), this._glyphMarginBackgroundDomNode.setHeight(n)
- }, t.CLASS_NAME = "glyph-margin", t.OUTER_CLASS_NAME = "margin", t
- }(i.ViewPart);
- t.Margin = o
- })),define(n[369], i([0, 1, 149, 292]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._context = t, n._renderResult = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null,
- e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- return !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype._getDecorations = function (e) {
- for (var t = e.getDecorationsInViewport(), i = [], o = 0, r = 0, s = t.length; r < s; r++) {
- var a = t[r], l = a.options.marginClassName;
- l && (i[o++] = new n.DecorationToRender(a.range.startLineNumber, a.range.endLineNumber, l))
- }
- return i
- }, t.prototype.prepareRender = function (e) {
- for (var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, i = this._render(t, n, this._getDecorations(e)), o = [], r = t; r <= n; r++) {
- for (var s = r - t, a = i[s], l = "", u = 0, d = a.length; u < d; u++) l += '<div class="cmdr ' + a[u] + '" style=""></div>';
- o[s] = l
- }
- this._renderResult = o
- },
- t.prototype.render = function (e, t) {
- return this._renderResult ? this._renderResult[t - e] : ""
- }, t
- }(n.DedupOverlay);
- t.MarginViewLineDecorationsOverlay = i
- })),define(n[370], i([0, 1, 28, 37, 294]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t) {
- var o = e.call(this, t) || this, r = o._context.configuration.options.get(107);
- return o._widgets = {}, o._verticalScrollbarWidth = r.verticalScrollbarWidth, o._minimapWidth = r.minimapWidth, o._horizontalScrollbarHeight = r.horizontalScrollbarHeight, o._editorHeight = r.height, o._editorWidth = r.width, o._domNode = n.createFastDomNode(document.createElement("div")), i.PartFingerprints.write(o._domNode, 4), o._domNode.setClassName("overlayWidgets"), o
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._widgets = {}
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options.get(107)
- ;
- return this._verticalScrollbarWidth = t.verticalScrollbarWidth, this._minimapWidth = t.minimapWidth, this._horizontalScrollbarHeight = t.horizontalScrollbarHeight, this._editorHeight = t.height, this._editorWidth = t.width, !0
- }, t.prototype.addWidget = function (e) {
- var t = n.createFastDomNode(e.getDomNode());
- this._widgets[e.getId()] = {
- widget: e,
- preference: null,
- domNode: t
- }, t.setPosition("absolute"), t.setAttribute("widgetId", e.getId()), this._domNode.appendChild(t), this.setShouldRender()
- }, t.prototype.setWidgetPosition = function (e, t) {
- var n = this._widgets[e.getId()];
- return n.preference !== t && (n.preference = t, this.setShouldRender(), !0)
- }, t.prototype.removeWidget = function (e) {
- var t = e.getId();
- if (this._widgets.hasOwnProperty(t)) {
- var n = this._widgets[t].domNode.domNode;
- delete this._widgets[t], n.parentNode.removeChild(n), this.setShouldRender()
- }
- }, t.prototype._renderWidget = function (e) {
- var t = e.domNode;
- if (null !== e.preference) if (0 === e.preference) t.setTop(0), t.setRight(2 * this._verticalScrollbarWidth + this._minimapWidth); else if (1 === e.preference) {
- var n = t.domNode.clientHeight;
- t.setTop(this._editorHeight - n - 2 * this._horizontalScrollbarHeight), t.setRight(2 * this._verticalScrollbarWidth + this._minimapWidth)
- } else 2 === e.preference && (t.setTop(0), t.domNode.style.right = "50%"); else t.unsetTop()
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- this._domNode.setWidth(this._editorWidth);
- for (var t = Object.keys(this._widgets), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- this._renderWidget(this._widgets[o])
- }
- }, t
- }(i.ViewPart);
- t.ViewOverlayWidgets = o
- })),define(n[371], i([0, 1, 28, 193, 92]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t(t, o) {
- var r = e.call(this) || this;
- r._context = t;
- var s = r._context.configuration.options;
- return r._domNode = n.createFastDomNode(document.createElement("canvas")), r._domNode.setClassName(o), r._domNode.setPosition("absolute"), r._domNode.setLayerHinting(!0), r._domNode.setContain("strict"), r._zoneManager = new i.OverviewZoneManager((function (e) {
- return r._context.viewLayout.getVerticalOffsetForLineNumber(e)
- })), r._zoneManager.setDOMWidth(0), r._zoneManager.setDOMHeight(0), r._zoneManager.setOuterHeight(r._context.viewLayout.getScrollHeight()), r._zoneManager.setLineHeight(s.get(49)), r._zoneManager.setPixelRatio(s.get(105)), r._context.addEventHandler(r), r
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options;
- return e.hasChanged(49) && (this._zoneManager.setLineHeight(t.get(49)), this._render()), e.hasChanged(105) && (this._zoneManager.setPixelRatio(t.get(105)), this._domNode.setWidth(this._zoneManager.getDOMWidth()), this._domNode.setHeight(this._zoneManager.getDOMHeight()), this._domNode.domNode.width = this._zoneManager.getCanvasWidth(), this._domNode.domNode.height = this._zoneManager.getCanvasHeight(), this._render()), !0
- }, t.prototype.onFlushed = function (e) {
- return this._render(), !0
- },
- t.prototype.onScrollChanged = function (e) {
- return e.scrollHeightChanged && (this._zoneManager.setOuterHeight(e.scrollHeight), this._render()), !0
- }, t.prototype.onZonesChanged = function (e) {
- return this._render(), !0
- }, t.prototype.getDomNode = function () {
- return this._domNode.domNode
- }, t.prototype.setLayout = function (e) {
- this._domNode.setTop(e.top), this._domNode.setRight(e.right);
- var t = !1;
- t = this._zoneManager.setDOMWidth(e.width) || t, (t = this._zoneManager.setDOMHeight(e.height) || t) && (this._domNode.setWidth(this._zoneManager.getDOMWidth()), this._domNode.setHeight(this._zoneManager.getDOMHeight()), this._domNode.domNode.width = this._zoneManager.getCanvasWidth(), this._domNode.domNode.height = this._zoneManager.getCanvasHeight(), this._render())
- }, t.prototype.setZones = function (e) {
- this._zoneManager.setZones(e), this._render()
- }, t.prototype._render = function () {
- if (0 === this._zoneManager.getOuterHeight()) return !1
- ;
- var e = this._zoneManager.getCanvasWidth(), t = this._zoneManager.getCanvasHeight(),
- n = this._zoneManager.resolveColorZones(), i = this._zoneManager.getId2Color(),
- o = this._domNode.domNode.getContext("2d");
- return o.clearRect(0, 0, e, t), n.length > 0 && this._renderOneLane(o, n, i, e), !0
- }, t.prototype._renderOneLane = function (e, t, n, i) {
- for (var o = 0, r = 0, s = 0, a = 0, l = t; a < l.length; a++) {
- var u = l[a], d = u.colorId, c = u.from, h = u.to;
- d !== o ? (e.fillRect(0, r, i, s - r), o = d, e.fillStyle = n[o], r = c, s = h) : s >= c ? s = Math.max(s, h) : (e.fillRect(0, r, i, s - r), r = c, s = h)
- }
- e.fillRect(0, r, i, s - r)
- }, t
- }(o.ViewEventHandler);
- t.OverviewRuler = s
- })),define(n[372], i([0, 1, 28, 10, 37, 13]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- throw new Error("Invalid change accessor")
- }, l = function (e) {
- function t(t) {
- var i = e.call(this, t) || this, o = i._context.configuration.options, r = o.get(107);
- return i._lineHeight = o.get(49), i._contentWidth = r.contentWidth, i._contentLeft = r.contentLeft, i.domNode = n.createFastDomNode(document.createElement("div")),
- i.domNode.setClassName("view-zones"), i.domNode.setPosition("absolute"), i.domNode.setAttribute("role", "presentation"), i.domNode.setAttribute("aria-hidden", "true"), i.marginDomNode = n.createFastDomNode(document.createElement("div")), i.marginDomNode.setClassName("margin-view-zones"), i.marginDomNode.setPosition("absolute"), i.marginDomNode.setAttribute("role", "presentation"), i.marginDomNode.setAttribute("aria-hidden", "true"), i._zones = {}, i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._zones = {}
- }, t.prototype._recomputeWhitespacesProps = function () {
- for (var e = this, t = this._context.viewLayout.getWhitespaces(), n = new Map, i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- n.set(r.id, r)
- }
- return this._context.viewLayout.changeWhitespace((function (t) {
- for (var i = !1, o = Object.keys(e._zones), r = 0, s = o.length; r < s; r++) {
- var a = o[r], l = e._zones[a], u = e._computeWhitespaceProps(l.delegate), d = n.get(a)
- ;!d || d.afterLineNumber === u.afterViewLineNumber && d.height === u.heightInPx || (t.changeOneWhitespace(a, u.afterViewLineNumber, u.heightInPx), e._safeCallOnComputedHeight(l.delegate, u.heightInPx), i = !0)
- }
- return i
- }))
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(107);
- return this._lineHeight = t.get(49), this._contentWidth = n.contentWidth, this._contentLeft = n.contentLeft, e.hasChanged(49) && this._recomputeWhitespacesProps(), !0
- }, t.prototype.onLineMappingChanged = function (e) {
- var t = this._recomputeWhitespacesProps();
- return t && this._context.viewLayout.onHeightMaybeChanged(), t
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged || e.scrollWidthChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype._getZoneOrdinal = function (e) {
- return void 0 !== e.afterColumn ? e.afterColumn : 1e4
- }, t.prototype._computeWhitespaceProps = function (e) {
- if (0 === e.afterLineNumber) return {
- afterViewLineNumber: 0, heightInPx: this._heightInPixels(e), minWidthInPx: this._minWidthInPixels(e)
- };
- var t, n;
- if (void 0 !== e.afterColumn) t = this._context.model.validateModelPosition({
- lineNumber: e.afterLineNumber,
- column: e.afterColumn
- }); else {
- var i = this._context.model.validateModelPosition({
- lineNumber: e.afterLineNumber,
- column: 1
- }).lineNumber;
- t = new s.Position(i, this._context.model.getModelLineMaxColumn(i))
- }
- n = t.column === this._context.model.getModelLineMaxColumn(t.lineNumber) ? this._context.model.validateModelPosition({
- lineNumber: t.lineNumber + 1,
- column: 1
- }) : this._context.model.validateModelPosition({lineNumber: t.lineNumber, column: t.column + 1});
- var o = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),
- r = this._context.model.coordinatesConverter.modelPositionIsVisible(n);
- return {
- afterViewLineNumber: o.lineNumber,
- heightInPx: r ? this._heightInPixels(e) : 0,
- minWidthInPx: this._minWidthInPixels(e)
- }
- }, t.prototype.changeViewZones = function (e) {
- var t = this;
- return this._context.viewLayout.changeWhitespace((function (n) {
- var o = !1, r = {
- addZone: function (e) {
- return o = !0, t._addZone(n, e)
- }, removeZone: function (e) {
- e && (o = t._removeZone(n, e) || o)
- }, layoutZone: function (e) {
- e && (o = t._layoutZone(n, e) || o)
- }
- };
- return function (e, t) {
- try {
- e(t)
- } catch (e) {
- i.onUnexpectedError(e)
- }
- }(e, r), r.addZone = a, r.removeZone = a, r.layoutZone = a, o
- }))
- }, t.prototype._addZone = function (e, t) {
- var i = this._computeWhitespaceProps(t), o = {
- whitespaceId: e.insertWhitespace(i.afterViewLineNumber, this._getZoneOrdinal(t), i.heightInPx, i.minWidthInPx),
- delegate: t,
- isVisible: !1,
- domNode: n.createFastDomNode(t.domNode),
- marginDomNode: t.marginDomNode ? n.createFastDomNode(t.marginDomNode) : null
- };
- return this._safeCallOnComputedHeight(o.delegate, i.heightInPx), o.domNode.setPosition("absolute"), o.domNode.domNode.style.width = "100%", o.domNode.setDisplay("none"), o.domNode.setAttribute("monaco-view-zone", o.whitespaceId), this.domNode.appendChild(o.domNode), o.marginDomNode && (o.marginDomNode.setPosition("absolute"), o.marginDomNode.domNode.style.width = "100%", o.marginDomNode.setDisplay("none"),
- o.marginDomNode.setAttribute("monaco-view-zone", o.whitespaceId), this.marginDomNode.appendChild(o.marginDomNode)), this._zones[o.whitespaceId] = o, this.setShouldRender(), o.whitespaceId
- }, t.prototype._removeZone = function (e, t) {
- if (this._zones.hasOwnProperty(t)) {
- var n = this._zones[t];
- return delete this._zones[t], e.removeWhitespace(n.whitespaceId), n.domNode.removeAttribute("monaco-visible-view-zone"), n.domNode.removeAttribute("monaco-view-zone"), n.domNode.domNode.parentNode.removeChild(n.domNode.domNode), n.marginDomNode && (n.marginDomNode.removeAttribute("monaco-visible-view-zone"), n.marginDomNode.removeAttribute("monaco-view-zone"), n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)), this.setShouldRender(), !0
- }
- return !1
- }, t.prototype._layoutZone = function (e, t) {
- if (this._zones.hasOwnProperty(t)) {
- var n = this._zones[t], i = this._computeWhitespaceProps(n.delegate);
- return e.changeOneWhitespace(n.whitespaceId, i.afterViewLineNumber, i.heightInPx), this._safeCallOnComputedHeight(n.delegate, i.heightInPx),
- this.setShouldRender(), !0
- }
- return !1
- }, t.prototype.shouldSuppressMouseDownOnViewZone = function (e) {
- if (this._zones.hasOwnProperty(e)) {
- var t = this._zones[e];
- return Boolean(t.delegate.suppressMouseDown)
- }
- return !1
- }, t.prototype._heightInPixels = function (e) {
- return "number" == typeof e.heightInPx ? e.heightInPx : "number" == typeof e.heightInLines ? this._lineHeight * e.heightInLines : this._lineHeight
- }, t.prototype._minWidthInPixels = function (e) {
- return "number" == typeof e.minWidthInPx ? e.minWidthInPx : 0
- }, t.prototype._safeCallOnComputedHeight = function (e, t) {
- if ("function" == typeof e.onComputedHeight) try {
- e.onComputedHeight(t)
- } catch (e) {
- i.onUnexpectedError(e)
- }
- }, t.prototype._safeCallOnDomNodeTop = function (e, t) {
- if ("function" == typeof e.onDomNodeTop) try {
- e.onDomNodeTop(t)
- } catch (e) {
- i.onUnexpectedError(e)
- }
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- for (var t = e.viewportData.whitespaceViewportData, n = {}, i = !1, o = 0, r = t.length; o < r; o++) n[t[o].id] = t[o], i = !0;
- var s = Object.keys(this._zones);
- for (o = 0, r = s.length; o < r; o++) {
- var a = s[o], l = this._zones[a], u = 0, d = 0, c = "none";
- n.hasOwnProperty(a) ? (u = n[a].verticalOffset - e.bigNumbersDelta, d = n[a].height, c = "block", l.isVisible || (l.domNode.setAttribute("monaco-visible-view-zone", "true"), l.isVisible = !0), this._safeCallOnDomNodeTop(l.delegate, e.getScrolledTopFromAbsoluteTop(n[a].verticalOffset))) : (l.isVisible && (l.domNode.removeAttribute("monaco-visible-view-zone"), l.isVisible = !1), this._safeCallOnDomNodeTop(l.delegate, e.getScrolledTopFromAbsoluteTop(-1e6))), l.domNode.setTop(u), l.domNode.setHeight(d), l.domNode.setDisplay(c), l.marginDomNode && (l.marginDomNode.setTop(u), l.marginDomNode.setHeight(d), l.marginDomNode.setDisplay(c))
- }
- i && (this.domNode.setWidth(Math.max(e.scrollWidth, this._contentWidth)), this.marginDomNode.setWidth(this._contentLeft))
- }, t
- }(o.ViewPart);
- t.ViewZones = l
- })),define(n[69], i([0, 1, 5]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e, t, n, i) {
- this.top = 0 | e, this.left = 0 | t, this.width = 0 | n, this.height = 0 | i
- };
- t.Viewport = i;
- var o = function (e, t) {
- this.tabSize = e, this.data = t
- };
- t.MinimapLinesRenderingData = o;
- var r = function (e, t, n, i, o, r) {
- this.content = e, this.continuesWithWrappedLine = t, this.minColumn = n, this.maxColumn = i, this.startVisibleColumn = o, this.tokens = r
- };
- t.ViewLineData = r;
- var s = function () {
- function e(t, n, i, o, r, s, a, l, u, d) {
- this.minColumn = t, this.maxColumn = n, this.content = i, this.continuesWithWrappedLine = o, this.isBasicASCII = e.isBasicASCII(i, s), this.containsRTL = e.containsRTL(i, this.isBasicASCII, r), this.tokens = a, this.inlineDecorations = l, this.tabSize = u, this.startVisibleColumn = d
- }
- return e.isBasicASCII = function (e, t) {
- return !t || n.isBasicASCII(e)
- }, e.containsRTL = function (e, t, i) {
- return !(t || !i) && n.containsRTL(e)
- }, e
- }();
- t.ViewLineRenderingData = s;
- var a = function (e, t, n) {
- this.range = e, this.inlineClassName = t, this.type = n
- };
- t.InlineDecoration = a;
- var l = function (e, t) {
- this.range = e, this.options = t
- };
- t.ViewModelDecoration = l
- })),define(n[373], i([0, 1, 4, 2, 176, 362, 69]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function () {
- function e(e, t, n, i) {
- (e |= 0) < 0 && (e = 0), (t |= 0) < 0 && (t = 0), (n |= 0) < 0 && (n = 0), (i |= 0) < 0 && (i = 0), this.width = e, this.contentWidth = t, this.scrollWidth = Math.max(e, t), this.height = n, this.contentHeight = i, this.scrollHeight = Math.max(n, i)
- }
- return e.prototype.equals = function (e) {
- return this.width === e.width && this.contentWidth === e.contentWidth && this.height === e.height && this.contentHeight === e.contentHeight
- }, e
- }(), u = function (e) {
- function t(t, i) {
- var r = e.call(this) || this;
- return r._onDidContentSizeChange = r._register(new n.Emitter), r.onDidContentSizeChange = r._onDidContentSizeChange.event, r._dimensions = new l(0, 0, 0, 0), r._scrollable = r._register(new o.Scrollable(t, i)), r.onDidScroll = r._scrollable.onScroll, r
- }
- return r(t, e), t.prototype.getScrollable = function () {
- return this._scrollable
- }, t.prototype.setSmoothScrollDuration = function (e) {
- this._scrollable.setSmoothScrollDuration(e)
- }, t.prototype.validateScrollPosition = function (e) {
- return this._scrollable.validateScrollPosition(e)
- }, t.prototype.getScrollDimensions = function () {
- return this._dimensions
- },
- t.prototype.setScrollDimensions = function (e) {
- if (!this._dimensions.equals(e)) {
- var t = this._dimensions;
- this._dimensions = e, this._scrollable.setScrollDimensions({
- width: e.width,
- scrollWidth: e.scrollWidth,
- height: e.height,
- scrollHeight: e.scrollHeight
- });
- var n = t.contentWidth !== e.contentWidth, i = t.contentHeight !== e.contentHeight;
- (n || i) && this._onDidContentSizeChange.fire({
- contentWidth: e.contentWidth,
- contentHeight: e.contentHeight,
- contentWidthChanged: n,
- contentHeightChanged: i
- })
- }
- }, t.prototype.getFutureScrollPosition = function () {
- return this._scrollable.getFutureScrollPosition()
- }, t.prototype.getCurrentScrollPosition = function () {
- return this._scrollable.getCurrentScrollPosition()
- }, t.prototype.setScrollPositionNow = function (e) {
- this._scrollable.setScrollPositionNow(e)
- }, t.prototype.setScrollPositionSmooth = function (e) {
- this._scrollable.setScrollPositionSmooth(e)
- }, t
- }(i.Disposable), d = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- o._configuration = t;
- var r = o._configuration.options, a = r.get(107)
- ;
- return o._linesLayout = new s.LinesLayout(n, r.get(49)), o._scrollable = o._register(new u(0, i)), o._configureSmoothScrollDuration(), o._scrollable.setScrollDimensions(new l(a.contentWidth, 0, a.height, 0)), o.onDidScroll = o._scrollable.onDidScroll, o.onDidContentSizeChange = o._scrollable.onDidContentSizeChange, o._updateHeight(), o
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.getScrollable = function () {
- return this._scrollable.getScrollable()
- }, t.prototype.onHeightMaybeChanged = function () {
- this._updateHeight()
- }, t.prototype._configureSmoothScrollDuration = function () {
- this._scrollable.setSmoothScrollDuration(this._configuration.options.get(87) ? 125 : 0)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._configuration.options;
- if (e.hasChanged(49) && this._linesLayout.setLineHeight(t.get(49)), e.hasChanged(107)) {
- var n = t.get(107), i = n.contentWidth, o = n.height, r = this._scrollable.getScrollDimensions(),
- s = r.scrollWidth
- ;this._scrollable.setScrollDimensions(new l(i, r.contentWidth, o, this._getContentHeight(i, o, s)))
- } else this._updateHeight();
- e.hasChanged(87) && this._configureSmoothScrollDuration()
- }, t.prototype.onFlushed = function (e) {
- this._linesLayout.onFlushed(e)
- }, t.prototype.onLinesDeleted = function (e, t) {
- this._linesLayout.onLinesDeleted(e, t)
- }, t.prototype.onLinesInserted = function (e, t) {
- this._linesLayout.onLinesInserted(e, t)
- }, t.prototype._getHorizontalScrollbarHeight = function (e, t) {
- var n = this._configuration.options.get(78);
- return 2 === n.horizontal ? 0 : e >= t ? 0 : n.horizontalScrollbarSize
- }, t.prototype._getContentHeight = function (e, t, n) {
- var i = this._configuration.options, o = this._linesLayout.getLinesTotalHeight();
- return i.get(80) ? o += t - i.get(49) : o += this._getHorizontalScrollbarHeight(e, n), o
- }, t.prototype._updateHeight = function () {
- var e = this._scrollable.getScrollDimensions(), t = e.width, n = e.height, i = e.scrollWidth;
- this._scrollable.setScrollDimensions(new l(t, e.contentWidth, n, this._getContentHeight(t, n, i)))
- }, t.prototype.getCurrentViewport = function () {
- var e = this._scrollable.getScrollDimensions(), t = this._scrollable.getCurrentScrollPosition();
- return new a.Viewport(t.scrollTop, t.scrollLeft, e.width, e.height)
- }, t.prototype.getFutureViewport = function () {
- var e = this._scrollable.getScrollDimensions(), t = this._scrollable.getFutureScrollPosition();
- return new a.Viewport(t.scrollTop, t.scrollLeft, e.width, e.height)
- }, t.prototype._computeContentWidth = function (e) {
- var t = this._configuration.options, n = t.get(108), i = t.get(34);
- if (n.isViewportWrapping) {
- var o = t.get(107), r = t.get(54);
- return e > o.contentWidth + i.typicalHalfwidthCharacterWidth && r.enabled && "right" === r.side ? e + o.verticalScrollbarWidth : e
- }
- var s = t.get(79) * i.typicalHalfwidthCharacterWidth, a = this._linesLayout.getWhitespaceMinWidth();
- return Math.max(e + s, a)
- }, t.prototype.onMaxLineWidthChanged = function (e) {
- var t = this._scrollable.getScrollDimensions();
- this._scrollable.setScrollDimensions(new l(t.width, this._computeContentWidth(e), t.height, t.contentHeight)), this._updateHeight()
- }, t.prototype.saveState = function () {
- var e = this._scrollable.getFutureScrollPosition(), t = e.scrollTop,
- n = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);
- return {
- scrollTop: t,
- scrollTopWithoutViewZones: t - this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),
- scrollLeft: e.scrollLeft
- }
- }, t.prototype.changeWhitespace = function (e) {
- return this._linesLayout.changeWhitespace(e)
- }, t.prototype.getVerticalOffsetForLineNumber = function (e) {
- return this._linesLayout.getVerticalOffsetForLineNumber(e)
- }, t.prototype.isAfterLines = function (e) {
- return this._linesLayout.isAfterLines(e)
- }, t.prototype.getLineNumberAtVerticalOffset = function (e) {
- return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)
- }, t.prototype.getWhitespaceAtVerticalOffset = function (e) {
- return this._linesLayout.getWhitespaceAtVerticalOffset(e)
- }, t.prototype.getLinesViewportData = function () {
- var e = this.getCurrentViewport();
- return this._linesLayout.getLinesViewportData(e.top, e.top + e.height)
- }, t.prototype.getLinesViewportDataAtScrollTop = function (e) {
- var t = this._scrollable.getScrollDimensions()
- ;
- return e + t.height > t.scrollHeight && (e = t.scrollHeight - t.height), e < 0 && (e = 0), this._linesLayout.getLinesViewportData(e, e + t.height)
- }, t.prototype.getWhitespaceViewportData = function () {
- var e = this.getCurrentViewport();
- return this._linesLayout.getWhitespaceViewportData(e.top, e.top + e.height)
- }, t.prototype.getWhitespaces = function () {
- return this._linesLayout.getWhitespaces()
- }, t.prototype.getContentWidth = function () {
- return this._scrollable.getScrollDimensions().contentWidth
- }, t.prototype.getScrollWidth = function () {
- return this._scrollable.getScrollDimensions().scrollWidth
- }, t.prototype.getContentHeight = function () {
- return this._scrollable.getScrollDimensions().contentHeight
- }, t.prototype.getScrollHeight = function () {
- return this._scrollable.getScrollDimensions().scrollHeight
- }, t.prototype.getCurrentScrollLeft = function () {
- return this._scrollable.getCurrentScrollPosition().scrollLeft
- }, t.prototype.getCurrentScrollTop = function () {
- return this._scrollable.getCurrentScrollPosition().scrollTop
- }, t.prototype.validateScrollPosition = function (e) {
- return this._scrollable.validateScrollPosition(e)
- }, t.prototype.setScrollPositionNow = function (e) {
- this._scrollable.setScrollPositionNow(e)
- }, t.prototype.setScrollPositionSmooth = function (e) {
- this._scrollable.setScrollPositionSmooth(e)
- }, t.prototype.deltaScrollNow = function (e, t) {
- var n = this._scrollable.getCurrentScrollPosition();
- this._scrollable.setScrollPositionNow({scrollLeft: n.scrollLeft + e, scrollTop: n.scrollTop + t})
- }, t
- }(i.Disposable);
- t.ViewLayout = d
- })),define(n[374], i([0, 1, 3]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t) {
- this._selection = e, this._isMovingLeft = t, this._cutStartIndex = -1, this._cutEndIndex = -1, this._moved = !1, this._selectionId = null
- }
- return e.prototype.getEditOperations = function (e, t) {
- var i = this._selection;
- if (this._selectionId = t.trackSelection(i), i.startLineNumber === i.endLineNumber && (!this._isMovingLeft || 0 !== i.startColumn) && (this._isMovingLeft || i.endColumn !== e.getLineMaxColumn(i.startLineNumber))) {
- var o, r, s, a = i.selectionStartLineNumber, l = e.getLineContent(a);
- this._isMovingLeft ? (o = l.substring(0, i.startColumn - 2), r = l.substring(i.startColumn - 1, i.endColumn - 1), s = l.substring(i.startColumn - 2, i.startColumn - 1) + l.substring(i.endColumn - 1)) : (o = l.substring(0, i.startColumn - 1) + l.substring(i.endColumn - 1, i.endColumn), r = l.substring(i.startColumn - 1, i.endColumn - 1), s = l.substring(i.endColumn));
- var u = o + r + s;
- t.addEditOperation(new n.Range(a, 1, a, e.getLineMaxColumn(a)), null), t.addEditOperation(new n.Range(a, 1, a, 1), u), this._cutStartIndex = i.startColumn + (this._isMovingLeft ? -1 : 1), this._cutEndIndex = this._cutStartIndex + i.endColumn - i.startColumn, this._moved = !0
- }
- }, e.prototype.computeCursorState = function (e, t) {
- var n = t.getTrackedSelection(this._selectionId);
- return this._moved && (n = (n = n.setStartPosition(n.startLineNumber, this._cutStartIndex)).setEndPosition(n.startLineNumber, this._cutEndIndex)), n
- }, e
- }();
- t.MoveCaretCommand = i
- })),define(n[111], i([0, 1, 5]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var i = function () {
- function e(e) {
- this.value = e
- }
- return e.prototype.equals = function (e) {
- return this.value === e.value
- }, e.prototype.contains = function (t) {
- return this.equals(t) || "" === this.value || n.startsWith(t.value, this.value + e.sep)
- }, e.prototype.intersects = function (e) {
- return this.contains(e) || e.contains(this)
- }, e.prototype.append = function (t) {
- return new e(this.value + e.sep + t)
- }, e.sep = ".", e.None = new e("@@none@@"), e.Empty = new e(""), e.QuickFix = new e("quickfix"), e.Refactor = new e("refactor"), e.Source = new e("source"), e.SourceOrganizeImports = e.Source.append("organizeImports"), e.SourceFixAll = e.Source.append("fixAll"), e
- }();
- function o(e, t, n) {
- return !!t.contains(e) && (!n || !t.contains(n))
- }
- t.CodeActionKind = i, t.mayIncludeActionsOfKind = function (e, t) {
- return !(e.include && !e.include.intersects(t)) && ((!e.excludes || !e.excludes.some((function (n) {
- return o(t, n, e.include)
- }))) && !(!e.includeSourceActions && i.Source.contains(t)))
- }, t.filtersAction = function (e, t) {
- var n = t.kind ? new i(t.kind) : void 0
- ;
- return !!(!e.include || n && e.include.contains(n)) && (!(e.excludes && n && e.excludes.some((function (t) {
- return o(n, t, e.include)
- }))) && (!(!e.includeSourceActions && n && i.Source.contains(n)) && !(e.onlyIncludePreferredActions && !t.isPreferred)))
- };
- var r = function () {
- function e(e, t, n) {
- this.kind = e, this.apply = t, this.preferred = n
- }
- return e.fromUser = function (t, n) {
- return t && "object" == typeof t ? new e(e.getKindFromUser(t, n.kind), e.getApplyFromUser(t, n.apply), e.getPreferredUser(t)) : new e(n.kind, n.apply, !1)
- }, e.getApplyFromUser = function (e, t) {
- switch ("string" == typeof e.apply ? e.apply.toLowerCase() : "") {
- case"first":
- return "first";
- case"never":
- return "never";
- case"ifsingle":
- return "ifSingle";
- default:
- return t
- }
- }, e.getKindFromUser = function (e, t) {
- return "string" == typeof e.kind ? new i(e.kind) : t
- }, e.getPreferredUser = function (e) {
- return "boolean" == typeof e.preferred && e.preferred
- }, e
- }();
- t.CodeActionCommandArgs = r
- })),define(n[375], i([0, 1, 4]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, i) {
- this.presentationIndex = i, this._onColorFlushed = new n.Emitter, this.onColorFlushed = this._onColorFlushed.event, this._onDidChangeColor = new n.Emitter, this.onDidChangeColor = this._onDidChangeColor.event, this._onDidChangePresentation = new n.Emitter, this.onDidChangePresentation = this._onDidChangePresentation.event, this.originalColor = e, this._color = e, this._colorPresentations = t
- }
- return Object.defineProperty(e.prototype, "color", {
- get: function () {
- return this._color
- }, set: function (e) {
- this._color.equals(e) || (this._color = e, this._onDidChangeColor.fire(e))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "presentation", {
- get: function () {
- return this.colorPresentations[this.presentationIndex]
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "colorPresentations", {
- get: function () {
- return this._colorPresentations
- }, set: function (e) {
- this._colorPresentations = e, this.presentationIndex > e.length - 1 && (this.presentationIndex = 0), this._onDidChangePresentation.fire(this.presentation)
- }, enumerable: !0, configurable: !0
- }),
- e.prototype.selectNextColorPresentation = function () {
- this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length, this.flushColor(), this._onDidChangePresentation.fire(this.presentation)
- }, e.prototype.guessColorPresentation = function (e, t) {
- for (var n = 0; n < this.colorPresentations.length; n++) if (t === this.colorPresentations[n].label) {
- this.presentationIndex = n, this._onDidChangePresentation.fire(this.presentation);
- break
- }
- }, e.prototype.flushColor = function () {
- this._onColorFlushed.fire(this._color)
- }, e
- }();
- t.ColorPickerModel = i
- })),define(n[196], i([0, 1, 58, 13, 3, 22, 41]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e, t) {
- this._selection = e, this._insertSpace = t, this._usedEndToken = null
- }
- return e._haystackHasNeedleAtOffset = function (e, t, n) {
- if (n < 0) return !1;
- var i = t.length;
- if (n + i > e.length) return !1;
- for (var o = 0; o < i; o++) {
- var r = e.charCodeAt(n + o), s = t.charCodeAt(o);
- if (r !== s && !(r >= 65 && r <= 90 && r + 32 === s || s >= 65 && s <= 90 && s + 32 === r)) return !1
- }
- return !0
- },
- e.prototype._createOperationsForBlockComment = function (t, n, i, r, s, a) {
- var l, u = t.startLineNumber, d = t.startColumn, c = t.endLineNumber, h = t.endColumn,
- p = s.getLineContent(u), g = s.getLineContent(c), f = p.lastIndexOf(n, d - 1 + n.length),
- m = g.indexOf(i, h - 1 - i.length);
- if (-1 !== f && -1 !== m) if (u === c) {
- p.substring(f + n.length, m).indexOf(i) >= 0 && (f = -1, m = -1)
- } else {
- var v = p.substring(f + n.length), _ = g.substring(0, m);
- (v.indexOf(i) >= 0 || _.indexOf(i) >= 0) && (f = -1, m = -1)
- }
- -1 !== f && -1 !== m ? (r && f + n.length < p.length && 32 === p.charCodeAt(f + n.length) && (n += " "), r && m > 0 && 32 === g.charCodeAt(m - 1) && (i = " " + i, m -= 1), l = e._createRemoveBlockCommentOperations(new o.Range(u, f + n.length + 1, c, m + 1), n, i)) : (l = e._createAddBlockCommentOperations(t, n, i, this._insertSpace), this._usedEndToken = 1 === l.length ? i : null);
- for (var y = 0, C = l; y < C.length; y++) {
- var b = C[y];
- a.addTrackedEditOperation(b.range, b.text)
- }
- }, e._createRemoveBlockCommentOperations = function (e, t, i) {
- var r = []
- ;
- return o.Range.isEmpty(e) ? r.push(n.EditOperation.delete(new o.Range(e.startLineNumber, e.startColumn - t.length, e.endLineNumber, e.endColumn + i.length))) : (r.push(n.EditOperation.delete(new o.Range(e.startLineNumber, e.startColumn - t.length, e.startLineNumber, e.startColumn))), r.push(n.EditOperation.delete(new o.Range(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn + i.length)))), r
- }, e._createAddBlockCommentOperations = function (e, t, r, s) {
- var a = [];
- return o.Range.isEmpty(e) ? a.push(n.EditOperation.replace(new o.Range(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), t + " " + r)) : (a.push(n.EditOperation.insert(new i.Position(e.startLineNumber, e.startColumn), t + (s ? " " : ""))), a.push(n.EditOperation.insert(new i.Position(e.endLineNumber, e.endColumn), (s ? " " : "") + r))), a
- }, e.prototype.getEditOperations = function (e, t) {
- var n = this._selection.startLineNumber, i = this._selection.startColumn;
- e.tokenizeIfCheap(n);
- var o = e.getLanguageIdAtPosition(n, i), r = s.LanguageConfigurationRegistry.getComments(o)
- ;r && r.blockCommentStartToken && r.blockCommentEndToken && this._createOperationsForBlockComment(this._selection, r.blockCommentStartToken, r.blockCommentEndToken, this._insertSpace, e, t)
- }, e.prototype.computeCursorState = function (e, t) {
- var n = t.getInverseEditOperations();
- if (2 === n.length) {
- var i = n[0], o = n[1];
- return new r.Selection(i.range.endLineNumber, i.range.endColumn, o.range.startLineNumber, o.range.startColumn)
- }
- var s = n[0].range, a = this._usedEndToken ? -this._usedEndToken.length - 1 : 0;
- return new r.Selection(s.endLineNumber, s.endColumn + a, s.endLineNumber, s.endColumn + a)
- }, e
- }();
- t.BlockCommentCommand = a
- })),define(n[376], i([0, 1, 5, 58, 13, 3, 22, 41, 196]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- function e(e, t, n, i) {
- this._selection = e, this._tabSize = t, this._type = n, this._insertSpace = i, this._selectionId = null, this._deltaColumn = 0, this._moveEndPositionDown = !1
- }
- return e._gatherPreflightCommentStrings = function (e, t, n) {
- e.tokenizeIfCheap(t)
- ;var i = e.getLanguageIdAtPosition(t, 1), o = a.LanguageConfigurationRegistry.getComments(i),
- r = o ? o.lineCommentToken : null;
- if (!r) return null;
- for (var s = [], l = 0, u = n - t + 1; l < u; l++) s[l] = {
- ignore: !1,
- commentStr: r,
- commentStrOffset: 0,
- commentStrLength: r.length
- };
- return s
- }, e._analyzeLines = function (e, t, i, o, r) {
- var s, a = !0;
- s = 0 === e || 1 !== e;
- for (var u = 0, d = o.length; u < d; u++) {
- var c = o[u], h = r + u, p = i.getLineContent(h), g = n.firstNonWhitespaceIndex(p);
- if (-1 !== g) {
- if (a = !1, c.ignore = !1, c.commentStrOffset = g, s && !l.BlockCommentCommand._haystackHasNeedleAtOffset(p, c.commentStr, g) && (0 === e ? s = !1 : 1 === e || (c.ignore = !0)), s && t) {
- var f = g + c.commentStrLength;
- f < p.length && 32 === p.charCodeAt(f) && (c.commentStrLength += 1)
- }
- } else c.ignore = !0, c.commentStrOffset = p.length
- }
- if (0 === e && a) {
- s = !1;
- for (u = 0, d = o.length; u < d; u++) o[u].ignore = !1
- }
- return {supported: !0, shouldRemoveComments: s, lines: o}
- }, e._gatherPreflightData = function (t, n, i, o, r) {
- var s = e._gatherPreflightCommentStrings(i, o, r);
- return null === s ? {supported: !1} : e._analyzeLines(t, n, i, s, o)
- }, e.prototype._executeLineComments = function (t, n, i, r) {
- var s;
- i.shouldRemoveComments ? s = e._createRemoveLineCommentsOperations(i.lines, r.startLineNumber) : (e._normalizeInsertionPoint(t, i.lines, r.startLineNumber, this._tabSize), s = this._createAddLineCommentsOperations(i.lines, r.startLineNumber));
- for (var a = new o.Position(r.positionLineNumber, r.positionColumn), l = 0, u = s.length; l < u; l++) {
- if (n.addEditOperation(s[l].range, s[l].text), s[l].range.isEmpty() && s[l].range.getStartPosition().equals(a)) t.getLineContent(a.lineNumber).length + 1 === a.column && (this._deltaColumn = (s[l].text || "").length)
- }
- this._selectionId = n.trackSelection(r)
- }, e.prototype._attemptRemoveBlockComment = function (e, t, n, i) {
- var o = t.startLineNumber, s = t.endLineNumber,
- a = i.length + Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber), t.startColumn),
- u = e.getLineContent(o).lastIndexOf(n, a - 1),
- d = e.getLineContent(s).indexOf(i, t.endColumn - 1 - n.length);
- return -1 !== u && -1 === d && (d = e.getLineContent(o).indexOf(i, u + n.length), s = o), -1 === u && -1 !== d && (u = e.getLineContent(s).lastIndexOf(n, d), o = s),
- !t.isEmpty() || -1 !== u && -1 !== d || -1 !== (u = e.getLineContent(o).indexOf(n)) && (d = e.getLineContent(o).indexOf(i, u + n.length)), -1 !== u && 32 === e.getLineContent(o).charCodeAt(u + n.length) && (n += " "), -1 !== d && 32 === e.getLineContent(s).charCodeAt(d - 1) && (i = " " + i, d -= 1), -1 !== u && -1 !== d ? l.BlockCommentCommand._createRemoveBlockCommentOperations(new r.Range(o, u + n.length + 1, s, d + 1), n, i) : null
- }, e.prototype._executeBlockComment = function (e, t, i) {
- e.tokenizeIfCheap(i.startLineNumber);
- var o = e.getLanguageIdAtPosition(i.startLineNumber, 1),
- s = a.LanguageConfigurationRegistry.getComments(o);
- if (s && s.blockCommentStartToken && s.blockCommentEndToken) {
- var u = s.blockCommentStartToken, d = s.blockCommentEndToken,
- c = this._attemptRemoveBlockComment(e, i, u, d);
- if (!c) {
- if (i.isEmpty()) {
- var h = e.getLineContent(i.startLineNumber), p = n.firstNonWhitespaceIndex(h);
- -1 === p && (p = h.length), c = l.BlockCommentCommand._createAddBlockCommentOperations(new r.Range(i.startLineNumber, p + 1, i.startLineNumber, h.length + 1), u, d, this._insertSpace)
- } else c = l.BlockCommentCommand._createAddBlockCommentOperations(new r.Range(i.startLineNumber, e.getLineFirstNonWhitespaceColumn(i.startLineNumber), i.endLineNumber, e.getLineMaxColumn(i.endLineNumber)), u, d, this._insertSpace);
- 1 === c.length && (this._deltaColumn = u.length + 1)
- }
- this._selectionId = t.trackSelection(i);
- for (var g = 0, f = c; g < f.length; g++) {
- var m = f[g];
- t.addEditOperation(m.range, m.text)
- }
- }
- }, e.prototype.getEditOperations = function (t, n) {
- var i = this._selection;
- this._moveEndPositionDown = !1, i.startLineNumber < i.endLineNumber && 1 === i.endColumn && (this._moveEndPositionDown = !0, i = i.setEndPosition(i.endLineNumber - 1, t.getLineMaxColumn(i.endLineNumber - 1)));
- var o = e._gatherPreflightData(this._type, this._insertSpace, t, i.startLineNumber, i.endLineNumber);
- return o.supported ? this._executeLineComments(t, n, o, i) : this._executeBlockComment(t, n, i)
- }, e.prototype.computeCursorState = function (e, t) {
- var n = t.getTrackedSelection(this._selectionId);
- return this._moveEndPositionDown && (n = n.setEndPosition(n.endLineNumber + 1, 1)),
- new s.Selection(n.selectionStartLineNumber, n.selectionStartColumn + this._deltaColumn, n.positionLineNumber, n.positionColumn + this._deltaColumn)
- }, e._createRemoveLineCommentsOperations = function (e, t) {
- for (var n = [], o = 0, s = e.length; o < s; o++) {
- var a = e[o];
- a.ignore || n.push(i.EditOperation.delete(new r.Range(t + o, a.commentStrOffset + 1, t + o, a.commentStrOffset + a.commentStrLength + 1)))
- }
- return n
- }, e.prototype._createAddLineCommentsOperations = function (e, t) {
- for (var n = [], r = this._insertSpace ? " " : "", s = 0, a = e.length; s < a; s++) {
- var l = e[s];
- l.ignore || n.push(i.EditOperation.insert(new o.Position(t + s, l.commentStrOffset + 1), l.commentStr + r))
- }
- return n
- }, e.nextVisibleColumn = function (e, t, n, i) {
- return n ? e + (t - e % t) : e + i
- }, e._normalizeInsertionPoint = function (t, n, i, o) {
- for (var r, s, a = 1073741824, l = 0, u = n.length; l < u; l++) if (!n[l].ignore) {
- for (var d = t.getLineContent(i + l), c = 0, h = 0, p = n[l].commentStrOffset; c < a && h < p; h++) c = e.nextVisibleColumn(c, o, 9 === d.charCodeAt(h), 1);
- c < a && (a = c)
- }
- a = Math.floor(a / o) * o;
- for (l = 0, u = n.length; l < u; l++) if (!n[l].ignore) {
- d = t.getLineContent(i + l), c = 0
- ;
- for (r = 0, s = n[l].commentStrOffset; c < a && r < s; r++) c = e.nextVisibleColumn(c, o, 9 === d.charCodeAt(r), 1);
- n[l].commentStrOffset = c > a ? r - 1 : r
- }
- }, e
- }();
- t.LineCommentCommand = u
- })),define(n[377], i([0, 1, 22, 3]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t, n) {
- this.selection = e, this.targetPosition = t, this.copy = n, this.targetSelection = null
- }
- return e.prototype.getEditOperations = function (e, t) {
- var o = e.getValueInRange(this.selection);
- this.copy || t.addEditOperation(this.selection, null), t.addEditOperation(new i.Range(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), o),
- !this.selection.containsPosition(this.targetPosition) || this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition)) ? this.copy ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.targetPosition.lineNumber > this.selection.endLineNumber ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.targetPosition.lineNumber < this.selection.endLineNumber ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.selection.endColumn <= this.targetPosition.column ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, (this.selection.startLineNumber,
- this.selection.endLineNumber, this.targetPosition.column - this.selection.endColumn + this.selection.startColumn), this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column : this.selection.endColumn) : this.targetSelection = new n.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn) : this.targetSelection = this.selection
- }, e.prototype.computeCursorState = function (e, t) {
- return this.targetSelection
- }, e
- }();
- t.DragAndDropCommand = o
- })),define(n[378], i([0, 1, 4, 2, 3]), (function (e, t, n, i, o) {
- "use strict";
- function s(e, t) {
- return 1 === e || 2 !== e && t
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._onFindReplaceStateChange = t._register(new n.Emitter), t.onFindReplaceStateChange = t._onFindReplaceStateChange.event, t._searchString = "",
- t._replaceString = "", t._isRevealed = !1, t._isReplaceRevealed = !1, t._isRegex = !1, t._isRegexOverride = 0, t._wholeWord = !1, t._wholeWordOverride = 0, t._matchCase = !1, t._matchCaseOverride = 0, t._preserveCase = !1, t._preserveCaseOverride = 0, t._searchScope = null, t._matchesPosition = 0, t._matchesCount = 0, t._currentMatch = null, t
- }
- return r(t, e), Object.defineProperty(t.prototype, "searchString", {
- get: function () {
- return this._searchString
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "replaceString", {
- get: function () {
- return this._replaceString
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "isRevealed", {
- get: function () {
- return this._isRevealed
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "isReplaceRevealed", {
- get: function () {
- return this._isReplaceRevealed
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "isRegex", {
- get: function () {
- return s(this._isRegexOverride, this._isRegex)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "wholeWord", {
- get: function () {
- return s(this._wholeWordOverride, this._wholeWord)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "matchCase", {
- get: function () {
- return s(this._matchCaseOverride, this._matchCase)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "preserveCase", {
- get: function () {
- return s(this._preserveCaseOverride, this._preserveCase)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "actualIsRegex", {
- get: function () {
- return this._isRegex
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "actualWholeWord", {
- get: function () {
- return this._wholeWord
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "actualMatchCase", {
- get: function () {
- return this._matchCase
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "actualPreserveCase", {
- get: function () {
- return this._preserveCase
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "searchScope", {
- get: function () {
- return this._searchScope
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(t.prototype, "matchesPosition", {
- get: function () {
- return this._matchesPosition
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "matchesCount", {
- get: function () {
- return this._matchesCount
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "currentMatch", {
- get: function () {
- return this._currentMatch
- }, enumerable: !0, configurable: !0
- }), t.prototype.changeMatchInfo = function (e, t, n) {
- var i = {
- moveCursor: !1,
- updateHistory: !1,
- searchString: !1,
- replaceString: !1,
- isRevealed: !1,
- isReplaceRevealed: !1,
- isRegex: !1,
- wholeWord: !1,
- matchCase: !1,
- preserveCase: !1,
- searchScope: !1,
- matchesPosition: !1,
- matchesCount: !1,
- currentMatch: !1
- }, r = !1;
- 0 === t && (e = 0), e > t && (e = t), this._matchesPosition !== e && (this._matchesPosition = e, i.matchesPosition = !0, r = !0), this._matchesCount !== t && (this._matchesCount = t, i.matchesCount = !0, r = !0), void 0 !== n && (o.Range.equalsRange(this._currentMatch, n) || (this._currentMatch = n, i.currentMatch = !0, r = !0)), r && this._onFindReplaceStateChange.fire(i)
- }, t.prototype.change = function (e, t, n) {
- void 0 === n && (n = !0);
- var i = {
- moveCursor: t,
- updateHistory: n,
- searchString: !1,
- replaceString: !1,
- isRevealed: !1,
- isReplaceRevealed: !1,
- isRegex: !1,
- wholeWord: !1,
- matchCase: !1,
- preserveCase: !1,
- searchScope: !1,
- matchesPosition: !1,
- matchesCount: !1,
- currentMatch: !1
- }, r = !1, s = this.isRegex, a = this.wholeWord, l = this.matchCase, u = this.preserveCase;
- void 0 !== e.searchString && this._searchString !== e.searchString && (this._searchString = e.searchString, i.searchString = !0, r = !0), void 0 !== e.replaceString && this._replaceString !== e.replaceString && (this._replaceString = e.replaceString, i.replaceString = !0, r = !0), void 0 !== e.isRevealed && this._isRevealed !== e.isRevealed && (this._isRevealed = e.isRevealed, i.isRevealed = !0, r = !0), void 0 !== e.isReplaceRevealed && this._isReplaceRevealed !== e.isReplaceRevealed && (this._isReplaceRevealed = e.isReplaceRevealed, i.isReplaceRevealed = !0, r = !0), void 0 !== e.isRegex && (this._isRegex = e.isRegex), void 0 !== e.wholeWord && (this._wholeWord = e.wholeWord), void 0 !== e.matchCase && (this._matchCase = e.matchCase),
- void 0 !== e.preserveCase && (this._preserveCase = e.preserveCase), void 0 !== e.searchScope && (o.Range.equalsRange(this._searchScope, e.searchScope) || (this._searchScope = e.searchScope, i.searchScope = !0, r = !0)), this._isRegexOverride = void 0 !== e.isRegexOverride ? e.isRegexOverride : 0, this._wholeWordOverride = void 0 !== e.wholeWordOverride ? e.wholeWordOverride : 0, this._matchCaseOverride = void 0 !== e.matchCaseOverride ? e.matchCaseOverride : 0, this._preserveCaseOverride = void 0 !== e.preserveCaseOverride ? e.preserveCaseOverride : 0, s !== this.isRegex && (r = !0, i.isRegex = !0), a !== this.wholeWord && (r = !0, i.wholeWord = !0), l !== this.matchCase && (r = !0, i.matchCase = !0), u !== this.preserveCase && (r = !0, i.preserveCase = !0), r && this._onFindReplaceStateChange.fire(i)
- }, t
- }(i.Disposable);
- t.FindReplaceState = a
- })),define(n[379], i([0, 1, 3]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n) {
- this._editorSelection = e, this._ranges = t, this._replaceStrings = n, this._trackedEditorSelectionId = null
- }
- return e.prototype.getEditOperations = function (e, t) {
- if (this._ranges.length > 0) {
- for (var i = [], o = 0; o < this._ranges.length; o++) i.push({
- range: this._ranges[o],
- text: this._replaceStrings[o]
- });
- i.sort((function (e, t) {
- return n.Range.compareRangesUsingStarts(e.range, t.range)
- }));
- var r = [], s = i[0];
- for (o = 1; o < i.length; o++) s.range.endLineNumber === i[o].range.startLineNumber && s.range.endColumn === i[o].range.startColumn ? (s.range = s.range.plusRange(i[o].range), s.text = s.text + i[o].text) : (r.push(s), s = i[o]);
- r.push(s);
- for (var a = 0, l = r; a < l.length; a++) {
- var u = l[a];
- t.addEditOperation(u.range, u.text)
- }
- }
- this._trackedEditorSelectionId = t.trackSelection(this._editorSelection)
- }, e.prototype.computeCursorState = function (e, t) {
- return t.getTrackedSelection(this._trackedEditorSelectionId)
- }, e
- }();
- t.ReplaceAllCommand = i
- })),define(n[380], i([0, 1, 247]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e) {
- this.staticValue = e, this.kind = 0
- }, o = function (e) {
- this.pieces = e, this.kind = 1
- }, r = function () {
- function e(e) {
- e && 0 !== e.length ? 1 === e.length && null !== e[0].staticValue ? this._state = new i(e[0].staticValue) : this._state = new o(e) : this._state = new i("")
- }
- return e.fromStaticValue = function (t) {
- return new e([s.staticValue(t)])
- }, Object.defineProperty(e.prototype, "hasReplacementPatterns", {
- get: function () {
- return 1 === this._state.kind
- }, enumerable: !0, configurable: !0
- }), e.prototype.buildReplaceString = function (t, i) {
- if (0 === this._state.kind) return i ? n.buildReplaceStringWithCasePreserved(t, this._state.staticValue) : this._state.staticValue;
- for (var o = "", r = 0, s = this._state.pieces.length; r < s; r++) {
- var a = this._state.pieces[r];
- null === a.staticValue ? o += e._substitute(a.matchIndex, t) : o += a.staticValue
- }
- return o
- }, e._substitute = function (e, t) {
- if (null === t) return "";
- if (0 === e) return t[0];
- for (var n = ""; e > 0;) {
- if (e < t.length) return (t[e] || "") + n;
- n = String(e % 10) + n, e = Math.floor(e / 10)
- }
- return "$" + n
- }, e
- }();
- t.ReplacePattern = r;
- var s = function () {
- function e(e, t) {
- this.staticValue = e, this.matchIndex = t
- }
- return e.staticValue = function (t) {
- return new e(t, -1)
- }, e.matchIndex = function (t) {
- return new e(null, t)
- }, e
- }();
- t.ReplacePiece = s;
- var a = function () {
- function e(e) {
- this._source = e, this._lastCharIndex = 0, this._result = [], this._resultLen = 0, this._currentStaticPiece = ""
- }
- return e.prototype.emitUnchanged = function (e) {
- this._emitStatic(this._source.substring(this._lastCharIndex, e)), this._lastCharIndex = e
- }, e.prototype.emitStatic = function (e, t) {
- this._emitStatic(e), this._lastCharIndex = t
- }, e.prototype._emitStatic = function (e) {
- 0 !== e.length && (this._currentStaticPiece += e)
- }, e.prototype.emitMatchIndex = function (e, t) {
- 0 !== this._currentStaticPiece.length && (this._result[this._resultLen++] = s.staticValue(this._currentStaticPiece), this._currentStaticPiece = ""), this._result[this._resultLen++] = s.matchIndex(e), this._lastCharIndex = t
- }, e.prototype.finalize = function () {
- return this.emitUnchanged(this._source.length), 0 !== this._currentStaticPiece.length && (this._result[this._resultLen++] = s.staticValue(this._currentStaticPiece), this._currentStaticPiece = ""), new r(this._result)
- }, e
- }();
- t.parseReplaceString = function (e) {
- if (!e || 0 === e.length) return new r(null);
- for (var t = new a(e), n = 0, i = e.length; n < i; n++) {
- var o = e.charCodeAt(n);
- if (92 !== o) {
- if (36 === o) {
- if (++n >= i) break;
- if (36 === (u = e.charCodeAt(n))) {
- t.emitUnchanged(n - 1), t.emitStatic("$", n + 1);
- continue
- }
- if (48 === u || 38 === u) {
- t.emitUnchanged(n - 1), t.emitMatchIndex(0, n + 1);
- continue
- }
- if (49 <= u && u <= 57) {
- var s = u - 48;
- if (n + 1 < i) {
- var l = e.charCodeAt(n + 1);
- if (48 <= l && l <= 57) {
- n++, s = 10 * s + (l - 48), t.emitUnchanged(n - 2), t.emitMatchIndex(s, n + 1);
- continue
- }
- }
- t.emitUnchanged(n - 1), t.emitMatchIndex(s, n + 1);
- continue
- }
- }
- } else {
- if (++n >= i) break;
- var u;
- switch (u = e.charCodeAt(n)) {
- case 92:
- t.emitUnchanged(n - 1), t.emitStatic("\\", n + 1);
- break;
- case 110:
- t.emitUnchanged(n - 1), t.emitStatic("\n", n + 1);
- break;
- case 116:
- t.emitUnchanged(n - 1), t.emitStatic("\t", n + 1)
- }
- }
- }
- return t.finalize()
- }
- })),define(n[150], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.MAX_FOLDING_REGIONS = 65535, t.MAX_LINE_NUMBER = 16777215;
- var n = function () {
- function e(e, n, i) {
- if (e.length !== n.length || e.length > t.MAX_FOLDING_REGIONS) throw new Error("invalid startIndexes or endIndexes size");
- this._startIndexes = e, this._endIndexes = n, this._collapseStates = new Uint32Array(Math.ceil(e.length / 32)), this._types = i, this._parentsComputed = !1
- }
- return e.prototype.ensureParentIndices = function () {
- var e = this;
- if (!this._parentsComputed) {
- this._parentsComputed = !0;
- for (var n = [], i = function (t, i) {
- var o = n[n.length - 1];
- return e.getStartLineNumber(o) <= t && e.getEndLineNumber(o) >= i
- }, o = 0, r = this._startIndexes.length; o < r; o++) {
- var s = this._startIndexes[o], a = this._endIndexes[o];
- if (s > t.MAX_LINE_NUMBER || a > t.MAX_LINE_NUMBER) throw new Error("startLineNumber or endLineNumber must not exceed " + t.MAX_LINE_NUMBER);
- for (; n.length > 0 && !i(s, a);) n.pop();
- var l = n.length > 0 ? n[n.length - 1] : -1;
- n.push(o), this._startIndexes[o] = s + ((255 & l) << 24), this._endIndexes[o] = a + ((65280 & l) << 16)
- }
- }
- }, Object.defineProperty(e.prototype, "length", {
- get: function () {
- return this._startIndexes.length
- }, enumerable: !0, configurable: !0
- }), e.prototype.getStartLineNumber = function (e) {
- return this._startIndexes[e] & t.MAX_LINE_NUMBER
- }, e.prototype.getEndLineNumber = function (e) {
- return this._endIndexes[e] & t.MAX_LINE_NUMBER
- }, e.prototype.getType = function (e) {
- return this._types ? this._types[e] : void 0
- }, e.prototype.hasTypes = function () {
- return !!this._types
- }, e.prototype.isCollapsed = function (e) {
- var t = e / 32 | 0, n = e % 32;
- return 0 != (this._collapseStates[t] & 1 << n)
- }, e.prototype.setCollapsed = function (e, t) {
- var n = e / 32 | 0, i = e % 32, o = this._collapseStates[n];
- this._collapseStates[n] = t ? o | 1 << i : o & ~(1 << i)
- }, e.prototype.toRegion = function (e) {
- return new i(this, e)
- }, e.prototype.getParentIndex = function (e) {
- this.ensureParentIndices();
- var n = ((4278190080 & this._startIndexes[e]) >>> 24) + ((4278190080 & this._endIndexes[e]) >>> 16);
- return n === t.MAX_FOLDING_REGIONS ? -1 : n
- }, e.prototype.contains = function (e, t) {
- return this.getStartLineNumber(e) <= t && this.getEndLineNumber(e) >= t
- }, e.prototype.findIndex = function (e) {
- var t = 0, n = this._startIndexes.length;
- if (0 === n) return -1;
- for (; t < n;) {
- var i = Math.floor((t + n) / 2);
- e < this.getStartLineNumber(i) ? n = i : t = i + 1
- }
- return t - 1
- },
- e.prototype.findRange = function (e) {
- var t = this.findIndex(e);
- if (t >= 0) {
- if (this.getEndLineNumber(t) >= e) return t;
- for (t = this.getParentIndex(t); -1 !== t;) {
- if (this.contains(t, e)) return t;
- t = this.getParentIndex(t)
- }
- }
- return -1
- }, e.prototype.toString = function () {
- for (var e = [], t = 0; t < this.length; t++) e[t] = "[" + (this.isCollapsed(t) ? "+" : "-") + "] " + this.getStartLineNumber(t) + "/" + this.getEndLineNumber(t);
- return e.join(", ")
- }, e
- }();
- t.FoldingRegions = n;
- var i = function () {
- function e(e, t) {
- this.ranges = e, this.index = t
- }
- return Object.defineProperty(e.prototype, "startLineNumber", {
- get: function () {
- return this.ranges.getStartLineNumber(this.index)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "endLineNumber", {
- get: function () {
- return this.ranges.getEndLineNumber(this.index)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "regionIndex", {
- get: function () {
- return this.index
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "parentIndex", {
- get: function () {
- return this.ranges.getParentIndex(this.index)
- },
- enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "isCollapsed", {
- get: function () {
- return this.ranges.isCollapsed(this.index)
- }, enumerable: !0, configurable: !0
- }), e.prototype.containedBy = function (e) {
- return e.startLineNumber <= this.startLineNumber && e.endLineNumber >= this.endLineNumber
- }, e.prototype.containsLine = function (e) {
- return this.startLineNumber <= e && e <= this.endLineNumber
- }, e
- }();
- t.FoldingRegion = i
- })),define(n[381], i([0, 1, 4, 150]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t) {
- this._updateEventEmitter = new n.Emitter, this.onDidChange = this._updateEventEmitter.event, this._textModel = e, this._decorationProvider = t, this._regions = new i.FoldingRegions(new Uint32Array(0), new Uint32Array(0)), this._editorDecorationIds = [], this._isInitialized = !1
- }
- return Object.defineProperty(e.prototype, "regions", {
- get: function () {
- return this._regions
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "textModel", {
- get: function () {
- return this._textModel
- },
- enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "isInitialized", {
- get: function () {
- return this._isInitialized
- }, enumerable: !0, configurable: !0
- }), e.prototype.toggleCollapseState = function (e) {
- var t = this;
- if (e.length) {
- var n = {};
- this._decorationProvider.changeDecorations((function (i) {
- for (var o = 0, r = e; o < r.length; o++) {
- var s = r[o].regionIndex, a = t._editorDecorationIds[s];
- if (a && !n[a]) {
- n[a] = !0;
- var l = !t._regions.isCollapsed(s);
- t._regions.setCollapsed(s, l), i.changeDecorationOptions(a, t._decorationProvider.getDecorationOption(l))
- }
- }
- })), this._updateEventEmitter.fire({model: this, collapseStateChanged: e})
- }
- }, e.prototype.update = function (e, t) {
- var n = this;
- void 0 === t && (t = []);
- for (var i = [], o = function (o, r) {
- var s = e.getStartLineNumber(o);
- r && function (e, n) {
- for (var i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- if (e < r && r <= n) return !0
- }
- return !1
- }(s, e.getEndLineNumber(o)) && (r = !1), e.setCollapsed(o, r);
- var a = n._textModel.getLineMaxColumn(s),
- l = {startLineNumber: s, startColumn: a, endLineNumber: s, endColumn: a};
- i.push({
- range: l,
- options: n._decorationProvider.getDecorationOption(r)
- })
- }, r = 0, s = function () {
- for (; r < n._regions.length;) {
- var e = n._regions.isCollapsed(r);
- if (r++, e) return r - 1
- }
- return -1
- }, a = 0, l = s(); -1 !== l && a < e.length;) {
- var u = this._textModel.getDecorationRange(this._editorDecorationIds[l]);
- if (u) {
- var d = u.startLineNumber;
- if (this._textModel.getLineMaxColumn(d) === u.startColumn) for (; a < e.length;) {
- var c = e.getStartLineNumber(a);
- if (!(d >= c)) break;
- o(a, d === c), a++
- }
- }
- l = s()
- }
- for (; a < e.length;) o(a, !1), a++;
- this._editorDecorationIds = this._decorationProvider.deltaDecorations(this._editorDecorationIds, i), this._regions = e, this._isInitialized = !0, this._updateEventEmitter.fire({model: this})
- }, e.prototype.getMemento = function () {
- for (var e = [], t = 0; t < this._regions.length; t++) if (this._regions.isCollapsed(t)) {
- var n = this._textModel.getDecorationRange(this._editorDecorationIds[t]);
- if (n) {
- var i = n.startLineNumber,
- o = n.endLineNumber + this._regions.getEndLineNumber(t) - this._regions.getStartLineNumber(t);
- e.push({startLineNumber: i, endLineNumber: o})
- }
- }
- if (e.length > 0) return e
- },
- e.prototype.applyMemento = function (e) {
- if (Array.isArray(e)) {
- for (var t = [], n = 0, i = e; n < i.length; n++) {
- var o = i[n], r = this.getRegionAtLine(o.startLineNumber);
- r && !r.isCollapsed && t.push(r)
- }
- this.toggleCollapseState(t)
- }
- }, e.prototype.dispose = function () {
- this._decorationProvider.deltaDecorations(this._editorDecorationIds, [])
- }, e.prototype.getAllRegionsAtLine = function (e, t) {
- var n = [];
- if (this._regions) for (var i = this._regions.findRange(e), o = 1; i >= 0;) {
- var r = this._regions.toRegion(i);
- t && !t(r, o) || n.push(r), o++, i = r.parentIndex
- }
- return n
- }, e.prototype.getRegionAtLine = function (e) {
- if (this._regions) {
- var t = this._regions.findRange(e);
- if (t >= 0) return this._regions.toRegion(t)
- }
- return null
- }, e.prototype.getRegionsInside = function (e, t) {
- var n = [], i = e ? e.regionIndex + 1 : 0, o = e ? e.endLineNumber : Number.MAX_VALUE;
- if (t && 2 === t.length) for (var r = [], s = i, a = this._regions.length; s < a; s++) {
- var l = this._regions.toRegion(s);
- if (!(this._regions.getStartLineNumber(s) < o)) break;
- for (; r.length > 0 && !l.containedBy(r[r.length - 1]);) r.pop();
- r.push(l), t(l, r.length) && n.push(l)
- } else for (s = i, a = this._regions.length; s < a; s++) {
- l = this._regions.toRegion(s);
- if (!(this._regions.getStartLineNumber(s) < o)) break;
- t && !t(l) || n.push(l)
- }
- return n
- }, e
- }();
- t.FoldingModel = o, t.toggleCollapseState = function (e, t, n) {
- for (var i = [], o = function (n) {
- var o = e.getRegionAtLine(n);
- if (o) {
- var r = !o.isCollapsed;
- if (i.push(o), t > 1) {
- var s = e.getRegionsInside(o, (function (e, n) {
- return e.isCollapsed !== r && n < t
- }));
- i.push.apply(i, s)
- }
- }
- }, r = 0, s = n; r < s.length; r++) {
- o(s[r])
- }
- e.toggleCollapseState(i)
- }, t.setCollapseStateLevelsDown = function (e, t, n, i) {
- void 0 === n && (n = Number.MAX_VALUE);
- var o = [];
- if (i && i.length > 0) for (var r = 0, s = i; r < s.length; r++) {
- var a = s[r], l = e.getRegionAtLine(a);
- if (l && (l.isCollapsed !== t && o.push(l), n > 1)) {
- var u = e.getRegionsInside(l, (function (e, i) {
- return e.isCollapsed !== t && i < n
- }));
- o.push.apply(o, u)
- }
- } else {
- u = e.getRegionsInside(null, (function (e, i) {
- return e.isCollapsed !== t && i < n
- }));
- o.push.apply(o, u)
- }
- e.toggleCollapseState(o)
- }, t.setCollapseStateLevelsUp = function (e, t, n, i) {
- for (var o = [], r = 0, s = i; r < s.length; r++) {
- var a = s[r], l = e.getAllRegionsAtLine(a, (function (e, i) {
- return e.isCollapsed !== t && i <= n
- }));
- o.push.apply(o, l)
- }
- e.toggleCollapseState(o)
- }, t.setCollapseStateUp = function (e, t, n) {
- for (var i = [], o = 0, r = n; o < r.length; o++) {
- var s = r[o], a = e.getAllRegionsAtLine(s, (function (e) {
- return e.isCollapsed !== t
- }));
- a.length > 0 && i.push(a[0])
- }
- e.toggleCollapseState(i)
- }, t.setCollapseStateAtLevel = function (e, t, n, i) {
- var o = e.getRegionsInside(null, (function (e, o) {
- return o === t && e.isCollapsed !== n && !i.some((function (t) {
- return e.containsLine(t)
- }))
- }));
- e.toggleCollapseState(o)
- }, t.setCollapseStateForMatchingLines = function (e, t, n) {
- for (var i = e.textModel, o = e.regions, r = [], s = o.length - 1; s >= 0; s--) if (n !== o.isCollapsed(s)) {
- var a = o.getStartLineNumber(s);
- t.test(i.getLineContent(a)) && r.push(o.toRegion(s))
- }
- e.toggleCollapseState(r)
- }, t.setCollapseStateForType = function (e, t, n) {
- for (var i = e.regions, o = [], r = i.length - 1; r >= 0; r--) n !== i.isCollapsed(r) && t === i.getType(r) && o.push(i.toRegion(r));
- e.toggleCollapseState(o)
- }
- })),define(n[382], i([0, 1, 4, 3, 19]), (function (e, t, n, i, o) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e) {
- var t = this;
- this._updateEventEmitter = new n.Emitter, this._foldingModel = e, this._foldingModelListener = e.onDidChange((function (e) {
- return t.updateHiddenRanges()
- })), this._hiddenRanges = [], e.regions.length && this.updateHiddenRanges()
- }
- return Object.defineProperty(e.prototype, "onDidChange", {
- get: function () {
- return this._updateEventEmitter.event
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "hiddenRanges", {
- get: function () {
- return this._hiddenRanges
- }, enumerable: !0, configurable: !0
- }), e.prototype.updateHiddenRanges = function () {
- for (var e = !1, t = [], n = 0, o = 0, r = Number.MAX_VALUE, s = -1, a = this._foldingModel.regions; n < a.length; n++) if (a.isCollapsed(n)) {
- var l = a.getStartLineNumber(n) + 1, u = a.getEndLineNumber(n);
- r <= l && u <= s || (!e && o < this._hiddenRanges.length && this._hiddenRanges[o].startLineNumber === l && this._hiddenRanges[o].endLineNumber === u ? (t.push(this._hiddenRanges[o]), o++) : (e = !0, t.push(new i.Range(l, 1, u, 1))), r = l, s = u)
- }
- (e || o < this._hiddenRanges.length) && this.applyHiddenRanges(t)
- }, e.prototype.applyMemento = function (e) {
- if (!Array.isArray(e) || 0 === e.length) return !1;
- for (var t = [], n = 0, o = e; n < o.length; n++) {
- var r = o[n];
- if (!r.startLineNumber || !r.endLineNumber) return !1;
- t.push(new i.Range(r.startLineNumber + 1, 1, r.endLineNumber, 1))
- }
- return this.applyHiddenRanges(t), !0
- }, e.prototype.getMemento = function () {
- return this._hiddenRanges.map((function (e) {
- return {startLineNumber: e.startLineNumber - 1, endLineNumber: e.endLineNumber}
- }))
- }, e.prototype.applyHiddenRanges = function (e) {
- this._hiddenRanges = e, this._updateEventEmitter.fire(e)
- }, e.prototype.hasRanges = function () {
- return this._hiddenRanges.length > 0
- }, e.prototype.isHidden = function (e) {
- return null !== s(this._hiddenRanges, e)
- }, e.prototype.adjustSelections = function (e) {
- for (var t = this, n = !1, i = this._foldingModel.textModel, o = null, r = function (e) {
- return o && function (e, t) {
- return e >= t.startLineNumber && e <= t.endLineNumber
- }(e, o) || (o = s(t._hiddenRanges, e)), o ? o.startLineNumber - 1 : null
- }, a = 0, l = e.length; a < l; a++) {
- var u = e[a], d = r(u.startLineNumber);
- d && (u = u.setStartPosition(d, i.getLineMaxColumn(d)), n = !0);
- var c = r(u.endLineNumber);
- c && (u = u.setEndPosition(c, i.getLineMaxColumn(c)), n = !0), e[a] = u
- }
- return n
- }, e.prototype.dispose = function () {
- this.hiddenRanges.length > 0 && (this._hiddenRanges = [], this._updateEventEmitter.fire(this._hiddenRanges)), this._foldingModelListener && (this._foldingModelListener.dispose(), this._foldingModelListener = null)
- }, e
- }();
- function s(e, t) {
- var n = o.findFirstInSorted(e, (function (e) {
- return t < e.startLineNumber
- })) - 1;
- return n >= 0 && e[n].endLineNumber >= t ? e[n] : null
- }
- t.HiddenRangeModel = r
- })),define(n[197], i([0, 1, 10, 150]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = 5e3, r = {};
- t.ID_SYNTAX_PROVIDER = "syntax";
- var s = function () {
- function e(e, n, i) {
- void 0 === i && (i = o), this.editorModel = e, this.providers = n, this.limit = i, this.id = t.ID_SYNTAX_PROVIDER
- }
- return e.prototype.compute = function (e) {
- var t = this;
- return function (e, t, i) {
- var o = null, s = e.map((function (e, s) {
- return Promise.resolve(e.provideFoldingRanges(t, r, i)).then((function (e) {
- if (!i.isCancellationRequested && Array.isArray(e)) {
- Array.isArray(o) || (o = []);
- for (var n = t.getLineCount(), r = 0, a = e; r < a.length; r++) {
- var l = a[r];
- l.start > 0 && l.end > l.start && l.end <= n && o.push({
- start: l.start,
- end: l.end,
- rank: s,
- kind: l.kind
- })
- }
- }
- }), n.onUnexpectedExternalError)
- }));
- return Promise.all(s).then((function (e) {
- return o
- }))
- }(this.providers, this.editorModel, e).then((function (e) {
- return e ? l(e, t.limit) : null
- }))
- }, e.prototype.dispose = function () {
- }, e
- }();
- t.SyntaxRangeProvider = s;
- var a = function () {
- function e(e) {
- this._startIndexes = [], this._endIndexes = [], this._nestingLevels = [], this._nestingLevelCounts = [], this._types = [], this._length = 0, this._foldingRangesLimit = e
- }
- return e.prototype.add = function (e, t, n, o) {
- if (!(e > i.MAX_LINE_NUMBER || t > i.MAX_LINE_NUMBER)) {
- var r = this._length;
- this._startIndexes[r] = e, this._endIndexes[r] = t, this._nestingLevels[r] = o, this._types[r] = n, this._length++, o < 30 && (this._nestingLevelCounts[o] = (this._nestingLevelCounts[o] || 0) + 1)
- }
- },
- e.prototype.toIndentRanges = function () {
- if (this._length <= this._foldingRangesLimit) {
- for (var e = new Uint32Array(this._length), t = new Uint32Array(this._length), n = 0; n < this._length; n++) e[n] = this._startIndexes[n], t[n] = this._endIndexes[n];
- return new i.FoldingRegions(e, t, this._types)
- }
- var o = 0, r = this._nestingLevelCounts.length;
- for (n = 0; n < this._nestingLevelCounts.length; n++) {
- var s = this._nestingLevelCounts[n];
- if (s) {
- if (s + o > this._foldingRangesLimit) {
- r = n;
- break
- }
- o += s
- }
- }
- e = new Uint32Array(this._foldingRangesLimit), t = new Uint32Array(this._foldingRangesLimit);
- for (var a = [], l = (n = 0, 0); n < this._length; n++) {
- var u = this._nestingLevels[n];
- (u < r || u === r && o++ < this._foldingRangesLimit) && (e[l] = this._startIndexes[n], t[l] = this._endIndexes[n], a[l] = this._types[n], l++)
- }
- return new i.FoldingRegions(e, t, a)
- }, e
- }();
- function l(e, t) {
- for (var n = e.sort((function (e, t) {
- var n = e.start - t.start;
- return 0 === n && (n = e.rank - t.rank), n
- })), i = new a(t), o = void 0, r = [], s = 0, l = n; s < l.length; s++) {
- var u = l[s];
- if (o) {
- if (u.start > o.start) if (u.end <= o.end) r.push(o), o = u,
- i.add(u.start, u.end, u.kind && u.kind.value, r.length); else {
- if (u.start > o.end) {
- do {
- o = r.pop()
- } while (o && u.start > o.end);
- o && r.push(o), o = u
- }
- i.add(u.start, u.end, u.kind && u.kind.value, r.length)
- }
- } else o = u, i.add(u.start, u.end, u.kind && u.kind.value, r.length)
- }
- return i.toIndentRanges()
- }
- t.RangesCollector = a, t.sanitizeRanges = l
- })),define(n[383], i([0, 1, 197]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ID_INIT_PROVIDER = "init";
- var i = function () {
- function e(e, n, i, o) {
- if (this.editorModel = e, this.id = t.ID_INIT_PROVIDER, n.length) {
- this.decorationIds = e.deltaDecorations([], n.map((function (t) {
- return {
- range: {
- startLineNumber: t.startLineNumber,
- startColumn: 0,
- endLineNumber: t.endLineNumber,
- endColumn: e.getLineLength(t.endLineNumber)
- }, options: {stickiness: 1}
- }
- }))), this.timeout = setTimeout(i, o)
- }
- }
- return e.prototype.dispose = function () {
- this.decorationIds && (this.editorModel.deltaDecorations(this.decorationIds, []), this.decorationIds = void 0), "number" == typeof this.timeout && (clearTimeout(this.timeout), this.timeout = void 0)
- },
- e.prototype.compute = function (e) {
- var t = [];
- if (this.decorationIds) for (var i = 0, o = this.decorationIds; i < o.length; i++) {
- var r = o[i], s = this.editorModel.getDecorationRange(r);
- s && t.push({start: s.startLineNumber, end: s.endLineNumber, rank: 1})
- }
- return Promise.resolve(n.sanitizeRanges(t, Number.MAX_VALUE))
- }, e
- }();
- t.InitializingRangeProvider = i
- })),define(n[198], i([0, 1, 58, 3]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e() {
- }
- return e._handleEolEdits = function (e, t) {
- for (var n = void 0, i = [], o = 0, r = t; o < r.length; o++) {
- var s = r[o];
- "number" == typeof s.eol && (n = s.eol), s.range && "string" == typeof s.text && i.push(s)
- }
- return "number" == typeof n && e.hasModel() && e.getModel().pushEOL(n), i
- }, e._isFullModelReplaceEdit = function (e, t) {
- if (!e.hasModel()) return !1;
- var n = e.getModel(), i = n.validateRange(t.range);
- return n.getFullModelRange().equalsRange(i)
- }, e.execute = function (t, o) {
- t.pushUndoStop();
- var r = e._handleEolEdits(t, o)
- ;1 === r.length && e._isFullModelReplaceEdit(t, r[0]) ? t.executeEdits("formatEditsCommand", r.map((function (e) {
- return n.EditOperation.replace(i.Range.lift(e.range), e.text)
- }))) : t.executeEdits("formatEditsCommand", r.map((function (e) {
- return n.EditOperation.replaceMove(i.Range.lift(e.range), e.text)
- }))), t.pushUndoStop()
- }, e
- }();
- t.FormattingEdit = o
- })),define(n[199], i([0, 1, 24, 2, 4, 16]), (function (e, t, n, i, o, s) {
- "use strict";
- function a(e, t) {
- return !!e[t]
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function (e, t) {
- this.target = e.target, this.hasTriggerModifier = a(e.event, t.triggerModifier), this.hasSideBySideModifier = a(e.event, t.triggerSideBySideModifier), this.isNoneOrSingleMouseDown = n.isIE || e.event.detail <= 1
- };
- t.ClickLinkMouseEvent = l;
- var u = function (e, t) {
- this.keyCodeIsTriggerKey = e.keyCode === t.triggerKey, this.keyCodeIsSideBySideKey = e.keyCode === t.triggerSideBySideKey, this.hasTriggerModifier = a(e, t.triggerModifier)
- };
- t.ClickLinkKeyboardEvent = u;
- var d = function () {
- function e(e, t, n, i) {
- this.triggerKey = e, this.triggerModifier = t,
- this.triggerSideBySideKey = n, this.triggerSideBySideModifier = i
- }
- return e.prototype.equals = function (e) {
- return this.triggerKey === e.triggerKey && this.triggerModifier === e.triggerModifier && this.triggerSideBySideKey === e.triggerSideBySideKey && this.triggerSideBySideModifier === e.triggerSideBySideModifier
- }, e
- }();
- function c(e) {
- return "altKey" === e ? s.isMacintosh ? new d(57, "metaKey", 6, "altKey") : new d(5, "ctrlKey", 6, "altKey") : s.isMacintosh ? new d(6, "altKey", 57, "metaKey") : new d(6, "altKey", 5, "ctrlKey")
- }
- t.ClickLinkOptions = d;
- var h = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._onMouseMoveOrRelevantKeyDown = n._register(new o.Emitter), n.onMouseMoveOrRelevantKeyDown = n._onMouseMoveOrRelevantKeyDown.event, n._onExecute = n._register(new o.Emitter), n.onExecute = n._onExecute.event, n._onCancel = n._register(new o.Emitter), n.onCancel = n._onCancel.event, n._editor = t, n._opts = c(n._editor.getOption(59)), n.lastMouseMoveEvent = null, n.hasTriggerKeyOnMouseDown = !1, n._register(n._editor.onDidChangeConfiguration((function (e) {
- if (e.hasChanged(59)) {
- var t = c(n._editor.getOption(59));
- if (n._opts.equals(t)) return;
- n._opts = t, n.lastMouseMoveEvent = null, n.hasTriggerKeyOnMouseDown = !1, n._onCancel.fire()
- }
- }))), n._register(n._editor.onMouseMove((function (e) {
- return n.onEditorMouseMove(new l(e, n._opts))
- }))), n._register(n._editor.onMouseDown((function (e) {
- return n.onEditorMouseDown(new l(e, n._opts))
- }))), n._register(n._editor.onMouseUp((function (e) {
- return n.onEditorMouseUp(new l(e, n._opts))
- }))), n._register(n._editor.onKeyDown((function (e) {
- return n.onEditorKeyDown(new u(e, n._opts))
- }))), n._register(n._editor.onKeyUp((function (e) {
- return n.onEditorKeyUp(new u(e, n._opts))
- }))), n._register(n._editor.onMouseDrag((function () {
- return n.resetHandler()
- }))), n._register(n._editor.onDidChangeCursorSelection((function (e) {
- return n.onDidChangeCursorSelection(e)
- }))), n._register(n._editor.onDidChangeModel((function (e) {
- return n.resetHandler()
- }))), n._register(n._editor.onDidChangeModelContent((function () {
- return n.resetHandler()
- }))), n._register(n._editor.onDidScrollChange((function (e) {
- (e.scrollTopChanged || e.scrollLeftChanged) && n.resetHandler()
- }))), n
- }
- return r(t, e), t.prototype.onDidChangeCursorSelection = function (e) {
- e.selection && e.selection.startColumn !== e.selection.endColumn && this.resetHandler()
- }, t.prototype.onEditorMouseMove = function (e) {
- this.lastMouseMoveEvent = e, this._onMouseMoveOrRelevantKeyDown.fire([e, null])
- }, t.prototype.onEditorMouseDown = function (e) {
- this.hasTriggerKeyOnMouseDown = e.hasTriggerModifier
- }, t.prototype.onEditorMouseUp = function (e) {
- this.hasTriggerKeyOnMouseDown && this._onExecute.fire(e)
- }, t.prototype.onEditorKeyDown = function (e) {
- this.lastMouseMoveEvent && (e.keyCodeIsTriggerKey || e.keyCodeIsSideBySideKey && e.hasTriggerModifier) ? this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]) : e.hasTriggerModifier && this._onCancel.fire()
- }, t.prototype.onEditorKeyUp = function (e) {
- e.keyCodeIsTriggerKey && this._onCancel.fire()
- }, t.prototype.resetHandler = function () {
- this.lastMouseMoveEvent = null, this.hasTriggerKeyOnMouseDown = !1, this._onCancel.fire()
- }, t
- }(i.Disposable);
- t.ClickLinkGesture = h
- })),
- define(n[200], i([0, 1, 15, 10]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t, i, o, r) {
- var s = this;
- this._computer = e, this._state = 0, this._hoverTime = r, this._firstWaitScheduler = new n.RunOnceScheduler((function () {
- return s._triggerAsyncComputation()
- }), 0), this._secondWaitScheduler = new n.RunOnceScheduler((function () {
- return s._triggerSyncComputation()
- }), 0), this._loadingMessageScheduler = new n.RunOnceScheduler((function () {
- return s._showLoadingMessage()
- }), 0), this._asyncComputationPromise = null, this._asyncComputationPromiseDone = !1, this._completeCallback = t, this._errorCallback = i, this._progressCallback = o
- }
- return e.prototype.setHoverTime = function (e) {
- this._hoverTime = e
- }, e.prototype._firstWaitTime = function () {
- return this._hoverTime / 2
- }, e.prototype._secondWaitTime = function () {
- return this._hoverTime / 2
- }, e.prototype._loadingMessageTime = function () {
- return 3 * this._hoverTime
- }, e.prototype._triggerAsyncComputation = function () {
- var e = this;
- this._state = 2,
- this._secondWaitScheduler.schedule(this._secondWaitTime()), this._computer.computeAsync ? (this._asyncComputationPromiseDone = !1, this._asyncComputationPromise = n.createCancelablePromise((function (t) {
- return e._computer.computeAsync(t)
- })), this._asyncComputationPromise.then((function (t) {
- e._asyncComputationPromiseDone = !0, e._withAsyncResult(t)
- }), (function (t) {
- return e._onError(t)
- }))) : this._asyncComputationPromiseDone = !0
- }, e.prototype._triggerSyncComputation = function () {
- this._computer.computeSync && this._computer.onResult(this._computer.computeSync(), !0), this._asyncComputationPromiseDone ? (this._state = 0, this._onComplete(this._computer.getResult())) : (this._state = 3, this._onProgress(this._computer.getResult()))
- }, e.prototype._showLoadingMessage = function () {
- 3 === this._state && this._onProgress(this._computer.getResultWithLoadingMessage())
- }, e.prototype._withAsyncResult = function (e) {
- e && this._computer.onResult(e, !1), 3 === this._state && (this._state = 0, this._onComplete(this._computer.getResult()))
- }, e.prototype._onComplete = function (e) {
- this._completeCallback && this._completeCallback(e)
- }, e.prototype._onError = function (e) {
- this._errorCallback ? this._errorCallback(e) : i.onUnexpectedError(e)
- }, e.prototype._onProgress = function (e) {
- this._progressCallback && this._progressCallback(e)
- }, e.prototype.start = function (e) {
- if (0 === e) 0 === this._state && (this._state = 1, this._firstWaitScheduler.schedule(this._firstWaitTime()), this._loadingMessageScheduler.schedule(this._loadingMessageTime())); else switch (this._state) {
- case 0:
- this._triggerAsyncComputation(), this._secondWaitScheduler.cancel(), this._triggerSyncComputation();
- break;
- case 2:
- this._secondWaitScheduler.cancel(), this._triggerSyncComputation()
- }
- }, e.prototype.cancel = function () {
- this._loadingMessageScheduler.cancel(), 1 === this._state && this._firstWaitScheduler.cancel(), 2 === this._state && (this._secondWaitScheduler.cancel(), this._asyncComputationPromise && (this._asyncComputationPromise.cancel(), this._asyncComputationPromise = null)), 3 === this._state && this._asyncComputationPromise && (this._asyncComputationPromise.cancel(),
- this._asyncComputationPromise = null), this._state = 0
- }, e
- }();
- t.HoverOperation = o
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[201], i([0, 1, 6, 53, 47]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t(t, n) {
- var o = e.call(this) || this;
- return o.allowEditorOverflow = !0, o._id = t, o._editor = n, o._isVisible = !1, o._stoleFocus = !1, o._containerDomNode = document.createElement("div"), o._containerDomNode.className = "monaco-editor-hover hidden", o._containerDomNode.tabIndex = 0, o._domNode = document.createElement("div"), o._domNode.className = "monaco-editor-hover-content", o.scrollbar = new i.DomScrollableElement(o._domNode, {}), o._register(o.scrollbar), o._containerDomNode.appendChild(o.scrollbar.getDomNode()), o.onkeydown(o._containerDomNode, (function (e) {
- e.equals(9) && o.hide()
- })),
- o._register(o._editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(34) && o.updateFont()
- }))), o._editor.onDidLayoutChange((function (e) {
- return o.layout()
- })), o.layout(), o._editor.addContentWidget(o), o._showAtPosition = null, o._showAtRange = null, o._stoleFocus = !1, o
- }
- return r(t, e), Object.defineProperty(t.prototype, "isVisible", {
- get: function () {
- return this._isVisible
- }, set: function (e) {
- this._isVisible = e, n.toggleClass(this._containerDomNode, "hidden", !this._isVisible)
- }, enumerable: !0, configurable: !0
- }), t.prototype.getId = function () {
- return this._id
- }, t.prototype.getDomNode = function () {
- return this._containerDomNode
- }, t.prototype.showAt = function (e, t, n) {
- this._showAtPosition = e, this._showAtRange = t, this.isVisible = !0, this._editor.layoutContentWidget(this), this._editor.render(), this._stoleFocus = n, n && this._containerDomNode.focus()
- }, t.prototype.hide = function () {
- this.isVisible && (this.isVisible = !1, this._editor.layoutContentWidget(this), this._stoleFocus && this._editor.focus())
- }, t.prototype.getPosition = function () {
- return this.isVisible ? {
- position: this._showAtPosition, range: this._showAtRange, preference: [1, 2]
- } : null
- }, t.prototype.dispose = function () {
- this._editor.removeContentWidget(this), e.prototype.dispose.call(this)
- }, t.prototype.updateFont = function () {
- var e = this;
- Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function (t) {
- return e._editor.applyFontInfo(t)
- }))
- }, t.prototype.updateContents = function (e) {
- this._domNode.textContent = "", this._domNode.appendChild(e), this.updateFont(), this._editor.layoutContentWidget(this), this.onContentsChange()
- }, t.prototype.onContentsChange = function () {
- this.scrollbar.scanDomNode()
- }, t.prototype.layout = function () {
- var e = Math.max(this._editor.getLayoutInfo().height / 4, 250), t = this._editor.getOption(34),
- n = t.fontSize, i = t.lineHeight;
- this._domNode.style.fontSize = n + "px", this._domNode.style.lineHeight = i + "px", this._domNode.style.maxHeight = e + "px", this._domNode.style.maxWidth = Math.max(.66 * this._editor.getLayoutInfo().width, 500) + "px"
- }, t
- }(o.Widget);
- t.ContentHoverWidget = s;
- var l = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i._id = t, i._editor = n, i._isVisible = !1, i._domNode = document.createElement("div"), i._domNode.className = "monaco-editor-hover hidden", i._domNode.setAttribute("aria-hidden", "true"), i._domNode.setAttribute("role", "presentation"), i._showAtLineNumber = -1, i._register(i._editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(34) && i.updateFont()
- }))), i._editor.addOverlayWidget(i), i
- }
- return r(t, e), Object.defineProperty(t.prototype, "isVisible", {
- get: function () {
- return this._isVisible
- }, set: function (e) {
- this._isVisible = e, n.toggleClass(this._domNode, "hidden", !this._isVisible)
- }, enumerable: !0, configurable: !0
- }), t.prototype.getId = function () {
- return this._id
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.showAt = function (e) {
- this._showAtLineNumber = e, this.isVisible || (this.isVisible = !0);
- var t = this._editor.getLayoutInfo(), n = this._editor.getTopForLineNumber(this._showAtLineNumber),
- i = this._editor.getScrollTop(), o = this._editor.getOption(49),
- r = n - i - (this._domNode.clientHeight - o) / 2
- ;this._domNode.style.left = t.glyphMarginLeft + t.glyphMarginWidth + "px", this._domNode.style.top = Math.max(Math.round(r), 0) + "px"
- }, t.prototype.hide = function () {
- this.isVisible && (this.isVisible = !1)
- }, t.prototype.getPosition = function () {
- return null
- }, t.prototype.dispose = function () {
- this._editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
- }, t.prototype.updateFont = function () {
- var e = this, t = Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),
- n = Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));
- a(t, n).forEach((function (t) {
- return e._editor.applyFontInfo(t)
- }))
- }, t.prototype.updateContents = function (e) {
- this._domNode.textContent = "", this._domNode.appendChild(e), this.updateFont()
- }, t
- }(o.Widget);
- t.GlyphHoverWidget = l
- })), define(n[384], i([0, 1, 22]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n) {
- this._editRange = e, this._originalSelection = t, this._text = n
- }
- return e.prototype.getEditOperations = function (e, t) {
- t.addTrackedEditOperation(this._editRange, this._text)
- }, e.prototype.computeCursorState = function (e, t) {
- var i = t.getInverseEditOperations()[0].range;
- return this._originalSelection.isEmpty() ? new n.Selection(i.endLineNumber, Math.min(this._originalSelection.positionColumn, i.endColumn), i.endLineNumber, Math.min(this._originalSelection.positionColumn, i.endColumn)) : new n.Selection(i.endLineNumber, i.endColumn - this._text.length, i.endLineNumber, i.endColumn)
- }, e
- }();
- t.InPlaceReplaceCommand = i
- })), define(n[385], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.getSpaceCnt = function (e, t) {
- for (var n = 0, i = 0; i < e.length; i++) "\t" === e.charAt(i) ? n += t : n++;
- return n
- }, t.generateIndent = function (e, t, n) {
- e = e < 0 ? 0 : e;
- var i = "";
- if (!n) {
- var o = Math.floor(e / t);
- e %= t;
- for (var r = 0; r < o; r++) i += "\t"
- }
- for (r = 0; r < e; r++) i += " ";
- return i
- }
- })), define(n[386], i([0, 1, 3, 22]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t) {
- this._selection = e, this._isCopyingDown = t,
- this._selectionDirection = 0, this._selectionId = null, this._startLineNumberDelta = 0, this._endLineNumberDelta = 0
- }
- return e.prototype.getEditOperations = function (e, t) {
- var i = this._selection;
- this._startLineNumberDelta = 0, this._endLineNumberDelta = 0, i.startLineNumber < i.endLineNumber && 1 === i.endColumn && (this._endLineNumberDelta = 1, i = i.setEndPosition(i.endLineNumber - 1, e.getLineMaxColumn(i.endLineNumber - 1)));
- for (var o = [], r = i.startLineNumber; r <= i.endLineNumber; r++) o.push(e.getLineContent(r));
- var s = o.join("\n");
- "" === s && this._isCopyingDown && (this._startLineNumberDelta++, this._endLineNumberDelta++), this._isCopyingDown ? t.addEditOperation(new n.Range(i.startLineNumber, 1, i.startLineNumber, 1), s + "\n") : t.addEditOperation(new n.Range(i.endLineNumber, e.getLineMaxColumn(i.endLineNumber), i.endLineNumber, e.getLineMaxColumn(i.endLineNumber)), "\n" + s), this._selectionId = t.trackSelection(i), this._selectionDirection = this._selection.getDirection()
- }, e.prototype.computeCursorState = function (e, t) {
- var n = t.getTrackedSelection(this._selectionId)
- ;
- if (0 !== this._startLineNumberDelta || 0 !== this._endLineNumberDelta) {
- var o = n.startLineNumber, r = n.startColumn, s = n.endLineNumber, a = n.endColumn;
- 0 !== this._startLineNumberDelta && (o += this._startLineNumberDelta, r = 1), 0 !== this._endLineNumberDelta && (s += this._endLineNumberDelta, a = 1), n = i.Selection.createWithDirection(o, r, s, a, this._selectionDirection)
- }
- return n
- }, e
- }();
- t.CopyLinesCommand = o
- })), define(n[387], i([0, 1, 58, 3]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e, t) {
- this.selection = e, this.descending = t, this.selectionId = null
- }
- return e.getCollator = function () {
- return e._COLLATOR || (e._COLLATOR = new Intl.Collator), e._COLLATOR
- }, e.prototype.getEditOperations = function (e, t) {
- var o = function (e, t, o) {
- var s = r(e, t, o);
- if (!s) return null;
- return n.EditOperation.replace(new i.Range(s.startLineNumber, 1, s.endLineNumber, e.getLineMaxColumn(s.endLineNumber)), s.after.join("\n"))
- }(e, this.selection, this.descending);
- o && t.addEditOperation(o.range, o.text),
- this.selectionId = t.trackSelection(this.selection)
- }, e.prototype.computeCursorState = function (e, t) {
- return t.getTrackedSelection(this.selectionId)
- }, e.canRun = function (e, t, n) {
- if (null === e) return !1;
- var i = r(e, t, n);
- if (!i) return !1;
- for (var o = 0, s = i.before.length; o < s; o++) if (i.before[o] !== i.after[o]) return !0;
- return !1
- }, e._COLLATOR = null, e
- }();
- function r(e, t, n) {
- var i = t.startLineNumber, r = t.endLineNumber;
- if (1 === t.endColumn && r--, i >= r) return null;
- for (var s = [], a = i; a <= r; a++) s.push(e.getLineContent(a));
- var l = s.slice(0);
- return l.sort(o.getCollator().compare), !0 === n && (l = l.reverse()), {
- startLineNumber: i,
- endLineNumber: r,
- before: s,
- after: l
- }
- }
- t.SortLinesCommand = o
- })), define(n[202], i([0, 1, 13, 3, 76]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e() {
- }
- return e.prototype.provideSelectionRanges = function (t, n) {
- return d(this, void 0, void 0, (function () {
- var i, o, r, s, a;
- return c(this, (function (l) {
- switch (l.label) {
- case 0:
- i = [], o = function (n) {
- var o, r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- return o = [], i.push(o), r = new Map, [4, new Promise((function (i) {
- return e._bracketsRightYield(i, 0, t, n, r)
- }))];
- case 1:
- return s.sent(), [4, new Promise((function (i) {
- return e._bracketsLeftYield(i, 0, t, n, r, o)
- }))];
- case 2:
- return s.sent(), [2]
- }
- }))
- }, r = 0, s = n, l.label = 1;
- case 1:
- return r < s.length ? (a = s[r], [5, o(a)]) : [3, 4];
- case 2:
- l.sent(), l.label = 3;
- case 3:
- return r++, [3, 1];
- case 4:
- return [2, i]
- }
- }))
- }))
- }, e._bracketsRightYield = function (t, n, i, r, s) {
- for (var a = new Map, l = Date.now(); ;) {
- if (n >= e._maxRounds) {
- t();
- break
- }
- if (!r) {
- t();
- break
- }
- var u = i.findNextBracket(r);
- if (!u) {
- t();
- break
- }
- if (Date.now() - l > e._maxDuration) {
- setTimeout((function () {
- return e._bracketsRightYield(t, n + 1, i, r, s)
- }));
- break
- }
- var d = u.close[0];
- if (u.isOpen) {
- var c = a.has(d) ? a.get(d) : 0;
- a.set(d, c + 1)
- } else {
- c = a.has(d) ? a.get(d) : 0;
- if (c -= 1, a.set(d, Math.max(0, c)), c < 0) {
- var h = s.get(d);
- h || (h = new o.LinkedList, s.set(d, h)), h.push(u.range)
- }
- }
- r = u.range.getEndPosition()
- }
- }, e._bracketsLeftYield = function (t, n, o, r, s, a) {
- for (var l = new Map, u = Date.now(); ;) {
- if (n >= e._maxRounds && 0 === s.size) {
- t();
- break
- }
- if (!r) {
- t();
- break
- }
- var d = o.findPrevBracket(r);
- if (!d) {
- t();
- break
- }
- if (Date.now() - u > e._maxDuration) {
- setTimeout((function () {
- return e._bracketsLeftYield(t, n + 1, o, r, s, a)
- }));
- break
- }
- var c = d.close[0];
- if (d.isOpen) {
- m = l.has(c) ? l.get(c) : 0;
- if (m -= 1, l.set(c, Math.max(0, m)), m < 0) {
- var h = s.get(c);
- if (h) {
- var p = h.shift();
- 0 === h.size && s.delete(c);
- var g = i.Range.fromPositions(d.range.getEndPosition(), p.getStartPosition()),
- f = i.Range.fromPositions(d.range.getStartPosition(), p.getEndPosition());
- a.push({range: g}), a.push({range: f}), e._addBracketLeading(o, f, a)
- }
- }
- } else {
- var m = l.has(c) ? l.get(c) : 0;
- l.set(c, m + 1)
- }
- r = d.range.getStartPosition()
- }
- }, e._addBracketLeading = function (e, t, o) {
- if (t.startLineNumber !== t.endLineNumber) {
- var r = t.startLineNumber, s = e.getLineFirstNonWhitespaceColumn(r);
- 0 !== s && s !== t.startColumn && (o.push({range: i.Range.fromPositions(new n.Position(r, s), t.getEndPosition())}), o.push({range: i.Range.fromPositions(new n.Position(r, 1), t.getEndPosition())}));
- var a = r - 1;
- if (a > 0) {
- var l = e.getLineFirstNonWhitespaceColumn(a)
- ;l === t.startColumn && l !== e.getLineLastNonWhitespaceColumn(a) && (o.push({range: i.Range.fromPositions(new n.Position(a, l), t.getEndPosition())}), o.push({range: i.Range.fromPositions(new n.Position(a, 1), t.getEndPosition())}))
- }
- }
- }, e._maxDuration = 30, e._maxRounds = 2, e
- }();
- t.BracketSelectionRangeProvider = r
- })), define(n[388], i([0, 1, 3, 5]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e() {
- }
- return e.prototype.provideSelectionRanges = function (e, t) {
- for (var n = [], i = 0, o = t; i < o.length; i++) {
- var r = o[i], s = [];
- n.push(s), this._addInWordRanges(s, e, r), this._addWordRanges(s, e, r), this._addWhitespaceLine(s, e, r), s.push({range: e.getFullModelRange()})
- }
- return n
- }, e.prototype._addInWordRanges = function (e, t, o) {
- var r = t.getWordAtPosition(o);
- if (r) {
- for (var s = r.word, a = r.startColumn, l = o.column - a, u = l, d = l, c = 0; u >= 0; u--) {
- if (95 === (h = s.charCodeAt(u)) || 45 === h) break;
- if (i.isLowerAsciiLetter(h) && i.isUpperAsciiLetter(c)) break;
- c = h
- }
- for (u += 1; d < s.length; d++) {
- var h = s.charCodeAt(d)
- ;
- if (i.isUpperAsciiLetter(h) && i.isLowerAsciiLetter(c)) break;
- if (95 === h || 45 === h) break;
- c = h
- }
- u < d && e.push({range: new n.Range(o.lineNumber, a + u, o.lineNumber, a + d)})
- }
- }, e.prototype._addWordRanges = function (e, t, i) {
- var o = t.getWordAtPosition(i);
- o && e.push({range: new n.Range(i.lineNumber, o.startColumn, i.lineNumber, o.endColumn)})
- }, e.prototype._addWhitespaceLine = function (e, t, i) {
- t.getLineLength(i.lineNumber) > 0 && 0 === t.getLineFirstNonWhitespaceColumn(i.lineNumber) && 0 === t.getLineLastNonWhitespaceColumn(i.lineNumber) && e.push({range: new n.Range(i.lineNumber, 1, i.lineNumber, t.getLineMaxColumn(i.lineNumber))})
- }, e
- }();
- t.WordSelectionRangeProvider = o
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[151], i([0, 1]), (function (e, t) {
- "use strict";
- var n;
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e() {
- this.value = "", this.pos = 0
- }
- return e.isDigitCharacter = function (e) {
- return e >= 48 && e <= 57
- }, e.isVariableCharacter = function (e) {
- return 95 === e || e >= 97 && e <= 122 || e >= 65 && e <= 90
- }, e.prototype.text = function (e) {
- this.value = e, this.pos = 0
- }, e.prototype.tokenText = function (e) {
- return this.value.substr(e.pos, e.len)
- }, e.prototype.next = function () {
- if (this.pos >= this.value.length) return {type: 14, pos: this.pos, len: 0};
- var t, n = this.pos, i = 0, o = this.value.charCodeAt(n);
- if ("number" == typeof (t = e._table[o])) return this.pos += 1, {type: t, pos: n, len: 1};
- if (e.isDigitCharacter(o)) {
- t = 8;
- do {
- i += 1, o = this.value.charCodeAt(n + i)
- } while (e.isDigitCharacter(o));
- return this.pos += i, {type: t, pos: n, len: i}
- }
- if (e.isVariableCharacter(o)) {
- t = 9;
- do {
- o = this.value.charCodeAt(n + ++i)
- } while (e.isVariableCharacter(o) || e.isDigitCharacter(o));
- return this.pos += i, {type: t, pos: n, len: i}
- }
- t = 10;
- do {
- i += 1, o = this.value.charCodeAt(n + i)
- } while (!isNaN(o) && void 0 === e._table[o] && !e.isDigitCharacter(o) && !e.isVariableCharacter(o));
- return this.pos += i, {type: t, pos: n, len: i}
- }, e._table = ((n = {})[36] = 0, n[58] = 1, n[44] = 2, n[123] = 3, n[125] = 4, n[92] = 5,
- n[47] = 6, n[124] = 7, n[43] = 11, n[45] = 12, n[63] = 13, n), e
- }();
- t.Scanner = i;
- var o = function () {
- function e() {
- this._children = []
- }
- return e.prototype.appendChild = function (e) {
- return e instanceof s && this._children[this._children.length - 1] instanceof s ? this._children[this._children.length - 1].value += e.value : (e.parent = this, this._children.push(e)), this
- }, e.prototype.replace = function (e, t) {
- var n = e.parent, i = n.children.indexOf(e), o = n.children.slice(0);
- o.splice.apply(o, a([i, 1], t)), n._children = o, function e(t, n) {
- for (var i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- r.parent = n, e(r.children, r)
- }
- }(t, n)
- }, Object.defineProperty(e.prototype, "children", {
- get: function () {
- return this._children
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "snippet", {
- get: function () {
- for (var e = this; ;) {
- if (!e) return;
- if (e instanceof f) return e;
- e = e.parent
- }
- }, enumerable: !0, configurable: !0
- }), e.prototype.toString = function () {
- return this.children.reduce((function (e, t) {
- return e + t.toString()
- }), "")
- }, e.prototype.len = function () {
- return 0
- }, e
- }();
- t.Marker = o;
- var s = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.value = t, n
- }
- return r(t, e), t.prototype.toString = function () {
- return this.value
- }, t.prototype.len = function () {
- return this.value.length
- }, t.prototype.clone = function () {
- return new t(this.value)
- }, t
- }(o);
- t.Text = s;
- var l = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t
- }(o);
- t.TransformableMarker = l;
- var u = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.index = t, n
- }
- return r(t, e), t.compareByIndex = function (e, t) {
- return e.index === t.index ? 0 : e.isFinalTabstop ? 1 : t.isFinalTabstop ? -1 : e.index < t.index ? -1 : e.index > t.index ? 1 : 0
- }, Object.defineProperty(t.prototype, "isFinalTabstop", {
- get: function () {
- return 0 === this.index
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "choice", {
- get: function () {
- return 1 === this._children.length && this._children[0] instanceof d ? this._children[0] : void 0
- }, enumerable: !0, configurable: !0
- }), t.prototype.clone = function () {
- var e = new t(this.index);
- return this.transform && (e.transform = this.transform.clone()),
- e._children = this.children.map((function (e) {
- return e.clone()
- })), e
- }, t
- }(l);
- t.Placeholder = u;
- var d = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t.options = [], t
- }
- return r(t, e), t.prototype.appendChild = function (e) {
- return e instanceof s && (e.parent = this, this.options.push(e)), this
- }, t.prototype.toString = function () {
- return this.options[0].value
- }, t.prototype.len = function () {
- return this.options[0].len()
- }, t.prototype.clone = function () {
- var e = new t;
- return this.options.forEach(e.appendChild, e), e
- }, t
- }(o);
- t.Choice = d;
- var c = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t.regexp = new RegExp(""), t
- }
- return r(t, e), t.prototype.resolve = function (e) {
- var t = this, n = !1, i = e.replace(this.regexp, (function () {
- return n = !0, t._replace(Array.prototype.slice.call(arguments, 0, -2))
- }));
- return !n && this._children.some((function (e) {
- return e instanceof h && Boolean(e.elseValue)
- })) && (i = this._replace([])), i
- }, t.prototype._replace = function (e) {
- for (var t = "", n = 0, i = this._children; n < i.length; n++) {
- var o = i[n]
- ;
- if (o instanceof h) {
- var r = e[o.index] || "";
- t += r = o.resolve(r)
- } else t += o.toString()
- }
- return t
- }, t.prototype.toString = function () {
- return ""
- }, t.prototype.clone = function () {
- var e = new t;
- return e.regexp = new RegExp(this.regexp.source, (this.regexp.ignoreCase ? "i" : "") + (this.regexp.global ? "g" : "")), e._children = this.children.map((function (e) {
- return e.clone()
- })), e
- }, t
- }(o);
- t.Transform = c;
- var h = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this) || this;
- return r.index = t, r.shorthandName = n, r.ifValue = i, r.elseValue = o, r
- }
- return r(t, e), t.prototype.resolve = function (e) {
- return "upcase" === this.shorthandName ? e ? e.toLocaleUpperCase() : "" : "downcase" === this.shorthandName ? e ? e.toLocaleLowerCase() : "" : "capitalize" === this.shorthandName ? e ? e[0].toLocaleUpperCase() + e.substr(1) : "" : "pascalcase" === this.shorthandName ? e ? this._toPascalCase(e) : "" : Boolean(e) && "string" == typeof this.ifValue ? this.ifValue : Boolean(e) || "string" != typeof this.elseValue ? e || "" : this.elseValue
- }, t.prototype._toPascalCase = function (e) {
- var t = e.match(/[a-z]+/gi);
- return t ? t.map((function (e) {
- return e.charAt(0).toUpperCase() + e.substr(1).toLowerCase()
- })).join("") : e
- }, t.prototype.clone = function () {
- return new t(this.index, this.shorthandName, this.ifValue, this.elseValue)
- }, t
- }(o);
- t.FormatString = h;
- var p = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.name = t, n
- }
- return r(t, e), t.prototype.resolve = function (e) {
- var t = e.resolve(this);
- return this.transform && (t = this.transform.resolve(t || "")), void 0 !== t && (this._children = [new s(t)], !0)
- }, t.prototype.clone = function () {
- var e = new t(this.name);
- return this.transform && (e.transform = this.transform.clone()), e._children = this.children.map((function (e) {
- return e.clone()
- })), e
- }, t
- }(l);
- function g(e, t) {
- for (var n = a(e); n.length > 0;) {
- var i = n.shift();
- if (!t(i)) break;
- n.unshift.apply(n, i.children)
- }
- }
- t.Variable = p;
- var f = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), Object.defineProperty(t.prototype, "placeholderInfo", {
- get: function () {
- if (!this._placeholders) {
- var e, t = [];
- this.walk((function (n) {
- return n instanceof u && (t.push(n),
- e = !e || e.index < n.index ? n : e), !0
- })), this._placeholders = {all: t, last: e}
- }
- return this._placeholders
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "placeholders", {
- get: function () {
- return this.placeholderInfo.all
- }, enumerable: !0, configurable: !0
- }), t.prototype.offset = function (e) {
- var t = 0, n = !1;
- return this.walk((function (i) {
- return i === e ? (n = !0, !1) : (t += i.len(), !0)
- })), n ? t : -1
- }, t.prototype.fullLen = function (e) {
- var t = 0;
- return g([e], (function (e) {
- return t += e.len(), !0
- })), t
- }, t.prototype.enclosingPlaceholders = function (e) {
- for (var t = [], n = e.parent; n;) n instanceof u && t.push(n), n = n.parent;
- return t
- }, t.prototype.resolveVariables = function (e) {
- var t = this;
- return this.walk((function (n) {
- return n instanceof p && n.resolve(e) && (t._placeholders = void 0), !0
- })), this
- }, t.prototype.appendChild = function (t) {
- return this._placeholders = void 0, e.prototype.appendChild.call(this, t)
- }, t.prototype.replace = function (t, n) {
- return this._placeholders = void 0, e.prototype.replace.call(this, t, n)
- }, t.prototype.clone = function () {
- var e = new t
- ;
- return this._children = this.children.map((function (e) {
- return e.clone()
- })), e
- }, t.prototype.walk = function (e) {
- g(this.children, e)
- }, t
- }(o);
- t.TextmateSnippet = f;
- var m = function () {
- function e() {
- this._scanner = new i, this._token = {type: 14, pos: 0, len: 0}
- }
- return e.escape = function (e) {
- return e.replace(/\$|}|\\/g, "\\$&")
- }, e.prototype.parse = function (e, t, n) {
- this._scanner.text(e), this._token = this._scanner.next();
- for (var i = new f; this._parse(i);) ;
- var o = new Map, r = [], s = 0;
- i.walk((function (e) {
- return e instanceof u && (s += 1, e.isFinalTabstop ? o.set(0, void 0) : !o.has(e.index) && e.children.length > 0 ? o.set(e.index, e.children) : r.push(e)), !0
- }));
- for (var a = 0, l = r; a < l.length; a++) {
- var d = l[a], c = o.get(d.index);
- if (c) {
- var h = new u(d.index);
- h.transform = d.transform;
- for (var p = 0, g = c; p < g.length; p++) {
- var m = g[p];
- h.appendChild(m.clone())
- }
- i.replace(d, [h])
- }
- }
- return n || (n = s > 0 && t), !o.has(0) && n && i.appendChild(new u(0)), i
- }, e.prototype._accept = function (e, t) {
- if (void 0 === e || this._token.type === e) {
- var n = !t || this._scanner.tokenText(this._token)
- ;
- return this._token = this._scanner.next(), n
- }
- return !1
- }, e.prototype._backTo = function (e) {
- return this._scanner.pos = e.pos + e.len, this._token = e, !1
- }, e.prototype._until = function (e) {
- for (var t = this._token; this._token.type !== e;) {
- if (14 === this._token.type) return !1;
- if (5 === this._token.type) {
- var n = this._scanner.next();
- if (0 !== n.type && 4 !== n.type && 5 !== n.type) return !1
- }
- this._token = this._scanner.next()
- }
- var i = this._scanner.value.substring(t.pos, this._token.pos).replace(/\\(\$|}|\\)/g, "$1");
- return this._token = this._scanner.next(), i
- }, e.prototype._parse = function (e) {
- return this._parseEscaped(e) || this._parseTabstopOrVariableName(e) || this._parseComplexPlaceholder(e) || this._parseComplexVariable(e) || this._parseAnything(e)
- }, e.prototype._parseEscaped = function (e) {
- var t;
- return !!(t = this._accept(5, !0)) && (t = this._accept(0, !0) || this._accept(4, !0) || this._accept(5, !0) || t, e.appendChild(new s(t)), !0)
- }, e.prototype._parseTabstopOrVariableName = function (e) {
- var t, n = this._token
- ;
- return this._accept(0) && (t = this._accept(9, !0) || this._accept(8, !0)) ? (e.appendChild(/^\d+$/.test(t) ? new u(Number(t)) : new p(t)), !0) : this._backTo(n)
- }, e.prototype._parseComplexPlaceholder = function (e) {
- var t, n = this._token;
- if (!(this._accept(0) && this._accept(3) && (t = this._accept(8, !0)))) return this._backTo(n);
- var i = new u(Number(t));
- if (this._accept(1)) for (; ;) {
- if (this._accept(4)) return e.appendChild(i), !0;
- if (!this._parse(i)) return e.appendChild(new s("${" + t + ":")), i.children.forEach(e.appendChild, e), !0
- } else {
- if (!(i.index > 0 && this._accept(7))) return this._accept(6) ? this._parseTransform(i) ? (e.appendChild(i), !0) : (this._backTo(n), !1) : this._accept(4) ? (e.appendChild(i), !0) : this._backTo(n);
- for (var o = new d; ;) {
- if (this._parseChoiceElement(o)) {
- if (this._accept(2)) continue;
- if (this._accept(7) && (i.appendChild(o), this._accept(4))) return e.appendChild(i), !0
- }
- return this._backTo(n), !1
- }
- }
- }, e.prototype._parseChoiceElement = function (e) {
- for (var t = this._token, n = []; 2 !== this._token.type && 7 !== this._token.type;) {
- var i = void 0
- ;
- if (!(i = (i = this._accept(5, !0)) ? this._accept(2, !0) || this._accept(7, !0) || this._accept(5, !0) || i : this._accept(void 0, !0))) return this._backTo(t), !1;
- n.push(i)
- }
- return 0 === n.length ? (this._backTo(t), !1) : (e.appendChild(new s(n.join(""))), !0)
- }, e.prototype._parseComplexVariable = function (e) {
- var t, n = this._token;
- if (!(this._accept(0) && this._accept(3) && (t = this._accept(9, !0)))) return this._backTo(n);
- var i = new p(t);
- if (!this._accept(1)) return this._accept(6) ? this._parseTransform(i) ? (e.appendChild(i), !0) : (this._backTo(n), !1) : this._accept(4) ? (e.appendChild(i), !0) : this._backTo(n);
- for (; ;) {
- if (this._accept(4)) return e.appendChild(i), !0;
- if (!this._parse(i)) return e.appendChild(new s("${" + t + ":")), i.children.forEach(e.appendChild, e), !0
- }
- }, e.prototype._parseTransform = function (e) {
- for (var t = new c, n = "", i = ""; !this._accept(6);) {
- var o = void 0;
- if (o = this._accept(5, !0)) n += o = this._accept(6, !0) || o; else {
- if (14 === this._token.type) return !1;
- n += this._accept(void 0, !0)
- }
- }
- for (; !this._accept(6);) {
- o = void 0
- ;
- if (o = this._accept(5, !0)) o = this._accept(5, !0) || this._accept(6, !0) || o, t.appendChild(new s(o)); else if (!this._parseFormatString(t) && !this._parseAnything(t)) return !1
- }
- for (; !this._accept(4);) {
- if (14 === this._token.type) return !1;
- i += this._accept(void 0, !0)
- }
- try {
- t.regexp = new RegExp(n, i)
- } catch (e) {
- return !1
- }
- return e.transform = t, !0
- }, e.prototype._parseFormatString = function (e) {
- var t = this._token;
- if (!this._accept(0)) return !1;
- var n = !1;
- this._accept(3) && (n = !0);
- var i = this._accept(8, !0);
- if (!i) return this._backTo(t), !1;
- if (!n) return e.appendChild(new h(Number(i))), !0;
- if (this._accept(4)) return e.appendChild(new h(Number(i))), !0;
- if (!this._accept(1)) return this._backTo(t), !1;
- if (this._accept(6)) {
- var o = this._accept(9, !0);
- return o && this._accept(4) ? (e.appendChild(new h(Number(i), o)), !0) : (this._backTo(t), !1)
- }
- if (this._accept(11)) {
- if (r = this._until(4)) return e.appendChild(new h(Number(i), void 0, r, void 0)), !0
- } else if (this._accept(12)) {
- if (s = this._until(4)) return e.appendChild(new h(Number(i), void 0, void 0, s)), !0
- } else if (this._accept(13)) {
- var r
- ;
- if (r = this._until(1)) if (s = this._until(4)) return e.appendChild(new h(Number(i), void 0, r, s)), !0
- } else {
- var s;
- if (s = this._until(4)) return e.appendChild(new h(Number(i), void 0, void 0, s)), !0
- }
- return this._backTo(t), !1
- }, e.prototype._parseAnything = function (e) {
- return 14 !== this._token.type && (e.appendChild(new s(this._scanner.tokenText(this._token))), this._accept(void 0), !0)
- }, e
- }();
- t.SnippetParser = m
- })), define(n[389], i([0, 1, 61, 5]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e, t) {
- this.leadingLineContent = e, this.characterCountDelta = t
- };
- t.LineContext = o;
- var r = function () {
- function e(t, n, i, o, r, s) {
- this._snippetCompareFn = e._compareCompletionItems, this._items = t, this._column = n, this._wordDistance = o, this._options = r, this._refilterKind = 1, this._lineContext = i, "top" === s ? this._snippetCompareFn = e._compareCompletionItemsSnippetsUp : "bottom" === s && (this._snippetCompareFn = e._compareCompletionItemsSnippetsDown)
- }
- return Object.defineProperty(e.prototype, "lineContext", {
- get: function () {
- return this._lineContext
- }, set: function (e) {
- this._lineContext.leadingLineContent === e.leadingLineContent && this._lineContext.characterCountDelta === e.characterCountDelta || (this._refilterKind = this._lineContext.characterCountDelta < e.characterCountDelta && this._filteredItems ? 2 : 1, this._lineContext = e)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "items", {
- get: function () {
- return this._ensureCachedState(), this._filteredItems
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "incomplete", {
- get: function () {
- return this._ensureCachedState(), this._isIncomplete
- }, enumerable: !0, configurable: !0
- }), e.prototype.adopt = function (e) {
- for (var t = new Array, n = 0; n < this._items.length;) e.has(this._items[n].provider) ? n++ : (t.push(this._items[n]), this._items[n] = this._items[this._items.length - 1], this._items.pop());
- return this._refilterKind = 1, t
- }, Object.defineProperty(e.prototype, "stats", {
- get: function () {
- return this._ensureCachedState(), this._stats
- }, enumerable: !0, configurable: !0
- }),
- e.prototype._ensureCachedState = function () {
- 0 !== this._refilterKind && this._createCachedState()
- }, e.prototype._createCachedState = function () {
- this._isIncomplete = new Set, this._stats = {suggestionCount: 0, snippetCount: 0, textCount: 0};
- for (var e = this._lineContext, t = e.leadingLineContent, o = e.characterCountDelta, r = "", s = "", a = 1 === this._refilterKind ? this._items : this._filteredItems, l = [], u = !this._options.filterGraceful || a.length > 2e3 ? n.fuzzyScore : n.fuzzyScoreGracefulAggressive, d = 0; d < a.length; d++) {
- var c = a[d];
- c.container.incomplete && this._isIncomplete.add(c.provider);
- var h = c.position.column - c.editStart.column, p = h + o - (c.position.column - this._column);
- if (r.length !== p && (s = (r = 0 === p ? "" : t.slice(-p)).toLowerCase()), c.word = r, 0 === p) c.score = n.FuzzyScore.Default; else {
- for (var g = 0; g < h;) {
- var f = r.charCodeAt(g);
- if (32 !== f && 9 !== f) break;
- g += 1
- }
- var m = "string" == typeof c.completion.label ? c.completion.label : c.completion.label.name;
- if (g >= p) c.score = n.FuzzyScore.Default; else if ("string" == typeof c.completion.filterText) {
- if (!(v = u(r, s, g, c.completion.filterText, c.filterTextLow, 0, !1))) continue;
- 0 === i.compareIgnoreCase(c.completion.filterText, m) ? c.score = v : (c.score = n.anyScore(r, s, g, m, c.labelLow, 0), c.score[0] = v[0])
- } else {
- var v;
- if (!(v = u(r, s, g, m, c.labelLow, 0, !1))) continue;
- c.score = v
- }
- }
- switch (c.idx = d, c.distance = this._wordDistance.distance(c.position, c.completion), l.push(c), this._stats.suggestionCount++, c.completion.kind) {
- case 25:
- this._stats.snippetCount++;
- break;
- case 18:
- this._stats.textCount++
- }
- }
- this._filteredItems = l.sort(this._snippetCompareFn), this._refilterKind = 0
- }, e._compareCompletionItems = function (e, t) {
- return e.score[0] > t.score[0] ? -1 : e.score[0] < t.score[0] ? 1 : e.distance < t.distance ? -1 : e.distance > t.distance ? 1 : e.idx < t.idx ? -1 : e.idx > t.idx ? 1 : 0
- }, e._compareCompletionItemsSnippetsDown = function (t, n) {
- if (t.completion.kind !== n.completion.kind) {
- if (25 === t.completion.kind) return 1;
- if (25 === n.completion.kind) return -1
- }
- return e._compareCompletionItems(t, n)
- }, e._compareCompletionItemsSnippetsUp = function (t, n) {
- if (t.completion.kind !== n.completion.kind) {
- if (25 === t.completion.kind) return -1;
- if (25 === n.completion.kind) return 1
- }
- return e._compareCompletionItems(t, n)
- }, e
- }();
- t.CompletionModel = r
- })), define(n[390], i([0, 1, 19, 2, 79]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e, t, n) {
- var o = this;
- this._disposables = new i.DisposableStore, this._disposables.add(t.onDidShow((function () {
- return o._onItem(t.getFocusedItem())
- }))), this._disposables.add(t.onDidFocus(this._onItem, this)), this._disposables.add(t.onDidHide(this.reset, this)), this._disposables.add(e.onWillType((function (i) {
- if (o._active && !t.isFrozen()) {
- var r = i.charCodeAt(i.length - 1);
- o._active.acceptCharacters.has(r) && e.getOption(0) && n(o._active.item)
- }
- })))
- }
- return e.prototype._onItem = function (e) {
- if (e && n.isNonEmptyArray(e.item.completion.commitCharacters)) {
- if (!this._active || this._active.item.item !== e.item) {
- for (var t = new o.CharacterSet, i = 0, r = e.item.completion.commitCharacters; i < r.length; i++) {
- var s = r[i];
- s.length > 0 && t.add(s.charCodeAt(0))
- }
- this._active = {
- acceptCharacters: t, item: e
- }
- }
- } else this.reset()
- }, e.prototype.reset = function () {
- this._active = void 0
- }, e.prototype.dispose = function () {
- this._disposables.dispose()
- }, e
- }();
- t.CommitCharacterController = r
- })), define(n[391], i([0, 1, 2, 3, 4, 52]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e) {
- var t = this;
- this._controller = e, this._disposables = new n.DisposableStore, this._decorations = [], this._disposables.add(e.model.onDidSuggest((function (e) {
- if (!e.shy) {
- var n = t._controller.widget.getValue(), i = n.getFocusedItem();
- i && t._highlight(i.item), t._widgetListener || (t._widgetListener = n.onDidFocus((function (e) {
- return t._highlight(e.item)
- })))
- }
- }))), this._disposables.add(e.model.onDidCancel((function () {
- t._reset()
- })))
- }
- return e.prototype.dispose = function () {
- this._reset(), this._disposables.dispose(), n.dispose(this._widgetListener), n.dispose(this._shiftKeyListener)
- }, e.prototype._reset = function () {
- this._decorations = this._controller.editor.deltaDecorations(this._decorations, []),
- this._shiftKeyListener && (this._shiftKeyListener.dispose(), this._shiftKeyListener = void 0)
- }, e.prototype._highlight = function (e) {
- var t, n = this;
- this._currentItem = e;
- var o = this._controller.editor.getOption(89), r = [];
- if (o.insertHighlight) {
- this._shiftKeyListener || (this._shiftKeyListener = l.event((function () {
- return n._highlight(n._currentItem)
- })));
- var s = this._controller.getOverwriteInfo(e, l.isPressed),
- a = this._controller.editor.getPosition();
- if ("insert" === o.insertMode && s.overwriteAfter > 0) r = [{
- range: new i.Range(a.lineNumber, a.column, a.lineNumber, a.column + s.overwriteAfter),
- options: {inlineClassName: "suggest-insert-unexpected"}
- }]; else if ("replace" === o.insertMode && 0 === s.overwriteAfter) {
- var u = null === (t = this._controller.editor.getModel()) || void 0 === t ? void 0 : t.getWordAtPosition(a);
- u && u.endColumn > a.column && (r = [{
- range: new i.Range(a.lineNumber, a.column, a.lineNumber, u.endColumn),
- options: {inlineClassName: "suggest-insert-unexpected"}
- }])
- }
- }
- this._decorations = this._controller.editor.deltaDecorations(this._decorations, r)
- }, e
- }()
- ;t.SuggestRangeHighlighter = a;
- var l = new (function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._subscriptions = new n.DisposableStore, t._isPressed = !1, t._subscriptions.add(s.domEvent(document.body, "keydown")((function (e) {
- return t.isPressed = e.shiftKey
- }))), t._subscriptions.add(s.domEvent(document.body, "keyup")((function () {
- return t.isPressed = !1
- }))), t._subscriptions.add(s.domEvent(document.body, "mouseleave")((function () {
- return t.isPressed = !1
- }))), t._subscriptions.add(s.domEvent(document.body, "blur")((function () {
- return t.isPressed = !1
- }))), t
- }
- return r(t, e), Object.defineProperty(t.prototype, "isPressed", {
- get: function () {
- return this._isPressed
- }, set: function (e) {
- this._isPressed !== e && (this._isPressed = e, this.fire(e))
- }, enumerable: !0, configurable: !0
- }), t.prototype.dispose = function () {
- this._subscriptions.dispose(), e.prototype.dispose.call(this)
- }, t
- }(o.Emitter))
- })), define(n[392], i([0, 1, 19, 3, 202]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e() {
- }
- return e.create = function (t, s) {
- return d(this, void 0, void 0, (function () {
- var a, l, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- return s.getOption(89).localityBonus && s.hasModel() ? (a = s.getModel(), l = s.getPosition(), t.canComputeWordRanges(a.uri) ? [4, (new o.BracketSelectionRangeProvider).provideSelectionRanges(a, [l])] : [2, e.None]) : [2, e.None];
- case 1:
- return (u = c.sent()) && 0 !== u.length && 0 !== u[0].length ? [4, t.computeWordRanges(a.uri, u[0][0].range)] : [2, e.None];
- case 2:
- return d = c.sent(), [2, new (function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.distance = function (e, t) {
- if (!d || !l.equals(s.getPosition())) return 0;
- if (17 === t.kind) return 2 << 20;
- var o = "string" == typeof t.label ? t.label : t.label.name, r = d[o];
- if (n.isFalsyOrEmpty(r)) return 2 << 20;
- for (var a = n.binarySearch(r, i.Range.fromPositions(e), i.Range.compareRangesUsingStarts), c = a >= 0 ? r[a] : r[Math.max(0, ~a - 1)], h = u.length, p = 0, g = u[0]; p < g.length; p++) {
- var f = g[p];
- if (!i.Range.containsRange(f.range, c)) break;
- h -= 1
- }
- return h
- }, t
- }(e))]
- }
- }))
- }))
- },
- e.None = new (function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.distance = function () {
- return 0
- }, t
- }(e)), e
- }();
- t.WordDistance = s
- })), define(n[203], i([0, 1]), (function (e, t) {
- "use strict";
- function n(e) {
- return Array.isArray(e)
- }
- function i(e) {
- return "string" == typeof e
- }
- function o(e) {
- return !e
- }
- function r(e, t) {
- return e.ignoreCase && t ? t.toLowerCase() : t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.isFuzzyActionArr = n, t.isFuzzyAction = function (e) {
- return !n(e)
- }, t.isString = i, t.isIAction = function (e) {
- return !i(e)
- }, t.empty = o, t.fixCase = r, t.sanitize = function (e) {
- return e.replace(/[&<>'"_]/g, "-")
- }, t.log = function (e, t) {
- console.log(e.languageId + ": " + t)
- }, t.createError = function (e, t) {
- return new Error(e.languageId + ": " + t)
- }, t.substituteMatches = function (e, t, n, i, s) {
- var a = null;
- return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g, (function (t, l, u, d, c, h, p, g, f) {
- return o(u) ? o(d) ? !o(c) && c < i.length ? r(e, i[c]) : !o(p) && e && "string" == typeof e[p] ? e[p] : (null === a && (a = s.split(".")).unshift(s),
- !o(h) && h < a.length ? r(e, a[h]) : "") : r(e, n) : "$"
- }))
- }, t.findRules = function (e, t) {
- for (var n = t; n && n.length > 0;) {
- var i = e.tokenizer[n];
- if (i) return i;
- var o = n.lastIndexOf(".");
- n = o < 0 ? null : n.substr(0, o)
- }
- return null
- }, t.stateExists = function (e, t) {
- for (var n = t; n && n.length > 0;) {
- if (e.stateNames[n]) return !0;
- var i = n.lastIndexOf(".");
- n = i < 0 ? null : n.substr(0, i)
- }
- return !1
- }
- })), define(n[393], i([0, 1, 203]), (function (e, t, n) {
- "use strict";
- function i(e, t) {
- return "boolean" == typeof e ? e : t
- }
- function o(e, t) {
- return "string" == typeof e ? e : t
- }
- function r(e, t) {
- void 0 === t && (t = !1), t && (e = e.map((function (e) {
- return e.toLowerCase()
- })));
- var n = function (e) {
- for (var t = {}, n = 0, i = e; n < i.length; n++) {
- t[i[n]] = !0
- }
- return t
- }(e);
- return t ? function (e) {
- return void 0 !== n[e.toLowerCase()] && n.hasOwnProperty(e.toLowerCase())
- } : function (e) {
- return void 0 !== n[e] && n.hasOwnProperty(e)
- }
- }
- function s(e, t) {
- for (var i = 0; t.indexOf("@") >= 0 && i < 5;) i++, t = t.replace(/@(\w+)/g, (function (i, o) {
- var r = "";
- if ("string" == typeof e[o]) r = e[o]; else {
- if (!(e[o] && e[o] instanceof RegExp)) throw void 0 === e[o] ? n.createError(e, "language definition does not contain attribute '" + o + "', used at: " + t) : n.createError(e, "attribute reference '" + o + "' must be a string, used at: " + t);
- r = e[o].source
- }
- return n.empty(r) ? "" : "(?:" + r + ")"
- }));
- return new RegExp(t, e.ignoreCase ? "i" : "")
- }
- function a(e, t, i, o) {
- var a = -1, l = i, u = i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);
- u && (u[3] && (a = parseInt(u[3]), u[2] && (a += 100)), l = u[4]);
- var d, c = "~", h = l;
- if (l && 0 !== l.length ? /^\w*$/.test(h) ? c = "==" : (u = l.match(/^(@|!@|~|!~|==|!=)(.*)$/)) && (c = u[1], h = u[2]) : (c = "!=", h = ""), "~" !== c && "!~" !== c || !/^(\w|\|)*$/.test(h)) if ("@" === c || "!@" === c) {
- var p = e[h];
- if (!p) throw n.createError(e, "the @ match target '" + h + "' is not defined, in rule: " + t);
- if (!function (e, t) {
- if (!t) return !1;
- if (!Array.isArray(t)) return !1;
- for (var n = 0, i = t; n < i.length; n++) {
- if (!e(i[n])) return !1
- }
- return !0
- }((function (e) {
- return "string" == typeof e
- }), p)) throw n.createError(e, "the @ match target '" + h + "' must be an array of strings, in rule: " + t);
- var g = r(p, e.ignoreCase);
- d = function (e) {
- return "@" === c ? g(e) : !g(e)
- }
- } else if ("~" === c || "!~" === c) if (h.indexOf("$") < 0) {
- var f = s(e, "^" + h + "$");
- d = function (e) {
- return "~" === c ? f.test(e) : !f.test(e)
- }
- } else d = function (t, i, o, r) {
- return s(e, "^" + n.substituteMatches(e, h, i, o, r) + "$").test(t)
- }; else if (h.indexOf("$") < 0) {
- var m = n.fixCase(e, h);
- d = function (e) {
- return "==" === c ? e === m : e !== m
- }
- } else {
- var v = n.fixCase(e, h);
- d = function (t, i, o, r, s) {
- var a = n.substituteMatches(e, v, i, o, r);
- return "==" === c ? t === a : t !== a
- }
- } else {
- var _ = r(h.split("|"), e.ignoreCase);
- d = function (e) {
- return "~" === c ? _(e) : !_(e)
- }
- }
- return -1 === a ? {
- name: i, value: o, test: function (e, t, n, i) {
- return d(e, e, t, n, i)
- }
- } : {
- name: i, value: o, test: function (e, t, n, i) {
- var o = function (e, t, n, i) {
- if (i < 0) return e;
- if (i < t.length) return t[i];
- if (i >= 100) {
- i -= 100;
- var o = n.split(".");
- if (o.unshift(n), i < o.length) return o[i]
- }
- return null
- }(e, t, n, a);
- return d(o || "", e, t, n, i)
- }
- }
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function () {
- function e(e) {
- this.regex = new RegExp(""), this.action = {token: ""}, this.matchOnlyAtLineStart = !1, this.name = "", this.name = e
- }
- return e.prototype.setRegex = function (e, t) {
- var i;
- if ("string" == typeof t) i = t; else {
- if (!(t instanceof RegExp)) throw n.createError(e, "rules must start with a match string or regular expression: " + this.name);
- i = t.source
- }
- this.matchOnlyAtLineStart = i.length > 0 && "^" === i[0], this.name = this.name + ": " + i, this.regex = s(e, "^(?:" + (this.matchOnlyAtLineStart ? i.substr(1) : i) + ")")
- }, e.prototype.setAction = function (e, t) {
- this.action = function e(t, i, o) {
- if (o) {
- if ("string" == typeof o) return o;
- if (o.token || "" === o.token) {
- if ("string" != typeof o.token) throw n.createError(t, "a 'token' attribute must be of type string, in rule: " + i);
- var r = {token: o.token};
- if (o.token.indexOf("$") >= 0 && (r.tokenSubst = !0), "string" == typeof o.bracket) if ("@open" === o.bracket) r.bracket = 1; else {
- if ("@close" !== o.bracket) throw n.createError(t, "a 'bracket' attribute must be either '@open' or '@close', in rule: " + i);
- r.bracket = -1
- }
- if (o.next) {
- if ("string" != typeof o.next) throw n.createError(t, "the next state must be a string value in rule: " + i);
- var s = o.next
- ;
- if (!/^(@pop|@push|@popall)$/.test(s) && ("@" === s[0] && (s = s.substr(1)), s.indexOf("$") < 0 && !n.stateExists(t, n.substituteMatches(t, s, "", [], "")))) throw n.createError(t, "the next state '" + o.next + "' is not defined in rule: " + i);
- r.next = s
- }
- return "number" == typeof o.goBack && (r.goBack = o.goBack), "string" == typeof o.switchTo && (r.switchTo = o.switchTo), "string" == typeof o.log && (r.log = o.log), "string" == typeof o.nextEmbedded && (r.nextEmbedded = o.nextEmbedded, t.usesEmbedded = !0), r
- }
- if (Array.isArray(o)) {
- for (var l = [], u = 0, d = o.length; u < d; u++) l[u] = e(t, i, o[u]);
- return {group: l}
- }
- if (o.cases) {
- var c = [];
- for (var h in o.cases) if (o.cases.hasOwnProperty(h)) {
- var p = e(t, i, o.cases[h]);
- "@default" === h || "@" === h || "" === h ? c.push({
- test: void 0,
- value: p,
- name: h
- }) : "@eos" === h ? c.push({
- test: function (e, t, n, i) {
- return i
- }, value: p, name: h
- }) : c.push(a(t, i, h, p))
- }
- var g = t.defaultToken;
- return {
- test: function (e, t, n, i) {
- for (var o = 0, r = c; o < r.length; o++) {
- var s = r[o];
- if (!s.test || s.test(e, t, n, i)) return s.value
- }
- return g
- }
- }
- }
- throw n.createError(t, "an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: " + i)
- }
- return {token: ""}
- }(e, this.name, t)
- }, e
- }();
- t.compile = function (e, t) {
- if (!t || "object" != typeof t) throw new Error("Monarch: expecting a language definition object");
- var r = {};
- r.languageId = e, r.noThrow = !1, r.maxStack = 100, r.start = "string" == typeof t.start ? t.start : null, r.ignoreCase = i(t.ignoreCase, !1), r.tokenPostfix = o(t.tokenPostfix, "." + r.languageId), r.defaultToken = o(t.defaultToken, "source"), r.usesEmbedded = !1;
- var s = t;
- function a(e, o, u) {
- for (var d = 0, c = u; d < c.length; d++) {
- var h = c[d], p = h.include;
- if (p && "string" == typeof p) {
- if ("string" != typeof p) throw n.createError(r, "an 'include' attribute must be a string at: " + e);
- if ("@" === p[0] && (p = p.substr(1)), !t.tokenizer[p]) throw n.createError(r, "include target '" + p + "' is not defined at: " + e);
- a(e + "." + p, o, t.tokenizer[p])
- } else {
- var g = new l(e);
- if (Array.isArray(h) && h.length >= 1 && h.length <= 3) if (g.setRegex(s, h[0]), h.length >= 3) if ("string" == typeof h[1]) g.setAction(s, {
- token: h[1], next: h[2]
- }); else {
- if ("object" != typeof h[1]) throw n.createError(r, "a next state as the last element of a rule can only be given if the action is either an object or a string, at: " + e);
- var f = h[1];
- f.next = h[2], g.setAction(s, f)
- } else g.setAction(s, h[1]); else {
- if (!h.regex) throw n.createError(r, "a rule must either be an array, or an object with a 'regex' or 'include' field at: " + e);
- h.name && "string" == typeof h.name && (g.name = h.name), h.matchOnlyAtStart && (g.matchOnlyAtLineStart = i(h.matchOnlyAtLineStart, !1)), g.setRegex(s, h.regex), g.setAction(s, h.action)
- }
- o.push(g)
- }
- }
- }
- if (s.languageId = e, s.ignoreCase = r.ignoreCase, s.noThrow = r.noThrow, s.usesEmbedded = r.usesEmbedded, s.stateNames = t.tokenizer, s.defaultToken = r.defaultToken, !t.tokenizer || "object" != typeof t.tokenizer) throw n.createError(r, "a language definition must define the 'tokenizer' attribute as an object");
- for (var u in r.tokenizer = [], t.tokenizer) if (t.tokenizer.hasOwnProperty(u)) {
- r.start || (r.start = u);
- var d = t.tokenizer[u];
- r.tokenizer[u] = new Array, a("tokenizer." + u, r.tokenizer[u], d)
- }
- if (r.usesEmbedded = s.usesEmbedded, t.brackets) {
- if (!Array.isArray(t.brackets)) throw n.createError(r, "the 'brackets' attribute must be defined as an array")
- } else t.brackets = [{open: "{", close: "}", token: "delimiter.curly"}, {
- open: "[",
- close: "]",
- token: "delimiter.square"
- }, {open: "(", close: ")", token: "delimiter.parenthesis"}, {
- open: "<",
- close: ">",
- token: "delimiter.angle"
- }];
- for (var c = [], h = 0, p = t.brackets; h < p.length; h++) {
- var g = p[h];
- if (g && Array.isArray(g) && 3 === g.length && (g = {
- token: g[2],
- open: g[0],
- close: g[1]
- }), g.open === g.close) throw n.createError(r, "open and close brackets in a 'brackets' attribute must be different: " + g.open + "\n hint: use the 'bracket' attribute if matching on equal brackets is required.");
- if ("string" != typeof g.open || "string" != typeof g.token || "string" != typeof g.close) throw n.createError(r, "every element in the 'brackets' array must be a '{open,close,token}' object or array");
- c.push({token: g.token + r.tokenPostfix, open: n.fixCase(r, g.open), close: n.fixCase(r, g.close)})
- }
- return r.brackets = c, r.noThrow = !0, r
- }
- })),
- define(n[394], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/actionbar/actionbar", t)
- })), define(n[70], i([0, 1, 16, 394, 2, 55, 6, 21, 57, 56, 4, 98, 24, 259]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var g = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o.options = i, o._context = t || o, o._action = n, n instanceof s.Action && o._register(n.onDidChange((function (e) {
- o.element && o.handleActionChangeEvent(e)
- }))), o
- }
- return r(t, e), t.prototype.handleActionChangeEvent = function (e) {
- void 0 !== e.enabled && this.updateEnabled(), void 0 !== e.checked && this.updateChecked(), void 0 !== e.class && this.updateClass(), void 0 !== e.label && (this.updateLabel(), this.updateTooltip()), void 0 !== e.tooltip && this.updateTooltip()
- }, Object.defineProperty(t.prototype, "actionRunner", {
- get: function () {
- return this._actionRunner || (this._actionRunner = this._register(new s.ActionRunner)), this._actionRunner
- }, set: function (e) {
- this._actionRunner = e
- }, enumerable: !0, configurable: !0
- }),
- t.prototype.getAction = function () {
- return this._action
- }, t.prototype.isEnabled = function () {
- return this._action.enabled
- }, t.prototype.setActionContext = function (e) {
- this._context = e
- }, t.prototype.render = function (e) {
- var t = this, i = this.element = e;
- this._register(u.Gesture.addTarget(e));
- var o = this.options && this.options.draggable;
- o && (e.draggable = !0, p.isFirefox && this._register(a.addDisposableListener(e, a.EventType.DRAG_START, (function (e) {
- var n;
- return null === (n = e.dataTransfer) || void 0 === n ? void 0 : n.setData(h.DataTransfers.TEXT, t._action.label)
- })))), this._register(a.addDisposableListener(i, u.EventType.Tap, (function (e) {
- return t.onClick(e)
- }))), this._register(a.addDisposableListener(i, a.EventType.MOUSE_DOWN, (function (e) {
- o || a.EventHelper.stop(e, !0), t._action.enabled && 0 === e.button && a.addClass(i, "active")
- }))), this._register(a.addDisposableListener(i, a.EventType.CLICK, (function (e) {
- a.EventHelper.stop(e, !0), t.options && t.options.isMenu ? t.onClick(e) : n.setImmediate((function () {
- return t.onClick(e)
- }))
- }))),
- this._register(a.addDisposableListener(i, a.EventType.DBLCLICK, (function (e) {
- a.EventHelper.stop(e, !0)
- }))), [a.EventType.MOUSE_UP, a.EventType.MOUSE_OUT].forEach((function (e) {
- t._register(a.addDisposableListener(i, e, (function (e) {
- a.EventHelper.stop(e), a.removeClass(i, "active")
- })))
- }))
- }, t.prototype.onClick = function (e) {
- var t;
- a.EventHelper.stop(e, !0), l.isUndefinedOrNull(this._context) ? t = e : (t = this._context, l.isObject(t) && (t.event = e)), this.actionRunner.run(this._action, t)
- }, t.prototype.focus = function () {
- this.element && (this.element.focus(), a.addClass(this.element, "focused"))
- }, t.prototype.blur = function () {
- this.element && (this.element.blur(), a.removeClass(this.element, "focused"))
- }, t.prototype.updateEnabled = function () {
- }, t.prototype.updateLabel = function () {
- }, t.prototype.updateTooltip = function () {
- }, t.prototype.updateClass = function () {
- }, t.prototype.updateChecked = function () {
- }, t.prototype.dispose = function () {
- this.element && (a.removeNode(this.element), this.element = void 0), e.prototype.dispose.call(this)
- }, t
- }(o.Disposable)
- ;t.BaseActionViewItem = g;
- var f = function (e) {
- function t(n) {
- var i = e.call(this, t.ID, n, n ? "separator text" : "separator") || this;
- return i.checked = !1, i.enabled = !1, i
- }
- return r(t, e), t.ID = "vs.actions.separator", t
- }(s.Action);
- t.Separator = f;
- var m = function (e) {
- function t(t, n, i) {
- void 0 === i && (i = {});
- var o = e.call(this, t, n, i) || this;
- return o.options = i, o.options.icon = void 0 !== i.icon && i.icon, o.options.label = void 0 === i.label || i.label, o.cssClass = "", o
- }
- return r(t, e), t.prototype.render = function (t) {
- e.prototype.render.call(this, t), this.element && (this.label = a.append(this.element, a.$("a.action-label"))), this.label && (this._action.id === f.ID ? this.label.setAttribute("role", "presentation") : this.options.isMenu ? this.label.setAttribute("role", "menuitem") : this.label.setAttribute("role", "button")), this.options.label && this.options.keybinding && this.element && (a.append(this.element, a.$("span.keybinding")).textContent = this.options.keybinding), this.updateClass(), this.updateLabel(), this.updateTooltip(), this.updateEnabled(), this.updateChecked()
- },
- t.prototype.focus = function () {
- e.prototype.focus.call(this), this.label && this.label.focus()
- }, t.prototype.updateLabel = function () {
- this.options.label && this.label && (this.label.textContent = this.getAction().label)
- }, t.prototype.updateTooltip = function () {
- var e = null;
- this.getAction().tooltip ? e = this.getAction().tooltip : !this.options.label && this.getAction().label && this.options.icon && (e = this.getAction().label, this.options.keybinding && (e = i.localize(0, null, e, this.options.keybinding))), e && this.label && (this.label.title = e)
- }, t.prototype.updateClass = function () {
- this.cssClass && this.label && a.removeClasses(this.label, this.cssClass), this.options.icon ? (this.cssClass = this.getAction().class, this.label && (a.addClass(this.label, "codicon"), this.cssClass && a.addClasses(this.label, this.cssClass)), this.updateEnabled()) : this.label && a.removeClass(this.label, "codicon")
- }, t.prototype.updateEnabled = function () {
- this.getAction().enabled ? (this.label && (this.label.removeAttribute("aria-disabled"), a.removeClass(this.label, "disabled"), this.label.tabIndex = 0),
- this.element && a.removeClass(this.element, "disabled")) : (this.label && (this.label.setAttribute("aria-disabled", "true"), a.addClass(this.label, "disabled"), a.removeTabIndexAndUpdateFocus(this.label)), this.element && a.addClass(this.element, "disabled"))
- }, t.prototype.updateChecked = function () {
- this.label && (this.getAction().checked ? a.addClass(this.label, "checked") : a.removeClass(this.label, "checked"))
- }, t
- }(g);
- t.ActionViewItem = m;
- var v = {orientation: 0, context: null, triggerKeys: {keys: [3, 10], keyDown: !1}}, _ = function (e) {
- function t(t, n) {
- void 0 === n && (n = v);
- var i, o, r = e.call(this) || this;
- switch (r._onDidBlur = r._register(new c.Emitter), r.onDidBlur = r._onDidBlur.event, r._onDidCancel = r._register(new c.Emitter), r.onDidCancel = r._onDidCancel.event, r._onDidRun = r._register(new c.Emitter), r.onDidRun = r._onDidRun.event, r._onDidBeforeRun = r._register(new c.Emitter), r.onDidBeforeRun = r._onDidBeforeRun.event, r.options = n, r._context = n.context, r.options.triggerKeys || (r.options.triggerKeys = v.triggerKeys),
- r.options.actionRunner ? r._actionRunner = r.options.actionRunner : (r._actionRunner = new s.ActionRunner, r._register(r._actionRunner)), r._register(r._actionRunner.onDidRun((function (e) {
- return r._onDidRun.fire(e)
- }))), r._register(r._actionRunner.onDidBeforeRun((function (e) {
- return r._onDidBeforeRun.fire(e)
- }))), r.viewItems = [], r.focusedItem = void 0, r.domNode = document.createElement("div"), r.domNode.className = "monaco-action-bar", !1 !== n.animated && a.addClass(r.domNode, "animated"), r.options.orientation) {
- case 0:
- i = 15, o = 17;
- break;
- case 1:
- i = 17, o = 15, r.domNode.className += " reverse";
- break;
- case 2:
- i = 16, o = 18, r.domNode.className += " vertical";
- break;
- case 3:
- i = 18, o = 16, r.domNode.className += " vertical reverse"
- }
- return r._register(a.addDisposableListener(r.domNode, a.EventType.KEY_DOWN, (function (e) {
- var t = new d.StandardKeyboardEvent(e), n = !0;
- t.equals(i) ? r.focusPrevious() : t.equals(o) ? r.focusNext() : t.equals(9) ? r.cancel() : r.isTriggerKeyEvent(t) ? r.options.triggerKeys && r.options.triggerKeys.keyDown && r.doTrigger(t) : n = !1, n && (t.preventDefault(),
- t.stopPropagation())
- }))), r._register(a.addDisposableListener(r.domNode, a.EventType.KEY_UP, (function (e) {
- var t = new d.StandardKeyboardEvent(e);
- r.isTriggerKeyEvent(t) ? (r.options.triggerKeys && !r.options.triggerKeys.keyDown && r.doTrigger(t), t.preventDefault(), t.stopPropagation()) : (t.equals(2) || t.equals(1026)) && r.updateFocusedItem()
- }))), r.focusTracker = r._register(a.trackFocus(r.domNode)), r._register(r.focusTracker.onDidBlur((function () {
- document.activeElement !== r.domNode && a.isAncestor(document.activeElement, r.domNode) || (r._onDidBlur.fire(), r.focusedItem = void 0)
- }))), r._register(r.focusTracker.onDidFocus((function () {
- return r.updateFocusedItem()
- }))), r.actionsList = document.createElement("ul"), r.actionsList.className = "actions-container", r.actionsList.setAttribute("role", "toolbar"), r.options.ariaLabel && r.actionsList.setAttribute("aria-label", r.options.ariaLabel), r.domNode.appendChild(r.actionsList), t.appendChild(r.domNode), r
- }
- return r(t, e), t.prototype.isTriggerKeyEvent = function (e) {
- var t = !1
- ;
- return this.options.triggerKeys && this.options.triggerKeys.keys.forEach((function (n) {
- t = t || e.equals(n)
- })), t
- }, t.prototype.updateFocusedItem = function () {
- for (var e = 0; e < this.actionsList.children.length; e++) {
- var t = this.actionsList.children[e];
- if (a.isAncestor(document.activeElement, t)) {
- this.focusedItem = e;
- break
- }
- }
- }, Object.defineProperty(t.prototype, "context", {
- get: function () {
- return this._context
- }, set: function (e) {
- this._context = e, this.viewItems.forEach((function (t) {
- return t.setActionContext(e)
- }))
- }, enumerable: !0, configurable: !0
- }), t.prototype.getContainer = function () {
- return this.domNode
- }, t.prototype.push = function (e, t) {
- var n = this;
- void 0 === t && (t = {});
- var i = Array.isArray(e) ? e : [e], o = l.isNumber(t.index) ? t.index : null;
- i.forEach((function (e) {
- var i, r = document.createElement("li");
- r.className = "action-item", r.setAttribute("role", "presentation"), n._register(a.addDisposableListener(r, a.EventType.CONTEXT_MENU, (function (e) {
- e.preventDefault(), e.stopPropagation()
- }))), n.options.actionViewItemProvider && (i = n.options.actionViewItemProvider(e)),
- i || (i = new m(n.context, e, t)), i.actionRunner = n._actionRunner, i.setActionContext(n.context), i.render(r), null === o || o < 0 || o >= n.actionsList.children.length ? (n.actionsList.appendChild(r), n.viewItems.push(i)) : (n.actionsList.insertBefore(r, n.actionsList.children[o]), n.viewItems.splice(o, 0, i), o++)
- }))
- }, t.prototype.clear = function () {
- this.viewItems = o.dispose(this.viewItems), a.clearNode(this.actionsList)
- }, t.prototype.isEmpty = function () {
- return 0 === this.viewItems.length
- }, t.prototype.focus = function (e) {
- var t = !1, n = void 0;
- void 0 === e ? t = !0 : "number" == typeof e ? n = e : "boolean" == typeof e && (t = e), t && void 0 === this.focusedItem ? (this.focusedItem = this.viewItems.length - 1, this.focusNext()) : (void 0 !== n && (this.focusedItem = n), this.updateFocus())
- }, t.prototype.focusNext = function () {
- void 0 === this.focusedItem && (this.focusedItem = this.viewItems.length - 1);
- var e, t = this.focusedItem;
- do {
- this.focusedItem = (this.focusedItem + 1) % this.viewItems.length, e = this.viewItems[this.focusedItem]
- } while (this.focusedItem !== t && !e.isEnabled())
- ;
- this.focusedItem !== t || e.isEnabled() || (this.focusedItem = void 0), this.updateFocus()
- }, t.prototype.focusPrevious = function () {
- void 0 === this.focusedItem && (this.focusedItem = 0);
- var e, t = this.focusedItem;
- do {
- this.focusedItem = this.focusedItem - 1, this.focusedItem < 0 && (this.focusedItem = this.viewItems.length - 1), e = this.viewItems[this.focusedItem]
- } while (this.focusedItem !== t && !e.isEnabled());
- this.focusedItem !== t || e.isEnabled() || (this.focusedItem = void 0), this.updateFocus(!0)
- }, t.prototype.updateFocus = function (e, t) {
- void 0 === this.focusedItem && this.actionsList.focus({preventScroll: t});
- for (var n = 0; n < this.viewItems.length; n++) {
- var i = this.viewItems[n];
- n === this.focusedItem ? l.isFunction(i.isEnabled) && (i.isEnabled() && l.isFunction(i.focus) ? i.focus(e) : this.actionsList.focus({preventScroll: t})) : l.isFunction(i.blur) && i.blur()
- }
- }, t.prototype.doTrigger = function (e) {
- if (void 0 !== this.focusedItem) {
- var t = this.viewItems[this.focusedItem];
- if (t instanceof g) {
- var n = null === t._context || void 0 === t._context ? e : t._context;
- this.run(t._action, n)
- }
- }
- },
- t.prototype.cancel = function () {
- document.activeElement instanceof HTMLElement && document.activeElement.blur(), this._onDidCancel.fire()
- }, t.prototype.run = function (e, t) {
- return this._actionRunner.run(e, t)
- }, t.prototype.dispose = function () {
- o.dispose(this.viewItems), this.viewItems = [], a.removeNode(this.getContainer()), e.prototype.dispose.call(this)
- }, t
- }(o.Disposable);
- t.ActionBar = _
- })), define(n[395], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/aria/aria", t)
- })), define(n[50], i([0, 1, 395, 16, 6, 260]), (function (e, t, n, i, o) {
- "use strict";
- var r, s, a;
- function l(e, t) {
- c(s, e, t)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.setARIAContainer = function (e) {
- (r = document.createElement("div")).className = "monaco-aria-container", (s = document.createElement("div")).className = "monaco-alert", s.setAttribute("role", "alert"), s.setAttribute("aria-atomic", "true"), r.appendChild(s), (a = document.createElement("div")).className = "monaco-status", a.setAttribute("role", "status"), a.setAttribute("aria-atomic", "true"), r.appendChild(a), e.appendChild(r)
- }, t.alert = l, t.status = function (e, t) {
- i.isMacintosh ? l(e, t) : c(a, e, t)
- };
- var u = 0, d = void 0;
- function c(e, t, i) {
- if (r) {
- if (!i) switch (d === t ? u++ : (d = t, u = 0), u) {
- case 0:
- break;
- case 1:
- t = n.localize(0, null, t);
- break;
- default:
- t = n.localize(1, null, t, u)
- }
- o.clearNode(e), e.textContent = t, e.style.visibility = "hidden", e.style.visibility = "visible"
- }
- }
- })), define(n[396], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/findinput/findInput", t)
- })), define(n[397], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/findinput/findInputCheckboxes", t)
- })), define(n[204], i([0, 1, 138, 397]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = i.localize(0, null), s = i.localize(1, null), a = i.localize(2, null), l = function (e) {
- function t(t) {
- return e.call(this, {
- actionClassName: "codicon-case-sensitive",
- title: o + t.appendTitle,
- isChecked: t.isChecked,
- inputActiveOptionBorder: t.inputActiveOptionBorder,
- inputActiveOptionBackground: t.inputActiveOptionBackground
- }) || this
- }
- return r(t, e), t
- }(n.Checkbox);
- t.CaseSensitiveCheckbox = l
- ;var u = function (e) {
- function t(t) {
- return e.call(this, {
- actionClassName: "codicon-whole-word",
- title: s + t.appendTitle,
- isChecked: t.isChecked,
- inputActiveOptionBorder: t.inputActiveOptionBorder,
- inputActiveOptionBackground: t.inputActiveOptionBackground
- }) || this
- }
- return r(t, e), t
- }(n.Checkbox);
- t.WholeWordsCheckbox = u;
- var d = function (e) {
- function t(t) {
- return e.call(this, {
- actionClassName: "codicon-regex",
- title: a + t.appendTitle,
- isChecked: t.isChecked,
- inputActiveOptionBorder: t.inputActiveOptionBorder,
- inputActiveOptionBackground: t.inputActiveOptionBackground
- }) || this
- }
- return r(t, e), t
- }(n.Checkbox);
- t.RegexCheckbox = d
- })), define(n[398], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/findinput/replaceInput", t)
- })), define(n[399], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/inputbox/inputBox", t)
- })), define(n[152], i([0, 1, 399, 24, 6, 134, 50, 70, 4, 47, 27, 31, 242, 53, 52, 269]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var m = o.$, v = {
- inputBackground: c.Color.fromHex("#3C3C3C"),
- inputForeground: c.Color.fromHex("#CCCCCC"),
- inputValidationInfoBorder: c.Color.fromHex("#55AAFF"),
- inputValidationInfoBackground: c.Color.fromHex("#063B49"),
- inputValidationWarningBorder: c.Color.fromHex("#B89500"),
- inputValidationWarningBackground: c.Color.fromHex("#352A05"),
- inputValidationErrorBorder: c.Color.fromHex("#BE1100"),
- inputValidationErrorBackground: c.Color.fromHex("#5A1D1D")
- }, _ = function (e) {
- function t(t, n, r) {
- var s = e.call(this) || this;
- s.state = "idle", s.maxHeight = Number.POSITIVE_INFINITY, s._onDidChange = s._register(new u.Emitter), s.onDidChange = s._onDidChange.event, s._onDidHeightChange = s._register(new u.Emitter), s.onDidHeightChange = s._onDidHeightChange.event, s.contextViewProvider = n, s.options = r || Object.create(null), h.mixin(s.options, v, !1), s.message = null, s.placeholder = s.options.placeholder || "", s.ariaLabel = s.options.ariaLabel || "", s.inputBackground = s.options.inputBackground, s.inputForeground = s.options.inputForeground, s.inputBorder = s.options.inputBorder,
- s.inputValidationInfoBorder = s.options.inputValidationInfoBorder, s.inputValidationInfoBackground = s.options.inputValidationInfoBackground, s.inputValidationInfoForeground = s.options.inputValidationInfoForeground, s.inputValidationWarningBorder = s.options.inputValidationWarningBorder, s.inputValidationWarningBackground = s.options.inputValidationWarningBackground, s.inputValidationWarningForeground = s.options.inputValidationWarningForeground, s.inputValidationErrorBorder = s.options.inputValidationErrorBorder, s.inputValidationErrorBackground = s.options.inputValidationErrorBackground, s.inputValidationErrorForeground = s.options.inputValidationErrorForeground, s.options.validationOptions && (s.validation = s.options.validationOptions.validation), s.element = o.append(t, m(".monaco-inputbox.idle"));
- var a = s.options.flexibleHeight ? "textarea" : "input", d = o.append(s.element, m(".wrapper"));
- if (s.input = o.append(d, m(a + ".input.empty")), s.input.setAttribute("autocorrect", "off"), s.input.setAttribute("autocapitalize", "off"),
- s.input.setAttribute("spellcheck", "false"), s.onfocus(s.input, (function () {
- return o.addClass(s.element, "synthetic-focus")
- })), s.onblur(s.input, (function () {
- return o.removeClass(s.element, "synthetic-focus")
- })), s.options.flexibleHeight) {
- s.maxHeight = "number" == typeof s.options.flexibleMaxHeight ? s.options.flexibleMaxHeight : Number.POSITIVE_INFINITY, s.mirror = o.append(d, m("div.mirror")), s.mirror.innerHTML = " ", s.scrollableElement = new g.ScrollableElement(s.element, {vertical: 1}), s.options.flexibleWidth && (s.input.setAttribute("wrap", "off"), s.mirror.style.whiteSpace = "pre", s.mirror.style.wordWrap = "initial"), o.append(t, s.scrollableElement.getDomNode()), s._register(s.scrollableElement), s._register(s.scrollableElement.onScroll((function (e) {
- return s.input.scrollTop = e.scrollTop
- })));
- var c = u.Event.filter(f.domEvent(document, "selectionchange"), (function () {
- var e = document.getSelection();
- return (null == e ? void 0 : e.anchorNode) === d
- }));
- s._register(c(s.updateScrollDimensions, s)), s._register(s.onDidHeightChange(s.updateScrollDimensions, s))
- } else s.input.type = s.options.type || "text", s.input.setAttribute("wrap", "off");
- return s.ariaLabel && s.input.setAttribute("aria-label", s.ariaLabel), s.placeholder && s.setPlaceHolder(s.placeholder), s.oninput(s.input, (function () {
- return s.onValueChange()
- })), s.onblur(s.input, (function () {
- return s.onBlur()
- })), s.onfocus(s.input, (function () {
- return s.onFocus()
- })), s.placeholder && i.isIE && s.onclick(s.input, (function (e) {
- o.EventHelper.stop(e, !0), s.input.focus()
- })), s.ignoreGesture(s.input), setTimeout((function () {
- return s.updateMirror()
- }), 0), s.options.actions && (s.actionbar = s._register(new l.ActionBar(s.element)), s.actionbar.push(s.options.actions, {
- icon: !0,
- label: !1
- })), s.applyStyles(), s
- }
- return r(t, e), t.prototype.onBlur = function () {
- this._hideMessage()
- }, t.prototype.onFocus = function () {
- this._showMessage()
- }, t.prototype.setPlaceHolder = function (e) {
- this.placeholder = e, this.input.setAttribute("placeholder", e), this.input.title = e
- }, t.prototype.setAriaLabel = function (e) {
- this.ariaLabel = e,
- e ? this.input.setAttribute("aria-label", this.ariaLabel) : this.input.removeAttribute("aria-label")
- }, Object.defineProperty(t.prototype, "inputElement", {
- get: function () {
- return this.input
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "value", {
- get: function () {
- return this.input.value
- }, set: function (e) {
- this.input.value !== e && (this.input.value = e, this.onValueChange())
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "height", {
- get: function () {
- return "number" == typeof this.cachedHeight ? this.cachedHeight : o.getTotalHeight(this.element)
- }, enumerable: !0, configurable: !0
- }), t.prototype.focus = function () {
- this.input.focus()
- }, t.prototype.blur = function () {
- this.input.blur()
- }, t.prototype.hasFocus = function () {
- return document.activeElement === this.input
- }, t.prototype.select = function (e) {
- void 0 === e && (e = null), this.input.select(), e && this.input.setSelectionRange(e.start, e.end)
- }, t.prototype.enable = function () {
- this.input.removeAttribute("disabled")
- }, t.prototype.disable = function () {
- this.blur(), this.input.disabled = !0,
- this._hideMessage()
- }, Object.defineProperty(t.prototype, "width", {
- get: function () {
- return o.getTotalWidth(this.input)
- }, set: function (e) {
- if (this.options.flexibleHeight && this.options.flexibleWidth) {
- var t = 0;
- if (this.mirror) t = (parseFloat(this.mirror.style.paddingLeft || "") || 0) + (parseFloat(this.mirror.style.paddingRight || "") || 0);
- this.input.style.width = e - t + "px"
- } else this.input.style.width = e + "px";
- this.mirror && (this.mirror.style.width = e + "px")
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "paddingRight", {
- set: function (e) {
- this.options.flexibleHeight && this.options.flexibleWidth ? this.input.style.width = "calc(100% - " + e + "px)" : this.input.style.paddingRight = e + "px", this.mirror && (this.mirror.style.paddingRight = e + "px")
- }, enumerable: !0, configurable: !0
- }), t.prototype.updateScrollDimensions = function () {
- if ("number" == typeof this.cachedContentHeight && "number" == typeof this.cachedHeight && this.scrollableElement) {
- var e = this.cachedContentHeight, t = this.cachedHeight, n = this.input.scrollTop
- ;this.scrollableElement.setScrollDimensions({
- scrollHeight: e,
- height: t
- }), this.scrollableElement.setScrollPosition({scrollTop: n})
- }
- }, t.prototype.showMessage = function (e, t) {
- this.message = e, o.removeClass(this.element, "idle"), o.removeClass(this.element, "info"), o.removeClass(this.element, "warning"), o.removeClass(this.element, "error"), o.addClass(this.element, this.classForType(e.type));
- var i, r = this.stylesForType(this.message.type);
- this.element.style.border = r.border ? "1px solid " + r.border : "", i = 3 === e.type ? n.localize(0, null, e.content) : 2 === e.type ? n.localize(1, null, e.content) : n.localize(2, null, e.content), a.alert(i), (this.hasFocus() || t) && this._showMessage()
- }, t.prototype.hideMessage = function () {
- this.message = null, o.removeClass(this.element, "info"), o.removeClass(this.element, "warning"), o.removeClass(this.element, "error"), o.addClass(this.element, "idle"), this._hideMessage(), this.applyStyles()
- }, t.prototype.validate = function () {
- var e = null
- ;
- return this.validation && ((e = this.validation(this.value)) ? (this.inputElement.setAttribute("aria-invalid", "true"), this.showMessage(e)) : this.inputElement.hasAttribute("aria-invalid") && (this.inputElement.removeAttribute("aria-invalid"), this.hideMessage())), !e
- }, t.prototype.stylesForType = function (e) {
- switch (e) {
- case 1:
- return {
- border: this.inputValidationInfoBorder,
- background: this.inputValidationInfoBackground,
- foreground: this.inputValidationInfoForeground
- };
- case 2:
- return {
- border: this.inputValidationWarningBorder,
- background: this.inputValidationWarningBackground,
- foreground: this.inputValidationWarningForeground
- };
- default:
- return {
- border: this.inputValidationErrorBorder,
- background: this.inputValidationErrorBackground,
- foreground: this.inputValidationErrorForeground
- }
- }
- }, t.prototype.classForType = function (e) {
- switch (e) {
- case 1:
- return "info";
- case 2:
- return "warning";
- default:
- return "error"
- }
- }, t.prototype._showMessage = function () {
- var e = this;
- if (this.contextViewProvider && this.message) {
- var t, n = function () {
- return t.style.width = o.getTotalWidth(e.element) + "px"
- };
- this.contextViewProvider.showContextView({
- getAnchor: function () {
- return e.element
- }, anchorAlignment: 1, render: function (i) {
- if (!e.message) return null;
- t = o.append(i, m(".monaco-inputbox-container")), n();
- var r = {inline: !0, className: "monaco-inputbox-message"},
- a = e.message.formatContent ? s.renderFormattedText(e.message.content, r) : s.renderText(e.message.content, r);
- o.addClass(a, e.classForType(e.message.type));
- var l = e.stylesForType(e.message.type);
- return a.style.backgroundColor = l.background ? l.background.toString() : "", a.style.color = l.foreground ? l.foreground.toString() : "", a.style.border = l.border ? "1px solid " + l.border : "", o.append(t, a), null
- }, onHide: function () {
- e.state = "closed"
- }, layout: n
- }), this.state = "open"
- }
- }, t.prototype._hideMessage = function () {
- this.contextViewProvider && ("open" === this.state && this.contextViewProvider.hideContextView(), this.state = "idle")
- }, t.prototype.onValueChange = function () {
- this._onDidChange.fire(this.value), this.validate(), this.updateMirror(),
- o.toggleClass(this.input, "empty", !this.value), "open" === this.state && this.contextViewProvider && this.contextViewProvider.layout()
- }, t.prototype.updateMirror = function () {
- if (this.mirror) {
- var e = this.value, t = 10 === e.charCodeAt(e.length - 1) ? " " : "";
- e + t ? this.mirror.textContent = e + t : this.mirror.innerHTML = " ", this.layout()
- }
- }, t.prototype.style = function (e) {
- this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = e.inputValidationInfoBackground, this.inputValidationInfoForeground = e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, this.inputValidationWarningBackground = e.inputValidationWarningBackground, this.inputValidationWarningForeground = e.inputValidationWarningForeground, this.inputValidationWarningBorder = e.inputValidationWarningBorder, this.inputValidationErrorBackground = e.inputValidationErrorBackground, this.inputValidationErrorForeground = e.inputValidationErrorForeground,
- this.inputValidationErrorBorder = e.inputValidationErrorBorder, this.applyStyles()
- }, t.prototype.applyStyles = function () {
- var e = this.inputBackground ? this.inputBackground.toString() : "",
- t = this.inputForeground ? this.inputForeground.toString() : "",
- n = this.inputBorder ? this.inputBorder.toString() : "";
- this.element.style.backgroundColor = e, this.element.style.color = t, this.input.style.backgroundColor = e, this.input.style.color = t, this.element.style.borderWidth = n ? "1px" : "", this.element.style.borderStyle = n ? "solid" : "", this.element.style.borderColor = n
- }, t.prototype.layout = function () {
- if (this.mirror) {
- var e = this.cachedContentHeight;
- this.cachedContentHeight = o.getTotalHeight(this.mirror), e !== this.cachedContentHeight && (this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight), this.input.style.height = this.cachedHeight + "px", this._onDidHeightChange.fire(this.cachedContentHeight))
- }
- }, t.prototype.insertAtCursor = function (e) {
- var t = this.inputElement, n = t.selectionStart, i = t.selectionEnd, o = t.value
- ;null !== n && null !== i && (this.value = o.substr(0, n) + e + o.substr(i), t.setSelectionRange(n + 1, n + 1), this.layout())
- }, t.prototype.dispose = function () {
- this._hideMessage(), this.message = null, this.actionbar && this.actionbar.dispose(), e.prototype.dispose.call(this)
- }, t
- }(d.Widget);
- t.InputBox = _;
- var y = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, n, i) || this;
- return o.history = new p.HistoryNavigator(i.history, 100), o
- }
- return r(t, e), t.prototype.addToHistory = function () {
- this.value && this.value !== this.getCurrentValue() && this.history.add(this.value)
- }, t.prototype.showNextValue = function () {
- this.history.has(this.value) || this.addToHistory();
- var e = this.getNextValue();
- e && (e = e === this.value ? this.getNextValue() : e), e && (this.value = e, a.status(this.value))
- }, t.prototype.showPreviousValue = function () {
- this.history.has(this.value) || this.addToHistory();
- var e = this.getPreviousValue();
- e && (e = e === this.value ? this.getPreviousValue() : e), e && (this.value = e, a.status(this.value))
- }, t.prototype.getCurrentValue = function () {
- var e = this.history.current()
- ;
- return e || (e = this.history.last(), this.history.next()), e
- }, t.prototype.getPreviousValue = function () {
- return this.history.previous() || this.history.first()
- }, t.prototype.getNextValue = function () {
- return this.history.next() || this.history.last()
- }, t
- }(_);
- t.HistoryInputBox = y
- })), define(n[400], i([0, 1, 396, 6, 152, 47, 4, 204, 184]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = n.localize(0, null), d = function (e) {
- function t(t, n, r, s) {
- var d = e.call(this) || this;
- d._showOptionButtons = r, d.fixFocusOnOptionClickEnabled = !0, d._onDidOptionChange = d._register(new a.Emitter), d.onDidOptionChange = d._onDidOptionChange.event, d._onKeyDown = d._register(new a.Emitter), d.onKeyDown = d._onKeyDown.event, d._onMouseDown = d._register(new a.Emitter), d.onMouseDown = d._onMouseDown.event, d._onInput = d._register(new a.Emitter), d._onKeyUp = d._register(new a.Emitter), d._onCaseSensitiveKeyDown = d._register(new a.Emitter), d.onCaseSensitiveKeyDown = d._onCaseSensitiveKeyDown.event, d._onRegexKeyDown = d._register(new a.Emitter),
- d.onRegexKeyDown = d._onRegexKeyDown.event, d._lastHighlightFindOptions = 0, d.contextViewProvider = n, d.placeholder = s.placeholder || "", d.validation = s.validation, d.label = s.label || u, d.inputActiveOptionBorder = s.inputActiveOptionBorder, d.inputActiveOptionBackground = s.inputActiveOptionBackground, d.inputBackground = s.inputBackground, d.inputForeground = s.inputForeground, d.inputBorder = s.inputBorder, d.inputValidationInfoBorder = s.inputValidationInfoBorder, d.inputValidationInfoBackground = s.inputValidationInfoBackground, d.inputValidationInfoForeground = s.inputValidationInfoForeground, d.inputValidationWarningBorder = s.inputValidationWarningBorder, d.inputValidationWarningBackground = s.inputValidationWarningBackground, d.inputValidationWarningForeground = s.inputValidationWarningForeground, d.inputValidationErrorBorder = s.inputValidationErrorBorder, d.inputValidationErrorBackground = s.inputValidationErrorBackground, d.inputValidationErrorForeground = s.inputValidationErrorForeground
- ;var c = s.appendCaseSensitiveLabel || "", h = s.appendWholeWordsLabel || "",
- p = s.appendRegexLabel || "", g = s.history || [], f = !!s.flexibleHeight, m = !!s.flexibleWidth,
- v = s.flexibleMaxHeight;
- d.domNode = document.createElement("div"), i.addClass(d.domNode, "monaco-findInput"), d.inputBox = d._register(new o.HistoryInputBox(d.domNode, d.contextViewProvider, {
- placeholder: d.placeholder || "",
- ariaLabel: d.label || "",
- validationOptions: {validation: d.validation},
- inputBackground: d.inputBackground,
- inputForeground: d.inputForeground,
- inputBorder: d.inputBorder,
- inputValidationInfoBackground: d.inputValidationInfoBackground,
- inputValidationInfoForeground: d.inputValidationInfoForeground,
- inputValidationInfoBorder: d.inputValidationInfoBorder,
- inputValidationWarningBackground: d.inputValidationWarningBackground,
- inputValidationWarningForeground: d.inputValidationWarningForeground,
- inputValidationWarningBorder: d.inputValidationWarningBorder,
- inputValidationErrorBackground: d.inputValidationErrorBackground,
- inputValidationErrorForeground: d.inputValidationErrorForeground,
- inputValidationErrorBorder: d.inputValidationErrorBorder,
- history: g,
- flexibleHeight: f,
- flexibleWidth: m,
- flexibleMaxHeight: v
- })), d.regex = d._register(new l.RegexCheckbox({
- appendTitle: p,
- isChecked: !1,
- inputActiveOptionBorder: d.inputActiveOptionBorder,
- inputActiveOptionBackground: d.inputActiveOptionBackground
- })), d._register(d.regex.onChange((function (e) {
- d._onDidOptionChange.fire(e), !e && d.fixFocusOnOptionClickEnabled && d.inputBox.focus(), d.validate()
- }))), d._register(d.regex.onKeyDown((function (e) {
- d._onRegexKeyDown.fire(e)
- }))), d.wholeWords = d._register(new l.WholeWordsCheckbox({
- appendTitle: h,
- isChecked: !1,
- inputActiveOptionBorder: d.inputActiveOptionBorder,
- inputActiveOptionBackground: d.inputActiveOptionBackground
- })), d._register(d.wholeWords.onChange((function (e) {
- d._onDidOptionChange.fire(e), !e && d.fixFocusOnOptionClickEnabled && d.inputBox.focus(), d.validate()
- }))), d.caseSensitive = d._register(new l.CaseSensitiveCheckbox({
- appendTitle: c, isChecked: !1, inputActiveOptionBorder: d.inputActiveOptionBorder,
- inputActiveOptionBackground: d.inputActiveOptionBackground
- })), d._register(d.caseSensitive.onChange((function (e) {
- d._onDidOptionChange.fire(e), !e && d.fixFocusOnOptionClickEnabled && d.inputBox.focus(), d.validate()
- }))), d._register(d.caseSensitive.onKeyDown((function (e) {
- d._onCaseSensitiveKeyDown.fire(e)
- }))), d._showOptionButtons && (d.inputBox.paddingRight = d.caseSensitive.width() + d.wholeWords.width() + d.regex.width());
- var _ = [d.caseSensitive.domNode, d.wholeWords.domNode, d.regex.domNode];
- d.onkeydown(d.domNode, (function (e) {
- if (e.equals(15) || e.equals(17) || e.equals(9)) {
- var t = _.indexOf(document.activeElement);
- if (t >= 0) {
- var n = -1;
- e.equals(17) ? n = (t + 1) % _.length : e.equals(15) && (n = 0 === t ? _.length - 1 : t - 1), e.equals(9) ? _[t].blur() : n >= 0 && _[n].focus(), i.EventHelper.stop(e, !0)
- }
- }
- }));
- var y = document.createElement("div");
- return y.className = "controls", y.style.display = d._showOptionButtons ? "block" : "none", y.appendChild(d.caseSensitive.domNode), y.appendChild(d.wholeWords.domNode), y.appendChild(d.regex.domNode), d.domNode.appendChild(y),
- t && t.appendChild(d.domNode), d.onkeydown(d.inputBox.inputElement, (function (e) {
- return d._onKeyDown.fire(e)
- })), d.onkeyup(d.inputBox.inputElement, (function (e) {
- return d._onKeyUp.fire(e)
- })), d.oninput(d.inputBox.inputElement, (function (e) {
- return d._onInput.fire()
- })), d.onmousedown(d.inputBox.inputElement, (function (e) {
- return d._onMouseDown.fire(e)
- })), d
- }
- return r(t, e), t.prototype.enable = function () {
- i.removeClass(this.domNode, "disabled"), this.inputBox.enable(), this.regex.enable(), this.wholeWords.enable(), this.caseSensitive.enable()
- }, t.prototype.disable = function () {
- i.addClass(this.domNode, "disabled"), this.inputBox.disable(), this.regex.disable(), this.wholeWords.disable(), this.caseSensitive.disable()
- }, t.prototype.setFocusInputOnOptionClick = function (e) {
- this.fixFocusOnOptionClickEnabled = e
- }, t.prototype.setEnabled = function (e) {
- e ? this.enable() : this.disable()
- }, t.prototype.getValue = function () {
- return this.inputBox.value
- }, t.prototype.setValue = function (e) {
- this.inputBox.value !== e && (this.inputBox.value = e)
- }, t.prototype.style = function (e) {
- this.inputActiveOptionBorder = e.inputActiveOptionBorder, this.inputActiveOptionBackground = e.inputActiveOptionBackground, this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = e.inputValidationInfoBackground, this.inputValidationInfoForeground = e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, this.inputValidationWarningBackground = e.inputValidationWarningBackground, this.inputValidationWarningForeground = e.inputValidationWarningForeground, this.inputValidationWarningBorder = e.inputValidationWarningBorder, this.inputValidationErrorBackground = e.inputValidationErrorBackground, this.inputValidationErrorForeground = e.inputValidationErrorForeground, this.inputValidationErrorBorder = e.inputValidationErrorBorder, this.applyStyles()
- }, t.prototype.applyStyles = function () {
- if (this.domNode) {
- var e = {
- inputActiveOptionBorder: this.inputActiveOptionBorder,
- inputActiveOptionBackground: this.inputActiveOptionBackground
- }
- ;this.regex.style(e), this.wholeWords.style(e), this.caseSensitive.style(e);
- var t = {
- inputBackground: this.inputBackground,
- inputForeground: this.inputForeground,
- inputBorder: this.inputBorder,
- inputValidationInfoBackground: this.inputValidationInfoBackground,
- inputValidationInfoForeground: this.inputValidationInfoForeground,
- inputValidationInfoBorder: this.inputValidationInfoBorder,
- inputValidationWarningBackground: this.inputValidationWarningBackground,
- inputValidationWarningForeground: this.inputValidationWarningForeground,
- inputValidationWarningBorder: this.inputValidationWarningBorder,
- inputValidationErrorBackground: this.inputValidationErrorBackground,
- inputValidationErrorForeground: this.inputValidationErrorForeground,
- inputValidationErrorBorder: this.inputValidationErrorBorder
- };
- this.inputBox.style(t)
- }
- }, t.prototype.select = function () {
- this.inputBox.select()
- }, t.prototype.focus = function () {
- this.inputBox.focus()
- }, t.prototype.getCaseSensitive = function () {
- return this.caseSensitive.checked
- }, t.prototype.setCaseSensitive = function (e) {
- this.caseSensitive.checked = e
- }, t.prototype.getWholeWords = function () {
- return this.wholeWords.checked
- }, t.prototype.setWholeWords = function (e) {
- this.wholeWords.checked = e
- }, t.prototype.getRegex = function () {
- return this.regex.checked
- }, t.prototype.setRegex = function (e) {
- this.regex.checked = e, this.validate()
- }, t.prototype.focusOnCaseSensitive = function () {
- this.caseSensitive.focus()
- }, t.prototype.highlightFindOptions = function () {
- i.removeClass(this.domNode, "highlight-" + this._lastHighlightFindOptions), this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions, i.addClass(this.domNode, "highlight-" + this._lastHighlightFindOptions)
- }, t.prototype.validate = function () {
- this.inputBox.validate()
- }, t.prototype.clearMessage = function () {
- this.inputBox.hideMessage()
- }, t
- }(s.Widget);
- t.FindInput = d
- })), define(n[401], i([0, 1, 398, 6, 152, 47, 4, 138, 184]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = n.localize(0, null), d = n.localize(1, null), c = function (e) {
- function t(t) {
- return e.call(this, {
- actionClassName: "codicon-preserve-case",
- title: d + t.appendTitle,
- isChecked: t.isChecked,
- inputActiveOptionBorder: t.inputActiveOptionBorder,
- inputActiveOptionBackground: t.inputActiveOptionBackground
- }) || this
- }
- return r(t, e), t
- }(l.Checkbox);
- t.PreserveCaseCheckbox = c;
- var h = function (e) {
- function t(t, n, r, s) {
- var l = e.call(this) || this;
- l._showOptionButtons = r, l.fixFocusOnOptionClickEnabled = !0, l.cachedOptionsWidth = 0, l._onDidOptionChange = l._register(new a.Emitter), l.onDidOptionChange = l._onDidOptionChange.event, l._onKeyDown = l._register(new a.Emitter), l.onKeyDown = l._onKeyDown.event, l._onMouseDown = l._register(new a.Emitter), l._onInput = l._register(new a.Emitter), l._onKeyUp = l._register(new a.Emitter), l._onPreserveCaseKeyDown = l._register(new a.Emitter), l.onPreserveCaseKeyDown = l._onPreserveCaseKeyDown.event, l.contextViewProvider = n, l.placeholder = s.placeholder || "", l.validation = s.validation, l.label = s.label || u, l.inputActiveOptionBorder = s.inputActiveOptionBorder, l.inputActiveOptionBackground = s.inputActiveOptionBackground,
- l.inputBackground = s.inputBackground, l.inputForeground = s.inputForeground, l.inputBorder = s.inputBorder, l.inputValidationInfoBorder = s.inputValidationInfoBorder, l.inputValidationInfoBackground = s.inputValidationInfoBackground, l.inputValidationInfoForeground = s.inputValidationInfoForeground, l.inputValidationWarningBorder = s.inputValidationWarningBorder, l.inputValidationWarningBackground = s.inputValidationWarningBackground, l.inputValidationWarningForeground = s.inputValidationWarningForeground, l.inputValidationErrorBorder = s.inputValidationErrorBorder, l.inputValidationErrorBackground = s.inputValidationErrorBackground, l.inputValidationErrorForeground = s.inputValidationErrorForeground;
- var d = s.history || [], h = !!s.flexibleHeight, p = !!s.flexibleWidth, g = s.flexibleMaxHeight;
- l.domNode = document.createElement("div"), i.addClass(l.domNode, "monaco-findInput"), l.inputBox = l._register(new o.HistoryInputBox(l.domNode, l.contextViewProvider, {
- ariaLabel: l.label || "",
- placeholder: l.placeholder || "",
- validationOptions: {validation: l.validation},
- inputBackground: l.inputBackground,
- inputForeground: l.inputForeground,
- inputBorder: l.inputBorder,
- inputValidationInfoBackground: l.inputValidationInfoBackground,
- inputValidationInfoForeground: l.inputValidationInfoForeground,
- inputValidationInfoBorder: l.inputValidationInfoBorder,
- inputValidationWarningBackground: l.inputValidationWarningBackground,
- inputValidationWarningForeground: l.inputValidationWarningForeground,
- inputValidationWarningBorder: l.inputValidationWarningBorder,
- inputValidationErrorBackground: l.inputValidationErrorBackground,
- inputValidationErrorForeground: l.inputValidationErrorForeground,
- inputValidationErrorBorder: l.inputValidationErrorBorder,
- history: d,
- flexibleHeight: h,
- flexibleWidth: p,
- flexibleMaxHeight: g
- })), l.preserveCase = l._register(new c({
- appendTitle: "",
- isChecked: !1,
- inputActiveOptionBorder: l.inputActiveOptionBorder,
- inputActiveOptionBackground: l.inputActiveOptionBackground
- })), l._register(l.preserveCase.onChange((function (e) {
- l._onDidOptionChange.fire(e), !e && l.fixFocusOnOptionClickEnabled && l.inputBox.focus(),
- l.validate()
- }))), l._register(l.preserveCase.onKeyDown((function (e) {
- l._onPreserveCaseKeyDown.fire(e)
- }))), l._showOptionButtons ? l.cachedOptionsWidth = l.preserveCase.width() : l.cachedOptionsWidth = 0;
- var f = [l.preserveCase.domNode];
- l.onkeydown(l.domNode, (function (e) {
- if (e.equals(15) || e.equals(17) || e.equals(9)) {
- var t = f.indexOf(document.activeElement);
- if (t >= 0) {
- var n = -1;
- e.equals(17) ? n = (t + 1) % f.length : e.equals(15) && (n = 0 === t ? f.length - 1 : t - 1), e.equals(9) ? f[t].blur() : n >= 0 && f[n].focus(), i.EventHelper.stop(e, !0)
- }
- }
- }));
- var m = document.createElement("div");
- return m.className = "controls", m.style.display = l._showOptionButtons ? "block" : "none", m.appendChild(l.preserveCase.domNode), l.domNode.appendChild(m), t && t.appendChild(l.domNode), l.onkeydown(l.inputBox.inputElement, (function (e) {
- return l._onKeyDown.fire(e)
- })), l.onkeyup(l.inputBox.inputElement, (function (e) {
- return l._onKeyUp.fire(e)
- })), l.oninput(l.inputBox.inputElement, (function (e) {
- return l._onInput.fire()
- })), l.onmousedown(l.inputBox.inputElement, (function (e) {
- return l._onMouseDown.fire(e)
- })), l
- }
- return r(t, e), t.prototype.enable = function () {
- i.removeClass(this.domNode, "disabled"), this.inputBox.enable(), this.preserveCase.enable()
- }, t.prototype.disable = function () {
- i.addClass(this.domNode, "disabled"), this.inputBox.disable(), this.preserveCase.disable()
- }, t.prototype.setEnabled = function (e) {
- e ? this.enable() : this.disable()
- }, t.prototype.style = function (e) {
- this.inputActiveOptionBorder = e.inputActiveOptionBorder, this.inputActiveOptionBackground = e.inputActiveOptionBackground, this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = e.inputValidationInfoBackground, this.inputValidationInfoForeground = e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, this.inputValidationWarningBackground = e.inputValidationWarningBackground, this.inputValidationWarningForeground = e.inputValidationWarningForeground, this.inputValidationWarningBorder = e.inputValidationWarningBorder,
- this.inputValidationErrorBackground = e.inputValidationErrorBackground, this.inputValidationErrorForeground = e.inputValidationErrorForeground, this.inputValidationErrorBorder = e.inputValidationErrorBorder, this.applyStyles()
- }, t.prototype.applyStyles = function () {
- if (this.domNode) {
- var e = {
- inputActiveOptionBorder: this.inputActiveOptionBorder,
- inputActiveOptionBackground: this.inputActiveOptionBackground
- };
- this.preserveCase.style(e);
- var t = {
- inputBackground: this.inputBackground,
- inputForeground: this.inputForeground,
- inputBorder: this.inputBorder,
- inputValidationInfoBackground: this.inputValidationInfoBackground,
- inputValidationInfoForeground: this.inputValidationInfoForeground,
- inputValidationInfoBorder: this.inputValidationInfoBorder,
- inputValidationWarningBackground: this.inputValidationWarningBackground,
- inputValidationWarningForeground: this.inputValidationWarningForeground,
- inputValidationWarningBorder: this.inputValidationWarningBorder,
- inputValidationErrorBackground: this.inputValidationErrorBackground,
- inputValidationErrorForeground: this.inputValidationErrorForeground,
- inputValidationErrorBorder: this.inputValidationErrorBorder
- };
- this.inputBox.style(t)
- }
- }, t.prototype.select = function () {
- this.inputBox.select()
- }, t.prototype.focus = function () {
- this.inputBox.focus()
- }, t.prototype.getPreserveCase = function () {
- return this.preserveCase.checked
- }, t.prototype.setPreserveCase = function (e) {
- this.preserveCase.checked = e
- }, t.prototype.focusOnPreserve = function () {
- this.preserveCase.focus()
- }, t.prototype.validate = function () {
- this.inputBox && this.inputBox.validate()
- }, Object.defineProperty(t.prototype, "width", {
- set: function (e) {
- this.inputBox.paddingRight = this.cachedOptionsWidth, this.inputBox.width = e, this.domNode.style.width = e + "px"
- }, enumerable: !0, configurable: !0
- }), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t
- }(s.Widget);
- t.ReplaceInput = h
- })), define(n[402], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/keybindingLabel/keybindingLabel", t)
- })), define(n[403], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/list/listWidget", t)
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[153], i([0, 1, 403, 2, 21, 19, 101, 6, 16, 57, 56, 4, 52, 239, 140, 27, 31, 240, 131, 61, 271]), (function (e, t, n, i, o, s, u, d, c, p, g, f, m, v, _, y, C, b, S, w) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var E = function () {
- function e(e) {
- this.trait = e, this.renderedElements = []
- }
- return Object.defineProperty(e.prototype, "templateId", {
- get: function () {
- return "template:" + this.trait.trait
- }, enumerable: !0, configurable: !0
- }), e.prototype.renderTemplate = function (e) {
- return e
- }, e.prototype.renderElement = function (e, t, n) {
- var i = s.firstIndex(this.renderedElements, (function (e) {
- return e.templateData === n
- }));
- if (i >= 0) {
- var o = this.renderedElements[i];
- this.trait.unrender(n), o.index = t
- } else {
- o = {index: t, templateData: n};
- this.renderedElements.push(o)
- }
- this.trait.renderIndex(t, n)
- },
- e.prototype.splice = function (e, t, n) {
- for (var i = [], o = 0, r = this.renderedElements; o < r.length; o++) {
- var s = r[o];
- s.index < e ? i.push(s) : s.index >= e + t && i.push({
- index: s.index + n - t,
- templateData: s.templateData
- })
- }
- this.renderedElements = i
- }, e.prototype.renderIndexes = function (e) {
- for (var t = 0, n = this.renderedElements; t < n.length; t++) {
- var i = n[t], o = i.index, r = i.templateData;
- e.indexOf(o) > -1 && this.trait.renderIndex(o, r)
- }
- }, e.prototype.disposeTemplate = function (e) {
- var t = s.firstIndex(this.renderedElements, (function (t) {
- return t.templateData === e
- }));
- t < 0 || this.renderedElements.splice(t, 1)
- }, e
- }(), L = function () {
- function e(e) {
- this._trait = e, this.indexes = [], this.sortedIndexes = [], this._onChange = new f.Emitter, this.onChange = this._onChange.event
- }
- return Object.defineProperty(e.prototype, "trait", {
- get: function () {
- return this._trait
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "renderer", {
- get: function () {
- return new E(this)
- }, enumerable: !0, configurable: !0
- }), e.prototype.splice = function (e, t, n) {
- var i = n.length - t, o = e + t, r = a(this.sortedIndexes.filter((function (t) {
- return t < e
- })), n.map((function (t, n) {
- return t ? n + e : -1
- })).filter((function (e) {
- return -1 !== e
- })), this.sortedIndexes.filter((function (e) {
- return e >= o
- })).map((function (e) {
- return e + i
- })));
- this.renderer.splice(e, t, n.length), this._set(r, r)
- }, e.prototype.renderIndex = function (e, t) {
- d.toggleClass(t, this._trait, this.contains(e))
- }, e.prototype.unrender = function (e) {
- d.removeClass(e, this._trait)
- }, e.prototype.set = function (e, t) {
- return this._set(e, a(e).sort(K), t)
- }, e.prototype._set = function (e, t, n) {
- var i = this.indexes, o = this.sortedIndexes;
- this.indexes = e, this.sortedIndexes = t;
- var r = H(o, e);
- return this.renderer.renderIndexes(r), this._onChange.fire({indexes: e, browserEvent: n}), i
- }, e.prototype.get = function () {
- return this.indexes
- }, e.prototype.contains = function (e) {
- return s.binarySearch(this.sortedIndexes, e, K) >= 0
- }, e.prototype.dispose = function () {
- i.dispose(this._onChange)
- }, h([u.memoize], e.prototype, "renderer", null), e
- }(), D = function (e) {
- function t() {
- return e.call(this, "focused") || this
- }
- return r(t, e), t.prototype.renderIndex = function (t, n) {
- e.prototype.renderIndex.call(this, t, n), this.contains(t) ? n.setAttribute("aria-selected", "true") : n.removeAttribute("aria-selected")
- }, t
- }(L), N = function () {
- function e(e, t, n) {
- this.trait = e, this.view = t, this.identityProvider = n
- }
- return e.prototype.splice = function (e, t, n) {
- var i = this;
- if (!this.identityProvider) return this.trait.splice(e, t, n.map((function () {
- return !1
- })));
- var o = this.trait.get().map((function (e) {
- return i.identityProvider.getId(i.view.element(e)).toString()
- })), r = n.map((function (e) {
- return o.indexOf(i.identityProvider.getId(e).toString()) > -1
- }));
- this.trait.splice(e, t, r)
- }, e
- }();
- function x(e) {
- return "INPUT" === e.tagName || "TEXTAREA" === e.tagName
- }
- var I, M = function () {
- function e(e, t, n) {
- this.list = e, this.view = t, this.disposables = new i.DisposableStore;
- var o = !1 !== n.multipleSelectionSupport;
- this.openController = n.openController || F;
- var r = f.Event.chain(m.domEvent(t.domNode, "keydown")).filter((function (e) {
- return !x(e.target)
- })).map((function (e) {
- return new g.StandardKeyboardEvent(e)
- }))
- ;r.filter((function (e) {
- return 3 === e.keyCode
- })).on(this.onEnter, this, this.disposables), r.filter((function (e) {
- return 16 === e.keyCode
- })).on(this.onUpArrow, this, this.disposables), r.filter((function (e) {
- return 18 === e.keyCode
- })).on(this.onDownArrow, this, this.disposables), r.filter((function (e) {
- return 11 === e.keyCode
- })).on(this.onPageUpArrow, this, this.disposables), r.filter((function (e) {
- return 12 === e.keyCode
- })).on(this.onPageDownArrow, this, this.disposables), r.filter((function (e) {
- return 9 === e.keyCode
- })).on(this.onEscape, this, this.disposables), o && r.filter((function (e) {
- return (c.isMacintosh ? e.metaKey : e.ctrlKey) && 31 === e.keyCode
- })).on(this.onCtrlA, this, this.disposables)
- }
- return e.prototype.onEnter = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.setSelection(this.list.getFocus(), e.browserEvent), this.openController.shouldOpen(e.browserEvent) && this.list.open(this.list.getFocus(), e.browserEvent)
- }, e.prototype.onUpArrow = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.focusPrevious(1, !1, e.browserEvent),
- this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
- }, e.prototype.onDownArrow = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.focusNext(1, !1, e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
- }, e.prototype.onPageUpArrow = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.focusPreviousPage(e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
- }, e.prototype.onPageDownArrow = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.focusNextPage(e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
- }, e.prototype.onCtrlA = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.setSelection(s.range(this.list.length), e.browserEvent), this.view.domNode.focus()
- }, e.prototype.onEscape = function (e) {
- e.preventDefault(), e.stopPropagation(), this.list.setSelection([], e.browserEvent), this.view.domNode.focus()
- }, e.prototype.dispose = function () {
- this.disposables.dispose()
- }, e
- }();
- !function (e) {
- e[e.Idle = 0] = "Idle", e[e.Typing = 1] = "Typing"
- }(I || (I = {})), t.DefaultKeyboardNavigationDelegate = new (function () {
- function e() {
- }
- return e.prototype.mightProducePrintableCharacter = function (e) {
- return !(e.ctrlKey || e.metaKey || e.altKey) && (e.keyCode >= 31 && e.keyCode <= 56 || e.keyCode >= 21 && e.keyCode <= 30 || e.keyCode >= 93 && e.keyCode <= 102 || e.keyCode >= 80 && e.keyCode <= 90)
- }, e
- }());
- var k = function () {
- function e(e, t, n, o) {
- this.list = e, this.view = t, this.keyboardNavigationLabelProvider = n, this.delegate = o, this.enabled = !1, this.state = I.Idle, this.automaticKeyboardNavigation = !0, this.triggered = !1, this.enabledDisposables = new i.DisposableStore, this.disposables = new i.DisposableStore, this.updateOptions(e.options)
- }
- return e.prototype.updateOptions = function (e) {
- void 0 === e.enableKeyboardNavigation || !!e.enableKeyboardNavigation ? this.enable() : this.disable(), void 0 !== e.automaticKeyboardNavigation && (this.automaticKeyboardNavigation = e.automaticKeyboardNavigation)
- }, e.prototype.enable = function () {
- var e = this;
- if (!this.enabled) {
- var t = f.Event.chain(m.domEvent(this.view.domNode, "keydown")).filter((function (e) {
- return !x(e.target)
- })).filter((function () {
- return e.automaticKeyboardNavigation || e.triggered
- })).map((function (e) {
- return new g.StandardKeyboardEvent(e)
- })).filter((function (t) {
- return e.delegate.mightProducePrintableCharacter(t)
- })).forEach((function (e) {
- e.stopPropagation(), e.preventDefault()
- })).map((function (e) {
- return e.browserEvent.key
- })).event, n = f.Event.debounce(t, (function () {
- return null
- }), 800);
- f.Event.reduce(f.Event.any(t, n), (function (e, t) {
- return null === t ? null : (e || "") + t
- }))(this.onInput, this, this.enabledDisposables), this.enabled = !0, this.triggered = !1
- }
- }, e.prototype.disable = function () {
- this.enabled && (this.enabledDisposables.clear(), this.enabled = !1, this.triggered = !1)
- }, e.prototype.onInput = function (e) {
- if (!e) return this.state = I.Idle, void (this.triggered = !1);
- var t = this.list.getFocus(), n = t.length > 0 ? t[0] : 0, i = this.state === I.Idle ? 1 : 0;
- this.state = I.Typing;
- for (var o = 0; o < this.list.length; o++) {
- var r = (n + o + i) % this.list.length,
- s = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(r)),
- a = s && s.toString();
- if (void 0 === a || w.matchesPrefix(e, a)) return this.list.setFocus([r]), void this.list.reveal(r)
- }
- }, e.prototype.dispose = function () {
- this.disable(), this.enabledDisposables.dispose(), this.disposables.dispose()
- }, e
- }(), T = function () {
- function e(e, t) {
- this.list = e, this.view = t, this.disposables = new i.DisposableStore, f.Event.chain(m.domEvent(t.domNode, "keydown")).filter((function (e) {
- return !x(e.target)
- })).map((function (e) {
- return new g.StandardKeyboardEvent(e)
- })).filter((function (e) {
- return !(2 !== e.keyCode || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
- })).on(this.onTab, this, this.disposables)
- }
- return e.prototype.onTab = function (e) {
- if (e.target === this.view.domNode) {
- var t = this.list.getFocus();
- if (0 !== t.length) {
- var n = this.view.domElement(t[0]);
- if (n) {
- var i = n.querySelector("[tabIndex]");
- if (i && i instanceof HTMLElement && -1 !== i.tabIndex) {
- var o = window.getComputedStyle(i)
- ;"hidden" !== o.visibility && "none" !== o.display && (e.preventDefault(), e.stopPropagation(), i.focus())
- }
- }
- }
- }
- }, e.prototype.dispose = function () {
- this.disposables.dispose()
- }, e
- }();
- function R(e) {
- return c.isMacintosh ? e.browserEvent.metaKey : e.browserEvent.ctrlKey
- }
- function O(e) {
- return e.browserEvent.shiftKey
- }
- function P(e) {
- return e instanceof MouseEvent && 2 === e.button
- }
- t.isSelectionSingleChangeEvent = R, t.isSelectionRangeChangeEvent = O;
- var A = {isSelectionSingleChangeEvent: R, isSelectionRangeChangeEvent: O}, F = {
- shouldOpen: function (e) {
- return !(e instanceof MouseEvent) || !P(e)
- }
- }, W = function () {
- function e(e) {
- this.list = e, this.disposables = new i.DisposableStore, this.multipleSelectionSupport = !(!1 === e.options.multipleSelectionSupport), this.multipleSelectionSupport && (this.multipleSelectionController = e.options.multipleSelectionController || A), this.openController = e.options.openController || F, this.mouseSupport = void 0 === e.options.mouseSupport || !!e.options.mouseSupport, this.mouseSupport && (e.onMouseDown(this.onMouseDown, this, this.disposables),
- e.onContextMenu(this.onContextMenu, this, this.disposables), e.onMouseDblClick(this.onDoubleClick, this, this.disposables), e.onTouchStart(this.onMouseDown, this, this.disposables), this.disposables.add(p.Gesture.addTarget(e.getHTMLElement()))), e.onMouseClick(this.onPointer, this, this.disposables), e.onMouseMiddleClick(this.onPointer, this, this.disposables), e.onTap(this.onPointer, this, this.disposables)
- }
- return e.prototype.isSelectionSingleChangeEvent = function (e) {
- return this.multipleSelectionController ? this.multipleSelectionController.isSelectionSingleChangeEvent(e) : c.isMacintosh ? e.browserEvent.metaKey : e.browserEvent.ctrlKey
- }, e.prototype.isSelectionRangeChangeEvent = function (e) {
- return this.multipleSelectionController ? this.multipleSelectionController.isSelectionRangeChangeEvent(e) : e.browserEvent.shiftKey
- }, e.prototype.isSelectionChangeEvent = function (e) {
- return this.isSelectionSingleChangeEvent(e) || this.isSelectionRangeChangeEvent(e)
- }, e.prototype.onMouseDown = function (e) {
- document.activeElement !== e.browserEvent.target && this.list.domFocus()
- }, e.prototype.onContextMenu = function (e) {
- var t = void 0 === e.index ? [] : [e.index];
- this.list.setFocus(t, e.browserEvent)
- }, e.prototype.onPointer = function (e) {
- if (this.mouseSupport && !x(e.browserEvent.target)) {
- var t = this.list.getFocus()[0], n = this.list.getSelection();
- t = void 0 === t ? n[0] : t;
- var i = e.index;
- if (void 0 === i) return this.list.setFocus([], e.browserEvent), void this.list.setSelection([], e.browserEvent);
- if (this.multipleSelectionSupport && this.isSelectionRangeChangeEvent(e)) return this.changeSelection(e, t);
- if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) return this.changeSelection(e, t);
- this.list.setFocus([i], e.browserEvent), P(e.browserEvent) || (this.list.setSelection([i], e.browserEvent), this.openController.shouldOpen(e.browserEvent) && this.list.open([i], e.browserEvent))
- }
- }, e.prototype.onDoubleClick = function (e) {
- if (!(x(e.browserEvent.target) || this.multipleSelectionSupport && this.isSelectionChangeEvent(e))) {
- var t = this.list.getFocus()
- ;this.list.setSelection(t, e.browserEvent), this.list.pin(t)
- }
- }, e.prototype.changeSelection = function (e, t) {
- var n = e.index;
- if (this.isSelectionRangeChangeEvent(e) && void 0 !== t) {
- var i = Math.min(t, n), o = Math.max(t, n), r = s.range(i, o + 1), l = function (e, t) {
- var n = e.indexOf(t);
- if (-1 === n) return [];
- var i = [], o = n - 1;
- for (; o >= 0 && e[o] === t - (n - o);) i.push(e[o--]);
- i.reverse(), o = n;
- for (; o < e.length && e[o] === t + (o - n);) i.push(e[o++]);
- return i
- }(H(d = this.list.getSelection(), [t]), t);
- if (0 === l.length) return;
- var u = H(r, function (e, t) {
- var n = [], i = 0, o = 0;
- for (; i < e.length || o < t.length;) if (i >= e.length) n.push(t[o++]); else if (o >= t.length) n.push(e[i++]); else {
- if (e[i] === t[o]) {
- i++, o++;
- continue
- }
- e[i] < t[o] ? n.push(e[i++]) : o++
- }
- return n
- }(d, l));
- this.list.setSelection(u, e.browserEvent)
- } else if (this.isSelectionSingleChangeEvent(e)) {
- var d;
- u = (d = this.list.getSelection()).filter((function (e) {
- return e !== n
- }));
- this.list.setFocus([n]), d.length === u.length ? this.list.setSelection(a(u, [n]), e.browserEvent) : this.list.setSelection(u, e.browserEvent)
- }
- }, e.prototype.dispose = function () {
- this.disposables.dispose()
- }, e
- }();
- t.MouseController = W;
- var B = function () {
- function e(e, t) {
- this.styleElement = e, this.selectorSuffix = t
- }
- return e.prototype.style = function (e) {
- var t = this.selectorSuffix && "." + this.selectorSuffix, n = [];
- e.listBackground && (e.listBackground.isOpaque() ? n.push(".monaco-list" + t + " .monaco-list-rows { background: " + e.listBackground + "; }") : c.isMacintosh || console.warn("List with id '" + this.selectorSuffix + "' was styled with a non-opaque background color. This will break sub-pixel antialiasing.")), e.listFocusBackground && (n.push(".monaco-list" + t + ":focus .monaco-list-row.focused { background-color: " + e.listFocusBackground + "; }"), n.push(".monaco-list" + t + ":focus .monaco-list-row.focused:hover { background-color: " + e.listFocusBackground + "; }")), e.listFocusForeground && n.push(".monaco-list" + t + ":focus .monaco-list-row.focused { color: " + e.listFocusForeground + "; }"),
- e.listActiveSelectionBackground && (n.push(".monaco-list" + t + ":focus .monaco-list-row.selected { background-color: " + e.listActiveSelectionBackground + "; }"), n.push(".monaco-list" + t + ":focus .monaco-list-row.selected:hover { background-color: " + e.listActiveSelectionBackground + "; }")), e.listActiveSelectionForeground && n.push(".monaco-list" + t + ":focus .monaco-list-row.selected { color: " + e.listActiveSelectionForeground + "; }"), e.listFocusAndSelectionBackground && n.push("\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list" + t + ":focus .monaco-list-row.selected.focused { background-color: " + e.listFocusAndSelectionBackground + "; }\n\t\t\t"), e.listFocusAndSelectionForeground && n.push("\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list" + t + ":focus .monaco-list-row.selected.focused { color: " + e.listFocusAndSelectionForeground + "; }\n\t\t\t"), e.listInactiveFocusBackground && (n.push(".monaco-list" + t + " .monaco-list-row.focused { background-color: " + e.listInactiveFocusBackground + "; }"),
- n.push(".monaco-list" + t + " .monaco-list-row.focused:hover { background-color: " + e.listInactiveFocusBackground + "; }")), e.listInactiveSelectionBackground && (n.push(".monaco-list" + t + " .monaco-list-row.selected { background-color: " + e.listInactiveSelectionBackground + "; }"), n.push(".monaco-list" + t + " .monaco-list-row.selected:hover { background-color: " + e.listInactiveSelectionBackground + "; }")), e.listInactiveSelectionForeground && n.push(".monaco-list" + t + " .monaco-list-row.selected { color: " + e.listInactiveSelectionForeground + "; }"), e.listHoverBackground && n.push(".monaco-list" + t + ":not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: " + e.listHoverBackground + "; }"), e.listHoverForeground && n.push(".monaco-list" + t + " .monaco-list-row:hover:not(.selected):not(.focused) { color: " + e.listHoverForeground + "; }"), e.listSelectionOutline && n.push(".monaco-list" + t + " .monaco-list-row.selected { outline: 1px dotted " + e.listSelectionOutline + "; outline-offset: -1px; }"),
- e.listFocusOutline && n.push("\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list" + t + ":focus .monaco-list-row.focused { outline: 1px solid " + e.listFocusOutline + "; outline-offset: -1px; }\n\t\t\t"), e.listInactiveFocusOutline && n.push(".monaco-list" + t + " .monaco-list-row.focused { outline: 1px dotted " + e.listInactiveFocusOutline + "; outline-offset: -1px; }"), e.listHoverOutline && n.push(".monaco-list" + t + " .monaco-list-row:hover { outline: 1px dashed " + e.listHoverOutline + "; outline-offset: -1px; }"), e.listDropBackground && n.push("\n\t\t\t\t.monaco-list" + t + ".drop-target,\n\t\t\t\t.monaco-list" + t + " .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list" + t + " .monaco-list-row.drop-target { background-color: " + e.listDropBackground + " !important; color: inherit !important; }\n\t\t\t"), e.listFilterWidgetBackground && n.push(".monaco-list-type-filter { background-color: " + e.listFilterWidgetBackground + " }"), e.listFilterWidgetOutline && n.push(".monaco-list-type-filter { border: 1px solid " + e.listFilterWidgetOutline + "; }"),
- e.listFilterWidgetNoMatchesOutline && n.push(".monaco-list-type-filter.no-matches { border: 1px solid " + e.listFilterWidgetNoMatchesOutline + "; }"), e.listMatchesShadow && n.push(".monaco-list-type-filter { box-shadow: 1px 1px 1px " + e.listMatchesShadow + "; }");
- var i = n.join("\n");
- i !== this.styleElement.innerHTML && (this.styleElement.innerHTML = i)
- }, e
- }();
- t.DefaultStyleController = B;
- var V = {
- listFocusBackground: y.Color.fromHex("#7FB0D0"),
- listActiveSelectionBackground: y.Color.fromHex("#0E639C"),
- listActiveSelectionForeground: y.Color.fromHex("#FFFFFF"),
- listFocusAndSelectionBackground: y.Color.fromHex("#094771"),
- listFocusAndSelectionForeground: y.Color.fromHex("#FFFFFF"),
- listInactiveSelectionBackground: y.Color.fromHex("#3F3F46"),
- listHoverBackground: y.Color.fromHex("#2A2D2E"),
- listDropBackground: y.Color.fromHex("#383B3D"),
- treeIndentGuidesStroke: y.Color.fromHex("#a9a9a9")
- }, z = {
- keyboardSupport: !0, mouseSupport: !0, multipleSelectionSupport: !0, dnd: {
- getDragURI: function () {
- return null
- }, onDragStart: function () {
- }, onDragOver: function () {
- return !1
- },
- drop: function () {
- }
- }, ariaRootRole: v.ListAriaRootRole.TREE
- };
- function H(e, t) {
- for (var n = [], i = 0, o = 0; i < e.length || o < t.length;) if (i >= e.length) n.push(t[o++]); else if (o >= t.length) n.push(e[i++]); else {
- if (e[i] === t[o]) {
- n.push(e[i]), i++, o++;
- continue
- }
- e[i] < t[o] ? n.push(e[i++]) : n.push(t[o++])
- }
- return n
- }
- var K = function (e, t) {
- return e - t
- }, U = function () {
- function e(e, t) {
- this._templateId = e, this.renderers = t
- }
- return Object.defineProperty(e.prototype, "templateId", {
- get: function () {
- return this._templateId
- }, enumerable: !0, configurable: !0
- }), e.prototype.renderTemplate = function (e) {
- return this.renderers.map((function (t) {
- return t.renderTemplate(e)
- }))
- }, e.prototype.renderElement = function (e, t, n, i) {
- for (var o = 0, r = 0, s = this.renderers; r < s.length; r++) {
- s[r].renderElement(e, t, n[o++], i)
- }
- }, e.prototype.disposeElement = function (e, t, n, i) {
- for (var o = 0, r = 0, s = this.renderers; r < s.length; r++) {
- var a = s[r];
- a.disposeElement && a.disposeElement(e, t, n[o], i), o += 1
- }
- }, e.prototype.disposeTemplate = function (e) {
- for (var t = 0, n = 0, i = this.renderers; n < i.length; n++) {
- i[n].disposeTemplate(e[t++])
- }
- }, e
- }(), j = function () {
- function e(e) {
- this.accessibilityProvider = e, this.templateId = "a18n"
- }
- return e.prototype.renderTemplate = function (e) {
- return e
- }, e.prototype.renderElement = function (e, t, n) {
- var i = this.accessibilityProvider.getAriaLabel(e);
- i ? n.setAttribute("aria-label", i) : n.removeAttribute("aria-label");
- var o = this.accessibilityProvider.getAriaLevel && this.accessibilityProvider.getAriaLevel(e);
- "number" == typeof o ? n.setAttribute("aria-level", "" + o) : n.removeAttribute("aria-level")
- }, e.prototype.disposeTemplate = function (e) {
- }, e
- }(), q = function () {
- function e(e, t) {
- this.list = e, this.dnd = t
- }
- return e.prototype.getDragElements = function (e) {
- var t = this.list.getSelectedElements();
- return t.indexOf(e) > -1 ? t : [e]
- }, e.prototype.getDragURI = function (e) {
- return this.dnd.getDragURI(e)
- }, e.prototype.getDragLabel = function (e, t) {
- if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e, t)
- }, e.prototype.onDragStart = function (e, t) {
- this.dnd.onDragStart && this.dnd.onDragStart(e, t)
- }, e.prototype.onDragOver = function (e, t, n, i) {
- return this.dnd.onDragOver(e, t, n, i)
- },
- e.prototype.onDragEnd = function (e) {
- this.dnd.onDragEnd && this.dnd.onDragEnd(e)
- }, e.prototype.drop = function (e, t, n, i) {
- this.dnd.drop(e, t, n, i)
- }, e
- }(), G = function () {
- function e(e, o, r, s, u) {
- void 0 === u && (u = z), this.user = e, this._options = u, this.eventBufferer = new f.EventBufferer, this.disposables = new i.DisposableStore, this._onDidOpen = new f.Emitter, this.onDidOpen = this._onDidOpen.event, this._onDidPin = new f.Emitter, this.didJustPressContextMenuKey = !1, this._onDidDispose = new f.Emitter, this.onDidDispose = this._onDidDispose.event, this.focus = new D, this.selection = new L("selected"), C.mixin(u, V, !1);
- var c = [this.focus.renderer, this.selection.renderer];
- this.accessibilityProvider = u.accessibilityProvider, this.accessibilityProvider && (c.push(new j(this.accessibilityProvider)), this.accessibilityProvider.onDidChangeActiveDescendant && this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant, this, this.disposables)), s = s.map((function (e) {
- return new U(e.templateId, a(c, [e]))
- }));
- var h = l(l({}, u), {dnd: u.dnd && new q(this, u.dnd)})
- ;
- if (this.view = new _.ListView(o, r, s, h), "string" != typeof u.ariaRole ? this.view.domNode.setAttribute("role", v.ListAriaRootRole.TREE) : this.view.domNode.setAttribute("role", u.ariaRole), u.styleController) this.styleController = u.styleController(this.view.domId); else {
- var p = d.createStyleSheet(this.view.domNode);
- this.styleController = new B(p, this.view.domId)
- }
- if (this.spliceable = new b.CombinedSpliceable([new N(this.focus, this.view, u.identityProvider), new N(this.selection, this.view, u.identityProvider), this.view]), this.disposables.add(this.focus), this.disposables.add(this.selection), this.disposables.add(this.view), this.disposables.add(this._onDidDispose), this.onDidFocus = f.Event.map(m.domEvent(this.view.domNode, "focus", !0), (function () {
- return null
- })), this.onDidBlur = f.Event.map(m.domEvent(this.view.domNode, "blur", !0), (function () {
- return null
- })), this.disposables.add(new T(this, this.view)), "boolean" != typeof u.keyboardSupport || u.keyboardSupport) {
- var g = new M(this, this.view, u);
- this.disposables.add(g)
- }
- if (u.keyboardNavigationLabelProvider) {
- var y = u.keyboardNavigationDelegate || t.DefaultKeyboardNavigationDelegate;
- this.typeLabelController = new k(this, this.view, u.keyboardNavigationLabelProvider, y), this.disposables.add(this.typeLabelController)
- }
- this.disposables.add(this.createMouseController(u)), this.onFocusChange(this._onFocusChange, this, this.disposables), this.onSelectionChange(this._onSelectionChange, this, this.disposables), u.ariaLabel && this.view.domNode.setAttribute("aria-label", n.localize(0, null, u.ariaLabel))
- }
- return Object.defineProperty(e.prototype, "onFocusChange", {
- get: function () {
- var e = this;
- return f.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange), (function (t) {
- return e.toListEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onSelectionChange", {
- get: function () {
- var e = this;
- return f.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange), (function (t) {
- return e.toListEvent(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "domId", {
- get: function () {
- return this.view.domId
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseClick", {
- get: function () {
- return this.view.onMouseClick
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseDblClick", {
- get: function () {
- return this.view.onMouseDblClick
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseMiddleClick", {
- get: function () {
- return this.view.onMouseMiddleClick
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onMouseDown", {
- get: function () {
- return this.view.onMouseDown
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onTouchStart", {
- get: function () {
- return this.view.onTouchStart
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onTap", {
- get: function () {
- return this.view.onTap
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onContextMenu", {
- get: function () {
- var e = this, t = f.Event.chain(m.domEvent(this.view.domNode, "keydown")).map((function (e) {
- return new g.StandardKeyboardEvent(e)
- })).filter((function (t) {
- return e.didJustPressContextMenuKey = 58 === t.keyCode || t.shiftKey && 68 === t.keyCode
- })).filter((function (e) {
- return e.preventDefault(), e.stopPropagation(), !1
- })).event, n = f.Event.chain(m.domEvent(this.view.domNode, "keyup")).filter((function () {
- var t = e.didJustPressContextMenuKey;
- return e.didJustPressContextMenuKey = !1, t
- })).filter((function () {
- return e.getFocus().length > 0 && !!e.view.domElement(e.getFocus()[0])
- })).map((function (t) {
- var n = e.getFocus()[0];
- return {index: n, element: e.view.element(n), anchor: e.view.domElement(n), browserEvent: t}
- })).event, i = f.Event.chain(this.view.onContextMenu).filter((function () {
- return !e.didJustPressContextMenuKey
- })).map((function (e) {
- var t = e.element, n = e.index, i = e.browserEvent;
- return {element: t, index: n, anchor: {x: i.clientX + 1, y: i.clientY}, browserEvent: i}
- })).event;
- return f.Event.any(t, n, i)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onKeyDown", {
- get: function () {
- return m.domEvent(this.view.domNode, "keydown")
- }, enumerable: !0, configurable: !0
- }),
- e.prototype.createMouseController = function (e) {
- return new W(this)
- }, e.prototype.updateOptions = function (e) {
- void 0 === e && (e = {}), this._options = l(l({}, this._options), e), this.typeLabelController && this.typeLabelController.updateOptions(this._options)
- }, Object.defineProperty(e.prototype, "options", {
- get: function () {
- return this._options
- }, enumerable: !0, configurable: !0
- }), e.prototype.splice = function (e, t, n) {
- var i = this;
- if (void 0 === n && (n = []), e < 0 || e > this.view.length) throw new v.ListError(this.user, "Invalid start index: " + e);
- if (t < 0) throw new v.ListError(this.user, "Invalid delete count: " + t);
- 0 === t && 0 === n.length || this.eventBufferer.bufferEvents((function () {
- return i.spliceable.splice(e, t, n)
- }))
- }, e.prototype.rerender = function () {
- this.view.rerender()
- }, e.prototype.element = function (e) {
- return this.view.element(e)
- }, Object.defineProperty(e.prototype, "length", {
- get: function () {
- return this.view.length
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "contentHeight", {
- get: function () {
- return this.view.contentHeight
- }, enumerable: !0,
- configurable: !0
- }), Object.defineProperty(e.prototype, "scrollTop", {
- get: function () {
- return this.view.getScrollTop()
- }, set: function (e) {
- this.view.setScrollTop(e)
- }, enumerable: !0, configurable: !0
- }), e.prototype.domFocus = function () {
- this.view.domNode.focus()
- }, e.prototype.layout = function (e, t) {
- this.view.layout(e, t)
- }, e.prototype.setSelection = function (e, t) {
- for (var n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- if (o < 0 || o >= this.length) throw new v.ListError(this.user, "Invalid index " + o)
- }
- this.selection.set(e, t)
- }, e.prototype.getSelection = function () {
- return this.selection.get()
- }, e.prototype.getSelectedElements = function () {
- var e = this;
- return this.getSelection().map((function (t) {
- return e.view.element(t)
- }))
- }, e.prototype.setFocus = function (e, t) {
- for (var n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- if (o < 0 || o >= this.length) throw new v.ListError(this.user, "Invalid index " + o)
- }
- this.focus.set(e, t)
- }, e.prototype.focusNext = function (e, t, n, i) {
- if (void 0 === e && (e = 1), void 0 === t && (t = !1), 0 !== this.length) {
- var o = this.focus.get(), r = this.findNextIndex(o.length > 0 ? o[0] + e : 0, t, i)
- ;r > -1 && this.setFocus([r], n)
- }
- }, e.prototype.focusPrevious = function (e, t, n, i) {
- if (void 0 === e && (e = 1), void 0 === t && (t = !1), 0 !== this.length) {
- var o = this.focus.get(), r = this.findPreviousIndex(o.length > 0 ? o[0] - e : 0, t, i);
- r > -1 && this.setFocus([r], n)
- }
- }, e.prototype.focusNextPage = function (e, t) {
- var n = this, i = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight);
- i = 0 === i ? 0 : i - 1;
- var o = this.view.element(i), r = this.getFocusedElements()[0];
- if (r !== o) {
- var s = this.findPreviousIndex(i, !1, t);
- s > -1 && r !== this.view.element(s) ? this.setFocus([s], e) : this.setFocus([i], e)
- } else {
- var a = this.view.getScrollTop();
- this.view.setScrollTop(a + this.view.renderHeight - this.view.elementHeight(i)), this.view.getScrollTop() !== a && setTimeout((function () {
- return n.focusNextPage(e, t)
- }), 0)
- }
- }, e.prototype.focusPreviousPage = function (e, t) {
- var n, i = this, o = this.view.getScrollTop();
- n = 0 === o ? this.view.indexAt(o) : this.view.indexAfter(o - 1);
- var r = this.view.element(n), s = this.getFocusedElements()[0];
- if (s !== r) {
- var a = this.findNextIndex(n, !1, t)
- ;a > -1 && s !== this.view.element(a) ? this.setFocus([a], e) : this.setFocus([n], e)
- } else {
- var l = o;
- this.view.setScrollTop(o - this.view.renderHeight), this.view.getScrollTop() !== l && setTimeout((function () {
- return i.focusPreviousPage(e, t)
- }), 0)
- }
- }, e.prototype.focusLast = function (e, t) {
- if (0 !== this.length) {
- var n = this.findPreviousIndex(this.length - 1, !1, t);
- n > -1 && this.setFocus([n], e)
- }
- }, e.prototype.focusFirst = function (e, t) {
- if (0 !== this.length) {
- var n = this.findNextIndex(0, !1, t);
- n > -1 && this.setFocus([n], e)
- }
- }, e.prototype.findNextIndex = function (e, t, n) {
- void 0 === t && (t = !1);
- for (var i = 0; i < this.length; i++) {
- if (e >= this.length && !t) return -1;
- if (e %= this.length, !n || n(this.element(e))) return e;
- e++
- }
- return -1
- }, e.prototype.findPreviousIndex = function (e, t, n) {
- void 0 === t && (t = !1);
- for (var i = 0; i < this.length; i++) {
- if (e < 0 && !t) return -1;
- if (e = (this.length + e % this.length) % this.length, !n || n(this.element(e))) return e;
- e--
- }
- return -1
- }, e.prototype.getFocus = function () {
- return this.focus.get()
- }, e.prototype.getFocusedElements = function () {
- var e = this
- ;
- return this.getFocus().map((function (t) {
- return e.view.element(t)
- }))
- }, e.prototype.reveal = function (e, t) {
- if (e < 0 || e >= this.length) throw new v.ListError(this.user, "Invalid index " + e);
- var n = this.view.getScrollTop(), i = this.view.elementTop(e), r = this.view.elementHeight(e);
- if (o.isNumber(t)) {
- var s = r - this.view.renderHeight;
- this.view.setScrollTop(s * S.clamp(t, 0, 1) + i)
- } else {
- var a = i + r, l = n + this.view.renderHeight;
- i < n && a >= l || (i < n ? this.view.setScrollTop(i) : a >= l && this.view.setScrollTop(a - this.view.renderHeight))
- }
- }, e.prototype.getRelativeTop = function (e) {
- if (e < 0 || e >= this.length) throw new v.ListError(this.user, "Invalid index " + e);
- var t = this.view.getScrollTop(), n = this.view.elementTop(e), i = this.view.elementHeight(e);
- if (n < t || n + i > t + this.view.renderHeight) return null;
- var o = i - this.view.renderHeight;
- return Math.abs((t - n) / o)
- }, e.prototype.getHTMLElement = function () {
- return this.view.domNode
- }, e.prototype.open = function (e, t) {
- for (var n = this, i = 0, o = e; i < o.length; i++) {
- var r = o[i];
- if (r < 0 || r >= this.length) throw new v.ListError(this.user, "Invalid index " + r)
- }
- this._onDidOpen.fire({
- indexes: e, elements: e.map((function (e) {
- return n.view.element(e)
- })), browserEvent: t
- })
- }, e.prototype.pin = function (e, t) {
- for (var n = this, i = 0, o = e; i < o.length; i++) {
- var r = o[i];
- if (r < 0 || r >= this.length) throw new v.ListError(this.user, "Invalid index " + r)
- }
- this._onDidPin.fire({
- indexes: e, elements: e.map((function (e) {
- return n.view.element(e)
- })), browserEvent: t
- })
- }, e.prototype.style = function (e) {
- this.styleController.style(e)
- }, e.prototype.toListEvent = function (e) {
- var t = this, n = e.indexes, i = e.browserEvent;
- return {
- indexes: n, elements: n.map((function (e) {
- return t.view.element(e)
- })), browserEvent: i
- }
- }, e.prototype._onFocusChange = function () {
- var e = this.focus.get();
- d.toggleClass(this.view.domNode, "element-focused", e.length > 0), this.onDidChangeActiveDescendant()
- }, e.prototype.onDidChangeActiveDescendant = function () {
- var e, t = this.focus.get();
- if (t.length > 0) {
- var n = void 0;
- (null === (e = this.accessibilityProvider) || void 0 === e ? void 0 : e.getActiveDescendantId) && (n = this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),
- this.view.domNode.setAttribute("aria-activedescendant", n || this.view.getElementDomId(t[0]))
- } else this.view.domNode.removeAttribute("aria-activedescendant")
- }, e.prototype._onSelectionChange = function () {
- var e = this.selection.get();
- d.toggleClass(this.view.domNode, "selection-none", 0 === e.length), d.toggleClass(this.view.domNode, "selection-single", 1 === e.length), d.toggleClass(this.view.domNode, "selection-multiple", e.length > 1)
- }, e.prototype.dispose = function () {
- this._onDidDispose.fire(), this.disposables.dispose(), this._onDidOpen.dispose(), this._onDidPin.dispose(), this._onDidDispose.dispose()
- }, h([u.memoize], e.prototype, "onFocusChange", null), h([u.memoize], e.prototype, "onSelectionChange", null), h([u.memoize], e.prototype, "onContextMenu", null), e
- }();
- t.List = G
- })), define(n[404], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/menu/menu", t)
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0
- ;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[205], i([0, 1, 404, 5, 55, 70, 6, 56, 15, 2, 53, 16, 272]), (function (e, t, n, i, o, s, l, u, d, c, h, p) {
- "use strict";
- var g;
- Object.defineProperty(t, "__esModule", {value: !0}), t.MENU_MNEMONIC_REGEX = /\(&([^\s&])\)|(^|[^&])&([^\s&])/, t.MENU_ESCAPED_MNEMONIC_REGEX = /(&)?(&)([^\s&])/g, function (e) {
- e[e.Right = 0] = "Right", e[e.Left = 1] = "Left"
- }(g = t.Direction || (t.Direction = {}));
- var f = function (e) {
- function t(t, n, i) {
- var o = e.call(this, i || "submenu", t, "", !0) || this;
- return o.entries = n, o
- }
- return r(t, e), t
- }(o.Action);
- t.SubmenuAction = f;
- var m = function (e) {
- function t(t, n, i) {
- void 0 === i && (i = {});
- var o = this;
- l.addClass(t, "monaco-menu-container"), t.setAttribute("role", "presentation");
- var r = document.createElement("div");
- l.addClass(r, "monaco-menu"), r.setAttribute("role", "presentation"), (o = e.call(this, r, {
- orientation: 2, actionViewItemProvider: function (e) {
- return o.doGetActionViewItem(e, i, s)
- }, context: i.context, actionRunner: i.actionRunner, ariaLabel: i.ariaLabel, triggerKeys: {
- keys: a([3], p.isMacintosh ? [10] : []), keyDown: !0
- }
- }) || this).menuElement = r, o.actionsList.setAttribute("role", "menu"), o.actionsList.tabIndex = 0, o.menuDisposables = o._register(new c.DisposableStore), l.addDisposableListener(r, l.EventType.KEY_DOWN, (function (e) {
- new u.StandardKeyboardEvent(e).equals(2) && e.preventDefault()
- })), i.enableMnemonics && o.menuDisposables.add(l.addDisposableListener(r, l.EventType.KEY_DOWN, (function (e) {
- var t = e.key.toLocaleLowerCase();
- if (o.mnemonics.has(t)) {
- l.EventHelper.stop(e, !0);
- var n = o.mnemonics.get(t);
- if (1 === n.length && (n[0] instanceof _ && n[0].container && o.focusItemByElement(n[0].container), n[0].onClick(e)), n.length > 1) {
- var i = n.shift();
- i && i.container && (o.focusItemByElement(i.container), n.push(i)), o.mnemonics.set(t, n)
- }
- }
- }))), p.isLinux && o._register(l.addDisposableListener(r, l.EventType.KEY_DOWN, (function (e) {
- var t = new u.StandardKeyboardEvent(e);
- t.equals(14) || t.equals(11) ? (o.focusedItem = o.viewItems.length - 1, o.focusNext(), l.EventHelper.stop(e, !0)) : (t.equals(13) || t.equals(12)) && (o.focusedItem = 0,
- o.focusPrevious(), l.EventHelper.stop(e, !0))
- }))), o._register(l.addDisposableListener(o.domNode, l.EventType.MOUSE_OUT, (function (e) {
- var t = e.relatedTarget;
- l.isAncestor(t, o.domNode) || (o.focusedItem = void 0, o.updateFocus(), e.stopPropagation())
- }))), o._register(l.addDisposableListener(o.actionsList, l.EventType.MOUSE_OVER, (function (e) {
- var t = e.target;
- if (t && l.isAncestor(t, o.actionsList) && t !== o.actionsList) {
- for (; t.parentElement !== o.actionsList && null !== t.parentElement;) t = t.parentElement;
- if (l.hasClass(t, "action-item")) {
- var n = o.focusedItem;
- o.setFocusedItem(t), n !== o.focusedItem && o.updateFocus()
- }
- }
- })));
- var s = {parent: o};
- o.mnemonics = new Map, o.scrollableElement = o._register(new h.DomScrollableElement(r, {
- alwaysConsumeMouseWheel: !0,
- horizontal: 2,
- vertical: 3,
- verticalScrollbarSize: 7,
- handleMouseWheel: !0,
- useShadows: !0
- }));
- var d = o.scrollableElement.getDomNode();
- return d.style.position = "", o._register(l.addDisposableListener(d, l.EventType.MOUSE_UP, (function (e) {
- e.preventDefault()
- }))),
- r.style.maxHeight = Math.max(10, window.innerHeight - t.getBoundingClientRect().top - 30) + "px", o.push(n, {
- icon: !0,
- label: !0,
- isMenu: !0
- }), t.appendChild(o.scrollableElement.getDomNode()), o.scrollableElement.scanDomNode(), o.viewItems.filter((function (e) {
- return !(e instanceof y)
- })).forEach((function (e, t, n) {
- e.updatePositionInSet(t + 1, n.length)
- })), o
- }
- return r(t, e), t.prototype.style = function (e) {
- var t = this.getContainer(), n = e.foregroundColor ? "" + e.foregroundColor : "",
- i = e.backgroundColor ? "" + e.backgroundColor : "",
- o = e.borderColor ? "1px solid " + e.borderColor : "",
- r = e.shadowColor ? "0 2px 4px " + e.shadowColor : "";
- t.style.border = o, this.domNode.style.color = n, this.domNode.style.backgroundColor = i, t.style.boxShadow = r, this.viewItems && this.viewItems.forEach((function (t) {
- (t instanceof v || t instanceof y) && t.style(e)
- }))
- }, t.prototype.getContainer = function () {
- return this.scrollableElement.getDomNode()
- }, Object.defineProperty(t.prototype, "onScroll", {
- get: function () {
- return this.scrollableElement.onScroll
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(t.prototype, "scrollOffset", {
- get: function () {
- return this.menuElement.scrollTop
- }, enumerable: !0, configurable: !0
- }), t.prototype.focusItemByElement = function (e) {
- var t = this.focusedItem;
- this.setFocusedItem(e), t !== this.focusedItem && this.updateFocus()
- }, t.prototype.setFocusedItem = function (e) {
- for (var t = 0; t < this.actionsList.children.length; t++) {
- if (e === this.actionsList.children[t]) {
- this.focusedItem = t;
- break
- }
- }
- }, t.prototype.updateFocus = function (t) {
- e.prototype.updateFocus.call(this, t, !0), void 0 !== this.focusedItem && this.scrollableElement.setScrollPosition({scrollTop: Math.round(this.menuElement.scrollTop)})
- }, t.prototype.doGetActionViewItem = function (e, t, n) {
- if (e instanceof s.Separator) return new y(t.context, e, {icon: !0});
- if (e instanceof f) {
- var i = new _(e, e.entries, n, t);
- if (t.enableMnemonics) if ((u = i.getMnemonic()) && i.isEnabled()) {
- var o = [];
- this.mnemonics.has(u) && (o = this.mnemonics.get(u)), o.push(i), this.mnemonics.set(u, o)
- }
- return i
- }
- var r = {enableMnemonics: t.enableMnemonics};
- if (t.getKeyBinding) {
- var a = t.getKeyBinding(e)
- ;
- if (a) {
- var l = a.getLabel();
- l && (r.keybinding = l)
- }
- }
- var u;
- i = new v(t.context, e, r);
- if (t.enableMnemonics && (u = i.getMnemonic()) && i.isEnabled()) {
- o = [];
- this.mnemonics.has(u) && (o = this.mnemonics.get(u)), o.push(i), this.mnemonics.set(u, o)
- }
- return i
- }, t
- }(s.ActionBar);
- t.Menu = m;
- var v = function (e) {
- function o(n, i, o) {
- void 0 === o && (o = {});
- var r = this;
- if (o.isMenu = !0, (r = e.call(this, i, i, o) || this).options = o, r.options.icon = void 0 !== o.icon && o.icon, r.options.label = void 0 === o.label || o.label, r.cssClass = "", r.options.label && o.enableMnemonics) {
- var s = r.getAction().label;
- if (s) {
- var a = t.MENU_MNEMONIC_REGEX.exec(s);
- a && (r.mnemonic = (a[1] ? a[1] : a[3]).toLocaleLowerCase())
- }
- }
- return r.runOnceToEnableMouseUp = new d.RunOnceScheduler((function () {
- r.element && r._register(l.addDisposableListener(r.element, l.EventType.MOUSE_UP, (function (e) {
- e.defaultPrevented || (l.EventHelper.stop(e, !0), r.onClick(e))
- })))
- }), 100), r._register(r.runOnceToEnableMouseUp), r
- }
- return r(o, e), o.prototype.render = function (t) {
- e.prototype.render.call(this, t), this.element && (this.container = t,
- this.item = l.append(this.element, l.$("a.action-menu-item")), this._action.id === s.Separator.ID ? this.item.setAttribute("role", "presentation") : (this.item.setAttribute("role", "menuitem"), this.mnemonic && this.item.setAttribute("aria-keyshortcuts", "" + this.mnemonic)), this.check = l.append(this.item, l.$("span.menu-item-check.codicon.codicon-check")), this.check.setAttribute("role", "none"), this.label = l.append(this.item, l.$("span.action-label")), this.options.label && this.options.keybinding && (l.append(this.item, l.$("span.keybinding")).textContent = this.options.keybinding), this.runOnceToEnableMouseUp.schedule(), this.updateClass(), this.updateLabel(), this.updateTooltip(), this.updateEnabled(), this.updateChecked())
- }, o.prototype.blur = function () {
- e.prototype.blur.call(this), this.applyStyle()
- }, o.prototype.focus = function () {
- e.prototype.focus.call(this), this.item && this.item.focus(), this.applyStyle()
- }, o.prototype.updatePositionInSet = function (e, t) {
- this.item && (this.item.setAttribute("aria-posinset", "" + e),
- this.item.setAttribute("aria-setsize", "" + t))
- }, o.prototype.updateLabel = function () {
- if (this.options.label) {
- var e = this.getAction().label;
- if (e) {
- var n = C(e);
- this.options.enableMnemonics || (e = n), this.label && this.label.setAttribute("aria-label", n.replace(/&&/g, "&"));
- var o = t.MENU_MNEMONIC_REGEX.exec(e);
- if (o) {
- e = i.escape(e), t.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex = 0;
- for (var r = t.MENU_ESCAPED_MNEMONIC_REGEX.exec(e); r && r[1];) r = t.MENU_ESCAPED_MNEMONIC_REGEX.exec(e);
- r && (e = e.substr(0, r.index) + '<u aria-hidden="true">' + r[3] + "</u>" + e.substr(r.index + r[0].length)), e = e.replace(/&&/g, "&"), this.item && this.item.setAttribute("aria-keyshortcuts", (o[1] ? o[1] : o[3]).toLocaleLowerCase())
- } else e = e.replace(/&&/g, "&")
- }
- this.label && (this.label.innerHTML = e.trim())
- }
- }, o.prototype.updateTooltip = function () {
- var e = null;
- this.getAction().tooltip ? e = this.getAction().tooltip : !this.options.label && this.getAction().label && this.options.icon && (e = this.getAction().label, this.options.keybinding && (e = n.localize(0, null, e, this.options.keybinding))),
- e && this.item && (this.item.title = e)
- }, o.prototype.updateClass = function () {
- this.cssClass && this.item && l.removeClasses(this.item, this.cssClass), this.options.icon && this.label ? (this.cssClass = this.getAction().class || "", l.addClass(this.label, "icon"), this.cssClass && l.addClasses(this.label, this.cssClass), this.updateEnabled()) : this.label && l.removeClass(this.label, "icon")
- }, o.prototype.updateEnabled = function () {
- this.getAction().enabled ? (this.element && l.removeClass(this.element, "disabled"), this.item && (l.removeClass(this.item, "disabled"), this.item.tabIndex = 0)) : (this.element && l.addClass(this.element, "disabled"), this.item && (l.addClass(this.item, "disabled"), l.removeTabIndexAndUpdateFocus(this.item)))
- }, o.prototype.updateChecked = function () {
- this.item && (this.getAction().checked ? (l.addClass(this.item, "checked"), this.item.setAttribute("role", "menuitemcheckbox"), this.item.setAttribute("aria-checked", "true")) : (l.removeClass(this.item, "checked"), this.item.setAttribute("role", "menuitem"), this.item.setAttribute("aria-checked", "false")))
- },
- o.prototype.getMnemonic = function () {
- return this.mnemonic
- }, o.prototype.applyStyle = function () {
- if (this.menuStyle) {
- var e = this.element && l.hasClass(this.element, "focused"),
- t = e && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor,
- n = e && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : void 0,
- i = e && this.menuStyle.selectionBorderColor ? "thin solid " + this.menuStyle.selectionBorderColor : "";
- this.item && (this.item.style.color = t ? t.toString() : "", this.item.style.backgroundColor = n ? n.toString() : ""), this.check && (this.check.style.color = t ? t.toString() : ""), this.container && (this.container.style.border = i)
- }
- }, o.prototype.style = function (e) {
- this.menuStyle = e, this.applyStyle()
- }, o
- }(s.BaseActionViewItem), _ = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this, t, t, o) || this;
- return r.submenuActions = n, r.parentData = i, r.submenuOptions = o, r.mysubmenu = null, r.submenuDisposables = r._register(new c.DisposableStore), r.mouseOver = !1,
- r.expandDirection = o && void 0 !== o.expandDirection ? o.expandDirection : g.Right, r.showScheduler = new d.RunOnceScheduler((function () {
- r.mouseOver && (r.cleanupExistingSubmenu(!1), r.createSubmenu(!1))
- }), 250), r.hideScheduler = new d.RunOnceScheduler((function () {
- r.element && !l.isAncestor(document.activeElement, r.element) && r.parentData.submenu === r.mysubmenu && (r.parentData.parent.focus(!1), r.cleanupExistingSubmenu(!0))
- }), 750), r
- }
- return r(t, e), t.prototype.render = function (t) {
- var n = this;
- e.prototype.render.call(this, t), this.element && (this.item && (l.addClass(this.item, "monaco-submenu-item"), this.item.setAttribute("aria-haspopup", "true"), this.updateAriaExpanded("false"), this.submenuIndicator = l.append(this.item, l.$("span.submenu-indicator.codicon.codicon-chevron-right")), this.submenuIndicator.setAttribute("aria-hidden", "true")), this._register(l.addDisposableListener(this.element, l.EventType.KEY_UP, (function (e) {
- var t = new u.StandardKeyboardEvent(e);
- (t.equals(17) || t.equals(3)) && (l.EventHelper.stop(e, !0), n.createSubmenu(!0))
- }))),
- this._register(l.addDisposableListener(this.element, l.EventType.KEY_DOWN, (function (e) {
- var t = new u.StandardKeyboardEvent(e);
- document.activeElement === n.item && (t.equals(17) || t.equals(3)) && l.EventHelper.stop(e, !0)
- }))), this._register(l.addDisposableListener(this.element, l.EventType.MOUSE_OVER, (function (e) {
- n.mouseOver || (n.mouseOver = !0, n.showScheduler.schedule())
- }))), this._register(l.addDisposableListener(this.element, l.EventType.MOUSE_LEAVE, (function (e) {
- n.mouseOver = !1
- }))), this._register(l.addDisposableListener(this.element, l.EventType.FOCUS_OUT, (function (e) {
- n.element && !l.isAncestor(document.activeElement, n.element) && n.hideScheduler.schedule()
- }))), this._register(this.parentData.parent.onScroll((function () {
- n.parentData.parent.focus(!1), n.cleanupExistingSubmenu(!1)
- }))))
- }, t.prototype.onClick = function (e) {
- l.EventHelper.stop(e, !0), this.cleanupExistingSubmenu(!1), this.createSubmenu(!0)
- }, t.prototype.cleanupExistingSubmenu = function (e) {
- this.parentData.submenu && (e || this.parentData.submenu !== this.mysubmenu) && (this.parentData.submenu.dispose(), this.parentData.submenu = void 0, this.updateAriaExpanded("false"), this.submenuContainer && (this.submenuDisposables.clear(), this.submenuContainer = void 0))
- }, t.prototype.createSubmenu = function (e) {
- var t = this;
- if (void 0 === e && (e = !0), this.element) if (this.parentData.submenu) this.parentData.submenu.focus(!1); else {
- this.updateAriaExpanded("true"), this.submenuContainer = l.append(this.element, l.$("div.monaco-submenu")), l.addClasses(this.submenuContainer, "menubar-menu-items-holder", "context-view");
- var n = getComputedStyle(this.parentData.parent.domNode), i = parseFloat(n.paddingTop || "0") || 0;
- this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset - i + "px", this.parentData.submenu = new m(this.submenuContainer, this.submenuActions, this.submenuOptions), this.menuStyle && this.parentData.submenu.style(this.menuStyle);
- var o = this.element.getBoundingClientRect(), r = this.submenuContainer.getBoundingClientRect()
- ;this.expandDirection === g.Right ? window.innerWidth <= o.right + r.width ? (this.submenuContainer.style.left = "10px", this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset + o.height + "px") : (this.submenuContainer.style.left = this.element.offsetWidth + "px", this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset - i + "px") : this.expandDirection === g.Left && (this.submenuContainer.style.right = this.element.offsetWidth + "px", this.submenuContainer.style.left = "auto", this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset - i + "px"), this.submenuDisposables.add(l.addDisposableListener(this.submenuContainer, l.EventType.KEY_UP, (function (e) {
- new u.StandardKeyboardEvent(e).equals(15) && (l.EventHelper.stop(e, !0), t.parentData.parent.focus(), t.cleanupExistingSubmenu(!0))
- }))), this.submenuDisposables.add(l.addDisposableListener(this.submenuContainer, l.EventType.KEY_DOWN, (function (e) {
- new u.StandardKeyboardEvent(e).equals(15) && l.EventHelper.stop(e, !0)
- }))), this.submenuDisposables.add(this.parentData.submenu.onDidCancel((function () {
- t.parentData.parent.focus(), t.cleanupExistingSubmenu(!0)
- }))), this.parentData.submenu.focus(e), this.mysubmenu = this.parentData.submenu
- }
- }, t.prototype.updateAriaExpanded = function (e) {
- var t;
- this.item && (null === (t = this.item) || void 0 === t || t.setAttribute("aria-expanded", e))
- }, t.prototype.applyStyle = function () {
- if (e.prototype.applyStyle.call(this), this.menuStyle) {
- var t = this.element && l.hasClass(this.element, "focused") && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor;
- this.submenuIndicator && (this.submenuIndicator.style.color = t ? "" + t : ""), this.parentData.submenu && this.parentData.submenu.style(this.menuStyle)
- }
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.hideScheduler.dispose(), this.mysubmenu && (this.mysubmenu.dispose(), this.mysubmenu = null), this.submenuContainer && (this.submenuContainer = void 0)
- }, t
- }(v), y = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.style = function (e) {
- this.label && (this.label.style.borderBottomColor = e.separatorColor ? "" + e.separatorColor : "")
- }, t
- }(s.ActionViewItem);
- function C(e) {
- var n = t.MENU_MNEMONIC_REGEX, i = n.exec(e);
- if (!i) return e;
- var o = !i[1];
- return e.replace(n, o ? "$2$3" : "").trim()
- }
- t.cleanMnemonic = C
- })), define(n[405], i([0, 1, 205]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function (e) {
- function t(t, n) {
- var i = e.call(this, t, n, "contextsubmenu") || this;
- return i.entries = n, i
- }
- return r(t, e), t
- }(n.SubmenuAction);
- t.ContextSubMenu = i
- })), define(n[406], i([7, 8]), (function (e, t) {
- return e.create("vs/base/browser/ui/tree/abstractTree", t)
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- }
- ;define(n[154], i([0, 1, 2, 153, 6, 4, 56, 98, 19, 140, 52, 61, 129, 406, 15, 16, 38, 131, 87, 280]), (function (e, t, n, i, o, s, u, d, c, h, p, g, f, m, v, _, y, C, b) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var S = function (e) {
- function t(t) {
- var n = e.call(this, t.elements.map((function (e) {
- return e.element
- }))) || this;
- return n.data = t, n
- }
- return r(t, e), t
- }(h.ElementsDragAndDropData);
- function w(e) {
- return e instanceof h.ElementsDragAndDropData ? new S(e) : e
- }
- var E = function () {
- function e(e, t) {
- this.modelProvider = e, this.dnd = t, this.autoExpandDisposable = n.Disposable.None
- }
- return e.prototype.getDragURI = function (e) {
- return this.dnd.getDragURI(e.element)
- }, e.prototype.getDragLabel = function (e, t) {
- if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e.map((function (e) {
- return e.element
- })), t)
- }, e.prototype.onDragStart = function (e, t) {
- this.dnd.onDragStart && this.dnd.onDragStart(w(e), t)
- }, e.prototype.onDragOver = function (e, t, n, i, o) {
- var r = this;
- void 0 === o && (o = !0);
- var s = this.dnd.onDragOver(w(e), t && t.element, n, i), a = this.autoExpandNode !== t
- ;
- if (a && (this.autoExpandDisposable.dispose(), this.autoExpandNode = t), void 0 === t) return s;
- if (a && "boolean" != typeof s && s.autoExpand && (this.autoExpandDisposable = v.disposableTimeout((function () {
- var e = r.modelProvider(), n = e.getNodeLocation(t);
- e.isCollapsed(n) && e.setCollapsed(n, !1), r.autoExpandNode = void 0
- }), 500)), "boolean" == typeof s || !s.accept || void 0 === s.bubble || s.feedback) return o ? s : {
- accept: "boolean" == typeof s ? s : s.accept,
- effect: "boolean" == typeof s ? void 0 : s.effect,
- feedback: [n]
- };
- if (1 === s.bubble) {
- var u = this.modelProvider(), d = u.getNodeLocation(t), h = u.getParentNodeLocation(d),
- p = u.getNode(h), g = h && u.getListIndex(h);
- return this.onDragOver(e, p, g, i, !1)
- }
- var f = this.modelProvider(), m = f.getNodeLocation(t), _ = f.getListIndex(m),
- y = f.getListRenderCount(m);
- return l(l({}, s), {feedback: c.range(_, _ + y)})
- }, e.prototype.drop = function (e, t, n, i) {
- this.autoExpandDisposable.dispose(), this.autoExpandNode = void 0, this.dnd.drop(w(e), t && t.element, n, i)
- }, e.prototype.onDragEnd = function (e) {
- this.dnd.onDragEnd && this.dnd.onDragEnd(e)
- }, e
- }();
- var L, D = function () {
- function e(e) {
- this.delegate = e
- }
- return e.prototype.getHeight = function (e) {
- return this.delegate.getHeight(e.element)
- }, e.prototype.getTemplateId = function (e) {
- return this.delegate.getTemplateId(e.element)
- }, e.prototype.hasDynamicHeight = function (e) {
- return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(e.element)
- }, e.prototype.setDynamicHeight = function (e, t) {
- this.delegate.setDynamicHeight && this.delegate.setDynamicHeight(e.element, t)
- }, e
- }();
- t.ComposedTreeDelegate = D, function (e) {
- e.None = "none", e.OnHover = "onHover", e.Always = "always"
- }(L = t.RenderIndentGuides || (t.RenderIndentGuides = {}));
- var N = function () {
- function e(e, t) {
- var n = this;
- void 0 === t && (t = []), this._elements = t, this.onDidChange = s.Event.forEach(e, (function (e) {
- return n._elements = e
- }))
- }
- return Object.defineProperty(e.prototype, "elements", {
- get: function () {
- return this._elements
- }, enumerable: !0, configurable: !0
- }), e
- }(), x = function () {
- function e(t, i, o, r, a) {
- void 0 === a && (a = {}), this.renderer = t, this.modelProvider = i, this.activeNodes = r, this.renderedElements = new Map,
- this.renderedNodes = new Map, this.indent = e.DefaultIndent, this.hideTwistiesOfChildlessElements = !1, this.shouldRenderIndentGuides = !1, this.renderedIndentGuides = new b.SetMap, this.activeIndentNodes = new Set, this.indentGuidesDisposable = n.Disposable.None, this.disposables = new n.DisposableStore, this.templateId = t.templateId, this.updateOptions(a), s.Event.map(o, (function (e) {
- return e.node
- }))(this.onDidChangeNodeTwistieState, this, this.disposables), t.onDidChangeTwistieState && t.onDidChangeTwistieState(this.onDidChangeTwistieState, this, this.disposables)
- }
- return e.prototype.updateOptions = function (e) {
- if (void 0 === e && (e = {}), void 0 !== e.indent && (this.indent = C.clamp(e.indent, 0, 40)), void 0 !== e.renderIndentGuides) {
- var t = e.renderIndentGuides !== L.None;
- if (t !== this.shouldRenderIndentGuides && (this.shouldRenderIndentGuides = t, this.indentGuidesDisposable.dispose(), t)) {
- var i = new n.DisposableStore;
- this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, i), this.indentGuidesDisposable = i, this._onDidChangeActiveNodes(this.activeNodes.elements)
- }
- }
- void 0 !== e.hideTwistiesOfChildlessElements && (this.hideTwistiesOfChildlessElements = e.hideTwistiesOfChildlessElements)
- }, e.prototype.renderTemplate = function (e) {
- var t = o.append(e, o.$(".monaco-tl-row")), i = o.append(t, o.$(".monaco-tl-indent")),
- r = o.append(t, o.$(".monaco-tl-twistie")), s = o.append(t, o.$(".monaco-tl-contents")),
- a = this.renderer.renderTemplate(s);
- return {container: e, indent: i, twistie: r, indentGuidesDisposable: n.Disposable.None, templateData: a}
- }, e.prototype.renderElement = function (t, n, i, o) {
- "number" == typeof o && (this.renderedNodes.set(t, {
- templateData: i,
- height: o
- }), this.renderedElements.set(t.element, t));
- var r = e.DefaultIndent + (t.depth - 1) * this.indent;
- i.twistie.style.paddingLeft = r + "px", i.indent.style.width = r + this.indent - 16 + "px", this.renderTwistie(t, i), "number" == typeof o && this.renderIndentGuides(t, i), this.renderer.renderElement(t, n, i.templateData, o)
- }, e.prototype.disposeElement = function (e, t, n, i) {
- n.indentGuidesDisposable.dispose(), this.renderer.disposeElement && this.renderer.disposeElement(e, t, n.templateData, i),
- "number" == typeof i && (this.renderedNodes.delete(e), this.renderedElements.delete(e.element))
- }, e.prototype.disposeTemplate = function (e) {
- this.renderer.disposeTemplate(e.templateData)
- }, e.prototype.onDidChangeTwistieState = function (e) {
- var t = this.renderedElements.get(e);
- t && this.onDidChangeNodeTwistieState(t)
- }, e.prototype.onDidChangeNodeTwistieState = function (e) {
- var t = this.renderedNodes.get(e);
- t && (this.renderTwistie(e, t.templateData), this._onDidChangeActiveNodes(this.activeNodes.elements), this.renderIndentGuides(e, t.templateData))
- }, e.prototype.renderTwistie = function (e, t) {
- this.renderer.renderTwistie && this.renderer.renderTwistie(e.element, t.twistie), e.collapsible && (!this.hideTwistiesOfChildlessElements || e.visibleChildrenCount > 0) ? (o.addClasses(t.twistie, "codicon", "codicon-chevron-down", "collapsible"), o.toggleClass(t.twistie, "collapsed", e.collapsed)) : o.removeClasses(t.twistie, "codicon", "codicon-chevron-down", "collapsible", "collapsed"),
- e.collapsible ? t.container.setAttribute("aria-expanded", String(!e.collapsed)) : t.container.removeAttribute("aria-expanded")
- }, e.prototype.renderIndentGuides = function (e, t) {
- var i = this;
- if (o.clearNode(t.indent), t.indentGuidesDisposable.dispose(), this.shouldRenderIndentGuides) {
- for (var r = new n.DisposableStore, s = this.modelProvider(), a = e, l = function () {
- var e = s.getNodeLocation(a), l = s.getParentNodeLocation(e);
- if (!l) return "break";
- var d = s.getNode(l), c = o.$(".indent-guide", {style: "width: " + u.indent + "px"});
- u.activeIndentNodes.has(d) && o.addClass(c, "active"), 0 === t.indent.childElementCount ? t.indent.appendChild(c) : t.indent.insertBefore(c, t.indent.firstElementChild), u.renderedIndentGuides.add(d, c), r.add(n.toDisposable((function () {
- return i.renderedIndentGuides.delete(d, c)
- }))), a = d
- }, u = this; ;) {
- if ("break" === l()) break
- }
- t.indentGuidesDisposable = r
- }
- }, e.prototype._onDidChangeActiveNodes = function (e) {
- var t = this;
- if (this.shouldRenderIndentGuides) {
- var n = new Set, i = this.modelProvider();
- e.forEach((function (e) {
- var t = i.getNodeLocation(e);
- try {
- var o = i.getParentNodeLocation(t);
- e.collapsible && e.children.length > 0 && !e.collapsed ? n.add(e) : o && n.add(i.getNode(o))
- } catch (e) {
- }
- })), this.activeIndentNodes.forEach((function (e) {
- n.has(e) || t.renderedIndentGuides.forEach(e, (function (e) {
- return o.removeClass(e, "active")
- }))
- })), n.forEach((function (e) {
- t.activeIndentNodes.has(e) || t.renderedIndentGuides.forEach(e, (function (e) {
- return o.addClass(e, "active")
- }))
- })), this.activeIndentNodes = n
- }
- }, e.prototype.dispose = function () {
- this.renderedNodes.clear(), this.renderedElements.clear(), this.indentGuidesDisposable.dispose(), n.dispose(this.disposables)
- }, e.DefaultIndent = 8, e
- }(), I = function () {
- function e(e, t, i) {
- this.tree = e, this.keyboardNavigationLabelProvider = t, this._filter = i, this._totalCount = 0, this._matchCount = 0, this._pattern = "", this._lowercasePattern = "", this.disposables = new n.DisposableStore, e.onWillRefilter(this.reset, this, this.disposables)
- }
- return Object.defineProperty(e.prototype, "totalCount", {
- get: function () {
- return this._totalCount
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "matchCount", {
- get: function () {
- return this._matchCount
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "pattern", {
- set: function (e) {
- this._pattern = e, this._lowercasePattern = e.toLowerCase()
- }, enumerable: !0, configurable: !0
- }), e.prototype.filter = function (e, t) {
- if (this._filter) {
- var n = this._filter.filter(e, t);
- if (this.tree.options.simpleKeyboardNavigation) return n;
- if (0 === ("boolean" == typeof n ? n ? 1 : 0 : f.isFilterResult(n) ? f.getVisibleState(n.visibility) : n)) return !1
- }
- if (this._totalCount++, this.tree.options.simpleKeyboardNavigation || !this._pattern) return this._matchCount++, {
- data: g.FuzzyScore.Default,
- visibility: !0
- };
- var i = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e), o = i && i.toString();
- if (void 0 === o) return {data: g.FuzzyScore.Default, visibility: !0};
- var r = g.fuzzyScore(this._pattern, this._lowercasePattern, 0, o, o.toLowerCase(), 0, !0);
- return r ? (this._matchCount++, {
- data: r,
- visibility: !0
- }) : this.tree.options.filterOnType ? 2 : {data: g.FuzzyScore.Default, visibility: !0}
- },
- e.prototype.reset = function () {
- this._totalCount = 0, this._matchCount = 0
- }, e.prototype.dispose = function () {
- n.dispose(this.disposables)
- }, e
- }(), M = function () {
- function e(e, t, i, r, a) {
- this.tree = e, this.view = i, this.filter = r, this.keyboardNavigationDelegate = a, this._enabled = !1, this._pattern = "", this._empty = !1, this._onDidChangeEmptyState = new s.Emitter, this.positionClassName = "ne", this.automaticKeyboardNavigation = !0, this.triggered = !1, this._onDidChangePattern = new s.Emitter, this.enabledDisposables = new n.DisposableStore, this.disposables = new n.DisposableStore, this.domNode = o.$(".monaco-list-type-filter." + this.positionClassName), this.domNode.draggable = !0, p.domEvent(this.domNode, "dragstart")(this.onDragStart, this, this.disposables), this.messageDomNode = o.append(i.getHTMLElement(), o.$(".monaco-list-type-filter-message")), this.labelDomNode = o.append(this.domNode, o.$("span.label"));
- var l = o.append(this.domNode, o.$(".controls"));
- this._filterOnType = !!e.options.filterOnType,
- this.filterOnTypeDomNode = o.append(l, o.$("input.filter.codicon.codicon-list-selection")), this.filterOnTypeDomNode.type = "checkbox", this.filterOnTypeDomNode.checked = this._filterOnType, this.filterOnTypeDomNode.tabIndex = -1, this.updateFilterOnTypeTitle(), p.domEvent(this.filterOnTypeDomNode, "input")(this.onDidChangeFilterOnType, this, this.disposables), this.clearDomNode = o.append(l, o.$("button.clear.codicon.codicon-close")), this.clearDomNode.tabIndex = -1, this.clearDomNode.title = m.localize(0, null), this.keyboardNavigationEventFilter = e.options.keyboardNavigationEventFilter, t.onDidSplice(this.onDidSpliceModel, this, this.disposables), this.updateOptions(e.options)
- }
- return Object.defineProperty(e.prototype, "enabled", {
- get: function () {
- return this._enabled
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "pattern", {
- get: function () {
- return this._pattern
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "filterOnType", {
- get: function () {
- return this._filterOnType
- }, enumerable: !0, configurable: !0
- }),
- e.prototype.updateOptions = function (e) {
- e.simpleKeyboardNavigation ? this.disable() : this.enable(), void 0 !== e.filterOnType && (this._filterOnType = !!e.filterOnType, this.filterOnTypeDomNode.checked = this._filterOnType), void 0 !== e.automaticKeyboardNavigation && (this.automaticKeyboardNavigation = e.automaticKeyboardNavigation), this.tree.refilter(), this.render(), this.automaticKeyboardNavigation || this.onEventOrInput("")
- }, e.prototype.enable = function () {
- var e = this;
- if (!this._enabled) {
- var t = s.Event.chain(p.domEvent(this.view.getHTMLElement(), "keydown")).filter((function (t) {
- return !k(t.target) || t.target === e.filterOnTypeDomNode
- })).filter((function (e) {
- return "Dead" !== e.key && !/^Media/.test(e.key)
- })).map((function (e) {
- return new u.StandardKeyboardEvent(e)
- })).filter(this.keyboardNavigationEventFilter || function () {
- return !0
- }).filter((function () {
- return e.automaticKeyboardNavigation || e.triggered
- })).filter((function (t) {
- return e.keyboardNavigationDelegate.mightProducePrintableCharacter(t) || (e.pattern.length > 0 || e.triggered) && (9 === t.keyCode || 1 === t.keyCode) && !t.altKey && !t.ctrlKey && !t.metaKey || 1 === t.keyCode && (_.isMacintosh ? t.altKey && !t.metaKey : t.ctrlKey) && !t.shiftKey
- })).forEach((function (e) {
- e.stopPropagation(), e.preventDefault()
- })).event, n = p.domEvent(this.clearDomNode, "click");
- s.Event.chain(s.Event.any(t, n)).event(this.onEventOrInput, this, this.enabledDisposables), this.filter.pattern = "", this.tree.refilter(), this.render(), this._enabled = !0, this.triggered = !1
- }
- }, e.prototype.disable = function () {
- this._enabled && (this.domNode.remove(), this.enabledDisposables.clear(), this.tree.refilter(), this.render(), this._enabled = !1, this.triggered = !1)
- }, e.prototype.onEventOrInput = function (e) {
- "string" == typeof e ? this.onInput(e) : e instanceof MouseEvent || 9 === e.keyCode || 1 === e.keyCode && (_.isMacintosh ? e.altKey : e.ctrlKey) ? this.onInput("") : 1 === e.keyCode ? this.onInput(0 === this.pattern.length ? "" : this.pattern.substr(0, this.pattern.length - 1)) : this.onInput(this.pattern + e.browserEvent.key)
- }, e.prototype.onInput = function (e) {
- var t = this.view.getHTMLElement();
- e && !this.domNode.parentElement ? t.append(this.domNode) : !e && this.domNode.parentElement && (this.domNode.remove(), this.tree.domFocus()), this._pattern = e, this._onDidChangePattern.fire(e), this.filter.pattern = e, this.tree.refilter(), e && this.tree.focusNext(0, !0, void 0, (function (e) {
- return !g.FuzzyScore.isDefault(e.filterData)
- }));
- var n = this.tree.getFocus();
- if (n.length > 0) {
- var i = n[0];
- null === this.tree.getRelativeTop(i) && this.tree.reveal(i, .5)
- }
- this.render(), e || (this.triggered = !1)
- }, e.prototype.onDragStart = function () {
- var e = this, t = this.view.getHTMLElement(), i = o.getDomNodePagePosition(t).left, r = t.clientWidth,
- s = r / 2, a = this.domNode.clientWidth, l = new n.DisposableStore, u = this.positionClassName,
- c = function () {
- switch (u) {
- case"nw":
- e.domNode.style.top = "4px", e.domNode.style.left = "4px";
- break;
- case"ne":
- e.domNode.style.top = "4px", e.domNode.style.left = r - a - 6 + "px"
- }
- };
- c(), o.removeClass(this.domNode, u), o.addClass(this.domNode, "dragging"), l.add(n.toDisposable((function () {
- return o.removeClass(e.domNode, "dragging")
- }))), p.domEvent(document, "dragover")((function (e) {
- e.preventDefault();
- var t = e.screenX - i;
- e.dataTransfer && (e.dataTransfer.dropEffect = "none"), u = t < s ? "nw" : "ne", c()
- }), null, l), p.domEvent(this.domNode, "dragend")((function () {
- e.positionClassName = u, e.domNode.className = "monaco-list-type-filter " + e.positionClassName, e.domNode.style.top = "", e.domNode.style.left = "", n.dispose(l)
- }), null, l), d.StaticDND.CurrentDragAndDropData = new d.DragAndDropData("vscode-ui"), l.add(n.toDisposable((function () {
- return d.StaticDND.CurrentDragAndDropData = void 0
- })))
- },
- e.prototype.onDidSpliceModel = function () {
- this._enabled && 0 !== this.pattern.length && (this.tree.refilter(), this.render())
- }, e.prototype.onDidChangeFilterOnType = function () {
- this.tree.updateOptions({filterOnType: this.filterOnTypeDomNode.checked}), this.tree.refilter(), this.tree.domFocus(), this.render(), this.updateFilterOnTypeTitle()
- }, e.prototype.updateFilterOnTypeTitle = function () {
- this.filterOnType ? this.filterOnTypeDomNode.title = m.localize(1, null) : this.filterOnTypeDomNode.title = m.localize(2, null)
- }, e.prototype.render = function () {
- var e = this.filter.totalCount > 0 && 0 === this.filter.matchCount;
- this.pattern && this.tree.options.filterOnType && e ? (this.messageDomNode.textContent = m.localize(3, null), this._empty = !0) : (this.messageDomNode.innerHTML = "", this._empty = !1), o.toggleClass(this.domNode, "no-matches", e), this.domNode.title = m.localize(4, null, this.filter.matchCount, this.filter.totalCount), this.labelDomNode.textContent = this.pattern.length > 16 ? "…" + this.pattern.substr(this.pattern.length - 16) : this.pattern,
- this._onDidChangeEmptyState.fire(this._empty)
- }, e.prototype.shouldAllowFocus = function (e) {
- return !(this.enabled && this.pattern && !this.filterOnType) || (this.filter.totalCount > 0 && this.filter.matchCount <= 1 || !g.FuzzyScore.isDefault(e.filterData))
- }, e.prototype.dispose = function () {
- this._enabled && (this.domNode.remove(), this.enabledDisposables.dispose(), this._enabled = !1, this.triggered = !1), this._onDidChangePattern.dispose(), n.dispose(this.disposables)
- }, e
- }();
- function k(e) {
- return "INPUT" === e.tagName || "TEXTAREA" === e.tagName
- }
- function T(e) {
- return {
- elements: e.elements.map((function (e) {
- return e.element
- })), browserEvent: e.browserEvent
- }
- }
- function R(e, t) {
- t(e), e.children.forEach((function (e) {
- return R(e, t)
- }))
- }
- var O = function () {
- function e(e) {
- this.identityProvider = e, this.nodes = [], this._onDidChange = new s.Emitter, this.onDidChange = this._onDidChange.event
- }
- return Object.defineProperty(e.prototype, "nodeSet", {
- get: function () {
- return this._nodeSet || (this._nodeSet = this.createNodeSet()), this._nodeSet
- }, enumerable: !0, configurable: !0
- }),
- e.prototype.set = function (e, t) {
- c.equals(this.nodes, e) || this._set(e, !1, t)
- }, e.prototype._set = function (e, t, n) {
- if (this.nodes = a(e), this.elements = void 0, this._nodeSet = void 0, !t) {
- var i = this;
- this._onDidChange.fire({
- get elements() {
- return i.get()
- }, browserEvent: n
- })
- }
- }, e.prototype.get = function () {
- return this.elements || (this.elements = this.nodes.map((function (e) {
- return e.element
- }))), a(this.elements)
- }, e.prototype.getNodes = function () {
- return this.nodes
- }, e.prototype.has = function (e) {
- return this.nodeSet.has(e)
- }, e.prototype.onDidModelSplice = function (e) {
- var t = this, n = e.insertedNodes, i = e.deletedNodes;
- if (!this.identityProvider) {
- var o = this.createNodeSet(), r = function (e) {
- return o.delete(e)
- };
- return i.forEach((function (e) {
- return R(e, r)
- })), void this.set(y.values(o))
- }
- var s = new Set, a = function (e) {
- return s.add(t.identityProvider.getId(e.element).toString())
- };
- i.forEach((function (e) {
- return R(e, a)
- }));
- var l = new Map, u = function (e) {
- return l.set(t.identityProvider.getId(e.element).toString(), e)
- };
- n.forEach((function (e) {
- return R(e, u)
- }))
- ;
- for (var d = [], c = 0, h = this.nodes; c < h.length; c++) {
- var p = h[c], g = this.identityProvider.getId(p.element).toString();
- if (s.has(g)) {
- var f = l.get(g);
- f && d.push(f)
- } else d.push(p)
- }
- this._set(d, !0)
- }, e.prototype.createNodeSet = function () {
- for (var e = new Set, t = 0, n = this.nodes; t < n.length; t++) {
- var i = n[t];
- e.add(i)
- }
- return e
- }, e
- }(), P = function (e) {
- function t(t, n) {
- var i = e.call(this, t) || this;
- return i.tree = n, i
- }
- return r(t, e), t.prototype.onPointer = function (t) {
- if (!k(t.browserEvent.target)) {
- var n = t.element;
- if (!n) return e.prototype.onPointer.call(this, t);
- if (this.isSelectionRangeChangeEvent(t) || this.isSelectionSingleChangeEvent(t)) return e.prototype.onPointer.call(this, t);
- var i = o.hasClass(t.browserEvent.target, "monaco-tl-twistie");
- if (!this.tree.openOnSingleClick && 2 !== t.browserEvent.detail && !i) return e.prototype.onPointer.call(this, t);
- var r = !1;
- if ((r = "function" == typeof this.tree.expandOnlyOnTwistieClick ? this.tree.expandOnlyOnTwistieClick(n.element) : !!this.tree.expandOnlyOnTwistieClick) && !i) return e.prototype.onPointer.call(this, t);
- if (n.collapsible) {
- var s = this.tree.model, a = s.getNodeLocation(n), l = t.browserEvent.altKey;
- if (s.setCollapsed(a, void 0, l), r && i) return
- }
- e.prototype.onPointer.call(this, t)
- }
- }, t.prototype.onDoubleClick = function (t) {
- o.hasClass(t.browserEvent.target, "monaco-tl-twistie") || e.prototype.onDoubleClick.call(this, t)
- }, t
- }(i.MouseController), A = function (e) {
- function t(t, n, i, o, r, s, a) {
- var l = e.call(this, t, n, i, o, a) || this;
- return l.focusTrait = r, l.selectionTrait = s, l
- }
- return r(t, e), t.prototype.createMouseController = function (e) {
- return new P(this, e.tree)
- }, t.prototype.splice = function (t, n, i) {
- var o = this;
- if (void 0 === i && (i = []), e.prototype.splice.call(this, t, n, i), 0 !== i.length) {
- var r = [], s = [];
- i.forEach((function (e, n) {
- o.focusTrait.has(e) && r.push(t + n), o.selectionTrait.has(e) && s.push(t + n)
- })), r.length > 0 && e.prototype.setFocus.call(this, c.distinctES6(a(e.prototype.getFocus.call(this), r))), s.length > 0 && e.prototype.setSelection.call(this, c.distinctES6(a(e.prototype.getSelection.call(this), s)))
- }
- }, t.prototype.setFocus = function (t, n, i) {
- var o = this;
- void 0 === i && (i = !1),
- e.prototype.setFocus.call(this, t, n), i || this.focusTrait.set(t.map((function (e) {
- return o.element(e)
- })), n)
- }, t.prototype.setSelection = function (t, n, i) {
- var o = this;
- void 0 === i && (i = !1), e.prototype.setSelection.call(this, t, n), i || this.selectionTrait.set(t.map((function (e) {
- return o.element(e)
- })), n)
- }, t
- }(i.List), F = function () {
- function e(e, t, r, a, d) {
- var h = this;
- void 0 === d && (d = {}), this._options = d, this.eventBufferer = new s.EventBufferer, this.disposables = new n.DisposableStore, this._onWillRefilter = new s.Emitter, this.onWillRefilter = this._onWillRefilter.event, this._onDidUpdateOptions = new s.Emitter;
- var p, g, f, m = new D(r), v = new s.Relay, _ = new s.Relay, y = new N(_.event);
- this.renderers = a.map((function (e) {
- return new x(e, (function () {
- return h.model
- }), v.event, y, d)
- }));
- for (var C = 0, b = this.renderers; C < b.length; C++) {
- var S = b[C];
- this.disposables.add(S)
- }
- d.keyboardNavigationLabelProvider && (p = new I(this, d.keyboardNavigationLabelProvider, d.filter), d = l(l({}, d), {filter: p}), this.disposables.add(p)), this.focus = new O(d.identityProvider),
- this.selection = new O(d.identityProvider), this.view = new A(e, t, m, this.renderers, this.focus, this.selection, l(l({}, (g = function () {
- return h.model
- }, (f = d) && l(l({}, f), {
- identityProvider: f.identityProvider && {
- getId: function (e) {
- return f.identityProvider.getId(e.element)
- }
- },
- dnd: f.dnd && new E(g, f.dnd),
- multipleSelectionController: f.multipleSelectionController && {
- isSelectionSingleChangeEvent: function (e) {
- return f.multipleSelectionController.isSelectionSingleChangeEvent(l(l({}, e), {element: e.element}))
- }, isSelectionRangeChangeEvent: function (e) {
- return f.multipleSelectionController.isSelectionRangeChangeEvent(l(l({}, e), {element: e.element}))
- }
- },
- accessibilityProvider: f.accessibilityProvider && l(l({}, f.accessibilityProvider), {
- getAriaLabel: function (e) {
- return f.accessibilityProvider.getAriaLabel(e.element)
- }, getAriaLevel: function (e) {
- return e.depth
- }, getActiveDescendantId: f.accessibilityProvider.getActiveDescendantId && function (e) {
- return f.accessibilityProvider.getActiveDescendantId(e.element)
- }
- }),
- keyboardNavigationLabelProvider: f.keyboardNavigationLabelProvider && l(l({}, f.keyboardNavigationLabelProvider), {
- getKeyboardNavigationLabel: function (e) {
- return f.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)
- }
- }),
- enableKeyboardNavigation: f.simpleKeyboardNavigation,
- ariaProvider: {
- getSetSize: function (e) {
- var t = g(), n = t.getNodeLocation(e), i = t.getParentNodeLocation(n);
- return t.getNode(i).visibleChildrenCount
- }, getPosInSet: function (e) {
- return e.visibleChildIndex + 1
- }, isChecked: f.ariaProvider && f.ariaProvider.isChecked ? function (e) {
- return f.ariaProvider.isChecked(e.element)
- } : void 0, getRole: f.ariaProvider && f.ariaProvider.getRole ? function (e) {
- return f.ariaProvider.getRole(e.element)
- } : void 0
- }
- }))), {tree: this})), this.model = this.createModel(e, this.view, d), v.input = this.model.onDidChangeCollapseState;
- var w = s.Event.forEach(this.model.onDidSplice, (function (e) {
- h.eventBufferer.bufferEvents((function () {
- h.focus.onDidModelSplice(e), h.selection.onDidModelSplice(e)
- }))
- }));
- if (w((function () {
- return null
- }), null, this.disposables), _.input = s.Event.chain(s.Event.any(w, this.focus.onDidChange, this.selection.onDidChange)).debounce((function () {
- return null
- }), 0).map((function () {
- for (var e = new Set, t = 0, n = h.focus.getNodes(); t < n.length; t++) {
- var i = n[t];
- e.add(i)
- }
- for (var o = 0, r = h.selection.getNodes(); o < r.length; o++) {
- i = r[o];
- e.add(i)
- }
- return c.fromSet(e)
- })).event, !1 !== d.keyboardSupport) {
- var T = s.Event.chain(this.view.onKeyDown).filter((function (e) {
- return !k(e.target)
- })).map((function (e) {
- return new u.StandardKeyboardEvent(e)
- }));
- T.filter((function (e) {
- return 15 === e.keyCode
- })).on(this.onLeftArrow, this, this.disposables), T.filter((function (e) {
- return 17 === e.keyCode
- })).on(this.onRightArrow, this, this.disposables), T.filter((function (e) {
- return 10 === e.keyCode
- })).on(this.onSpace, this, this.disposables)
- }
- if (d.keyboardNavigationLabelProvider) {
- var R = d.keyboardNavigationDelegate || i.DefaultKeyboardNavigationDelegate;
- this.typeFilterController = new M(this, this.model, this.view, p, R), this.focusNavigationFilter = function (e) {
- return h.typeFilterController.shouldAllowFocus(e)
- }, this.disposables.add(this.typeFilterController)
- }
- this.styleElement = o.createStyleSheet(this.view.getHTMLElement()), o.toggleClass(this.getHTMLElement(), "always", this._options.renderIndentGuides === L.Always)
- }
- return Object.defineProperty(e.prototype, "onDidChangeFocus", {
- get: function () {
- return this.eventBufferer.wrapEvent(this.focus.onDidChange)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidChangeSelection", {
- get: function () {
- return this.eventBufferer.wrapEvent(this.selection.onDidChange)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidOpen", {
- get: function () {
- return s.Event.map(this.view.onDidOpen, T)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidFocus", {
- get: function () {
- return this.view.onDidFocus
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidChangeCollapseState", {
- get: function () {
- return this.model.onDidChangeCollapseState
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "openOnSingleClick", {
- get: function () {
- return void 0 === this._options.openOnSingleClick || this._options.openOnSingleClick
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "expandOnlyOnTwistieClick", {
- get: function () {
- return void 0 !== this._options.expandOnlyOnTwistieClick && this._options.expandOnlyOnTwistieClick
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidDispose", {
- get: function () {
- return this.view.onDidDispose
- }, enumerable: !0, configurable: !0
- }), e.prototype.updateOptions = function (e) {
- void 0 === e && (e = {}), this._options = l(l({}, this._options), e);
- for (var t = 0, n = this.renderers; t < n.length; t++) {
- n[t].updateOptions(e)
- }
- this.view.updateOptions({
- enableKeyboardNavigation: this._options.simpleKeyboardNavigation,
- automaticKeyboardNavigation: this._options.automaticKeyboardNavigation
- }), this.typeFilterController && this.typeFilterController.updateOptions(this._options), this._onDidUpdateOptions.fire(this._options),
- o.toggleClass(this.getHTMLElement(), "always", this._options.renderIndentGuides === L.Always)
- }, Object.defineProperty(e.prototype, "options", {
- get: function () {
- return this._options
- }, enumerable: !0, configurable: !0
- }), e.prototype.getHTMLElement = function () {
- return this.view.getHTMLElement()
- }, Object.defineProperty(e.prototype, "scrollTop", {
- get: function () {
- return this.view.scrollTop
- }, set: function (e) {
- this.view.scrollTop = e
- }, enumerable: !0, configurable: !0
- }), e.prototype.domFocus = function () {
- this.view.domFocus()
- }, e.prototype.layout = function (e, t) {
- this.view.layout(e, t)
- }, e.prototype.style = function (e) {
- var t = "." + this.view.domId, n = [];
- e.treeIndentGuidesStroke && (n.push(".monaco-list" + t + ":hover .monaco-tl-indent > .indent-guide, .monaco-list" + t + ".always .monaco-tl-indent > .indent-guide { border-color: " + e.treeIndentGuidesStroke.transparent(.4) + "; }"), n.push(".monaco-list" + t + " .monaco-tl-indent > .indent-guide.active { border-color: " + e.treeIndentGuidesStroke + "; }"));
- var i = n.join("\n")
- ;i !== this.styleElement.innerHTML && (this.styleElement.innerHTML = i), this.view.style(e)
- }, e.prototype.collapse = function (e, t) {
- return void 0 === t && (t = !1), this.model.setCollapsed(e, !0, t)
- }, e.prototype.expand = function (e, t) {
- return void 0 === t && (t = !1), this.model.setCollapsed(e, !1, t)
- }, e.prototype.isCollapsible = function (e) {
- return this.model.isCollapsible(e)
- }, e.prototype.setCollapsible = function (e, t) {
- return this.model.setCollapsible(e, t)
- }, e.prototype.isCollapsed = function (e) {
- return this.model.isCollapsed(e)
- }, e.prototype.refilter = function () {
- this._onWillRefilter.fire(void 0), this.model.refilter()
- }, e.prototype.setSelection = function (e, t) {
- var n = this, i = e.map((function (e) {
- return n.model.getNode(e)
- }));
- this.selection.set(i, t);
- var o = e.map((function (e) {
- return n.model.getListIndex(e)
- })).filter((function (e) {
- return e > -1
- }));
- this.view.setSelection(o, t, !0)
- }, e.prototype.getSelection = function () {
- return this.selection.get()
- }, e.prototype.setFocus = function (e, t) {
- var n = this, i = e.map((function (e) {
- return n.model.getNode(e)
- }));
- this.focus.set(i, t)
- ;var o = e.map((function (e) {
- return n.model.getListIndex(e)
- })).filter((function (e) {
- return e > -1
- }));
- this.view.setFocus(o, t, !0)
- }, e.prototype.focusNext = function (e, t, n, i) {
- void 0 === e && (e = 1), void 0 === t && (t = !1), void 0 === i && (i = this.focusNavigationFilter), this.view.focusNext(e, t, n, i)
- }, e.prototype.getFocus = function () {
- return this.focus.get()
- }, e.prototype.reveal = function (e, t) {
- this.model.expandTo(e);
- var n = this.model.getListIndex(e);
- -1 !== n && this.view.reveal(n, t)
- }, e.prototype.getRelativeTop = function (e) {
- var t = this.model.getListIndex(e);
- return -1 === t ? null : this.view.getRelativeTop(t)
- }, e.prototype.onLeftArrow = function (e) {
- e.preventDefault(), e.stopPropagation();
- var t = this.view.getFocusedElements();
- if (0 !== t.length) {
- var n = t[0], i = this.model.getNodeLocation(n);
- if (!this.model.setCollapsed(i, !0)) {
- var o = this.model.getParentNodeLocation(i);
- if (!o) return;
- var r = this.model.getListIndex(o);
- this.view.reveal(r), this.view.setFocus([r])
- }
- }
- }, e.prototype.onRightArrow = function (e) {
- e.preventDefault(), e.stopPropagation();
- var t = this.view.getFocusedElements()
- ;
- if (0 !== t.length) {
- var n = t[0], i = this.model.getNodeLocation(n);
- if (!this.model.setCollapsed(i, !1)) {
- if (!n.children.some((function (e) {
- return e.visible
- }))) return;
- var o = this.view.getFocus()[0] + 1;
- this.view.reveal(o), this.view.setFocus([o])
- }
- }
- }, e.prototype.onSpace = function (e) {
- e.preventDefault(), e.stopPropagation();
- var t = this.view.getFocusedElements();
- if (0 !== t.length) {
- var n = t[0], i = this.model.getNodeLocation(n), o = e.browserEvent.altKey;
- this.model.setCollapsed(i, void 0, o)
- }
- }, e.prototype.dispose = function () {
- n.dispose(this.disposables), this.view.dispose()
- }, e
- }();
- t.AbstractTree = F
- })), define(n[407], i([0, 1, 154, 130]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t, n, i, o, r, s) {
- void 0 === s && (s = {});
- var a = e.call(this, t, n, i, o, s) || this;
- return a.user = t, a.dataSource = r, a.identityProvider = s.identityProvider, a
- }
- return r(t, e), t.prototype.createModel = function (e, t, n) {
- return new i.ObjectTreeModel(e, t, n)
- }, t
- }(n.AbstractTree);
- t.DataTree = o
- })),
- define(n[206], i([0, 1, 154, 130, 243, 101]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t, n, i, o, r) {
- return void 0 === r && (r = {}), e.call(this, t, n, i, o, r) || this
- }
- return r(t, e), Object.defineProperty(t.prototype, "onDidChangeCollapseState", {
- get: function () {
- return this.model.onDidChangeCollapseState
- }, enumerable: !0, configurable: !0
- }), t.prototype.setChildren = function (e, t) {
- this.model.setChildren(e, t)
- }, t.prototype.rerender = function (e) {
- void 0 !== e ? this.model.rerender(e) : this.view.rerender()
- }, t.prototype.hasElement = function (e) {
- return this.model.has(e)
- }, t.prototype.createModel = function (e, t, n) {
- return new i.ObjectTreeModel(e, t, n)
- }, t
- }(n.AbstractTree);
- t.ObjectTree = a;
- var u = function () {
- function e(e, t) {
- this._compressedTreeNodeProvider = e, this.renderer = t, this.templateId = t.templateId, t.onDidChangeTwistieState && (this.onDidChangeTwistieState = t.onDidChangeTwistieState)
- }
- return Object.defineProperty(e.prototype, "compressedTreeNodeProvider", {
- get: function () {
- return this._compressedTreeNodeProvider()
- }, enumerable: !0, configurable: !0
- }), e.prototype.renderTemplate = function (e) {
- return {compressedTreeNode: void 0, data: this.renderer.renderTemplate(e)}
- }, e.prototype.renderElement = function (e, t, n, i) {
- var o = this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);
- 1 === o.element.elements.length ? (n.compressedTreeNode = void 0, this.renderer.renderElement(e, t, n.data, i)) : (n.compressedTreeNode = o, this.renderer.renderCompressedElements(o, t, n.data, i))
- }, e.prototype.disposeElement = function (e, t, n, i) {
- n.compressedTreeNode ? this.renderer.disposeCompressedElements && this.renderer.disposeCompressedElements(n.compressedTreeNode, t, n.data, i) : this.renderer.disposeElement && this.renderer.disposeElement(e, t, n.data, i)
- }, e.prototype.disposeTemplate = function (e) {
- this.renderer.disposeTemplate(e.data)
- }, e.prototype.renderTwistie = function (e, t) {
- this.renderer.renderTwistie && this.renderer.renderTwistie(e, t)
- }, h([s.memoize], e.prototype, "compressedTreeNodeProvider", null), e
- }();
- var d = function (e) {
- function t(t, n, i, o, r) {
- void 0 === r && (r = {});
- var s = this, a = function () {
- return s
- }, d = o.map((function (e) {
- return new u(a, e)
- }));
- return s = e.call(this, t, n, i, d, function (e, t) {
- return t && l(l({}, t), {
- keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && {
- getKeyboardNavigationLabel: function (n) {
- var i;
- try {
- i = e().getCompressedTreeNode(n)
- } catch (e) {
- return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)
- }
- return 1 === i.element.elements.length ? t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n) : t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)
- }
- }
- })
- }(a, r)) || this
- }
- return r(t, e), t.prototype.setChildren = function (e, t) {
- this.model.setChildren(e, t)
- }, t.prototype.createModel = function (e, t, n) {
- return new o.CompressibleObjectTreeModel(e, t, n)
- }, t.prototype.updateOptions = function (t) {
- void 0 === t && (t = {}), e.prototype.updateOptions.call(this, t), void 0 !== t.compressionEnabled && this.model.setCompressionEnabled(t.compressionEnabled)
- }, t.prototype.getCompressedTreeNode = function (e) {
- return void 0 === e && (e = null), this.model.getCompressedTreeNode(e)
- }, t
- }(a);
- t.CompressibleObjectTree = d
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[408], i([0, 1, 154, 206, 99, 2, 4, 15, 54, 140, 10, 6, 38, 129]), (function (e, t, n, i, o, s, u, h, p, g, f, m, v, _) {
- "use strict";
- function y(e) {
- return l(l({}, e), {children: [], refreshPromise: void 0, stale: !0, slow: !1, collapsedByDefault: void 0})
- }
- function C(e, t) {
- return !!t.parent && (t.parent === e || C(e, t.parent))
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = function () {
- function e(e) {
- this.node = e
- }
- return Object.defineProperty(e.prototype, "element", {
- get: function () {
- return this.node.element.element
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "children", {
- get: function () {
- return this.node.children.map((function (t) {
- return new e(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "depth", {
- get: function () {
- return this.node.depth
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visibleChildrenCount", {
- get: function () {
- return this.node.visibleChildrenCount
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visibleChildIndex", {
- get: function () {
- return this.node.visibleChildIndex
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "collapsible", {
- get: function () {
- return this.node.collapsible
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "collapsed", {
- get: function () {
- return this.node.collapsed
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visible", {
- get: function () {
- return this.node.visible
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "filterData", {
- get: function () {
- return this.node.filterData
- }, enumerable: !0, configurable: !0
- }), e
- }(), S = function () {
- function e(e, t, n) {
- this.renderer = e, this.nodeMapper = t, this.onDidChangeTwistieState = n, this.renderedNodes = new Map, this.templateId = e.templateId
- }
- return e.prototype.renderTemplate = function (e) {
- return {templateData: this.renderer.renderTemplate(e)}
- }, e.prototype.renderElement = function (e, t, n, i) {
- this.renderer.renderElement(this.nodeMapper.map(e), t, n.templateData, i)
- }, e.prototype.renderTwistie = function (e, t) {
- return m.toggleClass(t, "codicon-loading", e.slow), !1
- }, e.prototype.disposeElement = function (e, t, n, i) {
- this.renderer.disposeElement && this.renderer.disposeElement(this.nodeMapper.map(e), t, n.templateData, i)
- }, e.prototype.disposeTemplate = function (e) {
- this.renderer.disposeTemplate(e.templateData)
- }, e.prototype.dispose = function () {
- this.renderedNodes.clear()
- }, e
- }();
- function w(e) {
- return {
- browserEvent: e.browserEvent, elements: e.elements.map((function (e) {
- return e.element
- }))
- }
- }
- var E = function (e) {
- function t(t) {
- var n = e.call(this, t.elements.map((function (e) {
- return e.element
- }))) || this;
- return n.data = t, n
- }
- return r(t, e), t
- }(g.ElementsDragAndDropData);
- function L(e) {
- return e instanceof g.ElementsDragAndDropData ? new E(e) : e
- }
- var D = function () {
- function e(e) {
- this.dnd = e
- }
- return e.prototype.getDragURI = function (e) {
- return this.dnd.getDragURI(e.element)
- }, e.prototype.getDragLabel = function (e, t) {
- if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e.map((function (e) {
- return e.element
- })), t)
- }, e.prototype.onDragStart = function (e, t) {
- this.dnd.onDragStart && this.dnd.onDragStart(L(e), t)
- }, e.prototype.onDragOver = function (e, t, n, i, o) {
- return void 0 === o && (o = !0), this.dnd.onDragOver(L(e), t && t.element, n, i)
- }, e.prototype.drop = function (e, t, n, i) {
- this.dnd.drop(L(e), t && t.element, n, i)
- }, e.prototype.onDragEnd = function (e) {
- this.dnd.onDragEnd && this.dnd.onDragEnd(e)
- }, e
- }();
- function N(e) {
- return e && l(l({}, e), {
- collapseByDefault: !0,
- identityProvider: e.identityProvider && {
- getId: function (t) {
- return e.identityProvider.getId(t.element)
- }
- },
- dnd: e.dnd && new D(e.dnd),
- multipleSelectionController: e.multipleSelectionController && {
- isSelectionSingleChangeEvent: function (t) {
- return e.multipleSelectionController.isSelectionSingleChangeEvent(l(l({}, t), {element: t.element}))
- }, isSelectionRangeChangeEvent: function (t) {
- return e.multipleSelectionController.isSelectionRangeChangeEvent(l(l({}, t), {element: t.element}))
- }
- },
- accessibilityProvider: e.accessibilityProvider && l(l({}, e.accessibilityProvider), {
- getAriaLabel: function (t) {
- return e.accessibilityProvider.getAriaLabel(t.element)
- }, getAriaLevel: e.accessibilityProvider.getAriaLevel && function (t) {
- return e.accessibilityProvider.getAriaLevel(t.element)
- }, getActiveDescendantId: e.accessibilityProvider.getActiveDescendantId && function (t) {
- return e.accessibilityProvider.getActiveDescendantId(t.element)
- }
- }),
- filter: e.filter && {
- filter: function (t, n) {
- return e.filter.filter(t.element, n)
- }
- },
- keyboardNavigationLabelProvider: e.keyboardNavigationLabelProvider && l(l({}, e.keyboardNavigationLabelProvider), {
- getKeyboardNavigationLabel: function (t) {
- return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)
- }
- }),
- sorter: void 0,
- expandOnlyOnTwistieClick: void 0 === e.expandOnlyOnTwistieClick ? void 0 : "function" != typeof e.expandOnlyOnTwistieClick ? e.expandOnlyOnTwistieClick : function (t) {
- return e.expandOnlyOnTwistieClick(t.element)
- },
- ariaProvider: e.ariaProvider && {
- getPosInSet: function (t, n) {
- return e.ariaProvider.getPosInSet(t.element, n)
- }, getSetSize: function (t, n, i) {
- return e.ariaProvider.getSetSize(t.element, n, i)
- }, getRole: e.ariaProvider.getRole ? function (t) {
- return e.ariaProvider.getRole(t.element)
- } : void 0, isChecked: e.ariaProvider.isChecked ? function (t) {
- var n;
- return (null === (n = e.ariaProvider) || void 0 === n ? void 0 : n.isChecked)(t.element)
- } : void 0
- },
- additionalScrollHeight: e.additionalScrollHeight
- })
- }
- function x(e, t) {
- t(e), e.children.forEach((function (e) {
- return x(e, t)
- }))
- }
- var I = function () {
- function e(e, t, n, i, r, a) {
- void 0 === a && (a = {}), this.user = e, this.dataSource = r, this.nodes = new Map, this.subTreeRefreshPromises = new Map, this.refreshPromises = new Map, this._onDidRender = new u.Emitter, this._onDidChangeNodeSlowState = new u.Emitter, this.nodeMapper = new o.WeakMapper((function (e) {
- return new b(e)
- })), this.disposables = new s.DisposableStore, this.identityProvider = a.identityProvider,
- this.autoExpandSingleChildren = void 0 !== a.autoExpandSingleChildren && a.autoExpandSingleChildren, this.sorter = a.sorter, this.collapseByDefault = a.collapseByDefault, this.tree = this.createTree(e, t, n, i, a), this.root = y({
- element: void 0,
- parent: null,
- hasChildren: !0
- }), this.identityProvider && (this.root = l(l({}, this.root), {id: null})), this.nodes.set(null, this.root), this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState, this, this.disposables)
- }
- return Object.defineProperty(e.prototype, "onDidChangeFocus", {
- get: function () {
- return u.Event.map(this.tree.onDidChangeFocus, w)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidChangeSelection", {
- get: function () {
- return u.Event.map(this.tree.onDidChangeSelection, w)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidOpen", {
- get: function () {
- return u.Event.map(this.tree.onDidOpen, w)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "onDidFocus", {
- get: function () {
- return this.tree.onDidFocus
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "onDidDispose", {
- get: function () {
- return this.tree.onDidDispose
- }, enumerable: !0, configurable: !0
- }), e.prototype.createTree = function (e, t, o, r, s) {
- var a = this, l = new n.ComposedTreeDelegate(o), u = r.map((function (e) {
- return new S(e, a.nodeMapper, a._onDidChangeNodeSlowState.event)
- })), d = N(s) || {};
- return new i.ObjectTree(e, t, l, u, d)
- }, e.prototype.updateOptions = function (e) {
- void 0 === e && (e = {}), this.tree.updateOptions(e)
- }, e.prototype.getHTMLElement = function () {
- return this.tree.getHTMLElement()
- }, Object.defineProperty(e.prototype, "scrollTop", {
- get: function () {
- return this.tree.scrollTop
- }, set: function (e) {
- this.tree.scrollTop = e
- }, enumerable: !0, configurable: !0
- }), e.prototype.domFocus = function () {
- this.tree.domFocus()
- }, e.prototype.layout = function (e, t) {
- this.tree.layout(e, t)
- }, e.prototype.style = function (e) {
- this.tree.style(e)
- }, e.prototype.getInput = function () {
- return this.root.element
- }, e.prototype.setInput = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n;
- return c(this, (function (i) {
- switch (i.label) {
- case 0:
- return this.refreshPromises.forEach((function (e) {
- return e.cancel()
- })), this.refreshPromises.clear(), this.root.element = e, n = t && {
- viewState: t,
- focus: [],
- selection: []
- }, [4, this._updateChildren(e, !0, !1, n)];
- case 1:
- return i.sent(), n && (this.tree.setFocus(n.focus), this.tree.setSelection(n.selection)), t && "number" == typeof t.scrollTop && (this.scrollTop = t.scrollTop), [2]
- }
- }))
- }))
- }, e.prototype._updateChildren = function (e, t, n, i) {
- return void 0 === e && (e = this.root.element), void 0 === t && (t = !0), void 0 === n && (n = !1), d(this, void 0, void 0, (function () {
- var r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- if (void 0 === this.root.element) throw new o.TreeError(this.user, "Tree input not set");
- return this.root.refreshPromise ? [4, this.root.refreshPromise] : [3, 3];
- case 1:
- return s.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
- case 2:
- s.sent(), s.label = 3;
- case 3:
- return r = this.getDataNode(e), [4, this.refreshAndRenderNode(r, t, i)];
- case 4:
- if (s.sent(), n) try {
- this.tree.rerender(r)
- } catch (e) {
- }
- return [2]
- }
- }))
- }))
- }, e.prototype.rerender = function (e) {
- if (void 0 !== e && e !== this.root.element) {
- var t = this.getDataNode(e);
- this.tree.rerender(t)
- } else this.tree.rerender()
- }, e.prototype.collapse = function (e, t) {
- void 0 === t && (t = !1);
- var n = this.getDataNode(e);
- return this.tree.collapse(n === this.root ? null : n, t)
- }, e.prototype.expand = function (e, t) {
- return void 0 === t && (t = !1), d(this, void 0, void 0, (function () {
- var n, i;
- return c(this, (function (r) {
- switch (r.label) {
- case 0:
- if (void 0 === this.root.element) throw new o.TreeError(this.user, "Tree input not set");
- return this.root.refreshPromise ? [4, this.root.refreshPromise] : [3, 3];
- case 1:
- return r.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
- case 2:
- r.sent(), r.label = 3;
- case 3:
- return n = this.getDataNode(e), this.tree.hasElement(n) && !this.tree.isCollapsible(n) ? [2, !1] : n.refreshPromise ? [4, this.root.refreshPromise] : [3, 6];
- case 4:
- return r.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
- case 5:
- r.sent(), r.label = 6;
- case 6:
- return n === this.root || n.refreshPromise || this.tree.isCollapsed(n) ? (i = this.tree.expand(n === this.root ? null : n, t),
- n.refreshPromise ? [4, this.root.refreshPromise] : [3, 9]) : [2, !1];
- case 7:
- return r.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
- case 8:
- r.sent(), r.label = 9;
- case 9:
- return [2, i]
- }
- }))
- }))
- }, e.prototype.setSelection = function (e, t) {
- var n = this, i = e.map((function (e) {
- return n.getDataNode(e)
- }));
- this.tree.setSelection(i, t)
- }, e.prototype.getSelection = function () {
- return this.tree.getSelection().map((function (e) {
- return e.element
- }))
- }, e.prototype.setFocus = function (e, t) {
- var n = this, i = e.map((function (e) {
- return n.getDataNode(e)
- }));
- this.tree.setFocus(i, t)
- }, e.prototype.getFocus = function () {
- return this.tree.getFocus().map((function (e) {
- return e.element
- }))
- }, e.prototype.reveal = function (e, t) {
- this.tree.reveal(this.getDataNode(e), t)
- }, e.prototype.getDataNode = function (e) {
- var t = this.nodes.get(e === this.root.element ? null : e);
- if (!t) throw new o.TreeError(this.user, "Data tree node not found: " + e);
- return t
- }, e.prototype.refreshAndRenderNode = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (i) {
- switch (i.label) {
- case 0:
- return [4, this.refreshNode(e, t, n)];
- case 1:
- return i.sent(), this.render(e, n), [2]
- }
- }))
- }))
- }, e.prototype.refreshNode = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i, o = this;
- return c(this, (function (r) {
- return this.subTreeRefreshPromises.forEach((function (r, s) {
- !i && function (e, t) {
- return e === t || C(e, t) || C(t, e)
- }(s, e) && (i = r.then((function () {
- return o.refreshNode(e, t, n)
- })))
- })), i ? [2, i] : [2, this.doRefreshSubTree(e, t, n)]
- }))
- }))
- }, e.prototype.doRefreshSubTree = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i, o, r = this;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- e.refreshPromise = new Promise((function (e) {
- return i = e
- })), this.subTreeRefreshPromises.set(e, e.refreshPromise), e.refreshPromise.finally((function () {
- e.refreshPromise = void 0, r.subTreeRefreshPromises.delete(e)
- })), s.label = 1;
- case 1:
- return s.trys.push([1, , 4, 5]), [4, this.doRefreshNode(e, t, n)];
- case 2:
- return o = s.sent(), e.stale = !1, [4, Promise.all(o.map((function (e) {
- return r.doRefreshSubTree(e, t, n)
- })))];
- case 3:
- return s.sent(), [3, 5];
- case 4:
- return i(), [7];
- case 5:
- return [2]
- }
- }))
- }))
- }, e.prototype.doRefreshNode = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i, o, r, s, a = this;
- return c(this, (function (l) {
- switch (l.label) {
- case 0:
- e.hasChildren = !!this.dataSource.hasChildren(e.element), e.hasChildren ? ((o = h.timeout(800)).then((function () {
- e.slow = !0, a._onDidChangeNodeSlowState.fire(e)
- }), (function (e) {
- return null
- })), i = this.doGetChildren(e).finally((function () {
- return o.cancel()
- }))) : i = Promise.resolve([]), l.label = 1;
- case 1:
- return l.trys.push([1, 3, 4, 5]), [4, i];
- case 2:
- return r = l.sent(), [2, this.setChildren(e, r, t, n)];
- case 3:
- if (s = l.sent(), e !== this.root && this.tree.collapse(e === this.root ? null : e), f.isPromiseCanceledError(s)) return [2, []];
- throw s;
- case 4:
- return e.slow && (e.slow = !1, this._onDidChangeNodeSlowState.fire(e)), [7];
- case 5:
- return [2]
- }
- }))
- }))
- }, e.prototype.doGetChildren = function (e) {
- var t = this, n = this.refreshPromises.get(e);
- return n || (n = h.createCancelablePromise((function () {
- return d(t, void 0, void 0, (function () {
- var t;
- return c(this, (function (n) {
- switch (n.label) {
- case 0:
- return [4, this.dataSource.getChildren(e.element)];
- case 1:
- return t = n.sent(), [2, this.processChildren(t)]
- }
- }))
- }))
- })), this.refreshPromises.set(e, n), n.finally((function () {
- return t.refreshPromises.delete(e)
- })))
- }, e.prototype._onDidChangeCollapseState = function (e) {
- var t = e.node, n = e.deep;
- !t.collapsed && t.element.stale && (n ? this.collapse(t.element.element) : this.refreshAndRenderNode(t.element, !1).catch(f.onUnexpectedError))
- }, e.prototype.setChildren = function (e, t, n, i) {
- var o, r = this;
- if (0 === e.children.length && 0 === t.length) return [];
- for (var s = new Map, l = new Map, u = 0, d = e.children; u < d.length; u++) {
- var c = d[u];
- if (s.set(c.element, c), this.identityProvider) {
- var h = this.tree.isCollapsed(c);
- l.set(c.id, {node: c, collapsed: h})
- }
- }
- for (var p = [], g = t.map((function (t) {
- var o = !!r.dataSource.hasChildren(t);
- if (!r.identityProvider) {
- var a = y({element: t, parent: e, hasChildren: o});
- return o && r.collapseByDefault && !r.collapseByDefault(t) && (a.collapsedByDefault = !1, p.push(a)), a
- }
- var u = r.identityProvider.getId(t).toString(), d = l.get(u);
- if (d) {
- a = d.node
- ;
- return s.delete(a.element), r.nodes.delete(a.element), r.nodes.set(t, a), a.element = t, a.hasChildren = o, n ? d.collapsed ? (a.children.forEach((function (e) {
- return x(e, (function (e) {
- return r.nodes.delete(e.element)
- }))
- })), a.children.splice(0, a.children.length), a.stale = !0) : p.push(a) : o && r.collapseByDefault && !r.collapseByDefault(t) && (a.collapsedByDefault = !1, p.push(a)), a
- }
- var c = y({element: t, parent: e, id: u, hasChildren: o});
- return i && i.viewState.focus && i.viewState.focus.indexOf(u) > -1 && i.focus.push(c), i && i.viewState.selection && i.viewState.selection.indexOf(u) > -1 && i.selection.push(c), i && i.viewState.expanded && i.viewState.expanded.indexOf(u) > -1 ? p.push(c) : o && r.collapseByDefault && !r.collapseByDefault(t) && (c.collapsedByDefault = !1, p.push(c)), c
- })), f = 0, m = v.values(s); f < m.length; f++) {
- x(m[f], (function (e) {
- return r.nodes.delete(e.element)
- }))
- }
- for (var _ = 0, C = g; _ < C.length; _++) {
- c = C[_];
- this.nodes.set(c.element, c)
- }
- return (o = e.children).splice.apply(o, a([0, e.children.length], g)),
- e !== this.root && this.autoExpandSingleChildren && 1 === g.length && 0 === p.length && (g[0].collapsedByDefault = !1, p.push(g[0])), p
- }, e.prototype.render = function (e, t) {
- var n = this, i = e.children.map((function (e) {
- return n.asTreeElement(e, t)
- }));
- this.tree.setChildren(e === this.root ? null : e, i), e !== this.root && this.tree.setCollapsible(e, e.hasChildren), this._onDidRender.fire()
- }, e.prototype.asTreeElement = function (e, t) {
- var n, i = this;
- return e.stale ? {
- element: e,
- collapsible: e.hasChildren,
- collapsed: !0
- } : (n = !(t && t.viewState.expanded && e.id && t.viewState.expanded.indexOf(e.id) > -1) && e.collapsedByDefault, e.collapsedByDefault = void 0, {
- element: e,
- children: e.hasChildren ? p.Iterator.map(p.Iterator.fromArray(e.children), (function (e) {
- return i.asTreeElement(e, t)
- })) : [],
- collapsible: e.hasChildren,
- collapsed: n
- })
- }, e.prototype.processChildren = function (e) {
- return this.sorter && e.sort(this.sorter.compare.bind(this.sorter)), e
- }, e.prototype.dispose = function () {
- this.disposables.dispose()
- }, e
- }();
- t.AsyncDataTree = I;
- var M = function () {
- function e(e) {
- this.node = e
- }
- return Object.defineProperty(e.prototype, "element", {
- get: function () {
- return {
- elements: this.node.element.elements.map((function (e) {
- return e.element
- })), incompressible: this.node.element.incompressible
- }
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "children", {
- get: function () {
- return this.node.children.map((function (t) {
- return new e(t)
- }))
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "depth", {
- get: function () {
- return this.node.depth
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visibleChildrenCount", {
- get: function () {
- return this.node.visibleChildrenCount
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "visibleChildIndex", {
- get: function () {
- return this.node.visibleChildIndex
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "collapsible", {
- get: function () {
- return this.node.collapsible
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "collapsed", {
- get: function () {
- return this.node.collapsed
- }, enumerable: !0,
- configurable: !0
- }), Object.defineProperty(e.prototype, "visible", {
- get: function () {
- return this.node.visible
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "filterData", {
- get: function () {
- return this.node.filterData
- }, enumerable: !0, configurable: !0
- }), e
- }(), k = function () {
- function e(e, t, n, i) {
- this.renderer = e, this.nodeMapper = t, this.compressibleNodeMapperProvider = n, this.onDidChangeTwistieState = i, this.renderedNodes = new Map, this.disposables = [], this.templateId = e.templateId
- }
- return e.prototype.renderTemplate = function (e) {
- return {templateData: this.renderer.renderTemplate(e)}
- }, e.prototype.renderElement = function (e, t, n, i) {
- this.renderer.renderElement(this.nodeMapper.map(e), t, n.templateData, i)
- }, e.prototype.renderCompressedElements = function (e, t, n, i) {
- this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e), t, n.templateData, i)
- }, e.prototype.renderTwistie = function (e, t) {
- return m.toggleClass(t, "codicon-loading", e.slow), !1
- }, e.prototype.disposeElement = function (e, t, n, i) {
- this.renderer.disposeElement && this.renderer.disposeElement(this.nodeMapper.map(e), t, n.templateData, i)
- }, e.prototype.disposeCompressedElements = function (e, t, n, i) {
- this.renderer.disposeCompressedElements && this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e), t, n.templateData, i)
- }, e.prototype.disposeTemplate = function (e) {
- this.renderer.disposeTemplate(e.templateData)
- }, e.prototype.dispose = function () {
- this.renderedNodes.clear(), this.disposables = s.dispose(this.disposables)
- }, e
- }();
- var T = function (e) {
- function t(t, n, i, r, s, a, l) {
- void 0 === l && (l = {});
- var u = e.call(this, t, n, i, s, a, l) || this;
- return u.compressionDelegate = r, u.compressibleNodeMapper = new o.WeakMapper((function (e) {
- return new M(e)
- })), u.filter = l.filter, u
- }
- return r(t, e), t.prototype.createTree = function (e, t, o, r, s) {
- var a = this, u = new n.ComposedTreeDelegate(o), d = r.map((function (e) {
- return new k(e, a.nodeMapper, (function () {
- return a.compressibleNodeMapper
- }), a._onDidChangeNodeSlowState.event)
- })), c = function (e) {
- var t = e && N(e);
- return t && l(l({}, t), {
- keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && l(l({}, t.keyboardNavigationLabelProvider), {
- getCompressedNodeKeyboardNavigationLabel: function (t) {
- return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((function (e) {
- return e.element
- })))
- }
- })
- })
- }(s) || {};
- return new i.CompressibleObjectTree(e, t, u, d, c)
- }, t.prototype.asTreeElement = function (t, n) {
- return l({incompressible: this.compressionDelegate.isIncompressible(t.element)}, e.prototype.asTreeElement.call(this, t, n))
- }, t.prototype.updateOptions = function (e) {
- void 0 === e && (e = {}), this.tree.updateOptions(e)
- }, t.prototype.render = function (t, n) {
- var i = this;
- if (!this.identityProvider) return e.prototype.render.call(this, t, n);
- var o = function (e) {
- return i.identityProvider.getId(e).toString()
- }, r = function (e) {
- for (var t = new Set, n = 0, r = e; n < r.length; n++) {
- var s = r[n], a = i.tree.getCompressedTreeNode(s === i.root ? null : s);
- if (a.element) for (var l = 0, u = a.element.elements; l < u.length; l++) {
- var d = u[l];
- t.add(o(d.element))
- }
- }
- return t
- }, s = r(this.tree.getSelection()), a = r(this.tree.getFocus());
- e.prototype.render.call(this, t, n);
- var l = this.getSelection(), u = !1, d = this.getFocus(), c = !1, h = function (e) {
- var t = e.element;
- if (t) for (var n = 0; n < t.elements.length; n++) {
- var i = o(t.elements[n].element), r = t.elements[t.elements.length - 1].element;
- s.has(i) && -1 === l.indexOf(r) && (l.push(r), u = !0), a.has(i) && -1 === d.indexOf(r) && (d.push(r), c = !0)
- }
- e.children.forEach(h)
- };
- h(this.tree.getCompressedTreeNode(t === this.root ? null : t)), u && this.setSelection(l), c && this.setFocus(d)
- }, t.prototype.processChildren = function (t) {
- var n = this;
- return this.filter && (t = t.filter((function (e) {
- var t, i = n.filter.filter(e, 1),
- o = "boolean" == typeof (t = i) ? t ? 1 : 0 : _.isFilterResult(t) ? _.getVisibleState(t.visibility) : _.getVisibleState(t);
- if (2 === o) throw new Error("Recursive tree visibility not supported in async data compressed trees");
- return 1 === o
- }))), e.prototype.processChildren.call(this, t)
- }, t
- }(I);
- t.CompressibleAsyncDataTree = T
- })), define(n[409], i([7, 8]), (function (e, t) {
- return e.create("vs/base/common/keybindingLabels", t)
- })), define(n[207], i([0, 1, 409]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t, n) {
- void 0 === n && (n = t), this.modifierLabels = [null], this.modifierLabels[2] = e, this.modifierLabels[1] = t, this.modifierLabels[3] = n
- }
- return e.prototype.toLabel = function (e, t, n) {
- if (0 === t.length) return null;
- for (var i = [], r = 0, s = t.length; r < s; r++) {
- var a = t[r], l = n(a);
- if (null === l) return null;
- i[r] = o(a, l, this.modifierLabels[e])
- }
- return i.join(" ")
- }, e
- }();
- function o(e, t, n) {
- if (null === t) return "";
- var i = [];
- return e.ctrlKey && i.push(n.ctrlKey), e.shiftKey && i.push(n.shiftKey), e.altKey && i.push(n.altKey), e.metaKey && i.push(n.metaKey), i.push(t), i.join(n.separator)
- }
- t.ModifierLabelProvider = i, t.UILabelProvider = new i({
- ctrlKey: "⌃",
- shiftKey: "⇧",
- altKey: "⌥",
- metaKey: "⌘",
- separator: ""
- }, {
- ctrlKey: n.localize(0, null),
- shiftKey: n.localize(1, null),
- altKey: n.localize(2, null),
- metaKey: n.localize(3, null),
- separator: "+"
- }, {
- ctrlKey: n.localize(4, null),
- shiftKey: n.localize(5, null),
- altKey: n.localize(6, null),
- metaKey: n.localize(7, null),
- separator: "+"
- }), t.AriaLabelProvider = new i({
- ctrlKey: n.localize(8, null),
- shiftKey: n.localize(9, null),
- altKey: n.localize(10, null),
- metaKey: n.localize(11, null),
- separator: "+"
- }, {
- ctrlKey: n.localize(12, null),
- shiftKey: n.localize(13, null),
- altKey: n.localize(14, null),
- metaKey: n.localize(15, null),
- separator: "+"
- }, {
- ctrlKey: n.localize(16, null),
- shiftKey: n.localize(17, null),
- altKey: n.localize(18, null),
- metaKey: n.localize(19, null),
- separator: "+"
- })
- })), define(n[410], i([0, 1, 31, 207, 6, 402, 270]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = o.$, a = function () {
- function e(e, t, n) {
- this.os = t, this.options = n, this.domNode = o.append(e, s(".monaco-keybinding")), this.didEverRender = !1, e.appendChild(this.domNode)
- }
- return e.prototype.set = function (t, n) {
- this.didEverRender && this.keybinding === t && e.areSame(this.matches, n) || (this.keybinding = t, this.matches = n, this.render())
- }, e.prototype.render = function () {
- if (o.clearNode(this.domNode), this.keybinding) {
- var e = this.keybinding.getParts(), t = e[0], n = e[1]
- ;t && this.renderPart(this.domNode, t, this.matches ? this.matches.firstPart : null), n && (o.append(this.domNode, s("span.monaco-keybinding-key-chord-separator", void 0, " ")), this.renderPart(this.domNode, n, this.matches ? this.matches.chordPart : null)), this.domNode.title = this.keybinding.getAriaLabel() || ""
- } else this.options && this.options.renderUnboundKeybindings && this.renderUnbound(this.domNode);
- this.didEverRender = !0
- }, e.prototype.renderPart = function (e, t, n) {
- var o = i.UILabelProvider.modifierLabels[this.os];
- t.ctrlKey && this.renderKey(e, o.ctrlKey, Boolean(null == n ? void 0 : n.ctrlKey), o.separator), t.shiftKey && this.renderKey(e, o.shiftKey, Boolean(null == n ? void 0 : n.shiftKey), o.separator), t.altKey && this.renderKey(e, o.altKey, Boolean(null == n ? void 0 : n.altKey), o.separator), t.metaKey && this.renderKey(e, o.metaKey, Boolean(null == n ? void 0 : n.metaKey), o.separator);
- var r = t.keyLabel;
- r && this.renderKey(e, r, Boolean(null == n ? void 0 : n.keyCode), "")
- }, e.prototype.renderKey = function (e, t, n, i) {
- o.append(e, s("span.monaco-keybinding-key" + (n ? ".highlight" : ""), void 0, t)),
- i && o.append(e, s("span.monaco-keybinding-key-separator", void 0, i))
- }, e.prototype.renderUnbound = function (e) {
- o.append(e, s("span.monaco-keybinding-key", void 0, r.localize(0, null)))
- }, e.areSame = function (e, t) {
- return e === t || !e && !t || !!e && !!t && n.equals(e.firstPart, t.firstPart) && n.equals(e.chordPart, t.chordPart)
- }, e
- }();
- t.KeybindingLabel = a
- })), define(n[411], i([7, 8]), (function (e, t) {
- return e.create("vs/base/common/severity", t)
- })), define(n[112], i([0, 1, 411, 5]), (function (e, t, n, i) {
- "use strict";
- var o;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e[e.Ignore = 0] = "Ignore", e[e.Info = 1] = "Info", e[e.Warning = 2] = "Warning", e[e.Error = 3] = "Error"
- }(o || (o = {})), function (e) {
- var t = "error", o = "warning", r = "warn", s = "info", a = Object.create(null);
- a[e.Error] = n.localize(0, null), a[e.Warning] = n.localize(1, null), a[e.Info] = n.localize(2, null), e.fromValue = function (n) {
- return n ? i.equalsIgnoreCase(t, n) ? e.Error : i.equalsIgnoreCase(o, n) || i.equalsIgnoreCase(r, n) ? e.Warning : i.equalsIgnoreCase(s, n) ? e.Info : e.Ignore : e.Ignore
- }
- }(o || (o = {})), t.default = o
- })),
- define(n[412], i([7, 8]), (function (e, t) {
- return e.create("vs/base/parts/quickopen/browser/quickOpenModel", t)
- })), define(n[155], i([0, 1, 412, 21, 139, 70, 133, 6, 410, 16, 19]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var h = 0, p = function () {
- function e(e) {
- void 0 === e && (e = []), this.id = (h++).toString(), this.labelHighlights = e, this.descriptionHighlights = []
- }
- return e.prototype.getId = function () {
- return this.id
- }, e.prototype.getLabel = function () {
- }, e.prototype.getLabelOptions = function () {
- }, e.prototype.getAriaLabel = function () {
- return c.coalesce([this.getLabel(), this.getDescription(), this.getDetail()]).join(", ")
- }, e.prototype.getDetail = function () {
- }, e.prototype.getIcon = function () {
- }, e.prototype.getDescription = function () {
- }, e.prototype.getTooltip = function () {
- }, e.prototype.getDescriptionTooltip = function () {
- }, e.prototype.getKeybinding = function () {
- }, e.prototype.isHidden = function () {
- return !!this.hidden
- }, e.prototype.setHighlights = function (e, t, n) {
- this.labelHighlights = e, this.descriptionHighlights = t,
- this.detailHighlights = n
- }, e.prototype.getHighlights = function () {
- return [this.labelHighlights, this.descriptionHighlights, this.detailHighlights]
- }, e.prototype.run = function (e, t) {
- return !1
- }, e
- }();
- t.QuickOpenEntry = p;
- var g = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o.entry = t, o.groupLabel = n, o.withBorder = i, o
- }
- return r(t, e), t.prototype.getGroupLabel = function () {
- return this.groupLabel
- }, t.prototype.setGroupLabel = function (e) {
- this.groupLabel = e
- }, t.prototype.showBorder = function () {
- return !!this.withBorder
- }, t.prototype.setShowBorder = function (e) {
- this.withBorder = e
- }, t.prototype.getLabel = function () {
- return this.entry ? this.entry.getLabel() : e.prototype.getLabel.call(this)
- }, t.prototype.getLabelOptions = function () {
- return this.entry ? this.entry.getLabelOptions() : e.prototype.getLabelOptions.call(this)
- }, t.prototype.getAriaLabel = function () {
- return this.entry ? this.entry.getAriaLabel() : e.prototype.getAriaLabel.call(this)
- }, t.prototype.getDetail = function () {
- return this.entry ? this.entry.getDetail() : e.prototype.getDetail.call(this)
- },
- t.prototype.getIcon = function () {
- return this.entry ? this.entry.getIcon() : e.prototype.getIcon.call(this)
- }, t.prototype.getDescription = function () {
- return this.entry ? this.entry.getDescription() : e.prototype.getDescription.call(this)
- }, t.prototype.getHighlights = function () {
- return this.entry ? this.entry.getHighlights() : e.prototype.getHighlights.call(this)
- }, t.prototype.isHidden = function () {
- return this.entry ? this.entry.isHidden() : e.prototype.isHidden.call(this)
- }, t.prototype.setHighlights = function (t, n, i) {
- this.entry ? this.entry.setHighlights(t, n, i) : e.prototype.setHighlights.call(this, t, n, i)
- }, t.prototype.run = function (t, n) {
- return this.entry ? this.entry.run(t, n) : e.prototype.run.call(this, t, n)
- }, t
- }(p);
- t.QuickOpenEntryGroup = g;
- var f = function () {
- function e() {
- }
- return e.prototype.hasActions = function (e, t) {
- return !1
- }, e.prototype.getActions = function (e, t) {
- return null
- }, e
- }(), m = function () {
- function e(e, t) {
- void 0 === e && (e = new f), this.actionProvider = e, this.actionRunner = t
- }
- return e.prototype.getHeight = function (e) {
- return e.getDetail() ? 44 : 22
- },
- e.prototype.getTemplateId = function (e) {
- return e instanceof g ? "quickOpenEntryGroup" : "quickOpenEntry"
- }, e.prototype.renderTemplate = function (e, t, n) {
- var i = document.createElement("div");
- l.addClass(i, "sub-content"), t.appendChild(i);
- var r = l.$(".quick-open-row"), c = l.$(".quick-open-row"), h = l.$(".quick-open-entry", void 0, r, c);
- i.appendChild(h);
- var p = document.createElement("span");
- r.appendChild(p);
- var g = new o.IconLabel(r, {
- supportHighlights: !0,
- supportDescriptionHighlights: !0,
- supportCodicons: !0
- }), f = document.createElement("span");
- r.appendChild(f), l.addClass(f, "quick-open-entry-keybinding");
- var m = new u.KeybindingLabel(f, d.OS), v = document.createElement("div");
- c.appendChild(v), l.addClass(v, "quick-open-entry-meta");
- var _, y = new a.HighlightedLabel(v, !0);
- "quickOpenEntryGroup" === e && (_ = document.createElement("div"), l.addClass(_, "results-group"), t.appendChild(_)), l.addClass(t, "actions");
- var C = document.createElement("div");
- return l.addClass(C, "primary-action-bar"), t.appendChild(C), {
- container: t, entry: h, icon: p, label: g, detail: y,
- keybinding: m, group: _, actionBar: new s.ActionBar(C, {actionRunner: this.actionRunner})
- }
- }, e.prototype.renderElement = function (e, t, n, i) {
- this.actionProvider.hasActions(null, e) ? l.addClass(n.container, "has-actions") : l.removeClass(n.container, "has-actions"), n.actionBar.context = e;
- var o = this.actionProvider.getActions(null, e);
- if (n.actionBar.isEmpty() && o && o.length > 0 ? n.actionBar.push(o, {
- icon: !0,
- label: !1
- }) : n.actionBar.isEmpty() || o && 0 !== o.length || n.actionBar.clear(), e instanceof g && e.getGroupLabel() ? l.addClass(n.container, "has-group-label") : l.removeClass(n.container, "has-group-label"), e instanceof g) {
- var r = e, s = n;
- r.showBorder() ? (l.addClass(s.container, "results-group-separator"), i.pickerGroupBorder && (s.container.style.borderTopColor = i.pickerGroupBorder.toString())) : (l.removeClass(s.container, "results-group-separator"), s.container.style.borderTopColor = "");
- var a = r.getGroupLabel() || "";
- s.group && (s.group.textContent = a, i.pickerGroupForeground && (s.group.style.color = i.pickerGroupForeground.toString()))
- }
- if (e instanceof p) {
- var u = e.getHighlights(), d = u[0], c = u[1], h = u[2],
- f = e.getIcon() ? "quick-open-entry-icon " + e.getIcon() : "";
- n.icon.className = f;
- var m = e.getLabelOptions() || Object.create(null);
- m.matches = d || [], m.title = e.getTooltip(), m.descriptionTitle = e.getDescriptionTooltip() || e.getDescription(), m.descriptionMatches = c || [], n.label.setLabel(e.getLabel() || "", e.getDescription(), m), n.detail.set(e.getDetail(), h), n.keybinding.set(e.getKeybinding())
- }
- }, e.prototype.disposeTemplate = function (e, t) {
- t.actionBar.dispose(), t.actionBar = null, t.container = null, t.entry = null, t.keybinding = null, t.detail = null, t.group = null, t.icon = null, t.label.dispose(), t.label = null
- }, e
- }(), v = function () {
- function e(e, t) {
- void 0 === e && (e = []), void 0 === t && (t = new f), this._entries = e, this._dataSource = this, this._renderer = new m(t), this._filter = this, this._runner = this, this._accessibilityProvider = this
- }
- return Object.defineProperty(e.prototype, "entries", {
- get: function () {
- return this._entries
- }, set: function (e) {
- this._entries = e
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "dataSource", {
- get: function () {
- return this._dataSource
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "renderer", {
- get: function () {
- return this._renderer
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "filter", {
- get: function () {
- return this._filter
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "runner", {
- get: function () {
- return this._runner
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "accessibilityProvider", {
- get: function () {
- return this._accessibilityProvider
- }, enumerable: !0, configurable: !0
- }), e.prototype.getId = function (e) {
- return e.getId()
- }, e.prototype.getLabel = function (e) {
- return i.withUndefinedAsNull(e.getLabel())
- }, e.prototype.getAriaLabel = function (e) {
- return e.getAriaLabel() ? n.localize(0, null, e.getAriaLabel()) : n.localize(1, null)
- }, e.prototype.isVisible = function (e) {
- return !e.isHidden()
- }, e.prototype.run = function (e, t, n) {
- return e.run(t, n)
- }, e
- }();
- t.QuickOpenModel = v
- })), define(n[413], i([7, 8]), (function (e, t) {
- return e.create("vs/base/parts/quickopen/browser/quickOpenWidget", t)
- })), define(n[414], i([0, 1, 413, 16, 21, 253, 152, 283, 274, 56, 137, 6, 2, 27, 31, 45, 281]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var v = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.onContextMenu = function (t, n, o) {
- return i.isMacintosh ? this.onLeftClick(t, n, o) : e.prototype.onContextMenu.call(this, t, n, o)
- }, t
- }(c.DefaultController);
- t.QuickOpenController = v;
- var _ = {
- background: g.Color.fromHex("#1E1E1E"),
- foreground: g.Color.fromHex("#CCCCCC"),
- pickerGroupForeground: g.Color.fromHex("#0097FB"),
- pickerGroupBorder: g.Color.fromHex("#3F3F46"),
- widgetShadow: g.Color.fromHex("#000000"),
- progressBarBackground: g.Color.fromHex("#0E70C0")
- }, y = n.localize(0, null), C = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o.isDisposed = !1, o.container = t, o.callbacks = n, o.options = i, o.styles = i || Object.create(null), f.mixin(o.styles, _, !1), o.model = null, o
- }
- return r(t, e),
- t.prototype.getModel = function () {
- return this.model
- }, t.prototype.create = function () {
- var e = this;
- this.element = document.createElement("div"), h.addClass(this.element, "monaco-quick-open-widget"), this.container.appendChild(this.element), this._register(h.addDisposableListener(this.element, h.EventType.CONTEXT_MENU, (function (e) {
- return h.EventHelper.stop(e, !0)
- }))), this._register(h.addDisposableListener(this.element, h.EventType.FOCUS, (function (t) {
- return e.gainingFocus()
- }), !0)), this._register(h.addDisposableListener(this.element, h.EventType.BLUR, (function (t) {
- return e.loosingFocus(t)
- }), !0)), this._register(h.addDisposableListener(this.element, h.EventType.KEY_DOWN, (function (t) {
- var n = new d.StandardKeyboardEvent(t);
- if (9 === n.keyCode) h.EventHelper.stop(t, !0), e.hide(2); else if (2 === n.keyCode && !n.altKey && !n.ctrlKey && !n.metaKey) {
- var i = t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");
- n.shiftKey && n.target === i[0] ? (h.EventHelper.stop(t, !0),
- i[i.length - 1].focus()) : n.shiftKey || n.target !== i[i.length - 1] || (h.EventHelper.stop(t, !0), i[0].focus())
- }
- }))), this.progressBar = this._register(new u.ProgressBar(this.element, {progressBarBackground: this.styles.progressBarBackground})), this.progressBar.hide(), this.inputContainer = document.createElement("div"), h.addClass(this.inputContainer, "quick-open-input"), this.element.appendChild(this.inputContainer), this.inputBox = this._register(new a.InputBox(this.inputContainer, void 0, {
- placeholder: this.options.inputPlaceHolder || "",
- ariaLabel: y,
- inputBackground: this.styles.inputBackground,
- inputForeground: this.styles.inputForeground,
- inputBorder: this.styles.inputBorder,
- inputValidationInfoBackground: this.styles.inputValidationInfoBackground,
- inputValidationInfoForeground: this.styles.inputValidationInfoForeground,
- inputValidationInfoBorder: this.styles.inputValidationInfoBorder,
- inputValidationWarningBackground: this.styles.inputValidationWarningBackground,
- inputValidationWarningForeground: this.styles.inputValidationWarningForeground,
- inputValidationWarningBorder: this.styles.inputValidationWarningBorder,
- inputValidationErrorBackground: this.styles.inputValidationErrorBackground,
- inputValidationErrorForeground: this.styles.inputValidationErrorForeground,
- inputValidationErrorBorder: this.styles.inputValidationErrorBorder
- })), this.inputElement = this.inputBox.inputElement, this.inputElement.setAttribute("role", "combobox"), this.inputElement.setAttribute("aria-haspopup", "false"), this.inputElement.setAttribute("aria-autocomplete", "list"), this._register(h.addDisposableListener(this.inputBox.inputElement, h.EventType.INPUT, (function (t) {
- return e.onType()
- }))), this._register(h.addDisposableListener(this.inputBox.inputElement, h.EventType.KEY_DOWN, (function (t) {
- var n = new d.StandardKeyboardEvent(t), i = e.shouldOpenInBackground(n);
- if (2 !== n.keyCode) if (18 === n.keyCode || 16 === n.keyCode || 12 === n.keyCode || 11 === n.keyCode) h.EventHelper.stop(t, !0), e.navigateInTree(n.keyCode, n.shiftKey),
- e.inputBox.inputElement.selectionStart === e.inputBox.inputElement.selectionEnd && (e.inputBox.inputElement.selectionStart = e.inputBox.value.length); else if (3 === n.keyCode || i) {
- h.EventHelper.stop(t, !0);
- var o = e.tree.getFocus();
- o && e.elementSelected(o, t, i ? 2 : 1)
- }
- }))), this.resultCount = document.createElement("div"), h.addClass(this.resultCount, "quick-open-result-count"), this.resultCount.setAttribute("aria-live", "polite"), this.resultCount.setAttribute("aria-atomic", "true"), this.element.appendChild(this.resultCount), this.treeContainer = document.createElement("div"), h.addClass(this.treeContainer, "quick-open-tree"), this.element.appendChild(this.treeContainer);
- var t = this.options.treeCreator || function (e, t, n) {
- return new l.Tree(e, t, n)
- };
- return this.tree = this._register(t(this.treeContainer, {
- dataSource: new s.DataSource(this),
- controller: new v({clickBehavior: 1, keyboardSupport: this.options.keyboardSupport}),
- renderer: this.renderer = new s.Renderer(this, this.styles),
- filter: new s.Filter(this),
- accessibilityProvider: new s.AccessibilityProvider(this)
- }, {
- twistiePixels: 11,
- indentPixels: 0,
- alwaysFocused: !0,
- verticalScrollMode: 3,
- horizontalScrollMode: 2,
- ariaLabel: n.localize(1, null),
- keyboardSupport: this.options.keyboardSupport,
- preventRootFocus: !1
- })), this.treeElement = this.tree.getHTMLElement(), this._register(this.tree.onDidChangeFocus((function (t) {
- e.elementFocused(t.focus, t)
- }))), this._register(this.tree.onDidChangeSelection((function (t) {
- if (t.selection && t.selection.length > 0) {
- var n = t.payload && t.payload.originalEvent instanceof m.StandardMouseEvent ? t.payload.originalEvent : void 0,
- i = !!n && e.shouldOpenInBackground(n);
- e.elementSelected(t.selection[0], t, i ? 2 : 1)
- }
- }))), this._register(h.addDisposableListener(this.treeContainer, h.EventType.KEY_DOWN, (function (t) {
- var n = new d.StandardKeyboardEvent(t);
- if (e.quickNavigateConfiguration) if (18 === n.keyCode || 16 === n.keyCode || 12 === n.keyCode || 11 === n.keyCode) h.EventHelper.stop(t, !0), e.navigateInTree(n.keyCode); else if (3 === n.keyCode) {
- h.EventHelper.stop(t, !0);
- var i = e.tree.getFocus()
- ;i && e.elementSelected(i, t)
- }
- }))), this._register(h.addDisposableListener(this.treeContainer, h.EventType.KEY_UP, (function (t) {
- var n = new d.StandardKeyboardEvent(t), i = n.keyCode;
- if (e.quickNavigateConfiguration && e.quickNavigateConfiguration.keybindings.some((function (e) {
- var t = e.getParts(), o = t[0];
- return !t[1] && (o.shiftKey && 4 === i ? !(n.ctrlKey || n.altKey || n.metaKey) : !(!o.altKey || 6 !== i) || (!(!o.ctrlKey || 5 !== i) || !(!o.metaKey || 57 !== i)))
- }))) {
- var o = e.tree.getFocus();
- o && e.elementSelected(o, t)
- }
- }))), this.layoutDimensions && this.layout(this.layoutDimensions), this.applyStyles(), this._register(h.addDisposableListener(this.treeContainer, h.EventType.KEY_DOWN, (function (t) {
- var n = new d.StandardKeyboardEvent(t);
- e.quickNavigateConfiguration || 18 !== n.keyCode && 16 !== n.keyCode && 12 !== n.keyCode && 11 !== n.keyCode || (h.EventHelper.stop(t, !0), e.navigateInTree(n.keyCode, n.shiftKey), e.treeElement.focus())
- }))), this.element
- }, t.prototype.style = function (e) {
- this.styles = e, this.applyStyles()
- }, t.prototype.applyStyles = function () {
- if (this.element) {
- var e = this.styles.foreground ? this.styles.foreground.toString() : "",
- t = this.styles.background ? this.styles.background.toString() : "",
- n = this.styles.borderColor ? this.styles.borderColor.toString() : "",
- i = this.styles.widgetShadow ? this.styles.widgetShadow.toString() : "";
- this.element.style.color = e, this.element.style.backgroundColor = t, this.element.style.borderColor = n, this.element.style.borderWidth = n ? "1px" : "", this.element.style.borderStyle = n ? "solid" : "", this.element.style.boxShadow = i ? "0 5px 8px " + i : ""
- }
- this.progressBar && this.progressBar.style({progressBarBackground: this.styles.progressBarBackground}), this.inputBox && this.inputBox.style({
- inputBackground: this.styles.inputBackground,
- inputForeground: this.styles.inputForeground,
- inputBorder: this.styles.inputBorder,
- inputValidationInfoBackground: this.styles.inputValidationInfoBackground,
- inputValidationInfoForeground: this.styles.inputValidationInfoForeground,
- inputValidationInfoBorder: this.styles.inputValidationInfoBorder,
- inputValidationWarningBackground: this.styles.inputValidationWarningBackground,
- inputValidationWarningForeground: this.styles.inputValidationWarningForeground,
- inputValidationWarningBorder: this.styles.inputValidationWarningBorder,
- inputValidationErrorBackground: this.styles.inputValidationErrorBackground,
- inputValidationErrorForeground: this.styles.inputValidationErrorForeground,
- inputValidationErrorBorder: this.styles.inputValidationErrorBorder
- }), this.tree && !this.options.treeCreator && this.tree.style(this.styles), this.renderer && this.renderer.updateStyles(this.styles)
- }, t.prototype.shouldOpenInBackground = function (e) {
- if (e instanceof d.StandardKeyboardEvent) {
- if (17 !== e.keyCode) return !1;
- if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return !1;
- var t = this.inputBox.inputElement;
- return t.selectionEnd === this.inputBox.value.length && t.selectionStart === t.selectionEnd
- }
- return e.middleButton
- }, t.prototype.onType = function () {
- var e = this.inputBox.value;
- this.helpText && (e ? h.hide(this.helpText) : h.show(this.helpText)), this.callbacks.onType(e)
- },
- t.prototype.navigateInTree = function (e, t) {
- var n = this.tree.getInput(), i = n ? n.entries : [], o = this.tree.getFocus();
- switch (e) {
- case 18:
- this.tree.focusNext();
- break;
- case 16:
- this.tree.focusPrevious();
- break;
- case 12:
- this.tree.focusNextPage();
- break;
- case 11:
- this.tree.focusPreviousPage();
- break;
- case 2:
- t ? this.tree.focusPrevious() : this.tree.focusNext()
- }
- var r = this.tree.getFocus();
- i.length > 1 && o === r && (16 === e || 2 === e && t ? this.tree.focusLast() : (18 === e || 2 === e && !t) && this.tree.focusFirst()), (r = this.tree.getFocus()) && this.tree.reveal(r)
- }, t.prototype.elementFocused = function (e, t) {
- if (e && this.isVisible()) {
- var n = this.treeElement.getAttribute("aria-activedescendant");
- n ? this.inputElement.setAttribute("aria-activedescendant", n) : this.inputElement.removeAttribute("aria-activedescendant");
- var i = {
- event: t,
- keymods: this.extractKeyMods(t),
- quickNavigateConfiguration: this.quickNavigateConfiguration
- };
- this.model.runner.run(e, 0, i)
- }
- }, t.prototype.elementSelected = function (e, t, n) {
- var i = !0;
- if (this.isVisible()) {
- var o = n || 1, r = {
- event: t, keymods: this.extractKeyMods(t),
- quickNavigateConfiguration: this.quickNavigateConfiguration
- };
- i = this.model.runner.run(e, o, r)
- }
- i && this.hide(0)
- }, t.prototype.extractKeyMods = function (e) {
- return {
- ctrlCmd: e && (e.ctrlKey || e.metaKey || e.payload && e.payload.originalEvent && (e.payload.originalEvent.ctrlKey || e.payload.originalEvent.metaKey)),
- alt: e && (e.altKey || e.payload && e.payload.originalEvent && e.payload.originalEvent.altKey)
- }
- }, t.prototype.show = function (e, t) {
- this.visible = !0, this.isLoosingFocus = !1, this.quickNavigateConfiguration = t ? t.quickNavigateConfiguration : void 0, this.quickNavigateConfiguration ? (h.hide(this.inputContainer), h.show(this.element), this.tree.domFocus()) : (h.show(this.inputContainer), h.show(this.element), this.inputBox.focus()), this.helpText && (this.quickNavigateConfiguration || o.isString(e) ? h.hide(this.helpText) : h.show(this.helpText)), o.isString(e) ? this.doShowWithPrefix(e) : (t && t.value && this.restoreLastInput(t.value), this.doShowWithInput(e, t && t.autoFocus ? t.autoFocus : {})),
- t && t.inputSelection && !this.quickNavigateConfiguration && this.inputBox.select(t.inputSelection), this.callbacks.onShow && this.callbacks.onShow()
- }, t.prototype.restoreLastInput = function (e) {
- this.inputBox.value = e, this.inputBox.select(), this.callbacks.onType(e)
- }, t.prototype.doShowWithPrefix = function (e) {
- this.inputBox.value = e, this.callbacks.onType(e)
- }, t.prototype.doShowWithInput = function (e, t) {
- this.setInput(e, t)
- }, t.prototype.setInputAndLayout = function (e, t) {
- var n = this;
- this.treeContainer.style.height = this.getHeight(e) + "px", this.tree.setInput(null).then((function () {
- return n.model = e, n.inputElement.setAttribute("aria-haspopup", String(e && e.entries && e.entries.length > 0)), n.tree.setInput(e)
- })).then((function () {
- n.tree.layout();
- var i = e ? e.entries.filter((function (t) {
- return n.isElementVisible(e, t)
- })) : [];
- n.updateResultCount(i.length), i.length && n.autoFocus(e, i, t)
- }))
- }, t.prototype.isElementVisible = function (e, t) {
- return !e.filter || e.filter.isVisible(t)
- }, t.prototype.autoFocus = function (e, t, n) {
- if (void 0 === n && (n = {}), n.autoFocusPrefixMatch) {
- for (var i = void 0, o = void 0, r = n.autoFocusPrefixMatch, s = r.toLowerCase(), a = 0, l = t; a < l.length; a++) {
- var u = l[a], d = e.dataSource.getLabel(u) || "";
- if (i || 0 !== d.indexOf(r) ? o || 0 !== d.toLowerCase().indexOf(s) || (o = u) : i = u, i && o) break
- }
- var c = i || o;
- if (c) return this.tree.setFocus(c), void this.tree.reveal(c, .5)
- }
- n.autoFocusFirstEntry ? (this.tree.focusFirst(), this.tree.reveal(this.tree.getFocus())) : "number" == typeof n.autoFocusIndex ? t.length > n.autoFocusIndex && (this.tree.focusNth(n.autoFocusIndex), this.tree.reveal(this.tree.getFocus())) : n.autoFocusSecondEntry ? t.length > 1 && this.tree.focusNth(1) : n.autoFocusLastEntry && t.length > 1 && (this.tree.focusLast(), this.tree.reveal(this.tree.getFocus()))
- }, t.prototype.getHeight = function (e) {
- var n = this, i = e.renderer;
- if (!e) {
- var o = i.getHeight(null);
- return this.options.minItemsToShow ? this.options.minItemsToShow * o : 0
- }
- var r, s = 0;
- this.layoutDimensions && this.layoutDimensions.height && (r = .4 * (this.layoutDimensions.height - 50)), (!r || r > t.MAX_ITEMS_HEIGHT) && (r = t.MAX_ITEMS_HEIGHT);
- for (var a = e.entries.filter((function (t) {
- return n.isElementVisible(e, t)
- })), l = this.options.maxItemsToShow || a.length, u = 0; u < l && u < a.length; u++) {
- var d = i.getHeight(a[u]);
- if (!(s + d <= r)) break;
- s += d
- }
- return s
- }, t.prototype.updateResultCount = function (e) {
- this.resultCount.textContent = n.localize(2, null, e)
- }, t.prototype.hide = function (e) {
- this.isVisible() && (this.visible = !1, h.hide(this.element), this.element.blur(), this.inputBox.value = "", this.tree.setInput(null), this.inputElement.setAttribute("aria-haspopup", "false"), this.treeContainer.style.height = (this.options.minItemsToShow ? 22 * this.options.minItemsToShow : 0) + "px", this.progressBar.stop().hide(), this.tree.isDOMFocused() ? this.tree.domBlur() : this.inputBox.hasFocus() && this.inputBox.blur(), 0 === e ? this.callbacks.onOk() : this.callbacks.onCancel(), this.callbacks.onHide && this.callbacks.onHide(e))
- }, t.prototype.setInput = function (e, t, n) {
- this.isVisible() && (this.getInput() && this.onInputChanging(), this.setInputAndLayout(e, t), this.inputBox && this.inputBox.setAriaLabel(n || y))
- }, t.prototype.onInputChanging = function () {
- var e = this
- ;this.inputChangingTimeoutHandle && (clearTimeout(this.inputChangingTimeoutHandle), this.inputChangingTimeoutHandle = null), h.addClass(this.element, "content-changing"), this.inputChangingTimeoutHandle = setTimeout((function () {
- h.removeClass(e.element, "content-changing")
- }), 500)
- }, t.prototype.getInput = function () {
- return this.tree.getInput()
- }, t.prototype.isVisible = function () {
- return this.visible
- }, t.prototype.layout = function (e) {
- this.layoutDimensions = e;
- var n = Math.min(.62 * this.layoutDimensions.width, t.MAX_WIDTH);
- this.element && (this.element.style.width = n + "px", this.element.style.marginLeft = "-" + n / 2 + "px", this.inputContainer.style.width = n - 12 + "px")
- }, t.prototype.gainingFocus = function () {
- this.isLoosingFocus = !1
- }, t.prototype.loosingFocus = function (e) {
- var t = this;
- if (this.isVisible()) {
- var n = e.relatedTarget;
- !this.quickNavigateConfiguration && h.isAncestor(n, this.element) || (this.isLoosingFocus = !0, setTimeout((function () {
- t.isLoosingFocus && !t.isDisposed && (t.callbacks.onFocusLost && t.callbacks.onFocusLost() || t.hide(1))
- }), 0))
- }
- },
- t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.isDisposed = !0
- }, t.MAX_WIDTH = 600, t.MAX_ITEMS_HEIGHT = 440, t
- }(p.Disposable);
- t.QuickOpenWidget = C
- })), define(n[415], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/browser/controller/coreCommands", t)
- })), define(n[416], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/browser/controller/textAreaHandler", t)
- })), define(n[417], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/browser/widget/codeEditorWidget", t)
- })), define(n[418], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/browser/widget/diffEditorWidget", t)
- })), define(n[419], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/browser/widget/diffReview", t)
- })), define(n[420], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/browser/widget/inlineDiffMargin", t)
- })), define(n[421], i([0, 1, 420, 6, 55, 2, 3]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function (e) {
- function t(t, r, s, l, u, h) {
- var p = e.call(this) || this;
- p._viewZoneId = t, p._marginDomNode = r, p.editor = s,
- p.diff = l, p._contextMenuService = u, p._clipboardService = h, p._visibility = !1, p._marginDomNode.style.zIndex = "10", p._diffActions = document.createElement("div"), p._diffActions.className = "codicon codicon-lightbulb lightbulb-glyph", p._diffActions.style.position = "absolute";
- var g = s.getOption(49), f = s.getModel().getEOL();
- p._diffActions.style.right = "0px", p._diffActions.style.visibility = "hidden", p._diffActions.style.height = g + "px", p._diffActions.style.lineHeight = g + "px", p._marginDomNode.appendChild(p._diffActions);
- var m = [];
- m.push(new o.Action("diff.clipboard.copyDeletedContent", l.originalEndLineNumber > l.modifiedStartLineNumber ? n.localize(0, null) : n.localize(1, null), void 0, !0, (function () {
- return d(p, void 0, void 0, (function () {
- return c(this, (function (e) {
- switch (e.label) {
- case 0:
- return [4, this._clipboardService.writeText(l.originalContent.join(f) + f)];
- case 1:
- return e.sent(), [2]
- }
- }))
- }))
- })));
- var v = 0, _ = void 0
- ;l.originalEndLineNumber > l.modifiedStartLineNumber && (_ = new o.Action("diff.clipboard.copyDeletedLineContent", n.localize(2, null, l.originalStartLineNumber), void 0, !0, (function () {
- return d(p, void 0, void 0, (function () {
- return c(this, (function (e) {
- switch (e.label) {
- case 0:
- return [4, this._clipboardService.writeText(l.originalContent[v])];
- case 1:
- return e.sent(), [2]
- }
- }))
- }))
- })), m.push(_)), s.getOption(68) || m.push(new o.Action("diff.inline.revertChange", n.localize(3, null), void 0, !0, (function () {
- return d(p, void 0, void 0, (function () {
- var e;
- return c(this, (function (t) {
- return 0 === l.modifiedEndLineNumber ? (e = s.getModel().getLineMaxColumn(l.modifiedStartLineNumber), s.executeEdits("diffEditor", [{
- range: new a.Range(l.modifiedStartLineNumber, e, l.modifiedStartLineNumber, e),
- text: f + l.originalContent.join(f)
- }])) : (e = s.getModel().getLineMaxColumn(l.modifiedEndLineNumber), s.executeEdits("diffEditor", [{
- range: new a.Range(l.modifiedStartLineNumber, 1, l.modifiedEndLineNumber, e),
- text: l.originalContent.join(f)
- }])), [2]
- }))
- }))
- })));
- var y = function (e, t) {
- p._contextMenuService.showContextMenu({
- getAnchor: function () {
- return {x: e, y: t}
- }, getActions: function () {
- return _ && (_.label = n.localize(4, null, l.originalStartLineNumber + v)), m
- }, autoSelectFirstItem: !0
- })
- };
- return p._register(i.addStandardDisposableListener(p._diffActions, "mousedown", (function (e) {
- var t = i.getDomNodePagePosition(p._diffActions), n = t.top, o = t.height, r = Math.floor(g / 3);
- e.preventDefault(), y(e.posx, n + o + r)
- }))), p._register(s.onMouseMove((function (e) {
- 8 === e.target.type || 5 === e.target.type ? e.target.detail.viewZoneId === p._viewZoneId ? (p.visibility = !0, v = p._updateLightBulbPosition(p._marginDomNode, e.event.browserEvent.y, g)) : p.visibility = !1 : p.visibility = !1
- }))), p._register(s.onMouseDown((function (e) {
- e.event.rightButton && (8 !== e.target.type && 5 !== e.target.type || e.target.detail.viewZoneId === p._viewZoneId && (e.event.preventDefault(), v = p._updateLightBulbPosition(p._marginDomNode, e.event.browserEvent.y, g), y(e.event.posx, e.event.posy + g)))
- }))), p
- }
- return r(t, e), Object.defineProperty(t.prototype, "visibility", {
- get: function () {
- return this._visibility
- }, set: function (e) {
- this._visibility !== e && (this._visibility = e, this._diffActions.style.visibility = e ? "visible" : "hidden")
- }, enumerable: !0, configurable: !0
- }), t.prototype._updateLightBulbPosition = function (e, t, n) {
- var o = t - i.getDomNodePagePosition(e).top, r = Math.floor(o / n), s = r * n;
- return this._diffActions.style.top = s + "px", r
- }, t
- }(s.Disposable);
- t.InlineDiffMargin = l
- })), define(n[422], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/common/config/commonEditorConfig", t)
- })), define(n[423], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/common/config/editorOptions", t)
- })), define(n[33], i([0, 1, 423, 16, 109]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.MINIMAP_GUTTER_WIDTH = 8;
- var s = function () {
- function e(e) {
- this._values = e
- }
- return e.prototype.hasChanged = function (e) {
- return this._values[e]
- }, e
- }();
- t.ConfigurationChangedEvent = s;
- var a = function () {
- function e() {
- this._values = []
- }
- return e.prototype._read = function (e) {
- return this._values[e]
- }, e.prototype.get = function (e) {
- return this._values[e]
- }, e.prototype._write = function (e, t) {
- this._values[e] = t
- }, e
- }();
- t.ValidatedEditorOptions = a;
- var u = function () {
- function e(e, t, n, i) {
- this.id = e, this.name = t, this.defaultValue = n, this.schema = i
- }
- return e.prototype.compute = function (e, t, n) {
- return n
- }, e
- }(), d = function () {
- function e(e, t) {
- void 0 === t && (t = null), this.schema = void 0, this.id = e, this.name = "_never_", this.defaultValue = void 0, this.deps = t
- }
- return e.prototype.validate = function (e) {
- return this.defaultValue
- }, e
- }(), c = function () {
- function e(e, t, n, i) {
- this.id = e, this.name = t, this.defaultValue = n, this.schema = i
- }
- return e.prototype.validate = function (e) {
- return void 0 === e ? this.defaultValue : e
- }, e.prototype.compute = function (e, t, n) {
- return n
- }, e
- }(), h = function (e) {
- function t(t, n, i, o) {
- void 0 === o && (o = void 0);
- return void 0 !== o && (o.type = "boolean", o.default = i), e.call(this, t, n, i, o) || this
- }
- return r(t, e), t.boolean = function (e, t) {
- return void 0 === e ? t : "false" !== e && Boolean(e)
- }, t.prototype.validate = function (e) {
- return t.boolean(e, this.defaultValue)
- }, t
- }(c), p = function (e) {
- function t(t, n, i, o, r, s) {
- void 0 === s && (s = void 0);
- var a = this;
- return void 0 !== s && (s.type = "integer", s.default = i, s.minimum = o, s.maximum = r), (a = e.call(this, t, n, i, s) || this).minimum = o, a.maximum = r, a
- }
- return r(t, e), t.clampedInt = function (e, t, n, i) {
- var o;
- return void 0 === e ? o = t : (o = parseInt(e, 10), isNaN(o) && (o = t)), o = Math.max(n, o), 0 | (o = Math.min(i, o))
- }, t.prototype.validate = function (e) {
- return t.clampedInt(e, this.defaultValue, this.minimum, this.maximum)
- }, t
- }(c), g = function (e) {
- function t(t, n, i, o, r) {
- var s = this;
- return void 0 !== r && (r.type = "number", r.default = i), (s = e.call(this, t, n, i, r) || this).validationFn = o, s
- }
- return r(t, e), t.clamp = function (e, t, n) {
- return e < t ? t : e > n ? n : e
- }, t.float = function (e, t) {
- if ("number" == typeof e) return e;
- if (void 0 === e) return t;
- var n = parseFloat(e);
- return isNaN(n) ? t : n
- }, t.prototype.validate = function (e) {
- return this.validationFn(t.float(e, this.defaultValue))
- }, t
- }(c), f = function (e) {
- function t(t, n, i, o) {
- void 0 === o && (o = void 0);
- return void 0 !== o && (o.type = "string", o.default = i), e.call(this, t, n, i, o) || this
- }
- return r(t, e), t.string = function (e, t) {
- return "string" != typeof e ? t : e
- }, t.prototype.validate = function (e) {
- return t.string(e, this.defaultValue)
- }, t
- }(c), m = function (e) {
- function t(t, n, i, o, r) {
- void 0 === r && (r = void 0);
- var s = this;
- return void 0 !== r && (r.type = "string", r.enum = o, r.default = i), (s = e.call(this, t, n, i, r) || this)._allowedValues = o, s
- }
- return r(t, e), t.stringSet = function (e, t, n) {
- return "string" != typeof e ? t : -1 === n.indexOf(e) ? t : e
- }, t.prototype.validate = function (e) {
- return t.stringSet(e, this.defaultValue, this._allowedValues)
- }, t
- }(c), v = function (e) {
- function t(t, n, i, o, r, s, a) {
- void 0 === a && (a = void 0);
- var l = this;
- return void 0 !== a && (a.type = "string", a.enum = r, a.default = o), (l = e.call(this, t, n, i, a) || this)._allowedValues = r, l._convert = s, l
- }
- return r(t, e), t.prototype.validate = function (e) {
- return "string" != typeof e ? this.defaultValue : -1 === this._allowedValues.indexOf(e) ? this.defaultValue : this._convert(e)
- }, t
- }(u);
- var _, y = function (e) {
- function t() {
- return e.call(this, 2, "accessibilitySupport", 0, {
- type: "string",
- enum: ["auto", "on", "off"],
- enumDescriptions: [n.localize(0, null), n.localize(1, null), n.localize(2, null)],
- default: "auto",
- description: n.localize(3, null)
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- switch (e) {
- case"auto":
- return 0;
- case"off":
- return 1;
- case"on":
- return 2
- }
- return this.defaultValue
- }, t.prototype.compute = function (e, t, n) {
- return 0 === n ? e.accessibilitySupport : n
- }, t
- }(u), C = function (e) {
- function t() {
- var t = {insertSpace: !0};
- return e.call(this, 13, "comments", t, {
- "editor.comments.insertSpace": {
- type: "boolean",
- default: t.insertSpace,
- description: n.localize(4, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {insertSpace: h.boolean(t.insertSpace, this.defaultValue.insertSpace)}
- }, t
- }(u);
- !function (e) {
- e[e.Line = 1] = "Line", e[e.Block = 2] = "Block", e[e.Underline = 3] = "Underline", e[e.LineThin = 4] = "LineThin", e[e.BlockOutline = 5] = "BlockOutline", e[e.UnderlineThin = 6] = "UnderlineThin"
- }(_ = t.TextEditorCursorStyle || (t.TextEditorCursorStyle = {}));
- var b = function (e) {
- function t() {
- return e.call(this, 104, [55, 26]) || this
- }
- return r(t, e), t.prototype.compute = function (e, t, n) {
- var i = "monaco-editor";
- return t.get(26) && (i += " " + t.get(26)), e.extraEditorClassName && (i += " " + e.extraEditorClassName), "default" === t.get(55) ? i += " mouse-default" : "copy" === t.get(55) && (i += " mouse-copy"), t.get(85) && (i += " showUnused"), i
- }, t
- }(d), S = function (e) {
- function t() {
- return e.call(this, 25, "emptySelectionClipboard", !0, {description: n.localize(5, null)}) || this
- }
- return r(t, e), t.prototype.compute = function (e, t, n) {
- return n && e.emptySelectionClipboard
- }, t
- }(h), w = function (e) {
- function t() {
- var t = {
- seedSearchStringFromSelection: !0,
- autoFindInSelection: "never",
- globalFindClipboard: !1,
- addExtraSpaceOnTop: !0
- };
- return e.call(this, 28, "find", t, {
- "editor.find.seedSearchStringFromSelection": {
- type: "boolean",
- default: t.seedSearchStringFromSelection,
- description: n.localize(6, null)
- },
- "editor.find.autoFindInSelection": {
- type: "string",
- enum: ["never", "always", "multiline"],
- default: t.autoFindInSelection,
- enumDescriptions: [n.localize(7, null), n.localize(8, null), n.localize(9, null)],
- description: n.localize(10, null)
- },
- "editor.find.globalFindClipboard": {
- type: "boolean",
- default: t.globalFindClipboard,
- description: n.localize(11, null),
- included: i.isMacintosh
- },
- "editor.find.addExtraSpaceOnTop": {
- type: "boolean",
- default: t.addExtraSpaceOnTop,
- description: n.localize(12, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {
- seedSearchStringFromSelection: h.boolean(t.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection),
- autoFindInSelection: "boolean" == typeof e.autoFindInSelection ? e.autoFindInSelection ? "always" : "never" : m.stringSet(t.autoFindInSelection, this.defaultValue.autoFindInSelection, ["never", "always", "multiline"]),
- globalFindClipboard: h.boolean(t.globalFindClipboard, this.defaultValue.globalFindClipboard),
- addExtraSpaceOnTop: h.boolean(t.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop)
- }
- }, t
- }(u), E = function (e) {
- function t() {
- return e.call(this, 35, "fontLigatures", t.OFF, {
- anyOf: [{
- type: "boolean",
- description: n.localize(13, null)
- }, {type: "string", description: n.localize(14, null)}],
- description: n.localize(15, null),
- default: !1
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- return void 0 === e ? this.defaultValue : "string" == typeof e ? "false" === e ? t.OFF : "true" === e ? t.ON : e : Boolean(e) ? t.ON : t.OFF
- }, t.OFF = '"liga" off, "calt" off', t.ON = '"liga" on, "calt" on', t
- }(u);
- t.EditorFontLigatures = E;
- var L = function (e) {
- function t() {
- return e.call(this, 34) || this
- }
- return r(t, e), t.prototype.compute = function (e, t, n) {
- return e.fontInfo
- }, t
- }(d), D = function (e) {
- function i() {
- return e.call(this, 36, "fontSize", t.EDITOR_FONT_DEFAULTS.fontSize, {
- type: "number",
- minimum: 6,
- maximum: 100,
- default: t.EDITOR_FONT_DEFAULTS.fontSize,
- description: n.localize(16, null)
- }) || this
- }
- return r(i, e), i.prototype.validate = function (e) {
- var n = g.float(e, this.defaultValue);
- return 0 === n ? t.EDITOR_FONT_DEFAULTS.fontSize : g.clamp(n, 6, 100)
- }, i.prototype.compute = function (e, t, n) {
- return e.fontInfo.fontSize
- }, i
- }(c), N = function (e) {
- function t() {
- var t = {
- multiple: "peek",
- multipleDefinitions: "peek",
- multipleTypeDefinitions: "peek",
- multipleDeclarations: "peek",
- multipleImplementations: "peek",
- multipleReferences: "peek",
- alternativeDefinitionCommand: "editor.action.goToReferences",
- alternativeTypeDefinitionCommand: "editor.action.goToReferences",
- alternativeDeclarationCommand: "editor.action.goToReferences",
- alternativeImplementationCommand: "",
- alternativeReferenceCommand: ""
- }, i = {
- type: "string",
- enum: ["peek", "gotoAndPeek", "goto"],
- default: t.multiple,
- enumDescriptions: [n.localize(17, null), n.localize(18, null), n.localize(19, null)]
- };
- return e.call(this, 41, "gotoLocation", t, {
- "editor.gotoLocation.multiple": {deprecationMessage: n.localize(20, null)},
- "editor.gotoLocation.multipleDefinitions": l({description: n.localize(21, null)}, i),
- "editor.gotoLocation.multipleTypeDefinitions": l({description: n.localize(22, null)}, i),
- "editor.gotoLocation.multipleDeclarations": l({description: n.localize(23, null)}, i),
- "editor.gotoLocation.multipleImplementations": l({
- description: n.localize(24, null)
- }, i),
- "editor.gotoLocation.multipleReferences": l({description: n.localize(25, null)}, i),
- "editor.gotoLocation.alternativeDefinitionCommand": {
- type: "string",
- default: t.alternativeDefinitionCommand,
- description: n.localize(26, null)
- },
- "editor.gotoLocation.alternativeTypeDefinitionCommand": {
- type: "string",
- default: t.alternativeTypeDefinitionCommand,
- description: n.localize(27, null)
- },
- "editor.gotoLocation.alternativeDeclarationCommand": {
- type: "string",
- default: t.alternativeDeclarationCommand,
- description: n.localize(28, null)
- },
- "editor.gotoLocation.alternativeImplementationCommand": {
- type: "string",
- default: t.alternativeImplementationCommand,
- description: n.localize(29, null)
- },
- "editor.gotoLocation.alternativeReferenceCommand": {
- type: "string",
- default: t.alternativeReferenceCommand,
- description: n.localize(30, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- var t, n, i, o, r;
- if ("object" != typeof e) return this.defaultValue;
- var s = e;
- return {
- multiple: m.stringSet(s.multiple, this.defaultValue.multiple, ["peek", "gotoAndPeek", "goto"]),
- multipleDefinitions: null !== (t = s.multipleDefinitions) && void 0 !== t ? t : m.stringSet(s.multipleDefinitions, "peek", ["peek", "gotoAndPeek", "goto"]),
- multipleTypeDefinitions: null !== (n = s.multipleTypeDefinitions) && void 0 !== n ? n : m.stringSet(s.multipleTypeDefinitions, "peek", ["peek", "gotoAndPeek", "goto"]),
- multipleDeclarations: null !== (i = s.multipleDeclarations) && void 0 !== i ? i : m.stringSet(s.multipleDeclarations, "peek", ["peek", "gotoAndPeek", "goto"]),
- multipleImplementations: null !== (o = s.multipleImplementations) && void 0 !== o ? o : m.stringSet(s.multipleImplementations, "peek", ["peek", "gotoAndPeek", "goto"]),
- multipleReferences: null !== (r = s.multipleReferences) && void 0 !== r ? r : m.stringSet(s.multipleReferences, "peek", ["peek", "gotoAndPeek", "goto"]),
- alternativeDefinitionCommand: f.string(s.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),
- alternativeTypeDefinitionCommand: f.string(s.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),
- alternativeDeclarationCommand: f.string(s.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),
- alternativeImplementationCommand: f.string(s.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand),
- alternativeReferenceCommand: f.string(s.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand)
- }
- }, t
- }(u), x = function (e) {
- function t() {
- var t = {enabled: !0, delay: 300, sticky: !0};
- return e.call(this, 44, "hover", t, {
- "editor.hover.enabled": {
- type: "boolean",
- default: t.enabled,
- description: n.localize(31, null)
- },
- "editor.hover.delay": {type: "number", default: t.delay, description: n.localize(32, null)},
- "editor.hover.sticky": {type: "boolean", default: t.sticky, description: n.localize(33, null)}
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {
- enabled: h.boolean(t.enabled, this.defaultValue.enabled),
- delay: p.clampedInt(t.delay, this.defaultValue.delay, 0, 1e4),
- sticky: h.boolean(t.sticky, this.defaultValue.sticky)
- }
- }, t
- }(u), I = function (e) {
- function n() {
- return e.call(this, 107, [40, 48, 30, 54, 78, 50]) || this
- }
- return r(n, e), n.prototype.compute = function (e, t, i) {
- return n.computeLayout(t, {
- outerWidth: e.outerWidth,
- outerHeight: e.outerHeight,
- lineHeight: e.fontInfo.lineHeight,
- lineNumbersDigitCount: e.lineNumbersDigitCount,
- typicalHalfwidthCharacterWidth: e.fontInfo.typicalHalfwidthCharacterWidth,
- maxDigitWidth: e.fontInfo.maxDigitWidth,
- pixelRatio: e.pixelRatio
- })
- }, n.computeLayout = function (e, n) {
- var i, o = 0 | n.outerWidth, r = 0 | n.outerHeight, s = 0 | n.lineHeight,
- a = 0 | n.lineNumbersDigitCount, l = n.typicalHalfwidthCharacterWidth, u = n.maxDigitWidth,
- d = n.pixelRatio, c = e.get(40), h = 0 !== e.get(50).renderType, g = 0 | e.get(51), f = e.get(54),
- m = f.enabled, v = f.side, _ = f.renderCharacters, y = d >= 2 ? Math.round(2 * f.scale) : f.scale,
- C = 0 | f.maxColumn, b = e.get(78), S = 0 | b.verticalScrollbarSize, w = b.verticalHasArrows,
- E = 0 | b.arrowSize, L = 0 | b.horizontalScrollbarSize, D = e.get(48), N = e.get(30);
- if ("string" == typeof D && /^\d+(\.\d+)?ch$/.test(D)) {
- var x = parseFloat(D.substr(0, D.length - 2));
- i = p.clampedInt(x * l, 0, 0, 1e3)
- } else i = p.clampedInt(D, 0, 0, 1e3);
- N && (i += 16);
- var I = 0;
- if (h) {
- var M = Math.max(a, g);
- I = Math.round(M * u)
- }
- var k = 0;
- c && (k = s);
- var T, R, O, P, A = 0, F = A + k, W = F + I, B = W + i, V = o - k - I - i;
- if (m) {
- var z = y / d;
- T = _ ? 1 : 2, (O = Math.max(0, Math.floor((V - S - 2) * z / (l + z))) + t.MINIMAP_GUTTER_WIDTH) / z > C && (O = Math.floor(C * z)), P = V - O, "left" === v ? (R = 0, A += O, F += O, W += O, B += O) : R = o - O - S
- } else R = 0, O = 0, T = 0, P = V;
- var H = w ? E : 0;
- return {
- width: o,
- height: r,
- glyphMarginLeft: A,
- glyphMarginWidth: k,
- lineNumbersLeft: F,
- lineNumbersWidth: I,
- decorationsLeft: W,
- decorationsWidth: i,
- contentLeft: B,
- contentWidth: P,
- renderMinimap: T,
- minimapLeft: R,
- minimapWidth: O,
- viewportColumn: Math.max(1, Math.floor((P - S - 2) / l)),
- verticalScrollbarWidth: S,
- horizontalScrollbarHeight: L,
- overviewRuler: {top: H, width: S, height: r - 2 * H, right: 0}
- }
- }, n
- }(d);
- t.EditorLayoutInfoComputer = I;
- var M = function (e) {
- function t() {
- var t = {enabled: !0};
- return e.call(this, 47, "lightbulb", t, {
- "editor.lightbulb.enabled": {
- type: "boolean",
- default: t.enabled,
- description: n.localize(34, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {enabled: h.boolean(t.enabled, this.defaultValue.enabled)}
- }, t
- }(u), k = function (e) {
- function i() {
- return e.call(this, 49, "lineHeight", t.EDITOR_FONT_DEFAULTS.lineHeight, 0, 150, {description: n.localize(35, null)}) || this
- }
- return r(i, e), i.prototype.compute = function (e, t, n) {
- return e.fontInfo.lineHeight
- }, i
- }(p), T = function (e) {
- function t() {
- var t = {
- enabled: !0,
- side: "right",
- showSlider: "mouseover",
- renderCharacters: !0,
- maxColumn: 120,
- scale: 1
- };
- return e.call(this, 54, "minimap", t, {
- "editor.minimap.enabled": {type: "boolean", default: t.enabled, description: n.localize(36, null)},
- "editor.minimap.side": {
- type: "string",
- enum: ["left", "right"],
- default: t.side,
- description: n.localize(37, null)
- },
- "editor.minimap.showSlider": {
- type: "string",
- enum: ["always", "mouseover"],
- default: t.showSlider,
- description: n.localize(38, null)
- },
- "editor.minimap.scale": {
- type: "number",
- default: t.scale,
- minimum: 1,
- maximum: 3,
- description: n.localize(39, null)
- },
- "editor.minimap.renderCharacters": {
- type: "boolean", default: t.renderCharacters,
- description: n.localize(40, null)
- },
- "editor.minimap.maxColumn": {
- type: "number",
- default: t.maxColumn,
- description: n.localize(41, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {
- enabled: h.boolean(t.enabled, this.defaultValue.enabled),
- side: m.stringSet(t.side, this.defaultValue.side, ["right", "left"]),
- showSlider: m.stringSet(t.showSlider, this.defaultValue.showSlider, ["always", "mouseover"]),
- renderCharacters: h.boolean(t.renderCharacters, this.defaultValue.renderCharacters),
- scale: p.clampedInt(t.scale, 1, 1, 3),
- maxColumn: p.clampedInt(t.maxColumn, this.defaultValue.maxColumn, 1, 1e4)
- }
- }, t
- }(u);
- var R = function (e) {
- function t() {
- var t = {enabled: !0, cycle: !1};
- return e.call(this, 64, "parameterHints", t, {
- "editor.parameterHints.enabled": {
- type: "boolean",
- default: t.enabled,
- description: n.localize(42, null)
- },
- "editor.parameterHints.cycle": {
- type: "boolean",
- default: t.cycle,
- description: n.localize(43, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {
- enabled: h.boolean(t.enabled, this.defaultValue.enabled),
- cycle: h.boolean(t.cycle, this.defaultValue.cycle)
- }
- }, t
- }(u), O = function (e) {
- function t() {
- return e.call(this, 105) || this
- }
- return r(t, e), t.prototype.compute = function (e, t, n) {
- return e.pixelRatio
- }, t
- }(d), P = function (e) {
- function t() {
- var t = this, i = {other: !0, comments: !1, strings: !1};
- return (t = e.call(this, 66, "quickSuggestions", i, {
- anyOf: [{type: "boolean"}, {
- type: "object",
- properties: {
- strings: {type: "boolean", default: i.strings, description: n.localize(44, null)},
- comments: {type: "boolean", default: i.comments, description: n.localize(45, null)},
- other: {type: "boolean", default: i.other, description: n.localize(46, null)}
- }
- }], default: i, description: n.localize(47, null)
- }) || this).defaultValue = i, t
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("boolean" == typeof e) return e;
- if ("object" == typeof e) {
- var t = e, n = {
- other: h.boolean(t.other, this.defaultValue.other),
- comments: h.boolean(t.comments, this.defaultValue.comments),
- strings: h.boolean(t.strings, this.defaultValue.strings)
- };
- return !!(n.other && n.comments && n.strings) || !!(n.other || n.comments || n.strings) && n
- }
- return this.defaultValue
- }, t
- }(u), A = function (e) {
- function t() {
- return e.call(this, 50, "lineNumbers", {renderType: 1, renderFn: null}, {
- type: "string",
- enum: ["off", "on", "relative", "interval"],
- enumDescriptions: [n.localize(48, null), n.localize(49, null), n.localize(50, null), n.localize(51, null)],
- default: "on",
- description: n.localize(52, null)
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- var t = this.defaultValue.renderType, n = this.defaultValue.renderFn;
- return void 0 !== e && ("function" == typeof e ? (t = 4, n = e) : t = "interval" === e ? 3 : "relative" === e ? 2 : "on" === e ? 1 : 0), {
- renderType: t,
- renderFn: n
- }
- }, t
- }(u);
- t.filterValidationDecorations = function (e) {
- var t = e.get(73);
- return "editable" === t ? e.get(68) : "on" !== t
- };
- var F = function (e) {
- function t() {
- var t = [];
- return e.call(this, 77, "rulers", t, {
- type: "array",
- items: {type: "number"},
- default: t,
- description: n.localize(53, null)
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if (Array.isArray(e)) {
- for (var t = [], n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- t.push(p.clampedInt(o, 0, 0, 1e4))
- }
- return t.sort((function (e, t) {
- return e - t
- })), t
- }
- return this.defaultValue
- }, t
- }(c);
- function W(e, t) {
- if ("string" != typeof e) return t;
- switch (e) {
- case"hidden":
- return 2;
- case"visible":
- return 3;
- default:
- return 1
- }
- }
- var B = function (e) {
- function t() {
- return e.call(this, 78, "scrollbar", {
- vertical: 1,
- horizontal: 1,
- arrowSize: 11,
- useShadows: !0,
- verticalHasArrows: !1,
- horizontalHasArrows: !1,
- horizontalScrollbarSize: 10,
- horizontalSliderSize: 10,
- verticalScrollbarSize: 14,
- verticalSliderSize: 14,
- handleMouseWheel: !0,
- alwaysConsumeMouseWheel: !0
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e,
- n = p.clampedInt(t.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, 0, 1e3),
- i = p.clampedInt(t.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, 0, 1e3);
- return {
- arrowSize: p.clampedInt(t.arrowSize, this.defaultValue.arrowSize, 0, 1e3),
- vertical: W(t.vertical, this.defaultValue.vertical),
- horizontal: W(t.horizontal, this.defaultValue.horizontal),
- useShadows: h.boolean(t.useShadows, this.defaultValue.useShadows),
- verticalHasArrows: h.boolean(t.verticalHasArrows, this.defaultValue.verticalHasArrows),
- horizontalHasArrows: h.boolean(t.horizontalHasArrows, this.defaultValue.horizontalHasArrows),
- handleMouseWheel: h.boolean(t.handleMouseWheel, this.defaultValue.handleMouseWheel),
- alwaysConsumeMouseWheel: h.boolean(t.alwaysConsumeMouseWheel, this.defaultValue.alwaysConsumeMouseWheel),
- horizontalScrollbarSize: n,
- horizontalSliderSize: p.clampedInt(t.horizontalSliderSize, n, 0, 1e3),
- verticalScrollbarSize: i,
- verticalSliderSize: p.clampedInt(t.verticalSliderSize, i, 0, 1e3)
- }
- }, t
- }(u), V = function (e) {
- function t() {
- var t = {
- insertMode: "insert",
- insertHighlight: !1,
- filterGraceful: !0,
- snippetsPreventQuickSuggestions: !0,
- localityBonus: !1,
- shareSuggestSelections: !1,
- showIcons: !0,
- maxVisibleSuggestions: 12,
- showMethods: !0,
- showFunctions: !0,
- showConstructors: !0,
- showFields: !0,
- showVariables: !0,
- showClasses: !0,
- showStructs: !0,
- showInterfaces: !0,
- showModules: !0,
- showProperties: !0,
- showEvents: !0,
- showOperators: !0,
- showUnits: !0,
- showValues: !0,
- showConstants: !0,
- showEnums: !0,
- showEnumMembers: !0,
- showKeywords: !0,
- showWords: !0,
- showColors: !0,
- showFiles: !0,
- showReferences: !0,
- showFolders: !0,
- showTypeParameters: !0,
- showSnippets: !0,
- hideStatusBar: !0
- };
- return e.call(this, 89, "suggest", t, {
- "editor.suggest.insertMode": {
- type: "string",
- enum: ["insert", "replace"],
- enumDescriptions: [n.localize(54, null), n.localize(55, null)],
- default: t.insertMode,
- description: n.localize(56, null)
- },
- "editor.suggest.insertHighlight": {
- type: "boolean",
- default: t.insertHighlight,
- description: n.localize(57, null)
- },
- "editor.suggest.filterGraceful": {
- type: "boolean",
- default: t.filterGraceful,
- description: n.localize(58, null)
- },
- "editor.suggest.localityBonus": {
- type: "boolean",
- default: t.localityBonus,
- description: n.localize(59, null)
- },
- "editor.suggest.shareSuggestSelections": {
- type: "boolean",
- default: t.shareSuggestSelections,
- markdownDescription: n.localize(60, null)
- },
- "editor.suggest.snippetsPreventQuickSuggestions": {
- type: "boolean",
- default: t.snippetsPreventQuickSuggestions, description: n.localize(61, null)
- },
- "editor.suggest.showIcons": {
- type: "boolean",
- default: t.showIcons,
- description: n.localize(62, null)
- },
- "editor.suggest.maxVisibleSuggestions": {
- type: "number",
- default: t.maxVisibleSuggestions,
- minimum: 1,
- maximum: 15,
- description: n.localize(63, null)
- },
- "editor.suggest.filteredTypes": {type: "object", deprecationMessage: n.localize(64, null)},
- "editor.suggest.showMethods": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(65, null)
- },
- "editor.suggest.showFunctions": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(66, null)
- },
- "editor.suggest.showConstructors": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(67, null)
- },
- "editor.suggest.showFields": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(68, null)
- },
- "editor.suggest.showVariables": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(69, null)
- },
- "editor.suggest.showClasses": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(70, null)
- },
- "editor.suggest.showStructs": {
- type: "boolean", default: !0, markdownDescription: n.localize(71, null)
- },
- "editor.suggest.showInterfaces": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(72, null)
- },
- "editor.suggest.showModules": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(73, null)
- },
- "editor.suggest.showProperties": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(74, null)
- },
- "editor.suggest.showEvents": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(75, null)
- },
- "editor.suggest.showOperators": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(76, null)
- },
- "editor.suggest.showUnits": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(77, null)
- },
- "editor.suggest.showValues": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(78, null)
- },
- "editor.suggest.showConstants": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(79, null)
- },
- "editor.suggest.showEnums": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(80, null)
- },
- "editor.suggest.showEnumMembers": {
- type: "boolean", default: !0,
- markdownDescription: n.localize(81, null)
- },
- "editor.suggest.showKeywords": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(82, null)
- },
- "editor.suggest.showWords": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(83, null)
- },
- "editor.suggest.showColors": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(84, null)
- },
- "editor.suggest.showFiles": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(85, null)
- },
- "editor.suggest.showReferences": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(86, null)
- },
- "editor.suggest.showCustomcolors": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(87, null)
- },
- "editor.suggest.showFolders": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(88, null)
- },
- "editor.suggest.showTypeParameters": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(89, null)
- },
- "editor.suggest.showSnippets": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(90, null)
- },
- "editor.suggest.hideStatusBar": {
- type: "boolean",
- default: !0,
- markdownDescription: n.localize(91, null)
- }
- }) || this
- }
- return r(t, e), t.prototype.validate = function (e) {
- if ("object" != typeof e) return this.defaultValue;
- var t = e;
- return {
- insertMode: m.stringSet(t.insertMode, this.defaultValue.insertMode, ["insert", "replace"]),
- insertHighlight: h.boolean(t.insertHighlight, this.defaultValue.insertHighlight),
- filterGraceful: h.boolean(t.filterGraceful, this.defaultValue.filterGraceful),
- snippetsPreventQuickSuggestions: h.boolean(t.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful),
- localityBonus: h.boolean(t.localityBonus, this.defaultValue.localityBonus),
- shareSuggestSelections: h.boolean(t.shareSuggestSelections, this.defaultValue.shareSuggestSelections),
- showIcons: h.boolean(t.showIcons, this.defaultValue.showIcons),
- maxVisibleSuggestions: p.clampedInt(t.maxVisibleSuggestions, this.defaultValue.maxVisibleSuggestions, 1, 15),
- showMethods: h.boolean(t.showMethods, this.defaultValue.showMethods),
- showFunctions: h.boolean(t.showFunctions, this.defaultValue.showFunctions),
- showConstructors: h.boolean(t.showConstructors, this.defaultValue.showConstructors),
- showFields: h.boolean(t.showFields, this.defaultValue.showFields),
- showVariables: h.boolean(t.showVariables, this.defaultValue.showVariables),
- showClasses: h.boolean(t.showClasses, this.defaultValue.showClasses),
- showStructs: h.boolean(t.showStructs, this.defaultValue.showStructs),
- showInterfaces: h.boolean(t.showInterfaces, this.defaultValue.showInterfaces),
- showModules: h.boolean(t.showModules, this.defaultValue.showModules),
- showProperties: h.boolean(t.showProperties, this.defaultValue.showProperties),
- showEvents: h.boolean(t.showEvents, this.defaultValue.showEvents),
- showOperators: h.boolean(t.showOperators, this.defaultValue.showOperators),
- showUnits: h.boolean(t.showUnits, this.defaultValue.showUnits),
- showValues: h.boolean(t.showValues, this.defaultValue.showValues),
- showConstants: h.boolean(t.showConstants, this.defaultValue.showConstants),
- showEnums: h.boolean(t.showEnums, this.defaultValue.showEnums),
- showEnumMembers: h.boolean(t.showEnumMembers, this.defaultValue.showEnumMembers),
- showKeywords: h.boolean(t.showKeywords, this.defaultValue.showKeywords),
- showWords: h.boolean(t.showWords, this.defaultValue.showWords),
- showColors: h.boolean(t.showColors, this.defaultValue.showColors),
- showFiles: h.boolean(t.showFiles, this.defaultValue.showFiles),
- showReferences: h.boolean(t.showReferences, this.defaultValue.showReferences),
- showFolders: h.boolean(t.showFolders, this.defaultValue.showFolders),
- showTypeParameters: h.boolean(t.showTypeParameters, this.defaultValue.showTypeParameters),
- showSnippets: h.boolean(t.showSnippets, this.defaultValue.showSnippets),
- hideStatusBar: h.boolean(t.hideStatusBar, this.defaultValue.hideStatusBar)
- }
- }, t
- }(u), z = function (e) {
- function t() {
- return e.call(this, 106, [68]) || this
- }
- return r(t, e), t.prototype.compute = function (e, t, n) {
- return !!t.get(68) || e.tabFocusMode
- }, t
- }(d);
- var H = function (e) {
- function t() {
- return e.call(this, 108, [97, 100, 101, 107, 2]) || this
- }
- return r(t, e), t.prototype.compute = function (e, t, n) {
- var i = t.get(97), o = t.get(100), r = t.get(101), s = t.get(107), a = null;
- return a = 2 === t.get(2) ? {
- isWordWrapMinified: !1,
- isViewportWrapping: !1,
- wrappingColumn: -1
- } : r && e.isDominatedByLongLines ? {
- isWordWrapMinified: !0,
- isViewportWrapping: !0,
- wrappingColumn: Math.max(1, s.viewportColumn)
- } : "on" === i ? {
- isWordWrapMinified: !1,
- isViewportWrapping: !0,
- wrappingColumn: Math.max(1, s.viewportColumn)
- } : "bounded" === i ? {
- isWordWrapMinified: !1,
- isViewportWrapping: !0,
- wrappingColumn: Math.min(Math.max(1, s.viewportColumn), o)
- } : "wordWrapColumn" === i ? {
- isWordWrapMinified: !1,
- isViewportWrapping: !1,
- wrappingColumn: o
- } : {
- isWordWrapMinified: !1,
- isViewportWrapping: !1,
- wrappingColumn: -1
- }, {
- isDominatedByLongLines: e.isDominatedByLongLines,
- isWordWrapMinified: a.isWordWrapMinified,
- isViewportWrapping: a.isViewportWrapping,
- wrappingColumn: a.wrappingColumn
- }
- }, t
- }(d);
- function K(e) {
- return t.editorOptionsRegistry[e.id] = e, e
- }
- t.EDITOR_FONT_DEFAULTS = {
- fontFamily: i.isMacintosh ? "Menlo, Monaco, 'Courier New', monospace" : i.isLinux ? "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'" : "Consolas, 'Courier New', monospace",
- fontWeight: "normal",
- fontSize: i.isMacintosh ? 12 : 14,
- lineHeight: 0,
- letterSpacing: 0
- }, t.EDITOR_MODEL_DEFAULTS = {
- tabSize: 4,
- indentSize: 4,
- insertSpaces: !0,
- detectIndentation: !0,
- trimAutoWhitespace: !0,
- largeFileOptimizations: !0
- }, t.editorOptionsRegistry = [], t.EditorOptions = {
- acceptSuggestionOnCommitCharacter: K(new h(0, "acceptSuggestionOnCommitCharacter", !0, {markdownDescription: n.localize(92, null)})),
- acceptSuggestionOnEnter: K(new m(1, "acceptSuggestionOnEnter", "on", ["on", "smart", "off"], {
- markdownEnumDescriptions: ["", n.localize(93, null), ""],
- markdownDescription: n.localize(94, null)
- })),
- accessibilitySupport: K(new y),
- accessibilityPageSize: K(new p(3, "accessibilityPageSize", 10, 1, 1073741824, {description: n.localize(95, null)})),
- ariaLabel: K(new f(4, "ariaLabel", n.localize(96, null))),
- autoClosingBrackets: K(new m(5, "autoClosingBrackets", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], {
- enumDescriptions: ["", n.localize(97, null), n.localize(98, null), ""],
- description: n.localize(99, null)
- })),
- autoClosingOvertype: K(new m(6, "autoClosingOvertype", "auto", ["always", "auto", "never"], {
- enumDescriptions: ["", n.localize(100, null), ""],
- description: n.localize(101, null)
- })),
- autoClosingQuotes: K(new m(7, "autoClosingQuotes", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], {
- enumDescriptions: ["", n.localize(102, null), n.localize(103, null), ""],
- description: n.localize(104, null)
- })),
- autoIndent: K(new v(8, "autoIndent", 4, "full", ["none", "keep", "brackets", "advanced", "full"], (function (e) {
- switch (e) {
- case"none":
- return 0;
- case"keep":
- return 1;
- case"brackets":
- return 2;
- case"advanced":
- return 3;
- case"full":
- return 4
- }
- }), {
- enumDescriptions: [n.localize(105, null), n.localize(106, null), n.localize(107, null), n.localize(108, null), n.localize(109, null)],
- description: n.localize(110, null)
- })),
- automaticLayout: K(new h(9, "automaticLayout", !1)),
- autoSurround: K(new m(10, "autoSurround", "languageDefined", ["languageDefined", "quotes", "brackets", "never"], {
- enumDescriptions: [n.localize(111, null), n.localize(112, null), n.localize(113, null), ""],
- description: n.localize(114, null)
- })),
- codeLens: K(new h(11, "codeLens", !0, {description: n.localize(115, null)})),
- colorDecorators: K(new h(12, "colorDecorators", !0, {description: n.localize(116, null)})),
- comments: K(new C),
- contextmenu: K(new h(14, "contextmenu", !0)),
- copyWithSyntaxHighlighting: K(new h(15, "copyWithSyntaxHighlighting", !0, {description: n.localize(117, null)})),
- cursorBlinking: K(new v(16, "cursorBlinking", 1, "blink", ["blink", "smooth", "phase", "expand", "solid"], (function (e) {
- switch (e) {
- case"blink":
- return 1;
- case"smooth":
- return 2;
- case"phase":
- return 3;
- case"expand":
- return 4;
- case"solid":
- return 5
- }
- }), {description: n.localize(118, null)})),
- cursorSmoothCaretAnimation: K(new h(17, "cursorSmoothCaretAnimation", !1, {description: n.localize(119, null)})),
- cursorStyle: K(new v(18, "cursorStyle", _.Line, "line", ["line", "block", "underline", "line-thin", "block-outline", "underline-thin"], (function (e) {
- switch (e) {
- case"line":
- return _.Line;
- case"block":
- return _.Block;
- case"underline":
- return _.Underline;
- case"line-thin":
- return _.LineThin;
- case"block-outline":
- return _.BlockOutline;
- case"underline-thin":
- return _.UnderlineThin
- }
- }), {description: n.localize(120, null)})),
- cursorSurroundingLines: K(new p(19, "cursorSurroundingLines", 0, 0, 1073741824, {description: n.localize(121, null)})),
- cursorSurroundingLinesStyle: K(new m(20, "cursorSurroundingLinesStyle", "default", ["default", "all"], {
- enumDescriptions: [n.localize(122, null), n.localize(123, null)],
- description: n.localize(124, null)
- })),
- cursorWidth: K(new p(21, "cursorWidth", 0, 0, 1073741824, {markdownDescription: n.localize(125, null)})),
- disableLayerHinting: K(new h(22, "disableLayerHinting", !1)),
- disableMonospaceOptimizations: K(new h(23, "disableMonospaceOptimizations", !1)),
- dragAndDrop: K(new h(24, "dragAndDrop", !0, {description: n.localize(126, null)})),
- emptySelectionClipboard: K(new S),
- extraEditorClassName: K(new f(26, "extraEditorClassName", "")),
- fastScrollSensitivity: K(new g(27, "fastScrollSensitivity", 5, (function (e) {
- return e <= 0 ? 5 : e
- }), {markdownDescription: n.localize(127, null)})),
- find: K(new w),
- fixedOverflowWidgets: K(new h(29, "fixedOverflowWidgets", !1)),
- folding: K(new h(30, "folding", !0, {description: n.localize(128, null)})),
- foldingStrategy: K(new m(31, "foldingStrategy", "auto", ["auto", "indentation"], {markdownDescription: n.localize(129, null)})),
- foldingHighlight: K(new h(32, "foldingHighlight", !0, {description: n.localize(130, null)})),
- fontFamily: K(new f(33, "fontFamily", t.EDITOR_FONT_DEFAULTS.fontFamily, {description: n.localize(131, null)})),
- fontInfo: K(new L),
- fontLigatures2: K(new E),
- fontSize: K(new D),
- fontWeight: K(new f(37, "fontWeight", t.EDITOR_FONT_DEFAULTS.fontWeight, {
- enum: ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
- description: n.localize(132, null)
- })),
- formatOnPaste: K(new h(38, "formatOnPaste", !1, {description: n.localize(133, null)})),
- formatOnType: K(new h(39, "formatOnType", !1, {description: n.localize(134, null)})),
- glyphMargin: K(new h(40, "glyphMargin", !0, {description: n.localize(135, null)})),
- gotoLocation: K(new N),
- hideCursorInOverviewRuler: K(new h(42, "hideCursorInOverviewRuler", !1, {description: n.localize(136, null)})),
- highlightActiveIndentGuide: K(new h(43, "highlightActiveIndentGuide", !0, {description: n.localize(137, null)})),
- hover: K(new x),
- inDiffEditor: K(new h(45, "inDiffEditor", !1)),
- letterSpacing: K(new g(46, "letterSpacing", t.EDITOR_FONT_DEFAULTS.letterSpacing, (function (e) {
- return g.clamp(e, -5, 20)
- }), {description: n.localize(138, null)})),
- lightbulb: K(new M),
- lineDecorationsWidth: K(new c(48, "lineDecorationsWidth", 10)),
- lineHeight: K(new k),
- lineNumbers: K(new A),
- lineNumbersMinChars: K(new p(51, "lineNumbersMinChars", 5, 1, 300)),
- links: K(new h(52, "links", !0, {description: n.localize(139, null)})),
- matchBrackets: K(new m(53, "matchBrackets", "always", ["always", "near", "never"], {description: n.localize(140, null)})),
- minimap: K(new T),
- mouseStyle: K(new m(55, "mouseStyle", "text", ["text", "default", "copy"])),
- mouseWheelScrollSensitivity: K(new g(56, "mouseWheelScrollSensitivity", 1, (function (e) {
- return 0 === e ? 1 : e
- }), {markdownDescription: n.localize(141, null)})),
- mouseWheelZoom: K(new h(57, "mouseWheelZoom", !1, {markdownDescription: n.localize(142, null)})),
- multiCursorMergeOverlapping: K(new h(58, "multiCursorMergeOverlapping", !0, {description: n.localize(143, null)})),
- multiCursorModifier: K(new v(59, "multiCursorModifier", "altKey", "alt", ["ctrlCmd", "alt"], (function (e) {
- return "ctrlCmd" === e ? i.isMacintosh ? "metaKey" : "ctrlKey" : "altKey"
- }), {
- markdownEnumDescriptions: [n.localize(144, null), n.localize(145, null)],
- markdownDescription: n.localize(146, null)
- })),
- multiCursorPaste: K(new m(60, "multiCursorPaste", "spread", ["spread", "full"], {
- markdownEnumDescriptions: [n.localize(147, null), n.localize(148, null)],
- markdownDescription: n.localize(149, null)
- })),
- occurrencesHighlight: K(new h(61, "occurrencesHighlight", !0, {description: n.localize(150, null)})),
- overviewRulerBorder: K(new h(62, "overviewRulerBorder", !0, {description: n.localize(151, null)})),
- overviewRulerLanes: K(new p(63, "overviewRulerLanes", 3, 0, 3)),
- parameterHints: K(new R),
- peekWidgetDefaultFocus: K(new m(65, "peekWidgetDefaultFocus", "tree", ["tree", "editor"], {
- enumDescriptions: [n.localize(152, null), n.localize(153, null)],
- description: n.localize(154, null)
- })),
- quickSuggestions: K(new P),
- quickSuggestionsDelay: K(new p(67, "quickSuggestionsDelay", 10, 0, 1073741824, {description: n.localize(155, null)})),
- readOnly: K(new h(68, "readOnly", !1)),
- renderControlCharacters: K(new h(69, "renderControlCharacters", !1, {description: n.localize(156, null)})),
- renderIndentGuides: K(new h(70, "renderIndentGuides", !0, {description: n.localize(157, null)})),
- renderFinalNewline: K(new h(71, "renderFinalNewline", !0, {description: n.localize(158, null)})),
- renderLineHighlight: K(new m(72, "renderLineHighlight", "line", ["none", "gutter", "line", "all"], {
- enumDescriptions: ["", "", "", n.localize(159, null)],
- description: n.localize(160, null)
- })),
- renderValidationDecorations: K(new m(73, "renderValidationDecorations", "editable", ["editable", "on", "off"])),
- renderWhitespace: K(new m(74, "renderWhitespace", "none", ["none", "boundary", "selection", "all"], {
- enumDescriptions: ["", n.localize(161, null), n.localize(162, null), ""],
- description: n.localize(163, null)
- })),
- revealHorizontalRightPadding: K(new p(75, "revealHorizontalRightPadding", 30, 0, 1e3)),
- roundedSelection: K(new h(76, "roundedSelection", !0, {description: n.localize(164, null)})),
- rulers: K(new F),
- scrollbar: K(new B),
- scrollBeyondLastColumn: K(new p(79, "scrollBeyondLastColumn", 5, 0, 1073741824, {description: n.localize(165, null)})),
- scrollBeyondLastLine: K(new h(80, "scrollBeyondLastLine", !0, {description: n.localize(166, null)})),
- selectionClipboard: K(new h(81, "selectionClipboard", !0, {
- description: n.localize(167, null),
- included: i.isLinux
- })),
- selectionHighlight: K(new h(82, "selectionHighlight", !0, {description: n.localize(168, null)})),
- selectOnLineNumbers: K(new h(83, "selectOnLineNumbers", !0)),
- showFoldingControls: K(new m(84, "showFoldingControls", "mouseover", ["always", "mouseover"], {description: n.localize(169, null)})),
- showUnused: K(new h(85, "showUnused", !0, {description: n.localize(170, null)})),
- snippetSuggestions: K(new m(86, "snippetSuggestions", "inline", ["top", "bottom", "inline", "none"], {
- enumDescriptions: [n.localize(171, null), n.localize(172, null), n.localize(173, null), n.localize(174, null)],
- description: n.localize(175, null)
- })),
- smoothScrolling: K(new h(87, "smoothScrolling", !1, {description: n.localize(176, null)})),
- stopRenderingLineAfter: K(new p(88, "stopRenderingLineAfter", 1e4, -1, 1073741824)),
- suggest: K(new V),
- suggestFontSize: K(new p(90, "suggestFontSize", 0, 0, 1e3, {markdownDescription: n.localize(177, null)})),
- suggestLineHeight: K(new p(91, "suggestLineHeight", 0, 0, 1e3, {markdownDescription: n.localize(178, null)})),
- suggestOnTriggerCharacters: K(new h(92, "suggestOnTriggerCharacters", !0, {description: n.localize(179, null)})),
- suggestSelection: K(new m(93, "suggestSelection", "recentlyUsed", ["first", "recentlyUsed", "recentlyUsedByPrefix"], {
- markdownEnumDescriptions: [n.localize(180, null), n.localize(181, null), n.localize(182, null)],
- description: n.localize(183, null)
- })),
- tabCompletion: K(new m(94, "tabCompletion", "off", ["on", "off", "onlySnippets"], {
- enumDescriptions: [n.localize(184, null), n.localize(185, null), n.localize(186, null)],
- description: n.localize(187, null)
- })),
- useTabStops: K(new h(95, "useTabStops", !0, {description: n.localize(188, null)})),
- wordSeparators: K(new f(96, "wordSeparators", o.USUAL_WORD_SEPARATORS, {description: n.localize(189, null)})),
- wordWrap: K(new m(97, "wordWrap", "off", ["off", "on", "wordWrapColumn", "bounded"], {
- markdownEnumDescriptions: [n.localize(190, null), n.localize(191, null), n.localize(192, null), n.localize(193, null)],
- description: n.localize(194, null)
- })),
- wordWrapBreakAfterCharacters: K(new f(98, "wordWrapBreakAfterCharacters", " \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),
- wordWrapBreakBeforeCharacters: K(new f(99, "wordWrapBreakBeforeCharacters", "([{‘“〈《「『【〔([{「£¥$£¥++")),
- wordWrapColumn: K(new p(100, "wordWrapColumn", 80, 1, 1073741824, {markdownDescription: n.localize(195, null)})),
- wordWrapMinified: K(new h(101, "wordWrapMinified", !0)),
- wrappingIndent: K(new v(102, "wrappingIndent", 1, "same", ["none", "same", "indent", "deepIndent"], (function (e) {
- switch (e) {
- case"none":
- return 0;
- case"same":
- return 1;
- case"indent":
- return 2;
- case"deepIndent":
- return 3
- }
- }), {
- enumDescriptions: [n.localize(196, null), n.localize(197, null), n.localize(198, null), n.localize(199, null)],
- description: n.localize(200, null)
- })),
- wrappingStrategy: K(new m(103, "wrappingStrategy", "simple", ["simple", "advanced"], {
- enumDescriptions: [n.localize(201, null), n.localize(202, null)],
- description: n.localize(203, null)
- })),
- editorClassName: K(new b),
- pixelRatio: K(new O),
- tabFocusMode: K(new z),
- layoutInfo: K(new I),
- wrappingInfo: K(new H)
- }
- })), define(n[424], i([0, 1, 13, 3, 69, 33]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var s = function () {
- function e(e, t, n, i, o) {
- this.editorId = e, this.model = t, this.configuration = n, this._linesCollection = i, this._coordinatesConverter = o, this._decorationsCache = Object.create(null), this._cachedModelDecorationsResolver = null, this._cachedModelDecorationsResolverViewRange = null
- }
- return e.prototype._clearCachedModelDecorationsResolver = function () {
- this._cachedModelDecorationsResolver = null, this._cachedModelDecorationsResolverViewRange = null
- }, e.prototype.dispose = function () {
- this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
- }, e.prototype.reset = function () {
- this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
- }, e.prototype.onModelDecorationsChanged = function () {
- this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
- }, e.prototype.onLineMappingChanged = function () {
- this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
- }, e.prototype._getOrCreateViewModelDecoration = function (e) {
- var t = e.id, r = this._decorationsCache[t];
- if (!r) {
- var s = e.range, a = e.options, l = void 0;
- if (a.isWholeLine) {
- var u = this._coordinatesConverter.convertModelPositionToViewPosition(new n.Position(s.startLineNumber, 1)),
- d = this._coordinatesConverter.convertModelPositionToViewPosition(new n.Position(s.endLineNumber, this.model.getLineMaxColumn(s.endLineNumber)));
- l = new i.Range(u.lineNumber, u.column, d.lineNumber, d.column)
- } else l = this._coordinatesConverter.convertModelRangeToViewRange(s);
- r = new o.ViewModelDecoration(l, a), this._decorationsCache[t] = r
- }
- return r
- }, e.prototype.getDecorationsViewportData = function (e) {
- var t = null !== this._cachedModelDecorationsResolver;
- return (t = t && e.equalsRange(this._cachedModelDecorationsResolverViewRange)) || (this._cachedModelDecorationsResolver = this._getDecorationsViewportData(e), this._cachedModelDecorationsResolverViewRange = e), this._cachedModelDecorationsResolver
- }, e.prototype._getDecorationsViewportData = function (e) {
- for (var t = this._linesCollection.getDecorationsInRange(e, this.editorId, r.filterValidationDecorations(this.configuration.options)), n = e.startLineNumber, s = e.endLineNumber, a = [], l = 0, u = [], d = n; d <= s; d++) u[d - n] = [];
- for (var c = 0, h = t.length; c < h; c++) {
- var p = t[c], g = p.options, f = this._getOrCreateViewModelDecoration(p), m = f.range;
- if (a[l++] = f, g.inlineClassName) {
- var v = new o.InlineDecoration(m, g.inlineClassName, g.inlineClassNameAffectsLetterSpacing ? 3 : 0),
- _ = Math.max(n, m.startLineNumber), y = Math.min(s, m.endLineNumber);
- for (d = _; d <= y; d++) u[d - n].push(v)
- }
- if (g.beforeContentClassName && n <= m.startLineNumber && m.startLineNumber <= s) {
- v = new o.InlineDecoration(new i.Range(m.startLineNumber, m.startColumn, m.startLineNumber, m.startColumn), g.beforeContentClassName, 1);
- u[m.startLineNumber - n].push(v)
- }
- if (g.afterContentClassName && n <= m.endLineNumber && m.endLineNumber <= s) {
- v = new o.InlineDecoration(new i.Range(m.endLineNumber, m.endColumn, m.endLineNumber, m.endColumn), g.afterContentClassName, 2);
- u[m.endLineNumber - n].push(v)
- }
- }
- return {decorations: a, inlineDecorations: u}
- },
- e
- }();
- t.ViewModelDecorations = s
- })), define(n[425], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/common/modes/modesRegistry", t)
- })), define(n[426], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/common/standaloneStrings", t)
- })), define(n[59], i([0, 1, 426]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.noSelection = n.localize(0, null), e.singleSelectionRange = n.localize(1, null), e.singleSelection = n.localize(2, null), e.multiSelectionRange = n.localize(3, null), e.multiSelection = n.localize(4, null), e.emergencyConfOn = n.localize(5, null), e.openingDocs = n.localize(6, null), e.readonlyDiffEditor = n.localize(7, null), e.editableDiffEditor = n.localize(8, null), e.readonlyEditor = n.localize(9, null), e.editableEditor = n.localize(10, null), e.changeConfigToOnMac = n.localize(11, null), e.changeConfigToOnWinLinux = n.localize(12, null), e.auto_on = n.localize(13, null), e.auto_off = n.localize(14, null), e.tabFocusModeOnMsg = n.localize(15, null), e.tabFocusModeOnMsgNoKb = n.localize(16, null),
- e.tabFocusModeOffMsg = n.localize(17, null), e.tabFocusModeOffMsgNoKb = n.localize(18, null), e.openDocMac = n.localize(19, null), e.openDocWinLinux = n.localize(20, null), e.outroMsg = n.localize(21, null), e.showAccessibilityHelpAction = n.localize(22, null)
- }(t.AccessibilityHelpNLS || (t.AccessibilityHelpNLS = {})), function (e) {
- e.inspectTokensAction = n.localize(23, null)
- }(t.InspectTokensNLS || (t.InspectTokensNLS = {})), function (e) {
- e.gotoLineLabelValidLineAndColumn = n.localize(24, null), e.gotoLineLabelValidLine = n.localize(25, null), e.gotoLineLabelEmptyWithLineLimit = n.localize(26, null), e.gotoLineLabelEmptyWithLineAndColumnLimit = n.localize(27, null), e.gotoLineAriaLabel = n.localize(28, null), e.gotoLineActionInput = n.localize(29, null), e.gotoLineActionLabel = n.localize(30, null)
- }(t.GoToLineNLS || (t.GoToLineNLS = {})), function (e) {
- e.ariaLabelEntryWithKey = n.localize(31, null), e.ariaLabelEntry = n.localize(32, null), e.quickCommandActionInput = n.localize(33, null), e.quickCommandActionLabel = n.localize(34, null)
- }(t.QuickCommandNLS || (t.QuickCommandNLS = {})), function (e) {
- e.entryAriaLabel = n.localize(35, null), e.quickOutlineActionInput = n.localize(36, null), e.quickOutlineActionLabel = n.localize(37, null), e._symbols_ = n.localize(38, null), e._modules_ = n.localize(39, null), e._class_ = n.localize(40, null), e._interface_ = n.localize(41, null), e._method_ = n.localize(42, null), e._function_ = n.localize(43, null), e._property_ = n.localize(44, null), e._variable_ = n.localize(45, null), e._variable2_ = n.localize(46, null), e._constructor_ = n.localize(47, null), e._call_ = n.localize(48, null)
- }(t.QuickOutlineNLS || (t.QuickOutlineNLS = {})), function (e) {
- e.editorViewAccessibleLabel = n.localize(49, null), e.accessibilityHelpMessageIE = n.localize(50, null), e.accessibilityHelpMessage = n.localize(51, null)
- }(t.StandaloneCodeEditorNLS || (t.StandaloneCodeEditorNLS = {})), function (e) {
- e.toggleHighContrast = n.localize(52, null)
- }(t.ToggleHighContrastNLS || (t.ToggleHighContrastNLS = {})), function (e) {
- e.bulkEditServiceSummary = n.localize(53, null)
- }(t.SimpleServicesNLS || (t.SimpleServicesNLS = {}))
- })), define(n[427], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/common/view/editorColorRegistry", t)
- })), define(n[428], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/bracketMatching/bracketMatching", t)
- })), define(n[429], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/caretOperations/caretOperations", t)
- })), define(n[430], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/caretOperations/transpose", t)
- })), define(n[431], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/clipboard/clipboard", t)
- })), define(n[432], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/codeAction/codeActionCommands", t)
- })), define(n[433], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/codeAction/lightBulbWidget", t)
- })), define(n[434], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/comment/comment", t)
- })), define(n[435], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/contextmenu/contextmenu", t)
- })), define(n[436], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/cursorUndo/cursorUndo", t)
- })),
- define(n[437], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/documentSymbols/outlineTree", t)
- })), define(n[438], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/find/findController", t)
- })), define(n[439], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/find/findWidget", t)
- })), define(n[440], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/folding/folding", t)
- })), define(n[441], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/fontZoom/fontZoom", t)
- })), define(n[442], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/format/format", t)
- })), define(n[443], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/format/formatActions", t)
- })), define(n[444], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoError/gotoError", t)
- })), define(n[445], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoError/gotoErrorWidget", t)
- })), define(n[446], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/goToCommands", t)
- })),
- define(n[447], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", t)
- })), define(n[448], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/peek/referencesController", t)
- })), define(n[449], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/peek/referencesTree", t)
- })), define(n[450], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/peek/referencesWidget", t)
- })), define(n[451], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/referencesModel", t)
- })), define(n[113], i([0, 1, 451, 4, 39, 2, 5, 127, 3]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- function e(e, t, n, i) {
- this.isProviderFirst = e, this.parent = t, this._range = n, this._rangeCallback = i, this.id = a.defaultGenerator.nextId()
- }
- return Object.defineProperty(e.prototype, "uri", {
- get: function () {
- return this.parent.uri
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "range", {
- get: function () {
- return this._range
- }, set: function (e) {
- this._range = e, this._rangeCallback(this)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "ariaMessage", {
- get: function () {
- return n.localize(0, null, o.basename(this.uri), this.range.startLineNumber, this.range.startColumn)
- }, enumerable: !0, configurable: !0
- }), e
- }();
- t.OneReference = u;
- var d = function () {
- function e(e) {
- this._modelReference = e
- }
- return e.prototype.dispose = function () {
- this._modelReference.dispose()
- }, e.prototype.preview = function (e, t) {
- void 0 === t && (t = 8);
- var n = this._modelReference.object.textEditorModel;
- if (n) {
- var i = e.startLineNumber, o = e.startColumn, r = e.endLineNumber, s = e.endColumn,
- a = n.getWordUntilPosition({lineNumber: i, column: o - t}),
- u = new l.Range(i, a.startColumn, i, o), d = new l.Range(r, s, r, 1073741824),
- c = n.getValueInRange(u).replace(/^\s+/, ""), h = n.getValueInRange(e);
- return {
- value: c + h + n.getValueInRange(d).replace(/\s+$/, ""),
- highlight: {start: c.length, end: c.length + h.length}
- }
- }
- }, e
- }();
- t.FilePreview = d;
- var c = function () {
- function e(e, t) {
- this.parent = e, this.uri = t,
- this.children = []
- }
- return e.prototype.dispose = function () {
- r.dispose(this._preview), this._preview = void 0
- }, Object.defineProperty(e.prototype, "preview", {
- get: function () {
- return this._preview
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "failure", {
- get: function () {
- return this._loadFailure
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "ariaMessage", {
- get: function () {
- var e = this.children.length;
- return 1 === e ? n.localize(1, null, o.basename(this.uri), this.uri.fsPath) : n.localize(2, null, e, o.basename(this.uri), this.uri.fsPath)
- }, enumerable: !0, configurable: !0
- }), e.prototype.resolve = function (e) {
- var t = this;
- return this._resolved ? Promise.resolve(this) : Promise.resolve(e.createModelReference(this.uri).then((function (e) {
- if (!e.object) throw e.dispose(), new Error;
- return t._preview = new d(e), t._resolved = !0, t
- }), (function (e) {
- return t.children.length = 0, t._resolved = !0, t._loadFailure = e, t
- })))
- }, e
- }();
- t.FileReferences = c;
- var h = function () {
- function e(t, n) {
- var o = this;
- this._disposables = new r.DisposableStore,
- this.groups = [], this.references = [], this._onDidChangeReferenceRange = new i.Emitter, this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event, this._links = t, this._title = n;
- var s, a = t[0];
- t.sort(e._compareReferences);
- for (var d = 0, h = t; d < h.length; d++) {
- var p = h[d];
- if (s && s.uri.toString() === p.uri.toString() || (s = new c(this, p.uri), this.groups.push(s)), 0 === s.children.length || !l.Range.equalsRange(p.range, s.children[s.children.length - 1].range)) {
- var g = new u(a === p, s, p.targetSelectionRange || p.range, (function (e) {
- return o._onDidChangeReferenceRange.fire(e)
- }));
- this.references.push(g), s.children.push(g)
- }
- }
- }
- return e.prototype.dispose = function () {
- r.dispose(this.groups), this._disposables.dispose(), this._onDidChangeReferenceRange.dispose(), this.groups.length = 0
- }, e.prototype.clone = function () {
- return new e(this._links, this._title)
- }, Object.defineProperty(e.prototype, "title", {
- get: function () {
- return this._title
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "isEmpty", {
- get: function () {
- return 0 === this.groups.length
- },
- enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "ariaMessage", {
- get: function () {
- return this.isEmpty ? n.localize(3, null) : 1 === this.references.length ? n.localize(4, null, this.references[0].uri.fsPath) : 1 === this.groups.length ? n.localize(5, null, this.references.length, this.groups[0].uri.fsPath) : n.localize(6, null, this.references.length, this.groups.length)
- }, enumerable: !0, configurable: !0
- }), e.prototype.nextOrPreviousReference = function (e, t) {
- var n = e.parent, i = n.children.indexOf(e), o = n.children.length, r = n.parent.groups.length;
- return 1 === r || t && i + 1 < o || !t && i > 0 ? (i = t ? (i + 1) % o : (i + o - 1) % o, n.children[i]) : (i = n.parent.groups.indexOf(n), t ? (i = (i + 1) % r, n.parent.groups[i].children[0]) : (i = (i + r - 1) % r, n.parent.groups[i].children[n.parent.groups[i].children.length - 1]))
- }, e.prototype.nearestReference = function (e, t) {
- var n = this.references.map((function (n, i) {
- return {
- idx: i,
- prefixLen: s.commonPrefixLength(n.uri.toString(), e.toString()),
- offsetDist: 100 * Math.abs(n.range.startLineNumber - t.lineNumber) + Math.abs(n.range.startColumn - t.column)
- }
- })).sort((function (e, t) {
- return e.prefixLen > t.prefixLen ? -1 : e.prefixLen < t.prefixLen ? 1 : e.offsetDist < t.offsetDist ? -1 : e.offsetDist > t.offsetDist ? 1 : 0
- }))[0];
- if (n) return this.references[n.idx]
- }, e.prototype.referenceAt = function (e, t) {
- for (var n = 0, i = this.references; n < i.length; n++) {
- var o = i[n];
- if (o.uri.toString() === e.toString() && l.Range.containsPosition(o.range, t)) return o
- }
- }, e.prototype.firstReference = function () {
- for (var e = 0, t = this.references; e < t.length; e++) {
- var n = t[e];
- if (n.isProviderFirst) return n
- }
- return this.references[0]
- }, e._compareReferences = function (e, t) {
- return s.compare(e.uri.toString(), t.uri.toString()) || l.Range.compareRangesUsingStarts(e.range, t.range)
- }, e
- }();
- t.ReferencesModel = h
- })), define(n[452], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/gotoSymbol/symbolNavigation", t)
- })), define(n[453], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/hover/hover", t)
- })), define(n[454], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/hover/modesContentHover", t)
- })), define(n[455], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace", t)
- })), define(n[456], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/linesOperations/linesOperations", t)
- })), define(n[457], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/links/links", t)
- })), define(n[458], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/message/messageController", t)
- })), define(n[459], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/multicursor/multicursor", t)
- })), define(n[460], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/parameterHints/parameterHints", t)
- })), define(n[461], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/parameterHints/parameterHintsWidget", t)
- })), define(n[462], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/peekView/peekView", t)
- })), define(n[463], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/rename/rename", t)
- })), define(n[464], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/rename/renameInputField", t)
- })),
- define(n[465], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/smartSelect/smartSelect", t)
- })), define(n[466], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/snippet/snippetVariables", t)
- })), define(n[467], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/suggest/suggestController", t)
- })), define(n[468], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/suggest/suggestWidget", t)
- })), define(n[469], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode", t)
- })), define(n[470], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/tokenization/tokenization", t)
- })), define(n[471], i([7, 8]), (function (e, t) {
- return e.create("vs/editor/contrib/wordHighlighter/wordHighlighter", t)
- })), define(n[472], i([7, 8]), (function (e, t) {
- return e.create("vs/platform/configuration/common/configurationRegistry", t)
- })), define(n[473], i([7, 8]), (function (e, t) {
- return e.create("vs/platform/keybinding/common/abstractKeybindingService", t)
- })),
- define(n[474], i([7, 8]), (function (e, t) {
- return e.create("vs/platform/list/browser/listService", t)
- })), define(n[475], i([7, 8]), (function (e, t) {
- return e.create("vs/platform/markers/common/markers", t)
- })), define(n[476], i([7, 8]), (function (e, t) {
- return e.create("vs/platform/theme/common/colorRegistry", t)
- })), define(n[477], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.InputFocusedContextKey = "inputFocus"
- })), define(n[478], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e[e.API = 0] = "API", e[e.USER = 1] = "USER"
- }(t.EditorOpenContext || (t.EditorOpenContext = {}))
- })), define(n[479], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e(e) {
- this.value = e, this._lower = e.toLowerCase()
- }
- return e.toKey = function (e) {
- return "string" == typeof e ? e.toLowerCase() : e._lower
- }, e
- }();
- t.ExtensionIdentifier = n
- })), define(n[208], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}),
- function (e) {
- e[e.FILE = 0] = "FILE", e[e.FOLDER = 1] = "FOLDER", e[e.ROOT_FOLDER = 2] = "ROOT_FOLDER"
- }(t.FileKind || (t.FileKind = {}))
- })), define(n[209], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function (e, t, n) {
- void 0 === t && (t = []), void 0 === n && (n = !1), this.ctor = e, this.staticArguments = t, this.supportsDelayedInstantiation = n
- };
- t.SyncDescriptor = n
- })), define(n[83], i([0, 1, 209]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = [];
- t.registerSingleton = function (e, t, o) {
- i.push([e, new n.SyncDescriptor(t, [], o)])
- }, t.getSingletonServiceDescriptors = function () {
- return i
- }
- })), define(n[480], i([0, 1, 21, 87]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(e) {
- this._hashFn = e, this._nodes = Object.create(null)
- }
- return e.prototype.roots = function () {
- var e = [];
- return i.forEach(this._nodes, (function (t) {
- n.isEmptyObject(t.value.outgoing) && e.push(t.value)
- })), e
- }, e.prototype.insertEdge = function (e, t) {
- var n = this.lookupOrInsertNode(e), i = this.lookupOrInsertNode(t);
- n.outgoing[this._hashFn(t)] = i, i.incoming[this._hashFn(e)] = n
- }, e.prototype.removeNode = function (e) {
- var t = this._hashFn(e);
- delete this._nodes[t], i.forEach(this._nodes, (function (e) {
- delete e.value.outgoing[t], delete e.value.incoming[t]
- }))
- }, e.prototype.lookupOrInsertNode = function (e) {
- var t = this._hashFn(e), n = this._nodes[t];
- return n || (n = function (e) {
- return {data: e, incoming: Object.create(null), outgoing: Object.create(null)}
- }(e), this._nodes[t] = n), n
- }, e.prototype.isEmpty = function () {
- for (var e in this._nodes) return !1;
- return !0
- }, e.prototype.toString = function () {
- var e = [];
- return i.forEach(this._nodes, (function (t) {
- e.push(t.key + ", (incoming)[" + Object.keys(t.value.incoming).join(", ") + "], (outgoing)[" + Object.keys(t.value.outgoing).join(",") + "]")
- })), e.join("\n")
- }, e
- }();
- t.Graph = o
- })), define(n[11], i([0, 1]), (function (e, t) {
- "use strict";
- var n;
- function i(e, t, i, o) {
- t[n.DI_TARGET] === t ? t[n.DI_DEPENDENCIES].push({
- id: e,
- index: i,
- optional: o
- }) : (t[n.DI_DEPENDENCIES] = [{id: e, index: i, optional: o}],
- t[n.DI_TARGET] = t)
- }
- function o(e) {
- if (n.serviceIds.has(e)) return n.serviceIds.get(e);
- var t = function (e, n, o) {
- if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
- i(t, e, o, !1)
- };
- return t.toString = function () {
- return e
- }, n.serviceIds.set(e, t), t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.serviceIds = new Map, e.DI_TARGET = "$di$target", e.DI_DEPENDENCIES = "$di$dependencies", e.getServiceDependencies = function (t) {
- return t[e.DI_DEPENDENCIES] || []
- }
- }(n = t._util || (t._util = {})), t.IInstantiationService = o("instantiationService"), t.createDecorator = o, t.optional = function (e) {
- return function (t, n, o) {
- if (3 !== arguments.length) throw new Error("@optional-decorator can only be used to decorate a parameter");
- i(e, t, o, !0)
- }
- }
- })), define(n[156], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IBulkEditService = n.createDecorator("IWorkspaceEditService")
- })), define(n[32], i([0, 1, 11]), (function (e, t, n) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0}), t.ICodeEditorService = n.createDecorator("codeEditorService")
- })), define(n[62], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ID_EDITOR_WORKER_SERVICE = "editorWorkerService", t.IEditorWorkerService = n.createDecorator(t.ID_EDITOR_WORKER_SERVICE)
- })), define(n[210], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IMarkerDecorationsService = n.createDecorator("markerDecorationsService")
- })), define(n[71], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IModeService = n.createDecorator("modeService")
- })), define(n[49], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IModelService = n.createDecorator("modelService"), t.shouldSynchronizeModel = function (e) {
- return !e.isTooLargeForSyncing() && !e.isForSimpleWidget
- }
- })), define(n[481], i([0, 1, 4, 2, 350, 49]), (function (e, t, n, i, o, r) {
- "use strict";
- function s(e) {
- return "string" != typeof e && (Array.isArray(e) ? e.every(s) : !!e.exclusive)
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e() {
- this._clock = 0, this._entries = [], this._onDidChange = new n.Emitter
- }
- return Object.defineProperty(e.prototype, "onDidChange", {
- get: function () {
- return this._onDidChange.event
- }, enumerable: !0, configurable: !0
- }), e.prototype.register = function (e, t) {
- var n = this, o = {selector: e, provider: t, _score: -1, _time: this._clock++};
- return this._entries.push(o), this._lastCandidate = void 0, this._onDidChange.fire(this._entries.length), i.toDisposable((function () {
- if (o) {
- var e = n._entries.indexOf(o);
- e >= 0 && (n._entries.splice(e, 1), n._lastCandidate = void 0, n._onDidChange.fire(n._entries.length), o = void 0)
- }
- }))
- }, e.prototype.has = function (e) {
- return this.all(e).length > 0
- }, e.prototype.all = function (e) {
- if (!e) return [];
- this._updateScores(e);
- for (var t = [], n = 0, i = this._entries; n < i.length; n++) {
- var o = i[n];
- o._score > 0 && t.push(o.provider)
- }
- return t
- }, e.prototype.ordered = function (e) {
- var t = []
- ;
- return this._orderedForEach(e, (function (e) {
- return t.push(e.provider)
- })), t
- }, e.prototype.orderedGroups = function (e) {
- var t, n, i = [];
- return this._orderedForEach(e, (function (e) {
- t && n === e._score ? t.push(e.provider) : (n = e._score, t = [e.provider], i.push(t))
- })), i
- }, e.prototype._orderedForEach = function (e, t) {
- if (e) {
- this._updateScores(e);
- for (var n = 0, i = this._entries; n < i.length; n++) {
- var o = i[n];
- o._score > 0 && t(o)
- }
- }
- }, e.prototype._updateScores = function (t) {
- var n = {uri: t.uri.toString(), language: t.getLanguageIdentifier().language};
- if (!this._lastCandidate || this._lastCandidate.language !== n.language || this._lastCandidate.uri !== n.uri) {
- this._lastCandidate = n;
- for (var i = 0, a = this._entries; i < a.length; i++) {
- var l = a[i];
- if (l._score = o.score(l.selector, t.uri, t.getLanguageIdentifier().language, r.shouldSynchronizeModel(t)), s(l.selector) && l._score > 0) {
- for (var u = 0, d = this._entries; u < d.length; u++) {
- d[u]._score = 0
- }
- l._score = 1e3;
- break
- }
- }
- this._entries.sort(e._compareByScoreAndTime)
- }
- }, e._compareByScoreAndTime = function (e, t) {
- return e._score < t._score ? 1 : e._score > t._score ? -1 : e._time < t._time ? 1 : e._time > t._time ? -1 : 0
- }, e
- }();
- t.LanguageFeatureRegistry = a
- })), define(n[17], i([0, 1, 21, 25, 3, 481, 358]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e, t) {
- this.language = e, this.id = t
- };
- t.LanguageIdentifier = a;
- var l, u = function () {
- function e() {
- }
- return e.getLanguageId = function (e) {
- return (255 & e) >>> 0
- }, e.getTokenType = function (e) {
- return (1792 & e) >>> 8
- }, e.getFontStyle = function (e) {
- return (14336 & e) >>> 11
- }, e.getForeground = function (e) {
- return (8372224 & e) >>> 14
- }, e.getBackground = function (e) {
- return (4286578688 & e) >>> 23
- }, e.getClassNameFromMetadata = function (e) {
- var t = "mtk" + this.getForeground(e), n = this.getFontStyle(e);
- return 1 & n && (t += " mtki"), 2 & n && (t += " mtkb"), 4 & n && (t += " mtku"), t
- }, e.getInlineStyleFromMetadata = function (e, t) {
- var n = this.getForeground(e), i = this.getFontStyle(e), o = "color: " + t[n] + ";";
- return 1 & i && (o += "font-style: italic;"), 2 & i && (o += "font-weight: bold;"), 4 & i && (o += "text-decoration: underline;"), o
- }, e
- }();
- t.TokenMetadata = u,
- t.completionKindToCssClass = ((l = Object.create(null))[0] = "method", l[1] = "function", l[2] = "constructor", l[3] = "field", l[4] = "variable", l[5] = "class", l[6] = "struct", l[7] = "interface", l[8] = "module", l[9] = "property", l[10] = "event", l[11] = "operator", l[12] = "unit", l[13] = "value", l[14] = "constant", l[15] = "enum", l[16] = "enum-member", l[17] = "keyword", l[25] = "snippet", l[18] = "text", l[19] = "color", l[20] = "file", l[21] = "reference", l[22] = "customcolor", l[23] = "folder", l[24] = "type-parameter", function (e) {
- return l[e] || "property"
- }), t.completionKindFromString = function () {
- var e = Object.create(null);
- return e.method = 0, e.function = 1, e.constructor = 2, e.field = 3, e.variable = 4, e.class = 5, e.struct = 6, e.interface = 7, e.module = 8, e.property = 9, e.event = 10, e.operator = 11, e.unit = 12, e.value = 13, e.constant = 14, e.enum = 15, e["enum-member"] = 16, e.enumMember = 16, e.keyword = 17, e.snippet = 25, e.text = 18, e.color = 19, e.file = 20, e.reference = 21, e.customcolor = 22, e.folder = 23, e["type-parameter"] = 24, e.typeParameter = 24, function (t, n) {
- var i = e[t];
- return void 0 !== i || n || (i = 9), i
- }
- }(), function (e) {
- e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"
- }(t.SignatureHelpTriggerKind || (t.SignatureHelpTriggerKind = {})), function (e) {
- e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"
- }(t.DocumentHighlightKind || (t.DocumentHighlightKind = {})), t.isLocationLink = function (e) {
- return e && i.URI.isUri(e.uri) && o.Range.isIRange(e.range) && (o.Range.isIRange(e.originSelectionRange) || o.Range.isIRange(e.targetSelectionRange))
- }, function (e) {
- var t = new Map;
- t.set("file", 0), t.set("module", 1), t.set("namespace", 2), t.set("package", 3), t.set("class", 4), t.set("method", 5), t.set("property", 6), t.set("field", 7), t.set("constructor", 8), t.set("enum", 9), t.set("interface", 10), t.set("function", 11), t.set("variable", 12), t.set("constant", 13), t.set("string", 14), t.set("number", 15), t.set("boolean", 16), t.set("array", 17), t.set("object", 18), t.set("key", 19), t.set("null", 20), t.set("enum-member", 21), t.set("struct", 22), t.set("event", 23), t.set("operator", 24), t.set("type-parameter", 25);
- var n = new Map
- ;n.set(0, "file"), n.set(1, "module"), n.set(2, "namespace"), n.set(3, "package"), n.set(4, "class"), n.set(5, "method"), n.set(6, "property"), n.set(7, "field"), n.set(8, "constructor"), n.set(9, "enum"), n.set(10, "interface"), n.set(11, "function"), n.set(12, "variable"), n.set(13, "constant"), n.set(14, "string"), n.set(15, "number"), n.set(16, "boolean"), n.set(17, "array"), n.set(18, "object"), n.set(19, "key"), n.set(20, "null"), n.set(21, "enum-member"), n.set(22, "struct"), n.set(23, "event"), n.set(24, "operator"), n.set(25, "type-parameter"), e.fromString = function (e) {
- return t.get(e)
- }, e.toString = function (e) {
- return n.get(e)
- }, e.toCssClassName = function (e, t) {
- return "codicon " + (t ? "inline" : "block") + " codicon-symbol-" + (n.get(e) || "property")
- }
- }(t.SymbolKinds || (t.SymbolKinds = {}));
- var d = function () {
- function e(e) {
- this.value = e
- }
- return e.Comment = new e("comment"), e.Imports = new e("imports"), e.Region = new e("region"), e
- }();
- t.FoldingRangeKind = d, function (e) {
- e.is = function (e) {
- return n.isObject(e) && (Boolean(e.newUri) || Boolean(e.oldUri))
- }
- }(t.WorkspaceFileEdit || (t.WorkspaceFileEdit = {})), function (e) {
- e.is = function (e) {
- return n.isObject(e) && i.URI.isUri(e.resource) && n.isObject(e.edit)
- }
- }(t.WorkspaceTextEdit || (t.WorkspaceTextEdit = {})), t.ReferenceProviderRegistry = new r.LanguageFeatureRegistry, t.RenameProviderRegistry = new r.LanguageFeatureRegistry, t.CompletionProviderRegistry = new r.LanguageFeatureRegistry, t.SignatureHelpProviderRegistry = new r.LanguageFeatureRegistry, t.HoverProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentSymbolProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentHighlightProviderRegistry = new r.LanguageFeatureRegistry, t.DefinitionProviderRegistry = new r.LanguageFeatureRegistry, t.DeclarationProviderRegistry = new r.LanguageFeatureRegistry, t.ImplementationProviderRegistry = new r.LanguageFeatureRegistry, t.TypeDefinitionProviderRegistry = new r.LanguageFeatureRegistry, t.CodeLensProviderRegistry = new r.LanguageFeatureRegistry, t.CodeActionProviderRegistry = new r.LanguageFeatureRegistry,
- t.DocumentFormattingEditProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentRangeFormattingEditProviderRegistry = new r.LanguageFeatureRegistry, t.OnTypeFormattingEditProviderRegistry = new r.LanguageFeatureRegistry, t.LinkProviderRegistry = new r.LanguageFeatureRegistry, t.ColorProviderRegistry = new r.LanguageFeatureRegistry, t.SelectionRangeRegistry = new r.LanguageFeatureRegistry, t.FoldingRangeProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentSemanticTokensProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentRangeSemanticTokensProviderRegistry = new r.LanguageFeatureRegistry, t.TokenizationRegistry = new s.TokenizationRegistryImpl
- })), define(n[93], i([0, 1, 17]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e, t) {
- this._tokens = e, this._tokensCount = this._tokens.length >>> 1, this._text = t
- }
- return e.prototype.equals = function (t) {
- return t instanceof e && this.slicedEquals(t, 0, this._tokensCount)
- }, e.prototype.slicedEquals = function (e, t, n) {
- if (this._text !== e._text) return !1;
- if (this._tokensCount !== e._tokensCount) return !1;
- for (var i = t << 1, o = i + (n << 1), r = i; r < o; r++) if (this._tokens[r] !== e._tokens[r]) return !1;
- return !0
- }, e.prototype.getLineContent = function () {
- return this._text
- }, e.prototype.getCount = function () {
- return this._tokensCount
- }, e.prototype.getStartOffset = function (e) {
- return e > 0 ? this._tokens[e - 1 << 1] : 0
- }, e.prototype.getMetadata = function (e) {
- return this._tokens[1 + (e << 1)]
- }, e.prototype.getLanguageId = function (e) {
- var t = this._tokens[1 + (e << 1)];
- return n.TokenMetadata.getLanguageId(t)
- }, e.prototype.getStandardTokenType = function (e) {
- var t = this._tokens[1 + (e << 1)];
- return n.TokenMetadata.getTokenType(t)
- }, e.prototype.getForeground = function (e) {
- var t = this._tokens[1 + (e << 1)];
- return n.TokenMetadata.getForeground(t)
- }, e.prototype.getClassName = function (e) {
- var t = this._tokens[1 + (e << 1)];
- return n.TokenMetadata.getClassNameFromMetadata(t)
- }, e.prototype.getInlineStyle = function (e, t) {
- var i = this._tokens[1 + (e << 1)];
- return n.TokenMetadata.getInlineStyleFromMetadata(i, t)
- },
- e.prototype.getEndOffset = function (e) {
- return this._tokens[e << 1]
- }, e.prototype.findTokenIndexAtOffset = function (t) {
- return e.findIndexInTokensArray(this._tokens, t)
- }, e.prototype.inflate = function () {
- return this
- }, e.prototype.sliceAndInflate = function (e, t, n) {
- return new o(this, e, t, n)
- }, e.convertToEndOffset = function (e, t) {
- for (var n = (e.length >>> 1) - 1, i = 0; i < n; i++) e[i << 1] = e[i + 1 << 1];
- e[n << 1] = t
- }, e.findIndexInTokensArray = function (e, t) {
- if (e.length <= 2) return 0;
- for (var n = 0, i = (e.length >>> 1) - 1; n < i;) {
- var o = n + Math.floor((i - n) / 2), r = e[o << 1];
- if (r === t) return o + 1;
- r < t ? n = o + 1 : r > t && (i = o)
- }
- return n
- }, e
- }();
- t.LineTokens = i;
- var o = function () {
- function e(e, t, n, i) {
- this._source = e, this._startOffset = t, this._endOffset = n, this._deltaOffset = i, this._firstTokenIndex = e.findTokenIndexAtOffset(t), this._tokensCount = 0;
- for (var o = this._firstTokenIndex, r = e.getCount(); o < r; o++) {
- if (e.getStartOffset(o) >= n) break;
- this._tokensCount++
- }
- }
- return e.prototype.equals = function (t) {
- return t instanceof e && (this._startOffset === t._startOffset && this._endOffset === t._endOffset && this._deltaOffset === t._deltaOffset && this._source.slicedEquals(t._source, this._firstTokenIndex, this._tokensCount))
- }, e.prototype.getCount = function () {
- return this._tokensCount
- }, e.prototype.getForeground = function (e) {
- return this._source.getForeground(this._firstTokenIndex + e)
- }, e.prototype.getEndOffset = function (e) {
- var t = this._source.getEndOffset(this._firstTokenIndex + e);
- return Math.min(this._endOffset, t) - this._startOffset + this._deltaOffset
- }, e.prototype.getClassName = function (e) {
- return this._source.getClassName(this._firstTokenIndex + e)
- }, e.prototype.getInlineStyle = function (e, t) {
- return this._source.getInlineStyle(this._firstTokenIndex + e, t)
- }, e.prototype.findTokenIndexAtOffset = function (e) {
- return this._source.findTokenIndexAtOffset(e + this._startOffset - this._deltaOffset) - this._firstTokenIndex
- }, e
- }();
- t.SlicedLineTokens = o
- })), define(n[157], i([0, 1, 19, 93, 13, 17]), (function (e, t, n, i, o, r) {
- "use strict";
- function s(e) {
- for (var t = 0, n = 0, i = 0, o = 0, r = e.length; o < r; o++) {
- var s = e.charCodeAt(o);
- 13 === s ? (0 === t && (n = o), t++, o + 1 < r && 10 === e.charCodeAt(o + 1) && o++, i = o + 1) : 10 === s && (0 === t && (n = o), t++, i = o + 1)
- }
- return 0 === t && (n = e.length), [t, n, e.length - i]
- }
- function a(e) {
- return (16384 | e << 0 | 2 << 23) >>> 0
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.countEOL = s;
- var l = new Uint32Array(0).buffer, u = function () {
- function e() {
- this.tokens = []
- }
- return e.prototype.add = function (e, t) {
- if (this.tokens.length > 0) {
- var n = this.tokens[this.tokens.length - 1];
- if (n.startLineNumber + n.tokens.length - 1 + 1 === e) return void n.tokens.push(t)
- }
- this.tokens.push(new p(e, [t]))
- }, e
- }();
- t.MultilineTokensBuilder = u;
- var d = function () {
- function e(e) {
- this._tokens = e, this._tokenCount = e.length / 4
- }
- return e.prototype.getMaxDeltaLine = function () {
- var e = this.getTokenCount();
- return 0 === e ? -1 : this.getDeltaLine(e - 1)
- }, e.prototype.getTokenCount = function () {
- return this._tokenCount
- }, e.prototype.getDeltaLine = function (e) {
- return this._tokens[4 * e]
- }, e.prototype.getStartCharacter = function (e) {
- return this._tokens[4 * e + 1]
- },
- e.prototype.getEndCharacter = function (e) {
- return this._tokens[4 * e + 2]
- }, e.prototype.getMetadata = function (e) {
- return this._tokens[4 * e + 3]
- }, e.prototype.clear = function () {
- this._tokenCount = 0
- }, e.prototype.acceptDeleteRange = function (e, t, n, i, o) {
- for (var r = this._tokens, s = this._tokenCount, a = i - t, l = 0, u = !1, d = 0; d < s; d++) {
- var c = 4 * d, h = r[c], p = r[c + 1], g = r[c + 2], f = r[c + 3];
- if (h < t || h === t && g <= n) l++; else {
- if (h === t && p < n) h === i && g > o ? g -= o - n : g = n; else if (h === t && p === n) {
- if (!(h === i && g > o)) {
- u = !0;
- continue
- }
- g -= o - n
- } else if (h < i || h === i && p < o) {
- if (!(h === i && g > o)) {
- u = !0;
- continue
- }
- g = h === t ? (p = n) + (g - o) : (p = 0) + (g - o)
- } else if (h > i) {
- if (0 === a && !u) {
- l = s;
- break
- }
- h -= a
- } else {
- if (!(h === i && p >= o)) throw new Error("Not possible!");
- e && 0 === h && (p += e, g += e), h -= a, p -= o - n, g -= o - n
- }
- var m = 4 * l;
- r[m] = h, r[m + 1] = p, r[m + 2] = g, r[m + 3] = f, l++
- }
- }
- this._tokenCount = l
- }, e.prototype.acceptInsertText = function (e, t, n, i, o, r) {
- for (var s = 0 === n && 1 === i && (r >= 48 && r <= 57 || r >= 65 && r <= 90 || r >= 97 && r <= 122), a = this._tokens, l = this._tokenCount, u = 0; u < l; u++) {
- var d = 4 * u, c = a[d], h = a[d + 1], p = a[d + 2];
- if (!(c < e || c === e && p < t)) {
- if (c === e && p === t) {
- if (!s) continue
- ;
- p += 1
- } else if (c === e && h < t && t < p) 0 === n ? p += i : p = t; else {
- if (c === e && h === t && s) continue;
- if (c === e) if (c += n, 0 === n) h += i, p += i; else {
- var g = p - h;
- p = (h = o + (h - t)) + g
- } else c += n
- }
- a[d] = c, a[d + 1] = h, a[d + 2] = p
- }
- }
- }, e
- }();
- t.SparseEncodedTokens = d;
- var c = function () {
- function e(e, t, n) {
- this._actual = e, this._startTokenIndex = t, this._endTokenIndex = n
- }
- return e.prototype.getCount = function () {
- return this._endTokenIndex - this._startTokenIndex + 1
- }, e.prototype.getStartCharacter = function (e) {
- return this._actual.getStartCharacter(this._startTokenIndex + e)
- }, e.prototype.getEndCharacter = function (e) {
- return this._actual.getEndCharacter(this._startTokenIndex + e)
- }, e.prototype.getMetadata = function (e) {
- return this._actual.getMetadata(this._startTokenIndex + e)
- }, e
- }();
- t.LineTokens2 = c;
- var h = function () {
- function e(e, t) {
- this.startLineNumber = e, this.tokens = t, this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine()
- }
- return e.prototype._updateEndLineNumber = function () {
- this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine()
- }, e.prototype.getLineTokens = function (t) {
- if (this.startLineNumber <= t && t <= this.endLineNumber) {
- var n = e._findTokensWithLine(this.tokens, t - this.startLineNumber);
- if (n) {
- var i = n[0], o = n[1];
- return new c(this.tokens, i, o)
- }
- }
- return null
- }, e._findTokensWithLine = function (e, t) {
- for (var n = 0, i = e.getTokenCount() - 1; n < i;) {
- var o = n + Math.floor((i - n) / 2), r = e.getDeltaLine(o);
- if (r < t) n = o + 1; else {
- if (!(r > t)) {
- for (var s = o; s > n && e.getDeltaLine(s - 1) === t;) s--;
- for (var a = o; a < i && e.getDeltaLine(a + 1) === t;) a++;
- return [s, a]
- }
- i = o - 1
- }
- }
- return e.getDeltaLine(n) === t ? [n, n] : null
- }, e.prototype.applyEdit = function (e, t) {
- var n = s(t), i = n[0], o = n[1], r = n[2];
- this.acceptEdit(e, i, o, r, t.length > 0 ? t.charCodeAt(0) : 0)
- }, e.prototype.acceptEdit = function (e, t, n, i, r) {
- this._acceptDeleteRange(e), this._acceptInsertText(new o.Position(e.startLineNumber, e.startColumn), t, n, i, r), this._updateEndLineNumber()
- }, e.prototype._acceptDeleteRange = function (e) {
- if (e.startLineNumber !== e.endLineNumber || e.startColumn !== e.endColumn) {
- var t = e.startLineNumber - this.startLineNumber, n = e.endLineNumber - this.startLineNumber;
- if (n < 0) {
- var i = n - t
- ;this.startLineNumber -= i
- } else {
- var o = this.tokens.getMaxDeltaLine();
- if (!(t >= o + 1)) {
- if (t < 0 && n >= o + 1) return this.startLineNumber = 0, void this.tokens.clear();
- if (t < 0) {
- var r = -t;
- this.startLineNumber -= r, this.tokens.acceptDeleteRange(e.startColumn - 1, 0, 0, n, e.endColumn - 1)
- } else this.tokens.acceptDeleteRange(0, t, e.startColumn - 1, n, e.endColumn - 1)
- }
- }
- }
- }, e.prototype._acceptInsertText = function (e, t, n, i, o) {
- if (0 !== t || 0 !== n) {
- var r = e.lineNumber - this.startLineNumber;
- if (r < 0) this.startLineNumber += t; else r >= this.tokens.getMaxDeltaLine() + 1 || this.tokens.acceptInsertText(r, e.column - 1, t, n, i, o)
- }
- }, e
- }();
- t.MultilineTokens2 = h;
- var p = function (e, t) {
- this.startLineNumber = e, this.tokens = t
- };
- function g(e) {
- return e instanceof Uint32Array ? e : new Uint32Array(e)
- }
- t.MultilineTokens = p;
- var f = function () {
- function e() {
- this._pieces = []
- }
- return e.prototype.flush = function () {
- this._pieces = []
- }, e.prototype.set = function (e) {
- this._pieces = e || []
- }, e.prototype.addSemanticTokens = function (t, n) {
- var o = this._pieces;
- if (0 === o.length) return n
- ;
- var r = e._findFirstPieceWithLine(o, t), s = this._pieces[r].getLineTokens(t);
- if (!s) return n;
- for (var a = n.getCount(), l = s.getCount(), u = 0, d = [], c = 0, h = 0; h < l; h++) {
- for (var p = s.getStartCharacter(h), g = s.getEndCharacter(h), f = s.getMetadata(h), m = ((1 & f ? 2048 : 0) | (2 & f ? 4096 : 0) | (4 & f ? 8192 : 0) | (8 & f ? 8372224 : 0) | (16 & f ? 4286578688 : 0)) >>> 0, v = ~m >>> 0; u < a && n.getEndOffset(u) <= p;) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u), u++;
- for (u < a && n.getStartOffset(u) < p && (d[c++] = p, d[c++] = n.getMetadata(u)); u < a && n.getEndOffset(u) < g;) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u) & v | f & m, u++;
- if (u < a && n.getEndOffset(u) === g) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u) & v | f & m, u++; else {
- var _ = Math.min(Math.max(0, u - 1), a - 1);
- d[c++] = g, d[c++] = n.getMetadata(_) & v | f & m
- }
- }
- for (; u < a;) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u), u++;
- return new i.LineTokens(new Uint32Array(d), n.getLineContent())
- }, e._findFirstPieceWithLine = function (e, t) {
- for (var n = 0, i = e.length - 1; n < i;) {
- var o = n + Math.floor((i - n) / 2);
- if (e[o].endLineNumber < t) n = o + 1; else {
- if (!(e[o].startLineNumber > t)) {
- for (; o > n && e[o - 1].startLineNumber <= t && t <= e[o - 1].endLineNumber;) o--;
- return o
- }
- i = o - 1
- }
- }
- return n
- }, e.prototype.acceptEdit = function (e, t, n, i, o) {
- for (var r = 0, s = this._pieces; r < s.length; r++) {
- s[r].acceptEdit(e, t, n, i, o)
- }
- }, e
- }();
- t.TokensStore2 = f;
- var m = function () {
- function e() {
- this._lineTokens = [], this._len = 0
- }
- return e.prototype.flush = function () {
- this._lineTokens = [], this._len = 0
- }, e.prototype.getTokens = function (e, t, n) {
- var o = null;
- if (t < this._len && (o = this._lineTokens[t]), null !== o && o !== l) return new i.LineTokens(g(o), n);
- var r = new Uint32Array(2);
- return r[0] = n.length, r[1] = a(e), new i.LineTokens(r, n)
- }, e._massageTokens = function (e, t, n) {
- var i = n ? g(n) : null;
- if (0 === t) {
- var o = !1;
- if (i && i.length > 1 && (o = r.TokenMetadata.getLanguageId(i[1]) !== e), !o) return l
- }
- if (!i || 0 === i.length) {
- var s = new Uint32Array(2);
- return s[0] = t, s[1] = a(e), s.buffer
- }
- return i[i.length - 2] = t, 0 === i.byteOffset && i.byteLength === i.buffer.byteLength ? i.buffer : i
- }, e.prototype._ensureLine = function (e) {
- for (; e >= this._len;) this._lineTokens[this._len] = null, this._len++
- },
- e.prototype._deleteLines = function (e, t) {
- 0 !== t && (e + t > this._len && (t = this._len - e), this._lineTokens.splice(e, t), this._len -= t)
- }, e.prototype._insertLines = function (e, t) {
- if (0 !== t) {
- for (var i = [], o = 0; o < t; o++) i[o] = null;
- this._lineTokens = n.arrayInsert(this._lineTokens, e, i), this._len += t
- }
- }, e.prototype.setTokens = function (t, n, i, o) {
- var r = e._massageTokens(t, i, o);
- this._ensureLine(n), this._lineTokens[n] = r
- }, e.prototype.acceptEdit = function (e, t, n) {
- this._acceptDeleteRange(e), this._acceptInsertText(new o.Position(e.startLineNumber, e.startColumn), t, n)
- }, e.prototype._acceptDeleteRange = function (t) {
- var n = t.startLineNumber - 1;
- if (!(n >= this._len)) if (t.startLineNumber !== t.endLineNumber) {
- this._lineTokens[n] = e._deleteEnding(this._lineTokens[n], t.startColumn - 1);
- var i = t.endLineNumber - 1, o = null;
- i < this._len && (o = e._deleteBeginning(this._lineTokens[i], t.endColumn - 1)), this._lineTokens[n] = e._append(this._lineTokens[n], o), this._deleteLines(t.startLineNumber, t.endLineNumber - t.startLineNumber)
- } else {
- if (t.startColumn === t.endColumn) return
- ;
- this._lineTokens[n] = e._delete(this._lineTokens[n], t.startColumn - 1, t.endColumn - 1)
- }
- }, e.prototype._acceptInsertText = function (t, n, i) {
- if (0 !== n || 0 !== i) {
- var o = t.lineNumber - 1;
- o >= this._len || (0 !== n ? (this._lineTokens[o] = e._deleteEnding(this._lineTokens[o], t.column - 1), this._lineTokens[o] = e._insert(this._lineTokens[o], t.column - 1, i), this._insertLines(t.lineNumber, n)) : this._lineTokens[o] = e._insert(this._lineTokens[o], t.column - 1, i))
- }
- }, e._deleteBeginning = function (t, n) {
- return null === t || t === l ? t : e._delete(t, 0, n)
- }, e._deleteEnding = function (t, n) {
- if (null === t || t === l) return t;
- var i = g(t), o = i[i.length - 2];
- return e._delete(t, n, o)
- }, e._delete = function (e, t, n) {
- if (null === e || e === l || t === n) return e;
- var o = g(e), r = o.length >>> 1;
- if (0 === t && o[o.length - 2] === n) return l;
- var s, a, u = i.LineTokens.findIndexInTokensArray(o, t), d = u > 0 ? o[u - 1 << 1] : 0;
- if (n < o[u << 1]) {
- for (var c = n - t, h = u; h < r; h++) o[h << 1] -= c;
- return e
- }
- d !== t ? (o[u << 1] = t, s = u + 1 << 1, a = t) : (s = u << 1, a = d);
- for (var p = n - t, f = u + 1; f < r; f++) {
- var m = o[f << 1] - p;
- m > a && (o[s++] = m, o[s++] = o[1 + (f << 1)], a = m)
- }
- if (s === o.length) return e
- ;
- var v = new Uint32Array(s);
- return v.set(o.subarray(0, s), 0), v.buffer
- }, e._append = function (e, t) {
- if (t === l) return e;
- if (e === l) return t;
- if (null === e) return e;
- if (null === t) return null;
- var n = g(e), i = g(t), o = i.length >>> 1, r = new Uint32Array(n.length + i.length);
- r.set(n, 0);
- for (var s = n.length, a = n[n.length - 2], u = 0; u < o; u++) r[s++] = i[u << 1] + a, r[s++] = i[1 + (u << 1)];
- return r.buffer
- }, e._insert = function (e, t, n) {
- if (null === e || e === l) return e;
- var o = g(e), r = o.length >>> 1, s = i.LineTokens.findIndexInTokensArray(o, t);
- s > 0 && (o[s - 1 << 1] === t && s--);
- for (var a = s; a < r; a++) o[a << 1] += n;
- return e
- }, e
- }();
- t.TokensStore = m
- })), define(n[63], i([0, 1, 107, 17]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e() {
- }
- return e.prototype.clone = function () {
- return this
- }, e.prototype.equals = function (e) {
- return this === e
- }, e
- }();
- t.NULL_STATE = new o, t.NULL_MODE_ID = "vs.editor.nullMode", t.NULL_LANGUAGE_IDENTIFIER = new i.LanguageIdentifier(t.NULL_MODE_ID, 0), t.nullTokenize = function (e, t, i, o) {
- return new n.TokenizationResult([new n.Token(o, "", e)], i)
- }, t.nullTokenize2 = function (e, i, o, r) {
- var s = new Uint32Array(2);
- return s[0] = r, s[1] = (16384 | e << 0 | 2 << 23) >>> 0, new n.TokenizationResult2(s, null === o ? t.NULL_STATE : o)
- }
- })), define(n[482], i([0, 1, 19, 10, 93, 13, 17, 63, 2, 132, 157, 16]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = function () {
- function e() {
- this._beginState = [], this._valid = [], this._len = 0, this._invalidLineStartIndex = 0
- }
- return e.prototype._reset = function (e) {
- this._beginState = [], this._valid = [], this._len = 0, this._invalidLineStartIndex = 0, e && this._setBeginState(0, e)
- }, e.prototype.flush = function (e) {
- this._reset(e)
- }, Object.defineProperty(e.prototype, "invalidLineStartIndex", {
- get: function () {
- return this._invalidLineStartIndex
- }, enumerable: !0, configurable: !0
- }), e.prototype._invalidateLine = function (e) {
- e < this._len && (this._valid[e] = !1), e < this._invalidLineStartIndex && (this._invalidLineStartIndex = e)
- }, e.prototype._isValid = function (e) {
- return e < this._len && this._valid[e]
- },
- e.prototype.getBeginState = function (e) {
- return e < this._len ? this._beginState[e] : null
- }, e.prototype._ensureLine = function (e) {
- for (; e >= this._len;) this._beginState[this._len] = null, this._valid[this._len] = !1, this._len++
- }, e.prototype._deleteLines = function (e, t) {
- 0 !== t && (e + t > this._len && (t = this._len - e), this._beginState.splice(e, t), this._valid.splice(e, t), this._len -= t)
- }, e.prototype._insertLines = function (e, t) {
- if (0 !== t) {
- for (var i = [], o = [], r = 0; r < t; r++) i[r] = null, o[r] = !1;
- this._beginState = n.arrayInsert(this._beginState, e, i), this._valid = n.arrayInsert(this._valid, e, o), this._len += t
- }
- }, e.prototype._setValid = function (e, t) {
- this._ensureLine(e), this._valid[e] = t
- }, e.prototype._setBeginState = function (e, t) {
- this._ensureLine(e), this._beginState[e] = t
- }, e.prototype.setEndState = function (e, t, n) {
- if (this._setValid(t, !0), this._invalidLineStartIndex = t + 1, t !== e - 1) {
- var i = this.getBeginState(t + 1);
- if (null === i || !n.equals(i)) return this._setBeginState(t + 1, n), void this._invalidateLine(t + 1);
- for (var o = t + 1; o < e && this._isValid(o);) o++;
- this._invalidLineStartIndex = o
- }
- },
- e.prototype.setFakeTokens = function (e) {
- this._setValid(e, !1)
- }, e.prototype.applyEdits = function (e, t) {
- for (var n = e.endLineNumber - e.startLineNumber, i = t, o = Math.min(n, i); o >= 0; o--) this._invalidateLine(e.startLineNumber + o - 1);
- this._acceptDeleteRange(e), this._acceptInsertText(new s.Position(e.startLineNumber, e.startColumn), t)
- }, e.prototype._acceptDeleteRange = function (e) {
- e.startLineNumber - 1 >= this._len || this._deleteLines(e.startLineNumber, e.endLineNumber - e.startLineNumber)
- }, e.prototype._acceptInsertText = function (e, t) {
- e.lineNumber - 1 >= this._len || this._insertLines(e.lineNumber, t)
- }, e
- }();
- t.TokenizationStateStore = p;
- var g = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._isDisposed = !1, n._textModel = t, n._tokenizationStateStore = new p, n._tokenizationSupport = null, n._register(a.TokenizationRegistry.onDidChange((function (e) {
- var t = n._textModel.getLanguageIdentifier();
- -1 !== e.changedLanguages.indexOf(t.language) && (n._resetTokenizationState(), n._textModel.clearTokens())
- }))),
- n._register(n._textModel.onDidChangeRawContentFast((function (e) {
- e.containsEvent(1) && n._resetTokenizationState()
- }))), n._register(n._textModel.onDidChangeContentFast((function (e) {
- for (var t = 0, i = e.changes.length; t < i; t++) {
- var o = e.changes[t], r = c.countEOL(o.text)[0];
- n._tokenizationStateStore.applyEdits(o.range, r)
- }
- n._beginBackgroundTokenization()
- }))), n._register(n._textModel.onDidChangeAttached((function () {
- n._beginBackgroundTokenization()
- }))), n._register(n._textModel.onDidChangeLanguage((function () {
- n._resetTokenizationState(), n._textModel.clearTokens()
- }))), n._resetTokenizationState(), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._isDisposed = !0, e.prototype.dispose.call(this)
- }, t.prototype._resetTokenizationState = function () {
- var e = function (e) {
- var t = e.getLanguageIdentifier(),
- n = e.isTooLargeForTokenization() ? null : a.TokenizationRegistry.get(t.language), o = null;
- if (n) try {
- o = n.getInitialState()
- } catch (e) {
- i.onUnexpectedError(e), n = null
- }
- return [n, o]
- }(this._textModel), t = e[0], n = e[1];
- this._tokenizationSupport = t,
- this._tokenizationStateStore.flush(n), this._beginBackgroundTokenization()
- }, t.prototype._beginBackgroundTokenization = function () {
- var e = this;
- this._textModel.isAttachedToEditor() && this._hasLinesToTokenize() && h.setImmediate((function () {
- e._isDisposed || e._revalidateTokensNow()
- }))
- }, t.prototype._revalidateTokensNow = function (e) {
- void 0 === e && (e = this._textModel.getLineCount());
- for (var t = new c.MultilineTokensBuilder, n = d.StopWatch.create(!1); this._hasLinesToTokenize() && !(n.elapsed() > 1);) {
- if (this._tokenizeOneInvalidLine(t) >= e) break
- }
- this._beginBackgroundTokenization(), this._textModel.setTokens(t.tokens)
- }, t.prototype.tokenizeViewport = function (e, t) {
- var n = new c.MultilineTokensBuilder;
- this._tokenizeViewport(n, e, t), this._textModel.setTokens(n.tokens)
- }, t.prototype.reset = function () {
- this._resetTokenizationState(), this._textModel.clearTokens()
- }, t.prototype.forceTokenization = function (e) {
- var t = new c.MultilineTokensBuilder;
- this._updateTokensUntilLine(t, e), this._textModel.setTokens(t.tokens)
- }, t.prototype.isCheapToTokenize = function (e) {
- if (!this._tokenizationSupport) return !0;
- var t = this._tokenizationStateStore.invalidLineStartIndex + 1;
- return !(e > t) && (e < t || this._textModel.getLineLength(e) < 2048)
- }, t.prototype._hasLinesToTokenize = function () {
- return !!this._tokenizationSupport && this._tokenizationStateStore.invalidLineStartIndex < this._textModel.getLineCount()
- }, t.prototype._tokenizeOneInvalidLine = function (e) {
- if (!this._hasLinesToTokenize()) return this._textModel.getLineCount() + 1;
- var t = this._tokenizationStateStore.invalidLineStartIndex + 1;
- return this._updateTokensUntilLine(e, t), t
- }, t.prototype._updateTokensUntilLine = function (e, t) {
- if (this._tokenizationSupport) for (var n = this._textModel.getLanguageIdentifier(), i = this._textModel.getLineCount(), o = t - 1, r = this._tokenizationStateStore.invalidLineStartIndex; r <= o; r++) {
- var s = this._textModel.getLineContent(r + 1), a = this._tokenizationStateStore.getBeginState(r),
- l = f(n, this._tokenizationSupport, s, a);
- e.add(r + 1, l.tokens), this._tokenizationStateStore.setEndState(i, r, l.endState),
- r = this._tokenizationStateStore.invalidLineStartIndex - 1
- }
- }, t.prototype._tokenizeViewport = function (e, t, n) {
- if (this._tokenizationSupport && !(n <= this._tokenizationStateStore.invalidLineStartIndex)) if (t <= this._tokenizationStateStore.invalidLineStartIndex) this._updateTokensUntilLine(e, n); else {
- for (var i = this._textModel.getLineFirstNonWhitespaceColumn(t), o = [], r = null, s = t - 1; i > 0 && s >= 1; s--) {
- var a = this._textModel.getLineFirstNonWhitespaceColumn(s);
- if (0 !== a && a < i) {
- if (r = this._tokenizationStateStore.getBeginState(s - 1)) break;
- o.push(this._textModel.getLineContent(s)), i = a
- }
- }
- r || (r = this._tokenizationSupport.getInitialState());
- var l = this._textModel.getLanguageIdentifier(), u = r;
- for (s = o.length - 1; s >= 0; s--) {
- u = (h = f(l, this._tokenizationSupport, o[s], u)).endState
- }
- for (var d = t; d <= n; d++) {
- var c = this._textModel.getLineContent(d), h = f(l, this._tokenizationSupport, c, u);
- e.add(d, h.tokens), this._tokenizationStateStore.setFakeTokens(d - 1), u = h.endState
- }
- }
- }, t
- }(u.Disposable);
- function f(e, t, n, r) {
- var s = null;
- if (t) try {
- s = t.tokenize2(n, r.clone(), 0)
- } catch (e) {
- i.onUnexpectedError(e)
- }
- return s || (s = l.nullTokenize2(e.id, n, r, 0)), o.LineTokens.convertToEndOffset(s.tokens, n.length), s
- }
- t.TextModelTokenization = g
- })), define(n[30], i([0, 1, 10, 4, 2, 5, 25, 33, 13, 3, 22, 48, 342, 343, 344, 348, 346, 144, 482, 109, 41, 63, 145, 146, 21, 157, 27]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N) {
- "use strict";
- function x(e) {
- var t = new m.PieceTreeTextBufferBuilder;
- return t.acceptChunk(e), t.finish()
- }
- function I(e, t) {
- return ("string" == typeof e ? x(e) : e).create(t)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.createTextBufferFactory = x, t.createTextBuffer = I;
- var M = 0;
- t.LONG_LINE_BOUNDARY = 1e4;
- var k = function () {
- throw new Error("Invalid change accessor")
- }, T = function (e) {
- function o(t, n, r, l) {
- void 0 === l && (l = null);
- var u = e.call(this) || this;
- u._onWillDispose = u._register(new i.Emitter), u.onWillDispose = u._onWillDispose.event, u._onDidChangeDecorations = u._register(new z), u.onDidChangeDecorations = u._onDidChangeDecorations.event, u._onDidChangeLanguage = u._register(new i.Emitter),
- u.onDidChangeLanguage = u._onDidChangeLanguage.event, u._onDidChangeLanguageConfiguration = u._register(new i.Emitter), u.onDidChangeLanguageConfiguration = u._onDidChangeLanguageConfiguration.event, u._onDidChangeTokens = u._register(new i.Emitter), u.onDidChangeTokens = u._onDidChangeTokens.event, u._onDidChangeOptions = u._register(new i.Emitter), u.onDidChangeOptions = u._onDidChangeOptions.event, u._onDidChangeAttached = u._register(new i.Emitter), u.onDidChangeAttached = u._onDidChangeAttached.event, u._eventEmitter = u._register(new H), M++, u.id = "$model" + M, u.isForSimpleWidget = n.isForSimpleWidget, u._associatedResource = null == l ? a.URI.parse("inmemory://model/" + M) : l, u._attachedEditorCount = 0, u._buffer = I(t, n.defaultEOL), u._options = o.resolveOptions(u._buffer, n);
- var c = u._buffer.getLineCount(),
- h = u._buffer.getValueLengthInRange(new d.Range(1, 1, c, u._buffer.getLineLength(c) + 1), 0);
- return n.largeFileOptimizations ? u._isTooLargeForTokenization = h > o.LARGE_FILE_SIZE_THRESHOLD || c > o.LARGE_FILE_LINE_COUNT_THRESHOLD : u._isTooLargeForTokenization = !1,
- u._isTooLargeForSyncing = h > o.MODEL_SYNC_LIMIT, u._versionId = 1, u._alternativeVersionId = 1, u._isDisposed = !1, u._isDisposing = !1, u._languageIdentifier = r || S.NULL_LANGUAGE_IDENTIFIER, u._languageRegistryListener = b.LanguageConfigurationRegistry.onDidChange((function (e) {
- e.languageIdentifier.id === u._languageIdentifier.id && u._onDidChangeLanguageConfiguration.fire({})
- })), u._instanceId = s.singleLetterHash(M), u._lastDecorationId = 0, u._decorations = Object.create(null), u._decorationsTree = new R, u._commandManager = new p.EditStack(u), u._isUndoing = !1, u._isRedoing = !1, u._trimAutoWhitespaceLines = null, u._tokens = new D.TokensStore, u._tokens2 = new D.TokensStore2, u._tokenization = new y.TextModelTokenization(u), u
- }
- return r(o, e), o.createFromString = function (e, t, n, i) {
- return void 0 === t && (t = o.DEFAULT_CREATION_OPTIONS), void 0 === n && (n = null), void 0 === i && (i = null), new o(e, t, n, i)
- }, o.resolveOptions = function (e, t) {
- if (t.detectIndentation) {
- var n = g.guessIndentation(e, t.tabSize, t.insertSpaces);
- return new h.TextModelResolvedOptions({
- tabSize: n.tabSize,
- indentSize: n.tabSize,
- insertSpaces: n.insertSpaces,
- trimAutoWhitespace: t.trimAutoWhitespace,
- defaultEOL: t.defaultEOL
- })
- }
- return new h.TextModelResolvedOptions({
- tabSize: t.tabSize,
- indentSize: t.indentSize,
- insertSpaces: t.insertSpaces,
- trimAutoWhitespace: t.trimAutoWhitespace,
- defaultEOL: t.defaultEOL
- })
- }, o.prototype.onDidChangeRawContentFast = function (e) {
- return this._eventEmitter.fastEvent((function (t) {
- return e(t.rawContentChangedEvent)
- }))
- }, o.prototype.onDidChangeRawContent = function (e) {
- return this._eventEmitter.slowEvent((function (t) {
- return e(t.rawContentChangedEvent)
- }))
- }, o.prototype.onDidChangeContentFast = function (e) {
- return this._eventEmitter.fastEvent((function (t) {
- return e(t.contentChangedEvent)
- }))
- }, o.prototype.onDidChangeContent = function (e) {
- return this._eventEmitter.slowEvent((function (t) {
- return e(t.contentChangedEvent)
- }))
- }, o.prototype.dispose = function () {
- this._isDisposing = !0, this._onWillDispose.fire(), this._languageRegistryListener.dispose(), this._tokenization.dispose(), this._isDisposed = !0, e.prototype.dispose.call(this),
- this._isDisposing = !1
- }, o.prototype._assertNotDisposed = function () {
- if (this._isDisposed) throw new Error("Model is disposed!")
- }, o.prototype._emitContentChangedEvent = function (e, t) {
- this._isDisposing || this._eventEmitter.fire(new v.InternalModelContentChangeEvent(e, t))
- }, o.prototype.setValue = function (e) {
- if (this._assertNotDisposed(), null !== e) {
- var t = I(e, this._options.defaultEOL);
- this.setValueFromTextBuffer(t)
- }
- }, o.prototype._createContentChanged2 = function (e, t, n, i, o, r, s) {
- return {
- changes: [{range: e, rangeOffset: t, rangeLength: n, text: i}],
- eol: this._buffer.getEOL(),
- versionId: this.getVersionId(),
- isUndoing: o,
- isRedoing: r,
- isFlush: s
- }
- }, o.prototype.setValueFromTextBuffer = function (e) {
- if (this._assertNotDisposed(), null !== e) {
- var t = this.getFullModelRange(), n = this.getValueLengthInRange(t), i = this.getLineCount(),
- o = this.getLineMaxColumn(i);
- this._buffer = e, this._increaseVersionId(), this._tokens.flush(), this._tokens2.flush(), this._decorations = Object.create(null), this._decorationsTree = new R, this._commandManager = new p.EditStack(this),
- this._trimAutoWhitespaceLines = null, this._emitContentChangedEvent(new v.ModelRawContentChangedEvent([new v.ModelRawFlush], this._versionId, !1, !1), this._createContentChanged2(new d.Range(1, 1, i, o), 0, n, this.getValue(), !1, !1, !0))
- }
- }, o.prototype.setEOL = function (e) {
- this._assertNotDisposed();
- var t = 1 === e ? "\r\n" : "\n";
- if (this._buffer.getEOL() !== t) {
- var n = this.getFullModelRange(), i = this.getValueLengthInRange(n), o = this.getLineCount(),
- r = this.getLineMaxColumn(o);
- this._onBeforeEOLChange(), this._buffer.setEOL(t), this._increaseVersionId(), this._onAfterEOLChange(), this._emitContentChangedEvent(new v.ModelRawContentChangedEvent([new v.ModelRawEOLChanged], this._versionId, !1, !1), this._createContentChanged2(new d.Range(1, 1, o, r), 0, i, this.getValue(), !1, !1, !1))
- }
- }, o.prototype._onBeforeEOLChange = function () {
- var e = this.getVersionId(), t = this._decorationsTree.search(0, !1, !1, e);
- this._ensureNodesHaveRanges(t)
- }, o.prototype._onAfterEOLChange = function () {
- for (var e = this.getVersionId(), t = this._decorationsTree.collectNodesPostOrder(), n = 0, i = t.length; n < i; n++) {
- var o = t[n], r = o.cachedAbsoluteStart - o.start,
- s = this._buffer.getOffsetAt(o.range.startLineNumber, o.range.startColumn),
- a = this._buffer.getOffsetAt(o.range.endLineNumber, o.range.endColumn);
- o.cachedAbsoluteStart = s, o.cachedAbsoluteEnd = a, o.cachedVersionId = e, o.start = s - r, o.end = a - r, f.recomputeMaxEnd(o)
- }
- }, o.prototype.onBeforeAttached = function () {
- this._attachedEditorCount++, 1 === this._attachedEditorCount && this._onDidChangeAttached.fire(void 0)
- }, o.prototype.onBeforeDetached = function () {
- this._attachedEditorCount--, 0 === this._attachedEditorCount && this._onDidChangeAttached.fire(void 0)
- }, o.prototype.isAttachedToEditor = function () {
- return this._attachedEditorCount > 0
- }, o.prototype.getAttachedEditorCount = function () {
- return this._attachedEditorCount
- }, o.prototype.isTooLargeForSyncing = function () {
- return this._isTooLargeForSyncing
- }, o.prototype.isTooLargeForTokenization = function () {
- return this._isTooLargeForTokenization
- },
- o.prototype.isDisposed = function () {
- return this._isDisposed
- }, o.prototype.isDominatedByLongLines = function () {
- if (this._assertNotDisposed(), this.isTooLargeForTokenization()) return !1;
- for (var e = 0, n = 0, i = this._buffer.getLineCount(), o = 1; o <= i; o++) {
- var r = this._buffer.getLineLength(o);
- r >= t.LONG_LINE_BOUNDARY ? n += r : e += r
- }
- return n > e
- }, Object.defineProperty(o.prototype, "uri", {
- get: function () {
- return this._associatedResource
- }, enumerable: !0, configurable: !0
- }), o.prototype.getOptions = function () {
- return this._assertNotDisposed(), this._options
- }, o.prototype.getFormattingOptions = function () {
- return {tabSize: this._options.indentSize, insertSpaces: this._options.insertSpaces}
- }, o.prototype.updateOptions = function (e) {
- this._assertNotDisposed();
- var t = void 0 !== e.tabSize ? e.tabSize : this._options.tabSize,
- n = void 0 !== e.indentSize ? e.indentSize : this._options.indentSize,
- i = void 0 !== e.insertSpaces ? e.insertSpaces : this._options.insertSpaces,
- o = void 0 !== e.trimAutoWhitespace ? e.trimAutoWhitespace : this._options.trimAutoWhitespace,
- r = new h.TextModelResolvedOptions({
- tabSize: t,
- indentSize: n,
- insertSpaces: i,
- defaultEOL: this._options.defaultEOL,
- trimAutoWhitespace: o
- });
- if (!this._options.equals(r)) {
- var s = this._options.createChangeEvent(r);
- this._options = r, this._onDidChangeOptions.fire(s)
- }
- }, o.prototype.detectIndentation = function (e, t) {
- this._assertNotDisposed();
- var n = g.guessIndentation(this._buffer, t, e);
- this.updateOptions({insertSpaces: n.insertSpaces, tabSize: n.tabSize, indentSize: n.tabSize})
- }, o._normalizeIndentationFromWhitespace = function (e, t, n) {
- for (var i = 0, o = 0; o < e.length; o++) "\t" === e.charAt(o) ? i += t : i++;
- var r = "";
- if (!n) {
- var s = Math.floor(i / t);
- i %= t;
- for (o = 0; o < s; o++) r += "\t"
- }
- for (o = 0; o < i; o++) r += " ";
- return r
- }, o.normalizeIndentation = function (e, t, n) {
- var i = s.firstNonWhitespaceIndex(e);
- return -1 === i && (i = e.length), o._normalizeIndentationFromWhitespace(e.substring(0, i), t, n) + e.substring(i)
- }, o.prototype.normalizeIndentation = function (e) {
- return this._assertNotDisposed(), o.normalizeIndentation(e, this._options.indentSize, this._options.insertSpaces)
- }, o.prototype.getVersionId = function () {
- return this._assertNotDisposed(), this._versionId
- }, o.prototype.mightContainRTL = function () {
- return this._buffer.mightContainRTL()
- }, o.prototype.mightContainNonBasicASCII = function () {
- return this._buffer.mightContainNonBasicASCII()
- }, o.prototype.getAlternativeVersionId = function () {
- return this._assertNotDisposed(), this._alternativeVersionId
- }, o.prototype.getOffsetAt = function (e) {
- this._assertNotDisposed();
- var t = this._validatePosition(e.lineNumber, e.column, 0);
- return this._buffer.getOffsetAt(t.lineNumber, t.column)
- }, o.prototype.getPositionAt = function (e) {
- this._assertNotDisposed();
- var t = Math.min(this._buffer.getLength(), Math.max(0, e));
- return this._buffer.getPositionAt(t)
- }, o.prototype._increaseVersionId = function () {
- this._versionId = this._versionId + 1, this._alternativeVersionId = this._versionId
- }, o.prototype._overwriteAlternativeVersionId = function (e) {
- this._alternativeVersionId = e
- }, o.prototype.getValue = function (e, t) {
- void 0 === t && (t = !1), this._assertNotDisposed();
- var n = this.getFullModelRange(), i = this.getValueInRange(n, e)
- ;
- return t ? this._buffer.getBOM() + i : i
- }, o.prototype.getValueLength = function (e, t) {
- void 0 === t && (t = !1), this._assertNotDisposed();
- var n = this.getFullModelRange(), i = this.getValueLengthInRange(n, e);
- return t ? this._buffer.getBOM().length + i : i
- }, o.prototype.getValueInRange = function (e, t) {
- return void 0 === t && (t = 0), this._assertNotDisposed(), this._buffer.getValueInRange(this.validateRange(e), t)
- }, o.prototype.getValueLengthInRange = function (e, t) {
- return void 0 === t && (t = 0), this._assertNotDisposed(), this._buffer.getValueLengthInRange(this.validateRange(e), t)
- }, o.prototype.getCharacterCountInRange = function (e, t) {
- return void 0 === t && (t = 0), this._assertNotDisposed(), this._buffer.getCharacterCountInRange(this.validateRange(e), t)
- }, o.prototype.getLineCount = function () {
- return this._assertNotDisposed(), this._buffer.getLineCount()
- }, o.prototype.getLineContent = function (e) {
- if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- return this._buffer.getLineContent(e)
- }, o.prototype.getLineLength = function (e) {
- if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- return this._buffer.getLineLength(e)
- }, o.prototype.getLinesContent = function () {
- return this._assertNotDisposed(), this._buffer.getLinesContent()
- }, o.prototype.getEOL = function () {
- return this._assertNotDisposed(), this._buffer.getEOL()
- }, o.prototype.getLineMinColumn = function (e) {
- return this._assertNotDisposed(), 1
- }, o.prototype.getLineMaxColumn = function (e) {
- if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- return this._buffer.getLineLength(e) + 1
- }, o.prototype.getLineFirstNonWhitespaceColumn = function (e) {
- if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- return this._buffer.getLineFirstNonWhitespaceColumn(e)
- }, o.prototype.getLineLastNonWhitespaceColumn = function (e) {
- if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- return this._buffer.getLineLastNonWhitespaceColumn(e)
- },
- o.prototype._validateRangeRelaxedNoAllocations = function (e) {
- var t, n, i = this._buffer.getLineCount(), o = e.startLineNumber, r = e.startColumn;
- if (o < 1) t = 1, n = 1; else if (o > i) t = i, n = this.getLineMaxColumn(t); else {
- if (t = 0 | o, r <= 1) n = 1; else n = r >= (h = this.getLineMaxColumn(t)) ? h : 0 | r
- }
- var s, a, l = e.endLineNumber, u = e.endColumn;
- if (l < 1) s = 1, a = 1; else if (l > i) s = i, a = this.getLineMaxColumn(s); else {
- var h;
- if (s = 0 | l, u <= 1) a = 1; else a = u >= (h = this.getLineMaxColumn(s)) ? h : 0 | u
- }
- return o === t && r === n && l === s && u === a && e instanceof d.Range && !(e instanceof c.Selection) ? e : new d.Range(t, n, s, a)
- }, o.prototype._isValidPosition = function (e, t, n) {
- if ("number" != typeof e || "number" != typeof t) return !1;
- if (isNaN(e) || isNaN(t)) return !1;
- if (e < 1 || t < 1) return !1;
- if ((0 | e) !== e || (0 | t) !== t) return !1;
- if (e > this._buffer.getLineCount()) return !1;
- if (1 === t) return !0;
- if (t > this.getLineMaxColumn(e)) return !1;
- if (1 === n) {
- var i = this._buffer.getLineCharCode(e, t - 2);
- if (s.isHighSurrogate(i)) return !1
- }
- return !0
- }, o.prototype._validatePosition = function (e, t, n) {
- var i = Math.floor("number" != typeof e || isNaN(e) ? 1 : e),
- o = Math.floor("number" != typeof t || isNaN(t) ? 1 : t), r = this._buffer.getLineCount();
- if (i < 1) return new u.Position(1, 1);
- if (i > r) return new u.Position(r, this.getLineMaxColumn(r));
- if (o <= 1) return new u.Position(i, 1);
- var a = this.getLineMaxColumn(i);
- if (o >= a) return new u.Position(i, a);
- if (1 === n) {
- var l = this._buffer.getLineCharCode(i, o - 2);
- if (s.isHighSurrogate(l)) return new u.Position(i, o - 1)
- }
- return new u.Position(i, o)
- }, o.prototype.validatePosition = function (e) {
- return this._assertNotDisposed(), e instanceof u.Position && this._isValidPosition(e.lineNumber, e.column, 1) ? e : this._validatePosition(e.lineNumber, e.column, 1)
- }, o.prototype._isValidRange = function (e, t) {
- var n = e.startLineNumber, i = e.startColumn, o = e.endLineNumber, r = e.endColumn;
- if (!this._isValidPosition(n, i, 0)) return !1;
- if (!this._isValidPosition(o, r, 0)) return !1;
- if (1 === t) {
- var a = i > 1 ? this._buffer.getLineCharCode(n, i - 2) : 0,
- l = r > 1 && r <= this._buffer.getLineLength(o) ? this._buffer.getLineCharCode(o, r - 2) : 0,
- u = s.isHighSurrogate(a), d = s.isHighSurrogate(l);
- return !u && !d
- }
- return !0
- }, o.prototype.validateRange = function (e) {
- if (this._assertNotDisposed(), e instanceof d.Range && !(e instanceof c.Selection) && this._isValidRange(e, 1)) return e;
- var t = this._validatePosition(e.startLineNumber, e.startColumn, 0),
- n = this._validatePosition(e.endLineNumber, e.endColumn, 0), i = t.lineNumber, o = t.column,
- r = n.lineNumber, a = n.column, l = o > 1 ? this._buffer.getLineCharCode(i, o - 2) : 0,
- u = a > 1 && a <= this._buffer.getLineLength(r) ? this._buffer.getLineCharCode(r, a - 2) : 0,
- h = s.isHighSurrogate(l), p = s.isHighSurrogate(u);
- return h || p ? i === r && o === a ? new d.Range(i, o - 1, r, a - 1) : h && p ? new d.Range(i, o - 1, r, a + 1) : h ? new d.Range(i, o - 1, r, a) : new d.Range(i, o, r, a + 1) : new d.Range(i, o, r, a)
- }, o.prototype.modifyPosition = function (e, t) {
- this._assertNotDisposed();
- var n = this.getOffsetAt(e) + t;
- return this.getPositionAt(Math.min(this._buffer.getLength(), Math.max(0, n)))
- },
- o.prototype.getFullModelRange = function () {
- this._assertNotDisposed();
- var e = this.getLineCount();
- return new d.Range(1, 1, e, this.getLineMaxColumn(e))
- }, o.prototype.findMatchesLineByLine = function (e, t, n, i) {
- return this._buffer.findMatchesLineByLine(e, t, n, i)
- }, o.prototype.findMatches = function (e, t, n, i, o, r, s) {
- var a;
- if (void 0 === s && (s = 999), this._assertNotDisposed(), a = d.Range.isIRange(t) ? this.validateRange(t) : this.getFullModelRange(), !n && e.indexOf("\n") < 0) {
- var l = new _.SearchParams(e, n, i, o).parseSearchRequest();
- return l ? this.findMatchesLineByLine(a, l, r, s) : []
- }
- return _.TextModelSearch.findMatches(this, new _.SearchParams(e, n, i, o), a, r, s)
- }, o.prototype.findNextMatch = function (e, t, n, i, o, r) {
- this._assertNotDisposed();
- var s = this.validatePosition(t);
- if (!n && e.indexOf("\n") < 0) {
- var a = new _.SearchParams(e, n, i, o).parseSearchRequest();
- if (!a) return null;
- var l = this.getLineCount(), u = new d.Range(s.lineNumber, s.column, l, this.getLineMaxColumn(l)),
- c = this.findMatchesLineByLine(u, a, r, 1)
- ;
- return _.TextModelSearch.findNextMatch(this, new _.SearchParams(e, n, i, o), s, r), c.length > 0 ? c[0] : (u = new d.Range(1, 1, s.lineNumber, this.getLineMaxColumn(s.lineNumber)), (c = this.findMatchesLineByLine(u, a, r, 1)).length > 0 ? c[0] : null)
- }
- return _.TextModelSearch.findNextMatch(this, new _.SearchParams(e, n, i, o), s, r)
- }, o.prototype.findPreviousMatch = function (e, t, n, i, o, r) {
- this._assertNotDisposed();
- var s = this.validatePosition(t);
- return _.TextModelSearch.findPreviousMatch(this, new _.SearchParams(e, n, i, o), s, r)
- }, o.prototype.pushStackElement = function () {
- this._commandManager.pushStackElement()
- }, o.prototype.pushEOL = function (e) {
- if (("\n" === this.getEOL() ? 0 : 1) !== e) try {
- this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._commandManager.pushEOL(e)
- } finally {
- this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
- }
- }, o.prototype.pushEditOperations = function (e, t, n) {
- try {
- return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(),
- this._pushEditOperations(e, t, n)
- } finally {
- this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
- }
- }, o.prototype._pushEditOperations = function (e, t, n) {
- var i = this;
- if (this._options.trimAutoWhitespace && this._trimAutoWhitespaceLines) {
- for (var o = t.map((function (e) {
- return {range: i.validateRange(e.range), text: e.text}
- })), r = !0, s = 0, a = e.length; s < a; s++) {
- for (var l = e[s], u = !1, c = 0, h = o.length; c < h; c++) {
- var p = (_ = o[c].range).startLineNumber > l.endLineNumber,
- g = l.startLineNumber > _.endLineNumber;
- if (!p && !g) {
- u = !0;
- break
- }
- }
- if (!u) {
- r = !1;
- break
- }
- }
- if (r) for (s = 0, a = this._trimAutoWhitespaceLines.length; s < a; s++) {
- var f = this._trimAutoWhitespaceLines[s], m = this.getLineMaxColumn(f), v = !0;
- for (c = 0, h = o.length; c < h; c++) {
- var _ = o[c].range, y = o[c].text;
- if (!(f < _.startLineNumber || f > _.endLineNumber) && !(f === _.startLineNumber && _.startColumn === m && _.isEmpty() && y && y.length > 0 && "\n" === y.charAt(0) || f === _.startLineNumber && 1 === _.startColumn && _.isEmpty() && y && y.length > 0 && "\n" === y.charAt(y.length - 1))) {
- v = !1;
- break
- }
- }
- v && t.push({
- range: new d.Range(f, 1, f, m),
- text: null
- })
- }
- this._trimAutoWhitespaceLines = null
- }
- return this._commandManager.pushEditOperation(e, t, n)
- }, o.prototype.applyEdits = function (e) {
- try {
- return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._applyEdits(e)
- } finally {
- this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
- }
- }, o.prototype._applyEdits = function (e) {
- for (var t = 0, n = e.length; t < n; t++) e[t].range = this.validateRange(e[t].range);
- var i = this._buffer.getLineCount(), o = this._buffer.applyEdits(e, this._options.trimAutoWhitespace),
- r = this._buffer.getLineCount(), s = o.changes;
- if (this._trimAutoWhitespaceLines = o.trimAutoWhitespaceLineNumbers, 0 !== s.length) {
- var a = [], l = i;
- for (t = 0, n = s.length; t < n; t++) {
- var u = s[t], d = D.countEOL(u.text), c = d[0], h = d[1], p = d[2];
- this._tokens.acceptEdit(u.range, c, h), this._tokens2.acceptEdit(u.range, c, h, p, u.text.length > 0 ? u.text.charCodeAt(0) : 0), this._onDidChangeDecorations.fire(), this._decorationsTree.acceptReplace(u.rangeOffset, u.rangeLength, u.text.length, u.forceMoveMarkers)
- ;
- for (var g = u.range.startLineNumber, f = u.range.endLineNumber, m = f - g, _ = c, y = Math.min(m, _), C = _ - m, b = y; b >= 0; b--) {
- var S = g + b, w = r - l - C + S;
- a.push(new v.ModelRawLineChanged(S, this.getLineContent(w)))
- }
- if (y < m) {
- var E = g + y;
- a.push(new v.ModelRawLinesDeleted(E + 1, f))
- }
- if (y < _) {
- for (var L = g + y, N = _ - y, x = r - l - N + L + 1, I = [], M = 0; M < N; M++) {
- var k = x + M;
- I[k - x] = this.getLineContent(k)
- }
- a.push(new v.ModelRawLinesInserted(L + 1, g + _, I))
- }
- l += C
- }
- this._increaseVersionId(), this._emitContentChangedEvent(new v.ModelRawContentChangedEvent(a, this.getVersionId(), this._isUndoing, this._isRedoing), {
- changes: s,
- eol: this._buffer.getEOL(),
- versionId: this.getVersionId(),
- isUndoing: this._isUndoing,
- isRedoing: this._isRedoing,
- isFlush: !1
- })
- }
- return o.reverseEdits
- }, o.prototype._undo = function () {
- this._isUndoing = !0;
- var e = this._commandManager.undo();
- return this._isUndoing = !1, e ? (this._overwriteAlternativeVersionId(e.recordedVersionId), e.selections) : null
- }, o.prototype.undo = function () {
- try {
- return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._undo()
- } finally {
- this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
- }
- }, o.prototype.canUndo = function () {
- return this._commandManager.canUndo()
- }, o.prototype._redo = function () {
- this._isRedoing = !0;
- var e = this._commandManager.redo();
- return this._isRedoing = !1, e ? (this._overwriteAlternativeVersionId(e.recordedVersionId), e.selections) : null
- }, o.prototype.redo = function () {
- try {
- return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._redo()
- } finally {
- this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
- }
- }, o.prototype.canRedo = function () {
- return this._commandManager.canRedo()
- }, o.prototype.changeDecorations = function (e, t) {
- void 0 === t && (t = 0), this._assertNotDisposed();
- try {
- return this._onDidChangeDecorations.beginDeferredEmit(), this._changeDecorations(t, e)
- } finally {
- this._onDidChangeDecorations.endDeferredEmit()
- }
- }, o.prototype._changeDecorations = function (e, t) {
- var i = this, o = {
- addDecoration: function (t, n) {
- return i._onDidChangeDecorations.fire(),
- i._deltaDecorationsImpl(e, [], [{range: t, options: n}])[0]
- }, changeDecoration: function (e, t) {
- i._onDidChangeDecorations.fire(), i._changeDecorationImpl(e, t)
- }, changeDecorationOptions: function (e, t) {
- i._onDidChangeDecorations.fire(), i._changeDecorationOptionsImpl(e, V(t))
- }, removeDecoration: function (t) {
- i._onDidChangeDecorations.fire(), i._deltaDecorationsImpl(e, [t], [])
- }, deltaDecorations: function (t, n) {
- return 0 === t.length && 0 === n.length ? [] : (i._onDidChangeDecorations.fire(), i._deltaDecorationsImpl(e, t, n))
- }
- }, r = null;
- try {
- r = t(o)
- } catch (e) {
- n.onUnexpectedError(e)
- }
- return o.addDecoration = k, o.changeDecoration = k, o.changeDecorationOptions = k, o.removeDecoration = k, o.deltaDecorations = k, r
- }, o.prototype.deltaDecorations = function (e, t, n) {
- if (void 0 === n && (n = 0), this._assertNotDisposed(), e || (e = []), 0 === e.length && 0 === t.length) return [];
- try {
- return this._onDidChangeDecorations.beginDeferredEmit(), this._onDidChangeDecorations.fire(), this._deltaDecorationsImpl(n, e, t)
- } finally {
- this._onDidChangeDecorations.endDeferredEmit()
- }
- },
- o.prototype._getTrackedRange = function (e) {
- return this.getDecorationRange(e)
- }, o.prototype._setTrackedRange = function (e, t, n) {
- var i = e ? this._decorations[e] : null;
- if (!i) return t ? this._deltaDecorationsImpl(0, [], [{range: t, options: B[n]}])[0] : null;
- if (!t) return this._decorationsTree.delete(i), delete this._decorations[i.id], null;
- var o = this._validateRangeRelaxedNoAllocations(t),
- r = this._buffer.getOffsetAt(o.startLineNumber, o.startColumn),
- s = this._buffer.getOffsetAt(o.endLineNumber, o.endColumn);
- return this._decorationsTree.delete(i), i.reset(this.getVersionId(), r, s, o), i.setOptions(B[n]), this._decorationsTree.insert(i), i.id
- }, o.prototype.removeAllDecorationsWithOwnerId = function (e) {
- if (!this._isDisposed) for (var t = this._decorationsTree.collectNodesFromOwner(e), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- this._decorationsTree.delete(o), delete this._decorations[o.id]
- }
- }, o.prototype.getDecorationOptions = function (e) {
- var t = this._decorations[e];
- return t ? t.options : null
- }, o.prototype.getDecorationRange = function (e) {
- var t = this._decorations[e]
- ;
- if (!t) return null;
- var n = this.getVersionId();
- return t.cachedVersionId !== n && this._decorationsTree.resolveNode(t, n), null === t.range && (t.range = this._getRangeAt(t.cachedAbsoluteStart, t.cachedAbsoluteEnd)), t.range
- }, o.prototype.getLineDecorations = function (e, t, n) {
- return void 0 === t && (t = 0), void 0 === n && (n = !1), e < 1 || e > this.getLineCount() ? [] : this.getLinesDecorations(e, e, t, n)
- }, o.prototype.getLinesDecorations = function (e, t, n, i) {
- void 0 === n && (n = 0), void 0 === i && (i = !1);
- var o = this.getLineCount(), r = Math.min(o, Math.max(1, e)), s = Math.min(o, Math.max(1, t)),
- a = this.getLineMaxColumn(s);
- return this._getDecorationsInRange(new d.Range(r, 1, s, a), n, i)
- }, o.prototype.getDecorationsInRange = function (e, t, n) {
- void 0 === t && (t = 0), void 0 === n && (n = !1);
- var i = this.validateRange(e);
- return this._getDecorationsInRange(i, t, n)
- }, o.prototype.getOverviewRulerDecorations = function (e, t) {
- void 0 === e && (e = 0), void 0 === t && (t = !1);
- var n = this.getVersionId(), i = this._decorationsTree.search(e, t, !0, n);
- return this._ensureNodesHaveRanges(i)
- }, o.prototype.getAllDecorations = function (e, t) {
- void 0 === e && (e = 0), void 0 === t && (t = !1);
- var n = this.getVersionId(), i = this._decorationsTree.search(e, t, !1, n);
- return this._ensureNodesHaveRanges(i)
- }, o.prototype._getDecorationsInRange = function (e, t, n) {
- var i = this._buffer.getOffsetAt(e.startLineNumber, e.startColumn),
- o = this._buffer.getOffsetAt(e.endLineNumber, e.endColumn), r = this.getVersionId(),
- s = this._decorationsTree.intervalSearch(i, o, t, n, r);
- return this._ensureNodesHaveRanges(s)
- }, o.prototype._ensureNodesHaveRanges = function (e) {
- for (var t = 0, n = e.length; t < n; t++) {
- var i = e[t];
- null === i.range && (i.range = this._getRangeAt(i.cachedAbsoluteStart, i.cachedAbsoluteEnd))
- }
- return e
- }, o.prototype._getRangeAt = function (e, t) {
- return this._buffer.getRangeAt(e, t - e)
- }, o.prototype._changeDecorationImpl = function (e, t) {
- var n = this._decorations[e];
- if (n) {
- var i = this._validateRangeRelaxedNoAllocations(t),
- o = this._buffer.getOffsetAt(i.startLineNumber, i.startColumn),
- r = this._buffer.getOffsetAt(i.endLineNumber, i.endColumn);
- this._decorationsTree.delete(n), n.reset(this.getVersionId(), o, r, i),
- this._decorationsTree.insert(n)
- }
- }, o.prototype._changeDecorationOptionsImpl = function (e, t) {
- var n = this._decorations[e];
- n && (!(!n.options.overviewRuler || !n.options.overviewRuler.color) !== !(!t.overviewRuler || !t.overviewRuler.color) ? (this._decorationsTree.delete(n), n.setOptions(t), this._decorationsTree.insert(n)) : n.setOptions(t))
- }, o.prototype._deltaDecorationsImpl = function (e, t, n) {
- for (var i = this.getVersionId(), o = t.length, r = 0, s = n.length, a = 0, l = new Array(s); r < o || a < s;) {
- var u = null;
- if (r < o) {
- do {
- u = this._decorations[t[r++]]
- } while (!u && r < o);
- u && this._decorationsTree.delete(u)
- }
- if (a < s) {
- if (!u) {
- var d = ++this._lastDecorationId, c = this._instanceId + ";" + d;
- u = new f.IntervalNode(c, 0, 0), this._decorations[c] = u
- }
- var h = n[a], p = this._validateRangeRelaxedNoAllocations(h.range), g = V(h.options),
- m = this._buffer.getOffsetAt(p.startLineNumber, p.startColumn),
- v = this._buffer.getOffsetAt(p.endLineNumber, p.endColumn);
- u.ownerId = e, u.reset(i, m, v, p), u.setOptions(g), this._decorationsTree.insert(u), l[a] = u.id, a++
- } else u && delete this._decorations[u.id]
- }
- return l
- },
- o.prototype.setLineTokens = function (e, t) {
- if (e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- this._tokens.setTokens(this._languageIdentifier.id, e - 1, this._buffer.getLineLength(e), t)
- }, o.prototype.setTokens = function (e) {
- if (0 !== e.length) {
- for (var t = [], n = 0, i = e.length; n < i; n++) {
- var o = e[n];
- t.push({
- fromLineNumber: o.startLineNumber,
- toLineNumber: o.startLineNumber + o.tokens.length - 1
- });
- for (var r = 0, s = o.tokens.length; r < s; r++) this.setLineTokens(o.startLineNumber + r, o.tokens[r])
- }
- this._emitModelTokensChangedEvent({tokenizationSupportChanged: !1, ranges: t})
- }
- }, o.prototype.setSemanticTokens = function (e) {
- this._tokens2.set(e), this._emitModelTokensChangedEvent({
- tokenizationSupportChanged: !1,
- ranges: [{fromLineNumber: 1, toLineNumber: this.getLineCount()}]
- })
- }, o.prototype.tokenizeViewport = function (e, t) {
- e = Math.max(1, e), t = Math.min(this._buffer.getLineCount(), t), this._tokenization.tokenizeViewport(e, t)
- },o.prototype.clearTokens = function () {
- this._tokens.flush(), this._emitModelTokensChangedEvent({
- tokenizationSupportChanged: !0,
- ranges: [{fromLineNumber: 1, toLineNumber: this._buffer.getLineCount()}]
- })
- },o.prototype._emitModelTokensChangedEvent = function (e) {
- this._isDisposing || this._onDidChangeTokens.fire(e)
- },o.prototype.resetTokenization = function () {
- this._tokenization.reset()
- },o.prototype.forceTokenization = function (e) {
- if (e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- this._tokenization.forceTokenization(e)
- },o.prototype.isCheapToTokenize = function (e) {
- return this._tokenization.isCheapToTokenize(e)
- },o.prototype.tokenizeIfCheap = function (e) {
- this.isCheapToTokenize(e) && this.forceTokenization(e)
- },o.prototype.getLineTokens = function (e) {
- if (e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
- return this._getLineTokens(e)
- },o.prototype._getLineTokens = function (e) {
- var t = this.getLineContent(e), n = this._tokens.getTokens(this._languageIdentifier.id, e - 1, t);
- return this._tokens2.addSemanticTokens(e, n)
- },o.prototype.getLanguageIdentifier = function () {
- return this._languageIdentifier
- },o.prototype.getModeId = function () {
- return this._languageIdentifier.language
- },o.prototype.setMode = function (e) {
- if (this._languageIdentifier.id !== e.id) {
- var t = {oldLanguage: this._languageIdentifier.language, newLanguage: e.language};
- this._languageIdentifier = e, this._onDidChangeLanguage.fire(t), this._onDidChangeLanguageConfiguration.fire({})
- }
- },o.prototype.getLanguageIdAtPosition = function (e, t) {
- var n = this.validatePosition(new u.Position(e, t)), i = this.getLineTokens(n.lineNumber);
- return i.getLanguageId(i.findTokenIndexAtOffset(n.column - 1))
- },o.prototype.getWordAtPosition = function (e) {
- this._assertNotDisposed();
- var t = this.validatePosition(e), n = this.getLineContent(t.lineNumber),
- i = this._getLineTokens(t.lineNumber), r = i.findTokenIndexAtOffset(t.column - 1),
- s = o._findLanguageBoundaries(i, r), a = s[0], l = s[1],
- u = C.getWordAtText(t.column, b.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(r)), n.substring(a, l), a);
- if (u && u.startColumn <= e.column && e.column <= u.endColumn) return u;
- if (r > 0 && a === t.column - 1) {
- var d = o._findLanguageBoundaries(i, r - 1), c = d[0], h = d[1],
- p = C.getWordAtText(t.column, b.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(r - 1)), n.substring(c, h), c);
- if (p && p.startColumn <= e.column && e.column <= p.endColumn) return p
- }
- return null
- },o._findLanguageBoundaries = function (e, t) {
- for (var n = e.getLanguageId(t), i = 0, o = t; o >= 0 && e.getLanguageId(o) === n; o--) i = e.getStartOffset(o);
- for (var r = e.getLineContent().length, s = (o = t, e.getCount()); o < s && e.getLanguageId(o) === n; o++) r = e.getEndOffset(o);
- return [i, r]
- },o.prototype.getWordUntilPosition = function (e) {
- var t = this.getWordAtPosition(e);
- return t ? {
- word: t.word.substr(0, e.column - t.startColumn),
- startColumn: t.startColumn,
- endColumn: e.column
- } : {word: "", startColumn: e.column, endColumn: e.column}
- },o.prototype.findMatchingBracketUp = function (e, t) {
- var n = e.toLowerCase(), i = this.validatePosition(t), o = this._getLineTokens(i.lineNumber),
- r = o.getLanguageId(o.findTokenIndexAtOffset(i.column - 1)),
- s = b.LanguageConfigurationRegistry.getBracketsSupport(r);
- if (!s) return null;
- var a = s.textIsBracket[n]
- ;
- return a ? this._findMatchingBracketUp(a, i) : null
- },o.prototype.matchBracket = function (e) {
- return this._matchBracket(this.validatePosition(e))
- },o.prototype._matchBracket = function (e) {
- var t = e.lineNumber, n = this._getLineTokens(t), i = n.getCount(), o = this._buffer.getLineContent(t),
- r = n.findTokenIndexAtOffset(e.column - 1);
- if (r < 0) return null;
- var s = b.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(r));
- if (s && !w.ignoreBracketsInToken(n.getStandardTokenType(r))) {
- for (var a = Math.max(0, e.column - 1 - s.maxBracketLength), l = r - 1; l >= 0; l--) {
- var u = n.getEndOffset(l);
- if (u <= a) break;
- w.ignoreBracketsInToken(n.getStandardTokenType(l)) && (a = u)
- }
- for (var d = Math.min(o.length, e.column - 1 + s.maxBracketLength), c = null; ;) {
- if (!(m = E.BracketsUtils.findNextBracketInRange(s.forwardRegex, t, o, a, d))) break;
- if (m.startColumn <= e.column && e.column <= m.endColumn) {
- var h = o.substring(m.startColumn - 1, m.endColumn - 1).toLowerCase();
- (v = this._matchFoundBracket(m, s.textIsBracket[h], s.textIsOpenBracket[h])) && (c = v)
- }
- a = m.endColumn - 1
- }
- if (c) return c
- }
- if (r > 0 && n.getStartOffset(r) === e.column - 1) {
- var p = r - 1, g = b.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(p));
- if (g && !w.ignoreBracketsInToken(n.getStandardTokenType(p))) {
- for (a = Math.max(0, e.column - 1 - g.maxBracketLength), d = Math.min(o.length, e.column - 1 + g.maxBracketLength), l = p + 1; l < i; l++) {
- var f = n.getStartOffset(l);
- if (f >= d) break;
- w.ignoreBracketsInToken(n.getStandardTokenType(l)) && (d = f)
- }
- var m;
- if ((m = E.BracketsUtils.findPrevBracketInRange(g.reversedRegex, t, o, a, d)) && m.startColumn <= e.column && e.column <= m.endColumn) {
- var v;
- h = o.substring(m.startColumn - 1, m.endColumn - 1).toLowerCase();
- if (v = this._matchFoundBracket(m, g.textIsBracket[h], g.textIsOpenBracket[h])) return v
- }
- }
- }
- return null
- },o.prototype._matchFoundBracket = function (e, t, n) {
- if (!t) return null;
- var i;
- if (n) {
- if (i = this._findMatchingBracketDown(t, e.getEndPosition())) return [e, i]
- } else if (i = this._findMatchingBracketUp(t, e.getStartPosition())) return [e, i];
- return null
- },o.prototype._findMatchingBracketUp = function (e, t) {
- for (var n = e.languageIdentifier.id, i = e.reversedRegex, o = -1, r = function (t, n, r, s) {
- for (; ;) {
- var a = E.BracketsUtils.findPrevBracketInRange(i, t, n, r, s);
- if (!a) break;
- var l = n.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase();
- if (e.isOpen(l) ? o++ : e.isClose(l) && o--, 0 === o) return a;
- s = a.startColumn - 1
- }
- return null
- }, s = t.lineNumber; s >= 1; s--) {
- var a = this._getLineTokens(s), l = a.getCount(), u = this._buffer.getLineContent(s), d = l - 1,
- c = u.length, h = u.length;
- s === t.lineNumber && (d = a.findTokenIndexAtOffset(t.column - 1), c = t.column - 1, h = t.column - 1);
- for (var p = !0; d >= 0; d--) {
- var g, f = a.getLanguageId(d) === n && !w.ignoreBracketsInToken(a.getStandardTokenType(d));
- if (f) p ? c = a.getStartOffset(d) : (c = a.getStartOffset(d), h = a.getEndOffset(d)); else if (p && c !== h) if (g = r(s, u, c, h)) return g;
- p = f
- }
- if (p && c !== h) if (g = r(s, u, c, h)) return g
- }
- return null
- },o.prototype._findMatchingBracketDown = function (e, t) {
- for (var n = e.languageIdentifier.id, i = e.forwardRegex, o = 1, r = function (t, n, r, s) {
- for (; ;) {
- var a = E.BracketsUtils.findNextBracketInRange(i, t, n, r, s);
- if (!a) break
- ;
- var l = n.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase();
- if (e.isOpen(l) ? o++ : e.isClose(l) && o--, 0 === o) return a;
- r = a.endColumn - 1
- }
- return null
- }, s = this.getLineCount(), a = t.lineNumber; a <= s; a++) {
- var l = this._getLineTokens(a), u = l.getCount(), d = this._buffer.getLineContent(a), c = 0, h = 0,
- p = 0;
- a === t.lineNumber && (c = l.findTokenIndexAtOffset(t.column - 1), h = t.column - 1, p = t.column - 1);
- for (var g = !0; c < u; c++) {
- var f, m = l.getLanguageId(c) === n && !w.ignoreBracketsInToken(l.getStandardTokenType(c));
- if (m) g ? p = l.getEndOffset(c) : (h = l.getStartOffset(c), p = l.getEndOffset(c)); else if (g && h !== p) if (f = r(a, d, h, p)) return f;
- g = m
- }
- if (g && h !== p) if (f = r(a, d, h, p)) return f
- }
- return null
- },o.prototype.findPrevBracket = function (e) {
- for (var t = this.validatePosition(e), n = -1, i = null, o = t.lineNumber; o >= 1; o--) {
- var r = this._getLineTokens(o), s = r.getCount(), a = this._buffer.getLineContent(o), l = s - 1,
- u = a.length, d = a.length;
- if (o === t.lineNumber) l = r.findTokenIndexAtOffset(t.column - 1), u = t.column - 1, d = t.column - 1, n !== (h = r.getLanguageId(l)) && (n = h,
- i = b.LanguageConfigurationRegistry.getBracketsSupport(n));
- for (var c = !0; l >= 0; l--) {
- var h;
- if (n !== (h = r.getLanguageId(l))) {
- if (i && c && u !== d) {
- if (p = E.BracketsUtils.findPrevBracketInRange(i.reversedRegex, o, a, u, d)) return this._toFoundBracket(i, p);
- c = !1
- }
- n = h, i = b.LanguageConfigurationRegistry.getBracketsSupport(n)
- }
- var p, g = !!i && !w.ignoreBracketsInToken(r.getStandardTokenType(l));
- if (g) c ? u = r.getStartOffset(l) : (u = r.getStartOffset(l), d = r.getEndOffset(l)); else if (i && c && u !== d) if (p = E.BracketsUtils.findPrevBracketInRange(i.reversedRegex, o, a, u, d)) return this._toFoundBracket(i, p);
- c = g
- }
- if (i && c && u !== d) if (p = E.BracketsUtils.findPrevBracketInRange(i.reversedRegex, o, a, u, d)) return this._toFoundBracket(i, p)
- }
- return null
- },o.prototype.findNextBracket = function (e) {
- for (var t = this.validatePosition(e), n = this.getLineCount(), i = -1, o = null, r = t.lineNumber; r <= n; r++) {
- var s = this._getLineTokens(r), a = s.getCount(), l = this._buffer.getLineContent(r), u = 0, d = 0,
- c = 0;
- if (r === t.lineNumber) u = s.findTokenIndexAtOffset(t.column - 1), d = t.column - 1, c = t.column - 1,
- i !== (p = s.getLanguageId(u)) && (i = p, o = b.LanguageConfigurationRegistry.getBracketsSupport(i));
- for (var h = !0; u < a; u++) {
- var p;
- if (i !== (p = s.getLanguageId(u))) {
- if (o && h && d !== c) {
- if (g = E.BracketsUtils.findNextBracketInRange(o.forwardRegex, r, l, d, c)) return this._toFoundBracket(o, g);
- h = !1
- }
- i = p, o = b.LanguageConfigurationRegistry.getBracketsSupport(i)
- }
- var g, f = !!o && !w.ignoreBracketsInToken(s.getStandardTokenType(u));
- if (f) h ? c = s.getEndOffset(u) : (d = s.getStartOffset(u), c = s.getEndOffset(u)); else if (o && h && d !== c) if (g = E.BracketsUtils.findNextBracketInRange(o.forwardRegex, r, l, d, c)) return this._toFoundBracket(o, g);
- h = f
- }
- if (o && h && d !== c) if (g = E.BracketsUtils.findNextBracketInRange(o.forwardRegex, r, l, d, c)) return this._toFoundBracket(o, g)
- }
- return null
- },o.prototype.findEnclosingBrackets = function (e, t) {
- var n = this;
- void 0 === t && (t = 1073741824);
- for (var i = this.validatePosition(e), o = this.getLineCount(), r = new Map, s = [], a = function (e, t) {
- if (!r.has(e)) {
- for (var n = [], i = 0, o = t ? t.brackets.length : 0; i < o; i++) n[i] = 0;
- r.set(e, n)
- }
- s = r.get(e)
- }, l = function (e, t, i, o, r) {
- for (; ;) {
- var a = E.BracketsUtils.findNextBracketInRange(e.forwardRegex, t, i, o, r);
- if (!a) break;
- var l = i.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase(), u = e.textIsBracket[l];
- if (u && (u.isOpen(l) ? s[u.index]++ : u.isClose(l) && s[u.index]--, -1 === s[u.index])) return n._matchFoundBracket(a, u, !1);
- o = a.endColumn - 1
- }
- return null
- }, u = -1, d = null, c = Date.now(), h = i.lineNumber; h <= o; h++) {
- if (Date.now() - c > t) return null;
- var p = this._getLineTokens(h), g = p.getCount(), f = this._buffer.getLineContent(h), m = 0, v = 0,
- _ = 0;
- if (h === i.lineNumber) m = p.findTokenIndexAtOffset(i.column - 1), v = i.column - 1, _ = i.column - 1, u !== (C = p.getLanguageId(m)) && a(u = C, d = b.LanguageConfigurationRegistry.getBracketsSupport(u));
- for (var y = !0; m < g; m++) {
- var C;
- if (u !== (C = p.getLanguageId(m))) {
- if (d && y && v !== _) {
- if (S = l(d, h, f, v, _)) return S;
- y = !1
- }
- a(u = C, d = b.LanguageConfigurationRegistry.getBracketsSupport(u))
- }
- var S, L = !!d && !w.ignoreBracketsInToken(p.getStandardTokenType(m));
- if (L) y ? _ = p.getEndOffset(m) : (v = p.getStartOffset(m), _ = p.getEndOffset(m)); else if (d && y && v !== _) if (S = l(d, h, f, v, _)) return S;
- y = L
- }
- if (d && y && v !== _) if (S = l(d, h, f, v, _)) return S
- }
- return null
- },o.prototype._toFoundBracket = function (e, t) {
- if (!t) return null;
- var n = this.getValueInRange(t);
- n = n.toLowerCase();
- var i = e.textIsBracket[n];
- return i ? {range: t, open: i.open, close: i.close, isOpen: e.textIsOpenBracket[n]} : null
- },o.computeIndentLevel = function (e, t) {
- for (var n = 0, i = 0, o = e.length; i < o;) {
- var r = e.charCodeAt(i);
- if (32 === r) n++; else {
- if (9 !== r) break;
- n = n - n % t + t
- }
- i++
- }
- return i === o ? -1 : n
- },o.prototype._computeIndentLevel = function (e) {
- return o.computeIndentLevel(this._buffer.getLineContent(e + 1), this._options.tabSize)
- },o.prototype.getActiveIndentGuide = function (e, t, n) {
- var i = this;
- this._assertNotDisposed();
- var o = this.getLineCount();
- if (e < 1 || e > o) throw new Error("Illegal value for lineNumber");
- for (var r = b.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id), s = Boolean(r && r.offSide), a = -2, l = -1, u = -2, d = -1, c = function (e) {
- if (-1 !== a && (-2 === a || a > e - 1)) {
- a = -1, l = -1;
- for (var t = e - 2; t >= 0; t--) {
- var n = i._computeIndentLevel(t);
- if (n >= 0) {
- a = t, l = n;
- break
- }
- }
- }
- if (-2 === u) {
- u = -1, d = -1
- ;
- for (t = e; t < o; t++) {
- var r = i._computeIndentLevel(t);
- if (r >= 0) {
- u = t, d = r;
- break
- }
- }
- }
- }, h = -2, p = -1, g = -2, f = -1, m = function (e) {
- if (-2 === h) {
- h = -1, p = -1;
- for (var t = e - 2; t >= 0; t--) {
- var n = i._computeIndentLevel(t);
- if (n >= 0) {
- h = t, p = n;
- break
- }
- }
- }
- if (-1 !== g && (-2 === g || g < e - 1)) {
- g = -1, f = -1;
- for (t = e; t < o; t++) {
- var r = i._computeIndentLevel(t);
- if (r >= 0) {
- g = t, f = r;
- break
- }
- }
- }
- }, v = 0, _ = !0, y = 0, C = !0, S = 0, w = 0; _ || C; w++) {
- var E = e - w, L = e + w;
- if (0 !== w && (E < 1 || E < t) && (_ = !1), 0 !== w && (L > o || L > n) && (C = !1), w > 5e4 && (_ = !1, C = !1), _) {
- var D = void 0;
- if ((N = this._computeIndentLevel(E - 1)) >= 0 ? (u = E - 1, d = N, D = Math.ceil(N / this._options.indentSize)) : (c(E), D = this._getIndentLevelForWhitespaceLine(s, l, d)), 0 === w) {
- if (v = E, y = L, 0 === (S = D)) return {startLineNumber: v, endLineNumber: y, indent: S};
- continue
- }
- D >= S ? v = E : _ = !1
- }
- if (C) {
- var N, x = void 0;
- (N = this._computeIndentLevel(L - 1)) >= 0 ? (h = L - 1, p = N, x = Math.ceil(N / this._options.indentSize)) : (m(L), x = this._getIndentLevelForWhitespaceLine(s, p, f)), x >= S ? y = L : C = !1
- }
- }
- return {startLineNumber: v, endLineNumber: y, indent: S}
- },o.prototype.getLinesIndentGuides = function (e, t) {
- this._assertNotDisposed()
- ;var n = this.getLineCount();
- if (e < 1 || e > n) throw new Error("Illegal value for startLineNumber");
- if (t < 1 || t > n) throw new Error("Illegal value for endLineNumber");
- for (var i = b.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id), o = Boolean(i && i.offSide), r = new Array(t - e + 1), s = -2, a = -1, l = -2, u = -1, d = e; d <= t; d++) {
- var c = d - e, h = this._computeIndentLevel(d - 1);
- if (h >= 0) s = d - 1, a = h, r[c] = Math.ceil(h / this._options.indentSize); else {
- if (-2 === s) {
- s = -1, a = -1;
- for (var p = d - 2; p >= 0; p--) {
- if ((g = this._computeIndentLevel(p)) >= 0) {
- s = p, a = g;
- break
- }
- }
- }
- if (-1 !== l && (-2 === l || l < d - 1)) {
- l = -1, u = -1;
- for (p = d; p < n; p++) {
- var g;
- if ((g = this._computeIndentLevel(p)) >= 0) {
- l = p, u = g;
- break
- }
- }
- }
- r[c] = this._getIndentLevelForWhitespaceLine(o, a, u)
- }
- }
- return r
- },o.prototype._getIndentLevelForWhitespaceLine = function (e, t, n) {
- return -1 === t || -1 === n ? 0 : t < n ? 1 + Math.floor(t / this._options.indentSize) : t === n ? Math.ceil(n / this._options.indentSize) : e ? Math.ceil(n / this._options.indentSize) : 1 + Math.floor(n / this._options.indentSize)
- },o.MODEL_SYNC_LIMIT = 52428800,o.LARGE_FILE_SIZE_THRESHOLD = 20971520,
- o.LARGE_FILE_LINE_COUNT_THRESHOLD = 3e5,o.DEFAULT_CREATION_OPTIONS = {
- isForSimpleWidget: !1,
- tabSize: l.EDITOR_MODEL_DEFAULTS.tabSize,
- indentSize: l.EDITOR_MODEL_DEFAULTS.indentSize,
- insertSpaces: l.EDITOR_MODEL_DEFAULTS.insertSpaces,
- detectIndentation: !1,
- defaultEOL: 1,
- trimAutoWhitespace: l.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,
- largeFileOptimizations: l.EDITOR_MODEL_DEFAULTS.largeFileOptimizations
- },o
- }(o.Disposable);
- t.TextModel = T;
- var R = function () {
- function e() {
- this._decorationsTree0 = new f.IntervalTree, this._decorationsTree1 = new f.IntervalTree
- }
- return e.prototype.intervalSearch = function (e, t, n, i, o) {
- var r = this._decorationsTree0.intervalSearch(e, t, n, i, o),
- s = this._decorationsTree1.intervalSearch(e, t, n, i, o);
- return r.concat(s)
- }, e.prototype.search = function (e, t, n, i) {
- if (n) return this._decorationsTree1.search(e, t, i);
- var o = this._decorationsTree0.search(e, t, i), r = this._decorationsTree1.search(e, t, i);
- return o.concat(r)
- }, e.prototype.collectNodesFromOwner = function (e) {
- var t = this._decorationsTree0.collectNodesFromOwner(e),
- n = this._decorationsTree1.collectNodesFromOwner(e);
- return t.concat(n)
- }, e.prototype.collectNodesPostOrder = function () {
- var e = this._decorationsTree0.collectNodesPostOrder(),
- t = this._decorationsTree1.collectNodesPostOrder();
- return e.concat(t)
- }, e.prototype.insert = function (e) {
- f.getNodeIsInOverviewRuler(e) ? this._decorationsTree1.insert(e) : this._decorationsTree0.insert(e)
- }, e.prototype.delete = function (e) {
- f.getNodeIsInOverviewRuler(e) ? this._decorationsTree1.delete(e) : this._decorationsTree0.delete(e)
- }, e.prototype.resolveNode = function (e, t) {
- f.getNodeIsInOverviewRuler(e) ? this._decorationsTree1.resolveNode(e, t) : this._decorationsTree0.resolveNode(e, t)
- }, e.prototype.acceptReplace = function (e, t, n, i) {
- this._decorationsTree0.acceptReplace(e, t, n, i), this._decorationsTree1.acceptReplace(e, t, n, i)
- }, e
- }();
- function O(e) {
- return e.replace(/[^a-z0-9\-_]/gi, " ")
- }
- var P = function (e) {
- this.color = e.color || "", this.darkColor = e.darkColor || ""
- }, A = function (e) {
- function t(t) {
- var n = e.call(this, t) || this
- ;
- return n._resolvedColor = null, n.position = "number" == typeof t.position ? t.position : h.OverviewRulerLane.Center, n
- }
- return r(t, e), t.prototype.getColor = function (e) {
- return this._resolvedColor || ("light" !== e.type && this.darkColor ? this._resolvedColor = this._resolveColor(this.darkColor, e) : this._resolvedColor = this._resolveColor(this.color, e)), this._resolvedColor
- }, t.prototype.invalidateCachedColor = function () {
- this._resolvedColor = null
- }, t.prototype._resolveColor = function (e, t) {
- if ("string" == typeof e) return e;
- var n = e ? t.getColor(e.id) : null;
- return n ? n.toString() : ""
- }, t
- }(P);
- t.ModelDecorationOverviewRulerOptions = A;
- var F = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n.position = t.position, n
- }
- return r(t, e), t.prototype.getColor = function (e) {
- return this._resolvedColor || ("light" !== e.type && this.darkColor ? this._resolvedColor = this._resolveColor(this.darkColor, e) : this._resolvedColor = this._resolveColor(this.color, e)), this._resolvedColor
- }, t.prototype.invalidateCachedColor = function () {
- this._resolvedColor = void 0
- },
- t.prototype._resolveColor = function (e, t) {
- return "string" == typeof e ? N.Color.fromHex(e) : t.getColor(e.id)
- }, t
- }(P);
- t.ModelDecorationMinimapOptions = F;
- var W = function () {
- function e(e) {
- this.stickiness = e.stickiness || 0, this.zIndex = e.zIndex || 0, this.className = e.className ? O(e.className) : null, this.hoverMessage = L.withUndefinedAsNull(e.hoverMessage), this.glyphMarginHoverMessage = L.withUndefinedAsNull(e.glyphMarginHoverMessage), this.isWholeLine = e.isWholeLine || !1, this.showIfCollapsed = e.showIfCollapsed || !1, this.collapseOnReplaceEdit = e.collapseOnReplaceEdit || !1, this.overviewRuler = e.overviewRuler ? new A(e.overviewRuler) : null, this.minimap = e.minimap ? new F(e.minimap) : null, this.glyphMarginClassName = e.glyphMarginClassName ? O(e.glyphMarginClassName) : null, this.linesDecorationsClassName = e.linesDecorationsClassName ? O(e.linesDecorationsClassName) : null, this.marginClassName = e.marginClassName ? O(e.marginClassName) : null, this.inlineClassName = e.inlineClassName ? O(e.inlineClassName) : null,
- this.inlineClassNameAffectsLetterSpacing = e.inlineClassNameAffectsLetterSpacing || !1, this.beforeContentClassName = e.beforeContentClassName ? O(e.beforeContentClassName) : null, this.afterContentClassName = e.afterContentClassName ? O(e.afterContentClassName) : null
- }
- return e.register = function (t) {
- return new e(t)
- }, e.createDynamic = function (t) {
- return new e(t)
- }, e
- }();
- t.ModelDecorationOptions = W, W.EMPTY = W.register({});
- var B = [W.register({stickiness: 0}), W.register({stickiness: 1}), W.register({stickiness: 2}), W.register({stickiness: 3})];
- function V(e) {
- return e instanceof W ? e : W.createDynamic(e)
- }
- var z = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._actual = t._register(new i.Emitter), t.event = t._actual.event, t._deferredCnt = 0, t._shouldFire = !1, t
- }
- return r(t, e), t.prototype.beginDeferredEmit = function () {
- this._deferredCnt++
- }, t.prototype.endDeferredEmit = function () {
- this._deferredCnt--, 0 === this._deferredCnt && this._shouldFire && (this._shouldFire = !1, this._actual.fire({}))
- }, t.prototype.fire = function () {
- this._shouldFire = !0
- }, t
- }(o.Disposable)
- ;t.DidChangeDecorationsEmitter = z;
- var H = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._fastEmitter = t._register(new i.Emitter), t.fastEvent = t._fastEmitter.event, t._slowEmitter = t._register(new i.Emitter), t.slowEvent = t._slowEmitter.event, t._deferredCnt = 0, t._deferredEvent = null, t
- }
- return r(t, e), t.prototype.beginDeferredEmit = function () {
- this._deferredCnt++
- }, t.prototype.endDeferredEmit = function () {
- if (this._deferredCnt--, 0 === this._deferredCnt && null !== this._deferredEvent) {
- var e = this._deferredEvent;
- this._deferredEvent = null, this._fastEmitter.fire(e), this._slowEmitter.fire(e)
- }
- }, t.prototype.fire = function (e) {
- this._deferredCnt > 0 ? this._deferredEvent ? this._deferredEvent = this._deferredEvent.merge(e) : this._deferredEvent = e : (this._fastEmitter.fire(e), this._slowEmitter.fire(e))
- }, t
- }(o.Disposable);
- t.DidChangeContentEmitter = H
- })), define(n[40], i([0, 1, 10, 5, 13, 3, 22, 30, 41]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- return !0
- }, d = function () {
- return !1
- }, c = function (e) {
- return " " === e || "\t" === e
- };
- function h(e, t, n) {
- e.has(t) ? e.get(t).push(n) : e.set(t, [n])
- }
- var p = function () {
- function e(t, n, i) {
- this._languageIdentifier = t;
- var o = i.options, r = o.get(107);
- this.readOnly = o.get(68), this.tabSize = n.tabSize, this.indentSize = n.indentSize, this.insertSpaces = n.insertSpaces, this.lineHeight = o.get(49), this.pageSize = Math.max(1, Math.floor(r.height / this.lineHeight) - 2), this.useTabStops = o.get(95), this.wordSeparators = o.get(96), this.emptySelectionClipboard = o.get(25), this.copyWithSyntaxHighlighting = o.get(15), this.multiCursorMergeOverlapping = o.get(58), this.multiCursorPaste = o.get(60), this.autoClosingBrackets = o.get(5), this.autoClosingQuotes = o.get(7), this.autoClosingOvertype = o.get(6), this.autoSurround = o.get(10), this.autoIndent = o.get(8), this.autoClosingPairsOpen2 = new Map, this.autoClosingPairsClose2 = new Map, this.surroundingPairs = {}, this._electricChars = null, this.shouldAutoCloseBefore = {
- quote: e._getShouldAutoClose(t, this.autoClosingQuotes),
- bracket: e._getShouldAutoClose(t, this.autoClosingBrackets)
- }
- ;var s = e._getAutoClosingPairs(t);
- if (s) for (var a = 0, l = s; a < l.length; a++) {
- var u = l[a];
- h(this.autoClosingPairsOpen2, u.open.charAt(u.open.length - 1), u), 1 === u.close.length && h(this.autoClosingPairsClose2, u.close, u)
- }
- var d = e._getSurroundingPairs(t);
- if (d) for (var c = 0, p = d; c < p.length; c++) {
- u = p[c];
- this.surroundingPairs[u.open] = u.close
- }
- }
- return e.shouldRecreate = function (e) {
- return e.hasChanged(107) || e.hasChanged(96) || e.hasChanged(25) || e.hasChanged(58) || e.hasChanged(60) || e.hasChanged(5) || e.hasChanged(7) || e.hasChanged(6) || e.hasChanged(10) || e.hasChanged(95) || e.hasChanged(49) || e.hasChanged(68)
- }, Object.defineProperty(e.prototype, "electricChars", {
- get: function () {
- if (!this._electricChars) {
- this._electricChars = {};
- var t = e._getElectricCharacters(this._languageIdentifier);
- if (t) for (var n = 0, i = t; n < i.length; n++) {
- var o = i[n];
- this._electricChars[o] = !0
- }
- }
- return this._electricChars
- }, enumerable: !0, configurable: !0
- }), e.prototype.normalizeIndentation = function (e) {
- return a.TextModel.normalizeIndentation(e, this.indentSize, this.insertSpaces)
- },
- e._getElectricCharacters = function (e) {
- try {
- return l.LanguageConfigurationRegistry.getElectricCharacters(e.id)
- } catch (e) {
- return n.onUnexpectedError(e), null
- }
- }, e._getAutoClosingPairs = function (e) {
- try {
- return l.LanguageConfigurationRegistry.getAutoClosingPairs(e.id)
- } catch (e) {
- return n.onUnexpectedError(e), null
- }
- }, e._getShouldAutoClose = function (t, n) {
- switch (n) {
- case"beforeWhitespace":
- return c;
- case"languageDefined":
- return e._getLanguageDefinedShouldAutoClose(t);
- case"always":
- return u;
- case"never":
- return d
- }
- }, e._getLanguageDefinedShouldAutoClose = function (e) {
- try {
- var t = l.LanguageConfigurationRegistry.getAutoCloseBeforeSet(e.id);
- return function (e) {
- return -1 !== t.indexOf(e)
- }
- } catch (e) {
- return n.onUnexpectedError(e), d
- }
- }, e._getSurroundingPairs = function (e) {
- try {
- return l.LanguageConfigurationRegistry.getSurroundingPairs(e.id)
- } catch (e) {
- return n.onUnexpectedError(e), null
- }
- }, e
- }();
- t.CursorConfiguration = p;
- var g = function () {
- function e(t, n, i, o) {
- this.selectionStart = t, this.selectionStartLeftoverVisibleColumns = n, this.position = i,
- this.leftoverVisibleColumns = o, this.selection = e._computeSelection(this.selectionStart, this.position)
- }
- return e.prototype.equals = function (e) {
- return this.selectionStartLeftoverVisibleColumns === e.selectionStartLeftoverVisibleColumns && this.leftoverVisibleColumns === e.leftoverVisibleColumns && this.position.equals(e.position) && this.selectionStart.equalsRange(e.selectionStart)
- }, e.prototype.hasSelection = function () {
- return !this.selection.isEmpty() || !this.selectionStart.isEmpty()
- }, e.prototype.move = function (t, n, i, s) {
- return t ? new e(this.selectionStart, this.selectionStartLeftoverVisibleColumns, new o.Position(n, i), s) : new e(new r.Range(n, i, n, i), s, new o.Position(n, i), s)
- }, e._computeSelection = function (e, t) {
- var n, i, o, r;
- return e.isEmpty() ? (n = e.startLineNumber, i = e.startColumn, o = t.lineNumber, r = t.column) : t.isBeforeOrEqual(e.getStartPosition()) ? (n = e.endLineNumber, i = e.endColumn, o = t.lineNumber, r = t.column) : (n = e.startLineNumber, i = e.startColumn, o = t.lineNumber, r = t.column), new s.Selection(n, i, o, r)
- }, e
- }();
- t.SingleCursorState = g;
- var f = function () {
- function e(e, t, n) {
- this.model = t, this.viewModel = n, this.config = new p(this.model.getLanguageIdentifier(), this.model.getOptions(), e)
- }
- return e.prototype.validateViewPosition = function (e, t) {
- return this.viewModel.coordinatesConverter.validateViewPosition(e, t)
- }, e.prototype.validateViewRange = function (e, t) {
- return this.viewModel.coordinatesConverter.validateViewRange(e, t)
- }, e.prototype.convertViewRangeToModelRange = function (e) {
- return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)
- }, e.prototype.convertViewPositionToModelPosition = function (e, t) {
- return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e, t))
- }, e.prototype.convertModelPositionToViewPosition = function (e) {
- return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e)
- }, e.prototype.convertModelRangeToViewRange = function (e) {
- return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(e)
- }, e.prototype.getCurrentScrollTop = function () {
- return this.viewModel.viewLayout.getCurrentScrollTop()
- },
- e.prototype.getCompletelyVisibleViewRange = function () {
- return this.viewModel.getCompletelyVisibleViewRange()
- }, e.prototype.getCompletelyVisibleModelRange = function () {
- var e = this.viewModel.getCompletelyVisibleViewRange();
- return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)
- }, e.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (e) {
- return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(e)
- }, e.prototype.getVerticalOffsetForViewLine = function (e) {
- return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(e)
- }, e
- }();
- t.CursorContext = f;
- var m = function (e) {
- this.modelState = e, this.viewState = null
- };
- t.PartialModelCursorState = m;
- var v = function (e) {
- this.modelState = null, this.viewState = e
- };
- t.PartialViewCursorState = v;
- var _ = function () {
- function e(e, t) {
- this.modelState = e, this.viewState = t
- }
- return e.fromModelState = function (e) {
- return new m(e)
- }, e.fromViewState = function (e) {
- return new v(e)
- }, e.fromModelSelection = function (t) {
- var n = t.selectionStartLineNumber, i = t.selectionStartColumn, s = t.positionLineNumber,
- a = t.positionColumn, l = new g(new r.Range(n, i, n, i), 0, new o.Position(s, a), 0);
- return e.fromModelState(l)
- }, e.fromModelSelections = function (e) {
- for (var t = [], n = 0, i = e.length; n < i; n++) t[n] = this.fromModelSelection(e[n]);
- return t
- }, e.prototype.equals = function (e) {
- return this.viewState.equals(e.viewState) && this.modelState.equals(e.modelState)
- }, e
- }();
- t.CursorState = _;
- var y = function (e, t, n) {
- this.type = e, this.commands = t, this.shouldPushStackElementBefore = n.shouldPushStackElementBefore, this.shouldPushStackElementAfter = n.shouldPushStackElementAfter
- };
- t.EditOperationResult = y;
- var C = function () {
- function e() {
- }
- return e.visibleColumnFromColumn = function (t, n, o) {
- for (var r = t.length, s = n - 1 < r ? n - 1 : r, a = 0, l = 0; l < s;) {
- var u = i.getNextCodePoint(t, s, l);
- if (l += u >= 65536 ? 2 : 1, 9 === u) a = e.nextRenderTabStop(a, o); else {
- for (var d = i.getGraphemeBreakType(u); l < s;) {
- var c = i.getNextCodePoint(t, s, l), h = i.getGraphemeBreakType(c);
- if (i.breakBetweenGraphemeBreakType(d, h)) break;
- l += c >= 65536 ? 2 : 1, d = h
- }
- i.isFullWidthCharacter(u) || i.isEmojiImprecise(u) ? a += 2 : a += 1
- }
- }
- return a
- }, e.visibleColumnFromColumn2 = function (e, t, n) {
- return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber), n.column, e.tabSize)
- }, e.columnFromVisibleColumn = function (t, n, o) {
- if (n <= 0) return 1;
- for (var r = t.length, s = 0, a = 1, l = 0; l < r;) {
- var u = i.getNextCodePoint(t, r, l);
- l += u >= 65536 ? 2 : 1;
- var d = void 0;
- if (9 === u) d = e.nextRenderTabStop(s, o); else {
- for (var c = i.getGraphemeBreakType(u); l < r;) {
- var h = i.getNextCodePoint(t, r, l), p = i.getGraphemeBreakType(h);
- if (i.breakBetweenGraphemeBreakType(c, p)) break;
- l += h >= 65536 ? 2 : 1, c = p
- }
- d = i.isFullWidthCharacter(u) || i.isEmojiImprecise(u) ? s + 2 : s + 1
- }
- var g = l + 1;
- if (d >= n) return d - n < n - s ? g : a;
- s = d, a = g
- }
- return r + 1
- }, e.columnFromVisibleColumn2 = function (e, t, n, i) {
- var o = this.columnFromVisibleColumn(t.getLineContent(n), i, e.tabSize), r = t.getLineMinColumn(n);
- if (o < r) return r;
- var s = t.getLineMaxColumn(n);
- return o > s ? s : o
- }, e.nextRenderTabStop = function (e, t) {
- return e + t - e % t
- }, e.nextIndentTabStop = function (e, t) {
- return e + t - e % t
- }, e.prevRenderTabStop = function (e, t) {
- return e - 1 - (e - 1) % t
- }, e.prevIndentTabStop = function (e, t) {
- return e - 1 - (e - 1) % t
- }, e
- }();
- t.CursorColumns = C, t.isQuote = function (e) {
- return "'" === e || '"' === e || "`" === e
- }
- })), define(n[211], i([0, 1, 5, 40, 3, 22, 41]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = Object.create(null);
- function l(e, t) {
- a[e] || (a[e] = ["", e]);
- for (var n = a[e], i = n.length; i <= t; i++) n[i] = n[i - 1] + e;
- return n[t]
- }
- t.cachedStringRepeat = l;
- var u = function () {
- function e(e, t) {
- this._opts = t, this._selection = e, this._selectionId = null, this._useLastEditRangeForCursorEndPosition = !1, this._selectionStartColumnStaysPut = !1
- }
- return e.unshiftIndent = function (e, t, n, o, r) {
- var s = i.CursorColumns.visibleColumnFromColumn(e, t, n);
- if (r) {
- var a = l(" ", o);
- return l(a, i.CursorColumns.prevIndentTabStop(s, o) / o)
- }
- return l(a = "\t", i.CursorColumns.prevRenderTabStop(s, n) / n)
- }, e.shiftIndent = function (e, t, n, o, r) {
- var s = i.CursorColumns.visibleColumnFromColumn(e, t, n);
- if (r) {
- var a = l(" ", o);
- return l(a, i.CursorColumns.nextIndentTabStop(s, o) / o)
- }
- return l(a = "\t", i.CursorColumns.nextRenderTabStop(s, n) / n)
- }, e.prototype._addEditOperation = function (e, t, n) {
- this._useLastEditRangeForCursorEndPosition ? e.addTrackedEditOperation(t, n) : e.addEditOperation(t, n)
- }, e.prototype.getEditOperations = function (t, r) {
- var a = this._selection.startLineNumber, u = this._selection.endLineNumber;
- 1 === this._selection.endColumn && a !== u && (u -= 1);
- var d = this._opts, c = d.tabSize, h = d.indentSize, p = d.insertSpaces, g = a === u;
- if (this._selection.isEmpty() && /^\s*$/.test(t.getLineContent(a)) && (this._useLastEditRangeForCursorEndPosition = !0), this._opts.useTabStops) for (var f = 0, m = 0, v = a; v <= u; v++, f = m) {
- m = 0;
- var _ = t.getLineContent(v), y = n.firstNonWhitespaceIndex(_);
- if ((!this._opts.isUnshift || 0 !== _.length && 0 !== y) && (g || this._opts.isUnshift || 0 !== _.length)) {
- if (-1 === y && (y = _.length), v > 1) if (i.CursorColumns.visibleColumnFromColumn(_, y + 1, c) % h != 0 && t.isCheapToTokenize(v - 1)) {
- var C = s.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent, t, new o.Range(v - 1, t.getLineMaxColumn(v - 1), v - 1, t.getLineMaxColumn(v - 1)));
- if (C) {
- if (m = f, C.appendText) for (var b = 0, S = C.appendText.length; b < S && m < h && 32 === C.appendText.charCodeAt(b); b++) m++;
- C.removeText && (m = Math.max(0, m - C.removeText));
- for (b = 0; b < m && (0 !== y && 32 === _.charCodeAt(y - 1)); b++) y--
- }
- }
- if (!this._opts.isUnshift || 0 !== y) {
- var w = void 0;
- w = this._opts.isUnshift ? e.unshiftIndent(_, y + 1, c, h, p) : e.shiftIndent(_, y + 1, c, h, p), this._addEditOperation(r, new o.Range(v, 1, v, y + 1), w), v !== a || this._selection.isEmpty() || (this._selectionStartColumnStaysPut = this._selection.startColumn <= y + 1)
- }
- }
- } else {
- var E = p ? l(" ", h) : "\t";
- for (v = a; v <= u; v++) {
- _ = t.getLineContent(v), y = n.firstNonWhitespaceIndex(_);
- if ((!this._opts.isUnshift || 0 !== _.length && 0 !== y) && ((g || this._opts.isUnshift || 0 !== _.length) && (-1 === y && (y = _.length), !this._opts.isUnshift || 0 !== y))) if (this._opts.isUnshift) {
- y = Math.min(y, h);
- for (var L = 0; L < y; L++) {
- if (9 === _.charCodeAt(L)) {
- y = L + 1;
- break
- }
- }
- this._addEditOperation(r, new o.Range(v, 1, v, y + 1), "")
- } else this._addEditOperation(r, new o.Range(v, 1, v, 1), E),
- v !== a || this._selection.isEmpty() || (this._selectionStartColumnStaysPut = 1 === this._selection.startColumn)
- }
- }
- this._selectionId = r.trackSelection(this._selection)
- }, e.prototype.computeCursorState = function (e, t) {
- if (this._useLastEditRangeForCursorEndPosition) {
- var n = t.getInverseEditOperations()[0];
- return new r.Selection(n.range.endLineNumber, n.range.endColumn, n.range.endLineNumber, n.range.endColumn)
- }
- var i = t.getTrackedSelection(this._selectionId);
- if (this._selectionStartColumnStaysPut) {
- var o = this._selection.startColumn;
- return i.startColumn <= o ? i : 0 === i.getDirection() ? new r.Selection(i.startLineNumber, o, i.endLineNumber, i.endColumn) : new r.Selection(i.endLineNumber, i.endColumn, i.startLineNumber, o)
- }
- return i
- }, e
- }();
- t.ShiftCommand = u
- })), define(n[483], i([0, 1, 40, 13, 3]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e() {
- }
- return e.columnSelect = function (e, t, r, s, a, l) {
- for (var u = Math.abs(a - r) + 1, d = r > a, c = s > l, h = s < l, p = [], g = 0; g < u; g++) {
- var f = r + (d ? -g : g), m = n.CursorColumns.columnFromVisibleColumn2(e, t, f, s),
- v = n.CursorColumns.columnFromVisibleColumn2(e, t, f, l),
- _ = n.CursorColumns.visibleColumnFromColumn2(e, t, new i.Position(f, m)),
- y = n.CursorColumns.visibleColumnFromColumn2(e, t, new i.Position(f, v));
- if (h) {
- if (_ > l) continue;
- if (y < s) continue
- }
- if (c) {
- if (y > s) continue;
- if (_ < l) continue
- }
- p.push(new n.SingleCursorState(new o.Range(f, m, f, m), 0, new i.Position(f, v), 0))
- }
- if (0 === p.length) for (g = 0; g < u; g++) {
- f = r + (d ? -g : g);
- var C = t.getLineMaxColumn(f);
- p.push(new n.SingleCursorState(new o.Range(f, C, f, C), 0, new i.Position(f, C), 0))
- }
- return {
- viewStates: p,
- reversed: d,
- fromLineNumber: r,
- fromVisualColumn: s,
- toLineNumber: a,
- toVisualColumn: l
- }
- }, e.columnSelectLeft = function (t, n, i) {
- var o = i.toViewVisualColumn;
- return o > 1 && o--, e.columnSelect(t, n, i.fromViewLineNumber, i.fromViewVisualColumn, i.toViewLineNumber, o)
- }, e.columnSelectRight = function (e, t, o) {
- for (var r = 0, s = Math.min(o.fromViewLineNumber, o.toViewLineNumber), a = Math.max(o.fromViewLineNumber, o.toViewLineNumber), l = s; l <= a; l++) {
- var u = t.getLineMaxColumn(l),
- d = n.CursorColumns.visibleColumnFromColumn2(e, t, new i.Position(l, u));
- r = Math.max(r, d)
- }
- var c = o.toViewVisualColumn;
- return c < r && c++, this.columnSelect(e, t, o.fromViewLineNumber, o.fromViewVisualColumn, o.toViewLineNumber, c)
- }, e.columnSelectUp = function (e, t, n, i) {
- var o = i ? e.pageSize : 1, r = Math.max(1, n.toViewLineNumber - o);
- return this.columnSelect(e, t, n.fromViewLineNumber, n.fromViewVisualColumn, r, n.toViewVisualColumn)
- }, e.columnSelectDown = function (e, t, n, i) {
- var o = i ? e.pageSize : 1, r = Math.min(t.getLineCount(), n.toViewLineNumber + o);
- return this.columnSelect(e, t, n.fromViewLineNumber, n.fromViewVisualColumn, r, n.toViewVisualColumn)
- }, e
- }();
- t.ColumnSelection = r
- })), define(n[158], i([0, 1, 40, 13, 3, 5]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e, t, n) {
- this.lineNumber = e, this.column = t, this.leftoverVisibleColumns = n
- };
- t.CursorPosition = s;
- var a = function () {
- function e() {
- }
- return e.leftPosition = function (e, t, n) {
- return n > e.getLineMinColumn(t) ? n -= r.prevCharLength(e.getLineContent(t), n - 1) : t > 1 && (t -= 1, n = e.getLineMaxColumn(t)), new i.Position(t, n)
- }, e.left = function (t, n, i, o) {
- var r = e.leftPosition(n, i, o);
- return new s(r.lineNumber, r.column, 0)
- }, e.moveLeft = function (t, n, i, o, r) {
- var s, a;
- if (i.hasSelection() && !o) s = i.selection.startLineNumber, a = i.selection.startColumn; else {
- var l = e.left(t, n, i.position.lineNumber, i.position.column - (r - 1));
- s = l.lineNumber, a = l.column
- }
- return i.move(o, s, a, 0)
- }, e.rightPosition = function (e, t, n) {
- return n < e.getLineMaxColumn(t) ? n += r.nextCharLength(e.getLineContent(t), n - 1) : t < e.getLineCount() && (t += 1, n = e.getLineMinColumn(t)), new i.Position(t, n)
- }, e.right = function (t, n, i, o) {
- var r = e.rightPosition(n, i, o);
- return new s(r.lineNumber, r.column, 0)
- }, e.moveRight = function (t, n, i, o, r) {
- var s, a;
- if (i.hasSelection() && !o) s = i.selection.endLineNumber, a = i.selection.endColumn; else {
- var l = e.right(t, n, i.position.lineNumber, i.position.column + (r - 1));
- s = l.lineNumber, a = l.column
- }
- return i.move(o, s, a, 0)
- }, e.down = function (e, t, i, o, r, a, l) {
- var u = n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize) + r;
- i += a;
- var d = t.getLineCount();
- return i > d ? (i = d, o = l ? t.getLineMaxColumn(i) : Math.min(t.getLineMaxColumn(i), o)) : o = n.CursorColumns.columnFromVisibleColumn2(e, t, i, u), r = u - n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize), new s(i, o, r)
- }, e.moveDown = function (t, n, i, o, r) {
- var s, a;
- i.hasSelection() && !o ? (s = i.selection.endLineNumber, a = i.selection.endColumn) : (s = i.position.lineNumber, a = i.position.column);
- var l = e.down(t, n, s, a, i.leftoverVisibleColumns, r, !0);
- return i.move(o, l.lineNumber, l.column, l.leftoverVisibleColumns)
- }, e.translateDown = function (t, r, s) {
- var a = s.selection,
- l = e.down(t, r, a.selectionStartLineNumber, a.selectionStartColumn, s.selectionStartLeftoverVisibleColumns, 1, !1),
- u = e.down(t, r, a.positionLineNumber, a.positionColumn, s.leftoverVisibleColumns, 1, !1);
- return new n.SingleCursorState(new o.Range(l.lineNumber, l.column, l.lineNumber, l.column), l.leftoverVisibleColumns, new i.Position(u.lineNumber, u.column), u.leftoverVisibleColumns)
- },
- e.up = function (e, t, i, o, r, a, l) {
- var u = n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize) + r;
- return (i -= a) < 1 ? (i = 1, o = l ? t.getLineMinColumn(i) : Math.min(t.getLineMaxColumn(i), o)) : o = n.CursorColumns.columnFromVisibleColumn2(e, t, i, u), r = u - n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize), new s(i, o, r)
- }, e.moveUp = function (t, n, i, o, r) {
- var s, a;
- i.hasSelection() && !o ? (s = i.selection.startLineNumber, a = i.selection.startColumn) : (s = i.position.lineNumber, a = i.position.column);
- var l = e.up(t, n, s, a, i.leftoverVisibleColumns, r, !0);
- return i.move(o, l.lineNumber, l.column, l.leftoverVisibleColumns)
- }, e.translateUp = function (t, r, s) {
- var a = s.selection,
- l = e.up(t, r, a.selectionStartLineNumber, a.selectionStartColumn, s.selectionStartLeftoverVisibleColumns, 1, !1),
- u = e.up(t, r, a.positionLineNumber, a.positionColumn, s.leftoverVisibleColumns, 1, !1);
- return new n.SingleCursorState(new o.Range(l.lineNumber, l.column, l.lineNumber, l.column), l.leftoverVisibleColumns, new i.Position(u.lineNumber, u.column), u.leftoverVisibleColumns)
- },
- e.moveToBeginningOfLine = function (e, t, n, i) {
- var o, r = n.position.lineNumber, s = t.getLineMinColumn(r),
- a = t.getLineFirstNonWhitespaceColumn(r) || s;
- return o = n.position.column === a ? s : a, n.move(i, r, o, 0)
- }, e.moveToEndOfLine = function (e, t, n, i) {
- var o = n.position.lineNumber, r = t.getLineMaxColumn(o);
- return n.move(i, o, r, 0)
- }, e.moveToBeginningOfBuffer = function (e, t, n, i) {
- return n.move(i, 1, 1, 0)
- }, e.moveToEndOfBuffer = function (e, t, n, i) {
- var o = t.getLineCount(), r = t.getLineMaxColumn(o);
- return n.move(i, o, r, 0)
- }, e
- }();
- t.MoveOperations = a
- })), define(n[212], i([0, 1, 5, 80, 40, 158, 3]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e() {
- }
- return e.deleteRight = function (e, t, n, o) {
- for (var a = [], l = 3 !== e, u = 0, d = o.length; u < d; u++) {
- var c = o[u], h = c;
- if (h.isEmpty()) {
- var p = c.getPosition(), g = r.MoveOperations.right(t, n, p.lineNumber, p.column);
- h = new s.Range(g.lineNumber, g.column, p.lineNumber, p.column)
- }
- h.isEmpty() ? a[u] = null : (h.startLineNumber !== h.endLineNumber && (l = !0), a[u] = new i.ReplaceCommand(h, ""))
- }
- return [l, a]
- },
- e._isAutoClosingPairDelete = function (e, t, n) {
- if ("never" === e.autoClosingBrackets && "never" === e.autoClosingQuotes) return !1;
- for (var i = 0, r = n.length; i < r; i++) {
- var s = n[i], a = s.getPosition();
- if (!s.isEmpty()) return !1;
- var l = t.getLineContent(a.lineNumber), u = l[a.column - 2], d = e.autoClosingPairsOpen2.get(u);
- if (!d) return !1;
- if (o.isQuote(u)) {
- if ("never" === e.autoClosingQuotes) return !1
- } else if ("never" === e.autoClosingBrackets) return !1;
- for (var c = l[a.column - 1], h = !1, p = 0, g = d; p < g.length; p++) {
- var f = g[p];
- f.open === u && f.close === c && (h = !0)
- }
- if (!h) return !1
- }
- return !0
- }, e._runAutoClosingPairDelete = function (e, t, n) {
- for (var o = [], r = 0, a = n.length; r < a; r++) {
- var l = n[r].getPosition(), u = new s.Range(l.lineNumber, l.column - 1, l.lineNumber, l.column + 1);
- o[r] = new i.ReplaceCommand(u, "")
- }
- return [!0, o]
- }, e.deleteLeft = function (e, t, a, l) {
- if (this._isAutoClosingPairDelete(t, a, l)) return this._runAutoClosingPairDelete(t, a, l);
- for (var u = [], d = 2 !== e, c = 0, h = l.length; c < h; c++) {
- var p = l[c], g = p;
- if (g.isEmpty()) {
- var f = p.getPosition();
- if (t.useTabStops && f.column > 1) {
- var m = a.getLineContent(f.lineNumber), v = n.firstNonWhitespaceIndex(m),
- _ = -1 === v ? m.length + 1 : v + 1;
- if (f.column <= _) {
- var y = o.CursorColumns.visibleColumnFromColumn2(t, a, f),
- C = o.CursorColumns.prevIndentTabStop(y, t.indentSize),
- b = o.CursorColumns.columnFromVisibleColumn2(t, a, f.lineNumber, C);
- g = new s.Range(f.lineNumber, b, f.lineNumber, f.column)
- } else g = new s.Range(f.lineNumber, f.column - 1, f.lineNumber, f.column)
- } else {
- var S = r.MoveOperations.left(t, a, f.lineNumber, f.column);
- g = new s.Range(S.lineNumber, S.column, f.lineNumber, f.column)
- }
- }
- g.isEmpty() ? u[c] = null : (g.startLineNumber !== g.endLineNumber && (d = !0), u[c] = new i.ReplaceCommand(g, ""))
- }
- return [d, u]
- }, e.cut = function (e, t, n) {
- for (var r = [], a = 0, l = n.length; a < l; a++) {
- var u = n[a];
- if (u.isEmpty()) if (e.emptySelectionClipboard) {
- var d = u.getPosition(), c = void 0, h = void 0, p = void 0, g = void 0;
- d.lineNumber < t.getLineCount() ? (c = d.lineNumber, h = 1, p = d.lineNumber + 1, g = 1) : d.lineNumber > 1 ? (c = d.lineNumber - 1, h = t.getLineMaxColumn(d.lineNumber - 1), p = d.lineNumber, g = t.getLineMaxColumn(d.lineNumber)) : (c = d.lineNumber, h = 1,
- p = d.lineNumber, g = t.getLineMaxColumn(d.lineNumber));
- var f = new s.Range(c, h, p, g);
- f.isEmpty() ? r[a] = null : r[a] = new i.ReplaceCommand(f, "")
- } else r[a] = null; else r[a] = new i.ReplaceCommand(u, "")
- }
- return new o.EditOperationResult(0, r, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !0
- })
- }, e
- }();
- t.DeleteOperations = a
- })),define(n[159], i([0, 1, 10, 5, 80, 211, 340, 40, 89, 3, 22, 90, 41]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var g = function () {
- function e() {
- }
- return e.indent = function (e, t, n) {
- if (null === t || null === n) return [];
- for (var i = [], o = 0, r = n.length; o < r; o++) i[o] = new s.ShiftCommand(n[o], {
- isUnshift: !1,
- tabSize: e.tabSize,
- indentSize: e.indentSize,
- insertSpaces: e.insertSpaces,
- useTabStops: e.useTabStops,
- autoIndent: e.autoIndent
- });
- return i
- }, e.outdent = function (e, t, n) {
- for (var i = [], o = 0, r = n.length; o < r; o++) i[o] = new s.ShiftCommand(n[o], {
- isUnshift: !0,
- tabSize: e.tabSize,
- indentSize: e.indentSize,
- insertSpaces: e.insertSpaces,
- useTabStops: e.useTabStops,
- autoIndent: e.autoIndent
- });
- return i
- },
- e.shiftIndent = function (e, t, n) {
- return n = n || 1, s.ShiftCommand.shiftIndent(t, t.length + n, e.tabSize, e.indentSize, e.insertSpaces)
- }, e.unshiftIndent = function (e, t, n) {
- return n = n || 1, s.ShiftCommand.unshiftIndent(t, t.length + n, e.tabSize, e.indentSize, e.insertSpaces)
- }, e._distributedPaste = function (e, t, n, i) {
- for (var r = [], s = 0, a = n.length; s < a; s++) r[s] = new o.ReplaceCommand(n[s], i[s]);
- return new l.EditOperationResult(0, r, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !0
- })
- }, e._simplePaste = function (e, t, n, i, r) {
- for (var s = [], a = 0, u = n.length; a < u; a++) {
- var c = n[a], h = c.getPosition();
- if (r && !c.isEmpty() && (r = !1), r && i.indexOf("\n") !== i.length - 1 && (r = !1), r) {
- var p = new d.Range(h.lineNumber, 1, h.lineNumber, 1);
- s[a] = new o.ReplaceCommandThatPreservesSelection(p, i, c, !0)
- } else s[a] = new o.ReplaceCommand(c, i)
- }
- return new l.EditOperationResult(0, s, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !0
- })
- }, e._distributePasteToCursors = function (e, t, n, i, o) {
- if (i) return null;
- if (1 === t.length) return null;
- if (o && o.length === t.length) return o
- ;
- if ("spread" === e.multiCursorPaste) {
- 10 === n.charCodeAt(n.length - 1) && (n = n.substr(0, n.length - 1)), 13 === n.charCodeAt(n.length - 1) && (n = n.substr(0, n.length - 1));
- var r = n.split(/\r\n|\r|\n/);
- if (r.length === t.length) return r
- }
- return null
- }, e.paste = function (e, t, n, i, o, r) {
- var s = this._distributePasteToCursors(e, n, i, o, r);
- return s ? (n = n.sort(d.Range.compareRangesUsingStarts), this._distributedPaste(e, t, n, s)) : this._simplePaste(e, t, n, i, o)
- }, e._goodIndentForLine = function (t, n, o) {
- var r = null, s = "",
- a = p.LanguageConfigurationRegistry.getInheritIndentForLine(t.autoIndent, n, o, !1);
- if (a) r = a.action, s = a.indentation; else if (o > 1) {
- var l = void 0;
- for (l = o - 1; l >= 1; l--) {
- var u = n.getLineContent(l);
- if (i.lastNonWhitespaceIndex(u) >= 0) break
- }
- if (l < 1) return null;
- var c = n.getLineMaxColumn(l),
- g = p.LanguageConfigurationRegistry.getEnterAction(t.autoIndent, n, new d.Range(l, c, l, c));
- g && (s = g.indentation + g.appendText)
- }
- return r && (r === h.IndentAction.Indent && (s = e.shiftIndent(t, s)), r === h.IndentAction.Outdent && (s = e.unshiftIndent(t, s)), s = t.normalizeIndentation(s)), s || null
- },
- e._replaceJumpToNextIndent = function (e, t, n, i) {
- var r = "", s = n.getStartPosition();
- if (e.insertSpaces) for (var a = l.CursorColumns.visibleColumnFromColumn2(e, t, s), u = e.indentSize, d = u - a % u, c = 0; c < d; c++) r += " "; else r = "\t";
- return new o.ReplaceCommand(n, r, i)
- }, e.tab = function (e, t, n) {
- for (var r = [], a = 0, l = n.length; a < l; a++) {
- var u = n[a];
- if (u.isEmpty()) {
- var c = t.getLineContent(u.startLineNumber);
- if (/^\s*$/.test(c) && t.isCheapToTokenize(u.startLineNumber)) {
- var h = this._goodIndentForLine(e, t, u.startLineNumber);
- h = h || "\t";
- var p = e.normalizeIndentation(h);
- if (!i.startsWith(c, p)) {
- r[a] = new o.ReplaceCommand(new d.Range(u.startLineNumber, 1, u.startLineNumber, c.length + 1), p, !0);
- continue
- }
- }
- r[a] = this._replaceJumpToNextIndent(e, t, u, !0)
- } else {
- if (u.startLineNumber === u.endLineNumber) {
- var g = t.getLineMaxColumn(u.startLineNumber);
- if (1 !== u.startColumn || u.endColumn !== g) {
- r[a] = this._replaceJumpToNextIndent(e, t, u, !1);
- continue
- }
- }
- r[a] = new s.ShiftCommand(u, {
- isUnshift: !1,
- tabSize: e.tabSize,
- indentSize: e.indentSize,
- insertSpaces: e.insertSpaces,
- useTabStops: e.useTabStops,
- autoIndent: e.autoIndent
- })
- }
- }
- return r
- }, e.replacePreviousChar = function (e, t, n, i, r, s) {
- for (var a = [], u = 0, c = i.length; u < c; u++) {
- var h = i[u];
- if (h.isEmpty()) {
- var p = h.getPosition(), g = Math.max(1, p.column - s),
- f = new d.Range(p.lineNumber, g, p.lineNumber, p.column);
- a[u] = new o.ReplaceCommand(f, r)
- } else a[u] = null
- }
- return new l.EditOperationResult(1, a, {
- shouldPushStackElementBefore: 1 !== e,
- shouldPushStackElementAfter: !1
- })
- }, e._typeCommand = function (e, t, n) {
- return n ? new o.ReplaceCommandWithoutChangingPosition(e, t, !0) : new o.ReplaceCommand(e, t, !0)
- }, e._enter = function (t, n, r, s) {
- if (0 === t.autoIndent) return e._typeCommand(s, "\n", r);
- if (!n.isCheapToTokenize(s.getStartPosition().lineNumber) || 1 === t.autoIndent) {
- var a = n.getLineContent(s.startLineNumber),
- u = i.getLeadingWhitespace(a).substring(0, s.startColumn - 1);
- return e._typeCommand(s, "\n" + t.normalizeIndentation(u), r)
- }
- var c = p.LanguageConfigurationRegistry.getEnterAction(t.autoIndent, n, s);
- if (c) {
- if (c.indentAction === h.IndentAction.None) return e._typeCommand(s, "\n" + t.normalizeIndentation(c.indentation + c.appendText), r);
- if (c.indentAction === h.IndentAction.Indent) return e._typeCommand(s, "\n" + t.normalizeIndentation(c.indentation + c.appendText), r);
- if (c.indentAction === h.IndentAction.IndentOutdent) {
- var g = t.normalizeIndentation(c.indentation),
- f = t.normalizeIndentation(c.indentation + c.appendText), m = "\n" + f + "\n" + g;
- return r ? new o.ReplaceCommandWithoutChangingPosition(s, m, !0) : new o.ReplaceCommandWithOffsetCursorState(s, m, -1, f.length - g.length, !0)
- }
- if (c.indentAction === h.IndentAction.Outdent) {
- var v = e.unshiftIndent(t, c.indentation);
- return e._typeCommand(s, "\n" + t.normalizeIndentation(v + c.appendText), r)
- }
- }
- var _ = n.getLineContent(s.startLineNumber),
- y = i.getLeadingWhitespace(_).substring(0, s.startColumn - 1);
- if (t.autoIndent >= 4) {
- var C = p.LanguageConfigurationRegistry.getIndentForEnter(t.autoIndent, n, s, {
- unshiftIndent: function (n) {
- return e.unshiftIndent(t, n)
- }, shiftIndent: function (n) {
- return e.shiftIndent(t, n)
- },
- normalizeIndentation: function (e) {
- return t.normalizeIndentation(e)
- }
- });
- if (C) {
- var b = l.CursorColumns.visibleColumnFromColumn2(t, n, s.getEndPosition()), S = s.endColumn,
- w = "\n";
- y !== t.normalizeIndentation(C.beforeEnter) && (w = t.normalizeIndentation(C.beforeEnter) + _.substring(y.length, s.startColumn - 1) + "\n", s = new d.Range(s.startLineNumber, 1, s.endLineNumber, s.endColumn));
- var E = n.getLineContent(s.endLineNumber), L = i.firstNonWhitespaceIndex(E);
- if (s = L >= 0 ? s.setEndPosition(s.endLineNumber, Math.max(s.endColumn, L + 1)) : s.setEndPosition(s.endLineNumber, n.getLineMaxColumn(s.endLineNumber)), r) return new o.ReplaceCommandWithoutChangingPosition(s, w + t.normalizeIndentation(C.afterEnter), !0);
- var D = 0;
- return S <= L + 1 && (t.insertSpaces || (b = Math.ceil(b / t.indentSize)), D = Math.min(b + 1 - t.normalizeIndentation(C.afterEnter).length - 1, 0)), new o.ReplaceCommandWithOffsetCursorState(s, w + t.normalizeIndentation(C.afterEnter), 0, D, !0)
- }
- }
- return e._typeCommand(s, "\n" + t.normalizeIndentation(y), r)
- }, e._isAutoIndentType = function (e, t, n) {
- if (e.autoIndent < 4) return !1
- ;
- for (var i = 0, o = n.length; i < o; i++) if (!t.isCheapToTokenize(n[i].getEndPosition().lineNumber)) return !1;
- return !0
- }, e._runAutoIndentType = function (t, n, i, o) {
- var r = p.LanguageConfigurationRegistry.getIndentationAtPosition(n, i.startLineNumber, i.startColumn),
- s = p.LanguageConfigurationRegistry.getIndentActionForType(t.autoIndent, n, i, o, {
- shiftIndent: function (n) {
- return e.shiftIndent(t, n)
- }, unshiftIndent: function (n) {
- return e.unshiftIndent(t, n)
- }
- });
- if (null === s) return null;
- if (s !== t.normalizeIndentation(r)) {
- var a = n.getLineFirstNonWhitespaceColumn(i.startLineNumber);
- return 0 === a ? e._typeCommand(new d.Range(i.startLineNumber, 0, i.endLineNumber, i.endColumn), t.normalizeIndentation(s) + o, !1) : e._typeCommand(new d.Range(i.startLineNumber, 0, i.endLineNumber, i.endColumn), t.normalizeIndentation(s) + n.getLineContent(i.startLineNumber).substring(a - 1, i.startColumn - 1) + o, !1)
- }
- return null
- }, e._isAutoClosingOvertype = function (e, t, n, i, o) {
- if ("never" === e.autoClosingOvertype) return !1;
- if (!e.autoClosingPairsClose2.has(o)) return !1;
- for (var r = 0, s = n.length; r < s; r++) {
- var a = n[r];
- if (!a.isEmpty()) return !1;
- var u = a.getPosition(), d = t.getLineContent(u.lineNumber);
- if (d.charAt(u.column - 1) !== o) return !1;
- var c = l.isQuote(o);
- if (92 === (u.column > 2 ? d.charCodeAt(u.column - 2) : 0) && c) return !1;
- if ("auto" === e.autoClosingOvertype) {
- for (var h = !1, p = 0, g = i.length; p < g; p++) {
- var f = i[p];
- if (u.lineNumber === f.startLineNumber && u.column === f.startColumn) {
- h = !0;
- break
- }
- }
- if (!h) return !1
- }
- }
- return !0
- }, e._runAutoClosingOvertype = function (e, t, n, i, r) {
- for (var s = [], a = 0, u = i.length; a < u; a++) {
- var c = i[a].getPosition(), h = new d.Range(c.lineNumber, c.column, c.lineNumber, c.column + 1);
- s[a] = new o.ReplaceCommand(h, r)
- }
- return new l.EditOperationResult(1, s, {
- shouldPushStackElementBefore: 1 !== e,
- shouldPushStackElementAfter: !1
- })
- }, e._autoClosingPairIsSymmetric = function (e) {
- var t = e.open, n = e.close;
- return t.indexOf(n) >= 0 || n.indexOf(t) >= 0
- }, e._isBeforeClosingBrace = function (t, n, i) {
- var o = t.autoClosingPairsClose2.get(i);
- if (!o) return !1;
- for (var r = e._autoClosingPairIsSymmetric(n), s = 0, a = o; s < a.length; s++) {
- var l = a[s], u = e._autoClosingPairIsSymmetric(l)
- ;
- if (r || !u) return !0
- }
- return !1
- }, e._findAutoClosingPairOpen = function (e, t, n, i) {
- var o = e.autoClosingPairsOpen2.get(i);
- if (!o) return null;
- for (var r = null, s = 0, a = o; s < a.length; s++) {
- var l = a[s];
- if (null === r || l.open.length > r.open.length) {
- for (var u = !0, c = 0, h = n; c < h.length; c++) {
- var p = h[c];
- if (t.getValueInRange(new d.Range(p.lineNumber, p.column - l.open.length + 1, p.lineNumber, p.column)) + i !== l.open) {
- u = !1;
- break
- }
- }
- u && (r = l)
- }
- }
- return r
- }, e._isAutoClosingOpenCharType = function (t, i, o, r, s) {
- var a = l.isQuote(r), d = a ? t.autoClosingQuotes : t.autoClosingBrackets;
- if ("never" === d) return null;
- var c = this._findAutoClosingPairOpen(t, i, o.map((function (e) {
- return e.getPosition()
- })), r);
- if (!c) return null;
- for (var h = a ? t.shouldAutoCloseBefore.quote : t.shouldAutoCloseBefore.bracket, g = 0, f = o.length; g < f; g++) {
- var m = o[g];
- if (!m.isEmpty()) return null;
- var v = m.getPosition(), _ = i.getLineContent(v.lineNumber);
- if (_.length > v.column - 1) {
- var y = _.charAt(v.column - 1);
- if (!e._isBeforeClosingBrace(t, c, y) && !h(y)) return null
- }
- if (!i.isCheapToTokenize(v.lineNumber)) return null
- ;
- if (1 === c.open.length && a && "always" !== d) {
- var C = u.getMapForWordSeparators(t.wordSeparators);
- if (s && v.column > 1 && 0 === C.get(_.charCodeAt(v.column - 2))) return null;
- if (!s && v.column > 2 && 0 === C.get(_.charCodeAt(v.column - 3))) return null
- }
- i.forceTokenization(v.lineNumber);
- var b = i.getLineTokens(v.lineNumber), S = !1;
- try {
- S = p.LanguageConfigurationRegistry.shouldAutoClosePair(c, b, s ? v.column : v.column - 1)
- } catch (e) {
- n.onUnexpectedError(e)
- }
- if (!S) return null
- }
- return c
- }, e._runAutoClosingOpenCharType = function (e, t, n, i, o, r, s) {
- for (var a = [], u = 0, d = i.length; u < d; u++) {
- var c = i[u];
- a[u] = new f(c, o, r, s.close)
- }
- return new l.EditOperationResult(1, a, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !1
- })
- }, e._shouldSurroundChar = function (e, t) {
- return l.isQuote(t) ? "quotes" === e.autoSurround || "languageDefined" === e.autoSurround : "brackets" === e.autoSurround || "languageDefined" === e.autoSurround
- }, e._isSurroundSelectionType = function (t, n, i, o) {
- if (!e._shouldSurroundChar(t, o) || !t.surroundingPairs.hasOwnProperty(o)) return !1
- ;
- for (var r = l.isQuote(o), s = 0, a = i.length; s < a; s++) {
- var u = i[s];
- if (u.isEmpty()) return !1;
- for (var d = !0, c = u.startLineNumber; c <= u.endLineNumber; c++) {
- var h = n.getLineContent(c), p = c === u.startLineNumber ? u.startColumn - 1 : 0,
- g = c === u.endLineNumber ? u.endColumn - 1 : h.length, f = h.substring(p, g);
- if (/[^ \t]/.test(f)) {
- d = !1;
- break
- }
- }
- if (d) return !1;
- if (r && u.startLineNumber === u.endLineNumber && u.startColumn + 1 === u.endColumn) {
- var m = n.getValueInRange(u);
- if (l.isQuote(m)) return !1
- }
- }
- return !0
- }, e._runSurroundSelectionType = function (e, t, n, i, o) {
- for (var r = [], s = 0, u = i.length; s < u; s++) {
- var d = i[s], c = t.surroundingPairs[o];
- r[s] = new a.SurroundSelectionCommand(d, o, c)
- }
- return new l.EditOperationResult(0, r, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !0
- })
- }, e._isTypeInterceptorElectricChar = function (e, t, n) {
- return !(1 !== n.length || !t.isCheapToTokenize(n[0].getEndPosition().lineNumber))
- }, e._typeInterceptorElectricChar = function (e, t, r, s, a) {
- if (!t.electricChars.hasOwnProperty(a) || !s.isEmpty()) return null;
- var u = s.getPosition();
- r.forceTokenization(u.lineNumber)
- ;var c, h = r.getLineTokens(u.lineNumber);
- try {
- c = p.LanguageConfigurationRegistry.onElectricCharacter(a, h, u.column)
- } catch (e) {
- return n.onUnexpectedError(e), null
- }
- if (!c) return null;
- if (c.matchOpenBracket) {
- var g = (h.getLineContent() + a).lastIndexOf(c.matchOpenBracket) + 1,
- f = r.findMatchingBracketUp(c.matchOpenBracket, {lineNumber: u.lineNumber, column: g});
- if (f) {
- if (f.startLineNumber === u.lineNumber) return null;
- var m = r.getLineContent(f.startLineNumber), v = i.getLeadingWhitespace(m),
- _ = t.normalizeIndentation(v), y = r.getLineContent(u.lineNumber),
- C = r.getLineFirstNonWhitespaceColumn(u.lineNumber) || u.column,
- b = _ + y.substring(C - 1, u.column - 1) + a,
- S = new d.Range(u.lineNumber, 1, u.lineNumber, u.column), w = new o.ReplaceCommand(S, b);
- return new l.EditOperationResult(1, [w], {
- shouldPushStackElementBefore: !1,
- shouldPushStackElementAfter: !0
- })
- }
- }
- return null
- }, e.compositionEndWithInterceptors = function (e, t, n, i, r, s) {
- if (!i || c.Selection.selectionsArrEqual(i, r)) return null;
- for (var a = null, u = 0, h = r; u < h.length; u++) {
- var p = h[u];
- if (!p.isEmpty()) return null
- ;
- var g = p.getPosition(),
- f = n.getValueInRange(new d.Range(g.lineNumber, g.column - 1, g.lineNumber, g.column));
- if (null === a) a = f; else if (a !== f) return null
- }
- if (!a) return null;
- if (this._isAutoClosingOvertype(t, n, r, s, a)) {
- var m = r.map((function (e) {
- return new o.ReplaceCommand(new d.Range(e.positionLineNumber, e.positionColumn, e.positionLineNumber, e.positionColumn + 1), "", !1)
- }));
- return new l.EditOperationResult(1, m, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !1
- })
- }
- var v = this._isAutoClosingOpenCharType(t, n, r, a, !1);
- return v ? this._runAutoClosingOpenCharType(e, t, n, r, a, !1, v) : null
- }, e.typeWithInterceptors = function (t, n, i, r, s, a) {
- if ("\n" === a) {
- for (var u = [], d = 0, c = r.length; d < c; d++) u[d] = e._enter(n, i, !1, r[d]);
- return new l.EditOperationResult(1, u, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !1
- })
- }
- if (this._isAutoIndentType(n, i, r)) {
- var h = [], p = !1;
- for (d = 0, c = r.length; d < c; d++) if (h[d] = this._runAutoIndentType(n, i, r[d], a), !h[d]) {
- p = !0;
- break
- }
- if (!p) return new l.EditOperationResult(1, h, {
- shouldPushStackElementBefore: !0,
- shouldPushStackElementAfter: !1
- })
- }
- if (this._isAutoClosingOvertype(n, i, r, s, a)) return this._runAutoClosingOvertype(t, n, i, r, a);
- var g = this._isAutoClosingOpenCharType(n, i, r, a, !0);
- if (g) return this._runAutoClosingOpenCharType(t, n, i, r, a, !0, g);
- if (this._isSurroundSelectionType(n, i, r, a)) return this._runSurroundSelectionType(t, n, i, r, a);
- if (this._isTypeInterceptorElectricChar(n, i, r)) {
- var f = this._typeInterceptorElectricChar(t, n, i, r[0], a);
- if (f) return f
- }
- var m = [];
- for (d = 0, c = r.length; d < c; d++) m[d] = new o.ReplaceCommand(r[d], a);
- var v = 1 !== t;
- return " " === a && (v = !0), new l.EditOperationResult(1, m, {
- shouldPushStackElementBefore: v,
- shouldPushStackElementAfter: !1
- })
- }, e.typeWithoutInterceptors = function (e, t, n, i, r) {
- for (var s = [], a = 0, u = i.length; a < u; a++) s[a] = new o.ReplaceCommand(i[a], r);
- return new l.EditOperationResult(1, s, {
- shouldPushStackElementBefore: 1 !== e,
- shouldPushStackElementAfter: !1
- })
- }, e.lineInsertBefore = function (e, t, n) {
- if (null === t || null === n) return [];
- for (var i = [], r = 0, s = n.length; r < s; r++) {
- var a = n[r].positionLineNumber
- ;
- if (1 === a) i[r] = new o.ReplaceCommandWithoutChangingPosition(new d.Range(1, 1, 1, 1), "\n"); else {
- a--;
- var l = t.getLineMaxColumn(a);
- i[r] = this._enter(e, t, !1, new d.Range(a, l, a, l))
- }
- }
- return i
- }, e.lineInsertAfter = function (e, t, n) {
- if (null === t || null === n) return [];
- for (var i = [], o = 0, r = n.length; o < r; o++) {
- var s = n[o].positionLineNumber, a = t.getLineMaxColumn(s);
- i[o] = this._enter(e, t, !1, new d.Range(s, a, s, a))
- }
- return i
- }, e.lineBreakInsert = function (e, t, n) {
- for (var i = [], o = 0, r = n.length; o < r; o++) i[o] = this._enter(e, t, !0, n[o]);
- return i
- }, e
- }();
- t.TypeOperations = g;
- var f = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this, t, (i ? n : "") + o, 0, -o.length) || this;
- return r._openCharacter = n, r._closeCharacter = o, r.closeCharacterRange = null, r.enclosingRange = null, r
- }
- return r(t, e), t.prototype.computeCursorState = function (t, n) {
- var i = n.getInverseEditOperations()[0].range;
- return this.closeCharacterRange = new d.Range(i.startLineNumber, i.endColumn - this._closeCharacter.length, i.endLineNumber, i.endColumn),
- this.enclosingRange = new d.Range(i.startLineNumber, i.endColumn - this._openCharacter.length - this._closeCharacter.length, i.endLineNumber, i.endColumn), e.prototype.computeCursorState.call(this, t, n)
- }, t
- }(o.ReplaceCommandWithOffsetCursorState);
- t.TypeWithAutoClosingCommand = f
- })),define(n[160], i([0, 1, 5, 40, 89, 13, 3]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function () {
- function e() {
- }
- return e._createWord = function (e, t, n, i, o) {
- return {start: i, end: o, wordType: t, nextCharClass: n}
- }, e._findPreviousWordOnLine = function (e, t, n) {
- var i = t.getLineContent(n.lineNumber);
- return this._doFindPreviousWordOnLine(i, e, n)
- }, e._doFindPreviousWordOnLine = function (e, t, n) {
- for (var i = 0, o = n.column - 2; o >= 0; o--) {
- var r = e.charCodeAt(o), s = t.get(r);
- if (0 === s) {
- if (2 === i) return this._createWord(e, i, s, o + 1, this._findEndOfWord(e, t, i, o + 1));
- i = 1
- } else if (2 === s) {
- if (1 === i) return this._createWord(e, i, s, o + 1, this._findEndOfWord(e, t, i, o + 1));
- i = 2
- } else if (1 === s && 0 !== i) return this._createWord(e, i, s, o + 1, this._findEndOfWord(e, t, i, o + 1))
- }
- return 0 !== i ? this._createWord(e, i, 1, 0, this._findEndOfWord(e, t, i, 0)) : null
- }, e._findEndOfWord = function (e, t, n, i) {
- for (var o = e.length, r = i; r < o; r++) {
- var s = e.charCodeAt(r), a = t.get(s);
- if (1 === a) return r;
- if (1 === n && 2 === a) return r;
- if (2 === n && 0 === a) return r
- }
- return o
- }, e._findNextWordOnLine = function (e, t, n) {
- var i = t.getLineContent(n.lineNumber);
- return this._doFindNextWordOnLine(i, e, n)
- }, e._doFindNextWordOnLine = function (e, t, n) {
- for (var i = 0, o = e.length, r = n.column - 1; r < o; r++) {
- var s = e.charCodeAt(r), a = t.get(s);
- if (0 === a) {
- if (2 === i) return this._createWord(e, i, a, this._findStartOfWord(e, t, i, r - 1), r);
- i = 1
- } else if (2 === a) {
- if (1 === i) return this._createWord(e, i, a, this._findStartOfWord(e, t, i, r - 1), r);
- i = 2
- } else if (1 === a && 0 !== i) return this._createWord(e, i, a, this._findStartOfWord(e, t, i, r - 1), r)
- }
- return 0 !== i ? this._createWord(e, i, 1, this._findStartOfWord(e, t, i, o - 1), o) : null
- }, e._findStartOfWord = function (e, t, n, i) {
- for (var o = i; o >= 0; o--) {
- var r = e.charCodeAt(o), s = t.get(r);
- if (1 === s) return o + 1;
- if (1 === n && 2 === s) return o + 1;
- if (2 === n && 0 === s) return o + 1
- }
- return 0
- },
- e.moveWordLeft = function (t, n, i, o) {
- var r = i.lineNumber, a = i.column, l = !1;
- 1 === a && r > 1 && (l = !0, r -= 1, a = n.getLineMaxColumn(r));
- var u = e._findPreviousWordOnLine(t, n, new s.Position(r, a));
- if (0 === o) {
- if (u && !l) if (n.getLineLastNonWhitespaceColumn(r) < a) return new s.Position(r, u.end + 1);
- return new s.Position(r, u ? u.start + 1 : 1)
- }
- if (1 === o) return u && 2 === u.wordType && u.end - u.start == 1 && 0 === u.nextCharClass && (u = e._findPreviousWordOnLine(t, n, new s.Position(r, u.start + 1))), new s.Position(r, u ? u.start + 1 : 1);
- if (3 === o) {
- for (; u && 2 === u.wordType;) u = e._findPreviousWordOnLine(t, n, new s.Position(r, u.start + 1));
- return new s.Position(r, u ? u.start + 1 : 1)
- }
- return u && a <= u.end + 1 && (u = e._findPreviousWordOnLine(t, n, new s.Position(r, u.start + 1))), new s.Position(r, u ? u.end + 1 : 1)
- }, e._moveWordPartLeft = function (e, t) {
- var i = t.lineNumber, o = e.getLineMaxColumn(i);
- if (1 === t.column) return i > 1 ? new s.Position(i - 1, e.getLineMaxColumn(i - 1)) : t;
- for (var r = e.getLineContent(i), a = t.column - 1; a > 1; a--) {
- var l = r.charCodeAt(a - 2), u = r.charCodeAt(a - 1);
- if (95 !== l && 95 === u) return new s.Position(i, a)
- ;
- if (n.isLowerAsciiLetter(l) && n.isUpperAsciiLetter(u)) return new s.Position(i, a);
- if (n.isUpperAsciiLetter(l) && n.isUpperAsciiLetter(u) && a + 1 < o) {
- var d = r.charCodeAt(a);
- if (n.isLowerAsciiLetter(d)) return new s.Position(i, a)
- }
- }
- return new s.Position(i, 1)
- }, e.moveWordRight = function (t, n, i, o) {
- var r = i.lineNumber, a = i.column, l = !1;
- a === n.getLineMaxColumn(r) && r < n.getLineCount() && (l = !0, r += 1, a = 1);
- var u = e._findNextWordOnLine(t, n, new s.Position(r, a));
- if (2 === o) u && 2 === u.wordType && u.end - u.start == 1 && 0 === u.nextCharClass && (u = e._findNextWordOnLine(t, n, new s.Position(r, u.end + 1))), a = u ? u.end + 1 : n.getLineMaxColumn(r); else if (3 === o) {
- for (l && (a = 0); u && (2 === u.wordType || u.start + 1 <= a);) u = e._findNextWordOnLine(t, n, new s.Position(r, u.end + 1));
- a = u ? u.start + 1 : n.getLineMaxColumn(r)
- } else u && !l && a >= u.start + 1 && (u = e._findNextWordOnLine(t, n, new s.Position(r, u.end + 1))), a = u ? u.start + 1 : n.getLineMaxColumn(r);
- return new s.Position(r, a)
- }, e._moveWordPartRight = function (e, t) {
- var i = t.lineNumber, o = e.getLineMaxColumn(i)
- ;
- if (t.column === o) return i < e.getLineCount() ? new s.Position(i + 1, 1) : t;
- for (var r = e.getLineContent(i), a = t.column + 1; a < o; a++) {
- var l = r.charCodeAt(a - 2), u = r.charCodeAt(a - 1);
- if (95 === l && 95 !== u) return new s.Position(i, a);
- if (n.isLowerAsciiLetter(l) && n.isUpperAsciiLetter(u)) return new s.Position(i, a);
- if (n.isUpperAsciiLetter(l) && n.isUpperAsciiLetter(u) && a + 1 < o) {
- var d = r.charCodeAt(a);
- if (n.isLowerAsciiLetter(d)) return new s.Position(i, a)
- }
- }
- return new s.Position(i, o)
- }, e._deleteWordLeftWhitespace = function (e, t) {
- var i = e.getLineContent(t.lineNumber), o = t.column - 2, r = n.lastNonWhitespaceIndex(i, o);
- return r + 1 < o ? new a.Range(t.lineNumber, r + 2, t.lineNumber, t.column) : null
- }, e.deleteWordLeft = function (t, n, i, o, r) {
- if (!i.isEmpty()) return i;
- var l = new s.Position(i.positionLineNumber, i.positionColumn), u = l.lineNumber, d = l.column;
- if (1 === u && 1 === d) return null;
- if (o) {
- var c = this._deleteWordLeftWhitespace(n, l);
- if (c) return c
- }
- var h = e._findPreviousWordOnLine(t, n, l);
- return 0 === r ? h ? d = h.start + 1 : d > 1 ? d = 1 : (u--,
- d = n.getLineMaxColumn(u)) : (h && d <= h.end + 1 && (h = e._findPreviousWordOnLine(t, n, new s.Position(u, h.start + 1))), h ? d = h.end + 1 : d > 1 ? d = 1 : (u--, d = n.getLineMaxColumn(u))), new a.Range(u, d, l.lineNumber, l.column)
- }, e._deleteWordPartLeft = function (t, n) {
- if (!n.isEmpty()) return n;
- var i = n.getPosition(), o = e._moveWordPartLeft(t, i);
- return new a.Range(i.lineNumber, i.column, o.lineNumber, o.column)
- }, e._findFirstNonWhitespaceChar = function (e, t) {
- for (var n = e.length, i = t; i < n; i++) {
- var o = e.charAt(i);
- if (" " !== o && "\t" !== o) return i
- }
- return n
- }, e._deleteWordRightWhitespace = function (e, t) {
- var n = e.getLineContent(t.lineNumber), i = t.column - 1, o = this._findFirstNonWhitespaceChar(n, i);
- return i + 1 < o ? new a.Range(t.lineNumber, t.column, t.lineNumber, o + 1) : null
- }, e.deleteWordRight = function (t, n, i, o, r) {
- if (!i.isEmpty()) return i;
- var l = new s.Position(i.positionLineNumber, i.positionColumn), u = l.lineNumber, d = l.column,
- c = n.getLineCount(), h = n.getLineMaxColumn(u);
- if (u === c && d === h) return null;
- if (o) {
- var p = this._deleteWordRightWhitespace(n, l);
- if (p) return p
- }
- var g = e._findNextWordOnLine(t, n, l);
- return 2 === r ? g ? d = g.end + 1 : d < h || u === c ? d = h : (u++, d = (g = e._findNextWordOnLine(t, n, new s.Position(u, 1))) ? g.start + 1 : n.getLineMaxColumn(u)) : (g && d >= g.start + 1 && (g = e._findNextWordOnLine(t, n, new s.Position(u, g.end + 1))), g ? d = g.start + 1 : d < h || u === c ? d = h : (u++, d = (g = e._findNextWordOnLine(t, n, new s.Position(u, 1))) ? g.start + 1 : n.getLineMaxColumn(u))), new a.Range(u, d, l.lineNumber, l.column)
- }, e._deleteWordPartRight = function (t, n) {
- if (!n.isEmpty()) return n;
- var i = n.getPosition(), o = e._moveWordPartRight(t, i);
- return new a.Range(i.lineNumber, i.column, o.lineNumber, o.column)
- }, e.word = function (t, n, r, l, u) {
- var d, c, h, p, g = o.getMapForWordSeparators(t.wordSeparators), f = e._findPreviousWordOnLine(g, n, u),
- m = e._findNextWordOnLine(g, n, u);
- if (!l) return f && 1 === f.wordType && f.start <= u.column - 1 && u.column - 1 <= f.end ? (d = f.start + 1, c = f.end + 1) : m && 1 === m.wordType && m.start <= u.column - 1 && u.column - 1 <= m.end ? (d = m.start + 1, c = m.end + 1) : (d = f ? f.end + 1 : 1, c = m ? m.start + 1 : n.getLineMaxColumn(u.lineNumber)),
- new i.SingleCursorState(new a.Range(u.lineNumber, d, u.lineNumber, c), 0, new s.Position(u.lineNumber, c), 0);
- f && 1 === f.wordType && f.start < u.column - 1 && u.column - 1 < f.end ? (h = f.start + 1, p = f.end + 1) : m && 1 === m.wordType && m.start < u.column - 1 && u.column - 1 < m.end ? (h = m.start + 1, p = m.end + 1) : (h = u.column, p = u.column);
- var v, _ = u.lineNumber;
- if (r.selectionStart.containsPosition(u)) v = r.selectionStart.endColumn; else if (u.isBeforeOrEqual(r.selectionStart.getStartPosition())) {
- v = h;
- var y = new s.Position(_, v);
- r.selectionStart.containsPosition(y) && (v = r.selectionStart.endColumn)
- } else {
- v = p;
- y = new s.Position(_, v);
- r.selectionStart.containsPosition(y) && (v = r.selectionStart.startColumn)
- }
- return r.move(!0, _, v, 0)
- }, e
- }();
- t.WordOperations = l;
- var u = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.deleteWordPartLeft = function (e, t, n, i) {
- var o = d([l.deleteWordLeft(e, t, n, i, 0), l.deleteWordLeft(e, t, n, i, 2), l._deleteWordPartLeft(t, n)]);
- return o.sort(a.Range.compareRangesUsingEnds), o[2]
- }, t.deleteWordPartRight = function (e, t, n, i) {
- var o = d([l.deleteWordRight(e, t, n, i, 0), l.deleteWordRight(e, t, n, i, 2), l._deleteWordPartRight(t, n)]);
- return o.sort(a.Range.compareRangesUsingStarts), o[0]
- }, t.moveWordPartLeft = function (e, t, n) {
- var i = d([l.moveWordLeft(e, t, n, 0), l.moveWordLeft(e, t, n, 2), l._moveWordPartLeft(t, n)]);
- return i.sort(s.Position.compare), i[2]
- }, t.moveWordPartRight = function (e, t, n) {
- var i = d([l.moveWordRight(e, t, n, 0), l.moveWordRight(e, t, n, 2), l._moveWordPartRight(t, n)]);
- return i.sort(s.Position.compare), i[0]
- }, t
- }(l);
- function d(e) {
- return e.filter((function (e) {
- return Boolean(e)
- }))
- }
- t.WordPartOperations = u
- })),define(n[213], i([0, 1, 21, 40, 158, 160, 13, 3]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function () {
- function e() {
- }
- return e.addCursorDown = function (e, t, n) {
- for (var r = [], s = 0, a = 0, l = t.length; a < l; a++) {
- var u = t[a];
- r[s++] = new i.CursorState(u.modelState, u.viewState),
- r[s++] = n ? i.CursorState.fromModelState(o.MoveOperations.translateDown(e.config, e.model, u.modelState)) : i.CursorState.fromViewState(o.MoveOperations.translateDown(e.config, e.viewModel, u.viewState))
- }
- return r
- }, e.addCursorUp = function (e, t, n) {
- for (var r = [], s = 0, a = 0, l = t.length; a < l; a++) {
- var u = t[a];
- r[s++] = new i.CursorState(u.modelState, u.viewState), r[s++] = n ? i.CursorState.fromModelState(o.MoveOperations.translateUp(e.config, e.model, u.modelState)) : i.CursorState.fromViewState(o.MoveOperations.translateUp(e.config, e.viewModel, u.viewState))
- }
- return r
- }, e.moveToBeginningOfLine = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o];
- i[o] = this._moveToLineStart(e, s, n)
- }
- return i
- }, e._moveToLineStart = function (e, t, n) {
- var i = t.viewState.position.column, o = i === t.modelState.position.column,
- r = t.viewState.position.lineNumber, s = e.viewModel.getLineFirstNonWhitespaceColumn(r);
- return o || i === s ? this._moveToLineStartByModel(e, t, n) : this._moveToLineStartByView(e, t, n)
- }, e._moveToLineStartByView = function (e, t, n) {
- return i.CursorState.fromViewState(o.MoveOperations.moveToBeginningOfLine(e.config, e.viewModel, t.viewState, n))
- }, e._moveToLineStartByModel = function (e, t, n) {
- return i.CursorState.fromModelState(o.MoveOperations.moveToBeginningOfLine(e.config, e.model, t.modelState, n))
- }, e.moveToEndOfLine = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o];
- i[o] = this._moveToLineEnd(e, s, n)
- }
- return i
- }, e._moveToLineEnd = function (e, t, n) {
- var i = t.viewState.position, o = e.viewModel.getLineMaxColumn(i.lineNumber), r = i.column === o,
- s = t.modelState.position, a = e.model.getLineMaxColumn(s.lineNumber),
- l = o - i.column == a - s.column;
- return r || l ? this._moveToLineEndByModel(e, t, n) : this._moveToLineEndByView(e, t, n)
- }, e._moveToLineEndByView = function (e, t, n) {
- return i.CursorState.fromViewState(o.MoveOperations.moveToEndOfLine(e.config, e.viewModel, t.viewState, n))
- }, e._moveToLineEndByModel = function (e, t, n) {
- return i.CursorState.fromModelState(o.MoveOperations.moveToEndOfLine(e.config, e.model, t.modelState, n))
- }, e.expandLineSelection = function (e, t) {
- for (var n = [], o = 0, r = t.length; o < r; o++) {
- var l = t[o], u = l.modelState.selection.startLineNumber, d = e.model.getLineCount(),
- c = l.modelState.selection.endLineNumber, h = void 0;
- c === d ? h = e.model.getLineMaxColumn(d) : (c++, h = 1), n[o] = i.CursorState.fromModelState(new i.SingleCursorState(new a.Range(u, 1, u, 1), 0, new s.Position(c, h), 0))
- }
- return n
- }, e.moveToBeginningOfBuffer = function (e, t, n) {
- for (var r = [], s = 0, a = t.length; s < a; s++) {
- var l = t[s];
- r[s] = i.CursorState.fromModelState(o.MoveOperations.moveToBeginningOfBuffer(e.config, e.model, l.modelState, n))
- }
- return r
- }, e.moveToEndOfBuffer = function (e, t, n) {
- for (var r = [], s = 0, a = t.length; s < a; s++) {
- var l = t[s];
- r[s] = i.CursorState.fromModelState(o.MoveOperations.moveToEndOfBuffer(e.config, e.model, l.modelState, n))
- }
- return r
- }, e.selectAll = function (e, t) {
- var n = e.model.getLineCount(), o = e.model.getLineMaxColumn(n);
- return i.CursorState.fromModelState(new i.SingleCursorState(new a.Range(1, 1, 1, 1), 0, new s.Position(n, o), 0))
- }, e.line = function (e, t, n, o, r) {
- var l = e.model.validatePosition(o),
- u = r ? e.validateViewPosition(new s.Position(r.lineNumber, r.column), l) : e.convertModelPositionToViewPosition(l);
- if (!n || !t.modelState.hasSelection()) {
- var d = e.model.getLineCount(), c = l.lineNumber + 1, h = 1;
- return c > d && (c = d, h = e.model.getLineMaxColumn(c)), i.CursorState.fromModelState(new i.SingleCursorState(new a.Range(l.lineNumber, 1, c, h), 0, new s.Position(c, h), 0))
- }
- var p = t.modelState.selectionStart.getStartPosition().lineNumber;
- if (l.lineNumber < p) return i.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(), u.lineNumber, 1, 0));
- if (l.lineNumber > p) {
- d = e.viewModel.getLineCount();
- var g = u.lineNumber + 1, f = 1;
- return g > d && (g = d, f = e.viewModel.getLineMaxColumn(g)), i.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(), g, f, 0))
- }
- var m = t.modelState.selectionStart.getEndPosition();
- return i.CursorState.fromModelState(t.modelState.move(t.modelState.hasSelection(), m.lineNumber, m.column, 0))
- }, e.word = function (e, t, n, o) {
- var s = e.model.validatePosition(o)
- ;
- return i.CursorState.fromModelState(r.WordOperations.word(e.config, e.model, t.modelState, n, s))
- }, e.cancelSelection = function (e, t) {
- if (!t.modelState.hasSelection()) return new i.CursorState(t.modelState, t.viewState);
- var n = t.viewState.position.lineNumber, o = t.viewState.position.column;
- return i.CursorState.fromViewState(new i.SingleCursorState(new a.Range(n, o, n, o), 0, new s.Position(n, o), 0))
- }, e.moveTo = function (e, t, n, o, r) {
- var a = e.model.validatePosition(o),
- l = r ? e.validateViewPosition(new s.Position(r.lineNumber, r.column), a) : e.convertModelPositionToViewPosition(a);
- return i.CursorState.fromViewState(t.viewState.move(n, l.lineNumber, l.column, 0))
- }, e.move = function (e, t, n) {
- var i = n.select, o = n.value;
- switch (n.direction) {
- case 0:
- return 4 === n.unit ? this._moveHalfLineLeft(e, t, i) : this._moveLeft(e, t, i, o);
- case 1:
- return 4 === n.unit ? this._moveHalfLineRight(e, t, i) : this._moveRight(e, t, i, o);
- case 2:
- return 2 === n.unit ? this._moveUpByViewLines(e, t, i, o) : this._moveUpByModelLines(e, t, i, o);
- case 3:
- return 2 === n.unit ? this._moveDownByViewLines(e, t, i, o) : this._moveDownByModelLines(e, t, i, o);
- case 4:
- return this._moveToViewMinColumn(e, t, i);
- case 5:
- return this._moveToViewFirstNonWhitespaceColumn(e, t, i);
- case 6:
- return this._moveToViewCenterColumn(e, t, i);
- case 7:
- return this._moveToViewMaxColumn(e, t, i);
- case 8:
- return this._moveToViewLastNonWhitespaceColumn(e, t, i);
- case 9:
- var r = t[0], s = e.getCompletelyVisibleModelRange(),
- a = this._firstLineNumberInRange(e.model, s, o),
- l = e.model.getLineFirstNonWhitespaceColumn(a);
- return [this._moveToModelPosition(e, r, i, a, l)];
- case 11:
- r = t[0], s = e.getCompletelyVisibleModelRange(), a = this._lastLineNumberInRange(e.model, s, o), l = e.model.getLineFirstNonWhitespaceColumn(a);
- return [this._moveToModelPosition(e, r, i, a, l)];
- case 10:
- r = t[0], s = e.getCompletelyVisibleModelRange(), a = Math.round((s.startLineNumber + s.endLineNumber) / 2), l = e.model.getLineFirstNonWhitespaceColumn(a);
- return [this._moveToModelPosition(e, r, i, a, l)];
- case 12:
- for (var u = e.getCompletelyVisibleViewRange(), d = [], c = 0, h = t.length; c < h; c++) {
- r = t[c]
- ;d[c] = this.findPositionInViewportIfOutside(e, r, u, i)
- }
- return d
- }
- return null
- }, e.findPositionInViewportIfOutside = function (e, t, n, o) {
- var r = t.viewState.position.lineNumber;
- if (n.startLineNumber <= r && r <= n.endLineNumber - 1) return new i.CursorState(t.modelState, t.viewState);
- r > n.endLineNumber - 1 && (r = n.endLineNumber - 1), r < n.startLineNumber && (r = n.startLineNumber);
- var s = e.viewModel.getLineFirstNonWhitespaceColumn(r);
- return this._moveToViewPosition(e, t, o, r, s)
- }, e._firstLineNumberInRange = function (e, t, n) {
- var i = t.startLineNumber;
- return t.startColumn !== e.getLineMinColumn(i) && i++, Math.min(t.endLineNumber, i + n - 1)
- }, e._lastLineNumberInRange = function (e, t, n) {
- var i = t.startLineNumber;
- return t.startColumn !== e.getLineMinColumn(i) && i++, Math.max(i, t.endLineNumber - n + 1)
- }, e._moveLeft = function (e, t, n, r) {
- for (var s = [], a = 0, l = t.length; a < l; a++) {
- var u = t[a], d = o.MoveOperations.moveLeft(e.config, e.viewModel, u.viewState, n, r)
- ;
- if (1 === r && d.position.lineNumber !== u.viewState.position.lineNumber) e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(d.position).lineNumber === u.modelState.position.lineNumber && (d = o.MoveOperations.moveLeft(e.config, e.viewModel, d, n, 1));
- s[a] = i.CursorState.fromViewState(d)
- }
- return s
- }, e._moveHalfLineLeft = function (e, t, n) {
- for (var r = [], s = 0, a = t.length; s < a; s++) {
- var l = t[s], u = l.viewState.position.lineNumber,
- d = Math.round(e.viewModel.getLineContent(u).length / 2);
- r[s] = i.CursorState.fromViewState(o.MoveOperations.moveLeft(e.config, e.viewModel, l.viewState, n, d))
- }
- return r
- }, e._moveRight = function (e, t, n, r) {
- for (var s = [], a = 0, l = t.length; a < l; a++) {
- var u = t[a], d = o.MoveOperations.moveRight(e.config, e.viewModel, u.viewState, n, r);
- if (1 === r && d.position.lineNumber !== u.viewState.position.lineNumber) e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(d.position).lineNumber === u.modelState.position.lineNumber && (d = o.MoveOperations.moveRight(e.config, e.viewModel, d, n, 1));
- s[a] = i.CursorState.fromViewState(d)
- }
- return s
- },
- e._moveHalfLineRight = function (e, t, n) {
- for (var r = [], s = 0, a = t.length; s < a; s++) {
- var l = t[s], u = l.viewState.position.lineNumber,
- d = Math.round(e.viewModel.getLineContent(u).length / 2);
- r[s] = i.CursorState.fromViewState(o.MoveOperations.moveRight(e.config, e.viewModel, l.viewState, n, d))
- }
- return r
- }, e._moveDownByViewLines = function (e, t, n, r) {
- for (var s = [], a = 0, l = t.length; a < l; a++) {
- var u = t[a];
- s[a] = i.CursorState.fromViewState(o.MoveOperations.moveDown(e.config, e.viewModel, u.viewState, n, r))
- }
- return s
- }, e._moveDownByModelLines = function (e, t, n, r) {
- for (var s = [], a = 0, l = t.length; a < l; a++) {
- var u = t[a];
- s[a] = i.CursorState.fromModelState(o.MoveOperations.moveDown(e.config, e.model, u.modelState, n, r))
- }
- return s
- }, e._moveUpByViewLines = function (e, t, n, r) {
- for (var s = [], a = 0, l = t.length; a < l; a++) {
- var u = t[a];
- s[a] = i.CursorState.fromViewState(o.MoveOperations.moveUp(e.config, e.viewModel, u.viewState, n, r))
- }
- return s
- }, e._moveUpByModelLines = function (e, t, n, r) {
- for (var s = [], a = 0, l = t.length; a < l; a++) {
- var u = t[a]
- ;s[a] = i.CursorState.fromModelState(o.MoveOperations.moveUp(e.config, e.model, u.modelState, n, r))
- }
- return s
- }, e._moveToViewPosition = function (e, t, n, o, r) {
- return i.CursorState.fromViewState(t.viewState.move(n, o, r, 0))
- }, e._moveToModelPosition = function (e, t, n, o, r) {
- return i.CursorState.fromModelState(t.modelState.move(n, o, r, 0))
- }, e._moveToViewMinColumn = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o], a = s.viewState.position.lineNumber, l = e.viewModel.getLineMinColumn(a);
- i[o] = this._moveToViewPosition(e, s, n, a, l)
- }
- return i
- }, e._moveToViewFirstNonWhitespaceColumn = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o], a = s.viewState.position.lineNumber,
- l = e.viewModel.getLineFirstNonWhitespaceColumn(a);
- i[o] = this._moveToViewPosition(e, s, n, a, l)
- }
- return i
- }, e._moveToViewCenterColumn = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o], a = s.viewState.position.lineNumber,
- l = Math.round((e.viewModel.getLineMaxColumn(a) + e.viewModel.getLineMinColumn(a)) / 2);
- i[o] = this._moveToViewPosition(e, s, n, a, l)
- }
- return i
- },
- e._moveToViewMaxColumn = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o], a = s.viewState.position.lineNumber, l = e.viewModel.getLineMaxColumn(a);
- i[o] = this._moveToViewPosition(e, s, n, a, l)
- }
- return i
- }, e._moveToViewLastNonWhitespaceColumn = function (e, t, n) {
- for (var i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o], a = s.viewState.position.lineNumber,
- l = e.viewModel.getLineLastNonWhitespaceColumn(a);
- i[o] = this._moveToViewPosition(e, s, n, a, l)
- }
- return i
- }, e
- }();
- t.CursorMoveCommands = l, function (e) {
- e.description = {
- description: "Move cursor to a logical position in the view", args: [{
- name: "Cursor move argument object",
- description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down'\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",
- constraint: function (e) {
- if (!n.isObject(e)) return !1;
- var t = e
- ;
- return !!n.isString(t.to) && (!(!n.isUndefined(t.select) && !n.isBoolean(t.select)) && (!(!n.isUndefined(t.by) && !n.isString(t.by)) && !(!n.isUndefined(t.value) && !n.isNumber(t.value))))
- },
- schema: {
- type: "object",
- required: ["to"],
- properties: {
- to: {
- type: "string",
- enum: ["left", "right", "up", "down", "wrappedLineStart", "wrappedLineEnd", "wrappedLineColumnCenter", "wrappedLineFirstNonWhitespaceCharacter", "wrappedLineLastNonWhitespaceCharacter", "viewPortTop", "viewPortCenter", "viewPortBottom", "viewPortIfOutside"]
- },
- by: {type: "string", enum: ["line", "wrappedLine", "character", "halfLine"]},
- value: {type: "number", default: 1},
- select: {type: "boolean", default: !1}
- }
- }
- }]
- }, e.RawDirection = {
- Left: "left",
- Right: "right",
- Up: "up",
- Down: "down",
- WrappedLineStart: "wrappedLineStart",
- WrappedLineFirstNonWhitespaceCharacter: "wrappedLineFirstNonWhitespaceCharacter",
- WrappedLineColumnCenter: "wrappedLineColumnCenter",
- WrappedLineEnd: "wrappedLineEnd",
- WrappedLineLastNonWhitespaceCharacter: "wrappedLineLastNonWhitespaceCharacter",
- ViewPortTop: "viewPortTop",
- ViewPortCenter: "viewPortCenter",
- ViewPortBottom: "viewPortBottom",
- ViewPortIfOutside: "viewPortIfOutside"
- }, e.RawUnit = {
- Line: "line",
- WrappedLine: "wrappedLine",
- Character: "character",
- HalfLine: "halfLine"
- }, e.parse = function (t) {
- if (!t.to) return null;
- var n;
- switch (t.to) {
- case e.RawDirection.Left:
- n = 0;
- break;
- case e.RawDirection.Right:
- n = 1;
- break;
- case e.RawDirection.Up:
- n = 2;
- break;
- case e.RawDirection.Down:
- n = 3;
- break;
- case e.RawDirection.WrappedLineStart:
- n = 4;
- break;
- case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:
- n = 5;
- break;
- case e.RawDirection.WrappedLineColumnCenter:
- n = 6;
- break;
- case e.RawDirection.WrappedLineEnd:
- n = 7;
- break;
- case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:
- n = 8;
- break;
- case e.RawDirection.ViewPortTop:
- n = 9;
- break;
- case e.RawDirection.ViewPortBottom:
- n = 11;
- break;
- case e.RawDirection.ViewPortCenter:
- n = 10;
- break;
- case e.RawDirection.ViewPortIfOutside:
- n = 12;
- break;
- default:
- return null
- }
- var i = 0;
- switch (t.by) {
- case e.RawUnit.Line:
- i = 1;
- break;
- case e.RawUnit.WrappedLine:
- i = 2;
- break;
- case e.RawUnit.Character:
- i = 3;
- break
- ;
- case e.RawUnit.HalfLine:
- i = 4
- }
- return {direction: n, unit: i, select: !!t.select, value: t.value || 1}
- }
- }(t.CursorMove || (t.CursorMove = {}))
- })),define(n[484], i([0, 1, 40, 13, 3, 22]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e(e) {
- this._selTrackedRange = null, this._trackSelection = !0, this._setState(e, new n.SingleCursorState(new o.Range(1, 1, 1, 1), 0, new i.Position(1, 1), 0), new n.SingleCursorState(new o.Range(1, 1, 1, 1), 0, new i.Position(1, 1), 0))
- }
- return e.prototype.dispose = function (e) {
- this._removeTrackedRange(e)
- }, e.prototype.startTrackingSelection = function (e) {
- this._trackSelection = !0, this._updateTrackedRange(e)
- }, e.prototype.stopTrackingSelection = function (e) {
- this._trackSelection = !1, this._removeTrackedRange(e)
- }, e.prototype._updateTrackedRange = function (e) {
- this._trackSelection && (this._selTrackedRange = e.model._setTrackedRange(this._selTrackedRange, this.modelState.selection, 0))
- }, e.prototype._removeTrackedRange = function (e) {
- this._selTrackedRange = e.model._setTrackedRange(this._selTrackedRange, null, 0)
- }, e.prototype.asCursorState = function () {
- return new n.CursorState(this.modelState, this.viewState)
- }, e.prototype.readSelectionFromMarkers = function (e) {
- var t = e.model._getTrackedRange(this._selTrackedRange);
- return 0 === this.modelState.selection.getDirection() ? new r.Selection(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : new r.Selection(t.endLineNumber, t.endColumn, t.startLineNumber, t.startColumn)
- }, e.prototype.ensureValidState = function (e) {
- this._setState(e, this.modelState, this.viewState)
- }, e.prototype.setState = function (e, t, n) {
- this._setState(e, t, n)
- }, e.prototype._setState = function (e, t, r) {
- if (t) {
- l = e.model.validateRange(t.selectionStart);
- var s = t.selectionStart.equalsRange(l) ? t.selectionStartLeftoverVisibleColumns : 0,
- a = (u = e.model.validatePosition(t.position), t.position.equals(u) ? t.leftoverVisibleColumns : 0);
- t = new n.SingleCursorState(l, s, u, a)
- } else {
- if (!r) return
- ;
- var l = e.model.validateRange(e.convertViewRangeToModelRange(r.selectionStart)),
- u = e.model.validatePosition(e.convertViewPositionToModelPosition(r.position.lineNumber, r.position.column));
- t = new n.SingleCursorState(l, r.selectionStartLeftoverVisibleColumns, u, r.leftoverVisibleColumns)
- }
- if (r) {
- h = e.validateViewRange(r.selectionStart, t.selectionStart), p = e.validateViewPosition(r.position, t.position);
- r = new n.SingleCursorState(h, t.selectionStartLeftoverVisibleColumns, p, t.leftoverVisibleColumns)
- } else {
- var d = e.convertModelPositionToViewPosition(new i.Position(t.selectionStart.startLineNumber, t.selectionStart.startColumn)),
- c = e.convertModelPositionToViewPosition(new i.Position(t.selectionStart.endLineNumber, t.selectionStart.endColumn)),
- h = new o.Range(d.lineNumber, d.column, c.lineNumber, c.column),
- p = e.convertModelPositionToViewPosition(t.position);
- r = new n.SingleCursorState(h, t.selectionStartLeftoverVisibleColumns, p, t.leftoverVisibleColumns)
- }
- this.modelState = t, this.viewState = r, this._updateTrackedRange(e)
- }, e
- }();
- t.OneCursor = s
- })),
- define(n[485], i([0, 1, 40, 484, 22]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e) {
- this.context = e, this.primaryCursor = new i.OneCursor(e), this.secondaryCursors = [], this.lastAddedCursorIndex = 0
- }
- return e.prototype.dispose = function () {
- this.primaryCursor.dispose(this.context), this.killSecondaryCursors()
- }, e.prototype.startTrackingSelections = function () {
- this.primaryCursor.startTrackingSelection(this.context);
- for (var e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[e].startTrackingSelection(this.context)
- }, e.prototype.stopTrackingSelections = function () {
- this.primaryCursor.stopTrackingSelection(this.context);
- for (var e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[e].stopTrackingSelection(this.context)
- }, e.prototype.updateContext = function (e) {
- this.context = e
- }, e.prototype.ensureValidState = function () {
- this.primaryCursor.ensureValidState(this.context)
- ;
- for (var e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[e].ensureValidState(this.context)
- }, e.prototype.readSelectionFromMarkers = function () {
- var e = [];
- e[0] = this.primaryCursor.readSelectionFromMarkers(this.context);
- for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].readSelectionFromMarkers(this.context);
- return e
- }, e.prototype.getAll = function () {
- var e = [];
- e[0] = this.primaryCursor.asCursorState();
- for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].asCursorState();
- return e
- }, e.prototype.getViewPositions = function () {
- var e = [];
- e[0] = this.primaryCursor.viewState.position;
- for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].viewState.position;
- return e
- }, e.prototype.getSelections = function () {
- var e = [];
- e[0] = this.primaryCursor.modelState.selection;
- for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].modelState.selection;
- return e
- }, e.prototype.getViewSelections = function () {
- var e = []
- ;e[0] = this.primaryCursor.viewState.selection;
- for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].viewState.selection;
- return e
- }, e.prototype.setSelections = function (e) {
- this.setStates(n.CursorState.fromModelSelections(e))
- }, e.prototype.getPrimaryCursor = function () {
- return this.primaryCursor.asCursorState()
- }, e.prototype.setStates = function (e) {
- null !== e && (this.primaryCursor.setState(this.context, e[0].modelState, e[0].viewState), this._setSecondaryStates(e.slice(1)))
- }, e.prototype._setSecondaryStates = function (e) {
- var t = this.secondaryCursors.length, n = e.length;
- if (t < n) for (var i = n - t, o = 0; o < i; o++) this._addSecondaryCursor(); else if (t > n) {
- var r = t - n;
- for (o = 0; o < r; o++) this._removeSecondaryCursor(this.secondaryCursors.length - 1)
- }
- for (o = 0; o < n; o++) this.secondaryCursors[o].setState(this.context, e[o].modelState, e[o].viewState)
- }, e.prototype.killSecondaryCursors = function () {
- this._setSecondaryStates([])
- }, e.prototype._addSecondaryCursor = function () {
- this.secondaryCursors.push(new i.OneCursor(this.context)),
- this.lastAddedCursorIndex = this.secondaryCursors.length
- }, e.prototype.getLastAddedCursorIndex = function () {
- return 0 === this.secondaryCursors.length || 0 === this.lastAddedCursorIndex ? 0 : this.lastAddedCursorIndex
- }, e.prototype._removeSecondaryCursor = function (e) {
- this.lastAddedCursorIndex >= e + 1 && this.lastAddedCursorIndex--, this.secondaryCursors[e].dispose(this.context), this.secondaryCursors.splice(e, 1)
- }, e.prototype._getAll = function () {
- var e = [];
- e[0] = this.primaryCursor;
- for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t];
- return e
- }, e.prototype.normalize = function () {
- if (0 !== this.secondaryCursors.length) {
- for (var e = this._getAll(), t = [], i = 0, r = e.length; i < r; i++) t.push({
- index: i,
- selection: e[i].modelState.selection
- });
- t.sort((function (e, t) {
- return e.selection.startLineNumber === t.selection.startLineNumber ? e.selection.startColumn - t.selection.startColumn : e.selection.startLineNumber - t.selection.startLineNumber
- }));
- for (var s = 0; s < t.length - 1; s++) {
- var a = t[s], l = t[s + 1], u = a.selection, d = l.selection
- ;
- if (this.context.config.multiCursorMergeOverlapping) {
- if (d.isEmpty() || u.isEmpty() ? d.getStartPosition().isBeforeOrEqual(u.getEndPosition()) : d.getStartPosition().isBefore(u.getEndPosition())) {
- var c = a.index < l.index ? s : s + 1, h = a.index < l.index ? s + 1 : s,
- p = t[h].index, g = t[c].index, f = t[h].selection, m = t[c].selection;
- if (!f.equalsSelection(m)) {
- var v = f.plusRange(m),
- _ = f.selectionStartLineNumber === f.startLineNumber && f.selectionStartColumn === f.startColumn,
- y = m.selectionStartLineNumber === m.startLineNumber && m.selectionStartColumn === m.startColumn,
- C = void 0;
- p === this.lastAddedCursorIndex ? (C = _, this.lastAddedCursorIndex = g) : C = y;
- var b = void 0;
- b = C ? new o.Selection(v.startLineNumber, v.startColumn, v.endLineNumber, v.endColumn) : new o.Selection(v.endLineNumber, v.endColumn, v.startLineNumber, v.startColumn), t[c].selection = b;
- var S = n.CursorState.fromModelSelection(b);
- e[g].setState(this.context, S.modelState, S.viewState)
- }
- for (var w = 0, E = t; w < E.length; w++) {
- var L = E[w];
- L.index > p && L.index--
- }
- e.splice(p, 1), t.splice(h, 1), this._removeSecondaryCursor(p - 1), s--
- }
- }
- }
- }
- }, e
- }()
- ;t.CursorCollection = r
- })),define(n[486], i([0, 1, 10, 4, 5, 485, 40, 212, 159, 3, 22, 68, 81, 2]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var f = function (e, t, n, i, o, r) {
- this.selections = e, this.modelVersionId = t, this.oldSelections = n, this.oldModelVersionId = i, this.source = o, this.reason = r
- };
- t.CursorStateChangedEvent = f;
- var m = function () {
- function e(e, t) {
- this.modelVersionId = e.getVersionId(), this.cursorState = t.getAll()
- }
- return e.prototype.equals = function (e) {
- if (!e) return !1;
- if (this.modelVersionId !== e.modelVersionId) return !1;
- if (this.cursorState.length !== e.cursorState.length) return !1;
- for (var t = 0, n = this.cursorState.length; t < n; t++) if (!this.cursorState[t].equals(e.cursorState[t])) return !1;
- return !0
- }, e
- }();
- t.CursorModelState = m;
- var v = function () {
- function e(e, t, n) {
- this._model = e, this._autoClosedCharactersDecorations = t, this._autoClosedEnclosingDecorations = n
- }
- return e.getAllAutoClosedCharacters = function (e) {
- for (var t = [], n = 0, i = e; n < i.length; n++) {
- var o = i[n]
- ;t = t.concat(o.getAutoClosedCharactersRanges())
- }
- return t
- }, e.prototype.dispose = function () {
- this._autoClosedCharactersDecorations = this._model.deltaDecorations(this._autoClosedCharactersDecorations, []), this._autoClosedEnclosingDecorations = this._model.deltaDecorations(this._autoClosedEnclosingDecorations, [])
- }, e.prototype.getAutoClosedCharactersRanges = function () {
- for (var e = [], t = 0; t < this._autoClosedCharactersDecorations.length; t++) {
- var n = this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);
- n && e.push(n)
- }
- return e
- }, e.prototype.isValid = function (e) {
- for (var t = [], n = 0; n < this._autoClosedEnclosingDecorations.length; n++) {
- var i = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[n]);
- if (i && (t.push(i), i.startLineNumber !== i.endLineNumber)) return !1
- }
- t.sort(d.Range.compareRangesUsingStarts), e.sort(d.Range.compareRangesUsingStarts);
- for (n = 0; n < e.length; n++) {
- if (n >= t.length) return !1;
- if (!t[n].strictContainsRange(e[n])) return !1
- }
- return !0
- }, e
- }(), _ = function (e) {
- function t(t, n, o) {
- var r = e.call(this) || this
- ;r._onDidReachMaxCursorCount = r._register(new i.Emitter), r.onDidReachMaxCursorCount = r._onDidReachMaxCursorCount.event, r._onDidAttemptReadOnlyEdit = r._register(new i.Emitter), r.onDidAttemptReadOnlyEdit = r._onDidAttemptReadOnlyEdit.event, r._onDidChange = r._register(new i.Emitter), r.onDidChange = r._onDidChange.event, r._configuration = t, r._model = n, r._knownModelVersionId = r._model.getVersionId(), r._viewModel = o, r.context = new a.CursorContext(r._configuration, r._model, r._viewModel), r._cursors = new s.CursorCollection(r.context), r._isHandling = !1, r._isDoingComposition = !1, r._selectionsWhenCompositionStarted = null, r._columnSelectData = null, r._autoClosedActions = [], r._prevEditOperationType = 0, r._register(r._model.onDidChangeRawContent((function (e) {
- if (r._knownModelVersionId = e.versionId, !r._isHandling) {
- var t = e.containsEvent(1);
- r._onModelContentChanged(t)
- }
- }))), r._register(o.addEventListener((function (e) {
- (function (e) {
- for (var t = 0, n = e.length; t < n; t++) if (8 === e[t].type) return !0;
- return !1
- })(e) && r._knownModelVersionId === r._model.getVersionId() && r.setStates("viewModel", 0, r.getAll())
- })));
- var l = function () {
- r.context = new a.CursorContext(r._configuration, r._model, r._viewModel), r._cursors.updateContext(r.context)
- };
- return r._register(r._model.onDidChangeLanguage((function (e) {
- l()
- }))), r._register(r._model.onDidChangeLanguageConfiguration((function () {
- l()
- }))), r._register(r._model.onDidChangeOptions((function () {
- l()
- }))), r._register(r._configuration.onDidChange((function (e) {
- a.CursorConfiguration.shouldRecreate(e) && l()
- }))), r
- }
- return r(t, e), t.prototype.dispose = function () {
- this._cursors.dispose(), this._autoClosedActions = g.dispose(this._autoClosedActions), e.prototype.dispose.call(this)
- }, t.prototype._validateAutoClosedActions = function () {
- if (this._autoClosedActions.length > 0) for (var e = this._cursors.getSelections(), t = 0; t < this._autoClosedActions.length; t++) {
- var n = this._autoClosedActions[t];
- n.isValid(e) || (n.dispose(), this._autoClosedActions.splice(t, 1), t--)
- }
- }, t.prototype.getPrimaryCursor = function () {
- return this._cursors.getPrimaryCursor()
- }, t.prototype.getLastAddedCursorIndex = function () {
- return this._cursors.getLastAddedCursorIndex()
- }, t.prototype.getAll = function () {
- return this._cursors.getAll()
- }, t.prototype.setStates = function (e, n, i) {
- null !== i && i.length > t.MAX_CURSOR_COUNT && (i = i.slice(0, t.MAX_CURSOR_COUNT), this._onDidReachMaxCursorCount.fire(void 0));
- var o = new m(this._model, this);
- this._cursors.setStates(i), this._cursors.normalize(), this._columnSelectData = null, this._validateAutoClosedActions(), this._emitStateChangedIfNecessary(e, n, o)
- }, t.prototype.setColumnSelectData = function (e) {
- this._columnSelectData = e
- }, t.prototype.reveal = function (e, t, n, i) {
- this._revealRange(e, n, 0, t, i)
- }, t.prototype.revealRange = function (e, t, n, i, o) {
- this.emitCursorRevealRange(e, n, i, t, o)
- }, t.prototype.scrollTo = function (e) {
- this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop: e})
- }, t.prototype.saveState = function () {
- for (var e = [], t = this._cursors.getSelections(), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- e.push({
- inSelectionMode: !o.isEmpty(),
- selectionStart: {lineNumber: o.selectionStartLineNumber, column: o.selectionStartColumn},
- position: {lineNumber: o.positionLineNumber, column: o.positionColumn}
- })
- }
- return e
- }, t.prototype.restoreState = function (e) {
- for (var t = [], n = 0, i = e.length; n < i; n++) {
- var o = e[n], r = 1, s = 1;
- o.position && o.position.lineNumber && (r = o.position.lineNumber), o.position && o.position.column && (s = o.position.column);
- var l = r, u = s;
- o.selectionStart && o.selectionStart.lineNumber && (l = o.selectionStart.lineNumber), o.selectionStart && o.selectionStart.column && (u = o.selectionStart.column), t.push({
- selectionStartLineNumber: l,
- selectionStartColumn: u,
- positionLineNumber: r,
- positionColumn: s
- })
- }
- this.setStates("restoreState", 0, a.CursorState.fromModelSelections(t)), this.reveal("restoreState", !0, 0, 1)
- }, t.prototype._onModelContentChanged = function (e) {
- if (this._prevEditOperationType = 0, e) this._cursors.dispose(), this._cursors = new s.CursorCollection(this.context), this._validateAutoClosedActions(), this._emitStateChangedIfNecessary("model", 1, null); else {
- var t = this._cursors.readSelectionFromMarkers();
- this.setStates("modelChange", 2, a.CursorState.fromModelSelections(t))
- }
- }, t.prototype.getSelection = function () {
- return this._cursors.getPrimaryCursor().modelState.selection
- }, t.prototype.getColumnSelectData = function () {
- if (this._columnSelectData) return this._columnSelectData;
- var e = this._cursors.getPrimaryCursor().viewState.selectionStart.getStartPosition(), t = e.lineNumber,
- n = a.CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, e);
- return {
- isReal: !1,
- fromViewLineNumber: t,
- fromViewVisualColumn: n,
- toViewLineNumber: t,
- toViewVisualColumn: n
- }
- }, t.prototype.getSelections = function () {
- return this._cursors.getSelections()
- }, t.prototype.getViewSelections = function () {
- return this._cursors.getViewSelections()
- }, t.prototype.getPosition = function () {
- return this._cursors.getPrimaryCursor().modelState.position
- }, t.prototype.setSelections = function (e, t) {
- this.setStates(e, 0, a.CursorState.fromModelSelections(t))
- }, t.prototype.getPrevEditOperationType = function () {
- return this._prevEditOperationType
- }, t.prototype.setPrevEditOperationType = function (e) {
- this._prevEditOperationType = e
- }, t.prototype._pushAutoClosedAction = function (e, t) {
- for (var n = [], i = [], o = 0, r = e.length; o < r; o++) n.push({
- range: e[o],
- options: {inlineClassName: "auto-closed-character", stickiness: 1}
- }), i.push({range: t[o], options: {stickiness: 1}});
- var s = this._model.deltaDecorations([], n), a = this._model.deltaDecorations([], i);
- this._autoClosedActions.push(new v(this._model, s, a))
- }, t.prototype._executeEditOperation = function (e) {
- if (e) {
- e.shouldPushStackElementBefore && this._model.pushStackElement();
- var t = y.executeCommands(this._model, this._cursors.getSelections(), e.commands);
- if (t) {
- this._interpretCommandResult(t);
- for (var n = [], i = [], o = 0; o < e.commands.length; o++) {
- var r = e.commands[o];
- r instanceof u.TypeWithAutoClosingCommand && r.enclosingRange && r.closeCharacterRange && (n.push(r.closeCharacterRange), i.push(r.enclosingRange))
- }
- n.length > 0 && this._pushAutoClosedAction(n, i), this._prevEditOperationType = e.type
- }
- e.shouldPushStackElementAfter && this._model.pushStackElement()
- }
- }, t.prototype._interpretCommandResult = function (e) {
- e && 0 !== e.length || (e = this._cursors.readSelectionFromMarkers()), this._columnSelectData = null, this._cursors.setSelections(e), this._cursors.normalize()
- }, t.prototype._emitStateChangedIfNecessary = function (e, t, n) {
- var i = new m(this._model, this);
- if (i.equals(n)) return !1;
- var o = this._cursors.getSelections(), r = this._cursors.getViewSelections();
- try {
- this._beginEmit().emit(new p.ViewCursorStateChangedEvent(r, o))
- } finally {
- this._endEmit()
- }
- if (!n || n.cursorState.length !== i.cursorState.length || i.cursorState.some((function (e, t) {
- return !e.modelState.equals(n.cursorState[t].modelState)
- }))) {
- var s = n ? n.cursorState.map((function (e) {
- return e.modelState.selection
- })) : null, a = n ? n.modelVersionId : 0;
- this._onDidChange.fire(new f(o, i.modelVersionId, s, a, e || "keyboard", t))
- }
- return !0
- }, t.prototype._revealRange = function (e, t, n, i, o) {
- var r = this._cursors.getViewPositions(), s = r[0]
- ;
- if (1 === t) for (var a = 1; a < r.length; a++) r[a].isBefore(s) && (s = r[a]); else if (2 === t) for (a = 1; a < r.length; a++) s.isBeforeOrEqual(r[a]) && (s = r[a]); else if (r.length > 1) return;
- var l = new d.Range(s.lineNumber, s.column, s.lineNumber, s.column);
- this.emitCursorRevealRange(e, l, n, i, o)
- }, t.prototype.emitCursorRevealRange = function (e, t, n, i, o) {
- try {
- this._beginEmit().emit(new p.ViewRevealRangeRequestEvent(e, t, n, i, o))
- } finally {
- this._endEmit()
- }
- }, t.prototype._findAutoClosingPairs = function (e) {
- if (!e.length) return null;
- for (var t = [], n = 0, i = e.length; n < i; n++) {
- var o = e[n];
- if (!o.text || o.text.indexOf("\n") >= 0) return null;
- var r = o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);
- if (!r) return null;
- var s = r[1], a = this.context.config.autoClosingPairsClose2.get(s);
- if (!a || 1 !== a.length) return null;
- var l = a[0].open, u = o.text.length - r[2].length - 1, d = o.text.lastIndexOf(l, u - 1);
- if (-1 === d) return null;
- t.push([d, u])
- }
- return t
- }, t.prototype.executeEdits = function (e, t, n) {
- var i = this, o = null;
- "snippet" === e && (o = this._findAutoClosingPairs(t)), o && (t[0]._isTracked = !0)
- ;var r = [], s = [], a = this._model.pushEditOperations(this.getSelections(), t, (function (e) {
- if (o) for (var t = 0, a = o.length; t < a; t++) {
- var l = o[t], u = l[0], c = l[1], h = e[t], p = h.range.startLineNumber,
- g = h.range.startColumn - 1 + u, f = h.range.startColumn - 1 + c;
- r.push(new d.Range(p, f + 1, p, f + 2)), s.push(new d.Range(p, g + 1, p, f + 2))
- }
- var m = n(e);
- return m && (i._isHandling = !0), m
- }));
- a && (this._isHandling = !1, this.setSelections(e, a)), r.length > 0 && this._pushAutoClosedAction(r, s)
- }, t.prototype.trigger = function (e, t, i) {
- var o = h.Handler;
- if (t === o.CompositionStart) return this._isDoingComposition = !0, void (this._selectionsWhenCompositionStarted = this.getSelections().slice(0));
- if (t === o.CompositionEnd && (this._isDoingComposition = !1), this._configuration.options.get(68)) this._onDidAttemptReadOnlyEdit.fire(void 0); else {
- var r = new m(this._model, this), s = 0;
- t !== o.Undo && t !== o.Redo && this._cursors.stopTrackingSelections(), this._cursors.ensureValidState(), this._isHandling = !0;
- try {
- switch (t) {
- case o.Type:
- this._type(e, i.text);
- break;
- case o.ReplacePreviousChar:
- this._replacePreviousChar(i.text, i.replaceCharCnt);
- break;
- case o.Paste:
- s = 4, this._paste(i.text, i.pasteOnNewLine, i.multicursorText || []);
- break;
- case o.Cut:
- this._cut();
- break;
- case o.Undo:
- s = 5, this._interpretCommandResult(this._model.undo());
- break;
- case o.Redo:
- s = 6, this._interpretCommandResult(this._model.redo());
- break;
- case o.ExecuteCommand:
- this._externalExecuteCommand(i);
- break;
- case o.ExecuteCommands:
- this._externalExecuteCommands(i);
- break;
- case o.CompositionEnd:
- this._interpretCompositionEnd(e)
- }
- } catch (e) {
- n.onUnexpectedError(e)
- }
- this._isHandling = !1, t !== o.Undo && t !== o.Redo && this._cursors.startTrackingSelections(), this._validateAutoClosedActions(), this._emitStateChangedIfNecessary(e, s, r) && this._revealRange(e, 0, 0, !0, 0)
- }
- }, t.prototype._interpretCompositionEnd = function (e) {
- if (!this._isDoingComposition && "keyboard" === e) {
- var t = v.getAllAutoClosedCharacters(this._autoClosedActions)
- ;this._executeEditOperation(u.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this._selectionsWhenCompositionStarted, this.getSelections(), t)), this._selectionsWhenCompositionStarted = null
- }
- }, t.prototype._type = function (e, t) {
- if (this._isDoingComposition || "keyboard" !== e) this._executeEditOperation(u.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), t)); else for (var n = t.length, i = 0; i < n;) {
- var r = o.nextCharLength(t, i), s = t.substr(i, r),
- a = v.getAllAutoClosedCharacters(this._autoClosedActions);
- this._executeEditOperation(u.TypeOperations.typeWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), a, s)), i += r
- }
- }, t.prototype._replacePreviousChar = function (e, t) {
- this._executeEditOperation(u.TypeOperations.replacePreviousChar(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), e, t))
- },
- t.prototype._paste = function (e, t, n) {
- this._executeEditOperation(u.TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), e, t, n))
- }, t.prototype._cut = function () {
- this._executeEditOperation(l.DeleteOperations.cut(this.context.config, this.context.model, this.getSelections()))
- }, t.prototype._externalExecuteCommand = function (e) {
- this._cursors.killSecondaryCursors(), this._executeEditOperation(new a.EditOperationResult(0, [e], {
- shouldPushStackElementBefore: !1,
- shouldPushStackElementAfter: !1
- }))
- }, t.prototype._externalExecuteCommands = function (e) {
- this._executeEditOperation(new a.EditOperationResult(0, e, {
- shouldPushStackElementBefore: !1,
- shouldPushStackElementAfter: !1
- }))
- }, t.MAX_CURSOR_COUNT = 1e4, t
- }(p.ViewEventEmitter);
- t.Cursor = _;
- var y = function () {
- function e() {
- }
- return e.executeCommands = function (e, t, n) {
- for (var i = {
- model: e,
- selectionsBefore: t,
- trackedRanges: [],
- trackedRangesDirection: []
- }, o = this._innerExecuteCommands(i, n), r = 0, s = i.trackedRanges.length; r < s; r++) i.model._setTrackedRange(i.trackedRanges[r], null, 0);
- return o
- }, e._innerExecuteCommands = function (e, t) {
- if (this._arrayIsEmpty(t)) return null;
- var n = this._getEditOperations(e, t);
- if (0 === n.operations.length) return null;
- var i = n.operations, o = this._getLoserCursorMap(i);
- if (o.hasOwnProperty("0")) return console.warn("Ignoring commands"), null;
- for (var r = [], s = 0, a = i.length; s < a; s++) o.hasOwnProperty(i[s].identifier.major.toString()) || r.push(i[s]);
- n.hadTrackedEditOperation && r.length > 0 && (r[0]._isTracked = !0);
- var l = e.model.pushEditOperations(e.selectionsBefore, r, (function (n) {
- for (var i = [], o = 0; o < e.selectionsBefore.length; o++) i[o] = [];
- for (var r = 0, s = n; r < s.length; r++) {
- var a = s[r];
- a.identifier && i[a.identifier.major].push(a)
- }
- var l = function (e, t) {
- return e.identifier.minor - t.identifier.minor
- }, u = [], d = function (n) {
- i[n].length > 0 ? (i[n].sort(l), u[n] = t[n].computeCursorState(e.model, {
- getInverseEditOperations: function () {
- return i[n]
- }, getTrackedSelection: function (t) {
- var n = parseInt(t, 10), i = e.model._getTrackedRange(e.trackedRanges[n])
- ;
- return 0 === e.trackedRangesDirection[n] ? new c.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn) : new c.Selection(i.endLineNumber, i.endColumn, i.startLineNumber, i.startColumn)
- }
- })) : u[n] = e.selectionsBefore[n]
- };
- for (o = 0; o < e.selectionsBefore.length; o++) d(o);
- return u
- }));
- l || (l = e.selectionsBefore);
- var u = [];
- for (var d in o) o.hasOwnProperty(d) && u.push(parseInt(d, 10));
- u.sort((function (e, t) {
- return t - e
- }));
- for (var h = 0, p = u; h < p.length; h++) {
- var g = p[h];
- l.splice(g, 1)
- }
- return l
- }, e._arrayIsEmpty = function (e) {
- for (var t = 0, n = e.length; t < n; t++) if (e[t]) return !1;
- return !0
- }, e._getEditOperations = function (e, t) {
- for (var n = [], i = !1, o = 0, r = t.length; o < r; o++) {
- var s = t[o];
- if (s) {
- var a = this._getEditOperationsFromCommand(e, o, s);
- n = n.concat(a.operations), i = i || a.hadTrackedEditOperation
- }
- }
- return {operations: n, hadTrackedEditOperation: i}
- }, e._getEditOperationsFromCommand = function (e, t, i) {
- var o = [], r = 0, s = function (e, n, s) {
- void 0 === s && (s = !1), e.isEmpty() && "" === n || o.push({
- identifier: {major: t, minor: r++}, range: e, text: n, forceMoveMarkers: s,
- isAutoWhitespaceEdit: i.insertsAutoWhitespace
- })
- }, a = !1, l = {
- addEditOperation: s, addTrackedEditOperation: function (e, t, n) {
- a = !0, s(e, t, n)
- }, trackSelection: function (t, n) {
- var i;
- if (t.isEmpty()) if ("boolean" == typeof n) i = n ? 2 : 3; else {
- var o = e.model.getLineMaxColumn(t.startLineNumber);
- i = t.startColumn === o ? 2 : 3
- } else i = 1;
- var r = e.trackedRanges.length, s = e.model._setTrackedRange(null, t, i);
- return e.trackedRanges[r] = s, e.trackedRangesDirection[r] = t.getDirection(), r.toString()
- }
- };
- try {
- i.getEditOperations(e.model, l)
- } catch (e) {
- return n.onUnexpectedError(e), {operations: [], hadTrackedEditOperation: !1}
- }
- return {operations: o, hadTrackedEditOperation: a}
- }, e._getLoserCursorMap = function (e) {
- (e = e.slice(0)).sort((function (e, t) {
- return -d.Range.compareRangesUsingEnds(e.range, t.range)
- }));
- for (var t = {}, n = 1; n < e.length; n++) {
- var i = e[n - 1], o = e[n];
- if (i.range.getStartPosition().isBefore(o.range.getEndPosition())) {
- var r = void 0;
- t[(r = i.identifier.major > o.identifier.major ? i.identifier.major : o.identifier.major).toString()] = !0
- ;
- for (var s = 0; s < e.length; s++) e[s].identifier.major === r && (e.splice(s, 1), s < n && n--, s--);
- n > 0 && n--
- }
- }
- return t
- }, e
- }()
- })),define(n[214], i([0, 1, 5, 93, 63]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = {
- getInitialState: function () {
- return o.NULL_STATE
- }, tokenize2: function (e, t, n) {
- return o.nullTokenize2(0, e, t, n)
- }
- };
- t.tokenizeToString = function (e, t) {
- return void 0 === t && (t = r), function (e, t) {
- for (var o = '<div class="monaco-tokenized-source">', r = e.split(/\r\n|\r|\n/), s = t.getInitialState(), a = 0, l = r.length; a < l; a++) {
- var u = r[a];
- a > 0 && (o += "<br/>");
- var d = t.tokenize2(u, s, 0);
- i.LineTokens.convertToEndOffset(d.tokens, u.length);
- for (var c = new i.LineTokens(d.tokens, u).inflate(), h = 0, p = 0, g = c.getCount(); p < g; p++) {
- var f = c.getClassName(p), m = c.getEndOffset(p);
- o += '<span class="' + f + '">' + n.escape(u.substring(h, m)) + "</span>", h = m
- }
- s = d.endState
- }
- return o += "</div>"
- }(e, t || r)
- }, t.tokenizeLineToHTML = function (e, t, n, i, o, r, s) {
- for (var a = "<div>", l = i, u = 0, d = 0, c = t.getCount(); d < c; d++) {
- var h = t.getEndOffset(d);
- if (!(h <= i)) {
- for (var p = ""; l < h && l < o; l++) {
- var g = e.charCodeAt(l);
- switch (g) {
- case 9:
- var f = r - (l + u) % r;
- for (u += f - 1; f > 0;) p += s ? " " : " ", f--;
- break;
- case 60:
- p += "<";
- break;
- case 62:
- p += ">";
- break;
- case 38:
- p += "&";
- break;
- case 0:
- p += "�";
- break;
- case 65279:
- case 8232:
- p += "�";
- break;
- case 13:
- p += "​";
- break;
- case 32:
- p += s ? " " : " ";
- break;
- default:
- p += String.fromCharCode(g)
- }
- }
- if (a += '<span style="' + t.getInlineStyle(d, n) + '">' + p + "</span>", h > o || l >= o) break
- }
- }
- return a += "</div>"
- }
- })),define(n[84], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ITextModelService = n.createDecorator("textModelService")
- })),define(n[114], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ITextResourceConfigurationService = n.createDecorator("textResourceConfigurationService"), t.ITextResourcePropertiesService = n.createDecorator("textResourcePropertiesService")
- })),define(n[215], i([0, 1, 4, 339, 17]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var r = function () {
- function e() {
- var e = this;
- this._onDidChange = new n.Emitter, this.onDidChange = this._onDidChange.event, this._updateColorMap(), o.TokenizationRegistry.onDidChange((function (t) {
- t.changedColorMap && e._updateColorMap()
- }))
- }
- return e.getInstance = function () {
- return this._INSTANCE || (this._INSTANCE = new e), this._INSTANCE
- }, e.prototype._updateColorMap = function () {
- var e = o.TokenizationRegistry.getColorMap();
- if (!e) return this._colors = [i.RGBA8.Empty], void (this._backgroundIsLight = !0);
- this._colors = [i.RGBA8.Empty];
- for (var t = 1; t < e.length; t++) {
- var n = e[t].rgba;
- this._colors[t] = new i.RGBA8(n.r, n.g, n.b, Math.round(255 * n.a))
- }
- var r = e[2].getRelativeLuminance();
- this._backgroundIsLight = r >= .5, this._onDidChange.fire(void 0)
- }, e.prototype.getColor = function (e) {
- return (e < 1 || e >= this._colors.length) && (e = 2), this._colors[e]
- }, e.prototype.backgroundIsLight = function () {
- return this._backgroundIsLight
- }, e._INSTANCE = null, e
- }();
- t.MinimapTokensColorTracker = r
- })),define(n[161], i([0, 1, 19, 13, 3, 30, 81, 194, 69]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var u = function (e, t) {
- this.outputLineIndex = e, this.outputOffset = t
- };
- t.OutputPosition = u;
- var d = function () {
- function e(e, t, n) {
- this.breakOffsets = e, this.breakOffsetsVisibleColumn = t, this.wrappedTextIndentLength = n
- }
- return e.getInputOffsetOfOutputPosition = function (e, t, n) {
- return 0 === t ? n : e[t - 1] + n
- }, e.getOutputPositionOfInputOffset = function (e, t) {
- for (var n = 0, i = e.length - 1, o = 0, r = 0; n <= i;) {
- var s = e[o = n + (i - n) / 2 | 0];
- if (t < (r = o > 0 ? e[o - 1] : 0)) i = o - 1; else {
- if (!(t >= s)) break;
- n = o + 1
- }
- }
- return new u(o, t - r)
- }, e
- }();
- t.LineBreakData = d;
- var c = function () {
- function e(e) {
- this._lines = e
- }
- return e.prototype.convertViewPositionToModelPosition = function (e) {
- return this._lines.convertViewPositionToModelPosition(e.lineNumber, e.column)
- }, e.prototype.convertViewRangeToModelRange = function (e) {
- return this._lines.convertViewRangeToModelRange(e)
- }, e.prototype.validateViewPosition = function (e, t) {
- return this._lines.validateViewPosition(e.lineNumber, e.column, t)
- }, e.prototype.validateViewRange = function (e, t) {
- return this._lines.validateViewRange(e, t)
- }, e.prototype.convertModelPositionToViewPosition = function (e) {
- return this._lines.convertModelPositionToViewPosition(e.lineNumber, e.column)
- }, e.prototype.convertModelRangeToViewRange = function (e) {
- return this._lines.convertModelRangeToViewRange(e)
- }, e.prototype.modelPositionIsVisible = function (e) {
- return this._lines.modelPositionIsVisible(e.lineNumber, e.column)
- }, e
- }();
- t.CoordinatesConverter = c;
- var h = function () {
- function e(e) {
- this._counts = e, this._isValid = !1, this._validEndIndex = -1, this._modelToView = [], this._viewToModel = []
- }
- return e.prototype._invalidate = function (e) {
- this._isValid = !1, this._validEndIndex = Math.min(this._validEndIndex, e - 1)
- }, e.prototype._ensureValid = function () {
- if (!this._isValid) {
- for (var e = this._validEndIndex + 1, t = this._counts.length; e < t; e++) {
- var n = this._counts[e], i = e > 0 ? this._modelToView[e - 1] : 0;
- this._modelToView[e] = i + n;
- for (var o = 0; o < n; o++) this._viewToModel[i + o] = e
- }
- this._modelToView.length = this._counts.length,
- this._viewToModel.length = this._modelToView[this._modelToView.length - 1], this._isValid = !0, this._validEndIndex = this._counts.length - 1
- }
- }, e.prototype.changeValue = function (e, t) {
- this._counts[e] !== t && (this._counts[e] = t, this._invalidate(e))
- }, e.prototype.removeValues = function (e, t) {
- this._counts.splice(e, t), this._invalidate(e)
- }, e.prototype.insertValues = function (e, t) {
- this._counts = n.arrayInsert(this._counts, e, t), this._invalidate(e)
- }, e.prototype.getTotalValue = function () {
- return this._ensureValid(), this._viewToModel.length
- }, e.prototype.getAccumulatedValue = function (e) {
- return this._ensureValid(), this._modelToView[e]
- }, e.prototype.getIndexOf = function (e) {
- this._ensureValid();
- var t = this._viewToModel[e], n = t > 0 ? this._modelToView[t - 1] : 0;
- return new a.PrefixSumIndexOfResult(t, e - n)
- }, e
- }(), p = function () {
- function e(e, t, n, i, o, r, s, a) {
- this.model = e, this._validModelVersionId = -1, this._domLineBreaksComputerFactory = t, this._monospaceLineBreaksComputerFactory = n, this.fontInfo = i, this.tabSize = o, this.wrappingStrategy = r, this.wrappingColumn = s,
- this.wrappingIndent = a, this._constructLines(!0, null)
- }
- return e.prototype.dispose = function () {
- this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, [])
- }, e.prototype.createCoordinatesConverter = function () {
- return new c(this)
- }, e.prototype._constructLines = function (e, t) {
- var n = this;
- this.lines = [], e && (this.hiddenAreasIds = []);
- for (var i = this.model.getLinesContent(), r = i.length, s = this.createLineBreaksComputer(), a = 0; a < r; a++) s.addRequest(i[a], t ? t[a] : null);
- var l = s.finalize(), u = [], d = this.hiddenAreasIds.map((function (e) {
- return n.model.getDecorationRange(e)
- })).sort(o.Range.compareRangesUsingStarts), c = 1, p = 0, g = -1, f = g + 1 < d.length ? p + 1 : r + 2;
- for (a = 0; a < r; a++) {
- var m = a + 1;
- m === f && (c = d[++g].startLineNumber, p = d[g].endLineNumber, f = g + 1 < d.length ? p + 1 : r + 2);
- var v = m >= c && m <= p, _ = C(l[a], !v);
- u[a] = _.getViewLineCount(), this.lines[a] = _
- }
- this._validModelVersionId = this.model.getVersionId(), this.prefixSumComputer = new h(u)
- }, e.prototype.getHiddenAreas = function () {
- var e = this;
- return this.hiddenAreasIds.map((function (t) {
- return e.model.getDecorationRange(t)
- }))
- }, e.prototype._reduceRanges = function (e) {
- var t = this;
- if (0 === e.length) return [];
- for (var n = e.map((function (e) {
- return t.model.validateRange(e)
- })).sort(o.Range.compareRangesUsingStarts), i = [], r = n[0].startLineNumber, s = n[0].endLineNumber, a = 1, l = n.length; a < l; a++) {
- var u = n[a];
- u.startLineNumber > s + 1 ? (i.push(new o.Range(r, 1, s, 1)), r = u.startLineNumber, s = u.endLineNumber) : u.endLineNumber > s && (s = u.endLineNumber)
- }
- return i.push(new o.Range(r, 1, s, 1)), i
- }, e.prototype.setHiddenAreas = function (e) {
- var t = this, n = this._reduceRanges(e), i = this.hiddenAreasIds.map((function (e) {
- return t.model.getDecorationRange(e)
- })).sort(o.Range.compareRangesUsingStarts);
- if (n.length === i.length) {
- for (var s = !1, a = 0; a < n.length; a++) if (!n[a].equalsRange(i[a])) {
- s = !0;
- break
- }
- if (!s) return !1
- }
- for (var l = [], u = 0, d = n; u < d.length; u++) {
- var c = d[u];
- l.push({range: c, options: r.ModelDecorationOptions.EMPTY})
- }
- this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, l);
- var h = n, p = 1, g = 0, f = -1, m = f + 1 < h.length ? g + 1 : this.lines.length + 2, v = !1;
- for (a = 0; a < this.lines.length; a++) {
- var _ = a + 1
- ;_ === m && (p = h[++f].startLineNumber, g = h[f].endLineNumber, m = f + 1 < h.length ? g + 1 : this.lines.length + 2);
- var y = !1;
- if (_ >= p && _ <= g ? this.lines[a].isVisible() && (this.lines[a] = this.lines[a].setVisible(!1), y = !0) : (v = !0, this.lines[a].isVisible() || (this.lines[a] = this.lines[a].setVisible(!0), y = !0)), y) {
- var C = this.lines[a].getViewLineCount();
- this.prefixSumComputer.changeValue(a, C)
- }
- }
- return v || this.setHiddenAreas([]), !0
- }, e.prototype.modelPositionIsVisible = function (e, t) {
- return !(e < 1 || e > this.lines.length) && this.lines[e - 1].isVisible()
- }, e.prototype.setTabSize = function (e) {
- return this.tabSize !== e && (this.tabSize = e, this._constructLines(!1, null), !0)
- }, e.prototype.setWrappingSettings = function (e, t, n, i) {
- var o = this.fontInfo.equals(e), r = this.wrappingStrategy === t, s = this.wrappingColumn === n,
- a = this.wrappingIndent === i;
- if (o && r && s && a) return !1;
- var l = o && r && !s && a;
- this.fontInfo = e, this.wrappingStrategy = t, this.wrappingColumn = n, this.wrappingIndent = i;
- var u = null;
- if (l) {
- u = [];
- for (var d = 0, c = this.lines.length; d < c; d++) u[d] = this.lines[d].getLineBreakData()
- }
- return this._constructLines(!1, u), !0
- }, e.prototype.createLineBreaksComputer = function () {
- return ("advanced" === this.wrappingStrategy ? this._domLineBreaksComputerFactory : this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo, this.tabSize, this.wrappingColumn, this.wrappingIndent)
- }, e.prototype.onModelFlushed = function () {
- this._constructLines(!0, null)
- }, e.prototype.onModelLinesDeleted = function (e, t, n) {
- if (e <= this._validModelVersionId) return null;
- var i = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1,
- o = this.prefixSumComputer.getAccumulatedValue(n - 1);
- return this.lines.splice(t - 1, n - t + 1), this.prefixSumComputer.removeValues(t - 1, n - t + 1), new s.ViewLinesDeletedEvent(i, o)
- }, e.prototype.onModelLinesInserted = function (e, t, n, o) {
- if (e <= this._validModelVersionId) return null;
- for (var r = this.getHiddenAreas(), a = !1, l = new i.Position(t, 1), u = 0, d = r; u < d.length; u++) {
- if (d[u].containsPosition(l)) {
- a = !0;
- break
- }
- }
- for (var c = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1, h = 0, p = [], g = [], f = 0, m = o.length; f < m; f++) {
- var v = C(o[f], !a);
- p.push(v);
- var _ = v.getViewLineCount();
- h += _, g[f] = _
- }
- return this.lines = this.lines.slice(0, t - 1).concat(p).concat(this.lines.slice(t - 1)), this.prefixSumComputer.insertValues(t - 1, g), new s.ViewLinesInsertedEvent(c, c + h - 1)
- }, e.prototype.onModelLineChanged = function (e, t, n) {
- if (e <= this._validModelVersionId) return [!1, null, null, null];
- var i = t - 1, o = this.lines[i].getViewLineCount(), r = C(n, this.lines[i].isVisible());
- this.lines[i] = r;
- var a = this.lines[i].getViewLineCount(), l = !1, u = 0, d = -1, c = 0, h = -1, p = 0, g = -1;
- return o > a ? (g = (p = (d = (u = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1) + a - 1) + 1) + (o - a) - 1, l = !0) : o < a ? (h = (c = (d = (u = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1) + o - 1) + 1) + (a - o) - 1, l = !0) : d = (u = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1) + a - 1, this.prefixSumComputer.changeValue(i, a), [l, u <= d ? new s.ViewLinesChangedEvent(u, d) : null, c <= h ? new s.ViewLinesInsertedEvent(c, h) : null, p <= g ? new s.ViewLinesDeletedEvent(p, g) : null]
- }, e.prototype.acceptVersionId = function (e) {
- this._validModelVersionId = e,
- 1 !== this.lines.length || this.lines[0].isVisible() || this.setHiddenAreas([])
- }, e.prototype.getViewLineCount = function () {
- return this.prefixSumComputer.getTotalValue()
- }, e.prototype._toValidViewLineNumber = function (e) {
- if (e < 1) return 1;
- var t = this.getViewLineCount();
- return e > t ? t : 0 | e
- }, e.prototype.getActiveIndentGuide = function (e, t, n) {
- e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t), n = this._toValidViewLineNumber(n);
- var i = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn(e)),
- o = this.convertViewPositionToModelPosition(t, this.getViewLineMinColumn(t)),
- r = this.convertViewPositionToModelPosition(n, this.getViewLineMinColumn(n)),
- s = this.model.getActiveIndentGuide(i.lineNumber, o.lineNumber, r.lineNumber),
- a = this.convertModelPositionToViewPosition(s.startLineNumber, 1),
- l = this.convertModelPositionToViewPosition(s.endLineNumber, this.model.getLineMaxColumn(s.endLineNumber));
- return {startLineNumber: a.lineNumber, endLineNumber: l.lineNumber, indent: s.indent}
- }, e.prototype.getViewLinesIndentGuides = function (e, t) {
- e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t);
- for (var n = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn(e)), o = this.convertViewPositionToModelPosition(t, this.getViewLineMaxColumn(t)), r = [], s = [], a = [], l = n.lineNumber - 1, u = o.lineNumber - 1, d = null, c = l; c <= u; c++) {
- var h = this.lines[c];
- if (h.isVisible()) {
- var p = h.getViewLineNumberOfModelPosition(0, c === l ? n.column : 1),
- g = h.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn(c + 1)), f = 0;
- (S = g - p + 1) > 1 && 1 === h.getViewLineMinColumn(this.model, c + 1, g) && (f = 0 === p ? 1 : 2), s.push(S), a.push(f), null === d && (d = new i.Position(c + 1, 0))
- } else null !== d && (r = r.concat(this.model.getLinesIndentGuides(d.lineNumber, c)), d = null)
- }
- null !== d && (r = r.concat(this.model.getLinesIndentGuides(d.lineNumber, o.lineNumber)), d = null);
- for (var m = t - e + 1, v = new Array(m), _ = 0, y = 0, C = r.length; y < C; y++) {
- var b = r[y], S = Math.min(m - _, s[y]), w = void 0;
- w = 2 === (f = a[y]) ? 0 : 1 === f ? 1 : S;
- for (var E = 0; E < S; E++) E === w && (b = 0), v[_++] = b
- }
- return v
- }, e.prototype.getViewLineContent = function (e) {
- e = this._toValidViewLineNumber(e);
- var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
- return this.lines[n].getViewLineContent(this.model, n + 1, i)
- }, e.prototype.getViewLineLength = function (e) {
- e = this._toValidViewLineNumber(e);
- var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
- return this.lines[n].getViewLineLength(this.model, n + 1, i)
- }, e.prototype.getViewLineMinColumn = function (e) {
- e = this._toValidViewLineNumber(e);
- var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
- return this.lines[n].getViewLineMinColumn(this.model, n + 1, i)
- }, e.prototype.getViewLineMaxColumn = function (e) {
- e = this._toValidViewLineNumber(e);
- var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
- return this.lines[n].getViewLineMaxColumn(this.model, n + 1, i)
- }, e.prototype.getViewLineData = function (e) {
- e = this._toValidViewLineNumber(e);
- var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
- return this.lines[n].getViewLineData(this.model, n + 1, i)
- }, e.prototype.getViewLinesData = function (e, t, n) {
- e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t);
- for (var i = this.prefixSumComputer.getIndexOf(e - 1), o = e, r = i.index, s = i.remainder, a = [], l = r, u = this.model.getLineCount(); l < u; l++) {
- var d = this.lines[l];
- if (d.isVisible()) {
- var c = l === r ? s : 0, h = d.getViewLineCount() - c, p = !1;
- o + h > t && (p = !0, h = t - o + 1);
- var g = c + h;
- if (d.getViewLinesData(this.model, l + 1, c, g, o - e, n, a), o += h, p) break
- }
- }
- return a
- }, e.prototype.validateViewPosition = function (e, t, n) {
- e = this._toValidViewLineNumber(e);
- var o = this.prefixSumComputer.getIndexOf(e - 1), r = o.index, s = o.remainder, a = this.lines[r],
- l = a.getViewLineMinColumn(this.model, r + 1, s), u = a.getViewLineMaxColumn(this.model, r + 1, s);
- t < l && (t = l), t > u && (t = u);
- var d = a.getModelColumnOfViewPosition(s, t);
- return this.model.validatePosition(new i.Position(r + 1, d)).equals(n) ? new i.Position(e, t) : this.convertModelPositionToViewPosition(n.lineNumber, n.column)
- }, e.prototype.validateViewRange = function (e, t) {
- var n = this.validateViewPosition(e.startLineNumber, e.startColumn, t.getStartPosition()),
- i = this.validateViewPosition(e.endLineNumber, e.endColumn, t.getEndPosition());
- return new o.Range(n.lineNumber, n.column, i.lineNumber, i.column)
- }, e.prototype.convertViewPositionToModelPosition = function (e, t) {
- e = this._toValidViewLineNumber(e);
- var n = this.prefixSumComputer.getIndexOf(e - 1), o = n.index, r = n.remainder,
- s = this.lines[o].getModelColumnOfViewPosition(r, t);
- return this.model.validatePosition(new i.Position(o + 1, s))
- }, e.prototype.convertViewRangeToModelRange = function (e) {
- var t = this.convertViewPositionToModelPosition(e.startLineNumber, e.startColumn),
- n = this.convertViewPositionToModelPosition(e.endLineNumber, e.endColumn);
- return new o.Range(t.lineNumber, t.column, n.lineNumber, n.column)
- }, e.prototype.convertModelPositionToViewPosition = function (e, t) {
- for (var n = this.model.validatePosition(new i.Position(e, t)), o = n.lineNumber, r = n.column, s = o - 1, a = !1; s > 0 && !this.lines[s].isVisible();) s--, a = !0
- ;
- if (0 === s && !this.lines[s].isVisible()) return new i.Position(1, 1);
- var l = 1 + (0 === s ? 0 : this.prefixSumComputer.getAccumulatedValue(s - 1));
- return a ? this.lines[s].getViewPositionOfModelPosition(l, this.model.getLineMaxColumn(s + 1)) : this.lines[o - 1].getViewPositionOfModelPosition(l, r)
- }, e.prototype.convertModelRangeToViewRange = function (e) {
- var t = this.convertModelPositionToViewPosition(e.startLineNumber, e.startColumn),
- n = this.convertModelPositionToViewPosition(e.endLineNumber, e.endColumn);
- return e.startLineNumber === e.endLineNumber && t.lineNumber !== n.lineNumber && n.column === this.getViewLineMinColumn(n.lineNumber) ? new o.Range(t.lineNumber, t.column, n.lineNumber - 1, this.getViewLineMaxColumn(n.lineNumber - 1)) : new o.Range(t.lineNumber, t.column, n.lineNumber, n.column)
- }, e.prototype._getViewLineNumberForModelPosition = function (e, t) {
- var n = e - 1;
- if (this.lines[n].isVisible()) {
- var i = 1 + (0 === n ? 0 : this.prefixSumComputer.getAccumulatedValue(n - 1));
- return this.lines[n].getViewLineNumberOfModelPosition(i, t)
- }
- for (; n > 0 && !this.lines[n].isVisible();) n--
- ;
- if (0 === n && !this.lines[n].isVisible()) return 1;
- var o = 1 + (0 === n ? 0 : this.prefixSumComputer.getAccumulatedValue(n - 1));
- return this.lines[n].getViewLineNumberOfModelPosition(o, this.model.getLineMaxColumn(n + 1))
- }, e.prototype.getAllOverviewRulerDecorations = function (e, t, n) {
- for (var i = this.model.getOverviewRulerDecorations(e, t), o = new w, r = 0, s = i; r < s.length; r++) {
- var a = s[r], l = a.options.overviewRuler, u = l ? l.position : 0;
- if (0 !== u) {
- var d = l.getColor(n),
- c = this._getViewLineNumberForModelPosition(a.range.startLineNumber, a.range.startColumn),
- h = this._getViewLineNumberForModelPosition(a.range.endLineNumber, a.range.endColumn);
- o.accept(d, c, h, u)
- }
- }
- return o.result
- }, e.prototype.getDecorationsInRange = function (e, t, n) {
- var r = this.convertViewPositionToModelPosition(e.startLineNumber, e.startColumn),
- s = this.convertViewPositionToModelPosition(e.endLineNumber, e.endColumn);
- if (s.lineNumber - r.lineNumber <= e.endLineNumber - e.startLineNumber) return this.model.getDecorationsInRange(new o.Range(r.lineNumber, 1, s.lineNumber, s.column), t, n)
- ;
- for (var a = [], l = r.lineNumber - 1, u = s.lineNumber - 1, d = null, c = l; c <= u; c++) {
- if (this.lines[c].isVisible()) null === d && (d = new i.Position(c + 1, c === l ? r.column : 1)); else if (null !== d) {
- var h = this.model.getLineMaxColumn(c);
- a = a.concat(this.model.getDecorationsInRange(new o.Range(d.lineNumber, d.column, c, h), t, n)), d = null
- }
- }
- null !== d && (a = a.concat(this.model.getDecorationsInRange(new o.Range(d.lineNumber, d.column, s.lineNumber, s.column), t, n)), d = null), a.sort((function (e, t) {
- var n = o.Range.compareRangesUsingStarts(e.range, t.range);
- return 0 === n ? e.id < t.id ? -1 : e.id > t.id ? 1 : 0 : n
- }));
- for (var p = [], g = 0, f = null, m = 0, v = a; m < v.length; m++) {
- var _ = v[m], y = _.id;
- f !== y && (f = y, p[g++] = _)
- }
- return p
- }, e
- }();
- t.SplitLinesCollection = p;
- var g = function () {
- function e() {
- }
- return e.prototype.isVisible = function () {
- return !0
- }, e.prototype.setVisible = function (e) {
- return e ? this : f.INSTANCE
- }, e.prototype.getLineBreakData = function () {
- return null
- }, e.prototype.getViewLineCount = function () {
- return 1
- }, e.prototype.getViewLineContent = function (e, t, n) {
- return e.getLineContent(t)
- },
- e.prototype.getViewLineLength = function (e, t, n) {
- return e.getLineLength(t)
- }, e.prototype.getViewLineMinColumn = function (e, t, n) {
- return e.getLineMinColumn(t)
- }, e.prototype.getViewLineMaxColumn = function (e, t, n) {
- return e.getLineMaxColumn(t)
- }, e.prototype.getViewLineData = function (e, t, n) {
- var i = e.getLineTokens(t), o = i.getLineContent();
- return new l.ViewLineData(o, !1, 1, o.length + 1, 0, i.inflate())
- }, e.prototype.getViewLinesData = function (e, t, n, i, o, r, s) {
- r[o] ? s[o] = this.getViewLineData(e, t, 0) : s[o] = null
- }, e.prototype.getModelColumnOfViewPosition = function (e, t) {
- return t
- }, e.prototype.getViewPositionOfModelPosition = function (e, t) {
- return new i.Position(e, t)
- }, e.prototype.getViewLineNumberOfModelPosition = function (e, t) {
- return e
- }, e.INSTANCE = new e, e
- }(), f = function () {
- function e() {
- }
- return e.prototype.isVisible = function () {
- return !1
- }, e.prototype.setVisible = function (e) {
- return e ? g.INSTANCE : this
- }, e.prototype.getLineBreakData = function () {
- return null
- }, e.prototype.getViewLineCount = function () {
- return 0
- }, e.prototype.getViewLineContent = function (e, t, n) {
- throw new Error("Not supported")
- }, e.prototype.getViewLineLength = function (e, t, n) {
- throw new Error("Not supported")
- }, e.prototype.getViewLineMinColumn = function (e, t, n) {
- throw new Error("Not supported")
- }, e.prototype.getViewLineMaxColumn = function (e, t, n) {
- throw new Error("Not supported")
- }, e.prototype.getViewLineData = function (e, t, n) {
- throw new Error("Not supported")
- }, e.prototype.getViewLinesData = function (e, t, n, i, o, r, s) {
- throw new Error("Not supported")
- }, e.prototype.getModelColumnOfViewPosition = function (e, t) {
- throw new Error("Not supported")
- }, e.prototype.getViewPositionOfModelPosition = function (e, t) {
- throw new Error("Not supported")
- }, e.prototype.getViewLineNumberOfModelPosition = function (e, t) {
- throw new Error("Not supported")
- }, e.INSTANCE = new e, e
- }(), m = function () {
- function e(e, t) {
- this._lineBreakData = e, this._isVisible = t
- }
- return e.prototype.isVisible = function () {
- return this._isVisible
- }, e.prototype.setVisible = function (e) {
- return this._isVisible = e, this
- }, e.prototype.getLineBreakData = function () {
- return this._lineBreakData
- },
- e.prototype.getViewLineCount = function () {
- return this._isVisible ? this._lineBreakData.breakOffsets.length : 0
- }, e.prototype.getInputStartOffsetOfOutputLineIndex = function (e) {
- return d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, e, 0)
- }, e.prototype.getInputEndOffsetOfOutputLineIndex = function (e, t, n) {
- return n + 1 === this._lineBreakData.breakOffsets.length ? e.getLineMaxColumn(t) - 1 : d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, n + 1, 0)
- }, e.prototype.getViewLineContent = function (e, t, n) {
- if (!this._isVisible) throw new Error("Not supported");
- var i = this.getInputStartOffsetOfOutputLineIndex(n),
- o = this.getInputEndOffsetOfOutputLineIndex(e, t, n),
- r = e.getValueInRange({startLineNumber: t, startColumn: i + 1, endLineNumber: t, endColumn: o + 1});
- return n > 0 && (r = _(this._lineBreakData.wrappedTextIndentLength) + r), r
- }, e.prototype.getViewLineLength = function (e, t, n) {
- if (!this._isVisible) throw new Error("Not supported");
- var i = this.getInputStartOffsetOfOutputLineIndex(n),
- o = this.getInputEndOffsetOfOutputLineIndex(e, t, n) - i
- ;
- return n > 0 && (o = this._lineBreakData.wrappedTextIndentLength + o), o
- }, e.prototype.getViewLineMinColumn = function (e, t, n) {
- if (!this._isVisible) throw new Error("Not supported");
- return n > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1
- }, e.prototype.getViewLineMaxColumn = function (e, t, n) {
- if (!this._isVisible) throw new Error("Not supported");
- return this.getViewLineContent(e, t, n).length + 1
- }, e.prototype.getViewLineData = function (e, t, n) {
- if (!this._isVisible) throw new Error("Not supported");
- var i = this.getInputStartOffsetOfOutputLineIndex(n),
- o = this.getInputEndOffsetOfOutputLineIndex(e, t, n),
- r = e.getValueInRange({startLineNumber: t, startColumn: i + 1, endLineNumber: t, endColumn: o + 1});
- n > 0 && (r = _(this._lineBreakData.wrappedTextIndentLength) + r);
- var s = n > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1, a = r.length + 1,
- u = n + 1 < this.getViewLineCount(), d = 0;
- n > 0 && (d = this._lineBreakData.wrappedTextIndentLength);
- var c = e.getLineTokens(t), h = 0 === n ? 0 : this._lineBreakData.breakOffsetsVisibleColumn[n - 1]
- ;
- return new l.ViewLineData(r, u, s, a, h, c.sliceAndInflate(i, o, d))
- }, e.prototype.getViewLinesData = function (e, t, n, i, o, r, s) {
- if (!this._isVisible) throw new Error("Not supported");
- for (var a = n; a < i; a++) {
- var l = o + a - n;
- r[l] ? s[l] = this.getViewLineData(e, t, a) : s[l] = null
- }
- }, e.prototype.getModelColumnOfViewPosition = function (e, t) {
- if (!this._isVisible) throw new Error("Not supported");
- var n = t - 1;
- return e > 0 && (n < this._lineBreakData.wrappedTextIndentLength ? n = 0 : n -= this._lineBreakData.wrappedTextIndentLength), d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, e, n) + 1
- }, e.prototype.getViewPositionOfModelPosition = function (e, t) {
- if (!this._isVisible) throw new Error("Not supported");
- var n = d.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, t - 1),
- o = n.outputLineIndex, r = n.outputOffset + 1;
- return o > 0 && (r += this._lineBreakData.wrappedTextIndentLength), new i.Position(e + o, r)
- }, e.prototype.getViewLineNumberOfModelPosition = function (e, t) {
- if (!this._isVisible) throw new Error("Not supported")
- ;
- return e + d.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, t - 1).outputLineIndex
- }, e
- }();
- t.SplitLine = m;
- var v = [""];
- function _(e) {
- if (e >= v.length) for (var t = 1; t <= e; t++) v[t] = y(t);
- return v[e]
- }
- function y(e) {
- return new Array(e + 1).join(" ")
- }
- function C(e, t) {
- return null === e ? t ? g.INSTANCE : f.INSTANCE : new m(e, t)
- }
- var b = function () {
- function e(e) {
- this._lines = e
- }
- return e.prototype._validPosition = function (e) {
- return this._lines.model.validatePosition(e)
- }, e.prototype._validRange = function (e) {
- return this._lines.model.validateRange(e)
- }, e.prototype.convertViewPositionToModelPosition = function (e) {
- return this._validPosition(e)
- }, e.prototype.convertViewRangeToModelRange = function (e) {
- return this._validRange(e)
- }, e.prototype.validateViewPosition = function (e, t) {
- return this._validPosition(t)
- }, e.prototype.validateViewRange = function (e, t) {
- return this._validRange(t)
- }, e.prototype.convertModelPositionToViewPosition = function (e) {
- return this._validPosition(e)
- }, e.prototype.convertModelRangeToViewRange = function (e) {
- return this._validRange(e)
- },
- e.prototype.modelPositionIsVisible = function (e) {
- var t = this._lines.model.getLineCount();
- return !(e.lineNumber < 1 || e.lineNumber > t)
- }, e
- }();
- t.IdentityCoordinatesConverter = b;
- var S = function () {
- function e(e) {
- this.model = e
- }
- return e.prototype.dispose = function () {
- }, e.prototype.createCoordinatesConverter = function () {
- return new b(this)
- }, e.prototype.getHiddenAreas = function () {
- return []
- }, e.prototype.setHiddenAreas = function (e) {
- return !1
- }, e.prototype.setTabSize = function (e) {
- return !1
- }, e.prototype.setWrappingSettings = function (e, t, n, i) {
- return !1
- }, e.prototype.createLineBreaksComputer = function () {
- var e = [];
- return {
- addRequest: function (t, n) {
- e.push(null)
- }, finalize: function () {
- return e
- }
- }
- }, e.prototype.onModelFlushed = function () {
- }, e.prototype.onModelLinesDeleted = function (e, t, n) {
- return new s.ViewLinesDeletedEvent(t, n)
- }, e.prototype.onModelLinesInserted = function (e, t, n, i) {
- return new s.ViewLinesInsertedEvent(t, n)
- }, e.prototype.onModelLineChanged = function (e, t, n) {
- return [!1, new s.ViewLinesChangedEvent(t, t), null, null]
- }, e.prototype.acceptVersionId = function (e) {
- },
- e.prototype.getViewLineCount = function () {
- return this.model.getLineCount()
- }, e.prototype.getActiveIndentGuide = function (e, t, n) {
- return {startLineNumber: e, endLineNumber: e, indent: 0}
- }, e.prototype.getViewLinesIndentGuides = function (e, t) {
- for (var n = t - e + 1, i = new Array(n), o = 0; o < n; o++) i[o] = 0;
- return i
- }, e.prototype.getViewLineContent = function (e) {
- return this.model.getLineContent(e)
- }, e.prototype.getViewLineLength = function (e) {
- return this.model.getLineLength(e)
- }, e.prototype.getViewLineMinColumn = function (e) {
- return this.model.getLineMinColumn(e)
- }, e.prototype.getViewLineMaxColumn = function (e) {
- return this.model.getLineMaxColumn(e)
- }, e.prototype.getViewLineData = function (e) {
- var t = this.model.getLineTokens(e), n = t.getLineContent();
- return new l.ViewLineData(n, !1, 1, n.length + 1, 0, t.inflate())
- }, e.prototype.getViewLinesData = function (e, t, n) {
- var i = this.model.getLineCount();
- e = Math.min(Math.max(1, e), i), t = Math.min(Math.max(1, t), i);
- for (var o = [], r = e; r <= t; r++) {
- var s = r - e;
- n[s] || (o[s] = null), o[s] = this.getViewLineData(r)
- }
- return o
- },
- e.prototype.getAllOverviewRulerDecorations = function (e, t, n) {
- for (var i = this.model.getOverviewRulerDecorations(e, t), o = new w, r = 0, s = i; r < s.length; r++) {
- var a = s[r], l = a.options.overviewRuler, u = l ? l.position : 0;
- if (0 !== u) {
- var d = l.getColor(n), c = a.range.startLineNumber, h = a.range.endLineNumber;
- o.accept(d, c, h, u)
- }
- }
- return o.result
- }, e.prototype.getDecorationsInRange = function (e, t, n) {
- return this.model.getDecorationsInRange(e, t, n)
- }, e
- }();
- t.IdentityLinesCollection = S;
- var w = function () {
- function e() {
- this.result = Object.create(null)
- }
- return e.prototype.accept = function (e, t, n, i) {
- var o = this.result[e];
- if (o) {
- var r = o[o.length - 3], s = o[o.length - 1];
- if (r === i && s + 1 >= t) return void (n > s && (o[o.length - 1] = n));
- o.push(i, t, n)
- } else this.result[e] = [i, t, n]
- }, e
- }()
- })),define(n[487], i([0, 1, 5, 79, 161]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t(t, n) {
- for (var i = e.call(this, 0) || this, o = 0; o < t.length; o++) i.set(t.charCodeAt(o), 1);
- for (o = 0; o < n.length; o++) i.set(n.charCodeAt(o), 2);
- return i
- }
- return r(t, e),
- t.prototype.get = function (e) {
- return e >= 0 && e < 256 ? this._asciiMap[e] : e >= 12352 && e <= 12543 || e >= 13312 && e <= 19903 || e >= 19968 && e <= 40959 ? 3 : this._map.get(e) || this._defaultValue
- }, t
- }(i.CharacterClassifier), a = [], l = [], u = function () {
- function e(e, t) {
- this.classifier = new s(e, t)
- }
- return e.create = function (t) {
- return new e(t.get(99), t.get(98))
- }, e.prototype.createLineBreaksComputer = function (e, t, n, i) {
- var o = this;
- t |= 0, n = +n;
- var r = [], s = [];
- return {
- addRequest: function (e, t) {
- r.push(e), s.push(t)
- }, finalize: function () {
- for (var u = e.typicalFullwidthCharacterWidth / e.typicalHalfwidthCharacterWidth, h = [], p = 0, g = r.length; p < g; p++) {
- var f = s[p];
- h[p] = f ? d(o.classifier, f, r[p], t, n, u, i) : c(o.classifier, r[p], t, n, u, i)
- }
- return a.length = 0, l.length = 0, h
- }
- }
- }, e
- }();
- function d(e, t, i, o, r, s, u) {
- if (-1 === r) return null;
- var d = i.length;
- if (d <= 1) return null;
- var c = t.breakOffsets, p = t.breakOffsetsVisibleColumn, m = f(i, o, r, s, u), v = r - m, _ = a, y = l,
- C = 0, b = r, S = c.length, w = 0;
- if (w >= 0) for (var E = Math.abs(p[w] - b); w + 1 < S;) {
- if ((U = Math.abs(p[w + 1] - b)) >= E) break;
- E = U, w++
- }
- for (; w < S;) {
- var L = w < 0 ? 0 : c[w], D = w < 0 ? 0 : p[w], N = 0, x = 0, I = 0, M = 0;
- if (D <= b) {
- for (var k = D, T = i.charCodeAt(L - 1), R = e.get(T), O = !0, P = L; P < d; P++) {
- var A = P, F = i.charCodeAt(P), W = void 0, B = void 0;
- if (n.isHighSurrogate(F) ? (P++, W = 0, B = 2) : (W = e.get(F), B = h(F, k, o, s)), g(T, R, F, W) && (N = A, x = k), (k += B) > b) {
- I = A, M = k - B, k - x > v && (N = 0), O = !1;
- break
- }
- T = F, R = W
- }
- if (O) {
- C > 0 && (_[C] = c[c.length - 1], y[C] = p[c.length - 1], C++);
- break
- }
- }
- if (0 === N) {
- k = D, F = i.charCodeAt(L), W = e.get(F);
- var V = !1;
- for (P = L - 1; P >= 0; P--) {
- A = P + 1;
- if (9 === (T = i.charCodeAt(P))) {
- V = !0;
- break
- }
- R = void 0;
- var z = void 0;
- if (n.isLowSurrogate(T) ? (P--, R = 0, z = 2) : (R = e.get(T), z = n.isFullWidthCharacter(T) ? s : 1), k <= b) {
- if (0 === I && (I = A, M = k), k <= b - v) break;
- if (g(T, R, F, W)) {
- N = A, x = k;
- break
- }
- }
- k -= z, F = T, W = R
- }
- if (0 !== N) {
- var H = v - (M - x);
- if (H <= o) {
- var K = i.charCodeAt(I);
- B = void 0;
- H - (B = n.isHighSurrogate(K) ? 2 : h(K, M, o, s)) < 0 && (N = 0)
- }
- }
- if (V) {
- w--;
- continue
- }
- }
- for (0 === N && (N = I, x = M), _[C] = N, y[C] = x, C++, b = x + v; w < 0 || w < S && p[w] < x;) w++;
- for (E = Math.abs(p[w] - b); w + 1 < S;) {
- var U;
- if ((U = Math.abs(p[w + 1] - b)) >= E) break;
- E = U, w++
- }
- }
- return 0 === C ? null : (_.length = C, y.length = C, a = t.breakOffsets,
- l = t.breakOffsetsVisibleColumn, t.breakOffsets = _, t.breakOffsetsVisibleColumn = y, t.wrappedTextIndentLength = m, t)
- }
- function c(e, t, i, r, s, a) {
- if (-1 === r) return null;
- var l = t.length;
- if (l <= 1) return null;
- var u = f(t, i, r, s, a), d = r - u, c = [], p = [], m = 0, v = 0, _ = 0, y = r, C = t.charCodeAt(0),
- b = e.get(C), S = h(C, 0, i, s), w = 1;
- n.isHighSurrogate(C) && (S += 1, C = t.charCodeAt(1), b = e.get(C), w++);
- for (var E = w; E < l; E++) {
- var L = E, D = t.charCodeAt(E), N = void 0, x = void 0;
- n.isHighSurrogate(D) ? (E++, N = 0, x = 2) : (N = e.get(D), x = h(D, S, i, s)), g(C, b, D, N) && (v = L, _ = S), (S += x) > y && ((0 === v || S - _ > d) && (v = L, _ = S - x), c[m] = v, p[m] = _, m++, y = _ + d, v = 0), C = D, b = N
- }
- return 0 === m ? null : (c[m] = l, p[m] = S, new o.LineBreakData(c, p, u))
- }
- function h(e, t, i, o) {
- return 9 === e ? i - t % i : n.isFullWidthCharacter(e) ? o : 1
- }
- function p(e, t) {
- return t - e % t
- }
- function g(e, t, n, i) {
- return 32 !== n && (2 === t || 3 === t && 2 !== i || 1 === i || 3 === i && 1 !== t)
- }
- function f(e, t, i, o, r) {
- var s = 0;
- if (0 !== r) {
- var a = n.firstNonWhitespaceIndex(e);
- if (-1 !== a) {
- for (var l = 0; l < a; l++) {
- s += 9 === e.charCodeAt(l) ? p(s, t) : 1
- }
- var u = 3 === r ? 2 : 2 === r ? 1 : 0;
- for (l = 0; l < u; l++) {
- s += p(s, t)
- }
- s + o > i && (s = 0)
- }
- }
- return s
- }
- t.MonospaceLineBreaksComputerFactory = u
- })),define(n[488], i([0, 1, 27, 5, 33, 13, 3, 17, 214, 215, 81, 373, 161, 69, 424, 15, 16]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var _ = !0, y = function (e) {
- function t(t, n, i, o, r, s) {
- var a = e.call(this) || this;
- if (a.editorId = t, a.configuration = n, a.model = i, a._tokenizeViewportSoon = a._register(new m.RunOnceScheduler((function () {
- return a.tokenizeViewport()
- }), 50)), a.hasFocus = !1, a.viewportStartLine = -1, a.viewportStartLineTrackedRange = null, a.viewportStartLineDelta = 0, _ && a.model.isTooLargeForTokenization()) a.lines = new p.IdentityLinesCollection(a.model); else {
- var l = a.configuration.options, u = l.get(34), g = l.get(103), v = l.get(108), y = l.get(102);
- a.lines = new p.SplitLinesCollection(a.model, o, r, u, a.model.getOptions().tabSize, g, v.wrappingColumn, y)
- }
- return a.coordinatesConverter = a.lines.createCoordinatesConverter(), a.viewLayout = a._register(new h.ViewLayout(a.configuration, a.getLineCount(), s)), a._register(a.viewLayout.onDidScroll((function (e) {
- e.scrollTopChanged && a._tokenizeViewportSoon.schedule();
- try {
- a._beginEmit().emit(new c.ViewScrollChangedEvent(e))
- } finally {
- a._endEmit()
- }
- }))), a._register(a.viewLayout.onDidContentSizeChange((function (e) {
- try {
- a._beginEmit().emit(new c.ViewContentSizeChangedEvent(e))
- } finally {
- a._endEmit()
- }
- }))), a.decorations = new f.ViewModelDecorations(a.editorId, a.model, a.configuration, a.lines, a.coordinatesConverter), a._registerModelEvents(), a._register(a.configuration.onDidChange((function (e) {
- try {
- var t = a._beginEmit();
- a._onConfigurationChanged(t, e)
- } finally {
- a._endEmit()
- }
- }))), a._register(d.MinimapTokensColorTracker.getInstance().onDidChange((function () {
- try {
- a._beginEmit().emit(new c.ViewTokensColorsChangedEvent)
- } finally {
- a._endEmit()
- }
- }))), a
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.decorations.dispose(), this.lines.dispose(), this.invalidateMinimapColorCache(), this.viewportStartLineTrackedRange = this.model._setTrackedRange(this.viewportStartLineTrackedRange, null, 1)
- },
- t.prototype.tokenizeViewport = function () {
- var e = this.viewLayout.getLinesViewportData(),
- t = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e.startLineNumber, 1)),
- n = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e.endLineNumber, 1));
- this.model.tokenizeViewport(t.lineNumber, n.lineNumber)
- }, t.prototype.setHasFocus = function (e) {
- this.hasFocus = e
- }, t.prototype._onConfigurationChanged = function (e, t) {
- var n = null;
- if (-1 !== this.viewportStartLine) {
- var i = new s.Position(this.viewportStartLine, this.getLineMinColumn(this.viewportStartLine));
- n = this.coordinatesConverter.convertViewPositionToModelPosition(i)
- }
- var o = !1, r = this.configuration.options, a = r.get(34), l = r.get(103), u = r.get(108),
- d = r.get(102);
- if (this.lines.setWrappingSettings(a, l, u.wrappingColumn, d) && (e.emit(new c.ViewFlushedEvent), e.emit(new c.ViewLineMappingChangedEvent), e.emit(new c.ViewDecorationsChangedEvent), this.decorations.onLineMappingChanged(), this.viewLayout.onFlushed(this.getLineCount()),
- 0 !== this.viewLayout.getCurrentScrollTop() && (o = !0)), t.hasChanged(68) && (this.decorations.reset(), e.emit(new c.ViewDecorationsChangedEvent)), e.emit(new c.ViewConfigurationChangedEvent(t)), this.viewLayout.onConfigurationChanged(t), o && n) {
- var h = this.coordinatesConverter.convertModelPositionToViewPosition(n),
- p = this.viewLayout.getVerticalOffsetForLineNumber(h.lineNumber);
- this.viewLayout.setScrollPositionNow({scrollTop: p + this.viewportStartLineDelta})
- }
- }, t.prototype._registerModelEvents = function () {
- var e = this;
- this._register(this.model.onDidChangeRawContentFast((function (t) {
- try {
- for (var n = e._beginEmit(), i = !1, o = !1, r = t.changes, s = t.versionId, a = e.lines.createLineBreaksComputer(), l = 0, u = r; l < u.length; l++) {
- switch ((_ = u[l]).changeType) {
- case 4:
- for (var d = 0, h = _.detail; d < h.length; d++) {
- var p = h[d];
- a.addRequest(p, null)
- }
- break;
- case 2:
- a.addRequest(_.detail, null)
- }
- }
- for (var g = a.finalize(), f = 0, m = 0, v = r; m < v.length; m++) {
- var _;
- switch ((_ = v[m]).changeType) {
- case 1:
- e.lines.onModelFlushed(), n.emit(new c.ViewFlushedEvent), e.decorations.reset(),
- e.viewLayout.onFlushed(e.getLineCount()), i = !0;
- break;
- case 3:
- null !== (L = e.lines.onModelLinesDeleted(s, _.fromLineNumber, _.toLineNumber)) && (n.emit(L), e.viewLayout.onLinesDeleted(L.fromLineNumber, L.toLineNumber)), i = !0;
- break;
- case 4:
- var y = g.slice(f, f + _.detail.length);
- f += _.detail.length, null !== (E = e.lines.onModelLinesInserted(s, _.fromLineNumber, _.toLineNumber, y)) && (n.emit(E), e.viewLayout.onLinesInserted(E.fromLineNumber, E.toLineNumber)), i = !0;
- break;
- case 2:
- var C = g[f];
- f++;
- var b = e.lines.onModelLineChanged(s, _.lineNumber, C), S = b[0], w = b[1],
- E = b[2], L = b[3];
- o = S, w && n.emit(w), E && (n.emit(E), e.viewLayout.onLinesInserted(E.fromLineNumber, E.toLineNumber)), L && (n.emit(L), e.viewLayout.onLinesDeleted(L.fromLineNumber, L.toLineNumber))
- }
- }
- e.lines.acceptVersionId(s), e.viewLayout.onHeightMaybeChanged(), !i && o && (n.emit(new c.ViewLineMappingChangedEvent), n.emit(new c.ViewDecorationsChangedEvent), e.decorations.onLineMappingChanged())
- } finally {
- e._endEmit()
- }
- if (e.viewportStartLine = -1, e.configuration.setMaxLineNumber(e.model.getLineCount()),
- !e.hasFocus && e.model.getAttachedEditorCount() >= 2 && e.viewportStartLineTrackedRange) {
- var D = e.model._getTrackedRange(e.viewportStartLineTrackedRange);
- if (D) {
- var N = e.coordinatesConverter.convertModelPositionToViewPosition(D.getStartPosition()),
- x = e.viewLayout.getVerticalOffsetForLineNumber(N.lineNumber);
- e.viewLayout.setScrollPositionNow({scrollTop: x + e.viewportStartLineDelta})
- }
- }
- }))), this._register(this.model.onDidChangeTokens((function (t) {
- for (var n = [], i = 0, o = t.ranges.length; i < o; i++) {
- var r = t.ranges[i],
- a = e.coordinatesConverter.convertModelPositionToViewPosition(new s.Position(r.fromLineNumber, 1)).lineNumber,
- l = e.coordinatesConverter.convertModelPositionToViewPosition(new s.Position(r.toLineNumber, e.model.getLineMaxColumn(r.toLineNumber))).lineNumber;
- n[i] = {fromLineNumber: a, toLineNumber: l}
- }
- try {
- e._beginEmit().emit(new c.ViewTokensChangedEvent(n))
- } finally {
- e._endEmit()
- }
- t.tokenizationSupportChanged && e._tokenizeViewportSoon.schedule()
- }))), this._register(this.model.onDidChangeLanguageConfiguration((function (t) {
- try {
- e._beginEmit().emit(new c.ViewLanguageConfigurationEvent)
- } finally {
- e._endEmit()
- }
- }))), this._register(this.model.onDidChangeOptions((function (t) {
- if (e.lines.setTabSize(e.model.getOptions().tabSize)) {
- e.decorations.onLineMappingChanged(), e.viewLayout.onFlushed(e.getLineCount());
- try {
- var n = e._beginEmit();
- n.emit(new c.ViewFlushedEvent), n.emit(new c.ViewLineMappingChangedEvent), n.emit(new c.ViewDecorationsChangedEvent)
- } finally {
- e._endEmit()
- }
- }
- }))), this._register(this.model.onDidChangeDecorations((function (t) {
- e.decorations.onModelDecorationsChanged();
- try {
- e._beginEmit().emit(new c.ViewDecorationsChangedEvent)
- } finally {
- e._endEmit()
- }
- })))
- }, t.prototype.setHiddenAreas = function (e) {
- try {
- var t = this._beginEmit();
- this.lines.setHiddenAreas(e) && (t.emit(new c.ViewFlushedEvent), t.emit(new c.ViewLineMappingChangedEvent), t.emit(new c.ViewDecorationsChangedEvent), this.decorations.onLineMappingChanged(), this.viewLayout.onFlushed(this.getLineCount()), this.viewLayout.onHeightMaybeChanged())
- } finally {
- this._endEmit()
- }
- },
- t.prototype.getVisibleRanges = function () {
- var e = this.getCompletelyVisibleViewRange(),
- t = this.coordinatesConverter.convertViewRangeToModelRange(e), n = this.lines.getHiddenAreas();
- if (0 === n.length) return [t];
- for (var i = [], o = 0, r = t.startLineNumber, s = t.startColumn, l = t.endLineNumber, u = t.endColumn, d = 0, c = n.length; d < c; d++) {
- var h = n[d].startLineNumber, p = n[d].endLineNumber;
- p < r || (h > l || (r < h && (i[o++] = new a.Range(r, s, h - 1, this.model.getLineMaxColumn(h - 1))), r = p + 1, s = 1))
- }
- return (r < l || r === l && s < u) && (i[o++] = new a.Range(r, s, l, u)), i
- }, t.prototype.getCompletelyVisibleViewRange = function () {
- var e = this.viewLayout.getLinesViewportData(), t = e.completelyVisibleStartLineNumber,
- n = e.completelyVisibleEndLineNumber;
- return new a.Range(t, this.getLineMinColumn(t), n, this.getLineMaxColumn(n))
- }, t.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (e) {
- var t = this.viewLayout.getLinesViewportDataAtScrollTop(e), n = t.completelyVisibleStartLineNumber,
- i = t.completelyVisibleEndLineNumber;
- return new a.Range(n, this.getLineMinColumn(n), i, this.getLineMaxColumn(i))
- },
- t.prototype.saveState = function () {
- var e = this.viewLayout.saveState(), t = e.scrollTop,
- n = this.viewLayout.getLineNumberAtVerticalOffset(t),
- i = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(n, this.getLineMinColumn(n))),
- o = this.viewLayout.getVerticalOffsetForLineNumber(n) - t;
- return {scrollLeft: e.scrollLeft, firstPosition: i, firstPositionDeltaTop: o}
- }, t.prototype.reduceRestoreState = function (e) {
- if (void 0 === e.firstPosition) return this._reduceRestoreStateCompatibility(e);
- var t = this.model.validatePosition(e.firstPosition),
- n = this.coordinatesConverter.convertModelPositionToViewPosition(t),
- i = this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber) - e.firstPositionDeltaTop;
- return {scrollLeft: e.scrollLeft, scrollTop: i}
- }, t.prototype._reduceRestoreStateCompatibility = function (e) {
- return {scrollLeft: e.scrollLeft, scrollTop: e.scrollTopWithoutViewZones}
- }, t.prototype.getTabSize = function () {
- return this.model.getOptions().tabSize
- }, t.prototype.getOptions = function () {
- return this.model.getOptions()
- },
- t.prototype.getLineCount = function () {
- return this.lines.getViewLineCount()
- }, t.prototype.setViewport = function (e, t, n) {
- this.viewportStartLine = e;
- var i = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e, this.getLineMinColumn(e)));
- this.viewportStartLineTrackedRange = this.model._setTrackedRange(this.viewportStartLineTrackedRange, new a.Range(i.lineNumber, i.column, i.lineNumber, i.column), 1);
- var o = this.viewLayout.getVerticalOffsetForLineNumber(e), r = this.viewLayout.getCurrentScrollTop();
- this.viewportStartLineDelta = r - o
- }, t.prototype.getActiveIndentGuide = function (e, t, n) {
- return this.lines.getActiveIndentGuide(e, t, n)
- }, t.prototype.getLinesIndentGuides = function (e, t) {
- return this.lines.getViewLinesIndentGuides(e, t)
- }, t.prototype.getLineContent = function (e) {
- return this.lines.getViewLineContent(e)
- }, t.prototype.getLineLength = function (e) {
- return this.lines.getViewLineLength(e)
- }, t.prototype.getLineMinColumn = function (e) {
- return this.lines.getViewLineMinColumn(e)
- }, t.prototype.getLineMaxColumn = function (e) {
- return this.lines.getViewLineMaxColumn(e)
- }, t.prototype.getLineFirstNonWhitespaceColumn = function (e) {
- var t = i.firstNonWhitespaceIndex(this.getLineContent(e));
- return -1 === t ? 0 : t + 1
- }, t.prototype.getLineLastNonWhitespaceColumn = function (e) {
- var t = i.lastNonWhitespaceIndex(this.getLineContent(e));
- return -1 === t ? 0 : t + 2
- }, t.prototype.getDecorationsInViewport = function (e) {
- return this.decorations.getDecorationsViewportData(e).decorations
- }, t.prototype.getViewLineRenderingData = function (e, t) {
- var n = this.model.mightContainRTL(), i = this.model.mightContainNonBasicASCII(), o = this.getTabSize(),
- r = this.lines.getViewLineData(t),
- s = this.decorations.getDecorationsViewportData(e).inlineDecorations[t - e.startLineNumber];
- return new g.ViewLineRenderingData(r.minColumn, r.maxColumn, r.content, r.continuesWithWrappedLine, n, i, r.tokens, s, o, r.startVisibleColumn)
- }, t.prototype.getViewLineData = function (e) {
- return this.lines.getViewLineData(e)
- }, t.prototype.getMinimapLinesRenderingData = function (e, t, n) {
- var i = this.lines.getViewLinesData(e, t, n)
- ;
- return new g.MinimapLinesRenderingData(this.getTabSize(), i)
- }, t.prototype.getAllOverviewRulerDecorations = function (e) {
- return this.lines.getAllOverviewRulerDecorations(this.editorId, o.filterValidationDecorations(this.configuration.options), e)
- }, t.prototype.invalidateOverviewRulerColorCache = function () {
- for (var e = 0, t = this.model.getOverviewRulerDecorations(); e < t.length; e++) {
- var n = t[e].options.overviewRuler;
- n && n.invalidateCachedColor()
- }
- }, t.prototype.invalidateMinimapColorCache = function () {
- for (var e = 0, t = this.model.getAllDecorations(); e < t.length; e++) {
- var n = t[e].options.minimap;
- n && n.invalidateCachedColor()
- }
- }, t.prototype.getValueInRange = function (e, t) {
- var n = this.coordinatesConverter.convertViewRangeToModelRange(e);
- return this.model.getValueInRange(n, t)
- }, t.prototype.getModelLineMaxColumn = function (e) {
- return this.model.getLineMaxColumn(e)
- }, t.prototype.validateModelPosition = function (e) {
- return this.model.validatePosition(e)
- }, t.prototype.validateModelRange = function (e) {
- return this.model.validateRange(e)
- },
- t.prototype.deduceModelPositionRelativeToViewPosition = function (e, t, n) {
- var i = this.coordinatesConverter.convertViewPositionToModelPosition(e);
- 2 === this.model.getEOL().length && (t < 0 ? t -= n : t += n);
- var o = this.model.getOffsetAt(i) + t;
- return this.model.getPositionAt(o)
- }, t.prototype.getEOL = function () {
- return this.model.getEOL()
- }, t.prototype.getPlainTextToCopy = function (e, t, n) {
- var i = n ? "\r\n" : this.model.getEOL();
- (e = e.slice(0)).sort(a.Range.compareRangesUsingStarts);
- for (var o = !1, r = !1, s = 0, l = e; s < l.length; s++) {
- l[s].isEmpty() ? o = !0 : r = !0
- }
- if (!r) {
- if (!t) return "";
- for (var u = e.map((function (e) {
- return e.startLineNumber
- })), d = "", c = 0; c < u.length; c++) c > 0 && u[c - 1] === u[c] || (d += this.model.getLineContent(u[c]) + i);
- return d
- }
- if (o && t) {
- for (var h = [], p = 0, g = 0, f = e; g < f.length; g++) {
- var m = (C = f[g]).startLineNumber;
- C.isEmpty() ? m !== p && h.push(this.model.getLineContent(m)) : h.push(this.model.getValueInRange(C, n ? 2 : 0)), p = m
- }
- return 1 === h.length ? h[0] : h
- }
- for (var v = [], _ = 0, y = e; _ < y.length; _++) {
- var C;
- (C = y[_]).isEmpty() || v.push(this.model.getValueInRange(C, n ? 2 : 0))
- }
- return 1 === v.length ? v[0] : v
- }, t.prototype.getRichTextToCopy = function (e, t) {
- var n = this.model.getLanguageIdentifier();
- if (1 === n.id) return null;
- if (1 !== e.length) return null;
- var i = e[0];
- if (i.isEmpty()) {
- if (!t) return null;
- var r = i.startLineNumber;
- i = new a.Range(r, this.model.getLineMinColumn(r), r, this.model.getLineMaxColumn(r))
- }
- var s = this.configuration.options.get(34), l = this._getColorMap(),
- u = s.fontFamily === o.EDITOR_FONT_DEFAULTS.fontFamily ? s.fontFamily : "'" + s.fontFamily + "', " + o.EDITOR_FONT_DEFAULTS.fontFamily;
- return {
- mode: n.language,
- html: '<div style="color: ' + l[1] + ";background-color: " + l[2] + ";font-family: " + u + ";font-weight: " + s.fontWeight + ";font-size: " + s.fontSize + "px;line-height: " + s.lineHeight + 'px;white-space: pre;">' + this._getHTMLToCopy(i, l) + "</div>"
- }
- }, t.prototype._getHTMLToCopy = function (e, t) {
- for (var n = e.startLineNumber, i = e.startColumn, o = e.endLineNumber, r = e.endColumn, s = this.getTabSize(), a = "", l = n; l <= o; l++) {
- var d = this.model.getLineTokens(l), c = d.getLineContent(), h = l === n ? i - 1 : 0,
- p = l === o ? r - 1 : c.length
- ;a += "" === c ? "<br>" : u.tokenizeLineToHTML(c, d.inflate(), t, h, p, s, v.isWindows)
- }
- return a
- }, t.prototype._getColorMap = function () {
- var e = l.TokenizationRegistry.getColorMap(), t = ["#000000"];
- if (e) for (var i = 1, o = e.length; i < o; i++) t[i] = n.Color.Format.CSS.formatHex(e[i]);
- return t
- }, t
- }(c.ViewEventEmitter);
- t.ViewModel = y
- })),define(n[489], i([0, 1, 19, 26, 87, 10, 38, 17]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- function e() {
- }
- return e.prototype.remove = function () {
- this.parent && delete this.parent.children[this.id]
- }, e.findId = function (e, t) {
- var n;
- "string" == typeof e ? n = t.id + "/" + e : (n = t.id + "/" + e.name, void 0 !== t.children[n] && (n = t.id + "/" + e.name + "_" + e.range.startLineNumber + "_" + e.range.startColumn));
- for (var i = n, o = 0; void 0 !== t.children[i]; o++) i = n + "_" + o;
- return i
- }, e.empty = function (e) {
- for (var t in e.children) return !1;
- return !0
- }, e
- }();
- t.TreeElement = u;
- var d = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o.id = t, o.parent = n, o.symbol = i, o.children = Object.create(null), o
- }
- return r(t, e), t
- }(u);
- t.OutlineElement = d;
- var c = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this) || this;
- return r.id = t, r.parent = n, r.provider = i, r.providerIndex = o, r.children = Object.create(null), r
- }
- return r(t, e), t
- }(u);
- t.OutlineGroup = c;
- var h = function () {
- function e() {
- this._n = 1, this._val = 0
- }
- return e.prototype.update = function (e) {
- return this._val = this._val + (e - this._val) / this._n, this._n += 1, this
- }, e
- }(), p = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.textModel = t, n.id = "root", n.parent = void 0, n._groups = Object.create(null), n.children = Object.create(null), n.id = "root", n.parent = void 0, n
- }
- return r(t, e), t.create = function (e, n) {
- var o = this, r = this._keys.for(e, !0), s = t._requests.get(r);
- if (!s) {
- var a = new i.CancellationTokenSource;
- s = {
- promiseCnt: 0,
- source: a,
- promise: t._create(e, a.token),
- model: void 0
- }, t._requests.set(r, s);
- var l = Date.now();
- s.promise.then((function () {
- var t = o._keys.for(e, !1), n = o._requestDurations.get(t);
- n || (n = new h, o._requestDurations.set(t, n)), n.update(Date.now() - l)
- }))
- }
- return s.model ? Promise.resolve(s.model) : (s.promiseCnt += 1,
- n.onCancellationRequested((function () {
- 0 == --s.promiseCnt && (s.source.cancel(), t._requests.delete(r))
- })), new Promise((function (e, n) {
- s.promise.then((function (t) {
- s.model = t, e(t)
- }), (function (e) {
- t._requests.delete(r), n(e)
- }))
- })))
- }, t._create = function (e, o) {
- var r = new i.CancellationTokenSource(o), a = new t(e), d = l.DocumentSymbolProviderRegistry.ordered(e),
- h = d.map((function (e, n) {
- var i = u.findId("provider_" + n, a), o = new c(i, a, e, n);
- return Promise.resolve(e.provideDocumentSymbols(a.textModel, r.token)).then((function (e) {
- for (var n = 0, i = e || []; n < i.length; n++) {
- var r = i[n];
- t._makeOutlineElement(r, o)
- }
- return o
- }), (function (e) {
- return s.onUnexpectedExternalError(e), o
- })).then((function (e) {
- u.empty(e) ? e.remove() : a._groups[i] = e
- }))
- })), p = l.DocumentSymbolProviderRegistry.onDidChange((function () {
- var t = l.DocumentSymbolProviderRegistry.ordered(e);
- n.equals(t, d) || r.cancel()
- }));
- return Promise.all(h).then((function () {
- return r.token.isCancellationRequested && !o.isCancellationRequested ? t._create(e, o) : a._compact()
- })).finally((function () {
- p.dispose()
- }))
- },
- t._makeOutlineElement = function (e, n) {
- var i = u.findId(e, n), o = new d(i, n, e);
- if (e.children) for (var r = 0, s = e.children; r < s.length; r++) {
- var a = s[r];
- t._makeOutlineElement(a, o)
- }
- n.children[o.id] = o
- }, t.prototype._compact = function () {
- var e = 0;
- for (var t in this._groups) {
- var n = this._groups[t];
- void 0 === o.first(n.children) ? delete this._groups[t] : e += 1
- }
- if (1 !== e) this.children = this._groups; else {
- n = o.first(this._groups);
- for (var t in n.children) {
- var i = n.children[t];
- i.parent = this, this.children[i.id] = i
- }
- }
- return this
- }, t._requestDurations = new a.LRUCache(50, .7), t._requests = new a.LRUCache(9, .75), t._keys = new (function () {
- function e() {
- this._counter = 1, this._data = new WeakMap
- }
- return e.prototype.for = function (e, t) {
- return e.id + "/" + (t ? e.getVersionId() : "") + "/" + this._hash(l.DocumentSymbolProviderRegistry.all(e))
- }, e.prototype._hash = function (e) {
- for (var t = "", n = 0, i = e; n < i.length; n++) {
- var o = i[n], r = this._data.get(o);
- void 0 === r && (r = this._counter++, this._data.set(o, r)), t += r
- }
- return t
- }, e
- }()), t
- }(u);
- t.OutlineModel = p
- })),define(n[490], i([0, 1, 30]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(e) {
- this.editor = e, this.autoHideFoldingControls = !0, this.showFoldingHighlights = !0
- }
- return e.prototype.getDecorationOption = function (t) {
- return t ? this.showFoldingHighlights ? e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : e.COLLAPSED_VISUAL_DECORATION : this.autoHideFoldingControls ? e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION : e.EXPANDED_VISUAL_DECORATION
- }, e.prototype.deltaDecorations = function (e, t) {
- return this.editor.deltaDecorations(e, t)
- }, e.prototype.changeDecorations = function (e) {
- return this.editor.changeDecorations(e)
- }, e.COLLAPSED_VISUAL_DECORATION = n.ModelDecorationOptions.register({
- stickiness: 1,
- afterContentClassName: "inline-folded",
- linesDecorationsClassName: "codicon codicon-chevron-right"
- }), e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = n.ModelDecorationOptions.register({
- stickiness: 1,
- afterContentClassName: "inline-folded",
- className: "folded-background",
- isWholeLine: !0,
- linesDecorationsClassName: "codicon codicon-chevron-right"
- }),
- e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = n.ModelDecorationOptions.register({
- stickiness: 1,
- linesDecorationsClassName: "codicon codicon-chevron-down"
- }), e.EXPANDED_VISUAL_DECORATION = n.ModelDecorationOptions.register({
- stickiness: 1,
- linesDecorationsClassName: "codicon codicon-chevron-down alwaysShowFoldIcons"
- }), e
- }();
- t.FoldingDecorationProvider = i
- })),define(n[491], i([0, 1, 150, 30, 41]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = 5e3;
- t.ID_INDENT_PROVIDER = "indent";
- var s = function () {
- function e(e) {
- this.editorModel = e, this.id = t.ID_INDENT_PROVIDER
- }
- return e.prototype.dispose = function () {
- }, e.prototype.compute = function (e) {
- var t = o.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id),
- n = t && !!t.offSide, i = t && t.markers;
- return Promise.resolve(l(this.editorModel, n, i))
- }, e
- }();
- t.IndentRangeProvider = s;
- var a = function () {
- function e(e) {
- this._startIndexes = [], this._endIndexes = [], this._indentOccurrences = [], this._length = 0, this._foldingRangesLimit = e
- }
- return e.prototype.insertFirst = function (e, t, i) {
- if (!(e > n.MAX_LINE_NUMBER || t > n.MAX_LINE_NUMBER)) {
- var o = this._length;
- this._startIndexes[o] = e, this._endIndexes[o] = t, this._length++, i < 1e3 && (this._indentOccurrences[i] = (this._indentOccurrences[i] || 0) + 1)
- }
- }, e.prototype.toIndentRanges = function (e) {
- if (this._length <= this._foldingRangesLimit) {
- for (var t = new Uint32Array(this._length), o = new Uint32Array(this._length), r = this._length - 1, s = 0; r >= 0; r--, s++) t[s] = this._startIndexes[r], o[s] = this._endIndexes[r];
- return new n.FoldingRegions(t, o)
- }
- var a = 0, l = this._indentOccurrences.length;
- for (r = 0; r < this._indentOccurrences.length; r++) {
- var u = this._indentOccurrences[r];
- if (u) {
- if (u + a > this._foldingRangesLimit) {
- l = r;
- break
- }
- a += u
- }
- }
- var d = e.getOptions().tabSize;
- for (t = new Uint32Array(this._foldingRangesLimit), o = new Uint32Array(this._foldingRangesLimit), r = this._length - 1, s = 0; r >= 0; r--) {
- var c = this._startIndexes[r], h = e.getLineContent(c), p = i.TextModel.computeIndentLevel(h, d);
- (p < l || p === l && a++ < this._foldingRangesLimit) && (t[s] = c, o[s] = this._endIndexes[r], s++)
- }
- return new n.FoldingRegions(t, o)
- }, e
- }();
- function l(e, t, n, o) {
- void 0 === o && (o = r);
- var s = e.getOptions().tabSize, l = new a(o), u = void 0;
- n && (u = new RegExp("(" + n.start.source + ")|(?:" + n.end.source + ")"));
- var d = [], c = e.getLineCount() + 1;
- d.push({indent: -1, endAbove: c, line: c});
- for (var h = e.getLineCount(); h > 0; h--) {
- var p = e.getLineContent(h), g = i.TextModel.computeIndentLevel(p, s), f = d[d.length - 1];
- if (-1 !== g) {
- var m = void 0;
- if (u && (m = p.match(u))) {
- if (!m[1]) {
- d.push({indent: -2, endAbove: h, line: h});
- continue
- }
- for (var v = d.length - 1; v > 0 && -2 !== d[v].indent;) v--;
- if (v > 0) {
- d.length = v + 1, f = d[v], l.insertFirst(h, f.line, g), f.line = h, f.indent = g, f.endAbove = h;
- continue
- }
- }
- if (f.indent > g) {
- do {
- d.pop(), f = d[d.length - 1]
- } while (f.indent > g);
- var _ = f.endAbove - 1;
- _ - h >= 1 && l.insertFirst(h, _, g)
- }
- f.indent === g ? f.endAbove = h : d.push({indent: g, endAbove: h, line: h})
- } else t && (f.endAbove = h)
- }
- return l.toIndentRanges(e)
- }
- t.RangesCollector = a, t.computeRanges = l
- })),define(n[492], i([0, 1, 5, 211, 3, 22, 90, 41, 385]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var u = function () {
- function e(e, t, n) {
- this._selection = e, this._isMovingDown = t, this._autoIndent = n, this._selectionId = null, this._moveEndLineSelectionShrink = !1
- }
- return e.prototype.getEditOperations = function (e, t) {
- var i = e.getLineCount();
- if (this._isMovingDown && this._selection.endLineNumber === i) this._selectionId = t.trackSelection(this._selection); else if (this._isMovingDown || 1 !== this._selection.startLineNumber) {
- this._moveEndPositionDown = !1;
- var s = this._selection;
- s.startLineNumber < s.endLineNumber && 1 === s.endColumn && (this._moveEndPositionDown = !0, s = s.setEndPosition(s.endLineNumber - 1, e.getLineMaxColumn(s.endLineNumber - 1)));
- var u = e.getOptions(), d = u.tabSize, c = u.indentSize, h = u.insertSpaces,
- p = this.buildIndentConverter(d, c, h), g = {
- getLineTokens: function (t) {
- return e.getLineTokens(t)
- }, getLanguageIdentifier: function () {
- return e.getLanguageIdentifier()
- }, getLanguageIdAtPosition: function (t, n) {
- return e.getLanguageIdAtPosition(t, n)
- }, getLineContent: null
- };
- if (s.startLineNumber === s.endLineNumber && 1 === e.getLineMaxColumn(s.startLineNumber)) {
- var f = s.startLineNumber, m = this._isMovingDown ? f + 1 : f - 1;
- 1 === e.getLineMaxColumn(m) ? t.addEditOperation(new o.Range(1, 1, 1, 1), null) : (t.addEditOperation(new o.Range(f, 1, f, 1), e.getLineContent(m)), t.addEditOperation(new o.Range(m, 1, m, e.getLineMaxColumn(m)), null)), s = new r.Selection(m, 1, m, 1)
- } else {
- var v, _ = void 0;
- if (this._isMovingDown) {
- v = s.endLineNumber + 1, _ = e.getLineContent(v), t.addEditOperation(new o.Range(v - 1, e.getLineMaxColumn(v - 1), v, e.getLineMaxColumn(v)), null);
- var y = _;
- if (this.shouldAutoIndent(e, s)) {
- var C = this.matchEnterRule(e, p, d, v, s.startLineNumber - 1);
- if (null !== C) {
- var b = n.getLeadingWhitespace(e.getLineContent(v)), S = C + l.getSpaceCnt(b, d),
- w = l.generateIndent(S, d, h);
- y = w + this.trimLeft(_)
- } else {
- g.getLineContent = function (t) {
- return t === s.startLineNumber ? e.getLineContent(v) : e.getLineContent(t)
- };
- var E = a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, g, e.getLanguageIdAtPosition(v, 1), s.startLineNumber, p);
- if (null !== E) {
- b = n.getLeadingWhitespace(e.getLineContent(v))
- ;
- if ((S = l.getSpaceCnt(E, d)) !== (I = l.getSpaceCnt(b, d))) {
- w = l.generateIndent(S, d, h);
- y = w + this.trimLeft(_)
- }
- }
- }
- if (t.addEditOperation(new o.Range(s.startLineNumber, 1, s.startLineNumber, 1), y + "\n"), null !== (N = this.matchEnterRule(e, p, d, s.startLineNumber, s.startLineNumber, y))) 0 !== N && this.getIndentEditsOfMovingBlock(e, t, s, d, h, N); else {
- g.getLineContent = function (t) {
- return t === s.startLineNumber ? y : t >= s.startLineNumber + 1 && t <= s.endLineNumber + 1 ? e.getLineContent(t - 1) : e.getLineContent(t)
- };
- var L = a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, g, e.getLanguageIdAtPosition(v, 1), s.startLineNumber + 1, p);
- if (null !== L) {
- b = n.getLeadingWhitespace(e.getLineContent(s.startLineNumber));
- if ((S = l.getSpaceCnt(L, d)) !== (I = l.getSpaceCnt(b, d))) {
- var D = S - I;
- this.getIndentEditsOfMovingBlock(e, t, s, d, h, D)
- }
- }
- }
- } else t.addEditOperation(new o.Range(s.startLineNumber, 1, s.startLineNumber, 1), y + "\n")
- } else {
- var N;
- if (v = s.startLineNumber - 1, _ = e.getLineContent(v), t.addEditOperation(new o.Range(v, 1, v + 1, 1), null),
- t.addEditOperation(new o.Range(s.endLineNumber, e.getLineMaxColumn(s.endLineNumber), s.endLineNumber, e.getLineMaxColumn(s.endLineNumber)), "\n" + _), this.shouldAutoIndent(e, s)) if (g.getLineContent = function (t) {
- return t === v ? e.getLineContent(s.startLineNumber) : e.getLineContent(t)
- }, null !== (N = this.matchEnterRule(e, p, d, s.startLineNumber, s.startLineNumber - 2))) 0 !== N && this.getIndentEditsOfMovingBlock(e, t, s, d, h, N); else {
- var x = a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, g, e.getLanguageIdAtPosition(s.startLineNumber, 1), v, p);
- if (null !== x) {
- var I, M = n.getLeadingWhitespace(e.getLineContent(s.startLineNumber));
- if ((S = l.getSpaceCnt(x, d)) !== (I = l.getSpaceCnt(M, d))) {
- D = S - I;
- this.getIndentEditsOfMovingBlock(e, t, s, d, h, D)
- }
- }
- }
- }
- }
- this._selectionId = t.trackSelection(s)
- } else this._selectionId = t.trackSelection(this._selection)
- }, e.prototype.buildIndentConverter = function (e, t, n) {
- return {
- shiftIndent: function (o) {
- return i.ShiftCommand.shiftIndent(o, o.length + 1, e, t, n)
- }, unshiftIndent: function (o) {
- return i.ShiftCommand.unshiftIndent(o, o.length + 1, e, t, n)
- }
- }
- }, e.prototype.matchEnterRule = function (e, t, i, r, u, d) {
- for (var c = u; c >= 1;) {
- var h = void 0;
- if (h = c === u && void 0 !== d ? d : e.getLineContent(c), n.lastNonWhitespaceIndex(h) >= 0) break;
- c--
- }
- if (c < 1 || r > e.getLineCount()) return null;
- var p = e.getLineMaxColumn(c),
- g = a.LanguageConfigurationRegistry.getEnterAction(this._autoIndent, e, new o.Range(c, p, c, p));
- if (g) {
- var f = g.indentation;
- g.indentAction === s.IndentAction.None ? f = g.indentation + g.appendText : g.indentAction === s.IndentAction.Indent ? f = g.indentation + g.appendText : g.indentAction === s.IndentAction.IndentOutdent ? f = g.indentation : g.indentAction === s.IndentAction.Outdent && (f = t.unshiftIndent(g.indentation) + g.appendText);
- var m = e.getLineContent(r);
- if (this.trimLeft(m).indexOf(this.trimLeft(f)) >= 0) {
- var v = n.getLeadingWhitespace(e.getLineContent(r)), _ = n.getLeadingWhitespace(f),
- y = a.LanguageConfigurationRegistry.getIndentMetadata(e, r);
- return null !== y && 2 & y && (_ = t.unshiftIndent(_)), l.getSpaceCnt(_, i) - l.getSpaceCnt(v, i)
- }
- }
- return null
- },
- e.prototype.trimLeft = function (e) {
- return e.replace(/^\s+/, "")
- }, e.prototype.shouldAutoIndent = function (e, t) {
- if (this._autoIndent < 4) return !1;
- if (!e.isCheapToTokenize(t.startLineNumber)) return !1;
- var n = e.getLanguageIdAtPosition(t.startLineNumber, 1);
- return n === e.getLanguageIdAtPosition(t.endLineNumber, 1) && null !== a.LanguageConfigurationRegistry.getIndentRulesSupport(n)
- }, e.prototype.getIndentEditsOfMovingBlock = function (e, t, i, r, s, a) {
- for (var u = i.startLineNumber; u <= i.endLineNumber; u++) {
- var d = e.getLineContent(u), c = n.getLeadingWhitespace(d), h = l.getSpaceCnt(c, r) + a,
- p = l.generateIndent(h, r, s);
- p !== c && (t.addEditOperation(new o.Range(u, 1, u, c.length + 1), p), u === i.endLineNumber && i.endColumn <= c.length + 1 && "" === p && (this._moveEndLineSelectionShrink = !0))
- }
- }, e.prototype.computeCursorState = function (e, t) {
- var n = t.getTrackedSelection(this._selectionId);
- return this._moveEndPositionDown && (n = n.setEndPosition(n.endLineNumber + 1, 1)), this._moveEndLineSelectionShrink && n.startLineNumber < n.endLineNumber && (n = n.setEndPosition(n.endLineNumber, 2)), n
- }, e
- }()
- ;t.MoveLinesCommand = u
- })),define(n[493], i([0, 1, 6, 104, 27, 127, 2, 31, 3, 30, 324]), (function (e, t, n, i, o, r, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = new o.Color(new o.RGBA(0, 122, 204)),
- c = {showArrow: !0, showFrame: !0, className: "", frameColor: d, arrowColor: d, keepEditorSelection: !1},
- h = function () {
- function e(e, t, n, i, o, r) {
- this.id = "", this.domNode = e, this.afterLineNumber = t, this.afterColumn = n, this.heightInLines = i, this._onDomNodeTop = o, this._onComputedHeight = r
- }
- return e.prototype.onDomNodeTop = function (e) {
- this._onDomNodeTop(e)
- }, e.prototype.onComputedHeight = function (e) {
- this._onComputedHeight(e)
- }, e
- }();
- t.ViewZoneDelegate = h;
- var p = function () {
- function e(e, t) {
- this._id = e, this._domNode = t
- }
- return e.prototype.getId = function () {
- return this._id
- }, e.prototype.getDomNode = function () {
- return this._domNode
- }, e.prototype.getPosition = function () {
- return null
- }, e
- }();
- t.OverlayWidgetDelegate = p;
- var g = function () {
- function e(t) {
- this._editor = t, this._ruleName = e._IdGenerator.nextId(), this._decorations = [], this._color = null, this._height = -1
- }
- return e.prototype.dispose = function () {
- this.hide(), n.removeCSSRulesContainingSelector(this._ruleName)
- }, Object.defineProperty(e.prototype, "color", {
- set: function (e) {
- this._color !== e && (this._color = e, this._updateStyle())
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "height", {
- set: function (e) {
- this._height !== e && (this._height = e, this._updateStyle())
- }, enumerable: !0, configurable: !0
- }), e.prototype._updateStyle = function () {
- n.removeCSSRulesContainingSelector(this._ruleName), n.createCSSRule(".monaco-editor " + this._ruleName, "border-style: solid; border-color: transparent; border-bottom-color: " + this._color + "; border-width: " + this._height + "px; bottom: -" + this._height + "px; margin-left: -" + this._height + "px; ")
- }, e.prototype.show = function (e) {
- this._decorations = this._editor.deltaDecorations(this._decorations, [{
- range: l.Range.fromPositions(e),
- options: {className: this._ruleName, stickiness: 1}
- }])
- }, e.prototype.hide = function () {
- this._editor.deltaDecorations(this._decorations, [])
- },
- e._IdGenerator = new r.IdGenerator(".arrow-decoration-"), e
- }(), f = function () {
- function e(e, t) {
- var n = this;
- void 0 === t && (t = {}), this._arrow = null, this._overlayWidget = null, this._resizeSash = null, this._positionMarkerId = [], this._viewZone = null, this._disposables = new s.DisposableStore, this.container = null, this._isShowing = !1, this.editor = e, this.options = a.deepClone(t), a.mixin(this.options, c, !1), this.domNode = document.createElement("div"), this.options.isAccessible || (this.domNode.setAttribute("aria-hidden", "true"), this.domNode.setAttribute("role", "presentation")), this._disposables.add(this.editor.onDidLayoutChange((function (e) {
- var t = n._getWidth(e);
- n.domNode.style.width = t + "px", n.domNode.style.left = n._getLeft(e) + "px", n._onWidth(t)
- })))
- }
- return e.prototype.dispose = function () {
- var e = this;
- this._overlayWidget && (this.editor.removeOverlayWidget(this._overlayWidget), this._overlayWidget = null), this._viewZone && this.editor.changeViewZones((function (t) {
- e._viewZone && t.removeZone(e._viewZone.id), e._viewZone = null
- })),
- this.editor.deltaDecorations(this._positionMarkerId, []), this._positionMarkerId = [], this._disposables.dispose()
- }, e.prototype.create = function () {
- n.addClass(this.domNode, "zone-widget"), this.options.className && n.addClass(this.domNode, this.options.className), this.container = document.createElement("div"), n.addClass(this.container, "zone-widget-container"), this.domNode.appendChild(this.container), this.options.showArrow && (this._arrow = new g(this.editor), this._disposables.add(this._arrow)), this._fillContainer(this.container), this._initSash(), this._applyStyles()
- }, e.prototype.style = function (e) {
- e.frameColor && (this.options.frameColor = e.frameColor), e.arrowColor && (this.options.arrowColor = e.arrowColor), this._applyStyles()
- }, e.prototype._applyStyles = function () {
- if (this.container && this.options.frameColor) {
- var e = this.options.frameColor.toString();
- this.container.style.borderTopColor = e, this.container.style.borderBottomColor = e
- }
- if (this._arrow && this.options.arrowColor) {
- var t = this.options.arrowColor.toString();
- this._arrow.color = t
- }
- },
- e.prototype._getWidth = function (e) {
- return e.width - e.minimapWidth - e.verticalScrollbarWidth
- }, e.prototype._getLeft = function (e) {
- return e.minimapWidth > 0 && 0 === e.minimapLeft ? e.minimapWidth : 0
- }, e.prototype._onViewZoneTop = function (e) {
- this.domNode.style.top = e + "px"
- }, e.prototype._onViewZoneHeight = function (e) {
- if (this.domNode.style.height = e + "px", this.container) {
- var t = e - this._decoratingElementsHeight();
- this.container.style.height = t + "px";
- var n = this.editor.getLayoutInfo();
- this._doLayout(t, this._getWidth(n))
- }
- this._resizeSash && this._resizeSash.layout()
- }, Object.defineProperty(e.prototype, "position", {
- get: function () {
- var e = this._positionMarkerId[0];
- if (e) {
- var t = this.editor.getModel();
- if (t) {
- var n = t.getDecorationRange(e);
- if (n) return n.getStartPosition()
- }
- }
- }, enumerable: !0, configurable: !0
- }), e.prototype.show = function (e, t) {
- var n = l.Range.isIRange(e) ? l.Range.lift(e) : l.Range.fromPositions(e);
- this._isShowing = !0, this._showImpl(n, t), this._isShowing = !1, this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{
- range: n,
- options: u.ModelDecorationOptions.EMPTY
- }])
- }, e.prototype.hide = function () {
- var e = this;
- this._viewZone && (this.editor.changeViewZones((function (t) {
- e._viewZone && t.removeZone(e._viewZone.id)
- })), this._viewZone = null), this._overlayWidget && (this.editor.removeOverlayWidget(this._overlayWidget), this._overlayWidget = null), this._arrow && this._arrow.hide()
- }, e.prototype._decoratingElementsHeight = function () {
- var e = this.editor.getOption(49), t = 0;
- this.options.showArrow && (t += 2 * Math.round(e / 3));
- this.options.showFrame && (t += 2 * Math.round(e / 9));
- return t
- }, e.prototype._showImpl = function (e, t) {
- var n = this, i = e.getStartPosition(), o = this.editor.getLayoutInfo(), r = this._getWidth(o);
- this.domNode.style.width = r + "px", this.domNode.style.left = this._getLeft(o) + "px";
- var s = document.createElement("div");
- s.style.overflow = "hidden";
- var a = this.editor.getOption(49), l = this.editor.getLayoutInfo().height / a * .8;
- t >= l && (t = l);
- var u = 0, d = 0;
- if (this._arrow && this.options.showArrow && (u = Math.round(a / 3), this._arrow.height = u, this._arrow.show(i)),
- this.options.showFrame && (d = Math.round(a / 9)), this.editor.changeViewZones((function (e) {
- n._viewZone && e.removeZone(n._viewZone.id), n._overlayWidget && (n.editor.removeOverlayWidget(n._overlayWidget), n._overlayWidget = null), n.domNode.style.top = "-1000px", n._viewZone = new h(s, i.lineNumber, i.column, t, (function (e) {
- return n._onViewZoneTop(e)
- }), (function (e) {
- return n._onViewZoneHeight(e)
- })), n._viewZone.id = e.addZone(n._viewZone), n._overlayWidget = new p("vs.editor.contrib.zoneWidget" + n._viewZone.id, n.domNode), n.editor.addOverlayWidget(n._overlayWidget)
- })), this.container && this.options.showFrame) {
- var c = this.options.frameWidth ? this.options.frameWidth : d;
- this.container.style.borderTopWidth = c + "px", this.container.style.borderBottomWidth = c + "px"
- }
- var g = t * a - this._decoratingElementsHeight();
- this.container && (this.container.style.top = u + "px", this.container.style.height = g + "px", this.container.style.overflow = "hidden"), this._doLayout(g, r), this.options.keepEditorSelection || this.editor.setSelection(e);
- var f = this.editor.getModel();
- if (f) {
- var m = e.endLineNumber + 1;
- m <= f.getLineCount() ? this.revealLine(m, !1) : this.revealLine(f.getLineCount(), !0)
- }
- }, e.prototype.revealLine = function (e, t) {
- t ? this.editor.revealLineInCenter(e, 0) : this.editor.revealLine(e, 0)
- }, e.prototype.setCssClass = function (e, t) {
- this.container && (t && this.container.classList.remove(t), n.addClass(this.container, e))
- }, e.prototype._onWidth = function (e) {
- }, e.prototype._doLayout = function (e, t) {
- }, e.prototype._relayout = function (e) {
- var t = this;
- this._viewZone && this._viewZone.heightInLines !== e && this.editor.changeViewZones((function (n) {
- t._viewZone && (t._viewZone.heightInLines = e, n.layoutZone(t._viewZone.id))
- }))
- }, e.prototype._initSash = function () {
- var e, t = this;
- this._resizeSash || (this._resizeSash = this._disposables.add(new i.Sash(this.domNode, this, {orientation: 1})), this.options.isResizeable || (this._resizeSash.hide(), this._resizeSash.state = 0), this._disposables.add(this._resizeSash.onDidStart((function (n) {
- t._viewZone && (e = {startY: n.startY, heightInLines: t._viewZone.heightInLines})
- }))),
- this._disposables.add(this._resizeSash.onDidEnd((function () {
- e = void 0
- }))), this._disposables.add(this._resizeSash.onDidChange((function (n) {
- if (e) {
- var i = (n.currentY - e.startY) / t.editor.getOption(49),
- o = i < 0 ? Math.ceil(i) : Math.floor(i), r = e.heightInLines + o;
- r > 5 && r < 35 && t._relayout(r)
- }
- }))))
- }, e.prototype.getHorizontalSashLeft = function () {
- return 0
- }, e.prototype.getHorizontalSashTop = function () {
- return (null === this.domNode.style.height ? 0 : parseInt(this.domNode.style.height)) - this._decoratingElementsHeight() / 2
- }, e.prototype.getHorizontalSashWidth = function () {
- var e = this.editor.getLayoutInfo();
- return e.width - e.minimapWidth
- }, e
- }();
- t.ZoneWidget = f
- })),define(n[216], i([0, 1, 107, 17, 63, 203]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e(e) {
- this._maxCacheDepth = e, this._entries = Object.create(null)
- }
- return e.create = function (e, t) {
- return this._INSTANCE.create(e, t)
- }, e.prototype.create = function (e, t) {
- if (null !== e && e.depth >= this._maxCacheDepth) return new a(e, t);
- var n = a.getStackElementId(e)
- ;n.length > 0 && (n += "|"), n += t;
- var i = this._entries[n];
- return i || (i = new a(e, t), this._entries[n] = i, i)
- }, e._INSTANCE = new e(5), e
- }(), a = function () {
- function e(e, t) {
- this.parent = e, this.state = t, this.depth = (this.parent ? this.parent.depth : 0) + 1
- }
- return e.getStackElementId = function (e) {
- for (var t = ""; null !== e;) t.length > 0 && (t += "|"), t += e.state, e = e.parent;
- return t
- }, e._equals = function (e, t) {
- for (; null !== e && null !== t;) {
- if (e === t) return !0;
- if (e.state !== t.state) return !1;
- e = e.parent, t = t.parent
- }
- return null === e && null === t
- }, e.prototype.equals = function (t) {
- return e._equals(this, t)
- }, e.prototype.push = function (e) {
- return s.create(this, e)
- }, e.prototype.pop = function () {
- return this.parent
- }, e.prototype.popall = function () {
- for (var e = this; e.parent;) e = e.parent;
- return e
- }, e.prototype.switchTo = function (e) {
- return s.create(this.parent, e)
- }, e
- }(), l = function () {
- function e(e, t) {
- this.modeId = e, this.state = t
- }
- return e.prototype.equals = function (e) {
- return this.modeId === e.modeId && this.state.equals(e.state)
- }, e.prototype.clone = function () {
- return this.state.clone() === this.state ? this : new e(this.modeId, this.state)
- }, e
- }(), u = function () {
- function e(e) {
- this._maxCacheDepth = e, this._entries = Object.create(null)
- }
- return e.create = function (e, t) {
- return this._INSTANCE.create(e, t)
- }, e.prototype.create = function (e, t) {
- if (null !== t) return new d(e, t);
- if (null !== e && e.depth >= this._maxCacheDepth) return new d(e, t);
- var n = a.getStackElementId(e), i = this._entries[n];
- return i || (i = new d(e, null), this._entries[n] = i, i)
- }, e._INSTANCE = new e(5), e
- }(), d = function () {
- function e(e, t) {
- this.stack = e, this.embeddedModeData = t
- }
- return e.prototype.clone = function () {
- return (this.embeddedModeData ? this.embeddedModeData.clone() : null) === this.embeddedModeData ? this : u.create(this.stack, this.embeddedModeData)
- }, e.prototype.equals = function (t) {
- return t instanceof e && (!!this.stack.equals(t.stack) && (null === this.embeddedModeData && null === t.embeddedModeData || null !== this.embeddedModeData && null !== t.embeddedModeData && this.embeddedModeData.equals(t.embeddedModeData)))
- }, e
- }(), c = function () {
- function e() {
- this._tokens = [],
- this._language = null, this._lastTokenType = null, this._lastTokenLanguage = null
- }
- return e.prototype.enterMode = function (e, t) {
- this._language = t
- }, e.prototype.emit = function (e, t) {
- this._lastTokenType === t && this._lastTokenLanguage === this._language || (this._lastTokenType = t, this._lastTokenLanguage = this._language, this._tokens.push(new n.Token(e, t, this._language)))
- }, e.prototype.nestedModeTokenize = function (e, t, n) {
- var o = t.modeId, r = t.state, s = i.TokenizationRegistry.get(o);
- if (!s) return this.enterMode(n, o), this.emit(n, ""), r;
- var a = s.tokenize(e, r, n);
- return this._tokens = this._tokens.concat(a.tokens), this._lastTokenType = null, this._lastTokenLanguage = null, this._language = null, a.endState
- }, e.prototype.finalize = function (e) {
- return new n.TokenizationResult(this._tokens, e)
- }, e
- }(), h = function () {
- function e(e, t) {
- this._modeService = e, this._theme = t, this._prependTokens = null, this._tokens = [], this._currentLanguageId = 0, this._lastTokenMetadata = 0
- }
- return e.prototype.enterMode = function (e, t) {
- this._currentLanguageId = this._modeService.getLanguageIdentifier(t).id
- },
- e.prototype.emit = function (e, t) {
- var n = this._theme.match(this._currentLanguageId, t);
- this._lastTokenMetadata !== n && (this._lastTokenMetadata = n, this._tokens.push(e), this._tokens.push(n))
- }, e._merge = function (e, t, n) {
- var i = null !== e ? e.length : 0, o = t.length, r = null !== n ? n.length : 0;
- if (0 === i && 0 === o && 0 === r) return new Uint32Array(0);
- if (0 === i && 0 === o) return n;
- if (0 === o && 0 === r) return e;
- var s = new Uint32Array(i + o + r);
- null !== e && s.set(e);
- for (var a = 0; a < o; a++) s[i + a] = t[a];
- return null !== n && s.set(n, i + o), s
- }, e.prototype.nestedModeTokenize = function (t, n, o) {
- var r = n.modeId, s = n.state, a = i.TokenizationRegistry.get(r);
- if (!a) return this.enterMode(o, r), this.emit(o, ""), s;
- var l = a.tokenize2(t, s, o);
- return this._prependTokens = e._merge(this._prependTokens, this._tokens, l.tokens), this._tokens = [], this._currentLanguageId = 0, this._lastTokenMetadata = 0, l.endState
- }, e.prototype.finalize = function (t) {
- return new n.TokenizationResult2(e._merge(this._prependTokens, this._tokens, null), t)
- }, e
- }(), p = function () {
- function e(e, t, n, o) {
- var r = this;
- this._modeService = e,
- this._standaloneThemeService = t, this._modeId = n, this._lexer = o, this._embeddedModes = Object.create(null), this.embeddedLoaded = Promise.resolve(void 0);
- var s = !1;
- this._tokenizationRegistryListener = i.TokenizationRegistry.onDidChange((function (e) {
- if (!s) {
- for (var t = !1, n = 0, o = e.changedLanguages.length; n < o; n++) {
- var a = e.changedLanguages[n];
- if (r._embeddedModes[a]) {
- t = !0;
- break
- }
- }
- t && (s = !0, i.TokenizationRegistry.fire([r._modeId]), s = !1)
- }
- }))
- }
- return e.prototype.dispose = function () {
- this._tokenizationRegistryListener.dispose()
- }, e.prototype.getLoadStatus = function () {
- var t = [];
- for (var n in this._embeddedModes) {
- var o = i.TokenizationRegistry.get(n);
- if (o) {
- if (o instanceof e) {
- var r = o.getLoadStatus();
- !1 === r.loaded && t.push(r.promise)
- }
- } else {
- var s = i.TokenizationRegistry.getPromise(n);
- s && t.push(s)
- }
- }
- return 0 === t.length ? {loaded: !0} : {
- loaded: !1, promise: Promise.all(t).then((function (e) {
- }))
- }
- }, e.prototype.getInitialState = function () {
- var e = s.create(null, this._lexer.start);
- return u.create(e, null)
- }, e.prototype.tokenize = function (e, t, n) {
- var i = new c, o = this._tokenize(e, t, n, i);
- return i.finalize(o)
- }, e.prototype.tokenize2 = function (e, t, n) {
- var i = new h(this._modeService, this._standaloneThemeService.getTheme().tokenTheme),
- o = this._tokenize(e, t, n, i);
- return i.finalize(o)
- }, e.prototype._tokenize = function (e, t, n, i) {
- return t.embeddedModeData ? this._nestedTokenize(e, t, n, i) : this._myTokenize(e, t, n, i)
- }, e.prototype._findLeavingNestedModeOffset = function (e, t) {
- var n = this._lexer.tokenizer[t.stack.state];
- if (!n && !(n = r.findRules(this._lexer, t.stack.state))) throw r.createError(this._lexer, "tokenizer state is not defined: " + t.stack.state);
- for (var i = -1, o = !1, s = 0, a = n; s < a.length; s++) {
- var l = a[s];
- if (r.isIAction(l.action) && "@pop" === l.action.nextEmbedded) {
- o = !0;
- var u = l.regex, d = l.regex.source;
- "^(?:" === d.substr(0, 4) && ")" === d.substr(d.length - 1, 1) && (u = new RegExp(d.substr(4, d.length - 5), u.ignoreCase ? "i" : ""));
- var c = e.search(u);
- -1 === c || 0 !== c && l.matchOnlyAtLineStart || (-1 === i || c < i) && (i = c)
- }
- }
- if (!o) throw r.createError(this._lexer, 'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: ' + t.stack.state);
- return i
- }, e.prototype._nestedTokenize = function (e, t, n, i) {
- var o = this._findLeavingNestedModeOffset(e, t);
- if (-1 === o) {
- var r = i.nestedModeTokenize(e, t.embeddedModeData, n);
- return u.create(t.stack, new l(t.embeddedModeData.modeId, r))
- }
- var s = e.substring(0, o);
- s.length > 0 && i.nestedModeTokenize(s, t.embeddedModeData, n);
- var a = e.substring(o);
- return this._myTokenize(a, t, n + o, i)
- }, e.prototype._safeRuleName = function (e) {
- return e ? e.name : "(unknown)"
- }, e.prototype._myTokenize = function (e, t, n, i) {
- i.enterMode(n, this._modeId);
- for (var o = e.length, s = t.embeddedModeData, a = t.stack, l = 0, d = null, c = !0; c || l < o;) {
- var h = l, p = a.depth, f = d ? d.groups.length : 0, m = a.state, v = null, _ = null, y = null,
- C = null, b = null;
- if (d) {
- v = d.matches;
- var S = d.groups.shift();
- _ = S.matched, y = S.action, C = d.rule, 0 === d.groups.length && (d = null)
- } else {
- if (!c && l >= o) break;
- c = !1;
- var w = this._lexer.tokenizer[m]
- ;
- if (!w && !(w = r.findRules(this._lexer, m))) throw r.createError(this._lexer, "tokenizer state is not defined: " + m);
- for (var E = e.substr(l), L = 0, D = w; L < D.length; L++) {
- var N = D[L];
- if ((0 === l || !N.matchOnlyAtLineStart) && (v = E.match(N.regex))) {
- _ = v[0], y = N.action;
- break
- }
- }
- }
- if (v || (v = [""], _ = ""), y || (l < o && (_ = (v = [e.charAt(l)])[0]), y = this._lexer.defaultToken), null === _) break;
- for (l += _.length; r.isFuzzyAction(y) && r.isIAction(y) && y.test;) y = y.test(_, v, m, l === o);
- var x = null;
- if ("string" == typeof y || Array.isArray(y)) x = y; else if (y.group) x = y.group; else if (null !== y.token && void 0 !== y.token) {
- if (x = y.tokenSubst ? r.substituteMatches(this._lexer, y.token, _, v, m) : y.token, y.nextEmbedded) if ("@pop" === y.nextEmbedded) {
- if (!s) throw r.createError(this._lexer, "cannot pop embedded mode if not inside one");
- s = null
- } else {
- if (s) throw r.createError(this._lexer, "cannot enter embedded mode from within an embedded mode");
- b = r.substituteMatches(this._lexer, y.nextEmbedded, _, v, m)
- }
- if (y.goBack && (l = Math.max(0, l - y.goBack)), y.switchTo && "string" == typeof y.switchTo) {
- if ("@" === (I = r.substituteMatches(this._lexer, y.switchTo, _, v, m))[0] && (I = I.substr(1)), !r.findRules(this._lexer, I)) throw r.createError(this._lexer, "trying to switch to a state '" + I + "' that is undefined in rule: " + this._safeRuleName(C));
- a = a.switchTo(I)
- } else {
- if (y.transform && "function" == typeof y.transform) throw r.createError(this._lexer, "action.transform not supported");
- if (y.next) if ("@push" === y.next) {
- if (a.depth >= this._lexer.maxStack) throw r.createError(this._lexer, "maximum tokenizer stack size reached: [" + a.state + "," + a.parent.state + ",...]");
- a = a.push(m)
- } else if ("@pop" === y.next) {
- if (a.depth <= 1) throw r.createError(this._lexer, "trying to pop an empty stack in rule: " + this._safeRuleName(C));
- a = a.pop()
- } else if ("@popall" === y.next) a = a.popall(); else {
- var I;
- if ("@" === (I = r.substituteMatches(this._lexer, y.next, _, v, m))[0] && (I = I.substr(1)), !r.findRules(this._lexer, I)) throw r.createError(this._lexer, "trying to set a next state '" + I + "' that is undefined in rule: " + this._safeRuleName(C));
- a = a.push(I)
- }
- }
- y.log && "string" == typeof y.log && r.log(this._lexer, this._lexer.languageId + ": " + r.substituteMatches(this._lexer, y.log, _, v, m))
- }
- if (null === x) throw r.createError(this._lexer, "lexer rule has no well-defined action in rule: " + this._safeRuleName(C));
- if (Array.isArray(x)) {
- if (d && d.groups.length > 0) throw r.createError(this._lexer, "groups cannot be nested: " + this._safeRuleName(C));
- if (v.length !== x.length + 1) throw r.createError(this._lexer, "matched number of groups does not match the number of actions in rule: " + this._safeRuleName(C));
- for (var M = 0, k = 1; k < v.length; k++) M += v[k].length;
- if (M !== _.length) throw r.createError(this._lexer, "with groups, all characters should be matched in consecutive groups in rule: " + this._safeRuleName(C));
- d = {rule: C, matches: v, groups: []};
- for (k = 0; k < x.length; k++) d.groups[k] = {action: x[k], matched: v[k + 1]};
- l -= _.length
- } else {
- if ("@rematch" === x && (l -= _.length, _ = "", v = null, x = ""), 0 === _.length) {
- if (0 === o || p !== a.depth || m !== a.state || (d ? d.groups.length : 0) !== f) continue
- ;
- throw r.createError(this._lexer, "no progress in tokenizer in rule: " + this._safeRuleName(C))
- }
- var T = null;
- if (r.isString(x) && 0 === x.indexOf("@brackets")) {
- var R = x.substr("@brackets".length), O = g(this._lexer, _);
- if (!O) throw r.createError(this._lexer, "@brackets token returned but no bracket defined as: " + _);
- T = r.sanitize(O.token + R)
- } else {
- var P = "" === x ? "" : x + this._lexer.tokenPostfix;
- T = r.sanitize(P)
- }
- if (i.emit(h + n, T), null !== b) {
- var A = this._modeService.getModeIdForLanguageName(b);
- A && (b = A);
- var F = this._getNestedEmbeddedModeData(b);
- if (l < o) {
- E = e.substr(l);
- return this._nestedTokenize(E, u.create(a, F), n + l, i)
- }
- return u.create(a, F)
- }
- }
- }
- return u.create(a, s)
- }, e.prototype._getNestedEmbeddedModeData = function (e) {
- var t = this._locateMode(e);
- if (t) {
- var n = i.TokenizationRegistry.get(t);
- if (n) return new l(t, n.getInitialState())
- }
- return new l(t || o.NULL_MODE_ID, o.NULL_STATE)
- }, e.prototype._locateMode = function (e) {
- if (!e || !this._modeService.isRegisteredMode(e)) return null;
- if (e === this._modeId) return e;
- var t = this._modeService.getModeId(e)
- ;
- return t && (this._modeService.triggerMode(t), this._embeddedModes[t] = !0), t
- }, e
- }();
- function g(e, t) {
- if (!t) return null;
- t = r.fixCase(e, t);
- for (var n = 0, i = e.brackets; n < i.length; n++) {
- var o = i[n];
- if (o.open === t) return {token: o.token, bracketType: 1};
- if (o.close === t) return {token: o.token, bracketType: -1}
- }
- return null
- }
- t.MonarchTokenizer = p, t.createTokenizationSupport = function (e, t, n, i) {
- return new p(e, t, n, i)
- }
- })),define(n[494], i([0, 1, 15, 5, 93, 17, 110, 69, 216]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- function e() {
- }
- return e.colorizeElement = function (e, t, n, i) {
- var o = (i = i || {}).theme || "vs",
- r = i.mimeType || n.getAttribute("lang") || n.getAttribute("data-lang");
- if (!r) return console.error("Mode not detected"), Promise.resolve();
- e.setTheme(o);
- var s = n.firstChild ? n.firstChild.nodeValue : "";
- n.className += " " + o;
- return this.colorize(t, s || "", r, i).then((function (e) {
- n.innerHTML = e
- }), (function (e) {
- return console.error(e)
- }))
- }, e.colorize = function (e, t, o, s) {
- var a = 4
- ;s && "number" == typeof s.tabSize && (a = s.tabSize), i.startsWithUTF8BOM(t) && (t = t.substr(1));
- var l = t.split(/\r\n|\r|\n/), u = e.getModeId(o);
- if (!u) return Promise.resolve(c(l, a));
- e.triggerMode(u);
- var h = r.TokenizationRegistry.get(u);
- if (h) return d(l, a, h);
- var p = r.TokenizationRegistry.getPromise(u);
- return p ? new Promise((function (e, t) {
- p.then((function (n) {
- d(l, a, n).then(e, t)
- }), t)
- })) : new Promise((function (e, t) {
- var i = null, o = null, s = function () {
- i && (i.dispose(), i = null), o && (o.dispose(), o = null);
- var n = r.TokenizationRegistry.get(u);
- n ? d(l, a, n).then(e, t) : e(c(l, a))
- };
- (o = new n.TimeoutTimer).cancelAndSet(s, 500), i = r.TokenizationRegistry.onDidChange((function (e) {
- e.changedLanguages.indexOf(u) >= 0 && s()
- }))
- }))
- }, e.colorizeLine = function (e, t, n, i, o) {
- void 0 === o && (o = 4);
- var r = a.ViewLineRenderingData.isBasicASCII(e, t), l = a.ViewLineRenderingData.containsRTL(e, r, n);
- return s.renderViewLine2(new s.RenderLineInput(!1, !0, e, !1, r, l, 0, i, [], o, 0, 0, 0, -1, "none", !1, !1, null)).html
- }, e.colorizeModelLine = function (e, t, n) {
- void 0 === n && (n = 4);
- var i = e.getLineContent(t)
- ;e.forceTokenization(t);
- var o = e.getLineTokens(t).inflate();
- return this.colorizeLine(i, e.mightContainNonBasicASCII(), e.mightContainRTL(), o, n)
- }, e
- }();
- function d(e, t, n) {
- return new Promise((function (i, r) {
- var u = function () {
- var d = function (e, t, n) {
- for (var i = [], r = n.getInitialState(), l = 0, u = e.length; l < u; l++) {
- var d = e[l], c = n.tokenize2(d, r, 0);
- o.LineTokens.convertToEndOffset(c.tokens, d.length);
- var h = new o.LineTokens(c.tokens, d), p = a.ViewLineRenderingData.isBasicASCII(d, !0),
- g = a.ViewLineRenderingData.containsRTL(d, p, !0),
- f = s.renderViewLine2(new s.RenderLineInput(!1, !0, d, !1, p, g, 0, h.inflate(), [], t, 0, 0, 0, -1, "none", !1, !1, null));
- (i = i.concat(f.html)).push("<br/>"), r = c.endState
- }
- return i.join("")
- }(e, t, n);
- if (n instanceof l.MonarchTokenizer) {
- var c = n.getLoadStatus();
- if (!1 === c.loaded) return void c.promise.then(u, r)
- }
- i(d)
- };
- u()
- }))
- }
- function c(e, t) {
- var n = [], i = new Uint32Array(2);
- i[0] = 0, i[1] = 16793600;
- for (var r = 0, l = e.length; r < l; r++) {
- var u = e[r];
- i[0] = u.length
- ;var d = new o.LineTokens(i, u), c = a.ViewLineRenderingData.isBasicASCII(u, !0),
- h = a.ViewLineRenderingData.containsRTL(u, c, !0),
- p = s.renderViewLine2(new s.RenderLineInput(!1, !0, u, !1, c, h, 0, d, [], t, 0, 0, 0, -1, "none", !1, !1, null));
- (n = n.concat(p.html)).push("<br/>")
- }
- return n.join("")
- }
- t.Colorizer = u
- })),define(n[94], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IStandaloneThemeService = n.createDecorator("themeService")
- })),define(n[162], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IClipboardService = n.createDecorator("clipboardService")
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[29], i([0, 1, 2, 21, 11, 4, 76, 38]), (function (e, t, n, i, o, r, s, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ICommandService = o.createDecorator("commandService"),
- t.CommandsRegistry = new (function () {
- function e() {
- this._commands = new Map, this._onDidRegisterCommand = new r.Emitter, this.onDidRegisterCommand = this._onDidRegisterCommand.event
- }
- return e.prototype.registerCommand = function (e, t) {
- var o = this;
- if (!e) throw new Error("invalid command");
- if ("string" == typeof e) {
- if (!t) throw new Error("invalid command");
- return this.registerCommand({id: e, handler: t})
- }
- if (e.description) {
- for (var r = [], l = 0, u = e.description.args; l < u.length; l++) {
- var d = u[l];
- r.push(d.constraint)
- }
- var c = e.handler;
- e.handler = function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- return i.validateConstraints(t, r), c.apply(void 0, a([e], t))
- }
- }
- var h = e.id, p = this._commands.get(h);
- p || (p = new s.LinkedList, this._commands.set(h, p));
- var g = p.unshift(e), f = n.toDisposable((function () {
- g();
- var e = o._commands.get(h);
- (null == e ? void 0 : e.isEmpty()) && o._commands.delete(h)
- }));
- return this._onDidRegisterCommand.fire(h), f
- }, e.prototype.registerCommandAlias = function (e, n) {
- return t.CommandsRegistry.registerCommand(e, (function (e) {
- for (var i, o = [], r = 1; r < arguments.length; r++) o[r - 1] = arguments[r];
- return (i = e.get(t.ICommandService)).executeCommand.apply(i, a([n], o))
- }))
- }, e.prototype.getCommand = function (e) {
- var t = this._commands.get(e);
- if (t && !t.isEmpty()) return t.iterator().next().value
- }, e.prototype.getCommands = function () {
- for (var e = new Map, t = 0, n = l.keys(this._commands); t < n.length; t++) {
- var i = n[t], o = this.getCommand(i);
- o && e.set(i, o)
- }
- return e
- }, e
- }())
- })), define(n[495], i([0, 1, 26, 10, 25, 3, 17, 49, 29, 2, 19]), (function (e, t, n, i, o, s, a, l, u, h, p) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var g = function () {
- function e(e, t) {
- this._link = e, this._provider = t
- }
- return e.prototype.toJSON = function () {
- return {range: this.range, url: this.url, tooltip: this.tooltip}
- }, Object.defineProperty(e.prototype, "range", {
- get: function () {
- return this._link.range
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "url", {
- get: function () {
- return this._link.url
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "tooltip", {
- get: function () {
- return this._link.tooltip
- }, enumerable: !0, configurable: !0
- }), e.prototype.resolve = function (e) {
- return d(this, void 0, void 0, (function () {
- var t = this;
- return c(this, (function (n) {
- return this._link.url ? [2, this._link.url] : "function" == typeof this._provider.resolveLink ? [2, Promise.resolve(this._provider.resolveLink(this._link, e)).then((function (n) {
- return t._link = n || t._link, t._link.url ? t.resolve(e) : Promise.reject(new Error("missing"))
- }))] : [2, Promise.reject(new Error("missing"))]
- }))
- }))
- }, e
- }();
- t.Link = g;
- var f = function (e) {
- function t(n) {
- for (var i = e.call(this) || this, o = [], r = function (e, n) {
- var i = e.links.map((function (e) {
- return new g(e, n)
- }));
- o = t._union(o, i), h.isDisposable(n) && s._register(n)
- }, s = this, a = 0, l = n; a < l.length; a++) {
- var u = l[a];
- r(u[0], u[1])
- }
- return i.links = o, i
- }
- return r(t, e), t._union = function (e, t) {
- var n, i, o, r, a = [];
- for (n = 0, o = 0, i = e.length, r = t.length; n < i && o < r;) {
- var l = e[n], u = t[o];
- if (s.Range.areIntersectingOrTouching(l.range, u.range)) n++; else s.Range.compareRangesUsingStarts(l.range, u.range) < 0 ? (a.push(l), n++) : (a.push(u), o++)
- }
- for (; n < i; n++) a.push(e[n]);
- for (; o < r; o++) a.push(t[o]);
- return a
- }, t
- }(h.Disposable);
- function m(e, t) {
- var n = [], o = a.LinkProviderRegistry.ordered(e).reverse().map((function (o, r) {
- return Promise.resolve(o.provideLinks(e, t)).then((function (e) {
- e && (n[r] = [e, o])
- }), i.onUnexpectedExternalError)
- }));
- return Promise.all(o).then((function () {
- var e = new f(p.coalesce(n));
- return t.isCancellationRequested ? (e.dispose(), new f([])) : e
- }))
- }
- t.LinksList = f, t.getLinks = m, u.CommandsRegistry.registerCommand("_executeLinkProvider", (function (e) {
- for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
- return d(void 0, void 0, void 0, (function () {
- var i, r, s, a;
- return c(this, (function (u) {
- switch (u.label) {
- case 0:
- return (i = t[0]) instanceof o.URI && (r = e.get(l.IModelService).getModel(i)) ? [4, m(r, n.CancellationToken.None)] : [2, []];
- case 1:
- return (s = u.sent()) ? (a = s.links.slice(0), s.dispose(), [2, a]) : [2, []]
- }
- }))
- }))
- }))
- })), define(n[496], i([0, 1, 25, 3, 49, 26, 84, 489, 87, 29, 21]), (function (e, t, n, i, o, r, s, a, l, u, h) {
- "use strict";
- function p(e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i, o, r, s, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- return [4, a.OutlineModel.create(e, n)];
- case 1:
- for (i = c.sent(), o = [], r = 0, s = l.values(i.children); r < s.length; r++) (u = s[r]) instanceof a.OutlineElement ? o.push(u.symbol) : o.push.apply(o, l.values(u.children).map((function (e) {
- return e.symbol
- })));
- return d = [], n.isCancellationRequested ? [2, d] : (t ? function e(t, n, i) {
- for (var o = 0, r = n; o < r.length; o++) {
- var s = r[o];
- t.push({
- kind: s.kind,
- tags: s.tags,
- name: s.name,
- detail: s.detail,
- containerName: s.containerName || i,
- range: s.range,
- selectionRange: s.selectionRange,
- children: void 0
- }), s.children && e(t, s.children, s.name)
- }
- }(d, o, "") : d = o, [2, d.sort(g)])
- }
- }))
- }))
- }
- function g(e, t) {
- return i.Range.compareRangesUsingStarts(e.range, t.range)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getDocumentSymbols = p, u.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider", (function (e) {
- for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
- return d(this, void 0, void 0, (function () {
- var i, a, l;
- return c(this, (function (u) {
- switch (u.label) {
- case 0:
- return i = t[0], h.assertType(n.URI.isUri(i)), (a = e.get(o.IModelService).getModel(i)) ? [2, p(a, !1, r.CancellationToken.None)] : [4, e.get(s.ITextModelService).createModelReference(i)];
- case 1:
- l = u.sent(), u.label = 2;
- case 2:
- return u.trys.push([2, , 4, 5]), [4, p(l.object.textEditorModel, !1, r.CancellationToken.None)];
- case 3:
- return [2, u.sent()];
- case 4:
- return l.dispose(), [7];
- case 5:
- return [2]
- }
- }))
- }))
- }))
- })), define(n[18], i([0, 1, 5, 11]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e() {
- }
- return e.has = function (e) {
- return a.create(e)
- }, e.equals = function (e, t) {
- return l.create(e, t)
- }, e.regex = function (e, t) {
- return c.create(e, t)
- }, e.not = function (e) {
- return d.create(e)
- }, e.and = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return p.create(e)
- }, e.or = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return g.create(e)
- }, e.deserialize = function (e, t) {
- if (void 0 === t && (t = !1), e) return this._deserializeOrExpression(e, t)
- }, e._deserializeOrExpression = function (e, t) {
- var n = this, i = e.split("||");
- return g.create(i.map((function (e) {
- return n._deserializeAndExpression(e, t)
- })))
- }, e._deserializeAndExpression = function (e, t) {
- var n = this, i = e.split("&&");
- return p.create(i.map((function (e) {
- return n._deserializeOne(e, t)
- })))
- }, e._deserializeOne = function (e, t) {
- if ((e = e.trim()).indexOf("!=") >= 0) {
- var n = e.split("!=");
- return u.create(n[0].trim(), this._deserializeValue(n[1], t))
- }
- if (e.indexOf("==") >= 0) {
- n = e.split("==");
- return l.create(n[0].trim(), this._deserializeValue(n[1], t))
- }
- if (e.indexOf("=~") >= 0) {
- n = e.split("=~");
- return c.create(n[0].trim(), this._deserializeRegexValue(n[1], t))
- }
- return /^\!\s*/.test(e) ? d.create(e.substr(1).trim()) : a.create(e)
- }, e._deserializeValue = function (e, t) {
- if ("true" === (e = e.trim())) return !0;
- if ("false" === e) return !1;
- var n = /^'([^']*)'$/.exec(e);
- return n ? n[1].trim() : e
- }, e._deserializeRegexValue = function (e, t) {
- if (n.isFalsyOrWhitespace(e)) {
- if (t) throw new Error("missing regexp-value for =~-expression");
- return console.warn("missing regexp-value for =~-expression"), null
- }
- var i = e.indexOf("/"), o = e.lastIndexOf("/");
- if (i === o || i < 0) {
- if (t) throw new Error("bad regexp-value '" + e + "', missing /-enclosure");
- return console.warn("bad regexp-value '" + e + "', missing /-enclosure"), null
- }
- var r = e.slice(i + 1, o), s = "i" === e[o + 1] ? "i" : "";
- try {
- return new RegExp(r, s)
- } catch (n) {
- if (t) throw new Error("bad regexp-value '" + e + "', parse error: " + n);
- return console.warn("bad regexp-value '" + e + "', parse error: " + n), null
- }
- }, e
- }();
- function s(e, t) {
- var n = e.getType(), i = t.getType();
- if (n !== i) return n - i;
- switch (n) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 6:
- case 7:
- case 5:
- return e.cmp(t);
- default:
- throw new Error("Unknown ContextKeyExpr!")
- }
- }
- t.ContextKeyExpr = o;
- var a = function () {
- function e(e) {
- this.key = e
- }
- return e.create = function (t) {
- return new e(t)
- }, e.prototype.getType = function () {
- return 1
- }, e.prototype.cmp = function (e) {
- return this.key < e.key ? -1 : this.key > e.key ? 1 : 0
- }, e.prototype.equals = function (t) {
- return t instanceof e && this.key === t.key
- }, e.prototype.evaluate = function (e) {
- return !!e.getValue(this.key)
- }, e.prototype.keys = function () {
- return [this.key]
- },
- e.prototype.negate = function () {
- return d.create(this.key)
- }, e
- }();
- t.ContextKeyDefinedExpr = a;
- var l = function () {
- function e(e, t) {
- this.key = e, this.value = t
- }
- return e.create = function (t, n) {
- return "boolean" == typeof n ? n ? a.create(t) : d.create(t) : new e(t, n)
- }, e.prototype.getType = function () {
- return 3
- }, e.prototype.cmp = function (e) {
- return this.key < e.key ? -1 : this.key > e.key ? 1 : this.value < e.value ? -1 : this.value > e.value ? 1 : 0
- }, e.prototype.equals = function (t) {
- return t instanceof e && (this.key === t.key && this.value === t.value)
- }, e.prototype.evaluate = function (e) {
- return e.getValue(this.key) == this.value
- }, e.prototype.keys = function () {
- return [this.key]
- }, e.prototype.negate = function () {
- return u.create(this.key, this.value)
- }, e
- }();
- t.ContextKeyEqualsExpr = l;
- var u = function () {
- function e(e, t) {
- this.key = e, this.value = t
- }
- return e.create = function (t, n) {
- return "boolean" == typeof n ? n ? d.create(t) : a.create(t) : new e(t, n)
- }, e.prototype.getType = function () {
- return 4
- }, e.prototype.cmp = function (e) {
- return this.key < e.key ? -1 : this.key > e.key ? 1 : this.value < e.value ? -1 : this.value > e.value ? 1 : 0
- },
- e.prototype.equals = function (t) {
- return t instanceof e && (this.key === t.key && this.value === t.value)
- }, e.prototype.evaluate = function (e) {
- return e.getValue(this.key) != this.value
- }, e.prototype.keys = function () {
- return [this.key]
- }, e.prototype.negate = function () {
- return l.create(this.key, this.value)
- }, e
- }();
- t.ContextKeyNotEqualsExpr = u;
- var d = function () {
- function e(e) {
- this.key = e
- }
- return e.create = function (t) {
- return new e(t)
- }, e.prototype.getType = function () {
- return 2
- }, e.prototype.cmp = function (e) {
- return this.key < e.key ? -1 : this.key > e.key ? 1 : 0
- }, e.prototype.equals = function (t) {
- return t instanceof e && this.key === t.key
- }, e.prototype.evaluate = function (e) {
- return !e.getValue(this.key)
- }, e.prototype.keys = function () {
- return [this.key]
- }, e.prototype.negate = function () {
- return a.create(this.key)
- }, e
- }();
- t.ContextKeyNotExpr = d;
- var c = function () {
- function e(e, t) {
- this.key = e, this.regexp = t
- }
- return e.create = function (t, n) {
- return new e(t, n)
- }, e.prototype.getType = function () {
- return 6
- }, e.prototype.cmp = function (e) {
- if (this.key < e.key) return -1;
- if (this.key > e.key) return 1
- ;
- var t = this.regexp ? this.regexp.source : "", n = e.regexp ? e.regexp.source : "";
- return t < n ? -1 : t > n ? 1 : 0
- }, e.prototype.equals = function (t) {
- if (t instanceof e) {
- var n = this.regexp ? this.regexp.source : "", i = t.regexp ? t.regexp.source : "";
- return this.key === t.key && n === i
- }
- return !1
- }, e.prototype.evaluate = function (e) {
- var t = e.getValue(this.key);
- return !!this.regexp && this.regexp.test(t)
- }, e.prototype.keys = function () {
- return [this.key]
- }, e.prototype.negate = function () {
- return h.create(this)
- }, e
- }();
- t.ContextKeyRegexExpr = c;
- var h = function () {
- function e(e) {
- this._actual = e
- }
- return e.create = function (t) {
- return new e(t)
- }, e.prototype.getType = function () {
- return 7
- }, e.prototype.cmp = function (e) {
- return this._actual.cmp(e._actual)
- }, e.prototype.equals = function (t) {
- return t instanceof e && this._actual.equals(t._actual)
- }, e.prototype.evaluate = function (e) {
- return !this._actual.evaluate(e)
- }, e.prototype.keys = function () {
- return this._actual.keys()
- }, e.prototype.negate = function () {
- return this._actual
- }, e
- }();
- t.ContextKeyNotRegexExpr = h;
- var p = function () {
- function e(e) {
- this.expr = e
- }
- return e.create = function (t) {
- var n = e._normalizeArr(t);
- if (0 !== n.length) return 1 === n.length ? n[0] : new e(n)
- }, e.prototype.getType = function () {
- return 5
- }, e.prototype.cmp = function (e) {
- if (this.expr.length < e.expr.length) return -1;
- if (this.expr.length > e.expr.length) return 1;
- for (var t = 0, n = this.expr.length; t < n; t++) {
- var i = s(this.expr[t], e.expr[t]);
- if (0 !== i) return i
- }
- return 0
- }, e.prototype.equals = function (t) {
- if (t instanceof e) {
- if (this.expr.length !== t.expr.length) return !1;
- for (var n = 0, i = this.expr.length; n < i; n++) if (!this.expr[n].equals(t.expr[n])) return !1;
- return !0
- }
- return !1
- }, e.prototype.evaluate = function (e) {
- for (var t = 0, n = this.expr.length; t < n; t++) if (!this.expr[t].evaluate(e)) return !1;
- return !0
- }, e._normalizeArr = function (t) {
- var n = [];
- if (t) {
- for (var i = 0, o = t.length; i < o; i++) {
- var r = t[i];
- if (r) if (r instanceof e) n = n.concat(r.expr); else {
- if (r instanceof g) throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');
- n.push(r)
- }
- }
- n.sort(s)
- }
- return n
- },
- e.prototype.keys = function () {
- for (var e = [], t = 0, n = this.expr; t < n.length; t++) {
- var i = n[t];
- e.push.apply(e, i.keys())
- }
- return e
- }, e.prototype.negate = function () {
- for (var e = [], t = 0, n = this.expr; t < n.length; t++) {
- var i = n[t];
- e.push(i.negate())
- }
- return g.create(e)
- }, e
- }();
- t.ContextKeyAndExpr = p;
- var g = function () {
- function e(e) {
- this.expr = e
- }
- return e.create = function (t) {
- var n = e._normalizeArr(t);
- if (0 !== n.length) return 1 === n.length ? n[0] : new e(n)
- }, e.prototype.getType = function () {
- return 8
- }, e.prototype.equals = function (t) {
- if (t instanceof e) {
- if (this.expr.length !== t.expr.length) return !1;
- for (var n = 0, i = this.expr.length; n < i; n++) if (!this.expr[n].equals(t.expr[n])) return !1;
- return !0
- }
- return !1
- }, e.prototype.evaluate = function (e) {
- for (var t = 0, n = this.expr.length; t < n; t++) if (this.expr[t].evaluate(e)) return !0;
- return !1
- }, e._normalizeArr = function (t) {
- var n = [];
- if (t) {
- for (var i = 0, o = t.length; i < o; i++) {
- var r = t[i];
- r && (r instanceof e ? n = n.concat(r.expr) : n.push(r))
- }
- n.sort(s)
- }
- return n
- }, e.prototype.keys = function () {
- for (var e = [], t = 0, n = this.expr; t < n.length; t++) {
- var i = n[t]
- ;e.push.apply(e, i.keys())
- }
- return e
- }, e.prototype.negate = function () {
- for (var t = [], n = 0, i = this.expr; n < i.length; n++) {
- var r = i[n];
- t.push(r.negate())
- }
- for (var s = function (t) {
- return t instanceof e ? t.expr : [t]
- }; t.length > 1;) {
- for (var a = t.shift(), l = t.shift(), u = [], d = 0, c = s(a); d < c.length; d++) for (var h = c[d], p = 0, g = s(l); p < g.length; p++) {
- var f = g[p];
- u.push(o.and(h, f))
- }
- t.unshift(o.or.apply(o, u))
- }
- return t[0]
- }, e
- }();
- t.ContextKeyOrExpr = g;
- var f = function (e) {
- function t(t, n) {
- var i = e.call(this, t) || this;
- return i._defaultValue = n, i
- }
- return r(t, e), t.prototype.bindTo = function (e) {
- return e.createKey(this.key, this._defaultValue)
- }, t.prototype.getValue = function (e) {
- return e.getContextKeyValue(this.key)
- }, t.prototype.toNegated = function () {
- return o.not(this.key)
- }, t
- }(a);
- t.RawContextKey = f, t.IContextKeyService = i.createDecorator("contextKeyService"), t.SET_CONTEXT_COMMAND_ID = "setContext"
- })), define(n[23], i([0, 1, 18]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.editorSimpleInput = new n.RawContextKey("editorSimpleInput", !1), e.editorTextFocus = new n.RawContextKey("editorTextFocus", !1), e.focus = new n.RawContextKey("editorFocus", !1), e.textInputFocus = new n.RawContextKey("textInputFocus", !1), e.readOnly = new n.RawContextKey("editorReadonly", !1), e.writable = e.readOnly.toNegated(), e.hasNonEmptySelection = new n.RawContextKey("editorHasSelection", !1), e.hasOnlyEmptySelection = e.hasNonEmptySelection.toNegated(), e.hasMultipleSelections = new n.RawContextKey("editorHasMultipleSelections", !1), e.hasSingleSelection = e.hasMultipleSelections.toNegated(), e.tabMovesFocus = new n.RawContextKey("editorTabMovesFocus", !1), e.tabDoesNotMoveFocus = e.tabMovesFocus.toNegated(), e.isInEmbeddedEditor = new n.RawContextKey("isInEmbeddedEditor", !1), e.canUndo = new n.RawContextKey("canUndo", !1), e.canRedo = new n.RawContextKey("canRedo", !1), e.languageId = new n.RawContextKey("editorLangId", ""), e.hasCompletionItemProvider = new n.RawContextKey("editorHasCompletionItemProvider", !1),
- e.hasCodeActionsProvider = new n.RawContextKey("editorHasCodeActionsProvider", !1), e.hasCodeLensProvider = new n.RawContextKey("editorHasCodeLensProvider", !1), e.hasDefinitionProvider = new n.RawContextKey("editorHasDefinitionProvider", !1), e.hasDeclarationProvider = new n.RawContextKey("editorHasDeclarationProvider", !1), e.hasImplementationProvider = new n.RawContextKey("editorHasImplementationProvider", !1), e.hasTypeDefinitionProvider = new n.RawContextKey("editorHasTypeDefinitionProvider", !1), e.hasHoverProvider = new n.RawContextKey("editorHasHoverProvider", !1), e.hasDocumentHighlightProvider = new n.RawContextKey("editorHasDocumentHighlightProvider", !1), e.hasDocumentSymbolProvider = new n.RawContextKey("editorHasDocumentSymbolProvider", !1), e.hasReferenceProvider = new n.RawContextKey("editorHasReferenceProvider", !1), e.hasRenameProvider = new n.RawContextKey("editorHasRenameProvider", !1), e.hasSignatureHelpProvider = new n.RawContextKey("editorHasSignatureHelpProvider", !1),
- e.hasDocumentFormattingProvider = new n.RawContextKey("editorHasDocumentFormattingProvider", !1), e.hasDocumentSelectionFormattingProvider = new n.RawContextKey("editorHasDocumentSelectionFormattingProvider", !1), e.hasMultipleDocumentFormattingProvider = new n.RawContextKey("editorHasMultipleDocumentFormattingProvider", !1), e.hasMultipleDocumentSelectionFormattingProvider = new n.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider", !1)
- }(t.EditorContextKeys || (t.EditorContextKeys = {}))
- }));
- var g = this && this.__param || function (e, t) {
- return function (n, i) {
- t(n, i, e)
- }
- };
- define(n[497], i([0, 1, 2, 18]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e(t, n) {
- this._editor = t, this._index = 0, this._ckOtherSuggestions = e.OtherSuggestions.bindTo(n)
- }
- return e.prototype.dispose = function () {
- this.reset()
- }, e.prototype.reset = function () {
- this._ckOtherSuggestions.reset(), n.dispose(this._listener), this._model = void 0, this._acceptNext = void 0, this._ignore = !1
- }, e.prototype.set = function (t, n) {
- var i = this, o = t.model, r = t.index;
- 0 !== o.items.length ? e._moveIndex(!0, o, r) !== r ? (this._acceptNext = n, this._model = o, this._index = r, this._listener = this._editor.onDidChangeCursorPosition((function () {
- i._ignore || i.reset()
- })), this._ckOtherSuggestions.set(!0)) : this.reset() : this.reset()
- }, e._moveIndex = function (e, t, n) {
- for (var i = n; (i = (i + t.items.length + (e ? 1 : -1)) % t.items.length) !== n && t.items[i].completion.additionalTextEdits;) ;
- return i
- }, e.prototype.next = function () {
- this._move(!0)
- }, e.prototype.prev = function () {
- this._move(!1)
- }, e.prototype._move = function (t) {
- if (this._model) try {
- this._ignore = !0, this._index = e._moveIndex(t, this._model, this._index), this._acceptNext({
- index: this._index,
- item: this._model.items[this._index],
- model: this._model
- })
- } finally {
- this._ignore = !1
- }
- }, e.OtherSuggestions = new i.RawContextKey("hasOtherSuggestions", !1), e = h([g(1, i.IContextKeyService)], e)
- }();
- t.SuggestAlternatives = o
- })), define(n[498], i([0, 1, 18, 2]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(n, i) {
- var o = e.call(this) || this;
- return o._editor = n, o._enabled = !1, o._ckAtEnd = t.AtEnd.bindTo(i), o._register(o._editor.onDidChangeConfiguration((function (e) {
- return e.hasChanged(94) && o._update()
- }))), o._update(), o
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), i.dispose(this._selectionListener), this._ckAtEnd.reset()
- }, t.prototype._update = function () {
- var e = this, t = "on" === this._editor.getOption(94);
- if (this._enabled !== t) if (this._enabled = t, this._enabled) {
- var n = function () {
- if (e._editor.hasModel()) {
- var t = e._editor.getModel(), n = e._editor.getSelection(),
- i = t.getWordAtPosition(n.getStartPosition());
- i ? e._ckAtEnd.set(i.endColumn === n.getStartPosition().column) : e._ckAtEnd.set(!1)
- } else e._ckAtEnd.set(!1)
- };
- this._selectionListener = this._editor.onDidChangeCursorSelection(n), n()
- } else this._selectionListener && (this._ckAtEnd.reset(), this._selectionListener.dispose(), this._selectionListener = void 0)
- }, t.AtEnd = new n.RawContextKey("atEndOfWord", !1), t = h([g(1, n.IContextKeyService)], t)
- }(i.Disposable);
- t.WordContextKey = o
- })),
- define(n[64], i([0, 1, 11, 18]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IAccessibilityService = n.createDecorator("accessibilityService"), t.CONTEXT_ACCESSIBILITY_MODE_ENABLED = new i.RawContextKey("accessibilityModeEnabled", !1)
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[65], i([0, 1, 55, 11, 18, 29, 4]), (function (e, t, n, i, o, s, l) {
- "use strict";
- function u(e) {
- return void 0 !== e.command
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.isIMenuItem = u, t.IMenuService = i.createDecorator("menuService"), t.MenuRegistry = new (function () {
- function e() {
- this._commands = new Map, this._menuItems = new Map, this._onDidChangeMenu = new l.Emitter, this.onDidChangeMenu = this._onDidChangeMenu.event
- }
- return e.prototype.addCommand = function (e) {
- var t = this;
- return this._commands.set(e.id, e), this._onDidChangeMenu.fire(0), {
- dispose: function () {
- t._commands.delete(e.id) && t._onDidChangeMenu.fire(0)
- }
- }
- }, e.prototype.getCommand = function (e) {
- return this._commands.get(e)
- }, e.prototype.getCommands = function () {
- var e = new Map;
- return this._commands.forEach((function (t, n) {
- return e.set(n, t)
- })), e
- }, e.prototype.appendMenuItem = function (e, t) {
- var n = this, i = this._menuItems.get(e);
- return i ? i.push(t) : (i = [t], this._menuItems.set(e, i)), this._onDidChangeMenu.fire(e), {
- dispose: function () {
- var o = i.indexOf(t);
- o >= 0 && (i.splice(o, 1), n._onDidChangeMenu.fire(e))
- }
- }
- }, e.prototype.getMenuItems = function (e) {
- var t = (this._menuItems.get(e) || []).slice(0);
- return 0 === e && this._appendImplicitItems(t), t
- }, e.prototype._appendImplicitItems = function (e) {
- for (var t = new Set, n = 0, i = e.filter((function (e) {
- return u(e)
- })); n < i.length; n++) {
- var o = i[n], r = o.command, s = o.alt;
- t.add(r.id), s && t.add(s.id)
- }
- this._commands.forEach((function (n, i) {
- t.has(i) || e.push({command: n})
- }))
- }, e
- }());
- var d = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, n) || this;
- return o._commandService = i, o
- }
- return r(t, e), t.prototype.run = function () {
- for (var e, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
- return (e = this._commandService).executeCommand.apply(e, a([this.id], t))
- }, t = h([g(2, s.ICommandService)], t)
- }(n.Action);
- t.ExecuteCommandAction = d;
- var c = function (e) {
- function t(t) {
- var n = this;
- return (n = "string" == typeof t.title ? e.call(this, "", t.title, "submenu") || this : e.call(this, "", t.title.value, "submenu") || this).item = t, n
- }
- return r(t, e), t
- }(n.Action);
- t.SubmenuItemAction = c;
- var p = function (e) {
- function t(n, i, o, r, s) {
- var a = this;
- return (a = "string" == typeof n.title ? e.call(this, n.id, n.title, s) || this : e.call(this, n.id, n.title.value, s) || this)._cssClass = void 0, a._enabled = !n.precondition || r.contextMatchesRules(n.precondition), a._checked = Boolean(n.toggled && r.contextMatchesRules(n.toggled)), a._options = o || {}, a.item = n, a.alt = i ? new t(i, void 0, a._options, r, s) : void 0, a
- }
- return r(t, e), t.prototype.dispose = function () {
- this.alt && this.alt.dispose(), e.prototype.dispose.call(this)
- }, t.prototype.run = function () {
- for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
- var i = []
- ;
- return this._options.arg && (i = a(i, [this._options.arg])), this._options.shouldForwardArgs && (i = a(i, t)), e.prototype.run.apply(this, i)
- }, t = h([g(3, o.IContextKeyService), g(4, s.ICommandService)], t)
- }(d);
- t.MenuItemAction = p
- })), define(n[499], i([0, 1, 4, 2, 65, 29, 18]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e) {
- this._commandService = e
- }
- return e.prototype.createMenu = function (e, t) {
- return new l(e, this._commandService, t)
- }, e = h([g(0, r.ICommandService)], e)
- }();
- t.MenuService = a;
- var l = function () {
- function e(e, t, r) {
- var s = this;
- this._id = e, this._commandService = t, this._contextKeyService = r, this._onDidChange = new n.Emitter, this._dispoables = new i.DisposableStore, this._menuGroups = [], this._contextKeys = new Set, this._build(), this._dispoables.add(n.Event.debounce(n.Event.filter(o.MenuRegistry.onDidChangeMenu, (function (e) {
- return e === s._id
- })), (function () {
- }), 50)(this._build, this)), this._dispoables.add(n.Event.debounce(this._contextKeyService.onDidChangeContext, (function (e, t) {
- return e || t.affectsSome(s._contextKeys)
- }), 50)((function (e) {
- return e && s._onDidChange.fire(void 0)
- }), this))
- }
- return e.prototype.dispose = function () {
- this._dispoables.dispose(), this._onDidChange.dispose()
- }, e.prototype._build = function () {
- this._menuGroups.length = 0, this._contextKeys.clear();
- var t, n = o.MenuRegistry.getMenuItems(this._id);
- n.sort(e._compareMenuItems);
- for (var i = 0, r = n; i < r.length; i++) {
- var s = r[i], a = s.group || "";
- t && t[0] === a || (t = [a, []], this._menuGroups.push(t)), t[1].push(s), e._fillInKbExprKeys(s.when, this._contextKeys), o.isIMenuItem(s) && s.command.precondition && e._fillInKbExprKeys(s.command.precondition, this._contextKeys), o.isIMenuItem(s) && s.command.toggled && e._fillInKbExprKeys(s.command.toggled, this._contextKeys)
- }
- this._onDidChange.fire(this)
- }, e.prototype.getActions = function (e) {
- for (var t = [], n = 0, i = this._menuGroups; n < i.length; n++) {
- for (var r = i[n], s = r[0], a = [], l = 0, u = r[1]; l < u.length; l++) {
- var d = u[l];
- if (this._contextKeyService.contextMatchesRules(d.when)) {
- var c = o.isIMenuItem(d) ? new o.MenuItemAction(d.command, d.alt, e, this._contextKeyService, this._commandService) : new o.SubmenuItemAction(d);
- a.push(c)
- }
- }
- a.length > 0 && t.push([s, a])
- }
- return t
- }, e._fillInKbExprKeys = function (e, t) {
- if (e) for (var n = 0, i = e.keys(); n < i.length; n++) {
- var o = i[n];
- t.add(o)
- }
- }, e._compareMenuItems = function (t, n) {
- var i = t.group, r = n.group;
- if (i !== r) {
- if (!i) return 1;
- if (!r) return -1;
- if ("navigation" === i) return -1;
- if ("navigation" === r) return 1;
- var s = i.localeCompare(r);
- if (0 !== s) return s
- }
- var a = t.order || 0, l = n.order || 0;
- return a < l ? -1 : a > l ? 1 : e._compareTitles(o.isIMenuItem(t) ? t.command.title : t.title, o.isIMenuItem(n) ? n.command.title : n.title)
- }, e._compareTitles = function (e, t) {
- var n = "string" == typeof e ? e : e.value, i = "string" == typeof t ? t : t.value;
- return n.localeCompare(i)
- }, e = h([g(1, r.ICommandService), g(2, s.IContextKeyService)], e)
- }()
- })), define(n[66], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IContextViewService = n.createDecorator("contextViewService"),
- t.IContextMenuService = n.createDecorator("contextMenuService")
- })), define(n[500], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IDialogService = n.createDecorator("dialogService")
- })), define(n[115], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function () {
- function e() {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- this._entries = new Map;
- for (var n = 0, i = e; n < i.length; n++) {
- var o = i[n], r = o[0], s = o[1];
- this.set(r, s)
- }
- }
- return e.prototype.set = function (e, t) {
- var n = this._entries.get(e);
- return this._entries.set(e, t), n
- }, e.prototype.has = function (e) {
- return this._entries.has(e)
- }, e.prototype.get = function (e) {
- return this._entries.get(e)
- }, e
- }();
- t.ServiceCollection = n
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- }
- ;define(n[501], i([0, 1, 10, 480, 209, 11, 115, 15]), (function (e, t, n, i, o, s, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = "function" == typeof Proxy, c = function (e) {
- function t(t) {
- var n = e.call(this, "cyclic dependency between services") || this;
- return n.message = t.toString(), n
- }
- return r(t, e), t
- }(Error), h = function () {
- function e(e, t, n) {
- void 0 === e && (e = new l.ServiceCollection), void 0 === t && (t = !1), this._services = e, this._strict = t, this._parent = n, this._services.set(s.IInstantiationService, this)
- }
- return e.prototype.createChild = function (t) {
- return new e(t, this._strict, this)
- }, e.prototype.invokeFunction = function (e) {
- for (var t = this, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];
- var r = p.traceInvocation(e), l = !1;
- try {
- var u = {
- get: function (e, i) {
- if (l) throw n.illegalState("service accessor is only valid during the invocation of its target method");
- var o = t._getOrCreateServiceInstance(e, r);
- if (!o && i !== s.optional) throw new Error("[invokeFunction] unknown service '" + e + "'");
- return o
- }
- };
- return e.apply(void 0, a([u], i))
- } finally {
- l = !0,
- r.stop()
- }
- }, e.prototype.createInstance = function (e) {
- for (var t, n, i = [], r = 1; r < arguments.length; r++) i[r - 1] = arguments[r];
- return e instanceof o.SyncDescriptor ? (t = p.traceCreation(e.ctor), n = this._createInstance(e.ctor, e.staticArguments.concat(i), t)) : (t = p.traceCreation(e), n = this._createInstance(e, i, t)), t.stop(), n
- }, e.prototype._createInstance = function (e, t, n) {
- void 0 === t && (t = []);
- for (var i = s._util.getServiceDependencies(e).sort((function (e, t) {
- return e.index - t.index
- })), o = [], r = 0, l = i; r < l.length; r++) {
- var u = l[r], d = this._getOrCreateServiceInstance(u.id, n);
- if (!d && this._strict && !u.optional) throw new Error("[createInstance] " + e.name + " depends on UNKNOWN service " + u.id + ".");
- o.push(d)
- }
- var c = i.length > 0 ? i[0].index : t.length;
- if (t.length !== c) {
- console.warn("[createInstance] First service dependency of " + e.name + " at position " + (c + 1) + " conflicts with " + t.length + " static arguments");
- var h = c - t.length;
- t = h > 0 ? t.concat(new Array(h)) : t.slice(0, c)
- }
- return new (e.bind.apply(e, a([void 0], a(t, o))))
- }, e.prototype._setServiceInstance = function (e, t) {
- if (this._services.get(e) instanceof o.SyncDescriptor) this._services.set(e, t); else {
- if (!this._parent) throw new Error("illegalState - setting UNKNOWN service instance");
- this._parent._setServiceInstance(e, t)
- }
- }, e.prototype._getServiceInstanceOrDescriptor = function (e) {
- var t = this._services.get(e);
- return !t && this._parent ? this._parent._getServiceInstanceOrDescriptor(e) : t
- }, e.prototype._getOrCreateServiceInstance = function (e, t) {
- var n = this._getServiceInstanceOrDescriptor(e);
- return n instanceof o.SyncDescriptor ? this._createAndCacheServiceInstance(e, n, t.branch(e, !0)) : (t.branch(e, !1), n)
- }, e.prototype._createAndCacheServiceInstance = function (e, t, n) {
- for (var r = new i.Graph((function (e) {
- return e.id.toString()
- })), a = 0, l = [{id: e, desc: t, _trace: n}]; l.length;) {
- var u = l.pop();
- if (r.lookupOrInsertNode(u), a++ > 150) throw new c(r);
- for (var d = 0, h = s._util.getServiceDependencies(u.desc.ctor); d < h.length; d++) {
- var p = h[d], g = this._getServiceInstanceOrDescriptor(p.id)
- ;
- if (g || p.optional || console.warn("[createInstance] " + e + " depends on " + p.id + " which is NOT registered."), g instanceof o.SyncDescriptor) {
- var f = {id: p.id, desc: g, _trace: u._trace.branch(p.id, !0)};
- r.insertEdge(u, f), l.push(f)
- }
- }
- }
- for (; ;) {
- var m = r.roots();
- if (0 === m.length) {
- if (!r.isEmpty()) throw new c(r);
- break
- }
- for (var v = 0, _ = m; v < _.length; v++) {
- var y = _[v].data,
- C = this._createServiceInstanceWithOwner(y.id, y.desc.ctor, y.desc.staticArguments, y.desc.supportsDelayedInstantiation, y._trace);
- this._setServiceInstance(y.id, C), r.removeNode(y)
- }
- }
- return this._getServiceInstanceOrDescriptor(e)
- }, e.prototype._createServiceInstanceWithOwner = function (e, t, n, i, r) {
- if (void 0 === n && (n = []), this._services.get(e) instanceof o.SyncDescriptor) return this._createServiceInstance(t, n, i, r);
- if (this._parent) return this._parent._createServiceInstanceWithOwner(e, t, n, i, r);
- throw new Error("illegalState - creating UNKNOWN service instance " + t.name)
- }, e.prototype._createServiceInstance = function (e, t, n, i) {
- var o = this;
- if (void 0 === t && (t = []), n && d) {
- var r = new u.IdleValue((function () {
- return o._createInstance(e, t, i)
- }));
- return new Proxy(Object.create(null), {
- get: function (e, t) {
- if (t in e) return e[t];
- var n = r.getValue(), i = n[t];
- return "function" != typeof i ? i : (i = i.bind(n), e[t] = i, i)
- }, set: function (e, t, n) {
- return r.getValue()[t] = n, !0
- }
- })
- }
- return this._createInstance(e, t, i)
- }, e
- }();
- t.InstantiationService = h;
- var p = function () {
- function e(e, t) {
- this.type = e, this.name = t, this._start = Date.now(), this._dep = []
- }
- return e.traceInvocation = function (t) {
- return e._None
- }, e.traceCreation = function (t) {
- return e._None
- }, e.prototype.branch = function (t, n) {
- var i = new e(2, t.toString());
- return this._dep.push([t, n, i]), i
- }, e.prototype.stop = function () {
- var t = Date.now() - this._start;
- e._totals += t;
- var n = !1;
- var i = [(0 === this.type ? "CREATE" : "CALL") + " " + this.name, "" + function e(t, i) {
- for (var o = [], r = new Array(t + 1).join("\t"), s = 0, a = i._dep; s < a.length; s++) {
- var l = a[s], u = l[0], d = l[1], c = l[2];
- if (d && c) {
- n = !0, o.push(r + "CREATES -> " + u);
- var h = e(t + 1, c);
- h && o.push(h)
- } else o.push(r + "uses -> " + u)
- }
- return o.join("\n")
- }(1, this), "DONE, took " + t.toFixed(2) + "ms (grand total " + e._totals.toFixed(2) + "ms)"];
- (t > 2 || n) && console.log(i.join("\n"))
- }, e._None = new (function (e) {
- function t() {
- return e.call(this, -1, null) || this
- }
- return r(t, e), t.prototype.stop = function () {
- }, t.prototype.branch = function () {
- return this
- }, t
- }(e)), e._totals = 0, e
- }()
- })), define(n[502], i([0, 1, 473, 15, 4, 2]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t, n, r, s) {
- var a = e.call(this) || this;
- return a._contextKeyService = t, a._commandService = n, a._telemetryService = r, a._notificationService = s, a._onDidUpdateKeybindings = a._register(new o.Emitter), a._currentChord = null, a._currentChordChecker = new i.IntervalTimer, a._currentChordStatusMessage = null, a
- }
- return r(t, e), Object.defineProperty(t.prototype, "onDidUpdateKeybindings", {
- get: function () {
- return this._onDidUpdateKeybindings ? this._onDidUpdateKeybindings.event : o.Event.None
- }, enumerable: !0, configurable: !0
- }), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- },
- t.prototype.getKeybindings = function () {
- return this._getResolver().getKeybindings()
- }, t.prototype.lookupKeybinding = function (e) {
- var t = this._getResolver().lookupPrimaryKeybinding(e);
- if (t) return t.resolvedKeybinding
- }, t.prototype.softDispatch = function (e, t) {
- var n = this.resolveKeyboardEvent(e);
- if (n.isChord()) return console.warn("Unexpected keyboard event mapped to a chord"), null;
- var i = n.getDispatchParts()[0];
- if (null === i) return null;
- var o = this._contextKeyService.getContext(t),
- r = this._currentChord ? this._currentChord.keypress : null;
- return this._getResolver().resolve(o, r, i)
- }, t.prototype._enterChordMode = function (e, t) {
- var i = this;
- this._currentChord = {
- keypress: e,
- label: t
- }, this._currentChordStatusMessage = this._notificationService.status(n.localize(0, null, t));
- var o = Date.now();
- this._currentChordChecker.cancelAndSet((function () {
- i._documentHasFocus() ? Date.now() - o > 5e3 && i._leaveChordMode() : i._leaveChordMode()
- }), 500)
- }, t.prototype._leaveChordMode = function () {
- this._currentChordStatusMessage && (this._currentChordStatusMessage.dispose(),
- this._currentChordStatusMessage = null), this._currentChordChecker.cancel(), this._currentChord = null
- }, t.prototype._dispatch = function (e, t) {
- return this._doDispatch(this.resolveKeyboardEvent(e), t)
- }, t.prototype._doDispatch = function (e, t) {
- var i = this, o = !1;
- if (e.isChord()) return console.warn("Unexpected keyboard event mapped to a chord"), !1;
- var r = e.getDispatchParts()[0];
- if (null === r) return o;
- var s = this._contextKeyService.getContext(t),
- a = this._currentChord ? this._currentChord.keypress : null, l = e.getLabel(),
- u = this._getResolver().resolve(s, a, r);
- return u && u.enterChord ? (o = !0, this._enterChordMode(r, l), o) : (this._currentChord && (u && u.commandId || (this._notificationService.status(n.localize(1, null, this._currentChord.label, l), {hideAfter: 1e4}), o = !0)), this._leaveChordMode(), u && u.commandId && (u.bubble || (o = !0), void 0 === u.commandArgs ? this._commandService.executeCommand(u.commandId).then(void 0, (function (e) {
- return i._notificationService.warn(e)
- })) : this._commandService.executeCommand(u.commandId, u.commandArgs).then(void 0, (function (e) {
- return i._notificationService.warn(e)
- })), this._telemetryService.publicLog2("workbenchActionExecuted", {
- id: u.commandId,
- from: "keybinding"
- })), o)
- }, t.prototype.mightProducePrintableCharacter = function (e) {
- return !e.ctrlKey && !e.metaKey && (e.keyCode >= 31 && e.keyCode <= 56 || e.keyCode >= 21 && e.keyCode <= 30)
- }, t
- }(s.Disposable);
- t.AbstractKeybindingService = a
- })), define(n[503], i([0, 1, 10, 207, 36]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t(t, i) {
- var o = e.call(this) || this;
- if (0 === i.length) throw n.illegalArgument("parts");
- return o._os = t, o._parts = i, o
- }
- return r(t, e), t.prototype.getLabel = function () {
- var e = this;
- return i.UILabelProvider.toLabel(this._os, this._parts, (function (t) {
- return e._getLabel(t)
- }))
- }, t.prototype.getAriaLabel = function () {
- var e = this;
- return i.AriaLabelProvider.toLabel(this._os, this._parts, (function (t) {
- return e._getAriaLabel(t)
- }))
- }, t.prototype.isChord = function () {
- return this._parts.length > 1
- }, t.prototype.getParts = function () {
- var e = this
- ;
- return this._parts.map((function (t) {
- return e._getPart(t)
- }))
- }, t.prototype._getPart = function (e) {
- return new o.ResolvedKeybindingPart(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, this._getLabel(e), this._getAriaLabel(e))
- }, t.prototype.getDispatchParts = function () {
- var e = this;
- return this._parts.map((function (t) {
- return e._getDispatchPart(t)
- }))
- }, t
- }(o.ResolvedKeybinding);
- t.BaseResolvedKeybinding = s
- })), define(n[34], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IKeybindingService = n.createDecorator("keybindingService")
- })), define(n[217], i([0, 1, 18]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var i = function () {
- function e(t, n) {
- this._defaultKeybindings = t, this._defaultBoundCommands = new Map;
- for (var i = 0, o = t.length; i < o; i++) {
- var r = t[i].command;
- r && this._defaultBoundCommands.set(r, !0)
- }
- this._map = new Map, this._lookupMap = new Map, this._keybindings = e.combine(t, n);
- for (i = 0, o = this._keybindings.length; i < o; i++) {
- var s = this._keybindings[i]
- ;0 !== s.keypressParts.length && this._addKeyPress(s.keypressParts[0], s)
- }
- }
- return e._isTargetedForRemoval = function (e, t, n, i, o) {
- if (e.command !== i) return !1;
- if (t && e.keypressParts[0] !== t) return !1;
- if (n && e.keypressParts[1] !== n) return !1;
- if (o) {
- if (!e.when) return !1;
- if (!o.equals(e.when)) return !1
- }
- return !0
- }, e.combine = function (e, t) {
- e = e.slice(0);
- for (var n = [], i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- if (r.command && 0 !== r.command.length && "-" === r.command.charAt(0)) for (var s = r.command.substr(1), a = r.keypressParts[0], l = r.keypressParts[1], u = r.when, d = e.length - 1; d >= 0; d--) this._isTargetedForRemoval(e[d], a, l, s, u) && e.splice(d, 1); else n.push(r)
- }
- return e.concat(n)
- }, e.prototype._addKeyPress = function (t, n) {
- var i = this._map.get(t);
- if (void 0 === i) return this._map.set(t, [n]), void this._addToLookupMap(n);
- for (var o = i.length - 1; o >= 0; o--) {
- var r = i[o];
- if (r.command !== n.command) {
- var s = r.keypressParts.length > 1, a = n.keypressParts.length > 1;
- s && a && r.keypressParts[1] !== n.keypressParts[1] || e.whenIsEntirelyIncluded(r.when, n.when) && this._removeFromLookupMap(r)
- }
- }
- i.push(n),
- this._addToLookupMap(n)
- }, e.prototype._addToLookupMap = function (e) {
- if (e.command) {
- var t = this._lookupMap.get(e.command);
- void 0 === t ? (t = [e], this._lookupMap.set(e.command, t)) : t.push(e)
- }
- }, e.prototype._removeFromLookupMap = function (e) {
- if (e.command) {
- var t = this._lookupMap.get(e.command);
- if (void 0 !== t) for (var n = 0, i = t.length; n < i; n++) if (t[n] === e) return void t.splice(n, 1)
- }
- }, e.whenIsEntirelyIncluded = function (e, t) {
- return !t || !!e && this._implies(e, t)
- }, e._implies = function (e, t) {
- for (var i = function (e) {
- return e instanceof n.ContextKeyOrExpr ? e.expr : [e]
- }, o = i(e.negate()).concat(i(t)), r = 0; r < o.length; r++) for (var s = o[r].negate(), a = r + 1; a < o.length; a++) {
- var l = o[a];
- if (s.equals(l)) return !0
- }
- return !1
- }, e.prototype.getKeybindings = function () {
- return this._keybindings
- }, e.prototype.lookupPrimaryKeybinding = function (e) {
- var t = this._lookupMap.get(e);
- return void 0 === t || 0 === t.length ? null : t[t.length - 1]
- }, e.prototype.resolve = function (e, t, n) {
- var i = null;
- if (null !== t) {
- if (void 0 === (a = this._map.get(t))) return null;
- i = [];
- for (var o = 0, r = a.length; o < r; o++) {
- var s = a[o]
- ;s.keypressParts[1] === n && i.push(s)
- }
- } else {
- var a;
- if (void 0 === (a = this._map.get(n))) return null;
- i = a
- }
- var l = this._findCommand(e, i);
- return l ? null === t && l.keypressParts.length > 1 && null !== l.keypressParts[1] ? {
- enterChord: !0,
- commandId: null,
- commandArgs: null,
- bubble: !1
- } : {enterChord: !1, commandId: l.command, commandArgs: l.commandArgs, bubble: l.bubble} : null
- }, e.prototype._findCommand = function (t, n) {
- for (var i = n.length - 1; i >= 0; i--) {
- var o = n[i];
- if (e.contextMatchesRules(t, o.when)) return o
- }
- return null
- }, e.contextMatchesRules = function (e, t) {
- return !t || t.evaluate(e)
- }, e
- }();
- t.KeybindingResolver = i
- })), define(n[504], i([0, 1]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var n = function (e, t, n, o, r) {
- this.resolvedKeybinding = e, this.keypressParts = e ? i(e.getDispatchParts()) : [], this.bubble = !!t && 94 === t.charCodeAt(0), this.command = this.bubble ? t.substr(1) : t, this.commandArgs = n, this.when = o, this.isDefault = r
- };
- function i(e) {
- for (var t = [], n = 0, i = e.length; n < i; n++) {
- var o = e[n];
- if (!o) return t;
- t.push(o)
- }
- return t
- }
- t.ResolvedKeybindingItem = n,
- t.removeElementsAfterNulls = i
- })), define(n[505], i([0, 1, 36, 503]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t, n) {
- return e.call(this, n, t.parts) || this
- }
- return r(t, e), t.prototype._keyCodeToUILabel = function (e) {
- if (2 === this._os) switch (e) {
- case 15:
- return "←";
- case 16:
- return "↑";
- case 17:
- return "→";
- case 18:
- return "↓"
- }
- return n.KeyCodeUtils.toString(e)
- }, t.prototype._getLabel = function (e) {
- return e.isDuplicateModifierCase() ? "" : this._keyCodeToUILabel(e.keyCode)
- }, t.prototype._getAriaLabel = function (e) {
- return e.isDuplicateModifierCase() ? "" : n.KeyCodeUtils.toString(e.keyCode)
- }, t.prototype._getDispatchPart = function (e) {
- return t.getDispatchStr(e)
- }, t.getDispatchStr = function (e) {
- if (e.isModifierKey()) return null;
- var t = "";
- return e.ctrlKey && (t += "ctrl+"), e.shiftKey && (t += "shift+"), e.altKey && (t += "alt+"), e.metaKey && (t += "meta+"), t += n.KeyCodeUtils.toString(e.keyCode)
- }, t
- }(i.BaseResolvedKeybinding);
- t.USLayoutResolvedKeybinding = o
- })), define(n[116], i([0, 1, 11]), (function (e, t, n) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- t.ILabelService = n.createDecorator("label")
- })), define(n[218], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ILayoutService = n.createDecorator("layoutService")
- })), define(n[506], i([0, 1, 265, 2, 218]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t(t) {
- var i = e.call(this) || this;
- return i.layoutService = t, i.contextView = i._register(new n.ContextView(t.container)), i.layout(), i._register(t.onLayout((function () {
- return i.layout()
- }))), i
- }
- return r(t, e), t.prototype.setContainer = function (e) {
- this.contextView.setContainer(e)
- }, t.prototype.showContextView = function (e) {
- this.contextView.show(e)
- }, t.prototype.layout = function () {
- this.contextView.layout()
- }, t.prototype.hideContextView = function (e) {
- this.contextView.hide(e)
- }, t = h([g(0, o.ILayoutService)], t)
- }(i.Disposable);
- t.ContextViewService = s
- })), define(n[95], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- var i
- ;Object.defineProperty(t, "__esModule", {value: !0}), t.ILogService = n.createDecorator("logService"), function (e) {
- e[e.Trace = 0] = "Trace", e[e.Debug = 1] = "Debug", e[e.Info = 2] = "Info", e[e.Warning = 3] = "Warning", e[e.Error = 4] = "Error", e[e.Critical = 5] = "Critical", e[e.Off = 6] = "Off"
- }(i = t.LogLevel || (t.LogLevel = {}));
- var o = function () {
- function e() {
- }
- return e.prototype.getLevel = function () {
- return i.Info
- }, e.prototype.trace = function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]
- }, e.prototype.error = function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]
- }, e.prototype.dispose = function () {
- }, e
- }();
- t.NullLogService = o
- })), define(n[219], i([0, 1, 15, 2, 182, 258, 3, 17, 41, 365, 49, 114, 5, 19, 95, 132]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = 6e4, S = 3e5;
- function w(e, t) {
- var n = e.getModel(t);
- return !!n && !n.isTooLargeForSyncing()
- }
- var E = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o._modelService = t, o._workerManager = o._register(new D(o._modelService)),
- o._logService = i, o._register(l.LinkProviderRegistry.register("*", {
- provideLinks: function (e, t) {
- return w(o._modelService, e.uri) ? o._workerManager.withWorker().then((function (t) {
- return t.computeLinks(e.uri)
- })).then((function (e) {
- return e && {links: e}
- })) : Promise.resolve({links: []})
- }
- })), o._register(l.CompletionProviderRegistry.register("*", new L(o._workerManager, n, o._modelService))), o
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.canComputeDiff = function (e, t) {
- return w(this._modelService, e) && w(this._modelService, t)
- }, t.prototype.computeDiff = function (e, t, n, i) {
- return this._workerManager.withWorker().then((function (o) {
- return o.computeDiff(e, t, n, i)
- }))
- }, t.prototype.computeMoreMinimalEdits = function (e, t) {
- var n = this;
- if (_.isNonEmptyArray(t)) {
- if (!w(this._modelService, e)) return Promise.resolve(t);
- var i = C.StopWatch.create(!0), o = this._workerManager.withWorker().then((function (n) {
- return n.computeMoreMinimalEdits(e, t)
- }));
- return o.finally((function () {
- return n._logService.trace("FORMAT#computeMoreMinimalEdits", e.toString(!0), i.elapsed())
- })), o
- }
- return Promise.resolve(void 0)
- }, t.prototype.canNavigateValueSet = function (e) {
- return w(this._modelService, e)
- }, t.prototype.navigateValueSet = function (e, t, n) {
- return this._workerManager.withWorker().then((function (i) {
- return i.navigateValueSet(e, t, n)
- }))
- }, t.prototype.canComputeWordRanges = function (e) {
- return w(this._modelService, e)
- }, t.prototype.computeWordRanges = function (e, t) {
- return this._workerManager.withWorker().then((function (n) {
- return n.computeWordRanges(e, t)
- }))
- }, t = h([g(0, f.IModelService), g(1, m.ITextResourceConfigurationService), g(2, y.ILogService)], t)
- }(i.Disposable);
- t.EditorWorkerServiceImpl = E;
- var L = function () {
- function e(e, t, n) {
- this._debugDisplayName = "wordbasedCompletions", this._workerManager = e, this._configurationService = t, this._modelService = n
- }
- return e.prototype.provideCompletionItems = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i, o, r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- return this._configurationService.getValue(e.uri, t, "editor").wordBasedSuggestions && w(this._modelService, e.uri) ? (n = e.getWordAtPosition(t), i = n ? new a.Range(t.lineNumber, n.startColumn, t.lineNumber, n.endColumn) : a.Range.fromPositions(t), o = i.setEndPosition(t.lineNumber, t.column), [4, this._workerManager.withWorker()]) : [2, void 0];
- case 1:
- return [4, s.sent().textualSuggest(e.uri, t)];
- case 2:
- return (r = s.sent()) ? [2, {
- suggestions: r.map((function (e) {
- return {kind: 18, label: e, insertText: e, range: {insert: o, replace: i}}
- }))
- }] : [2, void 0]
- }
- }))
- }))
- }, e
- }(), D = function (e) {
- function t(t) {
- var i = e.call(this) || this;
- return i._modelService = t, i._editorWorkerClient = null, i._lastWorkerUsedTime = (new Date).getTime(), i._register(new n.IntervalTimer).cancelAndSet((function () {
- return i._checkStopIdleWorker()
- }), Math.round(S / 2)), i._register(i._modelService.onModelRemoved((function (e) {
- return i._checkStopEmptyWorker()
- }))), i
- }
- return r(t, e), t.prototype.dispose = function () {
- this._editorWorkerClient && (this._editorWorkerClient.dispose(), this._editorWorkerClient = null),
- e.prototype.dispose.call(this)
- }, t.prototype._checkStopEmptyWorker = function () {
- this._editorWorkerClient && (0 === this._modelService.getModels().length && (this._editorWorkerClient.dispose(), this._editorWorkerClient = null))
- }, t.prototype._checkStopIdleWorker = function () {
- this._editorWorkerClient && ((new Date).getTime() - this._lastWorkerUsedTime > S && (this._editorWorkerClient.dispose(), this._editorWorkerClient = null))
- }, t.prototype.withWorker = function () {
- return this._lastWorkerUsedTime = (new Date).getTime(), this._editorWorkerClient || (this._editorWorkerClient = new M(this._modelService, !1, "editorWorkerService")), Promise.resolve(this._editorWorkerClient)
- }, t
- }(i.Disposable), N = function (e) {
- function t(t, i, o) {
- var r = e.call(this) || this;
- if (r._syncedModels = Object.create(null), r._syncedModelsLastUsedTime = Object.create(null), r._proxy = t, r._modelService = i, !o) {
- var s = new n.IntervalTimer;
- s.cancelAndSet((function () {
- return r._checkStopModelSync()
- }), Math.round(b / 2)), r._register(s)
- }
- return r
- }
- return r(t, e), t.prototype.dispose = function () {
- for (var t in this._syncedModels) i.dispose(this._syncedModels[t]);
- this._syncedModels = Object.create(null), this._syncedModelsLastUsedTime = Object.create(null), e.prototype.dispose.call(this)
- }, t.prototype.ensureSyncedResources = function (e) {
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t], o = i.toString();
- this._syncedModels[o] || this._beginModelSync(i), this._syncedModels[o] && (this._syncedModelsLastUsedTime[o] = (new Date).getTime())
- }
- }, t.prototype._checkStopModelSync = function () {
- var e = (new Date).getTime(), t = [];
- for (var n in this._syncedModelsLastUsedTime) {
- e - this._syncedModelsLastUsedTime[n] > b && t.push(n)
- }
- for (var i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- this._stopModelSync(r)
- }
- }, t.prototype._beginModelSync = function (e) {
- var t = this, n = this._modelService.getModel(e);
- if (n && !n.isTooLargeForSyncing()) {
- var o = e.toString();
- this._proxy.acceptNewModel({
- url: n.uri.toString(),
- lines: n.getLinesContent(),
- EOL: n.getEOL(),
- versionId: n.getVersionId()
- });
- var r = new i.DisposableStore;
- r.add(n.onDidChangeContent((function (e) {
- t._proxy.acceptModelChanged(o.toString(), e)
- }))), r.add(n.onWillDispose((function () {
- t._stopModelSync(o)
- }))), r.add(i.toDisposable((function () {
- t._proxy.acceptRemovedModel(o)
- }))), this._syncedModels[o] = r
- }
- }, t.prototype._stopModelSync = function (e) {
- var t = this._syncedModels[e];
- delete this._syncedModels[e], delete this._syncedModelsLastUsedTime[e], i.dispose(t)
- }, t
- }(i.Disposable), x = function () {
- function e(e) {
- this._instance = e, this._proxyObj = Promise.resolve(this._instance)
- }
- return e.prototype.dispose = function () {
- this._instance.dispose()
- }, e.prototype.getProxyObject = function () {
- return this._proxyObj
- }, e
- }(), I = function () {
- function e(e) {
- this._workerClient = e
- }
- return e.prototype.fhr = function (e, t) {
- return this._workerClient.fhr(e, t)
- }, e
- }();
- t.EditorWorkerHost = I;
- var M = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o._modelService = t, o._keepIdleModels = n, o._workerFactory = new s.DefaultWorkerFactory(i), o._worker = null, o._modelManager = null, o
- }
- return r(t, e), t.prototype.fhr = function (e, t) {
- throw new Error("Not implemented!")
- }, t.prototype._getOrCreateWorker = function () {
- if (!this._worker) try {
- this._worker = this._register(new o.SimpleWorkerClient(this._workerFactory, "vs/editor/common/services/editorSimpleWorker", new I(this)))
- } catch (e) {
- o.logOnceWebWorkerWarning(e), this._worker = new x(new p.EditorSimpleWorker(new I(this), null))
- }
- return this._worker
- }, t.prototype._getProxy = function () {
- var e = this;
- return this._getOrCreateWorker().getProxyObject().then(void 0, (function (t) {
- return o.logOnceWebWorkerWarning(t), e._worker = new x(new p.EditorSimpleWorker(new I(e), null)), e._getOrCreateWorker().getProxyObject()
- }))
- }, t.prototype._getOrCreateModelManager = function (e) {
- return this._modelManager || (this._modelManager = this._register(new N(e, this._modelService, this._keepIdleModels))), this._modelManager
- }, t.prototype._withSyncedResources = function (e) {
- var t = this;
- return this._getProxy().then((function (n) {
- return t._getOrCreateModelManager(n).ensureSyncedResources(e), n
- }))
- }, t.prototype.computeDiff = function (e, t, n, i) {
- return this._withSyncedResources([e, t]).then((function (o) {
- return o.computeDiff(e.toString(), t.toString(), n, i)
- }))
- }, t.prototype.computeMoreMinimalEdits = function (e, t) {
- return this._withSyncedResources([e]).then((function (n) {
- return n.computeMoreMinimalEdits(e.toString(), t)
- }))
- }, t.prototype.computeLinks = function (e) {
- return this._withSyncedResources([e]).then((function (t) {
- return t.computeLinks(e.toString())
- }))
- }, t.prototype.textualSuggest = function (e, t) {
- var n = this;
- return this._withSyncedResources([e]).then((function (i) {
- var o = n._modelService.getModel(e);
- if (!o) return null;
- var r = u.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),
- s = r.source, a = v.regExpFlags(r);
- return i.textualSuggest(e.toString(), t, s, a)
- }))
- }, t.prototype.computeWordRanges = function (e, t) {
- var n = this;
- return this._withSyncedResources([e]).then((function (i) {
- var o = n._modelService.getModel(e);
- if (!o) return Promise.resolve(null);
- var r = u.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),
- s = r.source, a = v.regExpFlags(r);
- return i.computeWordRanges(e.toString(), t, s, a)
- }))
- },
- t.prototype.navigateValueSet = function (e, t, n) {
- var i = this;
- return this._withSyncedResources([e]).then((function (o) {
- var r = i._modelService.getModel(e);
- if (!r) return null;
- var s = u.LanguageConfigurationRegistry.getWordDefinition(r.getLanguageIdentifier().id),
- a = s.source, l = v.regExpFlags(s);
- return o.navigateValueSet(e.toString(), t, n, a, l)
- }))
- }, t
- }(i.Disposable);
- t.EditorWorkerClient = M
- })), define(n[507], i([0, 1, 219, 21]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.createWebWorker = function (e, t) {
- return new o(e, t)
- };
- var o = function (e) {
- function t(t, n) {
- var i = e.call(this, t, n.keepIdleModels || !1, n.label) || this;
- return i._foreignModuleId = n.moduleId, i._foreignModuleCreateData = n.createData || null, i._foreignModuleHost = n.host || null, i._foreignProxy = null, i
- }
- return r(t, e), t.prototype.fhr = function (e, t) {
- if (!this._foreignModuleHost || "function" != typeof this._foreignModuleHost[e]) return Promise.reject(new Error("Missing method " + e + " or missing main thread foreign host."));
- try {
- return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost, t))
- } catch (e) {
- return Promise.reject(e)
- }
- }, t.prototype._getForeignProxy = function () {
- var e = this;
- return this._foreignProxy || (this._foreignProxy = this._getProxy().then((function (t) {
- var n = e._foreignModuleHost ? i.getAllMethodNames(e._foreignModuleHost) : [];
- return t.loadForeignModule(e._foreignModuleId, e._foreignModuleCreateData, n).then((function (n) {
- e._foreignModuleCreateData = null;
- for (var i = function (e, n) {
- return t.fmr(e, n)
- }, o = function (e, t) {
- return function () {
- var n = Array.prototype.slice.call(arguments, 0);
- return t(e, n)
- }
- }, r = {}, s = 0, a = n; s < a.length; s++) {
- var l = a[s];
- r[l] = o(l, i)
- }
- return r
- }))
- }))), this._foreignProxy
- }, t.prototype.getProxy = function () {
- return this._getForeignProxy()
- }, t.prototype.withSyncedResources = function (e) {
- var t = this;
- return this._withSyncedResources(e).then((function (e) {
- return t.getProxy()
- }))
- }, t
- }(n.EditorWorkerClient)
- })), define(n[72], i([0, 1, 11, 475, 112]), (function (e, t, n, i, o) {
- "use strict";
- var r;
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), function (e) {
- e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error"
- }(r = t.MarkerSeverity || (t.MarkerSeverity = {})), function (e) {
- e.compare = function (e, t) {
- return t - e
- };
- var t = Object.create(null);
- t[e.Error] = i.localize(0, null), t[e.Warning] = i.localize(1, null), t[e.Info] = i.localize(2, null), e.toString = function (e) {
- return t[e] || ""
- }, e.fromSeverity = function (t) {
- switch (t) {
- case o.default.Error:
- return e.Error;
- case o.default.Warning:
- return e.Warning;
- case o.default.Info:
- return e.Info;
- case o.default.Ignore:
- return e.Hint
- }
- }, e.toSeverity = function (t) {
- switch (t) {
- case e.Error:
- return o.default.Error;
- case e.Warning:
- return o.default.Warning;
- case e.Info:
- return o.default.Info;
- case e.Hint:
- return o.default.Ignore
- }
- }
- }(r = t.MarkerSeverity || (t.MarkerSeverity = {})), function (e) {
- var t = "";
- function n(e, n) {
- var i = [t];
- return e.source ? i.push(e.source.replace("¦", "¦")) : i.push(t), e.code ? "string" == typeof e.code ? i.push(e.code.replace("¦", "¦")) : i.push(e.code.value.replace("¦", "¦")) : i.push(t),
- void 0 !== e.severity && null !== e.severity ? i.push(r.toString(e.severity)) : i.push(t), e.message && n ? i.push(e.message.replace("¦", "¦")) : i.push(t), void 0 !== e.startLineNumber && null !== e.startLineNumber ? i.push(e.startLineNumber.toString()) : i.push(t), void 0 !== e.startColumn && null !== e.startColumn ? i.push(e.startColumn.toString()) : i.push(t), void 0 !== e.endLineNumber && null !== e.endLineNumber ? i.push(e.endLineNumber.toString()) : i.push(t), void 0 !== e.endColumn && null !== e.endColumn ? i.push(e.endColumn.toString()) : i.push(t), i.push(t), i.join("¦")
- }
- e.makeKey = function (e) {
- return n(e, !0)
- }, e.makeKeyOptionalMessage = n
- }(t.IMarkerData || (t.IMarkerData = {})), t.IMarkerService = n.createDecorator("markerService")
- })), define(n[508], i([0, 1, 19, 46, 21, 4, 72]), (function (e, t, n, i, o, r, s) {
- "use strict";
- var a;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.get = function (e, t, n) {
- if (e[t]) return e[t][n]
- }, e.set = function (e, t, n, i) {
- e[t] || (e[t] = Object.create(null)), e[t][n] = i
- }, e.remove = function (e, t, n) {
- return !(!e[t] || !e[t][n]) && (delete e[t][n],
- o.isEmptyObject(e[t]) && delete e[t], !0)
- }
- }(a || (a = {}));
- var l = function () {
- function e(e) {
- this.errors = 0, this.infos = 0, this.warnings = 0, this.unknowns = 0, this._data = Object.create(null), this._service = e, this._subscription = e.onMarkerChanged(this._update, this)
- }
- return e.prototype.dispose = function () {
- this._subscription.dispose(), this._data = void 0
- }, e.prototype._update = function (e) {
- if (this._data) for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t], o = i.toString(), r = this._data[o];
- r && this._substract(r);
- var s = this._resourceStats(i);
- this._add(s), this._data[o] = s
- }
- }, e.prototype._resourceStats = function (e) {
- var t = {errors: 0, warnings: 0, infos: 0, unknowns: 0};
- if (e.scheme === i.Schemas.inMemory || e.scheme === i.Schemas.walkThrough || e.scheme === i.Schemas.walkThroughSnippet) return t;
- for (var n = 0, o = this._service.read({resource: e}); n < o.length; n++) {
- var r = o[n].severity;
- r === s.MarkerSeverity.Error ? t.errors += 1 : r === s.MarkerSeverity.Warning ? t.warnings += 1 : r === s.MarkerSeverity.Info ? t.infos += 1 : t.unknowns += 1
- }
- return t
- }, e.prototype._substract = function (e) {
- this.errors -= e.errors,
- this.warnings -= e.warnings, this.infos -= e.infos, this.unknowns -= e.unknowns
- }, e.prototype._add = function (e) {
- this.errors += e.errors, this.warnings += e.warnings, this.infos += e.infos, this.unknowns += e.unknowns
- }, e
- }(), u = function () {
- function e() {
- this._onMarkerChanged = new r.Emitter, this._onMarkerChangedEvent = r.Event.debounce(this._onMarkerChanged.event, e._debouncer, 0), this._byResource = Object.create(null), this._byOwner = Object.create(null), this._stats = new l(this)
- }
- return e.prototype.dispose = function () {
- this._stats.dispose()
- }, Object.defineProperty(e.prototype, "onMarkerChanged", {
- get: function () {
- return this._onMarkerChangedEvent
- }, enumerable: !0, configurable: !0
- }), e.prototype.remove = function (e, t) {
- for (var n = 0, i = t || []; n < i.length; n++) {
- var o = i[n];
- this.changeOne(e, o, [])
- }
- }, e.prototype.changeOne = function (t, i, o) {
- if (n.isFalsyOrEmpty(o)) {
- var r = a.remove(this._byResource, i.toString(), t), s = a.remove(this._byOwner, t, i.toString());
- if (r !== s) throw new Error("invalid marker service state");
- r && s && this._onMarkerChanged.fire([i])
- } else {
- for (var l = [], u = 0, d = o; u < d.length; u++) {
- var c = d[u], h = e._toMarker(t, i, c);
- h && l.push(h)
- }
- a.set(this._byResource, i.toString(), t, l), a.set(this._byOwner, t, i.toString(), l), this._onMarkerChanged.fire([i])
- }
- }, e._toMarker = function (e, t, n) {
- var i = n.code, o = n.severity, r = n.message, s = n.source, a = n.startLineNumber, l = n.startColumn,
- u = n.endLineNumber, d = n.endColumn, c = n.relatedInformation, h = n.tags;
- if (r) return {
- resource: t,
- owner: e,
- code: i,
- severity: o,
- message: r,
- source: s,
- startLineNumber: a = a > 0 ? a : 1,
- startColumn: l = l > 0 ? l : 1,
- endLineNumber: u = u >= a ? u : a,
- endColumn: d = d > 0 ? d : l,
- relatedInformation: c,
- tags: h
- }
- }, e.prototype.read = function (t) {
- void 0 === t && (t = Object.create(null));
- var n = t.owner, i = t.resource, o = t.severities, r = t.take;
- if ((!r || r < 0) && (r = -1), n && i) {
- if (C = a.get(this._byResource, i.toString(), n)) {
- for (var s = [], l = 0, u = C; l < u.length; l++) {
- var d = u[l];
- if (e._accept(d, o)) {
- var c = s.push(d);
- if (r > 0 && c === r) break
- }
- }
- return s
- }
- return []
- }
- if (n || i) {
- var h = n ? this._byOwner[n] : i ? this._byResource[i.toString()] : void 0;
- if (!h) return [];
- s = [];
- for (var p in h) for (var g = 0, f = h[p]; g < f.length; g++) {
- C = f[g]
- ;
- if (e._accept(C, o)) {
- c = s.push(C);
- if (r > 0 && c === r) return s
- }
- }
- return s
- }
- var s = [];
- for (var m in this._byResource) for (var v in this._byResource[m]) for (var _ = 0, y = this._byResource[m][v]; _ < y.length; _++) {
- var C = y[_];
- if (e._accept(C, o)) {
- var c = s.push(C);
- if (r > 0 && c === r) return s
- }
- }
- return s
- }, e._accept = function (e, t) {
- return void 0 === t || (t & e.severity) === e.severity
- }, e._debouncer = function (t, n) {
- t || (e._dedupeMap = Object.create(null), t = []);
- for (var i = 0, o = n; i < o.length; i++) {
- var r = o[i];
- void 0 === e._dedupeMap[r.toString()] && (e._dedupeMap[r.toString()] = !0, t.push(r))
- }
- return t
- }, e
- }();
- t.MarkerService = u
- })), define(n[35], i([0, 1, 112, 11]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Severity = n.default, t.INotificationService = i.createDecorator("notificationService");
- var o = function () {
- };
- t.NoOpNotification = o
- })), define(n[51], i([0, 1, 25, 11, 2, 5]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IOpenerService = i.createDecorator("openerService"), t.NullOpenerService = Object.freeze({
- _serviceBrand: void 0, registerOpener: function () {
- return o.Disposable.None
- }, registerValidator: function () {
- return o.Disposable.None
- }, registerExternalUriResolver: function () {
- return o.Disposable.None
- }, setExternalOpener: function () {
- }, open: function () {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (e) {
- return [2, !1]
- }))
- }))
- }, resolveExternalUri: function (e) {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (t) {
- return [2, {
- resolved: e, dispose: function () {
- }
- }]
- }))
- }))
- }
- }), t.matchesScheme = function (e, t) {
- return n.URI.isUri(e) ? r.equalsIgnoreCase(e.scheme, t) : r.startsWithIgnoreCase(e, t + ":")
- }
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[509], i([0, 1, 6, 76, 180, 46, 39, 25, 32, 29, 51, 478]), (function (e, t, n, i, o, r, s, l, u, p, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var v = function () {
- function e(e) {
- this._commandService = e
- }
- return e.prototype.open = function (e) {
- return d(this, void 0, void 0, (function () {
- var t, n;
- return c(this, (function (i) {
- switch (i.label) {
- case 0:
- if (!f.matchesScheme(e, r.Schemas.command)) return [2, !1];
- if ("string" == typeof e && (e = l.URI.parse(e)), !p.CommandsRegistry.getCommand(e.path)) throw new Error("command '" + e.path + "' NOT known");
- t = [];
- try {
- t = o.parse(decodeURIComponent(e.query))
- } catch (n) {
- try {
- t = o.parse(e.query)
- } catch (e) {
- }
- }
- return Array.isArray(t) || (t = [t]), [4, (n = this._commandService).executeCommand.apply(n, a([e.path], t))];
- case 1:
- return i.sent(), [2, !0]
- }
- }))
- }))
- }, e = h([g(0, p.ICommandService)], e)
- }(), _ = function () {
- function e(e) {
- this._editorService = e
- }
- return e.prototype.open = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return "string" == typeof e && (e = l.URI.parse(e)), n = void 0, (i = /^L?(\d+)(?:,(\d+))?/.exec(e.fragment)) && (n = {
- startLineNumber: parseInt(i[1]),
- startColumn: i[2] ? parseInt(i[2]) : 1
- }, e = e.with({fragment: ""})), e.scheme === r.Schemas.file && (e = s.normalizePath(e)),
- [4, this._editorService.openCodeEditor({
- resource: e,
- options: {
- selection: n,
- context: (null == t ? void 0 : t.fromUserGesture) ? m.EditorOpenContext.USER : m.EditorOpenContext.API
- }
- }, this._editorService.getFocusedCodeEditor(), null == t ? void 0 : t.openToSide)];
- case 1:
- return o.sent(), [2, !0]
- }
- }))
- }))
- }, e = h([g(0, u.ICodeEditorService)], e)
- }(), y = function () {
- function e(e, t) {
- var o = this;
- this._openers = new i.LinkedList, this._validators = new i.LinkedList, this._resolvers = new i.LinkedList, this._externalOpener = {
- openExternal: function (e) {
- return n.windowOpenNoOpener(e), Promise.resolve(!0)
- }
- }, this._openers.push({
- open: function (e, t) {
- return d(o, void 0, void 0, (function () {
- return c(this, (function (n) {
- switch (n.label) {
- case 0:
- return (null == t ? void 0 : t.openExternal) || f.matchesScheme(e, r.Schemas.mailto) || f.matchesScheme(e, r.Schemas.http) || f.matchesScheme(e, r.Schemas.https) ? [4, this._doOpenExternal(e, t)] : [3, 2];
- case 1:
- return n.sent(), [2, !0];
- case 2:
- return [2, !1]
- }
- }))
- }))
- }
- }), this._openers.push(new v(t)), this._openers.push(new _(e))
- }
- return e.prototype.open = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i, o, r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- n = 0, i = this._validators.toArray(), s.label = 1;
- case 1:
- return n < i.length ? [4, i[n].shouldOpen(e)] : [3, 4];
- case 2:
- if (!s.sent()) return [2, !1];
- s.label = 3;
- case 3:
- return n++, [3, 1];
- case 4:
- o = 0, r = this._openers.toArray(), s.label = 5;
- case 5:
- return o < r.length ? [4, r[o].open(e, t)] : [3, 8];
- case 6:
- if (s.sent()) return [2, !0];
- s.label = 7;
- case 7:
- return o++, [3, 5];
- case 8:
- return [2, !1]
- }
- }))
- }))
- }, e.prototype.resolveExternalUri = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i, o;
- return c(this, (function (r) {
- switch (r.label) {
- case 0:
- n = 0, i = this._resolvers.toArray(), r.label = 1;
- case 1:
- return n < i.length ? [4, i[n].resolveExternalUri(e, t)] : [3, 4];
- case 2:
- if (o = r.sent()) return [2, o];
- r.label = 3;
- case 3:
- return n++, [3, 1];
- case 4:
- return [2, {
- resolved: e, dispose: function () {
- }
- }]
- }
- }))
- }))
- }, e.prototype._doOpenExternal = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return n = "string" == typeof e ? l.URI.parse(e) : e,
- [4, this.resolveExternalUri(n, t)];
- case 1:
- return i = o.sent().resolved, "string" == typeof e && n.toString() === i.toString() ? [2, this._externalOpener.openExternal(e)] : [2, this._externalOpener.openExternal(encodeURI(i.toString(!0)))]
- }
- }))
- }))
- }, e.prototype.dispose = function () {
- this._validators.clear()
- }, e = h([g(0, u.ICodeEditorService), g(1, p.ICommandService)], e)
- }();
- t.OpenerService = y
- })), define(n[117], i([0, 1, 248, 51, 71, 10, 214, 11, 4, 2, 17]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = function (e) {
- function t(t, n, o) {
- void 0 === o && (o = i.NullOpenerService);
- var r = e.call(this) || this;
- return r._editor = t, r._modeService = n, r._openerService = o, r._onDidRenderCodeBlock = r._register(new u.Emitter), r.onDidRenderCodeBlock = r._onDidRenderCodeBlock.event, r
- }
- return r(t, e), t.prototype.getOptions = function (e) {
- var t = this;
- return {
- codeBlockRenderer: function (e, n) {
- var i = null;
- if (e) i = t._modeService.getModeIdForLanguageName(e); else {
- var o = t._editor.getModel();
- o && (i = o.getLanguageIdentifier().language)
- }
- return t._modeService.triggerMode(i || ""), Promise.resolve(!0).then((function (e) {
- var t = c.TokenizationRegistry.getPromise(i || "");
- return t ? t.then((function (e) {
- return a.tokenizeToString(n, e)
- })) : a.tokenizeToString(n, void 0)
- })).then((function (e) {
- return '<span style="font-family: ' + t._editor.getOption(34).fontFamily + '">' + e + "</span>"
- }))
- }, codeBlockRenderCallback: function () {
- return t._onDidRenderCodeBlock.fire()
- }, actionHandler: {
- callback: function (e) {
- t._openerService.open(e, {fromUserGesture: !0}).catch(s.onUnexpectedError)
- }, disposeables: e
- }
- }
- }, t.prototype.render = function (e) {
- var t = new d.DisposableStore;
- return {
- element: e ? n.renderMarkdown(e, this.getOptions(t)) : document.createElement("span"),
- dispose: function () {
- return t.dispose()
- }
- }
- }, t = h([g(1, o.IModeService), g(2, l.optional(i.IOpenerService))], t)
- }(d.Disposable);
- t.MarkdownRenderer = p
- })), define(n[510], i([0, 1, 6, 75, 2, 200, 201, 117, 51, 19]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function () {
- function e(e) {
- this._editor = e,
- this._lineNumber = -1, this._result = []
- }
- return e.prototype.setLineNumber = function (e) {
- this._lineNumber = e, this._result = []
- }, e.prototype.clearResult = function () {
- this._result = []
- }, e.prototype.computeSync = function () {
- var e = function (e) {
- return {value: e}
- }, t = this._editor.getLineDecorations(this._lineNumber), n = [];
- if (!t) return n;
- for (var o = 0, r = t; o < r.length; o++) {
- var s = r[o];
- if (s.options.glyphMarginClassName) {
- var a = s.options.glyphMarginHoverMessage;
- a && !i.isEmptyMarkdownString(a) && n.push.apply(n, d.asArray(a).map(e))
- }
- }
- return n
- }, e.prototype.onResult = function (e, t) {
- this._result = this._result.concat(e)
- }, e.prototype.getResult = function () {
- return this._result
- }, e.prototype.getResultWithLoadingMessage = function () {
- return this.getResult()
- }, e
- }(), h = function (e) {
- function t(n, i, r) {
- void 0 === r && (r = u.NullOpenerService);
- var a = e.call(this, t.ID, n) || this;
- return a._renderDisposeables = a._register(new o.DisposableStore), a._messages = [], a._lastLineNumber = -1, a._markdownRenderer = a._register(new l.MarkdownRenderer(a._editor, i, r)), a._computer = new c(a._editor),
- a._hoverOperation = new s.HoverOperation(a._computer, (function (e) {
- return a._withResult(e)
- }), void 0, (function (e) {
- return a._withResult(e)
- }), 300), a
- }
- return r(t, e), t.prototype.dispose = function () {
- this._hoverOperation.cancel(), e.prototype.dispose.call(this)
- }, t.prototype.onModelDecorationsChanged = function () {
- this.isVisible && (this._hoverOperation.cancel(), this._computer.clearResult(), this._hoverOperation.start(0))
- }, t.prototype.startShowingAt = function (e) {
- this._lastLineNumber !== e && (this._hoverOperation.cancel(), this.hide(), this._lastLineNumber = e, this._computer.setLineNumber(e), this._hoverOperation.start(0))
- }, t.prototype.hide = function () {
- this._lastLineNumber = -1, this._hoverOperation.cancel(), e.prototype.hide.call(this)
- }, t.prototype._withResult = function (e) {
- this._messages = e, this._messages.length > 0 ? this._renderMessages(this._lastLineNumber, this._messages) : this.hide()
- }, t.prototype._renderMessages = function (e, t) {
- this._renderDisposeables.clear();
- for (var i = document.createDocumentFragment(), o = 0, r = t; o < r.length; o++) {
- var s = r[o], a = this._markdownRenderer.render(s.value);
- this._renderDisposeables.add(a), i.appendChild(n.$("div.hover-row", void 0, a.element))
- }
- this.updateContents(i), this.showAt(e)
- }, t.ID = "editor.contrib.modesGlyphHoverWidget", t
- }(a.GlyphHoverWidget);
- t.ModesGlyphHoverWidget = h
- })), define(n[73], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IEditorProgressService = n.createDecorator("editorProgressService")
- })), define(n[42], i([0, 1, 21, 124]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function () {
- function e() {
- this.data = new Map
- }
- return e.prototype.add = function (e, t) {
- i.ok(n.isString(e)), i.ok(n.isObject(t)), i.ok(!this.data.has(e), "There is already an extension with this id"), this.data.set(e, t)
- }, e.prototype.as = function (e) {
- return this.data.get(e) || null
- }, e
- }();
- t.Registry = new o
- })), define(n[118], i([0, 1, 425, 4, 17, 41, 42]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {
- ModesRegistry: "editor.modesRegistry"
- };
- var a = function () {
- function e() {
- this._onDidChangeLanguages = new i.Emitter, this.onDidChangeLanguages = this._onDidChangeLanguages.event, this._languages = [], this._dynamicLanguages = []
- }
- return e.prototype.registerLanguage = function (e) {
- this._languages.push(e), this._onDidChangeLanguages.fire(void 0)
- }, e.prototype.getLanguages = function () {
- return [].concat(this._languages).concat(this._dynamicLanguages)
- }, e
- }();
- t.EditorModesRegistry = a, t.ModesRegistry = new a, s.Registry.add(t.Extensions.ModesRegistry, t.ModesRegistry), t.PLAINTEXT_MODE_ID = "plaintext", t.PLAINTEXT_LANGUAGE_IDENTIFIER = new o.LanguageIdentifier(t.PLAINTEXT_MODE_ID, 1), t.ModesRegistry.registerLanguage({
- id: t.PLAINTEXT_MODE_ID,
- extensions: [".txt", ".gitignore"],
- aliases: [n.localize(0, null), "text"],
- mimetypes: ["text/plain"]
- }), r.LanguageConfigurationRegistry.register(t.PLAINTEXT_LANGUAGE_IDENTIFIER, {
- brackets: [["(", ")"], ["[", "]"], ["{", "}"]],
- surroundingPairs: [{open: "{", close: "}"}, {open: "[", close: "]"}, {open: "(", close: ")"}, {
- open: "<",
- close: ">"
- }, {
- open: '"', close: '"'
- }, {open: "'", close: "'"}, {open: "`", close: "`"}],
- folding: {offSide: !0}
- })
- })), define(n[511], i([0, 1, 46, 39, 118, 208]), (function (e, t, n, i, o, r) {
- "use strict";
- function s(e, t, r) {
- if (!r) return null;
- var s = null;
- if (r.scheme === n.Schemas.data) {
- var a = i.DataUri.parseMetaData(r).get(i.DataUri.META_DATA_MIME);
- a && (s = t.getModeId(a))
- } else {
- var l = e.getModel(r);
- l && (s = l.getModeId())
- }
- return s && s !== o.PLAINTEXT_MODE_ID ? s : t.getModeIdByFilepathOrFirstLine(r)
- }
- function a(e) {
- return e.replace(/\s/g, "\\$&")
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getIconClasses = function (e, t, o, l) {
- var u = l === r.FileKind.ROOT_FOLDER ? ["rootfolder-icon"] : l === r.FileKind.FOLDER ? ["folder-icon"] : ["file-icon"];
- if (o) {
- var d;
- if (o.scheme === n.Schemas.data) d = i.DataUri.parseMetaData(o).get(i.DataUri.META_DATA_LABEL); else d = a(i.basenameOrAuthority(o).toLowerCase());
- if (l === r.FileKind.FOLDER) u.push(d + "-name-folder-icon"); else {
- if (d) {
- u.push(d + "-name-file-icon");
- for (var c = d.split("."), h = 1; h < c.length; h++) u.push(c.slice(h).join(".") + "-ext-file-icon")
- ;
- u.push("ext-file-icon")
- }
- var p = s(e, t, o);
- p && u.push(a(p) + "-lang-file-icon")
- }
- }
- return u
- }, t.detectModeId = s, t.cssEscape = a
- })), define(n[220], i([0, 1, 42, 4]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {JSONContribution: "base.contributions.json"};
- var o = new (function () {
- function e() {
- this._onDidChangeSchema = new i.Emitter, this.schemasById = {}
- }
- return e.prototype.registerSchema = function (e, t) {
- var n;
- this.schemasById[(n = e, n.length > 0 && "#" === n.charAt(n.length - 1) ? n.substring(0, n.length - 1) : n)] = t, this._onDidChangeSchema.fire(e)
- }, e.prototype.notifySchemaChanged = function (e) {
- this._onDidChangeSchema.fire(e)
- }, e
- }());
- n.Registry.add(t.Extensions.JSONContribution, o)
- })), define(n[85], i([0, 1, 472, 4, 42, 21, 220, 38]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {Configuration: "base.contributions.configuration"}, t.allSettings = {
- properties: {},
- patternProperties: {}
- }, t.applicationSettings = {properties: {}, patternProperties: {}}, t.machineSettings = {
- properties: {}, patternProperties: {}
- }, t.machineOverridableSettings = {properties: {}, patternProperties: {}}, t.windowSettings = {
- properties: {},
- patternProperties: {}
- }, t.resourceSettings = {
- properties: {},
- patternProperties: {}
- }, t.resourceLanguageSettingsSchemaId = "vscode://schemas/settings/resourceLanguage";
- var l = o.Registry.as(s.Extensions.JSONContribution), u = function () {
- function e() {
- this.overrideIdentifiers = new Set, this._onDidSchemaChange = new i.Emitter, this._onDidUpdateConfiguration = new i.Emitter, this.defaultOverridesConfigurationNode = {
- id: "defaultOverrides",
- title: n.localize(0, null),
- properties: {}
- }, this.configurationContributors = [this.defaultOverridesConfigurationNode], this.resourceLanguageSettingsSchema = {
- properties: {},
- patternProperties: {},
- additionalProperties: !1,
- errorMessage: "Unknown editor configuration setting",
- allowTrailingCommas: !0,
- allowComments: !0
- }, this.configurationProperties = {}, this.excludedConfigurationProperties = {}, l.registerSchema(t.resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema)
- }
- return e.prototype.registerConfiguration = function (e, t) {
- void 0 === t && (t = !0), this.registerConfigurations([e], t)
- }, e.prototype.registerConfigurations = function (e, n) {
- var i = this;
- void 0 === n && (n = !0);
- var o = [];
- e.forEach((function (e) {
- o.push.apply(o, i.validateAndRegisterProperties(e, n)), i.configurationContributors.push(e), i.registerJSONConfiguration(e)
- })), l.registerSchema(t.resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema), this._onDidSchemaChange.fire(), this._onDidUpdateConfiguration.fire(o)
- }, e.prototype.registerOverrideIdentifiers = function (e) {
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t];
- this.overrideIdentifiers.add(i)
- }
- this.updateOverridePropertyPatternKey()
- }, e.prototype.validateAndRegisterProperties = function (e, n, i) {
- void 0 === n && (n = !0), void 0 === i && (i = 3), i = r.isUndefinedOrNull(e.scope) ? i : e.scope;
- var o = [], s = e.properties;
- if (s) for (var a in s) if (n && h(a)) delete s[a]; else {
- var l = s[a], u = l.default;
- r.isUndefined(u) && (l.default = d(l.type)),
- t.OVERRIDE_PROPERTY_PATTERN.test(a) ? l.scope = void 0 : l.scope = r.isUndefinedOrNull(l.scope) ? i : l.scope, !s[a].hasOwnProperty("included") || s[a].included ? (this.configurationProperties[a] = s[a], o.push(a)) : (this.excludedConfigurationProperties[a] = s[a], delete s[a])
- }
- var c = e.allOf;
- if (c) for (var p = 0, g = c; p < g.length; p++) {
- var f = g[p];
- o.push.apply(o, this.validateAndRegisterProperties(f, n, i))
- }
- return o
- }, e.prototype.getConfigurationProperties = function () {
- return this.configurationProperties
- }, e.prototype.registerJSONConfiguration = function (e) {
- var n = this, i = function (e) {
- var o = e.properties;
- if (o) for (var r in o) switch (t.allSettings.properties[r] = o[r], o[r].scope) {
- case 1:
- t.applicationSettings.properties[r] = o[r];
- break;
- case 2:
- t.machineSettings.properties[r] = o[r];
- break;
- case 6:
- t.machineOverridableSettings.properties[r] = o[r];
- break;
- case 3:
- t.windowSettings.properties[r] = o[r];
- break;
- case 4:
- t.resourceSettings.properties[r] = o[r];
- break;
- case 5:
- t.resourceSettings.properties[r] = o[r], n.resourceLanguageSettingsSchema.properties[r] = o[r]
- }
- var s = e.allOf
- ;s && s.forEach(i)
- };
- i(e)
- }, e.prototype.updateOverridePropertyPatternKey = function () {
- for (var e, i = 0, o = a.values(this.overrideIdentifiers); i < o.length; i++) {
- var r = "[" + o[i] + "]", s = {
- type: "object",
- description: n.localize(1, null),
- errorMessage: n.localize(2, null),
- $ref: t.resourceLanguageSettingsSchemaId,
- default: null === (e = this.defaultOverridesConfigurationNode.properties[r]) || void 0 === e ? void 0 : e.default
- };
- t.allSettings.properties[r] = s, t.applicationSettings.properties[r] = s, t.machineSettings.properties[r] = s, t.machineOverridableSettings.properties[r] = s, t.windowSettings.properties[r] = s, t.resourceSettings.properties[r] = s
- }
- this._onDidSchemaChange.fire()
- }, e
- }();
- function d(e) {
- switch (Array.isArray(e) ? e[0] : e) {
- case"boolean":
- return !1;
- case"integer":
- case"number":
- return 0;
- case"string":
- return "";
- case"array":
- return [];
- case"object":
- return {};
- default:
- return null
- }
- }
- t.OVERRIDE_PROPERTY_PATTERN = new RegExp("\\[.*\\]$"), t.getDefaultValue = d;
- var c = new u;
- function h(e) {
- return t.OVERRIDE_PROPERTY_PATTERN.test(e) ? n.localize(3, null, e) : void 0 !== c.getConfigurationProperties()[e] ? n.localize(4, null, e) : null
- }
- o.Registry.add(t.Extensions.Configuration, c), t.validateProperty = h
- })), define(n[163], i([0, 1, 422, 4, 2, 31, 19, 33, 105, 142, 85, 42, 87]), (function (e, t, n, i, o, s, a, u, d, c, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.TabFocus = new (function () {
- function e() {
- this._tabFocus = !1, this._onDidChangeTabFocus = new i.Emitter, this.onDidChangeTabFocus = this._onDidChangeTabFocus.event
- }
- return e.prototype.getTabFocusMode = function () {
- return this._tabFocus
- }, e.prototype.setTabFocusMode = function (e) {
- this._tabFocus !== e && (this._tabFocus = e, this._onDidChangeTabFocus.fire(this._tabFocus))
- }, e
- }());
- var f = Object.hasOwnProperty, m = function () {
- function e() {
- this._values = []
- }
- return e.prototype._read = function (e) {
- return this._values[e]
- }, e.prototype.get = function (e) {
- return this._values[e]
- }, e.prototype._write = function (e, t) {
- this._values[e] = t
- }, e
- }();
- t.ComputedEditorOptions = m;
- var v = function () {
- function e() {
- this._values = []
- }
- return e.prototype._read = function (e) {
- return this._values[e]
- }, e.prototype._write = function (e, t) {
- this._values[e] = t
- }, e
- }(), _ = function () {
- function e() {
- }
- return e.readOptions = function (e) {
- for (var t = e, n = new v, i = 0, o = u.editorOptionsRegistry; i < o.length; i++) {
- var r = o[i], s = "_never_" === r.name ? void 0 : t[r.name];
- n._write(r.id, s)
- }
- return n
- }, e.validateOptions = function (e) {
- for (var t = new u.ValidatedEditorOptions, n = 0, i = u.editorOptionsRegistry; n < i.length; n++) {
- var o = i[n];
- t._write(o.id, o.validate(e._read(o.id)))
- }
- return t
- }, e.computeOptions = function (e, t) {
- for (var n = new m, i = 0, o = u.editorOptionsRegistry; i < o.length; i++) {
- var r = o[i];
- n._write(r.id, r.compute(t, n, e._read(r.id)))
- }
- return n
- }, e._deepEquals = function (t, n) {
- if ("object" != typeof t || "object" != typeof n) return t === n;
- if (Array.isArray(t) || Array.isArray(n)) return !(!Array.isArray(t) || !Array.isArray(n)) && a.equals(t, n);
- for (var i in t) if (!e._deepEquals(t[i], n[i])) return !1;
- return !0
- }, e.checkEquals = function (t, n) {
- for (var i = [], o = !1, r = 0, s = u.editorOptionsRegistry; r < s.length; r++) {
- var a = s[r], l = !e._deepEquals(t._read(a.id), n._read(a.id));
- i[a.id] = l, l && (o = !0)
- }
- return o ? new u.ConfigurationChangedEvent(i) : null
- }, e
- }();
- function y(e) {
- var t = s.deepClone(e);
- return function (e) {
- var t = e.wordWrap;
- !0 === t ? e.wordWrap = "on" : !1 === t && (e.wordWrap = "off");
- var n = e.lineNumbers;
- !0 === n ? e.lineNumbers = "on" : !1 === n && (e.lineNumbers = "off"), !1 === e.autoClosingBrackets && (e.autoClosingBrackets = "never", e.autoClosingQuotes = "never", e.autoSurround = "never"), "visible" === e.cursorBlinking && (e.cursorBlinking = "solid");
- var i = e.renderWhitespace;
- !0 === i ? e.renderWhitespace = "boundary" : !1 === i && (e.renderWhitespace = "none");
- var o = e.renderLineHighlight;
- !0 === o ? e.renderLineHighlight = "line" : !1 === o && (e.renderLineHighlight = "none");
- var r = e.acceptSuggestionOnEnter;
- !0 === r ? e.acceptSuggestionOnEnter = "on" : !1 === r && (e.acceptSuggestionOnEnter = "off");
- var s = e.tabCompletion;
- !1 === s ? e.tabCompletion = "off" : !0 === s && (e.tabCompletion = "onlySnippets");
- var a = e.suggest;
- if (a && "object" == typeof a.filteredTypes && a.filteredTypes) {
- var l = {
- method: "showMethods",
- function: "showFunctions",
- constructor: "showConstructors",
- field: "showFields",
- variable: "showVariables",
- class: "showClasses",
- struct: "showStructs",
- interface: "showInterfaces",
- module: "showModules",
- property: "showProperties",
- event: "showEvents",
- operator: "showOperators",
- unit: "showUnits",
- value: "showValues",
- constant: "showConstants",
- enum: "showEnums",
- enumMember: "showEnumMembers",
- keyword: "showKeywords",
- text: "showWords",
- color: "showColors",
- file: "showFiles",
- reference: "showReferences",
- folder: "showFolders",
- typeParameter: "showTypeParameters",
- snippet: "showSnippets"
- };
- g.forEach(l, (function (e) {
- var t = a.filteredTypes[e.key];
- !1 === t && (a[e.value] = t)
- }))
- }
- var u = e.hover;
- !0 === u ? e.hover = {enabled: !0} : !1 === u && (e.hover = {enabled: !1});
- var d = e.parameterHints;
- !0 === d ? e.parameterHints = {enabled: !0} : !1 === d && (e.parameterHints = {enabled: !1});
- var c = e.autoIndent;
- !0 === c ? e.autoIndent = "full" : !1 === c && (e.autoIndent = "advanced");
- var h = e.matchBrackets;
- !0 === h ? e.matchBrackets = "always" : !1 === h && (e.matchBrackets = "never")
- }(t), t
- }
- var C = function (e) {
- function n(n, o) {
- var r = e.call(this) || this;
- return r._onDidChange = r._register(new i.Emitter), r.onDidChange = r._onDidChange.event, r.isSimpleWidget = n, r._isDominatedByLongLines = !1, r._lineNumbersDigitCount = 1, r._rawOptions = y(o), r._readOptions = _.readOptions(r._rawOptions), r._validatedOptions = _.validateOptions(r._readOptions), r._register(d.EditorZoom.onDidChangeZoomLevel((function (e) {
- return r._recomputeOptions()
- }))), r._register(t.TabFocus.onDidChangeTabFocus((function (e) {
- return r._recomputeOptions()
- }))), r
- }
- return r(n, e), n.prototype.observeReferenceElement = function (e) {
- }, n.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, n.prototype._recomputeOptions = function () {
- var e = this.options, t = this._computeInternalOptions();
- if (e) {
- var n = _.checkEquals(e, t);
- if (null === n) return;
- this.options = t, this._onDidChange.fire(n)
- } else this.options = t
- }, n.prototype.getRawOptions = function () {
- return this._rawOptions
- }, n.prototype._computeInternalOptions = function () {
- var e = this._getEnvConfiguration(),
- n = c.BareFontInfo.createFromValidatedSettings(this._validatedOptions, e.zoomLevel, this.isSimpleWidget),
- i = {
- outerWidth: e.outerWidth,
- outerHeight: e.outerHeight,
- fontInfo: this.readConfiguration(n),
- extraEditorClassName: e.extraEditorClassName,
- isDominatedByLongLines: this._isDominatedByLongLines,
- lineNumbersDigitCount: this._lineNumbersDigitCount,
- emptySelectionClipboard: e.emptySelectionClipboard,
- pixelRatio: e.pixelRatio,
- tabFocusMode: t.TabFocus.getTabFocusMode(),
- accessibilitySupport: e.accessibilitySupport
- };
- return _.computeOptions(this._validatedOptions, i)
- }, n._subsetEquals = function (e, t) {
- for (var n in t) if (f.call(t, n)) {
- var i = t[n], o = e[n];
- if (o === i) continue;
- if (Array.isArray(o) && Array.isArray(i)) {
- if (!a.equals(o, i)) return !1;
- continue
- }
- if ("object" == typeof o && "object" == typeof i) {
- if (!this._subsetEquals(o, i)) return !1;
- continue
- }
- return !1
- }
- return !0
- }, n.prototype.updateOptions = function (e) {
- if (void 0 !== e) {
- var t = y(e);
- n._subsetEquals(this._rawOptions, t) || (this._rawOptions = s.mixin(this._rawOptions, t || {}),
- this._readOptions = _.readOptions(this._rawOptions), this._validatedOptions = _.validateOptions(this._readOptions), this._recomputeOptions())
- }
- }, n.prototype.setIsDominatedByLongLines = function (e) {
- this._isDominatedByLongLines = e, this._recomputeOptions()
- }, n.prototype.setMaxLineNumber = function (e) {
- var t = n._digitCount(e);
- this._lineNumbersDigitCount !== t && (this._lineNumbersDigitCount = t, this._recomputeOptions())
- }, n._digitCount = function (e) {
- for (var t = 0; e;) e = Math.floor(e / 10), t++;
- return t || 1
- }, n
- }(o.Disposable);
- t.CommonEditorConfiguration = C, t.editorConfigurationBaseNode = Object.freeze({
- id: "editor",
- order: 5,
- type: "object",
- title: n.localize(0, null),
- scope: 5
- });
- var b, S = p.Registry.as(h.Extensions.Configuration), w = l(l({}, t.editorConfigurationBaseNode), {
- properties: {
- "editor.tabSize": {
- type: "number",
- default: u.EDITOR_MODEL_DEFAULTS.tabSize,
- minimum: 1,
- markdownDescription: n.localize(1, null)
- },
- "editor.insertSpaces": {
- type: "boolean",
- default: u.EDITOR_MODEL_DEFAULTS.insertSpaces,
- markdownDescription: n.localize(2, null)
- },
- "editor.detectIndentation": {
- type: "boolean",
- default: u.EDITOR_MODEL_DEFAULTS.detectIndentation,
- markdownDescription: n.localize(3, null)
- },
- "editor.trimAutoWhitespace": {
- type: "boolean",
- default: u.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,
- description: n.localize(4, null)
- },
- "editor.largeFileOptimizations": {
- type: "boolean",
- default: u.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,
- description: n.localize(5, null)
- },
- "editor.wordBasedSuggestions": {type: "boolean", default: !0, description: n.localize(6, null)},
- "editor.semanticHighlighting.enabled": {type: "boolean", default: !1, description: n.localize(7, null)},
- "editor.stablePeek": {type: "boolean", default: !1, markdownDescription: n.localize(8, null)},
- "editor.maxTokenizationLineLength": {type: "integer", default: 2e4, description: n.localize(9, null)},
- "diffEditor.maxComputationTime": {type: "number", default: 5e3, description: n.localize(10, null)},
- "diffEditor.renderSideBySide": {type: "boolean", default: !0, description: n.localize(11, null)},
- "diffEditor.ignoreTrimWhitespace": {type: "boolean", default: !0, description: n.localize(12, null)},
- "diffEditor.renderIndicators": {type: "boolean", default: !0, description: n.localize(13, null)}
- }
- });
- for (var E = 0, L = u.editorOptionsRegistry; E < L.length; E++) {
- var D = L[E], N = D.schema;
- if (void 0 !== N) if (void 0 !== (b = N).type || void 0 !== b.anyOf) w.properties["editor." + D.name] = N; else for (var x in N) f.call(N, x) && (w.properties[x] = N[x])
- }
- var I = null;
- function M() {
- return null === I && (I = Object.create(null), Object.keys(w.properties).forEach((function (e) {
- I[e] = !0
- }))), I
- }
- t.isEditorConfigurationKey = function (e) {
- return M()["editor." + e] || !1
- }, t.isDiffEditorConfigurationKey = function (e) {
- return M()["diffEditor." + e] || !1
- }, S.registerConfiguration(w)
- })), define(n[60], i([0, 1, 24, 4, 2, 16, 333, 185, 163, 33, 142]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var h = function () {
- function e() {
- this._keys = Object.create(null), this._values = Object.create(null)
- }
- return e.prototype.has = function (e) {
- var t = e.getId();
- return !!this._values[t]
- }, e.prototype.get = function (e) {
- var t = e.getId();
- return this._values[t]
- },
- e.prototype.put = function (e, t) {
- var n = e.getId();
- this._keys[n] = e, this._values[n] = t
- }, e.prototype.remove = function (e) {
- var t = e.getId();
- delete this._keys[t], delete this._values[t]
- }, e.prototype.getValues = function () {
- var e = this;
- return Object.keys(this._keys).map((function (t) {
- return e._values[t]
- }))
- }, e
- }();
- t.clearAllFontInfos = function () {
- p.INSTANCE.clearCache()
- };
- var p = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._onDidChange = t._register(new i.Emitter), t.onDidChange = t._onDidChange.event, t._cache = new h, t._evictUntrustedReadingsTimeout = -1, t
- }
- return r(t, e), t.prototype.dispose = function () {
- -1 !== this._evictUntrustedReadingsTimeout && (clearTimeout(this._evictUntrustedReadingsTimeout), this._evictUntrustedReadingsTimeout = -1), e.prototype.dispose.call(this)
- }, t.prototype.clearCache = function () {
- this._cache = new h, this._onDidChange.fire()
- }, t.prototype._writeToCache = function (e, t) {
- var n = this;
- this._cache.put(e, t), t.isTrusted || -1 !== this._evictUntrustedReadingsTimeout || (this._evictUntrustedReadingsTimeout = setTimeout((function () {
- n._evictUntrustedReadingsTimeout = -1, n._evictUntrustedReadings()
- }), 5e3))
- }, t.prototype._evictUntrustedReadings = function () {
- for (var e = this._cache.getValues(), t = !1, n = 0, i = e.length; n < i; n++) {
- var o = e[n];
- o.isTrusted || (t = !0, this._cache.remove(o))
- }
- t && this._onDidChange.fire()
- }, t.prototype.readConfiguration = function (e) {
- if (!this._cache.has(e)) {
- var i = t._actualReadConfiguration(e);
- (i.typicalHalfwidthCharacterWidth <= 2 || i.typicalFullwidthCharacterWidth <= 2 || i.spaceWidth <= 2 || i.maxDigitWidth <= 2) && (i = new c.FontInfo({
- zoomLevel: n.getZoomLevel(),
- fontFamily: i.fontFamily,
- fontWeight: i.fontWeight,
- fontSize: i.fontSize,
- fontFeatureSettings: i.fontFeatureSettings,
- lineHeight: i.lineHeight,
- letterSpacing: i.letterSpacing,
- isMonospace: i.isMonospace,
- typicalHalfwidthCharacterWidth: Math.max(i.typicalHalfwidthCharacterWidth, 5),
- typicalFullwidthCharacterWidth: Math.max(i.typicalFullwidthCharacterWidth, 5),
- canUseHalfwidthRightwardsArrow: i.canUseHalfwidthRightwardsArrow,
- spaceWidth: Math.max(i.spaceWidth, 5),
- middotWidth: Math.max(i.middotWidth, 5),
- maxDigitWidth: Math.max(i.maxDigitWidth, 5)
- }, !1)), this._writeToCache(e, i)
- }
- return this._cache.get(e)
- }, t.createRequest = function (e, t, n, i) {
- var o = new a.CharWidthRequest(e, t);
- return n.push(o), i && i.push(o), o
- }, t._actualReadConfiguration = function (e) {
- var t = [], i = [], o = this.createRequest("n", 0, t, i), r = this.createRequest("m", 0, t, null),
- s = this.createRequest(" ", 0, t, i), l = this.createRequest("0", 0, t, i),
- u = this.createRequest("1", 0, t, i), h = this.createRequest("2", 0, t, i),
- p = this.createRequest("3", 0, t, i), g = this.createRequest("4", 0, t, i),
- f = this.createRequest("5", 0, t, i), m = this.createRequest("6", 0, t, i),
- v = this.createRequest("7", 0, t, i), _ = this.createRequest("8", 0, t, i),
- y = this.createRequest("9", 0, t, i), C = this.createRequest("→", 0, t, i),
- b = this.createRequest("→", 0, t, null), S = this.createRequest("·", 0, t, i);
- this.createRequest("|", 0, t, i), this.createRequest("/", 0, t, i), this.createRequest("-", 0, t, i), this.createRequest("_", 0, t, i), this.createRequest("i", 0, t, i), this.createRequest("l", 0, t, i), this.createRequest("m", 0, t, i), this.createRequest("|", 1, t, i),
- this.createRequest("_", 1, t, i), this.createRequest("i", 1, t, i), this.createRequest("l", 1, t, i), this.createRequest("m", 1, t, i), this.createRequest("n", 1, t, i), this.createRequest("|", 2, t, i), this.createRequest("_", 2, t, i), this.createRequest("i", 2, t, i), this.createRequest("l", 2, t, i), this.createRequest("m", 2, t, i), this.createRequest("n", 2, t, i), a.readCharWidths(e, t);
- for (var w = Math.max(l.width, u.width, h.width, p.width, g.width, f.width, m.width, v.width, _.width, y.width), E = e.fontFeatureSettings === d.EditorFontLigatures.OFF, L = i[0].width, D = 1, N = i.length; E && D < N; D++) {
- var x = L - i[D].width;
- if (x < -.001 || x > .001) {
- E = !1;
- break
- }
- }
- var I = !0;
- E && b.width !== L && (I = !1), b.width > C.width && (I = !1);
- var M = n.getTimeSinceLastZoomLevelChanged() > 2e3;
- return new c.FontInfo({
- zoomLevel: n.getZoomLevel(),
- fontFamily: e.fontFamily,
- fontWeight: e.fontWeight,
- fontSize: e.fontSize,
- fontFeatureSettings: e.fontFeatureSettings,
- lineHeight: e.lineHeight,
- letterSpacing: e.letterSpacing,
- isMonospace: E,
- typicalHalfwidthCharacterWidth: o.width,
- typicalFullwidthCharacterWidth: r.width,
- canUseHalfwidthRightwardsArrow: I,
- spaceWidth: s.width,
- middotWidth: S.width,
- maxDigitWidth: w
- }, M)
- }, t.INSTANCE = new t, t
- }(o.Disposable), g = function (e) {
- function t(t, i, o, r) {
- void 0 === o && (o = null);
- var s = e.call(this, t, i) || this;
- return s.accessibilityService = r, s._elementSizeObserver = s._register(new l.ElementSizeObserver(o, i.dimension, (function () {
- return s._onReferenceDomElementSizeChanged()
- }))), s._register(p.INSTANCE.onDidChange((function () {
- return s._onCSSBasedConfigurationChanged()
- }))), s._validatedOptions.get(9) && s._elementSizeObserver.startObserving(), s._register(n.onDidChangeZoomLevel((function (e) {
- return s._recomputeOptions()
- }))), s._register(s.accessibilityService.onDidChangeScreenReaderOptimized((function () {
- return s._recomputeOptions()
- }))), s._recomputeOptions(), s
- }
- return r(t, e), t.applyFontInfoSlow = function (e, t) {
- e.style.fontFamily = t.getMassagedFontFamily(), e.style.fontWeight = t.fontWeight, e.style.fontSize = t.fontSize + "px", e.style.fontFeatureSettings = t.fontFeatureSettings, e.style.lineHeight = t.lineHeight + "px",
- e.style.letterSpacing = t.letterSpacing + "px"
- }, t.applyFontInfo = function (e, t) {
- e.setFontFamily(t.getMassagedFontFamily()), e.setFontWeight(t.fontWeight), e.setFontSize(t.fontSize), e.setFontFeatureSettings(t.fontFeatureSettings), e.setLineHeight(t.lineHeight), e.setLetterSpacing(t.letterSpacing)
- }, t.prototype._onReferenceDomElementSizeChanged = function () {
- this._recomputeOptions()
- }, t.prototype._onCSSBasedConfigurationChanged = function () {
- this._recomputeOptions()
- }, t.prototype.observeReferenceElement = function (e) {
- this._elementSizeObserver.observe(e)
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype._getExtraEditorClassName = function () {
- var e = "";
- return n.isSafari || n.isWebkitWebView || (e += "no-user-select "), s.isMacintosh && (e += "mac "), e
- }, t.prototype._getEnvConfiguration = function () {
- return {
- extraEditorClassName: this._getExtraEditorClassName(),
- outerWidth: this._elementSizeObserver.getWidth(),
- outerHeight: this._elementSizeObserver.getHeight(),
- emptySelectionClipboard: n.isWebKit || n.isFirefox,
- pixelRatio: n.getPixelRatio(),
- zoomLevel: n.getZoomLevel(),
- accessibilitySupport: this.accessibilityService.isScreenReaderOptimized() ? 2 : this.accessibilityService.getAccessibilitySupport()
- }
- }, t.prototype.readConfiguration = function (e) {
- return p.INSTANCE.readConfiguration(e)
- }, t
- }(u.CommonEditorConfiguration);
- t.Configuration = g
- })), define(n[512], i([0, 1, 161, 106, 5, 60]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e() {
- }
- return e.create = function () {
- return new e
- }, e.prototype.createLineBreaksComputer = function (e, t, s, u) {
- t |= 0, s = +s;
- var d = [];
- return {
- addRequest: function (e, t) {
- d.push(e)
- }, finalize: function () {
- return function (e, t, s, u, d) {
- if (-1 === u) {
- for (var c = [], h = 0, p = e.length; h < p; h++) c[h] = null;
- return c
- }
- var g = Math.round(u * t.typicalHalfwidthCharacterWidth);
- 2 !== d && 3 !== d || (d = 1);
- var f = document.createElement("div");
- r.Configuration.applyFontInfoSlow(f, t);
- var m = i.createStringBuilder(1e4), v = [], _ = [], y = [], C = [], b = [];
- for (h = 0; h < e.length; h++) {
- var S = e[h], w = 0, E = 0, L = g
- ;
- if (0 !== d) if (-1 === (w = o.firstNonWhitespaceIndex(S))) w = 0; else {
- for (var D = 0; D < w; D++) {
- var N = 9 === S.charCodeAt(D) ? s - E % s : 1;
- E += N
- }
- var x = Math.ceil(t.spaceWidth * E);
- x + t.typicalFullwidthCharacterWidth > g ? (w = 0, E = 0) : L = g - x
- }
- var I = S.substr(w), M = a(I, E, s, L, m);
- v[h] = w, _[h] = E, y[h] = I, C[h] = M[0], b[h] = M[1]
- }
- f.innerHTML = m.build(), f.style.position = "absolute", f.style.top = "10000", f.style.wordWrap = "break-word", document.body.appendChild(f);
- var k = document.createRange(), T = Array.prototype.slice.call(f.children, 0), R = [];
- for (h = 0; h < e.length; h++) {
- var O = T[h], P = l(k, O, y[h], C[h]);
- if (null !== P) {
- w = v[h], E = _[h];
- var A = b[h], F = [], W = 0;
- for (p = P.length; W < p; W++) F[W] = A[P[W]];
- if (0 !== w) for (W = 0, p = P.length; W < p; W++) P[W] += w;
- R[h] = new n.LineBreakData(P, F, E)
- } else R[h] = null
- }
- return document.body.removeChild(f), R
- }(d, e, t, s, u)
- }
- }
- }, e
- }();
- function a(e, t, n, i, r) {
- r.appendASCIIString('<div style="width:'), r.appendASCIIString(String(i)), r.appendASCIIString('px;">');
- for (var s = e.length, a = t, l = 0, u = [], d = [], c = 0 < s ? e.charCodeAt(0) : 0, h = 0; h < s; h++) {
- u[h] = l, d[h] = a;
- var p = c;
- c = h + 1 < s ? e.charCodeAt(h + 1) : 0
- ;var g = 1, f = 1;
- switch (p) {
- case 9:
- f = g = n - a % n;
- for (var m = 1; m <= g; m++) m < g ? r.write1(160) : r.appendASCII(32);
- break;
- case 32:
- 32 === c ? r.write1(160) : r.appendASCII(32);
- break;
- case 60:
- r.appendASCIIString("<");
- break;
- case 62:
- r.appendASCIIString(">");
- break;
- case 38:
- r.appendASCIIString("&");
- break;
- case 0:
- r.appendASCIIString("�");
- break;
- case 65279:
- case 8232:
- r.write1(65533);
- break;
- default:
- o.isFullWidthCharacter(p) && f++, r.write1(p)
- }
- l += g, a += f
- }
- return u[e.length] = l, d[e.length] = a, r.appendASCIIString("</div>"), [u, d]
- }
- function l(e, t, n, i) {
- if (n.length <= 1) return null;
- var o = [];
- return function e(t, n, i, o, r, s, a, l) {
- if (o === s) return;
- r = r || u(t, n, i[o], i[o + 1]);
- a = a || u(t, n, i[s], i[s + 1]);
- if (Math.abs(r[0].top - a[0].top) <= .1) return;
- if (o + 1 === s) return void l.push(s);
- var d = o + (s - o) / 2 | 0;
- var c = u(t, n, i[d], i[d + 1]);
- e(t, n, i, o, r, d, c, l);
- e(t, n, i, d, c, s, a, l)
- }(e, t.firstChild, i, 0, null, n.length - 1, null, o), 0 === o.length ? null : (o.push(n.length), o)
- }
- function u(e, t, n, i) {
- return e.setStart(t, n), e.setEnd(t, i), e.getClientRects()
- }
- t.DOMLineBreaksComputerFactory = s
- })),
- define(n[513], i([0, 1, 28, 60, 143, 37]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._visibleLines = new o.VisibleLinesCollection(n), n.domNode = n._visibleLines.domNode, n._dynamicOverlays = [], n._isFocused = !1, n.domNode.setClassName("view-overlays"), n
- }
- return r(t, e), t.prototype.shouldRender = function () {
- if (e.prototype.shouldRender.call(this)) return !0;
- for (var t = 0, n = this._dynamicOverlays.length; t < n; t++) {
- if (this._dynamicOverlays[t].shouldRender()) return !0
- }
- return !1
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this);
- for (var t = 0, n = this._dynamicOverlays.length; t < n; t++) {
- this._dynamicOverlays[t].dispose()
- }
- this._dynamicOverlays = []
- }, t.prototype.getDomNode = function () {
- return this.domNode
- }, t.prototype.createVisibleLine = function () {
- return new l(this._context.configuration, this._dynamicOverlays)
- }, t.prototype.addDynamicOverlay = function (e) {
- this._dynamicOverlays.push(e)
- }, t.prototype.onConfigurationChanged = function (e) {
- this._visibleLines.onConfigurationChanged(e);
- for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = t; i <= n; i++) {
- this._visibleLines.getVisibleLine(i).onConfigurationChanged(e)
- }
- return !0
- }, t.prototype.onFlushed = function (e) {
- return this._visibleLines.onFlushed(e)
- }, t.prototype.onFocusChanged = function (e) {
- return this._isFocused = e.isFocused, !0
- }, t.prototype.onLinesChanged = function (e) {
- return this._visibleLines.onLinesChanged(e)
- }, t.prototype.onLinesDeleted = function (e) {
- return this._visibleLines.onLinesDeleted(e)
- }, t.prototype.onLinesInserted = function (e) {
- return this._visibleLines.onLinesInserted(e)
- }, t.prototype.onScrollChanged = function (e) {
- return this._visibleLines.onScrollChanged(e) || !0
- }, t.prototype.onTokensChanged = function (e) {
- return this._visibleLines.onTokensChanged(e)
- }, t.prototype.onZonesChanged = function (e) {
- return this._visibleLines.onZonesChanged(e)
- }, t.prototype.prepareRender = function (e) {
- for (var t = this._dynamicOverlays.filter((function (e) {
- return e.shouldRender()
- })), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- o.prepareRender(e), o.onDidRender()
- }
- }, t.prototype.render = function (e) {
- this._viewOverlaysRender(e), this.domNode.toggleClassName("focused", this._isFocused)
- }, t.prototype._viewOverlaysRender = function (e) {
- this._visibleLines.renderLines(e.viewportData)
- }, t
- }(s.ViewPart);
- t.ViewOverlays = a;
- var l = function () {
- function e(e, t) {
- this._configuration = e, this._lineHeight = this._configuration.options.get(49), this._dynamicOverlays = t, this._domNode = null, this._renderedContent = null
- }
- return e.prototype.getDomNode = function () {
- return this._domNode ? this._domNode.domNode : null
- }, e.prototype.setDomNode = function (e) {
- this._domNode = n.createFastDomNode(e)
- }, e.prototype.onContentChanged = function () {
- }, e.prototype.onTokensChanged = function () {
- }, e.prototype.onConfigurationChanged = function (e) {
- this._lineHeight = this._configuration.options.get(49)
- }, e.prototype.renderLine = function (e, t, n, i) {
- for (var o = "", r = 0, s = this._dynamicOverlays.length; r < s; r++) {
- o += this._dynamicOverlays[r].render(n.startLineNumber, e)
- }
- return this._renderedContent !== o && (this._renderedContent = o, i.appendASCIIString('<div style="position:absolute;top:'), i.appendASCIIString(String(t)), i.appendASCIIString("px;width:100%;height:"), i.appendASCIIString(String(this._lineHeight)), i.appendASCIIString('px;">'), i.appendASCIIString(o), i.appendASCIIString("</div>"), !0)
- }, e.prototype.layoutLine = function (e, t) {
- this._domNode && (this._domNode.setTop(t), this._domNode.setHeight(this._lineHeight))
- }, e
- }();
- t.ViewOverlayLine = l;
- var u = function (e) {
- function t(t) {
- var n = e.call(this, t) || this, i = n._context.configuration.options.get(107);
- return n._contentWidth = i.contentWidth, n.domNode.setHeight(0), n
- }
- return r(t, e), t.prototype.onConfigurationChanged = function (t) {
- var n = this._context.configuration.options.get(107);
- return this._contentWidth = n.contentWidth, e.prototype.onConfigurationChanged.call(this, t) || !0
- }, t.prototype.onScrollChanged = function (t) {
- return e.prototype.onScrollChanged.call(this, t) || t.scrollWidthChanged
- }, t.prototype._viewOverlaysRender = function (t) {
- e.prototype._viewOverlaysRender.call(this, t), this.domNode.setWidth(Math.max(t.scrollWidth, this._contentWidth))
- }, t
- }(a);
- t.ContentViewOverlays = u;
- var d = function (e) {
- function t(t) {
- var n = e.call(this, t) || this, o = n._context.configuration.options, r = o.get(107);
- return n._contentLeft = r.contentLeft, n.domNode.setClassName("margin-view-overlays"), n.domNode.setWidth(1), i.Configuration.applyFontInfo(n.domNode, o.get(34)), n
- }
- return r(t, e), t.prototype.onConfigurationChanged = function (t) {
- var n = this._context.configuration.options;
- i.Configuration.applyFontInfo(this.domNode, n.get(34));
- var o = n.get(107);
- return this._contentLeft = o.contentLeft, e.prototype.onConfigurationChanged.call(this, t) || !0
- }, t.prototype.onScrollChanged = function (t) {
- return e.prototype.onScrollChanged.call(this, t) || t.scrollHeightChanged
- }, t.prototype._viewOverlaysRender = function (t) {
- e.prototype._viewOverlaysRender.call(this, t);
- var n = Math.min(t.scrollHeight, 1e6);
- this.domNode.setHeight(n), this.domNode.setWidth(this._contentLeft)
- }, t
- }(a);
- t.MarginViewOverlays = d
- })),
- define(n[514], i([0, 1, 6, 28, 5, 60, 33, 13, 3]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function (e, t, n, i, o, r) {
- this.top = e, this.left = t, this.width = n, this.height = i, this.textContent = o, this.textContentClassName = r
- }, d = function () {
- function e(e) {
- this._context = e;
- var t = this._context.configuration.options, n = t.get(34);
- this._cursorStyle = t.get(18), this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = n.typicalHalfwidthCharacterWidth, this._lineCursorWidth = Math.min(t.get(21), this._typicalHalfwidthCharacterWidth), this._isVisible = !0, this._domNode = i.createFastDomNode(document.createElement("div")), this._domNode.setClassName("cursor"), this._domNode.setHeight(this._lineHeight), this._domNode.setTop(0), this._domNode.setLeft(0), r.Configuration.applyFontInfo(this._domNode, n), this._domNode.setDisplay("none"), this._position = new a.Position(1, 1), this._lastRenderedContent = "", this._renderData = null
- }
- return e.prototype.getDomNode = function () {
- return this._domNode
- },
- e.prototype.getPosition = function () {
- return this._position
- }, e.prototype.show = function () {
- this._isVisible || (this._domNode.setVisibility("inherit"), this._isVisible = !0)
- }, e.prototype.hide = function () {
- this._isVisible && (this._domNode.setVisibility("hidden"), this._isVisible = !1)
- }, e.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(34);
- return this._cursorStyle = t.get(18), this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = n.typicalHalfwidthCharacterWidth, this._lineCursorWidth = Math.min(t.get(21), this._typicalHalfwidthCharacterWidth), r.Configuration.applyFontInfo(this._domNode, n), !0
- }, e.prototype.onCursorPositionChanged = function (e) {
- return this._position = e, !0
- }, e.prototype._prepareRender = function (e) {
- var t = "";
- if (this._cursorStyle === s.TextEditorCursorStyle.Line || this._cursorStyle === s.TextEditorCursorStyle.LineThin) {
- var i, r = e.visibleRangeForPosition(this._position);
- if (!r || r.outsideRenderedLine) return null;
- if (this._cursorStyle === s.TextEditorCursorStyle.Line) {
- if ((i = n.computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2)) > 2) {
- var a = this._context.model.getLineContent(this._position.lineNumber),
- d = o.nextCharLength(a, this._position.column - 1);
- t = a.substr(this._position.column - 1, d)
- }
- } else i = n.computeScreenAwareSize(1);
- var c = r.left;
- i >= 2 && c >= 1 && (c -= 1);
- var h = e.getVerticalOffsetForLineNumber(this._position.lineNumber) - e.bigNumbersDelta;
- return new u(h, c, i, this._lineHeight, t, "")
- }
- var p = this._context.model.getLineContent(this._position.lineNumber),
- g = o.nextCharLength(p, this._position.column - 1),
- f = e.linesVisibleRangesForRange(new l.Range(this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + g), !1);
- if (!f || 0 === f.length) return null;
- var m = f[0];
- if (m.outsideRenderedLine || 0 === m.ranges.length) return null;
- var v = m.ranges[0], _ = v.width < 1 ? this._typicalHalfwidthCharacterWidth : v.width, y = "";
- if (this._cursorStyle === s.TextEditorCursorStyle.Block) {
- var C = this._context.model.getViewLineData(this._position.lineNumber)
- ;t = p.substr(this._position.column - 1, g);
- var b = C.tokens.findTokenIndexAtOffset(this._position.column - 1);
- y = C.tokens.getClassName(b)
- }
- var S = e.getVerticalOffsetForLineNumber(this._position.lineNumber) - e.bigNumbersDelta,
- w = this._lineHeight;
- return this._cursorStyle !== s.TextEditorCursorStyle.Underline && this._cursorStyle !== s.TextEditorCursorStyle.UnderlineThin || (S += this._lineHeight - 2, w = 2), new u(S, v.left, _, w, t, y)
- }, e.prototype.prepareRender = function (e) {
- this._renderData = this._prepareRender(e)
- }, e.prototype.render = function (e) {
- return this._renderData ? (this._lastRenderedContent !== this._renderData.textContent && (this._lastRenderedContent = this._renderData.textContent, this._domNode.domNode.textContent = this._lastRenderedContent), this._domNode.setClassName("cursor " + this._renderData.textContentClassName), this._domNode.setDisplay("block"), this._domNode.setTop(this._renderData.top), this._domNode.setLeft(this._renderData.left), this._domNode.setWidth(this._renderData.width), this._domNode.setLineHeight(this._renderData.height),
- this._domNode.setHeight(this._renderData.height), {
- domNode: this._domNode.domNode,
- position: this._position,
- contentLeft: this._renderData.left,
- height: this._renderData.height,
- width: 2
- }) : (this._domNode.setDisplay("none"), null)
- }, e
- }();
- t.ViewCursor = d
- })), define(n[515], i([0, 1, 10, 4, 2, 252, 5, 17, 118, 63, 85, 42]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = Object.prototype.hasOwnProperty, g = function (e) {
- function t(t, n) {
- void 0 === t && (t = !0), void 0 === n && (n = !1);
- var o = e.call(this) || this;
- return o._onDidChange = o._register(new i.Emitter), o.onDidChange = o._onDidChange.event, o._warnOnOverwrite = n, o._nextLanguageId2 = 1, o._languageIdToLanguage = [], o._languageToLanguageId = Object.create(null), o._languages = {}, o._mimeTypesMap = {}, o._nameMap = {}, o._lowercaseNameMap = {}, t && (o._initializeFromRegistry(), o._register(u.ModesRegistry.onDidChangeLanguages((function (e) {
- return o._initializeFromRegistry()
- })))), o
- }
- return r(t, e), t.prototype._initializeFromRegistry = function () {
- this._languages = {},
- this._mimeTypesMap = {}, this._nameMap = {}, this._lowercaseNameMap = {};
- var e = u.ModesRegistry.getLanguages();
- this._registerLanguages(e)
- }, t.prototype._registerLanguages = function (e) {
- for (var t = this, n = 0, i = e; n < i.length; n++) {
- var o = i[n];
- this._registerLanguage(o)
- }
- this._mimeTypesMap = {}, this._nameMap = {}, this._lowercaseNameMap = {}, Object.keys(this._languages).forEach((function (e) {
- var n = t._languages[e];
- n.name && (t._nameMap[n.name] = n.identifier), n.aliases.forEach((function (e) {
- t._lowercaseNameMap[e.toLowerCase()] = n.identifier
- })), n.mimetypes.forEach((function (e) {
- t._mimeTypesMap[e] = n.identifier
- }))
- })), h.Registry.as(c.Extensions.Configuration).registerOverrideIdentifiers(u.ModesRegistry.getLanguages().map((function (e) {
- return e.id
- }))), this._onDidChange.fire()
- }, t.prototype._getLanguageId = function (e) {
- if (this._languageToLanguageId[e]) return this._languageToLanguageId[e];
- var t = this._nextLanguageId2++;
- return this._languageIdToLanguage[t] = e, this._languageToLanguageId[e] = t, t
- }, t.prototype._registerLanguage = function (e) {
- var t, n = e.id
- ;
- if (p.call(this._languages, n)) t = this._languages[n]; else {
- var i = this._getLanguageId(n);
- t = {
- identifier: new l.LanguageIdentifier(n, i),
- name: null,
- mimetypes: [],
- aliases: [],
- extensions: [],
- filenames: [],
- configurationFiles: []
- }, this._languages[n] = t
- }
- this._mergeLanguage(t, e)
- }, t.prototype._mergeLanguage = function (e, t) {
- var i, o = t.id, r = null;
- if (Array.isArray(t.mimetypes) && t.mimetypes.length > 0 && ((i = e.mimetypes).push.apply(i, t.mimetypes), r = t.mimetypes[0]), r || (r = "text/x-" + o, e.mimetypes.push(r)), Array.isArray(t.extensions)) for (var l = 0, u = t.extensions; l < u.length; l++) {
- var d = u[l];
- s.registerTextMime({id: o, mime: r, extension: d}, this._warnOnOverwrite), e.extensions.push(d)
- }
- if (Array.isArray(t.filenames)) for (var c = 0, h = t.filenames; c < h.length; c++) {
- var p = h[c];
- s.registerTextMime({id: o, mime: r, filename: p}, this._warnOnOverwrite), e.filenames.push(p)
- }
- if (Array.isArray(t.filenamePatterns)) for (var g = 0, f = t.filenamePatterns; g < f.length; g++) {
- var m = f[g];
- s.registerTextMime({id: o, mime: r, filepattern: m}, this._warnOnOverwrite)
- }
- if ("string" == typeof t.firstLine && t.firstLine.length > 0) {
- var v = t.firstLine;
- "^" !== v.charAt(0) && (v = "^" + v);
- try {
- var _ = new RegExp(v);
- a.regExpLeadsToEndlessLoop(_) || s.registerTextMime({
- id: o,
- mime: r,
- firstline: _
- }, this._warnOnOverwrite)
- } catch (e) {
- n.onUnexpectedError(e)
- }
- }
- e.aliases.push(o);
- var y = null;
- if (void 0 !== t.aliases && Array.isArray(t.aliases) && (y = 0 === t.aliases.length ? [null] : t.aliases), null !== y) for (var C = 0, b = y; C < b.length; C++) {
- var S = b[C];
- S && 0 !== S.length && e.aliases.push(S)
- }
- var w = null !== y && y.length > 0;
- if (w && null === y[0]) ; else {
- var E = (w ? y[0] : null) || o;
- !w && e.name || (e.name = E)
- }
- t.configuration && e.configurationFiles.push(t.configuration)
- }, t.prototype.isRegisteredMode = function (e) {
- return !!p.call(this._mimeTypesMap, e) || p.call(this._languages, e)
- }, t.prototype.getModeIdForLanguageNameLowercase = function (e) {
- return p.call(this._lowercaseNameMap, e) ? this._lowercaseNameMap[e].language : null
- }, t.prototype.extractModeIds = function (e) {
- var t = this;
- return e ? e.split(",").map((function (e) {
- return e.trim()
- })).map((function (e) {
- return p.call(t._mimeTypesMap, e) ? t._mimeTypesMap[e].language : e
- })).filter((function (e) {
- return p.call(t._languages, e)
- })) : []
- }, t.prototype.getLanguageIdentifier = function (e) {
- if (e === d.NULL_MODE_ID || 0 === e) return d.NULL_LANGUAGE_IDENTIFIER;
- var t;
- if ("string" == typeof e) t = e; else if (!(t = this._languageIdToLanguage[e])) return null;
- return p.call(this._languages, t) ? this._languages[t].identifier : null
- }, t.prototype.getModeIdsFromFilepathOrFirstLine = function (e, t) {
- if (!e && !t) return [];
- var n = s.guessMimeTypes(e, t);
- return this.extractModeIds(n.join(","))
- }, t
- }(o.Disposable);
- t.LanguagesRegistry = g
- })), define(n[516], i([0, 1, 4, 2, 349, 63, 515, 19]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function (e) {
- function t(t, i) {
- var o = e.call(this) || this;
- return o._onDidChange = o._register(new n.Emitter), o.onDidChange = o._onDidChange.event, o._selector = i, o.languageIdentifier = o._selector(), o._register(t((function () {
- return o._evaluate()
- }))), o
- }
- return r(t, e), t.prototype._evaluate = function () {
- var e = this._selector()
- ;e.id !== this.languageIdentifier.id && (this.languageIdentifier = e, this._onDidChange.fire(this.languageIdentifier))
- }, t
- }(i.Disposable), d = function () {
- function e(e) {
- var t = this;
- void 0 === e && (e = !1), this._onDidCreateMode = new n.Emitter, this.onDidCreateMode = this._onDidCreateMode.event, this._onLanguagesMaybeChanged = new n.Emitter, this.onLanguagesMaybeChanged = this._onLanguagesMaybeChanged.event, this._instantiatedModes = {}, this._registry = new a.LanguagesRegistry(!0, e), this._registry.onDidChange((function () {
- return t._onLanguagesMaybeChanged.fire()
- }))
- }
- return e.prototype.isRegisteredMode = function (e) {
- return this._registry.isRegisteredMode(e)
- }, e.prototype.getModeIdForLanguageName = function (e) {
- return this._registry.getModeIdForLanguageNameLowercase(e)
- }, e.prototype.getModeIdByFilepathOrFirstLine = function (e, t) {
- var n = this._registry.getModeIdsFromFilepathOrFirstLine(e, t);
- return l.firstOrDefault(n, null)
- }, e.prototype.getModeId = function (e) {
- var t = this._registry.extractModeIds(e);
- return l.firstOrDefault(t, null)
- },
- e.prototype.getLanguageIdentifier = function (e) {
- return this._registry.getLanguageIdentifier(e)
- }, e.prototype.create = function (e) {
- var t = this;
- return new u(this.onLanguagesMaybeChanged, (function () {
- var n = t.getModeId(e);
- return t._createModeAndGetLanguageIdentifier(n)
- }))
- }, e.prototype.createByFilepathOrFirstLine = function (e, t) {
- var n = this;
- return new u(this.onLanguagesMaybeChanged, (function () {
- var i = n.getModeIdByFilepathOrFirstLine(e, t);
- return n._createModeAndGetLanguageIdentifier(i)
- }))
- }, e.prototype._createModeAndGetLanguageIdentifier = function (e) {
- var t = this.getLanguageIdentifier(e || "plaintext") || s.NULL_LANGUAGE_IDENTIFIER;
- return this._getOrCreateMode(t.language), t
- }, e.prototype.triggerMode = function (e) {
- var t = this.getModeId(e);
- this._getOrCreateMode(t || "plaintext")
- }, e.prototype._getOrCreateMode = function (e) {
- if (!this._instantiatedModes.hasOwnProperty(e)) {
- var t = this.getLanguageIdentifier(e) || s.NULL_LANGUAGE_IDENTIFIER;
- this._instantiatedModes[e] = new o.FrankensteinMode(t), this._onDidCreateMode.fire(this._instantiatedModes[e])
- }
- return this._instantiatedModes[e]
- }, e
- }();
- t.ModeServiceImpl = d
- })), define(n[43], i([0, 1, 42, 11, 85]), (function (e, t, n, i, o) {
- "use strict";
- function r(e, t, n, i) {
- for (var o = t.split("."), r = o.pop(), s = e, a = 0; a < o.length; a++) {
- var l = o[a], u = s[l];
- switch (typeof u) {
- case"undefined":
- u = s[l] = Object.create(null);
- break;
- case"object":
- break;
- default:
- return void i("Ignoring " + t + " as " + o.slice(0, a + 1).join(".") + " is " + JSON.stringify(u))
- }
- s = u
- }
- "object" == typeof s ? s[r] = n : i("Ignoring " + t + " as " + o.join(".") + " is " + JSON.stringify(s))
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.IConfigurationService = i.createDecorator("configurationService"), t.toValuesTree = function (e, t) {
- var n = Object.create(null);
- for (var i in e) r(n, i, e[i], t);
- return n
- }, t.addToValueTree = r, t.removeFromValueTree = function (e, t) {
- !function e(t, n) {
- var i = n.shift();
- if (0 === n.length) return void delete t[i];
- if (-1 !== Object.keys(t).indexOf(i)) {
- var o = t[i];
- "object" != typeof o || Array.isArray(o) || (e(o, n), 0 === Object.keys(o).length && delete t[i])
- }
- }(e, t.split("."))
- }, t.getConfigurationValue = function (e, t, n) {
- var i = function (e, t) {
- for (var n = e, i = 0, o = t; i < o.length; i++) {
- var r = o[i];
- if ("object" != typeof n || null === n) return;
- n = n[r]
- }
- return n
- }(e, t.split("."));
- return void 0 === i ? n : i
- }, t.getConfigurationKeys = function () {
- var e = n.Registry.as(o.Extensions.Configuration).getConfigurationProperties();
- return Object.keys(e)
- }, t.getDefaultValues = function () {
- var e = Object.create(null), t = n.Registry.as(o.Extensions.Configuration).getConfigurationProperties();
- for (var i in t) {
- r(e, i, t[i].default, (function (e) {
- return console.error("Conflict in default settings: " + e)
- }))
- }
- return e
- }, t.overrideIdentifierFromKey = function (e) {
- return e.substring(1, e.length - 1)
- }, t.getMigratedSettingValue = function (e, t, n) {
- var i = e.inspect(t), o = e.inspect(n);
- return void 0 !== i.userValue || void 0 !== i.workspaceValue || void 0 !== i.workspaceFolderValue ? i.value : void 0 !== o.userValue || void 0 !== o.workspaceValue || void 0 !== o.workspaceFolderValue ? o.value : i.defaultValue
- }
- })), define(n[517], i([0, 1, 2, 64, 4, 18, 43]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var l = function (e) {
- function t(t, n) {
- var r = e.call(this) || this;
- r._contextKeyService = t, r._configurationService = n, r._accessibilitySupport = 0, r._onDidChangeScreenReaderOptimized = new o.Emitter, r._accessibilityModeEnabledContext = i.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(r._contextKeyService);
- var s = function () {
- return r._accessibilityModeEnabledContext.set(r.isScreenReaderOptimized())
- };
- return r._register(r._configurationService.onDidChangeConfiguration((function (e) {
- e.affectsConfiguration("editor.accessibilitySupport") && (s(), r._onDidChangeScreenReaderOptimized.fire())
- }))), s(), r.onDidChangeScreenReaderOptimized((function () {
- return s()
- })), r
- }
- return r(t, e), Object.defineProperty(t.prototype, "onDidChangeScreenReaderOptimized", {
- get: function () {
- return this._onDidChangeScreenReaderOptimized.event
- }, enumerable: !0, configurable: !0
- }), t.prototype.isScreenReaderOptimized = function () {
- var e = this._configurationService.getValue("editor.accessibilitySupport");
- return "on" === e || "auto" === e && 2 === this._accessibilitySupport
- },
- t.prototype.getAccessibilitySupport = function () {
- return this._accessibilitySupport
- }, t = h([g(0, s.IContextKeyService), g(1, a.IConfigurationService)], t)
- }(n.Disposable);
- t.AccessibilityService = l
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[518], i([0, 1, 38, 19, 21, 31, 85, 43]), (function (e, t, n, i, o, s, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function () {
- function e(e, t, n) {
- void 0 === e && (e = {}), void 0 === t && (t = []), void 0 === n && (n = []), this._contents = e, this._keys = t, this._overrides = n, this.isFrozen = !1
- }
- return Object.defineProperty(e.prototype, "contents", {
- get: function () {
- return this.checkAndFreeze(this._contents)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "overrides", {
- get: function () {
- return this.checkAndFreeze(this._overrides)
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "keys", {
- get: function () {
- return this.checkAndFreeze(this._keys)
- }, enumerable: !0, configurable: !0
- }), e.prototype.isEmpty = function () {
- return 0 === this._keys.length && 0 === Object.keys(this._contents).length && 0 === this._overrides.length
- }, e.prototype.getValue = function (e) {
- return e ? u.getConfigurationValue(this.contents, e) : this.contents
- }, e.prototype.getOverrideValue = function (e, t) {
- var n = this.getContentsForOverrideIdentifer(t);
- return n ? e ? u.getConfigurationValue(n, e) : n : void 0
- }, e.prototype.override = function (t) {
- var n = this.getContentsForOverrideIdentifer(t);
- if (!n || "object" != typeof n || !Object.keys(n).length) return this;
- for (var o = {}, r = 0, l = i.distinct(a(Object.keys(this.contents), Object.keys(n))); r < l.length; r++) {
- var u = l[r], d = this.contents[u], c = n[u];
- c && ("object" == typeof d && "object" == typeof c ? (d = s.deepClone(d), this.mergeContents(d, c)) : d = c), o[u] = d
- }
- return new e(o, this.keys, this.overrides)
- }, e.prototype.merge = function () {
- for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]
- ;
- for (var o = s.deepClone(this.contents), r = s.deepClone(this.overrides), l = a(this.keys), u = 0, d = t; u < d.length; u++) {
- var c = d[u];
- this.mergeContents(o, c.contents);
- for (var h = function (e) {
- var t = r.filter((function (t) {
- return i.equals(t.identifiers, e.identifiers)
- }))[0];
- t ? p.mergeContents(t.contents, e.contents) : r.push(s.deepClone(e))
- }, p = this, g = 0, f = c.overrides; g < f.length; g++) {
- var m = f[g];
- h(m)
- }
- for (var v = 0, _ = c.keys; v < _.length; v++) {
- var y = _[v];
- -1 === l.indexOf(y) && l.push(y)
- }
- }
- return new e(o, l, r)
- }, e.prototype.freeze = function () {
- return this.isFrozen = !0, this
- }, e.prototype.mergeContents = function (e, t) {
- for (var n = 0, i = Object.keys(t); n < i.length; n++) {
- var r = i[n];
- r in e && o.isObject(e[r]) && o.isObject(t[r]) ? this.mergeContents(e[r], t[r]) : e[r] = s.deepClone(t[r])
- }
- }, e.prototype.checkAndFreeze = function (e) {
- return this.isFrozen && !Object.isFrozen(e) ? s.deepFreeze(e) : e
- }, e.prototype.getContentsForOverrideIdentifer = function (e) {
- for (var t = 0, n = this.overrides; t < n.length; t++) {
- var i = n[t];
- if (-1 !== i.identifiers.indexOf(e)) return i.contents
- }
- return null
- },
- e.prototype.toJSON = function () {
- return {contents: this.contents, overrides: this.overrides, keys: this.keys}
- }, e.prototype.setValue = function (e, t) {
- this.addKey(e), u.addToValueTree(this.contents, e, t, (function (e) {
- throw new Error(e)
- }))
- }, e.prototype.removeValue = function (e) {
- this.removeKey(e) && u.removeFromValueTree(this.contents, e)
- }, e.prototype.addKey = function (e) {
- for (var t = this.keys.length, n = 0; n < t; n++) 0 === e.indexOf(this.keys[n]) && (t = n);
- this.keys.splice(t, 1, e)
- }, e.prototype.removeKey = function (e) {
- var t = this.keys.indexOf(e);
- return -1 !== t && (this.keys.splice(t, 1), !0)
- }, e
- }();
- t.ConfigurationModel = d;
- var c = function (e) {
- function t() {
- for (var t = u.getDefaultValues(), n = u.getConfigurationKeys(), i = [], o = 0, r = Object.keys(t); o < r.length; o++) {
- var s = r[o];
- l.OVERRIDE_PROPERTY_PATTERN.test(s) && i.push({
- identifiers: [u.overrideIdentifierFromKey(s).trim()],
- keys: Object.keys(t[s]),
- contents: u.toValuesTree(t[s], (function (e) {
- return console.error("Conflict in default settings file: " + e)
- }))
- })
- }
- return e.call(this, t, n, i) || this
- }
- return r(t, e), t
- }(d)
- ;t.DefaultConfigurationModel = c;
- var h = function () {
- function e(e, t, i, o, r, s, a, l) {
- void 0 === i && (i = new d), void 0 === o && (o = new d), void 0 === r && (r = new n.ResourceMap), void 0 === s && (s = new d), void 0 === a && (a = new n.ResourceMap), void 0 === l && (l = !0), this._defaultConfiguration = e, this._localUserConfiguration = t, this._remoteUserConfiguration = i, this._workspaceConfiguration = o, this._folderConfigurations = r, this._memoryConfiguration = s, this._memoryConfigurationByResource = a, this._freeze = l, this._workspaceConsolidatedConfiguration = null, this._foldersConsolidatedConfigurations = new n.ResourceMap, this._userConfiguration = null
- }
- return e.prototype.getValue = function (e, t, n) {
- return this.getConsolidateConfigurationModel(t, n).getValue(e)
- }, e.prototype.updateValue = function (e, t, n) {
- var i;
- void 0 === n && (n = {}), n.resource ? (i = this._memoryConfigurationByResource.get(n.resource)) || (i = new d, this._memoryConfigurationByResource.set(n.resource, i)) : i = this._memoryConfiguration, void 0 === t ? i.removeValue(e) : i.setValue(e, t),
- n.resource || (this._workspaceConsolidatedConfiguration = null)
- }, e.prototype.inspect = function (e, t, n) {
- var o = this.getConsolidateConfigurationModel(t, n),
- r = this.getFolderConfigurationModelForResource(t.resource, n),
- s = t.resource && this._memoryConfigurationByResource.get(t.resource) || this._memoryConfiguration,
- a = t.overrideIdentifier ? this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this._defaultConfiguration.freeze().getValue(e),
- l = t.overrideIdentifier ? this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this.userConfiguration.freeze().getValue(e),
- u = t.overrideIdentifier ? this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this.localUserConfiguration.freeze().getValue(e),
- d = t.overrideIdentifier ? this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this.remoteUserConfiguration.freeze().getValue(e),
- c = n ? t.overrideIdentifier ? this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this._workspaceConfiguration.freeze().getValue(e) : void 0,
- h = r ? t.overrideIdentifier ? r.freeze().override(t.overrideIdentifier).getValue(e) : r.freeze().getValue(e) : void 0,
- p = t.overrideIdentifier ? s.override(t.overrideIdentifier).getValue(e) : s.getValue(e),
- g = o.getValue(e), f = i.distinct(i.flatten(o.overrides.map((function (e) {
- return e.identifiers
- })))).filter((function (t) {
- return void 0 !== o.getOverrideValue(e, t)
- }));
- return {
- defaultValue: a,
- userValue: l,
- userLocalValue: u,
- userRemoteValue: d,
- workspaceValue: c,
- workspaceFolderValue: h,
- memoryValue: p,
- value: g,
- default: void 0 !== a ? {
- value: this._defaultConfiguration.freeze().getValue(e),
- override: t.overrideIdentifier ? this._defaultConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- user: void 0 !== l ? {
- value: this.userConfiguration.freeze().getValue(e),
- override: t.overrideIdentifier ? this.userConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- userLocal: void 0 !== u ? {
- value: this.localUserConfiguration.freeze().getValue(e),
- override: t.overrideIdentifier ? this.localUserConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- userRemote: void 0 !== d ? {
- value: this.remoteUserConfiguration.freeze().getValue(e),
- override: t.overrideIdentifier ? this.remoteUserConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- workspace: void 0 !== c ? {
- value: this._workspaceConfiguration.freeze().getValue(e),
- override: t.overrideIdentifier ? this._workspaceConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- workspaceFolder: void 0 !== h ? {
- value: null == r ? void 0 : r.freeze().getValue(e),
- override: t.overrideIdentifier ? null == r ? void 0 : r.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- memory: void 0 !== p ? {
- value: s.getValue(e),
- override: t.overrideIdentifier ? s.getOverrideValue(e, t.overrideIdentifier) : void 0
- } : void 0,
- overrideIdentifiers: f.length ? f : void 0
- }
- }, Object.defineProperty(e.prototype, "userConfiguration", {
- get: function () {
- return this._userConfiguration || (this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration), this._freeze && this._userConfiguration.freeze()), this._userConfiguration
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "localUserConfiguration", {
- get: function () {
- return this._localUserConfiguration
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "remoteUserConfiguration", {
- get: function () {
- return this._remoteUserConfiguration
- }, enumerable: !0, configurable: !0
- }), e.prototype.getConsolidateConfigurationModel = function (e, t) {
- var n = this.getConsolidatedConfigurationModelForResource(e, t);
- return e.overrideIdentifier ? n.override(e.overrideIdentifier) : n
- }, e.prototype.getConsolidatedConfigurationModelForResource = function (e, t) {
- var n = e.resource, i = this.getWorkspaceConsolidatedConfiguration();
- if (t && n) {
- var o = t.getFolder(n);
- o && (i = this.getFolderConsolidatedConfiguration(o.uri) || i);
- var r = this._memoryConfigurationByResource.get(n);
- r && (i = i.merge(r))
- }
- return i
- }, e.prototype.getWorkspaceConsolidatedConfiguration = function () {
- return this._workspaceConsolidatedConfiguration || (this._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration),
- this._freeze && (this._workspaceConfiguration = this._workspaceConfiguration.freeze())), this._workspaceConsolidatedConfiguration
- }, e.prototype.getFolderConsolidatedConfiguration = function (e) {
- var t = this._foldersConsolidatedConfigurations.get(e);
- if (!t) {
- var n = this.getWorkspaceConsolidatedConfiguration(), i = this._folderConfigurations.get(e);
- i ? (t = n.merge(i), this._freeze && (t = t.freeze()), this._foldersConsolidatedConfigurations.set(e, t)) : t = n
- }
- return t
- }, e.prototype.getFolderConfigurationModelForResource = function (e, t) {
- if (t && e) {
- var n = t.getFolder(e);
- if (n) return this._folderConfigurations.get(n.uri)
- }
- }, e
- }();
- t.Configuration = h
- })), define(n[519], i([0, 1, 4, 2, 38, 29, 43, 18, 217]), (function (e, t, n, i, o, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = "data-keybinding-context", c = function () {
- function e(e, t) {
- this._id = e, this._parent = t, this._value = Object.create(null), this._value._contextId = e
- }
- return e.prototype.setValue = function (e, t) {
- return this._value[e] !== t && (this._value[e] = t, !0)
- }, e.prototype.removeValue = function (e) {
- return e in this._value && (delete this._value[e], !0)
- }, e.prototype.getValue = function (e) {
- var t = this._value[e];
- return void 0 === t && this._parent ? this._parent.getValue(e) : t
- }, e
- }();
- t.Context = c;
- var p = function (e) {
- function t() {
- return e.call(this, -1, null) || this
- }
- return r(t, e), t.prototype.setValue = function (e, t) {
- return !1
- }, t.prototype.removeValue = function (e) {
- return !1
- }, t.prototype.getValue = function (e) {
- }, t.INSTANCE = new t, t
- }(c), f = function (e) {
- function t(t, n, i) {
- var r = e.call(this, t, null) || this;
- return r._configurationService = n, r._values = new Map, r._listener = r._configurationService.onDidChangeConfiguration((function (e) {
- if (6 === e.source) {
- var t = o.keys(r._values);
- r._values.clear(), i.fire(new _(t))
- } else {
- for (var n = [], s = 0, a = e.affectedKeys; s < a.length; s++) {
- var l = "config." + a[s];
- r._values.has(l) && (r._values.delete(l), n.push(l))
- }
- i.fire(new _(n))
- }
- })), r
- }
- return r(t, e), t.prototype.dispose = function () {
- this._listener.dispose()
- }, t.prototype.getValue = function (n) {
- if (0 !== n.indexOf(t._keyPrefix)) return e.prototype.getValue.call(this, n)
- ;
- if (this._values.has(n)) return this._values.get(n);
- var i = n.substr(t._keyPrefix.length), o = this._configurationService.getValue(i), r = void 0;
- switch (typeof o) {
- case"number":
- case"boolean":
- case"string":
- r = o
- }
- return this._values.set(n, r), r
- }, t.prototype.setValue = function (t, n) {
- return e.prototype.setValue.call(this, t, n)
- }, t.prototype.removeValue = function (t) {
- return e.prototype.removeValue.call(this, t)
- }, t._keyPrefix = "config.", t
- }(c), m = function () {
- function e(e, t, n) {
- this._service = e, this._key = t, this._defaultValue = n, this.reset()
- }
- return e.prototype.set = function (e) {
- this._service.setContext(this._key, e)
- }, e.prototype.reset = function () {
- void 0 === this._defaultValue ? this._service.removeContext(this._key) : this._service.setContext(this._key, this._defaultValue)
- }, e.prototype.get = function () {
- return this._service.getContextKeyValue(this._key)
- }, e
- }(), v = function () {
- function e(e) {
- this.key = e
- }
- return e.prototype.affectsSome = function (e) {
- return e.has(this.key)
- }, e
- }(), _ = function () {
- function e(e) {
- this.keys = e
- }
- return e.prototype.affectsSome = function (e) {
- for (var t = 0, n = this.keys; t < n.length; t++) {
- var i = n[t];
- if (e.has(i)) return !0
- }
- return !1
- }, e
- }(), y = function () {
- function e(e) {
- this.events = e
- }
- return e.prototype.affectsSome = function (e) {
- for (var t = 0, n = this.events; t < n.length; t++) {
- if (n[t].affectsSome(e)) return !0
- }
- return !1
- }, e
- }(), C = function () {
- function e(e) {
- this._onDidChangeContext = new n.PauseableEmitter({
- merge: function (e) {
- return new y(e)
- }
- }), this._isDisposed = !1, this._myContextId = e
- }
- return e.prototype.createKey = function (e, t) {
- if (this._isDisposed) throw new Error("AbstractContextKeyService has been disposed");
- return new m(this, e, t)
- }, Object.defineProperty(e.prototype, "onDidChangeContext", {
- get: function () {
- return this._onDidChangeContext.event
- }, enumerable: !0, configurable: !0
- }), e.prototype.bufferChangeEvents = function (e) {
- this._onDidChangeContext.pause();
- try {
- e()
- } finally {
- this._onDidChangeContext.resume()
- }
- }, e.prototype.createScoped = function (e) {
- if (this._isDisposed) throw new Error("AbstractContextKeyService has been disposed");
- return new S(this, e)
- }, e.prototype.contextMatchesRules = function (e) {
- if (this._isDisposed) throw new Error("AbstractContextKeyService has been disposed");
- var t = this.getContextValuesContainer(this._myContextId);
- return u.KeybindingResolver.contextMatchesRules(t, e)
- }, e.prototype.getContextKeyValue = function (e) {
- if (!this._isDisposed) return this.getContextValuesContainer(this._myContextId).getValue(e)
- }, e.prototype.setContext = function (e, t) {
- if (!this._isDisposed) {
- var n = this.getContextValuesContainer(this._myContextId);
- n && n.setValue(e, t) && this._onDidChangeContext.fire(new v(e))
- }
- }, e.prototype.removeContext = function (e) {
- this._isDisposed || this.getContextValuesContainer(this._myContextId).removeValue(e) && this._onDidChangeContext.fire(new v(e))
- }, e.prototype.getContext = function (e) {
- return this._isDisposed ? p.INSTANCE : this.getContextValuesContainer(function (e) {
- for (; e;) {
- if (e.hasAttribute(d)) {
- var t = e.getAttribute(d);
- return t ? parseInt(t, 10) : NaN
- }
- e = e.parentElement
- }
- return 0
- }(e))
- }, e
- }();
- t.AbstractContextKeyService = C;
- var b = function (e) {
- function t(t) {
- var n = e.call(this, 0) || this;
- n._contexts = new Map,
- n._toDispose = new i.DisposableStore, n._lastContextId = 0;
- var o = new f(n._myContextId, t, n._onDidChangeContext);
- return n._contexts.set(n._myContextId, o), n._toDispose.add(o), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._isDisposed = !0, this._toDispose.dispose()
- }, t.prototype.getContextValuesContainer = function (e) {
- return this._isDisposed ? p.INSTANCE : this._contexts.get(e) || p.INSTANCE
- }, t.prototype.createChildContext = function (e) {
- if (void 0 === e && (e = this._myContextId), this._isDisposed) throw new Error("ContextKeyService has been disposed");
- var t = ++this._lastContextId;
- return this._contexts.set(t, new c(t, this.getContextValuesContainer(e))), t
- }, t.prototype.disposeContext = function (e) {
- this._isDisposed || this._contexts.delete(e)
- }, t = h([g(0, a.IConfigurationService)], t)
- }(C);
- t.ContextKeyService = b;
- var S = function (e) {
- function t(t, n) {
- var i = e.call(this, t.createChildContext()) || this;
- return i._parent = t, n && (i._domNode = n, i._domNode.setAttribute(d, String(i._myContextId))), i
- }
- return r(t, e), t.prototype.dispose = function () {
- this._isDisposed = !0,
- this._parent.disposeContext(this._myContextId), this._domNode && (this._domNode.removeAttribute(d), this._domNode = void 0)
- }, Object.defineProperty(t.prototype, "onDidChangeContext", {
- get: function () {
- return n.Event.any(this._parent.onDidChangeContext, this._onDidChangeContext.event)
- }, enumerable: !0, configurable: !0
- }), t.prototype.getContextValuesContainer = function (e) {
- return this._isDisposed ? p.INSTANCE : this._parent.getContextValuesContainer(e)
- }, t.prototype.createChildContext = function (e) {
- if (void 0 === e && (e = this._myContextId), this._isDisposed) throw new Error("ScopedContextKeyService has been disposed");
- return this._parent.createChildContext(e)
- }, t.prototype.disposeContext = function (e) {
- this._isDisposed || this._parent.disposeContext(e)
- }, t
- }(C);
- s.CommandsRegistry.registerCommand(l.SET_CONTEXT_COMMAND_ID, (function (e, t, n) {
- e.get(l.IContextKeyService).createKey(String(t), n)
- }))
- })), define(n[86], i([0, 1, 36, 16, 29, 42]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e() {
- this._coreKeybindings = [], this._extensionKeybindings = [], this._cachedMergedKeybindings = null
- }
- return e.bindToCurrentPlatform = function (e) {
- if (1 === i.OS) {
- if (e && e.win) return e.win
- } else if (2 === i.OS) {
- if (e && e.mac) return e.mac
- } else if (e && e.linux) return e.linux;
- return e
- }, e.prototype.registerKeybindingRule = function (t) {
- var o = e.bindToCurrentPlatform(t);
- o && o.primary && ((a = n.createKeybinding(o.primary, i.OS)) && this._registerDefaultKeybinding(a, t.id, t.args, t.weight, 0, t.when));
- if (o && Array.isArray(o.secondary)) for (var r = 0, s = o.secondary.length; r < s; r++) {
- var a, l = o.secondary[r];
- (a = n.createKeybinding(l, i.OS)) && this._registerDefaultKeybinding(a, t.id, t.args, t.weight, -r - 1, t.when)
- }
- }, e.prototype.registerCommandAndKeybindingRule = function (e) {
- this.registerKeybindingRule(e), o.CommandsRegistry.registerCommand(e)
- }, e._mightProduceChar = function (e) {
- return e >= 21 && e <= 30 || (e >= 31 && e <= 56 || (80 === e || 81 === e || 82 === e || 83 === e || 84 === e || 85 === e || 86 === e || 110 === e || 111 === e || 87 === e || 88 === e || 89 === e || 90 === e || 91 === e || 92 === e))
- }, e.prototype._assertNoCtrlAlt = function (t, n) {
- t.ctrlKey && t.altKey && !t.metaKey && e._mightProduceChar(t.keyCode) && console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ", t, " for ", n)
- }, e.prototype._registerDefaultKeybinding = function (e, t, n, o, r, s) {
- 1 === i.OS && this._assertNoCtrlAlt(e.parts[0], t), this._coreKeybindings.push({
- keybinding: e,
- command: t,
- commandArgs: n,
- when: s,
- weight1: o,
- weight2: r
- }), this._cachedMergedKeybindings = null
- }, e.prototype.getDefaultKeybindings = function () {
- return this._cachedMergedKeybindings || (this._cachedMergedKeybindings = [].concat(this._coreKeybindings).concat(this._extensionKeybindings), this._cachedMergedKeybindings.sort(a)), this._cachedMergedKeybindings.slice(0)
- }, e
- }();
- function a(e, t) {
- return e.weight1 !== t.weight1 ? e.weight1 - t.weight1 : e.command < t.command ? -1 : e.command > t.command ? 1 : e.weight2 - t.weight2
- }
- t.KeybindingsRegistry = new s, t.Extensions = {EditorModes: "platform.keybindingsRegistry"}, r.Registry.add(t.Extensions.EditorModes, t.KeybindingsRegistry)
- })), define(n[520], i([0, 1, 18, 400, 86, 401]), (function (e, t, n, i, o, s) {
- "use strict";
- function a(e, t) {
- return e.getContext(document.activeElement).getValue(t)
- }
- function l(e, i) {
- var o = function (e, t) {
- return e.createScoped(t.target)
- }(e, i);
- return function (e, t, i) {
- new n.RawContextKey(i, t).bindTo(e)
- }(o, i, t.HistoryNavigationWidgetContext), {
- scopedContextKeyService: o,
- historyNavigationEnablement: new n.RawContextKey(t.HistoryNavigationEnablementContext, !0).bindTo(o)
- }
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.HistoryNavigationWidgetContext = "historyNavigationWidget", t.HistoryNavigationEnablementContext = "historyNavigationEnabled", t.createAndBindHistoryNavigationWidgetScopedContextKeyService = l;
- var u = function (e) {
- function t(t, n, i, o, r) {
- void 0 === r && (r = !1);
- var s = e.call(this, t, n, r, i) || this;
- return s._register(l(o, {
- target: s.inputBox.element,
- historyNavigator: s.inputBox
- }).scopedContextKeyService), s
- }
- return r(t, e), t = h([g(3, n.IContextKeyService)], t)
- }(i.FindInput);
- t.ContextScopedFindInput = u;
- var d = function (e) {
- function t(t, n, i, o, r) {
- void 0 === r && (r = !1);
- var s = e.call(this, t, n, r, i) || this;
- return s._register(l(o, {
- target: s.inputBox.element, historyNavigator: s.inputBox
- }).scopedContextKeyService), s
- }
- return r(t, e), t = h([g(3, n.IContextKeyService)], t)
- }(s.ReplaceInput);
- t.ContextScopedReplaceInput = d, o.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "history.showPrevious",
- weight: 200,
- when: n.ContextKeyExpr.and(n.ContextKeyExpr.has(t.HistoryNavigationWidgetContext), n.ContextKeyExpr.equals(t.HistoryNavigationEnablementContext, !0)),
- primary: 16,
- secondary: [528],
- handler: function (e, i) {
- var o = a(e.get(n.IContextKeyService), t.HistoryNavigationWidgetContext);
- o && o.historyNavigator.showPreviousValue()
- }
- }), o.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "history.showNext",
- weight: 200,
- when: n.ContextKeyExpr.and(n.ContextKeyExpr.has(t.HistoryNavigationWidgetContext), n.ContextKeyExpr.equals(t.HistoryNavigationEnablementContext, !0)),
- primary: 18,
- secondary: [530],
- handler: function (e, i) {
- var o = a(e.get(n.IContextKeyService), t.HistoryNavigationWidgetContext);
- o && o.historyNavigator.showNextValue()
- }
- })
- })),
- define(n[74], i([0, 1, 11, 4, 2, 21]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IStorageService = n.createDecorator("storageService"), function (e) {
- e[e.NONE = 0] = "NONE", e[e.SHUTDOWN = 1] = "SHUTDOWN"
- }(t.WillSaveStateReason || (t.WillSaveStateReason = {}));
- var a = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t._onDidChangeStorage = t._register(new i.Emitter), t.onDidChangeStorage = t._onDidChangeStorage.event, t._onWillSaveState = t._register(new i.Emitter), t.onWillSaveState = t._onWillSaveState.event, t.globalCache = new Map, t.workspaceCache = new Map, t
- }
- return r(t, e), t.prototype.getCache = function (e) {
- return 0 === e ? this.globalCache : this.workspaceCache
- }, t.prototype.get = function (e, t, n) {
- var i = this.getCache(t).get(e);
- return s.isUndefinedOrNull(i) ? n : i
- }, t.prototype.getBoolean = function (e, t, n) {
- var i = this.getCache(t).get(e);
- return s.isUndefinedOrNull(i) ? n : "true" === i
- }, t.prototype.store = function (e, t, n) {
- if (s.isUndefinedOrNull(t)) return this.remove(e, n);
- var i = String(t)
- ;
- return this.getCache(n).get(e) === i ? Promise.resolve() : (this.getCache(n).set(e, i), this._onDidChangeStorage.fire({
- scope: n,
- key: e
- }), Promise.resolve())
- }, t.prototype.remove = function (e, t) {
- return this.getCache(t).delete(e) ? (this._onDidChangeStorage.fire({
- scope: t,
- key: e
- }), Promise.resolve()) : Promise.resolve()
- }, t
- }(o.Disposable);
- t.InMemoryStorageService = a
- })), define(n[521], i([0, 1, 38, 74, 17, 2, 15, 11, 43, 83]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function () {
- function e() {
- }
- return e.prototype.select = function (e, t, n) {
- if (0 === n.length) return 0;
- for (var i = n[0].score[0], o = 1; o < n.length; o++) {
- var r = n[o], s = r.score, a = r.completion;
- if (s[0] !== i) break;
- if (a.preselect) return o
- }
- return 0
- }, e
- }();
- t.Memory = c;
- var p = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.memorize = function (e, t, n) {
- }, t.prototype.toJSON = function () {
- }, t.prototype.fromJSON = function () {
- }, t
- }(c);
- t.NoMemory = p;
- var f = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t._cache = new n.LRUCache(300, .66), t._seq = 0, t
- }
- return r(t, e), t.prototype.memorize = function (e, t, n) {
- var i = n.completion.label, o = e.getLanguageIdentifier().language + "/" + i;
- this._cache.set(o, {touch: this._seq++, type: n.completion.kind, insertText: n.completion.insertText})
- }, t.prototype.select = function (t, n, i) {
- if (0 === i.length) return 0;
- var o = t.getLineContent(n.lineNumber).substr(n.column - 10, n.column - 1);
- if (/\s$/.test(o)) return e.prototype.select.call(this, t, n, i);
- for (var r = i[0].score[0], s = -1, a = -1, l = -1, u = 0; u < i.length && i[u].score[0] === r; u++) {
- var d = t.getLanguageIdentifier().language + "/" + i[u].completion.label, c = this._cache.peek(d);
- if (c && c.touch > l && c.type === i[u].completion.kind && c.insertText === i[u].completion.insertText && (l = c.touch, a = u), i[u].completion.preselect && -1 === s) return u
- }
- return -1 !== a ? a : -1 !== s ? s : 0
- }, t.prototype.toJSON = function () {
- var e = [];
- return this._cache.forEach((function (t, n) {
- e.push([n, t])
- })), e
- }, t.prototype.fromJSON = function (e) {
- this._cache.clear()
- ;
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t], r = i[0], s = i[1];
- s.touch = 0, s.type = "number" == typeof s.type ? s.type : o.completionKindFromString(s.type), this._cache.set(r, s)
- }
- this._seq = this._cache.size
- }, t
- }(c);
- t.LRUMemory = f;
- var m = function (e) {
- function t() {
- var t = null !== e && e.apply(this, arguments) || this;
- return t._trie = n.TernarySearchTree.forStrings(), t._seq = 0, t
- }
- return r(t, e), t.prototype.memorize = function (e, t, n) {
- var i = e.getWordUntilPosition(t).word, o = e.getLanguageIdentifier().language + "/" + i;
- this._trie.set(o, {type: n.completion.kind, insertText: n.completion.insertText, touch: this._seq++})
- }, t.prototype.select = function (t, n, i) {
- var o = t.getWordUntilPosition(n).word;
- if (!o) return e.prototype.select.call(this, t, n, i);
- var r = t.getLanguageIdentifier().language + "/" + o, s = this._trie.get(r);
- if (s || (s = this._trie.findSubstr(r)), s) for (var a = 0; a < i.length; a++) {
- var l = i[a].completion, u = l.kind, d = l.insertText;
- if (u === s.type && d === s.insertText) return a
- }
- return e.prototype.select.call(this, t, n, i)
- }, t.prototype.toJSON = function () {
- var e = []
- ;
- return this._trie.forEach((function (t, n) {
- return e.push([n, t])
- })), e.sort((function (e, t) {
- return -(e[1].touch - t[1].touch)
- })).forEach((function (e, t) {
- return e[1].touch = t
- })), e.slice(0, 200)
- }, t.prototype.fromJSON = function (e) {
- if (this._trie.clear(), e.length > 0) {
- this._seq = e[0][1].touch + 1;
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t], r = i[0], s = i[1];
- s.type = "number" == typeof s.type ? s.type : o.completionKindFromString(s.type), this._trie.set(r, s)
- }
- }
- }, t
- }(c);
- t.PrefixMemory = m;
- var v = function (e) {
- function t(t, n) {
- var o = e.call(this) || this;
- o._storageService = t, o._configService = n, o._storagePrefix = "suggest/memories";
- var r = function () {
- var e = o._configService.getValue("editor.suggestSelection"),
- t = o._configService.getValue("editor.suggest.shareSuggestSelections");
- o._update(e, t, !1)
- };
- return o._persistSoon = o._register(new a.RunOnceScheduler((function () {
- return o._saveState()
- }), 500)), o._register(t.onWillSaveState((function (e) {
- e.reason === i.WillSaveStateReason.SHUTDOWN && o._saveState()
- }))), o._register(o._configService.onDidChangeConfiguration((function (e) {
- (e.affectsConfiguration("editor.suggestSelection") || e.affectsConfiguration("editor.suggest.shareSuggestSelections")) && r()
- }))), o._register(o._storageService.onDidChangeStorage((function (e) {
- 0 === e.scope && 0 === e.key.indexOf(o._storagePrefix) && (document.hasFocus() || o._update(o._mode, o._shareMem, !0))
- }))), r(), o
- }
- return r(t, e), t.prototype._update = function (e, t, n) {
- if (n || this._mode !== e || this._shareMem !== t) {
- this._shareMem = t, this._mode = e, this._strategy = "recentlyUsedByPrefix" === e ? new m : "recentlyUsed" === e ? new f : new p;
- try {
- var i = t ? 0 : 1, o = this._storageService.get(this._storagePrefix + "/" + this._mode, i);
- o && this._strategy.fromJSON(JSON.parse(o))
- } catch (e) {
- }
- }
- }, t.prototype.memorize = function (e, t, n) {
- this._strategy.memorize(e, t, n), this._persistSoon.schedule()
- }, t.prototype.select = function (e, t, n) {
- return this._strategy.select(e, t, n)
- }, t.prototype._saveState = function () {
- var e = JSON.stringify(this._strategy), t = this._shareMem ? 0 : 1;
- this._storageService.store(this._storagePrefix + "/" + this._mode, e, t)
- },
- t = h([g(0, i.IStorageService), g(1, u.IConfigurationService)], t)
- }(s.Disposable);
- t.SuggestMemoryService = v, t.ISuggestMemoryService = l.createDecorator("ISuggestMemories"), d.registerSingleton(t.ISuggestMemoryService, v, !0)
- })), define(n[96], i([0, 1, 11]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ITelemetryService = n.createDecorator("telemetryService")
- })), define(n[12], i([0, 1, 10, 25, 32, 13, 49, 84, 65, 29, 18, 86, 42, 96, 21]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var m = function () {
- function e(e) {
- this.id = e.id, this.precondition = e.precondition, this._kbOpts = e.kbOpts, this._menuOpts = e.menuOpts, this._description = e.description
- }
- return e.prototype.register = function () {
- var e = this;
- if (Array.isArray(this._menuOpts) ? this._menuOpts.forEach(this._registerMenuItem, this) : this._menuOpts && this._registerMenuItem(this._menuOpts), this._kbOpts) {
- var t = this._kbOpts.kbExpr;
- this.precondition && (t = t ? c.ContextKeyExpr.and(t, this.precondition) : this.precondition),
- h.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: this.id,
- handler: function (t, n) {
- return e.runCommand(t, n)
- },
- weight: this._kbOpts.weight,
- when: t,
- primary: this._kbOpts.primary,
- secondary: this._kbOpts.secondary,
- win: this._kbOpts.win,
- linux: this._kbOpts.linux,
- mac: this._kbOpts.mac,
- description: this._description
- })
- } else d.CommandsRegistry.registerCommand({
- id: this.id, handler: function (t, n) {
- return e.runCommand(t, n)
- }, description: this._description
- })
- }, e.prototype._registerMenuItem = function (e) {
- u.MenuRegistry.appendMenuItem(e.menuId, {
- group: e.group,
- command: {id: this.id, title: e.title},
- when: e.when,
- order: e.order
- })
- }, e
- }();
- t.Command = m;
- var v = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.bindToContribution = function (e) {
- return function (t) {
- function n(e) {
- var n = t.call(this, e) || this;
- return n._callback = e.handler, n
- }
- return r(n, t), n.prototype.runEditorCommand = function (t, n, i) {
- e(n) && this._callback(e(n), i)
- }, n
- }(t)
- }, t.prototype.runCommand = function (e, t) {
- var n = this, i = e.get(o.ICodeEditorService), r = i.getFocusedCodeEditor() || i.getActiveCodeEditor();
- if (r) return r.invokeWithinContext((function (e) {
- if (e.get(c.IContextKeyService).contextMatchesRules(f.withNullAsUndefined(n.precondition))) return n.runEditorCommand(e, r, t)
- }))
- }, t
- }(m);
- t.EditorCommand = v;
- var _ = function (e) {
- function t(n) {
- var i = e.call(this, t.convertOptions(n)) || this;
- return i.label = n.label, i.alias = n.alias, i
- }
- return r(t, e), t.convertOptions = function (e) {
- var t;
- function n(t) {
- return t.menuId || (t.menuId = 7), t.title || (t.title = e.label), t.when = c.ContextKeyExpr.and(e.precondition, t.when), t
- }
- return t = Array.isArray(e.menuOpts) ? e.menuOpts : e.menuOpts ? [e.menuOpts] : [], Array.isArray(e.contextMenuOpts) ? t.push.apply(t, e.contextMenuOpts.map(n)) : e.contextMenuOpts && t.push(n(e.contextMenuOpts)), e.menuOpts = t, e
- }, t.prototype.runEditorCommand = function (e, t, n) {
- return this.reportTelemetry(e, t), this.run(e, t, n || {})
- }, t.prototype.reportTelemetry = function (e, t) {
- e.get(g.ITelemetryService).publicLog2("editorActionInvoked", {name: this.label, id: this.id})
- }, t
- }(v);
- function y(e, t) {
- d.CommandsRegistry.registerCommand(e, (function (e, n) {
- return t(e, n || {})
- }))
- }
- t.EditorAction = _, t.registerLanguageCommand = y, t.registerDefaultLanguageCommand = function (e, t) {
- y(e, (function (e, o) {
- var r = o.resource, u = o.position;
- if (!(r instanceof i.URI)) throw n.illegalArgument("resource");
- if (!s.Position.isIPosition(u)) throw n.illegalArgument("position");
- var d = e.get(a.IModelService).getModel(r);
- if (d) {
- var c = s.Position.lift(u);
- return t(d, c, o)
- }
- return e.get(l.ITextModelService).createModelReference(r).then((function (e) {
- return new Promise((function (n, i) {
- try {
- n(t(e.object.textEditorModel, s.Position.lift(u), o))
- } catch (e) {
- i(e)
- }
- })).finally((function () {
- e.dispose()
- }))
- }))
- }))
- }, t.registerModelAndPositionCommand = function (e, t) {
- d.CommandsRegistry.registerCommand(e, (function (e) {
- for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
- var r = n[0], u = n[1];
- f.assertType(i.URI.isUri(r)), f.assertType(s.Position.isIPosition(u));
- var d = e.get(a.IModelService).getModel(r);
- if (d) {
- var c = s.Position.lift(u);
- return t(d, c, n.slice(2))
- }
- return e.get(l.ITextModelService).createModelReference(r).then((function (e) {
- return new Promise((function (i, o) {
- try {
- i(t(e.object.textEditorModel, s.Position.lift(u), n.slice(2)))
- } catch (e) {
- o(e)
- }
- })).finally((function () {
- e.dispose()
- }))
- }))
- }))
- }, t.registerModelCommand = function (e, t) {
- d.CommandsRegistry.registerCommand(e, (function (e) {
- for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
- var r = n[0];
- f.assertType(i.URI.isUri(r));
- var s = e.get(a.IModelService).getModel(r);
- return s ? t(s, n.slice(1)) : e.get(l.ITextModelService).createModelReference(r).then((function (e) {
- return new Promise((function (i, o) {
- try {
- i(t(e.object.textEditorModel, n.slice(1)))
- } catch (e) {
- o(e)
- }
- })).finally((function () {
- e.dispose()
- }))
- }))
- }))
- }, t.registerEditorCommand = function (e) {
- return C.INSTANCE.registerEditorCommand(e), e
- }, t.registerEditorAction = function (e) {
- C.INSTANCE.registerEditorAction(new e)
- }, t.registerInstantiatedEditorAction = function (e) {
- C.INSTANCE.registerEditorAction(e)
- }, t.registerEditorContribution = function (e, t) {
- C.INSTANCE.registerEditorContribution(e, t)
- },
- function (e) {
- e.getEditorCommand = function (e) {
- return C.INSTANCE.getEditorCommand(e)
- }, e.getEditorActions = function () {
- return C.INSTANCE.getEditorActions()
- }, e.getEditorContributions = function () {
- return C.INSTANCE.getEditorContributions()
- }, e.getSomeEditorContributions = function (e) {
- return C.INSTANCE.getEditorContributions().filter((function (t) {
- return e.indexOf(t.id) >= 0
- }))
- }, e.getDiffEditorContributions = function () {
- return C.INSTANCE.getDiffEditorContributions()
- }
- }(t.EditorExtensionsRegistry || (t.EditorExtensionsRegistry = {}));
- var C = function () {
- function e() {
- this.editorContributions = [], this.diffEditorContributions = [], this.editorActions = [], this.editorCommands = Object.create(null)
- }
- return e.prototype.registerEditorContribution = function (e, t) {
- this.editorContributions.push({id: e, ctor: t})
- }, e.prototype.getEditorContributions = function () {
- return this.editorContributions.slice(0)
- }, e.prototype.getDiffEditorContributions = function () {
- return this.diffEditorContributions.slice(0)
- }, e.prototype.registerEditorAction = function (e) {
- e.register(),
- this.editorActions.push(e)
- }, e.prototype.getEditorActions = function () {
- return this.editorActions.slice(0)
- }, e.prototype.registerEditorCommand = function (e) {
- e.register(), this.editorCommands[e.id] = e
- }, e.prototype.getEditorCommand = function (e) {
- return this.editorCommands[e] || null
- }, e.INSTANCE = new e, e
- }();
- p.Registry.add("editor.contributions", C.INSTANCE)
- })), define(n[164], i([0, 1, 415, 21, 12, 32, 483, 40, 212, 213, 159, 13, 3, 68, 23, 18]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var v, _, y, C = 0, b = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
- var i = t._getCursors();
- i && this.runCoreEditorCommand(i, n || {})
- }, t
- }(o.EditorCommand);
- function S(e) {
- e.register()
- }
- t.CoreEditorCommand = b, function (e) {
- e.description = {
- description: "Scroll editor in the given direction", args: [{
- name: "Editor scroll argument object",
- description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",
- constraint: function (e) {
- if (!i.isObject(e)) return !1;
- var t = e;
- return !!i.isString(t.to) && (!(!i.isUndefined(t.by) && !i.isString(t.by)) && (!(!i.isUndefined(t.value) && !i.isNumber(t.value)) && !(!i.isUndefined(t.revealCursor) && !i.isBoolean(t.revealCursor))))
- },
- schema: {
- type: "object",
- required: ["to"],
- properties: {
- to: {type: "string", enum: ["up", "down"]},
- by: {type: "string", enum: ["line", "wrappedLine", "page", "halfPage"]},
- value: {type: "number", default: 1},
- revealCursor: {type: "boolean"}
- }
- }
- }]
- }, e.RawDirection = {Up: "up", Down: "down"}, e.RawUnit = {
- Line: "line", WrappedLine: "wrappedLine", Page: "page", HalfPage: "halfPage"
- }, e.parse = function (t) {
- var n, i;
- switch (t.to) {
- case e.RawDirection.Up:
- n = 1;
- break;
- case e.RawDirection.Down:
- n = 2;
- break;
- default:
- return null
- }
- switch (t.by) {
- case e.RawUnit.Line:
- i = 1;
- break;
- case e.RawUnit.WrappedLine:
- i = 2;
- break;
- case e.RawUnit.Page:
- i = 3;
- break;
- case e.RawUnit.HalfPage:
- i = 4;
- break;
- default:
- i = 2
- }
- return {
- direction: n,
- unit: i,
- value: Math.floor(t.value || 1),
- revealCursor: !!t.revealCursor,
- select: !!t.select
- }
- }
- }(v = t.EditorScroll_ || (t.EditorScroll_ = {})), function (e) {
- e.description = {
- description: "Reveal the given line at the given logical position", args: [{
- name: "Reveal line argument object",
- description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",
- constraint: function (e) {
- if (!i.isObject(e)) return !1;
- var t = e
- ;
- return !!i.isNumber(t.lineNumber) && !(!i.isUndefined(t.at) && !i.isString(t.at))
- },
- schema: {
- type: "object",
- required: ["lineNumber"],
- properties: {
- lineNumber: {type: "number"},
- at: {type: "string", enum: ["top", "center", "bottom"]}
- }
- }
- }]
- }, e.RawAtArgument = {Top: "top", Center: "center", Bottom: "bottom"}
- }(_ = t.RevealLine_ || (t.RevealLine_ = {})), function (e) {
- var t = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.moveTo(e.context, e.getPrimaryCursor(), this._inSelectionMode, t.position, t.viewPosition)]), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b);
- e.MoveTo = o.registerEditorCommand(new t({
- id: "_moveTo",
- inSelectionMode: !1,
- precondition: void 0
- })), e.MoveToSelect = o.registerEditorCommand(new t({
- id: "_moveToSelect",
- inSelectionMode: !0,
- precondition: void 0
- }));
- var n = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e),
- t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement();
- var n = this._getColumnSelectResult(e.context, e.getPrimaryCursor(), e.getColumnSelectData(), t);
- e.setStates(t.source, 3, n.viewStates.map((function (e) {
- return l.CursorState.fromViewState(e)
- }))), e.setColumnSelectData({
- isReal: !0,
- fromViewLineNumber: n.fromLineNumber,
- fromViewVisualColumn: n.fromVisualColumn,
- toViewLineNumber: n.toLineNumber,
- toViewVisualColumn: n.toVisualColumn
- }), e.reveal(t.source, !0, n.reversed ? 1 : 2, 0)
- }, t
- }(b);
- e.ColumnSelect = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "columnSelect", precondition: void 0}) || this
- }
- return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
- var o = e.model.validatePosition(i.position),
- r = e.validateViewPosition(new h.Position(i.viewPosition.lineNumber, i.viewPosition.column), o),
- s = i.doColumnSelect ? n.fromViewLineNumber : r.lineNumber,
- l = i.doColumnSelect ? n.fromViewVisualColumn : i.mouseColumn - 1
- ;
- return a.ColumnSelection.columnSelect(e.config, e.viewModel, s, l, r.lineNumber, i.mouseColumn - 1)
- }, t
- }(n))), e.CursorColumnSelectLeft = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "cursorColumnSelectLeft",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 3599,
- linux: {primary: 0}
- }
- }) || this
- }
- return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
- return a.ColumnSelection.columnSelectLeft(e.config, e.viewModel, n)
- }, t
- }(n))), e.CursorColumnSelectRight = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "cursorColumnSelectRight",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 3601,
- linux: {primary: 0}
- }
- }) || this
- }
- return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
- return a.ColumnSelection.columnSelectRight(e.config, e.viewModel, n)
- }, t
- }(n)));
- var i = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._isPaged = t.isPaged, n
- }
- return r(t, e),
- t.prototype._getColumnSelectResult = function (e, t, n, i) {
- return a.ColumnSelection.columnSelectUp(e.config, e.viewModel, n, this._isPaged)
- }, t
- }(n);
- e.CursorColumnSelectUp = o.registerEditorCommand(new i({
- isPaged: !1,
- id: "cursorColumnSelectUp",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3600, linux: {primary: 0}}
- })), e.CursorColumnSelectPageUp = o.registerEditorCommand(new i({
- isPaged: !0,
- id: "cursorColumnSelectPageUp",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3595, linux: {primary: 0}}
- }));
- var s = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._isPaged = t.isPaged, n
- }
- return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
- return a.ColumnSelection.columnSelectDown(e.config, e.viewModel, n, this._isPaged)
- }, t
- }(n);
- e.CursorColumnSelectDown = o.registerEditorCommand(new s({
- isPaged: !1,
- id: "cursorColumnSelectDown",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3602, linux: {primary: 0}}
- })),
- e.CursorColumnSelectPageDown = o.registerEditorCommand(new s({
- isPaged: !0,
- id: "cursorColumnSelectPageDown",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3596, linux: {primary: 0}}
- }));
- var u = function (e) {
- function t() {
- return e.call(this, {
- id: "cursorMove",
- precondition: void 0,
- description: d.CursorMove.description
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n = d.CursorMove.parse(t);
- n && this._runCursorMove(e, t.source, n)
- }, t.prototype._runCursorMove = function (e, t, n) {
- e.context.model.pushStackElement(), e.setStates(t, 3, d.CursorMoveCommands.move(e.context, e.getAll(), n)), e.reveal(t, !0, 0, 0)
- }, t
- }(b);
- e.CursorMoveImpl = u, e.CursorMove = o.registerEditorCommand(new u);
- var c = function (t) {
- function n(e) {
- var n = t.call(this, e) || this;
- return n._staticArgs = e.args, n
- }
- return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
- var i = this._staticArgs;
- -1 === this._staticArgs.value && (i = {
- direction: this._staticArgs.direction,
- unit: this._staticArgs.unit,
- select: this._staticArgs.select,
- value: t.context.config.pageSize
- }), e.CursorMove._runCursorMove(t, n.source, i)
- }, n
- }(b);
- e.CursorLeft = o.registerEditorCommand(new c({
- args: {direction: 0, unit: 0, select: !1, value: 1},
- id: "cursorLeft",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 15,
- mac: {primary: 15, secondary: [288]}
- }
- })), e.CursorLeftSelect = o.registerEditorCommand(new c({
- args: {
- direction: 0,
- unit: 0,
- select: !0,
- value: 1
- },
- id: "cursorLeftSelect",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1039}
- })), e.CursorRight = o.registerEditorCommand(new c({
- args: {direction: 1, unit: 0, select: !1, value: 1},
- id: "cursorRight",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 17,
- mac: {primary: 17, secondary: [292]}
- }
- })), e.CursorRightSelect = o.registerEditorCommand(new c({
- args: {
- direction: 1,
- unit: 0,
- select: !0,
- value: 1
- },
- id: "cursorRightSelect",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1041}
- })), e.CursorUp = o.registerEditorCommand(new c({
- args: {
- direction: 2, unit: 2, select: !1, value: 1
- },
- id: "cursorUp",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 16,
- mac: {primary: 16, secondary: [302]}
- }
- })), e.CursorUpSelect = o.registerEditorCommand(new c({
- args: {direction: 2, unit: 2, select: !0, value: 1},
- id: "cursorUpSelect",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 1040,
- secondary: [3088],
- mac: {primary: 1040},
- linux: {primary: 1040}
- }
- })), e.CursorPageUp = o.registerEditorCommand(new c({
- args: {direction: 2, unit: 2, select: !1, value: -1},
- id: "cursorPageUp",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 11}
- })), e.CursorPageUpSelect = o.registerEditorCommand(new c({
- args: {
- direction: 2,
- unit: 2,
- select: !0,
- value: -1
- },
- id: "cursorPageUpSelect",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1035}
- })), e.CursorDown = o.registerEditorCommand(new c({
- args: {direction: 3, unit: 2, select: !1, value: 1}, id: "cursorDown", precondition: void 0, kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus, primary: 18, mac: {primary: 18, secondary: [300]}
- }
- })), e.CursorDownSelect = o.registerEditorCommand(new c({
- args: {
- direction: 3,
- unit: 2,
- select: !0,
- value: 1
- },
- id: "cursorDownSelect",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 1042,
- secondary: [3090],
- mac: {primary: 1042},
- linux: {primary: 1042}
- }
- })), e.CursorPageDown = o.registerEditorCommand(new c({
- args: {direction: 3, unit: 2, select: !1, value: -1},
- id: "cursorPageDown",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 12}
- })), e.CursorPageDownSelect = o.registerEditorCommand(new c({
- args: {
- direction: 3,
- unit: 2,
- select: !0,
- value: -1
- },
- id: "cursorPageDownSelect",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1036}
- })), e.CreateCursor = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "createCursor", precondition: void 0}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n, i = e.context
- ;n = t.wholeLine ? d.CursorMoveCommands.line(i, e.getPrimaryCursor(), !1, t.position, t.viewPosition) : d.CursorMoveCommands.moveTo(i, e.getPrimaryCursor(), !1, t.position, t.viewPosition);
- var o = e.getAll();
- if (o.length > 1) for (var r = n.modelState ? n.modelState.position : null, s = n.viewState ? n.viewState.position : null, a = 0, l = o.length; a < l; a++) {
- var u = o[a];
- if ((!r || u.modelState.selection.containsPosition(r)) && (!s || u.viewState.selection.containsPosition(s))) return o.splice(a, 1), e.context.model.pushStackElement(), void e.setStates(t.source, 3, o)
- }
- o.push(n), e.context.model.pushStackElement(), e.setStates(t.source, 3, o)
- }, t
- }(b))), e.LastCursorMoveToSelect = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "_lastCursorMoveToSelect", precondition: void 0}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n = e.context, i = e.getLastAddedCursorIndex(), o = e.getAll(), r = o.slice(0);
- r[i] = d.CursorMoveCommands.moveTo(n, o[i], !0, t.position, t.viewPosition), e.context.model.pushStackElement(), e.setStates(t.source, 3, r)
- }, t
- }(b)));
- var g = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.moveToBeginningOfLine(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b);
- e.CursorHome = o.registerEditorCommand(new g({
- inSelectionMode: !1,
- id: "cursorHome",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 14,
- mac: {primary: 14, secondary: [2063]}
- }
- })), e.CursorHomeSelect = o.registerEditorCommand(new g({
- inSelectionMode: !0,
- id: "cursorHomeSelect",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 1038,
- mac: {primary: 1038, secondary: [3087]}
- }
- })), e.CursorLineStart = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "cursorLineStart",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 287}}
- }) || this
- }
- return r(t, e),
- t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, this._exec(e.context, e.getAll())), e.reveal(t.source, !0, 0, 0)
- }, t.prototype._exec = function (e, t) {
- for (var n = [], i = 0, o = t.length; i < o; i++) {
- var r = t[i], s = r.modelState.position.lineNumber;
- n[i] = l.CursorState.fromModelState(r.modelState.move(!1, s, 1, 0))
- }
- return n
- }, t
- }(b)));
- var m = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.moveToEndOfLine(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b);
- e.CursorEnd = o.registerEditorCommand(new m({
- inSelectionMode: !1,
- id: "cursorEnd",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 13,
- mac: {primary: 13, secondary: [2065]}
- }
- })), e.CursorEndSelect = o.registerEditorCommand(new m({
- inSelectionMode: !0, id: "cursorEndSelect", precondition: void 0, kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 1037,
- mac: {primary: 1037, secondary: [3089]}
- }
- })), e.CursorLineEnd = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "cursorLineEnd",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 291}}
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, this._exec(e.context, e.getAll())), e.reveal(t.source, !0, 0, 0)
- }, t.prototype._exec = function (e, t) {
- for (var n = [], i = 0, o = t.length; i < o; i++) {
- var r = t[i], s = r.modelState.position.lineNumber, a = e.model.getLineMaxColumn(s);
- n[i] = l.CursorState.fromModelState(r.modelState.move(!1, s, a, 0))
- }
- return n
- }, t
- }(b)));
- var y = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(),
- e.setStates(t.source, 3, d.CursorMoveCommands.moveToBeginningOfBuffer(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b);
- e.CursorTop = o.registerEditorCommand(new y({
- inSelectionMode: !1,
- id: "cursorTop",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2062, mac: {primary: 2064}}
- })), e.CursorTopSelect = o.registerEditorCommand(new y({
- inSelectionMode: !0,
- id: "cursorTopSelect",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3086, mac: {primary: 3088}}
- }));
- var S = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.moveToEndOfBuffer(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b);
- e.CursorBottom = o.registerEditorCommand(new S({
- inSelectionMode: !1, id: "cursorBottom", precondition: void 0, kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus, primary: 2061, mac: {primary: 2066}
- }
- })), e.CursorBottomSelect = o.registerEditorCommand(new S({
- inSelectionMode: !0,
- id: "cursorBottomSelect",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3085, mac: {primary: 3090}}
- }));
- var w = function (e) {
- function t() {
- return e.call(this, {id: "editorScroll", precondition: void 0, description: v.description}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n = v.parse(t);
- n && this._runEditorScroll(e, t.source, n)
- }, t.prototype._runEditorScroll = function (e, t, n) {
- var i = this._computeDesiredScrollTop(e.context, n);
- if (n.revealCursor) {
- var o = e.context.getCompletelyVisibleViewRangeAtScrollTop(i);
- e.setStates(t, 3, [d.CursorMoveCommands.findPositionInViewportIfOutside(e.context, e.getPrimaryCursor(), o, n.select)])
- }
- e.scrollTo(i)
- }, t.prototype._computeDesiredScrollTop = function (e, t) {
- if (1 === t.unit) {
- var n = e.getCompletelyVisibleModelRange(), i = void 0
- ;i = 1 === t.direction ? Math.max(1, n.startLineNumber - t.value) : Math.min(e.model.getLineCount(), n.startLineNumber + t.value);
- var o = e.convertModelPositionToViewPosition(new h.Position(i, 1));
- return e.getVerticalOffsetForViewLine(o.lineNumber)
- }
- var r;
- r = 3 === t.unit ? e.config.pageSize * t.value : 4 === t.unit ? Math.round(e.config.pageSize / 2) * t.value : t.value;
- var s = (1 === t.direction ? -1 : 1) * r;
- return e.getCurrentScrollTop() + s * e.config.lineHeight
- }, t
- }(b);
- e.EditorScrollImpl = w, e.EditorScroll = o.registerEditorCommand(new w), e.ScrollLineUp = o.registerEditorCommand(new (function (t) {
- function n() {
- return t.call(this, {
- id: "scrollLineUp",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 2064,
- mac: {primary: 267}
- }
- }) || this
- }
- return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
- e.EditorScroll._runEditorScroll(t, n.source, {
- direction: 1,
- unit: 2,
- value: 1,
- revealCursor: !1,
- select: !1
- })
- }, n
- }(b))), e.ScrollPageUp = o.registerEditorCommand(new (function (t) {
- function n() {
- return t.call(this, {
- id: "scrollPageUp", precondition: void 0, kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 2059,
- win: {primary: 523},
- linux: {primary: 523}
- }
- }) || this
- }
- return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
- e.EditorScroll._runEditorScroll(t, n.source, {
- direction: 1,
- unit: 3,
- value: 1,
- revealCursor: !1,
- select: !1
- })
- }, n
- }(b))), e.ScrollLineDown = o.registerEditorCommand(new (function (t) {
- function n() {
- return t.call(this, {
- id: "scrollLineDown",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 2066,
- mac: {primary: 268}
- }
- }) || this
- }
- return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
- e.EditorScroll._runEditorScroll(t, n.source, {
- direction: 2,
- unit: 2,
- value: 1,
- revealCursor: !1,
- select: !1
- })
- }, n
- }(b))), e.ScrollPageDown = o.registerEditorCommand(new (function (t) {
- function n() {
- return t.call(this, {
- id: "scrollPageDown",
- precondition: void 0,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 2060,
- win: {primary: 524},
- linux: {primary: 524}
- }
- }) || this
- }
- return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
- e.EditorScroll._runEditorScroll(t, n.source, {
- direction: 2,
- unit: 3,
- value: 1,
- revealCursor: !1,
- select: !1
- })
- }, n
- }(b)));
- var E = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.word(e.context, e.getPrimaryCursor(), this._inSelectionMode, t.position)]), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b);
- e.WordSelect = o.registerEditorCommand(new E({
- inSelectionMode: !1,
- id: "_wordSelect",
- precondition: void 0
- })), e.WordSelectDrag = o.registerEditorCommand(new E({
- inSelectionMode: !0,
- id: "_wordSelectDrag",
- precondition: void 0
- })), e.LastCursorWordSelect = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "lastCursorWordSelect", precondition: void 0}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n = e.context, i = e.getLastAddedCursorIndex(), o = e.getAll(), r = o.slice(0), s = o[i]
- ;r[i] = d.CursorMoveCommands.word(n, s, s.modelState.hasSelection(), t.position), n.model.pushStackElement(), e.setStates(t.source, 3, r)
- }, t
- }(b)));
- var L = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.line(e.context, e.getPrimaryCursor(), this._inSelectionMode, t.position, t.viewPosition)]), e.reveal(t.source, !1, 0, 0)
- }, t
- }(b);
- e.LineSelect = o.registerEditorCommand(new L({
- inSelectionMode: !1,
- id: "_lineSelect",
- precondition: void 0
- })), e.LineSelectDrag = o.registerEditorCommand(new L({
- inSelectionMode: !0,
- id: "_lineSelectDrag",
- precondition: void 0
- }));
- var D = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n = e.getLastAddedCursorIndex(), i = e.getAll(), o = i.slice(0)
- ;o[n] = d.CursorMoveCommands.line(e.context, i[n], this._inSelectionMode, t.position, t.viewPosition), e.context.model.pushStackElement(), e.setStates(t.source, 3, o)
- }, t
- }(b);
- e.LastCursorLineSelect = o.registerEditorCommand(new D({
- inSelectionMode: !1,
- id: "lastCursorLineSelect",
- precondition: void 0
- })), e.LastCursorLineSelectDrag = o.registerEditorCommand(new D({
- inSelectionMode: !0,
- id: "lastCursorLineSelectDrag",
- precondition: void 0
- })), e.ExpandLineSelection = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "expandLineSelection",
- precondition: void 0,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2090}
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.expandLineSelection(e.context, e.getAll())), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b))), e.CancelSelection = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "cancelSelection", precondition: f.EditorContextKeys.hasNonEmptySelection,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 9, secondary: [1033]}
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.cancelSelection(e.context, e.getPrimaryCursor())]), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b))), e.RemoveSecondaryCursors = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "removeSecondaryCursors",
- precondition: f.EditorContextKeys.hasMultipleSelections,
- kbOpts: {
- weight: C + 1,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 9,
- secondary: [1033]
- }
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [e.getPrimaryCursor()]), e.reveal(t.source, !0, 0, 0)
- }, t
- }(b))), e.RevealLine = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "revealLine", precondition: void 0, description: _.description}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- var n = t, i = (n.lineNumber || 0) + 1
- ;i < 1 && (i = 1);
- var o = e.context.model.getLineCount();
- i > o && (i = o);
- var r = new p.Range(i, 1, i, e.context.model.getLineMaxColumn(i)), s = 0;
- if (n.at) switch (n.at) {
- case _.RawAtArgument.Top:
- s = 3;
- break;
- case _.RawAtArgument.Center:
- s = 1;
- break;
- case _.RawAtArgument.Bottom:
- s = 4
- }
- var a = e.context.convertModelRangeToViewRange(r);
- e.revealRange(t.source, !1, a, s, 0)
- }, t
- }(b))), e.SelectAll = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "selectAll", precondition: void 0}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.selectAll(e.context, e.getPrimaryCursor())])
- }, t
- }(b))), e.SetSelection = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {id: "setSelection", precondition: void 0}) || this
- }
- return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
- e.context.model.pushStackElement(), e.setStates(t.source, 3, [l.CursorState.fromModelSelection(t.selection)])
- }, t
- }(b)))
- }(y = t.CoreNavigationCommands || (t.CoreNavigationCommands = {})), function (e) {
- var t = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
- var i = t._getCursors();
- i && this.runCoreEditingCommand(t, i, n || {})
- }, t
- }(o.EditorCommand);
- e.CoreEditingCommand = t, e.LineBreakInsert = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "lineBreakInsert",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 301}}
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
- e.pushUndoStop(), e.executeCommands(this.id, c.TypeOperations.lineBreakInsert(t.context.config, t.context.model, t.getAll().map((function (e) {
- return e.modelState.selection
- }))))
- }, t
- }(t))), e.Outdent = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "outdent", precondition: f.EditorContextKeys.writable, kbOpts: {
- weight: C,
- kbExpr: m.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.tabDoesNotMoveFocus),
- primary: 1026
- }
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
- e.pushUndoStop(), e.executeCommands(this.id, c.TypeOperations.outdent(t.context.config, t.context.model, t.getAll().map((function (e) {
- return e.modelState.selection
- })))), e.pushUndoStop()
- }, t
- }(t))), e.Tab = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "tab",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {
- weight: C,
- kbExpr: m.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.tabDoesNotMoveFocus),
- primary: 2
- }
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
- e.pushUndoStop(), e.executeCommands(this.id, c.TypeOperations.tab(t.context.config, t.context.model, t.getAll().map((function (e) {
- return e.modelState.selection
- })))), e.pushUndoStop()
- }, t
- }(t))), e.DeleteLeft = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "deleteLeft",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 1,
- secondary: [1025],
- mac: {primary: 1, secondary: [1025, 294, 257]}
- }
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
- var i = u.DeleteOperations.deleteLeft(t.getPrevEditOperationType(), t.context.config, t.context.model, t.getAll().map((function (e) {
- return e.modelState.selection
- }))), o = i[0], r = i[1];
- o && e.pushUndoStop(), e.executeCommands(this.id, r), t.setPrevEditOperationType(2)
- }, t
- }(t))), e.DeleteRight = o.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "deleteRight",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 20,
- mac: {primary: 20, secondary: [290, 276]}
- }
- }) || this
- }
- return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
- var i = u.DeleteOperations.deleteRight(t.getPrevEditOperationType(), t.context.config, t.context.model, t.getAll().map((function (e) {
- return e.modelState.selection
- }))), o = i[0], r = i[1]
- ;o && e.pushUndoStop(), e.executeCommands(this.id, r), t.setPrevEditOperationType(3)
- }, t
- }(t)))
- }(t.CoreEditingCommands || (t.CoreEditingCommands = {}));
- var w = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._editorHandler = t.editorHandler, n._inputHandler = t.inputHandler, n
- }
- return r(t, e), t.prototype.runCommand = function (e, t) {
- var n = e.get(s.ICodeEditorService).getFocusedCodeEditor();
- if (n && n.hasTextFocus()) return this._runEditorHandler(e, n, t);
- var i = document.activeElement;
- if (!(i && ["input", "textarea"].indexOf(i.tagName.toLowerCase()) >= 0)) {
- var o = e.get(s.ICodeEditorService).getActiveCodeEditor();
- return o ? (o.focus(), this._runEditorHandler(e, o, t)) : void 0
- }
- document.execCommand(this._inputHandler)
- }, t.prototype._runEditorHandler = function (e, t, n) {
- var i = this._editorHandler;
- "string" == typeof i ? t.trigger("keyboard", i, n) : ((n = n || {}).source = "keyboard", i.runEditorCommand(e, t, n))
- }, t
- }(o.Command), E = function (e) {
- function t(t, n, i) {
- var o = e.call(this, {id: t, precondition: void 0, description: i}) || this;
- return o._handlerId = n, o
- }
- return r(t, e),
- t.prototype.runCommand = function (e, t) {
- var n = e.get(s.ICodeEditorService).getFocusedCodeEditor();
- n && n.trigger("keyboard", this._handlerId, t)
- }, t
- }(o.Command);
- function L(e, t) {
- S(new E("default:" + e, e)), S(new E(e, e, t))
- }
- S(new w({
- editorHandler: y.SelectAll,
- inputHandler: "selectAll",
- id: "editor.action.selectAll",
- precondition: f.EditorContextKeys.textInputFocus,
- kbOpts: {weight: C, kbExpr: null, primary: 2079},
- menuOpts: {menuId: 25, group: "1_basic", title: n.localize(0, null), order: 1}
- })), S(new w({
- editorHandler: g.Handler.Undo,
- inputHandler: "undo",
- id: g.Handler.Undo,
- precondition: f.EditorContextKeys.writable,
- kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2104},
- menuOpts: {menuId: 17, group: "1_do", title: n.localize(1, null), order: 1}
- })), S(new E("default:" + g.Handler.Undo, g.Handler.Undo)), S(new w({
- editorHandler: g.Handler.Redo,
- inputHandler: "redo",
- id: g.Handler.Redo,
- precondition: f.EditorContextKeys.writable,
- kbOpts: {
- weight: C,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 2103,
- secondary: [3128],
- mac: {primary: 3128}
- },
- menuOpts: {
- menuId: 17,
- group: "1_do", title: n.localize(2, null), order: 2
- }
- })), S(new E("default:" + g.Handler.Redo, g.Handler.Redo)), L(g.Handler.Type, {
- description: "Type",
- args: [{name: "args", schema: {type: "object", required: ["text"], properties: {text: {type: "string"}}}}]
- }), L(g.Handler.ReplacePreviousChar), L(g.Handler.CompositionStart), L(g.Handler.CompositionEnd), L(g.Handler.Paste), L(g.Handler.Cut)
- })), define(n[522], i([0, 1, 12, 18, 26, 76, 11, 83]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = a.createDecorator("IEditorCancelService"), d = new i.RawContextKey("cancellableOperation", !1);
- l.registerSingleton(u, function () {
- function e() {
- this._tokens = new WeakMap
- }
- return e.prototype.add = function (e, t) {
- var n, o = this._tokens.get(e);
- return o || (o = e.invokeWithinContext((function (e) {
- return {key: d.bindTo(e.get(i.IContextKeyService)), tokens: new s.LinkedList}
- })), this._tokens.set(e, o)), o.key.set(!0), n = o.tokens.push(t), function () {
- n && (n(), o.key.set(!o.tokens.isEmpty()), n = void 0)
- }
- }, e.prototype.cancel = function (e) {
- var t = this._tokens.get(e);
- if (t) {
- var n = t.tokens.pop();
- n && (n.cancel(), t.key.set(!t.tokens.isEmpty()))
- }
- }, e
- }(), !0);
- var c = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i.editor = t, i._unregister = t.invokeWithinContext((function (e) {
- return e.get(u).add(t, i)
- })), i
- }
- return r(t, e), t.prototype.dispose = function () {
- this._unregister(), e.prototype.dispose.call(this)
- }, t
- }(o.CancellationTokenSource);
- t.EditorKeybindingCancellationTokenSource = c, n.registerEditorCommand(new (function (e) {
- function t() {
- return e.call(this, {
- id: "editor.cancelOperation",
- kbOpts: {weight: 100, primary: 9},
- precondition: d
- }) || this
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t) {
- e.get(u).cancel(t)
- }, t
- }(n.EditorCommand)))
- })), define(n[67], i([0, 1, 5, 26, 2, 522]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e, t) {
- if (this.flags = t, 0 != (1 & this.flags)) {
- var i = e.getModel();
- this.modelVersionId = i ? n.format("{0}#{1}", i.uri.toString(), i.getVersionId()) : null
- } else this.modelVersionId = null
- ;
- 0 != (4 & this.flags) ? this.position = e.getPosition() : this.position = null, 0 != (2 & this.flags) ? this.selection = e.getSelection() : this.selection = null, 0 != (8 & this.flags) ? (this.scrollLeft = e.getScrollLeft(), this.scrollTop = e.getScrollTop()) : (this.scrollLeft = -1, this.scrollTop = -1)
- }
- return e.prototype._equals = function (t) {
- if (!(t instanceof e)) return !1;
- var n = t;
- return this.modelVersionId === n.modelVersionId && (this.scrollLeft === n.scrollLeft && this.scrollTop === n.scrollTop && (!(!this.position && n.position || this.position && !n.position || this.position && n.position && !this.position.equals(n.position)) && !(!this.selection && n.selection || this.selection && !n.selection || this.selection && n.selection && !this.selection.equalsRange(n.selection))))
- }, e.prototype.validate = function (t) {
- return this._equals(new e(t, this.flags))
- }, e
- }();
- t.EditorState = a;
- var l = function (e) {
- function t(t, n, i) {
- var r = e.call(this, t, i) || this;
- return r.editor = t, r._listener = new o.DisposableStore, 4 & n && r._listener.add(t.onDidChangeCursorPosition((function (e) {
- return r.cancel()
- }))),
- 2 & n && r._listener.add(t.onDidChangeCursorSelection((function (e) {
- return r.cancel()
- }))), 8 & n && r._listener.add(t.onDidScrollChange((function (e) {
- return r.cancel()
- }))), 1 & n && (r._listener.add(t.onDidChangeModel((function (e) {
- return r.cancel()
- }))), r._listener.add(t.onDidChangeModelContent((function (e) {
- return r.cancel()
- })))), r
- }
- return r(t, e), t.prototype.dispose = function () {
- this._listener.dispose(), e.prototype.dispose.call(this)
- }, t
- }(s.EditorKeybindingCancellationTokenSource);
- t.EditorStateCancellationTokenSource = l;
- var u = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i._listener = t.onDidChangeContent((function () {
- return i.cancel()
- })), i
- }
- return r(t, e), t.prototype.dispose = function () {
- this._listener.dispose(), e.prototype.dispose.call(this)
- }, t
- }(i.CancellationTokenSource);
- t.TextModelCancellationTokenSource = u;
- var d = function () {
- function e(e, t) {
- this._visiblePosition = e, this._visiblePositionScrollDelta = t
- }
- return e.capture = function (t) {
- var n = null, i = 0;
- if (0 !== t.getScrollTop()) {
- var o = t.getVisibleRanges();
- if (o.length > 0) {
- n = o[0].getStartPosition();
- var r = t.getTopForPosition(n.lineNumber, n.column);
- i = t.getScrollTop() - r
- }
- }
- return new e(n, i)
- }, e.prototype.restore = function (e) {
- if (this._visiblePosition) {
- var t = e.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition.column);
- e.setScrollTop(t + this._visiblePositionScrollDelta)
- }
- }, e
- }();
- t.StableEditorScrollState = d
- })), define(n[523], i([0, 1, 164, 13, 16]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var r = function () {
- function e(e, t, n, i) {
- this.configuration = e, this.viewModel = t, this.outgoingEvents = n, this.commandDelegate = i
- }
- return e.prototype._execMouseCommand = function (e, t) {
- t.source = "mouse", this.commandDelegate.executeEditorCommand(e, t)
- }, e.prototype.paste = function (e, t, n, i, o) {
- this.commandDelegate.paste(e, t, n, i, o)
- }, e.prototype.type = function (e, t) {
- this.commandDelegate.type(e, t)
- }, e.prototype.replacePreviousChar = function (e, t, n) {
- this.commandDelegate.replacePreviousChar(e, t, n)
- }, e.prototype.compositionStart = function (e) {
- this.commandDelegate.compositionStart(e)
- },
- e.prototype.compositionEnd = function (e) {
- this.commandDelegate.compositionEnd(e)
- }, e.prototype.cut = function (e) {
- this.commandDelegate.cut(e)
- }, e.prototype.setSelection = function (e, t) {
- this.commandDelegate.executeEditorCommand(n.CoreNavigationCommands.SetSelection, {
- source: e,
- selection: t
- })
- }, e.prototype._validateViewColumn = function (e) {
- var t = this.viewModel.getLineMinColumn(e.lineNumber);
- return e.column < t ? new i.Position(e.lineNumber, t) : e
- }, e.prototype._hasMulticursorModifier = function (e) {
- switch (this.configuration.options.get(59)) {
- case"altKey":
- return e.altKey;
- case"ctrlKey":
- return e.ctrlKey;
- case"metaKey":
- return e.metaKey
- }
- return !1
- }, e.prototype._hasNonMulticursorModifier = function (e) {
- switch (this.configuration.options.get(59)) {
- case"altKey":
- return e.ctrlKey || e.metaKey;
- case"ctrlKey":
- return e.altKey || e.metaKey;
- case"metaKey":
- return e.ctrlKey || e.altKey
- }
- return !1
- }, e.prototype.dispatchMouse = function (e) {
- var t = o.isLinux && this.configuration.options.get(81)
- ;e.middleButton && !t ? this._columnSelect(e.position, e.mouseColumn, e.inSelectionMode) : e.startedOnLineNumbers ? this._hasMulticursorModifier(e) ? e.inSelectionMode ? this._lastCursorLineSelect(e.position) : this._createCursor(e.position, !0) : e.inSelectionMode ? this._lineSelectDrag(e.position) : this._lineSelect(e.position) : e.mouseDownCount >= 4 ? this._selectAll() : 3 === e.mouseDownCount ? this._hasMulticursorModifier(e) ? e.inSelectionMode ? this._lastCursorLineSelectDrag(e.position) : this._lastCursorLineSelect(e.position) : e.inSelectionMode ? this._lineSelectDrag(e.position) : this._lineSelect(e.position) : 2 === e.mouseDownCount ? this._hasMulticursorModifier(e) ? this._lastCursorWordSelect(e.position) : e.inSelectionMode ? this._wordSelectDrag(e.position) : this._wordSelect(e.position) : this._hasMulticursorModifier(e) ? this._hasNonMulticursorModifier(e) || (e.shiftKey ? this._columnSelect(e.position, e.mouseColumn, !0) : e.inSelectionMode ? this._lastCursorMoveToSelect(e.position) : this._createCursor(e.position, !1)) : e.inSelectionMode ? e.altKey ? this._columnSelect(e.position, e.mouseColumn, !0) : this._moveToSelect(e.position) : this.moveTo(e.position)
- }, e.prototype._usualArgs = function (e) {
- return e = this._validateViewColumn(e), {position: this._convertViewToModelPosition(e), viewPosition: e}
- }, e.prototype.moveTo = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.MoveTo, this._usualArgs(e))
- }, e.prototype._moveToSelect = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.MoveToSelect, this._usualArgs(e))
- }, e.prototype._columnSelect = function (e, t, i) {
- e = this._validateViewColumn(e), this._execMouseCommand(n.CoreNavigationCommands.ColumnSelect, {
- position: this._convertViewToModelPosition(e),
- viewPosition: e,
- mouseColumn: t,
- doColumnSelect: i
- })
- }, e.prototype._createCursor = function (e, t) {
- e = this._validateViewColumn(e), this._execMouseCommand(n.CoreNavigationCommands.CreateCursor, {
- position: this._convertViewToModelPosition(e),
- viewPosition: e,
- wholeLine: t
- })
- }, e.prototype._lastCursorMoveToSelect = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.LastCursorMoveToSelect, this._usualArgs(e))
- }, e.prototype._wordSelect = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.WordSelect, this._usualArgs(e))
- }, e.prototype._wordSelectDrag = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.WordSelectDrag, this._usualArgs(e))
- }, e.prototype._lastCursorWordSelect = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.LastCursorWordSelect, this._usualArgs(e))
- }, e.prototype._lineSelect = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.LineSelect, this._usualArgs(e))
- }, e.prototype._lineSelectDrag = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.LineSelectDrag, this._usualArgs(e))
- }, e.prototype._lastCursorLineSelect = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.LastCursorLineSelect, this._usualArgs(e))
- }, e.prototype._lastCursorLineSelectDrag = function (e) {
- this._execMouseCommand(n.CoreNavigationCommands.LastCursorLineSelectDrag, this._usualArgs(e))
- }, e.prototype._selectAll = function () {
- this._execMouseCommand(n.CoreNavigationCommands.SelectAll, {})
- }, e.prototype._convertViewToModelPosition = function (e) {
- return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)
- }, e.prototype.emitKeyDown = function (e) {
- this.outgoingEvents.emitKeyDown(e)
- }, e.prototype.emitKeyUp = function (e) {
- this.outgoingEvents.emitKeyUp(e)
- }, e.prototype.emitContextMenu = function (e) {
- this.outgoingEvents.emitContextMenu(e)
- }, e.prototype.emitMouseMove = function (e) {
- this.outgoingEvents.emitMouseMove(e)
- }, e.prototype.emitMouseLeave = function (e) {
- this.outgoingEvents.emitMouseLeave(e)
- }, e.prototype.emitMouseUp = function (e) {
- this.outgoingEvents.emitMouseUp(e)
- }, e.prototype.emitMouseDown = function (e) {
- this.outgoingEvents.emitMouseDown(e)
- }, e.prototype.emitMouseDrag = function (e) {
- this.outgoingEvents.emitMouseDrag(e)
- }, e.prototype.emitMouseDrop = function (e) {
- this.outgoingEvents.emitMouseDrop(e)
- }, e.prototype.emitMouseWheel = function (e) {
- this.outgoingEvents.emitMouseWheel(e)
- }, e
- }();
- t.ViewController = r
- })), define(n[524], i([0, 1, 429, 12, 23, 374]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i.left = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = [], i = 0, o = t.getSelections(); i < o.length; i++) {
- var r = o[i];
- n.push(new s.MoveCaretCommand(r, this.left))
- }
- t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()
- }
- }, t
- }(i.EditorAction), l = function (e) {
- function t() {
- return e.call(this, !0, {
- id: "editor.action.moveCarretLeftAction",
- label: n.localize(0, null),
- alias: "Move Caret Left",
- precondition: o.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(a), u = function (e) {
- function t() {
- return e.call(this, !1, {
- id: "editor.action.moveCarretRightAction",
- label: n.localize(1, null),
- alias: "Move Caret Right",
- precondition: o.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(a);
- i.registerEditorAction(l), i.registerEditorAction(u)
- })), define(n[525], i([0, 1, 430, 12, 80, 3, 23, 158]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.transposeLetters",
- label: n.localize(0, null),
- alias: "Transpose Letters",
- precondition: a.EditorContextKeys.writable,
- kbOpts: {kbExpr: a.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 306}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = t.getModel(), i = [], r = 0, a = t.getSelections(); r < a.length; r++) {
- var u = a[r];
- if (u.isEmpty()) {
- var d = u.startLineNumber, c = u.startColumn, h = n.getLineMaxColumn(d);
- if (1 !== d || 1 !== c && (2 !== c || 2 !== h)) {
- var p = c === h ? u.getPosition() : l.MoveOperations.rightPosition(n, u.getPosition().lineNumber, u.getPosition().column),
- g = l.MoveOperations.leftPosition(n, p.lineNumber, p.column),
- f = l.MoveOperations.leftPosition(n, g.lineNumber, g.column),
- m = n.getValueInRange(s.Range.fromPositions(f, g)),
- v = n.getValueInRange(s.Range.fromPositions(g, p)), _ = s.Range.fromPositions(f, p);
- i.push(new o.ReplaceCommand(_, v + m))
- }
- }
- }
- i.length > 0 && (t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop())
- }
- }, t
- }(i.EditorAction);
- i.registerEditorAction(u)
- })), define(n[526], i([0, 1, 431, 24, 16, 189, 12, 32, 23, 303]), (function (e, t, n, i, o, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = "9_cutcopypaste", c = o.isNative || document.queryCommandSupported("cut"),
- h = o.isNative || document.queryCommandSupported("copy"), p = h && !i.isEdgeOrIE,
- g = o.isNative || !i.isChrome && document.queryCommandSupported("paste"), f = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i.browserCommand = t, i
- }
- return r(t, e), t.prototype.runCommand = function (e, t) {
- var n = e.get(l.ICodeEditorService).getFocusedCodeEditor();
- n && n.hasTextFocus() ? n.trigger("keyboard", this.id, t) : document.execCommand(this.browserCommand)
- }, t.prototype.run = function (e, t) {
- t.focus(), document.execCommand(this.browserCommand)
- }, t
- }(a.EditorAction), m = function (e) {
- function t() {
- var t = {
- kbExpr: u.EditorContextKeys.textInputFocus,
- primary: 2102,
- win: {primary: 2102, secondary: [1044]},
- weight: 100
- };
- return o.isNative || (t = void 0), e.call(this, "cut", {
- id: "editor.action.clipboardCutAction",
- label: n.localize(0, null),
- alias: "Cut",
- precondition: u.EditorContextKeys.writable,
- kbOpts: t,
- contextMenuOpts: {group: d, order: 1},
- menuOpts: {
- menuId: 17, group: "2_ccp", title: n.localize(1, null), order: 1
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (t, n) {
- n.hasModel() && (!n.getOption(25) && n.getSelection().isEmpty() || e.prototype.run.call(this, t, n))
- }, t
- }(f), v = function (e) {
- function t() {
- var t = {
- kbExpr: u.EditorContextKeys.textInputFocus,
- primary: 2081,
- win: {primary: 2081, secondary: [2067]},
- weight: 100
- };
- return o.isNative || (t = void 0), e.call(this, "copy", {
- id: "editor.action.clipboardCopyAction",
- label: n.localize(2, null),
- alias: "Copy",
- precondition: void 0,
- kbOpts: t,
- contextMenuOpts: {group: d, order: 2},
- menuOpts: {menuId: 17, group: "2_ccp", title: n.localize(3, null), order: 2}
- }) || this
- }
- return r(t, e), t.prototype.run = function (t, n) {
- n.hasModel() && (!n.getOption(25) && n.getSelection().isEmpty() || e.prototype.run.call(this, t, n))
- }, t
- }(f), _ = function (e) {
- function t() {
- var t = {
- kbExpr: u.EditorContextKeys.textInputFocus,
- primary: 2100,
- win: {primary: 2100, secondary: [1043]},
- weight: 100
- };
- return o.isNative || (t = void 0), e.call(this, "paste", {
- id: "editor.action.clipboardPasteAction",
- label: n.localize(4, null),
- alias: "Paste",
- precondition: u.EditorContextKeys.writable,
- kbOpts: t,
- contextMenuOpts: {group: d, order: 3},
- menuOpts: {menuId: 17, group: "2_ccp", title: n.localize(5, null), order: 3}
- }) || this
- }
- return r(t, e), t
- }(f), y = function (e) {
- function t() {
- return e.call(this, "copy", {
- id: "editor.action.clipboardCopyWithSyntaxHighlightingAction",
- label: n.localize(6, null),
- alias: "Copy With Syntax Highlighting",
- precondition: void 0,
- kbOpts: {kbExpr: u.EditorContextKeys.textInputFocus, primary: 0, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (t, n) {
- n.hasModel() && (!n.getOption(25) && n.getSelection().isEmpty() || (s.CopyOptions.forceCopyWithSyntaxHighlighting = !0, e.prototype.run.call(this, t, n), s.CopyOptions.forceCopyWithSyntaxHighlighting = !1))
- }, t
- }(f);
- c && a.registerEditorAction(m), h && a.registerEditorAction(v), g && a.registerEditorAction(_), p && a.registerEditorAction(y)
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s]
- ;
- return i
- };
- define(n[119], i([0, 1, 19, 26, 10, 2, 25, 67, 12, 3, 22, 17, 49, 111]), (function (e, t, n, i, o, s, l, u, h, p, g, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.codeActionCommandId = "editor.action.codeAction", t.refactorCommandId = "editor.action.refactor", t.sourceActionCommandId = "editor.action.sourceAction", t.organizeImportsCommandId = "editor.action.organizeImports", t.fixAllCommandId = "editor.action.fixAll";
- var _ = function (e) {
- function t(i, o) {
- var r = e.call(this) || this;
- return r._register(o), r.allActions = n.mergeSort(a(i), t.codeActionsComparator), r.validActions = r.allActions.filter((function (e) {
- return !e.disabled
- })), r
- }
- return r(t, e), t.codeActionsComparator = function (e, t) {
- return n.isNonEmptyArray(e.diagnostics) ? n.isNonEmptyArray(t.diagnostics) ? e.diagnostics[0].message.localeCompare(t.diagnostics[0].message) : -1 : n.isNonEmptyArray(t.diagnostics) ? 1 : 0
- }, Object.defineProperty(t.prototype, "hasAutoFix", {
- get: function () {
- return this.validActions.some((function (e) {
- return !!e.kind && v.CodeActionKind.QuickFix.contains(new v.CodeActionKind(e.kind)) && !!e.isPreferred
- }))
- }, enumerable: !0, configurable: !0
- }), t
- }(s.Disposable);
- function y(e, t, i, r) {
- var a, l = this, h = i.filter || {},
- p = {only: null === (a = h.include) || void 0 === a ? void 0 : a.value, trigger: i.type},
- g = new u.TextModelCancellationTokenSource(e, r), m = function (e, t) {
- return f.CodeActionProviderRegistry.all(e).filter((function (e) {
- return !e.providedCodeActionKinds || e.providedCodeActionKinds.some((function (e) {
- return v.mayIncludeActionsOfKind(t, new v.CodeActionKind(e))
- }))
- }))
- }(e, h), y = new s.DisposableStore, C = m.map((function (n) {
- return d(l, void 0, void 0, (function () {
- var i, r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- return s.trys.push([0, 2, , 3]), [4, n.provideCodeActions(e, t, p, g.token)];
- case 1:
- return i = s.sent(), g.token.isCancellationRequested || !i ? [2, []] : (y.add(i), [2, i.actions.filter((function (e) {
- return e && v.filtersAction(h, e)
- }))]);
- case 2:
- if (r = s.sent(), o.isPromiseCanceledError(r)) throw r;
- return o.onUnexpectedExternalError(r), [2, []];
- case 3:
- return [2]
- }
- }))
- }))
- })), b = f.CodeActionProviderRegistry.onDidChange((function () {
- var t = f.CodeActionProviderRegistry.all(e);
- n.equals(t, m) || g.cancel()
- }));
- return Promise.all(C).then(n.flatten).then((function (e) {
- return new _(e, y)
- })).finally((function () {
- b.dispose(), g.dispose()
- }))
- }
- t.getCodeActions = y, h.registerLanguageCommand("_executeCodeActionProvider", (function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, r, s, a, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- if (n = t.resource, r = t.rangeOrSelection, s = t.kind, !(n instanceof l.URI)) throw o.illegalArgument();
- if (!(a = e.get(m.IModelService).getModel(n))) throw o.illegalArgument();
- if (!(u = g.Selection.isISelection(r) ? g.Selection.liftSelection(r) : p.Range.isIRange(r) ? a.validateRange(r) : void 0)) throw o.illegalArgument();
- return [4, y(a, u, {
- type: 2,
- filter: {
- includeSourceActions: !0,
- include: s && s.value ? new v.CodeActionKind(s.value) : void 0
- }
- }, i.CancellationToken.None)];
- case 1:
- return d = c.sent(), setTimeout((function () {
- return d.dispose()
- }), 100), [2, d.validActions]
- }
- }))
- }))
- }))
- }))
- ;a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[527], i([0, 1, 6, 70, 55, 10, 128, 2, 13, 17, 119, 111, 66, 34]), (function (e, t, n, i, o, s, u, p, f, m, v, _, y, C) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = function (e) {
- function t(t, n) {
- var i = e.call(this, t.command ? t.command.id : t.title, t.title, void 0, !t.disabled, n) || this;
- return i.action = t, i
- }
- return r(t, e), t
- }(o.Action), S = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this) || this;
- return r._editor = t, r._delegate = n, r._contextMenuService = i, r._visible = !1, r._showingActions = r._register(new p.MutableDisposable), r._keybindingResolver = new w({
- getKeybindings: function () {
- return o.getKeybindings()
- }
- }), r
- }
- return r(t, e), Object.defineProperty(t.prototype, "isVisible", {
- get: function () {
- return this._visible
- }, enumerable: !0, configurable: !0
- }), t.prototype.show = function (e, t, n, i) {
- return d(this, void 0, void 0, (function () {
- var o, r, a, l, u = this;
- return c(this, (function (d) {
- if (!(o = i.includeDisabledActions ? t.allActions : t.validActions).length) return this._visible = !1, [2];
- if (!this._editor.getDomNode()) throw this._visible = !1, s.canceled();
- return this._visible = !0, this._showingActions.value = t, r = this.getMenuActions(e, o), a = f.Position.isIPosition(n) ? this._toCoords(n) : n || {
- x: 0,
- y: 0
- }, l = this._keybindingResolver.getResolver(), this._contextMenuService.showContextMenu({
- getAnchor: function () {
- return a
- }, getActions: function () {
- return r
- }, onHide: function () {
- u._visible = !1, u._editor.focus()
- }, autoSelectFirstItem: !0, getKeyBinding: function (e) {
- return e instanceof b ? l(e.action) : void 0
- }
- }), [2]
- }))
- }))
- }, t.prototype.getMenuActions = function (e, t) {
- var n, o, r = this, s = function (e) {
- return new b(e, (function () {
- return r._delegate.onSelectCodeAction(e)
- }))
- }, l = t.map(s), u = this._editor.getModel();
- if (u && l.length) for (var d = 0, c = m.CodeActionProviderRegistry.all(u); d < c.length; d++) {
- var h = c[d];
- if (h._getAdditionalMenuItems) {
- var p = h._getAdditionalMenuItems({
- trigger: e.type,
- only: null === (o = null === (n = e.filter) || void 0 === n ? void 0 : n.include) || void 0 === o ? void 0 : o.value
- }, t);
- p.length && l.push.apply(l, a([new i.Separator], p.map((function (e) {
- return s({title: e.title, command: e})
- }))))
- }
- }
- return l
- }, t.prototype._toCoords = function (e) {
- if (!this._editor.hasModel()) return {x: 0, y: 0};
- this._editor.revealPosition(e, 1), this._editor.render();
- var t = this._editor.getScrolledVisiblePosition(e),
- i = n.getDomNodePagePosition(this._editor.getDomNode());
- return {x: i.left + t.left, y: i.top + t.top + t.height}
- }, t = h([g(2, y.IContextMenuService), g(3, C.IKeybindingService)], t)
- }(p.Disposable);
- t.CodeActionMenu = S;
- var w = function () {
- function e(e) {
- this._keybindingProvider = e
- }
- return e.prototype.getResolver = function () {
- var t = this, n = new u.Lazy((function () {
- return t._keybindingProvider.getKeybindings().filter((function (t) {
- return e.codeActionCommands.indexOf(t.command) >= 0
- })).filter((function (e) {
- return e.resolvedKeybinding
- })).map((function (e) {
- var t = e.commandArgs;
- return e.command === v.organizeImportsCommandId ? t = {
- kind: _.CodeActionKind.SourceOrganizeImports.value
- } : e.command === v.fixAllCommandId && (t = {kind: _.CodeActionKind.SourceFixAll.value}), l({resolvedKeybinding: e.resolvedKeybinding}, _.CodeActionCommandArgs.fromUser(t, {
- kind: _.CodeActionKind.None,
- apply: "never"
- }))
- }))
- }));
- return function (e) {
- if (e.kind) {
- var i = t.bestKeybindingForCodeAction(e, n.getValue());
- return null == i ? void 0 : i.resolvedKeybinding
- }
- }
- }, e.prototype.bestKeybindingForCodeAction = function (e, t) {
- if (e.kind) {
- var n = new _.CodeActionKind(e.kind);
- return t.filter((function (e) {
- return e.kind.contains(n)
- })).filter((function (t) {
- return !t.preferred || e.isPreferred
- })).reduceRight((function (e, t) {
- return e ? e.kind.contains(t.kind) ? t : e : t
- }), void 0)
- }
- }, e.codeActionCommands = [v.refactorCommandId, v.codeActionCommandId, v.sourceActionCommandId, v.organizeImportsCommandId, v.fixAllCommandId], e
- }();
- t.CodeActionKeybindingResolver = w
- })), define(n[528], i([0, 1, 15, 4, 2, 3, 17, 18, 119, 39]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}),
- t.SUPPORTED_CODE_ACTIONS = new l.RawContextKey("supportedCodeAction", "");
- var c, h = function (e) {
- function t(t, i, o, r) {
- void 0 === r && (r = 250);
- var s = e.call(this) || this;
- return s._editor = t, s._markerService = i, s._signalChange = o, s._delay = r, s._autoTriggerTimer = s._register(new n.TimeoutTimer), s._register(s._markerService.onMarkerChanged((function (e) {
- return s._onMarkerChanges(e)
- }))), s._register(s._editor.onDidChangeCursorPosition((function () {
- return s._onCursorChange()
- }))), s
- }
- return r(t, e), t.prototype.trigger = function (e) {
- var t = this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);
- return this._createEventAndSignalChange(e, t)
- }, t.prototype._onMarkerChanges = function (e) {
- var t = this, n = this._editor.getModel();
- n && e.some((function (e) {
- return d.isEqual(e, n.uri)
- })) && this._autoTriggerTimer.cancelAndSet((function () {
- t.trigger({type: 1})
- }), this._delay)
- }, t.prototype._onCursorChange = function () {
- var e = this;
- this._autoTriggerTimer.cancelAndSet((function () {
- e.trigger({type: 1})
- }), this._delay)
- }, t.prototype._getRangeOfMarker = function (e) {
- var t = this._editor.getModel();
- if (t) for (var n = 0, i = this._markerService.read({resource: t.uri}); n < i.length; n++) {
- var o = i[n], r = t.validateRange(o);
- if (s.Range.intersectRanges(r, e)) return s.Range.lift(r)
- }
- }, t.prototype._getRangeOfSelectionUnlessWhitespaceEnclosed = function (e) {
- if (this._editor.hasModel()) {
- var t = this._editor.getModel(), n = this._editor.getSelection();
- if (n.isEmpty() && 1 === e.type) {
- var i = n.getPosition(), o = i.lineNumber, r = i.column, s = t.getLineContent(o);
- if (0 === s.length) return;
- if (1 === r) {
- if (/\s/.test(s[0])) return
- } else if (r === t.getLineMaxColumn(o)) {
- if (/\s/.test(s[s.length - 1])) return
- } else if (/\s/.test(s[r - 2]) && /\s/.test(s[r - 1])) return
- }
- return n
- }
- }, t.prototype._createEventAndSignalChange = function (e, t) {
- var n = this._editor.getModel();
- if (t && n) {
- var i = this._getRangeOfMarker(t), o = i ? i.getStartPosition() : t.getStartPosition(),
- r = {trigger: e, selection: t, position: o};
- return this._signalChange(r), r
- }
- this._signalChange(void 0)
- }, t
- }(o.Disposable);
- !function (e) {
- e.Empty = {type: 0};
- var t = function (e, t, n, i) {
- this.trigger = e, this.rangeOrSelection = t,
- this.position = n, this.actions = i, this.type = 1
- };
- e.Triggered = t
- }(c = t.CodeActionsState || (t.CodeActionsState = {}));
- var p = function (e) {
- function s(n, r, s, l) {
- var u = e.call(this) || this;
- return u._editor = n, u._markerService = r, u._progressService = l, u._codeActionOracle = u._register(new o.MutableDisposable), u._state = c.Empty, u._onDidChangeState = u._register(new i.Emitter), u.onDidChangeState = u._onDidChangeState.event, u._supportedCodeActions = t.SUPPORTED_CODE_ACTIONS.bindTo(s), u._register(u._editor.onDidChangeModel((function () {
- return u._update()
- }))), u._register(u._editor.onDidChangeModelLanguage((function () {
- return u._update()
- }))), u._register(a.CodeActionProviderRegistry.onDidChange((function () {
- return u._update()
- }))), u._update(), u
- }
- return r(s, e), s.prototype.dispose = function () {
- e.prototype.dispose.call(this), this.setState(c.Empty, !0)
- }, s.prototype._update = function () {
- var e = this;
- this._codeActionOracle.value = void 0, this.setState(c.Empty);
- var t = this._editor.getModel();
- if (t && a.CodeActionProviderRegistry.has(t) && !this._editor.getOption(68)) {
- for (var i = [], o = 0, r = a.CodeActionProviderRegistry.all(t); o < r.length; o++) {
- var s = r[o];
- Array.isArray(s.providedCodeActionKinds) && i.push.apply(i, s.providedCodeActionKinds)
- }
- this._supportedCodeActions.set(i.join(" ")), this._codeActionOracle.value = new h(this._editor, this._markerService, (function (i) {
- if (i) {
- var o = n.createCancelablePromise((function (e) {
- return u.getCodeActions(t, i.selection, i.trigger, e)
- }));
- e._progressService && 2 === i.trigger.type && e._progressService.showWhile(o, 250), e.setState(new c.Triggered(i.trigger, i.selection, i.position, o))
- } else e.setState(c.Empty)
- }), void 0), this._codeActionOracle.value.trigger({type: 1})
- } else this._supportedCodeActions.reset()
- }, s.prototype.trigger = function (e) {
- this._codeActionOracle.value && this._codeActionOracle.value.trigger(e)
- }, s.prototype.setState = function (e, t) {
- e !== this._state && (1 === this._state.type && this._state.actions.cancel(), this._state = e, t || this._onDidChangeState.fire(e))
- }, s
- }(o.Disposable);
- t.CodeActionModel = p
- })),
- define(n[221], i([0, 1, 19, 26, 10, 25, 12, 17, 49, 2]), (function (e, t, n, i, o, r, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function () {
- function e() {
- this.lenses = [], this._disposables = new u.DisposableStore
- }
- return e.prototype.dispose = function () {
- this._disposables.dispose()
- }, e.prototype.add = function (e, t) {
- this._disposables.add(e);
- for (var n = 0, i = e.lenses; n < i.length; n++) {
- var o = i[n];
- this.lenses.push({symbol: o, provider: t})
- }
- }, e
- }();
- function c(e, t) {
- var i = a.CodeLensProviderRegistry.ordered(e), r = new Map, s = new d, l = i.map((function (n, i) {
- return r.set(n, i), Promise.resolve(n.provideCodeLenses(e, t)).then((function (e) {
- return e && s.add(e, n)
- })).catch(o.onUnexpectedExternalError)
- }));
- return Promise.all(l).then((function () {
- return s.lenses = n.mergeSort(s.lenses, (function (e, t) {
- return e.symbol.range.startLineNumber < t.symbol.range.startLineNumber ? -1 : e.symbol.range.startLineNumber > t.symbol.range.startLineNumber ? 1 : r.get(e.provider) < r.get(t.provider) ? -1 : r.get(e.provider) > r.get(t.provider) ? 1 : e.symbol.range.startColumn < t.symbol.range.startColumn ? -1 : e.symbol.range.startColumn > t.symbol.range.startColumn ? 1 : 0
- })), s
- }))
- }
- t.CodeLensModel = d, t.getCodeLensData = c, s.registerLanguageCommand("_executeCodeLensProvider", (function (e, t) {
- var n = t.resource, s = t.itemResolveCount;
- if (!(n instanceof r.URI)) throw o.illegalArgument();
- var a = e.get(l.IModelService).getModel(n);
- if (!a) throw o.illegalArgument();
- var d = [], h = new u.DisposableStore;
- return c(a, i.CancellationToken.None).then((function (e) {
- h.add(e);
- for (var t = [], n = function (e) {
- void 0 === s || Boolean(e.symbol.command) ? d.push(e.symbol) : s-- > 0 && e.provider.resolveCodeLens && t.push(Promise.resolve(e.provider.resolveCodeLens(a, e.symbol, i.CancellationToken.None)).then((function (t) {
- return d.push(t || e.symbol)
- })))
- }, o = 0, r = e.lenses; o < r.length; o++) {
- n(r[o])
- }
- return Promise.all(t)
- })).then((function () {
- return d
- })).finally((function () {
- setTimeout((function () {
- return h.dispose()
- }), 100)
- }))
- }))
- })), define(n[529], i([0, 1, 11, 83, 221, 38, 74, 3, 15, 102]), (function (e, t, n, i, o, r, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ICodeLensCache = n.createDecorator("ICodeLensCache");
- var d = function (e, t) {
- this.lineCount = e, this.data = t
- }, c = function () {
- function e(e) {
- var t = this;
- this._fakeProvider = new (function () {
- function e() {
- }
- return e.prototype.provideCodeLenses = function () {
- throw new Error("not supported")
- }, e
- }()), this._cache = new r.LRUCache(20, .75);
- l.runWhenIdle((function () {
- return e.remove("codelens/cache", 1)
- }));
- var n = "codelens/cache2", i = e.get(n, 1, "{}");
- this._deserialize(i), u.once(e.onWillSaveState)((function (i) {
- i.reason === s.WillSaveStateReason.SHUTDOWN && e.store(n, t._serialize(), 1)
- }))
- }
- return e.prototype.put = function (e, t) {
- var n = t.lenses.map((function (e) {
- var t;
- return {
- range: e.symbol.range,
- command: e.symbol.command && {
- id: "",
- title: null === (t = e.symbol.command) || void 0 === t ? void 0 : t.title
- }
- }
- })), i = new o.CodeLensModel;
- i.add({
- lenses: n, dispose: function () {
- }
- }, this._fakeProvider);
- var r = new d(e.getLineCount(), i);
- this._cache.set(e.uri.toString(), r)
- }, e.prototype.get = function (e) {
- var t = this._cache.get(e.uri.toString());
- return t && t.lineCount === e.getLineCount() ? t.data : void 0
- }, e.prototype.delete = function (e) {
- this._cache.delete(e.uri.toString())
- }, e.prototype._serialize = function () {
- var e = Object.create(null);
- return this._cache.forEach((function (t, n) {
- for (var i = new Set, o = 0, s = t.data.lenses; o < s.length; o++) {
- var a = s[o];
- i.add(a.symbol.range.startLineNumber)
- }
- e[n] = {lineCount: t.lineCount, lines: r.values(i)}
- })), JSON.stringify(e)
- }, e.prototype._deserialize = function (e) {
- try {
- var t = JSON.parse(e);
- for (var n in t) {
- for (var i = t[n], r = [], s = 0, l = i.lines; s < l.length; s++) {
- var u = l[s];
- r.push({range: new a.Range(u, 1, u, 11)})
- }
- var c = new o.CodeLensModel;
- c.add({
- lenses: r, dispose: function () {
- }
- }, this._fakeProvider), this._cache.set(n, new d(i.lineCount, c))
- }
- } catch (e) {
- }
- }, e = h([g(0, s.IStorageService)], e)
- }();
- t.CodeLensCache = c,
- i.registerSingleton(t.ICodeLensCache, c)
- })), define(n[222], i([0, 1, 26, 10, 25, 12, 3, 17, 49]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.getColors = function (e, t) {
- var n = [], i = a.ColorProviderRegistry.ordered(e).reverse().map((function (i) {
- return Promise.resolve(i.provideDocumentColors(e, t)).then((function (e) {
- if (Array.isArray(e)) for (var t = 0, o = e; t < o.length; t++) {
- var r = o[t];
- n.push({colorInfo: r, provider: i})
- }
- }))
- }));
- return Promise.all(i).then((function () {
- return n
- }))
- }, t.getColorPresentations = function (e, t, n, i) {
- return Promise.resolve(n.provideColorPresentations(e, t, i))
- }, r.registerLanguageCommand("_executeDocumentColorProvider", (function (e, t) {
- var r = t.resource;
- if (!(r instanceof o.URI)) throw i.illegalArgument();
- var s = e.get(l.IModelService).getModel(r);
- if (!s) throw i.illegalArgument();
- var u = [], d = a.ColorProviderRegistry.ordered(s).reverse().map((function (e) {
- return Promise.resolve(e.provideDocumentColors(s, n.CancellationToken.None)).then((function (e) {
- if (Array.isArray(e)) for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t];
- u.push({range: i.range, color: [i.color.red, i.color.green, i.color.blue, i.color.alpha]})
- }
- }))
- }));
- return Promise.all(d).then((function () {
- return u
- }))
- })), r.registerLanguageCommand("_executeColorPresentationProvider", (function (e, t) {
- var r = t.resource, u = t.color, d = t.range;
- if (!(r instanceof o.URI && Array.isArray(u) && 4 === u.length && s.Range.isIRange(d))) throw i.illegalArgument();
- var c = u[0], h = u[1], p = u[2], g = u[3], f = e.get(l.IModelService).getModel(r);
- if (!f) throw i.illegalArgument();
- var m = {range: d, color: {red: c, green: h, blue: p, alpha: g}}, v = [],
- _ = a.ColorProviderRegistry.ordered(f).reverse().map((function (e) {
- return Promise.resolve(e.provideColorPresentations(f, m, n.CancellationToken.None)).then((function (e) {
- Array.isArray(e) && v.push.apply(v, e)
- }))
- }));
- return Promise.all(_).then((function () {
- return v
- }))
- }))
- })), define(n[223], i([0, 1, 15, 27, 10, 125, 2, 12, 32, 3, 30, 17, 222, 43]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var v = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o._editor = t, o._codeEditorService = n, o._configurationService = i, o._localToDispose = o._register(new a.DisposableStore), o._decorationsIds = [], o._colorDatas = new Map, o._colorDecoratorIds = [], o._decorationsTypes = new Set, o._register(t.onDidChangeModel((function (e) {
- o._isEnabled = o.isEnabled(), o.onModelChanged()
- }))), o._register(t.onDidChangeModelLanguage((function (e) {
- return o.onModelChanged()
- }))), o._register(p.ColorProviderRegistry.onDidChange((function (e) {
- return o.onModelChanged()
- }))), o._register(t.onDidChangeConfiguration((function (e) {
- var t = o._isEnabled;
- o._isEnabled = o.isEnabled(), t !== o._isEnabled && (o._isEnabled ? o.onModelChanged() : o.removeAllDecorations())
- }))), o._timeoutTimer = null, o._computePromise = null, o._isEnabled = o.isEnabled(), o.onModelChanged(), o
- }
- return r(t, e), t.prototype.isEnabled = function () {
- var e = this._editor.getModel();
- if (!e) return !1;
- var t = e.getLanguageIdentifier(), n = this._configurationService.getValue(t.language);
- if (n) {
- var i = n.colorDecorators
- ;
- if (i && void 0 !== i.enable && !i.enable) return i.enable
- }
- return this._editor.getOption(12)
- }, t.get = function (e) {
- return e.getContribution(this.ID)
- }, t.prototype.dispose = function () {
- this.stop(), this.removeAllDecorations(), e.prototype.dispose.call(this)
- }, t.prototype.onModelChanged = function () {
- var e = this;
- if (this.stop(), this._isEnabled) {
- var i = this._editor.getModel();
- i && p.ColorProviderRegistry.has(i) && (this._localToDispose.add(this._editor.onDidChangeModelContent((function (i) {
- e._timeoutTimer || (e._timeoutTimer = new n.TimeoutTimer, e._timeoutTimer.cancelAndSet((function () {
- e._timeoutTimer = null, e.beginCompute()
- }), t.RECOMPUTE_TIME))
- }))), this.beginCompute())
- }
- }, t.prototype.beginCompute = function () {
- var e = this;
- this._computePromise = n.createCancelablePromise((function (t) {
- var n = e._editor.getModel();
- return n ? f.getColors(n, t) : Promise.resolve([])
- })), this._computePromise.then((function (t) {
- e.updateDecorations(t), e.updateColorDecorators(t), e._computePromise = null
- }), o.onUnexpectedError)
- }, t.prototype.stop = function () {
- this._timeoutTimer && (this._timeoutTimer.cancel(), this._timeoutTimer = null), this._computePromise && (this._computePromise.cancel(), this._computePromise = null), this._localToDispose.clear()
- }, t.prototype.updateDecorations = function (e) {
- var t = this, n = e.map((function (e) {
- return {
- range: {
- startLineNumber: e.colorInfo.range.startLineNumber,
- startColumn: e.colorInfo.range.startColumn,
- endLineNumber: e.colorInfo.range.endLineNumber,
- endColumn: e.colorInfo.range.endColumn
- }, options: c.ModelDecorationOptions.EMPTY
- }
- }));
- this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, n), this._colorDatas = new Map, this._decorationsIds.forEach((function (n, i) {
- return t._colorDatas.set(n, e[i])
- }))
- }, t.prototype.updateColorDecorators = function (e) {
- for (var t = this, n = [], o = {}, r = 0; r < e.length && n.length < 500; r++) {
- var a = e[r].colorInfo.color, l = a.red, u = a.green, d = a.blue, c = a.alpha,
- h = new i.RGBA(Math.round(255 * l), Math.round(255 * u), Math.round(255 * d), c),
- p = s.hash(h).toString(16), g = "rgba(" + h.r + ", " + h.g + ", " + h.b + ", " + h.a + ")",
- f = "colorBox-" + p
- ;this._decorationsTypes.has(f) || o[f] || this._codeEditorService.registerDecorationType(f, {
- before: {
- contentText: " ",
- border: "solid 0.1em #000",
- margin: "0.1em 0.2em 0 0.2em",
- width: "0.8em",
- height: "0.8em",
- backgroundColor: g
- }, dark: {before: {border: "solid 0.1em #eee"}}
- }, void 0, this._editor), o[f] = !0, n.push({
- range: {
- startLineNumber: e[r].colorInfo.range.startLineNumber,
- startColumn: e[r].colorInfo.range.startColumn,
- endLineNumber: e[r].colorInfo.range.endLineNumber,
- endColumn: e[r].colorInfo.range.endColumn
- }, options: this._codeEditorService.resolveDecorationOptions(f, !0)
- })
- }
- this._decorationsTypes.forEach((function (e) {
- o[e] || t._codeEditorService.removeDecorationType(e)
- })), this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, n)
- }, t.prototype.removeAllDecorations = function () {
- var e = this;
- this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []), this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []), this._decorationsTypes.forEach((function (t) {
- e._codeEditorService.removeDecorationType(t)
- }))
- }, t.prototype.getColorData = function (e) {
- var t = this, n = this._editor.getModel();
- if (!n) return null;
- var i = n.getDecorationsInRange(d.Range.fromPositions(e, e)).filter((function (e) {
- return t._colorDatas.has(e.id)
- }));
- return 0 === i.length ? null : this._colorDatas.get(i[0].id)
- }, t.ID = "editor.contrib.colorDetector", t.RECOMPUTE_TIME = 1e3, t = h([g(1, u.ICodeEditorService), g(2, m.IConfigurationService)], t)
- }(a.Disposable);
- t.ColorDetector = v, l.registerEditorContribution(v.ID, v)
- })), define(n[530], i([0, 1, 434, 36, 12, 23, 196, 376]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i._type = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = t.getModel(), i = [], o = t.getSelections(), r = n.getOptions(), s = t.getOption(13), a = 0, u = o; a < u.length; a++) {
- var d = u[a];
- i.push(new l.LineCommentCommand(d, r.tabSize, this._type, s.insertSpace))
- }
- t.pushUndoStop(), t.executeCommands(this.id, i),
- t.pushUndoStop()
- }
- }, t
- }(o.EditorAction), d = function (e) {
- function t() {
- return e.call(this, 0, {
- id: "editor.action.commentLine",
- label: n.localize(0, null),
- alias: "Toggle Line Comment",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: 2133, weight: 100},
- menuOpts: {menuId: 17, group: "5_insert", title: n.localize(1, null), order: 1}
- }) || this
- }
- return r(t, e), t
- }(u), c = function (e) {
- function t() {
- return e.call(this, 1, {
- id: "editor.action.addCommentLine",
- label: n.localize(2, null),
- alias: "Add Line Comment",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: i.KeyChord(2089, 2081), weight: 100}
- }) || this
- }
- return r(t, e), t
- }(u), h = function (e) {
- function t() {
- return e.call(this, 2, {
- id: "editor.action.removeCommentLine",
- label: n.localize(3, null),
- alias: "Remove Line Comment",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: i.KeyChord(2089, 2099), weight: 100}
- }) || this
- }
- return r(t, e), t
- }(u), p = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.blockComment",
- label: n.localize(4, null),
- alias: "Toggle Block Comment",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: s.EditorContextKeys.editorTextFocus,
- primary: 1567,
- linux: {primary: 3103},
- weight: 100
- },
- menuOpts: {menuId: 17, group: "5_insert", title: n.localize(5, null), order: 2}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = t.getOption(13), i = [], o = 0, r = t.getSelections(); o < r.length; o++) {
- var s = r[o];
- i.push(new a.BlockCommentCommand(s, n.insertSpace))
- }
- t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop()
- }
- }, t
- }(o.EditorAction);
- o.registerEditorAction(d), o.registerEditorAction(c), o.registerEditorAction(h), o.registerEditorAction(p)
- })), define(n[531], i([0, 1, 435, 6, 70, 2, 12, 23, 65, 18, 66, 34, 405]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var m = function () {
- function e(e, t, n, i, o, r) {
- var a = this;
- this._contextMenuService = t, this._contextViewService = n, this._contextKeyService = i, this._keybindingService = o,
- this._menuService = r, this._toDispose = new s.DisposableStore, this._contextMenuIsBeingShownCount = 0, this._editor = e, this._toDispose.add(this._editor.onContextMenu((function (e) {
- return a._onContextMenu(e)
- }))), this._toDispose.add(this._editor.onMouseWheel((function (e) {
- a._contextMenuIsBeingShownCount > 0 && a._contextViewService.hideContextView()
- }))), this._toDispose.add(this._editor.onKeyDown((function (e) {
- 58 === e.keyCode && (e.preventDefault(), e.stopPropagation(), a.showContextMenu())
- })))
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype._onContextMenu = function (e) {
- if (this._editor.hasModel()) {
- if (!this._editor.getOption(14)) return this._editor.focus(), void (e.target.position && !this._editor.getSelection().containsPosition(e.target.position) && this._editor.setPosition(e.target.position));
- if (12 !== e.target.type && (e.event.preventDefault(), 6 === e.target.type || 7 === e.target.type || 1 === e.target.type)) {
- if (this._editor.focus(), e.target.position) {
- for (var t = !1, n = 0, i = this._editor.getSelections(); n < i.length; n++) {
- if (i[n].containsPosition(e.target.position)) {
- t = !0;
- break
- }
- }
- t || this._editor.setPosition(e.target.position)
- }
- var o = null;
- 1 !== e.target.type && (o = {
- x: e.event.posx - 1,
- width: 2,
- y: e.event.posy - 1,
- height: 2
- }), this.showContextMenu(o)
- }
- }
- }, e.prototype.showContextMenu = function (e) {
- if (this._editor.getOption(14) && this._editor.hasModel()) if (this._contextMenuService) {
- var t = this._getMenuActions(this._editor.getModel(), 7);
- t.length > 0 && this._doShowContextMenu(t, e)
- } else this._editor.focus()
- }, e.prototype._getMenuActions = function (e, t) {
- var n = [], i = this._menuService.createMenu(t, this._contextKeyService),
- r = i.getActions({arg: e.uri});
- i.dispose();
- for (var s = 0, a = r; s < a.length; s++) {
- for (var l = 0, d = 0, c = a[s][1]; d < c.length; d++) {
- var h = c[d];
- if (h instanceof u.SubmenuItemAction) {
- var p = this._getMenuActions(e, h.item.submenu);
- p.length > 0 && (n.push(new f.ContextSubMenu(h.label, p)), l++)
- } else n.push(h), l++
- }
- l && n.push(new o.Separator)
- }
- return n.length && n.pop(), n
- }, e.prototype._doShowContextMenu = function (e, t) {
- var n = this;
- if (void 0 === t && (t = null), this._editor.hasModel()) {
- var r = this._editor.getOption(44);
- if (this._editor.updateOptions({hover: {enabled: !1}}), !t) {
- this._editor.revealPosition(this._editor.getPosition(), 1), this._editor.render();
- var s = this._editor.getScrolledVisiblePosition(this._editor.getPosition()),
- a = i.getDomNodePagePosition(this._editor.getDomNode()), l = a.left + s.left,
- u = a.top + s.top + s.height;
- t = {x: l, y: u}
- }
- this._contextMenuIsBeingShownCount++, this._contextMenuService.showContextMenu({
- getAnchor: function () {
- return t
- }, getActions: function () {
- return e
- }, getActionViewItem: function (e) {
- var t = n._keybindingFor(e);
- if (t) return new o.ActionViewItem(e, e, {label: !0, keybinding: t.getLabel(), isMenu: !0});
- var i = e;
- return "function" == typeof i.getActionViewItem ? i.getActionViewItem() : new o.ActionViewItem(e, e, {
- icon: !0,
- label: !0,
- isMenu: !0
- })
- }, getKeyBinding: function (e) {
- return n._keybindingFor(e)
- }, onHide: function (e) {
- n._contextMenuIsBeingShownCount--, n._editor.focus(), n._editor.updateOptions({hover: r})
- }
- })
- }
- }, e.prototype._keybindingFor = function (e) {
- return this._keybindingService.lookupKeybinding(e.id)
- },
- e.prototype.dispose = function () {
- this._contextMenuIsBeingShownCount > 0 && this._contextViewService.hideContextView(), this._toDispose.dispose()
- }, e.ID = "editor.contrib.contextmenu", e = h([g(1, c.IContextMenuService), g(2, c.IContextViewService), g(3, d.IContextKeyService), g(4, p.IKeybindingService), g(5, u.IMenuService)], e)
- }();
- t.ContextMenuController = m;
- var v = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.showContextMenu",
- label: n.localize(0, null),
- alias: "Show Editor Context Menu",
- precondition: void 0,
- kbOpts: {kbExpr: l.EditorContextKeys.textInputFocus, primary: 1092, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- m.get(t).showContextMenu()
- }, t
- }(a.EditorAction);
- a.registerEditorContribution(m.ID, m), a.registerEditorAction(v)
- })), define(n[532], i([0, 1, 436, 2, 12, 23]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e) {
- this.selections = e
- }
- return e.prototype.equals = function (e) {
- var t = this.selections.length;
- if (t !== e.selections.length) return !1
- ;
- for (var n = 0; n < t; n++) if (!this.selections[n].equalsSelection(e.selections[n])) return !1;
- return !0
- }, e
- }(), l = function (e, t, n) {
- this.cursorState = e, this.scrollTop = t, this.scrollLeft = n
- }, u = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._editor = t, n._isCursorUndoRedo = !1, n._undoStack = [], n._redoStack = [], n._register(t.onDidChangeModel((function (e) {
- n._undoStack = [], n._redoStack = []
- }))), n._register(t.onDidChangeModelContent((function (e) {
- n._undoStack = [], n._redoStack = []
- }))), n._register(t.onDidChangeCursorSelection((function (e) {
- if (!n._isCursorUndoRedo && e.oldSelections && e.oldModelVersionId === e.modelVersionId) {
- var i = new a(e.oldSelections);
- n._undoStack.length > 0 && n._undoStack[n._undoStack.length - 1].cursorState.equals(i) || (n._undoStack.push(new l(i, t.getScrollTop(), t.getScrollLeft())), n._redoStack = [], n._undoStack.length > 50 && n._undoStack.shift())
- }
- }))), n
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.cursorUndo = function () {
- this._editor.hasModel() && 0 !== this._undoStack.length && (this._redoStack.push(new l(new a(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())), this._applyState(this._undoStack.pop()))
- }, t.prototype.cursorRedo = function () {
- this._editor.hasModel() && 0 !== this._redoStack.length && (this._undoStack.push(new l(new a(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())), this._applyState(this._redoStack.pop()))
- }, t.prototype._applyState = function (e) {
- this._isCursorUndoRedo = !0, this._editor.setSelections(e.cursorState.selections), this._editor.setScrollPosition({
- scrollTop: e.scrollTop,
- scrollLeft: e.scrollLeft
- }), this._isCursorUndoRedo = !1
- }, t.ID = "editor.contrib.cursorUndoRedoController", t
- }(i.Disposable);
- t.CursorUndoRedoController = u;
- var d = function (e) {
- function t() {
- return e.call(this, {
- id: "cursorUndo",
- label: n.localize(0, null),
- alias: "Cursor Undo",
- precondition: void 0,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 2099, weight: 100}
- }) || this
- }
- return r(t, e),
- t.prototype.run = function (e, t, n) {
- u.get(t).cursorUndo()
- }, t
- }(o.EditorAction);
- t.CursorUndo = d;
- var c = function (e) {
- function t() {
- return e.call(this, {
- id: "cursorRedo",
- label: n.localize(1, null),
- alias: "Cursor Redo",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- u.get(t).cursorRedo()
- }, t
- }(o.EditorAction);
- t.CursorRedo = c, o.registerEditorContribution(u.ID, u), o.registerEditorAction(d), o.registerEditorAction(c)
- })), define(n[533], i([0, 1, 2, 16, 12, 13, 3, 22, 377, 30, 307]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- function c(e) {
- return i.isMacintosh ? e.altKey : e.ctrlKey
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var h = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._editor = t, n._register(n._editor.onMouseDown((function (e) {
- return n._onEditorMouseDown(e)
- }))), n._register(n._editor.onMouseUp((function (e) {
- return n._onEditorMouseUp(e)
- }))), n._register(n._editor.onMouseDrag((function (e) {
- return n._onEditorMouseDrag(e)
- }))), n._register(n._editor.onMouseDrop((function (e) {
- return n._onEditorMouseDrop(e)
- }))),
- n._register(n._editor.onKeyDown((function (e) {
- return n.onEditorKeyDown(e)
- }))), n._register(n._editor.onKeyUp((function (e) {
- return n.onEditorKeyUp(e)
- }))), n._register(n._editor.onDidBlurEditorWidget((function () {
- return n.onEditorBlur()
- }))), n._dndDecorationIds = [], n._mouseDown = !1, n._modifierPressed = !1, n._dragSelection = null, n
- }
- return r(t, e), t.prototype.onEditorBlur = function () {
- this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1, this._modifierPressed = !1
- }, t.prototype.onEditorKeyDown = function (e) {
- this._editor.getOption(24) && (c(e) && (this._modifierPressed = !0), this._mouseDown && c(e) && this._editor.updateOptions({mouseStyle: "copy"}))
- }, t.prototype.onEditorKeyUp = function (e) {
- this._editor.getOption(24) && (c(e) && (this._modifierPressed = !1), this._mouseDown && e.keyCode === t.TRIGGER_KEY_VALUE && this._editor.updateOptions({mouseStyle: "default"}))
- }, t.prototype._onEditorMouseDown = function (e) {
- this._mouseDown = !0
- }, t.prototype._onEditorMouseUp = function (e) {
- this._mouseDown = !1, this._editor.updateOptions({mouseStyle: "text"})
- },
- t.prototype._onEditorMouseDrag = function (e) {
- var t = e.target;
- if (null === this._dragSelection) {
- var n = (this._editor.getSelections() || []).filter((function (e) {
- return t.position && e.containsPosition(t.position)
- }));
- if (1 !== n.length) return;
- this._dragSelection = n[0]
- }
- c(e.event) ? this._editor.updateOptions({mouseStyle: "copy"}) : this._editor.updateOptions({mouseStyle: "default"}), t.position && (this._dragSelection.containsPosition(t.position) ? this._removeDecoration() : this.showAt(t.position))
- }, t.prototype._onEditorMouseDrop = function (e) {
- if (e.target && (this._hitContent(e.target) || this._hitMargin(e.target)) && e.target.position) {
- var n = new s.Position(e.target.position.lineNumber, e.target.position.column);
- if (null === this._dragSelection) {
- var i = null;
- if (e.event.shiftKey) {
- var o = this._editor.getSelection();
- if (o) {
- var r = o.selectionStartLineNumber, a = o.selectionStartColumn;
- i = [new l.Selection(r, a, n.lineNumber, n.column)]
- }
- } else i = (this._editor.getSelections() || []).map((function (e) {
- return e.containsPosition(n) ? new l.Selection(n.lineNumber, n.column, n.lineNumber, n.column) : e
- }));
- this._editor.setSelections(i || [], "mouse")
- } else (!this._dragSelection.containsPosition(n) || (c(e.event) || this._modifierPressed) && (this._dragSelection.getEndPosition().equals(n) || this._dragSelection.getStartPosition().equals(n))) && (this._editor.pushUndoStop(), this._editor.executeCommand(t.ID, new u.DragAndDropCommand(this._dragSelection, n, c(e.event) || this._modifierPressed)), this._editor.pushUndoStop())
- }
- this._editor.updateOptions({mouseStyle: "text"}), this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1
- }, t.prototype.showAt = function (e) {
- var n = [{
- range: new a.Range(e.lineNumber, e.column, e.lineNumber, e.column),
- options: t._DECORATION_OPTIONS
- }];
- this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, n), this._editor.revealPosition(e, 1)
- }, t.prototype._removeDecoration = function () {
- this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, [])
- }, t.prototype._hitContent = function (e) {
- return 6 === e.type || 7 === e.type
- }, t.prototype._hitMargin = function (e) {
- return 2 === e.type || 3 === e.type || 4 === e.type
- }, t.prototype.dispose = function () {
- this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1, this._modifierPressed = !1, e.prototype.dispose.call(this)
- }, t.ID = "editor.contrib.dragAndDrop", t.TRIGGER_KEY_VALUE = i.isMacintosh ? 6 : 5, t._DECORATION_OPTIONS = d.ModelDecorationOptions.register({className: "dnd-target"}), t
- }(n.Disposable);
- t.DragAndDropController = h, o.registerEditorContribution(h.ID, h)
- })), define(n[534], i([0, 1, 441, 12, 105]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.fontZoomIn",
- label: n.localize(0, null),
- alias: "Editor Font Zoom In",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel() + 1)
- }, t
- }(i.EditorAction), a = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.fontZoomOut", label: n.localize(1, null),
- alias: "Editor Font Zoom Out", precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel() - 1)
- }, t
- }(i.EditorAction), l = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.fontZoomReset",
- label: n.localize(2, null),
- alias: "Editor Font Zoom Reset",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- o.EditorZoom.setZoomLevel(0)
- }, t
- }(i.EditorAction);
- i.registerEditorAction(s), i.registerEditorAction(a), i.registerEditorAction(l)
- })), define(n[535], i([0, 1, 50, 19, 26, 10, 25, 67, 108, 13, 3, 22, 17, 62, 49, 198, 442, 479, 11, 76, 29, 21]), (function (e, t, n, i, o, r, s, a, l, u, h, p, g, f, m, v, _, y, C, b, S, w) {
- "use strict";
- function E(e) {
- if ((e = e.filter((function (e) {
- return e.range
- }))).length) {
- for (var t = e[0].range, i = 1; i < e.length; i++) t = h.Range.plusRange(t, e[i].range);
- var o = t.startLineNumber, r = t.endLineNumber
- ;o === r ? 1 === e.length ? n.alert(_.localize(0, null, o)) : n.alert(_.localize(1, null, e.length, o)) : 1 === e.length ? n.alert(_.localize(2, null, o, r)) : n.alert(_.localize(3, null, e.length, o, r))
- }
- }
- function L(e) {
- for (var t = [], n = new Set, i = 0, o = g.DocumentFormattingEditProviderRegistry.ordered(e); i < o.length; i++) {
- var r = o[i];
- t.push(r), r.extensionId && n.add(y.ExtensionIdentifier.toKey(r.extensionId))
- }
- for (var s = function (e) {
- if (e.extensionId) {
- if (n.has(y.ExtensionIdentifier.toKey(e.extensionId))) return "continue";
- n.add(y.ExtensionIdentifier.toKey(e.extensionId))
- }
- t.push({
- displayName: e.displayName,
- extensionId: e.extensionId,
- provideDocumentFormattingEdits: function (t, n, i) {
- return e.provideDocumentRangeFormattingEdits(t, t.getFullModelRange(), n, i)
- }
- })
- }, a = 0, l = g.DocumentRangeFormattingEditProviderRegistry.ordered(e); a < l.length; a++) {
- s(r = l[a])
- }
- return t
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.alertFormattingEdits = E, t.getRealAndSyntheticDocumentFormattersOrdered = L;
- var D = function () {
- function e() {
- }
- return e.select = function (t, n, i) {
- return d(this, void 0, void 0, (function () {
- var o;
- return c(this, (function (r) {
- switch (r.label) {
- case 0:
- return 0 === t.length ? [2, void 0] : (o = e._selectors.iterator().next().value) ? [4, o(t, n, i)] : [3, 2];
- case 1:
- return [2, r.sent()];
- case 2:
- return [2, t[0]]
- }
- }))
- }))
- }, e._selectors = new b.LinkedList, e
- }();
- function N(e, t, n, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, u, d, g, m, _;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- r = e.get(f.IEditorWorkerService), l.isCodeEditor(n) ? (s = n.getModel(), u = new a.EditorStateCancellationTokenSource(n, 5, o)) : (s = n, u = new a.TextModelCancellationTokenSource(n, o)), c.label = 1;
- case 1:
- return c.trys.push([1, , 4, 5]), [4, t.provideDocumentRangeFormattingEdits(s, i, s.getFormattingOptions(), u.token)];
- case 2:
- return g = c.sent(), [4, r.computeMoreMinimalEdits(s.uri, g)];
- case 3:
- return d = c.sent(), u.token.isCancellationRequested ? [2, !0] : [3, 5];
- case 4:
- return u.dispose(), [7];
- case 5:
- return d && 0 !== d.length ? (l.isCodeEditor(n) ? (v.FormattingEdit.execute(n, d), E(d), n.pushUndoStop(),
- n.revealPositionInCenterIfOutsideViewport(n.getPosition(), 1)) : (m = d[0].range, _ = new p.Selection(m.startLineNumber, m.startColumn, m.endLineNumber, m.endColumn), s.pushEditOperations([_], d.map((function (e) {
- return {text: e.text, range: h.Range.lift(e.range), forceMoveMarkers: !0}
- })), (function (e) {
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t].range;
- if (h.Range.areIntersectingOrTouching(i, _)) return [new p.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn)]
- }
- return null
- }))), [2, !0]) : [2, !1]
- }
- }))
- }))
- }
- function x(e, t, n, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, u, d, g, m, _;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- r = e.get(f.IEditorWorkerService), l.isCodeEditor(n) ? (s = n.getModel(), u = new a.EditorStateCancellationTokenSource(n, 5, o)) : (s = n, u = new a.TextModelCancellationTokenSource(n, o)), c.label = 1;
- case 1:
- return c.trys.push([1, , 4, 5]), [4, t.provideDocumentFormattingEdits(s, s.getFormattingOptions(), u.token)];
- case 2:
- return g = c.sent(), [4, r.computeMoreMinimalEdits(s.uri, g)];
- case 3:
- return d = c.sent(),
- u.token.isCancellationRequested ? [2, !0] : [3, 5];
- case 4:
- return u.dispose(), [7];
- case 5:
- return d && 0 !== d.length ? (l.isCodeEditor(n) ? (v.FormattingEdit.execute(n, d), 2 !== i && (E(d), n.pushUndoStop(), n.revealPositionInCenterIfOutsideViewport(n.getPosition(), 1))) : (m = d[0].range, _ = new p.Selection(m.startLineNumber, m.startColumn, m.endLineNumber, m.endColumn), s.pushEditOperations([_], d.map((function (e) {
- return {text: e.text, range: h.Range.lift(e.range), forceMoveMarkers: !0}
- })), (function (e) {
- for (var t = 0, n = e; t < n.length; t++) {
- var i = n[t].range;
- if (h.Range.areIntersectingOrTouching(i, _)) return [new p.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn)]
- }
- return null
- }))), [2, !0]) : [2, !1]
- }
- }))
- }))
- }
- function I(e, t, n, o, s) {
- return d(this, void 0, void 0, (function () {
- var a, l, u, d, h;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- a = g.DocumentRangeFormattingEditProviderRegistry.ordered(t), l = 0, u = a, c.label = 1;
- case 1:
- return l < u.length ? (d = u[l],
- [4, Promise.resolve(d.provideDocumentRangeFormattingEdits(t, n, o, s)).catch(r.onUnexpectedExternalError)]) : [3, 5];
- case 2:
- return h = c.sent(), i.isNonEmptyArray(h) ? [4, e.computeMoreMinimalEdits(t.uri, h)] : [3, 4];
- case 3:
- return [2, c.sent()];
- case 4:
- return l++, [3, 1];
- case 5:
- return [2, void 0]
- }
- }))
- }))
- }
- function M(e, t, n, o) {
- return d(this, void 0, void 0, (function () {
- var s, a, l, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- s = L(t), a = 0, l = s, c.label = 1;
- case 1:
- return a < l.length ? (u = l[a], [4, Promise.resolve(u.provideDocumentFormattingEdits(t, n, o)).catch(r.onUnexpectedExternalError)]) : [3, 5];
- case 2:
- return d = c.sent(), i.isNonEmptyArray(d) ? [4, e.computeMoreMinimalEdits(t.uri, d)] : [3, 4];
- case 3:
- return [2, c.sent()];
- case 4:
- return a++, [3, 1];
- case 5:
- return [2, void 0]
- }
- }))
- }))
- }
- function k(e, t, n, i, s) {
- var a = g.OnTypeFormattingEditProviderRegistry.ordered(t)
- ;
- return 0 === a.length ? Promise.resolve(void 0) : a[0].autoFormatTriggerCharacters.indexOf(i) < 0 ? Promise.resolve(void 0) : Promise.resolve(a[0].provideOnTypeFormattingEdits(t, n, i, s, o.CancellationToken.None)).catch(r.onUnexpectedExternalError).then((function (n) {
- return e.computeMoreMinimalEdits(t.uri, n)
- }))
- }
- t.FormattingConflicts = D, t.formatDocumentRangeWithSelectedProvider = function (e, t, n, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, a, u;
- return c(this, (function (d) {
- switch (d.label) {
- case 0:
- return r = e.get(C.IInstantiationService), s = l.isCodeEditor(t) ? t.getModel() : t, a = g.DocumentRangeFormattingEditProviderRegistry.ordered(s), [4, D.select(a, s, i)];
- case 1:
- return (u = d.sent()) ? [4, r.invokeFunction(N, u, t, n, o)] : [3, 3];
- case 2:
- d.sent(), d.label = 3;
- case 3:
- return [2]
- }
- }))
- }))
- }, t.formatDocumentRangeWithProvider = N, t.formatDocumentWithSelectedProvider = function (e, t, n, i) {
- return d(this, void 0, void 0, (function () {
- var o, r, s, a;
- return c(this, (function (u) {
- switch (u.label) {
- case 0:
- return o = e.get(C.IInstantiationService), r = l.isCodeEditor(t) ? t.getModel() : t,
- s = L(r), [4, D.select(s, r, n)];
- case 1:
- return (a = u.sent()) ? [4, o.invokeFunction(x, a, t, n, i)] : [3, 3];
- case 2:
- u.sent(), u.label = 3;
- case 3:
- return [2]
- }
- }))
- }))
- }, t.formatDocumentWithProvider = x, t.getDocumentRangeFormattingEditsUntilResult = I, t.getDocumentFormattingEditsUntilResult = M, t.getOnTypeFormattingEdits = k, S.CommandsRegistry.registerCommand("_executeFormatRangeProvider", (function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- var i = t[0], a = t[1], l = t[2];
- w.assertType(s.URI.isUri(i)), w.assertType(h.Range.isIRange(a));
- var u = e.get(m.IModelService).getModel(i);
- if (!u) throw r.illegalArgument("resource");
- return I(e.get(f.IEditorWorkerService), u, h.Range.lift(a), l, o.CancellationToken.None)
- })), S.CommandsRegistry.registerCommand("_executeFormatDocumentProvider", (function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- var i = t[0], a = t[1];
- w.assertType(s.URI.isUri(i));
- var l = e.get(m.IModelService).getModel(i);
- if (!l) throw r.illegalArgument("resource")
- ;
- return M(e.get(f.IEditorWorkerService), l, a, o.CancellationToken.None)
- })), S.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider", (function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- var i = t[0], o = t[1], a = t[2], l = t[3];
- w.assertType(s.URI.isUri(i)), w.assertType(u.Position.isIPosition(o)), w.assertType("string" == typeof a);
- var d = e.get(m.IModelService).getModel(i);
- if (!d) throw r.illegalArgument("resource");
- return k(e.get(f.IEditorWorkerService), d, u.Position.lift(o), a, l)
- }))
- })), define(n[536], i([0, 1, 19, 26, 36, 2, 12, 32, 79, 3, 23, 17, 62, 535, 198, 443, 29, 18, 11, 10]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var L = function () {
- function e(e, t) {
- var n = this;
- this._workerService = t, this._callOnDispose = new s.DisposableStore, this._callOnModel = new s.DisposableStore, this._editor = e, this._callOnDispose.add(e.onDidChangeConfiguration((function () {
- return n._update()
- }))), this._callOnDispose.add(e.onDidChangeModel((function () {
- return n._update()
- }))),
- this._callOnDispose.add(e.onDidChangeModelLanguage((function () {
- return n._update()
- }))), this._callOnDispose.add(m.OnTypeFormattingEditProviderRegistry.onDidChange(this._update, this))
- }
- return e.prototype.dispose = function () {
- this._callOnDispose.dispose(), this._callOnModel.dispose()
- }, e.prototype._update = function () {
- var e = this;
- if (this._callOnModel.clear(), this._editor.getOption(39) && this._editor.hasModel()) {
- var t = this._editor.getModel(), n = m.OnTypeFormattingEditProviderRegistry.ordered(t)[0];
- if (n && n.autoFormatTriggerCharacters) {
- for (var i = new u.CharacterSet, o = 0, r = n.autoFormatTriggerCharacters; o < r.length; o++) {
- var s = r[o];
- i.add(s.charCodeAt(0))
- }
- this._callOnModel.add(this._editor.onDidType((function (t) {
- var n = t.charCodeAt(t.length - 1);
- i.has(n) && e._trigger(String.fromCharCode(n))
- })))
- }
- }
- }, e.prototype._trigger = function (e) {
- var t = this;
- if (this._editor.hasModel() && !(this._editor.getSelections().length > 1)) {
- var i = this._editor.getModel(), o = this._editor.getPosition(), r = !1,
- s = this._editor.onDidChangeModelContent((function (e) {
- if (e.isFlush) return r = !0, void s.dispose();
- for (var t = 0, n = e.changes.length; t < n; t++) {
- if (e.changes[t].range.endLineNumber <= o.lineNumber) return r = !0, void s.dispose()
- }
- }));
- _.getOnTypeFormattingEdits(this._workerService, i, o, e, i.getFormattingOptions()).then((function (e) {
- s.dispose(), r || n.isNonEmptyArray(e) && (y.FormattingEdit.execute(t._editor, e), _.alertFormattingEdits(e))
- }), (function (e) {
- throw s.dispose(), e
- }))
- }
- }, e.ID = "editor.contrib.autoFormat", e = h([g(1, v.IEditorWorkerService)], e)
- }(), D = function () {
- function e(e, t) {
- var n = this;
- this.editor = e, this._instantiationService = t, this._callOnDispose = new s.DisposableStore, this._callOnModel = new s.DisposableStore, this._callOnDispose.add(e.onDidChangeConfiguration((function () {
- return n._update()
- }))), this._callOnDispose.add(e.onDidChangeModel((function () {
- return n._update()
- }))), this._callOnDispose.add(e.onDidChangeModelLanguage((function () {
- return n._update()
- }))), this._callOnDispose.add(m.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update, this))
- }
- return e.prototype.dispose = function () {
- this._callOnDispose.dispose(), this._callOnModel.dispose()
- }, e.prototype._update = function () {
- var e = this;
- this._callOnModel.clear(), this.editor.getOption(38) && this.editor.hasModel() && m.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel()) && this._callOnModel.add(this.editor.onDidPaste((function (t) {
- var n = t.range;
- return e._trigger(n)
- })))
- }, e.prototype._trigger = function (e) {
- this.editor.hasModel() && (this.editor.getSelections().length > 1 || this._instantiationService.invokeFunction(_.formatDocumentRangeWithSelectedProvider, this.editor, e, 2, i.CancellationToken.None).catch(E.onUnexpectedError))
- }, e.ID = "editor.contrib.formatOnPaste", e = h([g(1, w.IInstantiationService)], e)
- }(), N = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.formatDocument",
- label: C.localize(0, null),
- alias: "Format Document",
- precondition: S.ContextKeyExpr.and(f.EditorContextKeys.writable, f.EditorContextKeys.hasDocumentFormattingProvider),
- kbOpts: {
- kbExpr: S.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.hasDocumentFormattingProvider),
- primary: 1572,
- linux: {primary: 3111},
- weight: 100
- },
- contextMenuOpts: {
- when: f.EditorContextKeys.hasDocumentFormattingProvider,
- group: "1_modification",
- order: 1.3
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (n) {
- switch (n.label) {
- case 0:
- return t.hasModel() ? [4, e.get(w.IInstantiationService).invokeFunction(_.formatDocumentWithSelectedProvider, t, 1, i.CancellationToken.None)] : [3, 2];
- case 1:
- n.sent(), n.label = 2;
- case 2:
- return [2]
- }
- }))
- }))
- }, t
- }(a.EditorAction), x = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.formatSelection",
- label: C.localize(1, null),
- alias: "Format Selection",
- precondition: S.ContextKeyExpr.and(f.EditorContextKeys.writable, f.EditorContextKeys.hasDocumentSelectionFormattingProvider),
- kbOpts: {
- kbExpr: S.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.hasDocumentSelectionFormattingProvider),
- primary: o.KeyChord(2089, 2084), weight: 100
- },
- contextMenuOpts: {
- when: S.ContextKeyExpr.and(f.EditorContextKeys.hasDocumentSelectionFormattingProvider, f.EditorContextKeys.hasNonEmptySelection),
- group: "1_modification",
- order: 1.31
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, o, r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- return t.hasModel() ? (n = e.get(w.IInstantiationService), o = t.getModel(), (r = t.getSelection()).isEmpty() && (r = new p.Range(r.startLineNumber, 1, r.startLineNumber, o.getLineMaxColumn(r.startLineNumber))), [4, n.invokeFunction(_.formatDocumentRangeWithSelectedProvider, t, r, 1, i.CancellationToken.None)]) : [2];
- case 1:
- return s.sent(), [2]
- }
- }))
- }))
- }, t
- }(a.EditorAction);
- a.registerEditorContribution(L.ID, L), a.registerEditorContribution(D.ID, D), a.registerEditorAction(N), a.registerEditorAction(x), b.CommandsRegistry.registerCommand("editor.action.format", (function (e) {
- return d(void 0, void 0, void 0, (function () {
- var t, n;
- return c(this, (function (i) {
- switch (i.label) {
- case 0:
- return (t = e.get(l.ICodeEditorService).getFocusedCodeEditor()) && t.hasModel() ? (n = e.get(b.ICommandService), t.getSelection().isEmpty() ? [4, n.executeCommand("editor.action.formatDocument")] : [3, 2]) : [2];
- case 1:
- return i.sent(), [3, 4];
- case 2:
- return [4, n.executeCommand("editor.action.formatSelection")];
- case 3:
- i.sent(), i.label = 4;
- case 4:
- return [2]
- }
- }))
- }))
- }))
- })), define(n[224], i([0, 1, 19, 26, 10, 12, 17]), (function (e, t, n, i, o, r, s) {
- "use strict";
- function a(e, t, i, r) {
- var s = i.ordered(e).map((function (n) {
- return Promise.resolve(r(n, e, t)).then(void 0, (function (e) {
- o.onUnexpectedExternalError(e)
- }))
- }));
- return Promise.all(s).then(n.flatten).then(n.coalesce)
- }
- function l(e, t, n) {
- return a(e, t, s.DefinitionProviderRegistry, (function (e, t, i) {
- return e.provideDefinition(t, i, n)
- }))
- }
- function u(e, t, n) {
- return a(e, t, s.DeclarationProviderRegistry, (function (e, t, i) {
- return e.provideDeclaration(t, i, n)
- }))
- }
- function h(e, t, n) {
- return a(e, t, s.ImplementationProviderRegistry, (function (e, t, i) {
- return e.provideImplementation(t, i, n)
- }))
- }
- function p(e, t, n) {
- return a(e, t, s.TypeDefinitionProviderRegistry, (function (e, t, i) {
- return e.provideTypeDefinition(t, i, n)
- }))
- }
- function g(e, t, n, i) {
- var o = this;
- return a(e, t, s.ReferenceProviderRegistry, (function (e, t, r) {
- return d(o, void 0, void 0, (function () {
- var o, s;
- return c(this, (function (a) {
- switch (a.label) {
- case 0:
- return [4, e.provideReferences(t, r, {includeDeclaration: !0}, i)];
- case 1:
- return o = a.sent(), n && o && 2 === o.length ? [4, e.provideReferences(t, r, {includeDeclaration: !1}, i)] : [2, o];
- case 2:
- return (s = a.sent()) && 1 === s.length ? [2, s] : [2, o]
- }
- }))
- }))
- }))
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getDefinitionsAtPosition = l, t.getDeclarationsAtPosition = u, t.getImplementationsAtPosition = h, t.getTypeDefinitionsAtPosition = p, t.getReferencesAtPosition = g, r.registerModelAndPositionCommand("_executeDefinitionProvider", (function (e, t) {
- return l(e, t, i.CancellationToken.None)
- })), r.registerModelAndPositionCommand("_executeDeclarationProvider", (function (e, t) {
- return u(e, t, i.CancellationToken.None)
- })),
- r.registerModelAndPositionCommand("_executeImplementationProvider", (function (e, t) {
- return h(e, t, i.CancellationToken.None)
- })), r.registerModelAndPositionCommand("_executeTypeDefinitionProvider", (function (e, t) {
- return p(e, t, i.CancellationToken.None)
- })), r.registerModelAndPositionCommand("_executeReferenceProvider", (function (e, t) {
- return g(e, t, !1, i.CancellationToken.None)
- }))
- })), define(n[537], i([0, 1, 18, 11, 83, 86, 12, 32, 3, 2, 4, 452, 34, 35, 39]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ctxHasSymbols = new n.RawContextKey("hasSymbols", !1), t.ISymbolNavigationService = i.createDecorator("ISymbolNavigationService");
- var _ = function () {
- function e(e, n, i, o) {
- this._editorService = n, this._notificationService = i, this._keybindingService = o, this._currentModel = void 0, this._currentIdx = -1, this._ignoreEditorChange = !1, this._ctxHasSymbols = t.ctxHasSymbols.bindTo(e)
- }
- return e.prototype.reset = function () {
- this._ctxHasSymbols.reset(), d.dispose(this._currentState), d.dispose(this._currentMessage),
- this._currentModel = void 0, this._currentIdx = -1
- }, e.prototype.put = function (e) {
- var t = this, n = e.parent.parent;
- if (n.references.length <= 1) this.reset(); else {
- this._currentModel = n, this._currentIdx = n.references.indexOf(e), this._ctxHasSymbols.set(!0), this._showMessage();
- var i = new y(this._editorService), o = i.onDidChange((function (e) {
- if (!t._ignoreEditorChange) {
- var i = t._editorService.getActiveCodeEditor();
- if (i) {
- var o = i.getModel(), r = i.getPosition();
- if (o && r) {
- for (var s = !1, a = !1, l = 0, d = n.references; l < d.length; l++) {
- var c = d[l];
- if (v.isEqual(c.uri, o.uri)) s = !0, a = a || u.Range.containsPosition(c.range, r); else if (s) break
- }
- s && a || t.reset()
- }
- }
- }
- }));
- this._currentState = d.combinedDisposable(i, o)
- }
- }, e.prototype.revealNext = function (e) {
- var t = this;
- if (!this._currentModel) return Promise.resolve();
- this._currentIdx += 1, this._currentIdx %= this._currentModel.references.length;
- var n = this._currentModel.references[this._currentIdx];
- return this._showMessage(), this._ignoreEditorChange = !0, this._editorService.openCodeEditor({
- resource: n.uri, options: {
- selection: u.Range.collapseToStart(n.range), revealInCenterIfOutsideViewport: !0
- }
- }, e).finally((function () {
- t._ignoreEditorChange = !1
- }))
- }, e.prototype._showMessage = function () {
- d.dispose(this._currentMessage);
- var e = this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),
- t = e ? p.localize(0, null, this._currentIdx + 1, this._currentModel.references.length, e.getLabel()) : p.localize(1, null, this._currentIdx + 1, this._currentModel.references.length);
- this._currentMessage = this._notificationService.status(t)
- }, e = h([g(0, n.IContextKeyService), g(1, l.ICodeEditorService), g(2, m.INotificationService), g(3, f.IKeybindingService)], e)
- }();
- o.registerSingleton(t.ISymbolNavigationService, _, !0), a.registerEditorCommand(new (function (e) {
- function n() {
- return e.call(this, {
- id: "editor.gotoNextSymbolFromResult",
- precondition: t.ctxHasSymbols,
- kbOpts: {weight: 100, primary: 70}
- }) || this
- }
- return r(n, e), n.prototype.runEditorCommand = function (e, n) {
- return e.get(t.ISymbolNavigationService).revealNext(n)
- }, n
- }(a.EditorCommand))),
- s.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "editor.gotoNextSymbolFromResult.cancel",
- weight: 100,
- when: t.ctxHasSymbols,
- primary: 9,
- handler: function (e) {
- e.get(t.ISymbolNavigationService).reset()
- }
- });
- var y = function () {
- function e(e) {
- this._listener = new Map, this._disposables = new d.DisposableStore, this._onDidChange = new c.Emitter, this.onDidChange = this._onDidChange.event, this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor, this)), this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor, this)), e.listCodeEditors().forEach(this._onDidAddEditor, this)
- }
- return e.prototype.dispose = function () {
- this._disposables.dispose(), this._onDidChange.dispose(), this._listener.forEach(d.dispose)
- }, e.prototype._onDidAddEditor = function (e) {
- var t = this;
- this._listener.set(e, d.combinedDisposable(e.onDidChangeCursorPosition((function (n) {
- return t._onDidChange.fire({editor: e})
- })), e.onDidChangeModelContent((function (n) {
- return t._onDidChange.fire({editor: e})
- }))))
- }, e.prototype._onDidRemoveEditor = function (e) {
- d.dispose(this._listener.get(e)), this._listener.delete(e)
- }, e = h([g(0, l.ICodeEditorService)], e)
- }()
- })), define(n[538], i([0, 1, 19, 26, 10, 12, 17]), (function (e, t, n, i, o, r, s) {
- "use strict";
- function a(e, t, i) {
- var r = s.HoverProviderRegistry.ordered(e).map((function (n) {
- return Promise.resolve(n.provideHover(e, t, i)).then((function (e) {
- return e && (n = void 0 !== (t = e).range, i = void 0 !== t.contents && t.contents && t.contents.length > 0, n && i) ? e : void 0;
- var t, n, i
- }), (function (e) {
- o.onUnexpectedExternalError(e)
- }))
- }));
- return Promise.all(r).then(n.coalesce)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.getHover = a, r.registerModelAndPositionCommand("_executeHoverProvider", (function (e, t) {
- return a(e, t, i.CancellationToken.None)
- }))
- })), define(n[539], i([0, 1, 456, 36, 164, 12, 80, 338, 159, 58, 13, 3, 22, 23, 386, 492, 387]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var _ = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i.down = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- for (var n = [], i = 0, o = t.getSelections() || []; i < o.length; i++) {
- var r = o[i];
- n.push(new f.CopyLinesCommand(r, this.down))
- }
- t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()
- }, t
- }(s.EditorAction), y = function (e) {
- function t() {
- return e.call(this, !1, {
- id: "editor.action.copyLinesUpAction",
- label: n.localize(0, null),
- alias: "Copy Line Up",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: g.EditorContextKeys.editorTextFocus,
- primary: 1552,
- linux: {primary: 3600},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "2_line", title: n.localize(1, null), order: 1}
- }) || this
- }
- return r(t, e), t
- }(_), C = function (e) {
- function t() {
- return e.call(this, !0, {
- id: "editor.action.copyLinesDownAction",
- label: n.localize(2, null),
- alias: "Copy Line Down",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: g.EditorContextKeys.editorTextFocus,
- primary: 1554,
- linux: {primary: 3602},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "2_line", title: n.localize(3, null), order: 2}
- }) || this
- }
- return r(t, e), t
- }(_), b = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.duplicateSelection",
- label: n.localize(4, null),
- alias: "Duplicate Selection",
- precondition: g.EditorContextKeys.writable,
- menuOpts: {menuId: 25, group: "2_line", title: n.localize(5, null), order: 5}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- if (t.hasModel()) {
- for (var i = [], o = t.getSelections(), r = t.getModel(), s = 0, l = o; s < l.length; s++) {
- var u = l[s];
- if (u.isEmpty()) i.push(new f.CopyLinesCommand(u, !0)); else {
- var d = new p.Selection(u.endLineNumber, u.endColumn, u.endLineNumber, u.endColumn);
- i.push(new a.ReplaceCommandThatSelectsText(d, r.getValueInRange(u)))
- }
- }
- t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop()
- }
- }, t
- }(s.EditorAction);
- t.DuplicateSelectionAction = b;
- var S = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i.down = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- for (var n = [], i = t.getSelections() || [], o = t.getOption(8), r = 0, s = i; r < s.length; r++) {
- var a = s[r];
- n.push(new m.MoveLinesCommand(a, this.down, o))
- }
- t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()
- }, t
- }(s.EditorAction), w = function (e) {
- function t() {
- return e.call(this, !1, {
- id: "editor.action.moveLinesUpAction",
- label: n.localize(6, null),
- alias: "Move Line Up",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: g.EditorContextKeys.editorTextFocus,
- primary: 528,
- linux: {primary: 528},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "2_line", title: n.localize(7, null), order: 3}
- }) || this
- }
- return r(t, e), t
- }(S), E = function (e) {
- function t() {
- return e.call(this, !0, {
- id: "editor.action.moveLinesDownAction",
- label: n.localize(8, null),
- alias: "Move Line Down",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: g.EditorContextKeys.editorTextFocus,
- primary: 530,
- linux: {primary: 530},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "2_line", title: n.localize(9, null), order: 4}
- }) || this
- }
- return r(t, e), t
- }(S), L = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i.descending = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- for (var n = t.getSelections() || [], i = 0, o = n; i < o.length; i++) {
- var r = o[i];
- if (!v.SortLinesCommand.canRun(t.getModel(), r, this.descending)) return
- }
- for (var s = [], a = 0, l = n.length; a < l; a++) s[a] = new v.SortLinesCommand(n[a], this.descending);
- t.pushUndoStop(), t.executeCommands(this.id, s), t.pushUndoStop()
- }, t
- }(s.EditorAction);
- t.AbstractSortLinesAction = L;
- var D = function (e) {
- function t() {
- return e.call(this, !1, {
- id: "editor.action.sortLinesAscending",
- label: n.localize(10, null),
- alias: "Sort Lines Ascending",
- precondition: g.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(L);
- t.SortLinesAscendingAction = D;
- var N = function (e) {
- function t() {
- return e.call(this, !0, {
- id: "editor.action.sortLinesDescending",
- label: n.localize(11, null),
- alias: "Sort Lines Descending",
- precondition: g.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(L);
- t.SortLinesDescendingAction = N;
- var x = function (e) {
- function t() {
- return e.call(this, {
- id: t.ID,
- label: n.localize(12, null),
- alias: "Trim Trailing Whitespace",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: i.KeyChord(2089, 2102), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- var i = []
- ;"auto-save" === n.reason && (i = (t.getSelections() || []).map((function (e) {
- return new c.Position(e.positionLineNumber, e.positionColumn)
- })));
- var o = t.getSelection();
- if (null !== o) {
- var r = new l.TrimTrailingWhitespaceCommand(o, i);
- t.pushUndoStop(), t.executeCommands(this.id, [r]), t.pushUndoStop()
- }
- }, t.ID = "editor.action.trimTrailingWhitespace", t
- }(s.EditorAction);
- t.TrimTrailingWhitespaceAction = x;
- var I = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.deleteLines",
- label: n.localize(13, null),
- alias: "Delete Line",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.textInputFocus, primary: 3113, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- var n = this._getLinesToRemove(t), i = t.getModel();
- if (1 !== i.getLineCount() || 1 !== i.getLineMaxColumn(1)) {
- for (var o = 0, r = [], s = [], a = 0, l = n.length; a < l; a++) {
- var u = n[a], c = u.startLineNumber, h = u.endLineNumber, g = 1, f = i.getLineMaxColumn(h);
- h < i.getLineCount() ? (h += 1, f = 1) : c > 1 && (c -= 1, g = i.getLineMaxColumn(c)),
- r.push(d.EditOperation.replace(new p.Selection(c, g, h, f), "")), s.push(new p.Selection(c - o, u.positionColumn, c - o, u.positionColumn)), o += u.endLineNumber - u.startLineNumber + 1
- }
- t.pushUndoStop(), t.executeEdits(this.id, r, s), t.pushUndoStop()
- }
- }
- }, t.prototype._getLinesToRemove = function (e) {
- var t = e.getSelections().map((function (e) {
- var t = e.endLineNumber;
- return e.startLineNumber < e.endLineNumber && 1 === e.endColumn && (t -= 1), {
- startLineNumber: e.startLineNumber,
- selectionStartColumn: e.selectionStartColumn,
- endLineNumber: t,
- positionColumn: e.positionColumn
- }
- }));
- t.sort((function (e, t) {
- return e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber
- }));
- for (var n = [], i = t[0], o = 1; o < t.length; o++) i.endLineNumber + 1 >= t[o].startLineNumber ? i.endLineNumber = t[o].endLineNumber : (n.push(i), i = t[o]);
- return n.push(i), n
- }, t
- }(s.EditorAction);
- t.DeleteLinesAction = I;
- var M = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.indentLines",
- label: n.localize(14, null),
- alias: "Indent Line",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2137, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = t._getCursors();
- n && (t.pushUndoStop(), t.executeCommands(this.id, u.TypeOperations.indent(n.context.config, t.getModel(), t.getSelections())), t.pushUndoStop())
- }, t
- }(s.EditorAction);
- t.IndentLinesAction = M;
- var k = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.outdentLines",
- label: n.localize(15, null),
- alias: "Outdent Line",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2135, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- o.CoreEditingCommands.Outdent.runEditorCommand(e, t, null)
- }, t
- }(s.EditorAction), T = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.insertLineBefore",
- label: n.localize(16, null),
- alias: "Insert Line Above",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 3075, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = t._getCursors();
- n && (t.pushUndoStop(), t.executeCommands(this.id, u.TypeOperations.lineInsertBefore(n.context.config, t.getModel(), t.getSelections())))
- }, t
- }(s.EditorAction);
- t.InsertLineBeforeAction = T;
- var R = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.insertLineAfter",
- label: n.localize(17, null),
- alias: "Insert Line Below",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2051, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = t._getCursors();
- n && (t.pushUndoStop(), t.executeCommands(this.id, u.TypeOperations.lineInsertAfter(n.context.config, t.getModel(), t.getSelections())))
- }, t
- }(s.EditorAction);
- t.InsertLineAfterAction = R;
- var O = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = t.getSelection(), i = this._getRangesToDelete(t), o = [], r = 0, s = i.length - 1; r < s; r++) {
- var a = i[r], l = i[r + 1]
- ;null === h.Range.intersectRanges(a, l) ? o.push(a) : i[r + 1] = h.Range.plusRange(a, l)
- }
- o.push(i[i.length - 1]);
- var u = this._getEndCursorState(n, o), c = o.map((function (e) {
- return d.EditOperation.replace(e, "")
- }));
- t.pushUndoStop(), t.executeEdits(this.id, c, u), t.pushUndoStop()
- }
- }, t
- }(s.EditorAction);
- t.AbstractDeleteAllToBoundaryAction = O;
- var P = function (e) {
- function t() {
- return e.call(this, {
- id: "deleteAllLeft",
- label: n.localize(18, null),
- alias: "Delete All Left",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 2049}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype._getEndCursorState = function (e, t) {
- var n = null, i = [], o = 0;
- return t.forEach((function (t) {
- var r;
- if (1 === t.endColumn && o > 0) {
- var s = t.startLineNumber - o;
- r = new p.Selection(s, t.startColumn, s, t.startColumn)
- } else r = new p.Selection(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn);
- o += t.endLineNumber - t.startLineNumber, t.intersectRanges(e) ? n = r : i.push(r)
- })), n && i.unshift(n), i
- }, t.prototype._getRangesToDelete = function (e) {
- var t = e.getSelections();
- if (null === t) return [];
- var n = t, i = e.getModel();
- return null === i ? [] : (n.sort(h.Range.compareRangesUsingStarts), n = n.map((function (e) {
- if (e.isEmpty()) {
- if (1 === e.startColumn) {
- var t = Math.max(1, e.startLineNumber - 1),
- n = 1 === e.startLineNumber ? 1 : i.getLineContent(t).length + 1;
- return new h.Range(t, n, e.startLineNumber, 1)
- }
- return new h.Range(e.startLineNumber, 1, e.startLineNumber, e.startColumn)
- }
- return new h.Range(e.startLineNumber, 1, e.endLineNumber, e.endColumn)
- })))
- }, t
- }(O);
- t.DeleteAllLeftAction = P;
- var A = function (e) {
- function t() {
- return e.call(this, {
- id: "deleteAllRight",
- label: n.localize(19, null),
- alias: "Delete All Right",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: g.EditorContextKeys.textInputFocus,
- primary: 0,
- mac: {primary: 297, secondary: [2068]},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype._getEndCursorState = function (e, t) {
- for (var n = null, i = [], o = 0, r = t.length; o < r; o++) {
- var s = t[o],
- a = new p.Selection(s.startLineNumber - 0, s.startColumn, s.startLineNumber - 0, s.startColumn);
- s.intersectRanges(e) ? n = a : i.push(a)
- }
- return n && i.unshift(n), i
- }, t.prototype._getRangesToDelete = function (e) {
- var t = e.getModel();
- if (null === t) return [];
- var n = e.getSelections();
- if (null === n) return [];
- var i = n.map((function (e) {
- if (e.isEmpty()) {
- var n = t.getLineMaxColumn(e.startLineNumber);
- return e.startColumn === n ? new h.Range(e.startLineNumber, e.startColumn, e.startLineNumber + 1, 1) : new h.Range(e.startLineNumber, e.startColumn, e.startLineNumber, n)
- }
- return e
- }));
- return i.sort(h.Range.compareRangesUsingStarts), i
- }, t
- }(O);
- t.DeleteAllRightAction = A;
- var F = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.joinLines",
- label: n.localize(20, null),
- alias: "Join Lines",
- precondition: g.EditorContextKeys.writable,
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 0, mac: {primary: 296}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = t.getSelections();
- if (null !== n) {
- var i = t.getSelection();
- if (null !== i) {
- n.sort(h.Range.compareRangesUsingStarts);
- var o = [], r = n.reduce((function (e, t) {
- return e.isEmpty() ? e.endLineNumber === t.startLineNumber ? (i.equalsSelection(e) && (i = t), t) : t.startLineNumber > e.endLineNumber + 1 ? (o.push(e), t) : new p.Selection(e.startLineNumber, e.startColumn, t.endLineNumber, t.endColumn) : t.startLineNumber > e.endLineNumber ? (o.push(e), t) : new p.Selection(e.startLineNumber, e.startColumn, t.endLineNumber, t.endColumn)
- }));
- o.push(r);
- var s = t.getModel();
- if (null !== s) {
- for (var a = [], l = [], u = i, c = 0, g = 0, f = o.length; g < f; g++) {
- var m = o[g], v = m.startLineNumber, _ = 0, y = void 0, C = void 0,
- b = s.getLineContent(m.endLineNumber).length - m.endColumn;
- if (m.isEmpty() || m.startLineNumber === m.endLineNumber) {
- var S = m.getStartPosition();
- S.lineNumber < s.getLineCount() ? (y = v + 1, C = s.getLineMaxColumn(y)) : (y = S.lineNumber, C = s.getLineMaxColumn(S.lineNumber))
- } else y = m.endLineNumber, C = s.getLineMaxColumn(y);
- for (var w = s.getLineContent(v), E = v + 1; E <= y; E++) {
- var L = s.getLineContent(E), D = s.getLineFirstNonWhitespaceColumn(E);
- if (D >= 1) {
- var N = !0;
- "" === w && (N = !1), !N || " " !== w.charAt(w.length - 1) && "\t" !== w.charAt(w.length - 1) || (N = !1,
- w = w.replace(/[\s\uFEFF\xA0]+$/g, " "));
- var x = L.substr(D - 1);
- w += (N ? " " : "") + x, _ = N ? x.length + 1 : x.length
- } else _ = 0
- }
- var I = new h.Range(v, 1, y, C);
- if (!I.isEmpty()) {
- var M = void 0;
- m.isEmpty() ? (a.push(d.EditOperation.replace(I, w)), M = new p.Selection(I.startLineNumber - c, w.length - _ + 1, v - c, w.length - _ + 1)) : m.startLineNumber === m.endLineNumber ? (a.push(d.EditOperation.replace(I, w)), M = new p.Selection(m.startLineNumber - c, m.startColumn, m.endLineNumber - c, m.endColumn)) : (a.push(d.EditOperation.replace(I, w)), M = new p.Selection(m.startLineNumber - c, m.startColumn, m.startLineNumber - c, w.length - b)), null !== h.Range.intersectRanges(I, i) ? u = M : l.push(M)
- }
- c += I.endLineNumber - I.startLineNumber
- }
- l.unshift(u), t.pushUndoStop(), t.executeEdits(this.id, a, l), t.pushUndoStop()
- }
- }
- }
- }, t
- }(s.EditorAction);
- t.JoinLinesAction = F;
- var W = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.transpose",
- label: n.localize(21, null),
- alias: "Transpose characters around the cursor",
- precondition: g.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = t.getSelections();
- if (null !== n) {
- var i = t.getModel();
- if (null !== i) {
- for (var o = [], r = 0, s = n.length; r < s; r++) {
- var l = n[r];
- if (l.isEmpty()) {
- var u = l.getStartPosition(), d = i.getLineMaxColumn(u.lineNumber);
- if (u.column >= d) {
- if (u.lineNumber === i.getLineCount()) continue;
- var c = new h.Range(u.lineNumber, Math.max(1, u.column - 1), u.lineNumber + 1, 1),
- g = i.getValueInRange(c).split("").reverse().join("");
- o.push(new a.ReplaceCommand(new p.Selection(u.lineNumber, Math.max(1, u.column - 1), u.lineNumber + 1, 1), g))
- } else {
- c = new h.Range(u.lineNumber, Math.max(1, u.column - 1), u.lineNumber, u.column + 1), g = i.getValueInRange(c).split("").reverse().join("");
- o.push(new a.ReplaceCommandThatPreservesSelection(c, g, new p.Selection(u.lineNumber, u.column + 1, u.lineNumber, u.column + 1)))
- }
- }
- }
- t.pushUndoStop(), t.executeCommands(this.id, o), t.pushUndoStop()
- }
- }
- }, t
- }(s.EditorAction);
- t.TransposeAction = W;
- var B = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = t.getSelections();
- if (null !== n) {
- var i = t.getModel()
- ;
- if (null !== i) {
- for (var o = t.getOption(96), r = [], s = 0, l = n.length; s < l; s++) {
- var u = n[s];
- if (u.isEmpty()) {
- var d = u.getStartPosition(), c = i.getWordAtPosition(d);
- if (!c) continue;
- var g = new h.Range(d.lineNumber, c.startColumn, d.lineNumber, c.endColumn),
- f = i.getValueInRange(g);
- r.push(new a.ReplaceCommandThatPreservesSelection(g, this._modifyText(f, o), new p.Selection(d.lineNumber, d.column, d.lineNumber, d.column)))
- } else {
- f = i.getValueInRange(u);
- r.push(new a.ReplaceCommandThatPreservesSelection(u, this._modifyText(f, o), u))
- }
- }
- t.pushUndoStop(), t.executeCommands(this.id, r), t.pushUndoStop()
- }
- }
- }, t
- }(s.EditorAction);
- t.AbstractCaseAction = B;
- var V = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.transformToUppercase",
- label: n.localize(22, null),
- alias: "Transform to Uppercase",
- precondition: g.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t.prototype._modifyText = function (e, t) {
- return e.toLocaleUpperCase()
- }, t
- }(B);
- t.UpperCaseAction = V;
- var z = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.transformToLowercase",
- label: n.localize(23, null),
- alias: "Transform to Lowercase",
- precondition: g.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t.prototype._modifyText = function (e, t) {
- return e.toLocaleLowerCase()
- }, t
- }(B);
- t.LowerCaseAction = z;
- var H = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.transformToTitlecase",
- label: n.localize(24, null),
- alias: "Transform to Title Case",
- precondition: g.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t.prototype._modifyText = function (e, t) {
- for (var n = ("\r\n\t " + t).split(""), i = "", o = !0, r = 0; r < e.length; r++) {
- var s = e[r];
- n.indexOf(s) >= 0 ? (o = !0, i += s) : o ? (o = !1, i += s.toLocaleUpperCase()) : i += s.toLocaleLowerCase()
- }
- return i
- }, t
- }(B);
- t.TitleCaseAction = H, s.registerEditorAction(y), s.registerEditorAction(C), s.registerEditorAction(b), s.registerEditorAction(w), s.registerEditorAction(E), s.registerEditorAction(D), s.registerEditorAction(N), s.registerEditorAction(x), s.registerEditorAction(I), s.registerEditorAction(M), s.registerEditorAction(k), s.registerEditorAction(T), s.registerEditorAction(R),
- s.registerEditorAction(P), s.registerEditorAction(A), s.registerEditorAction(F), s.registerEditorAction(W), s.registerEditorAction(V), s.registerEditorAction(z), s.registerEditorAction(H)
- })), define(n[165], i([0, 1, 15, 10, 12, 17, 18, 26]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- function l(e, t, o, s) {
- var a = r.SignatureHelpProviderRegistry.ordered(e);
- return n.first(a.map((function (n) {
- return function () {
- return Promise.resolve(n.provideSignatureHelp(e, t, s, o)).catch((function (e) {
- return i.onUnexpectedExternalError(e)
- }))
- }
- })))
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.Context = {
- Visible: new s.RawContextKey("parameterHintsVisible", !1),
- MultipleSignatures: new s.RawContextKey("parameterHintsMultipleSignatures", !1)
- }, t.provideSignatureHelp = l, o.registerDefaultLanguageCommand("_executeSignatureHelpProvider", (function (e, t, n) {
- return d(void 0, void 0, void 0, (function () {
- var i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return [4, l(e, t, {
- triggerKind: r.SignatureHelpTriggerKind.Invoke,
- isRetrigger: !1,
- triggerCharacter: n.triggerCharacter
- }, a.CancellationToken.None)];
- case 1:
- return (i = o.sent()) ? (setTimeout((function () {
- return i.dispose()
- }), 0), [2, i.value]) : [2, void 0]
- }
- }))
- }))
- }))
- })), define(n[540], i([0, 1, 15, 10, 4, 2, 79, 17, 165]), (function (e, t, n, i, o, s, a, u, h) {
- "use strict";
- var p;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.Default = {type: 0};
- var t = function (e) {
- this.request = e, this.type = 2
- };
- e.Pending = t;
- var n = function (e) {
- this.hints = e, this.type = 1
- };
- e.Active = n
- }(p || (p = {}));
- var g = function (e) {
- function t(i, r) {
- void 0 === r && (r = t.DEFAULT_DELAY);
- var l = e.call(this) || this;
- return l._onChangedHints = l._register(new o.Emitter), l.onChangedHints = l._onChangedHints.event, l.triggerOnType = !1, l._state = p.Default, l._pendingTriggers = [], l._lastSignatureHelpResult = l._register(new s.MutableDisposable), l.triggerChars = new a.CharacterSet, l.retriggerChars = new a.CharacterSet, l.triggerId = 0, l.editor = i, l.throttledDelayer = new n.Delayer(r), l._register(l.editor.onDidChangeConfiguration((function () {
- return l.onEditorConfigurationChange()
- }))),
- l._register(l.editor.onDidChangeModel((function (e) {
- return l.onModelChanged()
- }))), l._register(l.editor.onDidChangeModelLanguage((function (e) {
- return l.onModelChanged()
- }))), l._register(l.editor.onDidChangeCursorSelection((function (e) {
- return l.onCursorChange(e)
- }))), l._register(l.editor.onDidChangeModelContent((function (e) {
- return l.onModelContentChange()
- }))), l._register(u.SignatureHelpProviderRegistry.onDidChange(l.onModelChanged, l)), l._register(l.editor.onDidType((function (e) {
- return l.onDidType(e)
- }))), l.onEditorConfigurationChange(), l.onModelChanged(), l
- }
- return r(t, e), Object.defineProperty(t.prototype, "state", {
- get: function () {
- return this._state
- }, set: function (e) {
- 2 === this._state.type && this._state.request.cancel(), this._state = e
- }, enumerable: !0, configurable: !0
- }), t.prototype.cancel = function (e) {
- void 0 === e && (e = !1), this.state = p.Default, this.throttledDelayer.cancel(), e || this._onChangedHints.fire(void 0)
- }, t.prototype.trigger = function (e, t) {
- var n = this, o = this.editor.getModel();
- if (o && u.SignatureHelpProviderRegistry.has(o)) {
- var r = ++this.triggerId;
- this._pendingTriggers.push(e), this.throttledDelayer.trigger((function () {
- return n.doTrigger(r)
- }), t).catch(i.onUnexpectedError)
- }
- }, t.prototype.next = function () {
- if (1 === this.state.type) {
- var e = this.state.hints.signatures.length, t = this.state.hints.activeSignature,
- n = t % e == e - 1, i = this.editor.getOption(64).cycle;
- !(e < 2 || n) || i ? this.updateActiveSignature(n && i ? 0 : t + 1) : this.cancel()
- }
- }, t.prototype.previous = function () {
- if (1 === this.state.type) {
- var e = this.state.hints.signatures.length, t = this.state.hints.activeSignature, n = 0 === t,
- i = this.editor.getOption(64).cycle;
- !(e < 2 || n) || i ? this.updateActiveSignature(n && i ? e - 1 : t - 1) : this.cancel()
- }
- }, t.prototype.updateActiveSignature = function (e) {
- 1 === this.state.type && (this.state = new p.Active(l(l({}, this.state.hints), {activeSignature: e})), this._onChangedHints.fire(this.state.hints))
- }, t.prototype.doTrigger = function (e) {
- return d(this, void 0, void 0, (function () {
- var t, o, r, s, a, l, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- if (t = 1 === this.state.type || 2 === this.state.type,
- o = 1 === this.state.type ? this.state.hints : void 0, this.cancel(!0), 0 === this._pendingTriggers.length) return [2, !1];
- if (r = this._pendingTriggers.reduce(f), this._pendingTriggers = [], s = {
- triggerKind: r.triggerKind,
- triggerCharacter: r.triggerCharacter,
- isRetrigger: t,
- activeSignatureHelp: o
- }, !this.editor.hasModel()) return [2, !1];
- a = this.editor.getModel(), l = this.editor.getPosition(), this.state = new p.Pending(n.createCancelablePromise((function (e) {
- return h.provideSignatureHelp(a, l, s, e)
- }))), c.label = 1;
- case 1:
- return c.trys.push([1, 3, , 4]), [4, this.state.request];
- case 2:
- return u = c.sent(), e !== this.triggerId ? (null == u || u.dispose(), [2, !1]) : u && u.value.signatures && 0 !== u.value.signatures.length ? (this.state = new p.Active(u.value), this._lastSignatureHelpResult.value = u, this._onChangedHints.fire(this.state.hints), [2, !0]) : (null == u || u.dispose(), this._lastSignatureHelpResult.clear(), this.cancel(), [2, !1]);
- case 3:
- return d = c.sent(), e === this.triggerId && (this.state = p.Default), i.onUnexpectedError(d), [2, !1];
- case 4:
- return [2]
- }
- }))
- }))
- },
- Object.defineProperty(t.prototype, "isTriggered", {
- get: function () {
- return 1 === this.state.type || 2 === this.state.type || this.throttledDelayer.isTriggered()
- }, enumerable: !0, configurable: !0
- }), t.prototype.onModelChanged = function () {
- this.cancel(), this.triggerChars = new a.CharacterSet, this.retriggerChars = new a.CharacterSet;
- var e = this.editor.getModel();
- if (e) for (var t = 0, n = u.SignatureHelpProviderRegistry.ordered(e); t < n.length; t++) {
- for (var i = n[t], o = 0, r = i.signatureHelpTriggerCharacters || []; o < r.length; o++) {
- var s = r[o];
- this.triggerChars.add(s.charCodeAt(0)), this.retriggerChars.add(s.charCodeAt(0))
- }
- for (var l = 0, d = i.signatureHelpRetriggerCharacters || []; l < d.length; l++) {
- s = d[l];
- this.retriggerChars.add(s.charCodeAt(0))
- }
- }
- }, t.prototype.onDidType = function (e) {
- if (this.triggerOnType) {
- var t = e.length - 1, n = e.charCodeAt(t);
- (this.triggerChars.has(n) || this.isTriggered && this.retriggerChars.has(n)) && this.trigger({
- triggerKind: u.SignatureHelpTriggerKind.TriggerCharacter,
- triggerCharacter: e.charAt(t)
- })
- }
- }, t.prototype.onCursorChange = function (e) {
- "mouse" === e.source ? this.cancel() : this.isTriggered && this.trigger({triggerKind: u.SignatureHelpTriggerKind.ContentChange})
- }, t.prototype.onModelContentChange = function () {
- this.isTriggered && this.trigger({triggerKind: u.SignatureHelpTriggerKind.ContentChange})
- }, t.prototype.onEditorConfigurationChange = function () {
- this.triggerOnType = this.editor.getOption(64).enabled, this.triggerOnType || this.cancel()
- }, t.prototype.dispose = function () {
- this.cancel(!0), e.prototype.dispose.call(this)
- }, t.DEFAULT_DELAY = 120, t
- }(s.Disposable);
- function f(e, t) {
- switch (t.triggerKind) {
- case u.SignatureHelpTriggerKind.Invoke:
- return t;
- case u.SignatureHelpTriggerKind.ContentChange:
- return e;
- case u.SignatureHelpTriggerKind.TriggerCharacter:
- default:
- return t
- }
- }
- t.ParameterHintsModel = g
- })), define(n[541], i([0, 1, 19, 26, 12, 13, 3, 22, 23, 17, 465, 2, 388, 202, 29, 10]), (function (e, t, n, i, o, s, a, l, u, h, p, g, f, m, v, _) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var y = function () {
- function e(e, t) {
- this.index = e, this.ranges = t
- }
- return e.prototype.mov = function (t) {
- var n = this.index + (t ? 1 : -1);
- if (n < 0 || n >= this.ranges.length) return this;
- var i = new e(n, this.ranges);
- return i.ranges[n].equalsRange(this.ranges[this.index]) ? i.mov(t) : i
- }, e
- }(), C = function () {
- function e(e) {
- this._ignoreSelection = !1, this._editor = e
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- g.dispose(this._selectionListener)
- }, e.prototype.run = function (e) {
- var t = this;
- if (this._editor.hasModel()) {
- var o = this._editor.getSelections(), r = this._editor.getModel();
- if (h.SelectionRangeRegistry.has(r)) {
- var s = Promise.resolve(void 0);
- return this._state || (s = E(r, o.map((function (e) {
- return e.getPosition()
- })), i.CancellationToken.None).then((function (e) {
- if (n.isNonEmptyArray(e) && e.length === o.length && t._editor.hasModel() && n.equals(t._editor.getSelections(), o, (function (e, t) {
- return e.equalsSelection(t)
- }))) {
- for (var i = function (t) {
- e[t] = e[t].filter((function (e) {
- return e.containsPosition(o[t].getStartPosition()) && e.containsPosition(o[t].getEndPosition())
- })), e[t].unshift(o[t])
- }, r = 0; r < e.length; r++) i(r)
- ;
- t._state = e.map((function (e) {
- return new y(0, e)
- })), g.dispose(t._selectionListener), t._selectionListener = t._editor.onDidChangeCursorPosition((function () {
- t._ignoreSelection || (g.dispose(t._selectionListener), t._state = void 0)
- }))
- }
- }))), s.then((function () {
- if (t._state) {
- t._state = t._state.map((function (t) {
- return t.mov(e)
- }));
- var n = t._state.map((function (e) {
- return l.Selection.fromPositions(e.ranges[e.index].getStartPosition(), e.ranges[e.index].getEndPosition())
- }));
- t._ignoreSelection = !0;
- try {
- t._editor.setSelections(n)
- } finally {
- t._ignoreSelection = !1
- }
- }
- }))
- }
- }
- }, e.ID = "editor.contrib.smartSelectController", e
- }(), b = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i._forward = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var e;
- return c(this, (function (n) {
- switch (n.label) {
- case 0:
- return (e = C.get(t)) ? [4, e.run(this._forward)] : [3, 2];
- case 1:
- n.sent(), n.label = 2;
- case 2:
- return [2]
- }
- }))
- }))
- }, t
- }(o.EditorAction), S = function (e) {
- function t() {
- return e.call(this, !0, {
- id: "editor.action.smartSelect.expand",
- label: p.localize(0, null),
- alias: "Expand Selection",
- precondition: void 0,
- kbOpts: {
- kbExpr: u.EditorContextKeys.editorTextFocus,
- primary: 1553,
- mac: {primary: 3345, secondary: [1297]},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "1_basic", title: p.localize(1, null), order: 2}
- }) || this
- }
- return r(t, e), t
- }(b);
- v.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow", "editor.action.smartSelect.expand");
- var w = function (e) {
- function t() {
- return e.call(this, !1, {
- id: "editor.action.smartSelect.shrink",
- label: p.localize(2, null),
- alias: "Shrink Selection",
- precondition: void 0,
- kbOpts: {
- kbExpr: u.EditorContextKeys.editorTextFocus,
- primary: 1551,
- mac: {primary: 3343, secondary: [1295]},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "1_basic", title: p.localize(3, null), order: 3}
- }) || this
- }
- return r(t, e), t
- }(b);
- function E(e, t, i) {
- var o = h.SelectionRangeRegistry.all(e);
- 1 === o.length && o.unshift(new m.BracketSelectionRangeProvider);
- for (var r = [], l = [], u = 0, d = o; u < d.length; u++) {
- var c = d[u];
- r.push(Promise.resolve(c.provideSelectionRanges(e, t, i)).then((function (e) {
- if (n.isNonEmptyArray(e) && e.length === t.length) for (var i = 0; i < t.length; i++) {
- l[i] || (l[i] = []);
- for (var o = 0, r = e[i]; o < r.length; o++) {
- var s = r[o];
- a.Range.isIRange(s.range) && a.Range.containsPosition(s.range, t[i]) && l[i].push(a.Range.lift(s.range))
- }
- }
- }), _.onUnexpectedExternalError))
- }
- return Promise.all(r).then((function () {
- return l.map((function (t) {
- if (0 === t.length) return [];
- t.sort((function (e, t) {
- return s.Position.isBefore(e.getStartPosition(), t.getStartPosition()) ? 1 : s.Position.isBefore(t.getStartPosition(), e.getStartPosition()) ? -1 : s.Position.isBefore(e.getEndPosition(), t.getEndPosition()) ? -1 : s.Position.isBefore(t.getEndPosition(), e.getEndPosition()) ? 1 : 0
- }));
- for (var n, i = [], o = 0, r = t; o < r.length; o++) {
- var l = r[o];
- (!n || a.Range.containsRange(l, n) && !a.Range.equalsRange(l, n)) && (i.push(l), n = l)
- }
- for (var u = [i[0]], d = 1; d < i.length; d++) {
- var c = i[d - 1], h = i[d];
- if (h.startLineNumber !== c.startLineNumber || h.endLineNumber !== c.endLineNumber) {
- var p = new a.Range(c.startLineNumber, e.getLineFirstNonWhitespaceColumn(c.startLineNumber), c.endLineNumber, e.getLineLastNonWhitespaceColumn(c.endLineNumber));
- p.containsRange(c) && !p.equalsRange(c) && h.containsRange(p) && !h.equalsRange(p) && u.push(p);
- var g = new a.Range(c.startLineNumber, 1, c.endLineNumber, e.getLineMaxColumn(c.endLineNumber));
- g.containsRange(c) && !g.equalsRange(p) && h.containsRange(g) && !h.equalsRange(g) && u.push(g)
- }
- u.push(h)
- }
- return u
- }))
- }))
- }
- o.registerEditorContribution(C.ID, C), o.registerEditorAction(S), o.registerEditorAction(w), h.SelectionRangeRegistry.register("*", new f.WordSelectionRangeProvider), t.provideSelectionRanges = E, o.registerModelCommand("_executeSelectionRangeProvider", (function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- var o = t[0];
- return E(e, o, i.CancellationToken.None)
- }))
- })), define(n[120], i([0, 1, 15, 31, 10, 12, 17, 13, 18, 26, 3, 61, 2]), (function (e, t, n, i, o, r, s, a, l, u, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Context = {
- Visible: new l.RawContextKey("suggestWidgetVisible", !1),
- MultipleSuggestions: new l.RawContextKey("suggestWidgetMultipleSuggestions", !1),
- MakesTextEdit: new l.RawContextKey("suggestionMakesTextEdit", !0),
- AcceptSuggestionsOnEnter: new l.RawContextKey("acceptSuggestionOnEnter", !0)
- };
- var f = function (e, t, n, r, s) {
- var l = this;
- this.position = e, this.completion = t, this.container = n, this.provider = r, this.isResolved = !1, this.score = p.FuzzyScore.Default, this.distance = 0, this.textLabel = "string" == typeof t.label ? t.label : t.label.name, this.labelLow = this.textLabel.toLowerCase(), this.sortTextLow = t.sortText && t.sortText.toLowerCase(), this.filterTextLow = t.filterText && t.filterText.toLowerCase(), h.Range.isIRange(t.range) ? (this.editStart = new a.Position(t.range.startLineNumber, t.range.startColumn), this.editInsertEnd = new a.Position(t.range.endLineNumber, t.range.endColumn), this.editReplaceEnd = new a.Position(t.range.endLineNumber, t.range.endColumn)) : (this.editStart = new a.Position(t.range.insert.startLineNumber, t.range.insert.startColumn),
- this.editInsertEnd = new a.Position(t.range.insert.endLineNumber, t.range.insert.endColumn), this.editReplaceEnd = new a.Position(t.range.replace.endLineNumber, t.range.replace.endColumn));
- var u, d = r.resolveCompletionItem;
- "function" != typeof d ? (this.resolve = function () {
- return Promise.resolve()
- }, this.isResolved = !0) : this.resolve = function (n) {
- return u || (u = Promise.resolve(d.call(r, s, e, t, n)).then((function (e) {
- i.assign(t, e), l.isResolved = !0
- }), (function (e) {
- o.isPromiseCanceledError(e) && (u = void 0)
- })), n.onCancellationRequested((function () {
- l.isResolved || (u = void 0)
- }))), u
- }
- };
- t.CompletionItem = f;
- var m, v = function () {
- function e(e, t, n) {
- void 0 === e && (e = 2), void 0 === t && (t = new Set), void 0 === n && (n = new Set), this.snippetSortOrder = e, this.kindFilter = t, this.providerFilter = n
- }
- return e.default = new e, e
- }();
- function _(e, t, i, r, a) {
- void 0 === i && (i = v.default), void 0 === r && (r = {triggerKind: 0}), void 0 === a && (a = u.CancellationToken.None)
- ;var l = e.getWordAtPosition(t),
- d = l ? new h.Range(t.lineNumber, l.startColumn, t.lineNumber, l.endColumn) : h.Range.fromPositions(t),
- c = d.setEndPosition(t.lineNumber, t.column);
- t = t.clone();
- var p = s.CompletionProviderRegistry.orderedGroups(e);
- !i.kindFilter.has(25) && m && p.unshift([m]);
- var _ = [], y = new g.DisposableStore, C = !1, S = p.map((function (n) {
- return function () {
- return Promise.all(n.map((function (n) {
- if (!(i.providerFilter.size > 0) || i.providerFilter.has(n)) return Promise.resolve(n.provideCompletionItems(e, t, r, a)).then((function (o) {
- var r = _.length;
- if (o) {
- for (var s = 0, a = o.suggestions || []; s < a.length; s++) {
- var l = a[s];
- i.kindFilter.has(l.kind) || (l.range || (l.range = {
- insert: c,
- replace: d
- }), l.sortText || (l.sortText = "string" == typeof l.label ? l.label : l.label.name), _.push(new f(t, l, o, n, e)))
- }
- g.isDisposable(o) && y.add(o)
- }
- r !== _.length && n !== m && (C = !0)
- }), o.onUnexpectedExternalError)
- })))
- }
- }));
- return n.first(S, (function () {
- return C || a.isCancellationRequested
- })).then((function () {
- return a.isCancellationRequested ? (y.dispose(),
- Promise.reject(o.canceled())) : _.sort(b(i.snippetSortOrder))
- }))
- }
- function y(e, t) {
- if (e.sortTextLow && t.sortTextLow) {
- if (e.sortTextLow < t.sortTextLow) return -1;
- if (e.sortTextLow > t.sortTextLow) return 1
- }
- return e.completion.label < t.completion.label ? -1 : e.completion.label > t.completion.label ? 1 : e.completion.kind - t.completion.kind
- }
- t.CompletionOptions = v, t.getSnippetSuggestSupport = function () {
- return m
- }, t.provideSuggestionItems = _;
- var C = new Map;
- function b(e) {
- return C.get(e)
- }
- C.set(0, (function (e, t) {
- if (e.completion.kind !== t.completion.kind) {
- if (25 === e.completion.kind) return -1;
- if (25 === t.completion.kind) return 1
- }
- return y(e, t)
- })), C.set(2, (function (e, t) {
- if (e.completion.kind !== t.completion.kind) {
- if (25 === e.completion.kind) return 1;
- if (25 === t.completion.kind) return -1
- }
- return y(e, t)
- })), C.set(1, y), t.getSuggestionComparator = b, r.registerDefaultLanguageCommand("_executeCompletionItemProvider", (function (e, t, n) {
- return d(void 0, void 0, void 0, (function () {
- var i, o, r, s, a, l, d, h;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- return i = {
- incomplete: !1,
- suggestions: []
- }, o = new g.DisposableStore, r = [], s = n.maxItemsToResolve || 0, [4, _(e, t)];
- case 1:
- for (a = c.sent(), l = 0, d = a; l < d.length; l++) h = d[l], r.length < s && r.push(h.resolve(u.CancellationToken.None)), i.incomplete = i.incomplete || h.container.incomplete, i.suggestions.push(h.completion), g.isDisposable(h.container) && o.add(h.container);
- c.label = 2;
- case 2:
- return c.trys.push([2, , 4, 5]), [4, Promise.all(r)];
- case 3:
- return c.sent(), [2, i];
- case 4:
- return setTimeout((function () {
- return o.dispose()
- }), 100), [7];
- case 5:
- return [2]
- }
- }))
- }))
- }));
- var S = new (function () {
- function e() {
- this.onlyOnceSuggestions = []
- }
- return e.prototype.provideCompletionItems = function () {
- var e = {suggestions: this.onlyOnceSuggestions.slice(0)};
- return this.onlyOnceSuggestions.length = 0, e
- }, e
- }());
- s.CompletionProviderRegistry.register("*", S), t.showSimpleSuggestions = function (e, t) {
- setTimeout((function () {
- var n;
- (n = S.onlyOnceSuggestions).push.apply(n, t), e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(S))
- }), 0)
- }
- })),
- define(n[225], i([0, 1, 469, 50, 12, 163]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t() {
- return e.call(this, {
- id: t.ID,
- label: n.localize(0, null),
- alias: "Toggle Tab Key Moves Focus",
- precondition: void 0,
- kbOpts: {kbExpr: null, primary: 2091, mac: {primary: 1323}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var o = !s.TabFocus.getTabFocusMode();
- s.TabFocus.setTabFocusMode(o), o ? i.alert(n.localize(1, null)) : i.alert(n.localize(2, null))
- }, t.ID = "editor.action.toggleTabFocusMode", t
- }(o.EditorAction);
- t.ToggleTabFocusModeAction = a, o.registerEditorAction(a)
- })), define(n[542], i([0, 1, 470, 12, 132]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.forceRetokenize",
- label: n.localize(0, null),
- alias: "Developer: Force Retokenize",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- var n = t.getModel();
- n.resetTokenization()
- ;var i = new o.StopWatch(!0);
- n.forceTokenization(n.getLineCount()), i.stop(), console.log("tokenization took " + i.elapsed())
- }
- }, t
- }(i.EditorAction);
- i.registerEditorAction(s)
- })), define(n[226], i([0, 1, 12, 80, 40, 160, 89, 13, 3, 22, 23, 64, 18, 33]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var f = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._inSelectionMode = t.inSelectionMode, n._wordNavigationType = t.wordNavigationType, n
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
- var i = this;
- if (t.hasModel()) {
- var r = a.getMapForWordSeparators(t.getOption(96)), s = t.getModel(),
- u = t.getSelections().map((function (e) {
- var t = new l.Position(e.positionLineNumber, e.positionColumn),
- n = i._move(r, s, t, i._wordNavigationType);
- return i._moveTo(e, n, i._inSelectionMode)
- }));
- if (t._getCursors().setStates("moveWordCommand", 0, u.map((function (e) {
- return o.CursorState.fromModelSelection(e)
- }))), 1 === u.length) {
- var d = new l.Position(u[0].positionLineNumber, u[0].positionColumn)
- ;t.revealPosition(d, 0)
- }
- }
- }, t.prototype._moveTo = function (e, t, n) {
- return n ? new d.Selection(e.selectionStartLineNumber, e.selectionStartColumn, t.lineNumber, t.column) : new d.Selection(t.lineNumber, t.column, t.lineNumber, t.column)
- }, t
- }(n.EditorCommand);
- t.MoveWordCommand = f;
- var m = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._move = function (e, t, n, i) {
- return s.WordOperations.moveWordLeft(e, t, n, i)
- }, t
- }(f);
- t.WordLeftCommand = m;
- var v = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._move = function (e, t, n, i) {
- return s.WordOperations.moveWordRight(e, t, n, i)
- }, t
- }(f);
- t.WordRightCommand = v;
- var _ = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 0,
- id: "cursorWordStartLeft",
- precondition: void 0,
- kbOpts: {
- kbExpr: c.EditorContextKeys.textInputFocus,
- primary: 2063,
- mac: {primary: 527},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(m);
- t.CursorWordStartLeft = _;
- var y = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 2, id: "cursorWordEndLeft", precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(m);
- t.CursorWordEndLeft = y;
- var C = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 1,
- id: "cursorWordLeft",
- precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(m);
- t.CursorWordLeft = C;
- var b = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 0,
- id: "cursorWordStartLeftSelect",
- precondition: void 0,
- kbOpts: {
- kbExpr: c.EditorContextKeys.textInputFocus,
- primary: 3087,
- mac: {primary: 1551},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(m);
- t.CursorWordStartLeftSelect = b;
- var S = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 2,
- id: "cursorWordEndLeftSelect",
- precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(m);
- t.CursorWordEndLeftSelect = S;
- var w = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 1,
- id: "cursorWordLeftSelect",
- precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(m);
- t.CursorWordLeftSelect = w;
- var E = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 3,
- id: "cursorWordAccessibilityLeft",
- precondition: void 0,
- kbOpts: {
- kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
- win: {primary: 2063},
- weight: 101
- }
- }) || this
- }
- return r(t, e), t.prototype._move = function (t, n, i, o) {
- return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
- }, t
- }(m);
- t.CursorWordAccessibilityLeft = E;
- var L = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 3,
- id: "cursorWordAccessibilityLeftSelect",
- precondition: void 0,
- kbOpts: {
- kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
- win: {primary: 3087},
- weight: 101
- }
- }) || this
- }
- return r(t, e), t.prototype._move = function (t, n, i, o) {
- return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
- }, t
- }(m);
- t.CursorWordAccessibilityLeftSelect = L;
- var D = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 0, id: "cursorWordStartRight", precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(v);
- t.CursorWordStartRight = D;
- var N = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 2,
- id: "cursorWordEndRight",
- precondition: void 0,
- kbOpts: {
- kbExpr: c.EditorContextKeys.textInputFocus,
- primary: 2065,
- mac: {primary: 529},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(v);
- t.CursorWordEndRight = N;
- var x = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 2,
- id: "cursorWordRight",
- precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(v);
- t.CursorWordRight = x;
- var I = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 0,
- id: "cursorWordStartRightSelect",
- precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(v);
- t.CursorWordStartRightSelect = I;
- var M = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 2,
- id: "cursorWordEndRightSelect",
- precondition: void 0,
- kbOpts: {
- kbExpr: c.EditorContextKeys.textInputFocus,
- primary: 3089,
- mac: {primary: 1553},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(v);
- t.CursorWordEndRightSelect = M;
- var k = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 2,
- id: "cursorWordRightSelect",
- precondition: void 0
- }) || this
- }
- return r(t, e), t
- }(v);
- t.CursorWordRightSelect = k;
- var T = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 3,
- id: "cursorWordAccessibilityRight",
- precondition: void 0,
- kbOpts: {
- kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
- win: {primary: 2065},
- weight: 101
- }
- }) || this
- }
- return r(t, e), t.prototype._move = function (t, n, i, o) {
- return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
- }, t
- }(v);
- t.CursorWordAccessibilityRight = T;
- var R = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 3,
- id: "cursorWordAccessibilityRightSelect",
- precondition: void 0,
- kbOpts: {
- kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
- win: {primary: 3089},
- weight: 101
- }
- }) || this
- }
- return r(t, e), t.prototype._move = function (t, n, i, o) {
- return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
- }, t
- }(v);
- t.CursorWordAccessibilityRightSelect = R;
- var O = function (e) {
- function t(t) {
- var n = e.call(this, t) || this;
- return n._whitespaceHeuristics = t.whitespaceHeuristics, n._wordNavigationType = t.wordNavigationType, n
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
- var o = this;
- if (t.hasModel()) {
- var r = a.getMapForWordSeparators(t.getOption(96)), s = t.getModel(),
- l = t.getSelections().map((function (e) {
- var t = o._delete(r, s, e, o._whitespaceHeuristics, o._wordNavigationType);
- return new i.ReplaceCommand(t, "")
- }));
- t.pushUndoStop(), t.executeCommands(this.id, l), t.pushUndoStop()
- }
- }, t
- }(n.EditorCommand);
- t.DeleteWordCommand = O;
- var P = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._delete = function (e, t, n, i, o) {
- var r = s.WordOperations.deleteWordLeft(e, t, n, i, o);
- return r || new u.Range(1, 1, 1, 1)
- }, t
- }(O)
- ;t.DeleteWordLeftCommand = P;
- var A = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._delete = function (e, t, n, i, o) {
- var r = s.WordOperations.deleteWordRight(e, t, n, i, o);
- if (r) return r;
- var a = t.getLineCount(), l = t.getLineMaxColumn(a);
- return new u.Range(a, l, a, l)
- }, t
- }(O);
- t.DeleteWordRightCommand = A;
- var F = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !1,
- wordNavigationType: 0,
- id: "deleteWordStartLeft",
- precondition: c.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(P);
- t.DeleteWordStartLeft = F;
- var W = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !1,
- wordNavigationType: 2,
- id: "deleteWordEndLeft",
- precondition: c.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(P);
- t.DeleteWordEndLeft = W;
- var B = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !0,
- wordNavigationType: 0,
- id: "deleteWordLeft",
- precondition: c.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: c.EditorContextKeys.textInputFocus,
- primary: 2049,
- mac: {primary: 513},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(P);
- t.DeleteWordLeft = B;
- var V = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !1,
- wordNavigationType: 0,
- id: "deleteWordStartRight",
- precondition: c.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(A);
- t.DeleteWordStartRight = V;
- var z = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !1,
- wordNavigationType: 2,
- id: "deleteWordEndRight",
- precondition: c.EditorContextKeys.writable
- }) || this
- }
- return r(t, e), t
- }(A);
- t.DeleteWordEndRight = z;
- var H = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !0,
- wordNavigationType: 2,
- id: "deleteWordRight",
- precondition: c.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: c.EditorContextKeys.textInputFocus,
- primary: 2068,
- mac: {primary: 532},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(A);
- t.DeleteWordRight = H, n.registerEditorCommand(new _), n.registerEditorCommand(new y), n.registerEditorCommand(new C), n.registerEditorCommand(new b), n.registerEditorCommand(new S), n.registerEditorCommand(new w), n.registerEditorCommand(new D), n.registerEditorCommand(new N),
- n.registerEditorCommand(new x), n.registerEditorCommand(new I), n.registerEditorCommand(new M), n.registerEditorCommand(new k), n.registerEditorCommand(new E), n.registerEditorCommand(new L), n.registerEditorCommand(new T), n.registerEditorCommand(new R), n.registerEditorCommand(new F), n.registerEditorCommand(new W), n.registerEditorCommand(new B), n.registerEditorCommand(new V), n.registerEditorCommand(new z), n.registerEditorCommand(new H)
- })), define(n[543], i([0, 1, 12, 160, 3, 23, 226, 29]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !0,
- wordNavigationType: 0,
- id: "deleteWordPartLeft",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 769}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype._delete = function (e, t, n, r, s) {
- var a = i.WordPartOperations.deleteWordPartLeft(e, t, n, r);
- return a || new o.Range(1, 1, 1, 1)
- }, t
- }(a.DeleteWordCommand);
- t.DeleteWordPartLeft = u
- ;var d = function (e) {
- function t() {
- return e.call(this, {
- whitespaceHeuristics: !0,
- wordNavigationType: 2,
- id: "deleteWordPartRight",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 788}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype._delete = function (e, t, n, r, s) {
- var a = i.WordPartOperations.deleteWordPartRight(e, t, n, r);
- if (a) return a;
- var l = t.getLineCount(), u = t.getLineMaxColumn(l);
- return new o.Range(l, u, l, u)
- }, t
- }(a.DeleteWordCommand);
- t.DeleteWordPartRight = d;
- var c = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._move = function (e, t, n, o) {
- return i.WordPartOperations.moveWordPartLeft(e, t, n)
- }, t
- }(a.MoveWordCommand);
- t.WordPartLeftCommand = c;
- var h = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 0,
- id: "cursorWordPartLeft",
- precondition: void 0,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 783}, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(c);
- t.CursorWordPartLeft = h,
- l.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft", "cursorWordPartLeft");
- var p = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 0,
- id: "cursorWordPartLeftSelect",
- precondition: void 0,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 1807}, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(c);
- t.CursorWordPartLeftSelect = p, l.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect", "cursorWordPartLeftSelect");
- var g = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._move = function (e, t, n, o) {
- return i.WordPartOperations.moveWordPartRight(e, t, n)
- }, t
- }(a.MoveWordCommand);
- t.WordPartRightCommand = g;
- var f = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !1,
- wordNavigationType: 2,
- id: "cursorWordPartRight",
- precondition: void 0,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 785}, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(g);
- t.CursorWordPartRight = f;
- var m = function (e) {
- function t() {
- return e.call(this, {
- inSelectionMode: !0,
- wordNavigationType: 2,
- id: "cursorWordPartRightSelect",
- precondition: void 0,
- kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 1809}, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(g);
- t.CursorWordPartRightSelect = m, n.registerEditorCommand(new u), n.registerEditorCommand(new d), n.registerEditorCommand(new h), n.registerEditorCommand(new p), n.registerEditorCommand(new f), n.registerEditorCommand(new m)
- })), define(n[544], i([0, 1, 24, 6, 2, 12, 326]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t) {
- var i = e.call(this) || this;
- return i.editor = t, i.widget = null, n.isIPad && (i._register(t.onDidChangeConfiguration((function () {
- return i.update()
- }))), i.update()), i
- }
- return r(t, e), t.prototype.update = function () {
- var e = !this.editor.getOption(68);
- !this.widget && e ? this.widget = new l(this.editor) : this.widget && !e && (this.widget.dispose(), this.widget = null)
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this),
- this.widget && (this.widget.dispose(), this.widget = null)
- }, t.ID = "editor.contrib.iPadShowKeyboard", t
- }(o.Disposable);
- t.IPadShowKeyboard = a;
- var l = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.editor = t, n._domNode = document.createElement("textarea"), n._domNode.className = "iPadShowKeyboard", n._register(i.addDisposableListener(n._domNode, "touchstart", (function (e) {
- n.editor.focus()
- }))), n._register(i.addDisposableListener(n._domNode, "focus", (function (e) {
- n.editor.focus()
- }))), n.editor.addOverlayWidget(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this.editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
- }, t.prototype.getId = function () {
- return t.ID
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.getPosition = function () {
- return {preference: 1}
- }, t.ID = "editor.contrib.ShowKeyboardWidget", t
- }(o.Disposable);
- s.registerEditorContribution(a.ID, a)
- })), define(n[545], i([0, 1, 12, 94, 59]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t() {
- var t = e.call(this, {
- id: "editor.action.toggleHighContrast",
- label: o.ToggleHighContrastNLS.toggleHighContrast,
- alias: "Toggle High Contrast Theme",
- precondition: void 0
- }) || this;
- return t._originalThemeName = null, t
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = e.get(i.IStandaloneThemeService);
- this._originalThemeName ? (n.setTheme(this._originalThemeName), this._originalThemeName = null) : (this._originalThemeName = n.getTheme().themeName, n.setTheme("hc-black"))
- }, t
- }(n.EditorAction);
- n.registerEditorAction(s)
- })), define(n[20], i([0, 1, 42, 27, 4, 476, 220, 15]), (function (e, t, n, i, o, r, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {ColorContribution: "base.contributions.colors"};
- var l = new (function () {
- function e() {
- this._onDidChangeSchema = new o.Emitter, this.onDidChangeSchema = this._onDidChangeSchema.event, this.colorSchema = {
- type: "object",
- properties: {}
- }, this.colorReferenceSchema = {type: "string", enum: [], enumDescriptions: []}, this.colorsById = {}
- }
- return e.prototype.registerColor = function (e, t, n, i, o) {
- void 0 === i && (i = !1)
- ;var r = {id: e, description: n, defaults: t, needsTransparency: i, deprecationMessage: o};
- this.colorsById[e] = r;
- var s = {
- type: "string",
- description: n,
- format: "color-hex",
- defaultSnippets: [{body: "${1:#ff0000}"}]
- };
- return o && (s.deprecationMessage = o), this.colorSchema.properties[e] = s, this.colorReferenceSchema.enum.push(e), this.colorReferenceSchema.enumDescriptions.push(n), this._onDidChangeSchema.fire(), e
- }, e.prototype.resolveDefaultColor = function (e, t) {
- var n = this.colorsById[e];
- if (n && n.defaults) return g(n.defaults[t.type], t)
- }, e.prototype.getColorSchema = function () {
- return this.colorSchema
- }, e.prototype.toString = function () {
- var e = this;
- return Object.keys(this.colorsById).sort((function (e, t) {
- var n = -1 === e.indexOf(".") ? 0 : 1, i = -1 === t.indexOf(".") ? 0 : 1;
- return n !== i ? n - i : e.localeCompare(t)
- })).map((function (t) {
- return "- `" + t + "`: " + e.colorsById[t].description
- })).join("\n")
- }, e
- }());
- function u(e, t, n, i, o) {
- return l.registerColor(e, t, n, i, o)
- }
- function d(e, t) {
- return function (n) {
- var i = g(e, n);
- if (i) return i.darken(t)
- }
- }
- function c(e, t) {
- return function (n) {
- var i = g(e, n);
- if (i) return i.lighten(t)
- }
- }
- function h(e, t) {
- return function (n) {
- var i = g(e, n);
- if (i) return i.transparent(t)
- }
- }
- function p(e, t, n, o) {
- return function (r) {
- var s = g(e, r);
- if (s) {
- var a = g(t, r);
- return a ? s.isDarkerThan(a) ? i.Color.getLighterColor(s, a, n).transparent(o) : i.Color.getDarkerColor(s, a, n).transparent(o) : s.transparent(n * o)
- }
- }
- }
- function g(e, t) {
- if (null !== e) return "string" == typeof e ? "#" === e[0] ? i.Color.fromHex(e) : t.getColor(e) : e instanceof i.Color ? e : "function" == typeof e ? e(t) : void 0
- }
- n.Registry.add(t.Extensions.ColorContribution, l), t.registerColor = u, t.foreground = u("foreground", {
- dark: "#CCCCCC",
- light: "#616161",
- hc: "#FFFFFF"
- }, r.localize(0, null)), t.errorForeground = u("errorForeground", {
- dark: "#F48771",
- light: "#A1260D",
- hc: "#F48771"
- }, r.localize(1, null)), t.focusBorder = u("focusBorder", {
- dark: i.Color.fromHex("#0E639C").transparent(.8),
- light: i.Color.fromHex("#007ACC").transparent(.4),
- hc: "#F38518"
- }, r.localize(2, null)), t.contrastBorder = u("contrastBorder", {
- light: null,
- dark: null,
- hc: "#6FC3DF"
- }, r.localize(3, null)),
- t.activeContrastBorder = u("contrastActiveBorder", {
- light: null,
- dark: null,
- hc: t.focusBorder
- }, r.localize(4, null)), t.textLinkForeground = u("textLink.foreground", {
- light: "#006AB1",
- dark: "#3794FF",
- hc: "#3794FF"
- }, r.localize(5, null)), t.textCodeBlockBackground = u("textCodeBlock.background", {
- light: "#dcdcdc66",
- dark: "#0a0a0a66",
- hc: i.Color.black
- }, r.localize(6, null)), t.widgetShadow = u("widget.shadow", {
- dark: "#000000",
- light: "#A8A8A8",
- hc: null
- }, r.localize(7, null)), t.inputBackground = u("input.background", {
- dark: "#3C3C3C",
- light: i.Color.white,
- hc: i.Color.black
- }, r.localize(8, null)), t.inputForeground = u("input.foreground", {
- dark: t.foreground,
- light: t.foreground,
- hc: t.foreground
- }, r.localize(9, null)), t.inputBorder = u("input.border", {
- dark: null,
- light: null,
- hc: t.contrastBorder
- }, r.localize(10, null)), t.inputActiveOptionBorder = u("inputOption.activeBorder", {
- dark: "#007ACC00",
- light: "#007ACC00",
- hc: t.contrastBorder
- }, r.localize(11, null)), t.inputActiveOptionBackground = u("inputOption.activeBackground", {
- dark: h(t.focusBorder, .5), light: h(t.focusBorder, .3), hc: null
- }, r.localize(12, null)), t.inputValidationInfoBackground = u("inputValidation.infoBackground", {
- dark: "#063B49",
- light: "#D6ECF2",
- hc: i.Color.black
- }, r.localize(13, null)), t.inputValidationInfoForeground = u("inputValidation.infoForeground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(14, null)), t.inputValidationInfoBorder = u("inputValidation.infoBorder", {
- dark: "#007acc",
- light: "#007acc",
- hc: t.contrastBorder
- }, r.localize(15, null)), t.inputValidationWarningBackground = u("inputValidation.warningBackground", {
- dark: "#352A05",
- light: "#F6F5D2",
- hc: i.Color.black
- }, r.localize(16, null)), t.inputValidationWarningForeground = u("inputValidation.warningForeground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(17, null)), t.inputValidationWarningBorder = u("inputValidation.warningBorder", {
- dark: "#B89500",
- light: "#B89500",
- hc: t.contrastBorder
- }, r.localize(18, null)), t.inputValidationErrorBackground = u("inputValidation.errorBackground", {
- dark: "#5A1D1D",
- light: "#F2DEDE",
- hc: i.Color.black
- }, r.localize(19, null)),
- t.inputValidationErrorForeground = u("inputValidation.errorForeground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(20, null)), t.inputValidationErrorBorder = u("inputValidation.errorBorder", {
- dark: "#BE1100",
- light: "#BE1100",
- hc: t.contrastBorder
- }, r.localize(21, null)), t.selectBackground = u("dropdown.background", {
- dark: "#3C3C3C",
- light: i.Color.white,
- hc: i.Color.black
- }, r.localize(22, null)), t.selectForeground = u("dropdown.foreground", {
- dark: "#F0F0F0",
- light: null,
- hc: i.Color.white
- }, r.localize(23, null)), t.pickerGroupForeground = u("pickerGroup.foreground", {
- dark: "#3794FF",
- light: "#0066BF",
- hc: i.Color.white
- }, r.localize(24, null)), t.pickerGroupBorder = u("pickerGroup.border", {
- dark: "#3F3F46",
- light: "#CCCEDB",
- hc: i.Color.white
- }, r.localize(25, null)), t.badgeBackground = u("badge.background", {
- dark: "#4D4D4D",
- light: "#C4C4C4",
- hc: i.Color.black
- }, r.localize(26, null)), t.badgeForeground = u("badge.foreground", {
- dark: i.Color.white,
- light: "#333",
- hc: i.Color.white
- }, r.localize(27, null)), t.scrollbarShadow = u("scrollbar.shadow", {
- dark: "#000000", light: "#DDDDDD", hc: null
- }, r.localize(28, null)), t.scrollbarSliderBackground = u("scrollbarSlider.background", {
- dark: i.Color.fromHex("#797979").transparent(.4),
- light: i.Color.fromHex("#646464").transparent(.4),
- hc: h(t.contrastBorder, .6)
- }, r.localize(29, null)), t.scrollbarSliderHoverBackground = u("scrollbarSlider.hoverBackground", {
- dark: i.Color.fromHex("#646464").transparent(.7),
- light: i.Color.fromHex("#646464").transparent(.7),
- hc: h(t.contrastBorder, .8)
- }, r.localize(30, null)), t.scrollbarSliderActiveBackground = u("scrollbarSlider.activeBackground", {
- dark: i.Color.fromHex("#BFBFBF").transparent(.4),
- light: i.Color.fromHex("#000000").transparent(.6),
- hc: t.contrastBorder
- }, r.localize(31, null)), t.progressBarBackground = u("progressBar.background", {
- dark: i.Color.fromHex("#0E70C0"),
- light: i.Color.fromHex("#0E70C0"),
- hc: t.contrastBorder
- }, r.localize(32, null)), t.editorErrorForeground = u("editorError.foreground", {
- dark: "#F48771",
- light: "#E51400",
- hc: null
- }, r.localize(33, null)), t.editorErrorBorder = u("editorError.border", {
- dark: null, light: null,
- hc: i.Color.fromHex("#E47777").transparent(.8)
- }, r.localize(34, null)), t.editorWarningForeground = u("editorWarning.foreground", {
- dark: "#CCA700",
- light: "#E9A700",
- hc: null
- }, r.localize(35, null)), t.editorWarningBorder = u("editorWarning.border", {
- dark: null,
- light: null,
- hc: i.Color.fromHex("#FFCC00").transparent(.8)
- }, r.localize(36, null)), t.editorInfoForeground = u("editorInfo.foreground", {
- dark: "#75BEFF",
- light: "#75BEFF",
- hc: null
- }, r.localize(37, null)), t.editorInfoBorder = u("editorInfo.border", {
- dark: null,
- light: null,
- hc: i.Color.fromHex("#75BEFF").transparent(.8)
- }, r.localize(38, null)), t.editorHintForeground = u("editorHint.foreground", {
- dark: i.Color.fromHex("#eeeeee").transparent(.7),
- light: "#6c6c6c",
- hc: null
- }, r.localize(39, null)), t.editorHintBorder = u("editorHint.border", {
- dark: null,
- light: null,
- hc: i.Color.fromHex("#eeeeee").transparent(.8)
- }, r.localize(40, null)), t.editorBackground = u("editor.background", {
- light: "#fffffe",
- dark: "#1E1E1E",
- hc: i.Color.black
- }, r.localize(41, null)), t.editorForeground = u("editor.foreground", {
- light: "#333333", dark: "#BBBBBB",
- hc: i.Color.white
- }, r.localize(42, null)), t.editorWidgetBackground = u("editorWidget.background", {
- dark: "#252526",
- light: "#F3F3F3",
- hc: "#0C141F"
- }, r.localize(43, null)), t.editorWidgetForeground = u("editorWidget.foreground", {
- dark: t.foreground,
- light: t.foreground,
- hc: t.foreground
- }, r.localize(44, null)), t.editorWidgetBorder = u("editorWidget.border", {
- dark: "#454545",
- light: "#C8C8C8",
- hc: t.contrastBorder
- }, r.localize(45, null)), t.editorWidgetResizeBorder = u("editorWidget.resizeBorder", {
- light: null,
- dark: null,
- hc: null
- }, r.localize(46, null)), t.editorSelectionBackground = u("editor.selectionBackground", {
- light: "#ADD6FF",
- dark: "#264F78",
- hc: "#f3f518"
- }, r.localize(47, null)), t.editorSelectionForeground = u("editor.selectionForeground", {
- light: null,
- dark: null,
- hc: "#000000"
- }, r.localize(48, null)), t.editorInactiveSelection = u("editor.inactiveSelectionBackground", {
- light: h(t.editorSelectionBackground, .5),
- dark: h(t.editorSelectionBackground, .5),
- hc: h(t.editorSelectionBackground, .5)
- }, r.localize(49, null), !0),
- t.editorSelectionHighlight = u("editor.selectionHighlightBackground", {
- light: p(t.editorSelectionBackground, t.editorBackground, .3, .6),
- dark: p(t.editorSelectionBackground, t.editorBackground, .3, .6),
- hc: null
- }, r.localize(50, null), !0), t.editorSelectionHighlightBorder = u("editor.selectionHighlightBorder", {
- light: null,
- dark: null,
- hc: t.activeContrastBorder
- }, r.localize(51, null)), t.editorFindMatch = u("editor.findMatchBackground", {
- light: "#A8AC94",
- dark: "#515C6A",
- hc: null
- }, r.localize(52, null)), t.editorFindMatchHighlight = u("editor.findMatchHighlightBackground", {
- light: "#EA5C0055",
- dark: "#EA5C0055",
- hc: null
- }, r.localize(53, null), !0), t.editorFindRangeHighlight = u("editor.findRangeHighlightBackground", {
- dark: "#3a3d4166",
- light: "#b4b4b44d",
- hc: null
- }, r.localize(54, null), !0), t.editorFindMatchBorder = u("editor.findMatchBorder", {
- light: null,
- dark: null,
- hc: t.activeContrastBorder
- }, r.localize(55, null)), t.editorFindMatchHighlightBorder = u("editor.findMatchHighlightBorder", {
- light: null,
- dark: null,
- hc: t.activeContrastBorder
- }, r.localize(56, null)),
- t.editorFindRangeHighlightBorder = u("editor.findRangeHighlightBorder", {
- dark: null,
- light: null,
- hc: h(t.activeContrastBorder, .4)
- }, r.localize(57, null), !0), t.editorHoverHighlight = u("editor.hoverHighlightBackground", {
- light: "#ADD6FF26",
- dark: "#264f7840",
- hc: "#ADD6FF26"
- }, r.localize(58, null), !0), t.editorHoverBackground = u("editorHoverWidget.background", {
- light: t.editorWidgetBackground,
- dark: t.editorWidgetBackground,
- hc: t.editorWidgetBackground
- }, r.localize(59, null)), t.editorHoverForeground = u("editorHoverWidget.foreground", {
- light: t.editorWidgetForeground,
- dark: t.editorWidgetForeground,
- hc: t.editorWidgetForeground
- }, r.localize(60, null)), t.editorHoverBorder = u("editorHoverWidget.border", {
- light: t.editorWidgetBorder,
- dark: t.editorWidgetBorder,
- hc: t.editorWidgetBorder
- }, r.localize(61, null)), t.editorHoverStatusBarBackground = u("editorHoverWidget.statusBarBackground", {
- dark: c(t.editorHoverBackground, .2),
- light: d(t.editorHoverBackground, .05),
- hc: t.editorWidgetBackground
- }, r.localize(62, null)),
- t.editorActiveLinkForeground = u("editorLink.activeForeground", {
- dark: "#4E94CE",
- light: i.Color.blue,
- hc: i.Color.cyan
- }, r.localize(63, null)), t.editorLightBulbForeground = u("editorLightBulb.foreground", {
- dark: "#FFCC00",
- light: "#DDB100",
- hc: "#FFCC00"
- }, r.localize(64, null)), t.editorLightBulbAutoFixForeground = u("editorLightBulbAutoFix.foreground", {
- dark: "#75BEFF",
- light: "#007ACC",
- hc: "#75BEFF"
- }, r.localize(65, null)), t.defaultInsertColor = new i.Color(new i.RGBA(155, 185, 85, .2)), t.defaultRemoveColor = new i.Color(new i.RGBA(255, 0, 0, .2)), t.diffInserted = u("diffEditor.insertedTextBackground", {
- dark: t.defaultInsertColor,
- light: t.defaultInsertColor,
- hc: null
- }, r.localize(66, null), !0), t.diffRemoved = u("diffEditor.removedTextBackground", {
- dark: t.defaultRemoveColor,
- light: t.defaultRemoveColor,
- hc: null
- }, r.localize(67, null), !0), t.diffInsertedOutline = u("diffEditor.insertedTextBorder", {
- dark: null,
- light: null,
- hc: "#33ff2eff"
- }, r.localize(68, null)), t.diffRemovedOutline = u("diffEditor.removedTextBorder", {
- dark: null,
- light: null,
- hc: "#FF008F"
- }, r.localize(69, null)),
- t.diffBorder = u("diffEditor.border", {
- dark: null,
- light: null,
- hc: t.contrastBorder
- }, r.localize(70, null)), t.listFocusBackground = u("list.focusBackground", {
- dark: "#062F4A",
- light: "#D6EBFF",
- hc: null
- }, r.localize(71, null)), t.listFocusForeground = u("list.focusForeground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(72, null)), t.listActiveSelectionBackground = u("list.activeSelectionBackground", {
- dark: "#094771",
- light: "#0074E8",
- hc: null
- }, r.localize(73, null)), t.listActiveSelectionForeground = u("list.activeSelectionForeground", {
- dark: i.Color.white,
- light: i.Color.white,
- hc: null
- }, r.localize(74, null)), t.listInactiveSelectionBackground = u("list.inactiveSelectionBackground", {
- dark: "#37373D",
- light: "#E4E6F1",
- hc: null
- }, r.localize(75, null)), t.listInactiveSelectionForeground = u("list.inactiveSelectionForeground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(76, null)), t.listInactiveFocusBackground = u("list.inactiveFocusBackground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(77, null)), t.listHoverBackground = u("list.hoverBackground", {
- dark: "#2A2D2E", light: "#F0F0F0",
- hc: null
- }, r.localize(78, null)), t.listHoverForeground = u("list.hoverForeground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(79, null)), t.listDropBackground = u("list.dropBackground", {
- dark: t.listFocusBackground,
- light: t.listFocusBackground,
- hc: null
- }, r.localize(80, null)), t.listHighlightForeground = u("list.highlightForeground", {
- dark: "#0097fb",
- light: "#0066BF",
- hc: t.focusBorder
- }, r.localize(81, null)), t.listFilterWidgetBackground = u("listFilterWidget.background", {
- light: "#efc1ad",
- dark: "#653723",
- hc: i.Color.black
- }, r.localize(82, null)), t.listFilterWidgetOutline = u("listFilterWidget.outline", {
- dark: i.Color.transparent,
- light: i.Color.transparent,
- hc: "#f38518"
- }, r.localize(83, null)), t.listFilterWidgetNoMatchesOutline = u("listFilterWidget.noMatchesOutline", {
- dark: "#BE1100",
- light: "#BE1100",
- hc: t.contrastBorder
- }, r.localize(84, null)), t.treeIndentGuidesStroke = u("tree.indentGuidesStroke", {
- dark: "#585858",
- light: "#a9a9a9",
- hc: "#a9a9a9"
- }, r.localize(85, null)), t.menuBorder = u("menu.border", {
- dark: null,
- light: null,
- hc: t.contrastBorder
- }, r.localize(86, null)),
- t.menuForeground = u("menu.foreground", {
- dark: t.selectForeground,
- light: t.foreground,
- hc: t.selectForeground
- }, r.localize(87, null)), t.menuBackground = u("menu.background", {
- dark: t.selectBackground,
- light: t.selectBackground,
- hc: t.selectBackground
- }, r.localize(88, null)), t.menuSelectionForeground = u("menu.selectionForeground", {
- dark: t.listActiveSelectionForeground,
- light: t.listActiveSelectionForeground,
- hc: t.listActiveSelectionForeground
- }, r.localize(89, null)), t.menuSelectionBackground = u("menu.selectionBackground", {
- dark: t.listActiveSelectionBackground,
- light: t.listActiveSelectionBackground,
- hc: t.listActiveSelectionBackground
- }, r.localize(90, null)), t.menuSelectionBorder = u("menu.selectionBorder", {
- dark: null,
- light: null,
- hc: t.activeContrastBorder
- }, r.localize(91, null)), t.menuSeparatorBackground = u("menu.separatorBackground", {
- dark: "#BBBBBB",
- light: "#888888",
- hc: t.contrastBorder
- }, r.localize(92, null)), t.snippetTabstopHighlightBackground = u("editor.snippetTabstopHighlightBackground", {
- dark: new i.Color(new i.RGBA(124, 124, 124, .3)),
- light: new i.Color(new i.RGBA(10, 50, 100, .2)), hc: new i.Color(new i.RGBA(124, 124, 124, .3))
- }, r.localize(93, null)), t.snippetTabstopHighlightBorder = u("editor.snippetTabstopHighlightBorder", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(94, null)), t.snippetFinalTabstopHighlightBackground = u("editor.snippetFinalTabstopHighlightBackground", {
- dark: null,
- light: null,
- hc: null
- }, r.localize(95, null)), t.snippetFinalTabstopHighlightBorder = u("editor.snippetFinalTabstopHighlightBorder", {
- dark: "#525252",
- light: new i.Color(new i.RGBA(10, 50, 100, .5)),
- hc: "#525252"
- }, r.localize(96, null)),t.overviewRulerFindMatchForeground = u("editorOverviewRuler.findMatchForeground", {
- dark: "#d186167e",
- light: "#d186167e",
- hc: "#AB5A00"
- }, r.localize(97, null), !0),t.overviewRulerSelectionHighlightForeground = u("editorOverviewRuler.selectionHighlightForeground", {
- dark: "#A0A0A0CC",
- light: "#A0A0A0CC",
- hc: "#A0A0A0CC"
- }, r.localize(98, null), !0),t.minimapFindMatch = u("minimap.findMatchHighlight", {
- light: "#d18616",
- dark: "#d18616",
- hc: "#AB5A00"
- }, r.localize(99, null), !0),
- t.minimapSelection = u("minimap.selectionHighlight", {
- light: "#ADD6FF",
- dark: "#264F78",
- hc: "#ffffff"
- }, r.localize(100, null), !0),t.minimapError = u("minimap.errorHighlight", {
- dark: new i.Color(new i.RGBA(255, 18, 18, .7)),
- light: new i.Color(new i.RGBA(255, 18, 18, .7)),
- hc: new i.Color(new i.RGBA(255, 50, 50, 1))
- }, r.localize(101, null)),t.minimapWarning = u("minimap.warningHighlight", {
- dark: t.editorWarningForeground,
- light: t.editorWarningForeground,
- hc: t.editorWarningBorder
- }, r.localize(102, null)),t.problemsErrorIconForeground = u("problemsErrorIcon.foreground", {
- dark: t.editorErrorForeground,
- light: t.editorErrorForeground,
- hc: t.editorErrorForeground
- }, r.localize(103, null)),t.problemsWarningIconForeground = u("problemsWarningIcon.foreground", {
- dark: t.editorWarningForeground,
- light: t.editorWarningForeground,
- hc: t.editorWarningForeground
- }, r.localize(104, null)),t.problemsInfoIconForeground = u("problemsInfoIcon.foreground", {
- dark: t.editorInfoForeground,
- light: t.editorInfoForeground,
- hc: t.editorInfoForeground
- }, r.localize(105, null)),t.darken = d,t.lighten = c,
- t.transparent = h,t.oneOf = function () {
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
- return function (t) {
- for (var n = 0, i = e; n < i.length; n++) {
- var o = g(i[n], t);
- if (o) return o
- }
- }
- },t.resolveColorValue = g,t.workbenchColorsSchemaId = "vscode://schemas/workbench-colors";
- var f = n.Registry.as(s.Extensions.JSONContribution);
- f.registerSchema(t.workbenchColorsSchemaId, l.getColorSchema());
- var m = new a.RunOnceScheduler((function () {
- return f.notifySchemaChanged(t.workbenchColorsSchemaId)
- }), 200);
- l.onDidChangeSchema((function () {
- m.isScheduled() || m.schedule()
- }))
- })), define(n[97], i([0, 1, 20]), (function (e, t, n) {
- "use strict";
- function i(e, t) {
- var i = Object.create(null);
- for (var o in t) {
- var r = t[o];
- r && (i[o] = n.resolveColorValue(r, e))
- }
- return i
- }
- function o(e, t, n) {
- function o(o) {
- var r = i(e.getTheme(), t);
- "function" == typeof n ? n(r) : n.style(r)
- }
- return o(e.getTheme()), e.onThemeChange(o)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.computeStyles = i, t.attachStyler = o, t.attachBadgeStyler = function (e, t, i) {
- return o(t, {
- badgeBackground: i && i.badgeBackground || n.badgeBackground,
- badgeForeground: i && i.badgeForeground || n.badgeForeground,
- badgeBorder: n.contrastBorder
- }, e)
- }, t.attachQuickOpenStyler = function (e, t, i) {
- return o(t, {
- foreground: i && i.foreground || n.foreground,
- background: i && i.background || n.editorBackground,
- borderColor: i && i.borderColor || n.contrastBorder,
- widgetShadow: i && i.widgetShadow || n.widgetShadow,
- progressBarBackground: i && i.progressBarBackground || n.progressBarBackground,
- pickerGroupForeground: i && i.pickerGroupForeground || n.pickerGroupForeground,
- pickerGroupBorder: i && i.pickerGroupBorder || n.pickerGroupBorder,
- inputBackground: i && i.inputBackground || n.inputBackground,
- inputForeground: i && i.inputForeground || n.inputForeground,
- inputBorder: i && i.inputBorder || n.inputBorder,
- inputValidationInfoBorder: i && i.inputValidationInfoBorder || n.inputValidationInfoBorder,
- inputValidationInfoBackground: i && i.inputValidationInfoBackground || n.inputValidationInfoBackground,
- inputValidationInfoForeground: i && i.inputValidationInfoForeground || n.inputValidationInfoForeground,
- inputValidationWarningBorder: i && i.inputValidationWarningBorder || n.inputValidationWarningBorder,
- inputValidationWarningBackground: i && i.inputValidationWarningBackground || n.inputValidationWarningBackground,
- inputValidationWarningForeground: i && i.inputValidationWarningForeground || n.inputValidationWarningForeground,
- inputValidationErrorBorder: i && i.inputValidationErrorBorder || n.inputValidationErrorBorder,
- inputValidationErrorBackground: i && i.inputValidationErrorBackground || n.inputValidationErrorBackground,
- inputValidationErrorForeground: i && i.inputValidationErrorForeground || n.inputValidationErrorForeground,
- listFocusBackground: i && i.listFocusBackground || n.listFocusBackground,
- listFocusForeground: i && i.listFocusForeground || n.listFocusForeground,
- listActiveSelectionBackground: i && i.listActiveSelectionBackground || n.darken(n.listActiveSelectionBackground, .1),
- listActiveSelectionForeground: i && i.listActiveSelectionForeground || n.listActiveSelectionForeground,
- listFocusAndSelectionBackground: i && i.listFocusAndSelectionBackground || n.listActiveSelectionBackground,
- listFocusAndSelectionForeground: i && i.listFocusAndSelectionForeground || n.listActiveSelectionForeground,
- listInactiveSelectionBackground: i && i.listInactiveSelectionBackground || n.listInactiveSelectionBackground,
- listInactiveSelectionForeground: i && i.listInactiveSelectionForeground || n.listInactiveSelectionForeground,
- listInactiveFocusBackground: i && i.listInactiveFocusBackground || n.listInactiveFocusBackground,
- listHoverBackground: i && i.listHoverBackground || n.listHoverBackground,
- listHoverForeground: i && i.listHoverForeground || n.listHoverForeground,
- listDropBackground: i && i.listDropBackground || n.listDropBackground,
- listFocusOutline: i && i.listFocusOutline || n.activeContrastBorder,
- listSelectionOutline: i && i.listSelectionOutline || n.activeContrastBorder,
- listHoverOutline: i && i.listHoverOutline || n.activeContrastBorder
- }, e)
- },
- t.attachListStyler = function (e, n, i) {
- return o(n, l(l({}, t.defaultListStyles), i || {}), e)
- }, t.defaultListStyles = {
- listFocusBackground: n.listFocusBackground,
- listFocusForeground: n.listFocusForeground,
- listActiveSelectionBackground: n.darken(n.listActiveSelectionBackground, .1),
- listActiveSelectionForeground: n.listActiveSelectionForeground,
- listFocusAndSelectionBackground: n.listActiveSelectionBackground,
- listFocusAndSelectionForeground: n.listActiveSelectionForeground,
- listInactiveSelectionBackground: n.listInactiveSelectionBackground,
- listInactiveSelectionForeground: n.listInactiveSelectionForeground,
- listInactiveFocusBackground: n.listInactiveFocusBackground,
- listHoverBackground: n.listHoverBackground,
- listHoverForeground: n.listHoverForeground,
- listDropBackground: n.listDropBackground,
- listFocusOutline: n.activeContrastBorder,
- listSelectionOutline: n.activeContrastBorder,
- listHoverOutline: n.activeContrastBorder,
- listFilterWidgetBackground: n.listFilterWidgetBackground,
- listFilterWidgetOutline: n.listFilterWidgetOutline,
- listFilterWidgetNoMatchesOutline: n.listFilterWidgetNoMatchesOutline,
- listMatchesShadow: n.widgetShadow,
- treeIndentGuidesStroke: n.treeIndentGuidesStroke
- }, t.defaultMenuStyles = {
- shadowColor: n.widgetShadow,
- borderColor: n.menuBorder,
- foregroundColor: n.menuForeground,
- backgroundColor: n.menuBackground,
- selectionForegroundColor: n.menuSelectionForeground,
- selectionBackgroundColor: n.menuSelectionBackground,
- selectionBorderColor: n.menuSelectionBorder,
- separatorColor: n.menuSeparatorBackground
- }, t.attachMenuStyler = function (e, n, i) {
- return o(n, l(l({}, t.defaultMenuStyles), i), e)
- }
- })), define(n[546], i([0, 1, 6, 414, 20, 97]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function () {
- function e(e, t, n, s, a, l) {
- this.codeEditor = e, this.themeService = l, this.visible = !1, this.domNode = document.createElement("div"), this.quickOpenWidget = new i.QuickOpenWidget(this.domNode, {
- onOk: t,
- onCancel: n,
- onType: s
- }, {inputPlaceHolder: void 0, inputAriaLabel: a.inputAriaLabel, keyboardSupport: !0}),
- this.styler = r.attachQuickOpenStyler(this.quickOpenWidget, this.themeService, {pickerGroupForeground: o.foreground}), this.quickOpenWidget.create(), this.codeEditor.addOverlayWidget(this)
- }
- return e.prototype.setInput = function (e, t) {
- this.quickOpenWidget.setInput(e, t)
- }, e.prototype.getId = function () {
- return e.ID
- }, e.prototype.getDomNode = function () {
- return this.domNode
- }, e.prototype.destroy = function () {
- this.codeEditor.removeOverlayWidget(this), this.quickOpenWidget.dispose(), this.styler.dispose()
- }, e.prototype.show = function (e) {
- this.visible = !0;
- var t = this.codeEditor.getLayoutInfo();
- t && this.quickOpenWidget.layout(new n.Dimension(t.width, t.height)), this.quickOpenWidget.show(e), this.codeEditor.layoutOverlayWidget(this)
- }, e.prototype.getPosition = function () {
- return this.visible ? {preference: 2} : null
- }, e.ID = "editor.contrib.quickOpenEditorWidget", e
- }();
- t.QuickOpenEditorWidget = s
- })), define(n[547], i([0, 1, 55, 2, 205, 6, 97, 52, 45, 332]), (function (e, t, n, i, o, r, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- function e(e, t, n, i, o) {
- this.contextViewService = e, this.telemetryService = t, this.notificationService = n, this.keybindingService = i, this.themeService = o, this.focusToReturn = null, this.block = null, this.options = {blockMouse: !0}
- }
- return e.prototype.configure = function (e) {
- this.options = e
- }, e.prototype.showContextMenu = function (e) {
- var t, u = this, d = e.getActions();
- d.length && (this.focusToReturn = document.activeElement, this.contextViewService.showContextView({
- getAnchor: function () {
- return e.getAnchor()
- }, canRelayout: !1, anchorAlignment: e.anchorAlignment, render: function (c) {
- var h = e.getMenuClassName ? e.getMenuClassName() : "";
- h && (c.className += " " + h), u.options.blockMouse && (u.block = c.appendChild(r.$(".context-view-block")));
- var p = new i.DisposableStore, g = e.actionRunner || new n.ActionRunner;
- return g.onDidBeforeRun(u.onActionRun, u, p), g.onDidRun(u.onDidActionRun, u, p), t = new o.Menu(c, d, {
- actionViewItemProvider: e.getActionViewItem,
- context: e.getActionsContext ? e.getActionsContext() : null,
- actionRunner: g,
- getKeyBinding: e.getKeyBinding ? e.getKeyBinding : function (e) {
- return u.keybindingService.lookupKeybinding(e.id)
- }
- }), p.add(s.attachMenuStyler(t, u.themeService)), t.onDidCancel((function () {
- return u.contextViewService.hideContextView(!0)
- }), null, p), t.onDidBlur((function () {
- return u.contextViewService.hideContextView(!0)
- }), null, p), a.domEvent(window, r.EventType.BLUR)((function () {
- u.contextViewService.hideContextView(!0)
- }), null, p), a.domEvent(window, r.EventType.MOUSE_DOWN)((function (e) {
- if (!e.defaultPrevented) {
- var t = new l.StandardMouseEvent(e), n = t.target;
- if (!t.rightButton) {
- for (; n;) {
- if (n === c) return;
- n = n.parentElement
- }
- u.contextViewService.hideContextView(!0)
- }
- }
- }), null, p), i.combinedDisposable(p, t)
- }, focus: function () {
- t && t.focus(!!e.autoSelectFirstItem)
- }, onHide: function (t) {
- e.onHide && e.onHide(!!t), u.block && (r.removeNode(u.block), u.block = null), u.focusToReturn && u.focusToReturn.focus()
- }
- }))
- }, e.prototype.onActionRun = function (e) {
- this.telemetryService && this.telemetryService.publicLog2("workbenchActionExecuted", {
- id: e.action.id,
- from: "contextMenu"
- }), this.contextViewService.hideContextView(!1),
- this.focusToReturn && this.focusToReturn.focus()
- }, e.prototype.onDidActionRun = function (e) {
- e.error && this.notificationService && this.notificationService.error(e.error)
- }, e
- }();
- t.ContextMenuHandler = u
- })), define(n[14], i([0, 1, 11, 2, 42, 4]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IThemeService = n.createDecorator("themeService"), t.themeColorFromId = function (e) {
- return {id: e}
- }, t.DARK = "dark", t.HIGH_CONTRAST = "hc", t.getThemeTypeSelector = function (e) {
- switch (e) {
- case t.DARK:
- return "vs-dark";
- case t.HIGH_CONTRAST:
- return "hc-black";
- default:
- return "vs"
- }
- }, t.Extensions = {ThemingContribution: "base.contributions.theming"};
- var s = new (function () {
- function e() {
- this.themingParticipants = [], this.themingParticipants = [], this.onThemingParticipantAddedEmitter = new r.Emitter
- }
- return e.prototype.onThemeChange = function (e) {
- var t = this;
- return this.themingParticipants.push(e), this.onThemingParticipantAddedEmitter.fire(e), i.toDisposable((function () {
- var n = t.themingParticipants.indexOf(e);
- t.themingParticipants.splice(n, 1)
- }))
- }, e.prototype.getThemingParticipants = function () {
- return this.themingParticipants
- }, e
- }());
- o.Registry.add(t.Extensions.ThemingContribution, s), t.registerThemingParticipant = function (e) {
- return s.onThemeChange(e)
- }
- })), define(n[548], i([0, 1, 6, 2, 5, 25, 334, 68, 48, 14]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function () {
- function e(e, t, n) {
- this._parent = e, this._editorId = t, this.styleSheet = n, this._refCount = 0
- }
- return e.prototype.ref = function () {
- this._refCount++
- }, e.prototype.unref = function () {
- var e;
- this._refCount--, 0 === this._refCount && (null === (e = this.styleSheet.parentNode) || void 0 === e || e.removeChild(this.styleSheet), this._parent._removeEditorStyleSheets(this._editorId))
- }, e
- }(), p = function () {
- function e(e) {
- this.styleSheet = e
- }
- return e.prototype.ref = function () {
- }, e.prototype.unref = function () {
- }, e
- }(), f = function (e) {
- function t(t, n) {
- void 0 === n && (n = null);
- var i = e.call(this) || this;
- return i._decorationOptionProviders = new Map, i._editorStyleSheets = new Map, i._globalStyleSheet = n ? new p(n) : null,
- i._themeService = t, i
- }
- return r(t, e), t.prototype._getOrCreateGlobalStyleSheet = function () {
- return this._globalStyleSheet || (this._globalStyleSheet = new p(n.createStyleSheet())), this._globalStyleSheet
- }, t.prototype._getOrCreateStyleSheet = function (e) {
- if (!e) return this._getOrCreateGlobalStyleSheet();
- var t = e.getContainerDomNode();
- if (!n.isInShadowDOM(t)) return this._getOrCreateGlobalStyleSheet();
- var i = e.getId();
- if (!this._editorStyleSheets.has(i)) {
- var o = new c(this, i, n.createStyleSheet(t));
- this._editorStyleSheets.set(i, o)
- }
- return this._editorStyleSheets.get(i)
- }, t.prototype._removeEditorStyleSheets = function (e) {
- this._editorStyleSheets.delete(e)
- }, t.prototype.registerDecorationType = function (e, t, n, i) {
- var o = this._decorationOptionProviders.get(e);
- if (!o) {
- var r = this._getOrCreateStyleSheet(i),
- s = {styleSheet: r.styleSheet, key: e, parentTypeKey: n, options: t || Object.create(null)};
- o = n ? new m(this._themeService, r, s) : new v(this._themeService, r, s), this._decorationOptionProviders.set(e, o)
- }
- o.refCount++
- }, t.prototype.removeDecorationType = function (e) {
- var t = this._decorationOptionProviders.get(e);
- t && (t.refCount--, t.refCount <= 0 && (this._decorationOptionProviders.delete(e), t.dispose(), this.listCodeEditors().forEach((function (t) {
- return t.removeDecorations(e)
- }))))
- }, t.prototype.resolveDecorationOptions = function (e, t) {
- var n = this._decorationOptionProviders.get(e);
- if (!n) throw new Error("Unknown decoration type key: " + e);
- return n.getOptions(this, t)
- }, t = h([g(0, d.IThemeService)], t)
- }(a.AbstractCodeEditorService);
- t.CodeEditorServiceImpl = f;
- var m = function () {
- function e(e, t, n) {
- this._styleSheet = t, this._styleSheet.ref(), this._parentTypeKey = n.parentTypeKey, this.refCount = 0, this._beforeContentRules = new y(3, n, e), this._afterContentRules = new y(4, n, e)
- }
- return e.prototype.getOptions = function (e, t) {
- var n = e.resolveDecorationOptions(this._parentTypeKey, !0);
- return this._beforeContentRules && (n.beforeContentClassName = this._beforeContentRules.className), this._afterContentRules && (n.afterContentClassName = this._afterContentRules.className), n
- }, e.prototype.dispose = function () {
- this._beforeContentRules && (this._beforeContentRules.dispose(), this._beforeContentRules = null), this._afterContentRules && (this._afterContentRules.dispose(), this._afterContentRules = null), this._styleSheet.unref()
- }, e
- }(), v = function () {
- function e(e, t, n) {
- var o = this;
- this._disposables = new i.DisposableStore, this._styleSheet = t, this._styleSheet.ref(), this.refCount = 0;
- var r = function (t) {
- var i = new y(t, n, e);
- if (o._disposables.add(i), i.hasContent) return i.className
- };
- this.className = r(0);
- var s, a = (s = new y(1, n, e), o._disposables.add(s), s.hasContent ? {
- className: s.className,
- hasLetterSpacing: s.hasLetterSpacing
- } : null);
- a && (this.inlineClassName = a.className, this.inlineClassNameAffectsLetterSpacing = a.hasLetterSpacing), this.beforeContentClassName = r(3), this.afterContentClassName = r(4), this.glyphMarginClassName = r(2);
- var l = n.options;
- this.isWholeLine = Boolean(l.isWholeLine), this.stickiness = l.rangeBehavior;
- var d = l.light && l.light.overviewRulerColor || l.overviewRulerColor,
- c = l.dark && l.dark.overviewRulerColor || l.overviewRulerColor
- ;void 0 === d && void 0 === c || (this.overviewRuler = {
- color: d || c,
- darkColor: c || d,
- position: l.overviewRulerLane || u.OverviewRulerLane.Center
- })
- }
- return e.prototype.getOptions = function (e, t) {
- return t ? {
- inlineClassName: this.inlineClassName,
- beforeContentClassName: this.beforeContentClassName,
- afterContentClassName: this.afterContentClassName,
- className: this.className,
- glyphMarginClassName: this.glyphMarginClassName,
- isWholeLine: this.isWholeLine,
- overviewRuler: this.overviewRuler,
- stickiness: this.stickiness
- } : this
- }, e.prototype.dispose = function () {
- this._disposables.dispose(), this._styleSheet.unref()
- }, e
- }(), _ = {
- color: "color:{0} !important;",
- opacity: "opacity:{0};",
- backgroundColor: "background-color:{0};",
- outline: "outline:{0};",
- outlineColor: "outline-color:{0};",
- outlineStyle: "outline-style:{0};",
- outlineWidth: "outline-width:{0};",
- border: "border:{0};",
- borderColor: "border-color:{0};",
- borderRadius: "border-radius:{0};",
- borderSpacing: "border-spacing:{0};",
- borderStyle: "border-style:{0};",
- borderWidth: "border-width:{0};",
- fontStyle: "font-style:{0};",
- fontWeight: "font-weight:{0};",
- textDecoration: "text-decoration:{0};",
- cursor: "cursor:{0};",
- letterSpacing: "letter-spacing:{0};",
- gutterIconPath: "background:{0} center center no-repeat;",
- gutterIconSize: "background-size:{0};",
- contentText: "content:'{0}';",
- contentIconPath: "content:{0};",
- margin: "margin:{0};",
- width: "width:{0};",
- height: "height:{0};"
- }, y = function () {
- function e(e, t, n) {
- var i = this;
- this._theme = n.getTheme(), this._ruleType = e, this._providerArgs = t, this._usesThemeColors = !1, this._hasContent = !1, this._hasLetterSpacing = !1;
- var o = C.getClassName(this._providerArgs.key, e);
- this._providerArgs.parentTypeKey && (o = o + " " + C.getClassName(this._providerArgs.parentTypeKey, e)), this._className = o, this._unThemedSelector = C.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, e), this._buildCSS(), this._usesThemeColors ? this._themeListener = n.onThemeChange((function (e) {
- i._theme = n.getTheme(), i._removeCSS(), i._buildCSS()
- })) : this._themeListener = null
- }
- return e.prototype.dispose = function () {
- this._hasContent && (this._removeCSS(),
- this._hasContent = !1), this._themeListener && (this._themeListener.dispose(), this._themeListener = null)
- }, Object.defineProperty(e.prototype, "hasContent", {
- get: function () {
- return this._hasContent
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "hasLetterSpacing", {
- get: function () {
- return this._hasLetterSpacing
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "className", {
- get: function () {
- return this._className
- }, enumerable: !0, configurable: !0
- }), e.prototype._buildCSS = function () {
- var e, t, n, i = this._providerArgs.options;
- switch (this._ruleType) {
- case 0:
- e = this.getCSSTextForModelDecorationClassName(i), t = this.getCSSTextForModelDecorationClassName(i.light), n = this.getCSSTextForModelDecorationClassName(i.dark);
- break;
- case 1:
- e = this.getCSSTextForModelDecorationInlineClassName(i), t = this.getCSSTextForModelDecorationInlineClassName(i.light), n = this.getCSSTextForModelDecorationInlineClassName(i.dark);
- break;
- case 2:
- e = this.getCSSTextForModelDecorationGlyphMarginClassName(i),
- t = this.getCSSTextForModelDecorationGlyphMarginClassName(i.light), n = this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);
- break;
- case 3:
- e = this.getCSSTextForModelDecorationContentClassName(i.before), t = this.getCSSTextForModelDecorationContentClassName(i.light && i.light.before), n = this.getCSSTextForModelDecorationContentClassName(i.dark && i.dark.before);
- break;
- case 4:
- e = this.getCSSTextForModelDecorationContentClassName(i.after), t = this.getCSSTextForModelDecorationContentClassName(i.light && i.light.after), n = this.getCSSTextForModelDecorationContentClassName(i.dark && i.dark.after);
- break;
- default:
- throw new Error("Unknown rule type: " + this._ruleType)
- }
- var o = this._providerArgs.styleSheet.sheet, r = !1;
- e.length > 0 && (o.insertRule(this._unThemedSelector + " {" + e + "}", 0), r = !0), t.length > 0 && (o.insertRule(".vs" + this._unThemedSelector + " {" + t + "}", 0), r = !0), n.length > 0 && (o.insertRule(".vs-dark" + this._unThemedSelector + ", .hc-black" + this._unThemedSelector + " {" + n + "}", 0), r = !0), this._hasContent = r
- }, e.prototype._removeCSS = function () {
- n.removeCSSRulesContainingSelector(this._unThemedSelector, this._providerArgs.styleSheet)
- }, e.prototype.getCSSTextForModelDecorationClassName = function (e) {
- if (!e) return "";
- var t = [];
- return this.collectCSSText(e, ["backgroundColor"], t), this.collectCSSText(e, ["outline", "outlineColor", "outlineStyle", "outlineWidth"], t), this.collectBorderSettingsCSSText(e, t), t.join("")
- }, e.prototype.getCSSTextForModelDecorationInlineClassName = function (e) {
- if (!e) return "";
- var t = [];
- return this.collectCSSText(e, ["fontStyle", "fontWeight", "textDecoration", "cursor", "color", "opacity", "letterSpacing"], t), e.letterSpacing && (this._hasLetterSpacing = !0), t.join("")
- }, e.prototype.getCSSTextForModelDecorationContentClassName = function (e) {
- if (!e) return "";
- var t = [];
- if (void 0 !== e) {
- if (this.collectBorderSettingsCSSText(e, t), void 0 !== e.contentIconPath && t.push(o.format(_.contentIconPath, n.asCSSUrl(s.URI.revive(e.contentIconPath)))), "string" == typeof e.contentText) {
- var i = e.contentText.match(/^.*$/m)[0].replace(/['\\]/g, "\\$&");
- t.push(o.format(_.contentText, i))
- }
- this.collectCSSText(e, ["fontStyle", "fontWeight", "textDecoration", "color", "opacity", "backgroundColor", "margin"], t), this.collectCSSText(e, ["width", "height"], t) && t.push("display:inline-block;")
- }
- return t.join("")
- }, e.prototype.getCSSTextForModelDecorationGlyphMarginClassName = function (e) {
- if (!e) return "";
- var t = [];
- return void 0 !== e.gutterIconPath && (t.push(o.format(_.gutterIconPath, n.asCSSUrl(s.URI.revive(e.gutterIconPath)))), void 0 !== e.gutterIconSize && t.push(o.format(_.gutterIconSize, e.gutterIconSize))), t.join("")
- }, e.prototype.collectBorderSettingsCSSText = function (e, t) {
- return !!this.collectCSSText(e, ["border", "borderColor", "borderRadius", "borderSpacing", "borderStyle", "borderWidth"], t) && (t.push(o.format("box-sizing: border-box;")), !0)
- }, e.prototype.collectCSSText = function (e, t, n) {
- for (var i = n.length, r = 0, s = t; r < s.length; r++) {
- var a = s[r], l = this.resolveValue(e[a]);
- "string" == typeof l && n.push(o.format(_[a], l))
- }
- return n.length !== i
- }, e.prototype.resolveValue = function (e) {
- if (l.isThemeColor(e)) {
- this._usesThemeColors = !0
- ;var t = this._theme.getColor(e.id);
- return t ? t.toString() : "transparent"
- }
- return e
- }, e
- }(), C = function () {
- function e() {
- }
- return e.getClassName = function (e, t) {
- return "ced-" + e + "-" + t
- }, e.getSelector = function (e, t, n) {
- var i = ".monaco-editor ." + this.getClassName(e, n);
- return t && (i = i + "." + this.getClassName(t, n)), 3 === n ? i += "::before" : 4 === n && (i += "::after"), i
- }, e
- }()
- })), define(n[549], i([0, 1, 6, 28, 53, 37, 14]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function (e) {
- function t(t, r, l, u) {
- var d = e.call(this, t) || this, c = d._context.configuration.options, h = c.get(78), p = c.get(56),
- g = c.get(27), f = {
- listenOnDomNode: l.domNode,
- className: "editor-scrollable " + a.getThemeTypeSelector(t.theme.type),
- useShadows: !1,
- lazyRender: !0,
- vertical: h.vertical,
- horizontal: h.horizontal,
- verticalHasArrows: h.verticalHasArrows,
- horizontalHasArrows: h.horizontalHasArrows,
- verticalScrollbarSize: h.verticalScrollbarSize,
- verticalSliderSize: h.verticalSliderSize,
- horizontalScrollbarSize: h.horizontalScrollbarSize,
- horizontalSliderSize: h.horizontalSliderSize,
- handleMouseWheel: h.handleMouseWheel,
- alwaysConsumeMouseWheel: h.alwaysConsumeMouseWheel,
- arrowSize: h.arrowSize,
- mouseWheelScrollSensitivity: p,
- fastScrollSensitivity: g
- };
- d.scrollbar = d._register(new o.SmoothScrollableElement(r.domNode, f, d._context.viewLayout.getScrollable())), s.PartFingerprints.write(d.scrollbar.getDomNode(), 5), d.scrollbarDomNode = i.createFastDomNode(d.scrollbar.getDomNode()), d.scrollbarDomNode.setPosition("absolute"), d._setLayout();
- var m = function (e, t, n) {
- var i = {};
- if (t) {
- var o = e.scrollTop;
- o && (i.scrollTop = d._context.viewLayout.getCurrentScrollTop() + o, e.scrollTop = 0)
- }
- if (n) {
- var r = e.scrollLeft;
- r && (i.scrollLeft = d._context.viewLayout.getCurrentScrollLeft() + r, e.scrollLeft = 0)
- }
- d._context.viewLayout.setScrollPositionNow(i)
- };
- return d._register(n.addDisposableListener(l.domNode, "scroll", (function (e) {
- return m(l.domNode, !0, !0)
- }))), d._register(n.addDisposableListener(r.domNode, "scroll", (function (e) {
- return m(r.domNode, !0, !1)
- }))),
- d._register(n.addDisposableListener(u.domNode, "scroll", (function (e) {
- return m(u.domNode, !0, !1)
- }))), d._register(n.addDisposableListener(d.scrollbarDomNode.domNode, "scroll", (function (e) {
- return m(d.scrollbarDomNode.domNode, !0, !1)
- }))), d
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype._setLayout = function () {
- var e = this._context.configuration.options, t = e.get(107);
- this.scrollbarDomNode.setLeft(t.contentLeft), "right" === e.get(54).side ? this.scrollbarDomNode.setWidth(t.contentWidth + t.minimapWidth) : this.scrollbarDomNode.setWidth(t.contentWidth), this.scrollbarDomNode.setHeight(t.height)
- }, t.prototype.getOverviewRulerLayoutInfo = function () {
- return this.scrollbar.getOverviewRulerLayoutInfo()
- }, t.prototype.getDomNode = function () {
- return this.scrollbarDomNode
- }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
- this.scrollbar.delegateVerticalScrollbarMouseDown(e)
- }, t.prototype.onConfigurationChanged = function (e) {
- if (e.hasChanged(78) || e.hasChanged(56) || e.hasChanged(27)) {
- var t = this._context.configuration.options, n = t.get(78), i = t.get(56), o = t.get(27), r = {
- handleMouseWheel: n.handleMouseWheel,
- mouseWheelScrollSensitivity: i,
- fastScrollSensitivity: o
- };
- this.scrollbar.updateOptions(r)
- }
- return e.hasChanged(107) && this._setLayout(), !0
- }, t.prototype.onScrollChanged = function (e) {
- return !0
- }, t.prototype.onThemeChanged = function (e) {
- return this.scrollbar.updateClassName("editor-scrollable " + a.getThemeTypeSelector(this._context.theme.type)), !0
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- this.scrollbar.renderNow()
- }, t
- }(s.ViewPart);
- t.EditorScrollbar = l
- })), define(n[227], i([0, 1, 24, 28, 16, 359, 91, 148, 110, 14, 33]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var h = !!o.isNative || !(o.isLinux || n.isFirefox || n.isSafari), p = n.isEdgeOrIE, g = function () {
- function e(e, t) {
- this._domNode = e, this._clientRectDeltaLeft = 0, this._clientRectDeltaLeftRead = !1, this.endNode = t
- }
- return Object.defineProperty(e.prototype, "clientRectDeltaLeft", {
- get: function () {
- return this._clientRectDeltaLeftRead || (this._clientRectDeltaLeftRead = !0, this._clientRectDeltaLeft = this._domNode.getBoundingClientRect().left), this._clientRectDeltaLeft
- }, enumerable: !0, configurable: !0
- }), e
- }();
- t.DomReadingContext = g;
- var f = function () {
- function e(e, t) {
- this.themeType = t;
- var n = e.options, i = n.get(34);
- this.renderWhitespace = n.get(74), this.renderControlCharacters = n.get(69), this.spaceWidth = i.spaceWidth, this.middotWidth = i.middotWidth, this.useMonospaceOptimizations = i.isMonospace && !n.get(23), this.canUseHalfwidthRightwardsArrow = i.canUseHalfwidthRightwardsArrow, this.lineHeight = n.get(49), this.stopRenderingLineAfter = n.get(88), this.fontLigatures = n.get(35)
- }
- return e.prototype.equals = function (e) {
- return this.themeType === e.themeType && this.renderWhitespace === e.renderWhitespace && this.renderControlCharacters === e.renderControlCharacters && this.spaceWidth === e.spaceWidth && this.middotWidth === e.middotWidth && this.useMonospaceOptimizations === e.useMonospaceOptimizations && this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && this.lineHeight === e.lineHeight && this.stopRenderingLineAfter === e.stopRenderingLineAfter && this.fontLigatures === e.fontLigatures
- }, e
- }();
- t.ViewLineOptions = f;
- var m = function () {
- function e(e) {
- this._options = e, this._isMaybeInvalid = !0, this._renderedViewLine = null
- }
- return e.prototype.getDomNode = function () {
- return this._renderedViewLine && this._renderedViewLine.domNode ? this._renderedViewLine.domNode.domNode : null
- }, e.prototype.setDomNode = function (e) {
- if (!this._renderedViewLine) throw new Error("I have no rendered view line to set the dom node to...");
- this._renderedViewLine.domNode = i.createFastDomNode(e)
- }, e.prototype.onContentChanged = function () {
- this._isMaybeInvalid = !0
- },
- e.prototype.onTokensChanged = function () {
- this._isMaybeInvalid = !0
- }, e.prototype.onDecorationsChanged = function () {
- this._isMaybeInvalid = !0
- }, e.prototype.onOptionsChanged = function (e) {
- this._isMaybeInvalid = !0, this._options = e
- }, e.prototype.onSelectionChanged = function () {
- return !(!p && this._options.themeType !== d.HIGH_CONTRAST && "selection" !== this._options.renderWhitespace) && (this._isMaybeInvalid = !0, !0)
- }, e.prototype.renderLine = function (t, n, i, o) {
- if (!1 === this._isMaybeInvalid) return !1;
- this._isMaybeInvalid = !1;
- var r = i.getViewLineRenderingData(t), s = this._options,
- a = l.LineDecoration.filter(r.inlineDecorations, t, r.minColumn, r.maxColumn), g = null;
- if (p || s.themeType === d.HIGH_CONTRAST || "selection" === this._options.renderWhitespace) for (var f = 0, m = i.selections; f < m.length; f++) {
- var _ = m[f];
- if (!(_.endLineNumber < t || _.startLineNumber > t)) {
- var y = _.startLineNumber === t ? _.startColumn : r.minColumn,
- b = _.endLineNumber === t ? _.endColumn : r.maxColumn
- ;y < b && ("selection" !== this._options.renderWhitespace ? a.push(new l.LineDecoration(y, b, "inline-selected-text", 0)) : (g || (g = []), g.push(new u.LineRange(y - 1, b - 1))))
- }
- }
- var S = new u.RenderLineInput(s.useMonospaceOptimizations, s.canUseHalfwidthRightwardsArrow, r.content, r.continuesWithWrappedLine, r.isBasicASCII, r.containsRTL, r.minColumn - 1, r.tokens, a, r.tabSize, r.startVisibleColumn, s.spaceWidth, s.middotWidth, s.stopRenderingLineAfter, s.renderWhitespace, s.renderControlCharacters, s.fontLigatures !== c.EditorFontLigatures.OFF, g);
- if (this._renderedViewLine && this._renderedViewLine.input.equals(S)) return !1;
- o.appendASCIIString('<div style="top:'), o.appendASCIIString(String(n)), o.appendASCIIString("px;height:"), o.appendASCIIString(String(this._options.lineHeight)), o.appendASCIIString('px;" class="'), o.appendASCIIString(e.CLASS_NAME), o.appendASCIIString('">');
- var w = u.renderViewLine(S, o);
- o.appendASCIIString("</div>");
- var E = null
- ;
- return h && r.isBasicASCII && s.useMonospaceOptimizations && 0 === w.containsForeignElements && r.content.length < 300 && S.lineTokens.getCount() < 100 && (E = new v(this._renderedViewLine ? this._renderedViewLine.domNode : null, S, w.characterMapping)), E || (E = C(this._renderedViewLine ? this._renderedViewLine.domNode : null, S, w.characterMapping, w.containsRTL, w.containsForeignElements)), this._renderedViewLine = E, !0
- }, e.prototype.layoutLine = function (e, t) {
- this._renderedViewLine && this._renderedViewLine.domNode && (this._renderedViewLine.domNode.setTop(t), this._renderedViewLine.domNode.setHeight(this._options.lineHeight))
- }, e.prototype.getWidth = function () {
- return this._renderedViewLine ? this._renderedViewLine.getWidth() : 0
- }, e.prototype.getWidthIsFast = function () {
- return !this._renderedViewLine || this._renderedViewLine.getWidthIsFast()
- }, e.prototype.getVisibleRangesForRange = function (e, t, n) {
- if (!this._renderedViewLine) return null;
- e |= 0, t |= 0, e = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, e)),
- t = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, t));
- var i = 0 | this._renderedViewLine.input.stopRenderingLineAfter, o = !1;
- -1 !== i && e > i + 1 && t > i + 1 && (o = !0), -1 !== i && e > i + 1 && (e = i + 1), -1 !== i && t > i + 1 && (t = i + 1);
- var r = this._renderedViewLine.getVisibleRangesForRange(e, t, n);
- return r && r.length > 0 ? new a.VisibleRanges(o, r) : null
- }, e.prototype.getColumnOfNodeOffset = function (e, t, n) {
- return this._renderedViewLine ? this._renderedViewLine.getColumnOfNodeOffset(e, t, n) : 1
- }, e.CLASS_NAME = "view-line", e
- }();
- t.ViewLine = m;
- var v = function () {
- function e(e, t, n) {
- this.domNode = e, this.input = t, this._characterMapping = n, this._charWidth = t.spaceWidth
- }
- return e.prototype.getWidth = function () {
- return this._getCharPosition(this._characterMapping.length)
- }, e.prototype.getWidthIsFast = function () {
- return !0
- }, e.prototype.getVisibleRangesForRange = function (e, t, n) {
- var i = this._getCharPosition(e), o = this._getCharPosition(t);
- return [new a.HorizontalRange(i, o - i)]
- }, e.prototype._getCharPosition = function (e) {
- var t = this._characterMapping.getAbsoluteOffsets()
- ;
- return 0 === t.length ? 0 : Math.round(this._charWidth * t[e - 1])
- }, e.prototype.getColumnOfNodeOffset = function (e, t, n) {
- for (var i = t.textContent.length, o = -1; t;) t = t.previousSibling, o++;
- return this._characterMapping.partDataToCharOffset(o, i, n) + 1
- }, e
- }(), _ = function () {
- function e(e, t, n, i, o) {
- if (this.domNode = e, this.input = t, this._characterMapping = n, this._isWhitespaceOnly = /^\s*$/.test(t.lineContent), this._containsForeignElements = o, this._cachedWidth = -1, this._pixelOffsetCache = null, !i || 0 === this._characterMapping.length) {
- this._pixelOffsetCache = new Int32Array(Math.max(2, this._characterMapping.length + 1));
- for (var r = 0, s = this._characterMapping.length; r <= s; r++) this._pixelOffsetCache[r] = -1
- }
- }
- return e.prototype._getReadingTarget = function (e) {
- return e.domNode.firstChild
- }, e.prototype.getWidth = function () {
- return this.domNode ? (-1 === this._cachedWidth && (this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth), this._cachedWidth) : 0
- }, e.prototype.getWidthIsFast = function () {
- return -1 !== this._cachedWidth
- },
- e.prototype.getVisibleRangesForRange = function (e, t, n) {
- if (!this.domNode) return null;
- if (null !== this._pixelOffsetCache) {
- var i = this._readPixelOffset(this.domNode, e, n);
- if (-1 === i) return null;
- var o = this._readPixelOffset(this.domNode, t, n);
- return -1 === o ? null : [new a.HorizontalRange(i, o - i)]
- }
- return this._readVisibleRangesForRange(this.domNode, e, t, n)
- }, e.prototype._readVisibleRangesForRange = function (e, t, n, i) {
- if (t === n) {
- var o = this._readPixelOffset(e, t, i);
- return -1 === o ? null : [new a.HorizontalRange(o, 0)]
- }
- return this._readRawVisibleRangesForRange(e, t, n, i)
- }, e.prototype._readPixelOffset = function (e, t, n) {
- if (0 === this._characterMapping.length) {
- if (0 === this._containsForeignElements) return 0;
- if (2 === this._containsForeignElements) return 0;
- if (1 === this._containsForeignElements) return this.getWidth();
- var i = this._getReadingTarget(e);
- return i.firstChild ? i.firstChild.offsetWidth : 0
- }
- if (null !== this._pixelOffsetCache) {
- var o = this._pixelOffsetCache[t];
- if (-1 !== o) return o;
- var r = this._actualReadPixelOffset(e, t, n);
- return this._pixelOffsetCache[t] = r, r
- }
- return this._actualReadPixelOffset(e, t, n)
- }, e.prototype._actualReadPixelOffset = function (e, t, n) {
- if (0 === this._characterMapping.length) {
- var i = s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e), 0, 0, 0, 0, n.clientRectDeltaLeft, n.endNode);
- return i && 0 !== i.length ? i[0].left : -1
- }
- if (t === this._characterMapping.length && this._isWhitespaceOnly && 0 === this._containsForeignElements) return this.getWidth();
- var o = this._characterMapping.charOffsetToPartData(t - 1), r = u.CharacterMapping.getPartIndex(o),
- a = u.CharacterMapping.getCharIndex(o),
- l = s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e), r, a, r, a, n.clientRectDeltaLeft, n.endNode);
- return l && 0 !== l.length ? l[0].left : -1
- }, e.prototype._readRawVisibleRangesForRange = function (e, t, n, i) {
- if (1 === t && n === this._characterMapping.length) return [new a.HorizontalRange(0, this.getWidth())]
- ;
- var o = this._characterMapping.charOffsetToPartData(t - 1), r = u.CharacterMapping.getPartIndex(o),
- l = u.CharacterMapping.getCharIndex(o), d = this._characterMapping.charOffsetToPartData(n - 1),
- c = u.CharacterMapping.getPartIndex(d), h = u.CharacterMapping.getCharIndex(d);
- return s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e), r, l, c, h, i.clientRectDeltaLeft, i.endNode)
- }, e.prototype.getColumnOfNodeOffset = function (e, t, n) {
- for (var i = t.textContent.length, o = -1; t;) t = t.previousSibling, o++;
- return this._characterMapping.partDataToCharOffset(o, i, n) + 1
- }, e
- }(), y = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._readVisibleRangesForRange = function (t, n, i, o) {
- var r = e.prototype._readVisibleRangesForRange.call(this, t, n, i, o);
- if (!r || 0 === r.length || n === i || 1 === n && i === this._characterMapping.length) return r;
- if (!this.input.containsRTL) {
- var s = this._readPixelOffset(t, i, o);
- if (-1 !== s) {
- var a = r[r.length - 1];
- a.left < s && (a.width = s - a.left)
- }
- }
- return r
- }, t
- }(_), C = n.isWebKit ? b : S;
- function b(e, t, n, i, o) {
- return new y(e, t, n, i, o)
- }
- function S(e, t, n, i, o) {
- return new _(e, t, n, i, o)
- }
- })), define(n[166], i([0, 1, 24, 141, 37, 227, 13, 3, 40, 6]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function (e, t) {
- this.lastViewCursorsRenderData = e, this.lastTextareaPosition = t
- };
- t.PointerHandlerLastRenderData = c;
- var h = function () {
- function e(e, t, n, i, o, r) {
- void 0 === n && (n = 0), void 0 === i && (i = null), void 0 === o && (o = null), void 0 === r && (r = null), this.element = e, this.type = t, this.mouseColumn = n, this.position = i, !o && i && (o = new l.Range(i.lineNumber, i.column, i.lineNumber, i.column)), this.range = o, this.detail = r
- }
- return e._typeToString = function (e) {
- return 1 === e ? "TEXTAREA" : 2 === e ? "GUTTER_GLYPH_MARGIN" : 3 === e ? "GUTTER_LINE_NUMBERS" : 4 === e ? "GUTTER_LINE_DECORATIONS" : 5 === e ? "GUTTER_VIEW_ZONE" : 6 === e ? "CONTENT_TEXT" : 7 === e ? "CONTENT_EMPTY" : 8 === e ? "CONTENT_VIEW_ZONE" : 9 === e ? "CONTENT_WIDGET" : 10 === e ? "OVERVIEW_RULER" : 11 === e ? "SCROLLBAR" : 12 === e ? "OVERLAY_WIDGET" : "UNKNOWN"
- }, e.toString = function (e) {
- return this._typeToString(e.type) + ": " + e.position + " - " + e.range + " - " + e.detail
- }, e.prototype.toString = function () {
- return e.toString(this)
- }, e
- }();
- t.MouseTarget = h;
- var p = function () {
- function e() {
- }
- return e.isTextArea = function (e) {
- return 2 === e.length && 3 === e[0] && 6 === e[1]
- }, e.isChildOfViewLines = function (e) {
- return e.length >= 4 && 3 === e[0] && 7 === e[3]
- }, e.isStrictChildOfViewLines = function (e) {
- return e.length > 4 && 3 === e[0] && 7 === e[3]
- }, e.isChildOfScrollableElement = function (e) {
- return e.length >= 2 && 3 === e[0] && 5 === e[1]
- }, e.isChildOfMinimap = function (e) {
- return e.length >= 2 && 3 === e[0] && 8 === e[1]
- }, e.isChildOfContentWidgets = function (e) {
- return e.length >= 4 && 3 === e[0] && 1 === e[3]
- }, e.isChildOfOverflowingContentWidgets = function (e) {
- return e.length >= 1 && 2 === e[0]
- }, e.isChildOfOverlayWidgets = function (e) {
- return e.length >= 2 && 3 === e[0] && 4 === e[1]
- }, e
- }(), g = function () {
- function e(e, t, n) {
- this.model = e.model;
- var i = e.configuration.options;
- this.layoutInfo = i.get(107), this.viewDomNode = t.viewDomNode, this.lineHeight = i.get(49),
- this.typicalHalfwidthCharacterWidth = i.get(34).typicalHalfwidthCharacterWidth, this.lastRenderData = n, this._context = e, this._viewHelper = t
- }
- return e.prototype.getZoneAtCoord = function (t) {
- return e.getZoneAtCoord(this._context, t)
- }, e.getZoneAtCoord = function (e, t) {
- var n = e.viewLayout.getWhitespaceAtVerticalOffset(t);
- if (n) {
- var i = n.verticalOffset + n.height / 2, o = e.model.getLineCount(), r = null, s = void 0, l = null;
- return n.afterLineNumber !== o && (l = new a.Position(n.afterLineNumber + 1, 1)), n.afterLineNumber > 0 && (r = new a.Position(n.afterLineNumber, e.model.getLineMaxColumn(n.afterLineNumber))), s = null === l ? r : null === r ? l : t < i ? r : l, {
- viewZoneId: n.id,
- afterLineNumber: n.afterLineNumber,
- positionBefore: r,
- positionAfter: l,
- position: s
- }
- }
- return null
- }, e.prototype.getFullLineRangeAtCoord = function (e) {
- if (this._context.viewLayout.isAfterLines(e)) {
- var t = this._context.model.getLineCount(), n = this._context.model.getLineMaxColumn(t);
- return {range: new l.Range(t, n, t, n), isAfterLines: !0}
- }
- var i = this._context.viewLayout.getLineNumberAtVerticalOffset(e),
- o = this._context.model.getLineMaxColumn(i);
- return {range: new l.Range(i, 1, i, o), isAfterLines: !1}
- }, e.prototype.getLineNumberAtVerticalOffset = function (e) {
- return this._context.viewLayout.getLineNumberAtVerticalOffset(e)
- }, e.prototype.isAfterLines = function (e) {
- return this._context.viewLayout.isAfterLines(e)
- }, e.prototype.getVerticalOffsetForLineNumber = function (e) {
- return this._context.viewLayout.getVerticalOffsetForLineNumber(e)
- }, e.prototype.findAttribute = function (t, n) {
- return e._findAttribute(t, n, this._viewHelper.viewDomNode)
- }, e._findAttribute = function (e, t, n) {
- for (; e && e !== document.body;) {
- if (e.hasAttribute && e.hasAttribute(t)) return e.getAttribute(t);
- if (e === n) return null;
- e = e.parentNode
- }
- return null
- }, e.prototype.getLineWidth = function (e) {
- return this._viewHelper.getLineWidth(e)
- }, e.prototype.visibleRangeForPosition = function (e, t) {
- return this._viewHelper.visibleRangeForPosition(e, t)
- }, e.prototype.getPositionFromDOMInfo = function (e, t) {
- return this._viewHelper.getPositionFromDOMInfo(e, t)
- }, e.prototype.getCurrentScrollTop = function () {
- return this._context.viewLayout.getCurrentScrollTop()
- }, e.prototype.getCurrentScrollLeft = function () {
- return this._context.viewLayout.getCurrentScrollLeft()
- }, e
- }();
- t.HitTestContext = g;
- var f = function (e) {
- function t(t, n, i, r) {
- var s = e.call(this, t, n, i) || this;
- return s._ctx = t, r ? (s.target = r, s.targetPath = o.PartFingerprints.collect(r, t.viewDomNode)) : (s.target = null, s.targetPath = new Uint8Array(0)), s
- }
- return r(t, e), t.prototype.toString = function () {
- return "pos(" + this.pos.x + "," + this.pos.y + "), editorPos(" + this.editorPos.x + "," + this.editorPos.y + "), mouseVerticalOffset: " + this.mouseVerticalOffset + ", mouseContentHorizontalOffset: " + this.mouseContentHorizontalOffset + "\n\ttarget: " + (this.target ? this.target.outerHTML : null)
- }, t.prototype.fulfill = function (e, t, n, i) {
- void 0 === t && (t = null), void 0 === n && (n = null), void 0 === i && (i = null);
- var o = this.mouseColumn
- ;
- return t && t.column < this._ctx.model.getLineMaxColumn(t.lineNumber) && (o = u.CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber), t.column, this._ctx.model.getOptions().tabSize) + 1), new h(this.target, e, o, t, n, i)
- }, t.prototype.withTarget = function (e) {
- return new t(this._ctx, this.editorPos, this.pos, e)
- }, t
- }((function (e, t, n) {
- this.editorPos = t, this.pos = n, this.mouseVerticalOffset = Math.max(0, e.getCurrentScrollTop() + n.y - t.y), this.mouseContentHorizontalOffset = e.getCurrentScrollLeft() + n.x - t.x - e.layoutInfo.contentLeft, this.isInMarginArea = n.x - t.x < e.layoutInfo.contentLeft && n.x - t.x >= e.layoutInfo.glyphMarginLeft, this.isInContentArea = !this.isInMarginArea, this.mouseColumn = Math.max(0, _._getMouseColumn(this.mouseContentHorizontalOffset, e.typicalHalfwidthCharacterWidth))
- })), m = {isAfterLines: !0};
- function v(e) {
- return {isAfterLines: !1, horizontalDistanceToText: e}
- }
- var _ = function () {
- function e(e, t) {
- this._context = e, this._viewHelper = t
- }
- return e.prototype.mouseTargetIsWidget = function (e) {
- var t = e.target, n = o.PartFingerprints.collect(t, this._viewHelper.viewDomNode);
- return !(!p.isChildOfContentWidgets(n) && !p.isChildOfOverflowingContentWidgets(n)) || !!p.isChildOfOverlayWidgets(n)
- }, e.prototype.createMouseTarget = function (t, n, i, o) {
- var r = new g(this._context, this._viewHelper, t), s = new f(r, n, i, o);
- try {
- return e._createMouseTarget(r, s, !1)
- } catch (e) {
- return s.fulfill(0)
- }
- }, e._createMouseTarget = function (t, n, i) {
- if (null === n.target) {
- if (i) return n.fulfill(0);
- var o = e._doHitTest(t, n);
- return o.position ? e.createMouseTargetFromHitTestPosition(t, n, o.position.lineNumber, o.position.column) : this._createMouseTarget(t, n.withTarget(o.hitTarget), !0)
- }
- var r = n, s = null;
- return (s = (s = (s = (s = (s = (s = (s = (s = (s = (s = s || e._hitTestContentWidget(t, r)) || e._hitTestOverlayWidget(t, r)) || e._hitTestMinimap(t, r)) || e._hitTestScrollbarSlider(t, r)) || e._hitTestViewZone(t, r)) || e._hitTestMargin(t, r)) || e._hitTestViewCursor(t, r)) || e._hitTestTextArea(t, r)) || e._hitTestViewLines(t, r, i)) || e._hitTestScrollbar(t, r)) || n.fulfill(0)
- }, e._hitTestContentWidget = function (e, t) {
- if (p.isChildOfContentWidgets(t.targetPath) || p.isChildOfOverflowingContentWidgets(t.targetPath)) {
- var n = e.findAttribute(t.target, "widgetId");
- return n ? t.fulfill(9, null, null, n) : t.fulfill(0)
- }
- return null
- }, e._hitTestOverlayWidget = function (e, t) {
- if (p.isChildOfOverlayWidgets(t.targetPath)) {
- var n = e.findAttribute(t.target, "widgetId");
- return n ? t.fulfill(12, null, null, n) : t.fulfill(0)
- }
- return null
- }, e._hitTestViewCursor = function (e, t) {
- if (t.target) for (var n = 0, i = r = e.lastRenderData.lastViewCursorsRenderData; n < i.length; n++) {
- var o = i[n];
- if (t.target === o.domNode) return t.fulfill(6, o.position)
- }
- if (t.isInContentArea) for (var r = e.lastRenderData.lastViewCursorsRenderData, s = t.mouseContentHorizontalOffset, a = t.mouseVerticalOffset, l = 0, u = r; l < u.length; l++) {
- if (!(s < (o = u[l]).contentLeft) && !(s > o.contentLeft + o.width)) {
- var d = e.getVerticalOffsetForLineNumber(o.position.lineNumber);
- if (d <= a && a <= d + o.height) return t.fulfill(6, o.position)
- }
- }
- return null
- }, e._hitTestViewZone = function (e, t) {
- var n = e.getZoneAtCoord(t.mouseVerticalOffset);
- if (n) {
- var i = t.isInContentArea ? 8 : 5;
- return t.fulfill(i, n.position, null, n)
- }
- return null
- }, e._hitTestTextArea = function (e, t) {
- return p.isTextArea(t.targetPath) ? e.lastRenderData.lastTextareaPosition ? t.fulfill(6, e.lastRenderData.lastTextareaPosition) : t.fulfill(1, e.lastRenderData.lastTextareaPosition) : null
- }, e._hitTestMargin = function (e, t) {
- if (t.isInMarginArea) {
- var n = e.getFullLineRangeAtCoord(t.mouseVerticalOffset), i = n.range.getStartPosition(),
- o = Math.abs(t.pos.x - t.editorPos.x), r = {
- isAfterLines: n.isAfterLines,
- glyphMarginLeft: e.layoutInfo.glyphMarginLeft,
- glyphMarginWidth: e.layoutInfo.glyphMarginWidth,
- lineNumbersWidth: e.layoutInfo.lineNumbersWidth,
- offsetX: o
- };
- return (o -= e.layoutInfo.glyphMarginLeft) <= e.layoutInfo.glyphMarginWidth ? t.fulfill(2, i, n.range, r) : (o -= e.layoutInfo.glyphMarginWidth) <= e.layoutInfo.lineNumbersWidth ? t.fulfill(3, i, n.range, r) : (o -= e.layoutInfo.lineNumbersWidth, t.fulfill(4, i, n.range, r))
- }
- return null
- }, e._hitTestViewLines = function (t, n, i) {
- if (!p.isChildOfViewLines(n.targetPath)) return null
- ;
- if (t.isAfterLines(n.mouseVerticalOffset)) {
- var o = t.model.getLineCount(), r = t.model.getLineMaxColumn(o);
- return n.fulfill(7, new a.Position(o, r), void 0, m)
- }
- if (i) {
- if (p.isStrictChildOfViewLines(n.targetPath)) {
- var s = t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);
- if (0 === t.model.getLineLength(s)) {
- var l = t.getLineWidth(s), u = v(n.mouseContentHorizontalOffset - l);
- return n.fulfill(7, new a.Position(s, 1), void 0, u)
- }
- var d = t.getLineWidth(s);
- if (n.mouseContentHorizontalOffset >= d) {
- u = v(n.mouseContentHorizontalOffset - d);
- var c = new a.Position(s, t.model.getLineMaxColumn(s));
- return n.fulfill(7, c, void 0, u)
- }
- }
- return n.fulfill(0)
- }
- var h = e._doHitTest(t, n);
- return h.position ? e.createMouseTargetFromHitTestPosition(t, n, h.position.lineNumber, h.position.column) : this._createMouseTarget(t, n.withTarget(h.hitTarget), !0)
- }, e._hitTestMinimap = function (e, t) {
- if (p.isChildOfMinimap(t.targetPath)) {
- var n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), i = e.model.getLineMaxColumn(n);
- return t.fulfill(11, new a.Position(n, i))
- }
- return null
- },
- e._hitTestScrollbarSlider = function (e, t) {
- if (p.isChildOfScrollableElement(t.targetPath) && t.target && 1 === t.target.nodeType) {
- var n = t.target.className;
- if (n && /\b(slider|scrollbar)\b/.test(n)) {
- var i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),
- o = e.model.getLineMaxColumn(i);
- return t.fulfill(11, new a.Position(i, o))
- }
- }
- return null
- }, e._hitTestScrollbar = function (e, t) {
- if (p.isChildOfScrollableElement(t.targetPath)) {
- var n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), i = e.model.getLineMaxColumn(n);
- return t.fulfill(11, new a.Position(n, i))
- }
- return null
- }, e.prototype.getMouseColumn = function (t, n) {
- var i = this._context.configuration.options, o = i.get(107),
- r = this._context.viewLayout.getCurrentScrollLeft() + n.x - t.x - o.contentLeft;
- return e._getMouseColumn(r, i.get(34).typicalHalfwidthCharacterWidth)
- }, e._getMouseColumn = function (e, t) {
- return e < 0 ? 1 : Math.round(e / t) + 1
- }, e.createMouseTargetFromHitTestPosition = function (e, t, i, o) {
- var r = new a.Position(i, o), s = e.getLineWidth(i);
- if (t.mouseContentHorizontalOffset > s) {
- if (n.isEdge && 1 === r.column) {
- var u = v(t.mouseContentHorizontalOffset - s);
- return t.fulfill(7, new a.Position(i, e.model.getLineMaxColumn(i)), void 0, u)
- }
- var d = v(t.mouseContentHorizontalOffset - s);
- return t.fulfill(7, r, void 0, d)
- }
- var c = e.visibleRangeForPosition(i, o);
- if (!c) return t.fulfill(0, r);
- var h = c.left;
- if (t.mouseContentHorizontalOffset === h) return t.fulfill(6, r);
- var p = [];
- if (p.push({offset: c.left, column: o}), o > 1) {
- var g = e.visibleRangeForPosition(i, o - 1);
- g && p.push({offset: g.left, column: o - 1})
- }
- if (o < e.model.getLineMaxColumn(i)) {
- var f = e.visibleRangeForPosition(i, o + 1);
- f && p.push({offset: f.left, column: o + 1})
- }
- p.sort((function (e, t) {
- return e.offset - t.offset
- }));
- for (var m = 1; m < p.length; m++) {
- var _ = p[m - 1], y = p[m];
- if (_.offset <= t.mouseContentHorizontalOffset && t.mouseContentHorizontalOffset <= y.offset) {
- var C = new l.Range(i, _.column, i, y.column);
- return t.fulfill(6, r, C)
- }
- }
- return t.fulfill(6, r)
- }, e._doHitTestWithCaretRangeFromPoint = function (e, t) {
- var n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),
- o = e.getVerticalOffsetForLineNumber(n) + Math.floor(e.lineHeight / 2),
- r = t.pos.y + (o - t.mouseVerticalOffset);
- r <= t.editorPos.y && (r = t.editorPos.y + 1), r >= t.editorPos.y + e.layoutInfo.height && (r = t.editorPos.y + e.layoutInfo.height - 1);
- var s = new i.PageCoordinates(t.pos.x, r),
- a = this._actualDoHitTestWithCaretRangeFromPoint(e, s.toClientCoordinates());
- return a.position ? a : this._actualDoHitTestWithCaretRangeFromPoint(e, t.pos.toClientCoordinates())
- }, e._actualDoHitTestWithCaretRangeFromPoint = function (e, t) {
- var n, i = d.getShadowRoot(e.viewDomNode);
- if (!(n = i ? void 0 === i.caretRangeFromPoint ? y(i, t.clientX, t.clientY) : i.caretRangeFromPoint(t.clientX, t.clientY) : document.caretRangeFromPoint(t.clientX, t.clientY)) || !n.startContainer) return {
- position: null,
- hitTarget: null
- };
- var o = n.startContainer, r = null;
- if (o.nodeType === o.TEXT_NODE) {
- var a = (u = (l = o.parentNode) ? l.parentNode : null) ? u.parentNode : null;
- if ((a && a.nodeType === a.ELEMENT_NODE ? a.className : null) === s.ViewLine.CLASS_NAME) return {
- position: e.getPositionFromDOMInfo(l, n.startOffset), hitTarget: null
- };
- r = o.parentNode
- } else if (o.nodeType === o.ELEMENT_NODE) {
- var l, u;
- if (((u = (l = o.parentNode) ? l.parentNode : null) && u.nodeType === u.ELEMENT_NODE ? u.className : null) === s.ViewLine.CLASS_NAME) return {
- position: e.getPositionFromDOMInfo(o, o.textContent.length),
- hitTarget: null
- };
- r = o
- }
- return {position: null, hitTarget: r}
- }, e._doHitTestWithCaretPositionFromPoint = function (e, t) {
- var n = document.caretPositionFromPoint(t.clientX, t.clientY);
- if (n.offsetNode.nodeType === n.offsetNode.TEXT_NODE) {
- var i = n.offsetNode.parentNode, o = i ? i.parentNode : null, r = o ? o.parentNode : null;
- return (r && r.nodeType === r.ELEMENT_NODE ? r.className : null) === s.ViewLine.CLASS_NAME ? {
- position: e.getPositionFromDOMInfo(n.offsetNode.parentNode, n.offset),
- hitTarget: null
- } : {position: null, hitTarget: n.offsetNode.parentNode}
- }
- return {position: null, hitTarget: n.offsetNode}
- }, e._doHitTestWithMoveToPoint = function (e, t) {
- var n = null, i = null, o = document.body.createTextRange();
- try {
- o.moveToPoint(t.clientX, t.clientY)
- } catch (e) {
- return {
- position: null,
- hitTarget: null
- }
- }
- o.collapse(!0);
- var r = o ? o.parentElement() : null, a = r ? r.parentNode : null, l = a ? a.parentNode : null;
- if ((l && l.nodeType === l.ELEMENT_NODE ? l.className : "") === s.ViewLine.CLASS_NAME) {
- var u = o.duplicate();
- u.moveToElementText(r), u.setEndPoint("EndToStart", o), n = e.getPositionFromDOMInfo(r, u.text.length), u.moveToElementText(e.viewDomNode)
- } else i = r;
- return o.moveToElementText(e.viewDomNode), {position: n, hitTarget: i}
- }, e._doHitTest = function (e, t) {
- return "function" == typeof document.caretRangeFromPoint ? this._doHitTestWithCaretRangeFromPoint(e, t) : document.caretPositionFromPoint ? this._doHitTestWithCaretPositionFromPoint(e, t.pos.toClientCoordinates()) : document.body.createTextRange ? this._doHitTestWithMoveToPoint(e, t.pos.toClientCoordinates()) : {
- position: null,
- hitTarget: null
- }
- }, e
- }();
- function y(e, t, n) {
- var i = document.createRange(), o = e.elementFromPoint(t, n);
- if (null !== o) {
- for (; o && o.firstChild && o.firstChild.nodeType !== o.firstChild.TEXT_NODE;) o = o.lastChild
- ;
- var r = o.getBoundingClientRect(), s = window.getComputedStyle(o, null).getPropertyValue("font"),
- a = o.innerText, l = r.left, u = 0, d = void 0;
- if (t > r.left + r.width) u = a.length; else for (var c = C.getInstance(), h = 0; h < a.length + 1; h++) {
- if (t < (l += d = c.getCharWidth(a.charAt(h), s) / 2)) {
- u = h;
- break
- }
- l += d
- }
- i.setStart(o.firstChild, u), i.setEnd(o.firstChild, u)
- }
- return i
- }
- t.MouseTargetFactory = _, t.shadowCaretRangeFromPoint = y;
- var C = function () {
- function e() {
- this._cache = {}, this._canvas = document.createElement("canvas")
- }
- return e.getInstance = function () {
- return e._INSTANCE || (e._INSTANCE = new e), e._INSTANCE
- }, e.prototype.getCharWidth = function (e, t) {
- var n = e + t;
- if (this._cache[n]) return this._cache[n];
- var i = this._canvas.getContext("2d");
- i.font = t;
- var o = i.measureText(e).width;
- return this._cache[n] = o, o
- }, e._INSTANCE = null, e
- }()
- })), define(n[550], i([0, 1, 24, 6, 45, 15, 2, 16, 166, 141, 105, 13, 22, 92]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
- "use strict";
- function f(e) {
- return function (t, n) {
- var i = !1;
- return e && (i = e.mouseTargetIsWidget(n)), i || n.preventDefault(), n
- }
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.createMouseMoveEventMerger = f;
- var m = function (e) {
- function t(r, a, l) {
- var h = e.call(this) || this;
- h._isFocused = !1, h._context = r, h.viewController = a, h.viewHelper = l, h.mouseTargetFactory = new u.MouseTargetFactory(h._context, l), h._mouseDownOperation = h._register(new v(h._context, h.viewController, h.viewHelper, (function (e, t) {
- return h._createMouseTarget(e, t)
- }), (function (e) {
- return h._getMouseColumn(e)
- }))), h._asyncFocus = h._register(new s.RunOnceScheduler((function () {
- return h.viewHelper.focusTextArea()
- }), 0)), h.lastMouseLeaveTime = -1;
- var p = new d.EditorMouseEventFactory(h.viewHelper.viewDomNode);
- h._register(p.onContextMenu(h.viewHelper.viewDomNode, (function (e) {
- return h._onContextMenu(e, !0)
- }))), h._register(p.onMouseMoveThrottled(h.viewHelper.viewDomNode, (function (e) {
- return h._onMouseMove(e)
- }), f(h.mouseTargetFactory), t.MOUSE_MOVE_MINIMUM_TIME)), h._register(p.onMouseUp(h.viewHelper.viewDomNode, (function (e) {
- return h._onMouseUp(e)
- }))),
- h._register(p.onMouseLeave(h.viewHelper.viewDomNode, (function (e) {
- return h._onMouseLeave(e)
- }))), h._register(p.onMouseDown(h.viewHelper.viewDomNode, (function (e) {
- return h._onMouseDown(e)
- })));
- return h._register(i.addDisposableListener(h.viewHelper.viewDomNode, n.isEdgeOrIE ? "mousewheel" : "wheel", (function (e) {
- if (h.viewController.emitMouseWheel(e), h._context.configuration.options.get(57)) {
- var t = new o.StandardWheelEvent(e);
- if (t.browserEvent.ctrlKey || t.browserEvent.metaKey) {
- var n = c.EditorZoom.getZoomLevel(), i = t.deltaY > 0 ? 1 : -1;
- c.EditorZoom.setZoomLevel(n + i), t.preventDefault(), t.stopPropagation()
- }
- }
- }), {capture: !0, passive: !1})), h._context.addEventHandler(h), h
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), e.prototype.dispose.call(this)
- }, t.prototype.onCursorStateChanged = function (e) {
- return this._mouseDownOperation.onCursorStateChanged(e), !1
- }, t.prototype.onFocusChanged = function (e) {
- return this._isFocused = e.isFocused, !1
- }, t.prototype.onScrollChanged = function (e) {
- return this._mouseDownOperation.onScrollChanged(), !1
- }, t.prototype.getTargetAtClientPoint = function (e, t) {
- var n = new d.ClientCoordinates(e, t).toPageCoordinates(),
- i = d.createEditorPagePosition(this.viewHelper.viewDomNode);
- return n.y < i.y || n.y > i.y + i.height || n.x < i.x || n.x > i.x + i.width ? null : this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), i, n, null)
- }, t.prototype._createMouseTarget = function (e, t) {
- return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, t ? e.target : null)
- }, t.prototype._getMouseColumn = function (e) {
- return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos)
- }, t.prototype._onContextMenu = function (e, t) {
- this.viewController.emitContextMenu({event: e, target: this._createMouseTarget(e, t)})
- }, t.prototype._onMouseMove = function (e) {
- this._mouseDownOperation.isActive() || (e.timestamp < this.lastMouseLeaveTime || this.viewController.emitMouseMove({
- event: e,
- target: this._createMouseTarget(e, !0)
- }))
- }, t.prototype._onMouseLeave = function (e) {
- this.lastMouseLeaveTime = (new Date).getTime(), this.viewController.emitMouseLeave({
- event: e,
- target: null
- })
- }, t.prototype._onMouseUp = function (e) {
- this.viewController.emitMouseUp({event: e, target: this._createMouseTarget(e, !0)})
- }, t.prototype._onMouseDown = function (e) {
- var t = this, i = this._createMouseTarget(e, !0), o = 6 === i.type || 7 === i.type,
- r = 2 === i.type || 3 === i.type || 4 === i.type, s = 3 === i.type,
- a = this._context.configuration.options.get(83), u = 8 === i.type || 5 === i.type, d = 9 === i.type,
- c = e.leftButton || e.middleButton;
- l.isMacintosh && e.leftButton && e.ctrlKey && (c = !1);
- var h = function () {
- n.isIE && !t._isFocused ? t._asyncFocus.schedule() : (e.preventDefault(), t.viewHelper.focusTextArea())
- };
- if (c && (o || s && a)) h(), this._mouseDownOperation.start(i.type, e); else if (r) e.preventDefault(); else if (u) {
- var p = i.detail;
- this.viewHelper.shouldSuppressMouseDownOnViewZone(p.viewZoneId) && (h(), this._mouseDownOperation.start(i.type, e), e.preventDefault())
- } else d && this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail) && (h(), e.preventDefault())
- ;
- this.viewController.emitMouseDown({event: e, target: i})
- }, t.MOUSE_MOVE_MINIMUM_TIME = 100, t
- }(g.ViewEventHandler);
- t.MouseHandler = m;
- var v = function (e) {
- function t(t, n, i, o, r) {
- var a = e.call(this) || this;
- return a._context = t, a._viewController = n, a._viewHelper = i, a._createMouseTarget = o, a._getMouseColumn = r, a._mouseMoveMonitor = a._register(new d.GlobalEditorMouseMoveMonitor(a._viewHelper.viewDomNode)), a._onScrollTimeout = a._register(new s.TimeoutTimer), a._mouseState = new _, a._currentSelection = new p.Selection(1, 1, 1, 1), a._isActive = !1, a._lastMouseEvent = null, a
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.isActive = function () {
- return this._isActive
- }, t.prototype._onMouseDownThenMove = function (e) {
- this._lastMouseEvent = e, this._mouseState.setModifiers(e);
- var t = this._findMousePosition(e, !0);
- t && (this._mouseState.isDragAndDrop ? this._viewController.emitMouseDrag({
- event: e,
- target: t
- }) : this._dispatchMouse(t, !0))
- }, t.prototype.start = function (e, t) {
- var n = this;
- this._lastMouseEvent = t,
- this._mouseState.setStartedOnLineNumbers(3 === e), this._mouseState.setStartButtons(t), this._mouseState.setModifiers(t);
- var i = this._findMousePosition(t, !0);
- if (i && i.position) {
- this._mouseState.trySetCount(t.detail, i.position), t.detail = this._mouseState.count;
- var o = this._context.configuration.options;
- if (!o.get(68) && o.get(24) && !this._mouseState.altKey && t.detail < 2 && !this._isActive && !this._currentSelection.isEmpty() && 6 === i.type && i.position && this._currentSelection.containsPosition(i.position)) return this._mouseState.isDragAndDrop = !0, this._isActive = !0, void this._mouseMoveMonitor.startMonitoring(t.target, t.buttons, f(null), (function (e) {
- return n._onMouseDownThenMove(e)
- }), (function () {
- var e = n._findMousePosition(n._lastMouseEvent, !0);
- n._viewController.emitMouseDrop({
- event: n._lastMouseEvent,
- target: e ? n._createMouseTarget(n._lastMouseEvent, !0) : null
- }), n._stop()
- }));
- this._mouseState.isDragAndDrop = !1, this._dispatchMouse(i, t.shiftKey), this._isActive || (this._isActive = !0,
- this._mouseMoveMonitor.startMonitoring(t.target, t.buttons, f(null), (function (e) {
- return n._onMouseDownThenMove(e)
- }), (function () {
- return n._stop()
- })))
- }
- }, t.prototype._stop = function () {
- this._isActive = !1, this._onScrollTimeout.cancel()
- }, t.prototype.onScrollChanged = function () {
- var e = this;
- this._isActive && this._onScrollTimeout.setIfNotSet((function () {
- if (e._lastMouseEvent) {
- var t = e._findMousePosition(e._lastMouseEvent, !1);
- t && (e._mouseState.isDragAndDrop || e._dispatchMouse(t, !0))
- }
- }), 10)
- }, t.prototype.onCursorStateChanged = function (e) {
- this._currentSelection = e.selections[0]
- }, t.prototype._getPositionOutsideEditor = function (e) {
- var t = e.editorPos, n = this._context.model, i = this._context.viewLayout, o = this._getMouseColumn(e);
- if (e.posy < t.y) {
- var r = Math.max(i.getCurrentScrollTop() - (t.y - e.posy), 0);
- if (a = u.HitTestContext.getZoneAtCoord(this._context, r)) if (l = this._helpPositionJumpOverViewZone(a)) return new u.MouseTarget(null, 13, o, l);
- var s = i.getLineNumberAtVerticalOffset(r);
- return new u.MouseTarget(null, 13, o, new h.Position(s, 1))
- }
- if (e.posy > t.y + t.height) {
- var a, l;
- r = i.getCurrentScrollTop() + (e.posy - t.y);
- if (a = u.HitTestContext.getZoneAtCoord(this._context, r)) if (l = this._helpPositionJumpOverViewZone(a)) return new u.MouseTarget(null, 13, o, l);
- var d = i.getLineNumberAtVerticalOffset(r);
- return new u.MouseTarget(null, 13, o, new h.Position(d, n.getLineMaxColumn(d)))
- }
- var c = i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop() + (e.posy - t.y));
- return e.posx < t.x ? new u.MouseTarget(null, 13, o, new h.Position(c, 1)) : e.posx > t.x + t.width ? new u.MouseTarget(null, 13, o, new h.Position(c, n.getLineMaxColumn(c))) : null
- }, t.prototype._findMousePosition = function (e, t) {
- var n = this._getPositionOutsideEditor(e);
- if (n) return n;
- var i = this._createMouseTarget(e, t);
- if (!i.position) return null;
- if (8 === i.type || 5 === i.type) {
- var o = this._helpPositionJumpOverViewZone(i.detail);
- if (o) return new u.MouseTarget(i.element, i.type, i.mouseColumn, o, null, i.detail)
- }
- return i
- }, t.prototype._helpPositionJumpOverViewZone = function (e) {
- var t = new h.Position(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn),
- n = e.positionBefore, i = e.positionAfter;
- return n && i ? n.isBefore(t) ? n : i : null
- }, t.prototype._dispatchMouse = function (e, t) {
- e.position && this._viewController.dispatchMouse({
- position: e.position,
- mouseColumn: e.mouseColumn,
- startedOnLineNumbers: this._mouseState.startedOnLineNumbers,
- inSelectionMode: t,
- mouseDownCount: this._mouseState.count,
- altKey: this._mouseState.altKey,
- ctrlKey: this._mouseState.ctrlKey,
- metaKey: this._mouseState.metaKey,
- shiftKey: this._mouseState.shiftKey,
- leftButton: this._mouseState.leftButton,
- middleButton: this._mouseState.middleButton
- })
- }, t
- }(a.Disposable), _ = function () {
- function e() {
- this._altKey = !1, this._ctrlKey = !1, this._metaKey = !1, this._shiftKey = !1, this._leftButton = !1, this._middleButton = !1, this._startedOnLineNumbers = !1, this._lastMouseDownPosition = null, this._lastMouseDownPositionEqualCount = 0, this._lastMouseDownCount = 0, this._lastSetMouseDownCountTime = 0, this.isDragAndDrop = !1
- }
- return Object.defineProperty(e.prototype, "altKey", {
- get: function () {
- return this._altKey
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "ctrlKey", {
- get: function () {
- return this._ctrlKey
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "metaKey", {
- get: function () {
- return this._metaKey
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "shiftKey", {
- get: function () {
- return this._shiftKey
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "leftButton", {
- get: function () {
- return this._leftButton
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "middleButton", {
- get: function () {
- return this._middleButton
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "startedOnLineNumbers", {
- get: function () {
- return this._startedOnLineNumbers
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "count", {
- get: function () {
- return this._lastMouseDownCount
- }, enumerable: !0, configurable: !0
- }), e.prototype.setModifiers = function (e) {
- this._altKey = e.altKey, this._ctrlKey = e.ctrlKey, this._metaKey = e.metaKey, this._shiftKey = e.shiftKey
- }, e.prototype.setStartButtons = function (e) {
- this._leftButton = e.leftButton, this._middleButton = e.middleButton
- }, e.prototype.setStartedOnLineNumbers = function (e) {
- this._startedOnLineNumbers = e
- }, e.prototype.trySetCount = function (t, n) {
- var i = (new Date).getTime();
- i - this._lastSetMouseDownCountTime > e.CLEAR_MOUSE_DOWN_COUNT_TIME && (t = 1), this._lastSetMouseDownCountTime = i, t > this._lastMouseDownCount + 1 && (t = this._lastMouseDownCount + 1), this._lastMouseDownPosition && this._lastMouseDownPosition.equals(n) ? this._lastMouseDownPositionEqualCount++ : this._lastMouseDownPositionEqualCount = 1, this._lastMouseDownPosition = n, this._lastMouseDownCount = Math.min(t, this._lastMouseDownPositionEqualCount)
- }, e.CLEAR_MOUSE_DOWN_COUNT_TIME = 400, e
- }()
- })), define(n[551], i([0, 1, 6, 16, 57, 2, 550, 141, 88]), (function (e, t, n, i, o, s, a, l, u) {
- "use strict";
- function d(e, t) {
- var n = {translationY: t.translationY, translationX: t.translationX};
- return e && (n.translationY += e.translationY,
- n.translationX += e.translationX), n
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function (e) {
- function t(t, i, o) {
- var r = e.call(this, t, i, o) || this;
- return r.viewHelper.linesContentDomNode.style.msTouchAction = "none", r.viewHelper.linesContentDomNode.style.msContentZooming = "none", r._installGestureHandlerTimeout = window.setTimeout((function () {
- if (r._installGestureHandlerTimeout = -1, window.MSGesture) {
- var e = new MSGesture, t = new MSGesture;
- e.target = r.viewHelper.linesContentDomNode, t.target = r.viewHelper.linesContentDomNode, r.viewHelper.linesContentDomNode.addEventListener("MSPointerDown", (function (n) {
- var i = n.pointerType;
- i !== (n.MSPOINTER_TYPE_MOUSE || "mouse") ? i === (n.MSPOINTER_TYPE_TOUCH || "touch") ? (r._lastPointerType = "touch", e.addPointer(n.pointerId)) : (r._lastPointerType = "pen", t.addPointer(n.pointerId)) : r._lastPointerType = "mouse"
- })), r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode, "MSGestureChange", (function (e) {
- return r._onGestureChange(e)
- }), d)),
- r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode, "MSGestureTap", (function (e) {
- return r._onCaptureGestureTap(e)
- }), !0))
- }
- }), 100), r._lastPointerType = "mouse", r
- }
- return r(t, e), t.prototype._onMouseDown = function (t) {
- "mouse" === this._lastPointerType && e.prototype._onMouseDown.call(this, t)
- }, t.prototype._onCaptureGestureTap = function (e) {
- var t = this, n = new l.EditorMouseEvent(e, this.viewHelper.viewDomNode),
- i = this._createMouseTarget(n, !1);
- i.position && this.viewController.moveTo(i.position), n.browserEvent.fromElement ? (n.preventDefault(), this.viewHelper.focusTextArea()) : setTimeout((function () {
- t.viewHelper.focusTextArea()
- }))
- }, t.prototype._onGestureChange = function (e) {
- this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
- }, t.prototype.dispose = function () {
- window.clearTimeout(this._installGestureHandlerTimeout), e.prototype.dispose.call(this)
- }, t
- }(a.MouseHandler), h = function (e) {
- function t(t, i, o) {
- var r = e.call(this, t, i, o) || this;
- return r.viewHelper.linesContentDomNode.style.touchAction = "none",
- r._installGestureHandlerTimeout = window.setTimeout((function () {
- if (r._installGestureHandlerTimeout = -1, window.MSGesture) {
- var e = new MSGesture, t = new MSGesture;
- e.target = r.viewHelper.linesContentDomNode, t.target = r.viewHelper.linesContentDomNode, r.viewHelper.linesContentDomNode.addEventListener("pointerdown", (function (n) {
- var i = n.pointerType;
- "mouse" !== i ? "touch" === i ? (r._lastPointerType = "touch", e.addPointer(n.pointerId)) : (r._lastPointerType = "pen", t.addPointer(n.pointerId)) : r._lastPointerType = "mouse"
- })), r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode, "MSGestureChange", (function (e) {
- return r._onGestureChange(e)
- }), d)), r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode, "MSGestureTap", (function (e) {
- return r._onCaptureGestureTap(e)
- }), !0))
- }
- }), 100), r._lastPointerType = "mouse", r
- }
- return r(t, e), t.prototype._onMouseDown = function (t) {
- "mouse" === this._lastPointerType && e.prototype._onMouseDown.call(this, t)
- }, t.prototype._onCaptureGestureTap = function (e) {
- var t = this, n = new l.EditorMouseEvent(e, this.viewHelper.viewDomNode),
- i = this._createMouseTarget(n, !1);
- i.position && this.viewController.moveTo(i.position), n.browserEvent.fromElement ? (n.preventDefault(), this.viewHelper.focusTextArea()) : setTimeout((function () {
- t.viewHelper.focusTextArea()
- }))
- }, t.prototype._onGestureChange = function (e) {
- this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
- }, t.prototype.dispose = function () {
- window.clearTimeout(this._installGestureHandlerTimeout), e.prototype.dispose.call(this)
- }, t
- }(a.MouseHandler), p = function (e) {
- function t(t, i, r) {
- var s = e.call(this, t, i, r) || this;
- s._register(o.Gesture.addTarget(s.viewHelper.linesContentDomNode)), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Tap, (function (e) {
- return s.onTap(e)
- }))), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Change, (function (e) {
- return s.onChange(e)
- }))), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Contextmenu, (function (e) {
- return s._onContextMenu(new l.EditorMouseEvent(e, s.viewHelper.viewDomNode), !1)
- }))), s._lastPointerType = "mouse", s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, "pointerdown", (function (e) {
- var t = e.pointerType;
- s._lastPointerType = "mouse" !== t ? "touch" === t ? "touch" : "pen" : "mouse"
- })));
- var u = new l.EditorPointerEventFactory(s.viewHelper.viewDomNode);
- return s._register(u.onPointerMoveThrottled(s.viewHelper.viewDomNode, (function (e) {
- return s._onMouseMove(e)
- }), a.createMouseMoveEventMerger(s.mouseTargetFactory), a.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)), s._register(u.onPointerUp(s.viewHelper.viewDomNode, (function (e) {
- return s._onMouseUp(e)
- }))), s._register(u.onPointerLeave(s.viewHelper.viewDomNode, (function (e) {
- return s._onMouseLeave(e)
- }))), s._register(u.onPointerDown(s.viewHelper.viewDomNode, (function (e) {
- return s._onMouseDown(e)
- }))), s
- }
- return r(t, e), t.prototype.onTap = function (e) {
- if (e.initialTarget && this.viewHelper.linesContentDomNode.contains(e.initialTarget)) {
- e.preventDefault(), this.viewHelper.focusTextArea()
- ;var t = this._createMouseTarget(new l.EditorMouseEvent(e, this.viewHelper.viewDomNode), !1);
- t.position && this.viewController.dispatchMouse({
- position: t.position,
- mouseColumn: t.position.column,
- startedOnLineNumbers: !1,
- mouseDownCount: e.tapCount,
- inSelectionMode: !1,
- altKey: !1,
- ctrlKey: !1,
- metaKey: !1,
- shiftKey: !1,
- leftButton: !1,
- middleButton: !1
- })
- }
- }, t.prototype.onChange = function (e) {
- "touch" === this._lastPointerType && this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
- }, t.prototype._onMouseDown = function (t) {
- t.target && this.viewHelper.linesContentDomNode.contains(t.target) && "touch" === this._lastPointerType || e.prototype._onMouseDown.call(this, t)
- }, t
- }(a.MouseHandler);
- t.PointerEventHandler = p;
- var g = function (e) {
- function t(t, i, r) {
- var s = e.call(this, t, i, r) || this;
- return s._register(o.Gesture.addTarget(s.viewHelper.linesContentDomNode)), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Tap, (function (e) {
- return s.onTap(e)
- }))),
- s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Change, (function (e) {
- return s.onChange(e)
- }))), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Contextmenu, (function (e) {
- return s._onContextMenu(new l.EditorMouseEvent(e, s.viewHelper.viewDomNode), !1)
- }))), s
- }
- return r(t, e), t.prototype.onTap = function (e) {
- e.preventDefault(), this.viewHelper.focusTextArea();
- var t = this._createMouseTarget(new l.EditorMouseEvent(e, this.viewHelper.viewDomNode), !1);
- t.position && this.viewController.moveTo(t.position)
- }, t.prototype.onChange = function (e) {
- this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
- }, t
- }(a.MouseHandler), f = function (e) {
- function t(t, n, o) {
- var r = e.call(this) || this
- ;
- return window.navigator.msPointerEnabled ? r.handler = r._register(new c(t, n, o)) : i.isIOS && u.BrowserFeatures.pointerEvents ? r.handler = r._register(new p(t, n, o)) : window.TouchEvent ? r.handler = r._register(new g(t, n, o)) : window.navigator.pointerEnabled || window.PointerEvent ? r.handler = r._register(new h(t, n, o)) : r.handler = r._register(new a.MouseHandler(t, n, o)), r
- }
- return r(t, e), t.prototype.getTargetAtClientPoint = function (e, t) {
- return this.handler.getTargetAtClientPoint(e, t)
- }, t
- }(s.Disposable);
- t.PointerHandler = f
- })), define(n[228], i([0, 1, 2, 166]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var o = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.onDidContentSizeChange = null, n.onDidScroll = null, n.onDidGainFocus = null, n.onDidLoseFocus = null, n.onKeyDown = null, n.onKeyUp = null, n.onContextMenu = null, n.onMouseMove = null, n.onMouseLeave = null, n.onMouseUp = null, n.onMouseDown = null, n.onMouseDrag = null, n.onMouseDrop = null, n.onMouseWheel = null, n._viewModel = t, n
- }
- return r(t, e),
- t.prototype.emitContentSizeChange = function (e) {
- this.onDidContentSizeChange && this.onDidContentSizeChange(e)
- }, t.prototype.emitScrollChanged = function (e) {
- this.onDidScroll && this.onDidScroll(e)
- }, t.prototype.emitViewFocusGained = function () {
- this.onDidGainFocus && this.onDidGainFocus(void 0)
- }, t.prototype.emitViewFocusLost = function () {
- this.onDidLoseFocus && this.onDidLoseFocus(void 0)
- }, t.prototype.emitKeyDown = function (e) {
- this.onKeyDown && this.onKeyDown(e)
- }, t.prototype.emitKeyUp = function (e) {
- this.onKeyUp && this.onKeyUp(e)
- }, t.prototype.emitContextMenu = function (e) {
- this.onContextMenu && this.onContextMenu(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseMove = function (e) {
- this.onMouseMove && this.onMouseMove(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseLeave = function (e) {
- this.onMouseLeave && this.onMouseLeave(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseUp = function (e) {
- this.onMouseUp && this.onMouseUp(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseDown = function (e) {
- this.onMouseDown && this.onMouseDown(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseDrag = function (e) {
- this.onMouseDrag && this.onMouseDrag(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseDrop = function (e) {
- this.onMouseDrop && this.onMouseDrop(this._convertViewToModelMouseEvent(e))
- }, t.prototype.emitMouseWheel = function (e) {
- this.onMouseWheel && this.onMouseWheel(e)
- }, t.prototype._convertViewToModelMouseEvent = function (e) {
- return e.target ? {event: e.event, target: this._convertViewToModelMouseTarget(e.target)} : e
- }, t.prototype._convertViewToModelMouseTarget = function (e) {
- return t.convertViewToModelMouseTarget(e, this._viewModel.coordinatesConverter)
- }, t.convertViewToModelMouseTarget = function (e, t) {
- return new s(e.element, e.type, e.mouseColumn, e.position ? t.convertViewPositionToModelPosition(e.position) : null, e.range ? t.convertViewRangeToModelRange(e.range) : null, e.detail)
- }, t
- }(n.Disposable);
- t.ViewOutgoingEvents = o;
- var s = function () {
- function e(e, t, n, i, o, r) {
- this.element = e, this.type = t, this.mouseColumn = n, this.position = i,
- this.range = o, this.detail = r
- }
- return e.prototype.toString = function () {
- return i.MouseTarget.toString(this)
- }, e
- }()
- })), define(n[552], i([0, 1, 15, 60, 143, 37, 227, 13, 3, 91, 290]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function () {
- function e() {
- this._currentVisibleRange = new u.Range(1, 1, 1, 1)
- }
- return e.prototype.getCurrentVisibleRange = function () {
- return this._currentVisibleRange
- }, e.prototype.setCurrentVisibleRange = function (e) {
- this._currentVisibleRange = e
- }, e
- }(), h = function (e, t, n, i, o, r) {
- this.lineNumber = e, this.startColumn = t, this.endColumn = n, this.startScrollTop = i, this.stopScrollTop = o, this.scrollType = r
- }, p = function (e) {
- function t(t, r) {
- var l = e.call(this, t) || this;
- l._linesContent = r, l._textRangeRestingSpot = document.createElement("div"), l._visibleLines = new o.VisibleLinesCollection(l), l.domNode = l._visibleLines.domNode;
- var u = l._context.configuration, d = l._context.configuration.options, h = d.get(34), p = d.get(108);
- return l._lineHeight = d.get(49),
- l._typicalHalfwidthCharacterWidth = h.typicalHalfwidthCharacterWidth, l._isViewportWrapping = p.isViewportWrapping, l._revealHorizontalRightPadding = d.get(75), l._cursorSurroundingLines = d.get(19), l._cursorSurroundingLinesStyle = d.get(20), l._canUseLayerHinting = !d.get(22), l._viewLineOptions = new a.ViewLineOptions(u, l._context.theme.type), s.PartFingerprints.write(l.domNode, 7), l.domNode.setClassName("view-lines"), i.Configuration.applyFontInfo(l.domNode, h), l._maxLineWidth = 0, l._asyncUpdateLineWidths = new n.RunOnceScheduler((function () {
- l._updateLineWidthsSlow()
- }), 200), l._lastRenderedData = new c, l._horizontalRevealRequest = null, l
- }
- return r(t, e), t.prototype.dispose = function () {
- this._asyncUpdateLineWidths.dispose(), e.prototype.dispose.call(this)
- }, t.prototype.getDomNode = function () {
- return this.domNode
- }, t.prototype.createVisibleLine = function () {
- return new a.ViewLine(this._viewLineOptions)
- }, t.prototype.onConfigurationChanged = function (e) {
- this._visibleLines.onConfigurationChanged(e), e.hasChanged(108) && (this._maxLineWidth = 0)
- ;var t = this._context.configuration.options, n = t.get(34), o = t.get(108);
- return this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = n.typicalHalfwidthCharacterWidth, this._isViewportWrapping = o.isViewportWrapping, this._revealHorizontalRightPadding = t.get(75), this._cursorSurroundingLines = t.get(19), this._cursorSurroundingLinesStyle = t.get(20), this._canUseLayerHinting = !t.get(22), i.Configuration.applyFontInfo(this.domNode, n), this._onOptionsMaybeChanged(), e.hasChanged(107) && (this._maxLineWidth = 0), !0
- }, t.prototype._onOptionsMaybeChanged = function () {
- var e = this._context.configuration, t = new a.ViewLineOptions(e, this._context.theme.type);
- if (!this._viewLineOptions.equals(t)) {
- this._viewLineOptions = t;
- for (var n = this._visibleLines.getStartLineNumber(), i = this._visibleLines.getEndLineNumber(), o = n; o <= i; o++) {
- this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions)
- }
- return !0
- }
- return !1
- }, t.prototype.onCursorStateChanged = function (e) {
- for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = !1, o = t; o <= n; o++) i = this._visibleLines.getVisibleLine(o).onSelectionChanged() || i;
- return i
- }, t.prototype.onDecorationsChanged = function (e) {
- for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = t; i <= n; i++) this._visibleLines.getVisibleLine(i).onDecorationsChanged();
- return !0
- }, t.prototype.onFlushed = function (e) {
- var t = this._visibleLines.onFlushed(e);
- return this._maxLineWidth = 0, t
- }, t.prototype.onLinesChanged = function (e) {
- return this._visibleLines.onLinesChanged(e)
- }, t.prototype.onLinesDeleted = function (e) {
- return this._visibleLines.onLinesDeleted(e)
- }, t.prototype.onLinesInserted = function (e) {
- return this._visibleLines.onLinesInserted(e)
- }, t.prototype.onRevealRangeRequest = function (e) {
- var t = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.verticalType),
- n = this._context.viewLayout.validateScrollPosition({scrollTop: t})
- ;e.revealHorizontal ? e.range.startLineNumber !== e.range.endLineNumber ? n = {
- scrollTop: n.scrollTop,
- scrollLeft: 0
- } : this._horizontalRevealRequest = new h(e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), n.scrollTop, e.scrollType) : this._horizontalRevealRequest = null;
- var i = Math.abs(this._context.viewLayout.getCurrentScrollTop() - n.scrollTop);
- return 0 === e.scrollType && i > this._lineHeight ? this._context.viewLayout.setScrollPositionSmooth(n) : this._context.viewLayout.setScrollPositionNow(n), !0
- }, t.prototype.onScrollChanged = function (e) {
- if (this._horizontalRevealRequest && e.scrollLeftChanged && (this._horizontalRevealRequest = null), this._horizontalRevealRequest && e.scrollTopChanged) {
- var t = Math.min(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop),
- n = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);
- (e.scrollTop < t || e.scrollTop > n) && (this._horizontalRevealRequest = null)
- }
- return this.domNode.setWidth(e.scrollWidth), this._visibleLines.onScrollChanged(e) || !0
- }, t.prototype.onTokensChanged = function (e) {
- return this._visibleLines.onTokensChanged(e)
- }, t.prototype.onZonesChanged = function (e) {
- return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth), this._visibleLines.onZonesChanged(e)
- }, t.prototype.onThemeChanged = function (e) {
- return this._onOptionsMaybeChanged()
- }, t.prototype.getPositionFromDOMInfo = function (e, t) {
- var n = this._getViewLineDomNode(e);
- if (null === n) return null;
- var i = this._getLineNumberFor(n);
- if (-1 === i) return null;
- if (i < 1 || i > this._context.model.getLineCount()) return null;
- if (1 === this._context.model.getLineMaxColumn(i)) return new l.Position(i, 1);
- var o = this._visibleLines.getStartLineNumber(), r = this._visibleLines.getEndLineNumber();
- if (i < o || i > r) return null;
- var s = this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i, e, t),
- a = this._context.model.getLineMinColumn(i);
- return s < a && (s = a), new l.Position(i, s)
- }, t.prototype._getViewLineDomNode = function (e) {
- for (; e && 1 === e.nodeType;) {
- if (e.className === a.ViewLine.CLASS_NAME) return e;
- e = e.parentElement
- }
- return null
- }, t.prototype._getLineNumberFor = function (e) {
- for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = t; i <= n; i++) {
- if (e === this._visibleLines.getVisibleLine(i).getDomNode()) return i
- }
- return -1
- }, t.prototype.getLineWidth = function (e) {
- var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber();
- return e < t || e > n ? -1 : this._visibleLines.getVisibleLine(e).getWidth()
- }, t.prototype.linesVisibleRangesForRange = function (e, t) {
- if (this.shouldRender()) return null;
- var n = e.endLineNumber,
- i = u.Range.intersectRanges(e, this._lastRenderedData.getCurrentVisibleRange());
- if (!i) return null;
- var o = [], r = 0, s = new a.DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot), c = 0;
- t && (c = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(i.startLineNumber, 1)).lineNumber)
- ;
- for (var h = this._visibleLines.getStartLineNumber(), p = this._visibleLines.getEndLineNumber(), g = i.startLineNumber; g <= i.endLineNumber; g++) if (!(g < h || g > p)) {
- var f = g === i.startLineNumber ? i.startColumn : 1,
- m = g === i.endLineNumber ? i.endColumn : this._context.model.getLineMaxColumn(g),
- v = this._visibleLines.getVisibleLine(g).getVisibleRangesForRange(f, m, s);
- if (v) {
- if (t && g < n) c !== (c = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(g + 1, 1)).lineNumber) && (v.ranges[v.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth);
- o[r++] = new d.LineVisibleRanges(v.outsideRenderedLine, g, v.ranges)
- }
- }
- return 0 === r ? null : o
- }, t.prototype._visibleRangesForLineRange = function (e, t, n) {
- return this.shouldRender() ? null : e < this._visibleLines.getStartLineNumber() || e > this._visibleLines.getEndLineNumber() ? null : this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t, n, new a.DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot))
- }, t.prototype.visibleRangeForPosition = function (e) {
- var t = this._visibleRangesForLineRange(e.lineNumber, e.column, e.column);
- return t ? new d.HorizontalPosition(t.outsideRenderedLine, t.ranges[0].left) : null
- }, t.prototype.updateLineWidths = function () {
- this._updateLineWidths(!1)
- }, t.prototype._updateLineWidthsFast = function () {
- return this._updateLineWidths(!0)
- }, t.prototype._updateLineWidthsSlow = function () {
- this._updateLineWidths(!1)
- }, t.prototype._updateLineWidths = function (e) {
- for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = 1, o = !0, r = t; r <= n; r++) {
- var s = this._visibleLines.getVisibleLine(r);
- !e || s.getWidthIsFast() ? i = Math.max(i, s.getWidth()) : o = !1
- }
- return o && 1 === t && n === this._context.model.getLineCount() && (this._maxLineWidth = 0), this._ensureMaxLineWidth(i), o
- }, t.prototype.prepareRender = function () {
- throw new Error("Not supported")
- }, t.prototype.render = function () {
- throw new Error("Not supported")
- }, t.prototype.renderText = function (e) {
- if (this._visibleLines.renderLines(e), this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),
- this.domNode.setWidth(this._context.viewLayout.getScrollWidth()), this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1e6)), this._horizontalRevealRequest) {
- var t = this._horizontalRevealRequest.lineNumber, n = this._horizontalRevealRequest.startColumn,
- i = this._horizontalRevealRequest.endColumn, o = this._horizontalRevealRequest.scrollType;
- if (e.startLineNumber <= t && t <= e.endLineNumber) {
- this._horizontalRevealRequest = null, this.onDidRender();
- var r = this._computeScrollLeftToRevealRange(t, n, i);
- this._isViewportWrapping || this._ensureMaxLineWidth(r.maxHorizontalOffset), 0 === o ? this._context.viewLayout.setScrollPositionSmooth({scrollLeft: r.scrollLeft}) : this._context.viewLayout.setScrollPositionNow({scrollLeft: r.scrollLeft})
- }
- }
- this._updateLineWidthsFast() || this._asyncUpdateLineWidths.schedule(), this._linesContent.setLayerHinting(this._canUseLayerHinting), this._linesContent.setContain("strict");
- var s = this._context.viewLayout.getCurrentScrollTop() - e.bigNumbersDelta;
- this._linesContent.setTop(-s),
- this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())
- }, t.prototype._ensureMaxLineWidth = function (e) {
- var t = Math.ceil(e);
- this._maxLineWidth < t && (this._maxLineWidth = t, this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth))
- }, t.prototype._computeScrollTopToRevealRange = function (e, t, n, i) {
- var o, r, s, a = e.top, l = e.height, u = a + l;
- if (o = this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber), r = this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber) + this._lineHeight, !("mouse" === t && "default" === this._cursorSurroundingLinesStyle)) {
- var d = Math.min(l / this._lineHeight / 2, this._cursorSurroundingLines);
- o -= d * this._lineHeight, r += Math.max(0, d - 1) * this._lineHeight
- }
- if (0 !== i && 4 !== i || (r += this._lineHeight), r - o > l) s = o; else if (1 === i || 2 === i) if (2 === i && a <= o && r <= u) s = a; else {
- var c = (o + r) / 2;
- s = Math.max(0, c - l / 2)
- } else s = this._computeMinimumScrolling(a, u, o, r, 3 === i, 4 === i);
- return s
- }, t.prototype._computeScrollLeftToRevealRange = function (e, n, i) {
- var o = 0, r = this._context.viewLayout.getCurrentViewport(), s = r.left, a = s + r.width,
- l = this._visibleRangesForLineRange(e, n, i), u = 1073741824, d = 0;
- if (!l) return {scrollLeft: s, maxHorizontalOffset: o};
- for (var c = 0, h = l.ranges; c < h.length; c++) {
- var p = h[c];
- p.left < u && (u = p.left), p.left + p.width > d && (d = p.left + p.width)
- }
- return o = d, u = Math.max(0, u - t.HORIZONTAL_EXTRA_PX), d += this._revealHorizontalRightPadding, {
- scrollLeft: this._computeMinimumScrolling(s, a, u, d),
- maxHorizontalOffset: o
- }
- }, t.prototype._computeMinimumScrolling = function (e, t, n, i, o, r) {
- o = !!o, r = !!r;
- var s = (t |= 0) - (e |= 0);
- return (i |= 0) - (n |= 0) < s ? o ? n : r ? Math.max(0, i - s) : n < e ? n : i > t ? Math.max(0, i - s) : e : n
- }, t.HORIZONTAL_EXTRA_PX = 30, t
- }(s.ViewPart);
- t.ViewLines = p
- })), define(n[553], i([0, 1, 6, 28, 78, 16, 5, 143, 37, 33, 3, 215, 81, 20, 14, 57, 337, 48, 102, 293]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y) {
- "use strict";
- function C(e, t) {
- return 1 === e ? 2 * t : 3 * t
- }
- function b(e, t) {
- return 1 * t
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var S = 140, w = function () {
- function e(e) {
- var t = this, n = e.options, i = n.get(105), o = n.get(107), r = n.get(34);
- this.renderMinimap = 0 | o.renderMinimap, this.scrollBeyondLastLine = n.get(80);
- var s = n.get(54);
- this.showSlider = s.showSlider, this.fontScale = Math.round(s.scale * i), this.charRenderer = y.once((function () {
- return v.MinimapCharRendererFactory.create(t.fontScale, r.fontFamily)
- })), this.pixelRatio = i, this.typicalHalfwidthCharacterWidth = r.typicalHalfwidthCharacterWidth, this.lineHeight = n.get(49), this.minimapLeft = o.minimapLeft, this.minimapWidth = o.minimapWidth, this.minimapHeight = o.height, this.canvasInnerWidth = Math.floor(i * this.minimapWidth), this.canvasInnerHeight = Math.floor(i * this.minimapHeight), this.canvasOuterWidth = this.canvasInnerWidth / i, this.canvasOuterHeight = this.canvasInnerHeight / i
- }
- return e.prototype.equals = function (e) {
- return this.renderMinimap === e.renderMinimap && this.scrollBeyondLastLine === e.scrollBeyondLastLine && this.showSlider === e.showSlider && this.pixelRatio === e.pixelRatio && this.typicalHalfwidthCharacterWidth === e.typicalHalfwidthCharacterWidth && this.lineHeight === e.lineHeight && this.fontScale === e.fontScale && this.minimapLeft === e.minimapLeft && this.minimapWidth === e.minimapWidth && this.minimapHeight === e.minimapHeight && this.canvasInnerWidth === e.canvasInnerWidth && this.canvasInnerHeight === e.canvasInnerHeight && this.canvasOuterWidth === e.canvasOuterWidth && this.canvasOuterHeight === e.canvasOuterHeight
- }, e
- }(), E = function () {
- function e(e, t, n, i, o, r, s) {
- this.scrollTop = e, this.scrollHeight = t, this._computedSliderRatio = n, this.sliderTop = i, this.sliderHeight = o, this.startLineNumber = r, this.endLineNumber = s
- }
- return e.prototype.getDesiredScrollTopFromDelta = function (e) {
- var t = this.sliderTop + e;
- return Math.round(t / this._computedSliderRatio)
- }, e.prototype.getDesiredScrollTopFromTouchLocation = function (e) {
- return Math.round((e - this.sliderHeight / 2) / this._computedSliderRatio)
- }, e.create = function (t, n, i, o, r, s, a, l, u) {
- var d, c, h = t.pixelRatio, p = C(t.renderMinimap, t.fontScale),
- g = Math.floor(t.canvasInnerHeight / p), f = t.lineHeight;
- if (r && i !== s) {
- var m = i - n + 1;
- d = Math.floor(m * p / h)
- } else {
- var v = o / f;
- d = Math.floor(v * p / h)
- }
- c = t.scrollBeyondLastLine ? (s - 1) * p / h : Math.max(0, s * p / h - d);
- var _ = (c = Math.min(t.minimapHeight - d, c)) / (l - o), y = a * _, b = 0;
- t.scrollBeyondLastLine && (b = v = o / f);
- if (g >= s + b) return new e(a, l, _, y, d, S = 1, s);
- var S = Math.max(1, Math.floor(n - y * h / p));
- return u && u.scrollHeight === l && (u.scrollTop > a && (S = Math.min(S, u.startLineNumber)), u.scrollTop < a && (S = Math.max(S, u.startLineNumber))), new e(a, l, _, y, d, S, Math.min(s, S + g - 1))
- }, e
- }(), L = function () {
- function e(e) {
- this.dy = e
- }
- return e.prototype.onContentChanged = function () {
- this.dy = -1
- }, e.prototype.onTokensChanged = function () {
- this.dy = -1
- }, e.INVALID = new e(-1), e
- }(), D = function () {
- function e(e, t, n) {
- this.renderedLayout = e, this._imageData = t, this._renderedLines = new l.RenderedLinesCollection((function () {
- return L.INVALID
- })),
- this._renderedLines._set(e.startLineNumber, n)
- }
- return e.prototype.linesEquals = function (e) {
- if (!this.scrollEquals(e)) return !1;
- for (var t = this._renderedLines._get().lines, n = 0, i = t.length; n < i; n++) if (-1 === t[n].dy) return !1;
- return !0
- }, e.prototype.scrollEquals = function (e) {
- return this.renderedLayout.startLineNumber === e.startLineNumber && this.renderedLayout.endLineNumber === e.endLineNumber
- }, e.prototype._get = function () {
- var e = this._renderedLines._get();
- return {imageData: this._imageData, rendLineNumberStart: e.rendLineNumberStart, lines: e.lines}
- }, e.prototype.onLinesChanged = function (e) {
- return this._renderedLines.onLinesChanged(e.fromLineNumber, e.toLineNumber)
- }, e.prototype.onLinesDeleted = function (e) {
- this._renderedLines.onLinesDeleted(e.fromLineNumber, e.toLineNumber)
- }, e.prototype.onLinesInserted = function (e) {
- this._renderedLines.onLinesInserted(e.fromLineNumber, e.toLineNumber)
- }, e.prototype.onTokensChanged = function (e) {
- return this._renderedLines.onTokensChanged(e.ranges)
- }, e
- }(), N = function () {
- function e(t, n, i, o) {
- this._backgroundFillData = e._createBackgroundFillData(n, i, o), this._buffers = [t.createImageData(n, i), t.createImageData(n, i)], this._lastUsedBuffer = 0
- }
- return e.prototype.getBuffer = function () {
- this._lastUsedBuffer = 1 - this._lastUsedBuffer;
- var e = this._buffers[this._lastUsedBuffer];
- return e.data.set(this._backgroundFillData), e
- }, e._createBackgroundFillData = function (e, t, n) {
- for (var i = n.r, o = n.g, r = n.b, s = new Uint8ClampedArray(e * t * 4), a = 0, l = 0; l < t; l++) for (var u = 0; u < e; u++) s[a] = i, s[a + 1] = o, s[a + 2] = r, s[a + 3] = 255, a += 4;
- return s
- }, e
- }(), x = function (e) {
- function t(t) {
- var r = e.call(this, t) || this;
- return r._selections = [], r._renderDecorations = !1, r._gestureInProgress = !1, r._options = new w(r._context.configuration), r._lastRenderData = null, r._buffers = null, r._selectionColor = r._context.theme.getColor(g.minimapSelection), r._domNode = i.createFastDomNode(document.createElement("div")), u.PartFingerprints.write(r._domNode, 8), r._domNode.setClassName(r._getMinimapDomNodeClassName()), r._domNode.setPosition("absolute"), r._domNode.setAttribute("role", "presentation"),
- r._domNode.setAttribute("aria-hidden", "true"), r._shadow = i.createFastDomNode(document.createElement("div")), r._shadow.setClassName("minimap-shadow-hidden"), r._domNode.appendChild(r._shadow), r._canvas = i.createFastDomNode(document.createElement("canvas")), r._canvas.setPosition("absolute"), r._canvas.setLeft(0), r._domNode.appendChild(r._canvas), r._decorationsCanvas = i.createFastDomNode(document.createElement("canvas")), r._decorationsCanvas.setPosition("absolute"), r._decorationsCanvas.setClassName("minimap-decorations-layer"), r._decorationsCanvas.setLeft(0), r._domNode.appendChild(r._decorationsCanvas), r._slider = i.createFastDomNode(document.createElement("div")), r._slider.setPosition("absolute"), r._slider.setClassName("minimap-slider"), r._slider.setLayerHinting(!0), r._slider.setContain("strict"), r._domNode.appendChild(r._slider), r._sliderHorizontal = i.createFastDomNode(document.createElement("div")), r._sliderHorizontal.setPosition("absolute"), r._sliderHorizontal.setClassName("minimap-slider-horizontal"),
- r._slider.appendChild(r._sliderHorizontal), r._tokensColorTracker = h.MinimapTokensColorTracker.getInstance(), r._applyLayout(), r._mouseDownListener = n.addStandardDisposableListener(r._domNode.domNode, "mousedown", (function (e) {
- e.preventDefault();
- var t = r._options.renderMinimap;
- if (0 !== t && r._lastRenderData) {
- var n = C(t, r._options.fontScale), i = r._options.pixelRatio * e.browserEvent.offsetY,
- o = Math.floor(i / n) + r._lastRenderData.renderedLayout.startLineNumber;
- o = Math.min(o, r._context.model.getLineCount()), r._context.privateViewEventBus.emit(new p.ViewRevealRangeRequestEvent("mouse", new c.Range(o, 1, o, 1), 1, !1, 0))
- }
- })), r._sliderMouseMoveMonitor = new o.GlobalMouseMoveMonitor, r._sliderMouseDownListener = n.addStandardDisposableListener(r._slider.domNode, "mousedown", (function (e) {
- if (e.preventDefault(), e.stopPropagation(), e.leftButton && r._lastRenderData) {
- var t = e.posy, n = e.posx, i = r._lastRenderData.renderedLayout;
- r._slider.toggleClassName("active", !0),
- r._sliderMouseMoveMonitor.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
- var o = Math.abs(e.posx - n);
- if (s.isWindows && o > S) r._context.viewLayout.setScrollPositionNow({scrollTop: i.scrollTop}); else {
- var a = e.posy - t;
- r._context.viewLayout.setScrollPositionNow({scrollTop: i.getDesiredScrollTopFromDelta(a)})
- }
- }), (function () {
- r._slider.toggleClassName("active", !1)
- }))
- }
- })), r._gestureDisposable = m.Gesture.addTarget(r._domNode.domNode), r._sliderTouchStartListener = n.addDisposableListener(r._domNode.domNode, m.EventType.Start, (function (e) {
- e.preventDefault(), e.stopPropagation(), r._lastRenderData && (r._slider.toggleClassName("active", !0), r._gestureInProgress = !0, r.scrollDueToTouchEvent(e))
- })), r._sliderTouchMoveListener = n.addStandardDisposableListener(r._domNode.domNode, m.EventType.Change, (function (e) {
- e.preventDefault(), e.stopPropagation(), r._lastRenderData && r._gestureInProgress && r.scrollDueToTouchEvent(e)
- })),
- r._sliderTouchEndListener = n.addStandardDisposableListener(r._domNode.domNode, m.EventType.End, (function (e) {
- e.preventDefault(), e.stopPropagation(), r._gestureInProgress = !1, r._slider.toggleClassName("active", !1)
- })), r
- }
- return r(t, e), t.prototype.scrollDueToTouchEvent = function (e) {
- var t = this._domNode.domNode.getBoundingClientRect().top,
- n = this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY - t);
- this._context.viewLayout.setScrollPositionNow({scrollTop: n})
- }, t.prototype.dispose = function () {
- this._mouseDownListener.dispose(), this._sliderMouseMoveMonitor.dispose(), this._sliderMouseDownListener.dispose(), this._gestureDisposable.dispose(), this._sliderTouchStartListener.dispose(), this._sliderTouchMoveListener.dispose(), this._sliderTouchEndListener.dispose(), e.prototype.dispose.call(this)
- }, t.prototype._getMinimapDomNodeClassName = function () {
- return "always" === this._options.showSlider ? "minimap slider-always" : "minimap slider-mouseover"
- }, t.prototype.getDomNode = function () {
- return this._domNode
- },
- t.prototype._applyLayout = function () {
- this._domNode.setLeft(this._options.minimapLeft), this._domNode.setWidth(this._options.minimapWidth), this._domNode.setHeight(this._options.minimapHeight), this._shadow.setHeight(this._options.minimapHeight), this._canvas.setWidth(this._options.canvasOuterWidth), this._canvas.setHeight(this._options.canvasOuterHeight), this._canvas.domNode.width = this._options.canvasInnerWidth, this._canvas.domNode.height = this._options.canvasInnerHeight, this._decorationsCanvas.setWidth(this._options.canvasOuterWidth), this._decorationsCanvas.setHeight(this._options.canvasOuterHeight), this._decorationsCanvas.domNode.width = this._options.canvasInnerWidth, this._decorationsCanvas.domNode.height = this._options.canvasInnerHeight, this._slider.setWidth(this._options.minimapWidth)
- }, t.prototype._getBuffer = function () {
- return this._buffers || this._options.canvasInnerWidth > 0 && this._options.canvasInnerHeight > 0 && (this._buffers = new N(this._canvas.domNode.getContext("2d"), this._options.canvasInnerWidth, this._options.canvasInnerHeight, this._tokensColorTracker.getColor(2))), this._buffers ? this._buffers.getBuffer() : null
- }, t.prototype._onOptionsMaybeChanged = function () {
- var e = new w(this._context.configuration);
- return !this._options.equals(e) && (this._options = e, this._lastRenderData = null, this._buffers = null, this._applyLayout(), this._domNode.setClassName(this._getMinimapDomNodeClassName()), !0)
- }, t.prototype.onConfigurationChanged = function (e) {
- return this._onOptionsMaybeChanged()
- }, t.prototype.onCursorStateChanged = function (e) {
- return this._selections = e.selections, this._renderDecorations = !0, !0
- }, t.prototype.onFlushed = function (e) {
- return this._lastRenderData = null, !0
- }, t.prototype.onLinesChanged = function (e) {
- return !!this._lastRenderData && this._lastRenderData.onLinesChanged(e)
- }, t.prototype.onLinesDeleted = function (e) {
- return this._lastRenderData && this._lastRenderData.onLinesDeleted(e), !0
- }, t.prototype.onLinesInserted = function (e) {
- return this._lastRenderData && this._lastRenderData.onLinesInserted(e), !0
- }, t.prototype.onScrollChanged = function (e) {
- return this._renderDecorations = !0, !0
- }, t.prototype.onTokensChanged = function (e) {
- return !!this._lastRenderData && this._lastRenderData.onTokensChanged(e)
- }, t.prototype.onTokensColorsChanged = function (e) {
- return this._lastRenderData = null, this._buffers = null, !0
- }, t.prototype.onZonesChanged = function (e) {
- return this._lastRenderData = null, !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return this._renderDecorations = !0, !0
- }, t.prototype.onThemeChanged = function (e) {
- return this._context.model.invalidateMinimapColorCache(), this._selectionColor = this._context.theme.getColor(g.minimapSelection), this._renderDecorations = !0, !0
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- if (0 === this._options.renderMinimap) return this._shadow.setClassName("minimap-shadow-hidden"),
- this._sliderHorizontal.setWidth(0), void this._sliderHorizontal.setHeight(0);
- e.scrollLeft + e.viewportWidth >= e.scrollWidth ? this._shadow.setClassName("minimap-shadow-hidden") : this._shadow.setClassName("minimap-shadow-visible");
- var t = E.create(this._options, e.visibleRange.startLineNumber, e.visibleRange.endLineNumber, e.viewportHeight, e.viewportData.whitespaceViewportData.length > 0, this._context.model.getLineCount(), e.scrollTop, e.scrollHeight, this._lastRenderData ? this._lastRenderData.renderedLayout : null);
- this._slider.setTop(t.sliderTop), this._slider.setHeight(t.sliderHeight);
- var n = e.scrollLeft / this._options.typicalHalfwidthCharacterWidth,
- i = Math.min(this._options.minimapWidth, Math.round(n * b(this._options.renderMinimap, this._options.fontScale) / this._options.pixelRatio));
- this._sliderHorizontal.setLeft(i), this._sliderHorizontal.setWidth(this._options.minimapWidth - i), this._sliderHorizontal.setTop(0), this._sliderHorizontal.setHeight(t.sliderHeight), this.renderDecorations(t), this._lastRenderData = this.renderLines(t)
- },
- t.prototype.renderDecorations = function (e) {
- if (this._renderDecorations) {
- this._renderDecorations = !1;
- var t = this._context.model.getDecorationsInViewport(new c.Range(e.startLineNumber, 1, e.endLineNumber, this._context.model.getLineMaxColumn(e.endLineNumber))),
- n = this._options, i = n.renderMinimap, o = n.canvasInnerWidth, r = n.canvasInnerHeight,
- s = C(i, this._options.fontScale), a = b(0, this._options.fontScale),
- l = this._context.model.getOptions().tabSize,
- u = this._decorationsCanvas.domNode.getContext("2d");
- u.clearRect(0, 0, o, r);
- for (var d = new Map, h = 0; h < this._selections.length; h++) for (var p = this._selections[h], g = p.startLineNumber; g <= p.endLineNumber; g++) this.renderDecorationOnLine(u, d, p, this._selectionColor, e, g, s, s, l, a);
- for (h = 0; h < t.length; h++) {
- var f = t[h];
- if (f.options.minimap) {
- var m = f.options.minimap.getColor(this._context.theme);
- for (g = f.range.startLineNumber; g <= f.range.endLineNumber; g++) switch (f.options.minimap.position) {
- case _.MinimapPosition.Inline:
- this.renderDecorationOnLine(u, d, f.range, m, e, g, s, s, l, a);
- continue
- ;
- case _.MinimapPosition.Gutter:
- var v = (g - e.startLineNumber) * s;
- this.renderDecoration(u, m, 2, v, 2, s);
- continue
- }
- }
- }
- }
- }, t.prototype.renderDecorationOnLine = function (e, t, n, i, o, r, s, l, u, c) {
- var h = (r - o.startLineNumber) * l;
- if (!(h + s < 0 || h > this._options.canvasInnerHeight)) {
- var p = t.get(r), g = !p;
- if (!p) {
- var f = this._context.model.getLineContent(r);
- p = [d.MINIMAP_GUTTER_WIDTH];
- for (var m = 1; m < f.length + 1; m++) {
- var v = f.charCodeAt(m - 1), _ = 9 === v ? u * c : a.isFullWidthCharacter(v) ? 2 * c : c;
- p[m] = p[m - 1] + _
- }
- t.set(r, p)
- }
- var y = n.startColumn, C = n.endColumn, b = n.startLineNumber, S = n.endLineNumber,
- w = b === r ? p[y - 1] : d.MINIMAP_GUTTER_WIDTH, E = S > r ? p.length - 1 : C - 1;
- if (E > 0) {
- var L = p[E] - w || 2;
- this.renderDecoration(e, i, w, h, L, s)
- }
- g && this.renderLineHighlight(e, i, h, s)
- }
- }, t.prototype.renderLineHighlight = function (e, t, n, i) {
- e.fillStyle = t && t.transparent(.5).toString() || "", e.fillRect(d.MINIMAP_GUTTER_WIDTH, n, e.canvas.width, i)
- }, t.prototype.renderDecoration = function (e, t, n, i, o, r) {
- e.fillStyle = t && t.toString() || "", e.fillRect(n, i, o, r)
- }, t.prototype.renderLines = function (e) {
- var n = this._options.renderMinimap, i = this._options.charRenderer(), o = e.startLineNumber,
- r = e.endLineNumber, s = C(n, this._options.fontScale);
- if (this._lastRenderData && this._lastRenderData.linesEquals(e)) {
- var a = this._lastRenderData._get();
- return new D(e, a.imageData, a.lines)
- }
- var l = this._getBuffer();
- if (!l) return null;
- for (var u = t._renderUntouchedLines(l, o, r, s, this._lastRenderData), d = u[0], c = u[1], h = u[2], p = this._context.model.getMinimapLinesRenderingData(o, r, h), g = p.tabSize, f = this._tokensColorTracker.getColor(2), m = this._tokensColorTracker.backgroundIsLight(), v = 0, _ = [], y = 0, b = r - o + 1; y < b; y++) h[y] && t._renderLine(l, f, m, n, this._tokensColorTracker, i, v, g, p.data[y], this._options.fontScale), _[y] = new L(v), v += s;
- var S = -1 === d ? 0 : d, w = (-1 === c ? l.height : c) - S;
- return this._canvas.domNode.getContext("2d").putImageData(l, 0, 0, 0, S, l.width, w), new D(e, l, _)
- }, t._renderUntouchedLines = function (e, t, n, i, o) {
- var r = [];
- if (!o) {
- for (var s = 0, a = n - t + 1; s < a; s++) r[s] = !0;
- return [-1, -1, r]
- }
- for (var l = o._get(), u = l.imageData.data, d = l.rendLineNumberStart, c = l.lines, h = c.length, p = e.width, g = e.data, f = (n - t + 1) * i * p * 4, m = -1, v = -1, _ = -1, y = -1, C = -1, b = -1, S = 0, w = t; w <= n; w++) {
- var E = w - t, L = w - d, D = L >= 0 && L < h ? c[L].dy : -1;
- if (-1 !== D) {
- var N = D * p * 4, x = (D + i) * p * 4, I = S * p * 4, M = (S + i) * p * 4;
- y === N && b === I ? (y = x, b = M) : (-1 !== _ && (g.set(u.subarray(_, y), C), -1 === m && 0 === _ && _ === C && (m = y), -1 === v && y === f && _ === C && (v = _)), _ = N, y = x, C = I, b = M), r[E] = !1, S += i
- } else r[E] = !0, S += i
- }
- return -1 !== _ && (g.set(u.subarray(_, y), C), -1 === m && 0 === _ && _ === C && (m = y), -1 === v && y === f && _ === C && (v = _)), [-1 === m ? -1 : m / (4 * p), -1 === v ? -1 : v / (4 * p), r]
- }, t._renderLine = function (e, t, n, i, o, r, s, l, u, c) {
- for (var h = u.content, p = u.tokens, g = b(0, c), f = e.width - g, m = d.MINIMAP_GUTTER_WIDTH, v = 0, _ = 0, y = 0, C = p.getCount(); y < C; y++) for (var S = p.getEndOffset(y), w = p.getForeground(y), E = o.getColor(w); v < S; v++) {
- if (m > f) return;
- var L = h.charCodeAt(v);
- if (9 === L) {
- var D = l - (v + _) % l;
- _ += D - 1, m += D * g
- } else if (32 === L) m += g; else for (var N = a.isFullWidthCharacter(L) ? 2 : 1, x = 0; x < N; x++) if (2 === i ? r.blockRenderChar(e, m, s, E, t, n) : r.renderChar(e, m, s, L, E, t, c, n),
- (m += g) > f) return
- }
- }, t
- }(u.ViewPart);
- t.Minimap = x, f.registerThemingParticipant((function (e, t) {
- var n = e.getColor(g.scrollbarSliderBackground);
- if (n) {
- var i = n.transparent(.5);
- t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: " + i + "; }")
- }
- var o = e.getColor(g.scrollbarSliderHoverBackground);
- if (o) {
- var r = o.transparent(.5);
- t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: " + r + "; }")
- }
- var s = e.getColor(g.scrollbarSliderActiveBackground);
- if (s) {
- var a = s.transparent(.5);
- t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: " + a + "; }")
- }
- var l = e.getColor(g.scrollbarShadow);
- l && t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: " + l + " -6px 0 6px -6px inset; }")
- }))
- })), define(n[554], i([0, 1, 28, 37, 20, 14, 296]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t) {
- var i = e.call(this, t) || this;
- i._scrollTop = 0, i._width = 0, i._updateWidth(), i._shouldShow = !1;
- var o = i._context.configuration.options.get(78);
- return i._useShadows = o.useShadows, i._domNode = n.createFastDomNode(document.createElement("div")), i._domNode.setAttribute("role", "presentation"), i._domNode.setAttribute("aria-hidden", "true"), i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype._updateShouldShow = function () {
- var e = this._useShadows && this._scrollTop > 0;
- return this._shouldShow !== e && (this._shouldShow = e, !0)
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype._updateWidth = function () {
- var e = this._context.configuration.options.get(107);
- 0 === e.renderMinimap || e.minimapWidth > 0 && 0 === e.minimapLeft ? this._width = e.width : this._width = e.width - e.minimapWidth - e.verticalScrollbarWidth
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options.get(78);
- return this._useShadows = t.useShadows, this._updateWidth(), this._updateShouldShow(), !0
- },
- t.prototype.onScrollChanged = function (e) {
- return this._scrollTop = e.scrollTop, this._updateShouldShow()
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- this._domNode.setWidth(this._width), this._domNode.setClassName(this._shouldShow ? "scroll-decoration" : "")
- }, t
- }(i.ViewPart);
- t.ScrollDecorationViewPart = a, s.registerThemingParticipant((function (e, t) {
- var n = e.getColor(o.scrollbarShadow);
- n && t.addRule(".monaco-editor .scroll-decoration { box-shadow: " + n + " 0 6px 6px -6px inset; }")
- }))
- })), define(n[555], i([0, 1, 24, 82, 20, 14, 297]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- this.left = e.left, this.width = e.width, this.startStyle = null, this.endStyle = null
- }, l = function (e, t) {
- this.lineNumber = e, this.ranges = t
- };
- function u(e) {
- return new a(e)
- }
- function d(e) {
- return new l(e.lineNumber, e.ranges.map(u))
- }
- var c = n.isEdgeOrIE, h = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- n._previousFrameVisibleRangesWithStyle = [], n._context = t;
- var i = n._context.configuration.options
- ;
- return n._lineHeight = i.get(49), n._roundedSelection = i.get(76), n._typicalHalfwidthCharacterWidth = i.get(34).typicalHalfwidthCharacterWidth, n._selections = [], n._renderResult = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options;
- return this._lineHeight = t.get(49), this._roundedSelection = t.get(76), this._typicalHalfwidthCharacterWidth = t.get(34).typicalHalfwidthCharacterWidth, !0
- }, t.prototype.onCursorStateChanged = function (e) {
- return this._selections = e.selections.slice(0), !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- },
- t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype._visibleRangesHaveGaps = function (e) {
- for (var t = 0, n = e.length; t < n; t++) {
- if (e[t].ranges.length > 1) return !0
- }
- return !1
- }, t.prototype._enrichVisibleRangesWithStyle = function (e, t, n) {
- var i = this._typicalHalfwidthCharacterWidth / 4, o = null, r = null;
- if (n && n.length > 0 && t.length > 0) {
- var s = t[0].lineNumber;
- if (s === e.startLineNumber) for (var a = 0; !o && a < n.length; a++) n[a].lineNumber === s && (o = n[a].ranges[0]);
- var l = t[t.length - 1].lineNumber;
- if (l === e.endLineNumber) for (a = n.length - 1; !r && a >= 0; a--) n[a].lineNumber === l && (r = n[a].ranges[0]);
- o && !o.startStyle && (o = null), r && !r.startStyle && (r = null)
- }
- a = 0;
- for (var u = t.length; a < u; a++) {
- var d = t[a].ranges[0], c = d.left, h = d.left + d.width, g = {top: 0, bottom: 0},
- f = {top: 0, bottom: 0};
- if (a > 0) {
- var m = t[a - 1].ranges[0].left, v = t[a - 1].ranges[0].left + t[a - 1].ranges[0].width;
- p(c - m) < i ? g.top = 2 : c > m && (g.top = 1), p(h - v) < i ? f.top = 2 : m < h && h < v && (f.top = 1)
- } else o && (g.top = o.startStyle.top, f.top = o.endStyle.top);
- if (a + 1 < u) {
- var _ = t[a + 1].ranges[0].left, y = t[a + 1].ranges[0].left + t[a + 1].ranges[0].width
- ;p(c - _) < i ? g.bottom = 2 : _ < c && c < y && (g.bottom = 1), p(h - y) < i ? f.bottom = 2 : h < y && (f.bottom = 1)
- } else r && (g.bottom = r.startStyle.bottom, f.bottom = r.endStyle.bottom);
- d.startStyle = g, d.endStyle = f
- }
- }, t.prototype._getVisibleRangesWithStyle = function (e, t, n) {
- var i = (t.linesVisibleRangesForRange(e, !0) || []).map(d), o = this._visibleRangesHaveGaps(i);
- return c || o || !this._roundedSelection || this._enrichVisibleRangesWithStyle(t.visibleRange, i, n), i
- }, t.prototype._createSelectionPiece = function (e, t, n, i, o) {
- return '<div class="cslr ' + n + '" style="top:' + e.toString() + "px;left:" + i.toString() + "px;width:" + o.toString() + "px;height:" + t + 'px;"></div>'
- }, t.prototype._actualRenderOneSelection = function (e, n, i, o) {
- if (0 !== o.length) for (var r = !!o[0].ranges[0].startStyle, s = this._lineHeight.toString(), a = (this._lineHeight - 1).toString(), l = o[0].lineNumber, u = o[o.length - 1].lineNumber, d = 0, c = o.length; d < c; d++) {
- for (var h = o[d], p = h.lineNumber, g = p - n, f = i && (p === u || p === l) ? a : s, m = i && p === l ? 1 : 0, v = "", _ = "", y = 0, C = h.ranges.length; y < C; y++) {
- var b = h.ranges[y];
- if (r) {
- var S = b.startStyle, w = b.endStyle
- ;
- if (1 === S.top || 1 === S.bottom) {
- v += this._createSelectionPiece(m, f, t.SELECTION_CLASS_NAME, b.left - t.ROUNDED_PIECE_WIDTH, t.ROUNDED_PIECE_WIDTH);
- var E = t.EDITOR_BACKGROUND_CLASS_NAME;
- 1 === S.top && (E += " " + t.SELECTION_TOP_RIGHT), 1 === S.bottom && (E += " " + t.SELECTION_BOTTOM_RIGHT), v += this._createSelectionPiece(m, f, E, b.left - t.ROUNDED_PIECE_WIDTH, t.ROUNDED_PIECE_WIDTH)
- }
- if (1 === w.top || 1 === w.bottom) {
- v += this._createSelectionPiece(m, f, t.SELECTION_CLASS_NAME, b.left + b.width, t.ROUNDED_PIECE_WIDTH);
- var L = t.EDITOR_BACKGROUND_CLASS_NAME;
- 1 === w.top && (L += " " + t.SELECTION_TOP_LEFT), 1 === w.bottom && (L += " " + t.SELECTION_BOTTOM_LEFT), v += this._createSelectionPiece(m, f, L, b.left + b.width, t.ROUNDED_PIECE_WIDTH)
- }
- }
- var D = t.SELECTION_CLASS_NAME;
- if (r) {
- S = b.startStyle, w = b.endStyle;
- 0 === S.top && (D += " " + t.SELECTION_TOP_LEFT), 0 === S.bottom && (D += " " + t.SELECTION_BOTTOM_LEFT), 0 === w.top && (D += " " + t.SELECTION_TOP_RIGHT), 0 === w.bottom && (D += " " + t.SELECTION_BOTTOM_RIGHT)
- }
- _ += this._createSelectionPiece(m, f, D, b.left, b.width)
- }
- e[g][0] += v, e[g][1] += _
- }
- },
- t.prototype.prepareRender = function (e) {
- for (var t = [], n = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, o = n; o <= i; o++) {
- t[o - n] = ["", ""]
- }
- for (var r = [], s = 0, a = this._selections.length; s < a; s++) {
- var l = this._selections[s];
- if (l.isEmpty()) r[s] = null; else {
- var u = this._getVisibleRangesWithStyle(l, e, this._previousFrameVisibleRangesWithStyle[s]);
- r[s] = u, this._actualRenderOneSelection(t, n, this._selections.length > 1, u)
- }
- }
- this._previousFrameVisibleRangesWithStyle = r, this._renderResult = t.map((function (e) {
- return e[0] + e[1]
- }))
- }, t.prototype.render = function (e, t) {
- if (!this._renderResult) return "";
- var n = t - e;
- return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
- }, t.SELECTION_CLASS_NAME = "selected-text", t.SELECTION_TOP_LEFT = "top-left-radius", t.SELECTION_BOTTOM_LEFT = "bottom-left-radius", t.SELECTION_TOP_RIGHT = "top-right-radius", t.SELECTION_BOTTOM_RIGHT = "bottom-right-radius", t.EDITOR_BACKGROUND_CLASS_NAME = "monaco-editor-background", t.ROUNDED_PIECE_WIDTH = 10, t
- }(i.DynamicViewOverlay);
- function p(e) {
- return e < 0 ? -e : e
- }
- t.SelectionsOverlay = h, s.registerThemingParticipant((function (e, t) {
- var n = e.getColor(o.editorSelectionBackground);
- n && t.addRule(".monaco-editor .focused .selected-text { background-color: " + n + "; }");
- var i = e.getColor(o.editorInactiveSelection);
- i && t.addRule(".monaco-editor .selected-text { background-color: " + i + "; }");
- var r = e.getColor(o.editorSelectionForeground);
- r && t.addRule(".monaco-editor .view-line span.inline-selected-text { color: " + r + "; }")
- }))
- })), define(n[556], i([0, 1, 4, 2, 16, 10, 33, 30, 17, 118, 114, 43, 15, 26, 157, 14, 95]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y) {
- "use strict";
- function C(e) {
- return e.toString()
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = function () {
- function e(e, t, n) {
- this._modelEventListeners = new i.DisposableStore, this.model = e, this._languageSelection = null, this._languageSelectionListener = null, this._modelEventListeners.add(e.onWillDispose((function () {
- return t(e)
- }))), this._modelEventListeners.add(e.onDidChangeLanguage((function (t) {
- return n(e, t)
- })))
- }
- return e.prototype._disposeLanguageSelection = function () {
- this._languageSelectionListener && (this._languageSelectionListener.dispose(), this._languageSelectionListener = null), this._languageSelection && (this._languageSelection.dispose(), this._languageSelection = null)
- }, e.prototype.dispose = function () {
- this._modelEventListeners.dispose(), this._disposeLanguageSelection()
- }, e.prototype.setLanguage = function (e) {
- var t = this;
- this._disposeLanguageSelection(), this._languageSelection = e, this._languageSelectionListener = this._languageSelection.onDidChange((function () {
- return t.model.setMode(e.languageIdentifier)
- })), this.model.setMode(e.languageIdentifier)
- }, e
- }(), S = o.isLinux || o.isMacintosh ? 1 : 2, w = function (e) {
- function t(t, i, o, r) {
- var s = e.call(this) || this;
- return s._onModelAdded = s._register(new n.Emitter), s.onModelAdded = s._onModelAdded.event, s._onModelRemoved = s._register(new n.Emitter), s.onModelRemoved = s._onModelRemoved.event, s._onModelModeChanged = s._register(new n.Emitter), s.onModelModeChanged = s._onModelModeChanged.event,
- s._configurationService = t, s._resourcePropertiesService = i, s._models = {}, s._modelCreationOptionsByLanguageAndResource = Object.create(null), s._configurationServiceSubscription = s._configurationService.onDidChangeConfiguration((function (e) {
- return s._updateModelOptions()
- })), s._updateModelOptions(), s._register(new E(s, o, t, r)), s
- }
- return r(t, e), t._readModelOptions = function (e, t) {
- var n = a.EDITOR_MODEL_DEFAULTS.tabSize;
- if (e.editor && void 0 !== e.editor.tabSize) {
- var i = parseInt(e.editor.tabSize, 10);
- isNaN(i) || (n = i), n < 1 && (n = 1)
- }
- var o = n;
- if (e.editor && void 0 !== e.editor.indentSize && "tabSize" !== e.editor.indentSize) {
- var r = parseInt(e.editor.indentSize, 10);
- isNaN(r) || (o = r), o < 1 && (o = 1)
- }
- var s = a.EDITOR_MODEL_DEFAULTS.insertSpaces;
- e.editor && void 0 !== e.editor.insertSpaces && (s = "false" !== e.editor.insertSpaces && Boolean(e.editor.insertSpaces));
- var l = S, u = e.eol;
- "\r\n" === u ? l = 2 : "\n" === u && (l = 1);
- var d = a.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace
- ;e.editor && void 0 !== e.editor.trimAutoWhitespace && (d = "false" !== e.editor.trimAutoWhitespace && Boolean(e.editor.trimAutoWhitespace));
- var c = a.EDITOR_MODEL_DEFAULTS.detectIndentation;
- e.editor && void 0 !== e.editor.detectIndentation && (c = "false" !== e.editor.detectIndentation && Boolean(e.editor.detectIndentation));
- var h = a.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;
- return e.editor && void 0 !== e.editor.largeFileOptimizations && (h = "false" !== e.editor.largeFileOptimizations && Boolean(e.editor.largeFileOptimizations)), {
- isForSimpleWidget: t,
- tabSize: n,
- indentSize: o,
- insertSpaces: s,
- detectIndentation: c,
- defaultEOL: l,
- trimAutoWhitespace: d,
- largeFileOptimizations: h
- }
- }, t.prototype.getCreationOptions = function (e, n, i) {
- var o = this._modelCreationOptionsByLanguageAndResource[e + n];
- if (!o) {
- var r = this._configurationService.getValue("editor", {overrideIdentifier: e, resource: n}),
- s = this._resourcePropertiesService.getEOL(n, e);
- o = t._readModelOptions({
- editor: r,
- eol: s
- }, i), this._modelCreationOptionsByLanguageAndResource[e + n] = o
- }
- return o
- },
- t.prototype._updateModelOptions = function () {
- var e = this._modelCreationOptionsByLanguageAndResource;
- this._modelCreationOptionsByLanguageAndResource = Object.create(null);
- for (var n = Object.keys(this._models), i = 0, o = n.length; i < o; i++) {
- var r = n[i], s = this._models[r], a = s.model.getLanguageIdentifier().language,
- l = s.model.uri, u = e[a + l], d = this.getCreationOptions(a, l, s.model.isForSimpleWidget);
- t._setModelOptionsForModel(s.model, d, u)
- }
- }, t._setModelOptionsForModel = function (e, t, n) {
- n && n.defaultEOL !== t.defaultEOL && 1 === e.getLineCount() && e.setEOL(1 === t.defaultEOL ? 0 : 1), n && n.detectIndentation === t.detectIndentation && n.insertSpaces === t.insertSpaces && n.tabSize === t.tabSize && n.indentSize === t.indentSize && n.trimAutoWhitespace === t.trimAutoWhitespace || (t.detectIndentation ? (e.detectIndentation(t.insertSpaces, t.tabSize), e.updateOptions({trimAutoWhitespace: t.trimAutoWhitespace})) : e.updateOptions({
- insertSpaces: t.insertSpaces,
- tabSize: t.tabSize,
- indentSize: t.indentSize,
- trimAutoWhitespace: t.trimAutoWhitespace
- }))
- }, t.prototype.dispose = function () {
- this._configurationServiceSubscription.dispose(), e.prototype.dispose.call(this)
- }, t.prototype._createModelData = function (e, t, n, i) {
- var o = this, r = this.getCreationOptions(t.language, n, i), s = new l.TextModel(e, r, t, n),
- a = C(s.uri);
- if (this._models[a]) throw new Error("ModelService: Cannot add model because it already exists!");
- var u = new b(s, (function (e) {
- return o._onWillDispose(e)
- }), (function (e, t) {
- return o._onDidChangeLanguage(e, t)
- }));
- return this._models[a] = u, u
- }, t.prototype.createModel = function (e, t, n, i) {
- var o;
- return void 0 === i && (i = !1), t ? (o = this._createModelData(e, t.languageIdentifier, n, i), this.setMode(o.model, t)) : o = this._createModelData(e, d.PLAINTEXT_LANGUAGE_IDENTIFIER, n, i), this._onModelAdded.fire(o.model), o.model
- }, t.prototype.setMode = function (e, t) {
- if (t) {
- var n = this._models[C(e.uri)];
- n && n.setLanguage(t)
- }
- }, t.prototype.getModels = function () {
- for (var e = [], t = Object.keys(this._models), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- e.push(this._models[o].model)
- }
- return e
- }, t.prototype.getModel = function (e) {
- var t = C(e), n = this._models[t]
- ;
- return n ? n.model : null
- }, t.prototype._onWillDispose = function (e) {
- var t = C(e.uri), n = this._models[t];
- delete this._models[t], n.dispose(), delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language + e.uri], this._onModelRemoved.fire(e)
- }, t.prototype._onDidChangeLanguage = function (e, n) {
- var i = n.oldLanguage, o = e.getLanguageIdentifier().language,
- r = this.getCreationOptions(i, e.uri, e.isForSimpleWidget),
- s = this.getCreationOptions(o, e.uri, e.isForSimpleWidget);
- t._setModelOptionsForModel(e, s, r), this._onModelModeChanged.fire({model: e, oldModeId: i})
- }, t = h([g(0, p.IConfigurationService), g(1, c.ITextResourcePropertiesService), g(2, _.IThemeService), g(3, y.ILogService)], t)
- }(i.Disposable);
- t.ModelServiceImpl = w;
- var E = function (e) {
- function t(n, i, o, r) {
- var s = e.call(this) || this;
- s._configurationService = o, s._watchers = Object.create(null), s._semanticStyling = s._register(new L(i, r));
- var a = function (e) {
- var n = o.getValue(t.SETTING_ID, {
- overrideIdentifier: e.getLanguageIdentifier().language,
- resource: e.uri
- });
- return n && n.enabled
- }, l = function (e) {
- s._watchers[e.uri.toString()] = new M(e, i, s._semanticStyling)
- }, u = function (e, t) {
- t.dispose(), delete s._watchers[e.uri.toString()]
- };
- return s._register(n.onModelAdded((function (e) {
- a(e) && l(e)
- }))), s._register(n.onModelRemoved((function (e) {
- var t = s._watchers[e.uri.toString()];
- t && u(e, t)
- }))), s._configurationService.onDidChangeConfiguration((function (e) {
- if (e.affectsConfiguration(t.SETTING_ID)) for (var i = 0, o = n.getModels(); i < o.length; i++) {
- var r = o[i], d = s._watchers[r.uri.toString()];
- a(r) ? d || l(r) : d && u(r, d)
- }
- })), s
- }
- return r(t, e), t.SETTING_ID = "editor.semanticHighlighting", t
- }(i.Disposable), L = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i._themeService = t, i._logService = n, i._caches = new WeakMap, i._themeService && i._register(i._themeService.onThemeChange((function () {
- i._caches = new WeakMap
- }))), i
- }
- return r(t, e), t.prototype.get = function (e) {
- return this._caches.has(e) || this._caches.set(e, new x(e.getLegend(), this._themeService, this._logService)), this._caches.get(e)
- }, t
- }(i.Disposable), D = function (e, t, n) {
- this.tokenTypeIndex = e, this.tokenModifierSet = t, this.metadata = n, this.next = null
- }, N = function () {
- function e() {
- this._elementsCount = 0, this._currentLengthIndex = 0, this._currentLength = e._SIZES[this._currentLengthIndex], this._growCount = Math.round(this._currentLengthIndex + 1 < e._SIZES.length ? 2 / 3 * this._currentLength : 0), this._elements = [], e._nullOutEntries(this._elements, this._currentLength)
- }
- return e._nullOutEntries = function (e, t) {
- for (var n = 0; n < t; n++) e[n] = null
- }, e.prototype._hashFunc = function (e, t) {
- return ((e << 5) - e + t | 0) % this._currentLength
- }, e.prototype.get = function (e, t) {
- for (var n = this._hashFunc(e, t), i = this._elements[n]; i;) {
- if (i.tokenTypeIndex === e && i.tokenModifierSet === t) return i;
- i = i.next
- }
- return null
- }, e.prototype.add = function (t, n, i) {
- if (this._elementsCount++, 0 !== this._growCount && this._elementsCount >= this._growCount) {
- var o = this._elements;
- this._currentLengthIndex++, this._currentLength = e._SIZES[this._currentLengthIndex], this._growCount = Math.round(this._currentLengthIndex + 1 < e._SIZES.length ? 2 / 3 * this._currentLength : 0), this._elements = [],
- e._nullOutEntries(this._elements, this._currentLength);
- for (var r = 0, s = o; r < s.length; r++) for (var a = s[r]; a;) {
- var l = a.next;
- a.next = null, this._add(a), a = l
- }
- }
- this._add(new D(t, n, i))
- }, e.prototype._add = function (e) {
- var t = this._hashFunc(e.tokenTypeIndex, e.tokenModifierSet);
- e.next = this._elements[t], this._elements[t] = e
- }, e._SIZES = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143], e
- }(), x = function () {
- function e(e, t, n) {
- this._legend = e, this._themeService = t, this._logService = n, this._hashTable = new N
- }
- return e.prototype.getMetadata = function (e, t) {
- var n, i = this._hashTable.get(e, t);
- if (i) n = i.metadata; else {
- for (var o = this._legend.tokenTypes[e], r = [], s = t, a = 0; s > 0 && a < this._legend.tokenModifiers.length; a++) 1 & s && r.push(this._legend.tokenModifiers[a]), s >>= 1;
- var l = this._themeService.getTheme().getTokenStyleMetadata(o, r);
- if (void 0 === l) n = 2147483647; else {
- if (n = 0, void 0 !== l.italic) n |= 1 | (l.italic ? 1 : 0) << 11;
- if (void 0 !== l.bold) n |= 2 | (l.bold ? 2 : 0) << 11;
- if (void 0 !== l.underline) n |= 4 | (l.underline ? 4 : 0) << 11
- ;
- if (l.foreground) n |= 8 | l.foreground << 14;
- 0 === n && (n = 2147483647)
- }
- this._hashTable.add(e, t, n)
- }
- if (this._logService.getLevel() === y.LogLevel.Trace) {
- var d = this._legend.tokenTypes[e],
- c = t ? " " + this._legend.tokenModifiers.filter((function (e, n) {
- return t & 1 << n
- })).join(" ") : "";
- this._logService.trace("tokenStyleMetadata " + (i ? "[CACHED] " : "") + d + c + ": foreground " + u.TokenMetadata.getForeground(n) + ", fontStyle " + u.TokenMetadata.getFontStyle(n).toString(2))
- }
- return n
- }, e
- }(), I = function () {
- function e(e, t, n) {
- this._provider = e, this.resultId = t, this.data = n
- }
- return e.prototype.dispose = function () {
- this._provider.releaseDocumentSemanticTokens(this.resultId)
- }, e
- }(), M = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o._isDisposed = !1, o._model = t, o._semanticStyling = i, o._fetchSemanticTokens = o._register(new f.RunOnceScheduler((function () {
- return o._fetchSemanticTokensNow()
- }), 300)), o._currentResponse = null, o._currentRequestCancellationTokenSource = null, o._register(o._model.onDidChangeContent((function (e) {
- o._fetchSemanticTokens.isScheduled() || o._fetchSemanticTokens.schedule()
- }))), o._register(u.DocumentSemanticTokensProviderRegistry.onDidChange((function (e) {
- return o._fetchSemanticTokens.schedule()
- }))), n && o._register(n.onThemeChange((function (e) {
- o._setSemanticTokens(null, null, null, []), o._fetchSemanticTokens.schedule()
- }))), o._fetchSemanticTokens.schedule(0), o
- }
- return r(t, e), t.prototype.dispose = function () {
- this._currentResponse && (this._currentResponse.dispose(), this._currentResponse = null), this._currentRequestCancellationTokenSource && (this._currentRequestCancellationTokenSource.cancel(), this._currentRequestCancellationTokenSource = null), this._setSemanticTokens(null, null, null, []), this._isDisposed = !0, e.prototype.dispose.call(this)
- }, t.prototype._fetchSemanticTokensNow = function () {
- var e = this;
- if (!this._currentRequestCancellationTokenSource) {
- var t = this._getSemanticColoringProvider();
- if (t) {
- this._currentRequestCancellationTokenSource = new m.CancellationTokenSource;
- var n = [], i = this._model.onDidChangeContent((function (e) {
- n.push(e)
- })), o = this._semanticStyling.get(t),
- r = this._currentResponse && this._currentResponse.resultId || null;
- Promise.resolve(t.provideDocumentSemanticTokens(this._model, r, this._currentRequestCancellationTokenSource.token)).then((function (r) {
- e._currentRequestCancellationTokenSource = null, i.dispose(), e._setSemanticTokens(t, r || null, o, n)
- }), (function (t) {
- t && "string" == typeof t.message && -1 !== t.message.indexOf("busy") || s.onUnexpectedError(t), e._currentRequestCancellationTokenSource = null, i.dispose(), n.length > 0 && (e._fetchSemanticTokens.isScheduled() || e._fetchSemanticTokens.schedule())
- }))
- }
- }
- }, t._isSemanticTokens = function (e) {
- return e && !!e.data
- }, t._isSemanticTokensEdits = function (e) {
- return e && Array.isArray(e.edits)
- }, t._copy = function (e, t, n, i, o) {
- for (var r = 0; r < o; r++) n[i + r] = e[t + r]
- }, t.prototype._setSemanticTokens = function (e, n, i, o) {
- var r = this._currentResponse;
- if (this._currentResponse && (this._currentResponse.dispose(), this._currentResponse = null), this._isDisposed) e && n && e.releaseDocumentSemanticTokens(n.resultId); else if (e && n && i) {
- if (t._isSemanticTokensEdits(n)) {
- if (!r) return void this._model.setSemanticTokens(null);
- if (0 === n.edits.length) n = {resultId: n.resultId, data: r.data}; else {
- for (var s = 0, a = 0, l = n.edits; a < l.length; a++) {
- s += ((g = l[a]).data ? g.data.length : 0) - g.deleteCount
- }
- for (var u = r.data, d = new Uint32Array(u.length + s), c = u.length, h = d.length, p = n.edits.length - 1; p >= 0; p--) {
- var g, f = c - ((g = n.edits[p]).start + g.deleteCount);
- f > 0 && (t._copy(u, c - f, d, h - f, f), h -= f), g.data && (t._copy(g.data, 0, d, h - g.data.length, g.data.length), h -= g.data.length), c = g.start
- }
- c > 0 && t._copy(u, 0, d, 0, c), n = {resultId: n.resultId, data: d}
- }
- }
- if (t._isSemanticTokens(n)) {
- this._currentResponse = new I(e, n.resultId, n.data);
- u = n.data;
- for (var m = n.data.length / 5 | 0, _ = Math.max(Math.ceil(m / 1024), 400), y = [], C = 0, b = 1, S = 0; C < m;) {
- var w = C, E = Math.min(w + _, m);
- if (E < m) {
- for (var L = E; L - 1 > w && 0 === u[5 * L];) L--;
- if (L - 1 === w) {
- for (var D = E; D + 1 < m && 0 === u[5 * D];) D++;
- E = D
- } else E = L
- }
- d = new Uint32Array(4 * (E - w));
- for (var N = 0, x = 0; C < E;) {
- var M = 5 * C, k = u[M], T = u[M + 1], R = b + k, O = 0 === k ? S + T : T, P = u[M + 2],
- A = u[M + 3], F = u[M + 4], W = i.getMetadata(A, F)
- ;2147483647 !== W && (0 === x && (x = R), d[N] = R - x, d[N + 1] = O, d[N + 2] = O + P, d[N + 3] = W, N += 4), b = R, S = O, C++
- }
- N !== d.length && (d = d.subarray(0, N));
- var B = new v.MultilineTokens2(x, new v.SparseEncodedTokens(d));
- y.push(B)
- }
- if (o.length > 0) {
- for (var V = 0, z = o; V < z.length; V++) for (var H = z[V], K = 0, U = y; K < U.length; K++) for (var j = U[K], q = 0, G = H.changes; q < G.length; q++) {
- var Y = G[q];
- j.applyEdit(Y.range, Y.text)
- }
- this._fetchSemanticTokens.isScheduled() || this._fetchSemanticTokens.schedule()
- }
- this._model.setSemanticTokens(y)
- } else this._model.setSemanticTokens(null)
- } else this._model.setSemanticTokens(null)
- }, t.prototype._getSemanticColoringProvider = function () {
- var e = u.DocumentSemanticTokensProviderRegistry.ordered(this._model);
- return e.length > 0 ? e[0] : null
- }, t
- }(i.Disposable)
- })), define(n[44], i([0, 1, 427, 27, 20, 14]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.editorLineHighlight = o.registerColor("editor.lineHighlightBackground", {
- dark: null,
- light: null,
- hc: null
- }, n.localize(0, null)),
- t.editorLineHighlightBorder = o.registerColor("editor.lineHighlightBorder", {
- dark: "#282828",
- light: "#eeeeee",
- hc: "#f38518"
- }, n.localize(1, null)), t.editorRangeHighlight = o.registerColor("editor.rangeHighlightBackground", {
- dark: "#ffffff0b",
- light: "#fdff0033",
- hc: null
- }, n.localize(2, null), !0), t.editorRangeHighlightBorder = o.registerColor("editor.rangeHighlightBorder", {
- dark: null,
- light: null,
- hc: o.activeContrastBorder
- }, n.localize(3, null), !0), t.editorSymbolHighlight = o.registerColor("editor.symbolHighlightBackground", {
- dark: o.editorFindMatchHighlight,
- light: o.editorFindMatchHighlight,
- hc: null
- }, n.localize(4, null), !0), t.editorSymbolHighlightBorder = o.registerColor("editor.symbolHighlightBorder", {
- dark: null,
- light: null,
- hc: o.activeContrastBorder
- }, n.localize(5, null), !0), t.editorCursorForeground = o.registerColor("editorCursor.foreground", {
- dark: "#AEAFAD",
- light: i.Color.black,
- hc: i.Color.white
- }, n.localize(6, null)), t.editorCursorBackground = o.registerColor("editorCursor.background", null, n.localize(7, null)),
- t.editorWhitespaces = o.registerColor("editorWhitespace.foreground", {
- dark: "#e3e4e229",
- light: "#33333333",
- hc: "#e3e4e229"
- }, n.localize(8, null)), t.editorIndentGuides = o.registerColor("editorIndentGuide.background", {
- dark: t.editorWhitespaces,
- light: t.editorWhitespaces,
- hc: t.editorWhitespaces
- }, n.localize(9, null)), t.editorActiveIndentGuides = o.registerColor("editorIndentGuide.activeBackground", {
- dark: t.editorWhitespaces,
- light: t.editorWhitespaces,
- hc: t.editorWhitespaces
- }, n.localize(10, null)), t.editorLineNumbers = o.registerColor("editorLineNumber.foreground", {
- dark: "#858585",
- light: "#237893",
- hc: i.Color.white
- }, n.localize(11, null));
- var s = o.registerColor("editorActiveLineNumber.foreground", {
- dark: "#c6c6c6",
- light: "#0B216F",
- hc: o.activeContrastBorder
- }, n.localize(12, null), !1, n.localize(13, null));
- t.editorActiveLineNumber = o.registerColor("editorLineNumber.activeForeground", {
- dark: s,
- light: s,
- hc: s
- }, n.localize(14, null)), t.editorRuler = o.registerColor("editorRuler.foreground", {
- dark: "#5A5A5A", light: i.Color.lightgrey, hc: i.Color.white
- }, n.localize(15, null)), t.editorCodeLensForeground = o.registerColor("editorCodeLens.foreground", {
- dark: "#999999",
- light: "#999999",
- hc: "#999999"
- }, n.localize(16, null)), t.editorBracketMatchBackground = o.registerColor("editorBracketMatch.background", {
- dark: "#0064001a",
- light: "#0064001a",
- hc: "#0064001a"
- }, n.localize(17, null)), t.editorBracketMatchBorder = o.registerColor("editorBracketMatch.border", {
- dark: "#888",
- light: "#B9B9B9",
- hc: o.contrastBorder
- }, n.localize(18, null)), t.editorOverviewRulerBorder = o.registerColor("editorOverviewRuler.border", {
- dark: "#7f7f7f4d",
- light: "#7f7f7f4d",
- hc: "#7f7f7f4d"
- }, n.localize(19, null)), t.editorGutter = o.registerColor("editorGutter.background", {
- dark: o.editorBackground,
- light: o.editorBackground,
- hc: o.editorBackground
- }, n.localize(20, null)), t.editorUnnecessaryCodeBorder = o.registerColor("editorUnnecessaryCode.border", {
- dark: null,
- light: null,
- hc: i.Color.fromHex("#fff").transparent(.8)
- }, n.localize(21, null)), t.editorUnnecessaryCodeOpacity = o.registerColor("editorUnnecessaryCode.opacity", {
- dark: i.Color.fromHex("#000a"), light: i.Color.fromHex("#0007"), hc: null
- }, n.localize(22, null)), t.overviewRulerError = o.registerColor("editorOverviewRuler.errorForeground", {
- dark: new i.Color(new i.RGBA(255, 18, 18, .7)),
- light: new i.Color(new i.RGBA(255, 18, 18, .7)),
- hc: new i.Color(new i.RGBA(255, 50, 50, 1))
- }, n.localize(23, null)), t.overviewRulerWarning = o.registerColor("editorOverviewRuler.warningForeground", {
- dark: o.editorWarningForeground,
- light: o.editorWarningForeground,
- hc: o.editorWarningBorder
- }, n.localize(24, null)), t.overviewRulerInfo = o.registerColor("editorOverviewRuler.infoForeground", {
- dark: o.editorInfoForeground,
- light: o.editorInfoForeground,
- hc: o.editorInfoBorder
- }, n.localize(25, null)), r.registerThemingParticipant((function (e, n) {
- var i = e.getColor(o.editorBackground);
- i && n.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: " + i + "; }");
- var r = e.getColor(o.editorForeground);
- r && n.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: " + r + "; }")
- ;var s = e.getColor(t.editorGutter);
- s && n.addRule(".monaco-editor .margin { background-color: " + s + "; }");
- var a = e.getColor(t.editorRangeHighlight);
- a && n.addRule(".monaco-editor .rangeHighlight { background-color: " + a + "; }");
- var l = e.getColor(t.editorRangeHighlightBorder);
- l && n.addRule(".monaco-editor .rangeHighlight { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + l + "; }");
- var u = e.getColor(t.editorSymbolHighlight);
- u && n.addRule(".monaco-editor .symbolHighlight { background-color: " + u + "; }");
- var d = e.getColor(t.editorSymbolHighlightBorder);
- d && n.addRule(".monaco-editor .symbolHighlight { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + d + "; }");
- var c = e.getColor(t.editorWhitespaces);
- c && n.addRule(".vs-whitespace { color: " + c + " !important; }")
- }))
- })), define(n[557], i([0, 1, 82, 44, 19, 14, 285]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = !0, l = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- n._context = t;
- var i = n._context.configuration.options, o = i.get(107)
- ;
- return n._lineHeight = i.get(49), n._renderLineHighlight = i.get(72), n._contentLeft = o.contentLeft, n._contentWidth = o.contentWidth, n._selectionIsEmpty = !0, n._cursorLineNumbers = [], n._selections = [], n._renderData = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), e.prototype.dispose.call(this)
- }, t.prototype._readFromSelections = function () {
- var e = !1, t = a ? this._selections.slice(0, 1) : this._selections, n = t.map((function (e) {
- return e.positionLineNumber
- }));
- n.sort((function (e, t) {
- return e - t
- })), o.equals(this._cursorLineNumbers, n) || (this._cursorLineNumbers = n, e = !0);
- var i = t.every((function (e) {
- return e.isEmpty()
- }));
- return this._selectionIsEmpty !== i && (this._selectionIsEmpty = i, e = !0), e
- }, t.prototype.onThemeChanged = function (e) {
- return this._readFromSelections()
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(107);
- return this._lineHeight = t.get(49), this._renderLineHighlight = t.get(72), this._contentLeft = n.contentLeft,
- this._contentWidth = n.contentWidth, !0
- }, t.prototype.onCursorStateChanged = function (e) {
- return this._selections = e.selections, this._readFromSelections()
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollWidthChanged || e.scrollTopChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.prepareRender = function (e) {
- if (this._shouldRenderThis()) {
- for (var t = this._renderOne(e), n = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, o = this._cursorLineNumbers.length, r = 0, s = [], a = n; a <= i; a++) {
- for (var l = a - n; r < o && this._cursorLineNumbers[r] < a;) r++;
- r < o && this._cursorLineNumbers[r] === a ? s[l] = t : s[l] = ""
- }
- this._renderData = s
- } else this._renderData = null
- }, t.prototype.render = function (e, t) {
- if (!this._renderData) return "";
- var n = t - e;
- return n >= this._renderData.length ? "" : this._renderData[n]
- }, t
- }(n.DynamicViewOverlay);
- t.AbstractLineHighlightOverlay = l;
- var u = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._renderOne = function (e) {
- return '<div class="' + ("current-line" + (this._shouldRenderOther() ? " current-line-both" : "")) + '" style="width:' + Math.max(e.scrollWidth, this._contentWidth) + "px; height:" + this._lineHeight + 'px;"></div>'
- }, t.prototype._shouldRenderThis = function () {
- return ("line" === this._renderLineHighlight || "all" === this._renderLineHighlight) && this._selectionIsEmpty
- }, t.prototype._shouldRenderOther = function () {
- return "gutter" === this._renderLineHighlight || "all" === this._renderLineHighlight
- }, t
- }(l);
- t.CurrentLineHighlightOverlay = u;
- var d = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._renderOne = function (e) {
- return '<div class="' + ("current-line current-line-margin" + (this._shouldRenderOther() ? " current-line-margin-both" : "")) + '" style="width:' + this._contentLeft + "px; height:" + this._lineHeight + 'px;"></div>'
- }, t.prototype._shouldRenderThis = function () {
- return "gutter" === this._renderLineHighlight || "all" === this._renderLineHighlight
- }, t.prototype._shouldRenderOther = function () {
- return ("line" === this._renderLineHighlight || "all" === this._renderLineHighlight) && this._selectionIsEmpty
- }, t
- }(l);
- t.CurrentLineMarginHighlightOverlay = d, s.registerThemingParticipant((function (e, t) {
- a = !1;
- var n = e.getColor(i.editorLineHighlight);
- if (n && (t.addRule(".monaco-editor .view-overlays .current-line { background-color: " + n + "; }"), t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: " + n + "; border: none; }")), !n || n.isTransparent() || e.defines(i.editorLineHighlightBorder)) {
- var o = e.getColor(i.editorLineHighlightBorder);
- o && (a = !0, t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid " + o + "; }"), t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid " + o + "; }"), "hc" === e.type && (t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),
- t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))
- }
- }))
- })), define(n[558], i([0, 1, 82, 13, 44, 14, 288]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- n._context = t, n._primaryLineNumber = 0;
- var i = n._context.configuration.options, o = i.get(108), r = i.get(34);
- return n._lineHeight = i.get(49), n._spaceWidth = r.spaceWidth, n._enabled = i.get(70), n._activeIndentEnabled = i.get(43), n._maxIndentLeft = -1 === o.wrappingColumn ? -1 : o.wrappingColumn * r.typicalHalfwidthCharacterWidth, n._renderResult = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(108), i = t.get(34);
- return this._lineHeight = t.get(49), this._spaceWidth = i.spaceWidth, this._enabled = t.get(70), this._activeIndentEnabled = t.get(43),
- this._maxIndentLeft = -1 === n.wrappingColumn ? -1 : n.wrappingColumn * i.typicalHalfwidthCharacterWidth, !0
- }, t.prototype.onCursorStateChanged = function (e) {
- var t = e.selections[0], n = t.isEmpty() ? t.positionLineNumber : 0;
- return this._primaryLineNumber !== n && (this._primaryLineNumber = n, !0)
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.onLanguageConfigurationChanged = function (e) {
- return !0
- }, t.prototype.prepareRender = function (e) {
- if (this._enabled) {
- var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber,
- o = this._context.model.getOptions().indentSize * this._spaceWidth, r = e.scrollWidth,
- s = this._lineHeight, a = this._context.model.getLinesIndentGuides(t, n), l = 0, u = 0, d = 0
- ;
- if (this._activeIndentEnabled && this._primaryLineNumber) {
- var c = this._context.model.getActiveIndentGuide(this._primaryLineNumber, t, n);
- l = c.startLineNumber, u = c.endLineNumber, d = c.indent
- }
- for (var h = [], p = t; p <= n; p++) {
- var g = l <= p && p <= u, f = p - t, m = a[f], v = "";
- if (m >= 1) for (var _ = e.visibleRangeForPosition(new i.Position(p, 1)), y = _ ? _.left : 0, C = 1; C <= m; C++) {
- if (v += '<div class="' + (g && C === d ? "cigra" : "cigr") + '" style="left:' + y + "px;height:" + s + "px;width:" + o + 'px"></div>', (y += o) > r || this._maxIndentLeft > 0 && y > this._maxIndentLeft) break
- }
- h[f] = v
- }
- this._renderResult = h
- } else this._renderResult = null
- }, t.prototype.render = function (e, t) {
- if (!this._renderResult) return "";
- var n = t - e;
- return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
- }, t
- }(n.DynamicViewOverlay);
- t.IndentGuidesOverlay = a, s.registerThemingParticipant((function (e, t) {
- var n = e.getColor(o.editorIndentGuides);
- n && t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 " + n + " inset; }");
- var i = e.getColor(o.editorActiveIndentGuides) || n
- ;i && t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 " + i + " inset; }")
- }))
- })), define(n[229], i([0, 1, 16, 82, 13, 44, 14, 289]), (function (e, t, n, i, o, s, a) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var l = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._context = t, n._readConfig(), n._lastCursorModelPosition = new o.Position(1, 1), n._renderResult = null, n._context.addEventHandler(n), n
- }
- return r(t, e), t.prototype._readConfig = function () {
- var e = this._context.configuration.options;
- this._lineHeight = e.get(49);
- var t = e.get(50);
- this._renderLineNumbers = t.renderType, this._renderCustomLineNumbers = t.renderFn, this._renderFinalNewline = e.get(71);
- var n = e.get(107);
- this._lineNumbersLeft = n.lineNumbersLeft, this._lineNumbersWidth = n.lineNumbersWidth
- }, t.prototype.dispose = function () {
- this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- return this._readConfig(), !0
- }, t.prototype.onCursorStateChanged = function (e) {
- var t = e.selections[0].getPosition();
- return this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t), 2 === this._renderLineNumbers || 3 === this._renderLineNumbers
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollTopChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype._getLineRenderLineNumber = function (e) {
- var t = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e, 1));
- if (1 !== t.column) return "";
- var n = t.lineNumber;
- if (this._renderCustomLineNumbers) return this._renderCustomLineNumbers(n);
- if (2 === this._renderLineNumbers) {
- var i = Math.abs(this._lastCursorModelPosition.lineNumber - n);
- return 0 === i ? '<span class="relative-current-line-number">' + n + "</span>" : String(i)
- }
- return 3 === this._renderLineNumbers ? this._lastCursorModelPosition.lineNumber === n ? String(n) : n % 10 == 0 ? String(n) : "" : String(n)
- }, t.prototype.prepareRender = function (e) {
- if (0 !== this._renderLineNumbers) {
- for (var i = n.isLinux ? this._lineHeight % 2 == 0 ? " lh-even" : " lh-odd" : "", o = e.visibleRange.startLineNumber, r = e.visibleRange.endLineNumber, s = '<div class="' + t.CLASS_NAME + i + '" style="left:' + this._lineNumbersLeft.toString() + "px;width:" + this._lineNumbersWidth.toString() + 'px;">', a = this._context.model.getLineCount(), l = [], u = o; u <= r; u++) {
- var d = u - o;
- if (this._renderFinalNewline || u !== a || 0 !== this._context.model.getLineLength(u)) {
- var c = this._getLineRenderLineNumber(u);
- l[d] = c ? s + c + "</div>" : ""
- } else l[d] = ""
- }
- this._renderResult = l
- } else this._renderResult = null
- }, t.prototype.render = function (e, t) {
- if (!this._renderResult) return "";
- var n = t - e;
- return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
- }, t.CLASS_NAME = "line-numbers", t
- }(i.DynamicViewOverlay);
- t.LineNumbersOverlay = l, a.registerThemingParticipant((function (e, t) {
- var n = e.getColor(s.editorLineNumbers);
- n && t.addRule(".monaco-editor .line-numbers { color: " + n + "; }");
- var i = e.getColor(s.editorActiveLineNumber);
- i && t.addRule(".monaco-editor .current-line ~ .line-numbers { color: " + i + "; }")
- }))
- })), define(n[559], i([0, 1, 416, 24, 28, 16, 5, 60, 189, 187, 37, 229, 195, 33, 89, 13, 3, 22, 81, 284]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var C = function () {
- function e(e, t, n) {
- this.top = e, this.left = t, this.width = n
- }
- return e.prototype.setWidth = function (t) {
- return new e(this.top, this.left, t)
- }, e
- }(), b = i.isEdgeOrIE || i.isFirefox, S = function (e) {
- function t(t, n, r) {
- var a = e.call(this, t) || this;
- a._primaryCursorPosition = new m.Position(1, 1), a._primaryCursorVisibleRange = null, a._viewController = n, a._viewHelper = r, a._scrollLeft = 0, a._scrollTop = 0;
- var l = a._context.configuration.options, h = l.get(107);
- a._setAccessibilityOptions(l), a._contentLeft = h.contentLeft, a._contentWidth = h.contentWidth, a._contentHeight = h.height, a._fontInfo = l.get(34), a._lineHeight = l.get(49),
- a._emptySelectionClipboard = l.get(25), a._copyWithSyntaxHighlighting = l.get(15), a._visibleTextArea = null, a._selections = [new _.Selection(1, 1, 1, 1)], a._modelSelections = [new _.Selection(1, 1, 1, 1)], a._lastRenderPosition = null, a.textArea = o.createFastDomNode(document.createElement("textarea")), c.PartFingerprints.write(a.textArea, 6), a.textArea.setClassName("inputarea"), a.textArea.setAttribute("wrap", "off"), a.textArea.setAttribute("autocorrect", "off"), a.textArea.setAttribute("autocapitalize", "off"), a.textArea.setAttribute("autocomplete", "off"), a.textArea.setAttribute("spellcheck", "false"), a.textArea.setAttribute("aria-label", a._getAriaLabel(l)), a.textArea.setAttribute("role", "textbox"), a.textArea.setAttribute("aria-multiline", "true"), a.textArea.setAttribute("aria-haspopup", "false"), a.textArea.setAttribute("aria-autocomplete", "both"), s.isWeb && l.get(68) && a.textArea.setAttribute("readonly", "true"), a.textAreaCover = o.createFastDomNode(document.createElement("div")), a.textAreaCover.setPosition("absolute");
- var p = {
- getLineCount: function () {
- return a._context.model.getLineCount()
- }, getLineMaxColumn: function (e) {
- return a._context.model.getLineMaxColumn(e)
- }, getValueInRange: function (e, t) {
- return a._context.model.getValueInRange(e, t)
- }
- }, g = {
- getDataToCopy: function (e) {
- var t = a._context.model.getPlainTextToCopy(a._modelSelections, a._emptySelectionClipboard, s.isWindows),
- n = a._context.model.getEOL(),
- i = a._emptySelectionClipboard && 1 === a._modelSelections.length && a._modelSelections[0].isEmpty(),
- o = Array.isArray(t) ? t : null, r = Array.isArray(t) ? t.join(n) : t, l = void 0, d = null;
- if (e && (u.CopyOptions.forceCopyWithSyntaxHighlighting || a._copyWithSyntaxHighlighting && r.length < 65536)) {
- var c = a._context.model.getRichTextToCopy(a._modelSelections, a._emptySelectionClipboard);
- c && (l = c.html, d = c.mode)
- }
- return {isFromEmptySelection: i, multicursorText: o, text: r, html: l, mode: d}
- }, getScreenReaderContent: function (e) {
- if (i.isIPad) return d.TextAreaState.EMPTY;
- if (1 === a._accessibilitySupport) {
- if (s.isMacintosh) {
- var t = a._selections[0];
- if (t.isEmpty()) {
- var n = t.getStartPosition(), o = a._getWordBeforePosition(n);
- if (0 === o.length && (o = a._getCharacterBeforePosition(n)), o.length > 0) return new d.TextAreaState(o, o.length, o.length, n, n)
- }
- }
- return d.TextAreaState.EMPTY
- }
- return d.PagedScreenReaderStrategy.fromEditorSelection(e, p, a._selections[0], a._accessibilityPageSize, 0 === a._accessibilitySupport)
- }, deduceModelPosition: function (e, t, n) {
- return a._context.model.deduceModelPositionRelativeToViewPosition(e, t, n)
- }
- };
- return a._textAreaInput = a._register(new u.TextAreaInput(g, a.textArea)), a._register(a._textAreaInput.onKeyDown((function (e) {
- a._viewController.emitKeyDown(e)
- }))), a._register(a._textAreaInput.onKeyUp((function (e) {
- a._viewController.emitKeyUp(e)
- }))), a._register(a._textAreaInput.onPaste((function (e) {
- var t = !1, n = null, i = null;
- e.metadata && (t = a._emptySelectionClipboard && !!e.metadata.isFromEmptySelection, n = void 0 !== e.metadata.multicursorText ? e.metadata.multicursorText : null, i = e.metadata.mode), a._viewController.paste("keyboard", e.text, t, n, i)
- }))),
- a._register(a._textAreaInput.onCut((function () {
- a._viewController.cut("keyboard")
- }))), a._register(a._textAreaInput.onType((function (e) {
- e.replaceCharCnt ? a._viewController.replacePreviousChar("keyboard", e.text, e.replaceCharCnt) : a._viewController.type("keyboard", e.text)
- }))), a._register(a._textAreaInput.onSelectionChangeRequest((function (e) {
- a._viewController.setSelection("keyboard", e)
- }))), a._register(a._textAreaInput.onCompositionStart((function () {
- var e = a._selections[0].startLineNumber, t = a._selections[0].startColumn;
- a._context.privateViewEventBus.emit(new y.ViewRevealRangeRequestEvent("keyboard", new v.Range(e, t, e, t), 0, !0, 1));
- var n = a._viewHelper.visibleRangeForPositionRelativeToEditor(e, t);
- n && (a._visibleTextArea = new C(a._context.viewLayout.getVerticalOffsetForLineNumber(e), n.left, b ? 0 : 1), a._render()), a.textArea.setClassName("inputarea ime-input"), a._viewController.compositionStart("keyboard")
- }))), a._register(a._textAreaInput.onCompositionUpdate((function (e) {
- i.isEdgeOrIE ? a._visibleTextArea = a._visibleTextArea.setWidth(0) : a._visibleTextArea = a._visibleTextArea.setWidth(function (e, t) {
- var n = document.createElement("canvas").getContext("2d");
- n.font = (o = t, r = "normal", s = o.fontWeight, a = o.fontSize, l = o.lineHeight, u = o.fontFamily, r + " normal " + s + " " + a + "px / " + l + "px " + u);
- var o, r, s, a, l, u;
- var d = n.measureText(e);
- return i.isFirefox ? d.width + 2 : d.width
- }(e.data, a._fontInfo)), a._render()
- }))), a._register(a._textAreaInput.onCompositionEnd((function () {
- a._visibleTextArea = null, a._render(), a.textArea.setClassName("inputarea"), a._viewController.compositionEnd("keyboard")
- }))), a._register(a._textAreaInput.onFocus((function () {
- a._context.privateViewEventBus.emit(new y.ViewFocusChangedEvent(!0))
- }))), a._register(a._textAreaInput.onBlur((function () {
- a._context.privateViewEventBus.emit(new y.ViewFocusChangedEvent(!1))
- }))), a
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype._getWordBeforePosition = function (e) {
- for (var t = this._context.model.getLineContent(e.lineNumber), n = f.getMapForWordSeparators(this._context.configuration.options.get(96)), i = e.column, o = 0; i > 1;) {
- var r = t.charCodeAt(i - 2);
- if (0 !== n.get(r) || o > 50) return t.substring(i - 1, e.column - 1);
- o++, i--
- }
- return t.substring(0, e.column - 1)
- }, t.prototype._getCharacterBeforePosition = function (e) {
- if (e.column > 1) {
- var t = this._context.model.getLineContent(e.lineNumber).charAt(e.column - 2);
- if (!a.isHighSurrogate(t.charCodeAt(0))) return t
- }
- return ""
- }, t.prototype._getAriaLabel = function (e) {
- return 1 === e.get(2) ? n.localize(0, null) : e.get(4)
- }, t.prototype._setAccessibilityOptions = function (e) {
- this._accessibilitySupport = e.get(2);
- var t = e.get(3);
- 2 === this._accessibilitySupport && t === g.EditorOptions.accessibilityPageSize.defaultValue ? this._accessibilityPageSize = 160 : this._accessibilityPageSize = t
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options, n = t.get(107);
- return this._setAccessibilityOptions(t), this._contentLeft = n.contentLeft, this._contentWidth = n.contentWidth,
- this._contentHeight = n.height, this._fontInfo = t.get(34), this._lineHeight = t.get(49), this._emptySelectionClipboard = t.get(25), this._copyWithSyntaxHighlighting = t.get(15), this.textArea.setAttribute("aria-label", this._getAriaLabel(t)), s.isWeb && e.hasChanged(68) && (t.get(68) ? this.textArea.setAttribute("readonly", "true") : this.textArea.removeAttribute("readonly")), e.hasChanged(2) && this._textAreaInput.writeScreenReaderContent("strategy changed"), !0
- }, t.prototype.onCursorStateChanged = function (e) {
- return this._selections = e.selections.slice(0), this._modelSelections = e.modelSelections.slice(0), this._textAreaInput.writeScreenReaderContent("selection changed"), !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return this._scrollLeft = e.scrollLeft, this._scrollTop = e.scrollTop, !0
- },
- t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.isFocused = function () {
- return this._textAreaInput.isFocused()
- }, t.prototype.focusTextArea = function () {
- this._textAreaInput.focusTextArea()
- }, t.prototype.getLastRenderData = function () {
- return this._lastRenderPosition
- }, t.prototype.setAriaOptions = function (e) {
- e.activeDescendant ? (this.textArea.setAttribute("aria-haspopup", "true"), this.textArea.setAttribute("aria-autocomplete", "list"), this.textArea.setAttribute("aria-activedescendant", e.activeDescendant)) : (this.textArea.setAttribute("aria-haspopup", "false"), this.textArea.setAttribute("aria-autocomplete", "both"), this.textArea.removeAttribute("aria-activedescendant"))
- }, t.prototype.prepareRender = function (e) {
- this._primaryCursorPosition = new m.Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn), this._primaryCursorVisibleRange = e.visibleRangeForPosition(this._primaryCursorPosition)
- }, t.prototype.render = function (e) {
- this._textAreaInput.writeScreenReaderContent("render"), this._render()
- },
- t.prototype._render = function () {
- if (this._visibleTextArea) this._renderInsideEditor(null, this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, this._lineHeight); else if (this._primaryCursorVisibleRange) {
- var e = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;
- if (e < this._contentLeft || e > this._contentLeft + this._contentWidth) this._renderAtTopLeft(); else {
- var t = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;
- t < 0 || t > this._contentHeight ? this._renderAtTopLeft() : s.isMacintosh ? this._renderInsideEditor(this._primaryCursorPosition, t, e, b ? 0 : 1, this._lineHeight) : this._renderInsideEditor(this._primaryCursorPosition, t, e, b ? 0 : 1, b ? 0 : 1)
- }
- } else this._renderAtTopLeft()
- }, t.prototype._renderInsideEditor = function (e, t, n, i, o) {
- this._lastRenderPosition = e;
- var r = this.textArea, s = this.textAreaCover;
- l.Configuration.applyFontInfo(r, this._fontInfo), r.setTop(t), r.setLeft(n), r.setWidth(i),
- r.setHeight(o), s.setTop(0), s.setLeft(0), s.setWidth(0), s.setHeight(0)
- }, t.prototype._renderAtTopLeft = function () {
- this._lastRenderPosition = null;
- var e = this.textArea, t = this.textAreaCover;
- if (l.Configuration.applyFontInfo(e, this._fontInfo), e.setTop(0), e.setLeft(0), t.setTop(0), t.setLeft(0), b) return e.setWidth(0), e.setHeight(0), t.setWidth(0), void t.setHeight(0);
- e.setWidth(1), e.setHeight(1), t.setWidth(1), t.setHeight(1);
- var n = this._context.configuration.options;
- n.get(40) ? t.setClassName("monaco-editor-background textAreaCover " + p.Margin.OUTER_CLASS_NAME) : 0 !== n.get(50).renderType ? t.setClassName("monaco-editor-background textAreaCover " + h.LineNumbersOverlay.CLASS_NAME) : t.setClassName("monaco-editor-background textAreaCover")
- }, t
- }(c.ViewPart);
- t.TextAreaHandler = S
- })), define(n[560], i([0, 1, 28, 27, 37, 13, 17, 44]), (function (e, t, n, i, o, s, a, l) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var u = function () {
- function e(e, t) {
- var n = e.options;
- this.lineHeight = n.get(49), this.pixelRatio = n.get(105),
- this.overviewRulerLanes = n.get(63), this.renderBorder = n.get(62);
- var o = t.getColor(l.editorOverviewRulerBorder);
- this.borderColor = o ? o.toString() : null, this.hideCursor = n.get(42);
- var r = t.getColor(l.editorCursorForeground);
- this.cursorColor = r ? r.transparent(.7).toString() : null, this.themeType = t.type;
- var s = n.get(54), u = s.enabled, d = s.side,
- c = u ? a.TokenizationRegistry.getDefaultBackground() : null;
- this.backgroundColor = null === c || "left" === d ? null : i.Color.Format.CSS.formatHex(c);
- var h = n.get(107).overviewRuler;
- this.top = h.top, this.right = h.right, this.domWidth = h.width, this.domHeight = h.height, 0 === this.overviewRulerLanes ? (this.canvasWidth = 0, this.canvasHeight = 0) : (this.canvasWidth = this.domWidth * this.pixelRatio | 0, this.canvasHeight = this.domHeight * this.pixelRatio | 0);
- var p = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes), g = p[0], f = p[1];
- this.x = g, this.w = f
- }
- return e.prototype._initLanes = function (e, t, n) {
- var i = t - e;
- if (n >= 3) {
- var o, r, s, a = i - (o = Math.floor(i / 3)) - (r = Math.floor(i / 3)), l = (s = e) + o
- ;
- return [[0, s, l, s, s + o + a, s, l, s], [0, o, a, o + a, r, o + a + r, a + r, o + a + r]]
- }
- if (2 === n) return [[0, s = e, s, s, s + (o = Math.floor(i / 2)), s, s, s], [0, o, o, o, r = i - o, o + r, o + r, o + r]];
- return [[0, e, e, e, e, e, e, e], [0, i, i, i, i, i, i, i]]
- }, e.prototype.equals = function (e) {
- return this.lineHeight === e.lineHeight && this.pixelRatio === e.pixelRatio && this.overviewRulerLanes === e.overviewRulerLanes && this.renderBorder === e.renderBorder && this.borderColor === e.borderColor && this.hideCursor === e.hideCursor && this.cursorColor === e.cursorColor && this.themeType === e.themeType && this.backgroundColor === e.backgroundColor && this.top === e.top && this.right === e.right && this.domWidth === e.domWidth && this.domHeight === e.domHeight && this.canvasWidth === e.canvasWidth && this.canvasHeight === e.canvasHeight
- }, e
- }(), d = function (e) {
- function t(t) {
- var i = e.call(this, t) || this;
- return i._domNode = n.createFastDomNode(document.createElement("canvas")), i._domNode.setClassName("decorationsOverviewRuler"), i._domNode.setPosition("absolute"), i._domNode.setLayerHinting(!0), i._domNode.setContain("strict"),
- i._domNode.setAttribute("aria-hidden", "true"), i._updateSettings(!1), i._tokensColorTrackerListener = a.TokenizationRegistry.onDidChange((function (e) {
- e.changedColorMap && i._updateSettings(!0)
- })), i._cursorPositions = [], i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._tokensColorTrackerListener.dispose()
- }, t.prototype._updateSettings = function (e) {
- var t = new u(this._context.configuration, this._context.theme);
- return (!this._settings || !this._settings.equals(t)) && (this._settings = t, this._domNode.setTop(this._settings.top), this._domNode.setRight(this._settings.right), this._domNode.setWidth(this._settings.domWidth), this._domNode.setHeight(this._settings.domHeight), this._domNode.domNode.width = this._settings.canvasWidth, this._domNode.domNode.height = this._settings.canvasHeight, e && this._render(), !0)
- }, t.prototype.onConfigurationChanged = function (e) {
- return this._updateSettings(!1)
- }, t.prototype.onCursorStateChanged = function (e) {
- this._cursorPositions = []
- ;
- for (var t = 0, n = e.selections.length; t < n; t++) this._cursorPositions[t] = e.selections[t].getPosition();
- return this._cursorPositions.sort(s.Position.compare), !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollHeightChanged
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype.onThemeChanged = function (e) {
- return this._context.model.invalidateOverviewRulerColorCache(), this._updateSettings(!1)
- }, t.prototype.getDomNode = function () {
- return this._domNode.domNode
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype.render = function (e) {
- this._render()
- }, t.prototype._render = function () {
- if (0 !== this._settings.overviewRulerLanes) {
- var e = this._settings.canvasWidth, t = this._settings.canvasHeight, n = this._settings.lineHeight,
- i = this._context.viewLayout, o = t / this._context.viewLayout.getScrollHeight(),
- r = this._context.model.getAllOverviewRulerDecorations(this._context.theme),
- s = 6 * this._settings.pixelRatio | 0, a = s / 2 | 0,
- l = this._domNode.domNode.getContext("2d");
- null === this._settings.backgroundColor ? l.clearRect(0, 0, e, t) : (l.fillStyle = this._settings.backgroundColor, l.fillRect(0, 0, e, t));
- var u = this._settings.x, d = this._settings.w, c = Object.keys(r);
- c.sort();
- for (var h = 0, p = c.length; h < p; h++) {
- var g = c[h], f = r[g];
- l.fillStyle = g;
- for (var m = 0, v = 0, _ = 0, y = 0, C = f.length; y < C; y++) {
- var b = f[3 * y], S = f[3 * y + 1], w = f[3 * y + 2],
- E = i.getVerticalOffsetForLineNumber(S) * o | 0;
- if ((k = (i.getVerticalOffsetForLineNumber(w) + n) * o | 0) - E < s) (I = (E + k) / 2 | 0) < a ? I = a : I + a > t && (I = t - a), E = I - a, k = I + a;
- E > _ + 1 || b !== m ? (0 !== y && l.fillRect(u[m], v, d[m], _ - v), m = b, v = E, _ = k) : k > _ && (_ = k)
- }
- l.fillRect(u[m], v, d[m], _ - v)
- }
- if (!this._settings.hideCursor && this._settings.cursorColor) {
- var L = 2 * this._settings.pixelRatio | 0, D = L / 2 | 0, N = this._settings.x[7],
- x = this._settings.w[7];
- l.fillStyle = this._settings.cursorColor;
- for (v = -100, _ = -100, y = 0, C = this._cursorPositions.length; y < C; y++) {
- var I, M = this._cursorPositions[y];
- (I = i.getVerticalOffsetForLineNumber(M.lineNumber) * o | 0) < D ? I = D : I + D > t && (I = t - D);
- var k = (E = I - D) + L;
- E > _ + 1 ? (0 !== y && l.fillRect(N, v, x, _ - v), v = E, _ = k) : k > _ && (_ = k)
- }
- l.fillRect(N, v, x, _ - v)
- }
- this._settings.renderBorder && this._settings.borderColor && this._settings.overviewRulerLanes > 0 && (l.beginPath(), l.lineWidth = 1, l.strokeStyle = this._settings.borderColor, l.moveTo(0, 0), l.lineTo(0, t), l.stroke(), l.moveTo(0, 0), l.lineTo(e, 0), l.stroke())
- } else this._domNode.setBackgroundColor(this._settings.backgroundColor ? this._settings.backgroundColor : "")
- }, t
- }(o.ViewPart);
- t.DecorationsOverviewRuler = d
- })), define(n[561], i([0, 1, 28, 37, 44, 14, 295]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function (e) {
- function t(t) {
- var i = e.call(this, t) || this
- ;i.domNode = n.createFastDomNode(document.createElement("div")), i.domNode.setAttribute("role", "presentation"), i.domNode.setAttribute("aria-hidden", "true"), i.domNode.setClassName("view-rulers"), i._renderedRulers = [];
- var o = i._context.configuration.options;
- return i._rulers = o.get(77), i._typicalHalfwidthCharacterWidth = o.get(34).typicalHalfwidthCharacterWidth, i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options;
- return this._rulers = t.get(77), this._typicalHalfwidthCharacterWidth = t.get(34).typicalHalfwidthCharacterWidth, !0
- }, t.prototype.onScrollChanged = function (e) {
- return e.scrollHeightChanged
- }, t.prototype.prepareRender = function (e) {
- }, t.prototype._ensureRulersCount = function () {
- var e = this._renderedRulers.length, t = this._rulers.length;
- if (e !== t) if (e < t) for (var i = this._context.model.getOptions().tabSize, o = t - e; o > 0;) {
- (s = n.createFastDomNode(document.createElement("div"))).setClassName("view-ruler"), s.setWidth(i),
- this.domNode.appendChild(s), this._renderedRulers.push(s), o--
- } else for (var r = e - t; r > 0;) {
- var s = this._renderedRulers.pop();
- this.domNode.removeChild(s), r--
- }
- }, t.prototype.render = function (e) {
- this._ensureRulersCount();
- for (var t = 0, n = this._rulers.length; t < n; t++) {
- var i = this._renderedRulers[t];
- i.setHeight(Math.min(e.scrollHeight, 1e6)), i.setLeft(this._rulers[t] * this._typicalHalfwidthCharacterWidth)
- }
- }, t
- }(i.ViewPart);
- t.Rulers = a, s.registerThemingParticipant((function (e, t) {
- var n = e.getColor(o.editorRuler);
- n && t.addRule(".monaco-editor .view-ruler { box-shadow: 1px 0 0 0 " + n + " inset; }")
- }))
- })), define(n[562], i([0, 1, 28, 15, 37, 514, 33, 44, 14, 298]), (function (e, t, n, i, o, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function (e) {
- function t(t) {
- var o = e.call(this, t) || this, r = o._context.configuration.options;
- return o._readOnly = r.get(68), o._cursorBlinking = r.get(16), o._cursorStyle = r.get(18), o._cursorSmoothCaretAnimation = r.get(17), o._selectionIsEmpty = !0, o._isVisible = !1, o._primaryCursor = new s.ViewCursor(o._context),
- o._secondaryCursors = [], o._renderData = [], o._domNode = n.createFastDomNode(document.createElement("div")), o._domNode.setAttribute("role", "presentation"), o._domNode.setAttribute("aria-hidden", "true"), o._updateDomClassName(), o._domNode.appendChild(o._primaryCursor.getDomNode()), o._startCursorBlinkAnimation = new i.TimeoutTimer, o._cursorFlatBlinkInterval = new i.IntervalTimer, o._blinkingEnabled = !1, o._editorHasFocus = !1, o._updateBlinking(), o
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._startCursorBlinkAnimation.dispose(), this._cursorFlatBlinkInterval.dispose()
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.onConfigurationChanged = function (e) {
- var t = this._context.configuration.options;
- this._readOnly = t.get(68), this._cursorBlinking = t.get(16), this._cursorStyle = t.get(18), this._cursorSmoothCaretAnimation = t.get(17), this._updateBlinking(), this._updateDomClassName(), this._primaryCursor.onConfigurationChanged(e)
- ;
- for (var n = 0, i = this._secondaryCursors.length; n < i; n++) this._secondaryCursors[n].onConfigurationChanged(e);
- return !0
- }, t.prototype._onCursorPositionChanged = function (e, t) {
- if (this._primaryCursor.onCursorPositionChanged(e), this._updateBlinking(), this._secondaryCursors.length < t.length) for (var n = t.length - this._secondaryCursors.length, i = 0; i < n; i++) {
- var o = new s.ViewCursor(this._context);
- this._domNode.domNode.insertBefore(o.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling), this._secondaryCursors.push(o)
- } else if (this._secondaryCursors.length > t.length) {
- var r = this._secondaryCursors.length - t.length;
- for (i = 0; i < r; i++) this._domNode.removeChild(this._secondaryCursors[0].getDomNode()), this._secondaryCursors.splice(0, 1)
- }
- for (i = 0; i < t.length; i++) this._secondaryCursors[i].onCursorPositionChanged(t[i])
- }, t.prototype.onCursorStateChanged = function (e) {
- for (var t = [], n = 0, i = e.selections.length; n < i; n++) t[n] = e.selections[n].getPosition();
- this._onCursorPositionChanged(t[0], t.slice(1));
- var o = e.selections[0].isEmpty()
- ;
- return this._selectionIsEmpty !== o && (this._selectionIsEmpty = o, this._updateDomClassName()), !0
- }, t.prototype.onDecorationsChanged = function (e) {
- return !0
- }, t.prototype.onFlushed = function (e) {
- return !0
- }, t.prototype.onFocusChanged = function (e) {
- return this._editorHasFocus = e.isFocused, this._updateBlinking(), !1
- }, t.prototype.onLinesChanged = function (e) {
- return !0
- }, t.prototype.onLinesDeleted = function (e) {
- return !0
- }, t.prototype.onLinesInserted = function (e) {
- return !0
- }, t.prototype.onScrollChanged = function (e) {
- return !0
- }, t.prototype.onTokensChanged = function (e) {
- var t = function (t) {
- for (var n = 0, i = e.ranges.length; n < i; n++) if (e.ranges[n].fromLineNumber <= t.lineNumber && t.lineNumber <= e.ranges[n].toLineNumber) return !0;
- return !1
- };
- if (t(this._primaryCursor.getPosition())) return !0;
- for (var n = 0, i = this._secondaryCursors; n < i.length; n++) {
- if (t(i[n].getPosition())) return !0
- }
- return !1
- }, t.prototype.onZonesChanged = function (e) {
- return !0
- }, t.prototype._getCursorBlinking = function () {
- return this._editorHasFocus ? this._readOnly ? 5 : this._cursorBlinking : 0
- },
- t.prototype._updateBlinking = function () {
- var e = this;
- this._startCursorBlinkAnimation.cancel(), this._cursorFlatBlinkInterval.cancel();
- var n = this._getCursorBlinking(), i = 0 === n, o = 5 === n;
- i ? this._hide() : this._show(), this._blinkingEnabled = !1, this._updateDomClassName(), i || o || (1 === n ? this._cursorFlatBlinkInterval.cancelAndSet((function () {
- e._isVisible ? e._hide() : e._show()
- }), t.BLINK_INTERVAL) : this._startCursorBlinkAnimation.setIfNotSet((function () {
- e._blinkingEnabled = !0, e._updateDomClassName()
- }), t.BLINK_INTERVAL))
- }, t.prototype._updateDomClassName = function () {
- this._domNode.setClassName(this._getClassName())
- }, t.prototype._getClassName = function () {
- var e = "cursors-layer";
- switch (this._selectionIsEmpty || (e += " has-selection"), this._cursorStyle) {
- case a.TextEditorCursorStyle.Line:
- e += " cursor-line-style";
- break;
- case a.TextEditorCursorStyle.Block:
- e += " cursor-block-style";
- break;
- case a.TextEditorCursorStyle.Underline:
- e += " cursor-underline-style";
- break;
- case a.TextEditorCursorStyle.LineThin:
- e += " cursor-line-thin-style";
- break
- ;
- case a.TextEditorCursorStyle.BlockOutline:
- e += " cursor-block-outline-style";
- break;
- case a.TextEditorCursorStyle.UnderlineThin:
- e += " cursor-underline-thin-style";
- break;
- default:
- e += " cursor-line-style"
- }
- if (this._blinkingEnabled) switch (this._getCursorBlinking()) {
- case 1:
- e += " cursor-blink";
- break;
- case 2:
- e += " cursor-smooth";
- break;
- case 3:
- e += " cursor-phase";
- break;
- case 4:
- e += " cursor-expand";
- break;
- case 5:
- e += " cursor-solid";
- break;
- default:
- e += " cursor-solid"
- } else e += " cursor-solid";
- return this._cursorSmoothCaretAnimation && (e += " cursor-smooth-caret-animation"), e
- }, t.prototype._show = function () {
- this._primaryCursor.show();
- for (var e = 0, t = this._secondaryCursors.length; e < t; e++) this._secondaryCursors[e].show();
- this._isVisible = !0
- }, t.prototype._hide = function () {
- this._primaryCursor.hide();
- for (var e = 0, t = this._secondaryCursors.length; e < t; e++) this._secondaryCursors[e].hide();
- this._isVisible = !1
- }, t.prototype.prepareRender = function (e) {
- this._primaryCursor.prepareRender(e)
- ;
- for (var t = 0, n = this._secondaryCursors.length; t < n; t++) this._secondaryCursors[t].prepareRender(e)
- }, t.prototype.render = function (e) {
- var t = [], n = 0, i = this._primaryCursor.render(e);
- i && (t[n++] = i);
- for (var o = 0, r = this._secondaryCursors.length; o < r; o++) {
- var s = this._secondaryCursors[o].render(e);
- s && (t[n++] = s)
- }
- this._renderData = t
- }, t.prototype.getLastRenderData = function () {
- return this._renderData
- }, t.BLINK_INTERVAL = 500, t
- }(o.ViewPart);
- t.ViewCursors = d, u.registerThemingParticipant((function (e, t) {
- var n = e.getColor(l.editorCursorForeground);
- if (n) {
- var i = e.getColor(l.editorCursorBackground);
- i || (i = n.opposite()), t.addRule(".monaco-editor .cursor { background-color: " + n + "; border-color: " + n + "; color: " + i + "; }"), "hc" === e.type && t.addRule(".monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid " + i + "; border-right: 1px solid " + i + "; }")
- }
- }))
- })),
- define(n[563], i([0, 1, 6, 28, 10, 551, 559, 523, 228, 513, 37, 366, 557, 367, 549, 149, 558, 229, 552, 368, 195, 369, 553, 370, 560, 371, 561, 554, 555, 562, 372, 13, 3, 91, 360, 361, 81, 363, 92, 14, 166]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W, B, V, z) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var H = function (e) {
- function t(t, n, o, r, u, D) {
- var T = e.call(this) || this;
- T._cursor = u, T._renderAnimationFrame = null, T.outgoingEvents = D;
- var R = new l.ViewController(n, r, T.outgoingEvents, t);
- T.eventDispatcher = new A.ViewEventDispatcher((function (e) {
- return T._renderOnce(e)
- })), T.eventDispatcher.addEventHandler(T), T._context = new P.ViewContext(n, o.getTheme(), r, T.eventDispatcher), T._register(o.onThemeChange((function (e) {
- T._context.theme = e, T.eventDispatcher.emit(new F.ViewThemeChangedEvent), T.render(!0, !1)
- }))), T.viewParts = [], T._textAreaHandler = new a.TextAreaHandler(T._context, R, T.createTextAreaHandlerHelper()), T.viewParts.push(T._textAreaHandler), T.linesContent = i.createFastDomNode(document.createElement("div")),
- T.linesContent.setClassName("lines-content monaco-editor-background"), T.linesContent.setPosition("absolute"), T.domNode = i.createFastDomNode(document.createElement("div")), T.domNode.setClassName(T.getEditorClassName()), T.overflowGuardContainer = i.createFastDomNode(document.createElement("div")), c.PartFingerprints.write(T.overflowGuardContainer, 3), T.overflowGuardContainer.setClassName("overflow-guard"), T._scrollbar = new f.EditorScrollbar(T._context, T.linesContent, T.domNode, T.overflowGuardContainer), T.viewParts.push(T._scrollbar), T.viewLines = new y.ViewLines(T._context, T.linesContent), T.viewZones = new k.ViewZones(T._context), T.viewParts.push(T.viewZones);
- var O = new L.DecorationsOverviewRuler(T._context);
- T.viewParts.push(O);
- var W = new x.ScrollDecorationViewPart(T._context);
- T.viewParts.push(W);
- var B = new d.ContentViewOverlays(T._context);
- T.viewParts.push(B), B.addDynamicOverlay(new p.CurrentLineHighlightOverlay(T._context)), B.addDynamicOverlay(new I.SelectionsOverlay(T._context)),
- B.addDynamicOverlay(new v.IndentGuidesOverlay(T._context)), B.addDynamicOverlay(new g.DecorationsOverlay(T._context));
- var V = new d.MarginViewOverlays(T._context);
- T.viewParts.push(V), V.addDynamicOverlay(new p.CurrentLineMarginHighlightOverlay(T._context)), V.addDynamicOverlay(new m.GlyphMarginOverlay(T._context)), V.addDynamicOverlay(new S.MarginViewLineDecorationsOverlay(T._context)), V.addDynamicOverlay(new C.LinesDecorationsOverlay(T._context)), V.addDynamicOverlay(new _.LineNumbersOverlay(T._context));
- var z = new b.Margin(T._context);
- z.getDomNode().appendChild(T.viewZones.marginDomNode), z.getDomNode().appendChild(V.getDomNode()), T.viewParts.push(z), T.contentWidgets = new h.ViewContentWidgets(T._context, T.domNode), T.viewParts.push(T.contentWidgets), T.viewCursors = new M.ViewCursors(T._context), T.viewParts.push(T.viewCursors), T.overlayWidgets = new E.ViewOverlayWidgets(T._context), T.viewParts.push(T.overlayWidgets);
- var H = new N.Rulers(T._context);
- T.viewParts.push(H);
- var K = new w.Minimap(T._context);
- if (T.viewParts.push(K),
- O) {
- var U = T._scrollbar.getOverviewRulerLayoutInfo();
- U.parent.insertBefore(O.getDomNode(), U.insertBefore)
- }
- return T.linesContent.appendChild(B.getDomNode()), T.linesContent.appendChild(H.domNode), T.linesContent.appendChild(T.viewZones.domNode), T.linesContent.appendChild(T.viewLines.getDomNode()), T.linesContent.appendChild(T.contentWidgets.domNode), T.linesContent.appendChild(T.viewCursors.getDomNode()), T.overflowGuardContainer.appendChild(z.getDomNode()), T.overflowGuardContainer.appendChild(T._scrollbar.getDomNode()), T.overflowGuardContainer.appendChild(W.getDomNode()), T.overflowGuardContainer.appendChild(T._textAreaHandler.textArea), T.overflowGuardContainer.appendChild(T._textAreaHandler.textAreaCover), T.overflowGuardContainer.appendChild(T.overlayWidgets.getDomNode()), T.overflowGuardContainer.appendChild(K.getDomNode()), T.domNode.appendChild(T.overflowGuardContainer), T.domNode.appendChild(T.contentWidgets.overflowingContentWidgetsDomNode), T._applyLayout(),
- T.pointerHandler = T._register(new s.PointerHandler(T._context, R, T.createPointerHandlerHelper())), T._register(r.addEventListener((function (e) {
- T.eventDispatcher.emitMany(e)
- }))), T._register(T._cursor.addEventListener((function (e) {
- T.eventDispatcher.emitMany(e)
- }))), T
- }
- return r(t, e), t.prototype._flushAccumulatedAndRenderNow = function () {
- this._renderNow()
- }, t.prototype.createPointerHandlerHelper = function () {
- var e = this;
- return {
- viewDomNode: this.domNode.domNode,
- linesContentDomNode: this.linesContent.domNode,
- focusTextArea: function () {
- e.focus()
- },
- getLastRenderData: function () {
- var t = e.viewCursors.getLastRenderData() || [], n = e._textAreaHandler.getLastRenderData();
- return new z.PointerHandlerLastRenderData(t, n)
- },
- shouldSuppressMouseDownOnViewZone: function (t) {
- return e.viewZones.shouldSuppressMouseDownOnViewZone(t)
- },
- shouldSuppressMouseDownOnWidget: function (t) {
- return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)
- },
- getPositionFromDOMInfo: function (t, n) {
- return e._flushAccumulatedAndRenderNow(), e.viewLines.getPositionFromDOMInfo(t, n)
- },
- visibleRangeForPosition: function (t, n) {
- return e._flushAccumulatedAndRenderNow(), e.viewLines.visibleRangeForPosition(new T.Position(t, n))
- },
- getLineWidth: function (t) {
- return e._flushAccumulatedAndRenderNow(), e.viewLines.getLineWidth(t)
- }
- }
- }, t.prototype.createTextAreaHandlerHelper = function () {
- var e = this;
- return {
- visibleRangeForPositionRelativeToEditor: function (t, n) {
- return e._flushAccumulatedAndRenderNow(), e.viewLines.visibleRangeForPosition(new T.Position(t, n))
- }
- }
- }, t.prototype._applyLayout = function () {
- var e = this._context.configuration.options.get(107);
- this.domNode.setWidth(e.width), this.domNode.setHeight(e.height), this.overflowGuardContainer.setWidth(e.width), this.overflowGuardContainer.setHeight(e.height), this.linesContent.setWidth(1e6), this.linesContent.setHeight(1e6)
- }, t.prototype.getEditorClassName = function () {
- var e = this._textAreaHandler.isFocused() ? " focused" : "";
- return this._context.configuration.options.get(104) + " " + V.getThemeTypeSelector(this._context.theme.type) + e
- }, t.prototype.onConfigurationChanged = function (e) {
- return this.domNode.setClassName(this.getEditorClassName()), this._applyLayout(), !1
- }, t.prototype.onContentSizeChanged = function (e) {
- return this.outgoingEvents.emitContentSizeChange(e), !1
- }, t.prototype.onFocusChanged = function (e) {
- return this.domNode.setClassName(this.getEditorClassName()), this._context.model.setHasFocus(e.isFocused), e.isFocused ? this.outgoingEvents.emitViewFocusGained() : this.outgoingEvents.emitViewFocusLost(), !1
- }, t.prototype.onScrollChanged = function (e) {
- return this.outgoingEvents.emitScrollChanged(e), !1
- }, t.prototype.onThemeChanged = function (e) {
- return this.domNode.setClassName(this.getEditorClassName()), !1
- }, t.prototype.dispose = function () {
- null !== this._renderAnimationFrame && (this._renderAnimationFrame.dispose(), this._renderAnimationFrame = null), this.eventDispatcher.removeEventHandler(this), this.outgoingEvents.dispose(), this.viewLines.dispose();
- for (var t = 0, n = this.viewParts.length; t < n; t++) this.viewParts[t].dispose();
- this.viewParts = [], e.prototype.dispose.call(this)
- }, t.prototype._renderOnce = function (e) {
- var t = K(e);
- return this._scheduleRender(), t
- }, t.prototype._scheduleRender = function () {
- null === this._renderAnimationFrame && (this._renderAnimationFrame = n.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this), 100))
- }, t.prototype._onRenderScheduled = function () {
- this._renderAnimationFrame = null, this._flushAccumulatedAndRenderNow()
- }, t.prototype._renderNow = function () {
- var e = this;
- K((function () {
- return e._actualRender()
- }))
- }, t.prototype._getViewPartsToRender = function () {
- for (var e = [], t = 0, n = 0, i = this.viewParts.length; n < i; n++) {
- var o = this.viewParts[n];
- o.shouldRender() && (e[t++] = o)
- }
- return e
- }, t.prototype._actualRender = function () {
- if (n.isInDOM(this.domNode.domNode)) {
- var e = this._getViewPartsToRender();
- if (this.viewLines.shouldRender() || 0 !== e.length) {
- var t = this._context.viewLayout.getLinesViewportData();
- this._context.model.setViewport(t.startLineNumber, t.endLineNumber, t.centeredLineNumber);
- var i = new W.ViewportData(this._cursor.getViewSelections(), t, this._context.viewLayout.getWhitespaceViewportData(), this._context.model)
- ;this.contentWidgets.shouldRender() && this.contentWidgets.onBeforeRender(i), this.viewLines.shouldRender() && (this.viewLines.renderText(i), this.viewLines.onDidRender(), e = this._getViewPartsToRender());
- for (var o = new O.RenderingContext(this._context.viewLayout, i, this.viewLines), r = 0, s = e.length; r < s; r++) {
- (a = e[r]).prepareRender(o)
- }
- for (r = 0, s = e.length; r < s; r++) {
- var a;
- (a = e[r]).render(o), a.onDidRender()
- }
- }
- }
- }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
- this._scrollbar.delegateVerticalScrollbarMouseDown(e)
- }, t.prototype.restoreState = function (e) {
- this._context.viewLayout.setScrollPositionNow({scrollTop: e.scrollTop}), this._context.model.tokenizeViewport(), this._renderNow(), this.viewLines.updateLineWidths(), this._context.viewLayout.setScrollPositionNow({scrollLeft: e.scrollLeft})
- }, t.prototype.getOffsetForColumn = function (e, t) {
- var n = this._context.model.validateModelPosition({lineNumber: e, column: t}),
- i = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);
- this._flushAccumulatedAndRenderNow()
- ;var o = this.viewLines.visibleRangeForPosition(new T.Position(i.lineNumber, i.column));
- return o ? o.left : -1
- }, t.prototype.getTargetAtClientPoint = function (e, t) {
- var n = this.pointerHandler.getTargetAtClientPoint(e, t);
- return n ? u.ViewOutgoingEvents.convertViewToModelMouseTarget(n, this._context.model.coordinatesConverter) : null
- }, t.prototype.createOverviewRuler = function (e) {
- return new D.OverviewRuler(this._context, e)
- }, t.prototype.change = function (e) {
- var t = this;
- return this._renderOnce((function () {
- var n = t.viewZones.changeViewZones(e);
- return n && (t._context.viewLayout.onHeightMaybeChanged(), t._context.privateViewEventBus.emit(new F.ViewZonesChangedEvent)), n
- }))
- }, t.prototype.render = function (e, t) {
- if (t) {
- this.viewLines.forceShouldRender();
- for (var n = 0, i = this.viewParts.length; n < i; n++) {
- this.viewParts[n].forceShouldRender()
- }
- }
- e ? this._flushAccumulatedAndRenderNow() : this._scheduleRender()
- }, t.prototype.focus = function () {
- this._textAreaHandler.focusTextArea()
- }, t.prototype.isFocused = function () {
- return this._textAreaHandler.isFocused()
- },
- t.prototype.setAriaOptions = function (e) {
- this._textAreaHandler.setAriaOptions(e)
- }, t.prototype.addContentWidget = function (e) {
- this.contentWidgets.addWidget(e.widget), this.layoutContentWidget(e), this._scheduleRender()
- }, t.prototype.layoutContentWidget = function (e) {
- var t = e.position && e.position.range || null;
- if (null === t) {
- var n = e.position ? e.position.position : null;
- null !== n && (t = new R.Range(n.lineNumber, n.column, n.lineNumber, n.column))
- }
- var i = e.position ? e.position.preference : null;
- this.contentWidgets.setWidgetPosition(e.widget, t, i), this._scheduleRender()
- }, t.prototype.removeContentWidget = function (e) {
- this.contentWidgets.removeWidget(e.widget), this._scheduleRender()
- }, t.prototype.addOverlayWidget = function (e) {
- this.overlayWidgets.addWidget(e.widget), this.layoutOverlayWidget(e), this._scheduleRender()
- }, t.prototype.layoutOverlayWidget = function (e) {
- var t = e.position ? e.position.preference : null;
- this.overlayWidgets.setWidgetPosition(e.widget, t) && this._scheduleRender()
- }, t.prototype.removeOverlayWidget = function (e) {
- this.overlayWidgets.removeWidget(e.widget), this._scheduleRender()
- }, t
- }(B.ViewEventHandler);
- function K(e) {
- // try {
- return e()
- // } catch (e) {
- // o.onUnexpectedError(e)
- // }
- }
- t.View = H
- })), define(n[121], i([0, 1, 417, 6, 10, 4, 2, 46, 60, 12, 32, 563, 228, 33, 486, 40, 13, 3, 22, 190, 68, 23, 17, 44, 20, 488, 29, 18, 11, 115, 35, 14, 64, 21, 487, 512, 301]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var B = 0, V = function () {
- function e(e, t, n, i, o, r) {
- this.model = e, this.viewModel = t, this.cursor = n, this.view = i, this.hasRealView = o, this.listenersToRemove = r
- }
- return e.prototype.dispose = function () {
- a.dispose(this.listenersToRemove), this.model.onBeforeDetached(), this.hasRealView && this.view.dispose(), this.cursor.dispose(), this.viewModel.dispose()
- }, e
- }(), z = function (e) {
- function t(t, n, i, r, a, l, u, c, h, p) {
- var g = e.call(this) || this;
- g._onDidDispose = g._register(new s.Emitter), g.onDidDispose = g._onDidDispose.event, g._onDidChangeModelContent = g._register(new s.Emitter),
- g.onDidChangeModelContent = g._onDidChangeModelContent.event, g._onDidChangeModelLanguage = g._register(new s.Emitter), g.onDidChangeModelLanguage = g._onDidChangeModelLanguage.event, g._onDidChangeModelLanguageConfiguration = g._register(new s.Emitter), g.onDidChangeModelLanguageConfiguration = g._onDidChangeModelLanguageConfiguration.event, g._onDidChangeModelOptions = g._register(new s.Emitter), g.onDidChangeModelOptions = g._onDidChangeModelOptions.event, g._onDidChangeModelDecorations = g._register(new s.Emitter), g.onDidChangeModelDecorations = g._onDidChangeModelDecorations.event, g._onDidChangeConfiguration = g._register(new s.Emitter), g.onDidChangeConfiguration = g._onDidChangeConfiguration.event, g._onDidChangeModel = g._register(new s.Emitter), g.onDidChangeModel = g._onDidChangeModel.event, g._onDidChangeCursorPosition = g._register(new s.Emitter), g.onDidChangeCursorPosition = g._onDidChangeCursorPosition.event, g._onDidChangeCursorSelection = g._register(new s.Emitter), g.onDidChangeCursorSelection = g._onDidChangeCursorSelection.event,
- g._onDidAttemptReadOnlyEdit = g._register(new s.Emitter), g.onDidAttemptReadOnlyEdit = g._onDidAttemptReadOnlyEdit.event, g._onDidLayoutChange = g._register(new s.Emitter), g.onDidLayoutChange = g._onDidLayoutChange.event, g._editorTextFocus = g._register(new H), g.onDidFocusEditorText = g._editorTextFocus.onDidChangeToTrue, g.onDidBlurEditorText = g._editorTextFocus.onDidChangeToFalse, g._editorWidgetFocus = g._register(new H), g.onDidFocusEditorWidget = g._editorWidgetFocus.onDidChangeToTrue, g.onDidBlurEditorWidget = g._editorWidgetFocus.onDidChangeToFalse, g._onWillType = g._register(new s.Emitter), g.onWillType = g._onWillType.event, g._onDidType = g._register(new s.Emitter), g.onDidType = g._onDidType.event, g._onDidCompositionStart = g._register(new s.Emitter), g.onDidCompositionStart = g._onDidCompositionStart.event, g._onDidCompositionEnd = g._register(new s.Emitter), g.onDidCompositionEnd = g._onDidCompositionEnd.event, g._onDidPaste = g._register(new s.Emitter), g.onDidPaste = g._onDidPaste.event, g._onMouseUp = g._register(new s.Emitter),
- g.onMouseUp = g._onMouseUp.event, g._onMouseDown = g._register(new s.Emitter), g.onMouseDown = g._onMouseDown.event, g._onMouseDrag = g._register(new s.Emitter), g.onMouseDrag = g._onMouseDrag.event, g._onMouseDrop = g._register(new s.Emitter), g.onMouseDrop = g._onMouseDrop.event, g._onContextMenu = g._register(new s.Emitter), g.onContextMenu = g._onContextMenu.event, g._onMouseMove = g._register(new s.Emitter), g.onMouseMove = g._onMouseMove.event, g._onMouseLeave = g._register(new s.Emitter), g.onMouseLeave = g._onMouseLeave.event, g._onMouseWheel = g._register(new s.Emitter), g.onMouseWheel = g._onMouseWheel.event, g._onKeyUp = g._register(new s.Emitter), g.onKeyUp = g._onKeyUp.event, g._onKeyDown = g._register(new s.Emitter), g.onKeyDown = g._onKeyDown.event, g._onDidContentSizeChange = g._register(new s.Emitter), g.onDidContentSizeChange = g._onDidContentSizeChange.event, g._onDidScrollChange = g._register(new s.Emitter), g.onDidScrollChange = g._onDidScrollChange.event, g._onDidChangeViewZones = g._register(new s.Emitter),
- g.onDidChangeViewZones = g._onDidChangeViewZones.event, g._domElement = t, g._id = ++B, g._decorationTypeKeysToIds = {}, g._decorationTypeSubtypes = {}, g.isSimpleWidget = i.isSimpleWidget || !1, g._telemetryData = i.telemetryData, n = n || {}, g._configuration = g._register(g._createConfiguration(n, p)), g._register(g._configuration.onDidChange((function (e) {
- g._onDidChangeConfiguration.fire(e);
- var t = g._configuration.options;
- if (e.hasChanged(107)) {
- var n = t.get(107);
- g._onDidLayoutChange.fire(n)
- }
- }))), g._contextKeyService = g._register(u.createScoped(g._domElement)), g._notificationService = h, g._codeEditorService = a, g._commandService = l, g._themeService = c, g._register(new K(g, g._contextKeyService)), g._register(new U(g, g._contextKeyService)), g._instantiationService = r.createChild(new T.ServiceCollection([M.IContextKeyService, g._contextKeyService])), g._modelData = null, g._contributions = {}, g._actions = {}, g._focusTracker = new j(t), g._focusTracker.onChange((function () {
- g._editorWidgetFocus.setValue(g._focusTracker.hasFocus())
- })), g._contentWidgets = {},
- g._overlayWidgets = {};
- for (var f = 0, m = Array.isArray(i.contributions) ? i.contributions : d.EditorExtensionsRegistry.getEditorContributions(); f < m.length; f++) {
- var v = m[f];
- try {
- var _ = g._instantiationService.createInstance(v.ctor, g);
- g._contributions[v.id] = _
- } catch (e) {
- o.onUnexpectedError(e)
- }
- }
- return d.EditorExtensionsRegistry.getEditorActions().forEach((function (e) {
- var t = new S.InternalEditorAction(e.id, e.label, e.alias, A.withNullAsUndefined(e.precondition), (function () {
- return g._instantiationService.invokeFunction((function (t) {
- return Promise.resolve(e.runEditorCommand(t, g, null))
- }))
- }), g._contextKeyService);
- g._actions[t.id] = t
- })), g._codeEditorService.addCodeEditor(g), g
- }
- return r(t, e), t.prototype._createConfiguration = function (e, t) {
- return new u.Configuration(this.isSimpleWidget, e, this._domElement, t)
- }, t.prototype.getId = function () {
- return this.getEditorType() + ":" + this._id
- }, t.prototype.getEditorType = function () {
- return w.EditorType.ICodeEditor
- }, t.prototype.dispose = function () {
- this._codeEditorService.removeCodeEditor(this),
- this._focusTracker.dispose();
- for (var t = Object.keys(this._contributions), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- this._contributions[o].dispose()
- }
- this._removeDecorationTypes(), this._postDetachModelCleanup(this._detachModel()), this._onDidDispose.fire(), e.prototype.dispose.call(this)
- }, t.prototype.invokeWithinContext = function (e) {
- return this._instantiationService.invokeFunction(e)
- }, t.prototype.updateOptions = function (e) {
- this._configuration.updateOptions(e)
- }, t.prototype.getOptions = function () {
- return this._configuration.options
- }, t.prototype.getOption = function (e) {
- return this._configuration.options.get(e)
- }, t.prototype.getRawOptions = function () {
- return this._configuration.getRawOptions()
- }, t.prototype.getValue = function (e) {
- if (void 0 === e && (e = null), !this._modelData) return "";
- var t = !(!e || !e.preserveBOM), n = 0;
- return e && e.lineEnding && "\n" === e.lineEnding ? n = 1 : e && e.lineEnding && "\r\n" === e.lineEnding && (n = 2), this._modelData.model.getValue(n, t)
- }, t.prototype.setValue = function (e) {
- this._modelData && this._modelData.model.setValue(e)
- },
- t.prototype.getModel = function () {
- return this._modelData ? this._modelData.model : null
- }, t.prototype.setModel = function (e) {
- void 0 === e && (e = null);
- var t = e;
- if (!(null === this._modelData && null === t || this._modelData && this._modelData.model === t)) {
- var n = this.hasTextFocus(), i = this._detachModel();
- this._attachModel(t), n && this.hasModel() && this.focus();
- var o = {oldModelUrl: i ? i.uri : null, newModelUrl: t ? t.uri : null};
- this._removeDecorationTypes(), this._onDidChangeModel.fire(o), this._postDetachModelCleanup(i)
- }
- }, t.prototype._removeDecorationTypes = function () {
- if (this._decorationTypeKeysToIds = {}, this._decorationTypeSubtypes) {
- for (var e in this._decorationTypeSubtypes) {
- var t = this._decorationTypeSubtypes[e];
- for (var n in t) this._removeDecorationType(e + "-" + n)
- }
- this._decorationTypeSubtypes = {}
- }
- }, t.prototype.getVisibleRanges = function () {
- return this._modelData ? this._modelData.viewModel.getVisibleRanges() : []
- }, t.prototype.getWhitespaces = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getWhitespaces() : []
- },
- t._getVerticalOffsetForPosition = function (e, t, n) {
- var i = e.model.validatePosition({lineNumber: t, column: n}),
- o = e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);
- return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)
- }, t.prototype.getTopForLineNumber = function (e) {
- return this._modelData ? t._getVerticalOffsetForPosition(this._modelData, e, 1) : -1
- }, t.prototype.getTopForPosition = function (e, n) {
- return this._modelData ? t._getVerticalOffsetForPosition(this._modelData, e, n) : -1
- }, t.prototype.setHiddenAreas = function (e) {
- this._modelData && this._modelData.viewModel.setHiddenAreas(e.map((function (e) {
- return C.Range.lift(e)
- })))
- }, t.prototype.getVisibleColumnFromPosition = function (e) {
- if (!this._modelData) return e.column;
- var t = this._modelData.model.validatePosition(e), n = this._modelData.model.getOptions().tabSize;
- return _.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber), t.column, n) + 1
- }, t.prototype.getPosition = function () {
- return this._modelData ? this._modelData.cursor.getPosition() : null
- }, t.prototype.setPosition = function (e) {
- if (this._modelData) {
- if (!y.Position.isIPosition(e)) throw new Error("Invalid arguments");
- this._modelData.cursor.setSelections("api", [{
- selectionStartLineNumber: e.lineNumber,
- selectionStartColumn: e.column,
- positionLineNumber: e.lineNumber,
- positionColumn: e.column
- }])
- }
- }, t.prototype._sendRevealRange = function (e, t, n, i) {
- if (this._modelData) {
- if (!C.Range.isIRange(e)) throw new Error("Invalid arguments");
- var o = this._modelData.model.validateRange(e),
- r = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);
- this._modelData.cursor.emitCursorRevealRange("api", r, t, n, i)
- }
- }, t.prototype.revealLine = function (e, t) {
- void 0 === t && (t = 0), this._revealLine(e, 0, t)
- }, t.prototype.revealLineInCenter = function (e, t) {
- void 0 === t && (t = 0), this._revealLine(e, 1, t)
- }, t.prototype.revealLineInCenterIfOutsideViewport = function (e, t) {
- void 0 === t && (t = 0), this._revealLine(e, 2, t)
- }, t.prototype._revealLine = function (e, t, n) {
- if ("number" != typeof e) throw new Error("Invalid arguments");
- this._sendRevealRange(new C.Range(e, 1, e, 1), t, !1, n)
- }, t.prototype.revealPosition = function (e, t) {
- void 0 === t && (t = 0), this._revealPosition(e, 0, !0, t)
- }, t.prototype.revealPositionInCenter = function (e, t) {
- void 0 === t && (t = 0), this._revealPosition(e, 1, !0, t)
- }, t.prototype.revealPositionInCenterIfOutsideViewport = function (e, t) {
- void 0 === t && (t = 0), this._revealPosition(e, 2, !0, t)
- }, t.prototype._revealPosition = function (e, t, n, i) {
- if (!y.Position.isIPosition(e)) throw new Error("Invalid arguments");
- this._sendRevealRange(new C.Range(e.lineNumber, e.column, e.lineNumber, e.column), t, n, i)
- }, t.prototype.getSelection = function () {
- return this._modelData ? this._modelData.cursor.getSelection() : null
- }, t.prototype.getSelections = function () {
- return this._modelData ? this._modelData.cursor.getSelections() : null
- }, t.prototype.setSelection = function (e) {
- var t = b.Selection.isISelection(e), n = C.Range.isIRange(e);
- if (!t && !n) throw new Error("Invalid arguments");
- if (t) this._setSelectionImpl(e); else if (n) {
- var i = {
- selectionStartLineNumber: e.startLineNumber,
- selectionStartColumn: e.startColumn,
- positionLineNumber: e.endLineNumber,
- positionColumn: e.endColumn
- };
- this._setSelectionImpl(i)
- }
- }, t.prototype._setSelectionImpl = function (e) {
- if (this._modelData) {
- var t = new b.Selection(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn);
- this._modelData.cursor.setSelections("api", [t])
- }
- }, t.prototype.revealLines = function (e, t, n) {
- void 0 === n && (n = 0), this._revealLines(e, t, 0, n)
- }, t.prototype.revealLinesInCenter = function (e, t, n) {
- void 0 === n && (n = 0), this._revealLines(e, t, 1, n)
- }, t.prototype.revealLinesInCenterIfOutsideViewport = function (e, t, n) {
- void 0 === n && (n = 0), this._revealLines(e, t, 2, n)
- }, t.prototype._revealLines = function (e, t, n, i) {
- if ("number" != typeof e || "number" != typeof t) throw new Error("Invalid arguments");
- this._sendRevealRange(new C.Range(e, 1, t, 1), n, !1, i)
- }, t.prototype.revealRange = function (e, t, n, i) {
- void 0 === t && (t = 0), void 0 === n && (n = !1), void 0 === i && (i = !0), this._revealRange(e, n ? 1 : 0, i, t)
- },
- t.prototype.revealRangeInCenter = function (e, t) {
- void 0 === t && (t = 0), this._revealRange(e, 1, !0, t)
- }, t.prototype.revealRangeInCenterIfOutsideViewport = function (e, t) {
- void 0 === t && (t = 0), this._revealRange(e, 2, !0, t)
- }, t.prototype.revealRangeAtTop = function (e, t) {
- void 0 === t && (t = 0), this._revealRange(e, 3, !0, t)
- }, t.prototype._revealRange = function (e, t, n, i) {
- if (!C.Range.isIRange(e)) throw new Error("Invalid arguments");
- this._sendRevealRange(C.Range.lift(e), t, n, i)
- }, t.prototype.setSelections = function (e, t) {
- if (void 0 === t && (t = "api"), this._modelData) {
- if (!e || 0 === e.length) throw new Error("Invalid arguments");
- for (var n = 0, i = e.length; n < i; n++) if (!b.Selection.isISelection(e[n])) throw new Error("Invalid arguments");
- this._modelData.cursor.setSelections(t, e)
- }
- }, t.prototype.getContentWidth = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getContentWidth() : -1
- }, t.prototype.getScrollWidth = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getScrollWidth() : -1
- }, t.prototype.getScrollLeft = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getCurrentScrollLeft() : -1
- }, t.prototype.getContentHeight = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getContentHeight() : -1
- }, t.prototype.getScrollHeight = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getScrollHeight() : -1
- }, t.prototype.getScrollTop = function () {
- return this._modelData ? this._modelData.viewModel.viewLayout.getCurrentScrollTop() : -1
- }, t.prototype.setScrollLeft = function (e) {
- if (this._modelData) {
- if ("number" != typeof e) throw new Error("Invalid arguments");
- this._modelData.viewModel.viewLayout.setScrollPositionNow({scrollLeft: e})
- }
- }, t.prototype.setScrollTop = function (e) {
- if (this._modelData) {
- if ("number" != typeof e) throw new Error("Invalid arguments");
- this._modelData.viewModel.viewLayout.setScrollPositionNow({scrollTop: e})
- }
- }, t.prototype.setScrollPosition = function (e) {
- this._modelData && this._modelData.viewModel.viewLayout.setScrollPositionNow(e)
- }, t.prototype.saveViewState = function () {
- if (!this._modelData) return null;
- for (var e = {}, t = 0, n = Object.keys(this._contributions); t < n.length; t++) {
- var i = n[t], o = this._contributions[i];
- "function" == typeof o.saveViewState && (e[i] = o.saveViewState())
- }
- return {
- cursorState: this._modelData.cursor.saveState(),
- viewState: this._modelData.viewModel.saveState(),
- contributionsState: e
- }
- }, t.prototype.restoreViewState = function (e) {
- if (this._modelData && this._modelData.hasRealView) {
- var t = e;
- if (t && t.cursorState && t.viewState) {
- var n = t.cursorState;
- Array.isArray(n) ? this._modelData.cursor.restoreState(n) : this._modelData.cursor.restoreState([n]);
- for (var i = t.contributionsState || {}, o = Object.keys(this._contributions), r = 0, s = o.length; r < s; r++) {
- var a = o[r], l = this._contributions[a];
- "function" == typeof l.restoreViewState && l.restoreViewState(i[a])
- }
- var u = this._modelData.viewModel.reduceRestoreState(t.viewState);
- this._modelData.view.restoreState(u)
- }
- }
- }, t.prototype.getContribution = function (e) {
- return this._contributions[e] || null
- }, t.prototype.getActions = function () {
- for (var e = [], t = Object.keys(this._actions), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- e.push(this._actions[o])
- }
- return e
- }, t.prototype.getSupportedActions = function () {
- var e = this.getActions();
- return e = e.filter((function (e) {
- return e.isSupported()
- }))
- }, t.prototype.getAction = function (e) {
- return this._actions[e] || null
- }, t.prototype.trigger = function (e, t, n) {
- if (n = n || {}, t === w.Handler.Type) {
- if (!this._modelData || "string" != typeof n.text || 0 === n.text.length) return;
- return "keyboard" === e && this._onWillType.fire(n.text), this._modelData.cursor.trigger(e, t, n), void ("keyboard" === e && this._onDidType.fire(n.text))
- }
- if (t !== w.Handler.Paste) {
- var i = this.getAction(t);
- i ? Promise.resolve(i.run()).then(void 0, o.onUnexpectedError) : this._modelData && (this._triggerEditorCommand(e, t, n) || (this._modelData.cursor.trigger(e, t, n), t === w.Handler.CompositionStart && this._onDidCompositionStart.fire(), t === w.Handler.CompositionEnd && this._onDidCompositionEnd.fire()))
- } else {
- if (!this._modelData || "string" != typeof n.text || 0 === n.text.length) return
- ;
- var r = this._modelData.cursor.getSelection().getStartPosition();
- this._modelData.cursor.trigger(e, t, n);
- var s = this._modelData.cursor.getSelection().getStartPosition();
- "keyboard" === e && this._onDidPaste.fire({
- range: new C.Range(r.lineNumber, r.column, s.lineNumber, s.column),
- mode: n.mode
- })
- }
- }, t.prototype._triggerEditorCommand = function (e, t, n) {
- var i = this, r = d.EditorExtensionsRegistry.getEditorCommand(t);
- return !!r && ((n = n || {}).source = e, this._instantiationService.invokeFunction((function (e) {
- Promise.resolve(r.runEditorCommand(e, i, n)).then(void 0, o.onUnexpectedError)
- })), !0)
- }, t.prototype._getCursors = function () {
- return this._modelData ? this._modelData.cursor : null
- }, t.prototype.pushUndoStop = function () {
- return !!this._modelData && (!this._configuration.options.get(68) && (this._modelData.model.pushStackElement(), !0))
- }, t.prototype.executeEdits = function (e, t, n) {
- return !!this._modelData && (!this._configuration.options.get(68) && (i = n ? Array.isArray(n) ? function () {
- return n
- } : n : function () {
- return null
- }, this._modelData.cursor.executeEdits(e, t, i), !0))
- ;
- var i
- }, t.prototype.executeCommand = function (e, t) {
- this._modelData && this._modelData.cursor.trigger(e, w.Handler.ExecuteCommand, t)
- }, t.prototype.executeCommands = function (e, t) {
- this._modelData && this._modelData.cursor.trigger(e, w.Handler.ExecuteCommands, t)
- }, t.prototype.changeDecorations = function (e) {
- return this._modelData ? this._modelData.model.changeDecorations(e, this._id) : null
- }, t.prototype.getLineDecorations = function (e) {
- return this._modelData ? this._modelData.model.getLineDecorations(e, this._id, m.filterValidationDecorations(this._configuration.options)) : null
- }, t.prototype.deltaDecorations = function (e, t) {
- return this._modelData ? 0 === e.length && 0 === t.length ? e : this._modelData.model.deltaDecorations(e, t, this._id) : []
- }, t.prototype.removeDecorations = function (e) {
- var t = this._decorationTypeKeysToIds[e];
- t && this.deltaDecorations(t, []), this._decorationTypeKeysToIds.hasOwnProperty(e) && delete this._decorationTypeKeysToIds[e], this._decorationTypeSubtypes.hasOwnProperty(e) && delete this._decorationTypeSubtypes[e]
- },
- t.prototype.getLayoutInfo = function () {
- return this._configuration.options.get(107)
- }, t.prototype.createOverviewRuler = function (e) {
- return this._modelData && this._modelData.hasRealView ? this._modelData.view.createOverviewRuler(e) : null
- }, t.prototype.getContainerDomNode = function () {
- return this._domElement
- }, t.prototype.getDomNode = function () {
- return this._modelData && this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null
- }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
- this._modelData && this._modelData.hasRealView && this._modelData.view.delegateVerticalScrollbarMouseDown(e)
- }, t.prototype.layout = function (e) {
- this._configuration.observeReferenceElement(e), this.render()
- }, t.prototype.focus = function () {
- this._modelData && this._modelData.hasRealView && this._modelData.view.focus()
- }, t.prototype.hasTextFocus = function () {
- return !(!this._modelData || !this._modelData.hasRealView) && this._modelData.view.isFocused()
- }, t.prototype.hasWidgetFocus = function () {
- return this._focusTracker && this._focusTracker.hasFocus()
- },
- t.prototype.addContentWidget = function (e) {
- var t = {widget: e, position: e.getPosition()};
- this._contentWidgets.hasOwnProperty(e.getId()) && console.warn("Overwriting a content widget with the same id."), this._contentWidgets[e.getId()] = t, this._modelData && this._modelData.hasRealView && this._modelData.view.addContentWidget(t)
- }, t.prototype.layoutContentWidget = function (e) {
- var t = e.getId();
- if (this._contentWidgets.hasOwnProperty(t)) {
- var n = this._contentWidgets[t];
- n.position = e.getPosition(), this._modelData && this._modelData.hasRealView && this._modelData.view.layoutContentWidget(n)
- }
- }, t.prototype.removeContentWidget = function (e) {
- var t = e.getId();
- if (this._contentWidgets.hasOwnProperty(t)) {
- var n = this._contentWidgets[t];
- delete this._contentWidgets[t], this._modelData && this._modelData.hasRealView && this._modelData.view.removeContentWidget(n)
- }
- }, t.prototype.addOverlayWidget = function (e) {
- var t = {widget: e, position: e.getPosition()};
- this._overlayWidgets.hasOwnProperty(e.getId()) && console.warn("Overwriting an overlay widget with the same id."),
- this._overlayWidgets[e.getId()] = t, this._modelData && this._modelData.hasRealView && this._modelData.view.addOverlayWidget(t)
- }, t.prototype.layoutOverlayWidget = function (e) {
- var t = e.getId();
- if (this._overlayWidgets.hasOwnProperty(t)) {
- var n = this._overlayWidgets[t];
- n.position = e.getPosition(), this._modelData && this._modelData.hasRealView && this._modelData.view.layoutOverlayWidget(n)
- }
- }, t.prototype.removeOverlayWidget = function (e) {
- var t = e.getId();
- if (this._overlayWidgets.hasOwnProperty(t)) {
- var n = this._overlayWidgets[t];
- delete this._overlayWidgets[t], this._modelData && this._modelData.hasRealView && this._modelData.view.removeOverlayWidget(n)
- }
- }, t.prototype.changeViewZones = function (e) {
- this._modelData && this._modelData.hasRealView && (this._modelData.view.change(e) && this._onDidChangeViewZones.fire())
- }, t.prototype.getTargetAtClientPoint = function (e, t) {
- return this._modelData && this._modelData.hasRealView ? this._modelData.view.getTargetAtClientPoint(e, t) : null
- }, t.prototype.getScrolledVisiblePosition = function (e) {
- if (!this._modelData || !this._modelData.hasRealView) return null;
- var n = this._modelData.model.validatePosition(e), i = this._configuration.options, o = i.get(107);
- return {
- top: t._getVerticalOffsetForPosition(this._modelData, n.lineNumber, n.column) - this.getScrollTop(),
- left: this._modelData.view.getOffsetForColumn(n.lineNumber, n.column) + o.glyphMarginWidth + o.lineNumbersWidth + o.decorationsWidth - this.getScrollLeft(),
- height: i.get(49)
- }
- }, t.prototype.getOffsetForColumn = function (e, t) {
- return this._modelData && this._modelData.hasRealView ? this._modelData.view.getOffsetForColumn(e, t) : -1
- }, t.prototype.render = function (e) {
- void 0 === e && (e = !1), this._modelData && this._modelData.hasRealView && this._modelData.view.render(!0, e)
- }, t.prototype.setAriaOptions = function (e) {
- this._modelData && this._modelData.hasRealView && this._modelData.view.setAriaOptions(e)
- }, t.prototype.applyFontInfo = function (e) {
- u.Configuration.applyFontInfoSlow(e, this._configuration.options.get(34))
- }, t.prototype._attachModel = function (e) {
- var t = this;
- if (e) {
- var o = []
- ;this._domElement.setAttribute("data-mode-id", e.getLanguageIdentifier().language), this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()), this._configuration.setMaxLineNumber(e.getLineCount()), e.onBeforeAttached();
- var r = new x.ViewModel(this._id, this._configuration, e, W.DOMLineBreaksComputerFactory.create(), F.MonospaceLineBreaksComputerFactory.create(this._configuration.options), (function (e) {
- return i.scheduleAtNextAnimationFrame(e)
- }));
- o.push(e.onDidChangeDecorations((function (e) {
- return t._onDidChangeModelDecorations.fire(e)
- }))), o.push(e.onDidChangeLanguage((function (n) {
- t._domElement.setAttribute("data-mode-id", e.getLanguageIdentifier().language), t._onDidChangeModelLanguage.fire(n)
- }))), o.push(e.onDidChangeLanguageConfiguration((function (e) {
- return t._onDidChangeModelLanguageConfiguration.fire(e)
- }))), o.push(e.onDidChangeContent((function (e) {
- return t._onDidChangeModelContent.fire(e)
- }))), o.push(e.onDidChangeOptions((function (e) {
- return t._onDidChangeModelOptions.fire(e)
- }))),
- o.push(e.onWillDispose((function () {
- return t.setModel(null)
- })));
- var s = new v.Cursor(this._configuration, e, r);
- o.push(s.onDidReachMaxCursorCount((function () {
- t._notificationService.warn(n.localize(0, null, v.Cursor.MAX_CURSOR_COUNT))
- }))), o.push(s.onDidAttemptReadOnlyEdit((function () {
- t._onDidAttemptReadOnlyEdit.fire(void 0)
- }))), o.push(s.onDidChange((function (e) {
- for (var n = [], i = 0, o = e.selections.length; i < o; i++) n[i] = e.selections[i].getPosition();
- var r = {position: n[0], secondaryPositions: n.slice(1), reason: e.reason, source: e.source};
- t._onDidChangeCursorPosition.fire(r);
- var s = {
- selection: e.selections[0],
- secondarySelections: e.selections.slice(1),
- modelVersionId: e.modelVersionId,
- oldSelections: e.oldSelections,
- oldModelVersionId: e.oldModelVersionId,
- source: e.source,
- reason: e.reason
- };
- t._onDidChangeCursorSelection.fire(s)
- })));
- var a = this._createView(r, s), l = a[0], u = a[1];
- if (u) {
- this._domElement.appendChild(l.domNode.domNode);
- for (var d = Object.keys(this._contentWidgets), c = 0, h = d.length; c < h; c++) {
- var p = d[c]
- ;l.addContentWidget(this._contentWidgets[p])
- }
- for (c = 0, h = (d = Object.keys(this._overlayWidgets)).length; c < h; c++) {
- p = d[c];
- l.addOverlayWidget(this._overlayWidgets[p])
- }
- l.render(!1, !0), l.domNode.domNode.setAttribute("data-uri", e.uri.toString())
- }
- this._modelData = new V(e, r, s, l, u, o)
- } else this._modelData = null
- }, t.prototype._createView = function (e, t) {
- var n, i = this;
- n = this.isSimpleWidget ? {
- executeEditorCommand: function (e, n) {
- e.runCoreEditorCommand(t, n)
- }, paste: function (e, t, n, o, r) {
- i.trigger(e, w.Handler.Paste, {text: t, pasteOnNewLine: n, multicursorText: o, mode: r})
- }, type: function (e, t) {
- i.trigger(e, w.Handler.Type, {text: t})
- }, replacePreviousChar: function (e, t, n) {
- i.trigger(e, w.Handler.ReplacePreviousChar, {text: t, replaceCharCnt: n})
- }, compositionStart: function (e) {
- i.trigger(e, w.Handler.CompositionStart, void 0)
- }, compositionEnd: function (e) {
- i.trigger(e, w.Handler.CompositionEnd, void 0)
- }, cut: function (e) {
- i.trigger(e, w.Handler.Cut, void 0)
- }
- } : {
- executeEditorCommand: function (e, n) {
- e.runCoreEditorCommand(t, n)
- }, paste: function (e, t, n, o, r) {
- i._commandService.executeCommand(w.Handler.Paste, {
- text: t,
- pasteOnNewLine: n,
- multicursorText: o,
- mode: r
- })
- }, type: function (e, t) {
- i._commandService.executeCommand(w.Handler.Type, {text: t})
- }, replacePreviousChar: function (e, t, n) {
- i._commandService.executeCommand(w.Handler.ReplacePreviousChar, {text: t, replaceCharCnt: n})
- }, compositionStart: function (e) {
- i._commandService.executeCommand(w.Handler.CompositionStart, {})
- }, compositionEnd: function (e) {
- i._commandService.executeCommand(w.Handler.CompositionEnd, {})
- }, cut: function (e) {
- i._commandService.executeCommand(w.Handler.Cut, {})
- }
- };
- var o = new f.ViewOutgoingEvents(e);
- return o.onDidContentSizeChange = function (e) {
- return i._onDidContentSizeChange.fire(e)
- }, o.onDidScroll = function (e) {
- return i._onDidScrollChange.fire(e)
- }, o.onDidGainFocus = function () {
- return i._editorTextFocus.setValue(!0)
- }, o.onDidLoseFocus = function () {
- return i._editorTextFocus.setValue(!1)
- }, o.onContextMenu = function (e) {
- return i._onContextMenu.fire(e)
- }, o.onMouseDown = function (e) {
- return i._onMouseDown.fire(e)
- }, o.onMouseUp = function (e) {
- return i._onMouseUp.fire(e)
- }, o.onMouseDrag = function (e) {
- return i._onMouseDrag.fire(e)
- }, o.onMouseDrop = function (e) {
- return i._onMouseDrop.fire(e)
- }, o.onKeyUp = function (e) {
- return i._onKeyUp.fire(e)
- }, o.onMouseMove = function (e) {
- return i._onMouseMove.fire(e)
- }, o.onMouseLeave = function (e) {
- return i._onMouseLeave.fire(e)
- }, o.onMouseWheel = function (e) {
- return i._onMouseWheel.fire(e)
- }, o.onKeyDown = function (e) {
- return i._onKeyDown.fire(e)
- }, [new p.View(n, this._configuration, this._themeService, e, t, o), !0]
- }, t.prototype._postDetachModelCleanup = function (e) {
- e && e.removeAllDecorationsWithOwnerId(this._id)
- }, t.prototype._detachModel = function () {
- if (!this._modelData) return null;
- var e = this._modelData.model,
- t = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null;
- return this._modelData.dispose(), this._modelData = null, this._domElement.removeAttribute("data-mode-id"), t && this._domElement.removeChild(t), e
- }, t.prototype._removeDecorationType = function (e) {
- this._codeEditorService.removeDecorationType(e)
- }, t.prototype.hasModel = function () {
- return null !== this._modelData
- },t = h([g(3, k.IInstantiationService), g(4, c.ICodeEditorService), g(5, I.ICommandService), g(6, M.IContextKeyService), g(7, O.IThemeService), g(8, R.INotificationService), g(9, P.IAccessibilityService)], t)
- }(a.Disposable);
- t.CodeEditorWidget = z;
- var H = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._onDidChangeToTrue = t._register(new s.Emitter), t.onDidChangeToTrue = t._onDidChangeToTrue.event, t._onDidChangeToFalse = t._register(new s.Emitter), t.onDidChangeToFalse = t._onDidChangeToFalse.event, t._value = 0, t
- }
- return r(t, e), t.prototype.setValue = function (e) {
- var t = e ? 2 : 1;
- this._value !== t && (this._value = t, 2 === this._value ? this._onDidChangeToTrue.fire() : 1 === this._value && this._onDidChangeToFalse.fire())
- }, t
- }(a.Disposable);
- t.BooleanEventEmitter = H;
- var K = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i._editor = t, n.createKey("editorId", t.getId()), i._editorSimpleInput = E.EditorContextKeys.editorSimpleInput.bindTo(n), i._editorFocus = E.EditorContextKeys.focus.bindTo(n),
- i._textInputFocus = E.EditorContextKeys.textInputFocus.bindTo(n), i._editorTextFocus = E.EditorContextKeys.editorTextFocus.bindTo(n), i._editorTabMovesFocus = E.EditorContextKeys.tabMovesFocus.bindTo(n), i._editorReadonly = E.EditorContextKeys.readOnly.bindTo(n), i._hasMultipleSelections = E.EditorContextKeys.hasMultipleSelections.bindTo(n), i._hasNonEmptySelection = E.EditorContextKeys.hasNonEmptySelection.bindTo(n), i._canUndo = E.EditorContextKeys.canUndo.bindTo(n), i._canRedo = E.EditorContextKeys.canRedo.bindTo(n), i._register(i._editor.onDidChangeConfiguration((function () {
- return i._updateFromConfig()
- }))), i._register(i._editor.onDidChangeCursorSelection((function () {
- return i._updateFromSelection()
- }))), i._register(i._editor.onDidFocusEditorWidget((function () {
- return i._updateFromFocus()
- }))), i._register(i._editor.onDidBlurEditorWidget((function () {
- return i._updateFromFocus()
- }))), i._register(i._editor.onDidFocusEditorText((function () {
- return i._updateFromFocus()
- }))), i._register(i._editor.onDidBlurEditorText((function () {
- return i._updateFromFocus()
- }))), i._register(i._editor.onDidChangeModel((function () {
- return i._updateFromModel()
- }))), i._register(i._editor.onDidChangeConfiguration((function () {
- return i._updateFromModel()
- }))), i._updateFromConfig(), i._updateFromSelection(), i._updateFromFocus(), i._updateFromModel(), i._editorSimpleInput.set(i._editor.isSimpleWidget), i
- }
- return r(t, e), t.prototype._updateFromConfig = function () {
- var e = this._editor.getOptions();
- this._editorTabMovesFocus.set(e.get(106)), this._editorReadonly.set(e.get(68))
- }, t.prototype._updateFromSelection = function () {
- var e = this._editor.getSelections();
- e ? (this._hasMultipleSelections.set(e.length > 1), this._hasNonEmptySelection.set(e.some((function (e) {
- return !e.isEmpty()
- })))) : (this._hasMultipleSelections.reset(), this._hasNonEmptySelection.reset())
- }, t.prototype._updateFromFocus = function () {
- this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget), this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget),
- this._textInputFocus.set(this._editor.hasTextFocus())
- }, t.prototype._updateFromModel = function () {
- var e = this._editor.getModel();
- this._canUndo.set(Boolean(e && e.canUndo())), this._canRedo.set(Boolean(e && e.canRedo()))
- }, t
- }(a.Disposable), U = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- i._editor = t, i._contextKeyService = n, i._langId = E.EditorContextKeys.languageId.bindTo(n), i._hasCompletionItemProvider = E.EditorContextKeys.hasCompletionItemProvider.bindTo(n), i._hasCodeActionsProvider = E.EditorContextKeys.hasCodeActionsProvider.bindTo(n), i._hasCodeLensProvider = E.EditorContextKeys.hasCodeLensProvider.bindTo(n), i._hasDefinitionProvider = E.EditorContextKeys.hasDefinitionProvider.bindTo(n), i._hasDeclarationProvider = E.EditorContextKeys.hasDeclarationProvider.bindTo(n), i._hasImplementationProvider = E.EditorContextKeys.hasImplementationProvider.bindTo(n), i._hasTypeDefinitionProvider = E.EditorContextKeys.hasTypeDefinitionProvider.bindTo(n), i._hasHoverProvider = E.EditorContextKeys.hasHoverProvider.bindTo(n),
- i._hasDocumentHighlightProvider = E.EditorContextKeys.hasDocumentHighlightProvider.bindTo(n), i._hasDocumentSymbolProvider = E.EditorContextKeys.hasDocumentSymbolProvider.bindTo(n), i._hasReferenceProvider = E.EditorContextKeys.hasReferenceProvider.bindTo(n), i._hasRenameProvider = E.EditorContextKeys.hasRenameProvider.bindTo(n), i._hasSignatureHelpProvider = E.EditorContextKeys.hasSignatureHelpProvider.bindTo(n), i._hasDocumentFormattingProvider = E.EditorContextKeys.hasDocumentFormattingProvider.bindTo(n), i._hasDocumentSelectionFormattingProvider = E.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(n), i._hasMultipleDocumentFormattingProvider = E.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(n), i._hasMultipleDocumentSelectionFormattingProvider = E.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(n), i._isInWalkThrough = E.EditorContextKeys.isInEmbeddedEditor.bindTo(n);
- var o = function () {
- return i._update()
- };
- return i._register(t.onDidChangeModel(o)),
- i._register(t.onDidChangeModelLanguage(o)), i._register(L.CompletionProviderRegistry.onDidChange(o)), i._register(L.CodeActionProviderRegistry.onDidChange(o)), i._register(L.CodeLensProviderRegistry.onDidChange(o)), i._register(L.DefinitionProviderRegistry.onDidChange(o)), i._register(L.DeclarationProviderRegistry.onDidChange(o)), i._register(L.ImplementationProviderRegistry.onDidChange(o)), i._register(L.TypeDefinitionProviderRegistry.onDidChange(o)), i._register(L.HoverProviderRegistry.onDidChange(o)), i._register(L.DocumentHighlightProviderRegistry.onDidChange(o)), i._register(L.DocumentSymbolProviderRegistry.onDidChange(o)), i._register(L.ReferenceProviderRegistry.onDidChange(o)), i._register(L.RenameProviderRegistry.onDidChange(o)), i._register(L.DocumentFormattingEditProviderRegistry.onDidChange(o)), i._register(L.DocumentRangeFormattingEditProviderRegistry.onDidChange(o)), i._register(L.SignatureHelpProviderRegistry.onDidChange(o)), o(), i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- },
- t.prototype.reset = function () {
- var e = this;
- this._contextKeyService.bufferChangeEvents((function () {
- e._langId.reset(), e._hasCompletionItemProvider.reset(), e._hasCodeActionsProvider.reset(), e._hasCodeLensProvider.reset(), e._hasDefinitionProvider.reset(), e._hasDeclarationProvider.reset(), e._hasImplementationProvider.reset(), e._hasTypeDefinitionProvider.reset(), e._hasHoverProvider.reset(), e._hasDocumentHighlightProvider.reset(), e._hasDocumentSymbolProvider.reset(), e._hasReferenceProvider.reset(), e._hasRenameProvider.reset(), e._hasDocumentFormattingProvider.reset(), e._hasDocumentSelectionFormattingProvider.reset(), e._hasSignatureHelpProvider.reset(), e._isInWalkThrough.reset()
- }))
- }, t.prototype._update = function () {
- var e = this, t = this._editor.getModel();
- t ? this._contextKeyService.bufferChangeEvents((function () {
- e._langId.set(t.getLanguageIdentifier().language), e._hasCompletionItemProvider.set(L.CompletionProviderRegistry.has(t)), e._hasCodeActionsProvider.set(L.CodeActionProviderRegistry.has(t)),
- e._hasCodeLensProvider.set(L.CodeLensProviderRegistry.has(t)), e._hasDefinitionProvider.set(L.DefinitionProviderRegistry.has(t)), e._hasDeclarationProvider.set(L.DeclarationProviderRegistry.has(t)), e._hasImplementationProvider.set(L.ImplementationProviderRegistry.has(t)), e._hasTypeDefinitionProvider.set(L.TypeDefinitionProviderRegistry.has(t)), e._hasHoverProvider.set(L.HoverProviderRegistry.has(t)), e._hasDocumentHighlightProvider.set(L.DocumentHighlightProviderRegistry.has(t)), e._hasDocumentSymbolProvider.set(L.DocumentSymbolProviderRegistry.has(t)), e._hasReferenceProvider.set(L.ReferenceProviderRegistry.has(t)), e._hasRenameProvider.set(L.RenameProviderRegistry.has(t)), e._hasSignatureHelpProvider.set(L.SignatureHelpProviderRegistry.has(t)), e._hasDocumentFormattingProvider.set(L.DocumentFormattingEditProviderRegistry.has(t) || L.DocumentRangeFormattingEditProviderRegistry.has(t)), e._hasDocumentSelectionFormattingProvider.set(L.DocumentRangeFormattingEditProviderRegistry.has(t)),
- e._hasMultipleDocumentFormattingProvider.set(L.DocumentFormattingEditProviderRegistry.all(t).length + L.DocumentRangeFormattingEditProviderRegistry.all(t).length > 1), e._hasMultipleDocumentSelectionFormattingProvider.set(L.DocumentRangeFormattingEditProviderRegistry.all(t).length > 1), e._isInWalkThrough.set(t.uri.scheme === l.Schemas.walkThroughSnippet)
- })) : this.reset()
- }, t
- }(a.Disposable);
- t.EditorModeContext = U;
- var j = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._onChange = n._register(new s.Emitter), n.onChange = n._onChange.event, n._hasFocus = !1, n._domFocusTracker = n._register(i.trackFocus(t)), n._register(n._domFocusTracker.onDidFocus((function () {
- n._hasFocus = !0, n._onChange.fire(void 0)
- }))), n._register(n._domFocusTracker.onDidBlur((function () {
- n._hasFocus = !1, n._onChange.fire(void 0)
- }))), n
- }
- return r(t, e), t.prototype.hasFocus = function () {
- return this._hasFocus
- }, t
- }(a.Disposable),
- q = encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),
- G = encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");
- function Y(e) {
- return q + encodeURIComponent(e.toString()) + G
- }
- var Z = encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),
- $ = encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');
- O.registerThemingParticipant((function (e, t) {
- var n = e.getColor(N.editorErrorBorder);
- n && t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double " + n + "; }");
- var i = e.getColor(N.editorErrorForeground);
- i && t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,' + Y(i) + '") repeat-x bottom left; }');
- var o = e.getColor(N.editorWarningBorder)
- ;o && t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double " + o + "; }");
- var r = e.getColor(N.editorWarningForeground);
- r && t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,' + Y(r) + '") repeat-x bottom left; }');
- var s = e.getColor(N.editorInfoBorder);
- s && t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double " + s + "; }");
- var a = e.getColor(N.editorInfoForeground);
- a && t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,' + Y(a) + '") repeat-x bottom left; }');
- var l = e.getColor(N.editorHintBorder);
- l && t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted " + l + "; }");
- var u = e.getColor(N.editorHintForeground);
- u && t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,' + (Z + encodeURIComponent(u.toString()) + $) + '") no-repeat bottom left; }');
- var d = e.getColor(D.editorUnnecessaryCodeOpacity);
- d && t.addRule(".monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: " + d.rgba.a + "; }")
- ;var c = e.getColor(D.editorUnnecessaryCodeBorder);
- c && t.addRule(".monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed " + c + "; }");
- var h = e.getColor(N.editorForeground) || "inherit";
- t.addRule(".monaco-editor .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: " + h + "}")
- }))
- })), define(n[564], i([0, 1, 419, 6, 28, 70, 53, 55, 2, 60, 12, 32, 33, 93, 13, 44, 110, 69, 18, 20, 14, 300]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var S = function () {
- function e(e, t, n, i) {
- this.originalLineStart = e, this.originalLineEnd = t, this.modifiedLineStart = n, this.modifiedLineEnd = i
- }
- return e.prototype.getType = function () {
- return 0 === this.originalLineStart ? 1 : 0 === this.modifiedLineStart ? 2 : 0
- }, e
- }(), w = function (e) {
- this.entries = e
- }, E = function (e) {
- function t(t) {
- var r = e.call(this) || this;
- return r._width = 0, r._diffEditor = t, r._isVisible = !1, r.shadow = o.createFastDomNode(document.createElement("div")), r.shadow.setClassName("diff-review-shadow"),
- r.actionBarContainer = o.createFastDomNode(document.createElement("div")), r.actionBarContainer.setClassName("diff-review-actions"), r._actionBar = r._register(new s.ActionBar(r.actionBarContainer.domNode)), r._actionBar.push(new l.Action("diffreview.close", n.localize(0, null), "close-diff-review", !0, (function () {
- return r.hide(), Promise.resolve(null)
- })), {
- label: !1,
- icon: !0
- }), r.domNode = o.createFastDomNode(document.createElement("div")), r.domNode.setClassName("diff-review monaco-editor-background"), r._content = o.createFastDomNode(document.createElement("div")), r._content.setClassName("diff-review-content"), r.scrollbar = r._register(new a.DomScrollableElement(r._content.domNode, {})), r.domNode.domNode.appendChild(r.scrollbar.getDomNode()), r._register(t.onDidUpdateDiff((function () {
- r._isVisible && (r._diffs = r._compute(), r._render())
- }))), r._register(t.getModifiedEditor().onDidChangeCursorPosition((function () {
- r._isVisible && r._render()
- }))), r._register(t.getOriginalEditor().onDidFocusEditorWidget((function () {
- r._isVisible && r.hide()
- }))),
- r._register(t.getModifiedEditor().onDidFocusEditorWidget((function () {
- r._isVisible && r.hide()
- }))), r._register(i.addStandardDisposableListener(r.domNode.domNode, "click", (function (e) {
- e.preventDefault();
- var t = i.findParentWithClass(e.target, "diff-review-row");
- t && r._goToRow(t)
- }))), r._register(i.addStandardDisposableListener(r.domNode.domNode, "keydown", (function (e) {
- (e.equals(18) || e.equals(2066) || e.equals(530)) && (e.preventDefault(), r._goToRow(r._getNextRow())), (e.equals(16) || e.equals(2064) || e.equals(528)) && (e.preventDefault(), r._goToRow(r._getPrevRow())), (e.equals(9) || e.equals(2057) || e.equals(521) || e.equals(1033)) && (e.preventDefault(), r.hide()), (e.equals(10) || e.equals(3)) && (e.preventDefault(), r.accept())
- }))), r._diffs = [], r._currentDiff = null, r
- }
- return r(t, e), t.prototype.prev = function () {
- var e = 0;
- if (this._isVisible || (this._diffs = this._compute()), this._isVisible) {
- for (var t = -1, n = 0, i = this._diffs.length; n < i; n++) if (this._diffs[n] === this._currentDiff) {
- t = n;
- break
- }
- e = this._diffs.length + t - 1
- } else e = this._findDiffIndex(this._diffEditor.getPosition());
- 0 !== this._diffs.length && (e %= this._diffs.length, this._diffEditor.setPosition(new f.Position(this._diffs[e].entries[0].modifiedLineStart, 1)), this._isVisible = !0, this._diffEditor.doLayout(), this._render(), this._goToRow(this._getNextRow()))
- }, t.prototype.next = function () {
- var e = 0;
- if (this._isVisible || (this._diffs = this._compute()), this._isVisible) {
- for (var t = -1, n = 0, i = this._diffs.length; n < i; n++) if (this._diffs[n] === this._currentDiff) {
- t = n;
- break
- }
- e = t + 1
- } else e = this._findDiffIndex(this._diffEditor.getPosition());
- 0 !== this._diffs.length && (e %= this._diffs.length, this._diffEditor.setPosition(new f.Position(this._diffs[e].entries[0].modifiedLineStart, 1)), this._isVisible = !0, this._diffEditor.doLayout(), this._render(), this._goToRow(this._getNextRow()))
- }, t.prototype.accept = function () {
- var e = -1, t = this._getCurrentFocusedRow();
- if (t) {
- var n = parseInt(t.getAttribute("data-line"), 10);
- isNaN(n) || (e = n)
- }
- this.hide(), -1 !== e && (this._diffEditor.setPosition(new f.Position(e, 1)),
- this._diffEditor.revealPosition(new f.Position(e, 1), 1))
- }, t.prototype.hide = function () {
- this._isVisible = !1, this._diffEditor.focus(), this._diffEditor.doLayout(), this._render()
- }, t.prototype._getPrevRow = function () {
- var e = this._getCurrentFocusedRow();
- return e ? e.previousElementSibling ? e.previousElementSibling : e : this._getFirstRow()
- }, t.prototype._getNextRow = function () {
- var e = this._getCurrentFocusedRow();
- return e ? e.nextElementSibling ? e.nextElementSibling : e : this._getFirstRow()
- }, t.prototype._getFirstRow = function () {
- return this.domNode.domNode.querySelector(".diff-review-row")
- }, t.prototype._getCurrentFocusedRow = function () {
- var e = document.activeElement;
- return e && /diff-review-row/.test(e.className) ? e : null
- }, t.prototype._goToRow = function (e) {
- var t = this._getCurrentFocusedRow();
- e.tabIndex = 0, e.focus(), t && t !== e && (t.tabIndex = -1), this.scrollbar.scanDomNode()
- }, t.prototype.isVisible = function () {
- return this._isVisible
- }, t.prototype.layout = function (e, t, n) {
- this._width = t, this.shadow.setTop(e - 6), this.shadow.setWidth(t),
- this.shadow.setHeight(this._isVisible ? 6 : 0), this.domNode.setTop(e), this.domNode.setWidth(t), this.domNode.setHeight(n), this._content.setHeight(n), this._content.setWidth(t), this._isVisible ? (this.actionBarContainer.setAttribute("aria-hidden", "false"), this.actionBarContainer.setDisplay("block")) : (this.actionBarContainer.setAttribute("aria-hidden", "true"), this.actionBarContainer.setDisplay("none"))
- }, t.prototype._compute = function () {
- var e = this._diffEditor.getLineChanges();
- if (!e || 0 === e.length) return [];
- var n = this._diffEditor.getOriginalEditor().getModel(),
- i = this._diffEditor.getModifiedEditor().getModel();
- return n && i ? t._mergeAdjacent(e, n.getLineCount(), i.getLineCount()) : []
- }, t._mergeAdjacent = function (e, t, n) {
- if (!e || 0 === e.length) return [];
- for (var i = [], o = 0, r = 0, s = e.length; r < s; r++) {
- var a = e[r], l = a.originalStartLineNumber, u = a.originalEndLineNumber,
- d = a.modifiedStartLineNumber, c = a.modifiedEndLineNumber, h = [], p = 0,
- g = 0 === u ? l : l - 1, f = 0 === c ? d : d - 1, m = 1, v = 1;
- if (r > 0) {
- var _ = e[r - 1]
- ;m = 0 === _.originalEndLineNumber ? _.originalStartLineNumber + 1 : _.originalEndLineNumber + 1, v = 0 === _.modifiedEndLineNumber ? _.modifiedStartLineNumber + 1 : _.modifiedEndLineNumber + 1
- }
- var y = g - 3 + 1, C = f - 3 + 1;
- if (y < m) y += x = m - y, C += x;
- if (C < v) y += x = v - C, C += x;
- h[p++] = new S(y, g, C, f), 0 !== u && (h[p++] = new S(l, u, 0, 0)), 0 !== c && (h[p++] = new S(0, 0, d, c));
- var b = 0 === u ? l + 1 : u + 1, E = 0 === c ? d + 1 : c + 1, L = t, D = n;
- if (r + 1 < s) {
- var N = e[r + 1];
- L = 0 === N.originalEndLineNumber ? N.originalStartLineNumber : N.originalStartLineNumber - 1, D = 0 === N.modifiedEndLineNumber ? N.modifiedStartLineNumber : N.modifiedStartLineNumber - 1
- }
- var x, I = b + 3 - 1, M = E + 3 - 1;
- if (I > L) I += x = L - I, M += x;
- if (M > D) I += x = D - M, M += x;
- h[p++] = new S(b, I, E, M), i[o++] = new w(h)
- }
- var k = i[0].entries, T = [], R = 0;
- for (r = 1, s = i.length; r < s; r++) {
- var O = i[r].entries, P = k[k.length - 1], A = O[0];
- 0 === P.getType() && 0 === A.getType() && A.originalLineStart <= P.originalLineEnd ? (k[k.length - 1] = new S(P.originalLineStart, A.originalLineEnd, P.modifiedLineStart, A.modifiedLineEnd), k = k.concat(O.slice(1))) : (T[R++] = new w(k), k = O)
- }
- return T[R++] = new w(k), T
- },
- t.prototype._findDiffIndex = function (e) {
- for (var t = e.lineNumber, n = 0, i = this._diffs.length; n < i; n++) {
- var o = this._diffs[n].entries;
- if (t <= o[o.length - 1].modifiedLineEnd) return n
- }
- return 0
- }, t.prototype._render = function () {
- var e = this._diffEditor.getOriginalEditor().getOptions(),
- o = this._diffEditor.getModifiedEditor().getOptions(),
- r = this._diffEditor.getOriginalEditor().getModel(),
- s = this._diffEditor.getModifiedEditor().getModel(), a = r.getOptions(), l = s.getOptions();
- if (!this._isVisible || !r || !s) return i.clearNode(this._content.domNode), this._currentDiff = null, void this.scrollbar.scanDomNode();
- var u = this._findDiffIndex(this._diffEditor.getPosition());
- if (this._diffs[u] !== this._currentDiff) {
- this._currentDiff = this._diffs[u];
- var c = this._diffs[u].entries, h = document.createElement("div");
- h.className = "diff-review-table", h.setAttribute("role", "list"), d.Configuration.applyFontInfoSlow(h, o.get(34));
- for (var p = 0, g = 0, f = 0, m = 0, v = 0, _ = c.length; v < _; v++) {
- var y = (k = c[v]).originalLineStart, C = k.originalLineEnd, b = k.modifiedLineStart,
- S = k.modifiedLineEnd
- ;0 !== y && (0 === p || y < p) && (p = y), 0 !== C && (0 === g || C > g) && (g = C), 0 !== b && (0 === f || b < f) && (f = b), 0 !== S && (0 === m || S > m) && (m = S)
- }
- var w = document.createElement("div");
- w.className = "diff-review-row";
- var E = document.createElement("div");
- E.className = "diff-review-cell diff-review-summary";
- var L = g - p + 1, D = m - f + 1;
- E.appendChild(document.createTextNode(u + 1 + "/" + this._diffs.length + ": @@ -" + p + "," + L + " +" + f + "," + D + " @@")), w.setAttribute("data-line", String(f));
- var N = function (e) {
- return 0 === e ? n.localize(1, null) : 1 === e ? n.localize(2, null) : n.localize(3, null, e)
- }, x = N(L), I = N(D);
- w.setAttribute("aria-label", n.localize(4, null, u + 1, this._diffs.length, p, x, f, I)), w.appendChild(E), w.setAttribute("role", "listitem"), h.appendChild(w);
- var M = f;
- for (v = 0, _ = c.length; v < _; v++) {
- var k = c[v];
- t._renderSection(h, k, M, this._width, e, r, a, o, s, l), 0 !== k.modifiedLineStart && (M = k.modifiedLineEnd)
- }
- i.clearNode(this._content.domNode), this._content.domNode.appendChild(h), this.scrollbar.scanDomNode()
- }
- }, t._renderSection = function (e, t, i, o, r, s, a, l, u, d) {
- var c = t.getType(), h = "diff-review-row", p = "", g = "diff-review-spacer";
- switch (c) {
- case 1:
- h = "diff-review-row line-insert", p = " char-insert", g = "diff-review-spacer insert-sign";
- break;
- case 2:
- h = "diff-review-row line-delete", p = " char-delete", g = "diff-review-spacer delete-sign"
- }
- for (var f = t.originalLineStart, m = t.originalLineEnd, v = t.modifiedLineStart, _ = t.modifiedLineEnd, y = Math.max(_ - v, m - f), C = r.get(107), b = C.glyphMarginWidth + C.lineNumbersWidth, S = l.get(107), w = 10 + S.glyphMarginWidth + S.lineNumbersWidth, E = 0; E <= y; E++) {
- var L = 0 === f ? 0 : f + E, D = 0 === v ? 0 : v + E, N = document.createElement("div");
- N.style.minWidth = o + "px", N.className = h, N.setAttribute("role", "listitem"), 0 !== D && (i = D), N.setAttribute("data-line", String(i));
- var x = document.createElement("div");
- x.className = "diff-review-cell", N.appendChild(x);
- var I = document.createElement("span");
- I.style.width = b + "px", I.style.minWidth = b + "px", I.className = "diff-review-line-number" + p, 0 !== L ? I.appendChild(document.createTextNode(String(L))) : I.innerHTML = " ", x.appendChild(I);
- var M = document.createElement("span")
- ;M.style.width = w + "px", M.style.minWidth = w + "px", M.style.paddingRight = "10px", M.className = "diff-review-line-number" + p, 0 !== D ? M.appendChild(document.createTextNode(String(D))) : M.innerHTML = " ", x.appendChild(M);
- var k = document.createElement("span");
- k.className = g, k.innerHTML = "  ", x.appendChild(k);
- var T = void 0;
- 0 !== D ? (x.insertAdjacentHTML("beforeend", this._renderLine(u, l, d.tabSize, D)), T = u.getLineContent(D)) : (x.insertAdjacentHTML("beforeend", this._renderLine(s, r, a.tabSize, L)), T = s.getLineContent(L)), 0 === T.length && (T = n.localize(5, null));
- var R = "";
- switch (c) {
- case 0:
- R = n.localize(6, null, L, D, T);
- break;
- case 1:
- R = n.localize(7, null, D, T);
- break;
- case 2:
- R = n.localize(8, null, L, T)
- }
- N.setAttribute("aria-label", R), e.appendChild(N)
- }
- }, t._renderLine = function (e, t, n, i) {
- var o = e.getLineContent(i), r = t.get(34), s = new Uint32Array(2);
- s[0] = o.length, s[1] = 16793600;
- var a = new g.LineTokens(s, o),
- l = _.ViewLineRenderingData.isBasicASCII(o, e.mightContainNonBasicASCII()),
- u = _.ViewLineRenderingData.containsRTL(o, l, e.mightContainRTL())
- ;
- return v.renderViewLine2(new v.RenderLineInput(r.isMonospace && !t.get(23), r.canUseHalfwidthRightwardsArrow, o, !1, l, u, 0, a, [], n, 0, r.spaceWidth, r.middotWidth, t.get(88), t.get(74), t.get(69), t.get(35) !== p.EditorFontLigatures.OFF, null)).html
- }, t
- }(u.Disposable);
- t.DiffReview = E, b.registerThemingParticipant((function (e, t) {
- var n = e.getColor(m.editorLineNumbers);
- n && t.addRule(".monaco-diff-editor .diff-review-line-number { color: " + n + "; }");
- var i = e.getColor(C.scrollbarShadow);
- i && t.addRule(".monaco-diff-editor .diff-review-shadow { box-shadow: " + i + " 0 -6px 6px -6px inset; }")
- }));
- var L = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.diffReview.next",
- label: n.localize(9, null),
- alias: "Go to Next Difference",
- precondition: y.ContextKeyExpr.has("isInDiffEditor"),
- kbOpts: {kbExpr: null, primary: 65, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = N(e);
- n && n.diffReviewNext()
- }, t
- }(c.EditorAction), D = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.diffReview.prev",
- label: n.localize(10, null),
- alias: "Go to Previous Difference",
- precondition: y.ContextKeyExpr.has("isInDiffEditor"),
- kbOpts: {kbExpr: null, primary: 1089, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = N(e);
- n && n.diffReviewPrev()
- }, t
- }(c.EditorAction);
- function N(e) {
- for (var t = e.get(h.ICodeEditorService).listDiffEditors(), n = 0, i = t.length; n < i; n++) {
- var o = t[n];
- if (o.hasWidgetFocus()) return o
- }
- return null
- }
- c.registerEditorAction(L), c.registerEditorAction(D)
- })), define(n[230], i([0, 1, 418, 6, 28, 104, 15, 4, 2, 31, 60, 67, 32, 121, 564, 33, 3, 106, 68, 30, 62, 193, 148, 110, 69, 18, 11, 115, 35, 20, 14, 66, 421, 12, 10, 73, 185, 299]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W, B) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var V = function () {
- function e(e, t) {
- this._contextMenuService = e, this._clipboardService = t, this._zones = [], this.inlineDiffMargins = [], this._zonesMap = {}, this._decorations = []
- }
- return e.prototype.getForeignViewZones = function (e) {
- var t = this;
- return e.filter((function (e) {
- return !t._zonesMap[String(e.id)]
- }))
- },
- e.prototype.clean = function (e) {
- var t = this;
- this._zones.length > 0 && e.changeViewZones((function (e) {
- for (var n = 0, i = t._zones.length; n < i; n++) e.removeZone(t._zones[n])
- })), this._zones = [], this._zonesMap = {}, this._decorations = e.deltaDecorations(this._decorations, [])
- }, e.prototype.apply = function (e, t, n, i) {
- var o = this, r = i ? p.StableEditorScrollState.capture(e) : null;
- e.changeViewZones((function (t) {
- for (var i = 0, r = o._zones.length; i < r; i++) t.removeZone(o._zones[i]);
- i = 0;
- for (var s = o.inlineDiffMargins.length; i < s; i++) o.inlineDiffMargins[i].dispose();
- o._zones = [], o._zonesMap = {}, o.inlineDiffMargins = [];
- i = 0;
- for (var a = n.zones.length; i < a; i++) {
- var l = n.zones[i];
- l.suppressMouseDown = !0;
- var u = t.addZone(l);
- o._zones.push(u), o._zonesMap[String(u)] = !0, n.zones[i].diff && l.marginDomNode && o._clipboardService && (l.suppressMouseDown = !1, o.inlineDiffMargins.push(new P.InlineDiffMargin(u, l.marginDomNode, e, n.zones[i].diff, o._contextMenuService, o._clipboardService)))
- }
- })), r && r.restore(e), this._decorations = e.deltaDecorations(this._decorations, n.decorations),
- t && t.setZones(n.overviewZones)
- }, e
- }(), z = 0, H = function (e) {
- function t(n, r, s, u, d, c, h, p, g, f, m) {
- var _ = e.call(this) || this;
- _._editorProgressService = m, _._onDidDispose = _._register(new l.Emitter), _.onDidDispose = _._onDidDispose.event, _._onDidUpdateDiff = _._register(new l.Emitter), _.onDidUpdateDiff = _._onDidUpdateDiff.event, _._lastOriginalWarning = null, _._lastModifiedWarning = null, _._editorWorkerService = u, _._codeEditorService = h, _._contextKeyService = _._register(d.createScoped(n)), _._contextKeyService.createKey("isInDiffEditor", !0), _._themeService = p, _._notificationService = g, _.id = ++z, _._state = 0, _._updatingDiffProgress = null, _._domElement = n, r = r || {}, _._renderSideBySide = !0, void 0 !== r.renderSideBySide && (_._renderSideBySide = r.renderSideBySide), _._maxComputationTime = 5e3, void 0 !== r.maxComputationTime && (_._maxComputationTime = r.maxComputationTime), _._ignoreTrimWhitespace = !0, void 0 !== r.ignoreTrimWhitespace && (_._ignoreTrimWhitespace = r.ignoreTrimWhitespace), _._renderIndicators = !0,
- void 0 !== r.renderIndicators && (_._renderIndicators = r.renderIndicators), _._originalIsEditable = !1, void 0 !== r.originalEditable && (_._originalIsEditable = Boolean(r.originalEditable)), _._updateDecorationsRunner = _._register(new a.RunOnceScheduler((function () {
- return _._updateDecorations()
- }), 0)), _._containerDomElement = document.createElement("div"), _._containerDomElement.className = t._getClassName(_._themeService.getTheme(), _._renderSideBySide), _._containerDomElement.style.position = "relative", _._containerDomElement.style.height = "100%", _._domElement.appendChild(_._containerDomElement), _._overviewViewportDomElement = o.createFastDomNode(document.createElement("div")), _._overviewViewportDomElement.setClassName("diffViewport"), _._overviewViewportDomElement.setPosition("absolute"), _._overviewDomElement = document.createElement("div"), _._overviewDomElement.className = "diffOverview", _._overviewDomElement.style.position = "absolute", _._overviewDomElement.appendChild(_._overviewViewportDomElement.domNode),
- _._register(i.addStandardDisposableListener(_._overviewDomElement, "mousedown", (function (e) {
- _.modifiedEditor.delegateVerticalScrollbarMouseDown(e)
- }))), _._containerDomElement.appendChild(_._overviewDomElement), _._originalDomNode = document.createElement("div"), _._originalDomNode.className = "editor original", _._originalDomNode.style.position = "absolute", _._originalDomNode.style.height = "100%", _._containerDomElement.appendChild(_._originalDomNode), _._modifiedDomNode = document.createElement("div"), _._modifiedDomNode.className = "editor modified", _._modifiedDomNode.style.position = "absolute", _._modifiedDomNode.style.height = "100%", _._containerDomElement.appendChild(_._modifiedDomNode), _._beginUpdateDecorationsTimeout = -1, _._currentlyChangingViewZones = !1, _._diffComputationToken = 0, _._originalEditorState = new V(f, s), _._modifiedEditorState = new V(f, s), _._isVisible = !0, _._isHandlingScrollEvent = !1, _._elementSizeObserver = _._register(new B.ElementSizeObserver(_._containerDomElement, void 0, (function () {
- return _._onDidContainerSizeChanged()
- }))), r.automaticLayout && _._elementSizeObserver.startObserving(), _._diffComputationResult = null;
- var y = _._contextKeyService.createScoped();
- y.createKey("isInDiffLeftEditor", !0);
- var C = new M.ServiceCollection;
- C.set(x.IContextKeyService, y);
- var b = c.createChild(C), S = _._contextKeyService.createScoped();
- S.createKey("isInDiffRightEditor", !0);
- var w = new M.ServiceCollection;
- w.set(x.IContextKeyService, S);
- var E = c.createChild(w);
- _.originalEditor = _._createLeftHandSideEditor(r, b), _.modifiedEditor = _._createRightHandSideEditor(r, E), _._originalOverviewRuler = null, _._modifiedOverviewRuler = null, _._reviewPane = new v.DiffReview(_), _._containerDomElement.appendChild(_._reviewPane.domNode.domNode), _._containerDomElement.appendChild(_._reviewPane.shadow.domNode), _._containerDomElement.appendChild(_._reviewPane.actionBarContainer.domNode), _._enableSplitViewResizing = !0, void 0 !== r.enableSplitViewResizing && (_._enableSplitViewResizing = r.enableSplitViewResizing),
- _._renderSideBySide ? _._setStrategy(new Y(_._createDataSource(), _._enableSplitViewResizing)) : _._setStrategy(new $(_._createDataSource(), _._enableSplitViewResizing)), _._register(p.onThemeChange((function (e) {
- _._strategy && _._strategy.applyColors(e) && _._updateDecorationsRunner.schedule(), _._containerDomElement.className = t._getClassName(_._themeService.getTheme(), _._renderSideBySide)
- })));
- for (var L = 0, D = A.EditorExtensionsRegistry.getDiffEditorContributions(); L < D.length; L++) {
- var N = D[L];
- try {
- _._register(c.createInstance(N.ctor, _))
- } catch (e) {
- F.onUnexpectedError(e)
- }
- }
- return _._codeEditorService.addDiffEditor(_), _
- }
- return r(t, e), t.prototype._setState = function (e) {
- this._state !== e && (this._state = e, this._updatingDiffProgress && (this._updatingDiffProgress.done(), this._updatingDiffProgress = null), 1 === this._state && (this._updatingDiffProgress = this._editorProgressService.show(!0, 1e3)))
- }, t.prototype.hasWidgetFocus = function () {
- return i.isAncestor(document.activeElement, this._domElement)
- }, t.prototype.diffReviewNext = function () {
- this._reviewPane.next()
- }, t.prototype.diffReviewPrev = function () {
- this._reviewPane.prev()
- }, t._getClassName = function (e, t) {
- var n = "monaco-diff-editor monaco-editor-background ";
- return t && (n += "side-by-side "), n += R.getThemeTypeSelector(e.type)
- }, t.prototype._recreateOverviewRulers = function () {
- this._originalOverviewRuler && (this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()), this._originalOverviewRuler.dispose()), this.originalEditor.hasModel() && (this._originalOverviewRuler = this.originalEditor.createOverviewRuler("original diffOverviewRuler"), this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())), this._modifiedOverviewRuler && (this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()), this._modifiedOverviewRuler.dispose()), this.modifiedEditor.hasModel() && (this._modifiedOverviewRuler = this.modifiedEditor.createOverviewRuler("modified diffOverviewRuler"), this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),
- this._layoutOverviewRulers()
- }, t.prototype._createLeftHandSideEditor = function (e, t) {
- var n = this,
- i = this._createInnerEditor(t, this._originalDomNode, this._adjustOptionsForLeftHandSide(e, this._originalIsEditable));
- return this._register(i.onDidScrollChange((function (e) {
- n._isHandlingScrollEvent || (e.scrollTopChanged || e.scrollLeftChanged || e.scrollHeightChanged) && (n._isHandlingScrollEvent = !0, n.modifiedEditor.setScrollPosition({
- scrollLeft: e.scrollLeft,
- scrollTop: e.scrollTop
- }), n._isHandlingScrollEvent = !1, n._layoutOverviewViewport())
- }))), this._register(i.onDidChangeViewZones((function () {
- n._onViewZonesChanged()
- }))), this._register(i.onDidChangeModelContent((function () {
- n._isVisible && n._beginUpdateDecorationsSoon()
- }))), i
- }, t.prototype._createRightHandSideEditor = function (e, t) {
- var n = this,
- i = this._createInnerEditor(t, this._modifiedDomNode, this._adjustOptionsForRightHandSide(e));
- return this._register(i.onDidScrollChange((function (e) {
- n._isHandlingScrollEvent || (e.scrollTopChanged || e.scrollLeftChanged || e.scrollHeightChanged) && (n._isHandlingScrollEvent = !0, n.originalEditor.setScrollPosition({
- scrollLeft: e.scrollLeft,
- scrollTop: e.scrollTop
- }), n._isHandlingScrollEvent = !1, n._layoutOverviewViewport())
- }))), this._register(i.onDidChangeViewZones((function () {
- n._onViewZonesChanged()
- }))), this._register(i.onDidChangeConfiguration((function (e) {
- e.hasChanged(34) && i.getModel() && n._onViewZonesChanged()
- }))), this._register(i.onDidChangeModelContent((function () {
- n._isVisible && n._beginUpdateDecorationsSoon()
- }))), this._register(i.onDidChangeModelOptions((function (e) {
- e.tabSize && n._updateDecorationsRunner.schedule()
- }))), i
- }, t.prototype._createInnerEditor = function (e, t, n) {
- return e.createInstance(m.CodeEditorWidget, t, n, {})
- }, t.prototype.dispose = function () {
- this._codeEditorService.removeDiffEditor(this), -1 !== this._beginUpdateDecorationsTimeout && (window.clearTimeout(this._beginUpdateDecorationsTimeout), this._beginUpdateDecorationsTimeout = -1),
- this._cleanViewZonesAndDecorations(), this._originalOverviewRuler && (this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()), this._originalOverviewRuler.dispose()), this._modifiedOverviewRuler && (this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()), this._modifiedOverviewRuler.dispose()), this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode), this._containerDomElement.removeChild(this._overviewDomElement), this._containerDomElement.removeChild(this._originalDomNode), this.originalEditor.dispose(), this._containerDomElement.removeChild(this._modifiedDomNode), this.modifiedEditor.dispose(), this._strategy.dispose(), this._containerDomElement.removeChild(this._reviewPane.domNode.domNode), this._containerDomElement.removeChild(this._reviewPane.shadow.domNode), this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode), this._reviewPane.dispose(), this._domElement.removeChild(this._containerDomElement), this._onDidDispose.fire(),
- e.prototype.dispose.call(this)
- }, t.prototype.getId = function () {
- return this.getEditorType() + ":" + this.id
- }, t.prototype.getEditorType = function () {
- return b.EditorType.IDiffEditor
- }, t.prototype.getLineChanges = function () {
- return this._diffComputationResult ? this._diffComputationResult.changes : null
- }, t.prototype.getOriginalEditor = function () {
- return this.originalEditor
- }, t.prototype.getModifiedEditor = function () {
- return this.modifiedEditor
- }, t.prototype.updateOptions = function (e) {
- var n = !1;
- void 0 !== e.renderSideBySide && this._renderSideBySide !== e.renderSideBySide && (this._renderSideBySide = e.renderSideBySide, n = !0), void 0 !== e.maxComputationTime && (this._maxComputationTime = e.maxComputationTime, this._isVisible && this._beginUpdateDecorationsSoon());
- var i = !1;
- void 0 !== e.ignoreTrimWhitespace && this._ignoreTrimWhitespace !== e.ignoreTrimWhitespace && (this._ignoreTrimWhitespace = e.ignoreTrimWhitespace, i = !0), void 0 !== e.renderIndicators && this._renderIndicators !== e.renderIndicators && (this._renderIndicators = e.renderIndicators, i = !0),
- i && this._beginUpdateDecorations(), void 0 !== e.originalEditable && (this._originalIsEditable = Boolean(e.originalEditable)), this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)), this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e, this._originalIsEditable)), void 0 !== e.enableSplitViewResizing && (this._enableSplitViewResizing = e.enableSplitViewResizing), this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing), n && (this._renderSideBySide ? this._setStrategy(new Y(this._createDataSource(), this._enableSplitViewResizing)) : this._setStrategy(new $(this._createDataSource(), this._enableSplitViewResizing)), this._containerDomElement.className = t._getClassName(this._themeService.getTheme(), this._renderSideBySide))
- }, t.prototype.getModel = function () {
- return {original: this.originalEditor.getModel(), modified: this.modifiedEditor.getModel()}
- }, t.prototype.setModel = function (e) {
- if (e && (!e.original || !e.modified)) throw new Error(e.original ? "DiffEditorWidget.setModel: Modified model is null" : "DiffEditorWidget.setModel: Original model is null");
- this._cleanViewZonesAndDecorations(), this.originalEditor.setModel(e ? e.original : null), this.modifiedEditor.setModel(e ? e.modified : null), this._updateDecorationsRunner.cancel(), e && (this.originalEditor.setScrollTop(0), this.modifiedEditor.setScrollTop(0)), this._diffComputationResult = null, this._diffComputationToken++, this._setState(0), e && (this._recreateOverviewRulers(), this._beginUpdateDecorations()), this._layoutOverviewViewport()
- }, t.prototype.getDomNode = function () {
- return this._domElement
- }, t.prototype.getVisibleColumnFromPosition = function (e) {
- return this.modifiedEditor.getVisibleColumnFromPosition(e)
- }, t.prototype.getPosition = function () {
- return this.modifiedEditor.getPosition()
- }, t.prototype.setPosition = function (e) {
- this.modifiedEditor.setPosition(e)
- }, t.prototype.revealLine = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealLine(e, t)
- },
- t.prototype.revealLineInCenter = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealLineInCenter(e, t)
- }, t.prototype.revealLineInCenterIfOutsideViewport = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealLineInCenterIfOutsideViewport(e, t)
- }, t.prototype.revealPosition = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealPosition(e, t)
- }, t.prototype.revealPositionInCenter = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealPositionInCenter(e, t)
- }, t.prototype.revealPositionInCenterIfOutsideViewport = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e, t)
- }, t.prototype.getSelection = function () {
- return this.modifiedEditor.getSelection()
- }, t.prototype.getSelections = function () {
- return this.modifiedEditor.getSelections()
- }, t.prototype.setSelection = function (e) {
- this.modifiedEditor.setSelection(e)
- }, t.prototype.setSelections = function (e) {
- this.modifiedEditor.setSelections(e)
- }, t.prototype.revealLines = function (e, t, n) {
- void 0 === n && (n = 0), this.modifiedEditor.revealLines(e, t, n)
- },
- t.prototype.revealLinesInCenter = function (e, t, n) {
- void 0 === n && (n = 0), this.modifiedEditor.revealLinesInCenter(e, t, n)
- }, t.prototype.revealLinesInCenterIfOutsideViewport = function (e, t, n) {
- void 0 === n && (n = 0), this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e, t, n)
- }, t.prototype.revealRange = function (e, t, n, i) {
- void 0 === t && (t = 0), void 0 === n && (n = !1), void 0 === i && (i = !0), this.modifiedEditor.revealRange(e, t, n, i)
- }, t.prototype.revealRangeInCenter = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealRangeInCenter(e, t)
- }, t.prototype.revealRangeInCenterIfOutsideViewport = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e, t)
- }, t.prototype.revealRangeAtTop = function (e, t) {
- void 0 === t && (t = 0), this.modifiedEditor.revealRangeAtTop(e, t)
- }, t.prototype.getSupportedActions = function () {
- return this.modifiedEditor.getSupportedActions()
- }, t.prototype.saveViewState = function () {
- return {original: this.originalEditor.saveViewState(), modified: this.modifiedEditor.saveViewState()}
- },
- t.prototype.restoreViewState = function (e) {
- if (e.original && e.modified) {
- var t = e;
- this.originalEditor.restoreViewState(t.original), this.modifiedEditor.restoreViewState(t.modified)
- }
- }, t.prototype.layout = function (e) {
- this._elementSizeObserver.observe(e)
- }, t.prototype.focus = function () {
- this.modifiedEditor.focus()
- }, t.prototype.hasTextFocus = function () {
- return this.originalEditor.hasTextFocus() || this.modifiedEditor.hasTextFocus()
- }, t.prototype.trigger = function (e, t, n) {
- this.modifiedEditor.trigger(e, t, n)
- }, t.prototype.changeDecorations = function (e) {
- return this.modifiedEditor.changeDecorations(e)
- }, t.prototype._onDidContainerSizeChanged = function () {
- this._doLayout()
- }, t.prototype._getReviewHeight = function () {
- return this._reviewPane.isVisible() ? this._elementSizeObserver.getHeight() : 0
- }, t.prototype._layoutOverviewRulers = function () {
- if (this._originalOverviewRuler && this._modifiedOverviewRuler) {
- var e = this._elementSizeObserver.getHeight(), n = this._getReviewHeight(),
- i = t.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * t.ONE_OVERVIEW_WIDTH
- ;this.modifiedEditor.getLayoutInfo() && (this._originalOverviewRuler.setLayout({
- top: 0,
- width: t.ONE_OVERVIEW_WIDTH,
- right: i + t.ONE_OVERVIEW_WIDTH,
- height: e - n
- }), this._modifiedOverviewRuler.setLayout({
- top: 0,
- right: 0,
- width: t.ONE_OVERVIEW_WIDTH,
- height: e - n
- }))
- }
- }, t.prototype._onViewZonesChanged = function () {
- this._currentlyChangingViewZones || this._updateDecorationsRunner.schedule()
- }, t.prototype._beginUpdateDecorationsSoon = function () {
- var e = this;
- -1 !== this._beginUpdateDecorationsTimeout && (window.clearTimeout(this._beginUpdateDecorationsTimeout), this._beginUpdateDecorationsTimeout = -1), this._beginUpdateDecorationsTimeout = window.setTimeout((function () {
- return e._beginUpdateDecorations()
- }), t.UPDATE_DIFF_DECORATIONS_DELAY)
- }, t._equals = function (e, t) {
- return !e && !t || !(!e || !t) && e.toString() === t.toString()
- }, t.prototype._beginUpdateDecorations = function () {
- var e = this;
- this._beginUpdateDecorationsTimeout = -1;
- var i = this.originalEditor.getModel(), o = this.modifiedEditor.getModel();
- if (i && o) {
- this._diffComputationToken++;
- var r = this._diffComputationToken
- ;this._setState(1), this._editorWorkerService.canComputeDiff(i.uri, o.uri) ? this._editorWorkerService.computeDiff(i.uri, o.uri, this._ignoreTrimWhitespace, this._maxComputationTime).then((function (t) {
- r === e._diffComputationToken && i === e.originalEditor.getModel() && o === e.modifiedEditor.getModel() && (e._setState(2), e._diffComputationResult = t, e._updateDecorationsRunner.schedule(), e._onDidUpdateDiff.fire())
- }), (function (t) {
- r === e._diffComputationToken && i === e.originalEditor.getModel() && o === e.modifiedEditor.getModel() && (e._setState(2), e._diffComputationResult = null, e._updateDecorationsRunner.schedule())
- })) : t._equals(i.uri, this._lastOriginalWarning) && t._equals(o.uri, this._lastModifiedWarning) || (this._lastOriginalWarning = i.uri, this._lastModifiedWarning = o.uri, this._notificationService.warn(n.localize(0, null)))
- }
- }, t.prototype._cleanViewZonesAndDecorations = function () {
- this._originalEditorState.clean(this.originalEditor), this._modifiedEditorState.clean(this.modifiedEditor)
- }, t.prototype._updateDecorations = function () {
- if (this.originalEditor.getModel() && this.modifiedEditor.getModel() && this._originalOverviewRuler && this._modifiedOverviewRuler) {
- var e = this._diffComputationResult ? this._diffComputationResult.changes : [],
- t = this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),
- n = this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),
- i = this._strategy.getEditorsDiffDecorations(e, this._ignoreTrimWhitespace, this._renderIndicators, t, n, this.originalEditor, this.modifiedEditor);
- try {
- this._currentlyChangingViewZones = !0, this._originalEditorState.apply(this.originalEditor, this._originalOverviewRuler, i.original, !1), this._modifiedEditorState.apply(this.modifiedEditor, this._modifiedOverviewRuler, i.modified, !0)
- } finally {
- this._currentlyChangingViewZones = !1
- }
- }
- }, t.prototype._adjustOptionsForSubEditor = function (e) {
- var t = d.deepClone(e || {});
- return t.inDiffEditor = !0, t.wordWrap = "off", t.wordWrapMinified = !1, t.automaticLayout = !1, t.scrollbar = t.scrollbar || {}, t.scrollbar.vertical = "visible", t.folding = !1,
- t.codeLens = !1, t.fixedOverflowWidgets = !0, t.minimap || (t.minimap = {}), t.minimap.enabled = !1, t
- }, t.prototype._adjustOptionsForLeftHandSide = function (e, t) {
- var n = this._adjustOptionsForSubEditor(e);
- return n.readOnly = !t, n.extraEditorClassName = "original-in-monaco-diff-editor", n
- }, t.prototype._adjustOptionsForRightHandSide = function (e) {
- var n = this._adjustOptionsForSubEditor(e);
- return n.revealHorizontalRightPadding = _.EditorOptions.revealHorizontalRightPadding.defaultValue + t.ENTIRE_DIFF_OVERVIEW_WIDTH, n.scrollbar.verticalHasArrows = !1, n.extraEditorClassName = "modified-in-monaco-diff-editor", n
- }, t.prototype.doLayout = function () {
- this._elementSizeObserver.observe(), this._doLayout()
- }, t.prototype._doLayout = function () {
- var e = this._elementSizeObserver.getWidth(), n = this._elementSizeObserver.getHeight(),
- i = this._getReviewHeight(), o = this._strategy.layout();
- this._originalDomNode.style.width = o + "px", this._originalDomNode.style.left = "0px", this._modifiedDomNode.style.width = e - o + "px", this._modifiedDomNode.style.left = o + "px",
- this._overviewDomElement.style.top = "0px", this._overviewDomElement.style.height = n - i + "px", this._overviewDomElement.style.width = t.ENTIRE_DIFF_OVERVIEW_WIDTH + "px", this._overviewDomElement.style.left = e - t.ENTIRE_DIFF_OVERVIEW_WIDTH + "px", this._overviewViewportDomElement.setWidth(t.ENTIRE_DIFF_OVERVIEW_WIDTH), this._overviewViewportDomElement.setHeight(30), this.originalEditor.layout({
- width: o,
- height: n - i
- }), this.modifiedEditor.layout({
- width: e - o - t.ENTIRE_DIFF_OVERVIEW_WIDTH,
- height: n - i
- }), (this._originalOverviewRuler || this._modifiedOverviewRuler) && this._layoutOverviewRulers(), this._reviewPane.layout(n - i, e, i), this._layoutOverviewViewport()
- }, t.prototype._layoutOverviewViewport = function () {
- var e = this._computeOverviewViewport();
- e ? (this._overviewViewportDomElement.setTop(e.top), this._overviewViewportDomElement.setHeight(e.height)) : (this._overviewViewportDomElement.setTop(0), this._overviewViewportDomElement.setHeight(0))
- }, t.prototype._computeOverviewViewport = function () {
- var e = this.modifiedEditor.getLayoutInfo();
- if (!e) return null
- ;
- var t = this.modifiedEditor.getScrollTop(), n = this.modifiedEditor.getScrollHeight(),
- i = Math.max(0, e.height), o = Math.max(0, i - 0), r = n > 0 ? o / n : 0;
- return {height: Math.max(0, Math.floor(e.height * r)), top: Math.floor(t * r)}
- }, t.prototype._createDataSource = function () {
- var e = this;
- return {
- getWidth: function () {
- return e._elementSizeObserver.getWidth()
- }, getHeight: function () {
- return e._elementSizeObserver.getHeight() - e._getReviewHeight()
- }, getContainerDomNode: function () {
- return e._containerDomElement
- }, relayoutEditors: function () {
- e._doLayout()
- }, getOriginalEditor: function () {
- return e.originalEditor
- }, getModifiedEditor: function () {
- return e.modifiedEditor
- }
- }
- }, t.prototype._setStrategy = function (e) {
- this._strategy && this._strategy.dispose(), this._strategy = e, e.applyColors(this._themeService.getTheme()), this._diffComputationResult && this._updateDecorations(), this._doLayout()
- }, t.prototype._getLineChangeAtOrBeforeLineNumber = function (e, t) {
- var n = this._diffComputationResult ? this._diffComputationResult.changes : [];
- if (0 === n.length || e < t(n[0])) return null
- ;
- for (var i = 0, o = n.length - 1; i < o;) {
- var r = Math.floor((i + o) / 2), s = t(n[r]), a = r + 1 <= o ? t(n[r + 1]) : 1073741824;
- e < s ? o = r - 1 : e >= a ? i = r + 1 : (i = r, o = r)
- }
- return n[i]
- }, t.prototype._getEquivalentLineForOriginalLineNumber = function (e) {
- var t = this._getLineChangeAtOrBeforeLineNumber(e, (function (e) {
- return e.originalStartLineNumber
- }));
- if (!t) return e;
- var n = t.originalStartLineNumber + (t.originalEndLineNumber > 0 ? -1 : 0),
- i = t.modifiedStartLineNumber + (t.modifiedEndLineNumber > 0 ? -1 : 0),
- o = t.originalEndLineNumber > 0 ? t.originalEndLineNumber - t.originalStartLineNumber + 1 : 0,
- r = t.modifiedEndLineNumber > 0 ? t.modifiedEndLineNumber - t.modifiedStartLineNumber + 1 : 0,
- s = e - n;
- return s <= o ? i + Math.min(s, r) : i + r - o + s
- }, t.prototype._getEquivalentLineForModifiedLineNumber = function (e) {
- var t = this._getLineChangeAtOrBeforeLineNumber(e, (function (e) {
- return e.modifiedStartLineNumber
- }));
- if (!t) return e
- ;
- var n = t.originalStartLineNumber + (t.originalEndLineNumber > 0 ? -1 : 0),
- i = t.modifiedStartLineNumber + (t.modifiedEndLineNumber > 0 ? -1 : 0),
- o = t.originalEndLineNumber > 0 ? t.originalEndLineNumber - t.originalStartLineNumber + 1 : 0,
- r = t.modifiedEndLineNumber > 0 ? t.modifiedEndLineNumber - t.modifiedStartLineNumber + 1 : 0,
- s = e - i;
- return s <= r ? n + Math.min(s, o) : n + o - r + s
- }, t.prototype.getDiffLineInformationForOriginal = function (e) {
- return this._diffComputationResult ? {equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(e)} : null
- }, t.prototype.getDiffLineInformationForModified = function (e) {
- return this._diffComputationResult ? {equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(e)} : null
- }, t.ONE_OVERVIEW_WIDTH = 15, t.ENTIRE_DIFF_OVERVIEW_WIDTH = 30, t.UPDATE_DIFF_DECORATIONS_DELAY = 200, t = h([g(3, w.IEditorWorkerService), g(4, x.IContextKeyService), g(5, I.IInstantiationService), g(6, f.ICodeEditorService), g(7, R.IThemeService), g(8, k.INotificationService), g(9, O.IContextMenuService), g(10, W.IEditorProgressService)], t)
- }(u.Disposable)
- ;t.DiffEditorWidget = H;
- var K = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._dataSource = t, n._insertColor = null, n._removeColor = null, n
- }
- return r(t, e), t.prototype.applyColors = function (e) {
- var t = (e.getColor(T.diffInserted) || T.defaultInsertColor).transparent(2),
- n = (e.getColor(T.diffRemoved) || T.defaultRemoveColor).transparent(2),
- i = !t.equals(this._insertColor) || !n.equals(this._removeColor);
- return this._insertColor = t, this._removeColor = n, i
- }, t.prototype.getEditorsDiffDecorations = function (e, t, n, i, o, r, s) {
- o = o.sort((function (e, t) {
- return e.afterLineNumber - t.afterLineNumber
- })), i = i.sort((function (e, t) {
- return e.afterLineNumber - t.afterLineNumber
- }));
- var a = this._getViewZones(e, i, o, r, s, n), l = this._getOriginalEditorDecorations(e, t, n, r, s),
- u = this._getModifiedEditorDecorations(e, t, n, r, s);
- return {
- original: {decorations: l.decorations, overviewZones: l.overviewZones, zones: a.original},
- modified: {decorations: u.decorations, overviewZones: u.overviewZones, zones: a.modified}
- }
- }, t
- }(u.Disposable), U = function () {
- function e(e) {
- this._source = e,
- this._index = -1, this.current = null, this.advance()
- }
- return e.prototype.advance = function () {
- this._index++, this._index < this._source.length ? this.current = this._source[this._index] : this.current = null
- }, e
- }(), j = function () {
- function e(e, t, n, i, o) {
- this.lineChanges = e, this.originalForeignVZ = t, this.originalLineHeight = n, this.modifiedForeignVZ = i, this.modifiedLineHeight = o
- }
- return e.prototype.getViewZones = function () {
- for (var t = [], n = [], i = 0, o = 0, r = 0, s = 0, a = 0, l = 0, u = function (e, t) {
- return e.afterLineNumber - t.afterLineNumber
- }, d = function (e, t) {
- if (null === t.domNode && e.length > 0) {
- var n = e[e.length - 1];
- if (n.afterLineNumber === t.afterLineNumber && null === n.domNode) return void (n.heightInLines += t.heightInLines)
- }
- e.push(t)
- }, c = new U(this.modifiedForeignVZ), h = new U(this.originalForeignVZ), p = 0, g = this.lineChanges.length; p <= g; p++) {
- var f = p < g ? this.lineChanges[p] : null;
- null !== f ? (r = f.originalStartLineNumber + (f.originalEndLineNumber > 0 ? -1 : 0), s = f.modifiedStartLineNumber + (f.modifiedEndLineNumber > 0 ? -1 : 0),
- o = f.originalEndLineNumber > 0 ? f.originalEndLineNumber - f.originalStartLineNumber + 1 : 0, i = f.modifiedEndLineNumber > 0 ? f.modifiedEndLineNumber - f.modifiedStartLineNumber + 1 : 0, a = Math.max(f.originalStartLineNumber, f.originalEndLineNumber), l = Math.max(f.modifiedStartLineNumber, f.modifiedEndLineNumber)) : (a = r += 1e7 + o, l = s += 1e7 + i);
- for (var m, v = [], _ = []; c.current && c.current.afterLineNumber <= l;) {
- var y = void 0;
- y = c.current.afterLineNumber <= s ? r - s + c.current.afterLineNumber : a;
- var C = null;
- f && f.modifiedStartLineNumber <= c.current.afterLineNumber && c.current.afterLineNumber <= f.modifiedEndLineNumber && (C = this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()), v.push({
- afterLineNumber: y,
- heightInLines: c.current.height / this.modifiedLineHeight,
- domNode: null,
- marginDomNode: C
- }), c.advance()
- }
- for (; h.current && h.current.afterLineNumber <= a;) {
- y = void 0;
- y = h.current.afterLineNumber <= r ? s - r + h.current.afterLineNumber : l, _.push({
- afterLineNumber: y,
- heightInLines: h.current.height / this.originalLineHeight,
- domNode: null
- }), h.advance()
- }
- if (null !== f && Q(f)) (m = this._produceOriginalFromDiff(f, o, i)) && v.push(m);
- if (null !== f && J(f)) (m = this._produceModifiedFromDiff(f, o, i)) && _.push(m);
- var b = 0, S = 0;
- for (v = v.sort(u), _ = _.sort(u); b < v.length && S < _.length;) {
- var w = v[b], E = _[S], L = w.afterLineNumber - r, D = E.afterLineNumber - s;
- L < D ? (d(t, w), b++) : D < L ? (d(n, E), S++) : w.shouldNotShrink ? (d(t, w), b++) : E.shouldNotShrink ? (d(n, E), S++) : w.heightInLines >= E.heightInLines ? (w.heightInLines -= E.heightInLines, S++) : (E.heightInLines -= w.heightInLines, b++)
- }
- for (; b < v.length;) d(t, v[b]), b++;
- for (; S < _.length;) d(n, _[S]), S++
- }
- return {original: e._ensureDomNodes(t), modified: e._ensureDomNodes(n)}
- }, e._ensureDomNodes = function (e) {
- return e.map((function (e) {
- var t;
- return e.domNode || (e.domNode = ((t = document.createElement("div")).className = "diagonal-fill", t)), e
- }))
- }, e
- }();
- function q(e, t, n, i, o) {
- return {range: new y.Range(e, t, n, i), options: o}
- }
- var G = {
- charDelete: S.ModelDecorationOptions.register({className: "char-delete"}),
- charDeleteWholeLine: S.ModelDecorationOptions.register({className: "char-delete", isWholeLine: !0}),
- charInsert: S.ModelDecorationOptions.register({className: "char-insert"}),
- charInsertWholeLine: S.ModelDecorationOptions.register({className: "char-insert", isWholeLine: !0}),
- lineInsert: S.ModelDecorationOptions.register({
- className: "line-insert",
- marginClassName: "line-insert",
- isWholeLine: !0
- }),
- lineInsertWithSign: S.ModelDecorationOptions.register({
- className: "line-insert",
- linesDecorationsClassName: "insert-sign codicon codicon-add",
- marginClassName: "line-insert",
- isWholeLine: !0
- }),
- lineDelete: S.ModelDecorationOptions.register({
- className: "line-delete",
- marginClassName: "line-delete",
- isWholeLine: !0
- }),
- lineDeleteWithSign: S.ModelDecorationOptions.register({
- className: "line-delete",
- linesDecorationsClassName: "delete-sign codicon codicon-remove",
- marginClassName: "line-delete",
- isWholeLine: !0
- }),
- lineDeleteMargin: S.ModelDecorationOptions.register({marginClassName: "line-delete"})
- }, Y = function (e) {
- function t(t, n) {
- var i = e.call(this, t) || this;
- return i._disableSash = !1 === n, i._sashRatio = null, i._sashPosition = null, i._startSashPosition = null,
- i._sash = i._register(new s.Sash(i._dataSource.getContainerDomNode(), i)), i._disableSash && (i._sash.state = 0), i._sash.onDidStart((function () {
- return i.onSashDragStart()
- })), i._sash.onDidChange((function (e) {
- return i.onSashDrag(e)
- })), i._sash.onDidEnd((function () {
- return i.onSashDragEnd()
- })), i._sash.onDidReset((function () {
- return i.onSashReset()
- })), i
- }
- return r(t, e), t.prototype.setEnableSplitViewResizing = function (e) {
- var t = !1 === e;
- this._disableSash !== t && (this._disableSash = t, this._sash.state = this._disableSash ? 0 : 3)
- }, t.prototype.layout = function (e) {
- void 0 === e && (e = this._sashRatio);
- var n = this._dataSource.getWidth() - H.ENTIRE_DIFF_OVERVIEW_WIDTH, i = Math.floor((e || .5) * n),
- o = Math.floor(.5 * n);
- return i = this._disableSash ? o : i || o, n > 2 * t.MINIMUM_EDITOR_WIDTH ? (i < t.MINIMUM_EDITOR_WIDTH && (i = t.MINIMUM_EDITOR_WIDTH), i > n - t.MINIMUM_EDITOR_WIDTH && (i = n - t.MINIMUM_EDITOR_WIDTH)) : i = o, this._sashPosition !== i && (this._sashPosition = i, this._sash.layout()), this._sashPosition
- }, t.prototype.onSashDragStart = function () {
- this._startSashPosition = this._sashPosition
- },
- t.prototype.onSashDrag = function (e) {
- var t = this._dataSource.getWidth() - H.ENTIRE_DIFF_OVERVIEW_WIDTH,
- n = this.layout((this._startSashPosition + (e.currentX - e.startX)) / t);
- this._sashRatio = n / t, this._dataSource.relayoutEditors()
- }, t.prototype.onSashDragEnd = function () {
- this._sash.layout()
- }, t.prototype.onSashReset = function () {
- this._sashRatio = .5, this._dataSource.relayoutEditors(), this._sash.layout()
- }, t.prototype.getVerticalSashTop = function (e) {
- return 0
- }, t.prototype.getVerticalSashLeft = function (e) {
- return this._sashPosition
- }, t.prototype.getVerticalSashHeight = function (e) {
- return this._dataSource.getHeight()
- }, t.prototype._getViewZones = function (e, t, n, i, o) {
- return new Z(e, t, i.getOption(49), n, o.getOption(49)).getViewZones()
- }, t.prototype._getOriginalEditorDecorations = function (e, t, n, i, o) {
- for (var r = String(this._removeColor), s = {
- decorations: [],
- overviewZones: []
- }, a = i.getModel(), l = 0, u = e.length; l < u; l++) {
- var d = e[l];
- if (J(d) && (s.decorations.push({
- range: new y.Range(d.originalStartLineNumber, 1, d.originalEndLineNumber, 1073741824),
- options: n ? G.lineDeleteWithSign : G.lineDelete
- }), Q(d) && d.charChanges || s.decorations.push(q(d.originalStartLineNumber, 1, d.originalEndLineNumber, 1073741824, G.charDeleteWholeLine)), s.overviewZones.push(new E.OverviewRulerZone(d.originalStartLineNumber, d.originalEndLineNumber, r)), d.charChanges)) for (var c = 0, h = d.charChanges.length; c < h; c++) {
- var p = d.charChanges[c];
- if (J(p)) if (t) for (var g = p.originalStartLineNumber; g <= p.originalEndLineNumber; g++) {
- var f = void 0, m = void 0;
- f = g === p.originalStartLineNumber ? p.originalStartColumn : a.getLineFirstNonWhitespaceColumn(g), m = g === p.originalEndLineNumber ? p.originalEndColumn : a.getLineLastNonWhitespaceColumn(g), s.decorations.push(q(g, f, g, m, G.charDelete))
- } else s.decorations.push(q(p.originalStartLineNumber, p.originalStartColumn, p.originalEndLineNumber, p.originalEndColumn, G.charDelete))
- }
- }
- return s
- }, t.prototype._getModifiedEditorDecorations = function (e, t, n, i, o) {
- for (var r = String(this._insertColor), s = {
- decorations: [],
- overviewZones: []
- }, a = o.getModel(), l = 0, u = e.length; l < u; l++) {
- var d = e[l]
- ;
- if (Q(d) && (s.decorations.push({
- range: new y.Range(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824),
- options: n ? G.lineInsertWithSign : G.lineInsert
- }), J(d) && d.charChanges || s.decorations.push(q(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824, G.charInsertWholeLine)), s.overviewZones.push(new E.OverviewRulerZone(d.modifiedStartLineNumber, d.modifiedEndLineNumber, r)), d.charChanges)) for (var c = 0, h = d.charChanges.length; c < h; c++) {
- var p = d.charChanges[c];
- if (Q(p)) if (t) for (var g = p.modifiedStartLineNumber; g <= p.modifiedEndLineNumber; g++) {
- var f = void 0, m = void 0;
- f = g === p.modifiedStartLineNumber ? p.modifiedStartColumn : a.getLineFirstNonWhitespaceColumn(g), m = g === p.modifiedEndLineNumber ? p.modifiedEndColumn : a.getLineLastNonWhitespaceColumn(g), s.decorations.push(q(g, f, g, m, G.charInsert))
- } else s.decorations.push(q(p.modifiedStartLineNumber, p.modifiedStartColumn, p.modifiedEndLineNumber, p.modifiedEndColumn, G.charInsert))
- }
- }
- return s
- }, t.MINIMUM_EDITOR_WIDTH = 100, t
- }(K), Z = function (e) {
- function t(t, n, i, o, r) {
- return e.call(this, t, n, i, o, r) || this
- }
- return r(t, e), t.prototype._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion = function () {
- return null
- }, t.prototype._produceOriginalFromDiff = function (e, t, n) {
- return n > t ? {
- afterLineNumber: Math.max(e.originalStartLineNumber, e.originalEndLineNumber),
- heightInLines: n - t,
- domNode: null
- } : null
- }, t.prototype._produceModifiedFromDiff = function (e, t, n) {
- return t > n ? {
- afterLineNumber: Math.max(e.modifiedStartLineNumber, e.modifiedEndLineNumber),
- heightInLines: t - n,
- domNode: null
- } : null
- }, t
- }(j), $ = function (e) {
- function t(t, n) {
- var i = e.call(this, t) || this;
- return i.decorationsLeft = t.getOriginalEditor().getLayoutInfo().decorationsLeft, i._register(t.getOriginalEditor().onDidLayoutChange((function (e) {
- i.decorationsLeft !== e.decorationsLeft && (i.decorationsLeft = e.decorationsLeft, t.relayoutEditors())
- }))), i
- }
- return r(t, e), t.prototype.setEnableSplitViewResizing = function (e) {
- }, t.prototype._getViewZones = function (e, t, n, i, o, r) {
- return new X(e, t, n, i, o, r).getViewZones()
- },
- t.prototype._getOriginalEditorDecorations = function (e, t, n, i, o) {
- for (var r = String(this._removeColor), s = {
- decorations: [],
- overviewZones: []
- }, a = 0, l = e.length; a < l; a++) {
- var u = e[a];
- J(u) && (s.decorations.push({
- range: new y.Range(u.originalStartLineNumber, 1, u.originalEndLineNumber, 1073741824),
- options: G.lineDeleteMargin
- }), s.overviewZones.push(new E.OverviewRulerZone(u.originalStartLineNumber, u.originalEndLineNumber, r)))
- }
- return s
- }, t.prototype._getModifiedEditorDecorations = function (e, t, n, i, o) {
- for (var r = String(this._insertColor), s = {
- decorations: [],
- overviewZones: []
- }, a = o.getModel(), l = 0, u = e.length; l < u; l++) {
- var d = e[l];
- if (Q(d)) if (s.decorations.push({
- range: new y.Range(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824),
- options: n ? G.lineInsertWithSign : G.lineInsert
- }), s.overviewZones.push(new E.OverviewRulerZone(d.modifiedStartLineNumber, d.modifiedEndLineNumber, r)), d.charChanges) for (var c = 0, h = d.charChanges.length; c < h; c++) {
- var p = d.charChanges[c];
- if (Q(p)) if (t) for (var g = p.modifiedStartLineNumber; g <= p.modifiedEndLineNumber; g++) {
- var f = void 0, m = void 0;
- f = g === p.modifiedStartLineNumber ? p.modifiedStartColumn : a.getLineFirstNonWhitespaceColumn(g), m = g === p.modifiedEndLineNumber ? p.modifiedEndColumn : a.getLineLastNonWhitespaceColumn(g), s.decorations.push(q(g, f, g, m, G.charInsert))
- } else s.decorations.push(q(p.modifiedStartLineNumber, p.modifiedStartColumn, p.modifiedEndLineNumber, p.modifiedEndColumn, G.charInsert))
- } else s.decorations.push(q(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824, G.charInsertWholeLine))
- }
- return s
- }, t.prototype.layout = function () {
- return Math.max(5, this.decorationsLeft)
- }, t
- }(K), X = function (e) {
- function t(t, n, i, o, r, s) {
- var a = e.call(this, t, n, o.getOption(49), i, r.getOption(49)) || this;
- return a.originalModel = o.getModel(), a.modifiedEditorOptions = r.getOptions(), a.modifiedEditorTabSize = r.getModel().getOptions().tabSize, a.renderIndicators = s, a
- }
- return r(t, e), t.prototype._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion = function () {
- var e = document.createElement("div")
- ;
- return e.className = "inline-added-margin-view-zone", e
- }, t.prototype._produceOriginalFromDiff = function (e, t, n) {
- var i = document.createElement("div");
- return i.className = "inline-added-margin-view-zone", {
- afterLineNumber: Math.max(e.originalStartLineNumber, e.originalEndLineNumber),
- heightInLines: n,
- domNode: document.createElement("div"),
- marginDomNode: i
- }
- }, t.prototype._produceModifiedFromDiff = function (e, t, n) {
- var i = [];
- if (e.charChanges) for (var o = 0, r = e.charChanges.length; o < r; o++) {
- var s = e.charChanges[o];
- J(s) && i.push(new N.InlineDecoration(new y.Range(s.originalStartLineNumber, s.originalStartColumn, s.originalEndLineNumber, s.originalEndColumn), "char-delete", 0))
- }
- for (var a = C.createStringBuilder(1e4), l = [], u = this.modifiedEditorOptions.get(107), d = this.modifiedEditorOptions.get(34), h = u.decorationsWidth, p = this.modifiedEditorOptions.get(49), g = d.typicalHalfwidthCharacterWidth, f = 0, m = [], v = e.originalStartLineNumber; v <= e.originalEndLineNumber; v++) if (f = Math.max(f, this._renderOriginalLine(v - e.originalStartLineNumber, this.originalModel, this.modifiedEditorOptions, this.modifiedEditorTabSize, v, i, a)), m.push(this.originalModel.getLineContent(v)), this.renderIndicators) {
- var _ = v - e.originalStartLineNumber;
- l = l.concat(['<div class="delete-sign codicon codicon-remove" style="position:absolute;top:' + _ * p + "px;width:" + h + "px;height:" + p + 'px;right:0;"></div>'])
- }
- f += this.modifiedEditorOptions.get(79);
- var b = document.createElement("div");
- b.className = "view-lines line-delete", b.innerHTML = a.build(), c.Configuration.applyFontInfoSlow(b, d);
- var S = document.createElement("div");
- return S.className = "inline-deleted-margin-view-zone", S.innerHTML = l.join(""), c.Configuration.applyFontInfoSlow(S, d), {
- shouldNotShrink: !0,
- afterLineNumber: 0 === e.modifiedEndLineNumber ? e.modifiedStartLineNumber : e.modifiedStartLineNumber - 1,
- heightInLines: t,
- minWidthInPx: f * g,
- domNode: b,
- marginDomNode: S,
- diff: {
- originalStartLineNumber: e.originalStartLineNumber,
- originalEndLineNumber: e.originalEndLineNumber,
- modifiedStartLineNumber: e.modifiedStartLineNumber,
- modifiedEndLineNumber: e.modifiedEndLineNumber,
- originalContent: m
- }
- }
- }, t.prototype._renderOriginalLine = function (e, t, n, i, o, r, s) {
- var a = t.getLineTokens(o), l = a.getLineContent(), u = n.get(34),
- d = L.LineDecoration.filter(r, o, 1, l.length + 1);
- s.appendASCIIString('<div class="view-line'), 0 === r.length && s.appendASCIIString(" char-delete"), s.appendASCIIString('" style="top:'), s.appendASCIIString(String(e * n.get(49))), s.appendASCIIString('px;width:1000000px;">')
- ;var c = N.ViewLineRenderingData.isBasicASCII(l, t.mightContainNonBasicASCII()),
- h = N.ViewLineRenderingData.containsRTL(l, c, t.mightContainRTL()),
- p = D.renderViewLine(new D.RenderLineInput(u.isMonospace && !n.get(23), u.canUseHalfwidthRightwardsArrow, l, !1, c, h, 0, a, d, i, 0, u.spaceWidth, u.middotWidth, n.get(88), n.get(74), n.get(69), n.get(35) !== _.EditorFontLigatures.OFF, null), s);
- s.appendASCIIString("</div>");
- var g = p.characterMapping.getAbsoluteOffsets();
- return g.length > 0 ? g[g.length - 1] : 0
- }, t
- }(j);
- function Q(e) {
- return e.modifiedEndLineNumber > 0
- }
- function J(e) {
- return e.originalEndLineNumber > 0
- }
- R.registerThemingParticipant((function (e, t) {
- var n = e.getColor(T.diffInserted);
- n && (t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: " + n + "; }"), t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: " + n + "; }"), t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: " + n + "; }"));
- var i = e.getColor(T.diffRemoved)
- ;i && (t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: " + i + "; }"), t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: " + i + "; }"), t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: " + i + "; }"));
- var o = e.getColor(T.diffInsertedOutline);
- o && t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + o + "; }");
- var r = e.getColor(T.diffRemovedOutline);
- r && t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + r + "; }");
- var s = e.getColor(T.scrollbarShadow);
- s && t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px " + s + "; }");
- var a = e.getColor(T.diffBorder);
- a && t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid " + a + "; }")
- }))
- })), define(n[167], i([0, 1, 31, 32, 121, 29, 18, 11, 35, 14, 64]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var p = function (e) {
- function t(t, n, i, o, r, s, a, l, u, d) {
- var c = e.call(this, t, i.getRawOptions(), {}, o, r, s, a, l, u, d) || this;
- return c._parentEditor = i, c._overwriteOptions = n, e.prototype.updateOptions.call(c, c._overwriteOptions), c._register(i.onDidChangeConfiguration((function (e) {
- return c._onParentConfigurationChanged(e)
- }))), c
- }
- return r(t, e), t.prototype.getParentEditor = function () {
- return this._parentEditor
- }, t.prototype._onParentConfigurationChanged = function (t) {
- e.prototype.updateOptions.call(this, this._parentEditor.getRawOptions()), e.prototype.updateOptions.call(this, this._overwriteOptions)
- }, t.prototype.updateOptions = function (t) {
- n.mixin(this._overwriteOptions, t, !0), e.prototype.updateOptions.call(this, this._overwriteOptions)
- }, t = h([g(3, l.IInstantiationService), g(4, i.ICodeEditorService), g(5, s.ICommandService), g(6, a.IContextKeyService), g(7, d.IThemeService), g(8, u.INotificationService), g(9, c.IAccessibilityService)], t)
- }(o.CodeEditorWidget);
- t.EmbeddedCodeEditorWidget = p
- })),
- define(n[565], i([0, 1, 72, 2, 48, 14, 44, 49, 3, 38, 46, 4, 21, 20]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m) {
- "use strict";
- function v(e) {
- return e.toString()
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var _ = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.model = t, n._markersData = new Map, n._register(i.toDisposable((function () {
- n.model.deltaDecorations(d.keys(n._markersData), []), n._markersData.clear()
- }))), n
- }
- return r(t, e), t.prototype.update = function (e, t) {
- var n = d.keys(this._markersData);
- this._markersData.clear();
- for (var i = this.model.deltaDecorations(n, t), o = 0; o < i.length; o++) this._markersData.set(i[o], e[o])
- }, t.prototype.getMarker = function (e) {
- return this._markersData.get(e.id)
- }, t
- }(i.Disposable), y = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i._markerService = n, i._onDidChangeMarker = i._register(new p.Emitter), i._markerDecorations = new Map, t.getModels().forEach((function (e) {
- return i._onModelAdded(e)
- })), i._register(t.onModelAdded(i._onModelAdded, i)), i._register(t.onModelRemoved(i._onModelRemoved, i)),
- i._register(i._markerService.onMarkerChanged(i._handleMarkerChange, i)), i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._markerDecorations.forEach((function (e) {
- return e.dispose()
- })), this._markerDecorations.clear()
- }, t.prototype.getMarker = function (e, t) {
- var n = this._markerDecorations.get(v(e.uri));
- return n ? f.withUndefinedAsNull(n.getMarker(t)) : null
- }, t.prototype._handleMarkerChange = function (e) {
- var t = this;
- e.forEach((function (e) {
- var n = t._markerDecorations.get(v(e));
- n && t._updateDecorations(n)
- }))
- }, t.prototype._onModelAdded = function (e) {
- var t = new _(e);
- this._markerDecorations.set(v(e.uri), t), this._updateDecorations(t)
- }, t.prototype._onModelRemoved = function (e) {
- var t = this, n = this._markerDecorations.get(v(e.uri));
- n && (n.dispose(), this._markerDecorations.delete(v(e.uri))), e.uri.scheme !== c.Schemas.inMemory && e.uri.scheme !== c.Schemas.internal && e.uri.scheme !== c.Schemas.vscode || this._markerService && this._markerService.read({resource: e.uri}).map((function (e) {
- return e.owner
- })).forEach((function (n) {
- return t._markerService.remove(n, [e.uri])
- }))
- }, t.prototype._updateDecorations = function (e) {
- var t = this, n = this._markerService.read({resource: e.model.uri, take: 500}),
- i = n.map((function (n) {
- return {range: t._createDecorationRange(e.model, n), options: t._createDecorationOption(n)}
- }));
- e.update(n, i), this._onDidChangeMarker.fire(e.model)
- }, t.prototype._createDecorationRange = function (e, t) {
- var i = u.Range.lift(t);
- if (t.severity !== n.MarkerSeverity.Hint || this._hasMarkerTag(t, 1) || this._hasMarkerTag(t, 2) || (i = i.setEndPosition(i.startLineNumber, i.startColumn + 2)), (i = e.validateRange(i)).isEmpty()) {
- var o = e.getWordAtPosition(i.getStartPosition());
- if (o) i = new u.Range(i.startLineNumber, o.startColumn, i.endLineNumber, o.endColumn); else {
- var r = e.getLineLastNonWhitespaceColumn(i.startLineNumber) || e.getLineMaxColumn(i.startLineNumber);
- 1 === r || (i = i.endColumn >= r ? new u.Range(i.startLineNumber, r - 1, i.endLineNumber, r) : new u.Range(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn + 1))
- }
- } else if (t.endColumn === Number.MAX_VALUE && 1 === t.startColumn && i.startLineNumber === i.endLineNumber) {
- var s = e.getLineFirstNonWhitespaceColumn(t.startLineNumber);
- s < i.endColumn && (i = new u.Range(i.startLineNumber, s, i.endLineNumber, i.endColumn), t.startColumn = s)
- }
- return i
- }, t.prototype._createDecorationOption = function (e) {
- var t, i, r, l = void 0, u = void 0;
- switch (e.severity) {
- case n.MarkerSeverity.Hint:
- t = this._hasMarkerTag(e, 2) ? void 0 : this._hasMarkerTag(e, 1) ? "squiggly-unnecessary" : "squiggly-hint", i = 0;
- break;
- case n.MarkerSeverity.Warning:
- t = "squiggly-warning", l = s.themeColorFromId(a.overviewRulerWarning), i = 20, r = {
- color: s.themeColorFromId(m.minimapWarning),
- position: o.MinimapPosition.Inline
- };
- break;
- case n.MarkerSeverity.Info:
- t = "squiggly-info", l = s.themeColorFromId(a.overviewRulerInfo), i = 10;
- break;
- case n.MarkerSeverity.Error:
- default:
- t = "squiggly-error", l = s.themeColorFromId(a.overviewRulerError), i = 30, r = {
- color: s.themeColorFromId(m.minimapError),
- position: o.MinimapPosition.Inline
- }
- }
- return e.tags && (-1 !== e.tags.indexOf(1) && (u = "squiggly-inline-unnecessary"), -1 !== e.tags.indexOf(2) && (u = "squiggly-inline-deprecated")), {
- stickiness: 1,
- className: t,
- showIfCollapsed: !0,
- overviewRuler: {color: l, position: o.OverviewRulerLane.Right},
- minimap: r,
- zIndex: i,
- inlineClassName: u
- }
- }, t.prototype._hasMarkerTag = function (e, t) {
- return !!e.tags && e.tags.indexOf(t) >= 0
- }, t = h([g(0, l.IModelService), g(1, n.IMarkerService)], t)
- }(i.Disposable);
- t.MarkerDecorationsService = y
- })), define(n[566], i([0, 1, 428, 15, 2, 12, 13, 3, 22, 23, 48, 30, 44, 20, 14, 65, 302]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var v = g.registerColor("editorOverviewRuler.bracketMatchForeground", {
- dark: "#A0A0A0",
- light: "#A0A0A0",
- hc: "#A0A0A0"
- }, n.localize(0, null)), _ = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.jumpToBracket",
- label: n.localize(1, null),
- alias: "Go to Bracket",
- precondition: void 0,
- kbOpts: {kbExpr: d.EditorContextKeys.editorTextFocus, primary: 3160, weight: 100}
- }) || this
- }
- return r(t, e),
- t.prototype.run = function (e, t) {
- var n = b.get(t);
- n && n.jumpToBracket()
- }, t
- }(s.EditorAction), y = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.selectToBracket",
- label: n.localize(2, null),
- alias: "Select to Bracket",
- precondition: void 0,
- description: {
- description: "Select to Bracket",
- args: [{
- name: "args",
- schema: {type: "object", properties: {selectBrackets: {type: "boolean", default: !0}}}
- }]
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- var i = b.get(t);
- if (i) {
- var o = !0;
- n && !1 === n.selectBrackets && (o = !1), i.selectToBracket(o)
- }
- }, t
- }(s.EditorAction), C = function (e, t, n) {
- this.position = e, this.brackets = t, this.options = n
- }, b = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._editor = t, n._lastBracketsData = [], n._lastVersionId = 0, n._decorations = [], n._updateBracketsSoon = n._register(new i.RunOnceScheduler((function () {
- return n._updateBrackets()
- }), 50)), n._matchBrackets = n._editor.getOption(53), n._updateBracketsSoon.schedule(), n._register(t.onDidChangeCursorPosition((function (e) {
- "never" !== n._matchBrackets && n._updateBracketsSoon.schedule()
- }))), n._register(t.onDidChangeModelContent((function (e) {
- n._updateBracketsSoon.schedule()
- }))), n._register(t.onDidChangeModel((function (e) {
- n._lastBracketsData = [], n._decorations = [], n._updateBracketsSoon.schedule()
- }))), n._register(t.onDidChangeModelLanguageConfiguration((function (e) {
- n._lastBracketsData = [], n._updateBracketsSoon.schedule()
- }))), n._register(t.onDidChangeConfiguration((function (e) {
- e.hasChanged(53) && (n._matchBrackets = n._editor.getOption(53), n._decorations = n._editor.deltaDecorations(n._decorations, []), n._lastBracketsData = [], n._lastVersionId = 0, n._updateBracketsSoon.schedule())
- }))), n
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.jumpToBracket = function () {
- if (this._editor.hasModel()) {
- var e = this._editor.getModel(), t = this._editor.getSelections().map((function (t) {
- var n = t.getStartPosition(), i = e.matchBracket(n), o = null
- ;
- if (i) i[0].containsPosition(n) ? o = i[1].getStartPosition() : i[1].containsPosition(n) && (o = i[0].getStartPosition()); else {
- var r = e.findEnclosingBrackets(n);
- if (r) o = r[0].getStartPosition(); else {
- var s = e.findNextBracket(n);
- s && s.range && (o = s.range.getStartPosition())
- }
- }
- return o ? new u.Selection(o.lineNumber, o.column, o.lineNumber, o.column) : new u.Selection(n.lineNumber, n.column, n.lineNumber, n.column)
- }));
- this._editor.setSelections(t), this._editor.revealRange(t[0])
- }
- }, t.prototype.selectToBracket = function (e) {
- if (this._editor.hasModel()) {
- var t = this._editor.getModel(), n = [];
- this._editor.getSelections().forEach((function (i) {
- var o = i.getStartPosition(), r = t.matchBracket(o);
- if (!r && !(r = t.findEnclosingBrackets(o))) {
- var s = t.findNextBracket(o);
- s && s.range && (r = t.matchBracket(s.range.getStartPosition()))
- }
- var a = null, d = null;
- if (r) {
- r.sort(l.Range.compareRangesUsingStarts);
- var c = r[0], h = r[1];
- a = e ? c.getStartPosition() : c.getEndPosition(), d = e ? h.getEndPosition() : h.getStartPosition()
- }
- a && d && n.push(new u.Selection(a.lineNumber, a.column, d.lineNumber, d.column))
- })), n.length > 0 && (this._editor.setSelections(n), this._editor.revealRange(n[0]))
- }
- }, t.prototype._updateBrackets = function () {
- if ("never" !== this._matchBrackets) {
- this._recomputeBrackets();
- for (var e = [], t = 0, n = 0, i = this._lastBracketsData; n < i.length; n++) {
- var o = i[n], r = o.brackets;
- r && (e[t++] = {range: r[0], options: o.options}, e[t++] = {range: r[1], options: o.options})
- }
- this._decorations = this._editor.deltaDecorations(this._decorations, e)
- }
- }, t.prototype._recomputeBrackets = function () {
- if (!this._editor.hasModel()) return this._lastBracketsData = [], void (this._lastVersionId = 0);
- var e = this._editor.getSelections();
- if (e.length > 100) return this._lastBracketsData = [], void (this._lastVersionId = 0);
- var n = this._editor.getModel(), i = n.getVersionId(), o = [];
- this._lastVersionId === i && (o = this._lastBracketsData);
- for (var r = [], s = 0, l = 0, u = e.length; l < u; l++) {
- var d = e[l];
- d.isEmpty() && (r[s++] = d.getStartPosition())
- }
- r.length > 1 && r.sort(a.Position.compare);
- var c = [], h = 0, p = 0, g = o.length;
- for (l = 0, u = r.length; l < u; l++) {
- for (var f = r[l]; p < g && o[p].position.isBefore(f);) p++
- ;
- if (p < g && o[p].position.equals(f)) c[h++] = o[p]; else {
- var m = n.matchBracket(f), v = t._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;
- m || "always" !== this._matchBrackets || (m = n.findEnclosingBrackets(f, 20), v = t._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER), c[h++] = new C(f, m, v)
- }
- }
- this._lastBracketsData = c, this._lastVersionId = i
- }, t.ID = "editor.contrib.bracketMatchingController", t._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = h.ModelDecorationOptions.register({
- stickiness: 1,
- className: "bracket-match",
- overviewRuler: {color: f.themeColorFromId(v), position: c.OverviewRulerLane.Center}
- }), t._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = h.ModelDecorationOptions.register({
- stickiness: 1,
- className: "bracket-match"
- }), t
- }(o.Disposable);
- t.BracketMatchingController = b, s.registerEditorContribution(b.ID, b), s.registerEditorAction(y), s.registerEditorAction(_), f.registerThemingParticipant((function (e, t) {
- var n = e.getColor(p.editorBracketMatchBackground);
- n && t.addRule(".monaco-editor .bracket-match { background-color: " + n + "; }");
- var i = e.getColor(p.editorBracketMatchBorder)
- ;i && t.addRule(".monaco-editor .bracket-match { border: 1px solid " + i + "; }")
- })), m.MenuRegistry.appendMenuItem(19, {
- group: "5_infile_nav",
- command: {id: "editor.action.jumpToBracket", title: n.localize(3, null)},
- order: 2
- })
- })), define(n[567], i([0, 1, 6, 78, 4, 2, 30, 433, 34, 14, 20, 57, 304]), (function (e, t, n, i, o, s, a, l, u, d, c, p) {
- "use strict";
- var f;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.Hidden = {type: 0};
- var t = function (e, t, n, i) {
- this.actions = e, this.trigger = t, this.editorPosition = n, this.widgetPosition = i, this.type = 1
- };
- e.Showing = t
- }(f || (f = {}));
- var m = function (e) {
- function t(t, r, s, a) {
- var l = e.call(this) || this;
- return l._editor = t, l._quickFixActionId = r, l._preferredFixActionId = s, l._keybindingService = a, l._onClick = l._register(new o.Emitter), l.onClick = l._onClick.event, l._state = f.Hidden, l._domNode = document.createElement("div"), l._domNode.className = "codicon codicon-lightbulb", l._editor.addContentWidget(l), l._register(l._editor.onDidChangeModelContent((function (e) {
- var t = l._editor.getModel()
- ;(1 !== l.state.type || !t || l.state.editorPosition.lineNumber >= t.getLineCount()) && l.hide()
- }))), p.Gesture.ignoreTarget(l._domNode), l._register(n.addStandardDisposableGenericMouseDownListner(l._domNode, (function (e) {
- if (1 === l.state.type) {
- l._editor.focus(), e.preventDefault();
- var t = n.getDomNodePagePosition(l._domNode), i = t.top, o = t.height,
- r = l._editor.getOption(49), s = Math.floor(r / 3);
- null !== l.state.widgetPosition.position && l.state.widgetPosition.position.lineNumber < l.state.editorPosition.lineNumber && (s += r), l._onClick.fire({
- x: e.posx,
- y: i + o + s,
- actions: l.state.actions,
- trigger: l.state.trigger
- })
- }
- }))), l._register(n.addDisposableListener(l._domNode, "mouseenter", (function (e) {
- if (1 == (1 & e.buttons)) {
- l.hide();
- var t = new i.GlobalMouseMoveMonitor;
- t.startMonitoring(e.target, e.buttons, i.standardMouseMoveMerger, (function () {
- }), (function () {
- t.dispose()
- }))
- }
- }))), l._register(l._editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(47) && !l._editor.getOption(47).enabled && l.hide()
- }))), l._updateLightBulbTitle(),
- l._register(l._keybindingService.onDidUpdateKeybindings(l._updateLightBulbTitle, l)), l
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._editor.removeContentWidget(this)
- }, t.prototype.getId = function () {
- return "LightBulbWidget"
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.getPosition = function () {
- return 1 === this._state.type ? this._state.widgetPosition : null
- }, t.prototype.update = function (e, i, o) {
- var r = this;
- if (e.validActions.length <= 0) return this.hide();
- var s = this._editor.getOptions();
- if (!s.get(47).enabled) return this.hide();
- var l = o.lineNumber, u = o.column, d = this._editor.getModel();
- if (!d) return this.hide();
- var c = d.getOptions().tabSize, h = s.get(34), p = d.getLineContent(l),
- g = a.TextModel.computeIndentLevel(p, c), m = function (e) {
- return e > 2 && r._editor.getTopForLineNumber(e) === r._editor.getTopForLineNumber(e - 1)
- }, v = l;
- if (!(h.spaceWidth * g > 22)) if (l > 1 && !m(l - 1)) v -= 1; else if (m(l + 1)) {
- if (u * h.spaceWidth < 22) return this.hide()
- } else v += 1;
- this.state = new f.Showing(e, i, o, {
- position: {
- lineNumber: v,
- column: 1
- }, preference: t._posPref
- }), n.toggleClass(this._domNode, "codicon-lightbulb-autofix", e.hasAutoFix), this._editor.layoutContentWidget(this)
- }, t.prototype.hide = function () {
- this.state = f.Hidden, this._editor.layoutContentWidget(this)
- }, Object.defineProperty(t.prototype, "state", {
- get: function () {
- return this._state
- }, set: function (e) {
- this._state = e, this._updateLightBulbTitle()
- }, enumerable: !0, configurable: !0
- }), t.prototype._updateLightBulbTitle = function () {
- if (1 === this.state.type && this.state.actions.hasAutoFix) {
- var e = this._keybindingService.lookupKeybinding(this._preferredFixActionId);
- if (e) return void (this.title = l.localize(0, null, e.getLabel()))
- }
- var t = this._keybindingService.lookupKeybinding(this._quickFixActionId);
- this.title = t ? l.localize(1, null, t.getLabel()) : l.localize(2, null)
- }, Object.defineProperty(t.prototype, "title", {
- set: function (e) {
- this._domNode.title = e
- }, enumerable: !0, configurable: !0
- }), t._posPref = [0], t = h([g(3, u.IKeybindingService)], t)
- }(s.Disposable);
- t.LightBulbWidget = m, d.registerThemingParticipant((function (e, t) {
- var n = e.getColor(c.editorLightBulbForeground);
- n && t.addRule("\n\t\t.monaco-editor .contentWidgets .codicon-lightbulb {\n\t\t\tcolor: " + n + ";\n\t\t}");
- var i = e.getColor(c.editorLightBulbAutoFixForeground);
- i && t.addRule("\n\t\t.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\n\t\t\tcolor: " + i + ";\n\t\t}")
- }))
- })), define(n[568], i([0, 1, 6, 100, 5, 3, 30, 44, 20, 14, 305]), (function (e, t, n, i, o, r, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function () {
- function e(e, t) {
- this.afterLineNumber = e, this._onHeight = t, this.heightInLines = 1, this.suppressMouseDown = !0, this.domNode = document.createElement("div")
- }
- return e.prototype.onComputedHeight = function (e) {
- void 0 === this._lastHeight ? this._lastHeight = e : this._lastHeight !== e && (this._lastHeight = e, this._onHeight())
- }, e
- }(), c = function () {
- function e(t, n, i) {
- this.allowEditorOverflow = !1, this.suppressMouseDown = !0, this._commands = new Map, this._isEmpty = !0, this._editor = t, this._id = "codelens.widget-" + e._idPool++, this.updatePosition(i),
- this._domNode = document.createElement("span"), this._domNode.className = "codelens-decoration " + n
- }
- return e.prototype.withCommands = function (e, t) {
- this._commands.clear();
- for (var r = "", s = !1, a = 0; a < e.length; a++) {
- var l = e[a];
- if (l && (s = !0, l.command)) {
- var u = i.renderCodicons(o.escape(l.command.title));
- l.command.id ? (r += "<a id=" + a + ">" + u + "</a>", this._commands.set(String(a), l.command)) : r += "<span>" + u + "</span>", a + 1 < e.length && (r += "<span> | </span>")
- }
- }
- s ? (r || (r = " "), this._domNode.innerHTML = r, this._isEmpty && t && n.addClass(this._domNode, "fadein"), this._isEmpty = !1) : this._domNode.innerHTML = "<span>no commands</span>"
- }, e.prototype.getCommand = function (e) {
- return e.parentElement === this._domNode ? this._commands.get(e.id) : void 0
- }, e.prototype.getId = function () {
- return this._id
- }, e.prototype.getDomNode = function () {
- return this._domNode
- }, e.prototype.updatePosition = function (e) {
- var t = this._editor.getModel().getLineFirstNonWhitespaceColumn(e);
- this._widgetPosition = {position: {lineNumber: e, column: t}, preference: [1]}
- },
- e.prototype.getPosition = function () {
- return this._widgetPosition || null
- }, e._idPool = 0, e
- }(), h = function () {
- function e() {
- this._removeDecorations = [], this._addDecorations = [], this._addDecorationsCallbacks = []
- }
- return e.prototype.addDecoration = function (e, t) {
- this._addDecorations.push(e), this._addDecorationsCallbacks.push(t)
- }, e.prototype.removeDecoration = function (e) {
- this._removeDecorations.push(e)
- }, e.prototype.commit = function (e) {
- for (var t = e.deltaDecorations(this._removeDecorations, this._addDecorations), n = 0, i = t.length; n < i; n++) this._addDecorationsCallbacks[n](t[n])
- }, e
- }();
- t.CodeLensHelper = h;
- var p = function () {
- function e(e, t, n, i, o, a) {
- var l, u = this;
- this._isDisposed = !1, this._editor = t, this._className = n, this._data = e, this._decorationIds = [];
- var c = [];
- this._data.forEach((function (e, t) {
- e.symbol.command && c.push(e.symbol), i.addDecoration({
- range: e.symbol.range,
- options: s.ModelDecorationOptions.EMPTY
- }, (function (e) {
- return u._decorationIds[t] = e
- })), l = l ? r.Range.plusRange(l, e.symbol.range) : r.Range.lift(e.symbol.range)
- })),
- this._viewZone = new d(l.startLineNumber - 1, a), this._viewZoneId = o.addZone(this._viewZone), c.length > 0 && (this._createContentWidgetIfNecessary(), this._contentWidget.withCommands(c, !1))
- }
- return e.prototype._createContentWidgetIfNecessary = function () {
- this._contentWidget || (this._contentWidget = new c(this._editor, this._className, this._viewZone.afterLineNumber + 1), this._editor.addContentWidget(this._contentWidget))
- }, e.prototype.dispose = function (e, t) {
- this._decorationIds.forEach(e.removeDecoration, e), this._decorationIds = [], t && t.removeZone(this._viewZoneId), this._contentWidget && (this._editor.removeContentWidget(this._contentWidget), this._contentWidget = void 0), this._isDisposed = !0
- }, e.prototype.isDisposed = function () {
- return this._isDisposed
- }, e.prototype.isValid = function () {
- var e = this;
- return this._decorationIds.some((function (t, n) {
- var i = e._editor.getModel().getDecorationRange(t), o = e._data[n].symbol;
- return !(!i || r.Range.isEmpty(o.range) !== i.isEmpty())
- }))
- }, e.prototype.updateCodeLensSymbols = function (e, t) {
- var n = this
- ;this._decorationIds.forEach(t.removeDecoration, t), this._decorationIds = [], this._data = e, this._data.forEach((function (e, i) {
- t.addDecoration({range: e.symbol.range, options: s.ModelDecorationOptions.EMPTY}, (function (e) {
- return n._decorationIds[i] = e
- }))
- }))
- }, e.prototype.computeIfNecessary = function (e) {
- if (!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone")) return null;
- for (var t = 0; t < this._decorationIds.length; t++) {
- var n = e.getDecorationRange(this._decorationIds[t]);
- n && (this._data[t].symbol.range = n)
- }
- return this._data
- }, e.prototype.updateCommands = function (e) {
- this._createContentWidgetIfNecessary(), this._contentWidget.withCommands(e, !0);
- for (var t = 0; t < this._data.length; t++) {
- var n = e[t];
- if (n) {
- var i = this._data[t].symbol;
- i.command = n.command || i.command
- }
- }
- }, e.prototype.getCommand = function (e) {
- var t;
- return null === (t = this._contentWidget) || void 0 === t ? void 0 : t.getCommand(e)
- }, e.prototype.getLineNumber = function () {
- var e = this._editor.getModel().getDecorationRange(this._decorationIds[0]);
- return e ? e.startLineNumber : -1
- },
- e.prototype.update = function (e) {
- if (this.isValid()) {
- var t = this._editor.getModel().getDecorationRange(this._decorationIds[0]);
- t && (this._viewZone.afterLineNumber = t.startLineNumber - 1, e.layoutZone(this._viewZoneId), this._contentWidget && (this._contentWidget.updatePosition(t.startLineNumber), this._editor.layoutContentWidget(this._contentWidget)))
- }
- }, e
- }();
- t.CodeLensWidget = p, u.registerThemingParticipant((function (e, t) {
- var n = e.getColor(a.editorCodeLensForeground);
- n && (t.addRule(".monaco-editor .codelens-decoration { color: " + n + "; }"), t.addRule(".monaco-editor .codelens-decoration .codicon { color: " + n + "; }"));
- var i = e.getColor(l.editorActiveLinkForeground);
- i && (t.addRule(".monaco-editor .codelens-decoration > a:hover { color: " + i + " !important; }"), t.addRule(".monaco-editor .codelens-decoration > a:hover .codicon { color: " + i + " !important; }"))
- }))
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0
- ;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[569], i([0, 1, 15, 10, 2, 67, 12, 17, 221, 568, 29, 35, 529, 6, 125]), (function (e, t, n, i, o, r, s, l, u, d, c, p, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var _ = function () {
- function e(e, t, n, i) {
- var r = this;
- this._editor = e, this._commandService = t, this._notificationService = n, this._codeLensCache = i, this._globalToDispose = new o.DisposableStore, this._localToDispose = new o.DisposableStore, this._lenses = [], this._oldCodeLensModels = new o.DisposableStore, this._modelChangeCounter = 0, this._isEnabled = this._editor.getOption(11), this._globalToDispose.add(this._editor.onDidChangeModel((function () {
- return r._onModelChange()
- }))), this._globalToDispose.add(this._editor.onDidChangeModelLanguage((function () {
- return r._onModelChange()
- }))), this._globalToDispose.add(this._editor.onDidChangeConfiguration((function () {
- var e = r._isEnabled;
- r._isEnabled = r._editor.getOption(11), e !== r._isEnabled && r._onModelChange()
- }))),
- this._globalToDispose.add(l.CodeLensProviderRegistry.onDidChange(this._onModelChange, this)), this._globalToDispose.add(this._editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(34) && r._updateLensStyle()
- }))), this._onModelChange(), this._styleClassName = v.hash(this._editor.getId()).toString(16), this._styleElement = m.createStyleSheet(m.isInShadowDOM(this._editor.getContainerDomNode()) ? this._editor.getContainerDomNode() : void 0), this._updateLensStyle()
- }
- return e.prototype.dispose = function () {
- this._localDispose(), this._globalToDispose.dispose(), this._oldCodeLensModels.dispose(), o.dispose(this._currentCodeLensModel)
- }, e.prototype._updateLensStyle = function () {
- var e = this._editor.getOptions(), t = e.get(34), n = e.get(49), i = Math.round(1.1 * n),
- o = Math.round(.9 * t.fontSize),
- r = "\n\t\t.monaco-editor .codelens-decoration." + this._styleClassName + " { height: " + i + "px; line-height: " + n + "px; font-size: " + o + "px; padding-right: " + Math.round(.45 * t.fontSize) + "px;}\n\t\t.monaco-editor .codelens-decoration." + this._styleClassName + " > a > .codicon { line-height: " + n + "px; font-size: " + o + "px; }\n\t\t";
- this._styleElement.innerHTML = r
- }, e.prototype._localDispose = function () {
- this._currentFindCodeLensSymbolsPromise && (this._currentFindCodeLensSymbolsPromise.cancel(), this._currentFindCodeLensSymbolsPromise = void 0, this._modelChangeCounter++), this._currentResolveCodeLensSymbolsPromise && (this._currentResolveCodeLensSymbolsPromise.cancel(), this._currentResolveCodeLensSymbolsPromise = void 0), this._localToDispose.clear(), this._oldCodeLensModels.clear(), o.dispose(this._currentCodeLensModel)
- }, e.prototype._onModelChange = function () {
- var e = this;
- this._localDispose();
- var t = this._editor.getModel()
- ;
- if (t && this._isEnabled) {
- var s = this._codeLensCache.get(t);
- if (s && this._renderCodeLensSymbols(s), l.CodeLensProviderRegistry.has(t)) {
- for (var c = 0, h = l.CodeLensProviderRegistry.all(t); c < h.length; c++) {
- var p = h[c];
- if ("function" == typeof p.onDidChange) {
- var g = p.onDidChange((function () {
- return m.schedule()
- }));
- this._localToDispose.add(g)
- }
- }
- var f = this._detectVisibleLenses = new n.RunOnceScheduler((function () {
- return e._onViewportChanged()
- }), 250), m = new n.RunOnceScheduler((function () {
- var o = ++e._modelChangeCounter;
- e._currentFindCodeLensSymbolsPromise && e._currentFindCodeLensSymbolsPromise.cancel(), e._currentFindCodeLensSymbolsPromise = n.createCancelablePromise((function (e) {
- return u.getCodeLensData(t, e)
- })), e._currentFindCodeLensSymbolsPromise.then((function (n) {
- o === e._modelChangeCounter && (e._currentCodeLensModel && e._oldCodeLensModels.add(e._currentCodeLensModel), e._currentCodeLensModel = n, e._codeLensCache.put(t, n), e._renderCodeLensSymbols(n), f.schedule())
- }), i.onUnexpectedError)
- }), 250);
- this._localToDispose.add(m),
- this._localToDispose.add(f), this._localToDispose.add(this._editor.onDidChangeModelContent((function () {
- e._editor.changeDecorations((function (t) {
- e._editor.changeViewZones((function (n) {
- var i = [], o = -1;
- e._lenses.forEach((function (e) {
- e.isValid() && o !== e.getLineNumber() ? (e.update(n), o = e.getLineNumber()) : i.push(e)
- }));
- var r = new d.CodeLensHelper;
- i.forEach((function (t) {
- t.dispose(r, n), e._lenses.splice(e._lenses.indexOf(t), 1)
- })), r.commit(t)
- }))
- })), f.schedule(), m.schedule()
- }))), this._localToDispose.add(this._editor.onDidScrollChange((function (t) {
- t.scrollTopChanged && e._lenses.length > 0 && f.schedule()
- }))), this._localToDispose.add(this._editor.onDidLayoutChange((function () {
- f.schedule()
- }))), this._localToDispose.add(o.toDisposable((function () {
- if (e._editor.getModel()) {
- var t = r.StableEditorScrollState.capture(e._editor);
- e._editor.changeDecorations((function (t) {
- e._editor.changeViewZones((function (n) {
- e._disposeAllLenses(t, n)
- }))
- })), t.restore(e._editor)
- } else e._disposeAllLenses(void 0, void 0)
- }))),
- this._localToDispose.add(this._editor.onMouseUp((function (t) {
- var n;
- if (9 === t.target.type) {
- var i = t.target.element;
- if ("SPAN" === (null == i ? void 0 : i.tagName) && (i = i.parentElement), "A" === (null == i ? void 0 : i.tagName)) for (var o = 0, r = e._lenses; o < r.length; o++) {
- var s = r[o].getCommand(i);
- if (s) {
- (n = e._commandService).executeCommand.apply(n, a([s.id], s.arguments || [])).catch((function (t) {
- return e._notificationService.error(t)
- }));
- break
- }
- }
- }
- }))), m.schedule()
- } else s && this._localToDispose.add(n.disposableTimeout((function () {
- var n = e._codeLensCache.get(t);
- s === n && (e._codeLensCache.delete(t), e._onModelChange())
- }), 3e4))
- }
- }, e.prototype._disposeAllLenses = function (e, t) {
- for (var n = new d.CodeLensHelper, i = 0, o = this._lenses; i < o.length; i++) {
- o[i].dispose(n, t)
- }
- e && n.commit(e), this._lenses = []
- }, e.prototype._renderCodeLensSymbols = function (e) {
- var t = this;
- if (this._editor.hasModel()) {
- for (var n, i = this._editor.getModel().getLineCount(), o = [], s = 0, a = e.lenses; s < a.length; s++) {
- var l = a[s], u = l.symbol.range.startLineNumber
- ;u < 1 || u > i || (n && n[n.length - 1].symbol.range.startLineNumber === u ? n.push(l) : (n = [l], o.push(n)))
- }
- var c = r.StableEditorScrollState.capture(this._editor);
- this._editor.changeDecorations((function (e) {
- t._editor.changeViewZones((function (n) {
- for (var i = new d.CodeLensHelper, r = 0, s = 0; s < o.length && r < t._lenses.length;) {
- var a = o[s][0].symbol.range.startLineNumber, l = t._lenses[r].getLineNumber();
- l < a ? (t._lenses[r].dispose(i, n), t._lenses.splice(r, 1)) : l === a ? (t._lenses[r].updateCodeLensSymbols(o[s], i), s++, r++) : (t._lenses.splice(r, 0, new d.CodeLensWidget(o[s], t._editor, t._styleClassName, i, n, (function () {
- return t._detectVisibleLenses && t._detectVisibleLenses.schedule()
- }))), r++, s++)
- }
- for (; r < t._lenses.length;) t._lenses[r].dispose(i, n), t._lenses.splice(r, 1);
- for (; s < o.length;) t._lenses.push(new d.CodeLensWidget(o[s], t._editor, t._styleClassName, i, n, (function () {
- return t._detectVisibleLenses && t._detectVisibleLenses.schedule()
- }))), s++;
- i.commit(e)
- }))
- })), c.restore(this._editor)
- }
- }, e.prototype._onViewportChanged = function () {
- var e = this
- ;this._currentResolveCodeLensSymbolsPromise && (this._currentResolveCodeLensSymbolsPromise.cancel(), this._currentResolveCodeLensSymbolsPromise = void 0);
- var t = this._editor.getModel();
- if (t) {
- var o = [], r = [];
- if (this._lenses.forEach((function (e) {
- var n = e.computeIfNecessary(t);
- n && (o.push(n), r.push(e))
- })), 0 !== o.length) {
- var s = n.createCancelablePromise((function (e) {
- var n = o.map((function (n, o) {
- var s = new Array(n.length), a = n.map((function (n, o) {
- return n.symbol.command || "function" != typeof n.provider.resolveCodeLens ? (s[o] = n.symbol, Promise.resolve(void 0)) : Promise.resolve(n.provider.resolveCodeLens(t, n.symbol, e)).then((function (e) {
- s[o] = e
- }), i.onUnexpectedExternalError)
- }));
- return Promise.all(a).then((function () {
- e.isCancellationRequested || r[o].isDisposed() || r[o].updateCommands(s)
- }))
- }));
- return Promise.all(n)
- }));
- this._currentResolveCodeLensSymbolsPromise = s, this._currentResolveCodeLensSymbolsPromise.then((function () {
- e._currentCodeLensModel && e._codeLensCache.put(t, e._currentCodeLensModel), e._oldCodeLensModels.clear(),
- s === e._currentResolveCodeLensSymbolsPromise && (e._currentResolveCodeLensSymbolsPromise = void 0)
- }), (function (t) {
- i.onUnexpectedError(t), s === e._currentResolveCodeLensSymbolsPromise && (e._currentResolveCodeLensSymbolsPromise = void 0)
- }))
- }
- }
- }, e.ID = "css.editor.codeLens", e = h([g(1, c.ICommandService), g(2, p.INotificationService), g(3, f.ICodeLensCache)], e)
- }();
- t.CodeLensContribution = _, s.registerEditorContribution(_.ID, _)
- })), define(n[570], i([0, 1, 24, 6, 78, 47, 27, 4, 2, 20, 14, 306]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var h = i.$, p = function (e) {
- function t(t, n, o) {
- var r = e.call(this) || this;
- r.model = n, r.domNode = h(".colorpicker-header"), i.append(t, r.domNode), r.pickedColorNode = i.append(r.domNode, h(".picked-color"));
- var s = i.append(r.domNode, h(".original-color"));
- return s.style.backgroundColor = a.Color.Format.CSS.format(r.model.originalColor) || "", r.backgroundColor = o.getTheme().getColor(d.editorHoverBackground) || a.Color.white, r._register(c.registerThemingParticipant((function (e, t) {
- r.backgroundColor = e.getColor(d.editorHoverBackground) || a.Color.white
- }))), r._register(i.addDisposableListener(r.pickedColorNode, i.EventType.CLICK, (function () {
- return r.model.selectNextColorPresentation()
- }))), r._register(i.addDisposableListener(s, i.EventType.CLICK, (function () {
- r.model.color = r.model.originalColor, r.model.flushColor()
- }))), r._register(n.onDidChangeColor(r.onDidChangeColor, r)), r._register(n.onDidChangePresentation(r.onDidChangePresentation, r)), r.pickedColorNode.style.backgroundColor = a.Color.Format.CSS.format(n.color) || "", i.toggleClass(r.pickedColorNode, "light", n.color.rgba.a < .5 ? r.backgroundColor.isLighter() : n.color.isLighter()), r
- }
- return r(t, e), t.prototype.onDidChangeColor = function (e) {
- this.pickedColorNode.style.backgroundColor = a.Color.Format.CSS.format(e) || "", i.toggleClass(this.pickedColorNode, "light", e.rgba.a < .5 ? this.backgroundColor.isLighter() : e.isLighter()), this.onDidChangePresentation()
- }, t.prototype.onDidChangePresentation = function () {
- this.pickedColorNode.textContent = this.model.presentation ? this.model.presentation.label : ""
- }, t
- }(u.Disposable);
- t.ColorPickerHeader = p;
- var g = function (e) {
- function t(t, n, o) {
- var r = e.call(this) || this;
- return r.model = n, r.pixelRatio = o, r.domNode = h(".colorpicker-body"), i.append(t, r.domNode), r.saturationBox = new f(r.domNode, r.model, r.pixelRatio), r._register(r.saturationBox), r._register(r.saturationBox.onDidChange(r.onDidSaturationValueChange, r)), r._register(r.saturationBox.onColorFlushed(r.flushColor, r)), r.opacityStrip = new v(r.domNode, r.model), r._register(r.opacityStrip), r._register(r.opacityStrip.onDidChange(r.onDidOpacityChange, r)), r._register(r.opacityStrip.onColorFlushed(r.flushColor, r)), r.hueStrip = new _(r.domNode, r.model), r._register(r.hueStrip), r._register(r.hueStrip.onDidChange(r.onDidHueChange, r)), r._register(r.hueStrip.onColorFlushed(r.flushColor, r)), r
- }
- return r(t, e), t.prototype.flushColor = function () {
- this.model.flushColor()
- }, t.prototype.onDidSaturationValueChange = function (e) {
- var t = e.s, n = e.v, i = this.model.color.hsva
- ;this.model.color = new a.Color(new a.HSVA(i.h, t, n, i.a))
- }, t.prototype.onDidOpacityChange = function (e) {
- var t = this.model.color.hsva;
- this.model.color = new a.Color(new a.HSVA(t.h, t.s, t.v, e))
- }, t.prototype.onDidHueChange = function (e) {
- var t = this.model.color.hsva, n = 360 * (1 - e);
- this.model.color = new a.Color(new a.HSVA(360 === n ? 0 : n, t.s, t.v, t.a))
- }, t.prototype.layout = function () {
- this.saturationBox.layout(), this.opacityStrip.layout(), this.hueStrip.layout()
- }, t
- }(u.Disposable);
- t.ColorPickerBody = g;
- var f = function (e) {
- function t(t, n, o) {
- var r = e.call(this) || this;
- return r.model = n, r.pixelRatio = o, r._onDidChange = new l.Emitter, r.onDidChange = r._onDidChange.event, r._onColorFlushed = new l.Emitter, r.onColorFlushed = r._onColorFlushed.event, r.domNode = h(".saturation-wrap"), i.append(t, r.domNode), r.canvas = document.createElement("canvas"), r.canvas.className = "saturation-box", i.append(r.domNode, r.canvas), r.selection = h(".saturation-selection"), i.append(r.domNode, r.selection), r.layout(), r._register(i.addDisposableGenericMouseDownListner(r.domNode, (function (e) {
- return r.onMouseDown(e)
- }))), r._register(r.model.onDidChangeColor(r.onDidChangeColor, r)), r.monitor = null, r
- }
- return r(t, e), t.prototype.onMouseDown = function (e) {
- var t = this;
- this.monitor = this._register(new o.GlobalMouseMoveMonitor);
- var n = i.getDomNodePagePosition(this.domNode);
- e.target !== this.selection && this.onDidChangePosition(e.offsetX, e.offsetY), this.monitor.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
- return t.onDidChangePosition(e.posx - n.left, e.posy - n.top)
- }), (function () {
- return null
- }));
- var r = i.addDisposableGenericMouseUpListner(document, (function () {
- t._onColorFlushed.fire(), r.dispose(), t.monitor && (t.monitor.stopMonitoring(!0), t.monitor = null)
- }), !0)
- }, t.prototype.onDidChangePosition = function (e, t) {
- var n = Math.max(0, Math.min(1, e / this.width)), i = Math.max(0, Math.min(1, 1 - t / this.height));
- this.paintSelection(n, i), this._onDidChange.fire({s: n, v: i})
- }, t.prototype.layout = function () {
- this.width = this.domNode.offsetWidth, this.height = this.domNode.offsetHeight, this.canvas.width = this.width * this.pixelRatio,
- this.canvas.height = this.height * this.pixelRatio, this.paint();
- var e = this.model.color.hsva;
- this.paintSelection(e.s, e.v)
- }, t.prototype.paint = function () {
- var e = this.model.color.hsva, t = new a.Color(new a.HSVA(e.h, 1, 1, 1)),
- n = this.canvas.getContext("2d"), i = n.createLinearGradient(0, 0, this.canvas.width, 0);
- i.addColorStop(0, "rgba(255, 255, 255, 1)"), i.addColorStop(.5, "rgba(255, 255, 255, 0.5)"), i.addColorStop(1, "rgba(255, 255, 255, 0)");
- var o = n.createLinearGradient(0, 0, 0, this.canvas.height);
- o.addColorStop(0, "rgba(0, 0, 0, 0)"), o.addColorStop(1, "rgba(0, 0, 0, 1)"), n.rect(0, 0, this.canvas.width, this.canvas.height), n.fillStyle = a.Color.Format.CSS.format(t), n.fill(), n.fillStyle = i, n.fill(), n.fillStyle = o, n.fill()
- }, t.prototype.paintSelection = function (e, t) {
- this.selection.style.left = e * this.width + "px", this.selection.style.top = this.height - t * this.height + "px"
- }, t.prototype.onDidChangeColor = function () {
- this.monitor && this.monitor.isMonitoring() || this.paint()
- }, t
- }(u.Disposable), m = function (e) {
- function t(t, n) {
- var o = e.call(this) || this
- ;
- return o.model = n, o._onDidChange = new l.Emitter, o.onDidChange = o._onDidChange.event, o._onColorFlushed = new l.Emitter, o.onColorFlushed = o._onColorFlushed.event, o.domNode = i.append(t, h(".strip")), o.overlay = i.append(o.domNode, h(".overlay")), o.slider = i.append(o.domNode, h(".slider")), o.slider.style.top = "0px", o._register(i.addDisposableGenericMouseDownListner(o.domNode, (function (e) {
- return o.onMouseDown(e)
- }))), o.layout(), o
- }
- return r(t, e), t.prototype.layout = function () {
- this.height = this.domNode.offsetHeight - this.slider.offsetHeight;
- var e = this.getValue(this.model.color);
- this.updateSliderPosition(e)
- }, t.prototype.onMouseDown = function (e) {
- var t = this, n = this._register(new o.GlobalMouseMoveMonitor),
- r = i.getDomNodePagePosition(this.domNode);
- i.addClass(this.domNode, "grabbing"), e.target !== this.slider && this.onDidChangeTop(e.offsetY), n.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
- return t.onDidChangeTop(e.posy - r.top)
- }), (function () {
- return null
- }));
- var s = i.addDisposableGenericMouseUpListner(document, (function () {
- t._onColorFlushed.fire(), s.dispose(), n.stopMonitoring(!0), i.removeClass(t.domNode, "grabbing")
- }), !0)
- }, t.prototype.onDidChangeTop = function (e) {
- var t = Math.max(0, Math.min(1, 1 - e / this.height));
- this.updateSliderPosition(t), this._onDidChange.fire(t)
- }, t.prototype.updateSliderPosition = function (e) {
- this.slider.style.top = (1 - e) * this.height + "px"
- }, t
- }(u.Disposable), v = function (e) {
- function t(t, n) {
- var o = e.call(this, t, n) || this;
- return i.addClass(o.domNode, "opacity-strip"), o._register(n.onDidChangeColor(o.onDidChangeColor, o)), o.onDidChangeColor(o.model.color), o
- }
- return r(t, e), t.prototype.onDidChangeColor = function (e) {
- var t = e.rgba, n = t.r, i = t.g, o = t.b, r = new a.Color(new a.RGBA(n, i, o, 1)),
- s = new a.Color(new a.RGBA(n, i, o, 0));
- this.overlay.style.background = "linear-gradient(to bottom, " + r + " 0%, " + s + " 100%)"
- }, t.prototype.getValue = function (e) {
- return e.hsva.a
- }, t
- }(m), _ = function (e) {
- function t(t, n) {
- var o = e.call(this, t, n) || this;
- return i.addClass(o.domNode, "hue-strip"), o
- }
- return r(t, e), t.prototype.getValue = function (e) {
- return 1 - e.hsva.h / 360
- }, t
- }(m), y = function (e) {
- function t(t, i, o, r) {
- var s = e.call(this) || this;
- s.model = i, s.pixelRatio = o, s._register(n.onDidChangeZoomLevel((function () {
- return s.layout()
- })));
- var a = h(".colorpicker-widget");
- t.appendChild(a);
- var l = new p(a, s.model, r);
- return s.body = new g(a, s.model, s.pixelRatio), s._register(l), s._register(s.body), s
- }
- return r(t, e), t.prototype.layout = function () {
- this.body.layout()
- }, t
- }(s.Widget);
- t.ColorPickerWidget = y
- })), define(n[231], i([0, 1, 437, 14, 20, 308, 309]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.SYMBOL_ICON_ARRAY_FOREGROUND = o.registerColor("symbolIcon.arrayForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(0, null)), t.SYMBOL_ICON_BOOLEAN_FOREGROUND = o.registerColor("symbolIcon.booleanForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(1, null)), t.SYMBOL_ICON_CLASS_FOREGROUND = o.registerColor("symbolIcon.classForeground", {
- dark: "#EE9D28",
- light: "#D67E00",
- hc: "#EE9D28"
- }, n.localize(2, null)),
- t.SYMBOL_ICON_COLOR_FOREGROUND = o.registerColor("symbolIcon.colorForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(3, null)), t.SYMBOL_ICON_CONSTANT_FOREGROUND = o.registerColor("symbolIcon.constantForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(4, null)), t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND = o.registerColor("symbolIcon.constructorForeground", {
- dark: "#B180D7",
- light: "#652D90",
- hc: "#B180D7"
- }, n.localize(5, null)), t.SYMBOL_ICON_ENUMERATOR_FOREGROUND = o.registerColor("symbolIcon.enumeratorForeground", {
- dark: "#EE9D28",
- light: "#D67E00",
- hc: "#EE9D28"
- }, n.localize(6, null)), t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND = o.registerColor("symbolIcon.enumeratorMemberForeground", {
- dark: "#75BEFF",
- light: "#007ACC",
- hc: "#75BEFF"
- }, n.localize(7, null)), t.SYMBOL_ICON_EVENT_FOREGROUND = o.registerColor("symbolIcon.eventForeground", {
- dark: "#EE9D28",
- light: "#D67E00",
- hc: "#EE9D28"
- }, n.localize(8, null)), t.SYMBOL_ICON_FIELD_FOREGROUND = o.registerColor("symbolIcon.fieldForeground", {
- dark: "#75BEFF",
- light: "#007ACC", hc: "#75BEFF"
- }, n.localize(9, null)), t.SYMBOL_ICON_FILE_FOREGROUND = o.registerColor("symbolIcon.fileForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(10, null)), t.SYMBOL_ICON_FOLDER_FOREGROUND = o.registerColor("symbolIcon.folderForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(11, null)), t.SYMBOL_ICON_FUNCTION_FOREGROUND = o.registerColor("symbolIcon.functionForeground", {
- dark: "#B180D7",
- light: "#652D90",
- hc: "#B180D7"
- }, n.localize(12, null)), t.SYMBOL_ICON_INTERFACE_FOREGROUND = o.registerColor("symbolIcon.interfaceForeground", {
- dark: "#75BEFF",
- light: "#007ACC",
- hc: "#75BEFF"
- }, n.localize(13, null)), t.SYMBOL_ICON_KEY_FOREGROUND = o.registerColor("symbolIcon.keyForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(14, null)), t.SYMBOL_ICON_KEYWORD_FOREGROUND = o.registerColor("symbolIcon.keywordForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(15, null)),
- t.SYMBOL_ICON_METHOD_FOREGROUND = o.registerColor("symbolIcon.methodForeground", {
- dark: "#B180D7",
- light: "#652D90",
- hc: "#B180D7"
- }, n.localize(16, null)), t.SYMBOL_ICON_MODULE_FOREGROUND = o.registerColor("symbolIcon.moduleForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(17, null)), t.SYMBOL_ICON_NAMESPACE_FOREGROUND = o.registerColor("symbolIcon.namespaceForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(18, null)), t.SYMBOL_ICON_NULL_FOREGROUND = o.registerColor("symbolIcon.nullForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(19, null)), t.SYMBOL_ICON_NUMBER_FOREGROUND = o.registerColor("symbolIcon.numberForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(20, null)), t.SYMBOL_ICON_OBJECT_FOREGROUND = o.registerColor("symbolIcon.objectForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(21, null)), t.SYMBOL_ICON_OPERATOR_FOREGROUND = o.registerColor("symbolIcon.operatorForeground", {
- dark: o.foreground,
- light: o.foreground, hc: o.foreground
- }, n.localize(22, null)), t.SYMBOL_ICON_PACKAGE_FOREGROUND = o.registerColor("symbolIcon.packageForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(23, null)), t.SYMBOL_ICON_PROPERTY_FOREGROUND = o.registerColor("symbolIcon.propertyForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(24, null)), t.SYMBOL_ICON_REFERENCE_FOREGROUND = o.registerColor("symbolIcon.referenceForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(25, null)), t.SYMBOL_ICON_SNIPPET_FOREGROUND = o.registerColor("symbolIcon.snippetForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(26, null)), t.SYMBOL_ICON_STRING_FOREGROUND = o.registerColor("symbolIcon.stringForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(27, null)), t.SYMBOL_ICON_STRUCT_FOREGROUND = o.registerColor("symbolIcon.structForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(28, null)),
- t.SYMBOL_ICON_TEXT_FOREGROUND = o.registerColor("symbolIcon.textForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(29, null)), t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND = o.registerColor("symbolIcon.typeParameterForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(30, null)), t.SYMBOL_ICON_UNIT_FOREGROUND = o.registerColor("symbolIcon.unitForeground", {
- dark: o.foreground,
- light: o.foreground,
- hc: o.foreground
- }, n.localize(31, null)), t.SYMBOL_ICON_VARIABLE_FOREGROUND = o.registerColor("symbolIcon.variableForeground", {
- dark: "#75BEFF",
- light: "#007ACC",
- hc: "#75BEFF"
- }, n.localize(32, null)), i.registerThemingParticipant((function (e, n) {
- var i = e.getColor(t.SYMBOL_ICON_ARRAY_FOREGROUND);
- i && n.addRule(".codicon-symbol-array { color: " + i + " !important; }");
- var o = e.getColor(t.SYMBOL_ICON_BOOLEAN_FOREGROUND);
- o && n.addRule(".codicon-symbol-boolean { color: " + o + " !important; }");
- var r = e.getColor(t.SYMBOL_ICON_CLASS_FOREGROUND);
- r && n.addRule(".codicon-symbol-class { color: " + r + " !important; }")
- ;var s = e.getColor(t.SYMBOL_ICON_METHOD_FOREGROUND);
- s && n.addRule(".codicon-symbol-method { color: " + s + " !important; }");
- var a = e.getColor(t.SYMBOL_ICON_COLOR_FOREGROUND);
- a && n.addRule(".codicon-symbol-color { color: " + a + " !important; }");
- var l = e.getColor(t.SYMBOL_ICON_CONSTANT_FOREGROUND);
- l && n.addRule(".codicon-symbol-constant { color: " + l + " !important; }");
- var u = e.getColor(t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);
- u && n.addRule(".codicon-symbol-constructor { color: " + u + " !important; }");
- var d = e.getColor(t.SYMBOL_ICON_ENUMERATOR_FOREGROUND);
- d && n.addRule("\n\t\t\t.codicon-symbol-value,.codicon-symbol-enum { color: " + d + " !important; }");
- var c = e.getColor(t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);
- c && n.addRule(".codicon-symbol-enum-member { color: " + c + " !important; }");
- var h = e.getColor(t.SYMBOL_ICON_EVENT_FOREGROUND);
- h && n.addRule(".codicon-symbol-event { color: " + h + " !important; }");
- var p = e.getColor(t.SYMBOL_ICON_FIELD_FOREGROUND);
- p && n.addRule(".codicon-symbol-field { color: " + p + " !important; }")
- ;var g = e.getColor(t.SYMBOL_ICON_FILE_FOREGROUND);
- g && n.addRule(".codicon-symbol-file { color: " + g + " !important; }");
- var f = e.getColor(t.SYMBOL_ICON_FOLDER_FOREGROUND);
- f && n.addRule(".codicon-symbol-folder { color: " + f + " !important; }");
- var m = e.getColor(t.SYMBOL_ICON_FUNCTION_FOREGROUND);
- m && n.addRule(".codicon-symbol-function { color: " + m + " !important; }");
- var v = e.getColor(t.SYMBOL_ICON_INTERFACE_FOREGROUND);
- v && n.addRule(".codicon-symbol-interface { color: " + v + " !important; }");
- var _ = e.getColor(t.SYMBOL_ICON_KEY_FOREGROUND);
- _ && n.addRule(".codicon-symbol-key { color: " + _ + " !important; }");
- var y = e.getColor(t.SYMBOL_ICON_KEYWORD_FOREGROUND);
- y && n.addRule(".codicon-symbol-keyword { color: " + y + " !important; }");
- var C = e.getColor(t.SYMBOL_ICON_MODULE_FOREGROUND);
- C && n.addRule(".codicon-symbol-module { color: " + C + " !important; }");
- var b = e.getColor(t.SYMBOL_ICON_NAMESPACE_FOREGROUND);
- b && n.addRule(".codicon-symbol-namespace { color: " + b + " !important; }");
- var S = e.getColor(t.SYMBOL_ICON_NULL_FOREGROUND)
- ;S && n.addRule(".codicon-symbol-null { color: " + S + " !important; }");
- var w = e.getColor(t.SYMBOL_ICON_NUMBER_FOREGROUND);
- w && n.addRule(".codicon-symbol-number { color: " + w + " !important; }");
- var E = e.getColor(t.SYMBOL_ICON_OBJECT_FOREGROUND);
- E && n.addRule(".codicon-symbol-object { color: " + E + " !important; }");
- var L = e.getColor(t.SYMBOL_ICON_OPERATOR_FOREGROUND);
- L && n.addRule(".codicon-symbol-operator { color: " + L + " !important; }");
- var D = e.getColor(t.SYMBOL_ICON_PACKAGE_FOREGROUND);
- D && n.addRule(".codicon-symbol-package { color: " + D + " !important; }");
- var N = e.getColor(t.SYMBOL_ICON_PROPERTY_FOREGROUND);
- N && n.addRule(".codicon-symbol-property { color: " + N + " !important; }");
- var x = e.getColor(t.SYMBOL_ICON_REFERENCE_FOREGROUND);
- x && n.addRule(".codicon-symbol-reference { color: " + x + " !important; }");
- var I = e.getColor(t.SYMBOL_ICON_SNIPPET_FOREGROUND);
- I && n.addRule(".codicon-symbol-snippet { color: " + I + " !important; }");
- var M = e.getColor(t.SYMBOL_ICON_STRING_FOREGROUND)
- ;M && n.addRule(".codicon-symbol-string { color: " + M + " !important; }");
- var k = e.getColor(t.SYMBOL_ICON_STRUCT_FOREGROUND);
- k && n.addRule(".codicon-symbol-struct { color: " + k + " !important; }");
- var T = e.getColor(t.SYMBOL_ICON_TEXT_FOREGROUND);
- T && n.addRule(".codicon-symbol-text { color: " + T + " !important; }");
- var R = e.getColor(t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);
- R && n.addRule(".codicon-symbol-type-parameter { color: " + R + " !important; }");
- var O = e.getColor(t.SYMBOL_ICON_UNIT_FOREGROUND);
- O && n.addRule(".codicon-symbol-unit { color: " + O + " !important; }");
- var P = e.getColor(t.SYMBOL_ICON_VARIABLE_FOREGROUND);
- P && n.addRule(".codicon-symbol-variable { color: " + P + " !important; }")
- }))
- })), define(n[571], i([0, 1, 3, 48, 30, 20, 14]), (function (e, t, n, i, o, r, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e) {
- this._editor = e, this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationId = null, this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null,
- this._startPosition = this._editor.getPosition()
- }
- return e.prototype.dispose = function () {
- this._editor.deltaDecorations(this._allDecorations(), []), this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationId = null, this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null
- }, e.prototype.reset = function () {
- this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationId = null, this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null
- }, e.prototype.getCount = function () {
- return this._decorations.length
- }, e.prototype.getFindScope = function () {
- return this._findScopeDecorationId ? this._editor.getModel().getDecorationRange(this._findScopeDecorationId) : null
- }, e.prototype.getStartPosition = function () {
- return this._startPosition
- }, e.prototype.setStartPosition = function (e) {
- this._startPosition = e, this.setCurrentFindMatch(null)
- }, e.prototype._getDecorationIndex = function (e) {
- var t = this._decorations.indexOf(e);
- return t >= 0 ? t + 1 : 1
- },
- e.prototype.getCurrentMatchesPosition = function (t) {
- for (var n = 0, i = this._editor.getModel().getDecorationsInRange(t); n < i.length; n++) {
- var o = i[n], r = o.options;
- if (r === e._FIND_MATCH_DECORATION || r === e._CURRENT_FIND_MATCH_DECORATION) return this._getDecorationIndex(o.id)
- }
- return 1
- }, e.prototype.setCurrentFindMatch = function (t) {
- var i = this, o = null, r = 0;
- if (t) for (var s = 0, a = this._decorations.length; s < a; s++) {
- var l = this._editor.getModel().getDecorationRange(this._decorations[s]);
- if (t.equalsRange(l)) {
- o = this._decorations[s], r = s + 1;
- break
- }
- }
- return null === this._highlightedDecorationId && null === o || this._editor.changeDecorations((function (t) {
- if (null !== i._highlightedDecorationId && (t.changeDecorationOptions(i._highlightedDecorationId, e._FIND_MATCH_DECORATION), i._highlightedDecorationId = null), null !== o && (i._highlightedDecorationId = o, t.changeDecorationOptions(i._highlightedDecorationId, e._CURRENT_FIND_MATCH_DECORATION)), null !== i._rangeHighlightDecorationId && (t.removeDecoration(i._rangeHighlightDecorationId), i._rangeHighlightDecorationId = null),
- null !== o) {
- var r = i._editor.getModel().getDecorationRange(o);
- if (r.startLineNumber !== r.endLineNumber && 1 === r.endColumn) {
- var s = r.endLineNumber - 1, a = i._editor.getModel().getLineMaxColumn(s);
- r = new n.Range(r.startLineNumber, r.startColumn, s, a)
- }
- i._rangeHighlightDecorationId = t.addDecoration(r, e._RANGE_HIGHLIGHT_DECORATION)
- }
- })), r
- }, e.prototype.set = function (t, i) {
- var o = this;
- this._editor.changeDecorations((function (r) {
- var s = e._FIND_MATCH_DECORATION, a = [];
- if (t.length > 1e3) {
- s = e._FIND_MATCH_NO_OVERVIEW_DECORATION;
- for (var l = o._editor.getModel().getLineCount(), u = o._editor.getLayoutInfo().height / l, d = Math.max(2, Math.ceil(3 / u)), c = t[0].range.startLineNumber, h = t[0].range.endLineNumber, p = 1, g = t.length; p < g; p++) {
- var f = t[p].range;
- h + d >= f.startLineNumber ? f.endLineNumber > h && (h = f.endLineNumber) : (a.push({
- range: new n.Range(c, 1, h, 1),
- options: e._FIND_MATCH_ONLY_OVERVIEW_DECORATION
- }), c = f.startLineNumber, h = f.endLineNumber)
- }
- a.push({range: new n.Range(c, 1, h, 1), options: e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})
- }
- var m = new Array(t.length);
- for (p = 0,
- g = t.length; p < g; p++) m[p] = {range: t[p].range, options: s};
- o._decorations = r.deltaDecorations(o._decorations, m), o._overviewRulerApproximateDecorations = r.deltaDecorations(o._overviewRulerApproximateDecorations, a), o._rangeHighlightDecorationId && (r.removeDecoration(o._rangeHighlightDecorationId), o._rangeHighlightDecorationId = null), o._findScopeDecorationId && (r.removeDecoration(o._findScopeDecorationId), o._findScopeDecorationId = null), i && (o._findScopeDecorationId = r.addDecoration(i, e._FIND_SCOPE_DECORATION))
- }))
- }, e.prototype.matchBeforePosition = function (e) {
- if (0 === this._decorations.length) return null;
- for (var t = this._decorations.length - 1; t >= 0; t--) {
- var n = this._decorations[t], i = this._editor.getModel().getDecorationRange(n);
- if (i && !(i.endLineNumber > e.lineNumber)) {
- if (i.endLineNumber < e.lineNumber) return i;
- if (!(i.endColumn > e.column)) return i
- }
- }
- return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1])
- }, e.prototype.matchAfterPosition = function (e) {
- if (0 === this._decorations.length) return null
- ;
- for (var t = 0, n = this._decorations.length; t < n; t++) {
- var i = this._decorations[t], o = this._editor.getModel().getDecorationRange(i);
- if (o && !(o.startLineNumber < e.lineNumber)) {
- if (o.startLineNumber > e.lineNumber) return o;
- if (!(o.startColumn < e.column)) return o
- }
- }
- return this._editor.getModel().getDecorationRange(this._decorations[0])
- }, e.prototype._allDecorations = function () {
- var e = [];
- return e = (e = e.concat(this._decorations)).concat(this._overviewRulerApproximateDecorations), this._findScopeDecorationId && e.push(this._findScopeDecorationId), this._rangeHighlightDecorationId && e.push(this._rangeHighlightDecorationId), e
- }, e._CURRENT_FIND_MATCH_DECORATION = o.ModelDecorationOptions.register({
- stickiness: 1,
- zIndex: 13,
- className: "currentFindMatch",
- showIfCollapsed: !0,
- overviewRuler: {
- color: s.themeColorFromId(r.overviewRulerFindMatchForeground),
- position: i.OverviewRulerLane.Center
- },
- minimap: {color: s.themeColorFromId(r.minimapFindMatch), position: i.MinimapPosition.Inline}
- }), e._FIND_MATCH_DECORATION = o.ModelDecorationOptions.register({
- stickiness: 1,
- className: "findMatch",
- showIfCollapsed: !0,
- overviewRuler: {
- color: s.themeColorFromId(r.overviewRulerFindMatchForeground),
- position: i.OverviewRulerLane.Center
- },
- minimap: {color: s.themeColorFromId(r.minimapFindMatch), position: i.MinimapPosition.Inline}
- }), e._FIND_MATCH_NO_OVERVIEW_DECORATION = o.ModelDecorationOptions.register({
- stickiness: 1,
- className: "findMatch",
- showIfCollapsed: !0
- }), e._FIND_MATCH_ONLY_OVERVIEW_DECORATION = o.ModelDecorationOptions.register({
- stickiness: 1,
- overviewRuler: {
- color: s.themeColorFromId(r.overviewRulerFindMatchForeground),
- position: i.OverviewRulerLane.Center
- }
- }), e._RANGE_HIGHLIGHT_DECORATION = o.ModelDecorationOptions.register({
- stickiness: 1,
- className: "rangeHighlight",
- isWholeLine: !0
- }), e._FIND_SCOPE_DECORATION = o.ModelDecorationOptions.register({
- className: "findScope",
- isWholeLine: !0
- }), e
- }();
- t.FindDecorations = a
- })), define(n[168], i([0, 1, 15, 2, 80, 13, 3, 22, 144, 571, 379, 380, 18]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}),
- t.CONTEXT_FIND_WIDGET_VISIBLE = new h.RawContextKey("findWidgetVisible", !1), t.CONTEXT_FIND_INPUT_FOCUSED = new h.RawContextKey("findInputFocussed", !1), t.CONTEXT_REPLACE_INPUT_FOCUSED = new h.RawContextKey("replaceInputFocussed", !1), t.ToggleCaseSensitiveKeybinding = {
- primary: 545,
- mac: {primary: 2593}
- }, t.ToggleWholeWordKeybinding = {primary: 565, mac: {primary: 2613}}, t.ToggleRegexKeybinding = {
- primary: 560,
- mac: {primary: 2608}
- }, t.ToggleSearchScopeKeybinding = {primary: 554, mac: {primary: 2602}}, t.FIND_IDS = {
- StartFindAction: "actions.find",
- StartFindWithSelection: "actions.findWithSelection",
- NextMatchFindAction: "editor.action.nextMatchFindAction",
- PreviousMatchFindAction: "editor.action.previousMatchFindAction",
- NextSelectionMatchFindAction: "editor.action.nextSelectionMatchFindAction",
- PreviousSelectionMatchFindAction: "editor.action.previousSelectionMatchFindAction",
- StartFindReplaceAction: "editor.action.startFindReplaceAction",
- CloseFindWidgetCommand: "closeFindWidget",
- ToggleCaseSensitiveCommand: "toggleFindCaseSensitive",
- ToggleWholeWordCommand: "toggleFindWholeWord",
- ToggleRegexCommand: "toggleFindRegex",
- ToggleSearchScopeCommand: "toggleFindInSelection",
- TogglePreserveCaseCommand: "togglePreserveCase",
- ReplaceOneAction: "editor.action.replaceOne",
- ReplaceAllAction: "editor.action.replaceAll",
- SelectAllMatchesAction: "editor.action.selectAllMatches"
- }, t.MATCHES_LIMIT = 19999;
- var p = function () {
- function e(e, t) {
- var o = this;
- this._toDispose = new i.DisposableStore, this._editor = e, this._state = t, this._isDisposed = !1, this._startSearchingTimer = new n.TimeoutTimer, this._decorations = new u.FindDecorations(e), this._toDispose.add(this._decorations), this._updateDecorationsScheduler = new n.RunOnceScheduler((function () {
- return o.research(!1)
- }), 100), this._toDispose.add(this._updateDecorationsScheduler), this._toDispose.add(this._editor.onDidChangeCursorPosition((function (e) {
- 3 !== e.reason && 5 !== e.reason && 6 !== e.reason || o._decorations.setStartPosition(o._editor.getPosition())
- }))), this._ignoreModelContentChanged = !1,
- this._toDispose.add(this._editor.onDidChangeModelContent((function (e) {
- o._ignoreModelContentChanged || (e.isFlush && o._decorations.reset(), o._decorations.setStartPosition(o._editor.getPosition()), o._updateDecorationsScheduler.schedule())
- }))), this._toDispose.add(this._state.onFindReplaceStateChange((function (e) {
- return o._onStateChanged(e)
- }))), this.research(!1, this._state.searchScope)
- }
- return e.prototype.dispose = function () {
- this._isDisposed = !0, i.dispose(this._startSearchingTimer), this._toDispose.dispose()
- }, e.prototype._onStateChanged = function (e) {
- var t = this;
- this._isDisposed || this._editor.hasModel() && (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) && (this._editor.getModel().isTooLargeForSyncing() ? (this._startSearchingTimer.cancel(), this._startSearchingTimer.setIfNotSet((function () {
- e.searchScope ? t.research(e.moveCursor, t._state.searchScope) : t.research(e.moveCursor)
- }), 240)) : e.searchScope ? this.research(e.moveCursor, this._state.searchScope) : this.research(e.moveCursor))
- },
- e._getSearchRange = function (e, t) {
- return t || e.getFullModelRange()
- }, e.prototype.research = function (e, n) {
- var i = null;
- null !== (i = void 0 !== n ? n : this._decorations.getFindScope()) && i.startLineNumber !== i.endLineNumber && (i = 1 === i.endColumn ? new s.Range(i.startLineNumber, 1, i.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(i.endLineNumber - 1)) : new s.Range(i.startLineNumber, 1, i.endLineNumber, this._editor.getModel().getLineMaxColumn(i.endLineNumber)));
- var o = this._findMatches(i, !1, t.MATCHES_LIMIT);
- this._decorations.set(o, i), this._state.changeMatchInfo(this._decorations.getCurrentMatchesPosition(this._editor.getSelection()), this._decorations.getCount(), void 0), e && this._moveToNextMatch(this._decorations.getStartPosition())
- }, e.prototype._hasMatches = function () {
- return this._state.matchesCount > 0
- }, e.prototype._cannotFind = function () {
- if (!this._hasMatches()) {
- var e = this._decorations.getFindScope();
- return e && this._editor.revealRangeInCenterIfOutsideViewport(e, 0), !0
- }
- return !1
- }, e.prototype._setCurrentFindMatch = function (e) {
- var t = this._decorations.setCurrentFindMatch(e);
- this._state.changeMatchInfo(t, this._decorations.getCount(), e), this._editor.setSelection(e), this._editor.revealRangeInCenterIfOutsideViewport(e, 0)
- }, e.prototype._prevSearchPosition = function (e) {
- var t = this._state.isRegex && (this._state.searchString.indexOf("^") >= 0 || this._state.searchString.indexOf("$") >= 0),
- n = e.lineNumber, i = e.column, o = this._editor.getModel();
- return t || 1 === i ? (1 === n ? n = o.getLineCount() : n--, i = o.getLineMaxColumn(n)) : i--, new r.Position(n, i)
- }, e.prototype._moveToPrevMatch = function (n, i) {
- if (void 0 === i && (i = !1), this._decorations.getCount() < t.MATCHES_LIMIT) {
- var o = this._decorations.matchBeforePosition(n);
- return o && o.isEmpty() && o.getStartPosition().equals(n) && (n = this._prevSearchPosition(n), o = this._decorations.matchBeforePosition(n)), void (o && this._setCurrentFindMatch(o))
- }
- if (!this._cannotFind()) {
- var s = this._decorations.getFindScope(), a = e._getSearchRange(this._editor.getModel(), s);
- a.getEndPosition().isBefore(n) && (n = a.getEndPosition()),
- n.isBefore(a.getStartPosition()) && (n = a.getEndPosition());
- var l = n.lineNumber, u = n.column, d = this._editor.getModel(), c = new r.Position(l, u),
- h = d.findPreviousMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, !1);
- if (h && h.range.isEmpty() && h.range.getStartPosition().equals(c) && (c = this._prevSearchPosition(c), h = d.findPreviousMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, !1)), h) return i || a.containsRange(h.range) ? void this._setCurrentFindMatch(h.range) : this._moveToPrevMatch(h.range.getStartPosition(), !0)
- }
- }, e.prototype.moveToPrevMatch = function () {
- this._moveToPrevMatch(this._editor.getSelection().getStartPosition())
- }, e.prototype._nextSearchPosition = function (e) {
- var t = this._state.isRegex && (this._state.searchString.indexOf("^") >= 0 || this._state.searchString.indexOf("$") >= 0),
- n = e.lineNumber, i = e.column, o = this._editor.getModel()
- ;
- return t || i === o.getLineMaxColumn(n) ? (n === o.getLineCount() ? n = 1 : n++, i = 1) : i++, new r.Position(n, i)
- }, e.prototype._moveToNextMatch = function (e) {
- if (this._decorations.getCount() < t.MATCHES_LIMIT) {
- var n = this._decorations.matchAfterPosition(e);
- return n && n.isEmpty() && n.getStartPosition().equals(e) && (e = this._nextSearchPosition(e), n = this._decorations.matchAfterPosition(e)), void (n && this._setCurrentFindMatch(n))
- }
- var i = this._getNextMatch(e, !1, !0);
- i && this._setCurrentFindMatch(i.range)
- }, e.prototype._getNextMatch = function (t, n, i, o) {
- if (void 0 === o && (o = !1), this._cannotFind()) return null;
- var s = this._decorations.getFindScope(), a = e._getSearchRange(this._editor.getModel(), s);
- a.getEndPosition().isBefore(t) && (t = a.getStartPosition()), t.isBefore(a.getStartPosition()) && (t = a.getStartPosition());
- var l = t.lineNumber, u = t.column, d = this._editor.getModel(), c = new r.Position(l, u),
- h = d.findNextMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, n)
- ;
- return i && h && h.range.isEmpty() && h.range.getStartPosition().equals(c) && (c = this._nextSearchPosition(c), h = d.findNextMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, n)), h ? o || a.containsRange(h.range) ? h : this._getNextMatch(h.range.getEndPosition(), n, i, !0) : null
- }, e.prototype.moveToNextMatch = function () {
- this._moveToNextMatch(this._editor.getSelection().getEndPosition())
- }, e.prototype._getReplacePattern = function () {
- return this._state.isRegex ? c.parseReplaceString(this._state.replaceString) : c.ReplacePattern.fromStaticValue(this._state.replaceString)
- }, e.prototype.replace = function () {
- if (this._hasMatches()) {
- var e = this._getReplacePattern(), t = this._editor.getSelection(),
- n = this._getNextMatch(t.getStartPosition(), !0, !1);
- if (n) if (t.equalsRange(n.range)) {
- var i = e.buildReplaceString(n.matches, this._state.preserveCase),
- s = new o.ReplaceCommand(t, i);
- this._executeEditorCommand("replace", s),
- this._decorations.setStartPosition(new r.Position(t.startLineNumber, t.startColumn + i.length)), this.research(!0)
- } else this._decorations.setStartPosition(this._editor.getPosition()), this._setCurrentFindMatch(n.range)
- }
- }, e.prototype._findMatches = function (t, n, i) {
- var o = e._getSearchRange(this._editor.getModel(), t);
- return this._editor.getModel().findMatches(this._state.searchString, o, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, n, i)
- }, e.prototype.replaceAll = function () {
- if (this._hasMatches()) {
- var e = this._decorations.getFindScope();
- null === e && this._state.matchesCount >= t.MATCHES_LIMIT ? this._largeReplaceAll() : this._regularReplaceAll(e), this.research(!1)
- }
- }, e.prototype._largeReplaceAll = function () {
- var e = new l.SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null).parseSearchRequest();
- if (e) {
- var t = e.regex;
- if (!t.multiline) {
- var n = "mu";
- t.ignoreCase && (n += "i"), t.global && (n += "g"), t = new RegExp(t.source, n)
- }
- var i, r = this._editor.getModel(), s = r.getValue(1), a = r.getFullModelRange(),
- u = this._getReplacePattern(), d = this._state.preserveCase;
- i = u.hasReplacementPatterns || d ? s.replace(t, (function () {
- return u.buildReplaceString(arguments, d)
- })) : s.replace(t, u.buildReplaceString(null, d));
- var c = new o.ReplaceCommandThatPreservesSelection(a, i, this._editor.getSelection());
- this._executeEditorCommand("replaceAll", c)
- }
- }, e.prototype._regularReplaceAll = function (e) {
- for (var t = this._getReplacePattern(), n = this._findMatches(e, t.hasReplacementPatterns || this._state.preserveCase, 1073741824), i = [], o = 0, r = n.length; o < r; o++) i[o] = t.buildReplaceString(n[o].matches, this._state.preserveCase);
- var s = new d.ReplaceAllCommand(this._editor.getSelection(), n.map((function (e) {
- return e.range
- })), i);
- this._executeEditorCommand("replaceAll", s)
- }, e.prototype.selectAllMatches = function () {
- if (this._hasMatches()) {
- for (var e = this._decorations.getFindScope(), t = this._findMatches(e, !1, 1073741824).map((function (e) {
- return new a.Selection(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn)
- })), n = this._editor.getSelection(), i = 0, o = t.length; i < o; i++) {
- if (t[i].equalsRange(n)) {
- t = [n].concat(t.slice(0, i)).concat(t.slice(i + 1));
- break
- }
- }
- this._editor.setSelections(t)
- }
- }, e.prototype._executeEditorCommand = function (e, t) {
- try {
- this._ignoreModelContentChanged = !0, this._editor.pushUndoStop(), this._editor.executeCommand(e, t), this._editor.pushUndoStop()
- } finally {
- this._ignoreModelContentChanged = !1
- }
- }, e
- }();
- t.FindModelBoundToEditorModel = p
- })), define(n[572], i([0, 1, 6, 204, 47, 15, 168, 20, 14]), (function (e, t, n, i, o, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function (e) {
- function t(t, o, r, u) {
- var d = e.call(this) || this;
- d._hideSoon = d._register(new s.RunOnceScheduler((function () {
- return d._hide()
- }), 2e3)), d._isVisible = !1, d._editor = t, d._state = o, d._keybindingService = r, d._domNode = document.createElement("div"), d._domNode.className = "findOptionsWidget", d._domNode.style.display = "none", d._domNode.style.top = "10px",
- d._domNode.setAttribute("role", "presentation"), d._domNode.setAttribute("aria-hidden", "true");
- var c = u.getTheme().getColor(l.inputActiveOptionBorder),
- h = u.getTheme().getColor(l.inputActiveOptionBackground);
- return d.caseSensitive = d._register(new i.CaseSensitiveCheckbox({
- appendTitle: d._keybindingLabelFor(a.FIND_IDS.ToggleCaseSensitiveCommand),
- isChecked: d._state.matchCase,
- inputActiveOptionBorder: c,
- inputActiveOptionBackground: h
- })), d._domNode.appendChild(d.caseSensitive.domNode), d._register(d.caseSensitive.onChange((function () {
- d._state.change({matchCase: d.caseSensitive.checked}, !1)
- }))), d.wholeWords = d._register(new i.WholeWordsCheckbox({
- appendTitle: d._keybindingLabelFor(a.FIND_IDS.ToggleWholeWordCommand),
- isChecked: d._state.wholeWord,
- inputActiveOptionBorder: c,
- inputActiveOptionBackground: h
- })), d._domNode.appendChild(d.wholeWords.domNode), d._register(d.wholeWords.onChange((function () {
- d._state.change({wholeWord: d.wholeWords.checked}, !1)
- }))), d.regex = d._register(new i.RegexCheckbox({
- appendTitle: d._keybindingLabelFor(a.FIND_IDS.ToggleRegexCommand),
- isChecked: d._state.isRegex,
- inputActiveOptionBorder: c,
- inputActiveOptionBackground: h
- })), d._domNode.appendChild(d.regex.domNode), d._register(d.regex.onChange((function () {
- d._state.change({isRegex: d.regex.checked}, !1)
- }))), d._editor.addOverlayWidget(d), d._register(d._state.onFindReplaceStateChange((function (e) {
- var t = !1;
- e.isRegex && (d.regex.checked = d._state.isRegex, t = !0), e.wholeWord && (d.wholeWords.checked = d._state.wholeWord, t = !0), e.matchCase && (d.caseSensitive.checked = d._state.matchCase, t = !0), !d._state.isRevealed && t && d._revealTemporarily()
- }))), d._register(n.addDisposableNonBubblingMouseOutListener(d._domNode, (function (e) {
- return d._onMouseOut()
- }))), d._register(n.addDisposableListener(d._domNode, "mouseover", (function (e) {
- return d._onMouseOver()
- }))), d._applyTheme(u.getTheme()), d._register(u.onThemeChange(d._applyTheme.bind(d))), d
- }
- return r(t, e), t.prototype._keybindingLabelFor = function (e) {
- var t = this._keybindingService.lookupKeybinding(e)
- ;
- return t ? " (" + t.getLabel() + ")" : ""
- }, t.prototype.dispose = function () {
- this._editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
- }, t.prototype.getId = function () {
- return t.ID
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.getPosition = function () {
- return {preference: 0}
- }, t.prototype.highlightFindOptions = function () {
- this._revealTemporarily()
- }, t.prototype._revealTemporarily = function () {
- this._show(), this._hideSoon.schedule()
- }, t.prototype._onMouseOut = function () {
- this._hideSoon.schedule()
- }, t.prototype._onMouseOver = function () {
- this._hideSoon.cancel()
- }, t.prototype._show = function () {
- this._isVisible || (this._isVisible = !0, this._domNode.style.display = "block")
- }, t.prototype._hide = function () {
- this._isVisible && (this._isVisible = !1, this._domNode.style.display = "none")
- }, t.prototype._applyTheme = function (e) {
- var t = {
- inputActiveOptionBorder: e.getColor(l.inputActiveOptionBorder),
- inputActiveOptionBackground: e.getColor(l.inputActiveOptionBackground)
- };
- this.caseSensitive.style(t), this.wholeWords.style(t), this.regex.style(t)
- }, t.ID = "editor.contrib.findOptionsWidget", t
- }(o.Widget);
- t.FindOptionsWidget = d, u.registerThemingParticipant((function (e, t) {
- var n = e.getColor(l.editorWidgetBackground);
- n && t.addRule(".monaco-editor .findOptionsWidget { background-color: " + n + "; }");
- var i = e.getColor(l.editorWidgetForeground);
- i && t.addRule(".monaco-editor .findOptionsWidget { color: " + i + "; }");
- var o = e.getColor(l.widgetShadow);
- o && t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px " + o + "; }");
- var r = e.getColor(l.contrastBorder);
- r && t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid " + r + "; }")
- }))
- })), define(n[573], i([0, 1, 439, 6, 50, 138, 104, 47, 15, 10, 2, 16, 5, 3, 168, 20, 14, 520, 310]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- ;var y = n.localize(0, null), C = n.localize(1, null), b = n.localize(2, null), S = n.localize(3, null),
- w = n.localize(4, null), E = n.localize(5, null), L = n.localize(6, null), D = n.localize(7, null),
- N = n.localize(8, null), x = n.localize(9, null), I = n.localize(10, null),
- M = n.localize(11, null, f.MATCHES_LIMIT), k = n.localize(12, null), T = n.localize(13, null), R = 69,
- O = 33, P = "ctrlEnterReplaceAll.windows.donotask", A = h.isMacintosh ? 256 : 2048, F = function (e) {
- this.afterLineNumber = e, this.heightInPx = O, this.suppressMouseDown = !1, this.domNode = document.createElement("div"), this.domNode.className = "dock-find-viewzone"
- };
- function W(e, t, n) {
- var i = !!t.match(/\n/);
- n && i && n.selectionStart > 0 && e.stopPropagation()
- }
- function B(e, t, n) {
- var i = !!t.match(/\n/);
- n && i && n.selectionEnd < n.value.length && e.stopPropagation()
- }
- t.FindWidgetViewZone = F;
- var V = function (e) {
- function t(t, n, o, r, s, a, l, d, h) {
- var p = e.call(this) || this;
- return p._cachedHeight = null, p._codeEditor = t, p._controller = n, p._state = o, p._contextViewProvider = r, p._keybindingService = s, p._contextKeyService = a, p._storageService = d,
- p._notificationService = h, p._ctrlEnterReplaceAllWarningPrompted = !!d.getBoolean(P, 0), p._isVisible = !1, p._isReplaceVisible = !1, p._ignoreChangeEvent = !1, p._updateHistoryDelayer = new u.Delayer(500), p._register(c.toDisposable((function () {
- return p._updateHistoryDelayer.cancel()
- }))), p._register(p._state.onFindReplaceStateChange((function (e) {
- return p._onStateChanged(e)
- }))), p._buildDomNode(), p._updateButtons(), p._tryUpdateWidgetWidth(), p._findInput.inputBox.layout(), p._register(p._codeEditor.onDidChangeConfiguration((function (e) {
- if (e.hasChanged(68) && (p._codeEditor.getOption(68) && p._state.change({isReplaceRevealed: !1}, !1), p._updateButtons()), e.hasChanged(107) && p._tryUpdateWidgetWidth(), e.hasChanged(2) && p.updateAccessibilitySupport(), e.hasChanged(28)) {
- var t = p._codeEditor.getOption(28).addExtraSpaceOnTop;
- t && !p._viewZone && (p._viewZone = new F(0), p._showViewZone()), !t && p._viewZone && p._removeViewZone()
- }
- }))), p.updateAccessibilitySupport(), p._register(p._codeEditor.onDidChangeCursorSelection((function () {
- p._isVisible && p._updateToggleSelectionFindButton()
- }))), p._register(p._codeEditor.onDidFocusEditorWidget((function () {
- if (p._isVisible) {
- var e = p._controller.getGlobalBufferTerm();
- e && e !== p._state.searchString && (p._state.change({searchString: e}, !0), p._findInput.select())
- }
- }))), p._findInputFocused = f.CONTEXT_FIND_INPUT_FOCUSED.bindTo(a), p._findFocusTracker = p._register(i.trackFocus(p._findInput.inputBox.inputElement)), p._register(p._findFocusTracker.onDidFocus((function () {
- p._findInputFocused.set(!0), p._updateSearchScope()
- }))), p._register(p._findFocusTracker.onDidBlur((function () {
- p._findInputFocused.set(!1)
- }))), p._replaceInputFocused = f.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(a), p._replaceFocusTracker = p._register(i.trackFocus(p._replaceInput.inputBox.inputElement)), p._register(p._replaceFocusTracker.onDidFocus((function () {
- p._replaceInputFocused.set(!0), p._updateSearchScope()
- }))), p._register(p._replaceFocusTracker.onDidBlur((function () {
- p._replaceInputFocused.set(!1)
- }))), p._codeEditor.addOverlayWidget(p),
- p._codeEditor.getOption(28).addExtraSpaceOnTop && (p._viewZone = new F(0)), p._applyTheme(l.getTheme()), p._register(l.onThemeChange(p._applyTheme.bind(p))), p._register(p._codeEditor.onDidChangeModel((function () {
- p._isVisible && (p._viewZoneId = void 0)
- }))), p._register(p._codeEditor.onDidScrollChange((function (e) {
- e.scrollTopChanged ? p._layoutViewZone() : setTimeout((function () {
- p._layoutViewZone()
- }), 0)
- }))), p
- }
- return r(t, e), t.prototype.getId = function () {
- return t.ID
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.getPosition = function () {
- return this._isVisible ? {preference: 0} : null
- }, t.prototype._onStateChanged = function (e) {
- if (e.searchString) {
- try {
- this._ignoreChangeEvent = !0, this._findInput.setValue(this._state.searchString)
- } finally {
- this._ignoreChangeEvent = !1
- }
- this._updateButtons()
- }
- if (e.replaceString && (this._replaceInput.inputBox.value = this._state.replaceString), e.isRevealed && (this._state.isRevealed ? this._reveal() : this._hide(!0)),
- e.isReplaceRevealed && (this._state.isReplaceRevealed ? this._codeEditor.getOption(68) || this._isReplaceVisible || (this._isReplaceVisible = !0, this._replaceInput.width = i.getTotalWidth(this._findInput.domNode), this._updateButtons(), this._replaceInput.inputBox.layout()) : this._isReplaceVisible && (this._isReplaceVisible = !1, this._updateButtons())), (e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed) && this._tryUpdateHeight() && this._showViewZone(), e.isRegex && this._findInput.setRegex(this._state.isRegex), e.wholeWord && this._findInput.setWholeWords(this._state.wholeWord), e.matchCase && this._findInput.setCaseSensitive(this._state.matchCase), e.searchScope && (this._state.searchScope ? this._toggleSelectionFind.checked = !0 : this._toggleSelectionFind.checked = !1, this._updateToggleSelectionFindButton()), e.searchString || e.matchesCount || e.matchesPosition) {
- var t = this._state.searchString.length > 0 && 0 === this._state.matchesCount;
- i.toggleClass(this._domNode, "no-results", t), this._updateMatchesCount(),
- this._updateButtons()
- }
- (e.searchString || e.currentMatch) && this._layoutViewZone(), e.updateHistory && this._delayedUpdateHistory()
- }, t.prototype._delayedUpdateHistory = function () {
- this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))
- }, t.prototype._updateHistory = function () {
- this._state.searchString && this._findInput.inputBox.addToHistory(), this._state.replaceString && this._replaceInput.inputBox.addToHistory()
- }, t.prototype._updateMatchesCount = function () {
- var e;
- if (this._matchesCount.style.minWidth = R + "px", this._state.matchesCount >= f.MATCHES_LIMIT ? this._matchesCount.title = M : this._matchesCount.title = "", this._matchesCount.firstChild && this._matchesCount.removeChild(this._matchesCount.firstChild), this._state.matchesCount > 0) {
- var t = String(this._state.matchesCount);
- this._state.matchesCount >= f.MATCHES_LIMIT && (t += "+");
- var n = String(this._state.matchesPosition);
- "0" === n && (n = "?"), e = p.format(k, n, t)
- } else e = T;
- this._matchesCount.appendChild(document.createTextNode(e)),
- o.alert(this._getAriaLabel(e, this._state.currentMatch, this._state.searchString), !0), R = Math.max(R, this._matchesCount.clientWidth)
- }, t.prototype._getAriaLabel = function (e, t, i) {
- return e === T ? "" === i ? n.localize(14, null, e) : n.localize(15, null, e, i) : t ? n.localize(16, null, e, i, t.startLineNumber + ":" + t.startColumn) : n.localize(17, null, e, i)
- }, t.prototype._updateToggleSelectionFindButton = function () {
- var e = this._codeEditor.getSelection(),
- t = !!e && (e.startLineNumber !== e.endLineNumber || e.startColumn !== e.endColumn),
- n = this._toggleSelectionFind.checked;
- this._isVisible && (n || t) ? this._toggleSelectionFind.enable() : this._toggleSelectionFind.disable()
- }, t.prototype._updateButtons = function () {
- this._findInput.setEnabled(this._isVisible), this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible), this._updateToggleSelectionFindButton(), this._closeBtn.setEnabled(this._isVisible);
- var e = this._state.searchString.length > 0, t = !!this._state.matchesCount;
- this._prevBtn.setEnabled(this._isVisible && e && t),
- this._nextBtn.setEnabled(this._isVisible && e && t), this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && e), this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && e), i.toggleClass(this._domNode, "replaceToggled", this._isReplaceVisible), this._toggleReplaceBtn.toggleClass("codicon-chevron-right", !this._isReplaceVisible), this._toggleReplaceBtn.toggleClass("codicon-chevron-down", this._isReplaceVisible), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
- var n = !this._codeEditor.getOption(68);
- this._toggleReplaceBtn.setEnabled(this._isVisible && n)
- }, t.prototype._reveal = function () {
- var e = this;
- if (!this._isVisible) {
- this._isVisible = !0;
- var t = this._codeEditor.getSelection();
- switch (this._codeEditor.getOption(28).autoFindInSelection) {
- case"always":
- this._toggleSelectionFind.checked = !0;
- break;
- case"never":
- this._toggleSelectionFind.checked = !1;
- break;
- case"multiline":
- var n = !!t && t.startLineNumber !== t.endLineNumber;
- this._toggleSelectionFind.checked = n
- }
- this._tryUpdateWidgetWidth(), this._updateButtons(),
- setTimeout((function () {
- i.addClass(e._domNode, "visible"), e._domNode.setAttribute("aria-hidden", "false")
- }), 0), setTimeout((function () {
- e._findInput.validate()
- }), 200), this._codeEditor.layoutOverlayWidget(this);
- var o = !0;
- if (this._codeEditor.getOption(28).seedSearchStringFromSelection && t) {
- var r = this._codeEditor.getDomNode();
- if (r) {
- var s = i.getDomNodePagePosition(r),
- a = this._codeEditor.getScrolledVisiblePosition(t.getStartPosition()),
- l = s.left + (a ? a.left : 0), u = a ? a.top : 0;
- if (this._viewZone && u < this._viewZone.heightInPx) {
- t.endLineNumber > t.startLineNumber && (o = !1);
- var d = i.getTopLeftOffset(this._domNode).left;
- l > d && (o = !1);
- var c = this._codeEditor.getScrolledVisiblePosition(t.getEndPosition());
- s.left + (c ? c.left : 0) > d && (o = !1)
- }
- }
- }
- this._showViewZone(o)
- }
- }, t.prototype._hide = function (e) {
- this._isVisible && (this._isVisible = !1, this._updateButtons(), i.removeClass(this._domNode, "visible"), this._domNode.setAttribute("aria-hidden", "true"), this._findInput.clearMessage(), e && this._codeEditor.focus(), this._codeEditor.layoutOverlayWidget(this),
- this._removeViewZone())
- }, t.prototype._layoutViewZone = function () {
- var e = this;
- if (this._codeEditor.getOption(28).addExtraSpaceOnTop) {
- if (this._isVisible) {
- var t = this._viewZone;
- void 0 === this._viewZoneId && t && this._codeEditor.changeViewZones((function (n) {
- t.heightInPx = e._getHeight(), e._viewZoneId = n.addZone(t), e._codeEditor.setScrollTop(e._codeEditor.getScrollTop() + t.heightInPx)
- }))
- }
- } else this._removeViewZone()
- }, t.prototype._showViewZone = function (e) {
- var t = this;
- if ((void 0 === e && (e = !0), this._isVisible) && this._codeEditor.getOption(28).addExtraSpaceOnTop) {
- void 0 === this._viewZone && (this._viewZone = new F(0));
- var n = this._viewZone;
- this._codeEditor.changeViewZones((function (i) {
- if (void 0 !== t._viewZoneId) {
- var o = t._getHeight();
- if (o === n.heightInPx) return;
- var r = o - n.heightInPx;
- return n.heightInPx = o, i.layoutZone(t._viewZoneId), void (e && t._codeEditor.setScrollTop(t._codeEditor.getScrollTop() + r))
- }
- r = t._getHeight();
- n.heightInPx = r, t._viewZoneId = i.addZone(n), e && t._codeEditor.setScrollTop(t._codeEditor.getScrollTop() + r)
- }))
- }
- },
- t.prototype._removeViewZone = function () {
- var e = this;
- this._codeEditor.changeViewZones((function (t) {
- void 0 !== e._viewZoneId && (t.removeZone(e._viewZoneId), e._viewZoneId = void 0, e._viewZone && (e._codeEditor.setScrollTop(e._codeEditor.getScrollTop() - e._viewZone.heightInPx), e._viewZone = void 0))
- }))
- }, t.prototype._applyTheme = function (e) {
- var t = {
- inputActiveOptionBorder: e.getColor(m.inputActiveOptionBorder),
- inputActiveOptionBackground: e.getColor(m.inputActiveOptionBackground),
- inputBackground: e.getColor(m.inputBackground),
- inputForeground: e.getColor(m.inputForeground),
- inputBorder: e.getColor(m.inputBorder),
- inputValidationInfoBackground: e.getColor(m.inputValidationInfoBackground),
- inputValidationInfoForeground: e.getColor(m.inputValidationInfoForeground),
- inputValidationInfoBorder: e.getColor(m.inputValidationInfoBorder),
- inputValidationWarningBackground: e.getColor(m.inputValidationWarningBackground),
- inputValidationWarningForeground: e.getColor(m.inputValidationWarningForeground),
- inputValidationWarningBorder: e.getColor(m.inputValidationWarningBorder),
- inputValidationErrorBackground: e.getColor(m.inputValidationErrorBackground),
- inputValidationErrorForeground: e.getColor(m.inputValidationErrorForeground),
- inputValidationErrorBorder: e.getColor(m.inputValidationErrorBorder)
- };
- this._findInput.style(t), this._replaceInput.style(t), this._toggleSelectionFind.style(t)
- }, t.prototype._tryUpdateWidgetWidth = function () {
- if (this._isVisible && i.isInDOM(this._domNode)) {
- var e = this._codeEditor.getLayoutInfo();
- if (e.contentWidth <= 0) i.addClass(this._domNode, "hiddenEditor"); else {
- i.hasClass(this._domNode, "hiddenEditor") && i.removeClass(this._domNode, "hiddenEditor");
- var t = e.width, n = e.minimapWidth, o = !1, r = !1, s = !1;
- if (this._resized) if (i.getTotalWidth(this._domNode) > 419) return this._domNode.style.maxWidth = t - 28 - n - 15 + "px", void (this._replaceInput.width = i.getTotalWidth(this._findInput.domNode));
- if (447 + n >= t && (r = !0), 447 + n - R >= t && (s = !0), 447 + n - R >= t + 50 && (o = !0), i.toggleClass(this._domNode, "collapsed-find-widget", o),
- i.toggleClass(this._domNode, "narrow-find-widget", s), i.toggleClass(this._domNode, "reduced-find-widget", r), s || o || (this._domNode.style.maxWidth = t - 28 - n - 15 + "px"), this._resized) {
- this._findInput.inputBox.layout();
- var a = this._findInput.inputBox.element.clientWidth;
- a > 0 && (this._replaceInput.width = a)
- } else this._isReplaceVisible && (this._replaceInput.width = i.getTotalWidth(this._findInput.domNode))
- }
- }
- }, t.prototype._getHeight = function () {
- var e = 0;
- return e += 4, e += this._findInput.inputBox.height + 2, this._isReplaceVisible && (e += 4, e += this._replaceInput.inputBox.height + 2), e += 4
- }, t.prototype._tryUpdateHeight = function () {
- var e = this._getHeight();
- return (null === this._cachedHeight || this._cachedHeight !== e) && (this._cachedHeight = e, this._domNode.style.height = e + "px", !0)
- }, t.prototype.focusFindInput = function () {
- this._findInput.select(), this._findInput.focus()
- }, t.prototype.focusReplaceInput = function () {
- this._replaceInput.select(), this._replaceInput.focus()
- }, t.prototype.highlightFindOptions = function () {
- this._findInput.highlightFindOptions()
- },
- t.prototype._updateSearchScope = function () {
- if (this._codeEditor.hasModel() && this._toggleSelectionFind.checked) {
- var e = this._codeEditor.getSelection();
- 1 === e.endColumn && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber - 1)));
- var t = this._state.currentMatch;
- e.startLineNumber !== e.endLineNumber && (g.Range.equalsRange(e, t) || this._state.change({searchScope: e}, !0))
- }
- }, t.prototype._onFindInputMouseDown = function (e) {
- e.middleButton && e.stopPropagation()
- }, t.prototype._onFindInputKeyDown = function (e) {
- return e.equals(3 | A) ? (this._findInput.inputBox.insertAtCursor("\n"), void e.preventDefault()) : e.equals(2) ? (this._isReplaceVisible ? this._replaceInput.focus() : this._findInput.focusOnCaseSensitive(), void e.preventDefault()) : e.equals(2066) ? (this._codeEditor.focus(),
- void e.preventDefault()) : e.equals(16) ? W(e, this._findInput.getValue(), this._findInput.domNode.querySelector("textarea")) : e.equals(18) ? B(e, this._findInput.getValue(), this._findInput.domNode.querySelector("textarea")) : void 0
- }, t.prototype._onReplaceInputKeyDown = function (e) {
- return e.equals(3 | A) ? (h.isWindows && h.isNative && !this._ctrlEnterReplaceAllWarningPrompted && (this._notificationService.info(n.localize(18, null)), this._ctrlEnterReplaceAllWarningPrompted = !0, this._storageService.store(P, !0, 0)), this._replaceInput.inputBox.insertAtCursor("\n"), void e.preventDefault()) : e.equals(2) ? (this._findInput.focusOnCaseSensitive(), void e.preventDefault()) : e.equals(1026) ? (this._findInput.focus(), void e.preventDefault()) : e.equals(2066) ? (this._codeEditor.focus(), void e.preventDefault()) : e.equals(16) ? W(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector("textarea")) : e.equals(18) ? B(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector("textarea")) : void 0
- },
- t.prototype.getHorizontalSashTop = function (e) {
- return 0
- }, t.prototype.getHorizontalSashLeft = function (e) {
- return 0
- }, t.prototype.getHorizontalSashWidth = function (e) {
- return 500
- }, t.prototype._keybindingLabelFor = function (e) {
- var t = this._keybindingService.lookupKeybinding(e);
- return t ? " (" + t.getLabel() + ")" : ""
- }, t.prototype._buildDomNode = function () {
- var e = this;
- this._findInput = this._register(new _.ContextScopedFindInput(null, this._contextViewProvider, {
- width: 221,
- label: y,
- placeholder: C,
- appendCaseSensitiveLabel: this._keybindingLabelFor(f.FIND_IDS.ToggleCaseSensitiveCommand),
- appendWholeWordsLabel: this._keybindingLabelFor(f.FIND_IDS.ToggleWholeWordCommand),
- appendRegexLabel: this._keybindingLabelFor(f.FIND_IDS.ToggleRegexCommand),
- validation: function (t) {
- if (0 === t.length || !e._findInput.getRegex()) return null;
- try {
- return new RegExp(t), null
- } catch (e) {
- return {content: e.message}
- }
- },
- flexibleHeight: !0,
- flexibleWidth: !0,
- flexibleMaxHeight: 118
- }, this._contextKeyService, !0)), this._findInput.setRegex(!!this._state.isRegex),
- this._findInput.setCaseSensitive(!!this._state.matchCase), this._findInput.setWholeWords(!!this._state.wholeWord), this._register(this._findInput.onKeyDown((function (t) {
- return e._onFindInputKeyDown(t)
- }))), this._register(this._findInput.inputBox.onDidChange((function () {
- e._ignoreChangeEvent || e._state.change({searchString: e._findInput.getValue()}, !0)
- }))), this._register(this._findInput.onDidOptionChange((function () {
- e._state.change({
- isRegex: e._findInput.getRegex(),
- wholeWord: e._findInput.getWholeWords(),
- matchCase: e._findInput.getCaseSensitive()
- }, !0)
- }))), this._register(this._findInput.onCaseSensitiveKeyDown((function (t) {
- t.equals(1026) && e._isReplaceVisible && (e._replaceInput.focus(), t.preventDefault())
- }))), this._register(this._findInput.onRegexKeyDown((function (t) {
- t.equals(2) && e._isReplaceVisible && (e._replaceInput.focusOnPreserve(), t.preventDefault())
- }))), this._register(this._findInput.inputBox.onDidHeightChange((function (t) {
- e._tryUpdateHeight() && e._showViewZone()
- }))),
- h.isLinux && this._register(this._findInput.onMouseDown((function (t) {
- return e._onFindInputMouseDown(t)
- }))), this._matchesCount = document.createElement("div"), this._matchesCount.className = "matchesCount", this._updateMatchesCount(), this._prevBtn = this._register(new z({
- label: b + this._keybindingLabelFor(f.FIND_IDS.PreviousMatchFindAction),
- className: "codicon codicon-arrow-up",
- onTrigger: function () {
- e._codeEditor.getAction(f.FIND_IDS.PreviousMatchFindAction).run().then(void 0, d.onUnexpectedError)
- }
- })), this._nextBtn = this._register(new z({
- label: S + this._keybindingLabelFor(f.FIND_IDS.NextMatchFindAction),
- className: "codicon codicon-arrow-down",
- onTrigger: function () {
- e._codeEditor.getAction(f.FIND_IDS.NextMatchFindAction).run().then(void 0, d.onUnexpectedError)
- }
- }));
- var t = document.createElement("div");
- t.className = "find-part", t.appendChild(this._findInput.domNode);
- var n = document.createElement("div");
- n.className = "find-actions", t.appendChild(n), n.appendChild(this._matchesCount), n.appendChild(this._prevBtn.domNode),
- n.appendChild(this._nextBtn.domNode), this._toggleSelectionFind = this._register(new s.Checkbox({
- actionClassName: "codicon codicon-selection",
- title: w + this._keybindingLabelFor(f.FIND_IDS.ToggleSearchScopeCommand),
- isChecked: !1
- })), this._register(this._toggleSelectionFind.onChange((function () {
- if (e._toggleSelectionFind.checked) {
- if (e._codeEditor.hasModel()) {
- var t = e._codeEditor.getSelection();
- 1 === t.endColumn && t.endLineNumber > t.startLineNumber && (t = t.setEndPosition(t.endLineNumber - 1, e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber - 1))), t.isEmpty() || e._state.change({searchScope: t}, !0)
- }
- } else e._state.change({searchScope: null}, !0)
- }))), n.appendChild(this._toggleSelectionFind.domNode), this._closeBtn = this._register(new z({
- label: E + this._keybindingLabelFor(f.FIND_IDS.CloseFindWidgetCommand),
- className: "codicon codicon-close",
- onTrigger: function () {
- e._state.change({isRevealed: !1, searchScope: null}, !1)
- },
- onKeyDown: function (t) {
- t.equals(2) && e._isReplaceVisible && (e._replaceBtn.isEnabled() ? e._replaceBtn.focus() : e._codeEditor.focus(), t.preventDefault())
- }
- })), n.appendChild(this._closeBtn.domNode), this._replaceInput = this._register(new _.ContextScopedReplaceInput(null, void 0, {
- label: L,
- placeholder: D,
- history: [],
- flexibleHeight: !0,
- flexibleWidth: !0,
- flexibleMaxHeight: 118
- }, this._contextKeyService, !0)), this._replaceInput.setPreserveCase(!!this._state.preserveCase), this._register(this._replaceInput.onKeyDown((function (t) {
- return e._onReplaceInputKeyDown(t)
- }))), this._register(this._replaceInput.inputBox.onDidChange((function () {
- e._state.change({replaceString: e._replaceInput.inputBox.value}, !1)
- }))), this._register(this._replaceInput.inputBox.onDidHeightChange((function (t) {
- e._isReplaceVisible && e._tryUpdateHeight() && e._showViewZone()
- }))), this._register(this._replaceInput.onDidOptionChange((function () {
- e._state.change({preserveCase: e._replaceInput.getPreserveCase()}, !0)
- }))), this._register(this._replaceInput.onPreserveCaseKeyDown((function (t) {
- t.equals(2) && (e._prevBtn.isEnabled() ? e._prevBtn.focus() : e._nextBtn.isEnabled() ? e._nextBtn.focus() : e._toggleSelectionFind.enabled ? e._toggleSelectionFind.focus() : e._closeBtn.isEnabled() && e._closeBtn.focus(), t.preventDefault())
- }))), this._replaceBtn = this._register(new z({
- label: N + this._keybindingLabelFor(f.FIND_IDS.ReplaceOneAction),
- className: "codicon codicon-replace",
- onTrigger: function () {
- e._controller.replace()
- },
- onKeyDown: function (t) {
- t.equals(1026) && (e._closeBtn.focus(), t.preventDefault())
- }
- })), this._replaceAllBtn = this._register(new z({
- label: x + this._keybindingLabelFor(f.FIND_IDS.ReplaceAllAction),
- className: "codicon codicon-replace-all",
- onTrigger: function () {
- e._controller.replaceAll()
- }
- }));
- var o = document.createElement("div");
- o.className = "replace-part", o.appendChild(this._replaceInput.domNode);
- var r = document.createElement("div");
- r.className = "replace-actions", o.appendChild(r), r.appendChild(this._replaceBtn.domNode), r.appendChild(this._replaceAllBtn.domNode), this._toggleReplaceBtn = this._register(new z({
- label: I,
- className: "codicon toggle left", onTrigger: function () {
- e._state.change({isReplaceRevealed: !e._isReplaceVisible}, !1), e._isReplaceVisible && (e._replaceInput.width = i.getTotalWidth(e._findInput.domNode), e._replaceInput.inputBox.layout()), e._showViewZone()
- }
- })), this._toggleReplaceBtn.toggleClass("codicon-chevron-down", this._isReplaceVisible), this._toggleReplaceBtn.toggleClass("codicon-chevron-right", !this._isReplaceVisible), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible), this._domNode = document.createElement("div"), this._domNode.className = "editor-widget find-widget", this._domNode.setAttribute("aria-hidden", "true"), this._domNode.style.width = "419px", this._domNode.appendChild(this._toggleReplaceBtn.domNode), this._domNode.appendChild(t), this._domNode.appendChild(o), this._resizeSash = new a.Sash(this._domNode, this, {orientation: 0}), this._resized = !1;
- var l = 419;
- this._register(this._resizeSash.onDidStart((function () {
- l = i.getTotalWidth(e._domNode)
- }))), this._register(this._resizeSash.onDidChange((function (t) {
- e._resized = !0
- ;var n = l + t.startX - t.currentX;
- n < 419 || (n > (parseFloat(i.getComputedStyle(e._domNode).maxWidth) || 0) || (e._domNode.style.width = n + "px", e._isReplaceVisible && (e._replaceInput.width = i.getTotalWidth(e._findInput.domNode)), e._findInput.inputBox.layout(), e._tryUpdateHeight()))
- }))), this._register(this._resizeSash.onDidReset((function () {
- var t = i.getTotalWidth(e._domNode);
- if (!(t < 419)) {
- var n = 419;
- if (!e._resized || 419 === t) {
- var o = e._codeEditor.getLayoutInfo();
- n = o.width - 28 - o.minimapWidth - 15, e._resized = !0
- }
- e._domNode.style.width = n + "px", e._isReplaceVisible && (e._replaceInput.width = i.getTotalWidth(e._findInput.domNode)), e._findInput.inputBox.layout()
- }
- })))
- }, t.prototype.updateAccessibilitySupport = function () {
- var e = this._codeEditor.getOption(2);
- this._findInput.setFocusInputOnOptionClick(2 !== e)
- }, t.ID = "editor.contrib.findWidget", t
- }(l.Widget);
- t.FindWidget = V;
- var z = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._opts = t, n._domNode = document.createElement("div"), n._domNode.title = n._opts.label, n._domNode.tabIndex = 0,
- n._domNode.className = "button " + n._opts.className, n._domNode.setAttribute("role", "button"), n._domNode.setAttribute("aria-label", n._opts.label), n.onclick(n._domNode, (function (e) {
- n._opts.onTrigger(), e.preventDefault()
- })), n.onkeydown(n._domNode, (function (e) {
- if (e.equals(10) || e.equals(3)) return n._opts.onTrigger(), void e.preventDefault();
- n._opts.onKeyDown && n._opts.onKeyDown(e)
- })), n
- }
- return r(t, e), Object.defineProperty(t.prototype, "domNode", {
- get: function () {
- return this._domNode
- }, enumerable: !0, configurable: !0
- }), t.prototype.isEnabled = function () {
- return this._domNode.tabIndex >= 0
- }, t.prototype.focus = function () {
- this._domNode.focus()
- }, t.prototype.setEnabled = function (e) {
- i.toggleClass(this._domNode, "disabled", !e), this._domNode.setAttribute("aria-disabled", String(!e)), this._domNode.tabIndex = e ? 0 : -1
- }, t.prototype.setExpanded = function (e) {
- this._domNode.setAttribute("aria-expanded", String(!!e))
- }, t.prototype.toggleClass = function (e, t) {
- i.toggleClass(this._domNode, e, t)
- }, t
- }(l.Widget);
- t.SimpleButton = z,
- v.registerThemingParticipant((function (e, t) {
- var n = function (e, n) {
- n && t.addRule(".monaco-editor " + e + " { background-color: " + n + "; }")
- };
- n(".findMatch", e.getColor(m.editorFindMatchHighlight)), n(".currentFindMatch", e.getColor(m.editorFindMatch)), n(".findScope", e.getColor(m.editorFindRangeHighlight)), n(".find-widget", e.getColor(m.editorWidgetBackground));
- var i = e.getColor(m.widgetShadow);
- i && t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px " + i + "; }");
- var o = e.getColor(m.editorFindMatchHighlightBorder);
- o && t.addRule(".monaco-editor .findMatch { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + o + "; box-sizing: border-box; }");
- var r = e.getColor(m.editorFindMatchBorder);
- r && t.addRule(".monaco-editor .currentFindMatch { border: 2px solid " + r + "; padding: 1px; box-sizing: border-box; }");
- var s = e.getColor(m.editorFindRangeHighlightBorder);
- s && t.addRule(".monaco-editor .findScope { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + s + "; }");
- var a = e.getColor(m.contrastBorder)
- ;a && t.addRule(".monaco-editor .find-widget { border: 1px solid " + a + "; }");
- var l = e.getColor(m.editorWidgetForeground);
- l && t.addRule(".monaco-editor .find-widget { color: " + l + "; }");
- var u = e.getColor(m.errorForeground);
- u && t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: " + u + "; }");
- var d = e.getColor(m.editorWidgetResizeBorder);
- if (d) t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: " + d + "; width: 3px !important; margin-left: -4px;}"); else {
- var c = e.getColor(m.editorWidgetBorder);
- c && t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: " + c + "; width: 3px !important; margin-left: -4px;}")
- }
- var h = e.getColor(m.focusBorder);
- h && t.addRule(".monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: " + h + "; }")
- }))
- })), define(n[232], i([0, 1, 438, 15, 2, 5, 12, 23, 168, 572, 378, 573, 162, 18, 66, 11, 34, 74, 14, 35]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var w = 524288;
- function E(e) {
- if (!e.hasModel()) return null;
- var t = e.getSelection();
- if (t.startLineNumber === t.endLineNumber) if (t.isEmpty()) {
- var n = e.getModel().getWordAtPosition(t.getStartPosition());
- if (n) return n.word
- } else if (e.getModel().getValueLengthInRange(t) < w) return e.getModel().getValueInRange(t);
- return null
- }
- t.getSelectionSearchString = E;
- var L = function (e) {
- function t(t, n, o, r) {
- var s = e.call(this) || this;
- return s._editor = t, s._findWidgetVisible = u.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(n), s._contextKeyService = n, s._storageService = o, s._clipboardService = r, s._updateHistoryDelayer = new i.Delayer(500), s._state = s._register(new c.FindReplaceState), s.loadQueryState(), s._register(s._state.onFindReplaceStateChange((function (e) {
- return s._onStateChanged(e)
- }))), s._model = null, s._register(s._editor.onDidChangeModel((function () {
- var e = s._editor.getModel() && s._state.isRevealed;
- s.disposeModel(), s._state.change({
- searchScope: null,
- matchCase: s._storageService.getBoolean("editor.matchCase", 1, !1),
- wholeWord: s._storageService.getBoolean("editor.wholeWord", 1, !1),
- isRegex: s._storageService.getBoolean("editor.isRegex", 1, !1),
- preserveCase: s._storageService.getBoolean("editor.preserveCase", 1, !1)
- }, !1), e && s._start({
- forceRevealReplace: !1,
- seedSearchStringFromSelection: !1,
- seedSearchStringFromGlobalClipboard: !1,
- shouldFocus: 0,
- shouldAnimate: !1,
- updateSearchScope: !1
- })
- }))), s
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.dispose = function () {
- this.disposeModel(), e.prototype.dispose.call(this)
- }, t.prototype.disposeModel = function () {
- this._model && (this._model.dispose(), this._model = null)
- }, t.prototype._onStateChanged = function (e) {
- this.saveQueryState(e), e.isRevealed && (this._state.isRevealed ? this._findWidgetVisible.set(!0) : (this._findWidgetVisible.reset(), this.disposeModel())), e.searchString && this.setGlobalBufferTerm(this._state.searchString)
- }, t.prototype.saveQueryState = function (e) {
- e.isRegex && this._storageService.store("editor.isRegex", this._state.actualIsRegex, 1), e.wholeWord && this._storageService.store("editor.wholeWord", this._state.actualWholeWord, 1),
- e.matchCase && this._storageService.store("editor.matchCase", this._state.actualMatchCase, 1), e.preserveCase && this._storageService.store("editor.preserveCase", this._state.actualPreserveCase, 1)
- }, t.prototype.loadQueryState = function () {
- this._state.change({
- matchCase: this._storageService.getBoolean("editor.matchCase", 1, this._state.matchCase),
- wholeWord: this._storageService.getBoolean("editor.wholeWord", 1, this._state.wholeWord),
- isRegex: this._storageService.getBoolean("editor.isRegex", 1, this._state.isRegex),
- preserveCase: this._storageService.getBoolean("editor.preserveCase", 1, this._state.preserveCase)
- }, !1)
- }, t.prototype.isFindInputFocused = function () {
- return !!u.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)
- }, t.prototype.getState = function () {
- return this._state
- }, t.prototype.closeFindWidget = function () {
- this._state.change({isRevealed: !1, searchScope: null}, !1), this._editor.focus()
- }, t.prototype.toggleCaseSensitive = function () {
- this._state.change({matchCase: !this._state.matchCase}, !1),
- this._state.isRevealed || this.highlightFindOptions()
- }, t.prototype.toggleWholeWords = function () {
- this._state.change({wholeWord: !this._state.wholeWord}, !1), this._state.isRevealed || this.highlightFindOptions()
- }, t.prototype.toggleRegex = function () {
- this._state.change({isRegex: !this._state.isRegex}, !1), this._state.isRevealed || this.highlightFindOptions()
- }, t.prototype.toggleSearchScope = function () {
- if (this._state.searchScope) this._state.change({searchScope: null}, !0); else if (this._editor.hasModel()) {
- var e = this._editor.getSelection();
- 1 === e.endColumn && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(e.endLineNumber - 1))), e.isEmpty() || this._state.change({searchScope: e}, !0)
- }
- }, t.prototype.setSearchString = function (e) {
- this._state.isRegex && (e = s.escapeRegExpCharacters(e)), this._state.change({searchString: e}, !1)
- }, t.prototype.highlightFindOptions = function () {
- }, t.prototype._start = function (e) {
- if (this.disposeModel(), this._editor.hasModel()) {
- var t, n = {isRevealed: !0}
- ;
- if (e.seedSearchStringFromSelection) (t = E(this._editor)) && (this._state.isRegex ? n.searchString = s.escapeRegExpCharacters(t) : n.searchString = t);
- if (!n.searchString && e.seedSearchStringFromGlobalClipboard) (t = this.getGlobalBufferTerm()) && (n.searchString = t);
- if (e.forceRevealReplace ? n.isReplaceRevealed = !0 : this._findWidgetVisible.get() || (n.isReplaceRevealed = !1), e.updateSearchScope) {
- var i = this._editor.getSelection();
- i.isEmpty() || (n.searchScope = i)
- }
- this._state.change(n, !1), this._model || (this._model = new u.FindModelBoundToEditorModel(this._editor, this._state))
- }
- }, t.prototype.start = function (e) {
- this._start(e)
- }, t.prototype.moveToNextMatch = function () {
- return !!this._model && (this._model.moveToNextMatch(), !0)
- }, t.prototype.moveToPrevMatch = function () {
- return !!this._model && (this._model.moveToPrevMatch(), !0)
- }, t.prototype.replace = function () {
- return !!this._model && (this._model.replace(), !0)
- }, t.prototype.replaceAll = function () {
- return !!this._model && (this._model.replaceAll(), !0)
- }, t.prototype.selectAllMatches = function () {
- return !!this._model && (this._model.selectAllMatches(), this._editor.focus(), !0)
- }, t.prototype.getGlobalBufferTerm = function () {
- return this._editor.getOption(28).globalFindClipboard && this._clipboardService && this._editor.hasModel() && !this._editor.getModel().isTooLargeForSyncing() ? this._clipboardService.readFindText() : ""
- }, t.prototype.setGlobalBufferTerm = function (e) {
- this._editor.getOption(28).globalFindClipboard && this._clipboardService && this._editor.hasModel() && !this._editor.getModel().isTooLargeForSyncing() && this._clipboardService.writeFindText(e)
- }, t.ID = "editor.contrib.findController", t = h([g(1, m.IContextKeyService), g(2, C.IStorageService), g(3, f.IClipboardService)], t)
- }(o.Disposable);
- t.CommonFindController = L;
- var D = function (e) {
- function t(t, n, i, o, r, s, a, l) {
- var u = e.call(this, t, i, a, l) || this;
- return u._contextViewService = n, u._keybindingService = o, u._themeService = r, u._notificationService = s, u._widget = null, u._findOptionsWidget = null, u
- }
- return r(t, e), t.prototype._start = function (t) {
- this._widget || this._createFindWidget()
- ;var n = this._editor.getSelection(), i = !1;
- switch (this._editor.getOption(28).autoFindInSelection) {
- case"always":
- i = !0;
- break;
- case"never":
- i = !1;
- break;
- case"multiline":
- i = !!n && n.startLineNumber !== n.endLineNumber
- }
- t.updateSearchScope = i, e.prototype._start.call(this, t), 2 === t.shouldFocus ? this._widget.focusReplaceInput() : 1 === t.shouldFocus && this._widget.focusFindInput()
- }, t.prototype.highlightFindOptions = function () {
- this._widget || this._createFindWidget(), this._state.isRevealed ? this._widget.highlightFindOptions() : this._findOptionsWidget.highlightFindOptions()
- }, t.prototype._createFindWidget = function () {
- this._widget = this._register(new p.FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService)), this._findOptionsWidget = this._register(new d.FindOptionsWidget(this._editor, this._state, this._keybindingService, this._themeService))
- },
- t = h([g(1, v.IContextViewService), g(2, m.IContextKeyService), g(3, y.IKeybindingService), g(4, b.IThemeService), g(5, S.INotificationService), g(6, C.IStorageService), g(7, _.optional(f.IClipboardService))], t)
- }(L);
- t.FindController = D;
- var N = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.StartFindAction,
- label: n.localize(0, null),
- alias: "Find",
- precondition: void 0,
- kbOpts: {kbExpr: null, primary: 2084, weight: 100},
- menuOpts: {menuId: 17, group: "3_find", title: n.localize(1, null), order: 1}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = L.get(t);
- n && n.start({
- forceRevealReplace: !1,
- seedSearchStringFromSelection: t.getOption(28).seedSearchStringFromSelection,
- seedSearchStringFromGlobalClipboard: t.getOption(28).globalFindClipboard,
- shouldFocus: 1,
- shouldAnimate: !0,
- updateSearchScope: !1
- })
- }, t
- }(a.EditorAction);
- t.StartFindAction = N;
- var x = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.StartFindWithSelection,
- label: n.localize(2, null),
- alias: "Find With Selection",
- precondition: void 0,
- kbOpts: {
- kbExpr: null, primary: 0, mac: {
- primary: 2083
- }, weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = L.get(t);
- n && (n.start({
- forceRevealReplace: !1,
- seedSearchStringFromSelection: !0,
- seedSearchStringFromGlobalClipboard: !1,
- shouldFocus: 0,
- shouldAnimate: !0,
- updateSearchScope: !1
- }), n.setGlobalBufferTerm(n.getState().searchString))
- }, t
- }(a.EditorAction);
- t.StartFindWithSelectionAction = x;
- var I = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = L.get(t);
- n && !this._run(n) && (n.start({
- forceRevealReplace: !1,
- seedSearchStringFromSelection: 0 === n.getState().searchString.length && t.getOption(28).seedSearchStringFromSelection,
- seedSearchStringFromGlobalClipboard: !0,
- shouldFocus: 0,
- shouldAnimate: !0,
- updateSearchScope: !1
- }), this._run(n))
- }, t
- }(a.EditorAction);
- t.MatchFindAction = I;
- var M = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.NextMatchFindAction,
- label: n.localize(3, null),
- alias: "Find Next",
- precondition: void 0,
- kbOpts: {
- kbExpr: l.EditorContextKeys.focus, primary: 61, mac: {
- primary: 2085,
- secondary: [61]
- }, weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype._run = function (e) {
- return e.moveToNextMatch()
- }, t
- }(I);
- t.NextMatchFindAction = M;
- var k = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.NextMatchFindAction,
- label: n.localize(4, null),
- alias: "Find Next",
- precondition: void 0,
- kbOpts: {
- kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_FIND_INPUT_FOCUSED),
- primary: 3,
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype._run = function (e) {
- return e.moveToNextMatch()
- }, t
- }(I);
- t.NextMatchFindAction2 = k;
- var T = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.PreviousMatchFindAction,
- label: n.localize(5, null),
- alias: "Find Previous",
- precondition: void 0,
- kbOpts: {
- kbExpr: l.EditorContextKeys.focus,
- primary: 1085,
- mac: {primary: 3109, secondary: [1085]},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype._run = function (e) {
- return e.moveToPrevMatch()
- }, t
- }(I);
- t.PreviousMatchFindAction = T;
- var R = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.PreviousMatchFindAction,
- label: n.localize(6, null),
- alias: "Find Previous",
- precondition: void 0,
- kbOpts: {
- kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_FIND_INPUT_FOCUSED),
- primary: 1027,
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype._run = function (e) {
- return e.moveToPrevMatch()
- }, t
- }(I);
- t.PreviousMatchFindAction2 = R;
- var O = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = L.get(t);
- if (n) {
- var i = E(t);
- i && n.setSearchString(i), this._run(n) || (n.start({
- forceRevealReplace: !1,
- seedSearchStringFromSelection: t.getOption(28).seedSearchStringFromSelection,
- seedSearchStringFromGlobalClipboard: !1,
- shouldFocus: 0,
- shouldAnimate: !0,
- updateSearchScope: !1
- }), this._run(n))
- }
- }, t
- }(a.EditorAction);
- t.SelectionMatchFindAction = O;
- var P = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.NextSelectionMatchFindAction,
- label: n.localize(7, null),
- alias: "Find Next Selection",
- precondition: void 0,
- kbOpts: {kbExpr: l.EditorContextKeys.focus, primary: 2109, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype._run = function (e) {
- return e.moveToNextMatch()
- }, t
- }(O);
- t.NextSelectionMatchFindAction = P;
- var A = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.PreviousSelectionMatchFindAction,
- label: n.localize(8, null),
- alias: "Find Previous Selection",
- precondition: void 0,
- kbOpts: {kbExpr: l.EditorContextKeys.focus, primary: 3133, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype._run = function (e) {
- return e.moveToPrevMatch()
- }, t
- }(O);
- t.PreviousSelectionMatchFindAction = A;
- var F = function (e) {
- function t() {
- return e.call(this, {
- id: u.FIND_IDS.StartFindReplaceAction,
- label: n.localize(9, null),
- alias: "Replace",
- precondition: void 0,
- kbOpts: {kbExpr: null, primary: 2086, mac: {primary: 2596}, weight: 100},
- menuOpts: {menuId: 17, group: "3_find", title: n.localize(10, null), order: 2}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel() && !t.getOption(68)) {
- var n = L.get(t), i = t.getSelection(), o = n.isFindInputFocused(),
- r = !i.isEmpty() && i.startLineNumber === i.endLineNumber && t.getOption(28).seedSearchStringFromSelection && !o,
- s = o || r ? 2 : 1;
- n && n.start({
- forceRevealReplace: !0,
- seedSearchStringFromSelection: r,
- seedSearchStringFromGlobalClipboard: t.getOption(28).seedSearchStringFromSelection,
- shouldFocus: s,
- shouldAnimate: !0,
- updateSearchScope: !1
- })
- }
- }, t
- }(a.EditorAction);
- t.StartFindReplaceAction = F, a.registerEditorContribution(L.ID, D), a.registerEditorAction(N), a.registerEditorAction(x), a.registerEditorAction(M), a.registerEditorAction(k), a.registerEditorAction(T), a.registerEditorAction(R), a.registerEditorAction(P), a.registerEditorAction(A), a.registerEditorAction(F);
- var W = a.EditorCommand.bindToContribution(L.get);
- a.registerEditorCommand(new W({
- id: u.FIND_IDS.CloseFindWidgetCommand,
- precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
- handler: function (e) {
- return e.closeFindWidget()
- },
- kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 9, secondary: [1033]}
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ToggleCaseSensitiveCommand, precondition: void 0, handler: function (e) {
- return e.toggleCaseSensitive()
- }, kbOpts: {
- weight: 105,
- kbExpr: l.EditorContextKeys.focus,
- primary: u.ToggleCaseSensitiveKeybinding.primary,
- mac: u.ToggleCaseSensitiveKeybinding.mac,
- win: u.ToggleCaseSensitiveKeybinding.win,
- linux: u.ToggleCaseSensitiveKeybinding.linux
- }
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ToggleWholeWordCommand,
- precondition: void 0,
- handler: function (e) {
- return e.toggleWholeWords()
- },
- kbOpts: {
- weight: 105,
- kbExpr: l.EditorContextKeys.focus,
- primary: u.ToggleWholeWordKeybinding.primary,
- mac: u.ToggleWholeWordKeybinding.mac,
- win: u.ToggleWholeWordKeybinding.win,
- linux: u.ToggleWholeWordKeybinding.linux
- }
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ToggleRegexCommand,
- precondition: void 0,
- handler: function (e) {
- return e.toggleRegex()
- },
- kbOpts: {
- weight: 105,
- kbExpr: l.EditorContextKeys.focus,
- primary: u.ToggleRegexKeybinding.primary,
- mac: u.ToggleRegexKeybinding.mac,
- win: u.ToggleRegexKeybinding.win,
- linux: u.ToggleRegexKeybinding.linux
- }
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ToggleSearchScopeCommand, precondition: void 0, handler: function (e) {
- return e.toggleSearchScope()
- }, kbOpts: {
- weight: 105,
- kbExpr: l.EditorContextKeys.focus,
- primary: u.ToggleSearchScopeKeybinding.primary,
- mac: u.ToggleSearchScopeKeybinding.mac,
- win: u.ToggleSearchScopeKeybinding.win,
- linux: u.ToggleSearchScopeKeybinding.linux
- }
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ReplaceOneAction,
- precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
- handler: function (e) {
- return e.replace()
- },
- kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 3094}
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ReplaceOneAction,
- precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
- handler: function (e) {
- return e.replace()
- },
- kbOpts: {
- weight: 105,
- kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_REPLACE_INPUT_FOCUSED),
- primary: 3
- }
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ReplaceAllAction,
- precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
- handler: function (e) {
- return e.replaceAll()
- },
- kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 2563}
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.ReplaceAllAction, precondition: u.CONTEXT_FIND_WIDGET_VISIBLE, handler: function (e) {
- return e.replaceAll()
- }, kbOpts: {
- weight: 105,
- kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_REPLACE_INPUT_FOCUSED),
- primary: void 0,
- mac: {primary: 2051}
- }
- })), a.registerEditorCommand(new W({
- id: u.FIND_IDS.SelectAllMatchesAction,
- precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
- handler: function (e) {
- return e.selectAllMatches()
- },
- kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 515}
- }))
- })), define(n[574], i([0, 1, 440, 21, 5, 15, 36, 2, 12, 381, 490, 23, 382, 41, 491, 17, 197, 383, 10, 18, 14, 20, 311]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var L = new S.RawContextKey("foldingEnabled", !1), D = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- i.contextKeyService = n, i.localToDispose = i._register(new l.DisposableStore), i.editor = t;
- var o = i.editor.getOptions();
- return i._isEnabled = o.get(30), i._useFoldingProviders = "indentation" !== o.get(31), i.foldingModel = null, i.hiddenRangeModel = null, i.rangeProvider = null, i.foldingRegionPromise = null, i.foldingStateMemento = null, i.foldingModelPromise = null,
- i.updateScheduler = null, i.cursorChangedScheduler = null, i.mouseDownInfo = null, i.foldingDecorationProvider = new c.FoldingDecorationProvider(t), i.foldingDecorationProvider.autoHideFoldingControls = "mouseover" === o.get(84), i.foldingDecorationProvider.showFoldingHighlights = o.get(32), i.foldingEnabled = L.bindTo(i.contextKeyService), i.foldingEnabled.set(i._isEnabled), i._register(i.editor.onDidChangeModel((function () {
- return i.onModelChanged()
- }))), i._register(i.editor.onDidChangeConfiguration((function (e) {
- if (e.hasChanged(30)) {
- var t = i.editor.getOptions();
- i._isEnabled = t.get(30), i.foldingEnabled.set(i._isEnabled), i.onModelChanged()
- }
- if (e.hasChanged(84) || e.hasChanged(32)) {
- var n = i.editor.getOptions();
- i.foldingDecorationProvider.autoHideFoldingControls = "mouseover" === n.get(84), i.foldingDecorationProvider.showFoldingHighlights = n.get(32), i.onModelContentChanged()
- }
- if (e.hasChanged(31)) {
- var o = i.editor.getOptions();
- i._useFoldingProviders = "indentation" !== o.get(31), i.onFoldingStrategyChanged()
- }
- }))), i.onModelChanged(), i
- }
- return r(t, e),
- t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.saveViewState = function () {
- var e = this.editor.getModel();
- if (!e || !this._isEnabled || e.isTooLargeForTokenization()) return {};
- if (this.foldingModel) {
- var t = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : this.hiddenRangeModel.getMemento(),
- n = this.rangeProvider ? this.rangeProvider.id : void 0;
- return {collapsedRegions: t, lineCount: e.getLineCount(), provider: n}
- }
- }, t.prototype.restoreViewState = function (e) {
- var t = this.editor.getModel();
- if (t && this._isEnabled && !t.isTooLargeForTokenization() && this.hiddenRangeModel && e && e.collapsedRegions && e.lineCount === t.getLineCount()) {
- e.provider !== y.ID_SYNTAX_PROVIDER && e.provider !== C.ID_INIT_PROVIDER || (this.foldingStateMemento = e);
- var n = e.collapsedRegions;
- if (this.hiddenRangeModel.applyMemento(n)) {
- var i = this.getFoldingModel();
- i && i.then((function (e) {
- e && e.applyMemento(n)
- })).then(void 0, b.onUnexpectedError)
- }
- }
- }, t.prototype.onModelChanged = function () {
- var e = this;
- this.localToDispose.clear();
- var t = this.editor.getModel()
- ;this._isEnabled && t && !t.isTooLargeForTokenization() && (this.foldingModel = new d.FoldingModel(t, this.foldingDecorationProvider), this.localToDispose.add(this.foldingModel), this.hiddenRangeModel = new f.HiddenRangeModel(this.foldingModel), this.localToDispose.add(this.hiddenRangeModel), this.localToDispose.add(this.hiddenRangeModel.onDidChange((function (t) {
- return e.onHiddenRangesChanges(t)
- }))), this.updateScheduler = new s.Delayer(200), this.cursorChangedScheduler = new s.RunOnceScheduler((function () {
- return e.revealCursor()
- }), 200), this.localToDispose.add(this.cursorChangedScheduler), this.localToDispose.add(_.FoldingRangeProviderRegistry.onDidChange((function () {
- return e.onFoldingStrategyChanged()
- }))), this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((function () {
- return e.onFoldingStrategyChanged()
- }))), this.localToDispose.add(this.editor.onDidChangeModelContent((function () {
- return e.onModelContentChanged()
- }))), this.localToDispose.add(this.editor.onDidChangeCursorPosition((function () {
- return e.onCursorPositionChanged()
- }))), this.localToDispose.add(this.editor.onMouseDown((function (t) {
- return e.onEditorMouseDown(t)
- }))), this.localToDispose.add(this.editor.onMouseUp((function (t) {
- return e.onEditorMouseUp(t)
- }))), this.localToDispose.add({
- dispose: function () {
- e.foldingRegionPromise && (e.foldingRegionPromise.cancel(), e.foldingRegionPromise = null), e.updateScheduler && e.updateScheduler.cancel(), e.updateScheduler = null, e.foldingModel = null, e.foldingModelPromise = null, e.hiddenRangeModel = null, e.cursorChangedScheduler = null, e.foldingStateMemento = null, e.rangeProvider && e.rangeProvider.dispose(), e.rangeProvider = null
- }
- }), this.onModelContentChanged())
- }, t.prototype.onFoldingStrategyChanged = function () {
- this.rangeProvider && this.rangeProvider.dispose(), this.rangeProvider = null, this.onModelContentChanged()
- }, t.prototype.getRangeProvider = function (e) {
- var t = this;
- if (this.rangeProvider) return this.rangeProvider;
- if (this.rangeProvider = new v.IndentRangeProvider(e), this._useFoldingProviders && this.foldingModel) {
- var n = _.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);
- if (0 === n.length && this.foldingStateMemento && this.foldingStateMemento.collapsedRegions) return this.rangeProvider = new C.InitializingRangeProvider(e, this.foldingStateMemento.collapsedRegions, (function () {
- t.foldingStateMemento = null, t.onFoldingStrategyChanged()
- }), 3e4);
- n.length > 0 && (this.rangeProvider = new y.SyntaxRangeProvider(e, n))
- }
- return this.foldingStateMemento = null, this.rangeProvider
- }, t.prototype.getFoldingModel = function () {
- return this.foldingModelPromise
- }, t.prototype.onModelContentChanged = function () {
- var e = this;
- this.updateScheduler && (this.foldingRegionPromise && (this.foldingRegionPromise.cancel(), this.foldingRegionPromise = null), this.foldingModelPromise = this.updateScheduler.trigger((function () {
- var t = e.foldingModel;
- if (!t) return null;
- var n = e.foldingRegionPromise = s.createCancelablePromise((function (n) {
- return e.getRangeProvider(t.textModel).compute(n)
- }));
- return n.then((function (i) {
- if (i && n === e.foldingRegionPromise) {
- var o = e.editor.getSelections(), r = o ? o.map((function (e) {
- return e.startLineNumber
- })) : [];
- t.update(i, r)
- }
- return t
- }))
- })).then(void 0, (function (e) {
- return b.onUnexpectedError(e), null
- })))
- }, t.prototype.onHiddenRangesChanges = function (e) {
- if (this.hiddenRangeModel && e.length) {
- var t = this.editor.getSelections();
- t && this.hiddenRangeModel.adjustSelections(t) && this.editor.setSelections(t)
- }
- this.editor.setHiddenAreas(e)
- }, t.prototype.onCursorPositionChanged = function () {
- this.hiddenRangeModel && this.hiddenRangeModel.hasRanges() && this.cursorChangedScheduler.schedule()
- }, t.prototype.revealCursor = function () {
- var e = this, t = this.getFoldingModel();
- t && t.then((function (t) {
- if (t) {
- var n = e.editor.getSelections();
- if (n && n.length > 0) {
- for (var i = [], o = function (n) {
- var o = n.selectionStartLineNumber;
- e.hiddenRangeModel && e.hiddenRangeModel.isHidden(o) && i.push.apply(i, t.getAllRegionsAtLine(o, (function (e) {
- return e.isCollapsed && o > e.startLineNumber
- })))
- }, r = 0, s = n; r < s.length; r++) {
- o(s[r])
- }
- i.length && (t.toggleCollapseState(i), e.reveal(n[0].getPosition()))
- }
- }
- })).then(void 0, b.onUnexpectedError)
- }, t.prototype.onEditorMouseDown = function (e) {
- if (this.mouseDownInfo = null, this.hiddenRangeModel && e.target && e.target.range && (e.event.leftButton || e.event.middleButton)) {
- var t = e.target.range, n = !1;
- switch (e.target.type) {
- case 4:
- var i = e.target.detail, o = e.target.element.offsetLeft;
- if (i.offsetX - o < 5) return;
- n = !0;
- break;
- case 6:
- if (this.hiddenRangeModel.hasRanges()) {
- var r = this.editor.getModel();
- if (r && t.startColumn === r.getLineMaxColumn(t.startLineNumber)) break
- }
- return;
- default:
- return
- }
- this.mouseDownInfo = {lineNumber: t.startLineNumber, iconClicked: n}
- }
- }, t.prototype.onEditorMouseUp = function (e) {
- var t = this, n = this.getFoldingModel();
- if (n && this.mouseDownInfo && e.target) {
- var i = this.mouseDownInfo.lineNumber, o = this.mouseDownInfo.iconClicked, r = e.target.range;
- if (r && r.startLineNumber === i) {
- if (o) {
- if (4 !== e.target.type) return
- } else {
- var s = this.editor.getModel();
- if (!s || r.startColumn !== s.getLineMaxColumn(i)) return
- }
- n.then((function (n) {
- if (n) {
- var r = n.getRegionAtLine(i);
- if (r && r.startLineNumber === i) {
- var s = r.isCollapsed
- ;
- if (o || s) {
- var a = [], l = e.event.middleButton || e.event.shiftKey;
- if (l) for (var u = 0, d = n.getRegionsInside(r); u < d.length; u++) {
- var c = d[u];
- c.isCollapsed === s && a.push(c)
- }
- !s && l && 0 !== a.length || a.push(r), n.toggleCollapseState(a), t.reveal({
- lineNumber: i,
- column: 1
- })
- }
- }
- }
- })).then(void 0, b.onUnexpectedError)
- }
- }
- }, t.prototype.reveal = function (e) {
- this.editor.revealPositionInCenterIfOutsideViewport(e, 0)
- }, t.ID = "editor.contrib.folding", t = h([g(1, S.IContextKeyService)], t)
- }(l.Disposable);
- t.FoldingController = D;
- var N = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
- var i = this, o = D.get(t);
- if (o) {
- var r = o.getFoldingModel();
- return r ? (this.reportTelemetry(e, t), r.then((function (e) {
- if (e) {
- i.invoke(o, e, t, n);
- var r = t.getSelection();
- r && o.reveal(r.getStartPosition())
- }
- }))) : void 0
- }
- }, t.prototype.getSelectedLines = function (e) {
- var t = e.getSelections();
- return t ? t.map((function (e) {
- return e.startLineNumber
- })) : []
- }, t.prototype.getLineNumbers = function (e, t) {
- return e && e.selectionLines ? e.selectionLines.map((function (e) {
- return e + 1
- })) : this.getSelectedLines(t)
- }, t.prototype.run = function (e, t) {
- }, t
- }(u.EditorAction);
- function x(e) {
- if (!i.isUndefined(e)) {
- if (!i.isObject(e)) return !1;
- var t = e;
- if (!i.isUndefined(t.levels) && !i.isNumber(t.levels)) return !1;
- if (!i.isUndefined(t.direction) && !i.isString(t.direction)) return !1;
- if (!(i.isUndefined(t.selectionLines) || i.isArray(t.selectionLines) && t.selectionLines.every(i.isNumber))) return !1
- }
- return !0
- }
- var I = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.unfold",
- label: n.localize(0, null),
- alias: "Unfold",
- precondition: L,
- kbOpts: {
- kbExpr: p.EditorContextKeys.editorTextFocus,
- primary: 3161,
- mac: {primary: 2649},
- weight: 100
- },
- description: {
- description: "Unfold the content in the editor", args: [{
- name: "Unfold editor argument",
- description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",
- constraint: x,
- schema: {
- type: "object",
- properties: {
- levels: {type: "number", default: 1},
- direction: {type: "string", enum: ["up", "down"], default: "down"},
- selectionLines: {type: "array", items: {type: "number"}}
- }
- }
- }]
- }
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n, i) {
- var o = i && i.levels || 1, r = this.getLineNumbers(i, n);
- i && "up" === i.direction ? d.setCollapseStateLevelsUp(t, !1, o, r) : d.setCollapseStateLevelsDown(t, !1, o, r)
- }, t
- }(N), M = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.unfoldRecursively",
- label: n.localize(1, null),
- alias: "Unfold Recursively",
- precondition: L,
- kbOpts: {
- kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2137), weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n, i) {
- d.setCollapseStateLevelsDown(t, !1, Number.MAX_VALUE, this.getSelectedLines(n))
- }, t
- }(N), k = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.fold",
- label: n.localize(2, null),
- alias: "Fold",
- precondition: L,
- kbOpts: {
- kbExpr: p.EditorContextKeys.editorTextFocus,
- primary: 3159,
- mac: {primary: 2647},
- weight: 100
- },
- description: {
- description: "Fold the content in the editor", args: [{
- name: "Fold editor argument",
- description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",
- constraint: x,
- schema: {
- type: "object",
- properties: {
- levels: {type: "number"},
- direction: {type: "string", enum: ["up", "down"]},
- selectionLines: {type: "array", items: {type: "number"}}
- }
- }
- }]
- }
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n, i) {
- var o = this.getLineNumbers(i, n), r = i && i.levels, s = i && i.direction;
- "number" != typeof r && "string" != typeof s ? d.setCollapseStateUp(t, !0, o) : "up" === s ? d.setCollapseStateLevelsUp(t, !0, r || 1, o) : d.setCollapseStateLevelsDown(t, !0, r || 1, o)
- }, t
- }(N), T = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.toggleFold",
- label: n.localize(3, null),
- alias: "Toggle Fold",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2090), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- var i = this.getSelectedLines(n);
- d.toggleCollapseState(t, 1, i)
- }, t
- }(N), R = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.foldRecursively",
- label: n.localize(4, null),
- alias: "Fold Recursively",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2135), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- var i = this.getSelectedLines(n);
- d.setCollapseStateLevelsDown(t, !0, Number.MAX_VALUE, i)
- }, t
- }(N), O = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.foldAllBlockComments",
- label: n.localize(5, null),
- alias: "Fold All Block Comments",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2133), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- if (t.regions.hasTypes()) d.setCollapseStateForType(t, _.FoldingRangeKind.Comment.value, !0); else {
- var i = n.getModel();
- if (!i) return;
- var r = m.LanguageConfigurationRegistry.getComments(i.getLanguageIdentifier().id);
- if (r && r.blockCommentStartToken) {
- var s = new RegExp("^\\s*" + o.escapeRegExpCharacters(r.blockCommentStartToken));
- d.setCollapseStateForMatchingLines(t, s, !0)
- }
- }
- }, t
- }(N), P = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.foldAllMarkerRegions",
- label: n.localize(6, null),
- alias: "Fold All Regions",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2077), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- if (t.regions.hasTypes()) d.setCollapseStateForType(t, _.FoldingRangeKind.Region.value, !0); else {
- var i = n.getModel();
- if (!i) return;
- var o = m.LanguageConfigurationRegistry.getFoldingRules(i.getLanguageIdentifier().id);
- if (o && o.markers && o.markers.start) {
- var r = new RegExp(o.markers.start);
- d.setCollapseStateForMatchingLines(t, r, !0)
- }
- }
- }, t
- }(N), A = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.unfoldAllMarkerRegions",
- label: n.localize(7, null),
- alias: "Unfold All Regions",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2078), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- if (t.regions.hasTypes()) d.setCollapseStateForType(t, _.FoldingRangeKind.Region.value, !1); else {
- var i = n.getModel();
- if (!i) return;
- var o = m.LanguageConfigurationRegistry.getFoldingRules(i.getLanguageIdentifier().id);
- if (o && o.markers && o.markers.start) {
- var r = new RegExp(o.markers.start);
- d.setCollapseStateForMatchingLines(t, r, !1)
- }
- }
- }, t
- }(N), F = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.foldAll",
- label: n.localize(8, null),
- alias: "Fold All",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2069), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- d.setCollapseStateLevelsDown(t, !0)
- }, t
- }(N), W = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.unfoldAll",
- label: n.localize(9, null),
- alias: "Unfold All",
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2088), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.invoke = function (e, t, n) {
- d.setCollapseStateLevelsDown(t, !1)
- }, t
- }(N), B = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.getFoldingLevel = function () {
- return parseInt(this.id.substr(t.ID_PREFIX.length))
- }, t.prototype.invoke = function (e, t, n) {
- d.setCollapseStateAtLevel(t, this.getFoldingLevel(), !0, this.getSelectedLines(n))
- }, t.ID_PREFIX = "editor.foldLevel", t.ID = function (e) {
- return t.ID_PREFIX + e
- }, t
- }(N);
- u.registerEditorContribution(D.ID, D), u.registerEditorAction(I), u.registerEditorAction(M), u.registerEditorAction(k), u.registerEditorAction(R), u.registerEditorAction(F), u.registerEditorAction(W), u.registerEditorAction(O), u.registerEditorAction(P), u.registerEditorAction(A), u.registerEditorAction(T);
- for (var V = 1; V <= 7; V++) u.registerInstantiatedEditorAction(new B({
- id: B.ID(V),
- label: n.localize(10, null, V),
- alias: "Fold Level " + V,
- precondition: L,
- kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2048 | 21 + V), weight: 100}
- }));
- t.foldBackgroundBackground = E.registerColor("editor.foldBackground", {
- light: E.transparent(E.editorSelectionBackground, .3),
- dark: E.transparent(E.editorSelectionBackground, .3),
- hc: null
- }, n.localize(11, null)), w.registerThemingParticipant((function (e, n) {
- var i = e.getColor(t.foldBackgroundBackground);
- i && n.addRule(".monaco-editor .folded-background { background-color: " + i + "; }")
- }))
- })), define(n[575], i([0, 1, 113, 84, 139, 267, 116, 14, 97, 6, 449, 136, 39, 2, 11, 34, 61, 133]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = function () {
- function e(e) {
- this._resolverService = e
- }
- return e.prototype.hasChildren = function (e) {
- return e instanceof n.ReferencesModel || e instanceof n.FileReferences && !e.failure
- }, e.prototype.getChildren = function (e) {
- if (e instanceof n.ReferencesModel) return e.groups
- ;
- if (e instanceof n.FileReferences) return e.resolve(this._resolverService).then((function (e) {
- return e.children
- }));
- throw new Error("bad tree")
- }, e = h([g(0, i.ITextModelService)], e)
- }();
- t.DataSource = b;
- var S = function () {
- function e() {
- }
- return e.prototype.getHeight = function () {
- return 23
- }, e.prototype.getTemplateId = function (e) {
- return e instanceof n.FileReferences ? D.id : x.id
- }, e
- }();
- t.Delegate = S;
- var w = function () {
- function e(e) {
- this._keybindingService = e
- }
- return e.prototype.getKeyboardNavigationLabel = function (e) {
- if (e instanceof n.OneReference) {
- var t = e.parent.preview, i = t && t.preview(e.range);
- if (i) return i.value
- }
- return f.basename(e.uri)
- }, e = h([g(0, _.IKeybindingService)], e)
- }();
- t.StringRepresentationProvider = w;
- var E = function () {
- function e() {
- }
- return e.prototype.getId = function (e) {
- return e instanceof n.OneReference ? e.id : e.uri
- }, e
- }();
- t.IdentityProvider = E;
- var L = function (e) {
- function t(t, n, i) {
- var r = e.call(this) || this;
- r._uriLabel = n;
- var a = document.createElement("div");
- return d.addClass(a, "reference-file"), r.file = r._register(new o.IconLabel(a, {
- supportHighlights: !0
- })), r.badge = new s.CountBadge(d.append(a, d.$(".count"))), r._register(u.attachBadgeStyler(r.badge, i)), t.appendChild(a), r
- }
- return r(t, e), t.prototype.set = function (e, t) {
- var n = f.dirname(e.uri);
- this.file.setLabel(p.getBaseLabel(e.uri), this._uriLabel.getUriLabel(n, {relative: !0}), {
- title: this._uriLabel.getUriLabel(e.uri),
- matches: t
- });
- var i = e.children.length;
- this.badge.setCount(i), e.failure ? this.badge.setTitleFormat(c.localize(0, null)) : i > 1 ? this.badge.setTitleFormat(c.localize(1, null, i)) : this.badge.setTitleFormat(c.localize(2, null, i))
- }, t = h([g(1, a.ILabelService), g(2, l.IThemeService)], t)
- }(m.Disposable), D = function () {
- function e(t) {
- this._instantiationService = t, this.templateId = e.id
- }
- return e.prototype.renderTemplate = function (e) {
- return this._instantiationService.createInstance(L, e)
- }, e.prototype.renderElement = function (e, t, n) {
- n.set(e.element, y.createMatches(e.filterData))
- }, e.prototype.disposeTemplate = function (e) {
- e.dispose()
- }, e.id = "FileReferencesRenderer", e = h([g(0, v.IInstantiationService)], e)
- }()
- ;t.FileReferencesRenderer = D;
- var N = function () {
- function e(e) {
- this.label = new C.HighlightedLabel(e, !1)
- }
- return e.prototype.set = function (e, t) {
- var n = e.parent.preview, i = n && n.preview(e.range);
- if (i) {
- var o = i.value, r = i.highlight;
- t && !y.FuzzyScore.isDefault(t) ? (d.toggleClass(this.label.element, "referenceMatch", !1), this.label.set(o, y.createMatches(t))) : (d.toggleClass(this.label.element, "referenceMatch", !0), this.label.set(o, [r]))
- } else this.label.set(f.basename(e.uri) + ":" + (e.range.startLineNumber + 1) + ":" + (e.range.startColumn + 1))
- }, e
- }(), x = function () {
- function e() {
- this.templateId = e.id
- }
- return e.prototype.renderTemplate = function (e) {
- return new N(e)
- }, e.prototype.renderElement = function (e, t, n) {
- n.set(e.element, e.filterData)
- }, e.prototype.disposeTemplate = function () {
- }, e.id = "OneReferenceRenderer", e
- }();
- t.OneReferenceRenderer = x;
- var I = function () {
- function e() {
- }
- return e.prototype.getAriaLabel = function (e) {
- return e.ariaMessage
- }, e
- }();
- t.AriaProvider = I
- })),
- define(n[576], i([0, 1, 455, 3, 22, 23, 12, 62, 384, 67, 14, 44, 30, 15, 10]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var _ = function () {
- function e(e, t) {
- this.decorationIds = [], this.editor = e, this.editorWorkerService = t
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- }, e.prototype.run = function (t, n) {
- var r = this;
- this.currentRequest && this.currentRequest.cancel();
- var s = this.editor.getSelection(), a = this.editor.getModel();
- if (a && s) {
- var l = s;
- if (l.startLineNumber === l.endLineNumber) {
- var c = new d.EditorState(this.editor, 5), h = a.uri;
- return this.editorWorkerService.canNavigateValueSet(h) ? (this.currentRequest = m.createCancelablePromise((function (e) {
- return r.editorWorkerService.navigateValueSet(h, l, n)
- })), this.currentRequest.then((function (n) {
- if (n && n.range && n.value && c.validate(r.editor)) {
- var s = i.Range.lift(n.range), a = n.range,
- d = n.value.length - (l.endColumn - l.startColumn);
- a = {
- startLineNumber: a.startLineNumber, startColumn: a.startColumn,
- endLineNumber: a.endLineNumber, endColumn: a.startColumn + n.value.length
- }, d > 1 && (l = new o.Selection(l.startLineNumber, l.startColumn, l.endLineNumber, l.endColumn + d - 1));
- var h = new u.InPlaceReplaceCommand(s, l, n.value);
- r.editor.pushUndoStop(), r.editor.executeCommand(t, h), r.editor.pushUndoStop(), r.decorationIds = r.editor.deltaDecorations(r.decorationIds, [{
- range: a,
- options: e.DECORATION
- }]), r.decorationRemover && r.decorationRemover.cancel(), r.decorationRemover = m.timeout(350), r.decorationRemover.then((function () {
- return r.decorationIds = r.editor.deltaDecorations(r.decorationIds, [])
- })).catch(v.onUnexpectedError)
- }
- })).catch(v.onUnexpectedError)) : Promise.resolve(void 0)
- }
- }
- }, e.ID = "editor.contrib.inPlaceReplaceController", e.DECORATION = f.ModelDecorationOptions.register({className: "valueSetReplacement"}), e = h([g(1, l.IEditorWorkerService)], e)
- }(), y = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.inPlaceReplace.up",
- label: n.localize(0, null),
- alias: "Replace with Previous Value",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {
- kbExpr: s.EditorContextKeys.editorTextFocus, primary: 3154, weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = _.get(t);
- return n ? n.run(this.id, !0) : Promise.resolve(void 0)
- }, t
- }(a.EditorAction), C = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.inPlaceReplace.down",
- label: n.localize(1, null),
- alias: "Replace with Next Value",
- precondition: s.EditorContextKeys.writable,
- kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: 3156, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = _.get(t);
- return n ? n.run(this.id, !1) : Promise.resolve(void 0)
- }, t
- }(a.EditorAction);
- a.registerEditorContribution(_.ID, _), a.registerEditorAction(y), a.registerEditorAction(C), c.registerThemingParticipant((function (e, t) {
- var n = e.getColor(p.editorBracketMatchBorder);
- n && t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px " + n + "; }")
- }))
- })), define(n[577], i([0, 1, 457, 15, 26, 10, 75, 2, 16, 12, 30, 17, 199, 495, 35, 51, 20, 14, 316]), (function (e, t, n, i, o, s, a, u, p, f, m, v, _, y, C, b, S, w) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var E = {
- general: m.ModelDecorationOptions.register({
- stickiness: 1,
- collapseOnReplaceEdit: !0,
- inlineClassName: "detected-link"
- }),
- active: m.ModelDecorationOptions.register({
- stickiness: 1,
- collapseOnReplaceEdit: !0,
- inlineClassName: "detected-link-active"
- })
- }, L = function () {
- function e(e, t) {
- this.link = e, this.decorationId = t
- }
- return e.decoration = function (t, n) {
- return {range: t.range, options: e._getOptions(t, n, !1)}
- }, e._getOptions = function (e, t, i) {
- var o = l({}, i ? E.active : E.general);
- return o.hoverMessage = function (e, t) {
- var i = e.url && /^command:/i.test(e.url.toString()),
- o = e.tooltip ? e.tooltip : i ? n.localize(0, null) : n.localize(1, null),
- r = t ? p.isMacintosh ? n.localize(2, null) : n.localize(3, null) : p.isMacintosh ? n.localize(4, null) : n.localize(5, null);
- return e.url ? new a.MarkdownString("", !0).appendMarkdown("[" + o + "](" + e.url.toString() + ") (" + r + ")") : (new a.MarkdownString).appendText(o + " (" + r + ")")
- }(e, t), o
- }, e.prototype.activate = function (t, n) {
- t.changeDecorationOptions(this.decorationId, e._getOptions(this.link, n, !0))
- }, e.prototype.deactivate = function (t, n) {
- t.changeDecorationOptions(this.decorationId, e._getOptions(this.link, n, !1))
- }, e
- }(), D = function () {
- function e(e, t, n) {
- var o = this;
- this.listenersToRemove = new u.DisposableStore, this.editor = e, this.openerService = t, this.notificationService = n;
- var r = new _.ClickLinkGesture(e);
- this.listenersToRemove.add(r), this.listenersToRemove.add(r.onMouseMoveOrRelevantKeyDown((function (e) {
- var t = e[0], n = e[1];
- o._onEditorMouseMove(t, n)
- }))), this.listenersToRemove.add(r.onExecute((function (e) {
- o.onEditorMouseUp(e)
- }))), this.listenersToRemove.add(r.onCancel((function (e) {
- o.cleanUpActiveLinkDecoration()
- }))), this.enabled = e.getOption(52), this.listenersToRemove.add(e.onDidChangeConfiguration((function (t) {
- var n = e.getOption(52);
- o.enabled !== n && (o.enabled = n, o.updateDecorations([]), o.stop(), o.beginCompute())
- }))), this.listenersToRemove.add(e.onDidChangeModelContent((function (e) {
- return o.onChange()
- }))), this.listenersToRemove.add(e.onDidChangeModel((function (e) {
- return o.onModelChanged()
- }))),
- this.listenersToRemove.add(e.onDidChangeModelLanguage((function (e) {
- return o.onModelModeChanged()
- }))), this.listenersToRemove.add(v.LinkProviderRegistry.onDidChange((function (e) {
- return o.onModelModeChanged()
- }))), this.timeout = new i.TimeoutTimer, this.computePromise = null, this.activeLinksList = null, this.currentOccurrences = {}, this.activeLinkDecorationId = null, this.beginCompute()
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.onModelChanged = function () {
- this.currentOccurrences = {}, this.activeLinkDecorationId = null, this.stop(), this.beginCompute()
- }, e.prototype.onModelModeChanged = function () {
- this.stop(), this.beginCompute()
- }, e.prototype.onChange = function () {
- var t = this;
- this.timeout.setIfNotSet((function () {
- return t.beginCompute()
- }), e.RECOMPUTE_TIME)
- }, e.prototype.beginCompute = function () {
- return d(this, void 0, void 0, (function () {
- var e, t, n;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- if (!this.editor.hasModel() || !this.enabled) return [2];
- if (e = this.editor.getModel(), !v.LinkProviderRegistry.has(e)) return [2]
- ;
- this.activeLinksList && (this.activeLinksList.dispose(), this.activeLinksList = null), this.computePromise = i.createCancelablePromise((function (t) {
- return y.getLinks(e, t)
- })), o.label = 1;
- case 1:
- return o.trys.push([1, 3, 4, 5]), t = this, [4, this.computePromise];
- case 2:
- return t.activeLinksList = o.sent(), this.updateDecorations(this.activeLinksList.links), [3, 5];
- case 3:
- return n = o.sent(), s.onUnexpectedError(n), [3, 5];
- case 4:
- return this.computePromise = null, [7];
- case 5:
- return [2]
- }
- }))
- }))
- }, e.prototype.updateDecorations = function (e) {
- for (var t = "altKey" === this.editor.getOption(59), n = [], i = Object.keys(this.currentOccurrences), o = 0, r = i.length; o < r; o++) {
- var s = i[o], a = this.currentOccurrences[s];
- n.push(a.decorationId)
- }
- var l = [];
- if (e) for (var u = 0, d = e; u < d.length; u++) {
- var c = d[u];
- l.push(L.decoration(c, t))
- }
- var h = this.editor.deltaDecorations(n, l);
- this.currentOccurrences = {}, this.activeLinkDecorationId = null;
- for (o = 0, r = h.length; o < r; o++) {
- a = new L(e[o], h[o]);
- this.currentOccurrences[a.decorationId] = a
- }
- }, e.prototype._onEditorMouseMove = function (e, t) {
- var n = this, i = "altKey" === this.editor.getOption(59);
- if (this.isEnabled(e, t)) {
- this.cleanUpActiveLinkDecoration();
- var o = this.getLinkOccurrence(e.target.position);
- o && this.editor.changeDecorations((function (e) {
- o.activate(e, i), n.activeLinkDecorationId = o.decorationId
- }))
- } else this.cleanUpActiveLinkDecoration()
- }, e.prototype.cleanUpActiveLinkDecoration = function () {
- var e = "altKey" === this.editor.getOption(59);
- if (this.activeLinkDecorationId) {
- var t = this.currentOccurrences[this.activeLinkDecorationId];
- t && this.editor.changeDecorations((function (n) {
- t.deactivate(n, e)
- })), this.activeLinkDecorationId = null
- }
- }, e.prototype.onEditorMouseUp = function (e) {
- if (this.isEnabled(e)) {
- var t = this.getLinkOccurrence(e.target.position);
- t && this.openLinkOccurrence(t, e.hasSideBySideModifier, !0)
- }
- }, e.prototype.openLinkOccurrence = function (e, t, i) {
- var r = this;
- if (void 0 === i && (i = !1), this.openerService) {
- var a = e.link;
- a.resolve(o.CancellationToken.None).then((function (e) {
- return r.openerService.open(e, {openToSide: t, fromUserGesture: i})
- }), (function (e) {
- var t = e instanceof Error ? e.message : e;
- "invalid" === t ? r.notificationService.warn(n.localize(6, null, a.url.toString())) : "missing" === t ? r.notificationService.warn(n.localize(7, null)) : s.onUnexpectedError(e)
- }))
- }
- }, e.prototype.getLinkOccurrence = function (e) {
- if (!this.editor.hasModel() || !e) return null;
- for (var t = 0, n = this.editor.getModel().getDecorationsInRange({
- startLineNumber: e.lineNumber,
- startColumn: e.column,
- endLineNumber: e.lineNumber,
- endColumn: e.column
- }, 0, !0); t < n.length; t++) {
- var i = n[t], o = this.currentOccurrences[i.id];
- if (o) return o
- }
- return null
- }, e.prototype.isEnabled = function (e, t) {
- return Boolean(6 === e.target.type && (e.hasTriggerModifier || t && t.keyCodeIsTriggerKey))
- }, e.prototype.stop = function () {
- this.timeout.cancel(), this.activeLinksList && this.activeLinksList.dispose(), this.computePromise && (this.computePromise.cancel(), this.computePromise = null)
- }, e.prototype.dispose = function () {
- this.listenersToRemove.dispose(), this.stop(), this.timeout.dispose()
- }, e.ID = "editor.linkDetector", e.RECOMPUTE_TIME = 1e3,
- e = h([g(1, b.IOpenerService), g(2, C.INotificationService)], e)
- }(), N = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.openLink",
- label: n.localize(8, null),
- alias: "Open Link",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = D.get(t);
- if (n && t.hasModel()) for (var i = 0, o = t.getSelections(); i < o.length; i++) {
- var r = o[i], s = n.getLinkOccurrence(r.getEndPosition());
- s && n.openLinkOccurrence(s, !1)
- }
- }, t
- }(f.EditorAction);
- f.registerEditorContribution(D.ID, D), f.registerEditorAction(N), w.registerThemingParticipant((function (e, t) {
- var n = e.getColor(S.editorActiveLinkForeground);
- n && t.addRule(".monaco-editor .detected-link-active { color: " + n + " !important; }")
- }))
- })), define(n[122], i([0, 1, 458, 15, 2, 50, 3, 12, 18, 14, 20, 317]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = function (e) {
- function t(n, i) {
- var r = e.call(this) || this;
- return r.closeTimeout = 3e3, r._messageWidget = r._register(new o.MutableDisposable), r._messageListeners = r._register(new o.DisposableStore),
- r._editor = n, r._visible = t.MESSAGE_VISIBLE.bindTo(i), r._register(r._editor.onDidAttemptReadOnlyEdit((function () {
- return r._onDidAttemptReadOnlyEdit()
- }))), r
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._visible.reset()
- }, t.prototype.showMessage = function (e, t) {
- var n, o = this;
- s.alert(e), this._visible.set(!0), this._messageWidget.clear(), this._messageListeners.clear(), this._messageWidget.value = new m(this._editor, t, e), this._messageListeners.add(this._editor.onDidBlurEditorText((function () {
- return o.closeMessage()
- }))), this._messageListeners.add(this._editor.onDidChangeCursorPosition((function () {
- return o.closeMessage()
- }))), this._messageListeners.add(this._editor.onDidDispose((function () {
- return o.closeMessage()
- }))), this._messageListeners.add(this._editor.onDidChangeModel((function () {
- return o.closeMessage()
- }))), this._messageListeners.add(new i.TimeoutTimer((function () {
- return o.closeMessage()
- }), this.closeTimeout)),
- this._messageListeners.add(this._editor.onMouseMove((function (e) {
- e.target.position && (n ? n.containsPosition(e.target.position) || o.closeMessage() : n = new a.Range(t.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1))
- })))
- }, t.prototype.closeMessage = function () {
- this._visible.reset(), this._messageListeners.clear(), this._messageWidget.value && this._messageListeners.add(m.fadeOut(this._messageWidget.value))
- }, t.prototype._onDidAttemptReadOnlyEdit = function () {
- this._editor.hasModel() && this.showMessage(n.localize(0, null), this._editor.getPosition())
- }, t.ID = "editor.contrib.messageController", t.MESSAGE_VISIBLE = new u.RawContextKey("messageVisible", !1), t = h([g(1, u.IContextKeyService)], t)
- }(o.Disposable);
- t.MessageController = p;
- var f = l.EditorCommand.bindToContribution(p.get);
- l.registerEditorCommand(new f({
- id: "leaveEditorMessage",
- precondition: p.MESSAGE_VISIBLE,
- handler: function (e) {
- return e.closeMessage()
- },
- kbOpts: {weight: 130, primary: 9}
- }));
- var m = function () {
- function e(e, t, n) {
- var i = t.lineNumber, o = t.column;
- this.allowEditorOverflow = !0,
- this.suppressMouseDown = !1, this._editor = e, this._editor.revealLinesInCenterIfOutsideViewport(i, i, 0), this._position = {
- lineNumber: i,
- column: o - 1
- }, this._domNode = document.createElement("div"), this._domNode.classList.add("monaco-editor-overlaymessage");
- var r = document.createElement("div");
- r.classList.add("message"), r.textContent = n, this._domNode.appendChild(r);
- var s = document.createElement("div");
- s.classList.add("anchor"), this._domNode.appendChild(s), this._editor.addContentWidget(this), this._domNode.classList.add("fadeIn")
- }
- return e.fadeOut = function (e) {
- var t, n = function () {
- e.dispose(), clearTimeout(t), e.getDomNode().removeEventListener("animationend", n)
- };
- return t = setTimeout(n, 110), e.getDomNode().addEventListener("animationend", n), e.getDomNode().classList.add("fadeOut"), {dispose: n}
- }, e.prototype.dispose = function () {
- this._editor.removeContentWidget(this)
- }, e.prototype.getId = function () {
- return "messageoverlay"
- }, e.prototype.getDomNode = function () {
- return this._domNode
- }, e.prototype.getPosition = function () {
- return {
- position: this._position,
- preference: [1, 2]
- }
- }, e
- }();
- l.registerEditorContribution(p.ID, p), d.registerThemingParticipant((function (e, t) {
- var n = e.getColor(c.inputValidationInfoBorder);
- if (n) {
- var i = e.type === d.HIGH_CONTRAST ? 2 : 1;
- t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: " + n + "; }"), t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: " + i + "px solid " + n + "; }")
- }
- var o = e.getColor(c.inputValidationInfoBackground);
- o && t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: " + o + "; }");
- var r = e.getColor(c.inputValidationInfoForeground);
- r && t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { color: " + r + "; }")
- }))
- })), define(n[578], i([0, 1, 19, 10, 128, 2, 122, 11, 527, 567]), (function (e, t, n, i, o, s, a, l, u, p) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var f = function (e) {
- function t(t, n, i, r, a) {
- var l = e.call(this) || this;
- return l._editor = t, l.delegate = r, l._activeCodeActions = l._register(new s.MutableDisposable), l._codeActionWidget = new o.Lazy((function () {
- return l._register(a.createInstance(u.CodeActionMenu, l._editor, {
- onSelectCodeAction: function (e) {
- return d(l, void 0, void 0, (function () {
- return c(this, (function (t) {
- return this.delegate.applyCodeAction(e, !0), [2]
- }))
- }))
- }
- }))
- })), l._lightBulbWidget = new o.Lazy((function () {
- var e = l._register(a.createInstance(p.LightBulbWidget, l._editor, n, i));
- return l._register(e.onClick((function (e) {
- return l.showCodeActionList(e.trigger, e.actions, e, {includeDisabledActions: !1})
- }))), e
- })), l
- }
- return r(t, e), t.prototype.update = function (e) {
- var t, n, o;
- return d(this, void 0, void 0, (function () {
- var r, s, l, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- if (1 !== e.type) return null === (t = this._lightBulbWidget.rawValue) || void 0 === t || t.hide(), [2];
- c.label = 1;
- case 1:
- return c.trys.push([1, 3, , 4]), [4, e.actions];
- case 2:
- return r = c.sent(), [3, 4];
- case 3:
- return s = c.sent(), i.onUnexpectedError(s), [2];
- case 4:
- if (this._lightBulbWidget.getValue().update(r, e.trigger, e.position), 2 !== e.trigger.type) return [3, 11]
- ;
- if (!(null === (n = e.trigger.filter) || void 0 === n ? void 0 : n.include)) return [3, 10];
- if (!(l = this.tryGetValidActionToApply(e.trigger, r))) return [3, 9];
- c.label = 5;
- case 5:
- return c.trys.push([5, , 7, 8]), [4, this.delegate.applyCodeAction(l, !1)];
- case 6:
- return c.sent(), [3, 8];
- case 7:
- return r.dispose(), [7];
- case 8:
- return [2];
- case 9:
- if (e.trigger.context && (u = this.getInvalidActionThatWouldHaveBeenApplied(e.trigger, r)) && u.disabled) return a.MessageController.get(this._editor).showMessage(u.disabled, e.trigger.context.position), r.dispose(), [2];
- c.label = 10;
- case 10:
- return d = !!(null === (o = e.trigger.filter) || void 0 === o ? void 0 : o.include), !e.trigger.context || r.allActions.length && (d || r.validActions.length) ? (this._activeCodeActions.value = r, this._codeActionWidget.getValue().show(e.trigger, r, e.position, {includeDisabledActions: d}), [3, 12]) : (a.MessageController.get(this._editor).showMessage(e.trigger.context.notAvailableMessage, e.trigger.context.position), this._activeCodeActions.value = r, r.dispose(), [2]);
- case 11:
- this._codeActionWidget.getValue().isVisible ? r.dispose() : this._activeCodeActions.value = r, c.label = 12;
- case 12:
- return [2]
- }
- }))
- }))
- }, t.prototype.getInvalidActionThatWouldHaveBeenApplied = function (e, t) {
- if (t.allActions.length) return "first" === e.autoApply && 0 === t.validActions.length || "ifSingle" === e.autoApply && 1 === t.allActions.length ? n.find(t.allActions, (function (e) {
- return e.disabled
- })) : void 0
- }, t.prototype.tryGetValidActionToApply = function (e, t) {
- if (t.validActions.length) return "first" === e.autoApply && t.validActions.length > 0 || "ifSingle" === e.autoApply && 1 === t.validActions.length ? t.validActions[0] : void 0
- }, t.prototype.showCodeActionList = function (e, t, n, i) {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (o) {
- return this._codeActionWidget.getValue().show(e, t, n, i), [2]
- }))
- }))
- }, t = h([g(4, l.IInstantiationService)], t)
- }(s.Disposable);
- t.CodeActionUi = f
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0
- ;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[233], i([0, 1, 128, 2, 5, 12, 156, 23, 119, 578, 122, 432, 29, 18, 11, 72, 35, 73, 96, 528, 111]), (function (e, t, n, i, o, s, l, u, p, f, m, v, _, y, C, b, S, w, E, L, D) {
- "use strict";
- function N(e) {
- return y.ContextKeyExpr.regex(L.SUPPORTED_CODE_ACTIONS.keys()[0], new RegExp("(\\s|^)" + o.escapeRegExpCharacters(e.value) + "\\b"))
- }
- Object.defineProperty(t, "__esModule", {value: !0});
- var x = {
- type: "object",
- required: ["kind"],
- defaultSnippets: [{body: {kind: ""}}],
- properties: {
- kind: {type: "string", description: v.localize(0, null)},
- apply: {
- type: "string",
- description: v.localize(1, null),
- default: "ifSingle",
- enum: ["first", "ifSingle", "never"],
- enumDescriptions: [v.localize(2, null), v.localize(3, null), v.localize(4, null)]
- },
- preferred: {type: "boolean", default: !1, description: v.localize(5, null)}
- }
- }, I = function (e) {
- function t(t, i, o, r, s) {
- var a = e.call(this) || this;
- return a._instantiationService = s, a._editor = t, a._model = a._register(new L.CodeActionModel(a._editor, i, o, r)),
- a._register(a._model.onDidChangeState((function (e) {
- return a.update(e)
- }))), a._ui = new n.Lazy((function () {
- return a._register(new f.CodeActionUi(t, T.Id, W.Id, {
- applyCodeAction: function (e, t) {
- return d(a, void 0, void 0, (function () {
- return c(this, (function (n) {
- switch (n.label) {
- case 0:
- return n.trys.push([0, , 2, 3]), [4, this._applyCodeAction(e)];
- case 1:
- return n.sent(), [3, 3];
- case 2:
- return t && this._trigger({type: 1, filter: {}}), [7];
- case 3:
- return [2]
- }
- }))
- }))
- }
- }, a._instantiationService))
- })), a
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.update = function (e) {
- this._ui.getValue().update(e)
- }, t.prototype.showCodeActions = function (e, t, n) {
- return this._ui.getValue().showCodeActionList(e, t, n, {includeDisabledActions: !1})
- }, t.prototype.manualTriggerAtCurrentPosition = function (e, t, n) {
- if (this._editor.hasModel()) {
- m.MessageController.get(this._editor).closeMessage();
- var i = this._editor.getPosition();
- this._trigger({type: 2, filter: t, autoApply: n, context: {notAvailableMessage: e, position: i}})
- }
- }, t.prototype._trigger = function (e) {
- return this._model.trigger(e)
- }, t.prototype._applyCodeAction = function (e) {
- return this._instantiationService.invokeFunction(M, e, this._editor)
- }, t.ID = "editor.contrib.quickFixController", t = h([g(1, b.IMarkerService), g(2, y.IContextKeyService), g(3, w.IEditorProgressService), g(4, C.IInstantiationService)], t)
- }(i.Disposable);
- function M(e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i, o, r, s, u, d;
- return c(this, (function (c) {
- switch (c.label) {
- case 0:
- return i = e.get(l.IBulkEditService), o = e.get(_.ICommandService), r = e.get(E.ITelemetryService), s = e.get(S.INotificationService), r.publicLog2("codeAction.applyCodeAction", {
- codeActionTitle: t.title,
- codeActionKind: t.kind,
- codeActionIsPreferred: !!t.isPreferred
- }), t.edit ? [4, i.apply(t.edit, {editor: n})] : [3, 2];
- case 1:
- c.sent(), c.label = 2;
- case 2:
- if (!t.command) return [3, 6];
- c.label = 3;
- case 3:
- return c.trys.push([3, 5, , 6]), [4, o.executeCommand.apply(o, a([t.command.id], t.command.arguments || []))];
- case 4:
- return c.sent(), [3, 6];
- case 5:
- return u = c.sent(),
- d = "string" == typeof (h = u) ? h : h instanceof Error && "string" == typeof h.message ? h.message : void 0, s.error("string" == typeof d ? d : v.localize(6, null)), [3, 6];
- case 6:
- return [2]
- }
- var h
- }))
- }))
- }
- function k(e, t, n, i) {
- if (e.hasModel()) {
- var o = I.get(e);
- o && o.manualTriggerAtCurrentPosition(t, n, i)
- }
- }
- t.QuickFixController = I, t.applyCodeAction = M;
- var T = function (e) {
- function t() {
- return e.call(this, {
- id: t.Id,
- label: v.localize(7, null),
- alias: "Quick Fix...",
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
- kbOpts: {kbExpr: u.EditorContextKeys.editorTextFocus, primary: 2132, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return k(t, v.localize(8, null), void 0, void 0)
- }, t.Id = "editor.action.quickFix", t
- }(s.EditorAction);
- t.QuickFixAction = T;
- var R = function (e) {
- function t() {
- return e.call(this, {
- id: p.codeActionCommandId,
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
- description: {
- description: "Trigger a code action", args: [{
- name: "args",
- schema: x
- }]
- }
- }) || this
- }
- return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
- var i = D.CodeActionCommandArgs.fromUser(n, {kind: D.CodeActionKind.Empty, apply: "ifSingle"});
- return k(t, "string" == typeof (null == n ? void 0 : n.kind) ? i.preferred ? v.localize(9, null, n.kind) : v.localize(10, null, n.kind) : i.preferred ? v.localize(11, null) : v.localize(12, null), {
- include: i.kind,
- includeSourceActions: !0,
- onlyIncludePreferredActions: i.preferred
- }, i.apply)
- }, t
- }(s.EditorCommand);
- t.CodeActionCommand = R;
- var O = function (e) {
- function t() {
- return e.call(this, {
- id: p.refactorCommandId,
- label: v.localize(13, null),
- alias: "Refactor...",
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
- kbOpts: {
- kbExpr: u.EditorContextKeys.editorTextFocus,
- primary: 3120,
- mac: {primary: 1328},
- weight: 100
- },
- contextMenuOpts: {
- group: "1_modification",
- order: 2,
- when: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.Refactor))
- },
- description: {description: "Refactor...", args: [{name: "args", schema: x}]}
- }) || this
- }
- return r(t, e),
- t.prototype.run = function (e, t, n) {
- var i = D.CodeActionCommandArgs.fromUser(n, {kind: D.CodeActionKind.Refactor, apply: "never"});
- return k(t, "string" == typeof (null == n ? void 0 : n.kind) ? i.preferred ? v.localize(14, null, n.kind) : v.localize(15, null, n.kind) : i.preferred ? v.localize(16, null) : v.localize(17, null), {
- include: D.CodeActionKind.Refactor.contains(i.kind) ? i.kind : D.CodeActionKind.None,
- onlyIncludePreferredActions: i.preferred
- }, i.apply)
- }, t
- }(s.EditorAction);
- t.RefactorAction = O;
- var P = function (e) {
- function t() {
- return e.call(this, {
- id: p.sourceActionCommandId,
- label: v.localize(18, null),
- alias: "Source Action...",
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
- contextMenuOpts: {
- group: "1_modification",
- order: 2.1,
- when: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.Source))
- },
- description: {description: "Source Action...", args: [{name: "args", schema: x}]}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- var i = D.CodeActionCommandArgs.fromUser(n, {
- kind: D.CodeActionKind.Source, apply: "never"
- });
- return k(t, "string" == typeof (null == n ? void 0 : n.kind) ? i.preferred ? v.localize(19, null, n.kind) : v.localize(20, null, n.kind) : i.preferred ? v.localize(21, null) : v.localize(22, null), {
- include: D.CodeActionKind.Source.contains(i.kind) ? i.kind : D.CodeActionKind.None,
- includeSourceActions: !0,
- onlyIncludePreferredActions: i.preferred
- }, i.apply)
- }, t
- }(s.EditorAction);
- t.SourceAction = P;
- var A = function (e) {
- function t() {
- return e.call(this, {
- id: p.organizeImportsCommandId,
- label: v.localize(23, null),
- alias: "Organize Imports",
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.SourceOrganizeImports)),
- kbOpts: {kbExpr: u.EditorContextKeys.editorTextFocus, primary: 1581, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return k(t, v.localize(24, null), {
- include: D.CodeActionKind.SourceOrganizeImports,
- includeSourceActions: !0
- }, "ifSingle")
- }, t
- }(s.EditorAction);
- t.OrganizeImportsAction = A;
- var F = function (e) {
- function t() {
- return e.call(this, {
- id: p.fixAllCommandId,
- label: v.localize(25, null),
- alias: "Fix All",
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.SourceFixAll))
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return k(t, v.localize(26, null), {
- include: D.CodeActionKind.SourceFixAll,
- includeSourceActions: !0
- }, "ifSingle")
- }, t
- }(s.EditorAction);
- t.FixAllAction = F;
- var W = function (e) {
- function t() {
- return e.call(this, {
- id: t.Id,
- label: v.localize(27, null),
- alias: "Auto Fix...",
- precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.QuickFix)),
- kbOpts: {
- kbExpr: u.EditorContextKeys.editorTextFocus,
- primary: 1620,
- mac: {primary: 2644},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- return k(t, v.localize(28, null), {
- include: D.CodeActionKind.QuickFix,
- onlyIncludePreferredActions: !0
- }, "ifSingle")
- }, t.Id = "editor.action.autoFix", t
- }(s.EditorAction);
- t.AutoFixAction = W
- })), define(n[579], i([0, 1, 12, 233]), (function (e, t, n, i) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}),
- n.registerEditorContribution(i.QuickFixController.ID, i.QuickFixController), n.registerEditorAction(i.QuickFixAction), n.registerEditorAction(i.RefactorAction), n.registerEditorAction(i.SourceAction), n.registerEditorAction(i.OrganizeImportsAction), n.registerEditorAction(i.AutoFixAction), n.registerEditorAction(i.FixAllAction), n.registerEditorCommand(new i.CodeActionCommand)
- })), define(n[580], i([0, 1, 459, 15, 36, 2, 12, 213, 3, 22, 23, 48, 30, 17, 232, 20, 14, 18]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var y = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.insertCursorAbove",
- label: n.localize(0, null),
- alias: "Add Cursor Above",
- precondition: void 0,
- kbOpts: {
- kbExpr: c.EditorContextKeys.editorTextFocus,
- primary: 2576,
- linux: {primary: 1552, secondary: [3088]},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "3_multi", title: n.localize(1, null), order: 2}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- if (t.hasModel()) {
- var i = n && !0 === n.logicalLine, o = t._getCursors(), r = o.context;
- r.config.readOnly || (r.model.pushStackElement(), o.setStates(n.source, 3, l.CursorMoveCommands.addCursorUp(r, o.getAll(), i)), o.reveal(n.source, !0, 1, 0))
- }
- }, t
- }(a.EditorAction);
- t.InsertCursorAbove = y;
- var C = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.insertCursorBelow",
- label: n.localize(2, null),
- alias: "Add Cursor Below",
- precondition: void 0,
- kbOpts: {
- kbExpr: c.EditorContextKeys.editorTextFocus,
- primary: 2578,
- linux: {primary: 1554, secondary: [3090]},
- weight: 100
- },
- menuOpts: {menuId: 25, group: "3_multi", title: n.localize(3, null), order: 3}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- if (t.hasModel()) {
- var i = n && !0 === n.logicalLine, o = t._getCursors(), r = o.context;
- r.config.readOnly || (r.model.pushStackElement(), o.setStates(n.source, 3, l.CursorMoveCommands.addCursorDown(r, o.getAll(), i)), o.reveal(n.source, !0, 2, 0))
- }
- }, t
- }(a.EditorAction);
- t.InsertCursorBelow = C;
- var b = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.insertCursorAtEndOfEachLineSelected",
- label: n.localize(4, null),
- alias: "Add Cursors to Line Ends",
- precondition: void 0,
- kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 1575, weight: 100},
- menuOpts: {menuId: 25, group: "3_multi", title: n.localize(5, null), order: 4}
- }) || this
- }
- return r(t, e), t.prototype.getCursorsForSelection = function (e, t, n) {
- if (!e.isEmpty()) {
- for (var i = e.startLineNumber; i < e.endLineNumber; i++) {
- var o = t.getLineMaxColumn(i);
- n.push(new d.Selection(i, o, i, o))
- }
- e.endColumn > 1 && n.push(new d.Selection(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn))
- }
- }, t.prototype.run = function (e, t) {
- var n = this;
- if (t.hasModel()) {
- var i = t.getModel(), o = t.getSelections(), r = [];
- o.forEach((function (e) {
- return n.getCursorsForSelection(e, i, r)
- })), r.length > 0 && t.setSelections(r)
- }
- }, t
- }(a.EditorAction), S = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.addCursorsToBottom",
- label: n.localize(6, null),
- alias: "Add Cursors To Bottom",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = t.getSelections(), i = t.getModel().getLineCount(), o = [], r = n[0].startLineNumber; r <= i; r++) o.push(new d.Selection(r, n[0].startColumn, r, n[0].endColumn));
- o.length > 0 && t.setSelections(o)
- }
- }, t
- }(a.EditorAction), w = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.addCursorsToTop",
- label: n.localize(7, null),
- alias: "Add Cursors To Top",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- for (var n = t.getSelections(), i = [], o = n[0].startLineNumber; o >= 1; o--) i.push(new d.Selection(o, n[0].startColumn, o, n[0].endColumn));
- i.length > 0 && t.setSelections(i)
- }
- }, t
- }(a.EditorAction), E = function (e, t, n) {
- this.selections = e, this.revealRange = t, this.revealScrollType = n
- };
- t.MultiCursorSessionResult = E;
- var L = function () {
- function e(e, t, n, i, o, r, s) {
- this._editor = e, this.findController = t, this.isDisconnectedFromFindController = n, this.searchText = i, this.wholeWord = o, this.matchCase = r, this.currentMatch = s
- }
- return e.create = function (t, n) {
- if (!t.hasModel()) return null;
- var i = n.getState()
- ;
- if (!t.hasTextFocus() && i.isRevealed && i.searchString.length > 0) return new e(t, n, !1, i.searchString, i.wholeWord, i.matchCase, null);
- var o, r, s = !1, a = t.getSelections();
- 1 === a.length && a[0].isEmpty() ? (s = !0, o = !0, r = !0) : (o = i.wholeWord, r = i.matchCase);
- var l, u = t.getSelection(), c = null;
- if (u.isEmpty()) {
- var h = t.getModel().getWordAtPosition(u.getStartPosition());
- if (!h) return null;
- l = h.word, c = new d.Selection(u.startLineNumber, h.startColumn, u.startLineNumber, h.endColumn)
- } else l = t.getModel().getValueInRange(u).replace(/\r\n/g, "\n");
- return new e(t, n, s, l, o, r, c)
- }, e.prototype.addSelectionToNextFindMatch = function () {
- if (!this._editor.hasModel()) return null;
- var e = this._getNextMatch();
- if (!e) return null;
- var t = this._editor.getSelections();
- return new E(t.concat(e), e, 0)
- }, e.prototype.moveSelectionToNextFindMatch = function () {
- if (!this._editor.hasModel()) return null;
- var e = this._getNextMatch();
- if (!e) return null;
- var t = this._editor.getSelections();
- return new E(t.slice(0, t.length - 1).concat(e), e, 0)
- }, e.prototype._getNextMatch = function () {
- if (!this._editor.hasModel()) return null;
- if (this.currentMatch) {
- var e = this.currentMatch;
- return this.currentMatch = null, e
- }
- this.findController.highlightFindOptions();
- var t = this._editor.getSelections(), n = t[t.length - 1],
- i = this._editor.getModel().findNextMatch(this.searchText, n.getEndPosition(), !1, this.matchCase, this.wholeWord ? this._editor.getOption(96) : null, !1);
- return i ? new d.Selection(i.range.startLineNumber, i.range.startColumn, i.range.endLineNumber, i.range.endColumn) : null
- }, e.prototype.addSelectionToPreviousFindMatch = function () {
- if (!this._editor.hasModel()) return null;
- var e = this._getPreviousMatch();
- if (!e) return null;
- var t = this._editor.getSelections();
- return new E(t.concat(e), e, 0)
- }, e.prototype.moveSelectionToPreviousFindMatch = function () {
- if (!this._editor.hasModel()) return null;
- var e = this._getPreviousMatch();
- if (!e) return null;
- var t = this._editor.getSelections();
- return new E(t.slice(0, t.length - 1).concat(e), e, 0)
- }, e.prototype._getPreviousMatch = function () {
- if (!this._editor.hasModel()) return null;
- if (this.currentMatch) {
- var e = this.currentMatch;
- return this.currentMatch = null, e
- }
- this.findController.highlightFindOptions();
- var t = this._editor.getSelections(), n = t[t.length - 1],
- i = this._editor.getModel().findPreviousMatch(this.searchText, n.getStartPosition(), !1, this.matchCase, this.wholeWord ? this._editor.getOption(96) : null, !1);
- return i ? new d.Selection(i.range.startLineNumber, i.range.startColumn, i.range.endLineNumber, i.range.endColumn) : null
- }, e.prototype.selectAll = function () {
- return this._editor.hasModel() ? (this.findController.highlightFindOptions(), this._editor.getModel().findMatches(this.searchText, !0, !1, this.matchCase, this.wholeWord ? this._editor.getOption(96) : null, !1, 1073741824)) : []
- }, e
- }();
- t.MultiCursorSession = L;
- var D = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n._sessionDispose = n._register(new s.DisposableStore), n._editor = t, n._ignoreSelectionChange = !1, n._session = null, n
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.dispose = function () {
- this._endSession(), e.prototype.dispose.call(this)
- },
- t.prototype._beginSessionIfNeeded = function (e) {
- var t = this;
- if (!this._session) {
- var n = L.create(this._editor, e);
- if (!n) return;
- this._session = n;
- var i = {searchString: this._session.searchText};
- this._session.isDisconnectedFromFindController && (i.wholeWordOverride = 1, i.matchCaseOverride = 1, i.isRegexOverride = 2), e.getState().change(i, !1), this._sessionDispose.add(this._editor.onDidChangeCursorSelection((function (e) {
- t._ignoreSelectionChange || t._endSession()
- }))), this._sessionDispose.add(this._editor.onDidBlurEditorText((function () {
- t._endSession()
- }))), this._sessionDispose.add(e.getState().onFindReplaceStateChange((function (e) {
- (e.matchCase || e.wholeWord) && t._endSession()
- })))
- }
- }, t.prototype._endSession = function () {
- if (this._sessionDispose.clear(), this._session && this._session.isDisconnectedFromFindController) {
- this._session.findController.getState().change({
- wholeWordOverride: 0,
- matchCaseOverride: 0,
- isRegexOverride: 0
- }, !1)
- }
- this._session = null
- }, t.prototype._setSelections = function (e) {
- this._ignoreSelectionChange = !0, this._editor.setSelections(e),
- this._ignoreSelectionChange = !1
- }, t.prototype._expandEmptyToWord = function (e, t) {
- if (!t.isEmpty()) return t;
- var n = e.getWordAtPosition(t.getStartPosition());
- return n ? new d.Selection(t.startLineNumber, n.startColumn, t.startLineNumber, n.endColumn) : t
- }, t.prototype._applySessionResult = function (e) {
- e && (this._setSelections(e.selections), e.revealRange && this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange, e.revealScrollType))
- }, t.prototype.getSession = function (e) {
- return this._session
- }, t.prototype.addSelectionToNextFindMatch = function (e) {
- if (this._editor.hasModel()) {
- if (!this._session) {
- var t = this._editor.getSelections();
- if (t.length > 1) {
- var n = e.getState().matchCase;
- if (!A(this._editor.getModel(), t, n)) {
- for (var i = this._editor.getModel(), o = [], r = 0, s = t.length; r < s; r++) o[r] = this._expandEmptyToWord(i, t[r]);
- return void this._editor.setSelections(o)
- }
- }
- }
- this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.addSelectionToNextFindMatch())
- }
- }, t.prototype.addSelectionToPreviousFindMatch = function (e) {
- this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.addSelectionToPreviousFindMatch())
- }, t.prototype.moveSelectionToNextFindMatch = function (e) {
- this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.moveSelectionToNextFindMatch())
- }, t.prototype.moveSelectionToPreviousFindMatch = function (e) {
- this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())
- }, t.prototype.selectAll = function (e) {
- if (this._editor.hasModel()) {
- var t = null, n = e.getState();
- if (n.isRevealed && n.searchString.length > 0 && n.isRegex) t = this._editor.getModel().findMatches(n.searchString, !0, n.isRegex, n.matchCase, n.wholeWord ? this._editor.getOption(96) : null, !1, 1073741824); else {
- if (this._beginSessionIfNeeded(e), !this._session) return;
- t = this._session.selectAll()
- }
- if (n.searchScope) {
- for (var i = n.searchScope, o = [], r = 0; r < t.length; r++) t[r].range.endLineNumber <= i.endLineNumber && t[r].range.startLineNumber >= i.startLineNumber && o.push(t[r]);
- t = o
- }
- if (t.length > 0) {
- for (var s = this._editor.getSelection(), a = (r = 0, t.length); r < a; r++) {
- var l = t[r];
- if (l.range.intersectRanges(s)) {
- t[r] = t[0], t[0] = l;
- break
- }
- }
- this._setSelections(t.map((function (e) {
- return new d.Selection(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn)
- })))
- }
- }
- }, t.ID = "editor.contrib.multiCursorController", t
- }(s.Disposable);
- t.MultiCursorSelectionController = D;
- var N = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = D.get(t);
- if (n) {
- var i = f.CommonFindController.get(t);
- i && this._run(n, i)
- }
- }, t
- }(a.EditorAction);
- t.MultiCursorSelectionControllerAction = N;
- var x = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.addSelectionToNextFindMatch",
- label: n.localize(8, null),
- alias: "Add Selection To Next Find Match",
- precondition: void 0,
- kbOpts: {kbExpr: c.EditorContextKeys.focus, primary: 2082, weight: 100},
- menuOpts: {menuId: 25, group: "3_multi", title: n.localize(9, null), order: 5}
- }) || this
- }
- return r(t, e), t.prototype._run = function (e, t) {
- e.addSelectionToNextFindMatch(t)
- }, t
- }(N);
- t.AddSelectionToNextFindMatchAction = x;
- var I = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.addSelectionToPreviousFindMatch",
- label: n.localize(10, null),
- alias: "Add Selection To Previous Find Match",
- precondition: void 0,
- menuOpts: {menuId: 25, group: "3_multi", title: n.localize(11, null), order: 6}
- }) || this
- }
- return r(t, e), t.prototype._run = function (e, t) {
- e.addSelectionToPreviousFindMatch(t)
- }, t
- }(N);
- t.AddSelectionToPreviousFindMatchAction = I;
- var M = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.moveSelectionToNextFindMatch",
- label: n.localize(12, null),
- alias: "Move Last Selection To Next Find Match",
- precondition: void 0,
- kbOpts: {kbExpr: c.EditorContextKeys.focus, primary: o.KeyChord(2089, 2082), weight: 100}
- }) || this
- }
- return r(t, e), t.prototype._run = function (e, t) {
- e.moveSelectionToNextFindMatch(t)
- }, t
- }(N);
- t.MoveSelectionToNextFindMatchAction = M;
- var k = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.moveSelectionToPreviousFindMatch", label: n.localize(13, null),
- alias: "Move Last Selection To Previous Find Match", precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype._run = function (e, t) {
- e.moveSelectionToPreviousFindMatch(t)
- }, t
- }(N);
- t.MoveSelectionToPreviousFindMatchAction = k;
- var T = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.selectHighlights",
- label: n.localize(14, null),
- alias: "Select All Occurrences of Find Match",
- precondition: void 0,
- kbOpts: {kbExpr: c.EditorContextKeys.focus, primary: 3114, weight: 100},
- menuOpts: {menuId: 25, group: "3_multi", title: n.localize(15, null), order: 7}
- }) || this
- }
- return r(t, e), t.prototype._run = function (e, t) {
- e.selectAll(t)
- }, t
- }(N);
- t.SelectHighlightsAction = T;
- var R = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.changeAll",
- label: n.localize(16, null),
- alias: "Change All Occurrences",
- precondition: _.ContextKeyExpr.and(c.EditorContextKeys.writable, c.EditorContextKeys.editorTextFocus),
- kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 2108, weight: 100},
- contextMenuOpts: {group: "1_modification", order: 1.2}
- }) || this
- }
- return r(t, e),
- t.prototype._run = function (e, t) {
- e.selectAll(t)
- }, t
- }(N);
- t.CompatChangeAll = R;
- var O = function () {
- function e(e, t, n) {
- this.searchText = e, this.matchCase = t, this.wordSeparators = n
- }
- return e.softEquals = function (e, t) {
- return !e && !t || !(!e || !t) && (e.searchText === t.searchText && e.matchCase === t.matchCase && e.wordSeparators === t.wordSeparators)
- }, e
- }(), P = function (e) {
- function t(t) {
- var n = e.call(this) || this;
- return n.editor = t, n._isEnabled = t.getOption(82), n.decorations = [], n.updateSoon = n._register(new i.RunOnceScheduler((function () {
- return n._update()
- }), 300)), n.state = null, n._register(t.onDidChangeConfiguration((function (e) {
- n._isEnabled = t.getOption(82)
- }))), n._register(t.onDidChangeCursorSelection((function (e) {
- n._isEnabled && (e.selection.isEmpty() ? 3 === e.reason ? (n.state && n._setState(null), n.updateSoon.schedule()) : n._setState(null) : n._update())
- }))), n._register(t.onDidChangeModel((function (e) {
- n._setState(null)
- }))), n._register(f.CommonFindController.get(t).getState().onFindReplaceStateChange((function (e) {
- n._update()
- }))), n
- }
- return r(t, e),
- t.prototype._update = function () {
- this._setState(t._createState(this._isEnabled, this.editor))
- }, t._createState = function (e, t) {
- if (!e) return null;
- if (!t.hasModel()) return null;
- var n = t.getSelection();
- if (n.startLineNumber !== n.endLineNumber) return null;
- var i = D.get(t);
- if (!i) return null;
- var o = f.CommonFindController.get(t);
- if (!o) return null;
- var r = i.getSession(o);
- if (!r) {
- var s = t.getSelections();
- if (s.length > 1) {
- var a = o.getState().matchCase;
- if (!A(t.getModel(), s, a)) return null
- }
- r = L.create(t, o)
- }
- if (!r) return null;
- if (r.currentMatch) return null;
- if (/^[ \t]+$/.test(r.searchText)) return null;
- if (r.searchText.length > 200) return null;
- var l = o.getState(), u = l.matchCase;
- if (l.isRevealed) {
- var d = l.searchString;
- u || (d = d.toLowerCase());
- var c = r.searchText;
- if (u || (c = c.toLowerCase()), d === c && r.matchCase === l.matchCase && r.wholeWord === l.wholeWord && !l.isRegex) return null
- }
- return new O(r.searchText, r.matchCase, r.wholeWord ? t.getOption(96) : null)
- }, t.prototype._setState = function (e) {
- if (O.softEquals(this.state, e)) this.state = e; else if (this.state = e, this.state) {
- if (this.editor.hasModel()) {
- var n = this.editor.getModel();
- if (!n.isTooLargeForTokenization()) {
- var i = g.DocumentHighlightProviderRegistry.has(n),
- o = n.findMatches(this.state.searchText, !0, !1, this.state.matchCase, this.state.wordSeparators, !1).map((function (e) {
- return e.range
- }));
- o.sort(u.Range.compareRangesUsingStarts);
- var r = this.editor.getSelections();
- r.sort(u.Range.compareRangesUsingStarts);
- for (var s = [], a = 0, l = 0, d = o.length, c = r.length; a < d;) {
- var h = o[a];
- if (l >= c) s.push(h), a++; else {
- var p = u.Range.compareRangesUsingStarts(h, r[l]);
- p < 0 ? (!r[l].isEmpty() && u.Range.areIntersecting(h, r[l]) || s.push(h), a++) : p > 0 ? l++ : (a++, l++)
- }
- }
- var f = s.map((function (e) {
- return {range: e, options: i ? t._SELECTION_HIGHLIGHT : t._SELECTION_HIGHLIGHT_OVERVIEW}
- }));
- this.decorations = this.editor.deltaDecorations(this.decorations, f)
- }
- }
- } else this.decorations = this.editor.deltaDecorations(this.decorations, [])
- }, t.prototype.dispose = function () {
- this._setState(null), e.prototype.dispose.call(this)
- }, t.ID = "editor.contrib.selectionHighlighter",
- t._SELECTION_HIGHLIGHT_OVERVIEW = p.ModelDecorationOptions.register({
- stickiness: 1,
- className: "selectionHighlight",
- overviewRuler: {
- color: v.themeColorFromId(m.overviewRulerSelectionHighlightForeground),
- position: h.OverviewRulerLane.Center
- }
- }), t._SELECTION_HIGHLIGHT = p.ModelDecorationOptions.register({
- stickiness: 1,
- className: "selectionHighlight"
- }), t
- }(s.Disposable);
- function A(e, t, n) {
- for (var i = F(e, t[0], !n), o = 1, r = t.length; o < r; o++) {
- var s = t[o];
- if (s.isEmpty()) return !1;
- if (i !== F(e, s, !n)) return !1
- }
- return !0
- }
- function F(e, t, n) {
- var i = e.getValueInRange(t);
- return n ? i.toLowerCase() : i
- }
- t.SelectionHighlighter = P, a.registerEditorContribution(D.ID, D), a.registerEditorContribution(P.ID, P), a.registerEditorAction(y), a.registerEditorAction(C), a.registerEditorAction(b), a.registerEditorAction(x), a.registerEditorAction(I), a.registerEditorAction(M), a.registerEditorAction(k), a.registerEditorAction(T), a.registerEditorAction(R), a.registerEditorAction(S), a.registerEditorAction(w)
- })),
- define(n[581], i([0, 1, 6, 52, 50, 53, 4, 2, 71, 117, 165, 461, 18, 51, 20, 14, 540, 5, 318]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var b = n.$, S = function (e) {
- function t(t, n, i, o) {
- var r = e.call(this) || this;
- return r.editor = t, r.renderDisposeables = r._register(new l.DisposableStore), r.visible = !1, r.announcedLabel = null, r.allowEditorOverflow = !0, r.markdownRenderer = r._register(new d.MarkdownRenderer(t, o, i)), r.model = r._register(new y.ParameterHintsModel(t)), r.keyVisible = c.Context.Visible.bindTo(n), r.keyMultipleSignatures = c.Context.MultipleSignatures.bindTo(n), r._register(r.model.onChangedHints((function (e) {
- e ? (r.show(), r.render(e)) : r.hide()
- }))), r
- }
- return r(t, e), t.prototype.createParamaterHintDOMNodes = function () {
- var e = this, t = b(".editor-widget.parameter-hints-widget"), o = n.append(t, b(".wrapper"));
- o.tabIndex = -1
- ;var r = n.append(o, b(".controls")), l = n.append(r, b(".button.codicon.codicon-chevron-up")),
- u = n.append(r, b(".overloads")), d = n.append(r, b(".button.codicon.codicon-chevron-down")),
- c = i.stop(i.domEvent(l, "click"));
- this._register(c(this.previous, this));
- var h = i.stop(i.domEvent(d, "click"));
- this._register(h(this.next, this));
- var p = b(".body"), g = new s.DomScrollableElement(p, {});
- this._register(g), o.appendChild(g.getDomNode());
- var f = n.append(p, b(".signature")), m = n.append(p, b(".docs"));
- t.style.userSelect = "text", this.domNodes = {
- element: t,
- signature: f,
- overloads: u,
- docs: m,
- scrollbar: g
- }, this.editor.addContentWidget(this), this.hide(), this._register(this.editor.onDidChangeCursorSelection((function (t) {
- e.visible && e.editor.layoutContentWidget(e)
- })));
- var v = function () {
- if (e.domNodes) {
- var t = e.editor.getOption(34);
- e.domNodes.element.style.fontSize = t.fontSize + "px"
- }
- };
- v(), this._register(a.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function (e) {
- return e.hasChanged(34)
- })).on(v, null)),
- this._register(this.editor.onDidLayoutChange((function (t) {
- return e.updateMaxHeight()
- }))), this.updateMaxHeight()
- }, t.prototype.show = function () {
- var e = this;
- this.visible || (this.domNodes || this.createParamaterHintDOMNodes(), this.keyVisible.set(!0), this.visible = !0, setTimeout((function () {
- e.domNodes && n.addClass(e.domNodes.element, "visible")
- }), 100), this.editor.layoutContentWidget(this))
- }, t.prototype.hide = function () {
- this.visible && (this.keyVisible.reset(), this.visible = !1, this.announcedLabel = null, this.domNodes && n.removeClass(this.domNodes.element, "visible"), this.editor.layoutContentWidget(this))
- }, t.prototype.getPosition = function () {
- return this.visible ? {position: this.editor.getPosition(), preference: [1, 2]} : null
- }, t.prototype.render = function (e) {
- if (this.domNodes) {
- var t = e.signatures.length > 1;
- n.toggleClass(this.domNodes.element, "multiple", t), this.keyMultipleSignatures.set(t), this.domNodes.signature.innerHTML = "", this.domNodes.docs.innerHTML = "";
- var i = e.signatures[e.activeSignature];
- if (i) {
- var r = n.append(this.domNodes.signature, b(".code")), s = i.parameters.length > 0,
- a = this.editor.getOption(34);
- if (r.style.fontSize = a.fontSize + "px", r.style.fontFamily = a.fontFamily, s) this.renderParameters(r, i, e.activeParameter); else n.append(r, b("span")).textContent = i.label;
- this.renderDisposeables.clear();
- var l = i.parameters[e.activeParameter];
- if (l && l.documentation) {
- var u = b("span.documentation");
- if ("string" == typeof l.documentation) u.textContent = l.documentation; else {
- var d = this.markdownRenderer.render(l.documentation);
- n.addClass(d.element, "markdown-docs"), this.renderDisposeables.add(d), u.appendChild(d.element)
- }
- n.append(this.domNodes.docs, b("p", {}, u))
- }
- if (void 0 === i.documentation) ; else if ("string" == typeof i.documentation) n.append(this.domNodes.docs, b("p", {}, i.documentation)); else {
- d = this.markdownRenderer.render(i.documentation);
- n.addClass(d.element, "markdown-docs"), this.renderDisposeables.add(d), n.append(this.domNodes.docs, d.element)
- }
- var c = this.hasDocs(i, l);
- if (n.toggleClass(this.domNodes.signature, "has-docs", c),
- n.toggleClass(this.domNodes.docs, "empty", !c), this.domNodes.overloads.textContent = C.pad(e.activeSignature + 1, e.signatures.length.toString().length) + "/" + e.signatures.length, l) {
- var h = this.getParameterLabel(i, e.activeParameter);
- this.announcedLabel !== h && (o.alert(p.localize(0, null, h)), this.announcedLabel = h)
- }
- this.editor.layoutContentWidget(this), this.domNodes.scrollbar.scanDomNode()
- }
- }
- }, t.prototype.hasDocs = function (e, t) {
- return !!(t && "string" == typeof t.documentation && t.documentation.length > 0) || (!!(t && "object" == typeof t.documentation && t.documentation.value.length > 0) || ("string" == typeof e.documentation && e.documentation.length > 0 || "object" == typeof e.documentation && e.documentation.value.length > 0))
- }, t.prototype.renderParameters = function (e, t, i) {
- var o = this.getParameterLabelOffsets(t, i), r = o[0], s = o[1], a = document.createElement("span");
- a.textContent = t.label.substring(0, r);
- var l = document.createElement("span");
- l.textContent = t.label.substring(r, s), l.className = "parameter active";
- var u = document.createElement("span")
- ;u.textContent = t.label.substring(s), n.append(e, a, l, u)
- }, t.prototype.getParameterLabel = function (e, t) {
- var n = e.parameters[t];
- return "string" == typeof n.label ? n.label : e.label.substring(n.label[0], n.label[1])
- }, t.prototype.getParameterLabelOffsets = function (e, t) {
- var n = e.parameters[t];
- if (n) {
- if (Array.isArray(n.label)) return n.label;
- var i = e.label.lastIndexOf(n.label);
- return i >= 0 ? [i, i + n.label.length] : [0, 0]
- }
- return [0, 0]
- }, t.prototype.next = function () {
- this.editor.focus(), this.model.next()
- }, t.prototype.previous = function () {
- this.editor.focus(), this.model.previous()
- }, t.prototype.cancel = function () {
- this.model.cancel()
- }, t.prototype.getDomNode = function () {
- return this.domNodes || this.createParamaterHintDOMNodes(), this.domNodes.element
- }, t.prototype.getId = function () {
- return t.ID
- }, t.prototype.trigger = function (e) {
- this.model.trigger(e, 0)
- }, t.prototype.updateMaxHeight = function () {
- if (this.domNodes) {
- var e = Math.max(this.editor.getLayoutInfo().height / 4, 250) + "px";
- this.domNodes.element.style.maxHeight = e
- ;var t = this.domNodes.element.getElementsByClassName("wrapper");
- t.length && (t[0].style.maxHeight = e)
- }
- }, t.ID = "editor.widget.parameterHintsWidget", t = h([g(1, f.IContextKeyService), g(2, m.IOpenerService), g(3, u.IModeService)], t)
- }(l.Disposable);
- t.ParameterHintsWidget = S, _.registerThemingParticipant((function (e, t) {
- var n = e.getColor(v.editorHoverBorder);
- if (n) {
- var i = e.type === _.HIGH_CONTRAST ? 2 : 1;
- t.addRule(".monaco-editor .parameter-hints-widget { border: " + i + "px solid " + n + "; }"), t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid " + n.transparent(.5) + "; }"), t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid " + n.transparent(.5) + "; }")
- }
- var o = e.getColor(v.editorHoverBackground);
- o && t.addRule(".monaco-editor .parameter-hints-widget { background-color: " + o + "; }");
- var r = e.getColor(v.textLinkForeground);
- r && t.addRule(".monaco-editor .parameter-hints-widget a { color: " + r + "; }");
- var s = e.getColor(v.editorHoverForeground)
- ;s && t.addRule(".monaco-editor .parameter-hints-widget { color: " + s + "; }");
- var a = e.getColor(v.textCodeBlockBackground);
- a && t.addRule(".monaco-editor .parameter-hints-widget code { background-color: " + a + "; }")
- }))
- })), define(n[582], i([0, 1, 460, 2, 11, 23, 18, 12, 581, 165, 17]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i.editor = t, i.widget = i._register(n.createInstance(u.ParameterHintsWidget, i.editor)), i
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.cancel = function () {
- this.widget.cancel()
- }, t.prototype.previous = function () {
- this.widget.previous()
- }, t.prototype.next = function () {
- this.widget.next()
- }, t.prototype.trigger = function (e) {
- this.widget.trigger(e)
- }, t.ID = "editor.controller.parameterHints", t = h([g(1, o.IInstantiationService)], t)
- }(i.Disposable), f = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.triggerParameterHints",
- label: n.localize(0, null),
- alias: "Trigger Parameter Hints",
- precondition: s.EditorContextKeys.hasSignatureHelpProvider,
- kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: 3082, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = p.get(t);
- n && n.trigger({triggerKind: c.SignatureHelpTriggerKind.Invoke})
- }, t
- }(l.EditorAction);
- t.TriggerParameterHintsAction = f, l.registerEditorContribution(p.ID, p), l.registerEditorAction(f);
- var m = l.EditorCommand.bindToContribution(p.get);
- l.registerEditorCommand(new m({
- id: "closeParameterHints",
- precondition: d.Context.Visible,
- handler: function (e) {
- return e.cancel()
- },
- kbOpts: {weight: 175, kbExpr: s.EditorContextKeys.focus, primary: 9, secondary: [1033]}
- })), l.registerEditorCommand(new m({
- id: "showPrevParameterHint",
- precondition: a.ContextKeyExpr.and(d.Context.Visible, d.Context.MultipleSignatures),
- handler: function (e) {
- return e.previous()
- },
- kbOpts: {
- weight: 175,
- kbExpr: s.EditorContextKeys.focus,
- primary: 16,
- secondary: [528],
- mac: {primary: 16, secondary: [528, 302]}
- }
- })), l.registerEditorCommand(new m({
- id: "showNextParameterHint",
- precondition: a.ContextKeyExpr.and(d.Context.Visible, d.Context.MultipleSignatures),
- handler: function (e) {
- return e.next()
- },
- kbOpts: {
- weight: 175,
- kbExpr: s.EditorContextKeys.focus,
- primary: 18,
- secondary: [530],
- mac: {primary: 18, secondary: [530, 300]}
- }
- }))
- })), define(n[123], i([0, 1, 6, 70, 55, 27, 4, 31, 5, 32, 167, 493, 462, 18, 11, 83, 12, 20, 319]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C) {
- "use strict";
- var b;
- Object.defineProperty(t, "__esModule", {value: !0}), t.IPeekViewService = v.createDecorator("IPeekViewService"), _.registerSingleton(t.IPeekViewService, function () {
- function e() {
- this._widgets = new Map
- }
- return e.prototype.addExclusiveWidget = function (e, t) {
- var n = this, i = this._widgets.get(e);
- i && (i.listener.dispose(), i.widget.dispose());
- this._widgets.set(e, {
- widget: t, listener: t.onDidClose((function () {
- var i = n._widgets.get(e);
- i && i.widget === t && (i.listener.dispose(), n._widgets.delete(e))
- }))
- })
- }, e
- }()), function (e) {
- e.inPeekEditor = new m.RawContextKey("inReferenceSearchEditor", !0), e.notInPeekEditor = e.inPeekEditor.toNegated()
- }(b = t.PeekContext || (t.PeekContext = {}));
- var S = function () {
- function e(e, t) {
- e instanceof c.EmbeddedCodeEditorWidget && b.inPeekEditor.bindTo(t)
- }
- return e.prototype.dispose = function () {
- }, e.ID = "editor.contrib.referenceController", e = h([g(1, m.IContextKeyService)], e)
- }();
- y.registerEditorContribution(S.ID, S), t.getOuterEditor = function (e) {
- var t = e.get(d.ICodeEditorService).getFocusedCodeEditor();
- return t instanceof c.EmbeddedCodeEditorWidget ? t.getParentEditor() : t
- };
- var w = {
- headerBackgroundColor: s.Color.white,
- primaryHeadingColor: s.Color.fromHex("#333333"),
- secondaryHeadingColor: s.Color.fromHex("#6c6c6cb3")
- }, E = function (e) {
- function t(t, n) {
- void 0 === n && (n = {});
- var i = e.call(this, t, n) || this;
- return i._onDidClose = new a.Emitter, i.onDidClose = i._onDidClose.event, l.mixin(i.options, w, !1), i
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this), this._onDidClose.fire(this)
- }, t.prototype.style = function (t) {
- var n = this.options;
- t.headerBackgroundColor && (n.headerBackgroundColor = t.headerBackgroundColor),
- t.primaryHeadingColor && (n.primaryHeadingColor = t.primaryHeadingColor), t.secondaryHeadingColor && (n.secondaryHeadingColor = t.secondaryHeadingColor), e.prototype.style.call(this, t)
- }, t.prototype._applyStyles = function () {
- e.prototype._applyStyles.call(this);
- var t = this.options;
- this._headElement && t.headerBackgroundColor && (this._headElement.style.backgroundColor = t.headerBackgroundColor.toString()), this._primaryHeading && t.primaryHeadingColor && (this._primaryHeading.style.color = t.primaryHeadingColor.toString()), this._secondaryHeading && t.secondaryHeadingColor && (this._secondaryHeading.style.color = t.secondaryHeadingColor.toString()), this._bodyElement && t.frameColor && (this._bodyElement.style.borderColor = t.frameColor.toString())
- }, t.prototype._fillContainer = function (e) {
- this.setCssClass("peekview-widget"), this._headElement = n.$(".head"), this._bodyElement = n.$(".body"), this._fillHead(this._headElement), this._fillBody(this._bodyElement), e.appendChild(this._headElement), e.appendChild(this._bodyElement)
- }, t.prototype._fillHead = function (e) {
- var t = this, r = n.$(".peekview-title");
- n.append(this._headElement, r), n.addStandardDisposableListener(r, "click", (function (e) {
- return t._onTitleClick(e)
- })), this._fillTitleIcon(r), this._primaryHeading = n.$("span.filename"), this._secondaryHeading = n.$("span.dirname"), this._metaHeading = n.$("span.meta"), n.append(r, this._primaryHeading, this._secondaryHeading, this._metaHeading);
- var s = n.$(".peekview-actions");
- n.append(this._headElement, s);
- var a = this._getActionBarOptions();
- this._actionbarWidget = new i.ActionBar(s, a), this._disposables.add(this._actionbarWidget), this._actionbarWidget.push(new o.Action("peekview.close", f.localize(0, null), "codicon-close", !0, (function () {
- return t.dispose(), Promise.resolve()
- })), {label: !1, icon: !0})
- }, t.prototype._fillTitleIcon = function (e) {
- }, t.prototype._getActionBarOptions = function () {
- return {}
- }, t.prototype._onTitleClick = function (e) {
- }, t.prototype.setTitle = function (e, t) {
- this._primaryHeading && this._secondaryHeading && (this._primaryHeading.innerHTML = u.escape(e),
- this._primaryHeading.setAttribute("aria-label", e), t ? this._secondaryHeading.innerHTML = u.escape(t) : n.clearNode(this._secondaryHeading))
- }, t.prototype.setMetaTitle = function (e) {
- this._metaHeading && (e ? (this._metaHeading.innerHTML = u.escape(e), n.show(this._metaHeading)) : n.hide(this._metaHeading))
- }, t.prototype._doLayout = function (e, t) {
- if (!this._isShowing && e < 0) this.dispose(); else {
- var n = Math.ceil(1.2 * this.editor.getOption(49)), i = Math.round(e - (n + 2));
- this._doLayoutHead(n, t), this._doLayoutBody(i, t)
- }
- }, t.prototype._doLayoutHead = function (e, t) {
- this._headElement && (this._headElement.style.height = e + "px", this._headElement.style.lineHeight = this._headElement.style.height)
- }, t.prototype._doLayoutBody = function (e, t) {
- this._bodyElement && (this._bodyElement.style.height = e + "px")
- }, t
- }(p.ZoneWidget);
- t.PeekViewWidget = E, t.peekViewTitleBackground = C.registerColor("peekViewTitle.background", {
- dark: "#1E1E1E",
- light: "#FFFFFF",
- hc: "#0C141F"
- }, f.localize(1, null)), t.peekViewTitleForeground = C.registerColor("peekViewTitleLabel.foreground", {
- dark: "#FFFFFF",
- light: "#333333", hc: "#FFFFFF"
- }, f.localize(2, null)), t.peekViewTitleInfoForeground = C.registerColor("peekViewTitleDescription.foreground", {
- dark: "#ccccccb3",
- light: "#616161e6",
- hc: "#FFFFFF99"
- }, f.localize(3, null)), t.peekViewBorder = C.registerColor("peekView.border", {
- dark: "#007acc",
- light: "#007acc",
- hc: C.contrastBorder
- }, f.localize(4, null)), t.peekViewResultsBackground = C.registerColor("peekViewResult.background", {
- dark: "#252526",
- light: "#F3F3F3",
- hc: s.Color.black
- }, f.localize(5, null)), t.peekViewResultsMatchForeground = C.registerColor("peekViewResult.lineForeground", {
- dark: "#bbbbbb",
- light: "#646465",
- hc: s.Color.white
- }, f.localize(6, null)), t.peekViewResultsFileForeground = C.registerColor("peekViewResult.fileForeground", {
- dark: s.Color.white,
- light: "#1E1E1E",
- hc: s.Color.white
- }, f.localize(7, null)), t.peekViewResultsSelectionBackground = C.registerColor("peekViewResult.selectionBackground", {
- dark: "#3399ff33",
- light: "#3399ff33",
- hc: null
- }, f.localize(8, null)), t.peekViewResultsSelectionForeground = C.registerColor("peekViewResult.selectionForeground", {
- dark: s.Color.white, light: "#6C6C6C", hc: s.Color.white
- }, f.localize(9, null)), t.peekViewEditorBackground = C.registerColor("peekViewEditor.background", {
- dark: "#001F33",
- light: "#F2F8FC",
- hc: s.Color.black
- }, f.localize(10, null)), t.peekViewEditorGutterBackground = C.registerColor("peekViewEditorGutter.background", {
- dark: t.peekViewEditorBackground,
- light: t.peekViewEditorBackground,
- hc: t.peekViewEditorBackground
- }, f.localize(11, null)), t.peekViewResultsMatchHighlight = C.registerColor("peekViewResult.matchHighlightBackground", {
- dark: "#ea5c004d",
- light: "#ea5c004d",
- hc: null
- }, f.localize(12, null)), t.peekViewEditorMatchHighlight = C.registerColor("peekViewEditor.matchHighlightBackground", {
- dark: "#ff8f0099",
- light: "#f5d802de",
- hc: null
- }, f.localize(13, null)), t.peekViewEditorMatchHighlightBorder = C.registerColor("peekViewEditor.matchHighlightBorder", {
- dark: null,
- light: null,
- hc: C.activeContrastBorder
- }, f.localize(14, null))
- })), define(n[583], i([0, 1, 2, 13, 3, 464, 18, 20, 14, 34, 6, 320]), (function (e, t, n, i, o, r, s, a, l, u, d) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0}), t.CONTEXT_RENAME_INPUT_VISIBLE = new s.RawContextKey("renameInputVisible", !1);
- var c = function () {
- function e(e, i, o, r, s) {
- var a = this;
- this._editor = e, this._acceptKeybindings = i, this._themeService = o, this._keybindingService = r, this._disposables = new n.DisposableStore, this.allowEditorOverflow = !0, this._visibleContextKey = t.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(s), this._editor.addContentWidget(this), this._disposables.add(this._editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(34) && a._updateFont()
- }))), this._disposables.add(o.onThemeChange(this._updateStyles, this))
- }
- return e.prototype.dispose = function () {
- this._disposables.dispose(), this._editor.removeContentWidget(this)
- }, e.prototype.getId = function () {
- return "__renameInputWidget"
- }, e.prototype.getDomNode = function () {
- var e = this;
- if (!this._domNode) {
- this._domNode = document.createElement("div"), this._domNode.className = "monaco-editor rename-box", this._input = document.createElement("input"), this._input.className = "rename-input",
- this._input.type = "text", this._input.setAttribute("aria-label", r.localize(0, null)), this._domNode.appendChild(this._input), this._label = document.createElement("div"), this._label.className = "rename-label", this._domNode.appendChild(this._label);
- var t = function () {
- var t, n, i = e._acceptKeybindings, o = i[0], s = i[1];
- e._keybindingService.lookupKeybinding(o), e._label.innerText = r.localize(1, null, null === (t = e._keybindingService.lookupKeybinding(o)) || void 0 === t ? void 0 : t.getLabel(), null === (n = e._keybindingService.lookupKeybinding(s)) || void 0 === n ? void 0 : n.getLabel())
- };
- t(), this._disposables.add(this._keybindingService.onDidUpdateKeybindings(t)), this._updateFont(), this._updateStyles(this._themeService.getTheme())
- }
- return this._domNode
- }, e.prototype._updateStyles = function (e) {
- var t, n, i, o;
- if (this._input && this._domNode) {
- var r = e.getColor(a.widgetShadow);
- this._domNode.style.backgroundColor = String(null !== (t = e.getColor(a.editorWidgetBackground)) && void 0 !== t ? t : ""), this._domNode.style.boxShadow = r ? " 0 2px 8px " + r : "",
- this._domNode.style.color = String(null !== (n = e.getColor(a.inputForeground)) && void 0 !== n ? n : ""), this._input.style.backgroundColor = String(null !== (i = e.getColor(a.inputBackground)) && void 0 !== i ? i : "");
- var s = e.getColor(a.inputBorder);
- this._input.style.borderWidth = s ? "1px" : "0px", this._input.style.borderStyle = s ? "solid" : "none", this._input.style.borderColor = null !== (o = null == s ? void 0 : s.toString()) && void 0 !== o ? o : "none"
- }
- }, e.prototype._updateFont = function () {
- if (this._input && this._label) {
- var e = this._editor.getOption(34);
- this._input.style.fontFamily = e.fontFamily, this._input.style.fontWeight = e.fontWeight, this._input.style.fontSize = e.fontSize + "px", this._label.style.fontSize = .8 * e.fontSize + "px"
- }
- }, e.prototype.getPosition = function () {
- return this._visible ? {position: this._position, preference: [2, 1]} : null
- }, e.prototype.acceptInput = function (e) {
- this._currentAcceptInput && this._currentAcceptInput(e)
- }, e.prototype.cancelInput = function (e) {
- this._currentCancelInput && this._currentCancelInput(e)
- }, e.prototype.getInput = function (e, t, r, s, a) {
- var l = this
- ;d.toggleClass(this._domNode, "preview", a), this._position = new i.Position(e.startLineNumber, e.startColumn), this._input.value = t, this._input.setAttribute("selectionStart", r.toString()), this._input.setAttribute("selectionEnd", s.toString()), this._input.size = Math.max(1.1 * (e.endColumn - e.startColumn), 20);
- var u = new n.DisposableStore;
- return new Promise((function (n) {
- l._currentCancelInput = function (e) {
- return l._currentAcceptInput = void 0, l._currentCancelInput = void 0, n(e), !0
- }, l._currentAcceptInput = function (e) {
- 0 !== l._input.value.trim().length && l._input.value !== t ? (l._currentAcceptInput = void 0, l._currentCancelInput = void 0, n({
- newName: l._input.value,
- wantsPreview: a && e
- })) : l.cancelInput(!0)
- };
- u.add(l._editor.onDidChangeCursorSelection((function () {
- var t = l._editor.getPosition();
- t && o.Range.containsPosition(e, t) || l.cancelInput(!0)
- }))), u.add(l._editor.onDidBlurEditorWidget((function () {
- return l.cancelInput(!1)
- }))), l._show()
- })).finally((function () {
- u.dispose(), l._hide()
- }))
- }, e.prototype._show = function () {
- var e = this
- ;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0), this._visible = !0, this._visibleContextKey.set(!0), this._editor.layoutContentWidget(this), setTimeout((function () {
- e._input.focus(), e._input.setSelectionRange(parseInt(e._input.getAttribute("selectionStart")), parseInt(e._input.getAttribute("selectionEnd")))
- }), 100)
- }, e.prototype._hide = function () {
- this._visible = !1, this._visibleContextKey.reset(), this._editor.layoutContentWidget(this)
- }, e = h([g(2, l.IThemeService), g(3, u.IKeybindingService), g(4, s.IContextKeyService)], e)
- }();
- t.RenameInputField = c
- })), define(n[584], i([0, 1, 463, 10, 18, 73, 12, 23, 583, 17, 13, 50, 3, 122, 67, 35, 156, 25, 32, 26, 2, 15, 21, 95, 11, 42, 85, 114]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var R = function () {
- function e(e, t) {
- this.model = e, this.position = t, this._providers = p.RenameProviderRegistry.ordered(e)
- }
- return e.prototype.hasProvider = function () {
- return this._providers.length > 0
- },
- e.prototype.resolveRenameLocation = function (e) {
- return d(this, void 0, void 0, (function () {
- var t, n, i, o;
- return c(this, (function (r) {
- switch (r.label) {
- case 0:
- return (t = this._providers[0]) ? t.resolveRenameLocation ? (i = N.withNullAsUndefined, [4, t.resolveRenameLocation(this.model, this.position, e)]) : [3, 2] : [2, void 0];
- case 1:
- n = i.apply(void 0, [r.sent()]), r.label = 2;
- case 2:
- return !n && (o = this.model.getWordAtPosition(this.position)) ? [2, {
- range: new v.Range(this.position.lineNumber, o.startColumn, this.position.lineNumber, o.endColumn),
- text: o.word
- }] : [2, n]
- }
- }))
- }))
- }, e.prototype.provideRenameEdits = function (e, t, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s;
- return c(this, (function (a) {
- switch (a.label) {
- case 0:
- return (r = this._providers[t]) ? [4, r.provideRenameEdits(this.model, this.position, e, o)] : [2, {
- edits: [],
- rejectReason: i.join("\n")
- }];
- case 1:
- return (s = a.sent()) ? s.rejectReason ? [2, this.provideRenameEdits(e, t + 1, i.concat(s.rejectReason), o)] : [2, s] : [2, this.provideRenameEdits(e, t + 1, i.concat(n.localize(0, null)), o)]
- }
- }))
- }))
- }, e
- }();
- function O(e, t, n) {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (i) {
- return [2, new R(e, t).provideRenameEdits(n, 0, [], E.CancellationToken.None)]
- }))
- }))
- }
- t.rename = O;
- var P = function () {
- function e(e, t, n, i, o, r, s) {
- var a = this;
- this.editor = e, this._instaService = t, this._notificationService = n, this._bulkEditService = i, this._progressService = o, this._logService = r, this._configService = s, this._dispoableStore = new L.DisposableStore, this._cts = new E.CancellationTokenSource, this._renameInputField = this._dispoableStore.add(new D.IdleValue((function () {
- return a._dispoableStore.add(a._instaService.createInstance(u.RenameInputField, a.editor, ["acceptRenameInput", "acceptRenameInputWithPreview"]))
- })))
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- this._dispoableStore.dispose(), this._cts.dispose(!0)
- }, e.prototype.run = function () {
- return d(this, void 0, void 0, (function () {
- var e, t, i, o, r, s, a, l, u, h, p, g = this;
- return c(this, (function (f) {
- switch (f.label) {
- case 0:
- if (this._cts.dispose(!0),
- !this.editor.hasModel()) return [2, void 0];
- if (e = this.editor.getPosition(), !(t = new R(this.editor.getModel(), e)).hasProvider()) return [2, void 0];
- this._cts = new y.EditorStateCancellationTokenSource(this.editor, 5), f.label = 1;
- case 1:
- return f.trys.push([1, 3, , 4]), o = t.resolveRenameLocation(this._cts.token), this._progressService.showWhile(o, 250), [4, o];
- case 2:
- return i = f.sent(), [3, 4];
- case 3:
- return r = f.sent(), _.MessageController.get(this.editor).showMessage(r || n.localize(1, null), e), [2, void 0];
- case 4:
- return i ? i.rejectReason ? (_.MessageController.get(this.editor).showMessage(i.rejectReason, e), [2, void 0]) : this._cts.token.isCancellationRequested ? [2, void 0] : (s = this.editor.getSelection(), a = 0, l = i.text.length, v.Range.isEmpty(s) || v.Range.spansMultipleLines(s) || !v.Range.containsRange(i.range, s) || (a = Math.max(0, s.startColumn - i.range.startColumn), l = Math.min(i.range.endColumn, s.endColumn) - i.range.startColumn), u = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, "editor.rename.enablePreview"),
- [4, this._renameInputField.getValue().getInput(i.range, i.text, a, l, u)]) : [2, void 0];
- case 5:
- return "boolean" == typeof (h = f.sent()) ? (h && this.editor.focus(), [2, void 0]) : (this.editor.focus(), p = D.raceCancellation(t.provideRenameEdits(h.newName, 0, [], this._cts.token), this._cts.token).then((function (e) {
- return d(g, void 0, void 0, (function () {
- var t = this;
- return c(this, (function (o) {
- return e && this.editor.hasModel() ? e.rejectReason ? (this._notificationService.info(e.rejectReason), [2]) : (this._bulkEditService.apply(e, {
- editor: this.editor,
- showPreview: h.wantsPreview,
- label: n.localize(2, null, null == i ? void 0 : i.text)
- }).then((function (e) {
- e.ariaSummary && m.alert(n.localize(3, null, i.text, h.newName, e.ariaSummary))
- })).catch((function (e) {
- t._notificationService.error(n.localize(4, null)), t._logService.error(e)
- })), [2]) : [2]
- }))
- }))
- }), (function (e) {
- g._notificationService.error(n.localize(5, null)), g._logService.error(e)
- })), this._progressService.showWhile(p, 250), [2, p])
- }
- }))
- }))
- }, e.prototype.acceptRenameInput = function (e) {
- this._renameInputField.getValue().acceptInput(e)
- }, e.prototype.cancelRenameInput = function () {
- this._renameInputField.getValue().cancelInput(!0)
- }, e.ID = "editor.contrib.renameController", e = h([g(1, I.IInstantiationService), g(2, C.INotificationService), g(3, b.IBulkEditService), g(4, s.IEditorProgressService), g(5, x.ILogService), g(6, T.ITextResourceConfigurationService)], e)
- }(), A = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.rename",
- label: n.localize(6, null),
- alias: "Rename Symbol",
- precondition: o.ContextKeyExpr.and(l.EditorContextKeys.writable, l.EditorContextKeys.hasRenameProvider),
- kbOpts: {kbExpr: l.EditorContextKeys.editorTextFocus, primary: 60, weight: 100},
- contextMenuOpts: {group: "1_modification", order: 1.1}
- }) || this
- }
- return r(t, e), t.prototype.runCommand = function (t, n) {
- var o = this, r = t.get(w.ICodeEditorService), s = Array.isArray(n) && n || [void 0, void 0], a = s[0],
- l = s[1];
- return S.URI.isUri(a) && f.Position.isIPosition(l) ? r.openCodeEditor({resource: a}, r.getActiveCodeEditor()).then((function (e) {
- e && (e.setPosition(l),
- e.invokeWithinContext((function (t) {
- return o.reportTelemetry(t, e), o.run(t, e)
- })))
- }), i.onUnexpectedError) : e.prototype.runCommand.call(this, t, n)
- }, t.prototype.run = function (e, t) {
- var n = P.get(t);
- return n ? n.run() : Promise.resolve()
- }, t
- }(a.EditorAction);
- t.RenameAction = A, a.registerEditorContribution(P.ID, P), a.registerEditorAction(A);
- var F = a.EditorCommand.bindToContribution(P.get);
- a.registerEditorCommand(new F({
- id: "acceptRenameInput",
- precondition: u.CONTEXT_RENAME_INPUT_VISIBLE,
- handler: function (e) {
- return e.acceptRenameInput(!1)
- },
- kbOpts: {weight: 199, kbExpr: l.EditorContextKeys.focus, primary: 3}
- })), a.registerEditorCommand(new F({
- id: "acceptRenameInputWithPreview",
- precondition: o.ContextKeyExpr.and(u.CONTEXT_RENAME_INPUT_VISIBLE, o.ContextKeyExpr.has("config.editor.rename.enablePreview")),
- handler: function (e) {
- return e.acceptRenameInput(!0)
- },
- kbOpts: {weight: 199, kbExpr: l.EditorContextKeys.focus, primary: 1027}
- })), a.registerEditorCommand(new F({
- id: "cancelRenameInput", precondition: u.CONTEXT_RENAME_INPUT_VISIBLE, handler: function (e) {
- return e.cancelRenameInput()
- }, kbOpts: {weight: 199, kbExpr: l.EditorContextKeys.focus, primary: 9, secondary: [1033]}
- })), a.registerDefaultLanguageCommand("_executeDocumentRenameProvider", (function (e, t, n) {
- var o = n.newName;
- if ("string" != typeof o) throw i.illegalArgument("newName");
- return O(e, t, o)
- })), M.Registry.as(k.Extensions.Configuration).registerConfiguration({
- id: "editor",
- properties: {
- "editor.rename.enablePreview": {
- scope: 5,
- description: n.localize(7, null),
- default: !0,
- type: "boolean"
- }
- }
- })
- })), define(n[585], i([0, 1, 468, 61, 5, 4, 10, 2, 6, 153, 53, 34, 18, 120, 96, 97, 14, 20, 74, 117, 71, 51, 15, 17, 139, 511, 49, 25, 11, 208, 75, 19, 13, 322, 323, 183, 231]), (function (e, t, n, i, o, r, s, a, u, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- t.editorSuggestWidgetBackground = S.registerColor("editorSuggestWidget.background", {
- dark: S.editorWidgetBackground,
- light: S.editorWidgetBackground,
- hc: S.editorWidgetBackground
- }, n.localize(0, null)), t.editorSuggestWidgetBorder = S.registerColor("editorSuggestWidget.border", {
- dark: S.editorWidgetBorder, light: S.editorWidgetBorder, hc: S.editorWidgetBorder
- }, n.localize(1, null)), t.editorSuggestWidgetForeground = S.registerColor("editorSuggestWidget.foreground", {
- dark: S.editorForeground,
- light: S.editorForeground,
- hc: S.editorForeground
- }, n.localize(2, null)), t.editorSuggestWidgetSelectedBackground = S.registerColor("editorSuggestWidget.selectedBackground", {
- dark: S.listFocusBackground,
- light: S.listFocusBackground,
- hc: S.listFocusBackground
- }, n.localize(3, null)), t.editorSuggestWidgetHighlightForeground = S.registerColor("editorSuggestWidget.highlightForeground", {
- dark: S.listHighlightForeground,
- light: S.listHighlightForeground,
- hc: S.listHighlightForeground
- }, n.localize(4, null));
- var W = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;
- function B(e) {
- if (!e) return !1;
- var t = e.completion;
- return !!t.documentation || t.detail && t.detail !== t.label
- }
- function V(e) {
- return "suggest-aria-id:" + e
- }
- var z = function () {
- function e(e, t, n, i, o, r) {
- this.widget = e,
- this.editor = t, this.triggerKeybindingLabel = n, this._modelService = i, this._modeService = o, this._themeService = r
- }
- return Object.defineProperty(e.prototype, "templateId", {
- get: function () {
- return "suggestion"
- }, enumerable: !0, configurable: !0
- }), e.prototype.renderTemplate = function (e) {
- var t = this, i = Object.create(null);
- i.disposables = new a.DisposableStore, i.root = e, u.addClass(i.root, "show-file-icons"), i.icon = u.append(e, u.$(".icon")), i.colorspan = u.append(i.icon, u.$("span.colorspan"));
- var o = u.append(e, u.$(".contents")), s = u.append(o, u.$(".main"));
- i.left = u.append(s, u.$("span.left")), i.right = u.append(s, u.$("span.right")), i.iconContainer = u.append(i.left, u.$(".icon-label.codicon")), i.iconLabel = new I.IconLabel(i.left, {
- supportHighlights: !0,
- supportCodicons: !0
- }), i.disposables.add(i.iconLabel), i.signatureLabel = u.append(i.left, u.$("span.signature-label")), i.qualifierLabel = u.append(i.left, u.$("span.qualifier-label")), i.detailsLabel = u.append(i.right, u.$("span.details-label")), i.readMore = u.append(i.right, u.$("span.readMore.codicon.codicon-info")),
- i.readMore.title = n.localize(5, null, this.triggerKeybindingLabel);
- var l = function () {
- var e = t.editor.getOptions(), n = e.get(34), o = n.fontFamily, r = n.fontFeatureSettings,
- a = e.get(90) || n.fontSize, l = e.get(91) || n.lineHeight, u = n.fontWeight, d = a + "px",
- c = l + "px";
- i.root.style.fontSize = d, i.root.style.fontWeight = u, s.style.fontFamily = o, s.style.fontFeatureSettings = r, s.style.lineHeight = c, i.icon.style.height = c, i.icon.style.width = c, i.readMore.style.height = c, i.readMore.style.width = c
- };
- return l(), i.disposables.add(r.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function (e) {
- return e.hasChanged(34) || e.hasChanged(90) || e.hasChanged(91)
- })).on(l, null)), i
- }, e.prototype.renderElement = function (e, t, n) {
- var o = this, r = n, s = e.completion, a = "string" == typeof s.label ? s.label : s.label.name;
- r.root.id = V(t), r.icon.className = "icon " + x.completionKindToCssClass(s.kind), r.colorspan.style.backgroundColor = "";
- var l, d, c, h = {labelEscapeNewLines: !0, matches: i.createMatches(e.score)}, p = [];
- if (19 === s.kind && (d = p,
- (c = "string" == typeof (l = e).completion.label ? l.completion.label : l.completion.label.name).match(W) ? (d[0] = c, 1) : "string" == typeof l.completion.documentation && l.completion.documentation.match(W) && (d[0] = l.completion.documentation, 1))) r.icon.className = "icon customcolor", r.iconContainer.className = "icon hide", r.colorspan.style.backgroundColor = p[0]; else if (20 === s.kind && this._themeService.getIconTheme().hasFileIcons) {
- r.icon.className = "icon hide", r.iconContainer.className = "icon hide";
- var g = M.getIconClasses(this._modelService, this._modeService, T.URI.from({
- scheme: "fake",
- path: a
- }), O.FileKind.FILE), f = M.getIconClasses(this._modelService, this._modeService, T.URI.from({
- scheme: "fake",
- path: s.detail
- }), O.FileKind.FILE);
- h.extraClasses = g.length > f.length ? g : f
- } else 23 === s.kind && this._themeService.getIconTheme().hasFolderIcons ? (r.icon.className = "icon hide", r.iconContainer.className = "icon hide", h.extraClasses = A.flatten([M.getIconClasses(this._modelService, this._modeService, T.URI.from({
- scheme: "fake", path: a
- }), O.FileKind.FOLDER), M.getIconClasses(this._modelService, this._modeService, T.URI.from({
- scheme: "fake",
- path: s.detail
- }), O.FileKind.FOLDER)])) : (r.icon.className = "icon hide", r.iconContainer.className = "", u.addClasses(r.iconContainer, "suggest-icon codicon codicon-symbol-" + x.completionKindToCssClass(s.kind)));
- s.tags && s.tags.indexOf(1) >= 0 && (h.extraClasses = (h.extraClasses || []).concat(["deprecated"]), h.matches = []), r.iconLabel.setLabel(a, void 0, h), "string" == typeof s.label ? (r.signatureLabel.textContent = "", r.qualifierLabel.textContent = "", r.detailsLabel.textContent = (s.detail || "").replace(/\n.*$/m, ""), u.removeClass(r.right, "always-show-details")) : (r.signatureLabel.textContent = (s.label.signature || "").replace(/\n.*$/m, ""), r.qualifierLabel.textContent = (s.label.qualifier || "").replace(/\n.*$/m, ""), r.detailsLabel.textContent = (s.label.type || "").replace(/\n.*$/m, ""), u.addClass(r.right, "always-show-details")), B(e) ? (u.addClass(r.right, "can-expand-details"), u.show(r.readMore), r.readMore.onmousedown = function (e) {
- e.stopPropagation(),
- e.preventDefault()
- }, r.readMore.onclick = function (e) {
- e.stopPropagation(), e.preventDefault(), o.widget.toggleDetails()
- }) : (u.removeClass(r.right, "can-expand-details"), u.hide(r.readMore), r.readMore.onmousedown = null, r.readMore.onclick = null)
- }, e.prototype.disposeTemplate = function (e) {
- e.disposables.dispose()
- }, e = h([g(3, k.IModelService), g(4, L.IModeService), g(5, b.IThemeService)], e)
- }(), H = function () {
- function e(e, t, i, o, s) {
- var l = this;
- this.widget = t, this.editor = i, this.markdownRenderer = o, this.kbToggleDetails = s, this.borderWidth = 1, this.disposables = new a.DisposableStore, this.el = u.append(e, u.$(".details")), this.disposables.add(a.toDisposable((function () {
- return e.removeChild(l.el)
- }))), this.body = u.$(".body"), this.scrollbar = new f.DomScrollableElement(this.body, {}), u.append(this.el, this.scrollbar.getDomNode()), this.disposables.add(this.scrollbar), this.header = u.append(this.body, u.$(".header")), this.close = u.append(this.header, u.$("span.codicon.codicon-close")), this.close.title = n.localize(6, null, this.kbToggleDetails),
- this.type = u.append(this.header, u.$("p.type")), this.docs = u.append(this.body, u.$("p.docs")), this.configureFont(), r.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function (e) {
- return e.hasChanged(34)
- })).on(this.configureFont, this, this.disposables), o.onDidRenderCodeBlock((function () {
- return l.scrollbar.scanDomNode()
- }), this, this.disposables)
- }
- return Object.defineProperty(e.prototype, "element", {
- get: function () {
- return this.el
- }, enumerable: !0, configurable: !0
- }), e.prototype.renderLoading = function () {
- this.type.textContent = n.localize(7, null), this.docs.textContent = ""
- }, e.prototype.renderItem = function (e, t) {
- var n = this;
- this.renderDisposeable = a.dispose(this.renderDisposeable);
- var i = e.completion, o = i.documentation, r = i.detail;
- if (t) {
- var s = "";
- s += "score: " + e.score[0] + (e.word ? ", compared '" + (e.completion.filterText && e.completion.filterText + " (filterText)" || e.completion.label) + "' with '" + e.word + "'" : " (no prefix)") + "\n", s += "distance: " + e.distance + ", see localityBonus-setting\n",
- s += "index: " + e.idx + ", based on " + (e.completion.sortText && 'sortText: "' + e.completion.sortText + '"' || "label") + "\n", o = (new P.MarkdownString).appendCodeblock("empty", s), r = "Provider: " + e.provider._debugDisplayName
- }
- if (!t && !B(e)) return this.type.textContent = "", this.docs.textContent = "", void u.addClass(this.el, "no-docs");
- if (u.removeClass(this.el, "no-docs"), "string" == typeof o) u.removeClass(this.docs, "markdown-docs"), this.docs.textContent = o; else {
- u.addClass(this.docs, "markdown-docs"), this.docs.innerHTML = "";
- var l = this.markdownRenderer.render(o);
- this.renderDisposeable = l, this.docs.appendChild(l.element)
- }
- r ? (this.type.innerText = r, u.show(this.type)) : (this.type.innerText = "", u.hide(this.type)), this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 2 * this.borderWidth + "px", this.el.style.userSelect = "text", this.el.tabIndex = -1, this.close.onmousedown = function (e) {
- e.preventDefault(), e.stopPropagation()
- }, this.close.onclick = function (e) {
- e.preventDefault(), e.stopPropagation(), n.widget.toggleDetails()
- }, this.body.scrollTop = 0,
- this.scrollbar.scanDomNode()
- }, e.prototype.scrollDown = function (e) {
- void 0 === e && (e = 8), this.body.scrollTop += e
- }, e.prototype.scrollUp = function (e) {
- void 0 === e && (e = 8), this.body.scrollTop -= e
- }, e.prototype.scrollTop = function () {
- this.body.scrollTop = 0
- }, e.prototype.scrollBottom = function () {
- this.body.scrollTop = this.body.scrollHeight
- }, e.prototype.pageDown = function () {
- this.scrollDown(80)
- }, e.prototype.pageUp = function () {
- this.scrollUp(80)
- }, e.prototype.setBorderWidth = function (e) {
- this.borderWidth = e
- }, e.prototype.configureFont = function () {
- var e = this.editor.getOptions(), t = e.get(34), n = t.fontFamily, i = e.get(90) || t.fontSize,
- o = e.get(91) || t.lineHeight, r = t.fontWeight, s = i + "px", a = o + "px";
- this.el.style.fontSize = s, this.el.style.fontWeight = r, this.el.style.fontFeatureSettings = t.fontFeatureSettings, this.type.style.fontFamily = n, this.close.style.height = a, this.close.style.width = a
- }, e.prototype.dispose = function () {
- this.disposables.dispose(), this.renderDisposeable = a.dispose(this.renderDisposeable)
- }, e
- }(), K = function () {
- function e(e, i, s, l, d, c, h, g, f) {
- var m, v, y = this
- ;this.editor = e, this.telemetryService = i, this.keybindingService = s, this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this.state = null, this.isAuto = !1, this.loadingTimeout = a.Disposable.None, this.currentSuggestionDetails = null, this.ignoreFocusEvents = !1, this.completionModel = null, this.showTimeout = new N.TimeoutTimer, this.toDispose = new a.DisposableStore, this.onDidSelectEmitter = new r.Emitter, this.onDidFocusEmitter = new r.Emitter, this.onDidHideEmitter = new r.Emitter, this.onDidShowEmitter = new r.Emitter, this.onDidSelect = this.onDidSelectEmitter.event, this.onDidFocus = this.onDidFocusEmitter.event, this.onDidHide = this.onDidHideEmitter.event, this.onDidShow = this.onDidShowEmitter.event, this.maxWidgetWidth = 660, this.listWidth = 330, this.firstFocusInCurrentList = !1, this.preferDocPositionTop = !1, this.docsPositionPreviousWidgetY = null, this.explainMode = !1, this._onDetailsKeydown = new r.Emitter, this.onDetailsKeyDown = this._onDetailsKeydown.event
- ;var b = this.toDispose.add(new E.MarkdownRenderer(e, h, g)),
- w = null !== (v = null === (m = s.lookupKeybinding("toggleSuggestionDetails")) || void 0 === m ? void 0 : m.getLabel()) && void 0 !== v ? v : "";
- this.msgDetailsLess = n.localize(10, null, w), this.msgDetailMore = n.localize(11, null, w), this.isAuto = !1, this.focusedItem = null, this.storageService = c, this.element = u.$(".editor-widget.suggest-widget"), this.toDispose.add(u.addDisposableListener(this.element, "click", (function (e) {
- e.target === y.element && y.hideWidget()
- }))), this.messageElement = u.append(this.element, u.$(".message")), this.listElement = u.append(this.element, u.$(".tree"));
- var L = function () {
- return u.toggleClass(y.element, "with-status-bar", !y.editor.getOption(89).hideStatusBar)
- };
- L(), this.statusBarElement = u.append(this.element, u.$(".suggest-status-bar")), this.statusBarLeftSpan = u.append(this.statusBarElement, u.$("span")), this.statusBarRightSpan = u.append(this.statusBarElement, u.$("span")), this.setStatusBarLeftText(""), this.setStatusBarRightText(""),
- this.details = f.createInstance(H, this.element, this, this.editor, b, w);
- var D = function () {
- return u.toggleClass(y.element, "no-icons", !y.editor.getOption(89).showIcons)
- };
- D();
- var x = f.createInstance(z, this, this.editor, w);
- this.list = new p.List("SuggestWidget", this.listElement, this, [x], {
- useShadows: !1,
- openController: {
- shouldOpen: function () {
- return !1
- }
- },
- mouseSupport: !1,
- accessibilityProvider: {
- getAriaLabel: function (e) {
- var t = "string" == typeof e.completion.label ? e.completion.label : e.completion.label.name;
- if (e.isResolved && y.expandDocsSettingFromStorage()) {
- var i = e.completion, r = i.documentation, s = i.detail,
- a = o.format("{0}{1}", s || "", r ? "string" == typeof r ? r : r.value : "");
- return n.localize(12, null, t, a)
- }
- return t
- }
- }
- }), this.toDispose.add(C.attachListStyler(this.list, d, {
- listInactiveFocusBackground: t.editorSuggestWidgetSelectedBackground,
- listInactiveFocusOutline: S.activeContrastBorder
- })), this.toDispose.add(d.onThemeChange((function (e) {
- return y.onThemeChange(e)
- }))), this.toDispose.add(e.onDidLayoutChange((function () {
- return y.onEditorLayoutChange()
- }))), this.toDispose.add(this.list.onMouseDown((function (e) {
- return y.onListMouseDownOrTap(e)
- }))), this.toDispose.add(this.list.onTap((function (e) {
- return y.onListMouseDownOrTap(e)
- }))), this.toDispose.add(this.list.onSelectionChange((function (e) {
- return y.onListSelection(e)
- }))), this.toDispose.add(this.list.onFocusChange((function (e) {
- return y.onListFocus(e)
- }))), this.toDispose.add(this.editor.onDidChangeCursorSelection((function () {
- return y.onCursorSelectionChanged()
- }))), this.toDispose.add(this.editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(89) && (L(), D())
- }))), this.suggestWidgetVisible = _.Context.Visible.bindTo(l), this.suggestWidgetMultipleSuggestions = _.Context.MultipleSuggestions.bindTo(l), this.editor.addContentWidget(this), this.setState(0), this.onThemeChange(d.getTheme()), this.toDispose.add(u.addStandardDisposableListener(this.details.element, "keydown", (function (e) {
- y._onDetailsKeydown.fire(e)
- }))), this.toDispose.add(this.editor.onMouseDown((function (e) {
- return y.onEditorMouseDown(e)
- })))
- }
- return e.prototype.onEditorMouseDown = function (e) {
- this.details.element.contains(e.target.element) ? this.details.element.focus() : this.element.contains(e.target.element) && this.editor.focus()
- }, e.prototype.onCursorSelectionChanged = function () {
- 0 !== this.state && this.editor.layoutContentWidget(this)
- }, e.prototype.onEditorLayoutChange = function () {
- 3 !== this.state && 5 !== this.state || !this.expandDocsSettingFromStorage() || this.expandSideOrBelow()
- }, e.prototype.onListMouseDownOrTap = function (e) {
- void 0 !== e.element && void 0 !== e.index && (e.browserEvent.preventDefault(), e.browserEvent.stopPropagation(), this.select(e.element, e.index))
- }, e.prototype.onListSelection = function (e) {
- e.elements.length && this.select(e.elements[0], e.indexes[0])
- }, e.prototype.select = function (e, t) {
- var n = this.completionModel;
- n && (this.onDidSelectEmitter.fire({item: e, index: t, model: n}), this.editor.focus())
- }, e.prototype.onThemeChange = function (e) {
- var n = e.getColor(t.editorSuggestWidgetBackground);
- n && (this.listElement.style.backgroundColor = n.toString(),
- this.statusBarElement.style.backgroundColor = n.toString(), this.details.element.style.backgroundColor = n.toString(), this.messageElement.style.backgroundColor = n.toString());
- var i = e.getColor(t.editorSuggestWidgetBorder);
- i && (this.listElement.style.borderColor = i.toString(), this.statusBarElement.style.borderColor = i.toString(), this.details.element.style.borderColor = i.toString(), this.messageElement.style.borderColor = i.toString(), this.detailsBorderColor = i.toString());
- var o = e.getColor(S.focusBorder);
- o && (this.detailsFocusBorderColor = o.toString()), this.details.setBorderWidth("hc" === e.type ? 2 : 1)
- }, e.prototype.onListFocus = function (e) {
- var t, i, o = this;
- if (!this.ignoreFocusEvents) {
- if (!e.elements.length) return this.currentSuggestionDetails && (this.currentSuggestionDetails.cancel(), this.currentSuggestionDetails = null, this.focusedItem = null), void this.editor.setAriaOptions({activeDescendant: void 0});
- if (this.completionModel) {
- var r = e.elements[0], a = e.indexes[0];
- if (this.firstFocusInCurrentList = !this.focusedItem, r !== this.focusedItem) {
- var l = "insert" === this.editor.getOption(89).insertMode,
- h = null === (t = this.keybindingService.lookupKeybinding("acceptSelectedSuggestion")) || void 0 === t ? void 0 : t.getLabel(),
- p = null === (i = this.keybindingService.lookupKeybinding("acceptAlternativeSelectedSuggestion")) || void 0 === i ? void 0 : i.getLabel();
- F.Position.equals(r.editInsertEnd, r.editReplaceEnd) ? this.setStatusBarLeftText(n.localize(15, null, h)) : l ? this.setStatusBarLeftText(n.localize(13, null, h, p)) : this.setStatusBarLeftText(n.localize(14, null, h, p)), this.currentSuggestionDetails && (this.currentSuggestionDetails.cancel(), this.currentSuggestionDetails = null), this.focusedItem = r, this.list.reveal(a), this.currentSuggestionDetails = N.createCancelablePromise((function (e) {
- return d(o, void 0, void 0, (function () {
- var t, n, i = this;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return t = N.disposableTimeout((function () {
- return i.showDetails(!0)
- }), 250), e.onCancellationRequested((function () {
- return t.dispose()
- })), [4, r.resolve(e)];
- case 1:
- return n = o.sent(), t.dispose(), [2, n]
- }
- }))
- }))
- })),
- this.currentSuggestionDetails.then((function () {
- a >= o.list.length || r !== o.list.element(a) || (o.ignoreFocusEvents = !0, o.list.splice(a, 1, [r]), o.list.setFocus([a]), o.ignoreFocusEvents = !1, o.expandDocsSettingFromStorage() ? o.showDetails(!1) : u.removeClass(o.element, "docs-side"), B(o.focusedItem) ? o.expandDocsSettingFromStorage() ? o.setStatusBarRightText(o.msgDetailsLess) : o.setStatusBarRightText(o.msgDetailMore) : o.statusBarRightSpan.innerText = "", o.editor.setAriaOptions({activeDescendant: V(a)}))
- })).catch(s.onUnexpectedError)
- }
- this.onDidFocusEmitter.fire({item: r, index: a, model: this.completionModel})
- }
- }
- }, e.prototype.setState = function (t) {
- if (this.element) {
- var n = this.state !== t;
- switch (this.state = t, u.toggleClass(this.element, "frozen", 4 === t), t) {
- case 0:
- u.hide(this.messageElement, this.details.element, this.listElement, this.statusBarElement), this.hide(), this.listHeight = 0, n && this.list.splice(0, this.list.length), this.focusedItem = null;
- break;
- case 1:
- this.messageElement.textContent = e.LOADING_MESSAGE,
- u.hide(this.listElement, this.details.element, this.statusBarElement), u.show(this.messageElement), u.removeClass(this.element, "docs-side"), this.show(), this.focusedItem = null;
- break;
- case 2:
- this.messageElement.textContent = e.NO_SUGGESTIONS_MESSAGE, u.hide(this.listElement, this.details.element, this.statusBarElement), u.show(this.messageElement), u.removeClass(this.element, "docs-side"), this.show(), this.focusedItem = null;
- break;
- case 3:
- u.hide(this.messageElement), u.show(this.listElement, this.statusBarElement), this.show();
- break;
- case 4:
- u.hide(this.messageElement), u.show(this.listElement), this.show();
- break;
- case 5:
- u.hide(this.messageElement), u.show(this.details.element, this.listElement, this.statusBarElement), this.show()
- }
- }
- }, e.prototype.showTriggered = function (e, t) {
- var n = this;
- 0 === this.state && (this.isAuto = !!e, this.isAuto || (this.loadingTimeout = N.disposableTimeout((function () {
- return n.setState(1)
- }), t)))
- }, e.prototype.showSuggestions = function (e, t, n, i) {
- if (this.preferDocPositionTop = !1, this.docsPositionPreviousWidgetY = null,
- this.loadingTimeout.dispose(), this.currentSuggestionDetails && (this.currentSuggestionDetails.cancel(), this.currentSuggestionDetails = null), this.completionModel !== e && (this.completionModel = e), n && 2 !== this.state && 0 !== this.state) this.setState(4); else {
- var o = this.completionModel.items.length, r = 0 === o;
- if (this.suggestWidgetMultipleSuggestions.set(o > 1), r) i ? this.setState(0) : this.setState(2), this.completionModel = null; else {
- if (3 !== this.state) {
- var s = this.completionModel.stats;
- s.wasAutomaticallyTriggered = !!i, this.telemetryService.publicLog("suggestWidget", l({}, s))
- }
- this.focusedItem = null, this.list.splice(0, this.list.length, this.completionModel.items), n ? this.setState(4) : this.setState(3), this.list.reveal(t, 0), this.list.setFocus([t]), this.detailsBorderColor && (this.details.element.style.borderColor = this.detailsBorderColor)
- }
- }
- }, e.prototype.selectNextPage = function () {
- switch (this.state) {
- case 0:
- return !1;
- case 5:
- return this.details.pageDown(), !0;
- case 1:
- return !this.isAuto;
- default:
- return this.list.focusNextPage(), !0
- }
- },
- e.prototype.selectNext = function () {
- switch (this.state) {
- case 0:
- return !1;
- case 1:
- return !this.isAuto;
- default:
- return this.list.focusNext(1, !0), !0
- }
- }, e.prototype.selectLast = function () {
- switch (this.state) {
- case 0:
- return !1;
- case 5:
- return this.details.scrollBottom(), !0;
- case 1:
- return !this.isAuto;
- default:
- return this.list.focusLast(), !0
- }
- }, e.prototype.selectPreviousPage = function () {
- switch (this.state) {
- case 0:
- return !1;
- case 5:
- return this.details.pageUp(), !0;
- case 1:
- return !this.isAuto;
- default:
- return this.list.focusPreviousPage(), !0
- }
- }, e.prototype.selectPrevious = function () {
- switch (this.state) {
- case 0:
- return !1;
- case 1:
- return !this.isAuto;
- default:
- return this.list.focusPrevious(1, !0), !1
- }
- }, e.prototype.selectFirst = function () {
- switch (this.state) {
- case 0:
- return !1;
- case 5:
- return this.details.scrollTop(), !0;
- case 1:
- return !this.isAuto;
- default:
- return this.list.focusFirst(), !0
- }
- }, e.prototype.getFocusedItem = function () {
- if (0 !== this.state && 2 !== this.state && 1 !== this.state && this.completionModel) return {
- item: this.list.getFocusedElements()[0],
- index: this.list.getFocus()[0], model: this.completionModel
- }
- }, e.prototype.toggleDetailsFocus = function () {
- 5 === this.state ? (this.setState(3), this.detailsBorderColor && (this.details.element.style.borderColor = this.detailsBorderColor)) : 3 === this.state && this.expandDocsSettingFromStorage() && (this.setState(5), this.detailsFocusBorderColor && (this.details.element.style.borderColor = this.detailsFocusBorderColor)), this.telemetryService.publicLog2("suggestWidget:toggleDetailsFocus")
- }, e.prototype.toggleDetails = function () {
- if (B(this.list.getFocusedElements()[0])) if (this.expandDocsSettingFromStorage()) this.updateExpandDocsSetting(!1), u.hide(this.details.element), u.removeClass(this.element, "docs-side"), u.removeClass(this.element, "docs-below"), this.editor.layoutContentWidget(this), this.setStatusBarRightText(this.msgDetailMore), this.telemetryService.publicLog2("suggestWidget:collapseDetails"); else {
- if (3 !== this.state && 5 !== this.state && 4 !== this.state) return;
- this.updateExpandDocsSetting(!0), this.showDetails(!1),
- this.setStatusBarRightText(this.msgDetailsLess), this.telemetryService.publicLog2("suggestWidget:expandDetails")
- }
- }, e.prototype.showDetails = function (e) {
- e || this.expandSideOrBelow(), u.show(this.details.element), this.details.element.style.maxHeight = this.maxWidgetHeight + "px", e ? this.details.renderLoading() : this.details.renderItem(this.list.getFocusedElements()[0], this.explainMode), this.listElement.style.marginTop = "0px", this.editor.layoutContentWidget(this), this.adjustDocsPosition(), this.editor.focus()
- }, e.prototype.toggleExplainMode = function () {
- this.list.getFocusedElements()[0] && this.expandDocsSettingFromStorage() && (this.explainMode = !this.explainMode, this.showDetails(!1))
- }, e.prototype.show = function () {
- var e = this, t = this.updateListHeight();
- t !== this.listHeight && (this.editor.layoutContentWidget(this), this.listHeight = t), this.suggestWidgetVisible.set(!0), this.showTimeout.cancelAndSet((function () {
- u.addClass(e.element, "visible"), e.onDidShowEmitter.fire(e)
- }), 100)
- }, e.prototype.hide = function () {
- this.suggestWidgetVisible.reset(),
- this.suggestWidgetMultipleSuggestions.reset(), u.removeClass(this.element, "visible")
- }, e.prototype.hideWidget = function () {
- this.loadingTimeout.dispose(), this.setState(0), this.onDidHideEmitter.fire(this)
- }, e.prototype.getPosition = function () {
- if (0 === this.state) return null;
- var e = [2, 1];
- return this.preferDocPositionTop && (e = [1]), {position: this.editor.getPosition(), preference: e}
- }, e.prototype.getDomNode = function () {
- return this.element
- }, e.prototype.getId = function () {
- return e.ID
- }, e.prototype.isFrozen = function () {
- return 4 === this.state
- }, e.prototype.updateListHeight = function () {
- var e = 0;
- if (2 === this.state || 1 === this.state) e = this.unfocusedHeight; else {
- var t = this.list.contentHeight / this.unfocusedHeight,
- n = this.editor.getOption(89).maxVisibleSuggestions;
- e = Math.min(t, n) * this.unfocusedHeight
- }
- return this.element.style.lineHeight = this.unfocusedHeight + "px", this.listElement.style.height = e + "px", this.statusBarElement.style.top = e + "px", this.list.layout(e), e
- }, e.prototype.adjustDocsPosition = function () {
- if (this.editor.hasModel()) {
- var e = this.editor.getOption(49),
- t = this.editor.getScrolledVisiblePosition(this.editor.getPosition()),
- n = u.getDomNodePagePosition(this.editor.getDomNode()), i = n.left + t.left,
- o = n.top + t.top + t.height, r = u.getDomNodePagePosition(this.element), s = r.left, a = r.top;
- if (this.docsPositionPreviousWidgetY && this.docsPositionPreviousWidgetY < a && !this.preferDocPositionTop) return this.preferDocPositionTop = !0, void this.adjustDocsPosition();
- this.docsPositionPreviousWidgetY = a, s < i - this.listWidth ? u.addClass(this.element, "list-right") : u.removeClass(this.element, "list-right"), u.hasClass(this.element, "docs-side") && o - e > a && this.details.element.offsetHeight > this.listElement.offsetHeight && (this.listElement.style.marginTop = this.details.element.offsetHeight - this.listElement.offsetHeight + "px")
- }
- }, e.prototype.expandSideOrBelow = function () {
- if (!B(this.focusedItem) && this.firstFocusInCurrentList) return u.removeClass(this.element, "docs-side"), void u.removeClass(this.element, "docs-below");
- var e = this.element.style.maxWidth.match(/(\d+)px/)
- ;!e || Number(e[1]) < this.maxWidgetWidth ? (u.addClass(this.element, "docs-below"), u.removeClass(this.element, "docs-side")) : B(this.focusedItem) && (u.addClass(this.element, "docs-side"), u.removeClass(this.element, "docs-below"))
- }, Object.defineProperty(e.prototype, "maxWidgetHeight", {
- get: function () {
- return this.unfocusedHeight * this.editor.getOption(89).maxVisibleSuggestions
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "unfocusedHeight", {
- get: function () {
- var e = this.editor.getOptions();
- return e.get(91) || e.get(34).lineHeight
- }, enumerable: !0, configurable: !0
- }), e.prototype.getHeight = function (e) {
- return this.unfocusedHeight
- }, e.prototype.getTemplateId = function (e) {
- return "suggestion"
- }, e.prototype.expandDocsSettingFromStorage = function () {
- return this.storageService.getBoolean("expandSuggestionDocs", 0, !1)
- }, e.prototype.updateExpandDocsSetting = function (e) {
- this.storageService.store("expandSuggestionDocs", e, 0)
- }, e.prototype.setStatusBarLeftText = function (e) {
- this.statusBarLeftSpan.innerText = e
- },
- e.prototype.setStatusBarRightText = function (e) {
- this.statusBarRightSpan.innerText = e
- }, e.prototype.dispose = function () {
- this.details.dispose(), this.list.dispose(), this.toDispose.dispose(), this.loadingTimeout.dispose(), this.showTimeout.dispose()
- }, e.ID = "editor.widget.suggestWidget", e.LOADING_MESSAGE = n.localize(8, null), e.NO_SUGGESTIONS_MESSAGE = n.localize(9, null), e = h([g(1, y.ITelemetryService), g(2, m.IKeybindingService), g(3, v.IContextKeyService), g(4, b.IThemeService), g(5, w.IStorageService), g(6, L.IModeService), g(7, D.IOpenerService), g(8, R.IInstantiationService)], e)
- }();
- t.SuggestWidget = K, b.registerThemingParticipant((function (e, n) {
- var i = e.getColor(t.editorSuggestWidgetHighlightForeground);
- i && n.addRule(".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: " + i + "; }");
- var o = e.getColor(t.editorSuggestWidgetForeground);
- o && n.addRule(".monaco-editor .suggest-widget { color: " + o + "; }");
- var r = e.getColor(S.textLinkForeground)
- ;r && n.addRule(".monaco-editor .suggest-widget a { color: " + r + "; }");
- var s = e.getColor(S.textCodeBlockBackground);
- s && n.addRule(".monaco-editor .suggest-widget code { background-color: " + s + "; }")
- }))
- })), define(n[586], i([0, 1, 471, 19, 15, 26, 10, 2, 12, 3, 23, 48, 30, 17, 18, 20, 14]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var C = _.registerColor("editor.wordHighlightBackground", {
- dark: "#575757B8",
- light: "#57575740",
- hc: null
- }, n.localize(0, null), !0), b = _.registerColor("editor.wordHighlightStrongBackground", {
- dark: "#004972B8",
- light: "#0e639c40",
- hc: null
- }, n.localize(1, null), !0), S = _.registerColor("editor.wordHighlightBorder", {
- light: null,
- dark: null,
- hc: _.activeContrastBorder
- }, n.localize(2, null)), w = _.registerColor("editor.wordHighlightStrongBorder", {
- light: null,
- dark: null,
- hc: _.activeContrastBorder
- }, n.localize(3, null)), E = _.registerColor("editorOverviewRuler.wordHighlightForeground", {
- dark: "#A0A0A0CC", light: "#A0A0A0CC", hc: "#A0A0A0CC"
- }, n.localize(4, null), !0), L = _.registerColor("editorOverviewRuler.wordHighlightStrongForeground", {
- dark: "#C0A0C0CC",
- light: "#C0A0C0CC",
- hc: "#C0A0C0CC"
- }, n.localize(5, null), !0), D = new v.RawContextKey("hasWordHighlights", !1);
- function N(e, t, n) {
- var r = m.DocumentHighlightProviderRegistry.ordered(e);
- return o.first(r.map((function (i) {
- return function () {
- return Promise.resolve(i.provideDocumentHighlights(e, t, n)).then(void 0, a.onUnexpectedExternalError)
- }
- })), i.isNonEmptyArray)
- }
- t.getOccurrencesAtPosition = N;
- var x = function () {
- function e(e, t, n) {
- var i = this;
- this._wordRange = this._getCurrentWordRange(e, t), this.result = o.createCancelablePromise((function (o) {
- return i._compute(e, t, n, o)
- }))
- }
- return e.prototype._getCurrentWordRange = function (e, t) {
- var n = e.getWordAtPosition(t.getPosition());
- return n ? new d.Range(t.startLineNumber, n.startColumn, t.startLineNumber, n.endColumn) : null
- }, e.prototype.isValid = function (e, t, n) {
- for (var i = t.startLineNumber, o = t.startColumn, r = t.endColumn, s = this._getCurrentWordRange(e, t), a = Boolean(this._wordRange && this._wordRange.equalsRange(s)), l = 0, u = n.length; !a && l < u; l++) {
- var d = e.getDecorationRange(n[l]);
- d && d.startLineNumber === i && d.startColumn <= o && d.endColumn >= r && (a = !0)
- }
- return a
- }, e.prototype.cancel = function () {
- this.result.cancel()
- }, e
- }(), I = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._compute = function (e, t, n, i) {
- return N(e, t.getPosition(), i).then((function (e) {
- return e || []
- }))
- }, t
- }(x), M = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, n, i) || this;
- return o._selectionIsEmpty = n.isEmpty(), o
- }
- return r(t, e), t.prototype._compute = function (e, t, n, i) {
- return o.timeout(250, i).then((function () {
- if (!t.isEmpty()) return [];
- var i = e.getWordAtPosition(t.getPosition());
- return i ? e.findMatches(i.word, !0, !1, !0, n, !1).map((function (e) {
- return {range: e.range, kind: m.DocumentHighlightKind.Text}
- })) : []
- }))
- }, t.prototype.isValid = function (t, n, i) {
- var o = n.isEmpty()
- ;
- return this._selectionIsEmpty === o && e.prototype.isValid.call(this, t, n, i)
- }, t
- }(x);
- u.registerModelAndPositionCommand("_executeDocumentHighlights", (function (e, t) {
- return N(e, t, s.CancellationToken.None)
- }));
- var k = function () {
- function e(e, t) {
- var n = this;
- this.toUnhook = new l.DisposableStore, this.workerRequestTokenId = 0, this.workerRequestCompleted = !1, this.workerRequestValue = [], this.lastCursorPositionChangeTime = 0, this.renderDecorationsTimer = -1, this.editor = e, this._hasWordHighlights = D.bindTo(t), this._ignorePositionChangeEvent = !1, this.occurrencesHighlight = this.editor.getOption(61), this.model = this.editor.getModel(), this.toUnhook.add(e.onDidChangeCursorPosition((function (e) {
- n._ignorePositionChangeEvent || n.occurrencesHighlight && n._onPositionChanged(e)
- }))), this.toUnhook.add(e.onDidChangeModelContent((function (e) {
- n._stopAll()
- }))), this.toUnhook.add(e.onDidChangeConfiguration((function (e) {
- var t = n.editor.getOption(61);
- n.occurrencesHighlight !== t && (n.occurrencesHighlight = t, n._stopAll())
- }))), this._decorationIds = [],
- this.workerRequestTokenId = 0, this.workerRequest = null, this.workerRequestCompleted = !1, this.lastCursorPositionChangeTime = 0, this.renderDecorationsTimer = -1
- }
- return e.prototype.hasDecorations = function () {
- return this._decorationIds.length > 0
- }, e.prototype.restore = function () {
- this.occurrencesHighlight && this._run()
- }, e.prototype._getSortedHighlights = function () {
- var e = this;
- return i.coalesce(this._decorationIds.map((function (t) {
- return e.model.getDecorationRange(t)
- })).sort(d.Range.compareRangesUsingStarts))
- }, e.prototype.moveNext = function () {
- var e = this, t = this._getSortedHighlights(), n = t[(i.firstIndex(t, (function (t) {
- return t.containsPosition(e.editor.getPosition())
- })) + 1) % t.length];
- try {
- this._ignorePositionChangeEvent = !0, this.editor.setPosition(n.getStartPosition()), this.editor.revealRangeInCenterIfOutsideViewport(n)
- } finally {
- this._ignorePositionChangeEvent = !1
- }
- }, e.prototype.moveBack = function () {
- var e = this, t = this._getSortedHighlights(), n = t[(i.firstIndex(t, (function (t) {
- return t.containsPosition(e.editor.getPosition())
- })) - 1 + t.length) % t.length];
- try {
- this._ignorePositionChangeEvent = !0, this.editor.setPosition(n.getStartPosition()), this.editor.revealRangeInCenterIfOutsideViewport(n)
- } finally {
- this._ignorePositionChangeEvent = !1
- }
- }, e.prototype._removeDecorations = function () {
- this._decorationIds.length > 0 && (this._decorationIds = this.editor.deltaDecorations(this._decorationIds, []), this._hasWordHighlights.set(!1))
- }, e.prototype._stopAll = function () {
- this._removeDecorations(), -1 !== this.renderDecorationsTimer && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1), null !== this.workerRequest && (this.workerRequest.cancel(), this.workerRequest = null), this.workerRequestCompleted || (this.workerRequestTokenId++, this.workerRequestCompleted = !0)
- }, e.prototype._onPositionChanged = function (e) {
- this.occurrencesHighlight && 3 === e.reason ? this._run() : this._stopAll()
- }, e.prototype._run = function () {
- var e = this, t = this.editor.getSelection();
- if (t.startLineNumber === t.endLineNumber) {
- var n = t.startLineNumber, i = t.startColumn, o = t.endColumn,
- r = this.model.getWordAtPosition({lineNumber: n, column: i});
- if (!r || r.startColumn > i || r.endColumn < o) this._stopAll(); else {
- var s, l, u,
- d = this.workerRequest && this.workerRequest.isValid(this.model, t, this._decorationIds);
- if (this.lastCursorPositionChangeTime = (new Date).getTime(), d) this.workerRequestCompleted && -1 !== this.renderDecorationsTimer && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1, this._beginRenderDecorations()); else {
- this._stopAll();
- var c = ++this.workerRequestTokenId;
- this.workerRequestCompleted = !1, this.workerRequest = (s = this.model, l = this.editor.getSelection(), u = this.editor.getOption(96), m.DocumentHighlightProviderRegistry.has(s) ? new I(s, l, u) : new M(s, l, u)), this.workerRequest.result.then((function (t) {
- c === e.workerRequestTokenId && (e.workerRequestCompleted = !0, e.workerRequestValue = t || [], e._beginRenderDecorations())
- }), a.onUnexpectedError)
- }
- }
- } else this._stopAll()
- }, e.prototype._beginRenderDecorations = function () {
- var e = this, t = (new Date).getTime(), n = this.lastCursorPositionChangeTime + 250;
- t >= n ? (this.renderDecorationsTimer = -1, this.renderDecorations()) : this.renderDecorationsTimer = setTimeout((function () {
- e.renderDecorations()
- }), n - t)
- }, e.prototype.renderDecorations = function () {
- this.renderDecorationsTimer = -1;
- for (var t = [], n = 0, i = this.workerRequestValue.length; n < i; n++) {
- var o = this.workerRequestValue[n];
- t.push({range: o.range, options: e._getDecorationOptions(o.kind)})
- }
- this._decorationIds = this.editor.deltaDecorations(this._decorationIds, t), this._hasWordHighlights.set(this.hasDecorations())
- }, e._getDecorationOptions = function (e) {
- return e === m.DocumentHighlightKind.Write ? this._WRITE_OPTIONS : e === m.DocumentHighlightKind.Text ? this._TEXT_OPTIONS : this._REGULAR_OPTIONS
- }, e.prototype.dispose = function () {
- this._stopAll(), this.toUnhook.dispose()
- }, e._WRITE_OPTIONS = f.ModelDecorationOptions.register({
- stickiness: 1,
- className: "wordHighlightStrong",
- overviewRuler: {color: y.themeColorFromId(L), position: p.OverviewRulerLane.Center}
- }),
- e._TEXT_OPTIONS = f.ModelDecorationOptions.register({
- stickiness: 1,
- className: "selectionHighlight",
- overviewRuler: {
- color: y.themeColorFromId(_.overviewRulerSelectionHighlightForeground),
- position: p.OverviewRulerLane.Center
- }
- }), e._REGULAR_OPTIONS = f.ModelDecorationOptions.register({
- stickiness: 1,
- className: "wordHighlight",
- overviewRuler: {color: y.themeColorFromId(E), position: p.OverviewRulerLane.Center}
- }), e
- }(), T = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- i.wordHighligher = null;
- var o = function () {
- t.hasModel() && (i.wordHighligher = new k(t, n))
- };
- return i._register(t.onDidChangeModel((function (e) {
- i.wordHighligher && (i.wordHighligher.dispose(), i.wordHighligher = null), o()
- }))), o(), i
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.saveViewState = function () {
- return !(!this.wordHighligher || !this.wordHighligher.hasDecorations())
- }, t.prototype.moveNext = function () {
- this.wordHighligher && this.wordHighligher.moveNext()
- }, t.prototype.moveBack = function () {
- this.wordHighligher && this.wordHighligher.moveBack()
- },
- t.prototype.restoreViewState = function (e) {
- this.wordHighligher && e && this.wordHighligher.restore()
- }, t.prototype.dispose = function () {
- this.wordHighligher && (this.wordHighligher.dispose(), this.wordHighligher = null), e.prototype.dispose.call(this)
- }, t.ID = "editor.contrib.wordHighlighter", t = h([g(1, v.IContextKeyService)], t)
- }(l.Disposable), R = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i._isNext = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = T.get(t);
- n && (this._isNext ? n.moveNext() : n.moveBack())
- }, t
- }(u.EditorAction), O = function (e) {
- function t() {
- return e.call(this, !0, {
- id: "editor.action.wordHighlight.next",
- label: n.localize(6, null),
- alias: "Go to Next Symbol Highlight",
- precondition: D,
- kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 65, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(R), P = function (e) {
- function t() {
- return e.call(this, !1, {
- id: "editor.action.wordHighlight.prev",
- label: n.localize(7, null),
- alias: "Go to Previous Symbol Highlight",
- precondition: D,
- kbOpts: {
- kbExpr: c.EditorContextKeys.editorTextFocus, primary: 1089,
- weight: 100
- }
- }) || this
- }
- return r(t, e), t
- }(R), A = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.wordHighlight.trigger",
- label: n.localize(8, null),
- alias: "Trigger Symbol Highlight",
- precondition: D.toNegated(),
- kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 0, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t, n) {
- var i = T.get(t);
- i && i.restoreViewState(!0)
- }, t
- }(u.EditorAction);
- u.registerEditorContribution(T.ID, T), u.registerEditorAction(O), u.registerEditorAction(P), u.registerEditorAction(A), y.registerThemingParticipant((function (e, t) {
- var n = e.getColor(_.editorSelectionHighlight);
- n && (t.addRule(".monaco-editor .focused .selectionHighlight { background-color: " + n + "; }"), t.addRule(".monaco-editor .selectionHighlight { background-color: " + n.transparent(.5) + "; }"));
- var i = e.getColor(C);
- i && t.addRule(".monaco-editor .wordHighlight { background-color: " + i + "; }");
- var o = e.getColor(b);
- o && t.addRule(".monaco-editor .wordHighlightStrong { background-color: " + o + "; }")
- ;var r = e.getColor(_.editorSelectionHighlightBorder);
- r && t.addRule(".monaco-editor .selectionHighlight { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + r + "; box-sizing: border-box; }");
- var s = e.getColor(S);
- s && t.addRule(".monaco-editor .wordHighlight { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + s + "; box-sizing: border-box; }");
- var a = e.getColor(w);
- a && t.addRule(".monaco-editor .wordHighlightStrong { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + a + "; box-sizing: border-box; }")
- }))
- })), define(n[587], i([0, 1, 24, 6, 28, 134, 50, 47, 2, 16, 5, 25, 12, 23, 225, 18, 11, 34, 51, 20, 14, 59, 325]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var L = new _.RawContextKey("accessibilityHelpWidgetVisible", !1), D = function (e) {
- function t(t, n) {
- var i = e.call(this) || this;
- return i._editor = t, i._widget = i._register(n.createInstance(N, i._editor)), i
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.show = function () {
- this._widget.show()
- },
- t.prototype.hide = function () {
- this._widget.hide()
- }, t.ID = "editor.contrib.accessibilityHelpController", t = h([g(1, y.IInstantiationService)], t)
- }(u.Disposable);
- var N = function (e) {
- function t(t, n, r, s) {
- var l = e.call(this) || this;
- return l._contextKeyService = n, l._keybindingService = r, l._openerService = s, l._editor = t, l._isVisibleKey = L.bindTo(l._contextKeyService), l._domNode = o.createFastDomNode(document.createElement("div")), l._domNode.setClassName("accessibilityHelpWidget"), l._domNode.setDisplay("none"), l._domNode.setAttribute("role", "dialog"), l._domNode.setAttribute("aria-hidden", "true"), l._contentDomNode = o.createFastDomNode(document.createElement("div")), l._contentDomNode.setAttribute("role", "document"), l._domNode.appendChild(l._contentDomNode), l._isVisible = !1, l._register(l._editor.onDidLayoutChange((function () {
- l._isVisible && l._layout()
- }))), l._register(i.addStandardDisposableListener(l._contentDomNode.domNode, "keydown", (function (e) {
- if (l._isVisible && (e.equals(2083) && (a.alert(E.AccessibilityHelpNLS.emergencyConfOn),
- l._editor.updateOptions({accessibilitySupport: "on"}), i.clearNode(l._contentDomNode.domNode), l._buildContent(), l._contentDomNode.domNode.focus(), e.preventDefault(), e.stopPropagation()), e.equals(2086))) {
- a.alert(E.AccessibilityHelpNLS.openingDocs);
- var t = l._editor.getRawOptions().accessibilityHelpUrl;
- void 0 === t && (t = "https://go.microsoft.com/fwlink/?linkid=852450"), l._openerService.open(p.URI.parse(t)), e.preventDefault(), e.stopPropagation()
- }
- }))), l.onblur(l._contentDomNode.domNode, (function () {
- l.hide()
- })), l._editor.addOverlayWidget(l), l
- }
- return r(t, e), t.prototype.dispose = function () {
- this._editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
- }, t.prototype.getId = function () {
- return t.ID
- }, t.prototype.getDomNode = function () {
- return this._domNode.domNode
- }, t.prototype.getPosition = function () {
- return {preference: null}
- }, t.prototype.show = function () {
- this._isVisible || (this._isVisible = !0, this._isVisibleKey.set(!0), this._layout(), this._domNode.setDisplay("block"), this._domNode.setAttribute("aria-hidden", "false"),
- this._contentDomNode.domNode.tabIndex = 0, this._buildContent(), this._contentDomNode.domNode.focus())
- }, t.prototype._descriptionForCommand = function (e, t, n) {
- var i = this._keybindingService.lookupKeybinding(e);
- return i ? c.format(t, i.getAriaLabel()) : c.format(n, e)
- }, t.prototype._buildContent = function () {
- var e = this._editor.getOptions(), t = this._editor.getSelections(), n = 0;
- if (t) {
- var i = this._editor.getModel();
- i && t.forEach((function (e) {
- n += i.getValueLengthInRange(e)
- }))
- }
- var o = function (e, t) {
- return e && 0 !== e.length ? 1 === e.length ? t ? c.format(E.AccessibilityHelpNLS.singleSelectionRange, e[0].positionLineNumber, e[0].positionColumn, t) : c.format(E.AccessibilityHelpNLS.singleSelection, e[0].positionLineNumber, e[0].positionColumn) : t ? c.format(E.AccessibilityHelpNLS.multiSelectionRange, e.length, t) : e.length > 0 ? c.format(E.AccessibilityHelpNLS.multiSelection, e.length) : "" : E.AccessibilityHelpNLS.noSelection
- }(t, n)
- ;e.get(45) ? e.get(68) ? o += E.AccessibilityHelpNLS.readonlyDiffEditor : o += E.AccessibilityHelpNLS.editableDiffEditor : e.get(68) ? o += E.AccessibilityHelpNLS.readonlyEditor : o += E.AccessibilityHelpNLS.editableEditor;
- var r = d.isMacintosh ? E.AccessibilityHelpNLS.changeConfigToOnMac : E.AccessibilityHelpNLS.changeConfigToOnWinLinux;
- switch (e.get(2)) {
- case 0:
- o += "\n\n - " + r;
- break;
- case 2:
- o += "\n\n - " + E.AccessibilityHelpNLS.auto_on;
- break;
- case 1:
- o += "\n\n - " + E.AccessibilityHelpNLS.auto_off, o += " " + r
- }
- e.get(106) ? o += "\n\n - " + this._descriptionForCommand(v.ToggleTabFocusModeAction.ID, E.AccessibilityHelpNLS.tabFocusModeOnMsg, E.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb) : o += "\n\n - " + this._descriptionForCommand(v.ToggleTabFocusModeAction.ID, E.AccessibilityHelpNLS.tabFocusModeOffMsg, E.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb), o += "\n\n - " + (d.isMacintosh ? E.AccessibilityHelpNLS.openDocMac : E.AccessibilityHelpNLS.openDocWinLinux), o += "\n\n" + E.AccessibilityHelpNLS.outroMsg, this._contentDomNode.domNode.appendChild(s.renderFormattedText(o)),
- this._contentDomNode.domNode.setAttribute("aria-label", o)
- }, t.prototype.hide = function () {
- this._isVisible && (this._isVisible = !1, this._isVisibleKey.reset(), this._domNode.setDisplay("none"), this._domNode.setAttribute("aria-hidden", "true"), this._contentDomNode.domNode.tabIndex = -1, i.clearNode(this._contentDomNode.domNode), this._editor.focus())
- }, t.prototype._layout = function () {
- var e = this._editor.getLayoutInfo(), n = Math.max(5, Math.min(t.WIDTH, e.width - 40)),
- i = Math.max(5, Math.min(t.HEIGHT, e.height - 40));
- this._domNode.setWidth(n), this._domNode.setHeight(i);
- var o = Math.round((e.height - i) / 2);
- this._domNode.setTop(o);
- var r = Math.round((e.width - n) / 2);
- this._domNode.setLeft(r)
- }, t.ID = "editor.contrib.accessibilityHelpWidget", t.WIDTH = 500, t.HEIGHT = 300, t = h([g(1, _.IContextKeyService), g(2, C.IKeybindingService), g(3, b.IOpenerService)], t)
- }(l.Widget), x = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.showAccessibilityHelp",
- label: E.AccessibilityHelpNLS.showAccessibilityHelpAction,
- alias: "Show Accessibility Help",
- precondition: void 0,
- kbOpts: {kbExpr: m.EditorContextKeys.focus, primary: n.isIE ? 2107 : 571, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = D.get(t);
- n && n.show()
- }, t
- }(f.EditorAction);
- f.registerEditorContribution(D.ID, D), f.registerEditorAction(x);
- var I = f.EditorCommand.bindToContribution(D.get);
- f.registerEditorCommand(new I({
- id: "closeAccessibilityHelp", precondition: L, handler: function (e) {
- return e.hide()
- }, kbOpts: {weight: 200, kbExpr: m.EditorContextKeys.focus, primary: 9, secondary: [1033]}
- })), w.registerThemingParticipant((function (e, t) {
- var n = e.getColor(S.editorWidgetBackground);
- n && t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: " + n + "; }");
- var i = e.getColor(S.editorWidgetForeground);
- i && t.addRule(".monaco-editor .accessibilityHelpWidget { color: " + i + "; }");
- var o = e.getColor(S.widgetShadow);
- o && t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px " + o + "; }");
- var r = e.getColor(S.contrastBorder);
- r && t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid " + r + "; }")
- }))
- })),
- define(n[588], i([0, 1, 27, 2, 5, 12, 17, 63, 71, 94, 20, 14, 59, 327]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var m = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o._editor = t, o._modeService = i, o._widget = null, o._register(o._editor.onDidChangeModel((function (e) {
- return o.stop()
- }))), o._register(o._editor.onDidChangeModelLanguage((function (e) {
- return o.stop()
- }))), o._register(a.TokenizationRegistry.onDidChange((function (e) {
- return o.stop()
- }))), o
- }
- return r(t, e), t.get = function (e) {
- return e.getContribution(t.ID)
- }, t.prototype.dispose = function () {
- this.stop(), e.prototype.dispose.call(this)
- }, t.prototype.launch = function () {
- this._widget || this._editor.hasModel() && (this._widget = new _(this._editor, this._modeService))
- }, t.prototype.stop = function () {
- this._widget && (this._widget.dispose(), this._widget = null)
- }, t.ID = "editor.contrib.inspectTokens", t = h([g(1, d.IStandaloneThemeService), g(2, u.IModeService)], t)
- }(i.Disposable), v = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.inspectTokens",
- label: f.InspectTokensNLS.inspectTokensAction,
- alias: "Developer: Inspect Tokens",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = m.get(t);
- n && n.launch()
- }, t
- }(s.EditorAction);
- var _ = function (e) {
- function t(t, n) {
- var i, o = e.call(this) || this;
- return o.allowEditorOverflow = !0, o._editor = t, o._modeService = n, o._model = o._editor.getModel(), o._domNode = document.createElement("div"), o._domNode.className = "tokens-inspect-widget", o._tokenizationSupport = (i = o._model.getLanguageIdentifier(), a.TokenizationRegistry.get(i.language) || {
- getInitialState: function () {
- return l.NULL_STATE
- }, tokenize: function (e, t, n) {
- return l.nullTokenize(i.language, e, t, n)
- }, tokenize2: function (e, t, n) {
- return l.nullTokenize2(i.id, e, t, n)
- }
- }), o._compute(o._editor.getPosition()), o._register(o._editor.onDidChangeCursorPosition((function (e) {
- return o._compute(o._editor.getPosition())
- }))), o._editor.addContentWidget(o), o
- }
- return r(t, e), t.prototype.dispose = function () {
- this._editor.removeContentWidget(this),
- e.prototype.dispose.call(this)
- }, t.prototype.getId = function () {
- return t._ID
- }, t.prototype._compute = function (e) {
- for (var t = this._getTokensAtLine(e.lineNumber), i = 0, r = t.tokens1.length - 1; r >= 0; r--) {
- var s = t.tokens1[r];
- if (e.column - 1 >= s.offset) {
- i = r;
- break
- }
- }
- var a = 0;
- for (r = t.tokens2.length >>> 1; r >= 0; r--) if (e.column - 1 >= t.tokens2[r << 1]) {
- a = r;
- break
- }
- var l = "", u = this._model.getLineContent(e.lineNumber), d = "";
- if (i < t.tokens1.length) {
- var c = t.tokens1[i].offset, h = i + 1 < t.tokens1.length ? t.tokens1[i + 1].offset : u.length;
- d = u.substring(c, h)
- }
- l += '<h2 class="tm-token">' + function (e) {
- for (var t = "", n = 0, i = e.length; n < i; n++) {
- var o = e.charCodeAt(n);
- switch (o) {
- case 9:
- t += "→";
- break;
- case 32:
- t += "·";
- break;
- case 60:
- t += "<";
- break;
- case 62:
- t += ">";
- break;
- case 38:
- t += "&";
- break;
- default:
- t += String.fromCharCode(o)
- }
- }
- return t
- }(d) + '<span class="tm-token-length">(' + d.length + " " + (1 === d.length ? "char" : "chars") + ")</span></h2>", l += '<hr class="tokens-inspect-separator" style="clear:both"/>';
- var p = this._decodeMetadata(t.tokens2[1 + (a << 1)])
- ;l += '<table class="tm-metadata-table"><tbody>', l += '<tr><td class="tm-metadata-key">language</td><td class="tm-metadata-value">' + o.escape(p.languageIdentifier.language) + "</td>", l += '<tr><td class="tm-metadata-key">token type</td><td class="tm-metadata-value">' + this._tokenTypeToString(p.tokenType) + "</td>", l += '<tr><td class="tm-metadata-key">font style</td><td class="tm-metadata-value">' + this._fontStyleToString(p.fontStyle) + "</td>", l += '<tr><td class="tm-metadata-key">foreground</td><td class="tm-metadata-value">' + n.Color.Format.CSS.formatHex(p.foreground) + "</td>", l += '<tr><td class="tm-metadata-key">background</td><td class="tm-metadata-value">' + n.Color.Format.CSS.formatHex(p.background) + "</td>", l += "</tbody></table>", l += '<hr class="tokens-inspect-separator"/>', i < t.tokens1.length && (l += '<span class="tm-token-type">' + o.escape(t.tokens1[i].type) + "</span>"), this._domNode.innerHTML = l, this._editor.layoutContentWidget(this)
- }, t.prototype._decodeMetadata = function (e) {
- var t = a.TokenizationRegistry.getColorMap(), n = a.TokenMetadata.getLanguageId(e),
- i = a.TokenMetadata.getTokenType(e), o = a.TokenMetadata.getFontStyle(e),
- r = a.TokenMetadata.getForeground(e), s = a.TokenMetadata.getBackground(e);
- return {
- languageIdentifier: this._modeService.getLanguageIdentifier(n),
- tokenType: i,
- fontStyle: o,
- foreground: t[r],
- background: t[s]
- }
- }, t.prototype._tokenTypeToString = function (e) {
- switch (e) {
- case 0:
- return "Other";
- case 1:
- return "Comment";
- case 2:
- return "String";
- case 4:
- return "RegEx"
- }
- return "??"
- }, t.prototype._fontStyleToString = function (e) {
- var t = "";
- return 1 & e && (t += "italic "), 2 & e && (t += "bold "), 4 & e && (t += "underline "), 0 === t.length && (t = "---"), t
- }, t.prototype._getTokensAtLine = function (e) {
- var t = this._getStateBeforeLine(e),
- n = this._tokenizationSupport.tokenize(this._model.getLineContent(e), t, 0),
- i = this._tokenizationSupport.tokenize2(this._model.getLineContent(e), t, 0);
- return {startState: t, tokens1: n.tokens, tokens2: i.tokens, endState: n.endState}
- }, t.prototype._getStateBeforeLine = function (e) {
- for (var t = this._tokenizationSupport.getInitialState(), n = 1; n < e; n++) {
- t = this._tokenizationSupport.tokenize(this._model.getLineContent(n), t, 0).endState
- }
- return t
- }, t.prototype.getDomNode = function () {
- return this._domNode
- }, t.prototype.getPosition = function () {
- return {position: this._editor.getPosition(), preference: [2, 1]}
- }, t._ID = "editor.contrib.inspectTokensWidget", t
- }(i.Disposable);
- s.registerEditorContribution(m.ID, m), s.registerEditorAction(v), p.registerThemingParticipant((function (e, t) {
- var n = e.getColor(c.editorHoverBorder);
- if (n) {
- var i = e.type === p.HIGH_CONTRAST ? 2 : 1;
- t.addRule(".monaco-editor .tokens-inspect-widget { border: " + i + "px solid " + n + "; }"), t.addRule(".monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: " + n + "; }")
- }
- var o = e.getColor(c.editorHoverBackground);
- o && t.addRule(".monaco-editor .tokens-inspect-widget { background-color: " + o + "; }");
- var r = e.getColor(c.editorHoverForeground);
- r && t.addRule(".monaco-editor .tokens-inspect-widget { color: " + r + "; }")
- }))
- })),
- define(n[169], i([0, 1, 12, 30, 546, 14, 328]), (function (e, t, n, i, o, s) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var a = function () {
- function e(e, t) {
- this.themeService = t, this.widget = null, this.rangeHighlightDecorationId = null, this.lastKnownEditorSelection = null, this.editor = e
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- this.widget && (this.widget.destroy(), this.widget = null)
- }, e.prototype.run = function (e) {
- var t = this;
- this.widget && (this.widget.destroy(), this.widget = null);
- var n = function (e) {
- t.clearDecorations(), e && t.lastKnownEditorSelection && (t.editor.setSelection(t.lastKnownEditorSelection), t.editor.revealRangeInCenterIfOutsideViewport(t.lastKnownEditorSelection, 0)), t.lastKnownEditorSelection = null, document.activeElement !== document.body && e || t.editor.focus()
- };
- this.widget = new o.QuickOpenEditorWidget(this.editor, (function () {
- return n(!1)
- }), (function () {
- return n(!0)
- }), (function (n) {
- t.widget.setInput(e.getModel(n), e.getAutoFocus(n))
- }), {
- inputAriaLabel: e.inputAriaLabel
- }, this.themeService), this.lastKnownEditorSelection || (this.lastKnownEditorSelection = this.editor.getSelection()), this.widget.show("")
- }, e.prototype.decorateLine = function (t, n) {
- var i = [];
- this.rangeHighlightDecorationId && (i.push(this.rangeHighlightDecorationId), this.rangeHighlightDecorationId = null);
- var o = [{range: t, options: e._RANGE_HIGHLIGHT_DECORATION}], r = n.deltaDecorations(i, o);
- this.rangeHighlightDecorationId = r[0]
- }, e.prototype.clearDecorations = function () {
- this.rangeHighlightDecorationId && (this.editor.deltaDecorations([this.rangeHighlightDecorationId], []), this.rangeHighlightDecorationId = null)
- }, e.ID = "editor.controller.quickOpenController", e._RANGE_HIGHLIGHT_DECORATION = i.ModelDecorationOptions.register({
- className: "rangeHighlight",
- isWholeLine: !0
- }), e = h([g(1, s.IThemeService)], e)
- }();
- t.QuickOpenController = a;
- var l = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i._inputAriaLabel = t, i
- }
- return r(t, e), t.prototype.getController = function (e) {
- return a.get(e)
- }, t.prototype._show = function (e, t) {
- e.run({
- inputAriaLabel: this._inputAriaLabel, getModel: function (e) {
- return t.getModel(e)
- }, getAutoFocus: function (e) {
- return t.getAutoFocus(e)
- }
- })
- }, t
- }(n.EditorAction);
- t.BaseEditorQuickOpenAction = l, n.registerEditorContribution(a.ID, a)
- })), define(n[589], i([0, 1, 5, 155, 108, 12, 13, 3, 23, 169, 59, 329]), (function (e, t, n, i, o, s, a, l, u, d, c) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var h = function (e) {
- function t(t, n, i) {
- var o = e.call(this) || this;
- return o.editor = n, o.decorator = i, o.parseResult = o.parseInput(t), o
- }
- return r(t, e), t.prototype.parseInput = function (e) {
- var t, i, r = e.split(",").map((function (e) {
- return parseInt(e, 10)
- })).filter((function (e) {
- return !isNaN(e)
- }));
- if (t = 0 === r.length ? new a.Position(-1, -1) : 1 === r.length ? new a.Position(r[0], 1) : new a.Position(r[0], r[1]), o.isCodeEditor(this.editor)) i = this.editor.getModel(); else {
- var s = this.editor.getModel();
- i = s ? s.modified : null
- }
- var l = !!i && i.validatePosition(t).equals(t);
- return {
- position: t, isValid: l,
- label: l ? t.column && t.column > 1 ? n.format(c.GoToLineNLS.gotoLineLabelValidLineAndColumn, t.lineNumber, t.column) : n.format(c.GoToLineNLS.gotoLineLabelValidLine, t.lineNumber) : t.lineNumber < 1 || t.lineNumber > (i ? i.getLineCount() : 0) ? n.format(c.GoToLineNLS.gotoLineLabelEmptyWithLineLimit, i ? i.getLineCount() : 0) : n.format(c.GoToLineNLS.gotoLineLabelEmptyWithLineAndColumnLimit, i ? i.getLineMaxColumn(t.lineNumber) : 0)
- }
- }, t.prototype.getLabel = function () {
- return this.parseResult.label
- }, t.prototype.getAriaLabel = function () {
- var e = this.editor.getPosition(), t = e ? e.lineNumber : 0;
- return n.format(c.GoToLineNLS.gotoLineAriaLabel, t, this.parseResult.label)
- }, t.prototype.run = function (e, t) {
- return 1 === e ? this.runOpen() : this.runPreview()
- }, t.prototype.runOpen = function () {
- if (!this.parseResult.isValid) return !1;
- var e = this.toSelection();
- return this.editor.setSelection(e), this.editor.revealRangeInCenter(e, 0), this.editor.focus(), !0
- }, t.prototype.runPreview = function () {
- if (!this.parseResult.isValid) return this.decorator.clearDecorations(), !1;
- var e = this.toSelection()
- ;
- return this.editor.revealRangeInCenter(e, 0), this.decorator.decorateLine(e, this.editor), !1
- }, t.prototype.toSelection = function () {
- return new l.Range(this.parseResult.position.lineNumber, this.parseResult.position.column, this.parseResult.position.lineNumber, this.parseResult.position.column)
- }, t
- }(i.QuickOpenEntry);
- t.GotoLineEntry = h;
- var p = function (e) {
- function t() {
- return e.call(this, c.GoToLineNLS.gotoLineActionInput, {
- id: "editor.action.gotoLine",
- label: c.GoToLineNLS.gotoLineActionLabel,
- alias: "Go to Line...",
- precondition: void 0,
- kbOpts: {kbExpr: u.EditorContextKeys.focus, primary: 2085, mac: {primary: 293}, weight: 100}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = this;
- this._show(this.getController(t), {
- getModel: function (e) {
- return new i.QuickOpenModel([new h(e, t, n.getController(t))])
- }, getAutoFocus: function (e) {
- return {autoFocusFirstEntry: e.length > 0}
- }
- })
- }, t
- }(d.BaseEditorQuickOpenAction);
- t.GotoLineAction = p, s.registerEditorAction(p)
- })), define(n[590], i([0, 1, 5, 24, 10, 61, 155, 12, 23, 169, 34, 59]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = function (e) {
- function t(t, n, i, o, r) {
- var s = e.call(this) || this;
- return s.key = t, s.keyAriaLabel = n, s.setHighlights(i), s.action = o, s.editor = r, s
- }
- return r(t, e), t.prototype.getLabel = function () {
- return this.action.label
- }, t.prototype.getAriaLabel = function () {
- return this.keyAriaLabel ? n.format(h.QuickCommandNLS.ariaLabelEntryWithKey, this.getLabel(), this.keyAriaLabel) : n.format(h.QuickCommandNLS.ariaLabelEntry, this.getLabel())
- }, t.prototype.getGroupLabel = function () {
- return this.key
- }, t.prototype.run = function (e, t) {
- var n = this;
- return 1 === e && (setTimeout((function () {
- n.editor.focus();
- try {
- (n.action.run() || Promise.resolve()).then(void 0, o.onUnexpectedError)
- } catch (e) {
- o.onUnexpectedError(e)
- }
- }), 50), !0)
- }, t
- }(a.QuickOpenEntryGroup);
- t.EditorActionCommandEntry = p;
- var g = function (e) {
- function t() {
- return e.call(this, h.QuickCommandNLS.quickCommandActionInput, {
- id: "editor.action.quickCommand",
- label: h.QuickCommandNLS.quickCommandActionLabel,
- alias: "Command Palette",
- precondition: void 0,
- kbOpts: {kbExpr: u.EditorContextKeys.focus, primary: i.isIE ? 571 : 59, weight: 100},
- contextMenuOpts: {group: "z_commands", order: 1}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = this, i = e.get(c.IKeybindingService);
- this._show(this.getController(t), {
- getModel: function (e) {
- return new a.QuickOpenModel(n._editorActionsToEntries(i, t, e))
- }, getAutoFocus: function (e) {
- return {autoFocusFirstEntry: !0, autoFocusPrefixMatch: e}
- }
- })
- }, t.prototype._sort = function (e, t) {
- var n = (e.getLabel() || "").toLowerCase(), i = (t.getLabel() || "").toLowerCase();
- return n.localeCompare(i)
- }, t.prototype._editorActionsToEntries = function (e, t, n) {
- for (var i = [], o = 0, r = t.getSupportedActions(); o < r.length; o++) {
- var a = r[o], l = e.lookupKeybinding(a.id);
- if (a.label) {
- var u = s.matchesFuzzy(n, a.label);
- u && i.push(new p(l && l.getLabel() || "", l && l.getAriaLabel() || "", u, a, t))
- }
- }
- return i = i.sort(this._sort)
- }, t
- }(d.BaseEditorQuickOpenAction);
- t.QuickCommandAction = g, l.registerEditorAction(g)
- })),
- define(n[591], i([0, 1, 26, 61, 5, 155, 12, 3, 23, 17, 496, 169, 59, 330, 183, 231]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var g = function (e) {
- function t(t, n, i, o, r, s, a) {
- var l = e.call(this) || this;
- return l.name = t, l.type = n, l.description = i, l.range = o, l.setHighlights(r), l.editor = s, l.decorator = a, l
- }
- return r(t, e), t.prototype.getLabel = function () {
- return this.name
- }, t.prototype.getAriaLabel = function () {
- return o.format(p.QuickOutlineNLS.entryAriaLabel, this.name)
- }, t.prototype.getIcon = function () {
- return this.type
- }, t.prototype.getDescription = function () {
- return this.description
- }, t.prototype.getType = function () {
- return this.type
- }, t.prototype.getRange = function () {
- return this.range
- }, t.prototype.run = function (e, t) {
- return 1 === e ? this.runOpen(t) : this.runPreview()
- }, t.prototype.runOpen = function (e) {
- var t = this.toSelection();
- return this.editor.setSelection(t), this.editor.revealRangeInCenter(t, 0), this.editor.focus(), !0
- }, t.prototype.runPreview = function () {
- var e = this.toSelection()
- ;
- return this.editor.revealRangeInCenter(e, 0), this.decorator.decorateLine(this.range, this.editor), !1
- }, t.prototype.toSelection = function () {
- return new l.Range(this.range.startLineNumber, this.range.startColumn || 1, this.range.startLineNumber, this.range.startColumn || 1)
- }, t
- }(s.QuickOpenEntryGroup);
- t.SymbolEntry = g;
- var f = function (e) {
- function t() {
- return e.call(this, p.QuickOutlineNLS.quickOutlineActionInput, {
- id: "editor.action.quickOutline",
- label: p.QuickOutlineNLS.quickOutlineActionLabel,
- alias: "Go to Symbol...",
- precondition: u.EditorContextKeys.hasDocumentSymbolProvider,
- kbOpts: {kbExpr: u.EditorContextKeys.focus, primary: 3117, weight: 100},
- contextMenuOpts: {group: "navigation", order: 3}
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var i = this;
- if (t.hasModel()) {
- var o = t.getModel();
- if (d.DocumentSymbolProviderRegistry.has(o)) return c.getDocumentSymbols(o, !0, n.CancellationToken.None).then((function (e) {
- 0 !== e.length && i._run(t, e)
- }))
- }
- }, t.prototype._run = function (e, t) {
- var n = this;
- this._show(this.getController(e), {
- getModel: function (i) {
- return new s.QuickOpenModel(n.toQuickOpenEntries(e, t, i))
- }, getAutoFocus: function (e) {
- return 0 === e.indexOf(":") && (e = e.substr(":".length)), {
- autoFocusPrefixMatch: e,
- autoFocusFirstEntry: !!e
- }
- }
- })
- }, t.prototype.symbolEntry = function (e, t, n, i, o, r, s) {
- return new g(e, t, n, l.Range.lift(i), o, r, s)
- }, t.prototype.toQuickOpenEntries = function (e, t, n) {
- var r = this.getController(e), s = [], a = n;
- 0 === n.indexOf(":") && (a = a.substr(":".length));
- for (var l = 0, u = t; l < u.length; l++) {
- var c = u[l], h = o.trim(c.name), g = i.matchesFuzzy(a, h);
- if (g) {
- var f = void 0;
- c.containerName && (f = c.containerName), s.push(this.symbolEntry(h, d.SymbolKinds.toCssClassName(c.kind), f, c.range, g, e, r))
- }
- }
- if (n && (s = 0 === n.indexOf(":") ? s.sort(this.sortScoped.bind(this, n.toLowerCase())) : s.sort(this.sortNormal.bind(this, n.toLowerCase()))), s.length > 0 && 0 === n.indexOf(":")) {
- for (var m = null, v = null, _ = 0, y = 0; y < s.length; y++) {
- var C = s[y];
- m !== C.getType() ? (v && v.setGroupLabel(this.typeToLabel(m || "", _)), m = C.getType(), v = C, _ = 1, C.setShowBorder(y > 0)) : _++
- }
- v && v.setGroupLabel(this.typeToLabel(m || "", _))
- } else s.length > 0 && s[0].setGroupLabel(o.format(p.QuickOutlineNLS._symbols_, s.length));
- return s
- }, t.prototype.typeToLabel = function (e, t) {
- switch (e) {
- case"module":
- return o.format(p.QuickOutlineNLS._modules_, t);
- case"class":
- return o.format(p.QuickOutlineNLS._class_, t);
- case"interface":
- return o.format(p.QuickOutlineNLS._interface_, t);
- case"method":
- return o.format(p.QuickOutlineNLS._method_, t);
- case"function":
- return o.format(p.QuickOutlineNLS._function_, t);
- case"property":
- return o.format(p.QuickOutlineNLS._property_, t);
- case"variable":
- return o.format(p.QuickOutlineNLS._variable_, t);
- case"var":
- return o.format(p.QuickOutlineNLS._variable2_, t);
- case"constructor":
- return o.format(p.QuickOutlineNLS._constructor_, t);
- case"call":
- return o.format(p.QuickOutlineNLS._call_, t)
- }
- return e
- }, t.prototype.sortNormal = function (e, t, n) {
- var i = t.getLabel().toLowerCase(), o = n.getLabel().toLowerCase(), r = i.localeCompare(o);
- if (0 !== r) return r;
- var s = t.getRange(), a = n.getRange();
- return s.startLineNumber - a.startLineNumber
- }, t.prototype.sortScoped = function (e, t, n) {
- e = e.substr(":".length);
- var i = t.getType(), o = n.getType(), r = i.localeCompare(o);
- if (0 !== r) return r;
- if (e) {
- var s = t.getLabel().toLowerCase(), a = n.getLabel().toLowerCase(), l = s.localeCompare(a);
- if (0 !== l) return l
- }
- var u = t.getRange(), d = n.getRange();
- return u.startLineNumber - d.startLineNumber
- }, t
- }(h.BaseEditorQuickOpenAction);
- t.QuickOutlineAction = f, a.registerEditorAction(f)
- })), define(n[592], i([0, 1, 6, 46, 548]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype.getActiveCodeEditor = function () {
- return null
- }, t.prototype.openCodeEditor = function (e, t, n) {
- return t ? Promise.resolve(this.doOpenEditor(t, e)) : Promise.resolve(null)
- }, t.prototype.doOpenEditor = function (e, t) {
- if (!this.findModel(e, t.resource)) {
- if (t.resource) {
- var o = t.resource.scheme;
- if (o === i.Schemas.http || o === i.Schemas.https) return n.windowOpenNoOpener(t.resource.toString()), e
- }
- return null
- }
- var r = t.options ? t.options.selection : null
- ;
- if (r) if ("number" == typeof r.endLineNumber && "number" == typeof r.endColumn) e.setSelection(r), e.revealRangeInCenter(r, 1); else {
- var s = {lineNumber: r.startLineNumber, column: r.startColumn};
- e.setPosition(s), e.revealPositionInCenter(s, 1)
- }
- return e
- }, t.prototype.findModel = function (e, t) {
- var n = e.getModel();
- return n && n.uri.toString() !== t.toString() ? null : n
- }, t
- }(o.CodeEditorServiceImpl);
- t.StandaloneCodeEditorServiceImpl = s
- })), define(n[593], i([0, 1, 44, 20]), (function (e, t, n, i) {
- "use strict";
- var o, r, s;
- Object.defineProperty(t, "__esModule", {value: !0}), t.vs = {
- base: "vs",
- inherit: !1,
- rules: [{token: "", foreground: "000000", background: "fffffe"}, {
- token: "invalid",
- foreground: "cd3131"
- }, {token: "emphasis", fontStyle: "italic"}, {token: "strong", fontStyle: "bold"}, {
- token: "variable",
- foreground: "001188"
- }, {token: "variable.predefined", foreground: "4864AA"}, {
- token: "constant",
- foreground: "dd0000"
- }, {token: "comment", foreground: "008000"}, {token: "number", foreground: "098658"}, {
- token: "number.hex",
- foreground: "3030c0"
- }, {token: "regexp", foreground: "800000"}, {
- token: "annotation", foreground: "808080"
- }, {token: "type", foreground: "008080"}, {
- token: "delimiter",
- foreground: "000000"
- }, {token: "delimiter.html", foreground: "383838"}, {
- token: "delimiter.xml",
- foreground: "0000FF"
- }, {token: "tag", foreground: "800000"}, {
- token: "tag.id.pug",
- foreground: "4F76AC"
- }, {token: "tag.class.pug", foreground: "4F76AC"}, {
- token: "meta.scss",
- foreground: "800000"
- }, {token: "metatag", foreground: "e00000"}, {
- token: "metatag.content.html",
- foreground: "FF0000"
- }, {token: "metatag.html", foreground: "808080"}, {
- token: "metatag.xml",
- foreground: "808080"
- }, {token: "metatag.php", fontStyle: "bold"}, {
- token: "key",
- foreground: "863B00"
- }, {token: "string.key.json", foreground: "A31515"}, {
- token: "string.value.json",
- foreground: "0451A5"
- }, {token: "attribute.name", foreground: "FF0000"}, {
- token: "attribute.value",
- foreground: "0451A5"
- }, {token: "attribute.value.number", foreground: "098658"}, {
- token: "attribute.value.unit",
- foreground: "098658"
- }, {token: "attribute.value.html", foreground: "0000FF"}, {
- token: "attribute.value.xml",
- foreground: "0000FF"
- }, {
- token: "string",
- foreground: "A31515"
- }, {token: "string.html", foreground: "0000FF"}, {
- token: "string.sql",
- foreground: "FF0000"
- }, {token: "string.yaml", foreground: "0451A5"}, {
- token: "keyword",
- foreground: "0000FF"
- }, {token: "keyword.json", foreground: "0451A5"}, {
- token: "keyword.flow",
- foreground: "AF00DB"
- }, {token: "keyword.flow.scss", foreground: "0000FF"}, {
- token: "operator.scss",
- foreground: "666666"
- }, {token: "operator.sql", foreground: "778899"}, {
- token: "operator.swift",
- foreground: "666666"
- }, {token: "predefined.sql", foreground: "FF00FF"}],
- colors: (o = {}, o[i.editorBackground] = "#FFFFFE", o[i.editorForeground] = "#000000", o[i.editorInactiveSelection] = "#E5EBF1", o[n.editorIndentGuides] = "#D3D3D3", o[n.editorActiveIndentGuides] = "#939393", o[i.editorSelectionHighlight] = "#ADD6FF4D", o)
- }, t.vs_dark = {
- base: "vs-dark",
- inherit: !1,
- rules: [{token: "", foreground: "D4D4D4", background: "1E1E1E"}, {
- token: "invalid",
- foreground: "f44747"
- }, {token: "emphasis", fontStyle: "italic"}, {token: "strong", fontStyle: "bold"}, {
- token: "variable",
- foreground: "74B0DF"
- }, {
- token: "variable.predefined", foreground: "4864AA"
- }, {token: "variable.parameter", foreground: "9CDCFE"}, {
- token: "constant",
- foreground: "569CD6"
- }, {token: "comment", foreground: "608B4E"}, {token: "number", foreground: "B5CEA8"}, {
- token: "number.hex",
- foreground: "5BB498"
- }, {token: "regexp", foreground: "B46695"}, {token: "annotation", foreground: "cc6666"}, {
- token: "type",
- foreground: "3DC9B0"
- }, {token: "delimiter", foreground: "DCDCDC"}, {
- token: "delimiter.html",
- foreground: "808080"
- }, {token: "delimiter.xml", foreground: "808080"}, {
- token: "tag",
- foreground: "569CD6"
- }, {token: "tag.id.pug", foreground: "4F76AC"}, {
- token: "tag.class.pug",
- foreground: "4F76AC"
- }, {token: "meta.scss", foreground: "A79873"}, {token: "meta.tag", foreground: "CE9178"}, {
- token: "metatag",
- foreground: "DD6A6F"
- }, {token: "metatag.content.html", foreground: "9CDCFE"}, {
- token: "metatag.html",
- foreground: "569CD6"
- }, {token: "metatag.xml", foreground: "569CD6"}, {token: "metatag.php", fontStyle: "bold"}, {
- token: "key",
- foreground: "9CDCFE"
- }, {token: "string.key.json", foreground: "9CDCFE"}, {token: "string.value.json", foreground: "CE9178"}, {
- token: "attribute.name",
- foreground: "9CDCFE"
- }, {token: "attribute.value", foreground: "CE9178"}, {
- token: "attribute.value.number.css",
- foreground: "B5CEA8"
- }, {token: "attribute.value.unit.css", foreground: "B5CEA8"}, {
- token: "attribute.value.hex.css",
- foreground: "D4D4D4"
- }, {token: "string", foreground: "CE9178"}, {token: "string.sql", foreground: "FF0000"}, {
- token: "keyword",
- foreground: "569CD6"
- }, {token: "keyword.flow", foreground: "C586C0"}, {
- token: "keyword.json",
- foreground: "CE9178"
- }, {token: "keyword.flow.scss", foreground: "569CD6"}, {
- token: "operator.scss",
- foreground: "909090"
- }, {token: "operator.sql", foreground: "778899"}, {
- token: "operator.swift",
- foreground: "909090"
- }, {token: "predefined.sql", foreground: "FF00FF"}],
- colors: (r = {}, r[i.editorBackground] = "#1E1E1E", r[i.editorForeground] = "#D4D4D4", r[i.editorInactiveSelection] = "#3A3D41", r[n.editorIndentGuides] = "#404040", r[n.editorActiveIndentGuides] = "#707070", r[i.editorSelectionHighlight] = "#ADD6FF26", r)
- }, t.hc_black = {
- base: "hc-black",
- inherit: !1,
- rules: [{token: "", foreground: "FFFFFF", background: "000000"}, {
- token: "invalid",
- foreground: "f44747"
- }, {token: "emphasis", fontStyle: "italic"}, {token: "strong", fontStyle: "bold"}, {
- token: "variable",
- foreground: "1AEBFF"
- }, {token: "variable.parameter", foreground: "9CDCFE"}, {
- token: "constant",
- foreground: "569CD6"
- }, {token: "comment", foreground: "608B4E"}, {token: "number", foreground: "FFFFFF"}, {
- token: "regexp",
- foreground: "C0C0C0"
- }, {token: "annotation", foreground: "569CD6"}, {token: "type", foreground: "3DC9B0"}, {
- token: "delimiter",
- foreground: "FFFF00"
- }, {token: "delimiter.html", foreground: "FFFF00"}, {
- token: "tag",
- foreground: "569CD6"
- }, {token: "tag.id.pug", foreground: "4F76AC"}, {
- token: "tag.class.pug",
- foreground: "4F76AC"
- }, {token: "meta", foreground: "D4D4D4"}, {token: "meta.tag", foreground: "CE9178"}, {
- token: "metatag",
- foreground: "569CD6"
- }, {token: "metatag.content.html", foreground: "1AEBFF"}, {
- token: "metatag.html",
- foreground: "569CD6"
- }, {token: "metatag.xml", foreground: "569CD6"}, {token: "metatag.php", fontStyle: "bold"}, {
- token: "key",
- foreground: "9CDCFE"
- }, {token: "string.key", foreground: "9CDCFE"}, {token: "string.value", foreground: "CE9178"}, {
- token: "attribute.name", foreground: "569CD6"
- }, {token: "attribute.value", foreground: "3FF23F"}, {
- token: "string",
- foreground: "CE9178"
- }, {token: "string.sql", foreground: "FF0000"}, {
- token: "keyword",
- foreground: "569CD6"
- }, {token: "keyword.flow", foreground: "C586C0"}, {
- token: "operator.sql",
- foreground: "778899"
- }, {token: "operator.swift", foreground: "909090"}, {token: "predefined.sql", foreground: "FF00FF"}],
- colors: (s = {}, s[i.editorBackground] = "#000000", s[i.editorForeground] = "#FFFFFF", s[n.editorIndentGuides] = "#FFFFFF", s[n.editorActiveIndentGuides] = "#FFFFFF", s)
- }
- })), define(n[594], i([0, 1, 6, 27, 4, 17, 357, 593, 42, 20, 14, 2]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var p = "vs", g = "vs-dark", f = "hc-black", m = u.Registry.as(d.Extensions.ColorContribution),
- v = u.Registry.as(c.Extensions.ThemingContribution), _ = function () {
- function e(e, t) {
- this.themeData = t;
- var n = t.base;
- e.length > 0 ? (this.id = n + " " + e, this.themeName = e) : (this.id = n, this.themeName = n), this.colors = null, this.defaultColors = Object.create(null),
- this._tokenTheme = null
- }
- return Object.defineProperty(e.prototype, "base", {
- get: function () {
- return this.themeData.base
- }, enumerable: !0, configurable: !0
- }), e.prototype.notifyBaseUpdated = function () {
- this.themeData.inherit && (this.colors = null, this._tokenTheme = null)
- }, e.prototype.getColors = function () {
- if (!this.colors) {
- var e = new Map;
- for (var t in this.themeData.colors) e.set(t, i.Color.fromHex(this.themeData.colors[t]));
- if (this.themeData.inherit) {
- var n = C(this.themeData.base);
- for (var t in n.colors) e.has(t) || e.set(t, i.Color.fromHex(n.colors[t]))
- }
- this.colors = e
- }
- return this.colors
- }, e.prototype.getColor = function (e, t) {
- var n = this.getColors().get(e);
- return n || (!1 !== t ? this.getDefault(e) : void 0)
- }, e.prototype.getDefault = function (e) {
- var t = this.defaultColors[e];
- return t || (t = m.resolveDefaultColor(e, this), this.defaultColors[e] = t, t)
- }, e.prototype.defines = function (e) {
- return Object.prototype.hasOwnProperty.call(this.getColors(), e)
- }, Object.defineProperty(e.prototype, "type", {
- get: function () {
- switch (this.base) {
- case p:
- return "light";
- case f:
- return "hc"
- ;
- default:
- return "dark"
- }
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "tokenTheme", {
- get: function () {
- if (!this._tokenTheme) {
- var e = [], t = [];
- if (this.themeData.inherit) {
- var n = C(this.themeData.base);
- e = n.rules, n.encodedTokensColors && (t = n.encodedTokensColors)
- }
- e = e.concat(this.themeData.rules), this.themeData.encodedTokensColors && (t = this.themeData.encodedTokensColors), this._tokenTheme = a.TokenTheme.createFromRawTokenTheme(e, t)
- }
- return this._tokenTheme
- }, enumerable: !0, configurable: !0
- }), e.prototype.getTokenStyleMetadata = function (e, t) {
- }, e
- }();
- function y(e) {
- return e === p || e === g || e === f
- }
- function C(e) {
- switch (e) {
- case p:
- return l.vs;
- case g:
- return l.vs_dark;
- case f:
- return l.hc_black
- }
- }
- function b(e) {
- var t = C(e);
- return new _(e, t)
- }
- var S = function (e) {
- function t() {
- var t = e.call(this) || this;
- return t._onThemeChange = t._register(new o.Emitter), t.onThemeChange = t._onThemeChange.event, t._environment = Object.create(null), t._knownThemes = new Map, t._knownThemes.set(p, b(p)), t._knownThemes.set(g, b(g)), t._knownThemes.set(f, b(f)), t._css = "",
- t._globalStyleElement = null, t._styleElements = [], t.setTheme(p), t
- }
- return r(t, e), t.prototype.registerEditorContainer = function (e) {
- return n.isInShadowDOM(e) ? this._registerShadowDomContainer(e) : this._registerRegularEditorContainer()
- }, t.prototype._registerRegularEditorContainer = function () {
- return this._globalStyleElement || (this._globalStyleElement = n.createStyleSheet(), this._globalStyleElement.className = "monaco-colors", this._globalStyleElement.innerHTML = this._css, this._styleElements.push(this._globalStyleElement)), h.Disposable.None
- }, t.prototype._registerShadowDomContainer = function (e) {
- var t = this, i = n.createStyleSheet(e);
- return i.className = "monaco-colors", i.innerHTML = this._css, this._styleElements.push(i), {
- dispose: function () {
- for (var e = 0; e < t._styleElements.length; e++) if (t._styleElements[e] === i) return void t._styleElements.splice(e, 1)
- }
- }
- }, t.prototype.defineTheme = function (e, t) {
- if (!/^[a-z0-9\-]+$/i.test(e)) throw new Error("Illegal theme name!");
- if (!y(t.base) && !y(e)) throw new Error("Illegal theme base!")
- ;
- this._knownThemes.set(e, new _(e, t)), y(e) && this._knownThemes.forEach((function (t) {
- t.base === e && t.notifyBaseUpdated()
- })), this._theme && this._theme.themeName === e && this.setTheme(e)
- }, t.prototype.getTheme = function () {
- return this._theme
- }, t.prototype.setTheme = function (e) {
- var t, n = this;
- if (t = this._knownThemes.has(e) ? this._knownThemes.get(e) : this._knownThemes.get(p), this._theme === t) return t.id;
- this._theme = t;
- var i = [], o = {}, r = {
- addRule: function (e) {
- o[e] || (i.push(e), o[e] = !0)
- }
- };
- v.getThemingParticipants().forEach((function (e) {
- return e(t, r, n._environment)
- }));
- var l = t.tokenTheme.getColorMap();
- return r.addRule(a.generateTokensCSSForColorMap(l)), this._css = i.join("\n"), this._styleElements.forEach((function (e) {
- return e.innerHTML = n._css
- })), s.TokenizationRegistry.setColorMap(l), this._onThemeChange.fire(t), t.id
- }, t.prototype.getIconTheme = function () {
- return {hasFileIcons: !1, hasFolderIcons: !1, hidesExplorerArrows: !1}
- }, t
- }(h.Disposable);
- t.StandaloneThemeServiceImpl = S
- })), define(n[595], i([0, 1, 547, 66, 96, 4, 35, 14, 34, 2]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function (e) {
- function t(t, i, o, r, a) {
- var l = e.call(this) || this;
- return l._onDidContextMenu = l._register(new s.Emitter), l.contextMenuHandler = new n.ContextMenuHandler(o, t, i, r, a), l
- }
- return r(t, e), t.prototype.configure = function (e) {
- this.contextMenuHandler.configure(e)
- }, t.prototype.showContextMenu = function (e) {
- this.contextMenuHandler.showContextMenu(e), this._onDidContextMenu.fire()
- }, t = h([g(0, o.ITelemetryService), g(1, a.INotificationService), g(2, i.IContextViewService), g(3, u.IKeybindingService), g(4, l.IThemeService)], t)
- }(d.Disposable);
- t.ContextMenuService = c
- })), define(n[170], i([0, 1, 6, 153, 2, 474, 43, 85, 18, 11, 34, 42, 97, 14, 477, 206, 408, 407, 64]), (function (e, t, n, i, o, s, a, u, d, c, p, f, m, v, _, y, C, b, S) {
- "use strict";
- var w;
- Object.defineProperty(t, "__esModule", {value: !0}), t.IListService = c.createDecorator("listService");
- var E = function () {
- function e(e) {
- this._themeService = e, this.disposables = new o.DisposableStore, this.lists = [], this._lastFocusedWidget = void 0,
- this._hasCreatedStyleController = !1
- }
- return Object.defineProperty(e.prototype, "lastFocusedList", {
- get: function () {
- return this._lastFocusedWidget
- }, enumerable: !0, configurable: !0
- }), e.prototype.register = function (e, t) {
- var r = this;
- if (!this._hasCreatedStyleController) {
- this._hasCreatedStyleController = !0;
- var s = new i.DefaultStyleController(n.createStyleSheet(), "");
- this.disposables.add(m.attachListStyler(s, this._themeService))
- }
- if (this.lists.some((function (t) {
- return t.widget === e
- }))) throw new Error("Cannot register the same widget multiple times");
- var a = {widget: e, extraContextKeys: t};
- return this.lists.push(a), e.getHTMLElement() === document.activeElement && (this._lastFocusedWidget = e), o.combinedDisposable(e.onDidFocus((function () {
- return r._lastFocusedWidget = e
- })), o.toDisposable((function () {
- return r.lists.splice(r.lists.indexOf(a), 1)
- })), e.onDidDispose((function () {
- r.lists = r.lists.filter((function (e) {
- return e !== a
- })), r._lastFocusedWidget === e && (r._lastFocusedWidget = void 0)
- })))
- }, e.prototype.dispose = function () {
- this.disposables.dispose()
- },
- e = h([g(0, v.IThemeService)], e)
- }();
- t.ListService = E;
- var L = new d.RawContextKey("listFocus", !0);
- t.WorkbenchListSupportsMultiSelectContextKey = new d.RawContextKey("listSupportsMultiselect", !0), t.WorkbenchListFocusContextKey = d.ContextKeyExpr.and(L, d.ContextKeyExpr.not(_.InputFocusedContextKey)), t.WorkbenchListHasSelectionOrFocus = new d.RawContextKey("listHasSelectionOrFocus", !1), t.WorkbenchListDoubleSelection = new d.RawContextKey("listDoubleSelection", !1), t.WorkbenchListMultiSelection = new d.RawContextKey("listMultiSelection", !1), t.WorkbenchListSupportsKeyboardNavigation = new d.RawContextKey("listSupportsKeyboardNavigation", !0), t.WorkbenchListAutomaticKeyboardNavigationKey = "listAutomaticKeyboardNavigation", t.WorkbenchListAutomaticKeyboardNavigation = new d.RawContextKey(t.WorkbenchListAutomaticKeyboardNavigationKey, !0), t.didBindWorkbenchListAutomaticKeyboardNavigation = !1, t.multiSelectModifierSettingKey = "workbench.list.multiSelectModifier", t.openModeSettingKey = "workbench.list.openMode",
- t.horizontalScrollingKey = "workbench.list.horizontalScrolling", t.keyboardNavigationSettingKey = "workbench.list.keyboardNavigation", t.automaticKeyboardNavigationSettingKey = "workbench.list.automaticKeyboardNavigation";
- var D = "workbench.tree.indent", N = "workbench.tree.renderIndentGuides";
- function x(e) {
- return "alt" === e.getValue(t.multiSelectModifierSettingKey)
- }
- function I(e) {
- return "doubleClick" !== e.getValue(t.openModeSettingKey)
- }
- var M = function (e) {
- function n(t) {
- var n = e.call(this) || this;
- return n.configurationService = t, n.useAltAsMultipleSelectionModifier = x(t), n.registerListeners(), n
- }
- return r(n, e), n.prototype.registerListeners = function () {
- var e = this;
- this._register(this.configurationService.onDidChangeConfiguration((function (n) {
- n.affectsConfiguration(t.multiSelectModifierSettingKey) && (e.useAltAsMultipleSelectionModifier = x(e.configurationService))
- })))
- }, n.prototype.isSelectionSingleChangeEvent = function (e) {
- return this.useAltAsMultipleSelectionModifier ? e.browserEvent.altKey : i.isSelectionSingleChangeEvent(e)
- },
- n.prototype.isSelectionRangeChangeEvent = function (e) {
- return i.isSelectionRangeChangeEvent(e)
- }, n
- }(o.Disposable), k = function (e) {
- function n(t, n) {
- var i = e.call(this) || this;
- return i.configurationService = t, i.existingOpenController = n, i.openOnSingleClick = I(t), i.registerListeners(), i
- }
- return r(n, e), n.prototype.registerListeners = function () {
- var e = this;
- this._register(this.configurationService.onDidChangeConfiguration((function (n) {
- n.affectsConfiguration(t.openModeSettingKey) && (e.openOnSingleClick = I(e.configurationService))
- })))
- }, n.prototype.shouldOpen = function (e) {
- if (e instanceof MouseEvent) {
- var t = 0 === e.button, n = 2 === e.detail;
- return !(t && !this.openOnSingleClick && !n) && (!(!t && 1 !== e.button) && (!this.existingOpenController || this.existingOpenController.shouldOpen(e)))
- }
- return !this.existingOpenController || this.existingOpenController.shouldOpen(e)
- }, n
- }(o.Disposable);
- function T(e, t) {
- var n = !1;
- return function (i) {
- if (n) return n = !1, !1;
- var o = t.softDispatch(i, e);
- return o && o.enterChord ? (n = !0, !1) : (n = !1, !0)
- }
- }
- var R = function (e) {
- function n(t, n, i, o, r, s, a, l, u, d, c) {
- var h = this, p = F(n, r, s, u, d, c), g = p.options, f = p.getAutomaticKeyboardNavigation,
- m = p.disposable;
- return (h = e.call(this, t, n, i, o, g) || this).disposables.add(m), h.internals = new W(h, g, f, r.overrideStyles, s, a, l, u, c), h.disposables.add(h.internals), h
- }
- return r(n, e), n = h([g(5, d.IContextKeyService), g(6, t.IListService), g(7, v.IThemeService), g(8, a.IConfigurationService), g(9, p.IKeybindingService), g(10, S.IAccessibilityService)], n)
- }(y.ObjectTree);
- t.WorkbenchObjectTree = R;
- var O = function (e) {
- function n(t, n, i, o, r, s, a, l, u, d, c, h) {
- var p = this, g = F(n, s, a, d, c, h), f = g.options, m = g.getAutomaticKeyboardNavigation,
- v = g.disposable;
- return (p = e.call(this, t, n, i, o, r, f) || this).disposables.add(v), p.internals = new W(p, f, m, s.overrideStyles, a, l, u, d, h), p.disposables.add(p.internals), p
- }
- return r(n, e), n.prototype.updateOptions = function (t) {
- void 0 === t && (t = {}), e.prototype.updateOptions.call(this, t), t.overrideStyles && this.internals.updateStyleOverrides(t.overrideStyles)
- },
- n = h([g(6, d.IContextKeyService), g(7, t.IListService), g(8, v.IThemeService), g(9, a.IConfigurationService), g(10, p.IKeybindingService), g(11, S.IAccessibilityService)], n)
- }(b.DataTree);
- t.WorkbenchDataTree = O;
- var P = function (e) {
- function n(t, n, i, o, r, s, a, l, u, d, c, h) {
- var p = this, g = F(n, s, a, d, c, h), f = g.options, m = g.getAutomaticKeyboardNavigation,
- v = g.disposable;
- return (p = e.call(this, t, n, i, o, r, f) || this).disposables.add(v), p.internals = new W(p, f, m, s.overrideStyles, a, l, u, d, h), p.disposables.add(p.internals), p
- }
- return r(n, e), n.prototype.updateOptions = function (t) {
- void 0 === t && (t = {}), e.prototype.updateOptions.call(this, t), t.overrideStyles && this.internals.updateStyleOverrides(t.overrideStyles)
- }, n = h([g(6, d.IContextKeyService), g(7, t.IListService), g(8, v.IThemeService), g(9, a.IConfigurationService), g(10, p.IKeybindingService), g(11, S.IAccessibilityService)], n)
- }(C.AsyncDataTree);
- t.WorkbenchAsyncDataTree = P;
- var A = function (e) {
- function n(t, n, i, o, r, s, a, l, u, d, c, h, p) {
- var g = this, f = F(n, a, l, c, h, p), m = f.options, v = f.getAutomaticKeyboardNavigation,
- _ = f.disposable
- ;
- return (g = e.call(this, t, n, i, o, r, s, m) || this).disposables.add(_), g.internals = new W(g, m, v, a.overrideStyles, l, u, d, c, p), g.disposables.add(g.internals), g
- }
- return r(n, e), n = h([g(7, d.IContextKeyService), g(8, t.IListService), g(9, v.IThemeService), g(10, a.IConfigurationService), g(11, p.IKeybindingService), g(12, S.IAccessibilityService)], n)
- }(C.CompressibleAsyncDataTree);
- function F(e, n, i, r, s, u) {
- t.WorkbenchListSupportsKeyboardNavigation.bindTo(i), t.didBindWorkbenchListAutomaticKeyboardNavigation || (t.WorkbenchListAutomaticKeyboardNavigation.bindTo(i), t.didBindWorkbenchListAutomaticKeyboardNavigation = !0);
- var d = function () {
- var e = i.getContextKeyValue(t.WorkbenchListAutomaticKeyboardNavigationKey);
- return e && (e = r.getValue(t.automaticKeyboardNavigationSettingKey)), e
- }, c = u.isScreenReaderOptimized() ? "simple" : r.getValue(t.keyboardNavigationSettingKey),
- h = void 0 !== n.horizontalScrolling ? n.horizontalScrolling : function (e) {
- return a.getMigratedSettingValue(e, t.horizontalScrollingKey, "workbench.tree.horizontalScrolling")
- }(r), p = I(r), g = function (e, t, n) {
- var i = new o.DisposableStore, r = l({}, e);
- if (!1 !== e.multipleSelectionSupport && !e.multipleSelectionController) {
- var s = new M(t);
- r.multipleSelectionController = s, i.add(s)
- }
- var a = new k(t, e.openController);
- return r.openController = a, i.add(a), r.keyboardNavigationDelegate = {
- mightProducePrintableCharacter: function (e) {
- return n.mightProducePrintableCharacter(e)
- }
- }, [r, i]
- }(n, r, s), f = g[0], m = g[1], v = n.additionalScrollHeight;
- return {
- getAutomaticKeyboardNavigation: d,
- disposable: m,
- options: l(l({keyboardSupport: !1}, f), {
- indent: r.getValue(D),
- renderIndentGuides: r.getValue(N),
- automaticKeyboardNavigation: d(),
- simpleKeyboardNavigation: "simple" === c,
- filterOnType: "filter" === c,
- horizontalScrolling: h,
- openOnSingleClick: p,
- keyboardNavigationEventFilter: T(e, s),
- additionalScrollHeight: v,
- hideTwistiesOfChildlessElements: n.hideTwistiesOfChildlessElements
- })
- }
- }
- t.WorkbenchCompressibleAsyncDataTree = A;
- var W = function () {
- function e(e, n, i, o, r, s, a, l, u) {
- var d = this;
- this.tree = e, this.themeService = a, this.disposables = [],
- this.contextKeyService = function (e, t) {
- var n = e.createScoped(t.getHTMLElement());
- return L.bindTo(n), n
- }(r, e), t.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(!(!1 === n.multipleSelectionSupport)), this.hasSelectionOrFocus = t.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService), this.hasDoubleSelection = t.WorkbenchListDoubleSelection.bindTo(this.contextKeyService), this.hasMultiSelection = t.WorkbenchListMultiSelection.bindTo(this.contextKeyService), this._useAltAsMultipleSelectionModifier = x(l);
- var c = new Set;
- c.add(t.WorkbenchListAutomaticKeyboardNavigationKey);
- var h = function () {
- var n = u.isScreenReaderOptimized() ? "simple" : l.getValue(t.keyboardNavigationSettingKey);
- e.updateOptions({simpleKeyboardNavigation: "simple" === n, filterOnType: "filter" === n})
- };
- this.updateStyleOverrides(o), this.disposables.push(this.contextKeyService, s.register(e), e.onDidChangeSelection((function () {
- var t = e.getSelection(), n = e.getFocus();
- d.hasSelectionOrFocus.set(t.length > 0 || n.length > 0),
- d.hasMultiSelection.set(t.length > 1), d.hasDoubleSelection.set(2 === t.length)
- })), e.onDidChangeFocus((function () {
- var t = e.getSelection(), n = e.getFocus();
- d.hasSelectionOrFocus.set(t.length > 0 || n.length > 0)
- })), l.onDidChangeConfiguration((function (n) {
- if (n.affectsConfiguration(t.openModeSettingKey) && e.updateOptions({openOnSingleClick: I(l)}), n.affectsConfiguration(t.multiSelectModifierSettingKey) && (d._useAltAsMultipleSelectionModifier = x(l)), n.affectsConfiguration(D)) {
- var o = l.getValue(D);
- e.updateOptions({indent: o})
- }
- if (n.affectsConfiguration(N)) {
- var r = l.getValue(N);
- e.updateOptions({renderIndentGuides: r})
- }
- n.affectsConfiguration(t.keyboardNavigationSettingKey) && h(), n.affectsConfiguration(t.automaticKeyboardNavigationSettingKey) && e.updateOptions({automaticKeyboardNavigation: i()})
- })), this.contextKeyService.onDidChangeContext((function (t) {
- t.affectsSome(c) && e.updateOptions({automaticKeyboardNavigation: i()})
- })), u.onDidChangeScreenReaderOptimized((function () {
- return h()
- })))
- }
- return e.prototype.updateStyleOverrides = function (e) {
- o.dispose(this.styler), this.styler = e ? m.attachListStyler(this.tree, this.themeService, e) : o.Disposable.None
- }, e.prototype.dispose = function () {
- this.disposables = o.dispose(this.disposables), this.styler = o.dispose(this.styler)
- }, e = h([g(4, d.IContextKeyService), g(5, t.IListService), g(6, v.IThemeService), g(7, a.IConfigurationService), g(8, S.IAccessibilityService)], e)
- }();
- f.Registry.as(u.Extensions.Configuration).registerConfiguration({
- id: "workbench",
- order: 7,
- title: s.localize(0, null),
- type: "object",
- properties: (w = {}, w[t.multiSelectModifierSettingKey] = {
- type: "string",
- enum: ["ctrlCmd", "alt"],
- enumDescriptions: [s.localize(1, null), s.localize(2, null)],
- default: "ctrlCmd",
- description: s.localize(3, null)
- }, w[t.openModeSettingKey] = {
- type: "string",
- enum: ["singleClick", "doubleClick"],
- default: "singleClick",
- description: s.localize(4, null)
- }, w[t.horizontalScrollingKey] = {
- type: "boolean",
- default: !1,
- description: s.localize(5, null)
- }, w["workbench.tree.horizontalScrolling"] = {
- type: "boolean", default: !1, description: s.localize(6, null),
- deprecationMessage: s.localize(7, null, t.horizontalScrollingKey)
- }, w[D] = {
- type: "number",
- default: 8,
- minimum: 0,
- maximum: 40,
- description: s.localize(8, null)
- }, w[N] = {
- type: "string",
- enum: ["none", "onHover", "always"],
- default: "onHover",
- description: s.localize(9, null)
- }, w[t.keyboardNavigationSettingKey] = {
- type: "string",
- enum: ["simple", "highlight", "filter"],
- enumDescriptions: [s.localize(10, null), s.localize(11, null), s.localize(12, null)],
- default: "highlight",
- description: s.localize(13, null)
- }, w[t.automaticKeyboardNavigationSettingKey] = {
- type: "boolean",
- default: !0,
- markdownDescription: s.localize(14, null)
- }, w)
- })
- })), define(n[596], i([0, 1, 6, 27, 4, 2, 46, 39, 167, 3, 30, 84, 575, 450, 11, 116, 170, 20, 14, 123, 113, 279, 314]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E, L, D) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var N = function () {
- function e(e, t) {
- var n = this;
- this._editor = e, this._model = t, this._decorations = new Map, this._decorationIgnoreSet = new Set, this._callOnDispose = new s.DisposableStore, this._callOnModelChange = new s.DisposableStore,
- this._callOnDispose.add(this._editor.onDidChangeModel((function () {
- return n._onModelChanged()
- }))), this._onModelChanged()
- }
- return e.prototype.dispose = function () {
- this._callOnModelChange.dispose(), this._callOnDispose.dispose(), this.removeDecorations()
- }, e.prototype._onModelChanged = function () {
- this._callOnModelChange.clear();
- var e = this._editor.getModel();
- if (e) for (var t = 0, n = this._model.groups; t < n.length; t++) {
- var i = n[t];
- if (l.isEqual(i.uri, e.uri)) return void this._addDecorations(i)
- }
- }, e.prototype._addDecorations = function (t) {
- var n = this;
- if (this._editor.hasModel()) {
- this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((function (e) {
- return n._onDecorationChanged()
- })));
- for (var i = [], o = [], r = 0, s = t.children.length; r < s; r++) {
- var a = t.children[r];
- this._decorationIgnoreSet.has(a.id) || (i.push({
- range: a.range,
- options: e.DecorationOptions
- }), o.push(r))
- }
- var l = this._editor.deltaDecorations([], i);
- for (r = 0; r < l.length; r++) this._decorations.set(l[r], t.children[o[r]])
- }
- }, e.prototype._onDecorationChanged = function () {
- var e = this, t = [], n = this._editor.getModel();
- if (n) {
- this._decorations.forEach((function (i, o) {
- var r = n.getDecorationRange(o);
- if (r) {
- var s = !1;
- if (!p.Range.equalsRange(r, i.range)) p.Range.spansMultipleLines(r) ? s = !0 : i.range.endColumn - i.range.startColumn !== r.endColumn - r.startColumn && (s = !0), s ? (e._decorationIgnoreSet.add(i.id), t.push(o)) : i.range = r
- }
- }));
- for (var i = 0, o = t.length; i < o; i++) this._decorations.delete(t[i]);
- this._editor.deltaDecorations(t, [])
- }
- }, e.prototype.removeDecorations = function () {
- var e = [];
- this._decorations.forEach((function (t, n) {
- e.push(n)
- })), this._editor.deltaDecorations(e, []), this._decorations.clear()
- }, e.DecorationOptions = f.ModelDecorationOptions.register({
- stickiness: 1,
- className: "reference-decoration"
- }), e
- }(), x = function () {
- function e() {
- this.ratio = .7, this.heightInLines = 18
- }
- return e.fromJSON = function (e) {
- var t, n;
- try {
- var i = JSON.parse(e);
- t = i.ratio, n = i.heightInLines
- } catch (e) {
- }
- return {ratio: t || .7, heightInLines: n || 18}
- }, e
- }();
- t.LayoutData = x;
- var I = function (e) {
- function t(t, n, i, r, a, l, u, d) {
- var c = e.call(this, t, {
- showFrame: !1,
- showArrow: !0, isResizeable: !0, isAccessible: !0
- }) || this;
- return c._defaultTreeKeyboardSupport = n, c.layoutData = i, c._textModelResolverService = a, c._instantiationService = l, c._peekViewService = u, c._uriLabel = d, c._disposeOnNewModel = new s.DisposableStore, c._callOnDispose = new s.DisposableStore, c._onDidSelectReference = new o.Emitter, c.onDidSelectReference = c._onDidSelectReference.event, c._dim = {
- height: 0,
- width: 0
- }, c._applyTheme(r.getTheme()), c._callOnDispose.add(r.onThemeChange(c._applyTheme.bind(c))), c._peekViewService.addExclusiveWidget(t, c), c.create(), c
- }
- return r(t, e), t.prototype.dispose = function () {
- this.setModel(void 0), this._callOnDispose.dispose(), this._disposeOnNewModel.dispose(), s.dispose(this._preview), s.dispose(this._previewNotAvailableMessage), s.dispose(this._tree), s.dispose(this._previewModelReference), this._splitView.dispose(), e.prototype.dispose.call(this)
- }, t.prototype._applyTheme = function (e) {
- var t = e.getColor(E.peekViewBorder) || i.Color.transparent;
- this.style({
- arrowColor: t,
- frameColor: t,
- headerBackgroundColor: e.getColor(E.peekViewTitleBackground) || i.Color.transparent,
- primaryHeadingColor: e.getColor(E.peekViewTitleForeground),
- secondaryHeadingColor: e.getColor(E.peekViewTitleInfoForeground)
- })
- }, t.prototype.show = function (t) {
- this.editor.revealRangeInCenterIfOutsideViewport(t, 0), e.prototype.show.call(this, t, this.layoutData.heightInLines || 18)
- }, t.prototype.focusOnReferenceTree = function () {
- this._tree.domFocus()
- }, t.prototype.focusOnPreviewEditor = function () {
- this._preview.focus()
- }, t.prototype.isPreviewEditorFocused = function () {
- return this._preview.hasTextFocus()
- }, t.prototype._onTitleClick = function (e) {
- this._preview && this._preview.getModel() && this._onDidSelectReference.fire({
- element: this._getFocusedReference(),
- kind: e.ctrlKey || e.metaKey || e.altKey ? "side" : "open",
- source: "title"
- })
- }, t.prototype._fillBody = function (e) {
- var t = this;
- this.setCssClass("reference-zone-widget"), this._messageContainer = n.append(e, n.$("div.messages")), n.hide(this._messageContainer), this._splitView = new D.SplitView(e, {orientation: 1}),
- this._previewContainer = n.append(e, n.$("div.preview.inline"));
- this._preview = this._instantiationService.createInstance(u.EmbeddedCodeEditorWidget, this._previewContainer, {
- scrollBeyondLastLine: !1,
- scrollbar: {
- verticalScrollbarSize: 14,
- horizontal: "auto",
- useShadows: !0,
- verticalHasArrows: !1,
- horizontalHasArrows: !1,
- alwaysConsumeMouseWheel: !1
- },
- overviewRulerLanes: 2,
- fixedOverflowWidgets: !0,
- minimap: {enabled: !1}
- }, this.editor), n.hide(this._previewContainer), this._previewNotAvailableMessage = f.TextModel.createFromString(_.localize(0, null)), this._treeContainer = n.append(e, n.$("div.ref-tree.inline"));
- var i = {
- ariaLabel: _.localize(1, null),
- keyboardSupport: this._defaultTreeKeyboardSupport,
- accessibilityProvider: new v.AriaProvider,
- keyboardNavigationLabelProvider: this._instantiationService.createInstance(v.StringRepresentationProvider),
- identityProvider: new v.IdentityProvider,
- overrideStyles: {listBackground: E.peekViewResultsBackground}
- }
- ;this._tree = this._instantiationService.createInstance(b.WorkbenchAsyncDataTree, "ReferencesWidget", this._treeContainer, new v.Delegate, [this._instantiationService.createInstance(v.FileReferencesRenderer), this._instantiationService.createInstance(v.OneReferenceRenderer)], this._instantiationService.createInstance(v.DataSource), i), this._splitView.addView({
- onDidChange: o.Event.None,
- element: this._previewContainer,
- minimumSize: 200,
- maximumSize: Number.MAX_VALUE,
- layout: function (e) {
- t._preview.layout({height: t._dim.height, width: e})
- }
- }, D.Sizing.Distribute), this._splitView.addView({
- onDidChange: o.Event.None,
- element: this._treeContainer,
- minimumSize: 100,
- maximumSize: Number.MAX_VALUE,
- layout: function (e) {
- t._treeContainer.style.height = t._dim.height + "px", t._treeContainer.style.width = e + "px", t._tree.layout(t._dim.height, e)
- }
- }, D.Sizing.Distribute), this._disposables.add(this._splitView.onDidSashChange((function () {
- t._dim.width && (t.layoutData.ratio = t._splitView.getViewSize(0) / t._dim.width)
- }), void 0));
- var r = function (e, n) {
- e instanceof L.OneReference && ("show" === n && t._revealReference(e, !1), t._onDidSelectReference.fire({
- element: e,
- kind: n,
- source: "tree"
- }))
- };
- this._tree.onDidChangeFocus((function (e) {
- r(e.elements[0], "show")
- })), this._tree.onDidOpen((function (e) {
- e.browserEvent instanceof MouseEvent && (e.browserEvent.ctrlKey || e.browserEvent.metaKey || e.browserEvent.altKey) ? r(e.elements[0], "side") : e.browserEvent instanceof KeyboardEvent || e.browserEvent instanceof MouseEvent && 2 === e.browserEvent.detail || 2 === e.browserEvent.tapCount ? r(e.elements[0], "goto") : r(e.elements[0], "show")
- })), n.hide(this._treeContainer)
- }, t.prototype._onWidth = function (e) {
- this._dim && this._doLayoutBody(this._dim.height, e)
- }, t.prototype._doLayoutBody = function (t, n) {
- e.prototype._doLayoutBody.call(this, t, n), this._dim = {
- height: t,
- width: n
- }, this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines, this._splitView.layout(n), this._splitView.resizeView(0, n * this.layoutData.ratio)
- }, t.prototype.setSelection = function (e) {
- var t = this
- ;
- return this._revealReference(e, !0).then((function () {
- t._model && (t._tree.setSelection([e]), t._tree.setFocus([e]))
- }))
- }, t.prototype.setModel = function (e) {
- return this._disposeOnNewModel.clear(), this._model = e, this._model ? this._onNewModel() : Promise.resolve()
- }, t.prototype._onNewModel = function () {
- var e = this;
- return this._model ? this._model.isEmpty ? (this.setTitle(""), this._messageContainer.innerHTML = _.localize(2, null), n.show(this._messageContainer), Promise.resolve(void 0)) : (n.hide(this._messageContainer), this._decorationsManager = new N(this._preview, this._model), this._disposeOnNewModel.add(this._decorationsManager), this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((function (t) {
- return e._tree.rerender(t)
- }))), this._disposeOnNewModel.add(this._preview.onMouseDown((function (t) {
- var n = t.event, i = t.target;
- if (2 === n.detail) {
- var o = e._getFocusedReference();
- o && e._onDidSelectReference.fire({
- element: {uri: o.uri, range: i.range},
- kind: n.ctrlKey || n.metaKey || n.altKey ? "side" : "open",
- source: "editor"
- })
- }
- }))),
- n.addClass(this.container, "results-loaded"), n.show(this._treeContainer), n.show(this._previewContainer), this._splitView.layout(this._dim.width), this.focusOnReferenceTree(), this._tree.setInput(1 === this._model.groups.length ? this._model.groups[0] : this._model)) : Promise.resolve(void 0)
- }, t.prototype._getFocusedReference = function () {
- var e = this._tree.getFocus()[0];
- return e instanceof L.OneReference ? e : e instanceof L.FileReferences && e.children.length > 0 ? e.children[0] : void 0
- }, t.prototype._revealReference = function (e, t) {
- return d(this, void 0, void 0, (function () {
- var n, i, o, r, u;
- return c(this, (function (d) {
- switch (d.label) {
- case 0:
- return this._revealedReference === e ? [2] : (this._revealedReference = e, e.uri.scheme !== a.Schemas.inMemory ? this.setTitle(l.basenameOrAuthority(e.uri), this._uriLabel.getUriLabel(l.dirname(e.uri))) : this.setTitle(_.localize(3, null)), n = this._textModelResolverService.createModelReference(e.uri), this._tree.getInput() !== e.parent ? [3, 1] : (this._tree.reveal(e), [3, 3]));
- case 1:
- return t && this._tree.reveal(e.parent),
- [4, this._tree.expand(e.parent)];
- case 2:
- d.sent(), this._tree.reveal(e), d.label = 3;
- case 3:
- return [4, n];
- case 4:
- return i = d.sent(), this._model ? (s.dispose(this._previewModelReference), (o = i.object) ? (r = this._preview.getModel() === o.textEditorModel ? 0 : 1, u = p.Range.lift(e.range).collapseToStart(), this._previewModelReference = i, this._preview.setModel(o.textEditorModel), this._preview.setSelection(u), this._preview.revealRangeInCenter(u, r)) : (this._preview.setModel(this._previewNotAvailableMessage), i.dispose()), [2]) : (i.dispose(), [2])
- }
- }))
- }))
- }, t = h([g(3, w.IThemeService), g(4, m.ITextModelService), g(5, y.IInstantiationService), g(6, E.IPeekViewService), g(7, C.ILabelService)], t)
- }(E.PeekViewWidget);
- t.ReferenceWidget = I, w.registerThemingParticipant((function (e, t) {
- var n = e.getColor(E.peekViewResultsMatchHighlight);
- n && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: " + n + "; }");
- var i = e.getColor(E.peekViewEditorMatchHighlight)
- ;i && t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: " + i + "; }");
- var o = e.getColor(E.peekViewEditorMatchHighlightBorder);
- o && t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid " + o + "; box-sizing: border-box; }");
- var r = e.getColor(S.activeContrastBorder);
- r && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted " + r + "; box-sizing: border-box; }");
- var s = e.getColor(E.peekViewResultsBackground);
- s && t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: " + s + "; }");
- var a = e.getColor(E.peekViewResultsMatchForeground);
- a && t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: " + a + "; }");
- var l = e.getColor(E.peekViewResultsFileForeground);
- l && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: " + l + "; }");
- var u = e.getColor(E.peekViewResultsSelectionBackground)
- ;u && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: " + u + "; }");
- var d = e.getColor(E.peekViewResultsSelectionForeground);
- d && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: " + d + " !important; }");
- var c = e.getColor(E.peekViewEditorBackground);
- c && t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: " + c + ";}");
- var h = e.getColor(E.peekViewEditorGutterBackground);
- h && t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: " + h + ";}")
- }))
- })), define(n[234], i([0, 1, 448, 10, 2, 32, 11, 18, 43, 74, 113, 596, 3, 13, 35, 15, 123, 170, 86, 36, 29]), (function (e, t, n, i, o, r, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0}), t.ctxReferenceSearchVisible = new a.RawContextKey("referenceSearchVisible", !1);
- var L = function () {
- function e(e, n, i, r, s, a, l, u) {
- this._defaultTreeKeyboardSupport = e, this._editor = n, this._editorService = r, this._notificationService = s, this._instantiationService = a, this._storageService = l, this._configurationService = u, this._disposables = new o.DisposableStore, this._requestIdPool = 0, this._ignoreModelChangeEvent = !1, this._referenceSearchVisible = t.ctxReferenceSearchVisible.bindTo(i)
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- this._referenceSearchVisible.reset(), this._disposables.dispose(), o.dispose(this._widget), o.dispose(this._model), this._widget = void 0, this._model = void 0
- }, e.prototype.toggleWidget = function (e, t, i) {
- var o, r = this;
- if (this._widget && (o = this._widget.position), this.closeWidget(), !o || !e.containsPosition(o)) {
- this._peekMode = i, this._referenceSearchVisible.set(!0), this._disposables.add(this._editor.onDidChangeModelLanguage((function () {
- r.closeWidget()
- }))), this._disposables.add(this._editor.onDidChangeModel((function () {
- r._ignoreModelChangeEvent || r.closeWidget()
- })));
- var s = f.LayoutData.fromJSON(this._storageService.get("peekViewLayout", 0, "{}"));
- this._widget = this._instantiationService.createInstance(f.ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, s), this._widget.setTitle(n.localize(0, null)), this._widget.show(e), this._disposables.add(this._widget.onDidClose((function () {
- t.cancel(), r._widget && (r._storageService.store("peekViewLayout", JSON.stringify(r._widget.layoutData), 0), r._widget = void 0), r.closeWidget()
- }))), this._disposables.add(this._widget.onDidSelectReference((function (e) {
- var t = e.element, n = e.kind;
- if (t) switch (n) {
- case"open":
- "editor" === e.source && r._configurationService.getValue("editor.stablePeek") || r.openReference(t, !1);
- break;
- case"side":
- r.openReference(t, !0);
- break;
- case"goto":
- i ? r._gotoReference(t) : r.openReference(t, !1)
- }
- })));
- var a = ++this._requestIdPool;
- t.then((function (t) {
- if (a === r._requestIdPool && r._widget) return r._model && r._model.dispose(), r._model = t, r._widget.setModel(r._model).then((function () {
- if (r._widget && r._model && r._editor.hasModel()) {
- r._model.isEmpty ? r._widget.setMetaTitle("") : r._widget.setMetaTitle(n.localize(1, null, r._model.title, r._model.references.length));
- var t = r._editor.getModel().uri, i = new v.Position(e.startLineNumber, e.startColumn),
- o = r._model.nearestReference(t, i);
- if (o) return r._widget.setSelection(o).then((function () {
- r._widget && "editor" === r._editor.getOption(65) && r._widget.focusOnPreviewEditor()
- }))
- }
- }))
- }), (function (e) {
- r._notificationService.error(e)
- }))
- }
- }, e.prototype.changeFocusBetweenPreviewAndReferences = function () {
- this._widget && (this._widget.isPreviewEditorFocused() ? this._widget.focusOnReferenceTree() : this._widget.focusOnPreviewEditor())
- }, e.prototype.goToNextOrPreviousReference = function (e) {
- return d(this, void 0, void 0, (function () {
- var t, n, i, o, r;
- return c(this, (function (s) {
- switch (s.label) {
- case 0:
- return this._editor.hasModel() && this._model && this._widget && ((t = this._widget.position) && (n = this._model.nearestReference(this._editor.getModel().uri, t))) ? (i = this._model.nextOrPreviousReference(n, e), o = this._editor.hasTextFocus(), r = this._widget.isPreviewEditorFocused(), [4, this._widget.setSelection(i)]) : [2];
- case 1:
- return s.sent(), [4, this._gotoReference(i)];
- case 2:
- return s.sent(), o ? this._editor.focus() : this._widget && r && this._widget.focusOnPreviewEditor(), [2]
- }
- }))
- }))
- }, e.prototype.closeWidget = function (e) {
- void 0 === e && (e = !0), this._referenceSearchVisible.reset(), this._disposables.clear(), o.dispose(this._widget), o.dispose(this._model), this._widget = void 0, this._model = void 0, e && this._editor.focus(), this._requestIdPool += 1
- }, e.prototype._gotoReference = function (t) {
- var n = this;
- this._widget && this._widget.hide(), this._ignoreModelChangeEvent = !0;
- var o = m.Range.lift(t.range).collapseToStart();
- return this._editorService.openCodeEditor({
- resource: t.uri,
- options: {selection: o}
- }, this._editor).then((function (t) {
- var i
- ;
- if (n._ignoreModelChangeEvent = !1, t && n._widget) if (n._editor === t) n._widget.show(o), n._widget.focusOnReferenceTree(); else {
- var r = e.get(t), s = n._model.clone();
- n.closeWidget(), t.focus(), r.toggleWidget(o, y.createCancelablePromise((function (e) {
- return Promise.resolve(s)
- })), null !== (i = n._peekMode) && void 0 !== i && i)
- } else n.closeWidget()
- }), (function (e) {
- n._ignoreModelChangeEvent = !1, i.onUnexpectedError(e)
- }))
- }, e.prototype.openReference = function (e, t) {
- t || this.closeWidget();
- var n = e.uri, i = e.range;
- this._editorService.openCodeEditor({resource: n, options: {selection: i}}, this._editor, t)
- }, e.ID = "editor.contrib.referencesController", e = h([g(2, a.IContextKeyService), g(3, r.ICodeEditorService), g(4, _.INotificationService), g(5, s.IInstantiationService), g(6, u.IStorageService), g(7, l.IConfigurationService)], e)
- }();
- function D(e, t) {
- var n = C.getOuterEditor(e);
- if (n) {
- var i = L.get(n);
- i && t(i)
- }
- }
- t.ReferencesController = L, S.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "togglePeekWidgetFocus", weight: 100, primary: w.KeyChord(2089, 60),
- when: a.ContextKeyExpr.or(t.ctxReferenceSearchVisible, C.PeekContext.inPeekEditor), handler: function (e) {
- D(e, (function (e) {
- e.changeFocusBetweenPreviewAndReferences()
- }))
- }
- }), S.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "goToNextReference",
- weight: 90,
- primary: 62,
- secondary: [70],
- when: a.ContextKeyExpr.or(t.ctxReferenceSearchVisible, C.PeekContext.inPeekEditor),
- handler: function (e) {
- D(e, (function (e) {
- e.goToNextOrPreviousReference(!0)
- }))
- }
- }), S.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "goToPreviousReference",
- weight: 90,
- primary: 1086,
- secondary: [1094],
- when: a.ContextKeyExpr.or(t.ctxReferenceSearchVisible, C.PeekContext.inPeekEditor),
- handler: function (e) {
- D(e, (function (e) {
- e.goToNextOrPreviousReference(!1)
- }))
- }
- }), E.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor", "goToNextReference"), E.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor", "goToPreviousReference"), E.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor", "closeReferenceSearch"),
- E.CommandsRegistry.registerCommand("closeReferenceSearch", (function (e) {
- return D(e, (function (e) {
- return e.closeWidget()
- }))
- })), S.KeybindingsRegistry.registerKeybindingRule({
- id: "closeReferenceSearch",
- weight: -1,
- primary: 9,
- secondary: [1033],
- when: a.ContextKeyExpr.and(C.PeekContext.inPeekEditor, a.ContextKeyExpr.not("config.editor.stablePeek"))
- }), S.KeybindingsRegistry.registerKeybindingRule({
- id: "closeReferenceSearch",
- weight: 250,
- primary: 9,
- secondary: [1033],
- when: a.ContextKeyExpr.and(t.ctxReferenceSearchVisible, a.ContextKeyExpr.not("config.editor.stablePeek"))
- }), S.KeybindingsRegistry.registerCommandAndKeybindingRule({
- id: "openReferenceToSide",
- weight: 100,
- primary: 2051,
- mac: {primary: 259},
- when: a.ContextKeyExpr.and(t.ctxReferenceSearchVisible, b.WorkbenchListFocusContextKey),
- handler: function (e) {
- var t, n = null === (t = e.get(b.IListService).lastFocusedList) || void 0 === t ? void 0 : t.getFocus();
- Array.isArray(n) && n[0] instanceof p.OneReference && D(e, (function (e) {
- return e.openReference(n[0], !0)
- }))
- }
- }),
- E.CommandsRegistry.registerCommand("openReference", (function (e) {
- var t, n = null === (t = e.get(b.IListService).lastFocusedList) || void 0 === t ? void 0 : t.getFocus();
- Array.isArray(n) && n[0] instanceof p.OneReference && D(e, (function (e) {
- return e.openReference(n[0], !1)
- }))
- }))
- })), define(n[235], i([0, 1, 50, 15, 36, 16, 108, 12, 32, 13, 3, 23, 17, 122, 123, 234, 113, 446, 65, 18, 35, 73, 224, 29, 67, 537, 24, 25, 11, 21, 167]), (function (e, t, n, i, o, s, a, l, u, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R) {
- "use strict";
- var O, P, A, F, W, B, V, z;
- Object.defineProperty(t, "__esModule", {value: !0}), b.MenuRegistry.appendMenuItem(7, {
- submenu: 8,
- title: C.localize(0, null),
- group: "navigation",
- order: 100
- });
- var H = function (e) {
- function t(t, n) {
- var i = e.call(this, n) || this;
- return i._configuration = t, i
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var o = this;
- if (!t.hasModel()) return Promise.resolve(void 0)
- ;
- var r = e.get(w.INotificationService), s = e.get(u.ICodeEditorService),
- a = e.get(E.IEditorProgressService), l = e.get(x.ISymbolNavigationService), h = t.getModel(),
- p = t.getPosition(), g = new N.EditorStateCancellationTokenSource(t, 5),
- f = i.raceCancellation(this._getLocationModel(h, p, g.token), g.token).then((function (e) {
- return d(o, void 0, void 0, (function () {
- var i, o, r, a;
- return c(this, (function (u) {
- if (!e || g.token.isCancellationRequested) return [2];
- if (n.alert(e.ariaMessage), e.referenceAt(h.uri, p) && (o = this._getAlternativeCommand(t)) !== this.id && (i = t.getAction(o)), 0 === (r = e.references.length)) this._configuration.muteMessage || (a = h.getWordAtPosition(p), m.MessageController.get(t).showMessage(this._getNoResultFoundMessage(a), p)); else {
- if (1 !== r || !i) return [2, this._onResult(s, l, t, e)];
- i.run()
- }
- return [2]
- }))
- }))
- }), (function (e) {
- r.error(e)
- })).finally((function () {
- g.dispose()
- }));
- return a.showWhile(f, 250), f
- }, t.prototype._onResult = function (e, t, n, i) {
- return d(this, void 0, void 0, (function () {
- var o, r, s, a;
- return c(this, (function (l) {
- switch (l.label) {
- case 0:
- return o = this._getGoToPreference(n), n instanceof R.EmbeddedCodeEditorWidget || !(this._configuration.openInPeek || "peek" === o && i.references.length > 1) ? [3, 1] : (this._openInPeek(n, i), [3, 3]);
- case 1:
- return r = i.firstReference(), s = i.references.length > 1 && "gotoAndPeek" === o, [4, this._openReference(n, e, r, this._configuration.openToSide, !s)];
- case 2:
- a = l.sent(), s && a ? this._openInPeek(a, i) : i.dispose(), "goto" === o && t.put(r), l.label = 3;
- case 3:
- return [2]
- }
- }))
- }))
- }, t.prototype._openReference = function (e, t, n, i, o) {
- return d(this, void 0, void 0, (function () {
- var r, s, a, l;
- return c(this, (function (u) {
- switch (u.label) {
- case 0:
- return r = void 0, f.isLocationLink(n) && (r = n.targetSelectionRange), r || (r = n.range), [4, t.openCodeEditor({
- resource: n.uri,
- options: {
- selection: p.Range.collapseToStart(r),
- revealInCenterIfOutsideViewport: !0
- }
- }, e, i)];
- case 1:
- return (s = u.sent()) ? (o && (a = s.getModel(), l = s.deltaDecorations([], [{
- range: r,
- options: {className: "symbolHighlight"}
- }]), setTimeout((function () {
- s.getModel() === a && s.deltaDecorations(l, [])
- }), 350)), [2, s]) : [2, void 0]
- }
- }))
- }))
- },
- t.prototype._openInPeek = function (e, t) {
- var n = _.ReferencesController.get(e);
- n && e.hasModel() ? n.toggleWidget(e.getSelection(), i.createCancelablePromise((function (e) {
- return Promise.resolve(t)
- })), this._configuration.openInPeek) : t.dispose()
- }, t
- }(l.EditorAction), K = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return i = y.ReferencesModel.bind, [4, L.getDefinitionsAtPosition(e, t, n)];
- case 1:
- return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(1, null)]))]
- }
- }))
- }))
- }, t.prototype._getNoResultFoundMessage = function (e) {
- return e && e.word ? C.localize(2, null, e.word) : C.localize(3, null)
- }, t.prototype._getAlternativeCommand = function (e) {
- return e.getOption(41).alternativeDefinitionCommand
- }, t.prototype._getGoToPreference = function (e) {
- return e.getOption(41).multipleDefinitions
- }, t
- }(H);
- t.DefinitionAction = K;
- var U = s.isWeb && !I.isStandalone ? 2118 : 70
- ;l.registerEditorAction(((O = function (e) {
- function t() {
- var n = e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
- id: t.id,
- label: C.localize(4, null),
- alias: "Go to Definition",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDefinitionProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: U, weight: 100},
- contextMenuOpts: {group: "navigation", order: 1.1},
- menuOpts: {menuId: 19, group: "4_symbol_nav", order: 2, title: C.localize(5, null)}
- }) || this;
- return D.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration", t.id), n
- }
- return r(t, e), t
- }(K)).id = "editor.action.revealDefinition", O)), l.registerEditorAction(((P = function (e) {
- function t() {
- var n = e.call(this, {openToSide: !0, openInPeek: !1, muteMessage: !1}, {
- id: t.id,
- label: C.localize(6, null),
- alias: "Open Definition to the Side",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDefinitionProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {
- kbExpr: g.EditorContextKeys.editorTextFocus,
- primary: o.KeyChord(2089, U), weight: 100
- }
- }) || this;
- return D.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide", t.id), n
- }
- return r(t, e), t
- }(K)).id = "editor.action.revealDefinitionAside", P)), l.registerEditorAction(((A = function (e) {
- function t() {
- var n = e.call(this, {openToSide: !1, openInPeek: !0, muteMessage: !1}, {
- id: t.id,
- label: C.localize(7, null),
- alias: "Peek Definition",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDefinitionProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {
- kbExpr: g.EditorContextKeys.editorTextFocus,
- primary: 582,
- linux: {primary: 3140},
- weight: 100
- },
- contextMenuOpts: {menuId: 8, group: "peek", order: 2}
- }) || this;
- return D.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration", t.id), n
- }
- return r(t, e), t
- }(K)).id = "editor.action.peekDefinition", A));
- var j = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i
- ;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return i = y.ReferencesModel.bind, [4, L.getDeclarationsAtPosition(e, t, n)];
- case 1:
- return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(8, null)]))]
- }
- }))
- }))
- }, t.prototype._getNoResultFoundMessage = function (e) {
- return e && e.word ? C.localize(9, null, e.word) : C.localize(10, null)
- }, t.prototype._getAlternativeCommand = function (e) {
- return e.getOption(41).alternativeDeclarationCommand
- }, t.prototype._getGoToPreference = function (e) {
- return e.getOption(41).multipleDeclarations
- }, t
- }(H);
- l.registerEditorAction(((F = function (e) {
- function t() {
- return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
- id: t.id,
- label: C.localize(11, null),
- alias: "Go to Declaration",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDeclarationProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- contextMenuOpts: {group: "navigation", order: 1.3},
- menuOpts: {menuId: 19, group: "4_symbol_nav", order: 3, title: C.localize(12, null)}
- }) || this
- }
- return r(t, e), t.prototype._getNoResultFoundMessage = function (e) {
- return e && e.word ? C.localize(13, null, e.word) : C.localize(14, null)
- }, t
- }(j)).id = "editor.action.revealDeclaration", F)), l.registerEditorAction(function (e) {
- function t() {
- return e.call(this, {
- openToSide: !1,
- openInPeek: !0,
- muteMessage: !1
- }, {
- id: "editor.action.peekDeclaration",
- label: C.localize(15, null),
- alias: "Peek Declaration",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDeclarationProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- contextMenuOpts: {menuId: 8, group: "peek", order: 3}
- }) || this
- }
- return r(t, e), t
- }(j));
- var q = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return i = y.ReferencesModel.bind, [4, L.getTypeDefinitionsAtPosition(e, t, n)];
- case 1:
- return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(16, null)]))]
- }
- }))
- }))
- }, t.prototype._getNoResultFoundMessage = function (e) {
- return e && e.word ? C.localize(17, null, e.word) : C.localize(18, null)
- }, t.prototype._getAlternativeCommand = function (e) {
- return e.getOption(41).alternativeTypeDefinitionCommand
- }, t.prototype._getGoToPreference = function (e) {
- return e.getOption(41).multipleTypeDefinitions
- }, t
- }(H);
- l.registerEditorAction(((W = function (e) {
- function t() {
- return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
- id: t.ID,
- label: C.localize(19, null),
- alias: "Go to Type Definition",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasTypeDefinitionProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 0, weight: 100},
- contextMenuOpts: {group: "navigation", order: 1.4},
- menuOpts: {menuId: 19, group: "4_symbol_nav", order: 3, title: C.localize(20, null)}
- }) || this
- }
- return r(t, e), t
- }(q)).ID = "editor.action.goToTypeDefinition", W)), l.registerEditorAction(((B = function (e) {
- function t() {
- return e.call(this, {openToSide: !1, openInPeek: !0, muteMessage: !1}, {
- id: t.ID,
- label: C.localize(21, null),
- alias: "Peek Type Definition",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasTypeDefinitionProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- contextMenuOpts: {menuId: 8, group: "peek", order: 4}
- }) || this
- }
- return r(t, e), t
- }(q)).ID = "editor.action.peekTypeDefinition", B));
- var G = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return i = y.ReferencesModel.bind, [4, L.getImplementationsAtPosition(e, t, n)];
- case 1:
- return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(22, null)]))]
- }
- }))
- }))
- }, t.prototype._getNoResultFoundMessage = function (e) {
- return e && e.word ? C.localize(23, null, e.word) : C.localize(24, null)
- }, t.prototype._getAlternativeCommand = function (e) {
- return e.getOption(41).alternativeImplementationCommand
- }, t.prototype._getGoToPreference = function (e) {
- return e.getOption(41).multipleImplementations
- }, t
- }(H);
- l.registerEditorAction(((V = function (e) {
- function t() {
- return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
- id: t.ID,
- label: C.localize(25, null),
- alias: "Go to Implementations",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasImplementationProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2118, weight: 100},
- menuOpts: {menuId: 19, group: "4_symbol_nav", order: 4, title: C.localize(26, null)},
- contextMenuOpts: {group: "navigation", order: 1.45}
- }) || this
- }
- return r(t, e), t
- }(G)).ID = "editor.action.goToImplementation", V)), l.registerEditorAction(((z = function (e) {
- function t() {
- return e.call(this, {openToSide: !1, openInPeek: !0, muteMessage: !1}, {
- id: t.ID,
- label: C.localize(27, null),
- alias: "Peek Implementations",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasImplementationProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 3142, weight: 100},
- contextMenuOpts: {
- menuId: 8, group: "peek", order: 5
- }
- }) || this
- }
- return r(t, e), t
- }(G)).ID = "editor.action.peekImplementation", z));
- var Y = function (e) {
- function t() {
- return null !== e && e.apply(this, arguments) || this
- }
- return r(t, e), t.prototype._getNoResultFoundMessage = function (e) {
- return e ? C.localize(28, null, e.word) : C.localize(29, null)
- }, t.prototype._getAlternativeCommand = function (e) {
- return e.getOption(41).alternativeReferenceCommand
- }, t.prototype._getGoToPreference = function (e) {
- return e.getOption(41).multipleReferences
- }, t
- }(H);
- l.registerEditorAction(function (e) {
- function t() {
- return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
- id: "editor.action.goToReferences",
- label: C.localize(30, null),
- alias: "Go to References",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasReferenceProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 1094, weight: 100},
- contextMenuOpts: {group: "navigation", order: 1.45},
- menuOpts: {
- menuId: 19, group: "4_symbol_nav", order: 5,
- title: C.localize(31, null)
- }
- }) || this
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return i = y.ReferencesModel.bind, [4, L.getReferencesAtPosition(e, t, !0, n)];
- case 1:
- return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(32, null)]))]
- }
- }))
- }))
- }, t
- }(Y)), l.registerEditorAction(function (e) {
- function t() {
- return e.call(this, {
- openToSide: !1,
- openInPeek: !0,
- muteMessage: !1
- }, {
- id: "editor.action.referenceSearch.trigger",
- label: C.localize(33, null),
- alias: "Peek References",
- precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasReferenceProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
- contextMenuOpts: {menuId: 8, group: "peek", order: 6}
- }) || this
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- var i;
- return c(this, (function (o) {
- switch (o.label) {
- case 0:
- return i = y.ReferencesModel.bind, [4, L.getReferencesAtPosition(e, t, !1, n)];
- case 1:
- return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(34, null)]))]
- }
- }))
- }))
- }, t
- }(Y));
- var Z = function (e) {
- function t(t, n, i) {
- var o = e.call(this, t, {
- id: "editor.action.goToLocation",
- label: C.localize(35, null),
- alias: "Go To Any Symbol",
- precondition: S.ContextKeyExpr.and(v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated())
- }) || this;
- return o._references = n, o._gotoMultipleBehaviour = i, o
- }
- return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
- return d(this, void 0, void 0, (function () {
- return c(this, (function (e) {
- return [2, new y.ReferencesModel(this._references, C.localize(36, null))]
- }))
- }))
- }, t.prototype._getNoResultFoundMessage = function (e) {
- return e && C.localize(37, null, e.word) || ""
- }, t.prototype._getGoToPreference = function (e) {
- var t;
- return null !== (t = this._gotoMultipleBehaviour) && void 0 !== t ? t : e.getOption(41).multipleReferences
- }, t.prototype._getAlternativeCommand = function () {
- return ""
- }, t
- }(H);
- D.CommandsRegistry.registerCommand({
- id: "editor.action.goToLocations", description: {
- description: "Go to locations from a position in a file",
- args: [{
- name: "uri",
- description: "The text document in which to start",
- constraint: M.URI
- }, {
- name: "position",
- description: "The position at which to start",
- constraint: h.Position.isIPosition
- }, {name: "locations", description: "An array of locations.", constraint: Array}, {
- name: "multiple",
- description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"
- }]
- }, handler: function (e, t, n, i, o, r) {
- return d(void 0, void 0, void 0, (function () {
- var s, l;
- return c(this, (function (d) {
- switch (d.label) {
- case 0:
- return T.assertType(M.URI.isUri(t)), T.assertType(h.Position.isIPosition(n)), T.assertType(Array.isArray(i)), T.assertType(void 0 === o || "string" == typeof o), T.assertType(void 0 === r || "boolean" == typeof r), [4, (s = e.get(u.ICodeEditorService)).openCodeEditor({resource: t}, s.getFocusedCodeEditor())];
- case 1:
- return l = d.sent(), a.isCodeEditor(l) ? (l.setPosition(n), l.revealPositionInCenterIfOutsideViewport(n, 0), [2, l.invokeWithinContext((function (e) {
- var t = new Z({
- muteMessage: !0, openInPeek: Boolean(r), openToSide: !1
- }, i, o);
- e.get(k.IInstantiationService).invokeFunction(t.run.bind(t), l)
- }))]) : [2]
- }
- }))
- }))
- }
- }), D.CommandsRegistry.registerCommand({
- id: "editor.action.peekLocations",
- description: {
- description: "Peek locations from a position in a file",
- args: [{
- name: "uri",
- description: "The text document in which to start",
- constraint: M.URI
- }, {
- name: "position",
- description: "The position at which to start",
- constraint: h.Position.isIPosition
- }, {name: "locations", description: "An array of locations.", constraint: Array}, {
- name: "multiple",
- description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"
- }]
- },
- handler: function (e, t, n, i, o) {
- return d(void 0, void 0, void 0, (function () {
- return c(this, (function (r) {
- return e.get(D.ICommandService).executeCommand("editor.action.goToLocations", t, n, i, o, !0), [2]
- }))
- }))
- }
- }), D.CommandsRegistry.registerCommand({
- id: "editor.action.findReferences", handler: function (e, t, n) {
- T.assertType(M.URI.isUri(t)), T.assertType(h.Position.isIPosition(n))
- ;var o = e.get(u.ICodeEditorService);
- return o.openCodeEditor({resource: t}, o.getFocusedCodeEditor()).then((function (e) {
- if (a.isCodeEditor(e) && e.hasModel()) {
- var t = _.ReferencesController.get(e);
- if (t) {
- var o = i.createCancelablePromise((function (t) {
- return L.getReferencesAtPosition(e.getModel(), h.Position.lift(n), !1, t).then((function (e) {
- return new y.ReferencesModel(e, C.localize(38, null))
- }))
- })), r = new p.Range(n.lineNumber, n.column, n.lineNumber, n.column);
- return Promise.resolve(t.toggleWidget(r, o, !1))
- }
- }
- }))
- }
- }), D.CommandsRegistry.registerCommandAlias("editor.action.showReferences", "editor.action.peekLocations")
- })), define(n[236], i([0, 1, 447, 15, 10, 75, 71, 3, 17, 12, 224, 2, 84, 14, 20, 67, 235, 199, 13, 21, 313]), (function (e, t, n, i, o, r, s, a, l, u, d, c, p, f, m, v, _, y, C, b) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var S = function () {
- function e(e, t, n) {
- var i = this;
- this.textModelResolverService = t, this.modeService = n, this.toUnhook = new c.DisposableStore, this.toUnhookForKeyboard = new c.DisposableStore, this.linkDecorations = [],
- this.currentWordAtPosition = null, this.previousPromise = null, this.editor = e;
- var r = new y.ClickLinkGesture(e);
- this.toUnhook.add(r), this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown((function (e) {
- var t = e[0], n = e[1];
- i.startFindDefinitionFromMouse(t, b.withNullAsUndefined(n))
- }))), this.toUnhook.add(r.onExecute((function (e) {
- i.isEnabled(e) && i.gotoDefinition(e.target.position, e.hasSideBySideModifier).then((function () {
- i.removeLinkDecorations()
- }), (function (e) {
- i.removeLinkDecorations(), o.onUnexpectedError(e)
- }))
- }))), this.toUnhook.add(r.onCancel((function () {
- i.removeLinkDecorations(), i.currentWordAtPosition = null
- })))
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.startFindDefinitionFromCursor = function (e) {
- var t = this;
- return this.startFindDefinition(e).then((function () {
- t.toUnhookForKeyboard.add(t.editor.onDidChangeCursorPosition((function () {
- t.currentWordAtPosition = null, t.removeLinkDecorations(), t.toUnhookForKeyboard.clear()
- }))), t.toUnhookForKeyboard.add(t.editor.onKeyDown((function (e) {
- e && (t.currentWordAtPosition = null, t.removeLinkDecorations(), t.toUnhookForKeyboard.clear())
- })))
- }))
- }, e.prototype.startFindDefinitionFromMouse = function (e, t) {
- if (!(9 === e.target.type && this.linkDecorations.length > 0)) {
- if (!this.editor.hasModel() || !this.isEnabled(e, t)) return this.currentWordAtPosition = null, void this.removeLinkDecorations();
- var n = e.target.position;
- this.startFindDefinition(n)
- }
- }, e.prototype.startFindDefinition = function (e) {
- var t, s = this;
- this.toUnhookForKeyboard.clear();
- var l = e ? null === (t = this.editor.getModel()) || void 0 === t ? void 0 : t.getWordAtPosition(e) : null;
- if (!l) return this.currentWordAtPosition = null, this.removeLinkDecorations(), Promise.resolve(0);
- if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === l.startColumn && this.currentWordAtPosition.endColumn === l.endColumn && this.currentWordAtPosition.word === l.word) return Promise.resolve(0);
- this.currentWordAtPosition = l;
- var u = new v.EditorState(this.editor, 15);
- return this.previousPromise && (this.previousPromise.cancel(), this.previousPromise = null),
- this.previousPromise = i.createCancelablePromise((function (t) {
- return s.findDefinition(e, t)
- })), this.previousPromise.then((function (t) {
- if (t && t.length && u.validate(s.editor)) if (t.length > 1) s.addDecoration(new a.Range(e.lineNumber, l.startColumn, e.lineNumber, l.endColumn), (new r.MarkdownString).appendText(n.localize(0, null, t.length))); else {
- var i = t[0];
- if (!i.uri) return;
- s.textModelResolverService.createModelReference(i.uri).then((function (t) {
- if (t.object && t.object.textEditorModel) {
- var n = t.object.textEditorModel, o = i.range.startLineNumber;
- if (o < 1 || o > n.getLineCount()) t.dispose(); else {
- var u, d = s.getPreviewValue(n, o, i);
- u = i.originSelectionRange ? a.Range.lift(i.originSelectionRange) : new a.Range(e.lineNumber, l.startColumn, e.lineNumber, l.endColumn);
- var c = s.modeService.getModeIdByFilepathOrFirstLine(n.uri);
- s.addDecoration(u, (new r.MarkdownString).appendCodeblock(c || "", d)), t.dispose()
- }
- } else t.dispose()
- }))
- } else s.removeLinkDecorations()
- })).then(void 0, o.onUnexpectedError)
- }, e.prototype.getPreviewValue = function (t, n, i) {
- var o = i.targetSelectionRange ? i.range : this.getPreviewRangeBasedOnBrackets(t, n);
- return o.endLineNumber - o.startLineNumber >= e.MAX_SOURCE_PREVIEW_LINES && (o = this.getPreviewRangeBasedOnIndentation(t, n)), this.stripIndentationFromPreviewRange(t, n, o)
- }, e.prototype.stripIndentationFromPreviewRange = function (e, t, n) {
- for (var i = e.getLineFirstNonWhitespaceColumn(t), o = t + 1; o < n.endLineNumber; o++) {
- var r = e.getLineFirstNonWhitespaceColumn(o);
- i = Math.min(i, r)
- }
- return e.getValueInRange(n).replace(new RegExp("^\\s{" + (i - 1) + "}", "gm"), "").trim()
- }, e.prototype.getPreviewRangeBasedOnIndentation = function (t, n) {
- for (var i = t.getLineFirstNonWhitespaceColumn(n), o = Math.min(t.getLineCount(), n + e.MAX_SOURCE_PREVIEW_LINES), r = n + 1; r < o; r++) {
- if (i === t.getLineFirstNonWhitespaceColumn(r)) break
- }
- return new a.Range(n, 1, r + 1, 1)
- }, e.prototype.getPreviewRangeBasedOnBrackets = function (t, n) {
- for (var i = Math.min(t.getLineCount(), n + e.MAX_SOURCE_PREVIEW_LINES), o = [], r = !0, s = t.findNextBracket(new C.Position(n, 1)); null !== s;) {
- if (0 === o.length) o.push(s); else {
- var l = o[o.length - 1]
- ;
- if (l.open[0] === s.open[0] && l.isOpen && !s.isOpen ? o.pop() : o.push(s), 0 === o.length) {
- if (!r) return new a.Range(n, 1, s.range.endLineNumber + 1, 1);
- r = !1
- }
- }
- var u = t.getLineMaxColumn(n), d = s.range.endLineNumber, c = s.range.endColumn;
- if (u === s.range.endColumn && (d++, c = 1), d > i) return new a.Range(n, 1, i + 1, 1);
- s = t.findNextBracket(new C.Position(d, c))
- }
- return new a.Range(n, 1, i + 1, 1)
- }, e.prototype.addDecoration = function (e, t) {
- var n = {range: e, options: {inlineClassName: "goto-definition-link", hoverMessage: t}};
- this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, [n])
- }, e.prototype.removeLinkDecorations = function () {
- this.linkDecorations.length > 0 && (this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, []))
- }, e.prototype.isEnabled = function (e, t) {
- return this.editor.hasModel() && e.isNoneOrSingleMouseDown && 6 === e.target.type && (e.hasTriggerModifier || !!t && t.keyCodeIsTriggerKey) && l.DefinitionProviderRegistry.has(this.editor.getModel())
- }, e.prototype.findDefinition = function (e, t) {
- var n = this.editor.getModel()
- ;
- return n ? d.getDefinitionsAtPosition(n, e, t) : Promise.resolve(null)
- }, e.prototype.gotoDefinition = function (e, t) {
- var n = this;
- this.editor.setPosition(e);
- var i = new _.DefinitionAction({openToSide: t, openInPeek: !1, muteMessage: !0}, {
- alias: "",
- label: "",
- id: "",
- precondition: void 0
- });
- return this.editor.invokeWithinContext((function (e) {
- return i.run(e, n.editor)
- }))
- }, e.prototype.dispose = function () {
- this.toUnhook.dispose()
- }, e.ID = "editor.contrib.gotodefinitionatposition", e.MAX_SOURCE_PREVIEW_LINES = 8, e = h([g(1, p.ITextModelService), g(2, s.IModeService)], e)
- }();
- t.GotoDefinitionAtPositionEditorContribution = S, u.registerEditorContribution(S.ID, S), f.registerThemingParticipant((function (e, t) {
- var n = e.getColor(m.editorActiveLinkForeground);
- n && t.addRule(".monaco-editor .goto-definition-link { color: " + n + " !important; }")
- }))
- })), define(n[597], i([0, 1, 12, 32, 234, 43, 18, 11, 35, 74]), (function (e, t, n, i, o, s, a, l, u, d) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var c = function (e) {
- function t(t, n, i, o, r, s, a) {
- return e.call(this, !0, t, n, i, o, r, s, a) || this
- }
- return r(t, e), t = h([g(1, a.IContextKeyService), g(2, i.ICodeEditorService), g(3, u.INotificationService), g(4, l.IInstantiationService), g(5, d.IStorageService), g(6, s.IConfigurationService)], t)
- }(o.ReferencesController);
- t.StandaloneReferencesController = c, n.registerEditorContribution(o.ReferencesController.ID, c)
- })), define(n[598], i([0, 1, 112, 14, 20]), (function (e, t, n, i, o) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- e.className = function (e) {
- switch (e) {
- case n.default.Ignore:
- return "severity-ignore codicon-info";
- case n.default.Info:
- return "codicon-info";
- case n.default.Warning:
- return "codicon-warning";
- case n.default.Error:
- return "codicon-error"
- }
- return ""
- }
- }(t.SeverityIcon || (t.SeverityIcon = {})), i.registerThemingParticipant((function (e, t) {
- var n = e.getColor(o.problemsErrorIconForeground)
- ;n && t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-error,\n\t\t\t.markers-panel .marker-icon.codicon-error,\n\t\t\t.extensions-viewlet > .extensions .codicon-error,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-error {\n\t\t\t\tcolor: " + n + ";\n\t\t\t}\n\t\t");
- var i = e.getColor(o.problemsWarningIconForeground);
- n && t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-warning,\n\t\t\t.markers-panel .marker-icon.codicon-warning,\n\t\t\t.extensions-viewlet > .extensions .codicon-warning,\n\t\t\t.extension-editor .codicon-warning,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-warning {\n\t\t\t\tcolor: " + i + ";\n\t\t\t}\n\t\t");
- var r = e.getColor(o.problemsInfoIconForeground);
- n && t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-info,\n\t\t\t.markers-panel .marker-icon.codicon-info,\n\t\t\t.extensions-viewlet > .extensions .codicon-info,\n\t\t\t.extension-editor .codicon-info,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-info {\n\t\t\t\tcolor: " + r + ";\n\t\t\t}\n\t\t")
- }))
- })),
- define(n[599], i([0, 1, 445, 6, 2, 72, 3, 20, 14, 27, 53, 136, 19, 4, 123, 39, 598, 312]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var _ = function () {
- function e(e, t, n, r) {
- var s = this;
- this._openerService = r, this._lines = 0, this._longestLineLength = 0, this._relatedDiagnostics = new WeakMap, this._disposables = new o.DisposableStore, this._editor = t;
- var a = document.createElement("div");
- a.className = "descriptioncontainer", a.setAttribute("aria-live", "assertive"), a.setAttribute("role", "alert"), this._messageBlock = document.createElement("div"), i.addClass(this._messageBlock, "message"), a.appendChild(this._messageBlock), this._relatedBlock = document.createElement("div"), a.appendChild(this._relatedBlock), this._disposables.add(i.addStandardDisposableListener(this._relatedBlock, "click", (function (e) {
- e.preventDefault();
- var t = s._relatedDiagnostics.get(e.target);
- t && n(t)
- }))), this._scrollable = new c.ScrollableElement(a, {
- horizontal: 1, vertical: 1, useShadows: !1, horizontalScrollbarSize: 3,
- verticalScrollbarSize: 3
- }), e.appendChild(this._scrollable.getDomNode()), this._disposables.add(this._scrollable.onScroll((function (e) {
- a.style.left = "-" + e.scrollLeft + "px", a.style.top = "-" + e.scrollTop + "px"
- }))), this._disposables.add(this._scrollable)
- }
- return e.prototype.dispose = function () {
- o.dispose(this._disposables)
- }, e.prototype.update = function (e) {
- var t = this, n = e.source, o = e.message, r = e.relatedInformation, s = e.code,
- a = ((null == n ? void 0 : n.length) || 0) + "()".length;
- s && (a += "string" == typeof s ? s.length : s.value.length);
- var l = o.split(/\r\n|\r|\n/g);
- this._lines = l.length, this._longestLineLength = 0;
- for (var u = 0, d = l; u < d.length; u++) {
- var c = d[u];
- this._longestLineLength = Math.max(c.length + a, this._longestLineLength)
- }
- i.clearNode(this._messageBlock), this._editor.applyFontInfo(this._messageBlock);
- for (var g = this._messageBlock, f = 0, m = l; f < m.length; f++) {
- c = m[f];
- (g = document.createElement("div")).innerText = c, "" === c && (g.style.height = this._messageBlock.style.lineHeight), this._messageBlock.appendChild(g)
- }
- if (n || s) {
- var v, _ = document.createElement("span")
- ;
- if (i.addClass(_, "details"), g.appendChild(_), n) {
- var y = document.createElement("span");
- y.innerText = n, i.addClass(y, "source"), _.appendChild(y)
- }
- if (s) if ("string" == typeof s) (v = document.createElement("span")).innerText = "(" + s + ")", i.addClass(v, "code"), _.appendChild(v); else this._codeLink = i.$("a.code-link"), this._codeLink.setAttribute("href", "" + s.link.toString()), this._codeLink.onclick = function (e) {
- t._openerService.open(s.link), e.preventDefault(), e.stopPropagation()
- }, (v = i.append(this._codeLink, i.$("span"))).innerText = s.value, _.appendChild(this._codeLink)
- }
- if (i.clearNode(this._relatedBlock), this._editor.applyFontInfo(this._relatedBlock), p.isNonEmptyArray(r)) {
- var C = this._relatedBlock.appendChild(document.createElement("div"));
- C.style.paddingTop = Math.floor(.66 * this._editor.getOption(49)) + "px", this._lines += 1;
- for (var b = 0, S = r; b < S.length; b++) {
- var w = S[b], E = document.createElement("div"), L = document.createElement("a");
- i.addClass(L, "filename"), L.innerHTML = h.getBaseLabel(w.resource) + "(" + w.startLineNumber + ", " + w.startColumn + "): ",
- L.title = h.getPathLabel(w.resource, void 0), this._relatedDiagnostics.set(L, w);
- var D = document.createElement("span");
- D.innerText = w.message, E.appendChild(L), E.appendChild(D), this._lines += 1, C.appendChild(E)
- }
- }
- var N = this._editor.getOption(34),
- x = Math.ceil(N.typicalFullwidthCharacterWidth * this._longestLineLength * .75),
- I = N.lineHeight * this._lines;
- this._scrollable.setScrollDimensions({scrollWidth: x, scrollHeight: I})
- }, e.prototype.layout = function (e, t) {
- this._scrollable.getDomNode().style.height = e + "px", this._scrollable.getDomNode().style.width = t + "px", this._scrollable.setScrollDimensions({
- width: t,
- height: e
- })
- }, e.prototype.getHeightInLines = function () {
- return Math.min(17, this._lines)
- }, e
- }(), y = function (e) {
- function l(t, n, i, r) {
- var a = e.call(this, t, {showArrow: !0, showFrame: !0, isAccessible: !0}) || this;
- return a.actions = n, a._themeService = i, a._openerService = r, a._callOnDispose = new o.DisposableStore, a._onDidSelectRelatedInformation = new g.Emitter, a.onDidSelectRelatedInformation = a._onDidSelectRelatedInformation.event,
- a._severity = s.MarkerSeverity.Warning, a._backgroundColor = d.Color.white, a._applyTheme(i.getTheme()), a._callOnDispose.add(i.onThemeChange(a._applyTheme.bind(a))), a.create(), a
- }
- return r(l, e), l.prototype._applyTheme = function (e) {
- this._backgroundColor = e.getColor(t.editorMarkerNavigationBackground);
- var n = t.editorMarkerNavigationError;
- this._severity === s.MarkerSeverity.Warning ? n = t.editorMarkerNavigationWarning : this._severity === s.MarkerSeverity.Info && (n = t.editorMarkerNavigationInfo);
- var i = e.getColor(n);
- this.style({
- arrowColor: i,
- frameColor: i,
- headerBackgroundColor: this._backgroundColor,
- primaryHeadingColor: e.getColor(f.peekViewTitleForeground),
- secondaryHeadingColor: e.getColor(f.peekViewTitleInfoForeground)
- })
- }, l.prototype._applyStyles = function () {
- this._parentContainer && (this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : ""), e.prototype._applyStyles.call(this)
- }, l.prototype.dispose = function () {
- this._callOnDispose.dispose(), e.prototype.dispose.call(this)
- },
- l.prototype._fillHead = function (t) {
- e.prototype._fillHead.call(this, t), this._actionbarWidget.push(this.actions, {
- label: !1,
- icon: !0,
- index: 0
- })
- }, l.prototype._fillTitleIcon = function (e) {
- this._icon = i.append(e, i.$(""))
- }, l.prototype._getActionBarOptions = function () {
- return {orientation: 0}
- }, l.prototype._fillBody = function (e) {
- var t = this;
- this._parentContainer = e, i.addClass(e, "marker-widget"), this._parentContainer.tabIndex = 0, this._parentContainer.setAttribute("role", "tooltip"), this._container = document.createElement("div"), e.appendChild(this._container), this._message = new _(this._container, this.editor, (function (e) {
- return t._onDidSelectRelatedInformation.fire(e)
- }), this._openerService), this._disposables.add(this._message)
- }, l.prototype.show = function (e, t) {
- throw new Error("call showAtMarker")
- }, l.prototype.showAtMarker = function (t, i, o) {
- this._container.classList.remove("stale"), this._message.update(t), this._severity = t.severity, this._applyTheme(this._themeService.getTheme())
- ;var r = a.Range.lift(t), l = this.editor.getPosition(),
- u = l && r.containsPosition(l) ? l : r.getStartPosition();
- e.prototype.show.call(this, u, this.computeRequiredHeight());
- var d = this.editor.getModel();
- if (d) {
- var c = o > 1 ? n.localize(0, null, i, o) : n.localize(1, null, i, o);
- this.setTitle(m.basename(d.uri), c)
- }
- this._icon.className = "codicon " + v.SeverityIcon.className(s.MarkerSeverity.toSeverity(this._severity)), this.editor.revealPositionInCenter(u, 0), this.editor.focus()
- }, l.prototype.updateMarker = function (e) {
- this._container.classList.remove("stale"), this._message.update(e)
- }, l.prototype.showStale = function () {
- this._container.classList.add("stale"), this._relayout()
- }, l.prototype._doLayoutBody = function (t, n) {
- e.prototype._doLayoutBody.call(this, t, n), this._heightInPixel = t, this._message.layout(t, n), this._container.style.height = t + "px"
- }, l.prototype._onWidth = function (e) {
- this._message.layout(this._heightInPixel, e)
- }, l.prototype._relayout = function () {
- e.prototype._relayout.call(this, this.computeRequiredHeight())
- },
- l.prototype.computeRequiredHeight = function () {
- return 3 + this._message.getHeightInLines()
- }, l
- }(f.PeekViewWidget);
- t.MarkerNavigationWidget = y;
- var C = l.oneOf(l.editorErrorForeground, l.editorErrorBorder),
- b = l.oneOf(l.editorWarningForeground, l.editorWarningBorder),
- S = l.oneOf(l.editorInfoForeground, l.editorInfoBorder);
- t.editorMarkerNavigationError = l.registerColor("editorMarkerNavigationError.background", {
- dark: C,
- light: C,
- hc: C
- }, n.localize(2, null)), t.editorMarkerNavigationWarning = l.registerColor("editorMarkerNavigationWarning.background", {
- dark: b,
- light: b,
- hc: b
- }, n.localize(3, null)), t.editorMarkerNavigationInfo = l.registerColor("editorMarkerNavigationInfo.background", {
- dark: S,
- light: S,
- hc: S
- }, n.localize(4, null)), t.editorMarkerNavigationBackground = l.registerColor("editorMarkerNavigation.background", {
- dark: "#2D2D30",
- light: d.Color.white,
- hc: "#0C141F"
- }, n.localize(5, null)), u.registerThemingParticipant((function (e, t) {
- var n = e.getColor(l.textLinkForeground);
- n && (t.addRule(".monaco-editor .marker-widget a { color: " + n + "; }"),
- t.addRule(".monaco-editor .marker-widget a.code-link span:hover { color: " + n + "; }"))
- }))
- })), define(n[237], i([0, 1, 444, 4, 2, 18, 72, 3, 12, 14, 23, 599, 5, 19, 32, 10, 65, 55, 34, 39, 51]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E, L) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var D = function () {
- function e(e, t) {
- var n = this;
- this._toUnbind = new o.DisposableStore, this._editor = e, this._markers = [], this._nextIdx = -1, this._ignoreSelectionChange = !1, this._onCurrentMarkerChanged = new i.Emitter, this._onMarkerSetChanged = new i.Emitter, this.setMarkers(t), this._toUnbind.add(this._editor.onDidDispose((function () {
- return n.dispose()
- }))), this._toUnbind.add(this._editor.onDidChangeCursorPosition((function () {
- n._ignoreSelectionChange || n.currentMarker && n._editor.getPosition() && l.Range.containsPosition(n.currentMarker, n._editor.getPosition()) || (n._nextIdx = -1)
- })))
- }
- return Object.defineProperty(e.prototype, "onCurrentMarkerChanged", {
- get: function () {
- return this._onCurrentMarkerChanged.event
- }, enumerable: !0, configurable: !0
- }),
- Object.defineProperty(e.prototype, "onMarkerSetChanged", {
- get: function () {
- return this._onMarkerSetChanged.event
- }, enumerable: !0, configurable: !0
- }), e.prototype.setMarkers = function (e) {
- var t = this._nextIdx >= 0 ? this._markers[this._nextIdx] : void 0;
- this._markers = e || [], this._markers.sort(x.compareMarker), this._nextIdx = t ? Math.max(-1, _.binarySearch(this._markers, t, x.compareMarker)) : -1, this._onMarkerSetChanged.fire(this)
- }, e.prototype.withoutWatchingEditorPosition = function (e) {
- this._ignoreSelectionChange = !0;
- try {
- e()
- } finally {
- this._ignoreSelectionChange = !1
- }
- }, e.prototype._initIdx = function (e) {
- for (var t = !1, n = this._editor.getPosition(), i = 0; i < this._markers.length; i++) {
- var o = l.Range.lift(this._markers[i]);
- if (o.isEmpty() && this._editor.getModel()) {
- var r = this._editor.getModel().getWordAtPosition(o.getStartPosition());
- r && (o = new l.Range(o.startLineNumber, r.startColumn, o.startLineNumber, r.endColumn))
- }
- if (n && (o.containsPosition(n) || n.isBeforeOrEqual(o.getStartPosition()))) {
- this._nextIdx = i, t = !0;
- break
- }
- }
- t || (this._nextIdx = e ? 0 : this._markers.length - 1), this._nextIdx < 0 && (this._nextIdx = this._markers.length - 1)
- }, Object.defineProperty(e.prototype, "currentMarker", {
- get: function () {
- return this.canNavigate() ? this._markers[this._nextIdx] : void 0
- }, set: function (e) {
- var t = this._nextIdx;
- this._nextIdx = -1, e && (this._nextIdx = this.indexOf(e)), this._nextIdx !== t && this._onCurrentMarkerChanged.fire(e)
- }, enumerable: !0, configurable: !0
- }), e.prototype.move = function (e, t) {
- if (!this.canNavigate()) return this._onCurrentMarkerChanged.fire(void 0), !t;
- var n = this._nextIdx, i = !1;
- if (-1 === this._nextIdx ? this._initIdx(e) : e ? t || this._nextIdx + 1 < this._markers.length ? this._nextIdx = (this._nextIdx + 1) % this._markers.length : i = !0 : e || (t || this._nextIdx > 0 ? this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length : i = !0), n !== this._nextIdx) {
- var o = this._markers[this._nextIdx];
- this._onCurrentMarkerChanged.fire(o)
- }
- return i
- }, e.prototype.canNavigate = function () {
- return this._markers.length > 0
- }, e.prototype.findMarkerAtPosition = function (e) {
- return _.find(this._markers, (function (t) {
- return l.Range.containsPosition(t, e)
- }))
- }, Object.defineProperty(e.prototype, "total", {
- get: function () {
- return this._markers.length
- }, enumerable: !0, configurable: !0
- }), e.prototype.indexOf = function (e) {
- return 1 + this._markers.indexOf(e)
- }, e.prototype.dispose = function () {
- this._toUnbind.dispose()
- }, e
- }(), N = function () {
- function e(e, t, n, i, r, s, a) {
- this._markerService = t, this._contextKeyService = n, this._themeService = i, this._editorService = r, this._keybindingService = s, this._openerService = a, this._model = null, this._widget = null, this._disposeOnClose = new o.DisposableStore, this._editor = e, this._widgetVisible = R.bindTo(this._contextKeyService)
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- this._cleanUp(), this._disposeOnClose.dispose()
- }, e.prototype._cleanUp = function () {
- this._widgetVisible.reset(), this._disposeOnClose.clear(), this._widget = null, this._model = null
- }, e.prototype.getOrCreateModel = function () {
- var e = this;
- if (this._model) return this._model
- ;
- var t = this._getMarkers();
- this._model = new D(this._editor, t), this._markerService.onMarkerChanged(this._onMarkerChanged, this, this._disposeOnClose);
- var n = this._keybindingService.lookupKeybinding(M.ID),
- i = this._keybindingService.lookupKeybinding(I.ID),
- o = [new S.Action(I.ID, I.LABEL + (i ? " (" + i.getLabel() + ")" : ""), "show-next-problem codicon-chevron-down", this._model.canNavigate(), (function () {
- return d(e, void 0, void 0, (function () {
- return c(this, (function (e) {
- return this._model && this._model.move(!0, !0), [2]
- }))
- }))
- })), new S.Action(M.ID, M.LABEL + (n ? " (" + n.getLabel() + ")" : ""), "show-previous-problem codicon-chevron-up", this._model.canNavigate(), (function () {
- return d(e, void 0, void 0, (function () {
- return c(this, (function (e) {
- return this._model && this._model.move(!1, !0), [2]
- }))
- }))
- }))];
- this._widget = new m.MarkerNavigationWidget(this._editor, o, this._themeService, this._openerService), this._widgetVisible.set(!0), this._widget.onDidClose((function () {
- return e.closeMarkersNavigation()
- }), this, this._disposeOnClose),
- this._disposeOnClose.add(this._model), this._disposeOnClose.add(this._widget);
- for (var r = 0, s = o; r < s.length; r++) {
- var a = s[r];
- this._disposeOnClose.add(a)
- }
- return this._disposeOnClose.add(this._widget.onDidSelectRelatedInformation((function (t) {
- e._editorService.openCodeEditor({
- resource: t.resource,
- options: {pinned: !0, revealIfOpened: !0, selection: l.Range.lift(t).collapseToStart()}
- }, e._editor).then(void 0, C.onUnexpectedError), e.closeMarkersNavigation(!1)
- }))), this._disposeOnClose.add(this._editor.onDidChangeModel((function () {
- return e._cleanUp()
- }))), this._disposeOnClose.add(this._model.onCurrentMarkerChanged((function (t) {
- t && e._model ? e._model.withoutWatchingEditorPosition((function () {
- e._widget && e._model && e._widget.showAtMarker(t, e._model.indexOf(t), e._model.total)
- })) : e._cleanUp()
- }))), this._disposeOnClose.add(this._model.onMarkerSetChanged((function () {
- if (e._widget && e._widget.position && e._model) {
- var t = e._model.findMarkerAtPosition(e._widget.position);
- t ? e._widget.updateMarker(t) : e._widget.showStale()
- }
- }))), this._model
- },
- e.prototype.closeMarkersNavigation = function (e) {
- void 0 === e && (e = !0), this._cleanUp(), e && this._editor.focus()
- }, e.prototype.show = function (e) {
- this.getOrCreateModel().currentMarker = e
- }, e.prototype._onMarkerChanged = function (e) {
- var t = this._editor.getModel();
- t && this._model && e.some((function (e) {
- return E.isEqual(t.uri, e)
- })) && this._model.setMarkers(this._getMarkers())
- }, e.prototype._getMarkers = function () {
- var e = this._editor.getModel();
- return e ? this._markerService.read({
- resource: e.uri,
- severities: a.MarkerSeverity.Error | a.MarkerSeverity.Warning | a.MarkerSeverity.Info
- }) : []
- }, e.ID = "editor.contrib.markerController", e = h([g(1, a.IMarkerService), g(2, s.IContextKeyService), g(3, p.IThemeService), g(4, y.ICodeEditorService), g(5, w.IKeybindingService), g(6, L.IOpenerService)], e)
- }();
- t.MarkerController = N;
- var x = function (e) {
- function t(t, n, i) {
- var o = e.call(this, i) || this;
- return o._isNext = t, o._multiFile = n, o
- }
- return r(t, e), t.prototype.run = function (e, n) {
- var i = this, o = e.get(a.IMarkerService), r = e.get(y.ICodeEditorService), s = N.get(n)
- ;
- if (!s) return Promise.resolve(void 0);
- var l = s.getOrCreateModel();
- if (!l.move(this._isNext, !this._multiFile) || !this._multiFile) return Promise.resolve(void 0);
- var u = o.read({severities: a.MarkerSeverity.Error | a.MarkerSeverity.Warning | a.MarkerSeverity.Info}).sort(t.compareMarker);
- if (0 === u.length) return Promise.resolve(void 0);
- var d = n.getModel();
- if (!d) return Promise.resolve(void 0);
- var c = l.currentMarker || {
- resource: d.uri,
- severity: a.MarkerSeverity.Error,
- startLineNumber: 1,
- startColumn: 1,
- endLineNumber: 1,
- endColumn: 1
- }, h = _.binarySearch(u, c, t.compareMarker);
- h < 0 ? (h = ~h, h %= u.length) : h = this._isNext ? (h + 1) % u.length : (h + u.length - 1) % u.length;
- var p = u[h];
- return E.isEqual(p.resource, d.uri) ? (l.move(this._isNext, !0), Promise.resolve(void 0)) : (s.closeMarkersNavigation(), r.openCodeEditor({
- resource: p.resource,
- options: {pinned: !1, revealIfOpened: !0, revealInCenterIfOutsideViewport: !0, selection: p}
- }, n).then((function (e) {
- if (e) return e.getAction(i.id).run()
- })))
- }, t.compareMarker = function (e, t) {
- var n = v.compare(e.resource.toString(), t.resource.toString());
- return 0 === n && (n = a.MarkerSeverity.compare(e.severity, t.severity)), 0 === n && (n = l.Range.compareRangesUsingStarts(e, t)), n
- }, t
- }(u.EditorAction), I = function (e) {
- function t() {
- return e.call(this, !0, !1, {
- id: t.ID,
- label: t.LABEL,
- alias: "Go to Next Problem (Error, Warning, Info)",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 578, weight: 100}
- }) || this
- }
- return r(t, e), t.ID = "editor.action.marker.next", t.LABEL = n.localize(0, null), t
- }(x);
- t.NextMarkerAction = I;
- var M = function (e) {
- function t() {
- return e.call(this, !1, !1, {
- id: t.ID,
- label: t.LABEL,
- alias: "Go to Previous Problem (Error, Warning, Info)",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 1602, weight: 100}
- }) || this
- }
- return r(t, e), t.ID = "editor.action.marker.prev", t.LABEL = n.localize(1, null), t
- }(x), k = function (e) {
- function t() {
- return e.call(this, !0, !0, {
- id: "editor.action.marker.nextInFiles",
- label: n.localize(2, null),
- alias: "Go to Next Problem in Files (Error, Warning, Info)",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 66, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(x), T = function (e) {
- function t() {
- return e.call(this, !1, !0, {
- id: "editor.action.marker.prevInFiles",
- label: n.localize(3, null),
- alias: "Go to Previous Problem in Files (Error, Warning, Info)",
- precondition: f.EditorContextKeys.writable,
- kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 1090, weight: 100}
- }) || this
- }
- return r(t, e), t
- }(x);
- u.registerEditorContribution(N.ID, N), u.registerEditorAction(I), u.registerEditorAction(M), u.registerEditorAction(k), u.registerEditorAction(T);
- var R = new s.RawContextKey("markersNavigationVisible", !1), O = u.EditorCommand.bindToContribution(N.get);
- u.registerEditorCommand(new O({
- id: "closeMarkersNavigation", precondition: R, handler: function (e) {
- return e.closeMarkersNavigation()
- }, kbOpts: {weight: 150, kbExpr: f.EditorContextKeys.focus, primary: 9, secondary: [1033]}
- })), b.MenuRegistry.appendMenuItem(19, {
- group: "6_problem_nav",
- command: {id: "editor.action.marker.nextInFiles", title: n.localize(4, null)}, order: 1
- }), b.MenuRegistry.appendMenuItem(19, {
- group: "6_problem_nav",
- command: {id: "editor.action.marker.prevInFiles", title: n.localize(5, null)},
- order: 2
- })
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[600], i([0, 1, 454, 6, 26, 27, 75, 2, 13, 3, 30, 17, 222, 223, 375, 570, 538, 200, 201, 117, 14, 19, 72, 39, 10, 51, 237, 15, 119, 233, 111, 20]), (function (e, t, n, i, o, s, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var O = i.$, P = function (e, t, n) {
- this.range = e, this.color = t, this.provider = n
- }, A = function (e, t) {
- this.range = e, this.marker = t
- }, F = function () {
- function e(e, t) {
- this._markerDecorationsService = t, this._editor = e, this._result = []
- }
- return e.prototype.setRange = function (e) {
- this._range = e, this._result = []
- }, e.prototype.clearResult = function () {
- this._result = []
- }, e.prototype.computeAsync = function (e) {
- if (!this._editor.hasModel() || !this._range) return Promise.resolve([]);
- var t = this._editor.getModel();
- return p.HoverProviderRegistry.has(t) ? _.getHover(t, new d.Position(this._range.startLineNumber, this._range.startColumn), e) : Promise.resolve([])
- }, e.prototype.computeSync = function () {
- var e = this;
- if (!this._editor.hasModel() || !this._range) return [];
- var t = this._editor.getModel(), n = this._range.startLineNumber;
- if (n > this._editor.getModel().getLineCount()) return [];
- var i = f.ColorDetector.get(this._editor), o = t.getLineMaxColumn(n),
- r = this._editor.getLineDecorations(n), s = !1, a = this._range, u = r.map((function (r) {
- var u = r.range.startLineNumber === n ? r.range.startColumn : 1,
- d = r.range.endLineNumber === n ? r.range.endColumn : o;
- if (u > a.startColumn || a.endColumn > d) return null;
- var h = new c.Range(a.startLineNumber, u, a.startLineNumber, d),
- p = e._markerDecorationsService.getMarker(t, r);
- if (p) return new A(h, p);
- var g = i.getColorData(r.range.getStartPosition());
- if (!s && g) {
- s = !0
- ;var f = g.colorInfo, m = f.color, v = f.range;
- return new P(v, m, g.provider)
- }
- return l.isEmptyMarkdownString(r.options.hoverMessage) ? null : {
- contents: r.options.hoverMessage ? w.asArray(r.options.hoverMessage) : [],
- range: h
- }
- }));
- return w.coalesce(u)
- }, e.prototype.onResult = function (e, t) {
- this._result = t ? e.concat(this._result.sort((function (e, t) {
- return e instanceof P ? -1 : t instanceof P ? 1 : 0
- }))) : this._result.concat(e)
- }, e.prototype.getResult = function () {
- return this._result.slice(0)
- }, e.prototype.getResultWithLoadingMessage = function () {
- return this._result.slice(0).concat([this._getLoadingMessage()])
- }, e.prototype._getLoadingMessage = function () {
- return {range: this._range, contents: [(new l.MarkdownString).appendText(n.localize(0, null))]}
- }, e
- }(), W = {type: 2, filter: {include: T.CodeActionKind.QuickFix}}, B = function (e) {
- function t(n, o, r, s, a, l) {
- void 0 === l && (l = N.NullOpenerService);
- var d = e.call(this, t.ID, n) || this;
- return d._themeService = r, d._keybindingService = s, d._modeService = a, d._openerService = l, d.renderDisposable = d._register(new u.MutableDisposable),
- d._messages = [], d._lastRange = null, d._computer = new F(d._editor, o), d._highlightDecorations = [], d._isChangingDecorations = !1, d._shouldFocus = !1, d._colorPicker = null, d._hoverOperation = new y.HoverOperation(d._computer, (function (e) {
- return d._withResult(e, !0)
- }), null, (function (e) {
- return d._withResult(e, !1)
- }), d._editor.getOption(44).delay), d._register(i.addStandardDisposableListener(d.getDomNode(), i.EventType.FOCUS, (function () {
- d._colorPicker && i.addClass(d.getDomNode(), "colorpicker-hover")
- }))), d._register(i.addStandardDisposableListener(d.getDomNode(), i.EventType.BLUR, (function () {
- i.removeClass(d.getDomNode(), "colorpicker-hover")
- }))), d._register(n.onDidChangeConfiguration((function (e) {
- d._hoverOperation.setHoverTime(d._editor.getOption(44).delay)
- }))), d._register(p.TokenizationRegistry.onDidChange((function (e) {
- d.isVisible && d._lastRange && d._messages.length > 0 && (d._domNode.textContent = "", d._renderMessages(d._lastRange, d._messages))
- }))), d
- }
- return r(t, e), t.prototype.dispose = function () {
- this._hoverOperation.cancel(),
- e.prototype.dispose.call(this)
- }, t.prototype.onModelDecorationsChanged = function () {
- this._isChangingDecorations || this.isVisible && (this._hoverOperation.cancel(), this._computer.clearResult(), this._colorPicker || this._hoverOperation.start(0))
- }, t.prototype.startShowingAt = function (e, t, n) {
- if (!this._lastRange || !this._lastRange.equalsRange(e)) {
- if (this._hoverOperation.cancel(), this.isVisible) if (this._showAtPosition && this._showAtPosition.lineNumber === e.startLineNumber) {
- for (var i = [], o = 0, r = this._messages.length; o < r; o++) {
- var s = this._messages[o], a = s.range;
- a && a.startColumn <= e.startColumn && a.endColumn >= e.endColumn && i.push(s)
- }
- if (i.length > 0) {
- if (function (e, t) {
- if (!e && t || e && !t || e.length !== t.length) return !1;
- for (var n = 0; n < e.length; n++) {
- var i = e[n], o = t[n];
- if (i instanceof A && o instanceof A) return E.IMarkerData.makeKey(i.marker) === E.IMarkerData.makeKey(o.marker);
- if (i instanceof P || o instanceof P) return !1;
- if (i instanceof A || o instanceof A) return !1;
- if (!l.markedStringsEquals(i.contents, o.contents)) return !1
- }
- return !0
- }(i, this._messages)) return
- ;
- this._renderMessages(e, i)
- } else this.hide()
- } else this.hide();
- this._lastRange = e, this._computer.setRange(e), this._shouldFocus = n, this._hoverOperation.start(t)
- }
- }, t.prototype.hide = function () {
- this._lastRange = null, this._hoverOperation.cancel(), e.prototype.hide.call(this), this._isChangingDecorations = !0, this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []), this._isChangingDecorations = !1, this.renderDisposable.clear(), this._colorPicker = null
- }, t.prototype.isColorPickerVisible = function () {
- return !!this._colorPicker
- }, t.prototype._withResult = function (e, t) {
- this._messages = e, this._lastRange && this._messages.length > 0 ? this._renderMessages(this._lastRange, this._messages) : t && this.hide()
- }, t.prototype._renderMessages = function (e, n) {
- var r = this;
- this.renderDisposable.dispose(), this._colorPicker = null;
- var h = 1073741824, p = n[0].range ? c.Range.lift(n[0].range) : null,
- f = document.createDocumentFragment(), _ = !0, y = !1, C = new u.DisposableStore, S = [];
- if (n.forEach((function (e) {
- if (e.range) if (h = Math.min(h, e.range.startColumn),
- p = p ? c.Range.plusRange(p, e.range) : c.Range.lift(e.range), e instanceof P) {
- y = !0;
- var t = e.color, n = t.red, d = t.green, w = t.blue, E = t.alpha,
- L = new s.RGBA(Math.round(255 * n), Math.round(255 * d), Math.round(255 * w), E),
- D = new s.Color(L);
- if (!r._editor.hasModel()) return;
- var N = r._editor.getModel(),
- x = new c.Range(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn),
- I = {range: e.range, color: e.color}, M = new m.ColorPickerModel(D, [], 0),
- k = new v.ColorPickerWidget(f, M, r._editor.getOption(105), r._themeService);
- g.getColorPresentations(N, I, e.provider, o.CancellationToken.None).then((function (t) {
- if (M.colorPresentations = t || [], r._editor.hasModel()) {
- var n = r._editor.getModel().getValueInRange(e.range);
- M.guessColorPresentation(D, n);
- var i = function () {
- var e, t;
- M.presentation.textEdit ? (e = [M.presentation.textEdit],
- t = (t = new c.Range(M.presentation.textEdit.range.startLineNumber, M.presentation.textEdit.range.startColumn, M.presentation.textEdit.range.endLineNumber, M.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber, t.startColumn + M.presentation.textEdit.text.length)) : (e = [{
- identifier: null,
- range: x,
- text: M.presentation.label,
- forceMoveMarkers: !1
- }], t = x.setEndPosition(x.endLineNumber, x.startColumn + M.presentation.label.length)), r._editor.pushUndoStop(), r._editor.executeEdits("colorpicker", e), M.presentation.additionalTextEdits && (e = a(M.presentation.additionalTextEdits), r._editor.executeEdits("colorpicker", e), r.hide()), r._editor.pushUndoStop(), x = t
- }, s = function (t) {
- return g.getColorPresentations(N, {
- range: x,
- color: {
- red: t.rgba.r / 255,
- green: t.rgba.g / 255,
- blue: t.rgba.b / 255,
- alpha: t.rgba.a
- }
- }, e.provider, o.CancellationToken.None).then((function (e) {
- M.colorPresentations = e || []
- }))
- }, l = M.onColorFlushed((function (e) {
- s(e).then(i)
- })), d = M.onDidChangeColor(s);
- r._colorPicker = k, r.showAt(x.getStartPosition(), x, r._shouldFocus),
- r.updateContents(f), r._colorPicker.layout(), r.renderDisposable.value = u.combinedDisposable(l, d, k, C)
- }
- }))
- } else e instanceof A ? (S.push(e), _ = !1) : e.contents.filter((function (e) {
- return !l.isEmptyMarkdownString(e)
- })).forEach((function (e) {
- var t = O("div.hover-row.markdown-hover"), n = i.append(t, O("div.hover-contents")),
- o = C.add(new b.MarkdownRenderer(r._editor, r._modeService, r._openerService));
- C.add(o.onDidRenderCodeBlock((function () {
- n.className = "hover-contents code-hover-contents", r.onContentsChange()
- })));
- var s = C.add(o.render(e));
- n.appendChild(s.element), f.appendChild(t), _ = !1
- }))
- })), S.length) {
- S.forEach((function (e) {
- return f.appendChild(r.renderMarkerHover(e))
- }));
- var w = 1 === S.length ? S[0] : S.sort((function (e, t) {
- return E.MarkerSeverity.compare(e.marker.severity, t.marker.severity)
- }))[0];
- f.appendChild(this.renderMarkerStatusbar(w))
- }
- y || _ || (this.showAt(new d.Position(e.startLineNumber, h), p, this._shouldFocus), this.updateContents(f)), this._isChangingDecorations = !0,
- this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, p ? [{
- range: p,
- options: t._DECORATION_OPTIONS
- }] : []), this._isChangingDecorations = !1
- }, t.prototype.renderMarkerHover = function (e) {
- var t = this, n = O("div.hover-row"), o = i.append(n, O("div.marker.hover-contents")), r = e.marker,
- s = r.source, a = r.message, l = r.code, u = r.relatedInformation;
- this._editor.applyFontInfo(o);
- var d = i.append(o, O("span"));
- if (d.style.whiteSpace = "pre-wrap", d.innerText = a, s || l) if ("string" == typeof l) (c = i.append(o, O("span"))).style.opacity = "0.6", c.style.paddingLeft = "6px", c.innerText = s && l ? s + "(" + l + ")" : s || "(" + l + ")"; else if (l) {
- var c, h = O("span");
- if (s) i.append(h, O("span")).innerText = s;
- this._codeLink = i.append(h, O("a.code-link")), this._codeLink.setAttribute("href", l.link.toString()), this._codeLink.onclick = function (e) {
- t._openerService.open(l.link), e.preventDefault(), e.stopPropagation()
- }, i.append(this._codeLink, O("span")).innerText = l.value, (c = i.append(o, h)).style.opacity = "0.6", c.style.paddingLeft = "6px"
- }
- if (w.isNonEmptyArray(u)) for (var p = function (e, n, r, s) {
- var a = i.append(o, O("div"));
- a.style.marginTop = "8px";
- var l = i.append(a, O("a"));
- l.innerText = L.basename(n) + "(" + r + ", " + s + "): ", l.style.cursor = "pointer", l.onclick = function (e) {
- e.stopPropagation(), e.preventDefault(), t._openerService && t._openerService.open(n.with({fragment: r + "," + s}), {fromUserGesture: !0}).catch(D.onUnexpectedError)
- };
- var u = i.append(a, O("span"));
- u.innerText = e, g._editor.applyFontInfo(u)
- }, g = this, f = 0, m = u; f < m.length; f++) {
- var v = m[f];
- p(v.message, v.resource, v.startLineNumber, v.startColumn)
- }
- return n
- }, t.prototype.renderMarkerStatusbar = function (e) {
- var t = this, o = O("div.hover-row.status-bar"), r = new u.DisposableStore,
- s = i.append(o, O("div.actions"));
- e.marker.severity !== E.MarkerSeverity.Error && e.marker.severity !== E.MarkerSeverity.Warning && e.marker.severity !== E.MarkerSeverity.Info || r.add(this.renderAction(s, {
- label: n.localize(1, null),
- commandId: x.NextMarkerAction.ID,
- run: function () {
- t.hide(), x.MarkerController.get(t._editor).show(e.marker), t._editor.focus()
- }
- }))
- ;var a = i.append(s, O("div"));
- a.style.opacity = "0", a.style.transition = "opacity 0.2s", setTimeout((function () {
- return a.style.opacity = "1"
- }), 200), a.textContent = n.localize(2, null), r.add(u.toDisposable((function () {
- return a.remove()
- })));
- var l = this.getCodeActions(e.marker);
- return r.add(u.toDisposable((function () {
- return l.cancel()
- }))), l.then((function (e) {
- if (a.style.transition = "", a.style.opacity = "1", !e.validActions.length) return e.dispose(), void (a.textContent = n.localize(3, null));
- a.remove();
- var o = !1;
- r.add(u.toDisposable((function () {
- o || e.dispose()
- }))), r.add(t.renderAction(s, {
- label: n.localize(4, null),
- commandId: k.QuickFixAction.Id,
- run: function (n) {
- o = !0;
- var r = k.QuickFixController.get(t._editor), s = i.getDomNodePagePosition(n);
- r.showCodeActions(W, e, {x: s.left + 6, y: s.top + s.height + 6})
- }
- }))
- })), this.renderDisposable.value = r, o
- }, t.prototype.getCodeActions = function (e) {
- var t = this;
- return I.createCancelablePromise((function (n) {
- return M.getCodeActions(t._editor.getModel(), new c.Range(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), W, n)
- }))
- }, t.prototype.renderAction = function (e, t) {
- var n = i.append(e, O("div.action-container")), o = i.append(n, O("a.action"));
- t.iconClass && i.append(o, O("span.icon." + t.iconClass));
- var r = i.append(o, O("span"));
- r.textContent = t.label;
- var s = this._keybindingService.lookupKeybinding(t.commandId);
- return s && (r.title = t.label + " (" + s.getLabel() + ")"), i.addDisposableListener(n, i.EventType.CLICK, (function (e) {
- e.stopPropagation(), e.preventDefault(), t.run(n)
- }))
- }, t.ID = "editor.contrib.modesContentHoverWidget", t._DECORATION_OPTIONS = h.ModelDecorationOptions.register({className: "hoverHighlight"}), t
- }(C.ContentHoverWidget);
- t.ModesContentHoverWidget = B, S.registerThemingParticipant((function (e, t) {
- var n = e.getColor(R.textLinkForeground);
- n && t.addRule(".monaco-editor-hover .hover-contents a.code-link span:hover { color: " + n + "; }")
- }))
- })),
- define(n[601], i([0, 1, 453, 36, 2, 12, 3, 23, 71, 600, 510, 51, 20, 14, 210, 34, 236, 315]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var C = function () {
- function e(e, t, n, i, r, s) {
- var a = this;
- this._editor = e, this._openerService = t, this._modeService = n, this._markerDecorationsService = i, this._keybindingService = r, this._themeService = s, this._toUnhook = new o.DisposableStore, this._contentWidget = new o.MutableDisposable, this._glyphWidget = new o.MutableDisposable, this._isMouseDown = !1, this._hoverClicked = !1, this._hookEvents(), this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((function (e) {
- e.hasChanged(44) && (a._hideWidgets(), a._unhookEvents(), a._hookEvents())
- }))
- }
- return Object.defineProperty(e.prototype, "contentWidget", {
- get: function () {
- return this._contentWidget.value || this._createHoverWidgets(), this._contentWidget.value
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "glyphWidget", {
- get: function () {
- return this._glyphWidget.value || this._createHoverWidgets(), this._glyphWidget.value
- }, enumerable: !0, configurable: !0
- }), e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype._hookEvents = function () {
- var e = this, t = function () {
- return e._hideWidgets()
- }, n = this._editor.getOption(44);
- this._isHoverEnabled = n.enabled, this._isHoverSticky = n.sticky, this._isHoverEnabled ? (this._toUnhook.add(this._editor.onMouseDown((function (t) {
- return e._onEditorMouseDown(t)
- }))), this._toUnhook.add(this._editor.onMouseUp((function (t) {
- return e._onEditorMouseUp(t)
- }))), this._toUnhook.add(this._editor.onMouseMove((function (t) {
- return e._onEditorMouseMove(t)
- }))), this._toUnhook.add(this._editor.onKeyDown((function (t) {
- return e._onKeyDown(t)
- }))), this._toUnhook.add(this._editor.onDidChangeModelDecorations((function () {
- return e._onModelDecorationsChanged()
- })))) : this._toUnhook.add(this._editor.onMouseMove(t)), this._toUnhook.add(this._editor.onMouseLeave(t)), this._toUnhook.add(this._editor.onDidChangeModel(t)),
- this._toUnhook.add(this._editor.onDidScrollChange((function (t) {
- return e._onEditorScrollChanged(t)
- })))
- }, e.prototype._unhookEvents = function () {
- this._toUnhook.clear()
- }, e.prototype._onModelDecorationsChanged = function () {
- this.contentWidget.onModelDecorationsChanged(), this.glyphWidget.onModelDecorationsChanged()
- }, e.prototype._onEditorScrollChanged = function (e) {
- (e.scrollTopChanged || e.scrollLeftChanged) && this._hideWidgets()
- }, e.prototype._onEditorMouseDown = function (e) {
- this._isMouseDown = !0;
- var t = e.target.type;
- 9 !== t || e.target.detail !== d.ModesContentHoverWidget.ID ? 12 === t && e.target.detail === c.ModesGlyphHoverWidget.ID || (12 !== t && e.target.detail !== c.ModesGlyphHoverWidget.ID && (this._hoverClicked = !1), this._hideWidgets()) : this._hoverClicked = !0
- }, e.prototype._onEditorMouseUp = function (e) {
- this._isMouseDown = !1
- }, e.prototype._onEditorMouseMove = function (e) {
- var t = e.target.type
- ;
- if (!(this._isMouseDown && this._hoverClicked && this.contentWidget.isColorPickerVisible() || this._isHoverSticky && 9 === t && e.target.detail === d.ModesContentHoverWidget.ID || this._isHoverSticky && 12 === t && e.target.detail === c.ModesGlyphHoverWidget.ID)) {
- if (7 === t) {
- var n = this._editor.getOption(34).typicalHalfwidthCharacterWidth / 2, i = e.target.detail;
- i && !i.isAfterLines && "number" == typeof i.horizontalDistanceToText && i.horizontalDistanceToText < n && (t = 6)
- }
- 6 === t ? (this.glyphWidget.hide(), this._isHoverEnabled && e.target.range && this.contentWidget.startShowingAt(e.target.range, 0, !1)) : 2 === t ? (this.contentWidget.hide(), this._isHoverEnabled && e.target.position && this.glyphWidget.startShowingAt(e.target.position.lineNumber)) : this._hideWidgets()
- }
- }, e.prototype._onKeyDown = function (e) {
- 5 !== e.keyCode && 6 !== e.keyCode && 57 !== e.keyCode && 4 !== e.keyCode && this._hideWidgets()
- }, e.prototype._hideWidgets = function () {
- !this._glyphWidget.value || !this._contentWidget.value || this._isMouseDown && this._hoverClicked && this._contentWidget.value.isColorPickerVisible() || (this._glyphWidget.value.hide(), this._contentWidget.value.hide())
- }, e.prototype._createHoverWidgets = function () {
- this._contentWidget.value = new d.ModesContentHoverWidget(this._editor, this._markerDecorationsService, this._themeService, this._keybindingService, this._modeService, this._openerService), this._glyphWidget.value = new c.ModesGlyphHoverWidget(this._editor, this._modeService, this._openerService)
- }, e.prototype.showContentHover = function (e, t, n) {
- this.contentWidget.startShowingAt(e, t, n)
- }, e.prototype.dispose = function () {
- this._unhookEvents(), this._toUnhook.dispose(), this._didChangeConfigurationHandler.dispose(), this._glyphWidget.dispose(), this._contentWidget.dispose()
- }, e.ID = "editor.contrib.hover", e = h([g(1, p.IOpenerService), g(2, u.IModeService), g(3, v.IMarkerDecorationsService), g(4, _.IKeybindingService), g(5, m.IThemeService)], e)
- }();
- t.ModesHoverController = C;
- var b = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.showHover",
- label: n.localize(0, null),
- alias: "Show Hover",
- precondition: void 0,
- kbOpts: {
- kbExpr: l.EditorContextKeys.editorTextFocus,
- primary: i.KeyChord(2089, 2087),
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- if (t.hasModel()) {
- var n = C.get(t);
- if (n) {
- var i = t.getPosition(), o = new a.Range(i.lineNumber, i.column, i.lineNumber, i.column),
- r = 2 === t.getOption(2);
- n.showContentHover(o, 1, r)
- }
- }
- }, t
- }(s.EditorAction), S = function (e) {
- function t() {
- return e.call(this, {
- id: "editor.action.showDefinitionPreviewHover",
- label: n.localize(1, null),
- alias: "Show Definition Preview Hover",
- precondition: void 0
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = C.get(t);
- if (n) {
- var i = t.getPosition();
- if (i) {
- var o = new a.Range(i.lineNumber, i.column, i.lineNumber, i.column),
- r = y.GotoDefinitionAtPositionEditorContribution.get(t).startFindDefinitionFromCursor(i);
- r ? r.then((function () {
- n.showContentHover(o, 1, !0)
- })) : n.showContentHover(o, 1, !0)
- }
- }
- }, t
- }(s.EditorAction);
- s.registerEditorContribution(C.ID, C),
- s.registerEditorAction(b), s.registerEditorAction(S), m.registerThemingParticipant((function (e, t) {
- var n = e.getColor(f.editorHoverHighlight);
- n && t.addRule(".monaco-editor .hoverHighlight { background-color: " + n + "; }");
- var i = e.getColor(f.editorHoverBackground);
- i && t.addRule(".monaco-editor .monaco-editor-hover { background-color: " + i + "; }");
- var o = e.getColor(f.editorHoverBorder);
- o && (t.addRule(".monaco-editor .monaco-editor-hover { border: 1px solid " + o + "; }"), t.addRule(".monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid " + o.transparent(.5) + "; }"), t.addRule(".monaco-editor .monaco-editor-hover hr { border-top: 1px solid " + o.transparent(.5) + "; }"), t.addRule(".monaco-editor .monaco-editor-hover hr { border-bottom: 0px solid " + o.transparent(.5) + "; }"));
- var r = e.getColor(f.textLinkForeground);
- r && t.addRule(".monaco-editor .monaco-editor-hover a { color: " + r + "; }");
- var s = e.getColor(f.editorHoverForeground);
- s && t.addRule(".monaco-editor .monaco-editor-hover { color: " + s + "; }")
- ;var a = e.getColor(f.editorHoverStatusBarBackground);
- a && t.addRule(".monaco-editor .monaco-editor-hover .hover-row .actions { background-color: " + a + "; }");
- var l = e.getColor(f.textCodeBlockBackground);
- l && t.addRule(".monaco-editor .monaco-editor-hover code { background-color: " + l + "; }")
- }))
- })), define(n[171], i([0, 1, 25, 39, 11, 38]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.IWorkspaceContextService = o.createDecorator("contextService"), function (e) {
- e.isIWorkspace = function (e) {
- return e && "object" == typeof e && "string" == typeof e.id && Array.isArray(e.folders)
- }
- }(t.IWorkspace || (t.IWorkspace = {})), function (e) {
- e.isIWorkspaceFolder = function (e) {
- return e && "object" == typeof e && n.URI.isUri(e.uri) && "string" == typeof e.name && "function" == typeof e.toResource
- }
- }(t.IWorkspaceFolder || (t.IWorkspaceFolder = {}));
- var s = function () {
- function e(e, t, n) {
- void 0 === t && (t = []), void 0 === n && (n = null), this._id = e, this._configuration = n, this._foldersMap = r.TernarySearchTree.forPaths(), this.folders = t
- }
- return Object.defineProperty(e.prototype, "folders", {
- get: function () {
- return this._folders
- }, set: function (e) {
- this._folders = e, this.updateFoldersMap()
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "id", {
- get: function () {
- return this._id
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "configuration", {
- get: function () {
- return this._configuration
- }, set: function (e) {
- this._configuration = e
- }, enumerable: !0, configurable: !0
- }), e.prototype.getFolder = function (e) {
- return e && this._foldersMap.findSubstr(e.with({
- scheme: e.scheme,
- authority: e.authority,
- path: e.path
- }).toString()) || null
- }, e.prototype.updateFoldersMap = function () {
- this._foldersMap = r.TernarySearchTree.forPaths();
- for (var e = 0, t = this.folders; e < t.length; e++) {
- var n = t[e];
- this._foldersMap.set(n.uri.toString(), n)
- }
- }, e.prototype.toJSON = function () {
- return {id: this.id, folders: this.folders, configuration: this.configuration}
- }, e
- }();
- t.Workspace = s;
- var a = function () {
- function e(e, t) {
- this.raw = t, this.uri = e.uri, this.index = e.index, this.name = e.name
- }
- return e.prototype.toResource = function (e) {
- return i.joinPath(this.uri, e)
- }, e.prototype.toJSON = function () {
- return {uri: this.uri, name: this.name, index: this.index}
- }, e
- }();
- t.WorkspaceFolder = a
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[172], i([0, 1, 5, 6, 56, 4, 36, 2, 16, 112, 25, 108, 163, 58, 13, 3, 17, 29, 43, 518, 502, 217, 86, 504, 505, 35, 171, 59]), (function (e, t, n, i, o, s, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var T = function () {
- function e(e) {
- this.model = e, this._onDispose = new s.Emitter
- }
- return Object.defineProperty(e.prototype, "textEditorModel", {
- get: function () {
- return this.model
- }, enumerable: !0, configurable: !0
- }), e.prototype.dispose = function () {
- this._onDispose.fire()
- }, e
- }();
- t.SimpleModel = T;
- var R = function () {
- function e(e) {
- this.modelService = e
- }
- return e.prototype.setEditor = function (e) {
- this.editor = e
- },
- e.prototype.createModelReference = function (e) {
- var t, n, i, o = this, r = null;
- return this.editor && (t = this.editor, n = function (t) {
- return o.findModel(t, e)
- }, i = function (t) {
- return o.findModel(t.getOriginalEditor(), e) || o.findModel(t.getModifiedEditor(), e)
- }, r = f.isCodeEditor(t) ? n(t) : i(t)), r ? Promise.resolve(new u.ImmortalReference(new T(r))) : Promise.reject(new Error("Model not found"))
- }, e.prototype.findModel = function (e, t) {
- var n = this.modelService ? this.modelService.getModel(t) : e.getModel();
- return n && n.uri.toString() !== t.toString() ? null : n
- }, e
- }();
- t.SimpleEditorModelResolverService = R;
- var O = function () {
- function e() {
- }
- return e.prototype.show = function () {
- return e.NULL_PROGRESS_RUNNER
- }, e.prototype.showWhile = function (e, t) {
- return Promise.resolve(void 0)
- }, e.NULL_PROGRESS_RUNNER = {
- done: function () {
- }, total: function () {
- }, worked: function () {
- }
- }, e
- }();
- t.SimpleEditorProgressService = O;
- var P = function () {
- };
- t.SimpleDialogService = P;
- var A = function () {
- function e() {
- }
- return e.prototype.info = function (e) {
- return this.notify({severity: c.default.Info, message: e})
- },
- e.prototype.warn = function (e) {
- return this.notify({severity: c.default.Warning, message: e})
- }, e.prototype.error = function (e) {
- return this.notify({severity: c.default.Error, message: e})
- }, e.prototype.notify = function (t) {
- switch (t.severity) {
- case c.default.Error:
- console.error(t.message);
- break;
- case c.default.Warning:
- console.warn(t.message);
- break;
- default:
- console.log(t.message)
- }
- return e.NO_OP
- }, e.prototype.status = function (e, t) {
- return u.Disposable.None
- }, e.NO_OP = new I.NoOpNotification, e
- }();
- t.SimpleNotificationService = A;
- var F = function () {
- function e(e) {
- this._onWillExecuteCommand = new s.Emitter, this._onDidExecuteCommand = new s.Emitter, this._instantiationService = e, this._dynamicCommands = Object.create(null)
- }
- return e.prototype.addCommand = function (e) {
- var t = this, n = e.id;
- return this._dynamicCommands[n] = e, u.toDisposable((function () {
- delete t._dynamicCommands[n]
- }))
- }, e.prototype.executeCommand = function (e) {
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- var i = b.CommandsRegistry.getCommand(e) || this._dynamicCommands[e]
- ;
- if (!i) return Promise.reject(new Error("command '" + e + "' not found"));
- try {
- this._onWillExecuteCommand.fire({commandId: e, args: t});
- var o = this._instantiationService.invokeFunction.apply(this._instantiationService, a([i.handler], t));
- return this._onDidExecuteCommand.fire({commandId: e, args: t}), Promise.resolve(o)
- } catch (e) {
- return Promise.reject(e)
- }
- }, e
- }();
- t.StandaloneCommandService = F;
- var W = function (e) {
- function t(t, n, r, s, a) {
- var l = e.call(this, t, n, r, s) || this;
- return l._cachedResolver = null, l._dynamicKeybindings = [], l._register(i.addDisposableListener(a, i.EventType.KEY_DOWN, (function (e) {
- var t = new o.StandardKeyboardEvent(e);
- l._dispatch(t, t.target) && (t.preventDefault(), t.stopPropagation())
- }))), l
- }
- return r(t, e), t.prototype.addDynamicKeybinding = function (e, t, n, i) {
- var o = this, r = l.createKeybinding(t, d.OS), s = new u.DisposableStore;
- r && (this._dynamicKeybindings.push({
- keybinding: r,
- command: e,
- when: i,
- weight1: 1e3,
- weight2: 0
- }), s.add(u.toDisposable((function () {
- for (var t = 0; t < o._dynamicKeybindings.length; t++) {
- if (o._dynamicKeybindings[t].command === e) return o._dynamicKeybindings.splice(t, 1), void o.updateResolver({source: 1})
- }
- }))));
- var a = this._commandService;
- if (!(a instanceof F)) throw new Error("Unknown command service!");
- return s.add(a.addCommand({id: e, handler: n})), this.updateResolver({source: 1}), s
- }, t.prototype.updateResolver = function (e) {
- this._cachedResolver = null, this._onDidUpdateKeybindings.fire(e)
- }, t.prototype._getResolver = function () {
- if (!this._cachedResolver) {
- var e = this._toNormalizedKeybindingItems(D.KeybindingsRegistry.getDefaultKeybindings(), !0),
- t = this._toNormalizedKeybindingItems(this._dynamicKeybindings, !1);
- this._cachedResolver = new L.KeybindingResolver(e, t)
- }
- return this._cachedResolver
- }, t.prototype._documentHasFocus = function () {
- return document.hasFocus()
- }, t.prototype._toNormalizedKeybindingItems = function (e, t) {
- for (var n = [], i = 0, o = 0, r = e; o < r.length; o++) {
- var s = r[o], a = s.when || void 0, l = s.keybinding;
- if (l) for (var u = 0, d = this.resolveKeybinding(l); u < d.length; u++) {
- var c = d[u]
- ;n[i++] = new N.ResolvedKeybindingItem(c, s.command, s.commandArgs, a, t)
- } else n[i++] = new N.ResolvedKeybindingItem(void 0, s.command, s.commandArgs, a, t)
- }
- return n
- }, t.prototype.resolveKeybinding = function (e) {
- return [new x.USLayoutResolvedKeybinding(e, d.OS)]
- }, t.prototype.resolveKeyboardEvent = function (e) {
- var t = new l.SimpleKeybinding(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, e.keyCode).toChord();
- return new x.USLayoutResolvedKeybinding(t, d.OS)
- }, t
- }(E.AbstractKeybindingService);
- function B(e) {
- return e && "object" == typeof e && (!e.overrideIdentifier || "string" == typeof e.overrideIdentifier) && (!e.resource || e.resource instanceof p.URI)
- }
- t.StandaloneKeybindingService = W;
- var V = function () {
- function e() {
- this._onDidChangeConfiguration = new s.Emitter, this.onDidChangeConfiguration = this._onDidChangeConfiguration.event, this._configuration = new w.Configuration(new w.DefaultConfigurationModel, new w.ConfigurationModel)
- }
- return e.prototype.configuration = function () {
- return this._configuration
- }, e.prototype.getValue = function (e, t) {
- var n = "string" == typeof e ? e : void 0, i = B(e) ? e : B(t) ? t : {};
- return this.configuration().getValue(n, i, void 0)
- }, e.prototype.updateValue = function (e, t, n, i) {
- return this.configuration().updateValue(e, t), Promise.resolve()
- }, e.prototype.inspect = function (e, t) {
- return void 0 === t && (t = {}), this.configuration().inspect(e, t, void 0)
- }, e
- }();
- t.SimpleConfigurationService = V;
- var z = function () {
- function e(e) {
- var t = this;
- this.configurationService = e, this._onDidChangeConfiguration = new s.Emitter, this.configurationService.onDidChangeConfiguration((function (e) {
- t._onDidChangeConfiguration.fire({
- affectedKeys: e.affectedKeys,
- affectsConfiguration: function (t, n) {
- return e.affectsConfiguration(n)
- }
- })
- }))
- }
- return e.prototype.getValue = function (e, t, n) {
- var i = (_.Position.isIPosition(t) ? t : null) ? "string" == typeof n ? n : void 0 : "string" == typeof t ? t : void 0;
- return void 0 === i ? this.configurationService.getValue() : this.configurationService.getValue(i)
- }, e
- }();
- t.SimpleResourceConfigurationService = z;
- var H = function () {
- function e(e) {
- this.configurationService = e
- }
- return e.prototype.getEOL = function (e, t) {
- var n = this.configurationService.getValue("files.eol", {overrideIdentifier: t, resource: e});
- return n && "auto" !== n ? n : d.isLinux || d.isMacintosh ? "\n" : "\r\n"
- }, e = h([g(0, S.IConfigurationService)], e)
- }();
- t.SimpleResourcePropertiesService = H;
- var K = function () {
- function e() {
- }
- return e.prototype.publicLog = function (e, t) {
- return Promise.resolve(void 0)
- }, e.prototype.publicLog2 = function (e, t) {
- return this.publicLog(e, t)
- }, e
- }();
- t.StandaloneTelemetryService = K;
- var U = function () {
- function e() {
- var t = p.URI.from({scheme: e.SCHEME, authority: "model", path: "/"});
- this.workspace = {
- id: "4064f6ec-cb38-4ad0-af64-ee6467e63c82",
- folders: [new M.WorkspaceFolder({uri: t, name: "", index: 0})]
- }
- }
- return e.prototype.getWorkspace = function () {
- return this.workspace
- }, e.prototype.getWorkspaceFolder = function (t) {
- return t && t.scheme === e.SCHEME ? this.workspace.folders[0] : null
- }, e.SCHEME = "inmemory", e
- }();
- t.SimpleWorkspaceContextService = U, t.applyConfigurationValues = function (e, t, n) {
- t && e instanceof V && Object.keys(t).forEach((function (i) {
- m.isEditorConfigurationKey(i) && e.updateValue("editor." + i, t[i]), n && m.isDiffEditorConfigurationKey(i) && e.updateValue("diffEditor." + i, t[i])
- }))
- };
- var j = function () {
- function e(e) {
- this._modelService = e
- }
- return e.prototype.hasPreviewHandler = function () {
- return !1
- }, e.prototype.apply = function (e, t) {
- var i = new Map;
- if (e.edits) for (var o = 0, r = e.edits; o < r.length; o++) {
- var s = r[o];
- if (!C.WorkspaceTextEdit.is(s)) return Promise.reject(new Error("bad edit - only text edits are supported"));
- var a = this._modelService.getModel(s.resource);
- if (!a) return Promise.reject(new Error("bad edit - model not found"));
- var l = i.get(a);
- l || (l = [], i.set(a, l)), l.push(s.edit)
- }
- var u = 0, d = 0;
- return i.forEach((function (e, t) {
- t.pushStackElement(), t.pushEditOperations([], e.map((function (e) {
- return v.EditOperation.replaceMove(y.Range.lift(e.range), e.text)
- })), (function () {
- return []
- })), t.pushStackElement(), d += 1, u += e.length
- })), Promise.resolve({
- selection: void 0,
- ariaSummary: n.format(k.SimpleServicesNLS.bulkEditServiceSummary, u, d)
- })
- }, e
- }();
- t.SimpleBulkEditService = j
- ;var q = function () {
- function e() {
- }
- return e.prototype.getUriLabel = function (e, t) {
- return "file" === e.scheme ? e.fsPath : e.path
- }, e
- }();
- t.SimpleUriLabelService = q;
- var G = function () {
- function e(e) {
- this._container = e, this.onLayout = s.Event.None
- }
- return Object.defineProperty(e.prototype, "container", {
- get: function () {
- return this._container
- }, enumerable: !0, configurable: !0
- }), e
- }();
- t.SimpleLayoutService = G
- }));
- a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[602], i([0, 1, 24, 50, 2, 32, 121, 230, 190, 62, 172, 94, 65, 29, 43, 18, 66, 11, 34, 35, 14, 64, 59, 162, 73]), (function (e, t, n, i, o, s, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var I = 0, M = !1;
- var k = function (e) {
- function t(t, o, r, s, a, l, u, d, c, h) {
- var g = this;
- return (o = o || {}).ariaLabel = o.ariaLabel || D.StandaloneCodeEditorNLS.editorViewAccessibleLabel,
- o.ariaLabel = o.ariaLabel + ";" + (n.isIE ? D.StandaloneCodeEditorNLS.accessibilityHelpMessageIE : D.StandaloneCodeEditorNLS.accessibilityHelpMessage), g = e.call(this, t, o, {}, r, s, a, l, d, c, h) || this, u instanceof p.StandaloneKeybindingService ? g._standaloneKeybindingService = u : g._standaloneKeybindingService = null, M || (M = !0, i.setARIAContainer(document.body)), g
- }
- return r(t, e), t.prototype.addCommand = function (e, t, n) {
- if (!this._standaloneKeybindingService) return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"), null;
- var i = "DYNAMIC_" + ++I, o = y.ContextKeyExpr.deserialize(n);
- return this._standaloneKeybindingService.addDynamicKeybinding(i, e, t, o), i
- }, t.prototype.createContextKey = function (e, t) {
- return this._contextKeyService.createKey(e, t)
- }, t.prototype.addAction = function (e) {
- var t = this;
- if ("string" != typeof e.id || "string" != typeof e.label || "function" != typeof e.run) throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!")
- ;
- if (!this._standaloneKeybindingService) return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"), o.Disposable.None;
- var n = e.id, i = e.label,
- r = y.ContextKeyExpr.and(y.ContextKeyExpr.equals("editorId", this.getId()), y.ContextKeyExpr.deserialize(e.precondition)),
- s = e.keybindings, l = y.ContextKeyExpr.and(r, y.ContextKeyExpr.deserialize(e.keybindingContext)),
- u = e.contextMenuGroupId || null, c = e.contextMenuOrder || 0, h = function (n) {
- for (var i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];
- return Promise.resolve(e.run.apply(e, a([t], i)))
- }, p = new o.DisposableStore, g = this.getId() + ":" + n;
- if (p.add(v.CommandsRegistry.registerCommand(g, h)), u) {
- var f = {command: {id: g, title: i}, when: r, group: u, order: c};
- p.add(m.MenuRegistry.appendMenuItem(7, f))
- }
- if (Array.isArray(s)) for (var _ = 0, C = s; _ < C.length; _++) {
- var b = C[_];
- p.add(this._standaloneKeybindingService.addDynamicKeybinding(g, b, h, l))
- }
- var S = new d.InternalEditorAction(g, i, i, r, h, this._contextKeyService);
- return this._actions[n] = S,
- p.add(o.toDisposable((function () {
- delete t._actions[n]
- }))), p
- }, t = h([g(2, b.IInstantiationService), g(3, s.ICodeEditorService), g(4, v.ICommandService), g(5, y.IContextKeyService), g(6, S.IKeybindingService), g(7, E.IThemeService), g(8, w.INotificationService), g(9, L.IAccessibilityService)], t)
- }(l.CodeEditorWidget);
- t.StandaloneCodeEditor = k;
- var T = function (e) {
- function t(t, n, i, o, r, s, a, l, u, d, c, h, g) {
- var f = this;
- p.applyConfigurationValues(h, n, !1);
- var m = d.registerEditorContainer(t);
- "string" == typeof (n = n || {}).theme && d.setTheme(n.theme);
- var v, _ = n.model;
- if (delete n.model, (f = e.call(this, t, n, o, r, s, a, l, d, c, g) || this)._contextViewService = u, f._configurationService = h, f._register(i), f._register(m), void 0 === _ ? (v = self.monaco.editor.createModel(n.value || "", n.language || "text/plain"), f._ownsModel = !0) : (v = _, f._ownsModel = !1), f._attachModel(v), v) {
- var y = {oldModelUrl: null, newModelUrl: v.uri};
- f._onDidChangeModel.fire(y)
- }
- return f
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.updateOptions = function (t) {
- p.applyConfigurationValues(this._configurationService, t, !1), e.prototype.updateOptions.call(this, t)
- }, t.prototype._attachModel = function (t) {
- e.prototype._attachModel.call(this, t), this._modelData && this._contextViewService.setContainer(this._modelData.view.domNode.domNode)
- }, t.prototype._postDetachModelCleanup = function (t) {
- e.prototype._postDetachModelCleanup.call(this, t), t && this._ownsModel && (t.dispose(), this._ownsModel = !1)
- }, t = h([g(3, b.IInstantiationService), g(4, s.ICodeEditorService), g(5, v.ICommandService), g(6, y.IContextKeyService), g(7, S.IKeybindingService), g(8, C.IContextViewService), g(9, f.IStandaloneThemeService), g(10, w.INotificationService), g(11, _.IConfigurationService), g(12, L.IAccessibilityService)], t)
- }(k);
- t.StandaloneEditor = T;
- var R = function (e) {
- function t(t, n, i, o, r, s, a, l, u, d, c, h, g, f, m) {
- var v = this;
- p.applyConfigurationValues(h, n, !0);
- var _ = d.registerEditorContainer(t);
- return "string" == typeof (n = n || {}).theme && (n.theme = d.setTheme(n.theme)), (v = e.call(this, t, n, m, l, r, o, u, d, c, g, f) || this)._contextViewService = a,
- v._configurationService = h, v._register(i), v._register(_), v._contextViewService.setContainer(v._containerDomElement), v
- }
- return r(t, e), t.prototype.dispose = function () {
- e.prototype.dispose.call(this)
- }, t.prototype.updateOptions = function (t) {
- p.applyConfigurationValues(this._configurationService, t, !0), e.prototype.updateOptions.call(this, t)
- }, t.prototype._createInnerEditor = function (e, t, n) {
- return e.createInstance(k, t, n)
- }, t.prototype.getOriginalEditor = function () {
- return e.prototype.getOriginalEditor.call(this)
- }, t.prototype.getModifiedEditor = function () {
- return e.prototype.getModifiedEditor.call(this)
- }, t.prototype.addCommand = function (e, t, n) {
- return this.getModifiedEditor().addCommand(e, t, n)
- }, t.prototype.createContextKey = function (e, t) {
- return this.getModifiedEditor().createContextKey(e, t)
- }, t.prototype.addAction = function (e) {
- return this.getModifiedEditor().addAction(e)
- },
- t = h([g(3, b.IInstantiationService), g(4, y.IContextKeyService), g(5, S.IKeybindingService), g(6, C.IContextViewService), g(7, c.IEditorWorkerService), g(8, s.ICodeEditorService), g(9, f.IStandaloneThemeService), g(10, w.INotificationService), g(11, _.IConfigurationService), g(12, C.IContextMenuService), g(13, x.IEditorProgressService), g(14, b.optional(N.IClipboardService))], t)
- }(u.DiffEditorWidget);
- t.StandaloneDiffEditor = R
- })), define(n[238], i([0, 1, 2, 156, 32, 62, 219, 71, 516, 49, 556, 114, 172, 592, 594, 94, 65, 29, 43, 519, 18, 595, 66, 506, 500, 11, 501, 115, 34, 116, 170, 95, 508, 72, 35, 73, 74, 96, 14, 171, 499, 210, 565, 64, 218, 83, 517]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W, B, V, z, H, K, U, j, q, G) {
- "use strict";
- var Y;
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- var t = new x.ServiceCollection, n = function () {
- function e(e, t) {
- this._serviceId = e, this._factory = t, this._value = null
- }
- return Object.defineProperty(e.prototype, "id", {
- get: function () {
- return this._serviceId
- }, enumerable: !0, configurable: !0
- }),
- e.prototype.get = function (e) {
- if (!this._value) {
- if (e && (this._value = e[this._serviceId.toString()]), this._value || (this._value = this._factory(e)), !this._value) throw new Error("Service " + this._serviceId + " is missing!");
- t.set(this._serviceId, this._value)
- }
- return this._value
- }, e
- }();
- e.LazyStaticService = n;
- var i = [];
- function r(e, t) {
- var o = new n(e, t);
- return i.push(o), o
- }
- e.init = function (e) {
- for (var t = new x.ServiceCollection, n = 0, o = q.getSingletonServiceDescriptors(); n < o.length; n++) {
- var r = o[n], s = r[0], a = r[1];
- t.set(s, a)
- }
- for (var l in e) e.hasOwnProperty(l) && t.set(D.createDecorator(l), e[l]);
- i.forEach((function (n) {
- return t.set(n.id, n.get(e))
- }));
- var u = new N.InstantiationService(t, !0);
- return t.set(D.IInstantiationService, u), [t, u]
- }, e.instantiationService = r(D.IInstantiationService, (function () {
- return new N.InstantiationService(t, !0)
- }));
- var v = new p.SimpleConfigurationService;
- e.configurationService = r(y.IConfigurationService, (function () {
- return v
- })), e.resourceConfigurationService = r(h.ITextResourceConfigurationService, (function () {
- return new p.SimpleResourceConfigurationService(v)
- })), e.resourcePropertiesService = r(h.ITextResourcePropertiesService, (function () {
- return new p.SimpleResourcePropertiesService(v)
- })), e.contextService = r(V.IWorkspaceContextService, (function () {
- return new p.SimpleWorkspaceContextService
- })), e.labelService = r(M.ILabelService, (function () {
- return new p.SimpleUriLabelService
- })), e.telemetryService = r(W.ITelemetryService, (function () {
- return new p.StandaloneTelemetryService
- })), e.dialogService = r(L.IDialogService, (function () {
- return new p.SimpleDialogService
- })), e.notificationService = r(P.INotificationService, (function () {
- return new p.SimpleNotificationService
- })), e.markerService = r(O.IMarkerService, (function () {
- return new R.MarkerService
- })), e.modeService = r(l.IModeService, (function (e) {
- return new u.ModeServiceImpl
- })), e.standaloneThemeService = r(m.IStandaloneThemeService, (function () {
- return new f.StandaloneThemeServiceImpl
- })), e.logService = r(T.ILogService, (function () {
- return new T.NullLogService
- })),
- e.modelService = r(d.IModelService, (function (t) {
- return new c.ModelServiceImpl(e.configurationService.get(t), e.resourcePropertiesService.get(t), e.standaloneThemeService.get(t), e.logService.get(t))
- })), e.markerDecorationsService = r(H.IMarkerDecorationsService, (function (t) {
- return new K.MarkerDecorationsService(e.modelService.get(t), e.markerService.get(t))
- })), e.codeEditorService = r(o.ICodeEditorService, (function (t) {
- return new g.StandaloneCodeEditorServiceImpl(e.standaloneThemeService.get(t))
- })), e.editorProgressService = r(A.IEditorProgressService, (function () {
- return new p.SimpleEditorProgressService
- })), e.storageService = r(F.IStorageService, (function () {
- return new F.InMemoryStorageService
- })), e.editorWorkerService = r(s.IEditorWorkerService, (function (t) {
- return new a.EditorWorkerServiceImpl(e.modelService.get(t), e.resourceConfigurationService.get(t), e.logService.get(t))
- }))
- }(Y = t.StaticServices || (t.StaticServices = {}));
- var Z = function (e) {
- function t(t, n) {
- var o = e.call(this) || this, r = Y.init(n), s = r[0], a = r[1];
- o._serviceCollection = s,
- o._instantiationService = a;
- var l = o.get(y.IConfigurationService), u = o.get(P.INotificationService),
- c = o.get(W.ITelemetryService), h = o.get(B.IThemeService), g = function (e, t) {
- var i = null;
- return n && (i = n[e.toString()]), i || (i = t()), o._serviceCollection.set(e, i), i
- }, f = g(b.IContextKeyService, (function () {
- return o._register(new C.ContextKeyService(l))
- }));
- g(U.IAccessibilityService, (function () {
- return new G.AccessibilityService(f, l)
- })), g(k.IListService, (function () {
- return new k.ListService(h)
- }));
- var m = g(_.ICommandService, (function () {
- return new p.StandaloneCommandService(o._instantiationService)
- })), L = g(I.IKeybindingService, (function () {
- return o._register(new p.StandaloneKeybindingService(f, m, c, u, t))
- })), D = g(j.ILayoutService, (function () {
- return new p.SimpleLayoutService(t)
- })), N = g(w.IContextViewService, (function () {
- return o._register(new E.ContextViewService(D))
- }));
- return g(w.IContextMenuService, (function () {
- var e = new S.ContextMenuService(c, u, N, L, h);
- return e.configure({blockMouse: !1}), o._register(e)
- })), g(v.IMenuService, (function () {
- return new z.MenuService(m)
- })), g(i.IBulkEditService, (function () {
- return new p.SimpleBulkEditService(Y.modelService.get(d.IModelService))
- })), o
- }
- return r(t, e), t.prototype.get = function (e) {
- var t = this._serviceCollection.get(e);
- if (!t) throw new Error("Missing service " + e);
- return t
- }, t.prototype.set = function (e, t) {
- this._serviceCollection.set(e, t)
- }, t.prototype.has = function (e) {
- return this._serviceCollection.has(e)
- }, t
- }(n.Disposable);
- t.DynamicStandaloneServices = Z
- })), define(n[603], i([0, 1, 32, 509, 188, 33, 142, 68, 48, 17, 63, 62, 84, 507, 147, 494, 172, 602, 238, 94, 29, 43, 18, 66, 11, 34, 35, 51, 64, 60, 73, 331]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M) {
- "use strict";
- function k(e, t, o) {
- var r = new _.DynamicStandaloneServices(e, t), s = null;
- r.has(h.ITextModelService) || (s = new m.SimpleEditorModelResolverService(_.StaticServices.modelService.get()), r.set(h.ITextModelService, s)), r.has(N.IOpenerService) || r.set(N.IOpenerService, new i.OpenerService(r.get(n.ICodeEditorService), r.get(C.ICommandService)));
- var a = o(r)
- ;
- return s && s.setEditor(a), a
- }
- function T(e, t, i) {
- return k(e, i || {}, (function (i) {
- return new v.StandaloneEditor(e, t, i, i.get(E.IInstantiationService), i.get(n.ICodeEditorService), i.get(C.ICommandService), i.get(S.IContextKeyService), i.get(L.IKeybindingService), i.get(w.IContextViewService), i.get(y.IStandaloneThemeService), i.get(D.INotificationService), i.get(b.IConfigurationService), i.get(x.IAccessibilityService))
- }))
- }
- function R(e) {
- return _.StaticServices.codeEditorService.get().onCodeEditorAdd((function (t) {
- e(t)
- }))
- }
- function O(e, t, i) {
- return k(e, i || {}, (function (i) {
- return new v.StandaloneDiffEditor(e, t, i, i.get(E.IInstantiationService), i.get(S.IContextKeyService), i.get(L.IKeybindingService), i.get(w.IContextViewService), i.get(c.IEditorWorkerService), i.get(n.ICodeEditorService), i.get(y.IStandaloneThemeService), i.get(D.INotificationService), i.get(b.IConfigurationService), i.get(w.IContextMenuService), i.get(M.IEditorProgressService), null)
- }))
- }
- function P(e, t) {
- return new o.DiffNavigator(e, t)
- }
- function A(e, t, n) {
- return _.StaticServices.modelService.get().createModel(e, t, n)
- }
- function F(e, t, n) {
- if (e = e || "", !t) {
- var i = e.indexOf("\n"), o = e;
- return -1 !== i && (o = e.substring(0, i)), A(e, _.StaticServices.modeService.get().createByFilepathOrFirstLine(n || null, o), n)
- }
- return A(e, _.StaticServices.modeService.get().create(t), n)
- }
- function W(e, t) {
- _.StaticServices.modelService.get().setMode(e, _.StaticServices.modeService.get().create(t))
- }
- function B(e, t, n) {
- e && _.StaticServices.markerService.get().changeOne(t, e.uri, n)
- }
- function V(e) {
- return _.StaticServices.markerService.get().read(e)
- }
- function z(e) {
- return _.StaticServices.modelService.get().getModel(e)
- }
- function H() {
- return _.StaticServices.modelService.get().getModels()
- }
- function K(e) {
- return _.StaticServices.modelService.get().onModelAdded(e)
- }
- function U(e) {
- return _.StaticServices.modelService.get().onModelRemoved(e)
- }
- function j(e) {
- return _.StaticServices.modelService.get().onModelModeChanged((function (t) {
- e({model: t.model, oldLanguage: t.oldModeId})
- }))
- }
- function q(e) {
- return p.createWebWorker(_.StaticServices.modelService.get(), e)
- }
- function G(e, t) {
- return f.Colorizer.colorizeElement(_.StaticServices.standaloneThemeService.get(), _.StaticServices.modeService.get(), e, t)
- }
- function Y(e, t, n) {
- return f.Colorizer.colorize(_.StaticServices.modeService.get(), e, t, n)
- }
- function Z(e, t, n) {
- return void 0 === n && (n = 4), f.Colorizer.colorizeModelLine(e, t, n)
- }
- function $(e, t) {
- _.StaticServices.modeService.get().triggerMode(t);
- for (var n = function (e) {
- var t = u.TokenizationRegistry.get(e);
- return t || {
- getInitialState: function () {
- return d.NULL_STATE
- }, tokenize: function (t, n, i) {
- return d.nullTokenize(e, t, n, i)
- }
- }
- }(t), i = e.split(/\r\n|\r|\n/), o = [], r = n.getInitialState(), s = 0, a = i.length; s < a; s++) {
- var l = i[s], c = n.tokenize(l, r, 0);
- o[s] = c.tokens, r = c.endState
- }
- return o
- }
- function X(e, t) {
- _.StaticServices.standaloneThemeService.get().defineTheme(e, t)
- }
- function Q(e) {
- _.StaticServices.standaloneThemeService.get().setTheme(e)
- }
- function J() {
- I.clearAllFontInfos()
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.create = T, t.onDidCreateEditor = R,
- t.createDiffEditor = O, t.createDiffNavigator = P, t.createModel = F, t.setModelLanguage = W, t.setModelMarkers = B, t.getModelMarkers = V, t.getModel = z, t.getModels = H, t.onDidCreateModel = K, t.onWillDisposeModel = U, t.onDidChangeModelLanguage = j, t.createWebWorker = q, t.colorizeElement = G, t.colorize = Y, t.colorizeModelLine = Z, t.tokenize = $, t.defineTheme = X, t.setTheme = Q, t.remeasureFonts = J, t.createMonacoEditorAPI = function () {
- return {
- create: T,
- onDidCreateEditor: R,
- createDiffEditor: O,
- createDiffNavigator: P,
- createModel: F,
- setModelLanguage: W,
- setModelMarkers: B,
- getModelMarkers: V,
- getModels: H,
- getModel: z,
- onDidCreateModel: K,
- onWillDisposeModel: U,
- onDidChangeModelLanguage: j,
- createWebWorker: q,
- colorizeElement: G,
- colorize: Y,
- colorizeModelLine: Z,
- tokenize: $,
- defineTheme: X,
- setTheme: Q,
- remeasureFonts: J,
- AccessibilitySupport: g.AccessibilitySupport,
- ContentWidgetPositionPreference: g.ContentWidgetPositionPreference,
- CursorChangeReason: g.CursorChangeReason,
- DefaultEndOfLine: g.DefaultEndOfLine,
- EditorAutoIndentStrategy: g.EditorAutoIndentStrategy,
- EditorOption: g.EditorOption,
- EndOfLinePreference: g.EndOfLinePreference,
- EndOfLineSequence: g.EndOfLineSequence,
- MinimapPosition: g.MinimapPosition,
- MouseTargetType: g.MouseTargetType,
- OverlayWidgetPositionPreference: g.OverlayWidgetPositionPreference,
- OverviewRulerLane: g.OverviewRulerLane,
- RenderLineNumbersType: g.RenderLineNumbersType,
- RenderMinimap: g.RenderMinimap,
- ScrollbarVisibility: g.ScrollbarVisibility,
- ScrollType: g.ScrollType,
- TextEditorCursorBlinkingStyle: g.TextEditorCursorBlinkingStyle,
- TextEditorCursorStyle: g.TextEditorCursorStyle,
- TrackedRangeStickiness: g.TrackedRangeStickiness,
- WrappingIndent: g.WrappingIndent,
- ConfigurationChangedEvent: r.ConfigurationChangedEvent,
- BareFontInfo: s.BareFontInfo,
- FontInfo: s.FontInfo,
- TextModelResolvedOptions: l.TextModelResolvedOptions,
- FindMatch: l.FindMatch,
- EditorType: a.EditorType,
- EditorOptions: r.EditorOptions
- }
- }
- })), define(n[604], i([0, 1, 3, 107, 17, 41, 118, 147, 238, 393, 216]), (function (e, t, n, i, o, r, s, a, l, u, d) {
- "use strict";
- function c(e) {
- s.ModesRegistry.registerLanguage(e)
- }
- function h() {
- var e = []
- ;
- return e = e.concat(s.ModesRegistry.getLanguages())
- }
- function p(e) {
- var t = l.StaticServices.modeService.get().getLanguageIdentifier(e);
- return t ? t.id : 0
- }
- function g(e, t) {
- var n = l.StaticServices.modeService.get().onDidCreateMode((function (i) {
- i.getId() === e && (n.dispose(), t())
- }));
- return n
- }
- function f(e, t) {
- var n = l.StaticServices.modeService.get().getLanguageIdentifier(e);
- if (!n) throw new Error("Cannot set configuration for unknown language " + e);
- return r.LanguageConfigurationRegistry.register(n, t)
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.register = c, t.getLanguages = h, t.getEncodedLanguageId = p, t.onLanguage = g, t.setLanguageConfiguration = f;
- var m = function () {
- function e(e) {
- this._actual = e
- }
- return e.prototype.getInitialState = function () {
- return this._actual.getInitialState()
- }, e.prototype.tokenize = function (e, t, n) {
- throw new Error("Not supported!")
- }, e.prototype.tokenize2 = function (e, t) {
- var n = this._actual.tokenizeEncoded(e, t);
- return new i.TokenizationResult2(n.tokens, n.endState)
- }, e
- }();
- t.EncodedTokenizationSupport2Adapter = m
- ;var v = function () {
- function e(e, t, n) {
- this._standaloneThemeService = e, this._languageIdentifier = t, this._actual = n
- }
- return e.prototype.getInitialState = function () {
- return this._actual.getInitialState()
- }, e.prototype._toClassicTokens = function (e, t, n) {
- for (var o = [], r = 0, s = 0, a = e.length; s < a; s++) {
- var l = e[s], u = l.startIndex;
- 0 === s ? u = 0 : u < r && (u = r), o[s] = new i.Token(u + n, l.scopes, t), r = u
- }
- return o
- }, e.prototype.tokenize = function (e, t, n) {
- var o, r = this._actual.tokenize(e, t),
- s = this._toClassicTokens(r.tokens, this._languageIdentifier.language, n);
- return o = r.endState.equals(t) ? t : r.endState, new i.TokenizationResult(s, o)
- }, e.prototype._toBinaryTokens = function (e, t) {
- for (var n = this._languageIdentifier.id, i = this._standaloneThemeService.getTheme().tokenTheme, o = [], r = 0, s = 0, a = 0, l = e.length; a < l; a++) {
- var u = e[a], d = i.match(n, u.scopes);
- if (!(r > 0 && o[r - 1] === d)) {
- var c = u.startIndex;
- 0 === a ? c = 0 : c < s && (c = s), o[r++] = c + t, o[r++] = d, s = c
- }
- }
- var h = new Uint32Array(r);
- for (a = 0; a < r; a++) h[a] = o[a];
- return h
- }, e.prototype.tokenize2 = function (e, t, n) {
- var o, r = this._actual.tokenize(e, t), s = this._toBinaryTokens(r.tokens, n);
- return o = r.endState.equals(t) ? t : r.endState, new i.TokenizationResult2(s, o)
- }, e
- }();
- function _(e) {
- return e && "function" == typeof e.then
- }
- function y(e, t) {
- var n = l.StaticServices.modeService.get().getLanguageIdentifier(e);
- if (!n) throw new Error("Cannot set tokens provider for unknown language " + e);
- var i = function (e) {
- return function (e) {
- return "tokenizeEncoded" in e
- }(e) ? new m(e) : new v(l.StaticServices.standaloneThemeService.get(), n, e)
- };
- return _(t) ? o.TokenizationRegistry.registerPromise(e, t.then((function (e) {
- return i(e)
- }))) : o.TokenizationRegistry.register(e, i(t))
- }
- function C(e, t) {
- var n = function (t) {
- return d.createTokenizationSupport(l.StaticServices.modeService.get(), l.StaticServices.standaloneThemeService.get(), e, u.compile(e, t))
- };
- return _(t) ? o.TokenizationRegistry.registerPromise(e, t.then((function (e) {
- return n(e)
- }))) : o.TokenizationRegistry.register(e, n(t))
- }
- function b(e, t) {
- return o.ReferenceProviderRegistry.register(e, t)
- }
- function S(e, t) {
- return o.RenameProviderRegistry.register(e, t)
- }
- function w(e, t) {
- return o.SignatureHelpProviderRegistry.register(e, t)
- }
- function E(e, t) {
- return o.HoverProviderRegistry.register(e, {
- provideHover: function (e, i, o) {
- var r = e.getWordAtPosition(i);
- return Promise.resolve(t.provideHover(e, i, o)).then((function (e) {
- if (e) return !e.range && r && (e.range = new n.Range(i.lineNumber, r.startColumn, i.lineNumber, r.endColumn)), e.range || (e.range = new n.Range(i.lineNumber, i.column, i.lineNumber, i.column)), e
- }))
- }
- })
- }
- function L(e, t) {
- return o.DocumentSymbolProviderRegistry.register(e, t)
- }
- function D(e, t) {
- return o.DocumentHighlightProviderRegistry.register(e, t)
- }
- function N(e, t) {
- return o.DefinitionProviderRegistry.register(e, t)
- }
- function x(e, t) {
- return o.ImplementationProviderRegistry.register(e, t)
- }
- function I(e, t) {
- return o.TypeDefinitionProviderRegistry.register(e, t)
- }
- function M(e, t) {
- return o.CodeLensProviderRegistry.register(e, t)
- }
- function k(e, t) {
- return o.CodeActionProviderRegistry.register(e, {
- provideCodeActions: function (e, i, o, r) {
- var s = l.StaticServices.markerService.get().read({resource: e.uri}).filter((function (e) {
- return n.Range.areIntersectingOrTouching(e, i)
- }));
- return t.provideCodeActions(e, i, {markers: s, only: o.only}, r)
- }
- })
- }
- function T(e, t) {
- return o.DocumentFormattingEditProviderRegistry.register(e, t)
- }
- function R(e, t) {
- return o.DocumentRangeFormattingEditProviderRegistry.register(e, t)
- }
- function O(e, t) {
- return o.OnTypeFormattingEditProviderRegistry.register(e, t)
- }
- function P(e, t) {
- return o.LinkProviderRegistry.register(e, t)
- }
- function A(e, t) {
- return o.CompletionProviderRegistry.register(e, t)
- }
- function F(e, t) {
- return o.ColorProviderRegistry.register(e, t)
- }
- function W(e, t) {
- return o.FoldingRangeProviderRegistry.register(e, t)
- }
- function B(e, t) {
- return o.DeclarationProviderRegistry.register(e, t)
- }
- function V(e, t) {
- return o.SelectionRangeRegistry.register(e, t)
- }
- function z(e, t) {
- return o.DocumentSemanticTokensProviderRegistry.register(e, t)
- }
- function H(e, t) {
- return o.DocumentRangeSemanticTokensProviderRegistry.register(e, t)
- }
- t.TokenizationSupport2Adapter = v,
- t.setTokensProvider = y, t.setMonarchTokensProvider = C, t.registerReferenceProvider = b, t.registerRenameProvider = S, t.registerSignatureHelpProvider = w, t.registerHoverProvider = E, t.registerDocumentSymbolProvider = L, t.registerDocumentHighlightProvider = D, t.registerDefinitionProvider = N, t.registerImplementationProvider = x, t.registerTypeDefinitionProvider = I, t.registerCodeLensProvider = M, t.registerCodeActionProvider = k, t.registerDocumentFormattingEditProvider = T, t.registerDocumentRangeFormattingEditProvider = R, t.registerOnTypeFormattingEditProvider = O, t.registerLinkProvider = P, t.registerCompletionItemProvider = A, t.registerColorProvider = F, t.registerFoldingRangeProvider = W, t.registerDeclarationProvider = B, t.registerSelectionRangeProvider = V, t.registerDocumentSemanticTokensProvider = z, t.registerDocumentRangeSemanticTokensProvider = H, t.createMonacoLanguagesAPI = function () {
- return {
- register: c,
- getLanguages: h,
- onLanguage: g,
- getEncodedLanguageId: p,
- setLanguageConfiguration: f,
- setTokensProvider: y,
- setMonarchTokensProvider: C,
- registerReferenceProvider: b,
- registerRenameProvider: S,
- registerCompletionItemProvider: A,
- registerSignatureHelpProvider: w,
- registerHoverProvider: E,
- registerDocumentSymbolProvider: L,
- registerDocumentHighlightProvider: D,
- registerDefinitionProvider: N,
- registerImplementationProvider: x,
- registerTypeDefinitionProvider: I,
- registerCodeLensProvider: M,
- registerCodeActionProvider: k,
- registerDocumentFormattingEditProvider: T,
- registerDocumentRangeFormattingEditProvider: R,
- registerOnTypeFormattingEditProvider: O,
- registerLinkProvider: P,
- registerColorProvider: F,
- registerFoldingRangeProvider: W,
- registerDeclarationProvider: B,
- registerSelectionRangeProvider: V,
- registerDocumentSemanticTokensProvider: z,
- registerDocumentRangeSemanticTokensProvider: H,
- DocumentHighlightKind: a.DocumentHighlightKind,
- CompletionItemKind: a.CompletionItemKind,
- CompletionItemTag: a.CompletionItemTag,
- CompletionItemInsertTextRule: a.CompletionItemInsertTextRule,
- SymbolKind: a.SymbolKind,
- SymbolTag: a.SymbolTag,
- IndentAction: a.IndentAction,
- CompletionTriggerKind: a.CompletionTriggerKind,
- SignatureHelpTriggerKind: a.SignatureHelpTriggerKind,
- FoldingRangeKind: o.FoldingRangeKind
- }
- }
- })), define(n[605], i([0, 1, 33, 192, 603, 604]), (function (e, t, n, i, o, r) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var s = self;
- n.EditorOptions.wrappingIndent.defaultValue = 0, n.EditorOptions.glyphMargin.defaultValue = !1, n.EditorOptions.autoIndent.defaultValue = 3, n.EditorOptions.overviewRulerLanes.defaultValue = 2;
- var a = i.createMonacoBaseAPI();
- a.editor = o.createMonacoEditorAPI(), a.languages = r.createMonacoLanguagesAPI(), t.CancellationTokenSource = a.CancellationTokenSource, t.Emitter = a.Emitter, t.KeyCode = a.KeyCode, t.KeyMod = a.KeyMod, t.Position = a.Position, t.Range = a.Range, t.Selection = a.Selection, t.SelectionDirection = a.SelectionDirection, t.MarkerSeverity = a.MarkerSeverity, t.MarkerTag = a.MarkerTag, t.Uri = a.Uri, t.Token = a.Token, t.editor = a.editor, t.languages = a.languages, s.monaco = a, void 0 !== s.require && "function" == typeof s.require.config && s.require.config({
- ignoreDuplicateModules: ["vscode-languageserver-types", "vscode-languageserver-types/main", "vscode-nls", "vscode-nls/vscode-nls", "jsonc-parser", "jsonc-parser/main", "vscode-uri", "vscode-uri/index", "vs/basic-languages/typescript/typescript"]
- })
- })), define(n[606], i([0, 1, 25]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.WORKSPACE_EXTENSION = "code-workspace", t.isSingleFolderWorkspaceIdentifier = function (e) {
- return e instanceof n.URI
- }, t.toWorkspaceIdentifier = function (e) {
- return e.configuration ? {
- configPath: e.configuration,
- id: e.id
- } : 1 === e.folders.length ? e.folders[0].uri : void 0
- }
- })), define(n[607], i([0, 1, 466, 77, 39, 151, 41, 5, 606, 136]), (function (e, t, n, i, o, r, s, a, l, u) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var d = function () {
- function e(e) {
- this._delegates = e
- }
- return e.prototype.resolve = function (e) {
- for (var t = 0, n = this._delegates; t < n.length; t++) {
- var i = n[t].resolve(e);
- if (void 0 !== i) return i
- }
- }, e
- }();
- t.CompositeSnippetVariableResolver = d;
- var c = function () {
- function e(e, t) {
- this._model = e,
- this._selection = t
- }
- return e.prototype.resolve = function (e) {
- var t = e.name;
- if ("SELECTION" === t || "TM_SELECTED_TEXT" === t) {
- var n = this._model.getValueInRange(this._selection) || void 0;
- if (n && this._selection.startLineNumber !== this._selection.endLineNumber && e.snippet) {
- var i = this._model.getLineContent(this._selection.startLineNumber),
- o = a.getLeadingWhitespace(i, 0, this._selection.startColumn - 1), s = o;
- e.snippet.walk((function (t) {
- return t !== e && (t instanceof r.Text && (s = a.getLeadingWhitespace(t.value.split(/\r\n|\r|\n/).pop())), !0)
- }));
- var l = a.commonPrefixLength(s, o);
- n = n.replace(/(\r\n|\r|\n)(.*)/g, (function (e, t, n) {
- return "" + t + s.substr(l) + n
- }))
- }
- return n
- }
- if ("TM_CURRENT_LINE" === t) return this._model.getLineContent(this._selection.positionLineNumber);
- if ("TM_CURRENT_WORD" === t) {
- var u = this._model.getWordAtPosition({
- lineNumber: this._selection.positionLineNumber,
- column: this._selection.positionColumn
- });
- return u && u.word || void 0
- }
- return "TM_LINE_INDEX" === t ? String(this._selection.positionLineNumber - 1) : "TM_LINE_NUMBER" === t ? String(this._selection.positionLineNumber) : void 0
- }, e
- }();
- t.SelectionBasedVariableResolver = c;
- var h = function () {
- function e(e, t) {
- this._labelService = e, this._model = t
- }
- return e.prototype.resolve = function (e) {
- var t = e.name;
- if ("TM_FILENAME" === t) return i.basename(this._model.uri.fsPath);
- if ("TM_FILENAME_BASE" === t) {
- var n = i.basename(this._model.uri.fsPath), r = n.lastIndexOf(".");
- return r <= 0 ? n : n.slice(0, r)
- }
- return "TM_DIRECTORY" === t && this._labelService ? "." === i.dirname(this._model.uri.fsPath) ? "" : this._labelService.getUriLabel(o.dirname(this._model.uri)) : "TM_FILEPATH" === t && this._labelService ? this._labelService.getUriLabel(this._model.uri) : void 0
- }, e
- }();
- t.ModelBasedVariableResolver = h;
- var p = function () {
- function e(e, t, n, i) {
- this._readClipboardText = e, this._selectionIdx = t, this._selectionCount = n, this._spread = i
- }
- return e.prototype.resolve = function (e) {
- if ("CLIPBOARD" === e.name) {
- var t = this._readClipboardText();
- if (t) {
- if (this._spread) {
- var n = t.split(/\r\n|\n|\r/).filter((function (e) {
- return !a.isFalsyOrWhitespace(e)
- }));
- if (n.length === this._selectionCount) return n[this._selectionIdx]
- }
- return t
- }
- }
- }, e
- }();
- t.ClipboardBasedVariableResolver = p;
- var g = function () {
- function e(e) {
- this._model = e
- }
- return e.prototype.resolve = function (e) {
- var t = e.name, n = this._model.getLanguageIdentifier(),
- i = s.LanguageConfigurationRegistry.getComments(n.id);
- if (i) return "LINE_COMMENT" === t ? i.lineCommentToken || void 0 : "BLOCK_COMMENT_START" === t ? i.blockCommentStartToken || void 0 : "BLOCK_COMMENT_END" === t && i.blockCommentEndToken || void 0
- }, e
- }();
- t.CommentBasedVariableResolver = g;
- var f = function () {
- function e() {
- }
- return e.prototype.resolve = function (t) {
- var n = t.name
- ;
- return "CURRENT_YEAR" === n ? String((new Date).getFullYear()) : "CURRENT_YEAR_SHORT" === n ? String((new Date).getFullYear()).slice(-2) : "CURRENT_MONTH" === n ? a.pad((new Date).getMonth().valueOf() + 1, 2) : "CURRENT_DATE" === n ? a.pad((new Date).getDate().valueOf(), 2) : "CURRENT_HOUR" === n ? a.pad((new Date).getHours().valueOf(), 2) : "CURRENT_MINUTE" === n ? a.pad((new Date).getMinutes().valueOf(), 2) : "CURRENT_SECOND" === n ? a.pad((new Date).getSeconds().valueOf(), 2) : "CURRENT_DAY_NAME" === n ? e.dayNames[(new Date).getDay()] : "CURRENT_DAY_NAME_SHORT" === n ? e.dayNamesShort[(new Date).getDay()] : "CURRENT_MONTH_NAME" === n ? e.monthNames[(new Date).getMonth()] : "CURRENT_MONTH_NAME_SHORT" === n ? e.monthNamesShort[(new Date).getMonth()] : "CURRENT_SECONDS_UNIX" === n ? String(Math.floor(Date.now() / 1e3)) : void 0
- }, e.dayNames = [n.localize(0, null), n.localize(1, null), n.localize(2, null), n.localize(3, null), n.localize(4, null), n.localize(5, null), n.localize(6, null)],
- e.dayNamesShort = [n.localize(7, null), n.localize(8, null), n.localize(9, null), n.localize(10, null), n.localize(11, null), n.localize(12, null), n.localize(13, null)], e.monthNames = [n.localize(14, null), n.localize(15, null), n.localize(16, null), n.localize(17, null), n.localize(18, null), n.localize(19, null), n.localize(20, null), n.localize(21, null), n.localize(22, null), n.localize(23, null), n.localize(24, null), n.localize(25, null)], e.monthNamesShort = [n.localize(26, null), n.localize(27, null), n.localize(28, null), n.localize(29, null), n.localize(30, null), n.localize(31, null), n.localize(32, null), n.localize(33, null), n.localize(34, null), n.localize(35, null), n.localize(36, null), n.localize(37, null)], e
- }();
- t.TimeBasedVariableResolver = f;
- var m = function () {
- function e(e) {
- this._workspaceService = e
- }
- return e.prototype.resolve = function (e) {
- if (this._workspaceService) {
- var t = l.toWorkspaceIdentifier(this._workspaceService.getWorkspace())
- ;
- if (t) return "WORKSPACE_NAME" === e.name ? this._resolveWorkspaceName(t) : "WORKSPACE_FOLDER" === e.name ? this._resoveWorkspacePath(t) : void 0
- }
- }, e.prototype._resolveWorkspaceName = function (e) {
- if (l.isSingleFolderWorkspaceIdentifier(e)) return i.basename(e.path);
- var t = i.basename(e.configPath.path);
- return a.endsWith(t, l.WORKSPACE_EXTENSION) && (t = t.substr(0, t.length - l.WORKSPACE_EXTENSION.length - 1)), t
- }, e.prototype._resoveWorkspacePath = function (e) {
- if (l.isSingleFolderWorkspaceIdentifier(e)) return u.normalizeDriveLetter(e.fsPath);
- var t = i.basename(e.configPath.path), n = e.configPath.fsPath;
- return a.endsWith(n, t) && (n = n.substr(0, n.length - t.length - 1)), n ? u.normalizeDriveLetter(n) : "/"
- }, e
- }();
- t.WorkspaceBasedVariableResolver = m;
- var v = function () {
- function e() {
- }
- return e.prototype.resolve = function (e) {
- var t = e.name;
- return "RANDOM" === t ? Math.random().toString().slice(-6) : "RANDOM_HEX" === t ? Math.random().toString(16).slice(-6) : void 0
- }, e
- }();
- t.RandomBasedVariableResolver = v
- })),
- define(n[608], i([0, 1, 19, 2, 5, 58, 3, 22, 30, 162, 171, 11, 151, 607, 14, 20, 116, 321]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g, f, m) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), g.registerThemingParticipant((function (e, t) {
- function n(t) {
- var n = e.getColor(t);
- return n ? n.toString() : "transparent"
- }
- t.addRule(".monaco-editor .snippet-placeholder { background-color: " + n(f.snippetTabstopHighlightBackground) + "; outline-color: " + n(f.snippetTabstopHighlightBorder) + "; }"), t.addRule(".monaco-editor .finish-snippet-placeholder { background-color: " + n(f.snippetFinalTabstopHighlightBackground) + "; outline-color: " + n(f.snippetFinalTabstopHighlightBorder) + "; }")
- }));
- var v = function () {
- function e(e, t, i) {
- this._nestingLevel = 1, this._editor = e, this._snippet = t, this._offset = i, this._placeholderGroups = n.groupBy(t.placeholders, h.Placeholder.compareByIndex), this._placeholderGroupsIdx = -1
- }
- return e.prototype.dispose = function () {
- if (this._placeholderDecorations) {
- var e = [];
- this._placeholderDecorations.forEach((function (t) {
- return e.push(t)
- })),
- this._editor.deltaDecorations(e, [])
- }
- this._placeholderGroups.length = 0
- }, e.prototype._initDecorations = function () {
- var t = this;
- if (!this._placeholderDecorations) {
- this._placeholderDecorations = new Map;
- var n = this._editor.getModel();
- this._editor.changeDecorations((function (i) {
- for (var o = 0, r = t._snippet.placeholders; o < r.length; o++) {
- var a = r[o], l = t._snippet.offset(a), u = t._snippet.fullLen(a),
- d = s.Range.fromPositions(n.getPositionAt(t._offset + l), n.getPositionAt(t._offset + l + u)),
- c = a.isFinalTabstop ? e._decor.inactiveFinal : e._decor.inactive,
- h = i.addDecoration(d, c);
- t._placeholderDecorations.set(a, h)
- }
- }))
- }
- }, e.prototype.move = function (t) {
- var n = this;
- if (!this._editor.hasModel()) return [];
- if (this._initDecorations(), this._placeholderGroupsIdx >= 0) {
- for (var i = [], o = 0, s = this._placeholderGroups[this._placeholderGroupsIdx]; o < s.length; o++) {
- var l = s[o];
- if (l.transform) {
- var u = this._placeholderDecorations.get(l),
- d = this._editor.getModel().getDecorationRange(u),
- c = this._editor.getModel().getValueInRange(d)
- ;i.push(r.EditOperation.replaceMove(d, l.transform.resolve(c)))
- }
- }
- i.length > 0 && this._editor.executeEdits("snippet.placeholderTransform", i)
- }
- var h = !1;
- !0 === t && this._placeholderGroupsIdx < this._placeholderGroups.length - 1 ? (this._placeholderGroupsIdx += 1, h = !0) : !1 === t && this._placeholderGroupsIdx > 0 && (this._placeholderGroupsIdx -= 1, h = !0);
- var p = this._editor.getModel().changeDecorations((function (t) {
- for (var i = new Set, o = [], r = 0, s = n._placeholderGroups[n._placeholderGroupsIdx]; r < s.length; r++) {
- var l = s[r], u = n._placeholderDecorations.get(l),
- d = n._editor.getModel().getDecorationRange(u);
- o.push(new a.Selection(d.startLineNumber, d.startColumn, d.endLineNumber, d.endColumn)), h = h && n._hasPlaceholderBeenCollapsed(l), t.changeDecorationOptions(u, l.isFinalTabstop ? e._decor.activeFinal : e._decor.active), i.add(l);
- for (var c = 0, p = n._snippet.enclosingPlaceholders(l); c < p.length; c++) {
- var g = p[c], f = n._placeholderDecorations.get(g);
- t.changeDecorationOptions(f, g.isFinalTabstop ? e._decor.activeFinal : e._decor.active), i.add(g)
- }
- }
- return n._placeholderDecorations.forEach((function (n, o) {
- i.has(o) || t.changeDecorationOptions(n, o.isFinalTabstop ? e._decor.inactiveFinal : e._decor.inactive)
- })), o
- }));
- return h ? this.move(t) : p
- }, e.prototype._hasPlaceholderBeenCollapsed = function (e) {
- for (var t = e; t;) {
- if (t instanceof h.Placeholder) {
- var n = this._placeholderDecorations.get(t);
- if (this._editor.getModel().getDecorationRange(n).isEmpty() && t.toString().length > 0) return !0
- }
- t = t.parent
- }
- return !1
- }, Object.defineProperty(e.prototype, "isAtFirstPlaceholder", {
- get: function () {
- return this._placeholderGroupsIdx <= 0 || 0 === this._placeholderGroups.length
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "isAtLastPlaceholder", {
- get: function () {
- return this._placeholderGroupsIdx === this._placeholderGroups.length - 1
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "hasPlaceholder", {
- get: function () {
- return this._snippet.placeholders.length > 0
- }, enumerable: !0, configurable: !0
- }), e.prototype.computePossibleSelections = function () {
- for (var e = new Map, t = 0, n = this._placeholderGroups; t < n.length; t++) for (var i = void 0, o = 0, r = n[t]; o < r.length; o++) {
- var s = r[o];
- if (s.isFinalTabstop) break;
- i || (i = [], e.set(s.index, i));
- var a = this._placeholderDecorations.get(s), l = this._editor.getModel().getDecorationRange(a);
- if (!l) {
- e.delete(s.index);
- break
- }
- i.push(l)
- }
- return e
- }, Object.defineProperty(e.prototype, "choice", {
- get: function () {
- return this._placeholderGroups[this._placeholderGroupsIdx][0].choice
- }, enumerable: !0, configurable: !0
- }), e.prototype.merge = function (t) {
- var i = this, o = this._editor.getModel();
- this._nestingLevel *= 10, this._editor.changeDecorations((function (r) {
- for (var a = 0, l = i._placeholderGroups[i._placeholderGroupsIdx]; a < l.length; a++) {
- var u = l[a], d = t.shift();
- console.assert(!d._placeholderDecorations);
- for (var c = d._snippet.placeholderInfo.last.index, p = 0, g = d._snippet.placeholderInfo.all; p < g.length; p++) {
- var f = g[p];
- f.isFinalTabstop ? f.index = u.index + (c + 1) / i._nestingLevel : f.index = u.index + f.index / i._nestingLevel
- }
- i._snippet.replace(u, d._snippet.children)
- ;var m = i._placeholderDecorations.get(u);
- r.removeDecoration(m), i._placeholderDecorations.delete(u);
- for (var v = 0, _ = d._snippet.placeholders; v < _.length; v++) {
- var y = _[v], C = d._snippet.offset(y), b = d._snippet.fullLen(y),
- S = s.Range.fromPositions(o.getPositionAt(d._offset + C), o.getPositionAt(d._offset + C + b)),
- w = r.addDecoration(S, e._decor.inactive);
- i._placeholderDecorations.set(y, w)
- }
- }
- i._placeholderGroups = n.groupBy(i._snippet.placeholders, h.Placeholder.compareByIndex)
- }))
- }, e._decor = {
- active: l.ModelDecorationOptions.register({
- stickiness: 0,
- className: "snippet-placeholder"
- }),
- inactive: l.ModelDecorationOptions.register({stickiness: 1, className: "snippet-placeholder"}),
- activeFinal: l.ModelDecorationOptions.register({
- stickiness: 1,
- className: "finish-snippet-placeholder"
- }),
- inactiveFinal: l.ModelDecorationOptions.register({
- stickiness: 1,
- className: "finish-snippet-placeholder"
- })
- }, e
- }();
- t.OneSnippet = v;
- var _ = {overwriteBefore: 0, overwriteAfter: 0, adjustWhitespace: !0, clipboardText: void 0},
- y = function () {
- function e(e, t, n) {
- void 0 === n && (n = _),
- this._templateMerges = [], this._snippets = [], this._editor = e, this._template = t, this._options = n
- }
- return e.adjustWhitespace = function (e, t, n, i, r) {
- var s = e.getLineContent(t.lineNumber), a = o.getLeadingWhitespace(s, 0, t.column - 1);
- n.walk((function (t) {
- if (t instanceof h.Text && !(t.parent instanceof h.Choice)) {
- var n = t.value.split(/\r\n|\r|\n/);
- if (i) for (var s = 1; s < n.length; s++) {
- var l = o.getLeadingWhitespace(n[s]);
- n[s] = e.normalizeIndentation(a + l) + n[s].substr(l.length)
- }
- if (r) {
- var u = n.join(e.getEOL());
- u !== t.value && t.parent.replace(t, [new h.Text(u)])
- }
- }
- return !0
- }))
- }, e.adjustSelection = function (e, t, n, i) {
- if (0 !== n || 0 !== i) {
- var o = t.positionLineNumber, r = t.positionColumn, s = r - n, l = r + i,
- u = e.validateRange({
- startLineNumber: o,
- startColumn: s,
- endLineNumber: o,
- endColumn: l
- });
- t = a.Selection.createWithDirection(u.startLineNumber, u.startColumn, u.endLineNumber, u.endColumn, t.getDirection())
- }
- return t
- }, e.createEditsAndSnippets = function (t, n, i, o, a, l, g) {
- var f = [], _ = [];
- if (!t.hasModel()) return {edits: f, snippets: _};
- for (var y = t.getModel(), C = t.invokeWithinContext((function (e) {
- return e.get(d.IWorkspaceContextService, c.optional)
- })), b = t.invokeWithinContext((function (e) {
- return new p.ModelBasedVariableResolver(e.get(m.ILabelService, c.optional), y)
- })), S = t.invokeWithinContext((function (e) {
- return e.get(u.IClipboardService, c.optional)
- })), w = function () {
- return g || S && S.readTextSync()
- }, E = 0, L = y.getValueInRange(e.adjustSelection(y, t.getSelection(), i, 0)), D = y.getValueInRange(e.adjustSelection(y, t.getSelection(), 0, o)), N = y.getLineFirstNonWhitespaceColumn(t.getSelection().positionLineNumber), x = t.getSelections().map((function (e, t) {
- return {selection: e, idx: t}
- })).sort((function (e, t) {
- return s.Range.compareRangesUsingStarts(e.selection, t.selection)
- })), I = 0, M = x; I < M.length; I++) {
- var k = M[I], T = k.selection, R = k.idx, O = e.adjustSelection(y, T, i, 0),
- P = e.adjustSelection(y, T, 0, o);
- L !== y.getValueInRange(O) && (O = T), D !== y.getValueInRange(P) && (P = T);
- var A = T.setStartPosition(O.startLineNumber, O.startColumn).setEndPosition(P.endLineNumber, P.endColumn),
- F = (new h.SnippetParser).parse(n, !0, a), W = A.getStartPosition()
- ;e.adjustWhitespace(y, W, F, l || R > 0 && N !== y.getLineFirstNonWhitespaceColumn(T.positionLineNumber), !0), F.resolveVariables(new p.CompositeSnippetVariableResolver([b, new p.ClipboardBasedVariableResolver(w, R, x.length, "spread" === t.getOption(60)), new p.SelectionBasedVariableResolver(y, T), new p.CommentBasedVariableResolver(y), new p.TimeBasedVariableResolver, new p.WorkspaceBasedVariableResolver(C), new p.RandomBasedVariableResolver]));
- var B = y.getOffsetAt(W) + E;
- E += F.toString().length - y.getValueLengthInRange(A), f[R] = r.EditOperation.replace(A, F.toString()), _[R] = new v(t, F, B)
- }
- return {edits: f, snippets: _}
- }, e.prototype.dispose = function () {
- i.dispose(this._snippets)
- }, e.prototype._logInfo = function () {
- return 'template="' + this._template + '", merged_templates="' + this._templateMerges.join(" -> ") + '"'
- }, e.prototype.insert = function () {
- var t = this;
- if (this._editor.hasModel()) {
- var n = e.createEditsAndSnippets(this._editor, this._template, this._options.overwriteBefore, this._options.overwriteAfter, !1, this._options.adjustWhitespace, this._options.clipboardText),
- i = n.edits, o = n.snippets;
- this._snippets = o, this._editor.executeEdits("snippet", i, (function (e) {
- return t._snippets[0].hasPlaceholder ? t._move(!0) : e.map((function (e) {
- return a.Selection.fromPositions(e.range.getEndPosition())
- }))
- })), this._editor.revealRange(this._editor.getSelections()[0])
- }
- }, e.prototype.merge = function (t, n) {
- var i = this;
- if (void 0 === n && (n = _), this._editor.hasModel()) {
- this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, t]);
- var o = e.createEditsAndSnippets(this._editor, t, n.overwriteBefore, n.overwriteAfter, !0, n.adjustWhitespace, n.clipboardText),
- r = o.edits, s = o.snippets;
- this._editor.executeEdits("snippet", r, (function (e) {
- for (var t = 0, n = i._snippets; t < n.length; t++) {
- n[t].merge(s)
- }
- return console.assert(0 === s.length), i._snippets[0].hasPlaceholder ? i._move(void 0) : e.map((function (e) {
- return a.Selection.fromPositions(e.range.getEndPosition())
- }))
- }))
- }
- }, e.prototype.next = function () {
- var e = this._move(!0);
- this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())
- }, e.prototype.prev = function () {
- var e = this._move(!1);
- this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())
- }, e.prototype._move = function (e) {
- for (var t = [], n = 0, i = this._snippets; n < i.length; n++) {
- var o = i[n].move(e);
- t.push.apply(t, o)
- }
- return t
- }, Object.defineProperty(e.prototype, "isAtFirstPlaceholder", {
- get: function () {
- return this._snippets[0].isAtFirstPlaceholder
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "isAtLastPlaceholder", {
- get: function () {
- return this._snippets[0].isAtLastPlaceholder
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "hasPlaceholder", {
- get: function () {
- return this._snippets[0].hasPlaceholder
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "choice", {
- get: function () {
- return this._snippets[0].choice
- }, enumerable: !0, configurable: !0
- }), e.prototype.isSelectionWithinPlaceholders = function () {
- if (!this.hasPlaceholder) return !1;
- var e = this._editor.getSelections();
- if (e.length < this._snippets.length) return !1;
- for (var t = new Map, n = function (n) {
- var i = n.computePossibleSelections();
- if (0 === t.size && i.forEach((function (n, i) {
- n.sort(s.Range.compareRangesUsingStarts);
- for (var o = 0, r = e; o < r.length; o++) {
- var a = r[o];
- if (n[0].containsRange(a)) {
- t.set(i, []);
- break
- }
- }
- })), 0 === t.size) return {value: !1};
- t.forEach((function (e, t) {
- e.push.apply(e, i.get(t))
- }))
- }, i = 0, o = this._snippets; i < o.length; i++) {
- var r = n(o[i]);
- if ("object" == typeof r) return r.value
- }
- return e.sort(s.Range.compareRangesUsingStarts), t.forEach((function (n, i) {
- if (n.length === e.length) {
- n.sort(s.Range.compareRangesUsingStarts);
- for (var o = 0; o < n.length; o++) if (!n[o].containsRange(e[o])) return void t.delete(i)
- } else t.delete(i)
- })), t.size > 0
- }, e
- }();
- t.SnippetSession = y
- })), define(n[173], i([0, 1, 2, 5, 12, 3, 22, 23, 120, 18, 95, 608]), (function (e, t, n, i, o, r, s, a, u, d, c, p) {
- "use strict"
- ;Object.defineProperty(t, "__esModule", {value: !0});
- var f = {
- overwriteBefore: 0,
- overwriteAfter: 0,
- undoStopBefore: !0,
- undoStopAfter: !0,
- adjustWhitespace: !0,
- clipboardText: void 0
- }, m = function () {
- function e(t, i, o) {
- this._editor = t, this._logService = i, this._snippetListener = new n.DisposableStore, this._modelVersionId = -1, this._inSnippet = e.InSnippetMode.bindTo(o), this._hasNextTabstop = e.HasNextTabstop.bindTo(o), this._hasPrevTabstop = e.HasPrevTabstop.bindTo(o)
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop.reset(), n.dispose(this._session), this._snippetListener.dispose()
- }, e.prototype.insert = function (e, t) {
- try {
- this._doInsert(e, void 0 === t ? f : l(l({}, f), t))
- } catch (t) {
- this.cancel(), this._logService.error(t), this._logService.error("snippet_error"), this._logService.error("insert_template=", e), this._logService.error("existing_template=", this._session ? this._session._logInfo() : "<no_session>")
- }
- }, e.prototype._doInsert = function (e, t) {
- var n = this;
- this._editor.hasModel() && (this._snippetListener.clear(), t.undoStopBefore && this._editor.getModel().pushStackElement(), this._session ? this._session.merge(e, t) : (this._modelVersionId = this._editor.getModel().getAlternativeVersionId(), this._session = new p.SnippetSession(this._editor, e, t), this._session.insert()), t.undoStopAfter && this._editor.getModel().pushStackElement(), this._updateState(), this._snippetListener.add(this._editor.onDidChangeModelContent((function (e) {
- return e.isFlush && n.cancel()
- }))), this._snippetListener.add(this._editor.onDidChangeModel((function () {
- return n.cancel()
- }))), this._snippetListener.add(this._editor.onDidChangeCursorSelection((function () {
- return n._updateState()
- }))))
- }, e.prototype._updateState = function () {
- if (this._session && this._editor.hasModel()) {
- if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) return this.cancel();
- if (!this._session.hasPlaceholder) return this.cancel()
- ;
- if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) return this.cancel();
- this._inSnippet.set(!0), this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder), this._hasNextTabstop.set(!this._session.isAtLastPlaceholder), this._handleChoice()
- }
- }, e.prototype._handleChoice = function () {
- var e = this;
- if (this._session && this._editor.hasModel()) {
- var t = this._session.choice;
- if (t) {
- if (this._currentChoice !== t) {
- this._currentChoice = t, this._editor.setSelections(this._editor.getSelections().map((function (e) {
- return s.Selection.fromPositions(e.getStartPosition())
- })));
- var n = t.options[0];
- u.showSimpleSuggestions(this._editor, t.options.map((function (t, o) {
- return {
- kind: 13,
- label: t.value,
- insertText: t.value,
- sortText: i.repeat("a", o + 1),
- range: r.Range.fromPositions(e._editor.getPosition(), e._editor.getPosition().delta(0, n.value.length))
- }
- })))
- }
- } else this._currentChoice = void 0
- } else this._currentChoice = void 0
- }, e.prototype.finish = function () {
- for (; this._inSnippet.get();) this.next()
- }, e.prototype.cancel = function (e) {
- void 0 === e && (e = !1), this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop.reset(), this._snippetListener.clear(), n.dispose(this._session), this._session = void 0, this._modelVersionId = -1, e && this._editor.setSelections([this._editor.getSelection()])
- }, e.prototype.prev = function () {
- this._session && this._session.prev(), this._updateState()
- }, e.prototype.next = function () {
- this._session && this._session.next(), this._updateState()
- }, e.prototype.isInSnippet = function () {
- return Boolean(this._inSnippet.get())
- }, e.ID = "snippetController2", e.InSnippetMode = new d.RawContextKey("inSnippetMode", !1), e.HasNextTabstop = new d.RawContextKey("hasNextTabstop", !1), e.HasPrevTabstop = new d.RawContextKey("hasPrevTabstop", !1), e = h([g(1, c.ILogService), g(2, d.IContextKeyService)], e)
- }();
- t.SnippetController2 = m, o.registerEditorContribution(m.ID, m);
- var v = o.EditorCommand.bindToContribution(m.get);
- o.registerEditorCommand(new v({
- id: "jumpToNextSnippetPlaceholder",
- precondition: d.ContextKeyExpr.and(m.InSnippetMode, m.HasNextTabstop),
- handler: function (e) {
- return e.next()
- },
- kbOpts: {weight: 130, kbExpr: a.EditorContextKeys.editorTextFocus, primary: 2}
- })), o.registerEditorCommand(new v({
- id: "jumpToPrevSnippetPlaceholder",
- precondition: d.ContextKeyExpr.and(m.InSnippetMode, m.HasPrevTabstop),
- handler: function (e) {
- return e.prev()
- },
- kbOpts: {weight: 130, kbExpr: a.EditorContextKeys.editorTextFocus, primary: 1026}
- })), o.registerEditorCommand(new v({
- id: "leaveSnippet", precondition: m.InSnippetMode, handler: function (e) {
- return e.cancel(!0)
- }, kbOpts: {weight: 130, kbExpr: a.EditorContextKeys.editorTextFocus, primary: 9, secondary: [1033]}
- })), o.registerEditorCommand(new v({
- id: "acceptSnippet", precondition: m.InSnippetMode, handler: function (e) {
- return e.finish()
- }
- }))
- })), define(n[609], i([0, 1, 19, 15, 10, 4, 2, 22, 17, 389, 120, 173, 26, 392, 5]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var f = function () {
- function e(e, t, n, i) {
- this.leadingLineContent = e.getLineContent(t.lineNumber).substr(0, t.column - 1), this.leadingWord = e.getWordUntilPosition(t),
- this.lineNumber = t.lineNumber, this.column = t.column, this.auto = n, this.shy = i
- }
- return e.shouldAutoTrigger = function (e) {
- if (!e.hasModel()) return !1;
- var t = e.getModel(), n = e.getPosition();
- t.tokenizeIfCheap(n.lineNumber);
- var i = t.getWordAtPosition(n);
- return !!i && (i.endColumn === n.column && !!isNaN(Number(i.word)))
- }, e
- }();
- t.LineContext = f;
- var m = function () {
- function e(e, t) {
- var n = this;
- this._editor = e, this._editorWorker = t, this._toDispose = new s.DisposableStore, this._quickSuggestDelay = 10, this._triggerCharacterListener = new s.DisposableStore, this._triggerQuickSuggest = new i.TimeoutTimer, this._state = 0, this._completionDisposables = new s.DisposableStore, this._onDidCancel = new r.Emitter, this._onDidTrigger = new r.Emitter, this._onDidSuggest = new r.Emitter, this.onDidCancel = this._onDidCancel.event, this.onDidTrigger = this._onDidTrigger.event, this.onDidSuggest = this._onDidSuggest.event, this._currentSelection = this._editor.getSelection() || new a.Selection(1, 1, 1, 1), this._toDispose.add(this._editor.onDidChangeModel((function () {
- n._updateTriggerCharacters(),
- n.cancel()
- }))), this._toDispose.add(this._editor.onDidChangeModelLanguage((function () {
- n._updateTriggerCharacters(), n.cancel()
- }))), this._toDispose.add(this._editor.onDidChangeConfiguration((function () {
- n._updateTriggerCharacters(), n._updateQuickSuggest()
- }))), this._toDispose.add(l.CompletionProviderRegistry.onDidChange((function () {
- n._updateTriggerCharacters(), n._updateActiveSuggestSession()
- }))), this._toDispose.add(this._editor.onDidChangeCursorSelection((function (e) {
- n._onCursorChange(e)
- })));
- var o = !1;
- this._toDispose.add(this._editor.onDidCompositionStart((function () {
- o = !0
- }))), this._toDispose.add(this._editor.onDidCompositionEnd((function () {
- o = !1, n._refilterCompletionItems()
- }))), this._toDispose.add(this._editor.onDidChangeModelContent((function () {
- o || n._refilterCompletionItems()
- }))), this._updateTriggerCharacters(), this._updateQuickSuggest()
- }
- return e.prototype.dispose = function () {
- s.dispose(this._triggerCharacterListener), s.dispose([this._onDidCancel, this._onDidSuggest, this._onDidTrigger, this._triggerQuickSuggest]),
- this._toDispose.dispose(), this._completionDisposables.dispose(), this.cancel()
- }, e.prototype._updateQuickSuggest = function () {
- this._quickSuggestDelay = this._editor.getOption(67), (isNaN(this._quickSuggestDelay) || !this._quickSuggestDelay && 0 !== this._quickSuggestDelay || this._quickSuggestDelay < 0) && (this._quickSuggestDelay = 10)
- }, e.prototype._updateTriggerCharacters = function () {
- var e = this;
- if (this._triggerCharacterListener.clear(), !this._editor.getOption(68) && this._editor.hasModel() && this._editor.getOption(92)) {
- for (var t = new Map, n = 0, i = l.CompletionProviderRegistry.all(this._editor.getModel()); n < i.length; n++) for (var o = i[n], r = 0, s = o.triggerCharacters || []; r < s.length; r++) {
- var a = s[r], u = t.get(a);
- u || ((u = new Set).add(d.getSnippetSuggestSupport()), t.set(a, u)), u.add(o)
- }
- var c = function (n) {
- if (!n) {
- var i = e._editor.getPosition();
- n = e._editor.getModel().getLineContent(i.lineNumber).substr(0, i.column - 1)
- }
- var o = ""
- ;g.isLowSurrogate(n.charCodeAt(n.length - 1)) ? g.isHighSurrogate(n.charCodeAt(n.length - 2)) && (o = n.substr(n.length - 2)) : o = n.charAt(n.length - 1);
- var r = t.get(o);
- if (r) {
- var s = e._completionModel ? e._completionModel.adopt(r) : void 0;
- e.trigger({auto: !0, shy: !1, triggerCharacter: o}, Boolean(e._completionModel), r, s)
- }
- };
- this._triggerCharacterListener.add(this._editor.onDidType(c)), this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(c))
- }
- }, Object.defineProperty(e.prototype, "state", {
- get: function () {
- return this._state
- }, enumerable: !0, configurable: !0
- }), e.prototype.cancel = function (e) {
- void 0 === e && (e = !1), 0 !== this._state && (this._triggerQuickSuggest.cancel(), this._requestToken && (this._requestToken.cancel(), this._requestToken = void 0), this._state = 0, this._completionModel = void 0, this._context = void 0, this._onDidCancel.fire({retrigger: e}))
- }, e.prototype.clear = function () {
- this._completionDisposables.clear()
- }, e.prototype._updateActiveSuggestSession = function () {
- 0 !== this._state && (this._editor.hasModel() && l.CompletionProviderRegistry.has(this._editor.getModel()) ? this.trigger({
- auto: 2 === this._state,
- shy: !1
- }, !0) : this.cancel())
- }, e.prototype._onCursorChange = function (e) {
- var t = this;
- if (this._editor.hasModel()) {
- var n = this._editor.getModel(), i = this._currentSelection;
- if (this._currentSelection = this._editor.getSelection(), !e.selection.isEmpty() || 0 !== e.reason || "keyboard" !== e.source && "deleteLeft" !== e.source) this.cancel(); else if (l.CompletionProviderRegistry.has(n) && 0 === this._state) {
- if (!1 === this._editor.getOption(66)) return;
- if (!i.containsRange(this._currentSelection) && !i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) return;
- if (this._editor.getOption(89).snippetsPreventQuickSuggestions && c.SnippetController2.get(this._editor).isInSnippet()) return;
- this.cancel(), this._triggerQuickSuggest.cancelAndSet((function () {
- if (0 === t._state && f.shouldAutoTrigger(t._editor) && t._editor.hasModel()) {
- var e = t._editor.getModel(), n = t._editor.getPosition(), i = t._editor.getOption(66)
- ;
- if (!1 !== i) {
- if (!0 === i) ; else {
- e.tokenizeIfCheap(n.lineNumber);
- var o = e.getLineTokens(n.lineNumber),
- r = o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column - 1 - 1, 0)));
- if (!(i.other && 0 === r || i.comments && 1 === r || i.strings && 2 === r)) return
- }
- t.trigger({auto: !0, shy: !1})
- }
- }
- }), this._quickSuggestDelay)
- }
- }
- }, e.prototype._refilterCompletionItems = function () {
- var e = this;
- Promise.resolve().then((function () {
- if (0 !== e._state && e._editor.hasModel()) {
- var t = e._editor.getModel(), n = e._editor.getPosition(), i = new f(t, n, 2 === e._state, !1);
- e._onNewContext(i)
- }
- }))
- }, e.prototype.trigger = function (t, i, r, a) {
- var l = this;
- if (void 0 === i && (i = !1), this._editor.hasModel()) {
- var c, g = this._editor.getModel(), m = t.auto, v = new f(g, this._editor.getPosition(), m, t.shy);
- this.cancel(i), this._state = m ? 2 : 1, this._onDidTrigger.fire({
- auto: m,
- shy: t.shy,
- position: this._editor.getPosition()
- }), this._context = v, c = t.triggerCharacter ? {
- triggerKind: 1,
- triggerCharacter: t.triggerCharacter
- } : r && r.size > 0 ? {triggerKind: 2} : {triggerKind: 0}, this._requestToken = new h.CancellationTokenSource
- ;var _ = this._editor.getOption(86), y = 1;
- switch (_) {
- case"top":
- y = 0;
- break;
- case"bottom":
- y = 2
- }
- var C = e._createItemKindFilter(this._editor),
- b = p.WordDistance.create(this._editorWorker, this._editor),
- S = d.provideSuggestionItems(g, this._editor.getPosition(), new d.CompletionOptions(y, C, r), c, this._requestToken.token);
- Promise.all([S, b]).then((function (e) {
- var i = e[0], o = e[1];
- if (s.dispose(l._requestToken), 0 !== l._state && l._editor.hasModel()) {
- var r = l._editor.getModel();
- if (n.isNonEmptyArray(a)) {
- var c = d.getSuggestionComparator(y);
- i = i.concat(a).sort(c)
- }
- var h = new f(r, l._editor.getPosition(), m, t.shy);
- l._completionModel = new u.CompletionModel(i, l._context.column, {
- leadingLineContent: h.leadingLineContent,
- characterCountDelta: h.column - l._context.column
- }, o, l._editor.getOption(89), l._editor.getOption(86));
- for (var p = 0, g = i; p < g.length; p++) {
- var v = g[p];
- s.isDisposable(v.container) && l._completionDisposables.add(v.container)
- }
- l._onNewContext(h)
- }
- })).catch(o.onUnexpectedError)
- }
- }, e._createItemKindFilter = function (e) {
- var t = new Set
- ;"none" === e.getOption(86) && t.add(25);
- var n = e.getOption(89);
- return n.showMethods || t.add(0), n.showFunctions || t.add(1), n.showConstructors || t.add(2), n.showFields || t.add(3), n.showVariables || t.add(4), n.showClasses || t.add(5), n.showStructs || t.add(6), n.showInterfaces || t.add(7), n.showModules || t.add(8), n.showProperties || t.add(9), n.showEvents || t.add(10), n.showOperators || t.add(11), n.showUnits || t.add(12), n.showValues || t.add(13), n.showConstants || t.add(14), n.showEnums || t.add(15), n.showEnumMembers || t.add(16), n.showKeywords || t.add(17), n.showWords || t.add(18), n.showColors || t.add(19), n.showFiles || t.add(20), n.showReferences || t.add(21), n.showColors || t.add(22), n.showFolders || t.add(23), n.showTypeParameters || t.add(24), n.showSnippets || t.add(25), t
- }, e.prototype._onNewContext = function (e) {
- if (this._context) if (e.lineNumber === this._context.lineNumber) {
- if (e.leadingWord.startColumn < this._context.leadingWord.startColumn) this.cancel(); else if (e.column < this._context.column) e.leadingWord.word ? this.trigger({
- auto: this._context.auto, shy: !1
- }, !0) : this.cancel(); else if (this._completionModel) if (e.column > this._context.column && this._completionModel.incomplete.size > 0 && 0 !== e.leadingWord.word.length) {
- var t = this._completionModel.incomplete, n = this._completionModel.adopt(t);
- this.trigger({auto: 2 === this._state, shy: !1}, !0, t, n)
- } else {
- var i = this._completionModel.lineContext, o = !1;
- if (this._completionModel.lineContext = {
- leadingLineContent: e.leadingLineContent,
- characterCountDelta: e.column - this._context.column
- }, 0 === this._completionModel.items.length) {
- if (f.shouldAutoTrigger(this._editor) && this._context.leadingWord.endColumn < e.leadingWord.startColumn) return void this.trigger({
- auto: this._context.auto,
- shy: !1
- }, !0);
- if (this._context.auto) return void this.cancel();
- if (this._completionModel.lineContext = i, (o = this._completionModel.items.length > 0) && 0 === e.leadingWord.word.length) return void this.cancel()
- }
- this._onDidSuggest.fire({
- completionModel: this._completionModel,
- auto: this._context.auto,
- shy: this._context.shy,
- isFrozen: o
- })
- }
- } else this.cancel()
- }, e
- }();
- t.SuggestModel = m
- }))
- ;a = this && this.__spreadArrays || function () {
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
- var i = Array(e), o = 0;
- for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
- return i
- };
- define(n[610], i([0, 1, 50, 19, 10, 36, 2, 12, 58, 3, 23, 173, 151, 521, 467, 29, 18, 11, 86, 120, 497, 609, 585, 498, 4, 62, 15, 21, 390, 16, 391]), (function (e, t, n, i, o, s, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0});
- var A = !1, F = function () {
- function e(e, t) {
- if (this._model = e, this._position = t, e.getLineMaxColumn(t.lineNumber) !== t.column) {
- var n = e.getOffsetAt(t), i = e.getPositionAt(n + 1);
- this._marker = e.deltaDecorations([], [{
- range: p.Range.fromPositions(t, i),
- options: {stickiness: 1}
- }])
- }
- }
- return e.prototype.dispose = function () {
- this._marker && !this._model.isDisposed() && this._model.deltaDecorations(this._marker, [])
- }, e.prototype.delta = function (e) {
- if (this._model.isDisposed() || this._position.lineNumber !== e.lineNumber) return 0;
- if (this._marker) {
- var t = this._model.getDecorationRange(this._marker[0]);
- return this._model.getOffsetAt(t.getStartPosition()) - this._model.getOffsetAt(e)
- }
- return this._model.getLineMaxColumn(e.lineNumber) - e.column
- }, e
- }(), W = function () {
- function e(e, t, n, i, o, r) {
- var a = this;
- this._memoryService = n, this._commandService = i, this._contextKeyService = o, this._instantiationService = r, this._lineSuffix = new u.MutableDisposable, this._toDispose = new u.DisposableStore, this.editor = e, this.model = new D.SuggestModel(this.editor, t), this.widget = this._toDispose.add(new k.IdleValue((function () {
- var e = a._instantiationService.createInstance(N.SuggestWidget, a.editor);
- a._toDispose.add(e), a._toDispose.add(e.onDidSelect((function (e) {
- return a._insertSuggestion(e, 0)
- }), a));
- var t = new R.CommitCharacterController(a.editor, e, (function (e) {
- return a._insertSuggestion(e, 2)
- }));
- a._toDispose.add(t), a._toDispose.add(a.model.onDidSuggest((function (e) {
- 0 === e.completionModel.items.length && t.reset()
- })));
- var n = E.Context.MakesTextEdit.bindTo(a._contextKeyService)
- ;
- return a._toDispose.add(e.onDidFocus((function (e) {
- var t = e.item, i = a.editor.getPosition(), o = t.editStart.column, r = i.column, s = !0;
- "smart" !== a.editor.getOption(1) || 2 !== a.model.state || t.completion.command || t.completion.additionalTextEdits || 4 & t.completion.insertTextRules || r - o !== t.completion.insertText.length || (s = a.editor.getModel().getValueInRange({
- startLineNumber: i.lineNumber,
- startColumn: o,
- endLineNumber: i.lineNumber,
- endColumn: r
- }) !== t.completion.insertText);
- n.set(s)
- }))), a._toDispose.add(u.toDisposable((function () {
- return n.reset()
- }))), a._toDispose.add(e.onDetailsKeyDown((function (e) {
- e.toKeybinding().equals(new s.SimpleKeybinding(!0, !1, !1, !1, 33)) || O.isMacintosh && e.toKeybinding().equals(new s.SimpleKeybinding(!1, !1, !1, !0, 33)) ? e.stopPropagation() : e.toKeybinding().isModifierKey() || a.editor.focus()
- }))), e
- }))), this._alternatives = this._toDispose.add(new k.IdleValue((function () {
- return a._toDispose.add(new L.SuggestAlternatives(a.editor, a._contextKeyService))
- }))), this._toDispose.add(r.createInstance(x.WordContextKey, e)),
- this._toDispose.add(this.model.onDidTrigger((function (e) {
- a.widget.getValue().showTriggered(e.auto, e.shy ? 250 : 50), a._lineSuffix.value = new F(a.editor.getModel(), e.position)
- }))), this._toDispose.add(this.model.onDidSuggest((function (e) {
- if (!e.shy) {
- var t = a._memoryService.select(a.editor.getModel(), a.editor.getPosition(), e.completionModel.items);
- a.widget.getValue().showSuggestions(e.completionModel, t, e.isFrozen, e.auto)
- }
- }))), this._toDispose.add(this.model.onDidCancel((function (e) {
- e.retrigger || a.widget.getValue().hideWidget()
- }))), this._toDispose.add(this.editor.onDidBlurEditorWidget((function () {
- A || (a.model.cancel(), a.model.clear())
- })));
- var l = E.Context.AcceptSuggestionsOnEnter.bindTo(o), d = function () {
- var e = a.editor.getOption(1);
- l.set("on" === e || "smart" === e)
- };
- this._toDispose.add(this.editor.onDidChangeConfiguration((function () {
- return d()
- }))), d(), this._toDispose.add(new P.SuggestRangeHighlighter(this))
- }
- return e.get = function (t) {
- return t.getContribution(e.ID)
- }, e.prototype.dispose = function () {
- this._alternatives.dispose(),
- this._toDispose.dispose(), this.widget.dispose(), this.model.dispose(), this._lineSuffix.dispose()
- }, e.prototype._insertSuggestion = function (e, t) {
- var n, i = this;
- if (!e || !e.item) return this._alternatives.getValue().reset(), this.model.cancel(), void this.model.clear();
- if (this.editor.hasModel()) {
- var r = this.editor.getModel(), s = r.getAlternativeVersionId(), l = e.item, u = l.completion;
- 1 & t || this.editor.pushUndoStop();
- var d = this.getOverwriteInfo(l, Boolean(8 & t));
- this._memoryService.memorize(r, this.editor.getPosition(), l), Array.isArray(u.additionalTextEdits) && this.editor.executeEdits("suggestController.additionalTextEdits", u.additionalTextEdits.map((function (e) {
- return c.EditOperation.replace(p.Range.lift(e.range), e.text)
- })));
- var h = u.insertText;
- 4 & u.insertTextRules || (h = v.SnippetParser.escape(h)), m.SnippetController2.get(this.editor).insert(h, {
- overwriteBefore: d.overwriteBefore,
- overwriteAfter: d.overwriteAfter,
- undoStopBefore: !1,
- undoStopAfter: !1,
- adjustWhitespace: !(1 & u.insertTextRules)
- }), 2 & t || this.editor.pushUndoStop(),
- u.command ? u.command.id === B.id ? this.model.trigger({
- auto: !0,
- shy: !1
- }, !0) : ((n = this._commandService).executeCommand.apply(n, a([u.command.id], u.command.arguments ? a(u.command.arguments) : [])).catch(o.onUnexpectedError).finally((function () {
- return i.model.clear()
- })), this.model.cancel()) : (this.model.cancel(), this.model.clear()), 4 & t && this._alternatives.getValue().set(e, (function (e) {
- for (; r.canUndo();) {
- s !== r.getAlternativeVersionId() && r.undo(), i._insertSuggestion(e, 3 | (8 & t ? 8 : 0));
- break
- }
- })), this._alertCompletionItem(e.item)
- }
- }, e.prototype.getOverwriteInfo = function (e, t) {
- T.assertType(this.editor.hasModel());
- var n = "replace" === this.editor.getOption(89).insertMode;
- t && (n = !n);
- var i = e.position.column - e.editStart.column,
- o = (n ? e.editReplaceEnd.column : e.editInsertEnd.column) - e.position.column;
- return {
- overwriteBefore: i + (this.editor.getPosition().column - e.position.column),
- overwriteAfter: o + (this._lineSuffix.value ? this._lineSuffix.value.delta(this.editor.getPosition()) : 0)
- }
- }, e.prototype._alertCompletionItem = function (e) {
- var t = e.completion, o = "string" == typeof t.label ? t.label : t.label.name;
- if (i.isNonEmptyArray(t.additionalTextEdits)) {
- var r = y.localize(0, null, o, t.additionalTextEdits.length);
- n.alert(r)
- }
- }, e.prototype.triggerSuggest = function (e) {
- this.editor.hasModel() && (this.model.trigger({
- auto: !1,
- shy: !1
- }, !1, e), this.editor.revealLine(this.editor.getPosition().lineNumber, 0), this.editor.focus())
- }, e.prototype.triggerSuggestAndAcceptBest = function (e) {
- var t = this;
- if (this.editor.hasModel()) {
- var n = this.editor.getPosition(), i = function () {
- n.equals(t.editor.getPosition()) && t._commandService.executeCommand(e.fallback)
- };
- I.Event.once(this.model.onDidTrigger)((function (e) {
- var n = [];
- I.Event.any(t.model.onDidTrigger, t.model.onDidCancel)((function () {
- u.dispose(n), i()
- }), void 0, n), t.model.onDidSuggest((function (e) {
- var o = e.completionModel;
- if (u.dispose(n), 0 !== o.items.length) {
- var r = t._memoryService.select(t.editor.getModel(), t.editor.getPosition(), o.items),
- s = o.items[r];
- !function (e) {
- if (4 & e.completion.insertTextRules || e.completion.additionalTextEdits) return !0
- ;
- var n = t.editor.getPosition(), i = e.editStart.column, o = n.column;
- return o - i !== e.completion.insertText.length || t.editor.getModel().getValueInRange({
- startLineNumber: n.lineNumber,
- startColumn: i,
- endLineNumber: n.lineNumber,
- endColumn: o
- }) !== e.completion.insertText
- }(s) ? i() : (t.editor.pushUndoStop(), t._insertSuggestion({
- index: r,
- item: s,
- model: o
- }, 7))
- } else i()
- }), void 0, n)
- })), this.model.trigger({
- auto: !1,
- shy: !0
- }), this.editor.revealLine(n.lineNumber, 0), this.editor.focus()
- }
- }, e.prototype.acceptSelectedSuggestion = function (e, t) {
- var n = this.widget.getValue().getFocusedItem(), i = 0;
- e && (i |= 4), t && (i |= 8), this._insertSuggestion(n, i)
- }, e.prototype.acceptNextSuggestion = function () {
- this._alternatives.getValue().next()
- }, e.prototype.acceptPrevSuggestion = function () {
- this._alternatives.getValue().prev()
- }, e.prototype.cancelSuggestWidget = function () {
- this.model.cancel(), this.model.clear(), this.widget.getValue().hideWidget()
- }, e.prototype.selectNextSuggestion = function () {
- this.widget.getValue().selectNext()
- }, e.prototype.selectNextPageSuggestion = function () {
- this.widget.getValue().selectNextPage()
- }, e.prototype.selectLastSuggestion = function () {
- this.widget.getValue().selectLast()
- }, e.prototype.selectPrevSuggestion = function () {
- this.widget.getValue().selectPrevious()
- }, e.prototype.selectPrevPageSuggestion = function () {
- this.widget.getValue().selectPreviousPage()
- }, e.prototype.selectFirstSuggestion = function () {
- this.widget.getValue().selectFirst()
- }, e.prototype.toggleSuggestionDetails = function () {
- this.widget.getValue().toggleDetails()
- }, e.prototype.toggleExplainMode = function () {
- this.widget.getValue().toggleExplainMode()
- }, e.prototype.toggleSuggestionFocus = function () {
- this.widget.getValue().toggleDetailsFocus()
- }, e.ID = "editor.contrib.suggestController", e = h([g(1, M.IEditorWorkerService), g(2, _.ISuggestMemoryService), g(3, C.ICommandService), g(4, b.IContextKeyService), g(5, S.IInstantiationService)], e)
- }();
- t.SuggestController = W;
- var B = function (e) {
- function t() {
- return e.call(this, {
- id: t.id,
- label: y.localize(1, null),
- alias: "Trigger Suggest",
- precondition: b.ContextKeyExpr.and(f.EditorContextKeys.writable, f.EditorContextKeys.hasCompletionItemProvider),
- kbOpts: {
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 2058,
- mac: {primary: 266, secondary: [521]},
- weight: 100
- }
- }) || this
- }
- return r(t, e), t.prototype.run = function (e, t) {
- var n = W.get(t);
- n && n.triggerSuggest()
- }, t.id = "editor.action.triggerSuggest", t
- }(d.EditorAction);
- t.TriggerSuggestAction = B, d.registerEditorContribution(W.ID, W), d.registerEditorAction(B);
- var V = d.EditorCommand.bindToContribution(W.get);
- d.registerEditorCommand(new V({
- id: "acceptSelectedSuggestion",
- precondition: E.Context.Visible,
- handler: function (e) {
- e.acceptSelectedSuggestion(!0, !1)
- }
- })), w.KeybindingsRegistry.registerKeybindingRule({
- id: "acceptSelectedSuggestion",
- when: b.ContextKeyExpr.and(E.Context.Visible, f.EditorContextKeys.textInputFocus),
- primary: 2,
- weight: 190
- }), w.KeybindingsRegistry.registerKeybindingRule({
- id: "acceptSelectedSuggestion",
- when: b.ContextKeyExpr.and(E.Context.Visible, f.EditorContextKeys.textInputFocus, E.Context.AcceptSuggestionsOnEnter, E.Context.MakesTextEdit),
- primary: 3,
- weight: 190
- }), d.registerEditorCommand(new V({
- id: "acceptAlternativeSelectedSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, f.EditorContextKeys.textInputFocus),
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1027, secondary: [1026]},
- handler: function (e) {
- e.acceptSelectedSuggestion(!1, !0)
- }
- })), C.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter", "acceptSelectedSuggestion"), d.registerEditorCommand(new V({
- id: "hideSuggestWidget",
- precondition: E.Context.Visible,
- handler: function (e) {
- return e.cancelSuggestWidget()
- },
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 9, secondary: [1033]}
- })), d.registerEditorCommand(new V({
- id: "selectNextSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
- handler: function (e) {
- return e.selectNextSuggestion()
- },
- kbOpts: {
- weight: 190,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 18,
- secondary: [2066],
- mac: {primary: 18, secondary: [2066, 300]}
- }
- })), d.registerEditorCommand(new V({
- id: "selectNextPageSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
- handler: function (e) {
- return e.selectNextPageSuggestion()
- },
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 12, secondary: [2060]}
- })), d.registerEditorCommand(new V({
- id: "selectLastSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
- handler: function (e) {
- return e.selectLastSuggestion()
- }
- })), d.registerEditorCommand(new V({
- id: "selectPrevSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
- handler: function (e) {
- return e.selectPrevSuggestion()
- },
- kbOpts: {
- weight: 190,
- kbExpr: f.EditorContextKeys.textInputFocus,
- primary: 16,
- secondary: [2064],
- mac: {primary: 16, secondary: [2064, 302]}
- }
- })), d.registerEditorCommand(new V({
- id: "selectPrevPageSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
- handler: function (e) {
- return e.selectPrevPageSuggestion()
- },
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 11, secondary: [2059]}
- })), d.registerEditorCommand(new V({
- id: "selectFirstSuggestion",
- precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
- handler: function (e) {
- return e.selectFirstSuggestion()
- }
- })), d.registerEditorCommand(new V({
- id: "toggleSuggestionDetails",
- precondition: E.Context.Visible,
- handler: function (e) {
- return e.toggleSuggestionDetails()
- },
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2058, mac: {primary: 266}}
- })), d.registerEditorCommand(new V({
- id: "toggleExplainMode",
- precondition: E.Context.Visible,
- handler: function (e) {
- return e.toggleExplainMode()
- },
- kbOpts: {weight: 100, primary: 2133}
- })), d.registerEditorCommand(new V({
- id: "toggleSuggestionFocus", precondition: E.Context.Visible, handler: function (e) {
- return e.toggleSuggestionFocus()
- }, kbOpts: {
- weight: 190,
- kbExpr: f.EditorContextKeys.textInputFocus, primary: 2570, mac: {primary: 778}
- }
- })), d.registerEditorCommand(new V({
- id: "insertBestCompletion",
- precondition: b.ContextKeyExpr.and(b.ContextKeyExpr.equals("config.editor.tabCompletion", "on"), x.WordContextKey.AtEnd, E.Context.Visible.toNegated(), L.SuggestAlternatives.OtherSuggestions.toNegated(), m.SnippetController2.InSnippetMode.toNegated()),
- handler: function (e, t) {
- e.triggerSuggestAndAcceptBest(T.isObject(t) ? l({fallback: "tab"}, t) : {fallback: "tab"})
- },
- kbOpts: {weight: 190, primary: 2}
- })), d.registerEditorCommand(new V({
- id: "insertNextSuggestion",
- precondition: b.ContextKeyExpr.and(b.ContextKeyExpr.equals("config.editor.tabCompletion", "on"), L.SuggestAlternatives.OtherSuggestions, E.Context.Visible.toNegated(), m.SnippetController2.InSnippetMode.toNegated()),
- handler: function (e) {
- return e.acceptNextSuggestion()
- },
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2}
- })), d.registerEditorCommand(new V({
- id: "insertPrevSuggestion",
- precondition: b.ContextKeyExpr.and(b.ContextKeyExpr.equals("config.editor.tabCompletion", "on"), L.SuggestAlternatives.OtherSuggestions, E.Context.Visible.toNegated(), m.SnippetController2.InSnippetMode.toNegated()),
- handler: function (e) {
- return e.acceptPrevSuggestion()
- },
- kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1026}
- }))
- })), define(n[611], i([0, 1, 164, 121, 230, 188, 566, 524, 525, 526, 579, 569, 223, 530, 531, 532, 533, 232, 574, 534, 536, 235, 236, 237, 601, 576, 539, 577, 580, 582, 584, 541, 173, 610, 542, 225, 586, 226, 543, 59]), (function (e, t) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0})
- })), define(n[615], i([0, 1, 605, 611, 587, 544, 588, 589, 590, 591, 597, 545]), (function (e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
- for (var n in e) t.hasOwnProperty(n) || (t[n] = e[n])
- }(n)
- }))
- }).call(this);
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * monaco-typescript version: 3.7.0(887411e17c69d048791cdbb2763496bd6bcd133a)
- * Released under the MIT license
- * https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md
- *-----------------------------------------------------------------------------*/
- define("vs/language/typescript/lib/typescriptServicesMetadata", ["require", "exports"], (function (t, e) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0}), e.typescriptVersion = "3.7.5"
- })), define("vs/language/typescript/monaco.contribution", ["require", "exports", "./lib/typescriptServicesMetadata", "vs/editor/editor.api"], (function (t, e, n) {
- "use strict";
- Object.defineProperty(e, "__esModule", {value: !0});
- var i, o, r, s, a, c = monaco.Emitter, u = function () {
- function t(t, e) {
- this._onDidChange = new c, this._onDidExtraLibsChange = new c, this._extraLibs = Object.create(null), this._eagerModelSync = !1, this.setCompilerOptions(t), this.setDiagnosticsOptions(e), this._onDidExtraLibsChangeTimeout = -1
- }
- return Object.defineProperty(t.prototype, "onDidChange", {
- get: function () {
- return this._onDidChange.event
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(t.prototype, "onDidExtraLibsChange", {
- get: function () {
- return this._onDidExtraLibsChange.event
- }, enumerable: !0, configurable: !0
- }), t.prototype.getExtraLibs = function () {
- return this._extraLibs
- }, t.prototype.addExtraLib = function (t, e) {
- var n, i = this;
- if (n = void 0 === e ? "ts:extralib-" + Math.random().toString(36).substring(2, 15) : e, this._extraLibs[n] && this._extraLibs[n].content === t) return {
- dispose: function () {
- }
- };
- var o = 1;
- return this._extraLibs[n] && (o = this._extraLibs[n].version + 1), this._extraLibs[n] = {
- content: t,
- version: o
- }, this._fireOnDidExtraLibsChangeSoon(), {
- dispose: function () {
- var t = i._extraLibs[n];
- t && t.version === o && (delete i._extraLibs[n], i._fireOnDidExtraLibsChangeSoon())
- }
- }
- }, t.prototype.setExtraLibs = function (t) {
- if (this._extraLibs = Object.create(null), t && t.length > 0) for (var e = 0, n = t; e < n.length; e++) {
- var i = n[e], o = i.filePath || "ts:extralib-" + Math.random().toString(36).substring(2, 15),
- r = i.content;
- this._extraLibs[o] = {content: r, version: 1}
- }
- this._fireOnDidExtraLibsChangeSoon()
- }, t.prototype._fireOnDidExtraLibsChangeSoon = function () {
- var t = this;
- -1 === this._onDidExtraLibsChangeTimeout && (this._onDidExtraLibsChangeTimeout = setTimeout((function () {
- t._onDidExtraLibsChangeTimeout = -1, t._onDidExtraLibsChange.fire(void 0)
- }), 0))
- }, t.prototype.getCompilerOptions = function () {
- return this._compilerOptions
- }, t.prototype.setCompilerOptions = function (t) {
- this._compilerOptions = t || Object.create(null), this._onDidChange.fire(void 0)
- }, t.prototype.getDiagnosticsOptions = function () {
- return this._diagnosticsOptions
- }, t.prototype.setDiagnosticsOptions = function (t) {
- this._diagnosticsOptions = t || Object.create(null), this._onDidChange.fire(void 0)
- }, t.prototype.setMaximumWorkerIdleTime = function (t) {
- }, t.prototype.setEagerModelSync = function (t) {
- this._eagerModelSync = t
- }, t.prototype.getEagerModelSync = function () {
- return this._eagerModelSync
- }, t
- }();
- e.LanguageServiceDefaultsImpl = u, function (t) {
- t[t.None = 0] = "None", t[t.CommonJS = 1] = "CommonJS", t[t.AMD = 2] = "AMD", t[t.UMD = 3] = "UMD", t[t.System = 4] = "System", t[t.ES2015 = 5] = "ES2015", t[t.ESNext = 99] = "ESNext"
- }(i || (i = {})), function (t) {
- t[t.None = 0] = "None", t[t.Preserve = 1] = "Preserve", t[t.React = 2] = "React", t[t.ReactNative = 3] = "ReactNative"
- }(o || (o = {})), function (t) {
- t[t.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", t[t.LineFeed = 1] = "LineFeed"
- }(r || (r = {})), function (t) {
- t[t.ES3 = 0] = "ES3", t[t.ES5 = 1] = "ES5", t[t.ES2015 = 2] = "ES2015", t[t.ES2016 = 3] = "ES2016", t[t.ES2017 = 4] = "ES2017", t[t.ES2018 = 5] = "ES2018", t[t.ES2019 = 6] = "ES2019", t[t.ES2020 = 7] = "ES2020", t[t.ESNext = 99] = "ESNext", t[t.JSON = 100] = "JSON", t[t.Latest = 99] = "Latest"
- }(s || (s = {})), function (t) {
- t[t.Classic = 1] = "Classic", t[t.NodeJs = 2] = "NodeJs"
- }(a || (a = {}));
- var p = new u({allowNonTsExtensions: !0, target: s.Latest}, {noSemanticValidation: !1, noSyntaxValidation: !1}),
- g = new u({allowNonTsExtensions: !0, allowJs: !0, target: s.Latest}, {
- noSemanticValidation: !0,
- noSyntaxValidation: !1
- });
- function d() {
- return f().then((function (t) {
- return t.getTypeScriptWorker()
- }))
- }
- function l() {
- return f().then((function (t) {
- return t.getJavaScriptWorker()
- }))
- }
- function f() {
- return new Promise((function (e, n) {
- t(["./tsMode"], e, n)
- }))
- }
- monaco.languages.typescript = {
- ModuleKind: i,
- JsxEmit: o,
- NewLineKind: r,
- ScriptTarget: s,
- ModuleResolutionKind: a,
- typescriptVersion: n.typescriptVersion,
- typescriptDefaults: p,
- javascriptDefaults: g,
- getTypeScriptWorker: d,
- getJavaScriptWorker: l
- }, monaco.languages.onLanguage("typescript", (function () {
- return f().then((function (t) {
- return t.setupTypeScript(p)
- }))
- })), monaco.languages.onLanguage("javascript", (function () {
- return f().then((function (t) {
- return t.setupJavaScript(g)
- }))
- }))
- }));
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * monaco-css version: 2.7.0(cbf1d6a12b013bb7e773531de7b4f30989e6e4d7)
- * Released under the MIT license
- * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
- *-----------------------------------------------------------------------------*/
- define("vs/language/css/monaco.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, n) {
- "use strict";
- Object.defineProperty(n, "__esModule", {value: !0});
- var o = monaco.Emitter, t = function () {
- function e(e, n, t) {
- this._onDidChange = new o, this._languageId = e, this.setDiagnosticsOptions(n), this.setModeConfiguration(t)
- }
- return Object.defineProperty(e.prototype, "onDidChange", {
- get: function () {
- return this._onDidChange.event
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "languageId", {
- get: function () {
- return this._languageId
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "modeConfiguration", {
- get: function () {
- return this._modeConfiguration
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "diagnosticsOptions", {
- get: function () {
- return this._diagnosticsOptions
- }, enumerable: !0, configurable: !0
- }), e.prototype.setDiagnosticsOptions = function (e) {
- this._diagnosticsOptions = e || Object.create(null), this._onDidChange.fire(this)
- }, e.prototype.setModeConfiguration = function (e) {
- this._modeConfiguration = e || Object.create(null), this._onDidChange.fire(this)
- }, e
- }();
- n.LanguageServiceDefaultsImpl = t;
- var i = {
- validate: !0,
- lint: {
- compatibleVendorPrefixes: "ignore",
- vendorPrefix: "warning",
- duplicateProperties: "warning",
- emptyRules: "warning",
- importStatement: "ignore",
- boxModel: "ignore",
- universalSelector: "ignore",
- zeroUnits: "ignore",
- fontFaceProperties: "warning",
- hexColorLength: "error",
- argumentsInColorFunction: "error",
- unknownProperties: "warning",
- ieHack: "ignore",
- unknownVendorSpecificProperties: "ignore",
- propertyIgnoredDueToDisplay: "warning",
- important: "ignore",
- float: "ignore",
- idSelector: "ignore"
- }
- }, r = {
- completionItems: !0,
- hovers: !0,
- documentSymbols: !0,
- definitions: !0,
- references: !0,
- documentHighlights: !0,
- rename: !0,
- colors: !0,
- foldingRanges: !0,
- diagnostics: !0,
- selectionRanges: !0
- }, s = new t("css", i, r), a = new t("scss", i, r), u = new t("less", i, r);
- function g() {
- return new Promise((function (n, o) {
- e(["./cssMode"], n, o)
- }))
- }
- monaco.languages.css = {
- cssDefaults: s,
- lessDefaults: u,
- scssDefaults: a
- }, monaco.languages.onLanguage("less", (function () {
- g().then((function (e) {
- return e.setupMode(u)
- }))
- })), monaco.languages.onLanguage("scss", (function () {
- g().then((function (e) {
- return e.setupMode(a)
- }))
- })), monaco.languages.onLanguage("css", (function () {
- g().then((function (e) {
- return e.setupMode(s)
- }))
- }))
- }));
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * monaco-json version: 2.9.0(47ee25bf887cd3f9fea208f31f1092d57acad2e0)
- * Released under the MIT license
- * https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md
- *-----------------------------------------------------------------------------*/
- define("vs/language/json/monaco.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, n) {
- "use strict";
- Object.defineProperty(n, "__esModule", {value: !0});
- var t = monaco.Emitter, o = function () {
- function e(e, n, o) {
- this._onDidChange = new t, this._languageId = e, this.setDiagnosticsOptions(n), this.setModeConfiguration(o)
- }
- return Object.defineProperty(e.prototype, "onDidChange", {
- get: function () {
- return this._onDidChange.event
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "languageId", {
- get: function () {
- return this._languageId
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "modeConfiguration", {
- get: function () {
- return this._modeConfiguration
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "diagnosticsOptions", {
- get: function () {
- return this._diagnosticsOptions
- }, enumerable: !0, configurable: !0
- }), e.prototype.setDiagnosticsOptions = function (e) {
- this._diagnosticsOptions = e || Object.create(null), this._onDidChange.fire(this)
- }, e.prototype.setModeConfiguration = function (e) {
- this._modeConfiguration = e || Object.create(null), this._onDidChange.fire(this)
- }, e
- }();
- n.LanguageServiceDefaultsImpl = o;
- var i = new o("json", {
- validate: !0,
- allowComments: !0,
- schemas: [],
- enableSchemaRequest: !1
- }, {
- documentFormattingEdits: !0,
- documentRangeFormattingEdits: !0,
- completionItems: !0,
- hovers: !0,
- documentSymbols: !0,
- tokens: !0,
- colors: !0,
- foldingRanges: !0,
- diagnostics: !0,
- selectionRanges: !0
- });
- monaco.languages.json = {jsonDefaults: i}, monaco.languages.register({
- id: "json",
- extensions: [".json", ".bowerrc", ".jshintrc", ".jscsrc", ".eslintrc", ".babelrc", ".har"],
- aliases: ["JSON", "json"],
- mimetypes: ["application/json"]
- }), monaco.languages.onLanguage("json", (function () {
- new Promise((function (n, t) {
- e(["./jsonMode"], n, t)
- })).then((function (e) {
- return e.setupMode(i)
- }))
- }))
- }));
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * monaco-html version: 2.7.0(7d0bb2e5e3dcf1252779486a5fc5be658f1fadc1)
- * Released under the MIT license
- * https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
- *-----------------------------------------------------------------------------*/
- define("vs/language/html/monaco.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, n) {
- "use strict";
- Object.defineProperty(n, "__esModule", {value: !0});
- var t = monaco.Emitter, o = function () {
- function e(e, n, o) {
- this._onDidChange = new t, this._languageId = e, this.setOptions(n), this.setModeConfiguration(o)
- }
- return Object.defineProperty(e.prototype, "onDidChange", {
- get: function () {
- return this._onDidChange.event
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "languageId", {
- get: function () {
- return this._languageId
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "options", {
- get: function () {
- return this._options
- }, enumerable: !0, configurable: !0
- }), Object.defineProperty(e.prototype, "modeConfiguration", {
- get: function () {
- return this._modeConfiguration
- }, enumerable: !0, configurable: !0
- }), e.prototype.setOptions = function (e) {
- this._options = e || Object.create(null), this._onDidChange.fire(this)
- }, e.prototype.setModeConfiguration = function (e) {
- this._modeConfiguration = e || Object.create(null), this._onDidChange.fire(this)
- }, e
- }();
- n.LanguageServiceDefaultsImpl = o;
- var r = {
- tabSize: 4,
- insertSpaces: !1,
- wrapLineLength: 120,
- unformatted: 'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',
- contentUnformatted: "pre",
- indentInnerHtml: !1,
- preserveNewLines: !0,
- maxPreserveNewLines: null,
- indentHandlebars: !1,
- endWithNewline: !1,
- extraLiners: "head, body, /html",
- wrapAttributes: "auto"
- }, a = {format: r, suggest: {html5: !0}}, i = {format: r, suggest: {html5: !0, razor: !0}};
- function u(e) {
- return {
- completionItems: !0,
- hovers: !0,
- documentSymbols: !0,
- links: !0,
- documentHighlights: !0,
- rename: !0,
- colors: !0,
- foldingRanges: !0,
- selectionRanges: !0,
- diagnostics: e === s,
- documentFormattingEdits: e === s,
- documentRangeFormattingEdits: e === s
- }
- }
- var s = "html", g = new o(s, {format: r, suggest: {html5: !0, angular1: !0, ionic: !0}}, u(s)),
- l = new o("handlebars", a, u("handlebars")), c = new o("razor", i, u("razor"));
- function d() {
- return new Promise((function (n, t) {
- e(["./htmlMode"], n, t)
- }))
- }
- monaco.languages.html = {
- htmlDefaults: g,
- razorDefaults: c,
- handlebarDefaults: l
- }, monaco.languages.onLanguage(s, (function () {
- d().then((function (e) {
- return e.setupMode(g)
- }))
- })), monaco.languages.onLanguage("handlebars", (function () {
- d().then((function (e) {
- return e.setupMode(l)
- }))
- })), monaco.languages.onLanguage("razor", (function () {
- d().then((function (e) {
- return e.setupMode(c)
- }))
- }))
- }));
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd)
- * Released under the MIT license
- * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
- *-----------------------------------------------------------------------------*/
- define("vs/basic-languages/_.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, i) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0});
- var t = "undefined" == typeof monaco ? self.monaco : monaco, n = {}, s = {}, r = function () {
- function e(e) {
- var i = this;
- this._languageId = e, this._loadingTriggered = !1, this._lazyLoadPromise = new Promise((function (e, t) {
- i._lazyLoadPromiseResolve = e, i._lazyLoadPromiseReject = t
- }))
- }
- return e.getOrCreate = function (i) {
- return s[i] || (s[i] = new e(i)), s[i]
- }, e.prototype.whenLoaded = function () {
- return this._lazyLoadPromise
- }, e.prototype.load = function () {
- var e = this;
- return this._loadingTriggered || (this._loadingTriggered = !0, n[this._languageId].loader().then((function (i) {
- return e._lazyLoadPromiseResolve(i)
- }), (function (i) {
- return e._lazyLoadPromiseReject(i)
- }))), this._lazyLoadPromise
- }, e
- }();
- i.loadLanguage = function (e) {
- return r.getOrCreate(e).load()
- }, i.registerLanguage = function (e) {
- var i = e.id;
- n[i] = e, t.languages.register(e);
- var s = r.getOrCreate(i);
- t.languages.setMonarchTokensProvider(i, s.whenLoaded().then((function (e) {
- return e.language
- }))), t.languages.onLanguage(i, (function () {
- s.load().then((function (e) {
- t.languages.setLanguageConfiguration(i, e.conf)
- }))
- }))
- }
- })), define("vs/basic-languages/abap/abap.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "abap",
- extensions: [".abap"],
- aliases: ["abap", "ABAP"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./abap"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/apex/apex.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "apex",
- extensions: [".cls"],
- aliases: ["Apex", "apex"],
- mimetypes: ["text/x-apex-source", "text/x-apex"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./apex"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/azcli/azcli.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "azcli",
- extensions: [".azcli"],
- aliases: ["Azure CLI", "azcli"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./azcli"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/bat/bat.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "bat",
- extensions: [".bat", ".cmd"],
- aliases: ["Batch", "bat"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./bat"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/cameligo/cameligo.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "cameligo",
- extensions: [".mligo"],
- aliases: ["Cameligo"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./cameligo"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/clojure/clojure.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "clojure",
- extensions: [".clj", ".cljs", ".cljc", ".edn"],
- aliases: ["clojure", "Clojure"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./clojure"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/coffee/coffee.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "coffeescript",
- extensions: [".coffee"],
- aliases: ["CoffeeScript", "coffeescript", "coffee"],
- mimetypes: ["text/x-coffeescript", "text/coffeescript"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./coffee"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/cpp/cpp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "c",
- extensions: [".c", ".h"],
- aliases: ["C", "c"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./cpp"], i, t)
- }))
- }
- }), t.registerLanguage({
- id: "cpp",
- extensions: [".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx"],
- aliases: ["C++", "Cpp", "cpp"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./cpp"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/csharp/csharp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "csharp",
- extensions: [".cs", ".csx", ".cake"],
- aliases: ["C#", "csharp"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./csharp"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/csp/csp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "csp",
- extensions: [],
- aliases: ["CSP", "csp"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./csp"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/css/css.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "css",
- extensions: [".css"],
- aliases: ["CSS", "css"],
- mimetypes: ["text/css"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./css"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/dockerfile/dockerfile.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "dockerfile",
- extensions: [".dockerfile"],
- filenames: ["Dockerfile"],
- aliases: ["Dockerfile"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./dockerfile"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/fsharp/fsharp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "fsharp",
- extensions: [".fs", ".fsi", ".ml", ".mli", ".fsx", ".fsscript"],
- aliases: ["F#", "FSharp", "fsharp"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./fsharp"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/go/go.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "go",
- extensions: [".go"],
- aliases: ["Go"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./go"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/graphql/graphql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "graphql",
- extensions: [".graphql", ".gql"],
- aliases: ["GraphQL", "graphql", "gql"],
- mimetypes: ["application/graphql"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./graphql"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/handlebars/handlebars.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "handlebars",
- extensions: [".handlebars", ".hbs"],
- aliases: ["Handlebars", "handlebars"],
- mimetypes: ["text/x-handlebars-template"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./handlebars"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/html/html.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "html",
- extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
- aliases: ["HTML", "htm", "html", "xhtml"],
- mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./html"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/ini/ini.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "ini",
- extensions: [".ini", ".properties", ".gitconfig"],
- filenames: ["config", ".gitattributes", ".gitconfig", ".editorconfig"],
- aliases: ["Ini", "ini"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./ini"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/java/java.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "java",
- extensions: [".java", ".jav"],
- aliases: ["Java", "java"],
- mimetypes: ["text/x-java-source", "text/x-java"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./java"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/javascript/javascript.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "javascript",
- extensions: [".js", ".es6", ".jsx"],
- firstLine: "^#!.*\\bnode",
- filenames: ["jakefile"],
- aliases: ["JavaScript", "javascript", "js"],
- mimetypes: ["text/javascript"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./javascript"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/kotlin/kotlin.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "kotlin",
- extensions: [".kt"],
- aliases: ["Kotlin", "kotlin"],
- mimetypes: ["text/x-kotlin-source", "text/x-kotlin"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./kotlin"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/less/less.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "less",
- extensions: [".less"],
- aliases: ["Less", "less"],
- mimetypes: ["text/x-less", "text/less"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./less"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/lua/lua.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "lua",
- extensions: [".lua"],
- aliases: ["Lua", "lua"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./lua"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/markdown/markdown.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "markdown",
- extensions: [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mdtxt", ".mdtext"],
- aliases: ["Markdown", "markdown"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./markdown"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/mips/mips.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "mips",
- extensions: [".s"],
- aliases: ["MIPS", "MIPS-V"],
- mimetypes: ["text/x-mips", "text/mips", "text/plaintext"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./mips"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/msdax/msdax.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "msdax",
- extensions: [".dax", ".msdax"],
- aliases: ["DAX", "MSDAX"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./msdax"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/mysql/mysql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "mysql",
- extensions: [],
- aliases: ["MySQL", "mysql"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./mysql"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/objective-c/objective-c.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "objective-c",
- extensions: [".m"],
- aliases: ["Objective-C"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./objective-c"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/pascal/pascal.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "pascal",
- extensions: [".pas", ".p", ".pp"],
- aliases: ["Pascal", "pas"],
- mimetypes: ["text/x-pascal-source", "text/x-pascal"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./pascal"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/pascaligo/pascaligo.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "pascaligo",
- extensions: [".ligo"],
- aliases: ["Pascaligo", "ligo"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./pascaligo"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/perl/perl.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "perl",
- extensions: [".pl"],
- aliases: ["Perl", "pl"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./perl"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/pgsql/pgsql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "pgsql",
- extensions: [],
- aliases: ["PostgreSQL", "postgres", "pg", "postgre"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./pgsql"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/php/php.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "php",
- extensions: [".php", ".php4", ".php5", ".phtml", ".ctp"],
- aliases: ["PHP", "php"],
- mimetypes: ["application/x-php"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./php"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/postiats/postiats.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "postiats",
- extensions: [".dats", ".sats", ".hats"],
- aliases: ["ATS", "ATS/Postiats"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./postiats"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/powerquery/powerquery.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "powerquery",
- extensions: [".pq", ".pqm"],
- aliases: ["PQ", "M", "Power Query", "Power Query M"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./powerquery"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/powershell/powershell.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "powershell",
- extensions: [".ps1", ".psm1", ".psd1"],
- aliases: ["PowerShell", "powershell", "ps", "ps1"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./powershell"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/pug/pug.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "pug",
- extensions: [".jade", ".pug"],
- aliases: ["Pug", "Jade", "jade"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./pug"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/python/python.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "python",
- extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
- aliases: ["Python", "py"],
- firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
- loader: function () {
- return new Promise((function (i, t) {
- e(["./python"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/r/r.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "r",
- extensions: [".r", ".rhistory", ".rprofile", ".rt"],
- aliases: ["R", "r"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./r"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/razor/razor.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "razor",
- extensions: [".cshtml"],
- aliases: ["Razor", "razor"],
- mimetypes: ["text/x-cshtml"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./razor"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/redis/redis.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "redis",
- extensions: [".redis"],
- aliases: ["redis"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./redis"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/redshift/redshift.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "redshift",
- extensions: [],
- aliases: ["Redshift", "redshift"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./redshift"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/restructuredtext/restructuredtext.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "restructuredtext",
- extensions: [".rst"],
- aliases: ["reStructuredText", "restructuredtext"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./restructuredtext"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/ruby/ruby.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "ruby",
- extensions: [".rb", ".rbx", ".rjs", ".gemspec", ".pp"],
- filenames: ["rakefile"],
- aliases: ["Ruby", "rb"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./ruby"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/rust/rust.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "rust",
- extensions: [".rs", ".rlib"],
- aliases: ["Rust", "rust"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./rust"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/sb/sb.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "sb",
- extensions: [".sb"],
- aliases: ["Small Basic", "sb"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./sb"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/scheme/scheme.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "scheme",
- extensions: [".scm", ".ss", ".sch", ".rkt"],
- aliases: ["scheme", "Scheme"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./scheme"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/scss/scss.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "scss",
- extensions: [".scss"],
- aliases: ["Sass", "sass", "scss"],
- mimetypes: ["text/x-scss", "text/scss"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./scss"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/shell/shell.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "shell",
- extensions: [".sh", ".bash"],
- aliases: ["Shell", "sh"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./shell"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/solidity/solidity.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "sol",
- extensions: [".sol"],
- aliases: ["sol", "solidity", "Solidity"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./solidity"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/sophia/sophia.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "aes",
- extensions: [".aes"],
- aliases: ["aes", "sophia", "Sophia"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./sophia"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/sql/sql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "sql",
- extensions: [".sql"],
- aliases: ["SQL"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./sql"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/st/st.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "st",
- extensions: [".st", ".iecst", ".iecplc", ".lc3lib"],
- aliases: ["StructuredText", "scl", "stl"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./st"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/swift/swift.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "swift",
- aliases: ["Swift", "swift"],
- extensions: [".swift"],
- mimetypes: ["text/swift"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./swift"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/tcl/tcl.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "tcl",
- extensions: [".tcl"],
- aliases: ["tcl", "Tcl", "tcltk", "TclTk", "tcl/tk", "Tcl/Tk"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./tcl"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/twig/twig.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "twig",
- extensions: [".twig"],
- aliases: ["Twig", "twig"],
- mimetypes: ["text/x-twig"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./twig"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/typescript/typescript.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "typescript",
- extensions: [".ts", ".tsx"],
- aliases: ["TypeScript", "ts", "typescript"],
- mimetypes: ["text/typescript"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./typescript"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/vb/vb.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "vb",
- extensions: [".vb"],
- aliases: ["Visual Basic", "vb"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./vb"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/xml/xml.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "xml",
- extensions: [".xml", ".dtd", ".ascx", ".csproj", ".config", ".wxi", ".wxl", ".wxs", ".xaml", ".svg", ".svgz", ".opf", ".xsl"],
- firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
- aliases: ["XML", "xml"],
- mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./xml"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/yaml/yaml.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
- id: "yaml",
- extensions: [".yaml", ".yml"],
- aliases: ["YAML", "yaml", "YML", "yml"],
- mimetypes: ["application/x-yaml"],
- loader: function () {
- return new Promise((function (i, t) {
- e(["./yaml"], i, t)
- }))
- }
- })
- })), define("vs/basic-languages/monaco.contribution", ["require", "exports", "./abap/abap.contribution", "./apex/apex.contribution", "./azcli/azcli.contribution", "./bat/bat.contribution", "./cameligo/cameligo.contribution", "./clojure/clojure.contribution", "./coffee/coffee.contribution", "./cpp/cpp.contribution", "./csharp/csharp.contribution", "./csp/csp.contribution", "./css/css.contribution", "./dockerfile/dockerfile.contribution", "./fsharp/fsharp.contribution", "./go/go.contribution", "./graphql/graphql.contribution", "./handlebars/handlebars.contribution", "./html/html.contribution", "./ini/ini.contribution", "./java/java.contribution", "./javascript/javascript.contribution", "./kotlin/kotlin.contribution", "./less/less.contribution", "./lua/lua.contribution", "./markdown/markdown.contribution", "./mips/mips.contribution", "./msdax/msdax.contribution", "./mysql/mysql.contribution", "./objective-c/objective-c.contribution", "./pascal/pascal.contribution", "./pascaligo/pascaligo.contribution", "./perl/perl.contribution", "./pgsql/pgsql.contribution", "./php/php.contribution", "./postiats/postiats.contribution", "./powerquery/powerquery.contribution", "./powershell/powershell.contribution", "./pug/pug.contribution", "./python/python.contribution", "./r/r.contribution", "./razor/razor.contribution", "./redis/redis.contribution", "./redshift/redshift.contribution", "./restructuredtext/restructuredtext.contribution", "./ruby/ruby.contribution", "./rust/rust.contribution", "./sb/sb.contribution", "./scheme/scheme.contribution", "./scss/scss.contribution", "./shell/shell.contribution", "./solidity/solidity.contribution", "./sophia/sophia.contribution", "./sql/sql.contribution", "./st/st.contribution", "./swift/swift.contribution", "./tcl/tcl.contribution", "./twig/twig.contribution", "./typescript/typescript.contribution", "./vb/vb.contribution", "./xml/xml.contribution", "./yaml/yaml.contribution", "vs/editor/editor.api"], (function (e, i) {
- "use strict";
- Object.defineProperty(i, "__esModule", {value: !0})
- }));
- define("vs/editor/editor.main", ["vs/editor/edcore.main", "vs/language/typescript/monaco.contribution", "vs/language/css/monaco.contribution", "vs/language/json/monaco.contribution", "vs/language/html/monaco.contribution", "vs/basic-languages/monaco.contribution"], function (api) {
- return api;
- });
- //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map
|