server.js 372 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623
  1. /* ====================================================================
  2. |
  3. | Amber Smalltalk
  4. | http://amber-lang.net
  5. |
  6. ======================================================================
  7. ======================================================================
  8. |
  9. | Copyright (c) 2010-2011
  10. | Nicolas Petton <petton.nicolas@gmail.com>
  11. |
  12. | Amber is released under the MIT license
  13. |
  14. | Permission is hereby granted, free of charge, to any person obtaining
  15. | a copy of this software and associated documentation files (the
  16. | 'Software'), to deal in the Software without restriction, including
  17. | without limitation the rights to use, copy, modify, merge, publish,
  18. | distribute, sublicense, and/or sell copies of the Software, and to
  19. | permit persons to whom the Software is furnished to do so, subject to
  20. | the following conditions:
  21. |
  22. | The above copyright notice and this permission notice shall be
  23. | included in all copies or substantial portions of the Software.
  24. |
  25. | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  26. | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  28. | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  29. | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  30. | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  31. | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. |
  33. ==================================================================== */
  34. /* Make that console is defined */
  35. if (typeof console === "undefined") {
  36. this.console = {
  37. log: function() {},
  38. warn: function() {},
  39. info: function() {},
  40. debug: function() {},
  41. error: function() {},
  42. };
  43. }
  44. /* Smalltalk constructors definition */
  45. function SmalltalkObject(){};
  46. function SmalltalkBehavior(){};
  47. function SmalltalkClass(){};
  48. function SmalltalkPackage(){};
  49. function SmalltalkMetaclass(){
  50. this.meta = true;
  51. };
  52. function SmalltalkMethod(){};
  53. function SmalltalkNil(){};
  54. function Smalltalk(){
  55. var st = this;
  56. /* This is the current call context object. While it is publicly available,
  57. Use smalltalk.getThisContext() instead which will answer a safe copy of
  58. the current context */
  59. st.thisContext = undefined;
  60. /* List of all reserved words in JavaScript. They may not be used as variables
  61. in Smalltalk. */
  62. st.reservedWords = ['break', 'case', 'catch', 'class', 'continue', 'debugger',
  63. 'default', 'delete', 'do', 'else', 'finally', 'for', 'function',
  64. 'if', 'in', 'instanceof', 'new', 'private', 'protected',
  65. 'public', 'return', 'static', 'switch', 'this', 'throw',
  66. 'try', 'typeof', 'var', 'void', 'while', 'with', 'yield'];
  67. /* We hold all Packages in a separate Object */
  68. st.packages = {};
  69. /* Smalltalk package creation. To add a Package, use smalltalk.addPackage() */
  70. function pkg(spec) {
  71. var that = new SmalltalkPackage();
  72. that.pkgName = spec.pkgName;
  73. that.requires = spec.requires || [];
  74. return that;
  75. };
  76. /* Smalltalk class creation. A class is an instance of an automatically
  77. created metaclass object. Newly created classes (not their metaclass)
  78. should be added to the smalltalk object, see smalltalk.addClass().
  79. Superclass linking is *not* handled here, see smalltalk.init() */
  80. function klass(spec) {
  81. var spec = spec || {};
  82. var that;
  83. if(spec.meta) {
  84. that = new SmalltalkMetaclass();
  85. } else {
  86. that = new (klass({meta: true})).fn;
  87. that.klass.instanceClass = that;
  88. that.className = spec.className;
  89. that.klass.className = that.className + ' class';
  90. }
  91. that.fn = spec.fn || function(){};
  92. that.superclass = spec.superclass;
  93. that.iVarNames = spec.iVarNames || [];
  94. if(that.superclass) {
  95. that.klass.superclass = that.superclass.klass;
  96. }
  97. that.pkg = spec.pkg;
  98. // For a while we keep the category attribute...
  99. if(!(spec.pkg === undefined)) {
  100. that.category = spec.pkg.pkgName;
  101. }
  102. that.fn.prototype.methods = {};
  103. that.fn.prototype.inheritedMethods = {};
  104. that.fn.prototype.klass = that;
  105. return that;
  106. };
  107. /* Smalltalk method object. To add a method to a class,
  108. use smalltalk.addMethod() */
  109. st.method = function(spec) {
  110. var that = new SmalltalkMethod();
  111. that.selector = spec.selector;
  112. that.jsSelector = spec.jsSelector;
  113. that.args = spec.args || {};
  114. that.category = spec.category;
  115. that.source = spec.source;
  116. that.messageSends = spec.messageSends || [];
  117. that.referencedClasses = spec.referencedClasses || [];
  118. that.fn = spec.fn;
  119. return that
  120. };
  121. /* Initialize a class in its class hierarchy. Handle both class and
  122. metaclasses. */
  123. st.init = function(klass) {
  124. var subclasses = st.subclasses(klass);
  125. var methods;
  126. if(klass.superclass && klass.superclass !== nil) {
  127. methods = st.methods(klass.superclass);
  128. //Methods linking
  129. for(var i in methods) {
  130. if(!klass.fn.prototype.methods[i]) {
  131. klass.fn.prototype.inheritedMethods[i] = methods[i];
  132. klass.fn.prototype[methods[i].jsSelector] = methods[i].fn;
  133. }
  134. }
  135. }
  136. for(var i=0;i<subclasses.length;i++) {
  137. st.init(subclasses[i]);
  138. }
  139. if(klass.klass && !klass.meta) {
  140. st.init(klass.klass);
  141. }
  142. };
  143. /* Answer all registered Packages as Array */
  144. st.packages.all = function() {
  145. var packages = [];
  146. for(var i in st.packages) {
  147. if (!st.packages.hasOwnProperty(i) || typeof(st.packages[i]) === "function") continue;
  148. packages.push(st.packages[i]);
  149. }
  150. return packages
  151. };
  152. /* Answer all registered Smalltalk classes */
  153. st.classes = function() {
  154. var classes = [];
  155. for(var i in st) {
  156. if(i.search(/^[A-Z]/g) != -1) {
  157. classes.push(st[i]);
  158. }
  159. }
  160. return classes
  161. };
  162. /* Answer all methods (included inherited ones) of klass. */
  163. st.methods = function(klass) {
  164. var methods = {};
  165. for(var i in klass.fn.prototype.methods) {
  166. methods[i] = klass.fn.prototype.methods[i]
  167. }
  168. for(var i in klass.fn.prototype.inheritedMethods) {
  169. methods[i] = klass.fn.prototype.inheritedMethods[i]
  170. }
  171. return methods;
  172. }
  173. /* Answer the direct subclasses of klass. */
  174. st.subclasses = function(klass) {
  175. var subclasses = [];
  176. var classes = st.classes();
  177. for(var i in classes) {
  178. if(classes[i].fn) {
  179. //Metaclasses
  180. if(classes[i].klass && classes[i].klass.superclass === klass) {
  181. subclasses.push(classes[i].klass);
  182. }
  183. //Classes
  184. if(classes[i].superclass === klass) {
  185. subclasses.push(classes[i]);
  186. }
  187. }
  188. }
  189. return subclasses;
  190. };
  191. /* Create a new class wrapping a JavaScript constructor, and add it to the
  192. global smalltalk object. Package is lazily created if it does not exist with given name. */
  193. st.mapClassName = function(className, pkgName, fn, superclass) {
  194. var pkg = st.addPackage(pkgName);
  195. st[className] = klass({
  196. className: className,
  197. superclass: superclass,
  198. pkg: pkg,
  199. fn: fn
  200. });
  201. };
  202. /* Add a package to the smalltalk.packages object, creating a new one if needed.
  203. If pkgName is nil or empty we return nil, which is an allowed package for a class. */
  204. st.addPackage = function(pkgName) {
  205. if(!pkgName) {return nil;}
  206. if(!(st.packages[pkgName])) {
  207. st.packages[pkgName] = pkg({
  208. pkgName: pkgName
  209. });
  210. }
  211. return st.packages[pkgName];
  212. };
  213. /* Add a class to the smalltalk object, creating a new one if needed.
  214. Package is lazily created if it does not exist with given name.*/
  215. st.addClass = function(className, superclass, iVarNames, pkgName) {
  216. var pkg = st.addPackage(pkgName);
  217. if(st[className]) {
  218. st[className].superclass = superclass;
  219. st[className].iVarNames = iVarNames;
  220. st[className].pkg = pkg || st[className].pkg;
  221. } else {
  222. st[className] = klass({
  223. className: className,
  224. superclass: superclass,
  225. pkg: pkg,
  226. iVarNames: iVarNames
  227. });
  228. }
  229. };
  230. /* Add a method to a class */
  231. st.addMethod = function(jsSelector, method, klass) {
  232. klass.fn.prototype[jsSelector] = method.fn;
  233. klass.fn.prototype.methods[method.selector] = method;
  234. method.methodClass = klass;
  235. method.jsSelector = jsSelector;
  236. };
  237. /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
  238. If the receiver does not understand the selector, call its #doesNotUnderstand: method */
  239. sendWithoutContext = function(receiver, selector, args, klass) {
  240. if(receiver === undefined || receiver === null) {
  241. receiver = nil;
  242. }
  243. if(!klass && receiver.klass && receiver[selector]) {
  244. return receiver[selector].apply(receiver, args);
  245. } else if(klass && klass.fn.prototype[selector]) {
  246. return klass.fn.prototype[selector].apply(receiver, args)
  247. }
  248. return messageNotUnderstood(receiver, selector, args);
  249. };
  250. /* Handles unhandled errors during message sends */
  251. sendWithContext = function(receiver, selector, args, klass) {
  252. if(st.thisContext) {
  253. return withContextSend(receiver, selector, args, klass);
  254. } else {
  255. try {return withContextSend(receiver, selector, args, klass)}
  256. catch(error) {
  257. // Reset the context stack in any case
  258. st.thisContext = undefined;
  259. if(error.smalltalkError) {
  260. handleError(error);
  261. } else {
  262. throw(error);
  263. }
  264. }
  265. }
  266. };
  267. /* Same as sendWithoutContext but creates a methodContext. */
  268. withContextSend = function(receiver, selector, args, klass) {
  269. var call, context;
  270. if(receiver === undefined || receiver === null) {
  271. receiver = nil;
  272. }
  273. if(!klass && receiver.klass && receiver[selector]) {
  274. context = pushContext(receiver, selector, args);
  275. call = receiver[selector].apply(receiver, args);
  276. popContext(context);
  277. return call;
  278. } else if(klass && klass.fn.prototype[selector]) {
  279. context = pushContext(receiver, selector, args);
  280. call = klass.fn.prototype[selector].apply(receiver, args);
  281. popContext(context);
  282. return call;
  283. }
  284. return messageNotUnderstood(receiver, selector, args);
  285. };
  286. /* Handles Smalltalk errors. Triggers the registered ErrorHandler
  287. (See the Smalltalk class ErrorHandler and its subclasses */
  288. function handleError(error) {
  289. st.thisContext = undefined;
  290. smalltalk.ErrorHandler._current()._handleError_(error);
  291. }
  292. /* Handles #dnu: *and* JavaScript method calls.
  293. if the receiver has no klass, we consider it a JS object (outside of the
  294. Amber system). Else assume that the receiver understands #doesNotUnderstand: */
  295. function messageNotUnderstood(receiver, selector, args) {
  296. /* Handles JS method calls. */
  297. if(receiver.klass === undefined || receiver.allowJavaScriptCalls) {
  298. return callJavaScriptMethod(receiver, selector, args);
  299. }
  300. /* Handles not understood messages. Also see the Amber counter-part
  301. Object>>doesNotUnderstand: */
  302. return receiver._doesNotUnderstand_(
  303. st.Message._new()
  304. ._selector_(st.convertSelector(selector))
  305. ._arguments_(args)
  306. );
  307. };
  308. function callJavaScriptMethod(receiver, selector, args) {
  309. /* Call a method of a JS object, or answer a property if it exists.
  310. Else try wrapping a JSObjectProxy around the receiver.
  311. Converts keyword-based selectors by using the first
  312. keyword only, but keeping all message arguments.
  313. Example:
  314. "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
  315. var jsSelector = selector._asJavaScriptSelector();
  316. var jsProperty = receiver[jsSelector];
  317. if(typeof jsProperty === "function") {
  318. return jsProperty.apply(receiver, args);
  319. } else if(jsProperty !== undefined) {
  320. if(args[0]) {
  321. receiver[jsSelector] = args[0];
  322. return nil;
  323. } else {
  324. return jsProperty
  325. }
  326. }
  327. return st.send(st.JSObjectProxy._on_(receiver), selector, args);
  328. };
  329. /* Reuse old contexts stored in oldContexts */
  330. st.oldContexts = [];
  331. /* Handle thisContext pseudo variable */
  332. st.getThisContext = function() {
  333. if(st.thisContext) {
  334. return st.thisContext.copy();
  335. } else {
  336. return undefined;
  337. }
  338. }
  339. pushContext = function(receiver, selector, temps) {
  340. if(st.thisContext) {
  341. return st.thisContext = st.thisContext.newContext(receiver, selector, temps);
  342. } else {
  343. return st.thisContext = new SmalltalkMethodContext(receiver, selector, temps);
  344. }
  345. };
  346. popContext = function(context) {
  347. if(context) {
  348. context.removeYourself();
  349. }
  350. };
  351. /* Convert a string to a valid smalltalk selector.
  352. if you modify the following functions, also change String>>asSelector
  353. accordingly */
  354. st.convertSelector = function(selector) {
  355. if(selector.match(/__/)) {
  356. return convertBinarySelector(selector);
  357. } else {
  358. return convertKeywordSelector(selector);
  359. }
  360. };
  361. function convertKeywordSelector(selector) {
  362. return selector.replace(/^_/, '').replace(/_/g, ':');
  363. };
  364. function convertBinarySelector(selector) {
  365. return selector
  366. .replace(/^_/, '')
  367. .replace(/_plus/, '+')
  368. .replace(/_minus/, '-')
  369. .replace(/_star/, '*')
  370. .replace(/_slash/, '/')
  371. .replace(/_gt/, '>')
  372. .replace(/_lt/, '<')
  373. .replace(/_eq/, '=')
  374. .replace(/_comma/, ',')
  375. .replace(/_at/, '@')
  376. };
  377. /* Converts a JavaScript object to valid Smalltalk Object */
  378. st.readJSObject = function(js) {
  379. var object = js;
  380. var readObject = (js.constructor === Object);
  381. var readArray = (js.constructor === Array);
  382. if(readObject) {
  383. object = smalltalk.Dictionary._new();
  384. }
  385. for(var i in js) {
  386. if(readObject) {
  387. object._at_put_(i, st.readJSObject(js[i]));
  388. }
  389. if(readArray) {
  390. object[i] = st.readJSObject(js[i]);
  391. }
  392. }
  393. return object;
  394. };
  395. /* Toggle deployment mode (no context will be handled during message send */
  396. st.setDeploymentMode = function() {
  397. st.send = sendWithoutContext;
  398. };
  399. st.setDevelopmentMode = function() {
  400. st.send = sendWithContext;
  401. }
  402. /* Set development mode by default */
  403. st.setDevelopmentMode();
  404. }
  405. function SmalltalkMethodContext(receiver, selector, temps, home) {
  406. var that = this;
  407. that.receiver = receiver;
  408. that.selector = selector;
  409. that.temps = temps || {};
  410. that.homeContext = home;
  411. that.copy = function() {
  412. var home = that.homeContext;
  413. if(home) {home = home.copy()}
  414. return new SmalltalkMethodContext(
  415. that.receiver,
  416. that.selector,
  417. that.temps,
  418. home
  419. );
  420. }
  421. that.newContext = function(receiver, selector, temps) {
  422. var c = smalltalk.oldContexts.pop();
  423. if(c) {
  424. c.homeContext = that;
  425. c.receiver = receiver;
  426. c.selector = selector;
  427. c.temps = temps || {};
  428. } else {
  429. c = new SmalltalkMethodContext(receiver, selector, temps, that);
  430. }
  431. return c;
  432. }
  433. that.removeYourself = function() {
  434. smalltalk.thisContext = that.homeContext;
  435. that.homeContext = undefined;
  436. smalltalk.oldContexts.push(that);
  437. }
  438. }
  439. /* Global Smalltalk objects. */
  440. var nil = new SmalltalkNil();
  441. var smalltalk = new Smalltalk();
  442. if(this.jQuery) {
  443. this.jQuery.allowJavaScriptCalls = true;
  444. }
  445. /****************************************************************************************/
  446. /* Base classes mapping. If you edit this part, do not forget to set the superclass of the
  447. object metaclass to Class after the definition of Object */
  448. smalltalk.mapClassName("Object", "Kernel", SmalltalkObject);
  449. smalltalk.mapClassName("Smalltalk", "Kernel", Smalltalk, smalltalk.Object);
  450. smalltalk.mapClassName("Package", "Kernel", SmalltalkPackage, smalltalk.Object);
  451. smalltalk.mapClassName("Behavior", "Kernel", SmalltalkBehavior, smalltalk.Object);
  452. smalltalk.mapClassName("Class", "Kernel", SmalltalkClass, smalltalk.Behavior);
  453. smalltalk.mapClassName("Metaclass", "Kernel", SmalltalkMetaclass, smalltalk.Behavior);
  454. smalltalk.mapClassName("CompiledMethod", "Kernel", SmalltalkMethod, smalltalk.Object);
  455. smalltalk.Object.klass.superclass = smalltalk.Class;
  456. smalltalk.mapClassName("Number", "Kernel", Number, smalltalk.Object);
  457. smalltalk.mapClassName("BlockClosure", "Kernel", Function, smalltalk.Object);
  458. smalltalk.mapClassName("Boolean", "Kernel", Boolean, smalltalk.Object);
  459. smalltalk.mapClassName("Date", "Kernel", Date, smalltalk.Object);
  460. smalltalk.mapClassName("UndefinedObject", "Kernel", SmalltalkNil, smalltalk.Object);
  461. smalltalk.mapClassName("Collection", "Kernel", null, smalltalk.Object);
  462. smalltalk.mapClassName("SequenceableCollection", "Kernel", null, smalltalk.Collection);
  463. smalltalk.mapClassName("String", "Kernel", String, smalltalk.SequenceableCollection);
  464. smalltalk.mapClassName("Array", "Kernel", Array, smalltalk.SequenceableCollection);
  465. smalltalk.mapClassName("RegularExpression", "Kernel", RegExp, smalltalk.String);
  466. smalltalk.mapClassName("Error", "Kernel", Error, smalltalk.Object);
  467. smalltalk.mapClassName("MethodContext", "Kernel", SmalltalkMethodContext, smalltalk.Object);
  468. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel');
  469. smalltalk.addMethod(
  470. unescape('__eq'),
  471. smalltalk.method({
  472. selector: unescape('%3D'),
  473. category: 'comparing',
  474. fn: function (anObject){
  475. var self=this;
  476. return smalltalk.send(self, "__eq_eq", [anObject]);
  477. return self;},
  478. args: ["anObject"],
  479. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  480. messageSends: [unescape("%3D%3D")],
  481. referencedClasses: []
  482. }),
  483. smalltalk.Object);
  484. smalltalk.addMethod(
  485. unescape('_%7E_eq'),
  486. smalltalk.method({
  487. selector: unescape('%7E%3D'),
  488. category: 'comparing',
  489. fn: function (anObject){
  490. var self=this;
  491. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  492. return self;},
  493. args: ["anObject"],
  494. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  495. messageSends: [unescape("%3D")],
  496. referencedClasses: []
  497. }),
  498. smalltalk.Object);
  499. smalltalk.addMethod(
  500. unescape('_initialize'),
  501. smalltalk.method({
  502. selector: unescape('initialize'),
  503. category: 'initialization',
  504. fn: function (){
  505. var self=this;
  506. return self;},
  507. args: [],
  508. source: unescape('initialize'),
  509. messageSends: [],
  510. referencedClasses: []
  511. }),
  512. smalltalk.Object);
  513. smalltalk.addMethod(
  514. unescape('_yourself'),
  515. smalltalk.method({
  516. selector: unescape('yourself'),
  517. category: 'accessing',
  518. fn: function (){
  519. var self=this;
  520. return self;
  521. return self;},
  522. args: [],
  523. source: unescape('yourself%0A%09%5Eself'),
  524. messageSends: [],
  525. referencedClasses: []
  526. }),
  527. smalltalk.Object);
  528. smalltalk.addMethod(
  529. unescape('_class'),
  530. smalltalk.method({
  531. selector: unescape('class'),
  532. category: 'accessing',
  533. fn: function (){
  534. var self=this;
  535. return self.klass;
  536. return self;},
  537. args: [],
  538. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  539. messageSends: [],
  540. referencedClasses: []
  541. }),
  542. smalltalk.Object);
  543. smalltalk.addMethod(
  544. unescape('_size'),
  545. smalltalk.method({
  546. selector: unescape('size'),
  547. category: 'accessing',
  548. fn: function (){
  549. var self=this;
  550. smalltalk.send(self, "_error_", ["Object not indexable"]);
  551. return self;},
  552. args: [],
  553. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  554. messageSends: ["error:"],
  555. referencedClasses: []
  556. }),
  557. smalltalk.Object);
  558. smalltalk.addMethod(
  559. unescape('_copy'),
  560. smalltalk.method({
  561. selector: unescape('copy'),
  562. category: 'copying',
  563. fn: function (){
  564. var self=this;
  565. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  566. return self;},
  567. args: [],
  568. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  569. messageSends: ["postCopy", "shallowCopy"],
  570. referencedClasses: []
  571. }),
  572. smalltalk.Object);
  573. smalltalk.addMethod(
  574. unescape('_shallowCopy'),
  575. smalltalk.method({
  576. selector: unescape('shallowCopy'),
  577. category: 'copying',
  578. fn: function (){
  579. var self=this;
  580. var copy = self.klass._new();
  581. for(var i in self) {
  582. if(/^@.+/.test(i)) {
  583. copy[i] = self[i];
  584. }
  585. }
  586. return copy;
  587. ;
  588. return self;},
  589. args: [],
  590. source: unescape('shallowCopy%0A%09%3C%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  591. messageSends: [],
  592. referencedClasses: []
  593. }),
  594. smalltalk.Object);
  595. smalltalk.addMethod(
  596. unescape('_deepCopy'),
  597. smalltalk.method({
  598. selector: unescape('deepCopy'),
  599. category: 'copying',
  600. fn: function (){
  601. var self=this;
  602. var copy = self.klass._new();
  603. for(var i in self) {
  604. if(/^@.+/.test(i)) {
  605. copy[i] = self[i]._deepCopy();
  606. }
  607. }
  608. return copy;
  609. ;
  610. return self;},
  611. args: [],
  612. source: unescape('deepCopy%0A%09%3C%20%20%20%20%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D._deepCopy%28%29%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  613. messageSends: [],
  614. referencedClasses: []
  615. }),
  616. smalltalk.Object);
  617. smalltalk.addMethod(
  618. unescape('_postCopy'),
  619. smalltalk.method({
  620. selector: unescape('postCopy'),
  621. category: 'copying',
  622. fn: function (){
  623. var self=this;
  624. return self;},
  625. args: [],
  626. source: unescape('postCopy'),
  627. messageSends: [],
  628. referencedClasses: []
  629. }),
  630. smalltalk.Object);
  631. smalltalk.addMethod(
  632. unescape('__minus_gt'),
  633. smalltalk.method({
  634. selector: unescape('-%3E'),
  635. category: 'converting',
  636. fn: function (anObject){
  637. var self=this;
  638. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  639. return self;},
  640. args: ["anObject"],
  641. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  642. messageSends: ["key:value:"],
  643. referencedClasses: [smalltalk.Association]
  644. }),
  645. smalltalk.Object);
  646. smalltalk.addMethod(
  647. unescape('_asString'),
  648. smalltalk.method({
  649. selector: unescape('asString'),
  650. category: 'converting',
  651. fn: function (){
  652. var self=this;
  653. return smalltalk.send(self, "_printString", []);
  654. return self;},
  655. args: [],
  656. source: unescape('asString%0A%09%5Eself%20printString'),
  657. messageSends: ["printString"],
  658. referencedClasses: []
  659. }),
  660. smalltalk.Object);
  661. smalltalk.addMethod(
  662. unescape('_asJavascript'),
  663. smalltalk.method({
  664. selector: unescape('asJavascript'),
  665. category: 'converting',
  666. fn: function (){
  667. var self=this;
  668. return smalltalk.send(self, "_asString", []);
  669. return self;},
  670. args: [],
  671. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  672. messageSends: ["asString"],
  673. referencedClasses: []
  674. }),
  675. smalltalk.Object);
  676. smalltalk.addMethod(
  677. unescape('_perform_'),
  678. smalltalk.method({
  679. selector: unescape('perform%3A'),
  680. category: 'message handling',
  681. fn: function (aSymbol){
  682. var self=this;
  683. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  684. return self;},
  685. args: ["aSymbol"],
  686. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  687. messageSends: ["perform:withArguments:"],
  688. referencedClasses: []
  689. }),
  690. smalltalk.Object);
  691. smalltalk.addMethod(
  692. unescape('_perform_withArguments_'),
  693. smalltalk.method({
  694. selector: unescape('perform%3AwithArguments%3A'),
  695. category: 'message handling',
  696. fn: function (aSymbol, aCollection){
  697. var self=this;
  698. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  699. return self;},
  700. args: ["aSymbol", "aCollection"],
  701. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  702. messageSends: ["basicPerform:withArguments:", "asSelector"],
  703. referencedClasses: []
  704. }),
  705. smalltalk.Object);
  706. smalltalk.addMethod(
  707. unescape('_instVarAt_'),
  708. smalltalk.method({
  709. selector: unescape('instVarAt%3A'),
  710. category: 'accessing',
  711. fn: function (aString){
  712. var self=this;
  713. return self['@'+aString];
  714. return self;},
  715. args: ["aString"],
  716. source: unescape('instVarAt%3A%20aString%0A%09%3Creturn%20self%5B%27@%27+aString%5D%3E'),
  717. messageSends: [],
  718. referencedClasses: []
  719. }),
  720. smalltalk.Object);
  721. smalltalk.addMethod(
  722. unescape('_instVarAt_put_'),
  723. smalltalk.method({
  724. selector: unescape('instVarAt%3Aput%3A'),
  725. category: 'accessing',
  726. fn: function (aString, anObject){
  727. var self=this;
  728. self['@' + aString] = anObject;
  729. return self;},
  730. args: ["aString", "anObject"],
  731. source: unescape('instVarAt%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@%27%20+%20aString%5D%20%3D%20anObject%3E'),
  732. messageSends: [],
  733. referencedClasses: []
  734. }),
  735. smalltalk.Object);
  736. smalltalk.addMethod(
  737. unescape('_basicAt_'),
  738. smalltalk.method({
  739. selector: unescape('basicAt%3A'),
  740. category: 'accessing',
  741. fn: function (aString){
  742. var self=this;
  743. return self[aString];
  744. return self;},
  745. args: ["aString"],
  746. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  747. messageSends: [],
  748. referencedClasses: []
  749. }),
  750. smalltalk.Object);
  751. smalltalk.addMethod(
  752. unescape('_basicAt_put_'),
  753. smalltalk.method({
  754. selector: unescape('basicAt%3Aput%3A'),
  755. category: 'accessing',
  756. fn: function (aString, anObject){
  757. var self=this;
  758. return self[aString] = anObject;
  759. return self;},
  760. args: ["aString", "anObject"],
  761. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  762. messageSends: [],
  763. referencedClasses: []
  764. }),
  765. smalltalk.Object);
  766. smalltalk.addMethod(
  767. unescape('_error_'),
  768. smalltalk.method({
  769. selector: unescape('error%3A'),
  770. category: 'error handling',
  771. fn: function (aString){
  772. var self=this;
  773. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  774. return self;},
  775. args: ["aString"],
  776. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  777. messageSends: ["signal:"],
  778. referencedClasses: [smalltalk.Error]
  779. }),
  780. smalltalk.Object);
  781. smalltalk.addMethod(
  782. unescape('_subclassResponsibility'),
  783. smalltalk.method({
  784. selector: unescape('subclassResponsibility'),
  785. category: 'error handling',
  786. fn: function (){
  787. var self=this;
  788. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  789. return self;},
  790. args: [],
  791. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  792. messageSends: ["error:"],
  793. referencedClasses: []
  794. }),
  795. smalltalk.Object);
  796. smalltalk.addMethod(
  797. unescape('_shouldNotImplement'),
  798. smalltalk.method({
  799. selector: unescape('shouldNotImplement'),
  800. category: 'error handling',
  801. fn: function (){
  802. var self=this;
  803. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  804. return self;},
  805. args: [],
  806. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  807. messageSends: ["error:", unescape("%2C"), "name", "class"],
  808. referencedClasses: []
  809. }),
  810. smalltalk.Object);
  811. smalltalk.addMethod(
  812. unescape('_try_catch_'),
  813. smalltalk.method({
  814. selector: unescape('try%3Acatch%3A'),
  815. category: 'error handling',
  816. fn: function (aBlock, anotherBlock){
  817. var self=this;
  818. try{aBlock()} catch(e) {anotherBlock(e)};
  819. return self;},
  820. args: ["aBlock", "anotherBlock"],
  821. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7BaBlock%28%29%7D%20catch%28e%29%20%7BanotherBlock%28e%29%7D%3E'),
  822. messageSends: [],
  823. referencedClasses: []
  824. }),
  825. smalltalk.Object);
  826. smalltalk.addMethod(
  827. unescape('_printString'),
  828. smalltalk.method({
  829. selector: unescape('printString'),
  830. category: 'printing',
  831. fn: function (){
  832. var self=this;
  833. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  834. return self;},
  835. args: [],
  836. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  837. messageSends: [unescape("%2C"), "name", "class"],
  838. referencedClasses: []
  839. }),
  840. smalltalk.Object);
  841. smalltalk.addMethod(
  842. unescape('_printNl'),
  843. smalltalk.method({
  844. selector: unescape('printNl'),
  845. category: 'printing',
  846. fn: function (){
  847. var self=this;
  848. console.log(self);
  849. return self;},
  850. args: [],
  851. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  852. messageSends: [],
  853. referencedClasses: []
  854. }),
  855. smalltalk.Object);
  856. smalltalk.addMethod(
  857. unescape('_isKindOf_'),
  858. smalltalk.method({
  859. selector: unescape('isKindOf%3A'),
  860. category: 'testing',
  861. fn: function (aClass){
  862. var self=this;
  863. return ((($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]));
  864. return self;},
  865. args: ["aClass"],
  866. source: unescape('isKindOf%3A%20aClass%0A%09%5E%28self%20isMemberOf%3A%20aClass%29%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20%5Bself%20class%20inheritsFrom%3A%20aClass%5D'),
  867. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  868. referencedClasses: []
  869. }),
  870. smalltalk.Object);
  871. smalltalk.addMethod(
  872. unescape('_isMemberOf_'),
  873. smalltalk.method({
  874. selector: unescape('isMemberOf%3A'),
  875. category: 'testing',
  876. fn: function (aClass){
  877. var self=this;
  878. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  879. return self;},
  880. args: ["aClass"],
  881. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  882. messageSends: [unescape("%3D"), "class"],
  883. referencedClasses: []
  884. }),
  885. smalltalk.Object);
  886. smalltalk.addMethod(
  887. unescape('_ifNil_'),
  888. smalltalk.method({
  889. selector: unescape('ifNil%3A'),
  890. category: 'testing',
  891. fn: function (aBlock){
  892. var self=this;
  893. return self;
  894. return self;},
  895. args: ["aBlock"],
  896. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  897. messageSends: [],
  898. referencedClasses: []
  899. }),
  900. smalltalk.Object);
  901. smalltalk.addMethod(
  902. unescape('_ifNil_ifNotNil_'),
  903. smalltalk.method({
  904. selector: unescape('ifNil%3AifNotNil%3A'),
  905. category: 'testing',
  906. fn: function (aBlock, anotherBlock){
  907. var self=this;
  908. return smalltalk.send(anotherBlock, "_value", []);
  909. return self;},
  910. args: ["aBlock", "anotherBlock"],
  911. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  912. messageSends: ["value"],
  913. referencedClasses: []
  914. }),
  915. smalltalk.Object);
  916. smalltalk.addMethod(
  917. unescape('_ifNotNil_'),
  918. smalltalk.method({
  919. selector: unescape('ifNotNil%3A'),
  920. category: 'testing',
  921. fn: function (aBlock){
  922. var self=this;
  923. return smalltalk.send(aBlock, "_value", []);
  924. return self;},
  925. args: ["aBlock"],
  926. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  927. messageSends: ["value"],
  928. referencedClasses: []
  929. }),
  930. smalltalk.Object);
  931. smalltalk.addMethod(
  932. unescape('_ifNotNil_ifNil_'),
  933. smalltalk.method({
  934. selector: unescape('ifNotNil%3AifNil%3A'),
  935. category: 'testing',
  936. fn: function (aBlock, anotherBlock){
  937. var self=this;
  938. return smalltalk.send(aBlock, "_value", []);
  939. return self;},
  940. args: ["aBlock", "anotherBlock"],
  941. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  942. messageSends: ["value"],
  943. referencedClasses: []
  944. }),
  945. smalltalk.Object);
  946. smalltalk.addMethod(
  947. unescape('_isNil'),
  948. smalltalk.method({
  949. selector: unescape('isNil'),
  950. category: 'testing',
  951. fn: function (){
  952. var self=this;
  953. return false;
  954. return self;},
  955. args: [],
  956. source: unescape('isNil%0A%09%5Efalse'),
  957. messageSends: [],
  958. referencedClasses: []
  959. }),
  960. smalltalk.Object);
  961. smalltalk.addMethod(
  962. unescape('_notNil'),
  963. smalltalk.method({
  964. selector: unescape('notNil'),
  965. category: 'testing',
  966. fn: function (){
  967. var self=this;
  968. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  969. return self;},
  970. args: [],
  971. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  972. messageSends: ["not", "isNil"],
  973. referencedClasses: []
  974. }),
  975. smalltalk.Object);
  976. smalltalk.addMethod(
  977. unescape('_isClass'),
  978. smalltalk.method({
  979. selector: unescape('isClass'),
  980. category: 'testing',
  981. fn: function (){
  982. var self=this;
  983. return false;
  984. return self;},
  985. args: [],
  986. source: unescape('isClass%0A%09%5Efalse'),
  987. messageSends: [],
  988. referencedClasses: []
  989. }),
  990. smalltalk.Object);
  991. smalltalk.addMethod(
  992. unescape('_isMetaclass'),
  993. smalltalk.method({
  994. selector: unescape('isMetaclass'),
  995. category: 'testing',
  996. fn: function (){
  997. var self=this;
  998. return false;
  999. return self;},
  1000. args: [],
  1001. source: unescape('isMetaclass%0A%09%5Efalse'),
  1002. messageSends: [],
  1003. referencedClasses: []
  1004. }),
  1005. smalltalk.Object);
  1006. smalltalk.addMethod(
  1007. unescape('_isNumber'),
  1008. smalltalk.method({
  1009. selector: unescape('isNumber'),
  1010. category: 'testing',
  1011. fn: function (){
  1012. var self=this;
  1013. return false;
  1014. return self;},
  1015. args: [],
  1016. source: unescape('isNumber%0A%09%5Efalse'),
  1017. messageSends: [],
  1018. referencedClasses: []
  1019. }),
  1020. smalltalk.Object);
  1021. smalltalk.addMethod(
  1022. unescape('_isString'),
  1023. smalltalk.method({
  1024. selector: unescape('isString'),
  1025. category: 'testing',
  1026. fn: function (){
  1027. var self=this;
  1028. return false;
  1029. return self;},
  1030. args: [],
  1031. source: unescape('isString%0A%09%5Efalse'),
  1032. messageSends: [],
  1033. referencedClasses: []
  1034. }),
  1035. smalltalk.Object);
  1036. smalltalk.addMethod(
  1037. unescape('_isParseFailure'),
  1038. smalltalk.method({
  1039. selector: unescape('isParseFailure'),
  1040. category: 'testing',
  1041. fn: function (){
  1042. var self=this;
  1043. return false;
  1044. return self;},
  1045. args: [],
  1046. source: unescape('isParseFailure%0A%09%5Efalse'),
  1047. messageSends: [],
  1048. referencedClasses: []
  1049. }),
  1050. smalltalk.Object);
  1051. smalltalk.addMethod(
  1052. unescape('_basicPerform_'),
  1053. smalltalk.method({
  1054. selector: unescape('basicPerform%3A'),
  1055. category: 'message handling',
  1056. fn: function (aSymbol){
  1057. var self=this;
  1058. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  1059. return self;},
  1060. args: ["aSymbol"],
  1061. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  1062. messageSends: ["basicPerform:withArguments:"],
  1063. referencedClasses: []
  1064. }),
  1065. smalltalk.Object);
  1066. smalltalk.addMethod(
  1067. unescape('_basicPerform_withArguments_'),
  1068. smalltalk.method({
  1069. selector: unescape('basicPerform%3AwithArguments%3A'),
  1070. category: 'message handling',
  1071. fn: function (aSymbol, aCollection){
  1072. var self=this;
  1073. return self[aSymbol].apply(self, aCollection);;
  1074. return self;},
  1075. args: ["aSymbol", "aCollection"],
  1076. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  1077. messageSends: [],
  1078. referencedClasses: []
  1079. }),
  1080. smalltalk.Object);
  1081. smalltalk.addMethod(
  1082. unescape('_basicDelete_'),
  1083. smalltalk.method({
  1084. selector: unescape('basicDelete%3A'),
  1085. category: 'accessing',
  1086. fn: function (aString){
  1087. var self=this;
  1088. delete self[aString];
  1089. return self;},
  1090. args: ["aString"],
  1091. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3E'),
  1092. messageSends: [],
  1093. referencedClasses: []
  1094. }),
  1095. smalltalk.Object);
  1096. smalltalk.addMethod(
  1097. unescape('_doesNotUnderstand_'),
  1098. smalltalk.method({
  1099. selector: unescape('doesNotUnderstand%3A'),
  1100. category: 'error handling',
  1101. fn: function (aMessage){
  1102. var self=this;
  1103. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  1104. return self;},
  1105. args: ["aMessage"],
  1106. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  1107. messageSends: ["receiver:", "message:", "signal", "new"],
  1108. referencedClasses: [smalltalk.MessageNotUnderstood]
  1109. }),
  1110. smalltalk.Object);
  1111. smalltalk.addMethod(
  1112. unescape('_asJSON'),
  1113. smalltalk.method({
  1114. selector: unescape('asJSON'),
  1115. category: 'converting',
  1116. fn: function (){
  1117. var self=this;
  1118. return JSON.stringify(self._asJSONObject());
  1119. return self;},
  1120. args: [],
  1121. source: unescape('asJSON%0A%09%3Creturn%20JSON.stringify%28self._asJSONObject%28%29%29%3E'),
  1122. messageSends: [],
  1123. referencedClasses: []
  1124. }),
  1125. smalltalk.Object);
  1126. smalltalk.addMethod(
  1127. unescape('_asJSONObject'),
  1128. smalltalk.method({
  1129. selector: unescape('asJSONObject'),
  1130. category: 'converting',
  1131. fn: function (){
  1132. var self=this;
  1133. var object=nil;
  1134. object=smalltalk.send((smalltalk.Object || Object), "_new", []);
  1135. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(object, "_basicAt_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSONObject", [])]);})]);
  1136. return object;
  1137. return self;},
  1138. args: [],
  1139. source: unescape('asJSONObject%0A%09%7C%20object%20%7C%0A%09object%20%3A%3D%20Object%20new.%0A%09self%20class%20instanceVariableNames%20do%3A%20%5B%3Aeach%20%7C%0A%09%09object%20basicAt%3A%20each%20put%3A%20%28self%20instVarAt%3A%20each%29%20asJSONObject%5D.%0A%09%5Eobject'),
  1140. messageSends: ["new", "do:", "instanceVariableNames", "class", "basicAt:put:", "asJSONObject", "instVarAt:"],
  1141. referencedClasses: [smalltalk.Object]
  1142. }),
  1143. smalltalk.Object);
  1144. smalltalk.addMethod(
  1145. unescape('_halt'),
  1146. smalltalk.method({
  1147. selector: unescape('halt'),
  1148. category: 'error handling',
  1149. fn: function (){
  1150. var self=this;
  1151. smalltalk.send(self, "_error_", ["Halt encountered"]);
  1152. return self;},
  1153. args: [],
  1154. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  1155. messageSends: ["error:"],
  1156. referencedClasses: []
  1157. }),
  1158. smalltalk.Object);
  1159. smalltalk.addMethod(
  1160. unescape('_log_block_'),
  1161. smalltalk.method({
  1162. selector: unescape('log%3Ablock%3A'),
  1163. category: 'printing',
  1164. fn: function (aString, aBlock){
  1165. var self=this;
  1166. var result=nil;
  1167. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return result=smalltalk.send(aBlock, "_value", []);})]), "_printString", [])])]);
  1168. return result;
  1169. return self;},
  1170. args: ["aString", "aBlock"],
  1171. source: unescape('log%3A%20aString%20block%3A%20aBlock%0A%0A%09%7C%20result%20%7C%0A%09console%20log%3A%20%20aString%2C%20%20%27%20time%3A%20%27%2C%20%28Date%20millisecondsToRun%3A%20%5Bresult%20%3A%3D%20aBlock%20value%5D%29%20printString.%0A%09%5Eresult'),
  1172. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  1173. referencedClasses: [smalltalk.Date]
  1174. }),
  1175. smalltalk.Object);
  1176. smalltalk.addMethod(
  1177. unescape('__eq_eq'),
  1178. smalltalk.method({
  1179. selector: unescape('%3D%3D'),
  1180. category: 'comparing',
  1181. fn: function (anObject){
  1182. var self=this;
  1183. return self === anObject;
  1184. return self;},
  1185. args: ["anObject"],
  1186. source: unescape('%3D%3D%20anObject%0A%09%3Creturn%20self%20%3D%3D%3D%20anObject%3E'),
  1187. messageSends: [],
  1188. referencedClasses: []
  1189. }),
  1190. smalltalk.Object);
  1191. smalltalk.addMethod(
  1192. unescape('_%7E%7E'),
  1193. smalltalk.method({
  1194. selector: unescape('%7E%7E'),
  1195. category: 'comparing',
  1196. fn: function (anObject){
  1197. var self=this;
  1198. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  1199. return self;},
  1200. args: ["anObject"],
  1201. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  1202. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  1203. referencedClasses: []
  1204. }),
  1205. smalltalk.Object);
  1206. smalltalk.addMethod(
  1207. unescape('_deprecatedAPI'),
  1208. smalltalk.method({
  1209. selector: unescape('deprecatedAPI'),
  1210. category: 'error handling',
  1211. fn: function (){
  1212. var self=this;
  1213. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21")])]);
  1214. return self;},
  1215. args: [],
  1216. source: unescape('deprecatedAPI%0A%09%22Just%20a%20simple%20way%20to%20deprecate%20methods.%0A%09%23deprecatedAPI%20is%20in%20the%20%27error%20handling%27%20protocol%20even%20if%20it%20doesn%27t%20throw%20an%20error%2C%0A%09but%20it%20could%20in%20the%20future.%22%0A%09console%20warn%3A%20thisContext%20home%20asString%2C%20%27%20is%20deprecated%21%27'),
  1217. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  1218. referencedClasses: []
  1219. }),
  1220. smalltalk.Object);
  1221. smalltalk.addMethod(
  1222. unescape('_initialize'),
  1223. smalltalk.method({
  1224. selector: unescape('initialize'),
  1225. category: 'initialization',
  1226. fn: function (){
  1227. var self=this;
  1228. return self;},
  1229. args: [],
  1230. source: unescape('initialize%0A%09%22no%20op%22'),
  1231. messageSends: [],
  1232. referencedClasses: []
  1233. }),
  1234. smalltalk.Object.klass);
  1235. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel');
  1236. smalltalk.addMethod(
  1237. unescape('_classes'),
  1238. smalltalk.method({
  1239. selector: unescape('classes'),
  1240. category: 'accessing',
  1241. fn: function (){
  1242. var self=this;
  1243. return self.classes();
  1244. return self;},
  1245. args: [],
  1246. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  1247. messageSends: [],
  1248. referencedClasses: []
  1249. }),
  1250. smalltalk.Smalltalk);
  1251. smalltalk.addMethod(
  1252. unescape('_readJSON_'),
  1253. smalltalk.method({
  1254. selector: unescape('readJSON%3A'),
  1255. category: 'accessing',
  1256. fn: function (anObject){
  1257. var self=this;
  1258. return self.readJSObject(anObject);
  1259. return self;},
  1260. args: ["anObject"],
  1261. source: unescape('readJSON%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1262. messageSends: [],
  1263. referencedClasses: []
  1264. }),
  1265. smalltalk.Smalltalk);
  1266. smalltalk.addMethod(
  1267. unescape('_at_'),
  1268. smalltalk.method({
  1269. selector: unescape('at%3A'),
  1270. category: 'accessing',
  1271. fn: function (aString){
  1272. var self=this;
  1273. return self[aString];
  1274. return self;},
  1275. args: ["aString"],
  1276. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  1277. messageSends: [],
  1278. referencedClasses: []
  1279. }),
  1280. smalltalk.Smalltalk);
  1281. smalltalk.addMethod(
  1282. unescape('_removeClass_'),
  1283. smalltalk.method({
  1284. selector: unescape('removeClass%3A'),
  1285. category: 'classes',
  1286. fn: function (aClass){
  1287. var self=this;
  1288. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})]));
  1289. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  1290. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  1291. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  1292. return self;},
  1293. args: ["aClass"],
  1294. source: unescape('removeClass%3A%20aClass%0A%09aClass%20isMetaclass%20ifTrue%3A%20%5Bself%20error%3A%20aClass%20asString%2C%20%27%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21%27%5D.%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20removeCompiledMethod%3A%20each%5D.%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20class%20removeCompiledMethod%3A%20each%5D.%0A%09self%20basicDelete%3A%20aClass%20name'),
  1295. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  1296. referencedClasses: []
  1297. }),
  1298. smalltalk.Smalltalk);
  1299. smalltalk.addMethod(
  1300. unescape('_basicParse_'),
  1301. smalltalk.method({
  1302. selector: unescape('basicParse%3A'),
  1303. category: 'accessing',
  1304. fn: function (aString){
  1305. var self=this;
  1306. return smalltalk.parser.parse(aString);
  1307. return self;},
  1308. args: ["aString"],
  1309. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  1310. messageSends: [],
  1311. referencedClasses: []
  1312. }),
  1313. smalltalk.Smalltalk);
  1314. smalltalk.addMethod(
  1315. unescape('_parse_'),
  1316. smalltalk.method({
  1317. selector: unescape('parse%3A'),
  1318. category: 'accessing',
  1319. fn: function (aString){
  1320. var self=this;
  1321. var result=nil;
  1322. smalltalk.send(self, "_try_catch_", [(function(){return result=smalltalk.send(self, "_basicParse_", [aString]);}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  1323. return result;
  1324. return self;},
  1325. args: ["aString"],
  1326. source: unescape('parse%3A%20aString%0A%09%7C%20result%20%7C%20%0A%09self%20try%3A%20%5Bresult%20%3A%3D%20self%20basicParse%3A%20aString%5D%20catch%3A%20%5B%3Aex%20%7C%20%28self%20parseError%3A%20ex%20parsing%3A%20aString%29%20signal%5D.%0A%09%5Eresult'),
  1327. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  1328. referencedClasses: []
  1329. }),
  1330. smalltalk.Smalltalk);
  1331. smalltalk.addMethod(
  1332. unescape('_parseError_parsing_'),
  1333. smalltalk.method({
  1334. selector: unescape('parseError%3Aparsing%3A'),
  1335. category: 'accessing',
  1336. fn: function (anException, aString){
  1337. var self=this;
  1338. var row=nil;
  1339. var col=nil;
  1340. var message=nil;
  1341. var lines=nil;
  1342. var badLine=nil;
  1343. var code=nil;
  1344. row = anException.line;
  1345. col = anException.column;
  1346. message = anException.message;;
  1347. lines=smalltalk.send(aString, "_lines", []);
  1348. badLine=smalltalk.send(lines, "_at_", [row]);
  1349. badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
  1350. smalltalk.send(lines, "_at_put_", [row, badLine]);
  1351. code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]);
  1352. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  1353. return self;},
  1354. args: ["anException", "aString"],
  1355. source: unescape('parseError%3A%20anException%20parsing%3A%20aString%0A%09%7C%20row%20col%20message%20lines%20badLine%20code%20%7C%0A%09%3Crow%20%3D%20anException.line%3B%0A%09col%20%3D%20anException.column%3B%0A%09message%20%3D%20anException.message%3B%3E.%0A%09lines%20%3A%3D%20aString%20lines.%0A%09badLine%20%3A%3D%20lines%20at%3A%20row.%0A%09badLine%20%3A%3D%20%28badLine%20copyFrom%3A%201%20to%3A%20col%20-%201%29%2C%20%27%20%3D%3D%3D%3E%27%2C%20%28badLine%20copyFrom%3A%20%20col%20to%3A%20badLine%20size%29.%0A%09lines%20at%3A%20row%20put%3A%20badLine.%0A%09code%20%3A%3D%20String%20streamContents%3A%20%5B%3As%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20lines%20withIndexDo%3A%20%5B%3Al%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%20nextPutAll%3A%20i%20asString%2C%20%27%3A%20%27%2C%20l%2C%20String%20lf%5D%5D.%0A%09%5E%20Error%20new%20messageText%3A%20%28%27Parse%20error%20on%20line%20%27%20%2C%20row%20%2C%20%27%20column%20%27%20%2C%20col%20%2C%20%27%20%3A%20%27%20%2C%20message%20%2C%20%27%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A%27%20%2C%20String%20lf%2C%20code%29'),
  1356. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  1357. referencedClasses: [smalltalk.String,smalltalk.Error]
  1358. }),
  1359. smalltalk.Smalltalk);
  1360. smalltalk.addMethod(
  1361. unescape('_packages'),
  1362. smalltalk.method({
  1363. selector: unescape('packages'),
  1364. category: 'packages',
  1365. fn: function (){
  1366. var self=this;
  1367. return self.packages.all();
  1368. return self;},
  1369. args: [],
  1370. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  1371. messageSends: [],
  1372. referencedClasses: []
  1373. }),
  1374. smalltalk.Smalltalk);
  1375. smalltalk.addMethod(
  1376. unescape('_packageAt_'),
  1377. smalltalk.method({
  1378. selector: unescape('packageAt%3A'),
  1379. category: 'packages',
  1380. fn: function (packageName){
  1381. var self=this;
  1382. return self.packages[packageName];
  1383. return self;},
  1384. args: ["packageName"],
  1385. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  1386. messageSends: [],
  1387. referencedClasses: []
  1388. }),
  1389. smalltalk.Smalltalk);
  1390. smalltalk.addMethod(
  1391. unescape('_packageAt_ifAbsent_'),
  1392. smalltalk.method({
  1393. selector: unescape('packageAt%3AifAbsent%3A'),
  1394. category: 'packages',
  1395. fn: function (packageName, aBlock){
  1396. var self=this;
  1397. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  1398. return self;},
  1399. args: ["packageName", "aBlock"],
  1400. source: unescape('packageAt%3A%20packageName%20ifAbsent%3A%20aBlock%0A%20%20%20%20%20%20%20%5E%28self%20packageAt%3A%20packageName%29%20ifNil%3A%20aBlock'),
  1401. messageSends: ["ifNil:", "packageAt:"],
  1402. referencedClasses: []
  1403. }),
  1404. smalltalk.Smalltalk);
  1405. smalltalk.addMethod(
  1406. unescape('_createPackage_'),
  1407. smalltalk.method({
  1408. selector: unescape('createPackage%3A'),
  1409. category: 'private',
  1410. fn: function (packageName){
  1411. var self=this;
  1412. return smalltalk.addPackage(packageName);
  1413. return self;},
  1414. args: ["packageName"],
  1415. source: unescape('createPackage%3A%20packageName%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%20%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%29%3E'),
  1416. messageSends: [],
  1417. referencedClasses: []
  1418. }),
  1419. smalltalk.Smalltalk);
  1420. smalltalk.addMethod(
  1421. unescape('_deletePackage_'),
  1422. smalltalk.method({
  1423. selector: unescape('deletePackage%3A'),
  1424. category: 'private',
  1425. fn: function (packageName){
  1426. var self=this;
  1427. delete smalltalk.packages[packageName];
  1428. return self;},
  1429. args: ["packageName"],
  1430. source: unescape('deletePackage%3A%20packageName%0A%09%22Deletes%20a%20package%20by%20deleting%20its%20binding%2C%20but%20does%20not%20check%20if%20it%20contains%20classes%20etc.%0A%09To%20remove%20a%20package%2C%20use%20%23removePackage%20instead.%22%0A%0A%20%20%20%20%20%20%20%3Cdelete%20smalltalk.packages%5BpackageName%5D%3E'),
  1431. messageSends: [],
  1432. referencedClasses: []
  1433. }),
  1434. smalltalk.Smalltalk);
  1435. smalltalk.addMethod(
  1436. unescape('_removePackage_'),
  1437. smalltalk.method({
  1438. selector: unescape('removePackage%3A'),
  1439. category: 'packages',
  1440. fn: function (packageName){
  1441. var self=this;
  1442. var pkg=nil;
  1443. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  1444. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  1445. smalltalk.send(self, "_deletePackage_", [packageName]);
  1446. return self;},
  1447. args: ["packageName"],
  1448. source: unescape('removePackage%3A%20packageName%0A%09%22Removes%20a%20package%20and%20all%20its%20classes.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09pkg%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20%20%20%20%09self%20removeClass%3A%20each%5D.%0A%09self%20deletePackage%3A%20packageName'),
  1449. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  1450. referencedClasses: []
  1451. }),
  1452. smalltalk.Smalltalk);
  1453. smalltalk.addMethod(
  1454. unescape('_renamePackage_to_'),
  1455. smalltalk.method({
  1456. selector: unescape('renamePackage%3Ato%3A'),
  1457. category: 'packages',
  1458. fn: function (packageName, newName){
  1459. var self=this;
  1460. var pkg=nil;
  1461. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  1462. (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
  1463. smalltalk.packages[newName] = smalltalk.packages[packageName];
  1464. smalltalk.send(pkg, "_name_", [newName]);
  1465. smalltalk.send(self, "_deletePackage_", [packageName]);
  1466. return self;},
  1467. args: ["packageName", "newName"],
  1468. source: unescape('renamePackage%3A%20packageName%20to%3A%20newName%0A%09%22Rename%20a%20package.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09%28self%20packageAt%3A%20newName%29%20ifNotNil%3A%20%5Bself%20error%3A%20%27Already%20exists%20a%20package%20called%3A%20%27%2C%20newName%5D.%0A%09%3Csmalltalk.packages%5BnewName%5D%20%3D%20smalltalk.packages%5BpackageName%5D%3E.%0A%09pkg%20name%3A%20newName.%0A%09self%20deletePackage%3A%20packageName.'),
  1469. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  1470. referencedClasses: []
  1471. }),
  1472. smalltalk.Smalltalk);
  1473. smalltalk.addMethod(
  1474. unescape('_reservedWords'),
  1475. smalltalk.method({
  1476. selector: unescape('reservedWords'),
  1477. category: 'accessing',
  1478. fn: function (){
  1479. var self=this;
  1480. return self.reservedWords;
  1481. return self;},
  1482. args: [],
  1483. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  1484. messageSends: [],
  1485. referencedClasses: []
  1486. }),
  1487. smalltalk.Smalltalk);
  1488. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1489. smalltalk.addMethod(
  1490. unescape('_current'),
  1491. smalltalk.method({
  1492. selector: unescape('current'),
  1493. category: 'accessing',
  1494. fn: function (){
  1495. var self=this;
  1496. return smalltalk;
  1497. return self;},
  1498. args: [],
  1499. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1500. messageSends: [],
  1501. referencedClasses: []
  1502. }),
  1503. smalltalk.Smalltalk.klass);
  1504. smalltalk.addClass('Package', smalltalk.Object, [], 'Kernel');
  1505. smalltalk.Package.comment=unescape('A%20Package%20is%20similar%20to%20a%20%22class%20category%22%20typically%20found%20in%20other%20Smalltalks%20like%20Pharo%20or%20Squeak.%20Amber%20does%20not%20have%20class%20categories%20anymore%2C%20it%20had%20in%20the%20beginning%20but%20now%20each%20class%20in%20the%20system%20knows%20which%20package%20it%20belongs%20to.%0A%0AA%20Package%20has%20a%20name%2C%20an%20Array%20of%20%22requires%22%2C%20a%20comment%20and%20a%20Dictionary%20with%20other%20optional%20key%20value%20attributes.%20A%20Package%20can%20also%20be%20queried%20for%20its%20classes%2C%20but%20it%20will%20then%20resort%20to%20a%20reverse%20scan%20of%20all%20classes%20to%20find%20them.%0APackages%20are%20manipulated%20through%20%22Smalltalk%20current%22%2C%20like%20for%20example%20finding%20one%20based%20on%20a%20name%3A%0A%0A%09Smalltalk%20current%20packageAt%3A%20%27Kernel%27%0A%0A...but%20you%20can%20also%20use%3A%0A%0A%09Package%20named%3A%20%27Kernel%27%0A%0AA%20Package%20differs%20slightly%20from%20a%20Monticello%20package%20which%20can%20span%20multiple%20class%20categories%20using%20a%20naming%20convention%20based%20on%20hyphenation.%20But%20just%20as%20in%20Monticello%20a%20Package%20supports%20%22class%20extensions%22%20so%20a%20Package%0Acan%20define%20behaviors%20in%20foreign%20classes%20using%20a%20naming%20convention%20for%20method%20categories%20where%20the%20category%20starts%20with%20an%20asterisk%20and%20then%20the%20name%20of%20the%20owning%20package%20follows.%20This%20can%20easily%20be%20seen%20in%20for%20example%20class%0AString%20where%20the%20method%20category%20%22*IDE%22%20defines%20%23inspectOn%3A%20which%20thus%20is%20a%20method%20belonging%20to%20the%20IDE%20package.')
  1506. smalltalk.addMethod(
  1507. unescape('_name'),
  1508. smalltalk.method({
  1509. selector: unescape('name'),
  1510. category: 'accessing',
  1511. fn: function (){
  1512. var self=this;
  1513. return self.pkgName || nil;
  1514. return self;},
  1515. args: [],
  1516. source: unescape('name%0A%09%3Creturn%20self.pkgName%20%7C%7C%20nil%3E'),
  1517. messageSends: [],
  1518. referencedClasses: []
  1519. }),
  1520. smalltalk.Package);
  1521. smalltalk.addMethod(
  1522. unescape('_requires'),
  1523. smalltalk.method({
  1524. selector: unescape('requires'),
  1525. category: 'accessing',
  1526. fn: function (){
  1527. var self=this;
  1528. return self.requires || nil;
  1529. return self;},
  1530. args: [],
  1531. source: unescape('requires%0A%09%3Creturn%20self.requires%20%7C%7C%20nil%3E'),
  1532. messageSends: [],
  1533. referencedClasses: []
  1534. }),
  1535. smalltalk.Package);
  1536. smalltalk.addMethod(
  1537. unescape('_name_'),
  1538. smalltalk.method({
  1539. selector: unescape('name%3A'),
  1540. category: 'accessing',
  1541. fn: function (aString){
  1542. var self=this;
  1543. return self.pkgName = aString;
  1544. return self;},
  1545. args: ["aString"],
  1546. source: unescape('name%3A%20aString%0A%09%3Creturn%20self.pkgName%20%3D%20aString%3E'),
  1547. messageSends: [],
  1548. referencedClasses: []
  1549. }),
  1550. smalltalk.Package);
  1551. smalltalk.addMethod(
  1552. unescape('_classes'),
  1553. smalltalk.method({
  1554. selector: unescape('classes'),
  1555. category: 'classes',
  1556. fn: function (){
  1557. var self=this;
  1558. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
  1559. return self;},
  1560. args: [],
  1561. source: unescape('classes%0A%09%22We%20need%20to%20do%20a%20reverse%20scan.%22%0A%09%5ESmalltalk%20current%20classes%20select%3A%20%5B%3Ac%20%7C%20c%20package%20%3D%3D%20self%5D'),
  1562. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  1563. referencedClasses: [smalltalk.Smalltalk]
  1564. }),
  1565. smalltalk.Package);
  1566. smalltalk.addMethod(
  1567. unescape('_printString'),
  1568. smalltalk.method({
  1569. selector: unescape('printString'),
  1570. category: 'printing',
  1571. fn: function (){
  1572. var self=this;
  1573. return smalltalk.send(self, "_name", []);
  1574. return self;},
  1575. args: [],
  1576. source: unescape('printString%0A%09%5Eself%20name'),
  1577. messageSends: ["name"],
  1578. referencedClasses: []
  1579. }),
  1580. smalltalk.Package);
  1581. smalltalk.addMethod(
  1582. unescape('_named_'),
  1583. smalltalk.method({
  1584. selector: unescape('named%3A'),
  1585. category: 'not yet classified',
  1586. fn: function (aPackageName){
  1587. var self=this;
  1588. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  1589. return self;},
  1590. args: ["aPackageName"],
  1591. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  1592. messageSends: ["packageAt:", "current"],
  1593. referencedClasses: [smalltalk.Smalltalk]
  1594. }),
  1595. smalltalk.Package.klass);
  1596. smalltalk.addMethod(
  1597. unescape('_named_ifAbsent_'),
  1598. smalltalk.method({
  1599. selector: unescape('named%3AifAbsent%3A'),
  1600. category: 'not yet classified',
  1601. fn: function (aPackageName, aBlock){
  1602. var self=this;
  1603. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  1604. return self;},
  1605. args: ["aPackageName", "aBlock"],
  1606. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  1607. messageSends: ["packageAt:ifAbsent:", "current"],
  1608. referencedClasses: [smalltalk.Smalltalk]
  1609. }),
  1610. smalltalk.Package.klass);
  1611. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel');
  1612. smalltalk.addMethod(
  1613. unescape('_new'),
  1614. smalltalk.method({
  1615. selector: unescape('new'),
  1616. category: 'instance creation',
  1617. fn: function (){
  1618. var self=this;
  1619. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1620. return self;},
  1621. args: [],
  1622. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  1623. messageSends: ["initialize", "basicNew"],
  1624. referencedClasses: []
  1625. }),
  1626. smalltalk.Behavior);
  1627. smalltalk.addMethod(
  1628. unescape('_basicNew'),
  1629. smalltalk.method({
  1630. selector: unescape('basicNew'),
  1631. category: 'instance creation',
  1632. fn: function (){
  1633. var self=this;
  1634. return new self.fn();
  1635. return self;},
  1636. args: [],
  1637. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  1638. messageSends: [],
  1639. referencedClasses: []
  1640. }),
  1641. smalltalk.Behavior);
  1642. smalltalk.addMethod(
  1643. unescape('_name'),
  1644. smalltalk.method({
  1645. selector: unescape('name'),
  1646. category: 'accessing',
  1647. fn: function (){
  1648. var self=this;
  1649. return self.className || nil;
  1650. return self;},
  1651. args: [],
  1652. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  1653. messageSends: [],
  1654. referencedClasses: []
  1655. }),
  1656. smalltalk.Behavior);
  1657. smalltalk.addMethod(
  1658. unescape('_superclass'),
  1659. smalltalk.method({
  1660. selector: unescape('superclass'),
  1661. category: 'accessing',
  1662. fn: function (){
  1663. var self=this;
  1664. return self.superclass || nil;
  1665. return self;},
  1666. args: [],
  1667. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  1668. messageSends: [],
  1669. referencedClasses: []
  1670. }),
  1671. smalltalk.Behavior);
  1672. smalltalk.addMethod(
  1673. unescape('_subclasses'),
  1674. smalltalk.method({
  1675. selector: unescape('subclasses'),
  1676. category: 'accessing',
  1677. fn: function (){
  1678. var self=this;
  1679. return smalltalk.subclasses(self);
  1680. return self;},
  1681. args: [],
  1682. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  1683. messageSends: [],
  1684. referencedClasses: []
  1685. }),
  1686. smalltalk.Behavior);
  1687. smalltalk.addMethod(
  1688. unescape('_allSubclasses'),
  1689. smalltalk.method({
  1690. selector: unescape('allSubclasses'),
  1691. category: 'accessing',
  1692. fn: function (){
  1693. var self=this;
  1694. var result=nil;
  1695. result=smalltalk.send(self, "_subclasses", []);
  1696. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  1697. return result;
  1698. return self;},
  1699. args: [],
  1700. source: unescape('allSubclasses%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20subclasses.%0A%09self%20subclasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20result%20addAll%3A%20each%20allSubclasses%5D.%0A%09%5Eresult'),
  1701. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  1702. referencedClasses: []
  1703. }),
  1704. smalltalk.Behavior);
  1705. smalltalk.addMethod(
  1706. unescape('_withAllSubclasses'),
  1707. smalltalk.method({
  1708. selector: unescape('withAllSubclasses'),
  1709. category: 'accessing',
  1710. fn: function (){
  1711. var self=this;
  1712. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  1713. return self;},
  1714. args: [],
  1715. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  1716. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  1717. referencedClasses: [smalltalk.Array]
  1718. }),
  1719. smalltalk.Behavior);
  1720. smalltalk.addMethod(
  1721. unescape('_prototype'),
  1722. smalltalk.method({
  1723. selector: unescape('prototype'),
  1724. category: 'accessing',
  1725. fn: function (){
  1726. var self=this;
  1727. return self.fn.prototype;
  1728. return self;},
  1729. args: [],
  1730. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  1731. messageSends: [],
  1732. referencedClasses: []
  1733. }),
  1734. smalltalk.Behavior);
  1735. smalltalk.addMethod(
  1736. unescape('_methodDictionary'),
  1737. smalltalk.method({
  1738. selector: unescape('methodDictionary'),
  1739. category: 'accessing',
  1740. fn: function (){
  1741. var self=this;
  1742. var dict = smalltalk.Dictionary._new();
  1743. var methods = self.fn.prototype.methods;
  1744. for(var i in methods) {
  1745. if(methods[i].selector) {
  1746. dict._at_put_(methods[i].selector, methods[i]);
  1747. }
  1748. };
  1749. return dict;
  1750. return self;},
  1751. args: [],
  1752. source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.Dictionary._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
  1753. messageSends: [],
  1754. referencedClasses: []
  1755. }),
  1756. smalltalk.Behavior);
  1757. smalltalk.addMethod(
  1758. unescape('_methodsFor_'),
  1759. smalltalk.method({
  1760. selector: unescape('methodsFor%3A'),
  1761. category: 'accessing',
  1762. fn: function (aString){
  1763. var self=this;
  1764. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  1765. return self;},
  1766. args: ["aString"],
  1767. source: unescape('methodsFor%3A%20aString%0A%09%5EClassCategoryReader%20new%0A%09%20%20%20%20class%3A%20self%20category%3A%20aString%3B%0A%09%20%20%20%20yourself'),
  1768. messageSends: ["class:category:", "yourself", "new"],
  1769. referencedClasses: [smalltalk.ClassCategoryReader]
  1770. }),
  1771. smalltalk.Behavior);
  1772. smalltalk.addMethod(
  1773. unescape('_addCompiledMethod_'),
  1774. smalltalk.method({
  1775. selector: unescape('addCompiledMethod%3A'),
  1776. category: 'accessing',
  1777. fn: function (aMethod){
  1778. var self=this;
  1779. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  1780. return self;},
  1781. args: ["aMethod"],
  1782. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  1783. messageSends: [],
  1784. referencedClasses: []
  1785. }),
  1786. smalltalk.Behavior);
  1787. smalltalk.addMethod(
  1788. unescape('_instanceVariableNames'),
  1789. smalltalk.method({
  1790. selector: unescape('instanceVariableNames'),
  1791. category: 'accessing',
  1792. fn: function (){
  1793. var self=this;
  1794. return self.iVarNames;
  1795. return self;},
  1796. args: [],
  1797. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  1798. messageSends: [],
  1799. referencedClasses: []
  1800. }),
  1801. smalltalk.Behavior);
  1802. smalltalk.addMethod(
  1803. unescape('_comment'),
  1804. smalltalk.method({
  1805. selector: unescape('comment'),
  1806. category: 'accessing',
  1807. fn: function (){
  1808. var self=this;
  1809. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  1810. return self;},
  1811. args: [],
  1812. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  1813. messageSends: ["ifNil:", "basicAt:"],
  1814. referencedClasses: []
  1815. }),
  1816. smalltalk.Behavior);
  1817. smalltalk.addMethod(
  1818. unescape('_comment_'),
  1819. smalltalk.method({
  1820. selector: unescape('comment%3A'),
  1821. category: 'accessing',
  1822. fn: function (aString){
  1823. var self=this;
  1824. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  1825. return self;},
  1826. args: ["aString"],
  1827. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  1828. messageSends: ["basicAt:put:"],
  1829. referencedClasses: []
  1830. }),
  1831. smalltalk.Behavior);
  1832. smalltalk.addMethod(
  1833. unescape('_commentStamp'),
  1834. smalltalk.method({
  1835. selector: unescape('commentStamp'),
  1836. category: 'accessing',
  1837. fn: function (){
  1838. var self=this;
  1839. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  1840. return self;},
  1841. args: [],
  1842. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  1843. messageSends: ["class:", "yourself", "new"],
  1844. referencedClasses: [smalltalk.ClassCommentReader]
  1845. }),
  1846. smalltalk.Behavior);
  1847. smalltalk.addMethod(
  1848. unescape('_removeCompiledMethod_'),
  1849. smalltalk.method({
  1850. selector: unescape('removeCompiledMethod%3A'),
  1851. category: 'accessing',
  1852. fn: function (aMethod){
  1853. var self=this;
  1854. delete self.fn.prototype[aMethod.selector._asSelector()];
  1855. delete self.fn.prototype.methods[aMethod.selector];
  1856. smalltalk.init(self);;
  1857. return self;},
  1858. args: ["aMethod"],
  1859. source: unescape('removeCompiledMethod%3A%20aMethod%0A%09%3Cdelete%20self.fn.prototype%5BaMethod.selector._asSelector%28%29%5D%3B%0A%09delete%20self.fn.prototype.methods%5BaMethod.selector%5D%3B%0A%09smalltalk.init%28self%29%3B%3E'),
  1860. messageSends: [],
  1861. referencedClasses: []
  1862. }),
  1863. smalltalk.Behavior);
  1864. smalltalk.addMethod(
  1865. unescape('_inheritsFrom_'),
  1866. smalltalk.method({
  1867. selector: unescape('inheritsFrom%3A'),
  1868. category: 'instance creation',
  1869. fn: function (aClass){
  1870. var self=this;
  1871. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  1872. return self;},
  1873. args: ["aClass"],
  1874. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  1875. messageSends: ["includes:", "allSubclasses"],
  1876. referencedClasses: []
  1877. }),
  1878. smalltalk.Behavior);
  1879. smalltalk.addMethod(
  1880. unescape('_protocols'),
  1881. smalltalk.method({
  1882. selector: unescape('protocols'),
  1883. category: 'accessing',
  1884. fn: function (){
  1885. var self=this;
  1886. var protocols=nil;
  1887. protocols=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1888. smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  1889. return smalltalk.send(protocols, "_sort", []);
  1890. return self;},
  1891. args: [],
  1892. source: unescape('protocols%0A%20%20%20%20%7C%20protocols%20%7C%0A%20%20%20%20protocols%20%3A%3D%20Array%20new.%0A%20%20%20%20self%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28protocols%20includes%3A%20each%20category%29%20ifFalse%3A%20%5B%0A%09%09protocols%20add%3A%20each%20category%5D%5D.%0A%20%20%20%20%5Eprotocols%20sort'),
  1893. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  1894. referencedClasses: [smalltalk.Array]
  1895. }),
  1896. smalltalk.Behavior);
  1897. smalltalk.addMethod(
  1898. unescape('_protocolsDo_'),
  1899. smalltalk.method({
  1900. selector: unescape('protocolsDo%3A'),
  1901. category: 'accessing',
  1902. fn: function (aBlock){
  1903. var self=this;
  1904. var methodsByCategory=nil;
  1905. methodsByCategory=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1906. smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
  1907. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  1908. return self;},
  1909. args: ["aBlock"],
  1910. source: unescape('protocolsDo%3A%20aBlock%0A%09%22Execute%20aBlock%20for%20each%20method%20category%20with%0A%09its%20collection%20of%20methods%20in%20the%20sort%20order%20of%20category%20name.%22%0A%0A%09%7C%20methodsByCategory%20%7C%0A%09methodsByCategory%20%3A%3D%20Dictionary%20new.%0A%09self%20methodDictionary%20values%20do%3A%20%5B%3Am%20%7C%0A%09%09%28methodsByCategory%20at%3A%20m%20category%20ifAbsentPut%3A%20%5BArray%20new%5D%29%0A%20%09%09%09add%3A%20m%5D.%20%0A%09self%20protocols%20do%3A%20%5B%3Acategory%20%7C%0A%09%09aBlock%20value%3A%20category%20value%3A%20%28methodsByCategory%20at%3A%20category%29%5D'),
  1911. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  1912. referencedClasses: [smalltalk.Dictionary,smalltalk.Array]
  1913. }),
  1914. smalltalk.Behavior);
  1915. smalltalk.addMethod(
  1916. unescape('_allInstanceVariableNames'),
  1917. smalltalk.method({
  1918. selector: unescape('allInstanceVariableNames'),
  1919. category: 'accessing',
  1920. fn: function (){
  1921. var self=this;
  1922. var result=nil;
  1923. result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []);
  1924. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  1925. return result;
  1926. return self;},
  1927. args: [],
  1928. source: unescape('allInstanceVariableNames%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20instanceVariableNames%20copy.%0A%09self%20superclass%20ifNotNil%3A%20%5B%0A%09%20%20%20%20result%20addAll%3A%20self%20superclass%20allInstanceVariableNames%5D.%0A%09%5Eresult'),
  1929. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  1930. referencedClasses: []
  1931. }),
  1932. smalltalk.Behavior);
  1933. smalltalk.addMethod(
  1934. unescape('_methodAt_'),
  1935. smalltalk.method({
  1936. selector: unescape('methodAt%3A'),
  1937. category: 'accessing',
  1938. fn: function (aString){
  1939. var self=this;
  1940. return smalltalk.methods(self)[aString];
  1941. return self;},
  1942. args: ["aString"],
  1943. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  1944. messageSends: [],
  1945. referencedClasses: []
  1946. }),
  1947. smalltalk.Behavior);
  1948. smalltalk.addMethod(
  1949. unescape('_methodsFor_stamp_'),
  1950. smalltalk.method({
  1951. selector: unescape('methodsFor%3Astamp%3A'),
  1952. category: 'accessing',
  1953. fn: function (aString, aStamp){
  1954. var self=this;
  1955. return smalltalk.send(self, "_methodsFor_", [aString]);
  1956. return self;},
  1957. args: ["aString", "aStamp"],
  1958. source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
  1959. messageSends: ["methodsFor:"],
  1960. referencedClasses: []
  1961. }),
  1962. smalltalk.Behavior);
  1963. smalltalk.addMethod(
  1964. unescape('_commentStamp_prior_'),
  1965. smalltalk.method({
  1966. selector: unescape('commentStamp%3Aprior%3A'),
  1967. category: 'accessing',
  1968. fn: function (aStamp, prior){
  1969. var self=this;
  1970. return smalltalk.send(self, "_commentStamp", []);
  1971. return self;},
  1972. args: ["aStamp", "prior"],
  1973. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  1974. messageSends: ["commentStamp"],
  1975. referencedClasses: []
  1976. }),
  1977. smalltalk.Behavior);
  1978. smalltalk.addMethod(
  1979. unescape('_compile_'),
  1980. smalltalk.method({
  1981. selector: unescape('compile%3A'),
  1982. category: 'compiling',
  1983. fn: function (aString){
  1984. var self=this;
  1985. smalltalk.send(self, "_compile_category_", [aString, ""]);
  1986. return self;},
  1987. args: ["aString"],
  1988. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  1989. messageSends: ["compile:category:"],
  1990. referencedClasses: []
  1991. }),
  1992. smalltalk.Behavior);
  1993. smalltalk.addMethod(
  1994. unescape('_compile_category_'),
  1995. smalltalk.method({
  1996. selector: unescape('compile%3Acategory%3A'),
  1997. category: 'compiling',
  1998. fn: function (aString, anotherString){
  1999. var self=this;
  2000. var method=nil;
  2001. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]);
  2002. smalltalk.send(method, "_category_", [anotherString]);
  2003. smalltalk.send(self, "_addCompiledMethod_", [method]);
  2004. return self;},
  2005. args: ["aString", "anotherString"],
  2006. source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
  2007. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  2008. referencedClasses: [smalltalk.Compiler]
  2009. }),
  2010. smalltalk.Behavior);
  2011. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel');
  2012. smalltalk.addMethod(
  2013. unescape('_category'),
  2014. smalltalk.method({
  2015. selector: unescape('category'),
  2016. category: 'accessing',
  2017. fn: function (){
  2018. var self=this;
  2019. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  2020. return self;},
  2021. args: [],
  2022. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  2023. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  2024. referencedClasses: []
  2025. }),
  2026. smalltalk.Class);
  2027. smalltalk.addMethod(
  2028. unescape('_subclass_instanceVariableNames_'),
  2029. smalltalk.method({
  2030. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  2031. category: 'class creation',
  2032. fn: function (aString, anotherString){
  2033. var self=this;
  2034. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  2035. return self;},
  2036. args: ["aString", "anotherString"],
  2037. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  2038. messageSends: ["subclass:instanceVariableNames:package:"],
  2039. referencedClasses: []
  2040. }),
  2041. smalltalk.Class);
  2042. smalltalk.addMethod(
  2043. unescape('_subclass_instanceVariableNames_category_'),
  2044. smalltalk.method({
  2045. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  2046. category: 'class creation',
  2047. fn: function (aString, aString2, aString3){
  2048. var self=this;
  2049. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  2050. return self;},
  2051. args: ["aString", "aString2", "aString3"],
  2052. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  2053. messageSends: ["subclass:instanceVariableNames:package:"],
  2054. referencedClasses: []
  2055. }),
  2056. smalltalk.Class);
  2057. smalltalk.addMethod(
  2058. unescape('_isClass'),
  2059. smalltalk.method({
  2060. selector: unescape('isClass'),
  2061. category: 'testing',
  2062. fn: function (){
  2063. var self=this;
  2064. return true;
  2065. return self;},
  2066. args: [],
  2067. source: unescape('isClass%0A%09%5Etrue'),
  2068. messageSends: [],
  2069. referencedClasses: []
  2070. }),
  2071. smalltalk.Class);
  2072. smalltalk.addMethod(
  2073. unescape('_printString'),
  2074. smalltalk.method({
  2075. selector: unescape('printString'),
  2076. category: 'printing',
  2077. fn: function (){
  2078. var self=this;
  2079. return smalltalk.send(self, "_name", []);
  2080. return self;},
  2081. args: [],
  2082. source: unescape('printString%0A%09%5Eself%20name'),
  2083. messageSends: ["name"],
  2084. referencedClasses: []
  2085. }),
  2086. smalltalk.Class);
  2087. smalltalk.addMethod(
  2088. unescape('_rename_'),
  2089. smalltalk.method({
  2090. selector: unescape('rename%3A'),
  2091. category: 'accessing',
  2092. fn: function (aString){
  2093. var self=this;
  2094. smalltalk[aString] = self;
  2095. delete smalltalk[self.className];
  2096. self.className = aString;
  2097. ;
  2098. return self;},
  2099. args: ["aString"],
  2100. source: unescape('rename%3A%20aString%0A%09%3C%0A%09%09smalltalk%5BaString%5D%20%3D%20self%3B%0A%09%09delete%20smalltalk%5Bself.className%5D%3B%0A%09%09self.className%20%3D%20aString%3B%0A%09%3E'),
  2101. messageSends: [],
  2102. referencedClasses: []
  2103. }),
  2104. smalltalk.Class);
  2105. smalltalk.addMethod(
  2106. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  2107. smalltalk.method({
  2108. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  2109. category: 'class creation',
  2110. fn: function (aString, aString2, classVars, pools, aString3){
  2111. var self=this;
  2112. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  2113. return self;},
  2114. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  2115. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  2116. messageSends: ["subclass:instanceVariableNames:package:"],
  2117. referencedClasses: []
  2118. }),
  2119. smalltalk.Class);
  2120. smalltalk.addMethod(
  2121. unescape('_package'),
  2122. smalltalk.method({
  2123. selector: unescape('package'),
  2124. category: 'accessing',
  2125. fn: function (){
  2126. var self=this;
  2127. return self.pkg;
  2128. return self;},
  2129. args: [],
  2130. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  2131. messageSends: [],
  2132. referencedClasses: []
  2133. }),
  2134. smalltalk.Class);
  2135. smalltalk.addMethod(
  2136. unescape('_package_'),
  2137. smalltalk.method({
  2138. selector: unescape('package%3A'),
  2139. category: 'accessing',
  2140. fn: function (aPackage){
  2141. var self=this;
  2142. self.pkg = aPackage;
  2143. return self;},
  2144. args: ["aPackage"],
  2145. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  2146. messageSends: [],
  2147. referencedClasses: []
  2148. }),
  2149. smalltalk.Class);
  2150. smalltalk.addMethod(
  2151. unescape('_subclass_instanceVariableNames_package_'),
  2152. smalltalk.method({
  2153. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  2154. category: 'class creation',
  2155. fn: function (aString, aString2, aString3){
  2156. var self=this;
  2157. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  2158. return self;},
  2159. args: ["aString", "aString2", "aString3"],
  2160. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  2161. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  2162. referencedClasses: [smalltalk.ClassBuilder]
  2163. }),
  2164. smalltalk.Class);
  2165. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel');
  2166. smalltalk.addMethod(
  2167. unescape('_instanceClass'),
  2168. smalltalk.method({
  2169. selector: unescape('instanceClass'),
  2170. category: 'accessing',
  2171. fn: function (){
  2172. var self=this;
  2173. return self.instanceClass;
  2174. return self;},
  2175. args: [],
  2176. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  2177. messageSends: [],
  2178. referencedClasses: []
  2179. }),
  2180. smalltalk.Metaclass);
  2181. smalltalk.addMethod(
  2182. unescape('_instanceVariableNames_'),
  2183. smalltalk.method({
  2184. selector: unescape('instanceVariableNames%3A'),
  2185. category: 'accessing',
  2186. fn: function (aCollection){
  2187. var self=this;
  2188. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  2189. return self;},
  2190. args: ["aCollection"],
  2191. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  2192. messageSends: ["class:instanceVariableNames:", "new"],
  2193. referencedClasses: [smalltalk.ClassBuilder]
  2194. }),
  2195. smalltalk.Metaclass);
  2196. smalltalk.addMethod(
  2197. unescape('_isMetaclass'),
  2198. smalltalk.method({
  2199. selector: unescape('isMetaclass'),
  2200. category: 'testing',
  2201. fn: function (){
  2202. var self=this;
  2203. return true;
  2204. return self;},
  2205. args: [],
  2206. source: unescape('isMetaclass%0A%09%5Etrue'),
  2207. messageSends: [],
  2208. referencedClasses: []
  2209. }),
  2210. smalltalk.Metaclass);
  2211. smalltalk.addMethod(
  2212. unescape('_printString'),
  2213. smalltalk.method({
  2214. selector: unescape('printString'),
  2215. category: 'printing',
  2216. fn: function (){
  2217. var self=this;
  2218. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  2219. return self;},
  2220. args: [],
  2221. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  2222. messageSends: [unescape("%2C"), "name", "instanceClass"],
  2223. referencedClasses: []
  2224. }),
  2225. smalltalk.Metaclass);
  2226. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel');
  2227. smalltalk.addMethod(
  2228. unescape('_source'),
  2229. smalltalk.method({
  2230. selector: unescape('source'),
  2231. category: 'accessing',
  2232. fn: function (){
  2233. var self=this;
  2234. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2235. return self;},
  2236. args: [],
  2237. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2238. messageSends: ["ifNil:", "basicAt:"],
  2239. referencedClasses: []
  2240. }),
  2241. smalltalk.CompiledMethod);
  2242. smalltalk.addMethod(
  2243. unescape('_source_'),
  2244. smalltalk.method({
  2245. selector: unescape('source%3A'),
  2246. category: 'accessing',
  2247. fn: function (aString){
  2248. var self=this;
  2249. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  2250. return self;},
  2251. args: ["aString"],
  2252. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  2253. messageSends: ["basicAt:put:"],
  2254. referencedClasses: []
  2255. }),
  2256. smalltalk.CompiledMethod);
  2257. smalltalk.addMethod(
  2258. unescape('_category'),
  2259. smalltalk.method({
  2260. selector: unescape('category'),
  2261. category: 'accessing',
  2262. fn: function (){
  2263. var self=this;
  2264. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2265. return self;},
  2266. args: [],
  2267. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2268. messageSends: ["ifNil:", "basicAt:"],
  2269. referencedClasses: []
  2270. }),
  2271. smalltalk.CompiledMethod);
  2272. smalltalk.addMethod(
  2273. unescape('_category_'),
  2274. smalltalk.method({
  2275. selector: unescape('category%3A'),
  2276. category: 'accessing',
  2277. fn: function (aString){
  2278. var self=this;
  2279. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  2280. return self;},
  2281. args: ["aString"],
  2282. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  2283. messageSends: ["basicAt:put:"],
  2284. referencedClasses: []
  2285. }),
  2286. smalltalk.CompiledMethod);
  2287. smalltalk.addMethod(
  2288. unescape('_selector'),
  2289. smalltalk.method({
  2290. selector: unescape('selector'),
  2291. category: 'accessing',
  2292. fn: function (){
  2293. var self=this;
  2294. return smalltalk.send(self, "_basicAt_", ["selector"]);
  2295. return self;},
  2296. args: [],
  2297. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  2298. messageSends: ["basicAt:"],
  2299. referencedClasses: []
  2300. }),
  2301. smalltalk.CompiledMethod);
  2302. smalltalk.addMethod(
  2303. unescape('_selector_'),
  2304. smalltalk.method({
  2305. selector: unescape('selector%3A'),
  2306. category: 'accessing',
  2307. fn: function (aString){
  2308. var self=this;
  2309. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  2310. return self;},
  2311. args: ["aString"],
  2312. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  2313. messageSends: ["basicAt:put:"],
  2314. referencedClasses: []
  2315. }),
  2316. smalltalk.CompiledMethod);
  2317. smalltalk.addMethod(
  2318. unescape('_fn'),
  2319. smalltalk.method({
  2320. selector: unescape('fn'),
  2321. category: 'accessing',
  2322. fn: function (){
  2323. var self=this;
  2324. return smalltalk.send(self, "_basicAt_", ["fn"]);
  2325. return self;},
  2326. args: [],
  2327. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  2328. messageSends: ["basicAt:"],
  2329. referencedClasses: []
  2330. }),
  2331. smalltalk.CompiledMethod);
  2332. smalltalk.addMethod(
  2333. unescape('_fn_'),
  2334. smalltalk.method({
  2335. selector: unescape('fn%3A'),
  2336. category: 'accessing',
  2337. fn: function (aBlock){
  2338. var self=this;
  2339. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  2340. return self;},
  2341. args: ["aBlock"],
  2342. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  2343. messageSends: ["basicAt:put:"],
  2344. referencedClasses: []
  2345. }),
  2346. smalltalk.CompiledMethod);
  2347. smalltalk.addMethod(
  2348. unescape('_messageSends'),
  2349. smalltalk.method({
  2350. selector: unescape('messageSends'),
  2351. category: 'accessing',
  2352. fn: function (){
  2353. var self=this;
  2354. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  2355. return self;},
  2356. args: [],
  2357. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  2358. messageSends: ["basicAt:"],
  2359. referencedClasses: []
  2360. }),
  2361. smalltalk.CompiledMethod);
  2362. smalltalk.addMethod(
  2363. unescape('_methodClass'),
  2364. smalltalk.method({
  2365. selector: unescape('methodClass'),
  2366. category: 'accessing',
  2367. fn: function (){
  2368. var self=this;
  2369. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  2370. return self;},
  2371. args: [],
  2372. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  2373. messageSends: ["basicAt:"],
  2374. referencedClasses: []
  2375. }),
  2376. smalltalk.CompiledMethod);
  2377. smalltalk.addMethod(
  2378. unescape('_referencedClasses'),
  2379. smalltalk.method({
  2380. selector: unescape('referencedClasses'),
  2381. category: 'accessing',
  2382. fn: function (){
  2383. var self=this;
  2384. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  2385. return self;},
  2386. args: [],
  2387. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  2388. messageSends: ["basicAt:"],
  2389. referencedClasses: []
  2390. }),
  2391. smalltalk.CompiledMethod);
  2392. smalltalk.addMethod(
  2393. unescape('_arguments'),
  2394. smalltalk.method({
  2395. selector: unescape('arguments'),
  2396. category: 'accessing',
  2397. fn: function (){
  2398. var self=this;
  2399. return self.args || [];
  2400. return self;},
  2401. args: [],
  2402. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  2403. messageSends: [],
  2404. referencedClasses: []
  2405. }),
  2406. smalltalk.CompiledMethod);
  2407. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel');
  2408. smalltalk.addMethod(
  2409. unescape('__eq'),
  2410. smalltalk.method({
  2411. selector: unescape('%3D'),
  2412. category: 'comparing',
  2413. fn: function (aNumber){
  2414. var self=this;
  2415. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  2416. return Number(self) == aNumber;
  2417. return self;
  2418. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2419. args: ["aNumber"],
  2420. source: unescape('%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  2421. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2422. referencedClasses: []
  2423. }),
  2424. smalltalk.Number);
  2425. smalltalk.addMethod(
  2426. unescape('__gt'),
  2427. smalltalk.method({
  2428. selector: unescape('%3E'),
  2429. category: 'comparing',
  2430. fn: function (aNumber){
  2431. var self=this;
  2432. return self > aNumber;
  2433. return self;},
  2434. args: ["aNumber"],
  2435. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  2436. messageSends: [],
  2437. referencedClasses: []
  2438. }),
  2439. smalltalk.Number);
  2440. smalltalk.addMethod(
  2441. unescape('__lt'),
  2442. smalltalk.method({
  2443. selector: unescape('%3C'),
  2444. category: 'comparing',
  2445. fn: function (aNumber){
  2446. var self=this;
  2447. return self < aNumber;
  2448. return self;},
  2449. args: ["aNumber"],
  2450. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  2451. messageSends: [],
  2452. referencedClasses: []
  2453. }),
  2454. smalltalk.Number);
  2455. smalltalk.addMethod(
  2456. unescape('__gt_eq'),
  2457. smalltalk.method({
  2458. selector: unescape('%3E%3D'),
  2459. category: 'comparing',
  2460. fn: function (aNumber){
  2461. var self=this;
  2462. return self >= aNumber;
  2463. return self;},
  2464. args: ["aNumber"],
  2465. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  2466. messageSends: [],
  2467. referencedClasses: []
  2468. }),
  2469. smalltalk.Number);
  2470. smalltalk.addMethod(
  2471. unescape('__lt_eq'),
  2472. smalltalk.method({
  2473. selector: unescape('%3C%3D'),
  2474. category: 'comparing',
  2475. fn: function (aNumber){
  2476. var self=this;
  2477. return self <= aNumber;
  2478. return self;},
  2479. args: ["aNumber"],
  2480. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  2481. messageSends: [],
  2482. referencedClasses: []
  2483. }),
  2484. smalltalk.Number);
  2485. smalltalk.addMethod(
  2486. unescape('__plus'),
  2487. smalltalk.method({
  2488. selector: unescape('+'),
  2489. category: 'arithmetic',
  2490. fn: function (aNumber){
  2491. var self=this;
  2492. return self + aNumber;
  2493. return self;},
  2494. args: ["aNumber"],
  2495. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  2496. messageSends: [],
  2497. referencedClasses: []
  2498. }),
  2499. smalltalk.Number);
  2500. smalltalk.addMethod(
  2501. unescape('__minus'),
  2502. smalltalk.method({
  2503. selector: unescape('-'),
  2504. category: 'arithmetic',
  2505. fn: function (aNumber){
  2506. var self=this;
  2507. return self - aNumber;
  2508. return self;},
  2509. args: ["aNumber"],
  2510. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  2511. messageSends: [],
  2512. referencedClasses: []
  2513. }),
  2514. smalltalk.Number);
  2515. smalltalk.addMethod(
  2516. unescape('__star'),
  2517. smalltalk.method({
  2518. selector: unescape('*'),
  2519. category: 'arithmetic',
  2520. fn: function (aNumber){
  2521. var self=this;
  2522. return self * aNumber;
  2523. return self;},
  2524. args: ["aNumber"],
  2525. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  2526. messageSends: [],
  2527. referencedClasses: []
  2528. }),
  2529. smalltalk.Number);
  2530. smalltalk.addMethod(
  2531. unescape('__slash'),
  2532. smalltalk.method({
  2533. selector: unescape('/'),
  2534. category: 'arithmetic',
  2535. fn: function (aNumber){
  2536. var self=this;
  2537. return self / aNumber;
  2538. return self;},
  2539. args: ["aNumber"],
  2540. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  2541. messageSends: [],
  2542. referencedClasses: []
  2543. }),
  2544. smalltalk.Number);
  2545. smalltalk.addMethod(
  2546. unescape('_max_'),
  2547. smalltalk.method({
  2548. selector: unescape('max%3A'),
  2549. category: 'arithmetic',
  2550. fn: function (aNumber){
  2551. var self=this;
  2552. return Math.max(self, aNumber);;
  2553. return self;},
  2554. args: ["aNumber"],
  2555. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  2556. messageSends: [],
  2557. referencedClasses: []
  2558. }),
  2559. smalltalk.Number);
  2560. smalltalk.addMethod(
  2561. unescape('_min_'),
  2562. smalltalk.method({
  2563. selector: unescape('min%3A'),
  2564. category: 'arithmetic',
  2565. fn: function (aNumber){
  2566. var self=this;
  2567. return Math.min(self, aNumber);;
  2568. return self;},
  2569. args: ["aNumber"],
  2570. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  2571. messageSends: [],
  2572. referencedClasses: []
  2573. }),
  2574. smalltalk.Number);
  2575. smalltalk.addMethod(
  2576. unescape('_rounded'),
  2577. smalltalk.method({
  2578. selector: unescape('rounded'),
  2579. category: 'converting',
  2580. fn: function (){
  2581. var self=this;
  2582. return Math.round(self);;
  2583. return self;},
  2584. args: [],
  2585. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  2586. messageSends: [],
  2587. referencedClasses: []
  2588. }),
  2589. smalltalk.Number);
  2590. smalltalk.addMethod(
  2591. unescape('_truncated'),
  2592. smalltalk.method({
  2593. selector: unescape('truncated'),
  2594. category: 'converting',
  2595. fn: function (){
  2596. var self=this;
  2597. var result=nil;
  2598. ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
  2599. return result;
  2600. return self;},
  2601. args: [],
  2602. source: unescape('truncated%0A%7Cresult%7C%0A%0A%20%20%20%20self%20%3E%3D%200%20%0A%20%20%20%20%20%20%20%20ifTrue%3A%20%5B%3Cresult%20%3D%20Math.floor%28self%29%3B%3E%5D%0A%20%20%20%20%20%20%20%20ifFalse%3A%20%5B%3Cresult%20%3D%20%28Math.floor%28self%20*%20%28-1%29%29%20*%20%28-1%29%29%3B%3E%5D.%0A%0A%20%20%20%20%5E%20result'),
  2603. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  2604. referencedClasses: []
  2605. }),
  2606. smalltalk.Number);
  2607. smalltalk.addMethod(
  2608. unescape('_to_'),
  2609. smalltalk.method({
  2610. selector: unescape('to%3A'),
  2611. category: 'converting',
  2612. fn: function (aNumber){
  2613. var self=this;
  2614. var array=nil;
  2615. var first=nil;
  2616. var last=nil;
  2617. var count=nil;
  2618. first=smalltalk.send(self, "_truncated", []);
  2619. last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2620. count=(1);
  2621. ((($receiver = ((($receiver = first).klass === smalltalk.Number) ? $receiver <=last : smalltalk.send($receiver, "__lt_eq", [last]))).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", ["Wrong interval"]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", ["Wrong interval"]);})]));
  2622. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2623. smalltalk.send(((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first])), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return first=((($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
  2624. return array;
  2625. return self;},
  2626. args: ["aNumber"],
  2627. source: unescape('to%3A%20aNumber%0A%09%7C%20array%20first%20last%20count%20%7C%0A%09first%20%3A%3D%20self%20truncated.%0A%09last%20%3A%3D%20aNumber%20truncated%20+%201.%0A%09count%20%3A%3D%201.%0A%09%28first%20%3C%3D%20last%29%20ifFalse%3A%20%5Bself%20error%3A%20%27Wrong%20interval%27%5D.%0A%09array%20%3A%3D%20Array%20new.%0A%09%28last%20-%20first%29%20timesRepeat%3A%20%5B%0A%09%20%20%20%20array%20at%3A%20count%20put%3A%20first.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%09%20%20%20%20first%20%3A%3D%20first%20+%201%5D.%0A%09%5Earray'),
  2628. messageSends: ["truncated", unescape("+"), "ifFalse:", unescape("%3C%3D"), "error:", "new", "timesRepeat:", unescape("-"), "at:put:"],
  2629. referencedClasses: [smalltalk.Array]
  2630. }),
  2631. smalltalk.Number);
  2632. smalltalk.addMethod(
  2633. unescape('_timesRepeat_'),
  2634. smalltalk.method({
  2635. selector: unescape('timesRepeat%3A'),
  2636. category: 'enumerating',
  2637. fn: function (aBlock){
  2638. var self=this;
  2639. var integer=nil;
  2640. var count=nil;
  2641. integer=smalltalk.send(self, "_truncated", []);
  2642. count=(1);
  2643. (function(){while(!(function(){return ((($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]));})()) {(function(){smalltalk.send(aBlock, "_value", []);return count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  2644. return self;},
  2645. args: ["aBlock"],
  2646. source: unescape('timesRepeat%3A%20aBlock%0A%09%7C%20integer%20count%20%7C%0A%09integer%20%3A%3D%20self%20truncated.%0A%09count%20%3A%3D%201.%0A%09%5Bcount%20%3E%20self%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20aBlock%20value.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201%5D'),
  2647. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  2648. referencedClasses: []
  2649. }),
  2650. smalltalk.Number);
  2651. smalltalk.addMethod(
  2652. unescape('_to_do_'),
  2653. smalltalk.method({
  2654. selector: unescape('to%3Ado%3A'),
  2655. category: 'enumerating',
  2656. fn: function (aNumber, aBlock){
  2657. var self=this;
  2658. return smalltalk.send(smalltalk.send(self, "_to_", [aNumber]), "_do_", [aBlock]);
  2659. return self;},
  2660. args: ["aNumber", "aBlock"],
  2661. source: unescape('to%3A%20aNumber%20do%3A%20aBlock%0A%09%5E%28self%20to%3A%20aNumber%29%20do%3A%20aBlock'),
  2662. messageSends: ["do:", "to:"],
  2663. referencedClasses: []
  2664. }),
  2665. smalltalk.Number);
  2666. smalltalk.addMethod(
  2667. unescape('_asString'),
  2668. smalltalk.method({
  2669. selector: unescape('asString'),
  2670. category: 'converting',
  2671. fn: function (){
  2672. var self=this;
  2673. return smalltalk.send(self, "_printString", []);
  2674. return self;},
  2675. args: [],
  2676. source: unescape('asString%0A%09%5Eself%20printString'),
  2677. messageSends: ["printString"],
  2678. referencedClasses: []
  2679. }),
  2680. smalltalk.Number);
  2681. smalltalk.addMethod(
  2682. unescape('_asJavascript'),
  2683. smalltalk.method({
  2684. selector: unescape('asJavascript'),
  2685. category: 'converting',
  2686. fn: function (){
  2687. var self=this;
  2688. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  2689. return self;},
  2690. args: [],
  2691. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  2692. messageSends: [unescape("%2C"), "printString"],
  2693. referencedClasses: []
  2694. }),
  2695. smalltalk.Number);
  2696. smalltalk.addMethod(
  2697. unescape('_printString'),
  2698. smalltalk.method({
  2699. selector: unescape('printString'),
  2700. category: 'printing',
  2701. fn: function (){
  2702. var self=this;
  2703. return String(self);
  2704. return self;},
  2705. args: [],
  2706. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  2707. messageSends: [],
  2708. referencedClasses: []
  2709. }),
  2710. smalltalk.Number);
  2711. smalltalk.addMethod(
  2712. unescape('_isNumber'),
  2713. smalltalk.method({
  2714. selector: unescape('isNumber'),
  2715. category: 'testing',
  2716. fn: function (){
  2717. var self=this;
  2718. return true;
  2719. return self;},
  2720. args: [],
  2721. source: unescape('isNumber%0A%09%5Etrue'),
  2722. messageSends: [],
  2723. referencedClasses: []
  2724. }),
  2725. smalltalk.Number);
  2726. smalltalk.addMethod(
  2727. unescape('_atRandom'),
  2728. smalltalk.method({
  2729. selector: unescape('atRandom'),
  2730. category: 'converting',
  2731. fn: function (){
  2732. var self=this;
  2733. return ((($receiver = smalltalk.send(((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self])), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2734. return self;},
  2735. args: [],
  2736. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  2737. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  2738. referencedClasses: [smalltalk.Random]
  2739. }),
  2740. smalltalk.Number);
  2741. smalltalk.addMethod(
  2742. unescape('__at'),
  2743. smalltalk.method({
  2744. selector: unescape('@'),
  2745. category: 'converting',
  2746. fn: function (aNumber){
  2747. var self=this;
  2748. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  2749. return self;},
  2750. args: ["aNumber"],
  2751. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  2752. messageSends: ["x:y:"],
  2753. referencedClasses: [smalltalk.Point]
  2754. }),
  2755. smalltalk.Number);
  2756. smalltalk.addMethod(
  2757. unescape('_asPoint'),
  2758. smalltalk.method({
  2759. selector: unescape('asPoint'),
  2760. category: 'converting',
  2761. fn: function (){
  2762. var self=this;
  2763. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  2764. return self;},
  2765. args: [],
  2766. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  2767. messageSends: ["x:y:"],
  2768. referencedClasses: [smalltalk.Point]
  2769. }),
  2770. smalltalk.Number);
  2771. smalltalk.addMethod(
  2772. unescape('_clearInterval'),
  2773. smalltalk.method({
  2774. selector: unescape('clearInterval'),
  2775. category: 'timeouts/intervals',
  2776. fn: function (){
  2777. var self=this;
  2778. clearInterval(Number(self));
  2779. return self;},
  2780. args: [],
  2781. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  2782. messageSends: [],
  2783. referencedClasses: []
  2784. }),
  2785. smalltalk.Number);
  2786. smalltalk.addMethod(
  2787. unescape('_asJSONObject'),
  2788. smalltalk.method({
  2789. selector: unescape('asJSONObject'),
  2790. category: 'converting',
  2791. fn: function (){
  2792. var self=this;
  2793. return self;
  2794. return self;},
  2795. args: [],
  2796. source: unescape('asJSONObject%0A%09%5Eself'),
  2797. messageSends: [],
  2798. referencedClasses: []
  2799. }),
  2800. smalltalk.Number);
  2801. smalltalk.addMethod(
  2802. unescape('_clearTimeout'),
  2803. smalltalk.method({
  2804. selector: unescape('clearTimeout'),
  2805. category: 'timeouts/intervals',
  2806. fn: function (){
  2807. var self=this;
  2808. clearTimeout(Number(self));
  2809. return self;},
  2810. args: [],
  2811. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  2812. messageSends: [],
  2813. referencedClasses: []
  2814. }),
  2815. smalltalk.Number);
  2816. smalltalk.addMethod(
  2817. unescape('_even'),
  2818. smalltalk.method({
  2819. selector: unescape('even'),
  2820. category: 'testing',
  2821. fn: function (){
  2822. var self=this;
  2823. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  2824. return self;},
  2825. args: [],
  2826. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  2827. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  2828. referencedClasses: []
  2829. }),
  2830. smalltalk.Number);
  2831. smalltalk.addMethod(
  2832. unescape('_odd'),
  2833. smalltalk.method({
  2834. selector: unescape('odd'),
  2835. category: 'testing',
  2836. fn: function (){
  2837. var self=this;
  2838. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  2839. return self;},
  2840. args: [],
  2841. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  2842. messageSends: ["not", "even"],
  2843. referencedClasses: []
  2844. }),
  2845. smalltalk.Number);
  2846. smalltalk.addMethod(
  2847. unescape('_negated'),
  2848. smalltalk.method({
  2849. selector: unescape('negated'),
  2850. category: 'arithmetic',
  2851. fn: function (){
  2852. var self=this;
  2853. return (0) - self;
  2854. return self;},
  2855. args: [],
  2856. source: unescape('negated%0A%09%5E0%20-%20self'),
  2857. messageSends: [unescape("-")],
  2858. referencedClasses: []
  2859. }),
  2860. smalltalk.Number);
  2861. smalltalk.addMethod(
  2862. unescape('__eq_eq'),
  2863. smalltalk.method({
  2864. selector: unescape('%3D%3D'),
  2865. category: 'comparing',
  2866. fn: function (aNumber){
  2867. var self=this;
  2868. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  2869. return Number(self) === Number(aNumber);
  2870. return self;
  2871. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  2872. args: ["aNumber"],
  2873. source: unescape('%3D%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%3D%20Number%28aNumber%29%3E'),
  2874. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2875. referencedClasses: []
  2876. }),
  2877. smalltalk.Number);
  2878. smalltalk.addMethod(
  2879. unescape('_printShowingDecimalPlaces_'),
  2880. smalltalk.method({
  2881. selector: unescape('printShowingDecimalPlaces%3A'),
  2882. category: 'printing',
  2883. fn: function (placesDesired){
  2884. var self=this;
  2885. return self.toFixed(placesDesired);
  2886. return self;},
  2887. args: ["placesDesired"],
  2888. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  2889. messageSends: [],
  2890. referencedClasses: []
  2891. }),
  2892. smalltalk.Number);
  2893. smalltalk.addMethod(
  2894. unescape('_%5C%5C'),
  2895. smalltalk.method({
  2896. selector: unescape('%5C%5C'),
  2897. category: 'arithmetic',
  2898. fn: function (aNumber){
  2899. var self=this;
  2900. return self % aNumber;
  2901. return self;},
  2902. args: ["aNumber"],
  2903. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  2904. messageSends: [],
  2905. referencedClasses: []
  2906. }),
  2907. smalltalk.Number);
  2908. smalltalk.addMethod(
  2909. unescape('_pi'),
  2910. smalltalk.method({
  2911. selector: unescape('pi'),
  2912. category: 'instance creation',
  2913. fn: function (){
  2914. var self=this;
  2915. return Math.PI;
  2916. return self;},
  2917. args: [],
  2918. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  2919. messageSends: [],
  2920. referencedClasses: []
  2921. }),
  2922. smalltalk.Number.klass);
  2923. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel');
  2924. smalltalk.addMethod(
  2925. unescape('_compiledSource'),
  2926. smalltalk.method({
  2927. selector: unescape('compiledSource'),
  2928. category: 'accessing',
  2929. fn: function (){
  2930. var self=this;
  2931. return self.toString();
  2932. return self;},
  2933. args: [],
  2934. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  2935. messageSends: [],
  2936. referencedClasses: []
  2937. }),
  2938. smalltalk.BlockClosure);
  2939. smalltalk.addMethod(
  2940. unescape('_whileTrue_'),
  2941. smalltalk.method({
  2942. selector: unescape('whileTrue%3A'),
  2943. category: 'controlling',
  2944. fn: function (aBlock){
  2945. var self=this;
  2946. while(self()) {aBlock()};
  2947. return self;},
  2948. args: ["aBlock"],
  2949. source: unescape('whileTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  2950. messageSends: [],
  2951. referencedClasses: []
  2952. }),
  2953. smalltalk.BlockClosure);
  2954. smalltalk.addMethod(
  2955. unescape('_whileFalse_'),
  2956. smalltalk.method({
  2957. selector: unescape('whileFalse%3A'),
  2958. category: 'controlling',
  2959. fn: function (aBlock){
  2960. var self=this;
  2961. while(!self()) {aBlock()};
  2962. return self;},
  2963. args: ["aBlock"],
  2964. source: unescape('whileFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28%21self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  2965. messageSends: [],
  2966. referencedClasses: []
  2967. }),
  2968. smalltalk.BlockClosure);
  2969. smalltalk.addMethod(
  2970. unescape('_value'),
  2971. smalltalk.method({
  2972. selector: unescape('value'),
  2973. category: 'evaluating',
  2974. fn: function (){
  2975. var self=this;
  2976. return self();;
  2977. return self;},
  2978. args: [],
  2979. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  2980. messageSends: [],
  2981. referencedClasses: []
  2982. }),
  2983. smalltalk.BlockClosure);
  2984. smalltalk.addMethod(
  2985. unescape('_value_'),
  2986. smalltalk.method({
  2987. selector: unescape('value%3A'),
  2988. category: 'evaluating',
  2989. fn: function (anArg){
  2990. var self=this;
  2991. return self(anArg);;
  2992. return self;},
  2993. args: ["anArg"],
  2994. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  2995. messageSends: [],
  2996. referencedClasses: []
  2997. }),
  2998. smalltalk.BlockClosure);
  2999. smalltalk.addMethod(
  3000. unescape('_value_value_'),
  3001. smalltalk.method({
  3002. selector: unescape('value%3Avalue%3A'),
  3003. category: 'evaluating',
  3004. fn: function (firstArg, secondArg){
  3005. var self=this;
  3006. return self(firstArg, secondArg);;
  3007. return self;},
  3008. args: ["firstArg", "secondArg"],
  3009. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%29%3B%3E'),
  3010. messageSends: [],
  3011. referencedClasses: []
  3012. }),
  3013. smalltalk.BlockClosure);
  3014. smalltalk.addMethod(
  3015. unescape('_value_value_value_'),
  3016. smalltalk.method({
  3017. selector: unescape('value%3Avalue%3Avalue%3A'),
  3018. category: 'evaluating',
  3019. fn: function (firstArg, secondArg, thirdArg){
  3020. var self=this;
  3021. return self(firstArg, secondArg, thirdArg);;
  3022. return self;},
  3023. args: ["firstArg", "secondArg", "thirdArg"],
  3024. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%20value%3A%20thirdArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%2C%20thirdArg%29%3B%3E'),
  3025. messageSends: [],
  3026. referencedClasses: []
  3027. }),
  3028. smalltalk.BlockClosure);
  3029. smalltalk.addMethod(
  3030. unescape('_valueWithPossibleArguments_'),
  3031. smalltalk.method({
  3032. selector: unescape('valueWithPossibleArguments%3A'),
  3033. category: 'evaluating',
  3034. fn: function (aCollection){
  3035. var self=this;
  3036. return self.apply(null, aCollection);;
  3037. return self;},
  3038. args: ["aCollection"],
  3039. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  3040. messageSends: [],
  3041. referencedClasses: []
  3042. }),
  3043. smalltalk.BlockClosure);
  3044. smalltalk.addMethod(
  3045. unescape('_on_do_'),
  3046. smalltalk.method({
  3047. selector: unescape('on%3Ado%3A'),
  3048. category: 'error handling',
  3049. fn: function (anErrorClass, aBlock){
  3050. var self=this;
  3051. smalltalk.send(self, "_try_catch_", [self, (function(error){return ((($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value_", [error]);})() : (function(){return smalltalk.send(error, "_signal", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value_", [error]);}), (function(){return smalltalk.send(error, "_signal", []);})]));})]);
  3052. return self;},
  3053. args: ["anErrorClass", "aBlock"],
  3054. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09self%20try%3A%20self%20catch%3A%20%5B%3Aerror%20%7C%0A%09%20%20%20%20%28error%20isKindOf%3A%20anErrorClass%29%20%0A%09%20%20%20%20%20ifTrue%3A%20%5BaBlock%20value%3A%20error%5D%0A%09%20%20%20%20%20ifFalse%3A%20%5Berror%20signal%5D%5D'),
  3055. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  3056. referencedClasses: []
  3057. }),
  3058. smalltalk.BlockClosure);
  3059. smalltalk.addMethod(
  3060. unescape('_valueWithTimeout_'),
  3061. smalltalk.method({
  3062. selector: unescape('valueWithTimeout%3A'),
  3063. category: 'timeout/interval',
  3064. fn: function (aNumber){
  3065. var self=this;
  3066. return setTimeout(self, aNumber);
  3067. return self;},
  3068. args: ["aNumber"],
  3069. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  3070. messageSends: [],
  3071. referencedClasses: []
  3072. }),
  3073. smalltalk.BlockClosure);
  3074. smalltalk.addMethod(
  3075. unescape('_valueWithInterval_'),
  3076. smalltalk.method({
  3077. selector: unescape('valueWithInterval%3A'),
  3078. category: 'timeout/interval',
  3079. fn: function (aNumber){
  3080. var self=this;
  3081. return setInterval(self, aNumber);
  3082. return self;},
  3083. args: ["aNumber"],
  3084. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  3085. messageSends: [],
  3086. referencedClasses: []
  3087. }),
  3088. smalltalk.BlockClosure);
  3089. smalltalk.addMethod(
  3090. unescape('_whileFalse'),
  3091. smalltalk.method({
  3092. selector: unescape('whileFalse'),
  3093. category: 'controlling',
  3094. fn: function (){
  3095. var self=this;
  3096. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  3097. return self;},
  3098. args: [],
  3099. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  3100. messageSends: ["whileFalse:"],
  3101. referencedClasses: []
  3102. }),
  3103. smalltalk.BlockClosure);
  3104. smalltalk.addMethod(
  3105. unescape('_whileTrue'),
  3106. smalltalk.method({
  3107. selector: unescape('whileTrue'),
  3108. category: 'controlling',
  3109. fn: function (){
  3110. var self=this;
  3111. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  3112. return self;},
  3113. args: [],
  3114. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  3115. messageSends: ["whileTrue:"],
  3116. referencedClasses: []
  3117. }),
  3118. smalltalk.BlockClosure);
  3119. smalltalk.addMethod(
  3120. unescape('_new'),
  3121. smalltalk.method({
  3122. selector: unescape('new'),
  3123. category: 'evaluating',
  3124. fn: function (){
  3125. var self=this;
  3126. return new self();
  3127. return self;},
  3128. args: [],
  3129. source: unescape('new%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28%29%3E'),
  3130. messageSends: [],
  3131. referencedClasses: []
  3132. }),
  3133. smalltalk.BlockClosure);
  3134. smalltalk.addMethod(
  3135. unescape('_applyTo_arguments_'),
  3136. smalltalk.method({
  3137. selector: unescape('applyTo%3Aarguments%3A'),
  3138. category: 'evaluating',
  3139. fn: function (anObject, aCollection){
  3140. var self=this;
  3141. return self.apply(anObject, aCollection);
  3142. return self;},
  3143. args: ["anObject", "aCollection"],
  3144. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  3145. messageSends: [],
  3146. referencedClasses: []
  3147. }),
  3148. smalltalk.BlockClosure);
  3149. smalltalk.addMethod(
  3150. unescape('_timeToRun'),
  3151. smalltalk.method({
  3152. selector: unescape('timeToRun'),
  3153. category: 'evaluating',
  3154. fn: function (){
  3155. var self=this;
  3156. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  3157. return self;},
  3158. args: [],
  3159. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  3160. messageSends: ["millisecondsToRun:"],
  3161. referencedClasses: [smalltalk.Date]
  3162. }),
  3163. smalltalk.BlockClosure);
  3164. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel');
  3165. smalltalk.addMethod(
  3166. unescape('__eq'),
  3167. smalltalk.method({
  3168. selector: unescape('%3D'),
  3169. category: 'comparing',
  3170. fn: function (aBoolean){
  3171. var self=this;
  3172. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  3173. return Boolean(self == true) == aBoolean;
  3174. return self;
  3175. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  3176. args: ["aBoolean"],
  3177. source: unescape('%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%20aBoolean%3E'),
  3178. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3179. referencedClasses: []
  3180. }),
  3181. smalltalk.Boolean);
  3182. smalltalk.addMethod(
  3183. unescape('_shallowCopy'),
  3184. smalltalk.method({
  3185. selector: unescape('shallowCopy'),
  3186. category: 'copying',
  3187. fn: function (){
  3188. var self=this;
  3189. return self;
  3190. return self;},
  3191. args: [],
  3192. source: unescape('shallowCopy%0A%09%5Eself'),
  3193. messageSends: [],
  3194. referencedClasses: []
  3195. }),
  3196. smalltalk.Boolean);
  3197. smalltalk.addMethod(
  3198. unescape('_deepCopy'),
  3199. smalltalk.method({
  3200. selector: unescape('deepCopy'),
  3201. category: 'copying',
  3202. fn: function (){
  3203. var self=this;
  3204. return self;
  3205. return self;},
  3206. args: [],
  3207. source: unescape('deepCopy%0A%09%5Eself'),
  3208. messageSends: [],
  3209. referencedClasses: []
  3210. }),
  3211. smalltalk.Boolean);
  3212. smalltalk.addMethod(
  3213. unescape('_ifTrue_'),
  3214. smalltalk.method({
  3215. selector: unescape('ifTrue%3A'),
  3216. category: 'controlling',
  3217. fn: function (aBlock){
  3218. var self=this;
  3219. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  3220. return self;},
  3221. args: ["aBlock"],
  3222. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  3223. messageSends: ["ifTrue:ifFalse:"],
  3224. referencedClasses: []
  3225. }),
  3226. smalltalk.Boolean);
  3227. smalltalk.addMethod(
  3228. unescape('_ifFalse_'),
  3229. smalltalk.method({
  3230. selector: unescape('ifFalse%3A'),
  3231. category: 'controlling',
  3232. fn: function (aBlock){
  3233. var self=this;
  3234. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  3235. return self;},
  3236. args: ["aBlock"],
  3237. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  3238. messageSends: ["ifTrue:ifFalse:"],
  3239. referencedClasses: []
  3240. }),
  3241. smalltalk.Boolean);
  3242. smalltalk.addMethod(
  3243. unescape('_ifFalse_ifTrue_'),
  3244. smalltalk.method({
  3245. selector: unescape('ifFalse%3AifTrue%3A'),
  3246. category: 'controlling',
  3247. fn: function (aBlock, anotherBlock){
  3248. var self=this;
  3249. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  3250. return self;},
  3251. args: ["aBlock", "anotherBlock"],
  3252. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  3253. messageSends: ["ifTrue:ifFalse:"],
  3254. referencedClasses: []
  3255. }),
  3256. smalltalk.Boolean);
  3257. smalltalk.addMethod(
  3258. unescape('_ifTrue_ifFalse_'),
  3259. smalltalk.method({
  3260. selector: unescape('ifTrue%3AifFalse%3A'),
  3261. category: 'controlling',
  3262. fn: function (aBlock, anotherBlock){
  3263. var self=this;
  3264. if(self == true) {
  3265. return aBlock();
  3266. } else {
  3267. return anotherBlock();
  3268. }
  3269. ;
  3270. return self;},
  3271. args: ["aBlock", "anotherBlock"],
  3272. source: unescape('ifTrue%3A%20aBlock%20ifFalse%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3273. messageSends: [],
  3274. referencedClasses: []
  3275. }),
  3276. smalltalk.Boolean);
  3277. smalltalk.addMethod(
  3278. unescape('_and_'),
  3279. smalltalk.method({
  3280. selector: unescape('and%3A'),
  3281. category: 'controlling',
  3282. fn: function (aBlock){
  3283. var self=this;
  3284. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  3285. return self;},
  3286. args: ["aBlock"],
  3287. source: unescape('and%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20aBlock%0A%09%20%20%20%20ifFalse%3A%20%5Bfalse%5D'),
  3288. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3289. referencedClasses: []
  3290. }),
  3291. smalltalk.Boolean);
  3292. smalltalk.addMethod(
  3293. unescape('_or_'),
  3294. smalltalk.method({
  3295. selector: unescape('or%3A'),
  3296. category: 'controlling',
  3297. fn: function (aBlock){
  3298. var self=this;
  3299. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  3300. return self;},
  3301. args: ["aBlock"],
  3302. source: unescape('or%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20aBlock'),
  3303. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3304. referencedClasses: []
  3305. }),
  3306. smalltalk.Boolean);
  3307. smalltalk.addMethod(
  3308. unescape('_not'),
  3309. smalltalk.method({
  3310. selector: unescape('not'),
  3311. category: 'controlling',
  3312. fn: function (){
  3313. var self=this;
  3314. return smalltalk.send(self, "__eq", [false]);
  3315. return self;},
  3316. args: [],
  3317. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  3318. messageSends: [unescape("%3D")],
  3319. referencedClasses: []
  3320. }),
  3321. smalltalk.Boolean);
  3322. smalltalk.addMethod(
  3323. unescape('_printString'),
  3324. smalltalk.method({
  3325. selector: unescape('printString'),
  3326. category: 'printing',
  3327. fn: function (){
  3328. var self=this;
  3329. return self.toString();
  3330. return self;},
  3331. args: [],
  3332. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3333. messageSends: [],
  3334. referencedClasses: []
  3335. }),
  3336. smalltalk.Boolean);
  3337. smalltalk.addMethod(
  3338. unescape('_asJSONObject'),
  3339. smalltalk.method({
  3340. selector: unescape('asJSONObject'),
  3341. category: 'converting',
  3342. fn: function (){
  3343. var self=this;
  3344. return self;
  3345. return self;},
  3346. args: [],
  3347. source: unescape('asJSONObject%0A%09%5Eself'),
  3348. messageSends: [],
  3349. referencedClasses: []
  3350. }),
  3351. smalltalk.Boolean);
  3352. smalltalk.addMethod(
  3353. unescape('_%26'),
  3354. smalltalk.method({
  3355. selector: unescape('%26'),
  3356. category: 'controlling',
  3357. fn: function (aBoolean){
  3358. var self=this;
  3359. if(self == true) {
  3360. return aBoolean;
  3361. } else {
  3362. return false;
  3363. }
  3364. ;
  3365. return self;},
  3366. args: ["aBoolean"],
  3367. source: unescape('%26%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20false%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3368. messageSends: [],
  3369. referencedClasses: []
  3370. }),
  3371. smalltalk.Boolean);
  3372. smalltalk.addMethod(
  3373. unescape('_%7C'),
  3374. smalltalk.method({
  3375. selector: unescape('%7C'),
  3376. category: 'controlling',
  3377. fn: function (aBoolean){
  3378. var self=this;
  3379. if(self == true) {
  3380. return true;
  3381. } else {
  3382. return aBoolean;
  3383. }
  3384. ;
  3385. return self;},
  3386. args: ["aBoolean"],
  3387. source: unescape('%7C%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20true%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3388. messageSends: [],
  3389. referencedClasses: []
  3390. }),
  3391. smalltalk.Boolean);
  3392. smalltalk.addMethod(
  3393. unescape('__eq_eq'),
  3394. smalltalk.method({
  3395. selector: unescape('%3D%3D'),
  3396. category: 'comparing',
  3397. fn: function (aBoolean){
  3398. var self=this;
  3399. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  3400. return Boolean(self == true) === Boolean(aBoolean == true);
  3401. return self;
  3402. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  3403. args: ["aBoolean"],
  3404. source: unescape('%3D%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%3D%20Boolean%28aBoolean%20%3D%3D%20true%29%3E'),
  3405. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3406. referencedClasses: []
  3407. }),
  3408. smalltalk.Boolean);
  3409. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel');
  3410. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.')
  3411. smalltalk.addMethod(
  3412. unescape('_year'),
  3413. smalltalk.method({
  3414. selector: unescape('year'),
  3415. category: 'accessing',
  3416. fn: function (){
  3417. var self=this;
  3418. return self.getFullYear();
  3419. return self;},
  3420. args: [],
  3421. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  3422. messageSends: [],
  3423. referencedClasses: []
  3424. }),
  3425. smalltalk.Date);
  3426. smalltalk.addMethod(
  3427. unescape('_month'),
  3428. smalltalk.method({
  3429. selector: unescape('month'),
  3430. category: 'accessing',
  3431. fn: function (){
  3432. var self=this;
  3433. return self.getMonth() + 1;
  3434. return self;},
  3435. args: [],
  3436. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  3437. messageSends: [],
  3438. referencedClasses: []
  3439. }),
  3440. smalltalk.Date);
  3441. smalltalk.addMethod(
  3442. unescape('_month_'),
  3443. smalltalk.method({
  3444. selector: unescape('month%3A'),
  3445. category: 'accessing',
  3446. fn: function (aNumber){
  3447. var self=this;
  3448. self.setMonth(aNumber - 1);
  3449. return self;},
  3450. args: ["aNumber"],
  3451. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  3452. messageSends: [],
  3453. referencedClasses: []
  3454. }),
  3455. smalltalk.Date);
  3456. smalltalk.addMethod(
  3457. unescape('_day'),
  3458. smalltalk.method({
  3459. selector: unescape('day'),
  3460. category: 'accessing',
  3461. fn: function (){
  3462. var self=this;
  3463. return smalltalk.send(self, "_dayOfWeek", []);
  3464. return self;},
  3465. args: [],
  3466. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  3467. messageSends: ["dayOfWeek"],
  3468. referencedClasses: []
  3469. }),
  3470. smalltalk.Date);
  3471. smalltalk.addMethod(
  3472. unescape('_dayOfWeek'),
  3473. smalltalk.method({
  3474. selector: unescape('dayOfWeek'),
  3475. category: 'accessing',
  3476. fn: function (){
  3477. var self=this;
  3478. return self.getDay() + 1;
  3479. return self;},
  3480. args: [],
  3481. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  3482. messageSends: [],
  3483. referencedClasses: []
  3484. }),
  3485. smalltalk.Date);
  3486. smalltalk.addMethod(
  3487. unescape('_dayOfWeek_'),
  3488. smalltalk.method({
  3489. selector: unescape('dayOfWeek%3A'),
  3490. category: 'accessing',
  3491. fn: function (aNumber){
  3492. var self=this;
  3493. return self.setDay(aNumber - 1);
  3494. return self;},
  3495. args: ["aNumber"],
  3496. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  3497. messageSends: [],
  3498. referencedClasses: []
  3499. }),
  3500. smalltalk.Date);
  3501. smalltalk.addMethod(
  3502. unescape('_day_'),
  3503. smalltalk.method({
  3504. selector: unescape('day%3A'),
  3505. category: 'accessing',
  3506. fn: function (aNumber){
  3507. var self=this;
  3508. smalltalk.send(self, "_day_", [aNumber]);
  3509. return self;},
  3510. args: ["aNumber"],
  3511. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  3512. messageSends: ["day:"],
  3513. referencedClasses: []
  3514. }),
  3515. smalltalk.Date);
  3516. smalltalk.addMethod(
  3517. unescape('_year_'),
  3518. smalltalk.method({
  3519. selector: unescape('year%3A'),
  3520. category: 'accessing',
  3521. fn: function (aNumber){
  3522. var self=this;
  3523. self.setFullYear(aNumber);
  3524. return self;},
  3525. args: ["aNumber"],
  3526. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  3527. messageSends: [],
  3528. referencedClasses: []
  3529. }),
  3530. smalltalk.Date);
  3531. smalltalk.addMethod(
  3532. unescape('_dayOfMonth'),
  3533. smalltalk.method({
  3534. selector: unescape('dayOfMonth'),
  3535. category: 'accessing',
  3536. fn: function (){
  3537. var self=this;
  3538. return self.getDate();
  3539. return self;},
  3540. args: [],
  3541. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  3542. messageSends: [],
  3543. referencedClasses: []
  3544. }),
  3545. smalltalk.Date);
  3546. smalltalk.addMethod(
  3547. unescape('_dayOfMonth_'),
  3548. smalltalk.method({
  3549. selector: unescape('dayOfMonth%3A'),
  3550. category: 'accessing',
  3551. fn: function (aNumber){
  3552. var self=this;
  3553. self.setDate(aNumber);
  3554. return self;},
  3555. args: ["aNumber"],
  3556. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  3557. messageSends: [],
  3558. referencedClasses: []
  3559. }),
  3560. smalltalk.Date);
  3561. smalltalk.addMethod(
  3562. unescape('_asString'),
  3563. smalltalk.method({
  3564. selector: unescape('asString'),
  3565. category: 'converting',
  3566. fn: function (){
  3567. var self=this;
  3568. return self.toString();
  3569. return self;},
  3570. args: [],
  3571. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3572. messageSends: [],
  3573. referencedClasses: []
  3574. }),
  3575. smalltalk.Date);
  3576. smalltalk.addMethod(
  3577. unescape('_printString'),
  3578. smalltalk.method({
  3579. selector: unescape('printString'),
  3580. category: 'printing',
  3581. fn: function (){
  3582. var self=this;
  3583. return smalltalk.send(self, "_asString", []);
  3584. return self;},
  3585. args: [],
  3586. source: unescape('printString%0A%09%5Eself%20asString'),
  3587. messageSends: ["asString"],
  3588. referencedClasses: []
  3589. }),
  3590. smalltalk.Date);
  3591. smalltalk.addMethod(
  3592. unescape('_asMilliseconds'),
  3593. smalltalk.method({
  3594. selector: unescape('asMilliseconds'),
  3595. category: 'converting',
  3596. fn: function (){
  3597. var self=this;
  3598. return smalltalk.send(self, "_time", []);
  3599. return self;},
  3600. args: [],
  3601. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  3602. messageSends: ["time"],
  3603. referencedClasses: []
  3604. }),
  3605. smalltalk.Date);
  3606. smalltalk.addMethod(
  3607. unescape('_time'),
  3608. smalltalk.method({
  3609. selector: unescape('time'),
  3610. category: 'accessing',
  3611. fn: function (){
  3612. var self=this;
  3613. return self.getTime();
  3614. return self;},
  3615. args: [],
  3616. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  3617. messageSends: [],
  3618. referencedClasses: []
  3619. }),
  3620. smalltalk.Date);
  3621. smalltalk.addMethod(
  3622. unescape('_time_'),
  3623. smalltalk.method({
  3624. selector: unescape('time%3A'),
  3625. category: 'accessing',
  3626. fn: function (aNumber){
  3627. var self=this;
  3628. self.setTime(aNumber);
  3629. return self;},
  3630. args: ["aNumber"],
  3631. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  3632. messageSends: [],
  3633. referencedClasses: []
  3634. }),
  3635. smalltalk.Date);
  3636. smalltalk.addMethod(
  3637. unescape('_asDateString'),
  3638. smalltalk.method({
  3639. selector: unescape('asDateString'),
  3640. category: 'converting',
  3641. fn: function (){
  3642. var self=this;
  3643. return self.toDateString();
  3644. return self;},
  3645. args: [],
  3646. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  3647. messageSends: [],
  3648. referencedClasses: []
  3649. }),
  3650. smalltalk.Date);
  3651. smalltalk.addMethod(
  3652. unescape('_asTimeString'),
  3653. smalltalk.method({
  3654. selector: unescape('asTimeString'),
  3655. category: 'converting',
  3656. fn: function (){
  3657. var self=this;
  3658. return self.toTimeString();
  3659. return self;},
  3660. args: [],
  3661. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  3662. messageSends: [],
  3663. referencedClasses: []
  3664. }),
  3665. smalltalk.Date);
  3666. smalltalk.addMethod(
  3667. unescape('_asLocaleString'),
  3668. smalltalk.method({
  3669. selector: unescape('asLocaleString'),
  3670. category: 'converting',
  3671. fn: function (){
  3672. var self=this;
  3673. return self.toLocaleString();
  3674. return self;},
  3675. args: [],
  3676. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  3677. messageSends: [],
  3678. referencedClasses: []
  3679. }),
  3680. smalltalk.Date);
  3681. smalltalk.addMethod(
  3682. unescape('_asNumber'),
  3683. smalltalk.method({
  3684. selector: unescape('asNumber'),
  3685. category: 'converting',
  3686. fn: function (){
  3687. var self=this;
  3688. return smalltalk.send(self, "_asMilliseconds", []);
  3689. return self;},
  3690. args: [],
  3691. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  3692. messageSends: ["asMilliseconds"],
  3693. referencedClasses: []
  3694. }),
  3695. smalltalk.Date);
  3696. smalltalk.addMethod(
  3697. unescape('_hours_'),
  3698. smalltalk.method({
  3699. selector: unescape('hours%3A'),
  3700. category: 'accessing',
  3701. fn: function (aNumber){
  3702. var self=this;
  3703. self.setHours(aNumber);
  3704. return self;},
  3705. args: ["aNumber"],
  3706. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  3707. messageSends: [],
  3708. referencedClasses: []
  3709. }),
  3710. smalltalk.Date);
  3711. smalltalk.addMethod(
  3712. unescape('_minutes_'),
  3713. smalltalk.method({
  3714. selector: unescape('minutes%3A'),
  3715. category: 'accessing',
  3716. fn: function (aNumber){
  3717. var self=this;
  3718. self.setMinutes(aNumber);
  3719. return self;},
  3720. args: ["aNumber"],
  3721. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  3722. messageSends: [],
  3723. referencedClasses: []
  3724. }),
  3725. smalltalk.Date);
  3726. smalltalk.addMethod(
  3727. unescape('_seconds_'),
  3728. smalltalk.method({
  3729. selector: unescape('seconds%3A'),
  3730. category: 'accessing',
  3731. fn: function (aNumber){
  3732. var self=this;
  3733. self.setSeconds(aNumber);
  3734. return self;},
  3735. args: ["aNumber"],
  3736. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  3737. messageSends: [],
  3738. referencedClasses: []
  3739. }),
  3740. smalltalk.Date);
  3741. smalltalk.addMethod(
  3742. unescape('_milliseconds_'),
  3743. smalltalk.method({
  3744. selector: unescape('milliseconds%3A'),
  3745. category: 'accessing',
  3746. fn: function (aNumber){
  3747. var self=this;
  3748. self.setMilliseconds(aNumber);
  3749. return self;},
  3750. args: ["aNumber"],
  3751. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  3752. messageSends: [],
  3753. referencedClasses: []
  3754. }),
  3755. smalltalk.Date);
  3756. smalltalk.addMethod(
  3757. unescape('_hours'),
  3758. smalltalk.method({
  3759. selector: unescape('hours'),
  3760. category: 'accessing',
  3761. fn: function (){
  3762. var self=this;
  3763. return self.getHours();
  3764. return self;},
  3765. args: [],
  3766. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  3767. messageSends: [],
  3768. referencedClasses: []
  3769. }),
  3770. smalltalk.Date);
  3771. smalltalk.addMethod(
  3772. unescape('_minutes'),
  3773. smalltalk.method({
  3774. selector: unescape('minutes'),
  3775. category: 'accessing',
  3776. fn: function (){
  3777. var self=this;
  3778. return self.getMinutes();
  3779. return self;},
  3780. args: [],
  3781. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  3782. messageSends: [],
  3783. referencedClasses: []
  3784. }),
  3785. smalltalk.Date);
  3786. smalltalk.addMethod(
  3787. unescape('_seconds'),
  3788. smalltalk.method({
  3789. selector: unescape('seconds'),
  3790. category: 'accessing',
  3791. fn: function (){
  3792. var self=this;
  3793. return self.getSeconds();
  3794. return self;},
  3795. args: [],
  3796. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  3797. messageSends: [],
  3798. referencedClasses: []
  3799. }),
  3800. smalltalk.Date);
  3801. smalltalk.addMethod(
  3802. unescape('_milliseconds'),
  3803. smalltalk.method({
  3804. selector: unescape('milliseconds'),
  3805. category: 'accessing',
  3806. fn: function (){
  3807. var self=this;
  3808. return self.getMilliseconds();
  3809. return self;},
  3810. args: [],
  3811. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  3812. messageSends: [],
  3813. referencedClasses: []
  3814. }),
  3815. smalltalk.Date);
  3816. smalltalk.addMethod(
  3817. unescape('__lt'),
  3818. smalltalk.method({
  3819. selector: unescape('%3C'),
  3820. category: 'comparing',
  3821. fn: function (aDate){
  3822. var self=this;
  3823. return self < aDate;
  3824. return self;},
  3825. args: ["aDate"],
  3826. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  3827. messageSends: [],
  3828. referencedClasses: []
  3829. }),
  3830. smalltalk.Date);
  3831. smalltalk.addMethod(
  3832. unescape('__gt'),
  3833. smalltalk.method({
  3834. selector: unescape('%3E'),
  3835. category: 'comparing',
  3836. fn: function (aDate){
  3837. var self=this;
  3838. return self > aDate;
  3839. return self;},
  3840. args: ["aDate"],
  3841. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  3842. messageSends: [],
  3843. referencedClasses: []
  3844. }),
  3845. smalltalk.Date);
  3846. smalltalk.addMethod(
  3847. unescape('__lt_eq'),
  3848. smalltalk.method({
  3849. selector: unescape('%3C%3D'),
  3850. category: 'comparing',
  3851. fn: function (aDate){
  3852. var self=this;
  3853. return self <= aDate;
  3854. return self;},
  3855. args: ["aDate"],
  3856. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  3857. messageSends: [],
  3858. referencedClasses: []
  3859. }),
  3860. smalltalk.Date);
  3861. smalltalk.addMethod(
  3862. unescape('__gt_eq'),
  3863. smalltalk.method({
  3864. selector: unescape('%3E%3D'),
  3865. category: 'comparing',
  3866. fn: function (aDate){
  3867. var self=this;
  3868. return self >= aDate;
  3869. return self;},
  3870. args: ["aDate"],
  3871. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  3872. messageSends: [],
  3873. referencedClasses: []
  3874. }),
  3875. smalltalk.Date);
  3876. smalltalk.addMethod(
  3877. unescape('__minus'),
  3878. smalltalk.method({
  3879. selector: unescape('-'),
  3880. category: 'arithmetic',
  3881. fn: function (aDate){
  3882. var self=this;
  3883. return self - aDate;
  3884. return self;},
  3885. args: ["aDate"],
  3886. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  3887. messageSends: [],
  3888. referencedClasses: []
  3889. }),
  3890. smalltalk.Date);
  3891. smalltalk.addMethod(
  3892. unescape('__plus'),
  3893. smalltalk.method({
  3894. selector: unescape('+'),
  3895. category: 'arithmetic',
  3896. fn: function (aDate){
  3897. var self=this;
  3898. return self + aDate;
  3899. return self;},
  3900. args: ["aDate"],
  3901. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  3902. messageSends: [],
  3903. referencedClasses: []
  3904. }),
  3905. smalltalk.Date);
  3906. smalltalk.addMethod(
  3907. unescape('_asJSONObject'),
  3908. smalltalk.method({
  3909. selector: unescape('asJSONObject'),
  3910. category: 'converting',
  3911. fn: function (){
  3912. var self=this;
  3913. return self;
  3914. return self;},
  3915. args: [],
  3916. source: unescape('asJSONObject%0A%09%5Eself'),
  3917. messageSends: [],
  3918. referencedClasses: []
  3919. }),
  3920. smalltalk.Date);
  3921. smalltalk.addMethod(
  3922. unescape('_new_'),
  3923. smalltalk.method({
  3924. selector: unescape('new%3A'),
  3925. category: 'instance creation',
  3926. fn: function (anObject){
  3927. var self=this;
  3928. return new Date(anObject);
  3929. return self;},
  3930. args: ["anObject"],
  3931. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  3932. messageSends: [],
  3933. referencedClasses: []
  3934. }),
  3935. smalltalk.Date.klass);
  3936. smalltalk.addMethod(
  3937. unescape('_fromString_'),
  3938. smalltalk.method({
  3939. selector: unescape('fromString%3A'),
  3940. category: 'instance creation',
  3941. fn: function (aString){
  3942. var self=this;
  3943. return smalltalk.send(self, "_new_", [aString]);
  3944. return self;},
  3945. args: ["aString"],
  3946. source: unescape('fromString%3A%20aString%0A%09%22Example%3A%20Date%20fromString%28%272011/04/15%2000%3A00%3A00%27%29%22%0A%09%5Eself%20new%3A%20aString'),
  3947. messageSends: ["new:"],
  3948. referencedClasses: []
  3949. }),
  3950. smalltalk.Date.klass);
  3951. smalltalk.addMethod(
  3952. unescape('_fromSeconds_'),
  3953. smalltalk.method({
  3954. selector: unescape('fromSeconds%3A'),
  3955. category: 'instance creation',
  3956. fn: function (aNumber){
  3957. var self=this;
  3958. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  3959. return self;},
  3960. args: ["aNumber"],
  3961. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  3962. messageSends: ["fromMilliseconds:", unescape("*")],
  3963. referencedClasses: []
  3964. }),
  3965. smalltalk.Date.klass);
  3966. smalltalk.addMethod(
  3967. unescape('_fromMilliseconds_'),
  3968. smalltalk.method({
  3969. selector: unescape('fromMilliseconds%3A'),
  3970. category: 'instance creation',
  3971. fn: function (aNumber){
  3972. var self=this;
  3973. return smalltalk.send(self, "_new_", [aNumber]);
  3974. return self;},
  3975. args: ["aNumber"],
  3976. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  3977. messageSends: ["new:"],
  3978. referencedClasses: []
  3979. }),
  3980. smalltalk.Date.klass);
  3981. smalltalk.addMethod(
  3982. unescape('_today'),
  3983. smalltalk.method({
  3984. selector: unescape('today'),
  3985. category: 'instance creation',
  3986. fn: function (){
  3987. var self=this;
  3988. return smalltalk.send(self, "_new", []);
  3989. return self;},
  3990. args: [],
  3991. source: unescape('today%0A%09%5Eself%20new'),
  3992. messageSends: ["new"],
  3993. referencedClasses: []
  3994. }),
  3995. smalltalk.Date.klass);
  3996. smalltalk.addMethod(
  3997. unescape('_now'),
  3998. smalltalk.method({
  3999. selector: unescape('now'),
  4000. category: 'instance creation',
  4001. fn: function (){
  4002. var self=this;
  4003. return smalltalk.send(self, "_today", []);
  4004. return self;},
  4005. args: [],
  4006. source: unescape('now%0A%09%5Eself%20today'),
  4007. messageSends: ["today"],
  4008. referencedClasses: []
  4009. }),
  4010. smalltalk.Date.klass);
  4011. smalltalk.addMethod(
  4012. unescape('_millisecondsToRun_'),
  4013. smalltalk.method({
  4014. selector: unescape('millisecondsToRun%3A'),
  4015. category: 'instance creation',
  4016. fn: function (aBlock){
  4017. var self=this;
  4018. var t=nil;
  4019. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  4020. smalltalk.send(aBlock, "_value", []);
  4021. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  4022. return self;},
  4023. args: ["aBlock"],
  4024. source: unescape('millisecondsToRun%3A%20aBlock%0A%09%7C%20t%20%7C%0A%09t%20%3A%3D%20Date%20now.%0A%09aBlock%20value.%0A%09%5EDate%20now%20-%20t'),
  4025. messageSends: ["now", "value", unescape("-")],
  4026. referencedClasses: [smalltalk.Date]
  4027. }),
  4028. smalltalk.Date.klass);
  4029. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel');
  4030. smalltalk.addMethod(
  4031. unescape('_subclass_instanceVariableNames_'),
  4032. smalltalk.method({
  4033. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  4034. category: 'class creation',
  4035. fn: function (aString, anotherString){
  4036. var self=this;
  4037. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  4038. return self;},
  4039. args: ["aString", "anotherString"],
  4040. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  4041. messageSends: ["subclass:instanceVariableNames:package:"],
  4042. referencedClasses: []
  4043. }),
  4044. smalltalk.UndefinedObject);
  4045. smalltalk.addMethod(
  4046. unescape('_subclass_instanceVariableNames_category_'),
  4047. smalltalk.method({
  4048. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  4049. category: 'class creation',
  4050. fn: function (aString, aString2, aString3){
  4051. var self=this;
  4052. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  4053. return self;},
  4054. args: ["aString", "aString2", "aString3"],
  4055. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4056. messageSends: ["subclass:instanceVariableNames:package:"],
  4057. referencedClasses: []
  4058. }),
  4059. smalltalk.UndefinedObject);
  4060. smalltalk.addMethod(
  4061. unescape('_shallowCopy'),
  4062. smalltalk.method({
  4063. selector: unescape('shallowCopy'),
  4064. category: 'copying',
  4065. fn: function (){
  4066. var self=this;
  4067. return self;
  4068. return self;},
  4069. args: [],
  4070. source: unescape('shallowCopy%0A%09%5Eself'),
  4071. messageSends: [],
  4072. referencedClasses: []
  4073. }),
  4074. smalltalk.UndefinedObject);
  4075. smalltalk.addMethod(
  4076. unescape('_deepCopy'),
  4077. smalltalk.method({
  4078. selector: unescape('deepCopy'),
  4079. category: 'copying',
  4080. fn: function (){
  4081. var self=this;
  4082. return self;
  4083. return self;},
  4084. args: [],
  4085. source: unescape('deepCopy%0A%09%5Eself'),
  4086. messageSends: [],
  4087. referencedClasses: []
  4088. }),
  4089. smalltalk.UndefinedObject);
  4090. smalltalk.addMethod(
  4091. unescape('_ifNil_'),
  4092. smalltalk.method({
  4093. selector: unescape('ifNil%3A'),
  4094. category: 'testing',
  4095. fn: function (aBlock){
  4096. var self=this;
  4097. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  4098. return self;},
  4099. args: ["aBlock"],
  4100. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  4101. messageSends: ["ifNil:ifNotNil:"],
  4102. referencedClasses: []
  4103. }),
  4104. smalltalk.UndefinedObject);
  4105. smalltalk.addMethod(
  4106. unescape('_ifNotNil_'),
  4107. smalltalk.method({
  4108. selector: unescape('ifNotNil%3A'),
  4109. category: 'testing',
  4110. fn: function (aBlock){
  4111. var self=this;
  4112. return self;
  4113. return self;},
  4114. args: ["aBlock"],
  4115. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  4116. messageSends: [],
  4117. referencedClasses: []
  4118. }),
  4119. smalltalk.UndefinedObject);
  4120. smalltalk.addMethod(
  4121. unescape('_ifNil_ifNotNil_'),
  4122. smalltalk.method({
  4123. selector: unescape('ifNil%3AifNotNil%3A'),
  4124. category: 'testing',
  4125. fn: function (aBlock, anotherBlock){
  4126. var self=this;
  4127. return smalltalk.send(aBlock, "_value", []);
  4128. return self;},
  4129. args: ["aBlock", "anotherBlock"],
  4130. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  4131. messageSends: ["value"],
  4132. referencedClasses: []
  4133. }),
  4134. smalltalk.UndefinedObject);
  4135. smalltalk.addMethod(
  4136. unescape('_ifNotNil_ifNil_'),
  4137. smalltalk.method({
  4138. selector: unescape('ifNotNil%3AifNil%3A'),
  4139. category: 'testing',
  4140. fn: function (aBlock, anotherBlock){
  4141. var self=this;
  4142. return smalltalk.send(anotherBlock, "_value", []);
  4143. return self;},
  4144. args: ["aBlock", "anotherBlock"],
  4145. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  4146. messageSends: ["value"],
  4147. referencedClasses: []
  4148. }),
  4149. smalltalk.UndefinedObject);
  4150. smalltalk.addMethod(
  4151. unescape('_isNil'),
  4152. smalltalk.method({
  4153. selector: unescape('isNil'),
  4154. category: 'testing',
  4155. fn: function (){
  4156. var self=this;
  4157. return true;
  4158. return self;},
  4159. args: [],
  4160. source: unescape('isNil%0A%09%5Etrue'),
  4161. messageSends: [],
  4162. referencedClasses: []
  4163. }),
  4164. smalltalk.UndefinedObject);
  4165. smalltalk.addMethod(
  4166. unescape('_notNil'),
  4167. smalltalk.method({
  4168. selector: unescape('notNil'),
  4169. category: 'testing',
  4170. fn: function (){
  4171. var self=this;
  4172. return false;
  4173. return self;},
  4174. args: [],
  4175. source: unescape('notNil%0A%09%5Efalse'),
  4176. messageSends: [],
  4177. referencedClasses: []
  4178. }),
  4179. smalltalk.UndefinedObject);
  4180. smalltalk.addMethod(
  4181. unescape('_printString'),
  4182. smalltalk.method({
  4183. selector: unescape('printString'),
  4184. category: 'printing',
  4185. fn: function (){
  4186. var self=this;
  4187. return "nil";
  4188. return self;},
  4189. args: [],
  4190. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  4191. messageSends: [],
  4192. referencedClasses: []
  4193. }),
  4194. smalltalk.UndefinedObject);
  4195. smalltalk.addMethod(
  4196. unescape('_subclass_instanceVariableNames_package_'),
  4197. smalltalk.method({
  4198. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  4199. category: 'class creation',
  4200. fn: function (aString, aString2, aString3){
  4201. var self=this;
  4202. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  4203. return self;},
  4204. args: ["aString", "aString2", "aString3"],
  4205. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4206. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  4207. referencedClasses: [smalltalk.ClassBuilder]
  4208. }),
  4209. smalltalk.UndefinedObject);
  4210. smalltalk.addMethod(
  4211. unescape('_new'),
  4212. smalltalk.method({
  4213. selector: unescape('new'),
  4214. category: 'instance creation',
  4215. fn: function (){
  4216. var self=this;
  4217. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  4218. return self;},
  4219. args: [],
  4220. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  4221. messageSends: ["error:"],
  4222. referencedClasses: []
  4223. }),
  4224. smalltalk.UndefinedObject.klass);
  4225. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel');
  4226. smalltalk.addMethod(
  4227. unescape('_size'),
  4228. smalltalk.method({
  4229. selector: unescape('size'),
  4230. category: 'accessing',
  4231. fn: function (){
  4232. var self=this;
  4233. smalltalk.send(self, "_subclassResponsibility", []);
  4234. return self;},
  4235. args: [],
  4236. source: unescape('size%0A%09self%20subclassResponsibility'),
  4237. messageSends: ["subclassResponsibility"],
  4238. referencedClasses: []
  4239. }),
  4240. smalltalk.Collection);
  4241. smalltalk.addMethod(
  4242. unescape('_readStream'),
  4243. smalltalk.method({
  4244. selector: unescape('readStream'),
  4245. category: 'accessing',
  4246. fn: function (){
  4247. var self=this;
  4248. return smalltalk.send(self, "_stream", []);
  4249. return self;},
  4250. args: [],
  4251. source: unescape('readStream%0A%09%5Eself%20stream'),
  4252. messageSends: ["stream"],
  4253. referencedClasses: []
  4254. }),
  4255. smalltalk.Collection);
  4256. smalltalk.addMethod(
  4257. unescape('_writeStream'),
  4258. smalltalk.method({
  4259. selector: unescape('writeStream'),
  4260. category: 'accessing',
  4261. fn: function (){
  4262. var self=this;
  4263. return smalltalk.send(self, "_stream", []);
  4264. return self;},
  4265. args: [],
  4266. source: unescape('writeStream%0A%09%5Eself%20stream'),
  4267. messageSends: ["stream"],
  4268. referencedClasses: []
  4269. }),
  4270. smalltalk.Collection);
  4271. smalltalk.addMethod(
  4272. unescape('_stream'),
  4273. smalltalk.method({
  4274. selector: unescape('stream'),
  4275. category: 'accessing',
  4276. fn: function (){
  4277. var self=this;
  4278. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  4279. return self;},
  4280. args: [],
  4281. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  4282. messageSends: ["on:", "streamClass"],
  4283. referencedClasses: []
  4284. }),
  4285. smalltalk.Collection);
  4286. smalltalk.addMethod(
  4287. unescape('_streamClass'),
  4288. smalltalk.method({
  4289. selector: unescape('streamClass'),
  4290. category: 'accessing',
  4291. fn: function (){
  4292. var self=this;
  4293. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  4294. return self;},
  4295. args: [],
  4296. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  4297. messageSends: ["streamClass", "class"],
  4298. referencedClasses: []
  4299. }),
  4300. smalltalk.Collection);
  4301. smalltalk.addMethod(
  4302. unescape('_add_'),
  4303. smalltalk.method({
  4304. selector: unescape('add%3A'),
  4305. category: 'adding/removing',
  4306. fn: function (anObject){
  4307. var self=this;
  4308. smalltalk.send(self, "_subclassResponsibility", []);
  4309. return self;},
  4310. args: ["anObject"],
  4311. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  4312. messageSends: ["subclassResponsibility"],
  4313. referencedClasses: []
  4314. }),
  4315. smalltalk.Collection);
  4316. smalltalk.addMethod(
  4317. unescape('_addAll_'),
  4318. smalltalk.method({
  4319. selector: unescape('addAll%3A'),
  4320. category: 'adding/removing',
  4321. fn: function (aCollection){
  4322. var self=this;
  4323. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  4324. return aCollection;
  4325. return self;},
  4326. args: ["aCollection"],
  4327. source: unescape('addAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20add%3A%20each%5D.%0A%09%5EaCollection'),
  4328. messageSends: ["do:", "add:"],
  4329. referencedClasses: []
  4330. }),
  4331. smalltalk.Collection);
  4332. smalltalk.addMethod(
  4333. unescape('__comma'),
  4334. smalltalk.method({
  4335. selector: unescape('%2C'),
  4336. category: 'copying',
  4337. fn: function (aCollection){
  4338. var self=this;
  4339. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4340. return self;},
  4341. args: ["aCollection"],
  4342. source: unescape('%2C%20aCollection%0A%09%5Eself%20copy%20%0A%09%20%20%20%20addAll%3A%20aCollection%3B%20%0A%09%20%20%20%20yourself'),
  4343. messageSends: ["addAll:", "yourself", "copy"],
  4344. referencedClasses: []
  4345. }),
  4346. smalltalk.Collection);
  4347. smalltalk.addMethod(
  4348. unescape('_copyWith_'),
  4349. smalltalk.method({
  4350. selector: unescape('copyWith%3A'),
  4351. category: 'copying',
  4352. fn: function (anObject){
  4353. var self=this;
  4354. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4355. return self;},
  4356. args: ["anObject"],
  4357. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  4358. messageSends: ["add:", "yourself", "copy"],
  4359. referencedClasses: []
  4360. }),
  4361. smalltalk.Collection);
  4362. smalltalk.addMethod(
  4363. unescape('_copyWithAll_'),
  4364. smalltalk.method({
  4365. selector: unescape('copyWithAll%3A'),
  4366. category: 'copying',
  4367. fn: function (aCollection){
  4368. var self=this;
  4369. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4370. return self;},
  4371. args: ["aCollection"],
  4372. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  4373. messageSends: ["addAll:", "yourself", "copy"],
  4374. referencedClasses: []
  4375. }),
  4376. smalltalk.Collection);
  4377. smalltalk.addMethod(
  4378. unescape('_asArray'),
  4379. smalltalk.method({
  4380. selector: unescape('asArray'),
  4381. category: 'converting',
  4382. fn: function (){
  4383. var self=this;
  4384. var array=nil;
  4385. var index=nil;
  4386. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  4387. index=(0);
  4388. smalltalk.send(self, "_do_", [(function(each){index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return smalltalk.send(array, "_at_put_", [index, each]);})]);
  4389. return array;
  4390. return self;},
  4391. args: [],
  4392. source: unescape('asArray%0A%09%7C%20array%20index%20%7C%0A%09array%20%3A%3D%20Array%20new.%0A%09index%20%3A%3D%200.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%20%20%20%20array%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Earray'),
  4393. messageSends: ["new", "do:", unescape("+"), "at:put:"],
  4394. referencedClasses: [smalltalk.Array]
  4395. }),
  4396. smalltalk.Collection);
  4397. smalltalk.addMethod(
  4398. unescape('_do_'),
  4399. smalltalk.method({
  4400. selector: unescape('do%3A'),
  4401. category: 'enumerating',
  4402. fn: function (aBlock){
  4403. var self=this;
  4404. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  4405. return self;},
  4406. args: ["aBlock"],
  4407. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  4408. messageSends: [],
  4409. referencedClasses: []
  4410. }),
  4411. smalltalk.Collection);
  4412. smalltalk.addMethod(
  4413. unescape('_collect_'),
  4414. smalltalk.method({
  4415. selector: unescape('collect%3A'),
  4416. category: 'enumerating',
  4417. fn: function (aBlock){
  4418. var self=this;
  4419. var newCollection=nil;
  4420. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  4421. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  4422. return newCollection;
  4423. return self;},
  4424. args: ["aBlock"],
  4425. source: unescape('collect%3A%20aBlock%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20add%3A%20%28aBlock%20value%3A%20each%29%5D.%0A%09%5EnewCollection'),
  4426. messageSends: ["new", "class", "do:", "add:", "value:"],
  4427. referencedClasses: []
  4428. }),
  4429. smalltalk.Collection);
  4430. smalltalk.addMethod(
  4431. unescape('_detect_'),
  4432. smalltalk.method({
  4433. selector: unescape('detect%3A'),
  4434. category: 'enumerating',
  4435. fn: function (aBlock){
  4436. var self=this;
  4437. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4438. return self;},
  4439. args: ["aBlock"],
  4440. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  4441. messageSends: ["detect:ifNone:", "errorNotFound"],
  4442. referencedClasses: []
  4443. }),
  4444. smalltalk.Collection);
  4445. smalltalk.addMethod(
  4446. unescape('_detect_ifNone_'),
  4447. smalltalk.method({
  4448. selector: unescape('detect%3AifNone%3A'),
  4449. category: 'enumerating',
  4450. fn: function (aBlock, anotherBlock){
  4451. var self=this;
  4452. for(var i = 0; i < self.length; i++)
  4453. if(aBlock(self[i]))
  4454. return self[i];
  4455. return anotherBlock();
  4456. ;
  4457. return self;},
  4458. args: ["aBlock", "anotherBlock"],
  4459. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%3C%0A%09%09for%28var%20i%20%3D%200%3B%20i%20%3C%20self.length%3B%20i++%29%0A%09%09%09if%28aBlock%28self%5Bi%5D%29%29%0A%09%09%09%09return%20self%5Bi%5D%3B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%3E'),
  4460. messageSends: [],
  4461. referencedClasses: []
  4462. }),
  4463. smalltalk.Collection);
  4464. smalltalk.addMethod(
  4465. unescape('_do_separatedBy_'),
  4466. smalltalk.method({
  4467. selector: unescape('do%3AseparatedBy%3A'),
  4468. category: 'enumerating',
  4469. fn: function (aBlock, anotherBlock){
  4470. var self=this;
  4471. var first=nil;
  4472. first=true;
  4473. smalltalk.send(self, "_do_", [(function(each){((($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return first=false;})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return first=false;}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]));return smalltalk.send(aBlock, "_value_", [each]);})]);
  4474. return self;},
  4475. args: ["aBlock", "anotherBlock"],
  4476. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%20%20%20%20%09%7C%20first%20%7C%0A%20%20%20%20%09first%20%3A%3D%20true.%0A%20%20%20%20%09self%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20first%0A%20%20%20%20%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%20%20%20%20%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  4477. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  4478. referencedClasses: []
  4479. }),
  4480. smalltalk.Collection);
  4481. smalltalk.addMethod(
  4482. unescape('_inject_into_'),
  4483. smalltalk.method({
  4484. selector: unescape('inject%3Ainto%3A'),
  4485. category: 'enumerating',
  4486. fn: function (anObject, aBlock){
  4487. var self=this;
  4488. var result=nil;
  4489. result=anObject;
  4490. smalltalk.send(self, "_do_", [(function(each){return result=smalltalk.send(aBlock, "_value_value_", [result, each]);})]);
  4491. return result;
  4492. return self;},
  4493. args: ["anObject", "aBlock"],
  4494. source: unescape('inject%3A%20anObject%20into%3A%20aBlock%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20anObject.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%20%20%20%20result%20%3A%3D%20aBlock%20value%3A%20result%20value%3A%20each%5D.%0A%09%5Eresult'),
  4495. messageSends: ["do:", "value:value:"],
  4496. referencedClasses: []
  4497. }),
  4498. smalltalk.Collection);
  4499. smalltalk.addMethod(
  4500. unescape('_reject_'),
  4501. smalltalk.method({
  4502. selector: unescape('reject%3A'),
  4503. category: 'enumerating',
  4504. fn: function (aBlock){
  4505. var self=this;
  4506. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  4507. return self;},
  4508. args: ["aBlock"],
  4509. source: unescape('reject%3A%20aBlock%0A%09%5Eself%20select%3A%20%5B%3Aeach%20%7C%20%28aBlock%20value%3A%20each%29%20%3D%20false%5D'),
  4510. messageSends: ["select:", unescape("%3D"), "value:"],
  4511. referencedClasses: []
  4512. }),
  4513. smalltalk.Collection);
  4514. smalltalk.addMethod(
  4515. unescape('_select_'),
  4516. smalltalk.method({
  4517. selector: unescape('select%3A'),
  4518. category: 'enumerating',
  4519. fn: function (aBlock){
  4520. var self=this;
  4521. var stream=nil;
  4522. stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []);
  4523. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]));})]);
  4524. return smalltalk.send(stream, "_contents", []);
  4525. return self;},
  4526. args: ["aBlock"],
  4527. source: unescape('select%3A%20aBlock%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20self%20class%20new%20writeStream.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09stream%20nextPut%3A%20each%5D%5D.%0A%09%5Estream%20contents'),
  4528. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  4529. referencedClasses: []
  4530. }),
  4531. smalltalk.Collection);
  4532. smalltalk.addMethod(
  4533. unescape('_errorNotFound'),
  4534. smalltalk.method({
  4535. selector: unescape('errorNotFound'),
  4536. category: 'error handling',
  4537. fn: function (){
  4538. var self=this;
  4539. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  4540. return self;},
  4541. args: [],
  4542. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  4543. messageSends: ["error:"],
  4544. referencedClasses: []
  4545. }),
  4546. smalltalk.Collection);
  4547. smalltalk.addMethod(
  4548. unescape('_includes_'),
  4549. smalltalk.method({
  4550. selector: unescape('includes%3A'),
  4551. category: 'testing',
  4552. fn: function (anObject){
  4553. var self=this;
  4554. var i = self.length;
  4555. while (i--) {
  4556. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  4557. }
  4558. return false
  4559. ;
  4560. return self;},
  4561. args: ["anObject"],
  4562. source: unescape('includes%3A%20anObject%0A%09%3C%0A%09%09var%20i%20%3D%20self.length%3B%0A%09%09while%20%28i--%29%20%7B%0A%09%09%09if%20%28smalltalk.send%28self%5Bi%5D%2C%20%22__eq%22%2C%20%5BanObject%5D%29%29%20%7Breturn%20true%3B%7D%09%0A%09%09%7D%0A%09%09return%20false%0A%09%3E'),
  4563. messageSends: [],
  4564. referencedClasses: []
  4565. }),
  4566. smalltalk.Collection);
  4567. smalltalk.addMethod(
  4568. unescape('_notEmpty'),
  4569. smalltalk.method({
  4570. selector: unescape('notEmpty'),
  4571. category: 'testing',
  4572. fn: function (){
  4573. var self=this;
  4574. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  4575. return self;},
  4576. args: [],
  4577. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  4578. messageSends: ["not", "isEmpty"],
  4579. referencedClasses: []
  4580. }),
  4581. smalltalk.Collection);
  4582. smalltalk.addMethod(
  4583. unescape('_isEmpty'),
  4584. smalltalk.method({
  4585. selector: unescape('isEmpty'),
  4586. category: 'testing',
  4587. fn: function (){
  4588. var self=this;
  4589. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  4590. return self;},
  4591. args: [],
  4592. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  4593. messageSends: [unescape("%3D"), "size"],
  4594. referencedClasses: []
  4595. }),
  4596. smalltalk.Collection);
  4597. smalltalk.addMethod(
  4598. unescape('_remove_'),
  4599. smalltalk.method({
  4600. selector: unescape('remove%3A'),
  4601. category: 'adding/removing',
  4602. fn: function (anObject){
  4603. var self=this;
  4604. smalltalk.send(self, "_subclassResponsibility", []);
  4605. return self;},
  4606. args: ["anObject"],
  4607. source: unescape('remove%3A%20anObject%0A%20%20%20%20self%20subclassResponsibility'),
  4608. messageSends: ["subclassResponsibility"],
  4609. referencedClasses: []
  4610. }),
  4611. smalltalk.Collection);
  4612. smalltalk.addMethod(
  4613. unescape('_asSet'),
  4614. smalltalk.method({
  4615. selector: unescape('asSet'),
  4616. category: 'converting',
  4617. fn: function (){
  4618. var self=this;
  4619. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  4620. return self;},
  4621. args: [],
  4622. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  4623. messageSends: ["withAll:"],
  4624. referencedClasses: [smalltalk.Set]
  4625. }),
  4626. smalltalk.Collection);
  4627. smalltalk.addMethod(
  4628. unescape('_ifNotEmpty_'),
  4629. smalltalk.method({
  4630. selector: unescape('ifNotEmpty%3A'),
  4631. category: 'testing',
  4632. fn: function (aBlock){
  4633. var self=this;
  4634. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  4635. return self;},
  4636. args: ["aBlock"],
  4637. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  4638. messageSends: ["ifTrue:", "notEmpty"],
  4639. referencedClasses: []
  4640. }),
  4641. smalltalk.Collection);
  4642. smalltalk.addMethod(
  4643. unescape('_ifEmpty_'),
  4644. smalltalk.method({
  4645. selector: unescape('ifEmpty%3A'),
  4646. category: 'testing',
  4647. fn: function (aBlock){
  4648. var self=this;
  4649. smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_ifTrue_", [aBlock]);
  4650. return self;},
  4651. args: ["aBlock"],
  4652. source: unescape('ifEmpty%3A%20aBlock%0A%09self%20isEmpty%20ifTrue%3A%20aBlock.'),
  4653. messageSends: ["ifTrue:", "isEmpty"],
  4654. referencedClasses: []
  4655. }),
  4656. smalltalk.Collection);
  4657. smalltalk.addMethod(
  4658. unescape('_streamClass'),
  4659. smalltalk.method({
  4660. selector: unescape('streamClass'),
  4661. category: 'accessing',
  4662. fn: function (){
  4663. var self=this;
  4664. return (smalltalk.Stream || Stream);
  4665. return self;},
  4666. args: [],
  4667. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  4668. messageSends: [],
  4669. referencedClasses: [smalltalk.Stream]
  4670. }),
  4671. smalltalk.Collection.klass);
  4672. smalltalk.addMethod(
  4673. unescape('_with_'),
  4674. smalltalk.method({
  4675. selector: unescape('with%3A'),
  4676. category: 'instance creation',
  4677. fn: function (anObject){
  4678. var self=this;
  4679. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4680. return self;},
  4681. args: ["anObject"],
  4682. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  4683. messageSends: ["add:", "yourself", "new"],
  4684. referencedClasses: []
  4685. }),
  4686. smalltalk.Collection.klass);
  4687. smalltalk.addMethod(
  4688. unescape('_with_with_'),
  4689. smalltalk.method({
  4690. selector: unescape('with%3Awith%3A'),
  4691. category: 'instance creation',
  4692. fn: function (anObject, anotherObject){
  4693. var self=this;
  4694. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4695. return self;},
  4696. args: ["anObject", "anotherObject"],
  4697. source: unescape('with%3A%20anObject%20with%3A%20anotherObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09add%3A%20anotherObject%3B%0A%09%09yourself'),
  4698. messageSends: ["add:", "yourself", "new"],
  4699. referencedClasses: []
  4700. }),
  4701. smalltalk.Collection.klass);
  4702. smalltalk.addMethod(
  4703. unescape('_with_with_with_'),
  4704. smalltalk.method({
  4705. selector: unescape('with%3Awith%3Awith%3A'),
  4706. category: 'instance creation',
  4707. fn: function (firstObject, secondObject, thirdObject){
  4708. var self=this;
  4709. return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4710. return self;},
  4711. args: ["firstObject", "secondObject", "thirdObject"],
  4712. source: unescape('with%3A%20firstObject%20with%3A%20secondObject%20with%3A%20thirdObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20firstObject%3B%0A%09%09add%3A%20secondObject%3B%0A%09%09add%3A%20thirdObject%3B%0A%09%09yourself'),
  4713. messageSends: ["add:", "yourself", "new"],
  4714. referencedClasses: []
  4715. }),
  4716. smalltalk.Collection.klass);
  4717. smalltalk.addMethod(
  4718. unescape('_withAll_'),
  4719. smalltalk.method({
  4720. selector: unescape('withAll%3A'),
  4721. category: 'instance creation',
  4722. fn: function (aCollection){
  4723. var self=this;
  4724. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4725. return self;},
  4726. args: ["aCollection"],
  4727. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  4728. messageSends: ["addAll:", "yourself", "new"],
  4729. referencedClasses: []
  4730. }),
  4731. smalltalk.Collection.klass);
  4732. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel');
  4733. smalltalk.addMethod(
  4734. unescape('_at_'),
  4735. smalltalk.method({
  4736. selector: unescape('at%3A'),
  4737. category: 'accessing',
  4738. fn: function (anIndex){
  4739. var self=this;
  4740. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4741. return self;},
  4742. args: ["anIndex"],
  4743. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  4744. messageSends: ["at:ifAbsent:", "errorNotFound"],
  4745. referencedClasses: []
  4746. }),
  4747. smalltalk.SequenceableCollection);
  4748. smalltalk.addMethod(
  4749. unescape('_at_ifAbsent_'),
  4750. smalltalk.method({
  4751. selector: unescape('at%3AifAbsent%3A'),
  4752. category: 'accessing',
  4753. fn: function (anIndex, aBlock){
  4754. var self=this;
  4755. smalltalk.send(self, "_subclassResponsibility", []);
  4756. return self;},
  4757. args: ["anIndex", "aBlock"],
  4758. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  4759. messageSends: ["subclassResponsibility"],
  4760. referencedClasses: []
  4761. }),
  4762. smalltalk.SequenceableCollection);
  4763. smalltalk.addMethod(
  4764. unescape('_at_put_'),
  4765. smalltalk.method({
  4766. selector: unescape('at%3Aput%3A'),
  4767. category: 'accessing',
  4768. fn: function (anIndex, anObject){
  4769. var self=this;
  4770. smalltalk.send(self, "_subclassResponsibility", []);
  4771. return self;},
  4772. args: ["anIndex", "anObject"],
  4773. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  4774. messageSends: ["subclassResponsibility"],
  4775. referencedClasses: []
  4776. }),
  4777. smalltalk.SequenceableCollection);
  4778. smalltalk.addMethod(
  4779. unescape('_copyFrom_to_'),
  4780. smalltalk.method({
  4781. selector: unescape('copyFrom%3Ato%3A'),
  4782. category: 'copying',
  4783. fn: function (anIndex, anotherIndex){
  4784. var self=this;
  4785. smalltalk.send(self, "_subclassResponsibility", []);
  4786. return self;},
  4787. args: ["anIndex", "anotherIndex"],
  4788. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20subclassResponsibility'),
  4789. messageSends: ["subclassResponsibility"],
  4790. referencedClasses: []
  4791. }),
  4792. smalltalk.SequenceableCollection);
  4793. smalltalk.addMethod(
  4794. unescape('_first'),
  4795. smalltalk.method({
  4796. selector: unescape('first'),
  4797. category: 'accessing',
  4798. fn: function (){
  4799. var self=this;
  4800. return smalltalk.send(self, "_at_", [(1)]);
  4801. return self;},
  4802. args: [],
  4803. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  4804. messageSends: ["at:"],
  4805. referencedClasses: []
  4806. }),
  4807. smalltalk.SequenceableCollection);
  4808. smalltalk.addMethod(
  4809. unescape('_fourth'),
  4810. smalltalk.method({
  4811. selector: unescape('fourth'),
  4812. category: 'accessing',
  4813. fn: function (){
  4814. var self=this;
  4815. return smalltalk.send(self, "_at_", [(4)]);
  4816. return self;},
  4817. args: [],
  4818. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  4819. messageSends: ["at:"],
  4820. referencedClasses: []
  4821. }),
  4822. smalltalk.SequenceableCollection);
  4823. smalltalk.addMethod(
  4824. unescape('_last'),
  4825. smalltalk.method({
  4826. selector: unescape('last'),
  4827. category: 'accessing',
  4828. fn: function (){
  4829. var self=this;
  4830. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  4831. return self;},
  4832. args: [],
  4833. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  4834. messageSends: ["at:", "size"],
  4835. referencedClasses: []
  4836. }),
  4837. smalltalk.SequenceableCollection);
  4838. smalltalk.addMethod(
  4839. unescape('_second'),
  4840. smalltalk.method({
  4841. selector: unescape('second'),
  4842. category: 'accessing',
  4843. fn: function (){
  4844. var self=this;
  4845. return smalltalk.send(self, "_at_", [(2)]);
  4846. return self;},
  4847. args: [],
  4848. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  4849. messageSends: ["at:"],
  4850. referencedClasses: []
  4851. }),
  4852. smalltalk.SequenceableCollection);
  4853. smalltalk.addMethod(
  4854. unescape('_third'),
  4855. smalltalk.method({
  4856. selector: unescape('third'),
  4857. category: 'accessing',
  4858. fn: function (){
  4859. var self=this;
  4860. return smalltalk.send(self, "_at_", [(3)]);
  4861. return self;},
  4862. args: [],
  4863. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  4864. messageSends: ["at:"],
  4865. referencedClasses: []
  4866. }),
  4867. smalltalk.SequenceableCollection);
  4868. smalltalk.addMethod(
  4869. unescape('_removeLast'),
  4870. smalltalk.method({
  4871. selector: unescape('removeLast'),
  4872. category: 'adding',
  4873. fn: function (){
  4874. var self=this;
  4875. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  4876. return self;},
  4877. args: [],
  4878. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  4879. messageSends: ["remove:", "last"],
  4880. referencedClasses: []
  4881. }),
  4882. smalltalk.SequenceableCollection);
  4883. smalltalk.addMethod(
  4884. unescape('_addLast_'),
  4885. smalltalk.method({
  4886. selector: unescape('addLast%3A'),
  4887. category: 'adding',
  4888. fn: function (anObject){
  4889. var self=this;
  4890. smalltalk.send(self, "_add_", [anObject]);
  4891. return self;},
  4892. args: ["anObject"],
  4893. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  4894. messageSends: ["add:"],
  4895. referencedClasses: []
  4896. }),
  4897. smalltalk.SequenceableCollection);
  4898. smalltalk.addMethod(
  4899. unescape('_withIndexDo_'),
  4900. smalltalk.method({
  4901. selector: unescape('withIndexDo%3A'),
  4902. category: 'enumerating',
  4903. fn: function (aBlock){
  4904. var self=this;
  4905. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  4906. return self;},
  4907. args: ["aBlock"],
  4908. source: unescape('withIndexDo%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%2C%20i+1%29%3B%7D%3E'),
  4909. messageSends: [],
  4910. referencedClasses: []
  4911. }),
  4912. smalltalk.SequenceableCollection);
  4913. smalltalk.addMethod(
  4914. unescape('_allButFirst'),
  4915. smalltalk.method({
  4916. selector: unescape('allButFirst'),
  4917. category: 'accessing',
  4918. fn: function (){
  4919. var self=this;
  4920. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  4921. return self;},
  4922. args: [],
  4923. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  4924. messageSends: ["copyFrom:to:", "size"],
  4925. referencedClasses: []
  4926. }),
  4927. smalltalk.SequenceableCollection);
  4928. smalltalk.addMethod(
  4929. unescape('_allButLast'),
  4930. smalltalk.method({
  4931. selector: unescape('allButLast'),
  4932. category: 'accessing',
  4933. fn: function (){
  4934. var self=this;
  4935. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  4936. return self;},
  4937. args: [],
  4938. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  4939. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  4940. referencedClasses: []
  4941. }),
  4942. smalltalk.SequenceableCollection);
  4943. smalltalk.addMethod(
  4944. unescape('_indexOf_'),
  4945. smalltalk.method({
  4946. selector: unescape('indexOf%3A'),
  4947. category: 'accessing',
  4948. fn: function (anObject){
  4949. var self=this;
  4950. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4951. return self;},
  4952. args: ["anObject"],
  4953. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  4954. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  4955. referencedClasses: []
  4956. }),
  4957. smalltalk.SequenceableCollection);
  4958. smalltalk.addMethod(
  4959. unescape('_indexOf_ifAbsent_'),
  4960. smalltalk.method({
  4961. selector: unescape('indexOf%3AifAbsent%3A'),
  4962. category: 'accessing',
  4963. fn: function (anObject, aBlock){
  4964. var self=this;
  4965. for(var i=0;i<self.length;i++){
  4966. if(self[i].__eq(anObject)) {return i+1}
  4967. }
  4968. return aBlock();
  4969. ;
  4970. return self;},
  4971. args: ["anObject", "aBlock"],
  4972. source: unescape('indexOf%3A%20anObject%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  4973. messageSends: [],
  4974. referencedClasses: []
  4975. }),
  4976. smalltalk.SequenceableCollection);
  4977. smalltalk.addMethod(
  4978. unescape('_indexOf_startingAt_ifAbsent_'),
  4979. smalltalk.method({
  4980. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  4981. category: 'accessing',
  4982. fn: function (anObject, start, aBlock){
  4983. var self=this;
  4984. for(var i=start-1;i<self.length;i++){
  4985. if(self[i].__eq(anObject)) {return i+1}
  4986. }
  4987. return aBlock();
  4988. ;
  4989. return self;},
  4990. args: ["anObject", "start", "aBlock"],
  4991. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  4992. messageSends: [],
  4993. referencedClasses: []
  4994. }),
  4995. smalltalk.SequenceableCollection);
  4996. smalltalk.addMethod(
  4997. unescape('_indexOf_startingAt_'),
  4998. smalltalk.method({
  4999. selector: unescape('indexOf%3AstartingAt%3A'),
  5000. category: 'accessing',
  5001. fn: function (anObject, start){
  5002. var self=this;
  5003. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  5004. return self;},
  5005. args: ["anObject", "start"],
  5006. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
  5007. messageSends: ["indexOf:startingAt:ifAbsent:"],
  5008. referencedClasses: []
  5009. }),
  5010. smalltalk.SequenceableCollection);
  5011. smalltalk.addMethod(
  5012. unescape('_reversed'),
  5013. smalltalk.method({
  5014. selector: unescape('reversed'),
  5015. category: 'converting',
  5016. fn: function (){
  5017. var self=this;
  5018. smalltalk.send(self, "_subclassResponsibility", []);
  5019. return self;},
  5020. args: [],
  5021. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  5022. messageSends: ["subclassResponsibility"],
  5023. referencedClasses: []
  5024. }),
  5025. smalltalk.SequenceableCollection);
  5026. smalltalk.addClass('String', smalltalk.SequenceableCollection, [], 'Kernel');
  5027. smalltalk.addMethod(
  5028. unescape('__eq'),
  5029. smalltalk.method({
  5030. selector: unescape('%3D'),
  5031. category: 'comparing',
  5032. fn: function (aString){
  5033. var self=this;
  5034. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  5035. return String(self) == aString;
  5036. return self;
  5037. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  5038. args: ["aString"],
  5039. source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%20aString%3E'),
  5040. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5041. referencedClasses: []
  5042. }),
  5043. smalltalk.String);
  5044. smalltalk.addMethod(
  5045. unescape('_size'),
  5046. smalltalk.method({
  5047. selector: unescape('size'),
  5048. category: 'accessing',
  5049. fn: function (){
  5050. var self=this;
  5051. return self.length;
  5052. return self;},
  5053. args: [],
  5054. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  5055. messageSends: [],
  5056. referencedClasses: []
  5057. }),
  5058. smalltalk.String);
  5059. smalltalk.addMethod(
  5060. unescape('_at_'),
  5061. smalltalk.method({
  5062. selector: unescape('at%3A'),
  5063. category: 'accessing',
  5064. fn: function (anIndex){
  5065. var self=this;
  5066. return self[anIndex - 1];
  5067. return self;},
  5068. args: ["anIndex"],
  5069. source: unescape('at%3A%20anIndex%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%3E'),
  5070. messageSends: [],
  5071. referencedClasses: []
  5072. }),
  5073. smalltalk.String);
  5074. smalltalk.addMethod(
  5075. unescape('_at_put_'),
  5076. smalltalk.method({
  5077. selector: unescape('at%3Aput%3A'),
  5078. category: 'accessing',
  5079. fn: function (anIndex, anObject){
  5080. var self=this;
  5081. smalltalk.send(self, "_errorReadOnly", []);
  5082. return self;},
  5083. args: ["anIndex", "anObject"],
  5084. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  5085. messageSends: ["errorReadOnly"],
  5086. referencedClasses: []
  5087. }),
  5088. smalltalk.String);
  5089. smalltalk.addMethod(
  5090. unescape('_at_ifAbsent_'),
  5091. smalltalk.method({
  5092. selector: unescape('at%3AifAbsent%3A'),
  5093. category: 'accessing',
  5094. fn: function (anIndex, aBlock){
  5095. var self=this;
  5096. (($receiver = smalltalk.send(self, "_at_", [anIndex])) == nil || $receiver == undefined) ? (function(){return aBlock;})() : $receiver;
  5097. return self;},
  5098. args: ["anIndex", "aBlock"],
  5099. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%20%20%20%20%09%28self%20at%3A%20anIndex%29%20ifNil%3A%20%5BaBlock%5D'),
  5100. messageSends: ["ifNil:", "at:"],
  5101. referencedClasses: []
  5102. }),
  5103. smalltalk.String);
  5104. smalltalk.addMethod(
  5105. unescape('_escaped'),
  5106. smalltalk.method({
  5107. selector: unescape('escaped'),
  5108. category: 'accessing',
  5109. fn: function (){
  5110. var self=this;
  5111. return escape(self);
  5112. return self;},
  5113. args: [],
  5114. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  5115. messageSends: [],
  5116. referencedClasses: []
  5117. }),
  5118. smalltalk.String);
  5119. smalltalk.addMethod(
  5120. unescape('_unescaped'),
  5121. smalltalk.method({
  5122. selector: unescape('unescaped'),
  5123. category: 'accessing',
  5124. fn: function (){
  5125. var self=this;
  5126. return unescape(self);
  5127. return self;},
  5128. args: [],
  5129. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  5130. messageSends: [],
  5131. referencedClasses: []
  5132. }),
  5133. smalltalk.String);
  5134. smalltalk.addMethod(
  5135. unescape('_add_'),
  5136. smalltalk.method({
  5137. selector: unescape('add%3A'),
  5138. category: 'adding',
  5139. fn: function (anObject){
  5140. var self=this;
  5141. smalltalk.send(self, "_errorReadOnly", []);
  5142. return self;},
  5143. args: ["anObject"],
  5144. source: unescape('add%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  5145. messageSends: ["errorReadOnly"],
  5146. referencedClasses: []
  5147. }),
  5148. smalltalk.String);
  5149. smalltalk.addMethod(
  5150. unescape('__comma'),
  5151. smalltalk.method({
  5152. selector: unescape('%2C'),
  5153. category: 'copying',
  5154. fn: function (aString){
  5155. var self=this;
  5156. return self + aString;
  5157. return self;},
  5158. args: ["aString"],
  5159. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  5160. messageSends: [],
  5161. referencedClasses: []
  5162. }),
  5163. smalltalk.String);
  5164. smalltalk.addMethod(
  5165. unescape('_copyFrom_to_'),
  5166. smalltalk.method({
  5167. selector: unescape('copyFrom%3Ato%3A'),
  5168. category: 'copying',
  5169. fn: function (anIndex, anotherIndex){
  5170. var self=this;
  5171. return self.substring(anIndex - 1, anotherIndex);
  5172. return self;},
  5173. args: ["anIndex", "anotherIndex"],
  5174. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  5175. messageSends: [],
  5176. referencedClasses: []
  5177. }),
  5178. smalltalk.String);
  5179. smalltalk.addMethod(
  5180. unescape('_shallowCopy'),
  5181. smalltalk.method({
  5182. selector: unescape('shallowCopy'),
  5183. category: 'copying',
  5184. fn: function (){
  5185. var self=this;
  5186. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  5187. return self;},
  5188. args: [],
  5189. source: unescape('shallowCopy%0A%20%20%20%20%09%5Eself%20class%20fromString%3A%20self'),
  5190. messageSends: ["fromString:", "class"],
  5191. referencedClasses: []
  5192. }),
  5193. smalltalk.String);
  5194. smalltalk.addMethod(
  5195. unescape('_deepCopy'),
  5196. smalltalk.method({
  5197. selector: unescape('deepCopy'),
  5198. category: 'copying',
  5199. fn: function (){
  5200. var self=this;
  5201. return smalltalk.send(self, "_shallowCopy", []);
  5202. return self;},
  5203. args: [],
  5204. source: unescape('deepCopy%0A%20%20%20%20%09%5Eself%20shallowCopy'),
  5205. messageSends: ["shallowCopy"],
  5206. referencedClasses: []
  5207. }),
  5208. smalltalk.String);
  5209. smalltalk.addMethod(
  5210. unescape('_asSelector'),
  5211. smalltalk.method({
  5212. selector: unescape('asSelector'),
  5213. category: 'converting',
  5214. fn: function (){
  5215. var self=this;
  5216. var selector=nil;
  5217. selector=smalltalk.send("_", "__comma", [self]);
  5218. selector=smalltalk.send(selector, "_replace_with_", [":", "_"]);
  5219. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]);
  5220. selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]);
  5221. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]);
  5222. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]);
  5223. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]);
  5224. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]);
  5225. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]);
  5226. selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]);
  5227. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]);
  5228. return selector;
  5229. return self;},
  5230. args: [],
  5231. source: unescape('asSelector%0A%09%22If%20you%20change%20this%20method%2C%20change%20smalltalk.convertSelector%20too%20%28see%20js/boot.js%20file%29%22%0A%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20%27_%27%2C%20self.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  5232. messageSends: [unescape("%2C"), "replace:with:"],
  5233. referencedClasses: []
  5234. }),
  5235. smalltalk.String);
  5236. smalltalk.addMethod(
  5237. unescape('_asJavascript'),
  5238. smalltalk.method({
  5239. selector: unescape('asJavascript'),
  5240. category: 'converting',
  5241. fn: function (){
  5242. var self=this;
  5243. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  5244. return "unescape(\"" + escape(self) + "\")";
  5245. else
  5246. return "\"" + self + "\"";
  5247. ;
  5248. return self;},
  5249. args: [],
  5250. source: unescape('asJavascript%0A%09%3C%0A%09%09if%28self.search%28/%5E%5Ba-zA-Z0-9_%3A.%24%20%5D*%24/%29%20%3D%3D%20-1%29%0A%09%09%09return%20%22unescape%28%5C%22%22%20+%20escape%28self%29%20+%20%22%5C%22%29%22%3B%0A%09%09else%0A%09%09%09return%20%22%5C%22%22%20+%20self%20+%20%22%5C%22%22%3B%0A%09%3E'),
  5251. messageSends: [],
  5252. referencedClasses: []
  5253. }),
  5254. smalltalk.String);
  5255. smalltalk.addMethod(
  5256. unescape('_replace_with_'),
  5257. smalltalk.method({
  5258. selector: unescape('replace%3Awith%3A'),
  5259. category: 'regular expressions',
  5260. fn: function (aString, anotherString){
  5261. var self=this;
  5262. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  5263. return self;},
  5264. args: ["aString", "anotherString"],
  5265. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  5266. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  5267. referencedClasses: [smalltalk.RegularExpression]
  5268. }),
  5269. smalltalk.String);
  5270. smalltalk.addMethod(
  5271. unescape('_replaceRegexp_with_'),
  5272. smalltalk.method({
  5273. selector: unescape('replaceRegexp%3Awith%3A'),
  5274. category: 'regular expressions',
  5275. fn: function (aRegexp, aString){
  5276. var self=this;
  5277. return self.replace(aRegexp, aString);
  5278. return self;},
  5279. args: ["aRegexp", "aString"],
  5280. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  5281. messageSends: [],
  5282. referencedClasses: []
  5283. }),
  5284. smalltalk.String);
  5285. smalltalk.addMethod(
  5286. unescape('_tokenize_'),
  5287. smalltalk.method({
  5288. selector: unescape('tokenize%3A'),
  5289. category: 'converting',
  5290. fn: function (aString){
  5291. var self=this;
  5292. return self.split(aString);
  5293. return self;},
  5294. args: ["aString"],
  5295. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  5296. messageSends: [],
  5297. referencedClasses: []
  5298. }),
  5299. smalltalk.String);
  5300. smalltalk.addMethod(
  5301. unescape('_match_'),
  5302. smalltalk.method({
  5303. selector: unescape('match%3A'),
  5304. category: 'regular expressions',
  5305. fn: function (aRegexp){
  5306. var self=this;
  5307. return self.search(aRegexp) != -1;
  5308. return self;},
  5309. args: ["aRegexp"],
  5310. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  5311. messageSends: [],
  5312. referencedClasses: []
  5313. }),
  5314. smalltalk.String);
  5315. smalltalk.addMethod(
  5316. unescape('_asString'),
  5317. smalltalk.method({
  5318. selector: unescape('asString'),
  5319. category: 'converting',
  5320. fn: function (){
  5321. var self=this;
  5322. return self;
  5323. return self;},
  5324. args: [],
  5325. source: unescape('asString%0A%20%20%20%20%09%5Eself'),
  5326. messageSends: [],
  5327. referencedClasses: []
  5328. }),
  5329. smalltalk.String);
  5330. smalltalk.addMethod(
  5331. unescape('_asNumber'),
  5332. smalltalk.method({
  5333. selector: unescape('asNumber'),
  5334. category: 'converting',
  5335. fn: function (){
  5336. var self=this;
  5337. return Number(self);
  5338. return self;},
  5339. args: [],
  5340. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  5341. messageSends: [],
  5342. referencedClasses: []
  5343. }),
  5344. smalltalk.String);
  5345. smalltalk.addMethod(
  5346. unescape('_errorReadOnly'),
  5347. smalltalk.method({
  5348. selector: unescape('errorReadOnly'),
  5349. category: 'error handling',
  5350. fn: function (){
  5351. var self=this;
  5352. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  5353. return self;},
  5354. args: [],
  5355. source: unescape('errorReadOnly%0A%20%20%20%20%09self%20error%3A%20%27Object%20is%20read-only%27'),
  5356. messageSends: ["error:"],
  5357. referencedClasses: []
  5358. }),
  5359. smalltalk.String);
  5360. smalltalk.addMethod(
  5361. unescape('_printString'),
  5362. smalltalk.method({
  5363. selector: unescape('printString'),
  5364. category: 'printing',
  5365. fn: function (){
  5366. var self=this;
  5367. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  5368. return self;},
  5369. args: [],
  5370. source: unescape('printString%0A%20%20%20%20%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  5371. messageSends: [unescape("%2C")],
  5372. referencedClasses: []
  5373. }),
  5374. smalltalk.String);
  5375. smalltalk.addMethod(
  5376. unescape('_printNl'),
  5377. smalltalk.method({
  5378. selector: unescape('printNl'),
  5379. category: 'printing',
  5380. fn: function (){
  5381. var self=this;
  5382. console.log(self);
  5383. return self;},
  5384. args: [],
  5385. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  5386. messageSends: [],
  5387. referencedClasses: []
  5388. }),
  5389. smalltalk.String);
  5390. smalltalk.addMethod(
  5391. unescape('_isString'),
  5392. smalltalk.method({
  5393. selector: unescape('isString'),
  5394. category: 'testing',
  5395. fn: function (){
  5396. var self=this;
  5397. return true;
  5398. return self;},
  5399. args: [],
  5400. source: unescape('isString%0A%20%20%20%20%09%5Etrue'),
  5401. messageSends: [],
  5402. referencedClasses: []
  5403. }),
  5404. smalltalk.String);
  5405. smalltalk.addMethod(
  5406. unescape('__gt'),
  5407. smalltalk.method({
  5408. selector: unescape('%3E'),
  5409. category: 'comparing',
  5410. fn: function (aString){
  5411. var self=this;
  5412. return String(self) > aString;
  5413. return self;},
  5414. args: ["aString"],
  5415. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString%3E'),
  5416. messageSends: [],
  5417. referencedClasses: []
  5418. }),
  5419. smalltalk.String);
  5420. smalltalk.addMethod(
  5421. unescape('__lt'),
  5422. smalltalk.method({
  5423. selector: unescape('%3C'),
  5424. category: 'comparing',
  5425. fn: function (aString){
  5426. var self=this;
  5427. return String(self) < aString;
  5428. return self;},
  5429. args: ["aString"],
  5430. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString%3E'),
  5431. messageSends: [],
  5432. referencedClasses: []
  5433. }),
  5434. smalltalk.String);
  5435. smalltalk.addMethod(
  5436. unescape('__gt_eq'),
  5437. smalltalk.method({
  5438. selector: unescape('%3E%3D'),
  5439. category: 'comparing',
  5440. fn: function (aString){
  5441. var self=this;
  5442. return String(self) >= aString;
  5443. return self;},
  5444. args: ["aString"],
  5445. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString%3E'),
  5446. messageSends: [],
  5447. referencedClasses: []
  5448. }),
  5449. smalltalk.String);
  5450. smalltalk.addMethod(
  5451. unescape('__lt_eq'),
  5452. smalltalk.method({
  5453. selector: unescape('%3C%3D'),
  5454. category: 'comparing',
  5455. fn: function (aString){
  5456. var self=this;
  5457. return String(self) <= aString;
  5458. return self;},
  5459. args: ["aString"],
  5460. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString%3E'),
  5461. messageSends: [],
  5462. referencedClasses: []
  5463. }),
  5464. smalltalk.String);
  5465. smalltalk.addMethod(
  5466. unescape('_remove_'),
  5467. smalltalk.method({
  5468. selector: unescape('remove%3A'),
  5469. category: 'adding',
  5470. fn: function (anObject){
  5471. var self=this;
  5472. smalltalk.send(self, "_errorReadOnly", []);
  5473. return self;},
  5474. args: ["anObject"],
  5475. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  5476. messageSends: ["errorReadOnly"],
  5477. referencedClasses: []
  5478. }),
  5479. smalltalk.String);
  5480. smalltalk.addMethod(
  5481. unescape('_asJSONObject'),
  5482. smalltalk.method({
  5483. selector: unescape('asJSONObject'),
  5484. category: 'converting',
  5485. fn: function (){
  5486. var self=this;
  5487. return self;
  5488. return self;},
  5489. args: [],
  5490. source: unescape('asJSONObject%0A%09%5Eself'),
  5491. messageSends: [],
  5492. referencedClasses: []
  5493. }),
  5494. smalltalk.String);
  5495. smalltalk.addMethod(
  5496. unescape('_trimLeft_'),
  5497. smalltalk.method({
  5498. selector: unescape('trimLeft%3A'),
  5499. category: 'regular expressions',
  5500. fn: function (separators){
  5501. var self=this;
  5502. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
  5503. return self;},
  5504. args: ["separators"],
  5505. source: unescape('trimLeft%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5506. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5507. referencedClasses: [smalltalk.RegularExpression]
  5508. }),
  5509. smalltalk.String);
  5510. smalltalk.addMethod(
  5511. unescape('_trimRight_'),
  5512. smalltalk.method({
  5513. selector: unescape('trimRight%3A'),
  5514. category: 'regular expressions',
  5515. fn: function (separators){
  5516. var self=this;
  5517. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
  5518. return self;},
  5519. args: ["separators"],
  5520. source: unescape('trimRight%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5521. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5522. referencedClasses: [smalltalk.RegularExpression]
  5523. }),
  5524. smalltalk.String);
  5525. smalltalk.addMethod(
  5526. unescape('_trimLeft'),
  5527. smalltalk.method({
  5528. selector: unescape('trimLeft'),
  5529. category: 'regular expressions',
  5530. fn: function (){
  5531. var self=this;
  5532. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  5533. return self;},
  5534. args: [],
  5535. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  5536. messageSends: ["trimLeft:"],
  5537. referencedClasses: []
  5538. }),
  5539. smalltalk.String);
  5540. smalltalk.addMethod(
  5541. unescape('_trimRight'),
  5542. smalltalk.method({
  5543. selector: unescape('trimRight'),
  5544. category: 'regular expressions',
  5545. fn: function (){
  5546. var self=this;
  5547. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  5548. return self;},
  5549. args: [],
  5550. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  5551. messageSends: ["trimRight:"],
  5552. referencedClasses: []
  5553. }),
  5554. smalltalk.String);
  5555. smalltalk.addMethod(
  5556. unescape('_trimBoth'),
  5557. smalltalk.method({
  5558. selector: unescape('trimBoth'),
  5559. category: 'regular expressions',
  5560. fn: function (){
  5561. var self=this;
  5562. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  5563. return self;},
  5564. args: [],
  5565. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  5566. messageSends: ["trimBoth:"],
  5567. referencedClasses: []
  5568. }),
  5569. smalltalk.String);
  5570. smalltalk.addMethod(
  5571. unescape('_trimBoth_'),
  5572. smalltalk.method({
  5573. selector: unescape('trimBoth%3A'),
  5574. category: 'regular expressions',
  5575. fn: function (separators){
  5576. var self=this;
  5577. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  5578. return self;},
  5579. args: ["separators"],
  5580. source: unescape('trimBoth%3A%20separators%0A%0A%20%20%20%20%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  5581. messageSends: ["trimRight:", "trimLeft:"],
  5582. referencedClasses: []
  5583. }),
  5584. smalltalk.String);
  5585. smalltalk.addMethod(
  5586. unescape('_asLowercase'),
  5587. smalltalk.method({
  5588. selector: unescape('asLowercase'),
  5589. category: 'converting',
  5590. fn: function (){
  5591. var self=this;
  5592. return self.toLowerCase();
  5593. return self;},
  5594. args: [],
  5595. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  5596. messageSends: [],
  5597. referencedClasses: []
  5598. }),
  5599. smalltalk.String);
  5600. smalltalk.addMethod(
  5601. unescape('_asUppercase'),
  5602. smalltalk.method({
  5603. selector: unescape('asUppercase'),
  5604. category: 'converting',
  5605. fn: function (){
  5606. var self=this;
  5607. return self.toUpperCase();
  5608. return self;},
  5609. args: [],
  5610. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  5611. messageSends: [],
  5612. referencedClasses: []
  5613. }),
  5614. smalltalk.String);
  5615. smalltalk.addMethod(
  5616. unescape('_join_'),
  5617. smalltalk.method({
  5618. selector: unescape('join%3A'),
  5619. category: 'split join',
  5620. fn: function (aCollection){
  5621. var self=this;
  5622. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
  5623. return self;},
  5624. args: ["aCollection"],
  5625. source: unescape('join%3A%20aCollection%20%0A%09%5E%20String%0A%09%09streamContents%3A%20%5B%3Astream%20%7C%20aCollection%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20asString%5D%20%0A%09%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20self%5D%5D'),
  5626. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  5627. referencedClasses: [smalltalk.String]
  5628. }),
  5629. smalltalk.String);
  5630. smalltalk.addMethod(
  5631. unescape('_includesSubString_'),
  5632. smalltalk.method({
  5633. selector: unescape('includesSubString%3A'),
  5634. category: 'testing',
  5635. fn: function (subString){
  5636. var self=this;
  5637. return self.indexOf(subString) != -1 ;
  5638. return self;},
  5639. args: ["subString"],
  5640. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  5641. messageSends: [],
  5642. referencedClasses: []
  5643. }),
  5644. smalltalk.String);
  5645. smalltalk.addMethod(
  5646. unescape('_asciiValue'),
  5647. smalltalk.method({
  5648. selector: unescape('asciiValue'),
  5649. category: 'accessing',
  5650. fn: function (){
  5651. var self=this;
  5652. return self.charCodeAt(0);;
  5653. return self;},
  5654. args: [],
  5655. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  5656. messageSends: [],
  5657. referencedClasses: []
  5658. }),
  5659. smalltalk.String);
  5660. smalltalk.addMethod(
  5661. unescape('_lineIndicesDo_'),
  5662. smalltalk.method({
  5663. selector: unescape('lineIndicesDo%3A'),
  5664. category: 'split join',
  5665. fn: function (aBlock){
  5666. var self=this;
  5667. try{var cr=nil;
  5668. var lf=nil;
  5669. var start=nil;
  5670. var sz=nil;
  5671. var nextLF=nil;
  5672. var nextCR=nil;
  5673. start=(1);
  5674. sz=smalltalk.send(self, "_size", []);
  5675. cr=smalltalk.send((smalltalk.String || String), "_cr", []);
  5676. nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]);
  5677. lf=smalltalk.send((smalltalk.String || String), "_lf", []);
  5678. nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]);
  5679. (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})]));})()}})();
  5680. return self;
  5681. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  5682. args: ["aBlock"],
  5683. source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
  5684. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  5685. referencedClasses: [smalltalk.String]
  5686. }),
  5687. smalltalk.String);
  5688. smalltalk.addMethod(
  5689. unescape('_linesDo_'),
  5690. smalltalk.method({
  5691. selector: unescape('linesDo%3A'),
  5692. category: 'split join',
  5693. fn: function (aBlock){
  5694. var self=this;
  5695. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  5696. return self;},
  5697. args: ["aBlock"],
  5698. source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
  5699. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  5700. referencedClasses: []
  5701. }),
  5702. smalltalk.String);
  5703. smalltalk.addMethod(
  5704. unescape('_lines'),
  5705. smalltalk.method({
  5706. selector: unescape('lines'),
  5707. category: 'split join',
  5708. fn: function (){
  5709. var self=this;
  5710. var lines=nil;
  5711. lines=smalltalk.send((smalltalk.Array || Array), "_new", []);
  5712. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  5713. return lines;
  5714. return self;},
  5715. args: [],
  5716. source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
  5717. messageSends: ["new", "linesDo:", "add:"],
  5718. referencedClasses: [smalltalk.Array]
  5719. }),
  5720. smalltalk.String);
  5721. smalltalk.addMethod(
  5722. unescape('_lineNumber_'),
  5723. smalltalk.method({
  5724. selector: unescape('lineNumber%3A'),
  5725. category: 'split join',
  5726. fn: function (anIndex){
  5727. var self=this;
  5728. try{var lineCount=nil;
  5729. lineCount=(0);
  5730. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send(lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]));})]);
  5731. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  5732. return self;
  5733. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  5734. args: ["anIndex"],
  5735. source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
  5736. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  5737. referencedClasses: []
  5738. }),
  5739. smalltalk.String);
  5740. smalltalk.addMethod(
  5741. unescape('_reversed'),
  5742. smalltalk.method({
  5743. selector: unescape('reversed'),
  5744. category: 'converting',
  5745. fn: function (){
  5746. var self=this;
  5747. return self.split("").reverse().join("");
  5748. return self;},
  5749. args: [],
  5750. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  5751. messageSends: [],
  5752. referencedClasses: []
  5753. }),
  5754. smalltalk.String);
  5755. smalltalk.addMethod(
  5756. unescape('__eq_eq'),
  5757. smalltalk.method({
  5758. selector: unescape('%3D%3D'),
  5759. category: 'comparing',
  5760. fn: function (aString){
  5761. var self=this;
  5762. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  5763. return String(self) === String(aString);
  5764. return self;
  5765. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  5766. args: ["aString"],
  5767. source: unescape('%3D%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
  5768. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5769. referencedClasses: []
  5770. }),
  5771. smalltalk.String);
  5772. smalltalk.addMethod(
  5773. unescape('_asJavaScriptSelector'),
  5774. smalltalk.method({
  5775. selector: unescape('asJavaScriptSelector'),
  5776. category: 'converting',
  5777. fn: function (){
  5778. var self=this;
  5779. return String(self.replace(/^_/, '').replace(/_.*/, ''));
  5780. return self;},
  5781. args: [],
  5782. source: unescape('asJavaScriptSelector%0A%09%3Creturn%20String%28self.replace%28/%5E_/%2C%20%27%27%29.replace%28/_.*/%2C%20%27%27%29%29%3E'),
  5783. messageSends: [],
  5784. referencedClasses: []
  5785. }),
  5786. smalltalk.String);
  5787. smalltalk.addMethod(
  5788. unescape('_streamClass'),
  5789. smalltalk.method({
  5790. selector: unescape('streamClass'),
  5791. category: 'accessing',
  5792. fn: function (){
  5793. var self=this;
  5794. return (smalltalk.StringStream || StringStream);
  5795. return self;},
  5796. args: [],
  5797. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  5798. messageSends: [],
  5799. referencedClasses: [smalltalk.StringStream]
  5800. }),
  5801. smalltalk.String.klass);
  5802. smalltalk.addMethod(
  5803. unescape('_fromString_'),
  5804. smalltalk.method({
  5805. selector: unescape('fromString%3A'),
  5806. category: 'instance creation',
  5807. fn: function (aString){
  5808. var self=this;
  5809. return new self.fn(aString);
  5810. return self;},
  5811. args: ["aString"],
  5812. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  5813. messageSends: [],
  5814. referencedClasses: []
  5815. }),
  5816. smalltalk.String.klass);
  5817. smalltalk.addMethod(
  5818. unescape('_cr'),
  5819. smalltalk.method({
  5820. selector: unescape('cr'),
  5821. category: 'accessing',
  5822. fn: function (){
  5823. var self=this;
  5824. return '\r';
  5825. return self;},
  5826. args: [],
  5827. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  5828. messageSends: [],
  5829. referencedClasses: []
  5830. }),
  5831. smalltalk.String.klass);
  5832. smalltalk.addMethod(
  5833. unescape('_lf'),
  5834. smalltalk.method({
  5835. selector: unescape('lf'),
  5836. category: 'accessing',
  5837. fn: function (){
  5838. var self=this;
  5839. return '\n';
  5840. return self;},
  5841. args: [],
  5842. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  5843. messageSends: [],
  5844. referencedClasses: []
  5845. }),
  5846. smalltalk.String.klass);
  5847. smalltalk.addMethod(
  5848. unescape('_space'),
  5849. smalltalk.method({
  5850. selector: unescape('space'),
  5851. category: 'accessing',
  5852. fn: function (){
  5853. var self=this;
  5854. return ' ';
  5855. return self;},
  5856. args: [],
  5857. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  5858. messageSends: [],
  5859. referencedClasses: []
  5860. }),
  5861. smalltalk.String.klass);
  5862. smalltalk.addMethod(
  5863. unescape('_tab'),
  5864. smalltalk.method({
  5865. selector: unescape('tab'),
  5866. category: 'accessing',
  5867. fn: function (){
  5868. var self=this;
  5869. return '\t';
  5870. return self;},
  5871. args: [],
  5872. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  5873. messageSends: [],
  5874. referencedClasses: []
  5875. }),
  5876. smalltalk.String.klass);
  5877. smalltalk.addMethod(
  5878. unescape('_crlf'),
  5879. smalltalk.method({
  5880. selector: unescape('crlf'),
  5881. category: 'accessing',
  5882. fn: function (){
  5883. var self=this;
  5884. return '\r\n';
  5885. return self;},
  5886. args: [],
  5887. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  5888. messageSends: [],
  5889. referencedClasses: []
  5890. }),
  5891. smalltalk.String.klass);
  5892. smalltalk.addMethod(
  5893. unescape('_streamContents_'),
  5894. smalltalk.method({
  5895. selector: unescape('streamContents%3A'),
  5896. category: 'instance creation',
  5897. fn: function (blockWithArg){
  5898. var self=this;
  5899. var stream=nil;
  5900. stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]);
  5901. smalltalk.send(blockWithArg, "_value_", [stream]);
  5902. return smalltalk.send(stream, "_contents", []);
  5903. return self;},
  5904. args: ["blockWithArg"],
  5905. source: unescape('streamContents%3A%20blockWithArg%0A%09%7Cstream%7C%0A%09stream%20%3A%3D%20%28self%20streamClass%20on%3A%20String%20new%29.%0A%09blockWithArg%20value%3A%20stream.%0A%09%5E%20stream%20contents'),
  5906. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  5907. referencedClasses: [smalltalk.String]
  5908. }),
  5909. smalltalk.String.klass);
  5910. smalltalk.addMethod(
  5911. unescape('_value_'),
  5912. smalltalk.method({
  5913. selector: unescape('value%3A'),
  5914. category: 'instance creation',
  5915. fn: function (aUTFCharCode){
  5916. var self=this;
  5917. return String.fromCharCode(aUTFCharCode);;
  5918. return self;},
  5919. args: ["aUTFCharCode"],
  5920. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  5921. messageSends: [],
  5922. referencedClasses: []
  5923. }),
  5924. smalltalk.String.klass);
  5925. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel');
  5926. smalltalk.addMethod(
  5927. unescape('_size'),
  5928. smalltalk.method({
  5929. selector: unescape('size'),
  5930. category: 'accessing',
  5931. fn: function (){
  5932. var self=this;
  5933. return self.length;
  5934. return self;},
  5935. args: [],
  5936. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  5937. messageSends: [],
  5938. referencedClasses: []
  5939. }),
  5940. smalltalk.Array);
  5941. smalltalk.addMethod(
  5942. unescape('_at_put_'),
  5943. smalltalk.method({
  5944. selector: unescape('at%3Aput%3A'),
  5945. category: 'accessing',
  5946. fn: function (anIndex, anObject){
  5947. var self=this;
  5948. return self[anIndex - 1] = anObject;
  5949. return self;},
  5950. args: ["anIndex", "anObject"],
  5951. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  5952. messageSends: [],
  5953. referencedClasses: []
  5954. }),
  5955. smalltalk.Array);
  5956. smalltalk.addMethod(
  5957. unescape('_at_ifAbsent_'),
  5958. smalltalk.method({
  5959. selector: unescape('at%3AifAbsent%3A'),
  5960. category: 'accessing',
  5961. fn: function (anIndex, aBlock){
  5962. var self=this;
  5963. var value = self[anIndex - 1];
  5964. if(value === undefined) {
  5965. return aBlock();
  5966. } else {
  5967. return value;
  5968. }
  5969. ;
  5970. return self;},
  5971. args: ["anIndex", "aBlock"],
  5972. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%20%20%20%20var%20value%20%3D%20self%5BanIndex%20-%201%5D%3B%0A%09%20%20%20%20if%28value%20%3D%3D%3D%20undefined%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20value%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  5973. messageSends: [],
  5974. referencedClasses: []
  5975. }),
  5976. smalltalk.Array);
  5977. smalltalk.addMethod(
  5978. unescape('_add_'),
  5979. smalltalk.method({
  5980. selector: unescape('add%3A'),
  5981. category: 'adding/removing',
  5982. fn: function (anObject){
  5983. var self=this;
  5984. self.push(anObject); return anObject;;
  5985. return self;},
  5986. args: ["anObject"],
  5987. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  5988. messageSends: [],
  5989. referencedClasses: []
  5990. }),
  5991. smalltalk.Array);
  5992. smalltalk.addMethod(
  5993. unescape('_shallowCopy'),
  5994. smalltalk.method({
  5995. selector: unescape('shallowCopy'),
  5996. category: 'copying',
  5997. fn: function (){
  5998. var self=this;
  5999. var newCollection=nil;
  6000. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6001. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [each]);})]);
  6002. return newCollection;
  6003. return self;},
  6004. args: [],
  6005. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%5D.%0A%09%5EnewCollection'),
  6006. messageSends: ["new", "class", "do:", "add:"],
  6007. referencedClasses: []
  6008. }),
  6009. smalltalk.Array);
  6010. smalltalk.addMethod(
  6011. unescape('_deepCopy'),
  6012. smalltalk.method({
  6013. selector: unescape('deepCopy'),
  6014. category: 'copying',
  6015. fn: function (){
  6016. var self=this;
  6017. var newCollection=nil;
  6018. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6019. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(each, "_deepCopy", [])]);})]);
  6020. return newCollection;
  6021. return self;},
  6022. args: [],
  6023. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  6024. messageSends: ["new", "class", "do:", "add:", "deepCopy"],
  6025. referencedClasses: []
  6026. }),
  6027. smalltalk.Array);
  6028. smalltalk.addMethod(
  6029. unescape('_copyFrom_to_'),
  6030. smalltalk.method({
  6031. selector: unescape('copyFrom%3Ato%3A'),
  6032. category: 'copying',
  6033. fn: function (anIndex, anotherIndex){
  6034. var self=this;
  6035. var array=nil;
  6036. array=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6037. smalltalk.send(anIndex, "_to_do_", [anotherIndex, (function(each){return smalltalk.send(array, "_add_", [smalltalk.send(self, "_at_", [each])]);})]);
  6038. return array;
  6039. return self;},
  6040. args: ["anIndex", "anotherIndex"],
  6041. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20array%20%7C%0A%09array%20%3A%3D%20self%20class%20new.%0A%09anIndex%20to%3A%20anotherIndex%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20array%20add%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5Earray'),
  6042. messageSends: ["new", "class", "to:do:", "add:", "at:"],
  6043. referencedClasses: []
  6044. }),
  6045. smalltalk.Array);
  6046. smalltalk.addMethod(
  6047. unescape('_join_'),
  6048. smalltalk.method({
  6049. selector: unescape('join%3A'),
  6050. category: 'enumerating',
  6051. fn: function (aString){
  6052. var self=this;
  6053. return self.join(aString);
  6054. return self;},
  6055. args: ["aString"],
  6056. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  6057. messageSends: [],
  6058. referencedClasses: []
  6059. }),
  6060. smalltalk.Array);
  6061. smalltalk.addMethod(
  6062. unescape('_asJavascript'),
  6063. smalltalk.method({
  6064. selector: unescape('asJavascript'),
  6065. category: 'converting',
  6066. fn: function (){
  6067. var self=this;
  6068. return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
  6069. return self;},
  6070. args: [],
  6071. source: unescape('asJavascript%0A%09%5E%27%5B%27%2C%20%28%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJavascript%5D%29%20join%3A%20%27%2C%20%27%29%2C%20%20%27%5D%27'),
  6072. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  6073. referencedClasses: []
  6074. }),
  6075. smalltalk.Array);
  6076. smalltalk.addMethod(
  6077. unescape('_sort'),
  6078. smalltalk.method({
  6079. selector: unescape('sort'),
  6080. category: 'enumerating',
  6081. fn: function (){
  6082. var self=this;
  6083. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  6084. return self;},
  6085. args: [],
  6086. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  6087. messageSends: ["basicPerform:"],
  6088. referencedClasses: []
  6089. }),
  6090. smalltalk.Array);
  6091. smalltalk.addMethod(
  6092. unescape('_sort_'),
  6093. smalltalk.method({
  6094. selector: unescape('sort%3A'),
  6095. category: 'enumerating',
  6096. fn: function (aBlock){
  6097. var self=this;
  6098. return self.sort(function(a, b) {
  6099. if(aBlock(a,b)) {return -1} else {return 1}
  6100. })
  6101. ;
  6102. return self;},
  6103. args: ["aBlock"],
  6104. source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%20-1%7D%20else%20%7Breturn%201%7D%0A%09%09%7D%29%0A%09%3E'),
  6105. messageSends: [],
  6106. referencedClasses: []
  6107. }),
  6108. smalltalk.Array);
  6109. smalltalk.addMethod(
  6110. unescape('_remove_'),
  6111. smalltalk.method({
  6112. selector: unescape('remove%3A'),
  6113. category: 'adding/removing',
  6114. fn: function (anObject){
  6115. var self=this;
  6116. for(var i=0;i<self.length;i++) {
  6117. if(self[i] == anObject) {
  6118. self.splice(i,1);
  6119. break;
  6120. }
  6121. }
  6122. ;
  6123. return self;},
  6124. args: ["anObject"],
  6125. source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
  6126. messageSends: [],
  6127. referencedClasses: []
  6128. }),
  6129. smalltalk.Array);
  6130. smalltalk.addMethod(
  6131. unescape('_sorted'),
  6132. smalltalk.method({
  6133. selector: unescape('sorted'),
  6134. category: 'enumerating',
  6135. fn: function (){
  6136. var self=this;
  6137. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  6138. return self;},
  6139. args: [],
  6140. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  6141. messageSends: ["sort", "copy"],
  6142. referencedClasses: []
  6143. }),
  6144. smalltalk.Array);
  6145. smalltalk.addMethod(
  6146. unescape('_sorted_'),
  6147. smalltalk.method({
  6148. selector: unescape('sorted%3A'),
  6149. category: 'enumerating',
  6150. fn: function (aBlock){
  6151. var self=this;
  6152. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  6153. return self;},
  6154. args: ["aBlock"],
  6155. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  6156. messageSends: ["sort:", "copy"],
  6157. referencedClasses: []
  6158. }),
  6159. smalltalk.Array);
  6160. smalltalk.addMethod(
  6161. unescape('_asJSONObject'),
  6162. smalltalk.method({
  6163. selector: unescape('asJSONObject'),
  6164. category: 'converting',
  6165. fn: function (){
  6166. var self=this;
  6167. return smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJSONObject", []);})]);
  6168. return self;},
  6169. args: [],
  6170. source: unescape('asJSONObject%0A%09%5Eself%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSONObject%5D'),
  6171. messageSends: ["collect:", "asJSONObject"],
  6172. referencedClasses: []
  6173. }),
  6174. smalltalk.Array);
  6175. smalltalk.addMethod(
  6176. unescape('_removeFrom_to_'),
  6177. smalltalk.method({
  6178. selector: unescape('removeFrom%3Ato%3A'),
  6179. category: 'adding/removing',
  6180. fn: function (aNumber, anotherNumber){
  6181. var self=this;
  6182. self.splice(aNumber - 1,anotherNumber - 1);
  6183. return self;},
  6184. args: ["aNumber", "anotherNumber"],
  6185. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  6186. messageSends: [],
  6187. referencedClasses: []
  6188. }),
  6189. smalltalk.Array);
  6190. smalltalk.addMethod(
  6191. unescape('_printString'),
  6192. smalltalk.method({
  6193. selector: unescape('printString'),
  6194. category: 'enumerating',
  6195. fn: function (){
  6196. var self=this;
  6197. var str=nil;
  6198. str=smalltalk.send("", "_writeStream", []);
  6199. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.SequenceableCollection), "__comma", [unescape("%20%28")])]);
  6200. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  6201. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  6202. return smalltalk.send(str, "_contents", []);
  6203. return self;},
  6204. args: [],
  6205. source: unescape('printString%0A%09%7C%20str%20%7C%0A%09str%20%3A%3D%20%27%27%20writeStream.%0A%09str%20nextPutAll%3A%20super%20printString%2C%20%27%20%28%27.%0A%09self%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20str%20nextPutAll%3A%20each%20printString%5D%0A%09%09separatedBy%3A%20%5Bstr%20nextPutAll%3A%20%27%20%27%5D.%0A%09str%20nextPutAll%3A%20%27%29%27.%0A%09%5Estr%20contents'),
  6206. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  6207. referencedClasses: []
  6208. }),
  6209. smalltalk.Array);
  6210. smalltalk.addMethod(
  6211. unescape('_reversed'),
  6212. smalltalk.method({
  6213. selector: unescape('reversed'),
  6214. category: 'converting',
  6215. fn: function (){
  6216. var self=this;
  6217. return self._copy().reverse();
  6218. return self;},
  6219. args: [],
  6220. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  6221. messageSends: [],
  6222. referencedClasses: []
  6223. }),
  6224. smalltalk.Array);
  6225. smalltalk.addMethod(
  6226. unescape('__eq'),
  6227. smalltalk.method({
  6228. selector: unescape('%3D'),
  6229. category: 'comparing',
  6230. fn: function (aCollection){
  6231. var self=this;
  6232. try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6233. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));})]);
  6234. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  6235. return self;
  6236. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6237. args: ["aCollection"],
  6238. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
  6239. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  6240. referencedClasses: []
  6241. }),
  6242. smalltalk.Array);
  6243. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel');
  6244. smalltalk.addMethod(
  6245. unescape('_compile_'),
  6246. smalltalk.method({
  6247. selector: unescape('compile%3A'),
  6248. category: 'evaluating',
  6249. fn: function (aString){
  6250. var self=this;
  6251. return self.compile(aString);
  6252. return self;},
  6253. args: ["aString"],
  6254. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  6255. messageSends: [],
  6256. referencedClasses: []
  6257. }),
  6258. smalltalk.RegularExpression);
  6259. smalltalk.addMethod(
  6260. unescape('_exec_'),
  6261. smalltalk.method({
  6262. selector: unescape('exec%3A'),
  6263. category: 'evaluating',
  6264. fn: function (aString){
  6265. var self=this;
  6266. return self.exec(aString) || nil;
  6267. return self;},
  6268. args: ["aString"],
  6269. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  6270. messageSends: [],
  6271. referencedClasses: []
  6272. }),
  6273. smalltalk.RegularExpression);
  6274. smalltalk.addMethod(
  6275. unescape('_test_'),
  6276. smalltalk.method({
  6277. selector: unescape('test%3A'),
  6278. category: 'evaluating',
  6279. fn: function (aString){
  6280. var self=this;
  6281. return self.test(aString);
  6282. return self;},
  6283. args: ["aString"],
  6284. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  6285. messageSends: [],
  6286. referencedClasses: []
  6287. }),
  6288. smalltalk.RegularExpression);
  6289. smalltalk.addMethod(
  6290. unescape('_fromString_flag_'),
  6291. smalltalk.method({
  6292. selector: unescape('fromString%3Aflag%3A'),
  6293. category: 'instance creation',
  6294. fn: function (aString, anotherString){
  6295. var self=this;
  6296. return new RegExp(aString, anotherString);
  6297. return self;},
  6298. args: ["aString", "anotherString"],
  6299. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  6300. messageSends: [],
  6301. referencedClasses: []
  6302. }),
  6303. smalltalk.RegularExpression.klass);
  6304. smalltalk.addMethod(
  6305. unescape('_fromString_'),
  6306. smalltalk.method({
  6307. selector: unescape('fromString%3A'),
  6308. category: 'instance creation',
  6309. fn: function (aString){
  6310. var self=this;
  6311. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  6312. return self;},
  6313. args: ["aString"],
  6314. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  6315. messageSends: ["fromString:flag:"],
  6316. referencedClasses: []
  6317. }),
  6318. smalltalk.RegularExpression.klass);
  6319. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel');
  6320. smalltalk.addMethod(
  6321. unescape('_messageText'),
  6322. smalltalk.method({
  6323. selector: unescape('messageText'),
  6324. category: 'accessing',
  6325. fn: function (){
  6326. var self=this;
  6327. return self['@messageText'];
  6328. return self;},
  6329. args: [],
  6330. source: unescape('messageText%0A%09%5EmessageText'),
  6331. messageSends: [],
  6332. referencedClasses: []
  6333. }),
  6334. smalltalk.Error);
  6335. smalltalk.addMethod(
  6336. unescape('_messageText_'),
  6337. smalltalk.method({
  6338. selector: unescape('messageText%3A'),
  6339. category: 'accessing',
  6340. fn: function (aString){
  6341. var self=this;
  6342. self['@messageText']=aString;
  6343. return self;},
  6344. args: ["aString"],
  6345. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  6346. messageSends: [],
  6347. referencedClasses: []
  6348. }),
  6349. smalltalk.Error);
  6350. smalltalk.addMethod(
  6351. unescape('_signal'),
  6352. smalltalk.method({
  6353. selector: unescape('signal'),
  6354. category: 'signaling',
  6355. fn: function (){
  6356. var self=this;
  6357. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  6358. return self;},
  6359. args: [],
  6360. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  6361. messageSends: [],
  6362. referencedClasses: []
  6363. }),
  6364. smalltalk.Error);
  6365. smalltalk.addMethod(
  6366. unescape('_context'),
  6367. smalltalk.method({
  6368. selector: unescape('context'),
  6369. category: 'accessing',
  6370. fn: function (){
  6371. var self=this;
  6372. return self.context;
  6373. return self;},
  6374. args: [],
  6375. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  6376. messageSends: [],
  6377. referencedClasses: []
  6378. }),
  6379. smalltalk.Error);
  6380. smalltalk.addMethod(
  6381. unescape('_signal_'),
  6382. smalltalk.method({
  6383. selector: unescape('signal%3A'),
  6384. category: 'instance creation',
  6385. fn: function (aString){
  6386. var self=this;
  6387. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  6388. return self;},
  6389. args: ["aString"],
  6390. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  6391. messageSends: ["messageText:", "signal", "new"],
  6392. referencedClasses: []
  6393. }),
  6394. smalltalk.Error.klass);
  6395. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel');
  6396. smalltalk.addMethod(
  6397. unescape('_receiver'),
  6398. smalltalk.method({
  6399. selector: unescape('receiver'),
  6400. category: 'accessing',
  6401. fn: function (){
  6402. var self=this;
  6403. return self.receiver;
  6404. return self;},
  6405. args: [],
  6406. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  6407. messageSends: [],
  6408. referencedClasses: []
  6409. }),
  6410. smalltalk.MethodContext);
  6411. smalltalk.addMethod(
  6412. unescape('_selector'),
  6413. smalltalk.method({
  6414. selector: unescape('selector'),
  6415. category: 'accessing',
  6416. fn: function (){
  6417. var self=this;
  6418. return smalltalk.convertSelector(self.selector);
  6419. return self;},
  6420. args: [],
  6421. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  6422. messageSends: [],
  6423. referencedClasses: []
  6424. }),
  6425. smalltalk.MethodContext);
  6426. smalltalk.addMethod(
  6427. unescape('_home'),
  6428. smalltalk.method({
  6429. selector: unescape('home'),
  6430. category: 'accessing',
  6431. fn: function (){
  6432. var self=this;
  6433. return self.homeContext;
  6434. return self;},
  6435. args: [],
  6436. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  6437. messageSends: [],
  6438. referencedClasses: []
  6439. }),
  6440. smalltalk.MethodContext);
  6441. smalltalk.addMethod(
  6442. unescape('_temps'),
  6443. smalltalk.method({
  6444. selector: unescape('temps'),
  6445. category: 'accessing',
  6446. fn: function (){
  6447. var self=this;
  6448. return self.temps;
  6449. return self;},
  6450. args: [],
  6451. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  6452. messageSends: [],
  6453. referencedClasses: []
  6454. }),
  6455. smalltalk.MethodContext);
  6456. smalltalk.addMethod(
  6457. unescape('_printString'),
  6458. smalltalk.method({
  6459. selector: unescape('printString'),
  6460. category: 'accessing',
  6461. fn: function (){
  6462. var self=this;
  6463. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  6464. return self;},
  6465. args: [],
  6466. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  6467. messageSends: [unescape("%2C"), "printString", "asString"],
  6468. referencedClasses: []
  6469. }),
  6470. smalltalk.MethodContext);
  6471. smalltalk.addMethod(
  6472. unescape('_asString'),
  6473. smalltalk.method({
  6474. selector: unescape('asString'),
  6475. category: 'accessing',
  6476. fn: function (){
  6477. var self=this;
  6478. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(self, "_selector", [])]);
  6479. return self;},
  6480. args: [],
  6481. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  6482. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  6483. referencedClasses: []
  6484. }),
  6485. smalltalk.MethodContext);
  6486. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel');
  6487. smalltalk.addMethod(
  6488. unescape('__eq'),
  6489. smalltalk.method({
  6490. selector: unescape('%3D'),
  6491. category: 'comparing',
  6492. fn: function (anAssociation){
  6493. var self=this;
  6494. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
  6495. return self;},
  6496. args: ["anAssociation"],
  6497. source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
  6498. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  6499. referencedClasses: []
  6500. }),
  6501. smalltalk.Association);
  6502. smalltalk.addMethod(
  6503. unescape('_key_'),
  6504. smalltalk.method({
  6505. selector: unescape('key%3A'),
  6506. category: 'accessing',
  6507. fn: function (aKey){
  6508. var self=this;
  6509. self['@key']=aKey;
  6510. return self;},
  6511. args: ["aKey"],
  6512. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  6513. messageSends: [],
  6514. referencedClasses: []
  6515. }),
  6516. smalltalk.Association);
  6517. smalltalk.addMethod(
  6518. unescape('_key'),
  6519. smalltalk.method({
  6520. selector: unescape('key'),
  6521. category: 'accessing',
  6522. fn: function (){
  6523. var self=this;
  6524. return self['@key'];
  6525. return self;},
  6526. args: [],
  6527. source: unescape('key%0A%09%5Ekey'),
  6528. messageSends: [],
  6529. referencedClasses: []
  6530. }),
  6531. smalltalk.Association);
  6532. smalltalk.addMethod(
  6533. unescape('_value_'),
  6534. smalltalk.method({
  6535. selector: unescape('value%3A'),
  6536. category: 'accessing',
  6537. fn: function (aValue){
  6538. var self=this;
  6539. self['@value']=aValue;
  6540. return self;},
  6541. args: ["aValue"],
  6542. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  6543. messageSends: [],
  6544. referencedClasses: []
  6545. }),
  6546. smalltalk.Association);
  6547. smalltalk.addMethod(
  6548. unescape('_value'),
  6549. smalltalk.method({
  6550. selector: unescape('value'),
  6551. category: 'accessing',
  6552. fn: function (){
  6553. var self=this;
  6554. return self['@value'];
  6555. return self;},
  6556. args: [],
  6557. source: unescape('value%0A%09%5Evalue'),
  6558. messageSends: [],
  6559. referencedClasses: []
  6560. }),
  6561. smalltalk.Association);
  6562. smalltalk.addMethod(
  6563. unescape('_key_value_'),
  6564. smalltalk.method({
  6565. selector: unescape('key%3Avalue%3A'),
  6566. category: 'instance creation',
  6567. fn: function (aKey, aValue){
  6568. var self=this;
  6569. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6570. return self;},
  6571. args: ["aKey", "aValue"],
  6572. source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
  6573. messageSends: ["key:", "value:", "yourself", "new"],
  6574. referencedClasses: []
  6575. }),
  6576. smalltalk.Association.klass);
  6577. smalltalk.addClass('Dictionary', smalltalk.Collection, ['keys'], 'Kernel');
  6578. smalltalk.addMethod(
  6579. unescape('__eq'),
  6580. smalltalk.method({
  6581. selector: unescape('%3D'),
  6582. category: 'comparing',
  6583. fn: function (aDictionary){
  6584. var self=this;
  6585. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aDictionary, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6586. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aDictionary, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6587. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aDictionary, "_associations", [])])}})})();
  6588. return self;
  6589. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6590. args: ["aDictionary"],
  6591. source: unescape('%3D%20aDictionary%0A%09self%20class%20%3D%20aDictionary%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aDictionary%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aDictionary%20associations'),
  6592. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  6593. referencedClasses: []
  6594. }),
  6595. smalltalk.Dictionary);
  6596. smalltalk.addMethod(
  6597. unescape('_shallowCopy'),
  6598. smalltalk.method({
  6599. selector: unescape('shallowCopy'),
  6600. category: 'copying',
  6601. fn: function (){
  6602. var self=this;
  6603. var copy=nil;
  6604. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6605. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6606. return copy;
  6607. return self;},
  6608. args: [],
  6609. source: unescape('shallowCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%5D.%0A%09%5Ecopy'),
  6610. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  6611. referencedClasses: []
  6612. }),
  6613. smalltalk.Dictionary);
  6614. smalltalk.addMethod(
  6615. unescape('_initialize'),
  6616. smalltalk.method({
  6617. selector: unescape('initialize'),
  6618. category: 'initialization',
  6619. fn: function (){
  6620. var self=this;
  6621. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  6622. self['@keys']=[];
  6623. return self;},
  6624. args: [],
  6625. source: unescape('initialize%0A%20%20%20%20%09super%20initialize.%0A%20%20%20%20%09keys%20%3A%3D%20%23%28%29'),
  6626. messageSends: ["initialize"],
  6627. referencedClasses: []
  6628. }),
  6629. smalltalk.Dictionary);
  6630. smalltalk.addMethod(
  6631. unescape('_size'),
  6632. smalltalk.method({
  6633. selector: unescape('size'),
  6634. category: 'accessing',
  6635. fn: function (){
  6636. var self=this;
  6637. return smalltalk.send(self['@keys'], "_size", []);
  6638. return self;},
  6639. args: [],
  6640. source: unescape('size%0A%09%5Ekeys%20size'),
  6641. messageSends: ["size"],
  6642. referencedClasses: []
  6643. }),
  6644. smalltalk.Dictionary);
  6645. smalltalk.addMethod(
  6646. unescape('_associations'),
  6647. smalltalk.method({
  6648. selector: unescape('associations'),
  6649. category: 'accessing',
  6650. fn: function (){
  6651. var self=this;
  6652. var associations=nil;
  6653. associations=[];
  6654. smalltalk.send(self['@keys'], "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
  6655. return associations;
  6656. return self;},
  6657. args: [],
  6658. source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09keys%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20associations%20add%3A%20%28Association%20key%3A%20each%20value%3A%20%28self%20at%3A%20each%29%29%5D.%0A%09%5Eassociations'),
  6659. messageSends: ["do:", "add:", "key:value:", "at:"],
  6660. referencedClasses: [smalltalk.Association]
  6661. }),
  6662. smalltalk.Dictionary);
  6663. smalltalk.addMethod(
  6664. unescape('_keys'),
  6665. smalltalk.method({
  6666. selector: unescape('keys'),
  6667. category: 'accessing',
  6668. fn: function (){
  6669. var self=this;
  6670. return smalltalk.send(self['@keys'], "_copy", []);
  6671. return self;},
  6672. args: [],
  6673. source: unescape('keys%0A%09%5Ekeys%20copy'),
  6674. messageSends: ["copy"],
  6675. referencedClasses: []
  6676. }),
  6677. smalltalk.Dictionary);
  6678. smalltalk.addMethod(
  6679. unescape('_values'),
  6680. smalltalk.method({
  6681. selector: unescape('values'),
  6682. category: 'accessing',
  6683. fn: function (){
  6684. var self=this;
  6685. return smalltalk.send(self['@keys'], "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  6686. return self;},
  6687. args: [],
  6688. source: unescape('values%0A%20%20%20%20%09%5Ekeys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  6689. messageSends: ["collect:", "at:"],
  6690. referencedClasses: []
  6691. }),
  6692. smalltalk.Dictionary);
  6693. smalltalk.addMethod(
  6694. unescape('_at_put_'),
  6695. smalltalk.method({
  6696. selector: unescape('at%3Aput%3A'),
  6697. category: 'accessing',
  6698. fn: function (aKey, aValue){
  6699. var self=this;
  6700. ((($receiver = smalltalk.send(self['@keys'], "_includes_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@keys'], "_add_", [aKey]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@keys'], "_add_", [aKey]);})]));
  6701. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  6702. return self;},
  6703. args: ["aKey", "aValue"],
  6704. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%28keys%20includes%3A%20aKey%29%20ifFalse%3A%20%5Bkeys%20add%3A%20aKey%5D.%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  6705. messageSends: ["ifFalse:", "includes:", "add:", "basicAt:put:"],
  6706. referencedClasses: []
  6707. }),
  6708. smalltalk.Dictionary);
  6709. smalltalk.addMethod(
  6710. unescape('_at_ifAbsent_'),
  6711. smalltalk.method({
  6712. selector: unescape('at%3AifAbsent%3A'),
  6713. category: 'accessing',
  6714. fn: function (aKey, aBlock){
  6715. var self=this;
  6716. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_keys", []), "_includes_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  6717. return self;},
  6718. args: ["aKey", "aBlock"],
  6719. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20keys%20includes%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
  6720. messageSends: ["ifTrue:ifFalse:", "includes:", "keys", "basicAt:"],
  6721. referencedClasses: []
  6722. }),
  6723. smalltalk.Dictionary);
  6724. smalltalk.addMethod(
  6725. unescape('_at_ifAbsentPut_'),
  6726. smalltalk.method({
  6727. selector: unescape('at%3AifAbsentPut%3A'),
  6728. category: 'accessing',
  6729. fn: function (aKey, aBlock){
  6730. var self=this;
  6731. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  6732. return self;},
  6733. args: ["aKey", "aBlock"],
  6734. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%20%20%20%20%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%20%20%20%20%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  6735. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  6736. referencedClasses: []
  6737. }),
  6738. smalltalk.Dictionary);
  6739. smalltalk.addMethod(
  6740. unescape('_at_ifPresent_'),
  6741. smalltalk.method({
  6742. selector: unescape('at%3AifPresent%3A'),
  6743. category: 'accessing',
  6744. fn: function (aKey, aBlock){
  6745. var self=this;
  6746. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  6747. return self;},
  6748. args: ["aKey", "aBlock"],
  6749. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  6750. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  6751. referencedClasses: []
  6752. }),
  6753. smalltalk.Dictionary);
  6754. smalltalk.addMethod(
  6755. unescape('_at_ifPresent_ifAbsent_'),
  6756. smalltalk.method({
  6757. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  6758. category: 'accessing',
  6759. fn: function (aKey, aBlock, anotherBlock){
  6760. var self=this;
  6761. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  6762. return self;},
  6763. args: ["aKey", "aBlock", "anotherBlock"],
  6764. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%20ifAbsent%3A%20anotherBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%0A%09%20%20%20%20ifNil%3A%20anotherBlock%0A%09%20%20%20%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  6765. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  6766. referencedClasses: []
  6767. }),
  6768. smalltalk.Dictionary);
  6769. smalltalk.addMethod(
  6770. unescape('_add_'),
  6771. smalltalk.method({
  6772. selector: unescape('add%3A'),
  6773. category: 'adding/removing',
  6774. fn: function (anAssociation){
  6775. var self=this;
  6776. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  6777. return self;},
  6778. args: ["anAssociation"],
  6779. source: unescape('add%3A%20anAssociation%0A%20%20%20%20%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  6780. messageSends: ["at:put:", "key", "value"],
  6781. referencedClasses: []
  6782. }),
  6783. smalltalk.Dictionary);
  6784. smalltalk.addMethod(
  6785. unescape('_addAll_'),
  6786. smalltalk.method({
  6787. selector: unescape('addAll%3A'),
  6788. category: 'adding/removing',
  6789. fn: function (aDictionary){
  6790. var self=this;
  6791. smalltalk.send(self, "_addAll_", [smalltalk.send(aDictionary, "_associations", [])], smalltalk.Collection);
  6792. return aDictionary;
  6793. return self;},
  6794. args: ["aDictionary"],
  6795. source: unescape('addAll%3A%20aDictionary%0A%20%20%20%20%09super%20addAll%3A%20aDictionary%20associations.%0A%20%20%20%20%09%5EaDictionary'),
  6796. messageSends: ["addAll:", "associations"],
  6797. referencedClasses: []
  6798. }),
  6799. smalltalk.Dictionary);
  6800. smalltalk.addMethod(
  6801. unescape('__comma'),
  6802. smalltalk.method({
  6803. selector: unescape('%2C'),
  6804. category: 'copying',
  6805. fn: function (aCollection){
  6806. var self=this;
  6807. smalltalk.send(self, "_shouldNotImplement", []);
  6808. return self;},
  6809. args: ["aCollection"],
  6810. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  6811. messageSends: ["shouldNotImplement"],
  6812. referencedClasses: []
  6813. }),
  6814. smalltalk.Dictionary);
  6815. smalltalk.addMethod(
  6816. unescape('_copyFrom_to_'),
  6817. smalltalk.method({
  6818. selector: unescape('copyFrom%3Ato%3A'),
  6819. category: 'copying',
  6820. fn: function (anIndex, anotherIndex){
  6821. var self=this;
  6822. smalltalk.send(self, "_shouldNotImplement", []);
  6823. return self;},
  6824. args: ["anIndex", "anotherIndex"],
  6825. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  6826. messageSends: ["shouldNotImplement"],
  6827. referencedClasses: []
  6828. }),
  6829. smalltalk.Dictionary);
  6830. smalltalk.addMethod(
  6831. unescape('_associationsDo_'),
  6832. smalltalk.method({
  6833. selector: unescape('associationsDo%3A'),
  6834. category: 'enumerating',
  6835. fn: function (aBlock){
  6836. var self=this;
  6837. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  6838. return self;},
  6839. args: ["aBlock"],
  6840. source: unescape('associationsDo%3A%20aBlock%0A%20%20%20%20%09self%20associations%20do%3A%20aBlock'),
  6841. messageSends: ["do:", "associations"],
  6842. referencedClasses: []
  6843. }),
  6844. smalltalk.Dictionary);
  6845. smalltalk.addMethod(
  6846. unescape('_keysAndValuesDo_'),
  6847. smalltalk.method({
  6848. selector: unescape('keysAndValuesDo%3A'),
  6849. category: 'enumerating',
  6850. fn: function (aBlock){
  6851. var self=this;
  6852. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6853. return self;},
  6854. args: ["aBlock"],
  6855. source: unescape('keysAndValuesDo%3A%20aBlock%0A%20%20%20%20%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  6856. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  6857. referencedClasses: []
  6858. }),
  6859. smalltalk.Dictionary);
  6860. smalltalk.addMethod(
  6861. unescape('_do_'),
  6862. smalltalk.method({
  6863. selector: unescape('do%3A'),
  6864. category: 'enumerating',
  6865. fn: function (aBlock){
  6866. var self=this;
  6867. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  6868. return self;},
  6869. args: ["aBlock"],
  6870. source: unescape('do%3A%20aBlock%0A%20%20%20%20%09self%20values%20do%3A%20aBlock'),
  6871. messageSends: ["do:", "values"],
  6872. referencedClasses: []
  6873. }),
  6874. smalltalk.Dictionary);
  6875. smalltalk.addMethod(
  6876. unescape('_select_'),
  6877. smalltalk.method({
  6878. selector: unescape('select%3A'),
  6879. category: 'enumerating',
  6880. fn: function (aBlock){
  6881. var self=this;
  6882. var newDict=nil;
  6883. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6884. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]));})]);
  6885. return newDict;
  6886. return self;},
  6887. args: ["aBlock"],
  6888. source: unescape('select%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%20%20%20%20%09%5EnewDict'),
  6889. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  6890. referencedClasses: []
  6891. }),
  6892. smalltalk.Dictionary);
  6893. smalltalk.addMethod(
  6894. unescape('_collect_'),
  6895. smalltalk.method({
  6896. selector: unescape('collect%3A'),
  6897. category: 'enumerating',
  6898. fn: function (aBlock){
  6899. var self=this;
  6900. var newDict=nil;
  6901. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6902. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  6903. return newDict;
  6904. return self;},
  6905. args: ["aBlock"],
  6906. source: unescape('collect%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%20%20%20%20%09%5EnewDict'),
  6907. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  6908. referencedClasses: []
  6909. }),
  6910. smalltalk.Dictionary);
  6911. smalltalk.addMethod(
  6912. unescape('_detect_ifNone_'),
  6913. smalltalk.method({
  6914. selector: unescape('detect%3AifNone%3A'),
  6915. category: 'enumerating',
  6916. fn: function (aBlock, anotherBlock){
  6917. var self=this;
  6918. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  6919. return self;},
  6920. args: ["aBlock", "anotherBlock"],
  6921. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  6922. messageSends: ["detect:ifNone:", "values"],
  6923. referencedClasses: []
  6924. }),
  6925. smalltalk.Dictionary);
  6926. smalltalk.addMethod(
  6927. unescape('_includes_'),
  6928. smalltalk.method({
  6929. selector: unescape('includes%3A'),
  6930. category: 'enumerating',
  6931. fn: function (anObject){
  6932. var self=this;
  6933. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  6934. return self;},
  6935. args: ["anObject"],
  6936. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  6937. messageSends: ["includes:", "values"],
  6938. referencedClasses: []
  6939. }),
  6940. smalltalk.Dictionary);
  6941. smalltalk.addMethod(
  6942. unescape('_remove_'),
  6943. smalltalk.method({
  6944. selector: unescape('remove%3A'),
  6945. category: 'adding/removing',
  6946. fn: function (aKey){
  6947. var self=this;
  6948. smalltalk.send(self, "_removeKey_", [aKey]);
  6949. return self;},
  6950. args: ["aKey"],
  6951. source: unescape('remove%3A%20aKey%0A%20%20%20%20self%20removeKey%3A%20aKey'),
  6952. messageSends: ["removeKey:"],
  6953. referencedClasses: []
  6954. }),
  6955. smalltalk.Dictionary);
  6956. smalltalk.addMethod(
  6957. unescape('_removeKey_'),
  6958. smalltalk.method({
  6959. selector: unescape('removeKey%3A'),
  6960. category: 'adding/removing',
  6961. fn: function (aKey){
  6962. var self=this;
  6963. smalltalk.send(self['@keys'], "_remove_", [aKey]);
  6964. return self;},
  6965. args: ["aKey"],
  6966. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20keys%20remove%3A%20aKey'),
  6967. messageSends: ["remove:"],
  6968. referencedClasses: []
  6969. }),
  6970. smalltalk.Dictionary);
  6971. smalltalk.addMethod(
  6972. unescape('_at_'),
  6973. smalltalk.method({
  6974. selector: unescape('at%3A'),
  6975. category: 'accessing',
  6976. fn: function (aKey){
  6977. var self=this;
  6978. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  6979. return self;},
  6980. args: ["aKey"],
  6981. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  6982. messageSends: ["at:ifAbsent:", "errorNotFound"],
  6983. referencedClasses: []
  6984. }),
  6985. smalltalk.Dictionary);
  6986. smalltalk.addMethod(
  6987. unescape('_asJSONObject'),
  6988. smalltalk.method({
  6989. selector: unescape('asJSONObject'),
  6990. category: 'converting',
  6991. fn: function (){
  6992. var self=this;
  6993. var object=nil;
  6994. object=smalltalk.send((smalltalk.Object || Object), "_new", []);
  6995. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(object, "_basicAt_put_", [key, smalltalk.send(value, "_asJSONObject", [])]);})]);
  6996. return object;
  6997. return self;},
  6998. args: [],
  6999. source: unescape('asJSONObject%0A%09%7C%20object%20%7C%0A%09object%20%3A%3D%20Object%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09object%20basicAt%3A%20key%20put%3A%20value%20asJSONObject%5D.%0A%09%5Eobject'),
  7000. messageSends: ["new", "keysAndValuesDo:", "basicAt:put:", "asJSONObject"],
  7001. referencedClasses: [smalltalk.Object]
  7002. }),
  7003. smalltalk.Dictionary);
  7004. smalltalk.addMethod(
  7005. unescape('_printString'),
  7006. smalltalk.method({
  7007. selector: unescape('printString'),
  7008. category: 'printing',
  7009. fn: function (){
  7010. var self=this;
  7011. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
  7012. return self;},
  7013. args: [],
  7014. source: unescape('printString%0A%09%5E%20String%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09nextPutAll%3A%20super%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09nextPutAll%3A%20%27%28%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09self%20associations%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09aStream%20nextPutAll%3A%20%27%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D'),
  7015. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  7016. referencedClasses: [smalltalk.String]
  7017. }),
  7018. smalltalk.Dictionary);
  7019. smalltalk.addMethod(
  7020. unescape('_fromPairs_'),
  7021. smalltalk.method({
  7022. selector: unescape('fromPairs%3A'),
  7023. category: 'instance creation',
  7024. fn: function (aCollection){
  7025. var self=this;
  7026. var dict=nil;
  7027. dict=smalltalk.send(self, "_new", []);
  7028. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  7029. return dict;
  7030. return self;},
  7031. args: ["aCollection"],
  7032. source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
  7033. messageSends: ["new", "do:", "add:"],
  7034. referencedClasses: []
  7035. }),
  7036. smalltalk.Dictionary.klass);
  7037. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel');
  7038. smalltalk.addMethod(
  7039. unescape('_superclass_subclass_'),
  7040. smalltalk.method({
  7041. selector: unescape('superclass%3Asubclass%3A'),
  7042. category: 'class creation',
  7043. fn: function (aClass, aString){
  7044. var self=this;
  7045. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  7046. return self;},
  7047. args: ["aClass", "aString"],
  7048. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
  7049. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  7050. referencedClasses: []
  7051. }),
  7052. smalltalk.ClassBuilder);
  7053. smalltalk.addMethod(
  7054. unescape('_class_instanceVariableNames_'),
  7055. smalltalk.method({
  7056. selector: unescape('class%3AinstanceVariableNames%3A'),
  7057. category: 'class creation',
  7058. fn: function (aClass, aString){
  7059. var self=this;
  7060. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]));
  7061. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  7062. smalltalk.send(self, "_setupClass_", [aClass]);
  7063. return self;},
  7064. args: ["aClass", "aString"],
  7065. source: unescape('class%3A%20aClass%20instanceVariableNames%3A%20aString%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20error%3A%20aClass%20name%2C%20%27%20is%20not%20a%20metaclass%27%5D.%0A%09aClass%20basicAt%3A%20%27iVarNames%27%20put%3A%20%28self%20instanceVariableNamesFor%3A%20aString%29.%0A%09self%20setupClass%3A%20aClass'),
  7066. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  7067. referencedClasses: []
  7068. }),
  7069. smalltalk.ClassBuilder);
  7070. smalltalk.addMethod(
  7071. unescape('_instanceVariableNamesFor_'),
  7072. smalltalk.method({
  7073. selector: unescape('instanceVariableNamesFor%3A'),
  7074. category: 'private',
  7075. fn: function (aString){
  7076. var self=this;
  7077. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  7078. return self;},
  7079. args: ["aString"],
  7080. source: unescape('instanceVariableNamesFor%3A%20aString%0A%09%5E%28aString%20tokenize%3A%20%27%20%27%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20isEmpty%5D'),
  7081. messageSends: ["reject:", "tokenize:", "isEmpty"],
  7082. referencedClasses: []
  7083. }),
  7084. smalltalk.ClassBuilder);
  7085. smalltalk.addMethod(
  7086. unescape('_addSubclassOf_named_instanceVariableNames_'),
  7087. smalltalk.method({
  7088. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  7089. category: 'private',
  7090. fn: function (aClass, aString, aCollection){
  7091. var self=this;
  7092. smalltalk.addClass(aString, aClass, aCollection);
  7093. return smalltalk[aString];
  7094. return self;},
  7095. args: ["aClass", "aString", "aCollection"],
  7096. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  7097. messageSends: [],
  7098. referencedClasses: []
  7099. }),
  7100. smalltalk.ClassBuilder);
  7101. smalltalk.addMethod(
  7102. unescape('_setupClass_'),
  7103. smalltalk.method({
  7104. selector: unescape('setupClass%3A'),
  7105. category: 'private',
  7106. fn: function (aClass){
  7107. var self=this;
  7108. smalltalk.init(aClass);;
  7109. return self;},
  7110. args: ["aClass"],
  7111. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  7112. messageSends: [],
  7113. referencedClasses: []
  7114. }),
  7115. smalltalk.ClassBuilder);
  7116. smalltalk.addMethod(
  7117. unescape('_superclass_subclass_instanceVariableNames_module_'),
  7118. smalltalk.method({
  7119. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Amodule%3A'),
  7120. category: 'class creation',
  7121. fn: function (aClass, aString, aString2, aString3){
  7122. var self=this;
  7123. var newClass=nil;
  7124. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_module_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]);
  7125. smalltalk.send(self, "_setupClass_", [newClass]);
  7126. return self;},
  7127. args: ["aClass", "aString", "aString2", "aString3"],
  7128. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20module%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09module%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass'),
  7129. messageSends: ["addSubclassOf:named:instanceVariableNames:module:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  7130. referencedClasses: []
  7131. }),
  7132. smalltalk.ClassBuilder);
  7133. smalltalk.addMethod(
  7134. unescape('_addSubclassOf_named_instanceVariableNames_module_'),
  7135. smalltalk.method({
  7136. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Amodule%3A'),
  7137. category: 'private',
  7138. fn: function (aClass, aString, aCollection, moduleName){
  7139. var self=this;
  7140. smalltalk.addClass(aString, aClass, aCollection, moduleName);
  7141. return smalltalk[aString];
  7142. return self;},
  7143. args: ["aClass", "aString", "aCollection", "moduleName"],
  7144. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20module%3A%20moduleName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20moduleName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  7145. messageSends: [],
  7146. referencedClasses: []
  7147. }),
  7148. smalltalk.ClassBuilder);
  7149. smalltalk.addMethod(
  7150. unescape('_superclass_subclass_instanceVariableNames_package_'),
  7151. smalltalk.method({
  7152. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  7153. category: 'class creation',
  7154. fn: function (aClass, aString, aString2, aString3){
  7155. var self=this;
  7156. var newClass=nil;
  7157. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]);
  7158. smalltalk.send(self, "_setupClass_", [newClass]);
  7159. return self;},
  7160. args: ["aClass", "aString", "aString2", "aString3"],
  7161. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09package%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass'),
  7162. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  7163. referencedClasses: []
  7164. }),
  7165. smalltalk.ClassBuilder);
  7166. smalltalk.addMethod(
  7167. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  7168. smalltalk.method({
  7169. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  7170. category: 'private',
  7171. fn: function (aClass, aString, aCollection, packageName){
  7172. var self=this;
  7173. smalltalk.addClass(aString, aClass, aCollection, packageName);
  7174. return smalltalk[aString];
  7175. return self;},
  7176. args: ["aClass", "aString", "aCollection", "packageName"],
  7177. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  7178. messageSends: [],
  7179. referencedClasses: []
  7180. }),
  7181. smalltalk.ClassBuilder);
  7182. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel');
  7183. smalltalk.addMethod(
  7184. unescape('_initialize'),
  7185. smalltalk.method({
  7186. selector: unescape('initialize'),
  7187. category: 'initialization',
  7188. fn: function (){
  7189. var self=this;
  7190. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7191. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7192. return self;},
  7193. args: [],
  7194. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7195. messageSends: ["initialize", "new"],
  7196. referencedClasses: [smalltalk.ChunkParser]
  7197. }),
  7198. smalltalk.ClassCategoryReader);
  7199. smalltalk.addMethod(
  7200. unescape('_class_category_'),
  7201. smalltalk.method({
  7202. selector: unescape('class%3Acategory%3A'),
  7203. category: 'accessing',
  7204. fn: function (aClass, aString){
  7205. var self=this;
  7206. self['@class']=aClass;
  7207. self['@category']=aString;
  7208. return self;},
  7209. args: ["aClass", "aString"],
  7210. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  7211. messageSends: [],
  7212. referencedClasses: []
  7213. }),
  7214. smalltalk.ClassCategoryReader);
  7215. smalltalk.addMethod(
  7216. unescape('_scanFrom_'),
  7217. smalltalk.method({
  7218. selector: unescape('scanFrom%3A'),
  7219. category: 'fileIn',
  7220. fn: function (aChunkParser){
  7221. var self=this;
  7222. var chunk=nil;
  7223. (function(){while(!(function(){chunk=smalltalk.send(aChunkParser, "_nextChunk", []);return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  7224. return self;},
  7225. args: ["aChunkParser"],
  7226. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
  7227. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  7228. referencedClasses: []
  7229. }),
  7230. smalltalk.ClassCategoryReader);
  7231. smalltalk.addMethod(
  7232. unescape('_compileMethod_'),
  7233. smalltalk.method({
  7234. selector: unescape('compileMethod%3A'),
  7235. category: 'private',
  7236. fn: function (aString){
  7237. var self=this;
  7238. var method=nil;
  7239. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]);
  7240. smalltalk.send(method, "_category_", [self['@category']]);
  7241. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  7242. return self;},
  7243. args: ["aString"],
  7244. source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method'),
  7245. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  7246. referencedClasses: [smalltalk.Compiler]
  7247. }),
  7248. smalltalk.ClassCategoryReader);
  7249. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel');
  7250. smalltalk.addMethod(
  7251. unescape('_collection'),
  7252. smalltalk.method({
  7253. selector: unescape('collection'),
  7254. category: 'accessing',
  7255. fn: function (){
  7256. var self=this;
  7257. return self['@collection'];
  7258. return self;},
  7259. args: [],
  7260. source: unescape('collection%0A%09%5Ecollection'),
  7261. messageSends: [],
  7262. referencedClasses: []
  7263. }),
  7264. smalltalk.Stream);
  7265. smalltalk.addMethod(
  7266. unescape('_setCollection_'),
  7267. smalltalk.method({
  7268. selector: unescape('setCollection%3A'),
  7269. category: 'accessing',
  7270. fn: function (aCollection){
  7271. var self=this;
  7272. self['@collection']=aCollection;
  7273. return self;},
  7274. args: ["aCollection"],
  7275. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  7276. messageSends: [],
  7277. referencedClasses: []
  7278. }),
  7279. smalltalk.Stream);
  7280. smalltalk.addMethod(
  7281. unescape('_position'),
  7282. smalltalk.method({
  7283. selector: unescape('position'),
  7284. category: 'accessing',
  7285. fn: function (){
  7286. var self=this;
  7287. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return self['@position']=(0);})() : $receiver;
  7288. return self;},
  7289. args: [],
  7290. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  7291. messageSends: ["ifNil:"],
  7292. referencedClasses: []
  7293. }),
  7294. smalltalk.Stream);
  7295. smalltalk.addMethod(
  7296. unescape('_position_'),
  7297. smalltalk.method({
  7298. selector: unescape('position%3A'),
  7299. category: 'accessing',
  7300. fn: function (anInteger){
  7301. var self=this;
  7302. self['@position']=anInteger;
  7303. return self;},
  7304. args: ["anInteger"],
  7305. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  7306. messageSends: [],
  7307. referencedClasses: []
  7308. }),
  7309. smalltalk.Stream);
  7310. smalltalk.addMethod(
  7311. unescape('_streamSize'),
  7312. smalltalk.method({
  7313. selector: unescape('streamSize'),
  7314. category: 'accessing',
  7315. fn: function (){
  7316. var self=this;
  7317. return self['@streamSize'];
  7318. return self;},
  7319. args: [],
  7320. source: unescape('streamSize%0A%09%5EstreamSize'),
  7321. messageSends: [],
  7322. referencedClasses: []
  7323. }),
  7324. smalltalk.Stream);
  7325. smalltalk.addMethod(
  7326. unescape('_setStreamSize_'),
  7327. smalltalk.method({
  7328. selector: unescape('setStreamSize%3A'),
  7329. category: 'accessing',
  7330. fn: function (anInteger){
  7331. var self=this;
  7332. self['@streamSize']=anInteger;
  7333. return self;},
  7334. args: ["anInteger"],
  7335. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  7336. messageSends: [],
  7337. referencedClasses: []
  7338. }),
  7339. smalltalk.Stream);
  7340. smalltalk.addMethod(
  7341. unescape('_contents'),
  7342. smalltalk.method({
  7343. selector: unescape('contents'),
  7344. category: 'accessing',
  7345. fn: function (){
  7346. var self=this;
  7347. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  7348. return self;},
  7349. args: [],
  7350. source: unescape('contents%0A%09%5Eself%20collection%0A%09%20%20%20%20copyFrom%3A%201%20%0A%09%20%20%20%20to%3A%20self%20streamSize'),
  7351. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  7352. referencedClasses: []
  7353. }),
  7354. smalltalk.Stream);
  7355. smalltalk.addMethod(
  7356. unescape('_size'),
  7357. smalltalk.method({
  7358. selector: unescape('size'),
  7359. category: 'accessing',
  7360. fn: function (){
  7361. var self=this;
  7362. return smalltalk.send(self, "_streamSize", []);
  7363. return self;},
  7364. args: [],
  7365. source: unescape('size%0A%09%5Eself%20streamSize'),
  7366. messageSends: ["streamSize"],
  7367. referencedClasses: []
  7368. }),
  7369. smalltalk.Stream);
  7370. smalltalk.addMethod(
  7371. unescape('_reset'),
  7372. smalltalk.method({
  7373. selector: unescape('reset'),
  7374. category: 'actions',
  7375. fn: function (){
  7376. var self=this;
  7377. smalltalk.send(self, "_position_", [(0)]);
  7378. return self;},
  7379. args: [],
  7380. source: unescape('reset%0A%09self%20position%3A%200'),
  7381. messageSends: ["position:"],
  7382. referencedClasses: []
  7383. }),
  7384. smalltalk.Stream);
  7385. smalltalk.addMethod(
  7386. unescape('_close'),
  7387. smalltalk.method({
  7388. selector: unescape('close'),
  7389. category: 'actions',
  7390. fn: function (){
  7391. var self=this;
  7392. return self;},
  7393. args: [],
  7394. source: unescape('close'),
  7395. messageSends: [],
  7396. referencedClasses: []
  7397. }),
  7398. smalltalk.Stream);
  7399. smalltalk.addMethod(
  7400. unescape('_flush'),
  7401. smalltalk.method({
  7402. selector: unescape('flush'),
  7403. category: 'actions',
  7404. fn: function (){
  7405. var self=this;
  7406. return self;},
  7407. args: [],
  7408. source: unescape('flush'),
  7409. messageSends: [],
  7410. referencedClasses: []
  7411. }),
  7412. smalltalk.Stream);
  7413. smalltalk.addMethod(
  7414. unescape('_resetContents'),
  7415. smalltalk.method({
  7416. selector: unescape('resetContents'),
  7417. category: 'actions',
  7418. fn: function (){
  7419. var self=this;
  7420. smalltalk.send(self, "_reset", []);
  7421. smalltalk.send(self, "_setStreamSize_", [(0)]);
  7422. return self;},
  7423. args: [],
  7424. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  7425. messageSends: ["reset", "setStreamSize:"],
  7426. referencedClasses: []
  7427. }),
  7428. smalltalk.Stream);
  7429. smalltalk.addMethod(
  7430. unescape('_do_'),
  7431. smalltalk.method({
  7432. selector: unescape('do%3A'),
  7433. category: 'enumerating',
  7434. fn: function (aBlock){
  7435. var self=this;
  7436. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  7437. return self;},
  7438. args: ["aBlock"],
  7439. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  7440. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  7441. referencedClasses: []
  7442. }),
  7443. smalltalk.Stream);
  7444. smalltalk.addMethod(
  7445. unescape('_setToEnd'),
  7446. smalltalk.method({
  7447. selector: unescape('setToEnd'),
  7448. category: 'positioning',
  7449. fn: function (){
  7450. var self=this;
  7451. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  7452. return self;},
  7453. args: [],
  7454. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  7455. messageSends: ["position:", "size"],
  7456. referencedClasses: []
  7457. }),
  7458. smalltalk.Stream);
  7459. smalltalk.addMethod(
  7460. unescape('_skip_'),
  7461. smalltalk.method({
  7462. selector: unescape('skip%3A'),
  7463. category: 'positioning',
  7464. fn: function (anInteger){
  7465. var self=this;
  7466. smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
  7467. return self;},
  7468. args: ["anInteger"],
  7469. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  7470. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  7471. referencedClasses: []
  7472. }),
  7473. smalltalk.Stream);
  7474. smalltalk.addMethod(
  7475. unescape('_next'),
  7476. smalltalk.method({
  7477. selector: unescape('next'),
  7478. category: 'reading',
  7479. fn: function (){
  7480. var self=this;
  7481. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7482. return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);
  7483. return self;},
  7484. args: [],
  7485. source: unescape('next%0A%09self%20position%3A%20self%20position%20+%201.%20%0A%09%5Ecollection%20at%3A%20self%20position'),
  7486. messageSends: ["position:", unescape("+"), "position", "at:"],
  7487. referencedClasses: []
  7488. }),
  7489. smalltalk.Stream);
  7490. smalltalk.addMethod(
  7491. unescape('_next_'),
  7492. smalltalk.method({
  7493. selector: unescape('next%3A'),
  7494. category: 'reading',
  7495. fn: function (anInteger){
  7496. var self=this;
  7497. var tempCollection=nil;
  7498. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7499. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]));})]);
  7500. return tempCollection;
  7501. return self;},
  7502. args: ["anInteger"],
  7503. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20add%3A%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  7504. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  7505. referencedClasses: []
  7506. }),
  7507. smalltalk.Stream);
  7508. smalltalk.addMethod(
  7509. unescape('_nextPut_'),
  7510. smalltalk.method({
  7511. selector: unescape('nextPut%3A'),
  7512. category: 'writing',
  7513. fn: function (anObject){
  7514. var self=this;
  7515. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7516. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  7517. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7518. return self;},
  7519. args: ["anObject"],
  7520. source: unescape('nextPut%3A%20anObject%0A%09self%20position%3A%20self%20position%20+%201.%0A%09self%20collection%20at%3A%20self%20position%20put%3A%20anObject.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  7521. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  7522. referencedClasses: []
  7523. }),
  7524. smalltalk.Stream);
  7525. smalltalk.addMethod(
  7526. unescape('_nextPutAll_'),
  7527. smalltalk.method({
  7528. selector: unescape('nextPutAll%3A'),
  7529. category: 'writing',
  7530. fn: function (aCollection){
  7531. var self=this;
  7532. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  7533. return self;},
  7534. args: ["aCollection"],
  7535. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  7536. messageSends: ["do:", "nextPut:"],
  7537. referencedClasses: []
  7538. }),
  7539. smalltalk.Stream);
  7540. smalltalk.addMethod(
  7541. unescape('_peek'),
  7542. smalltalk.method({
  7543. selector: unescape('peek'),
  7544. category: 'reading',
  7545. fn: function (){
  7546. var self=this;
  7547. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
  7548. return self;},
  7549. args: [],
  7550. source: unescape('peek%0A%09%5Eself%20atEnd%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20collection%20at%3A%20self%20position%20+%201%5D'),
  7551. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  7552. referencedClasses: []
  7553. }),
  7554. smalltalk.Stream);
  7555. smalltalk.addMethod(
  7556. unescape('_atEnd'),
  7557. smalltalk.method({
  7558. selector: unescape('atEnd'),
  7559. category: 'testing',
  7560. fn: function (){
  7561. var self=this;
  7562. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  7563. return self;},
  7564. args: [],
  7565. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  7566. messageSends: [unescape("%3D"), "position", "size"],
  7567. referencedClasses: []
  7568. }),
  7569. smalltalk.Stream);
  7570. smalltalk.addMethod(
  7571. unescape('_atStart'),
  7572. smalltalk.method({
  7573. selector: unescape('atStart'),
  7574. category: 'testing',
  7575. fn: function (){
  7576. var self=this;
  7577. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  7578. return self;},
  7579. args: [],
  7580. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  7581. messageSends: [unescape("%3D"), "position"],
  7582. referencedClasses: []
  7583. }),
  7584. smalltalk.Stream);
  7585. smalltalk.addMethod(
  7586. unescape('_isEmpty'),
  7587. smalltalk.method({
  7588. selector: unescape('isEmpty'),
  7589. category: 'testing',
  7590. fn: function (){
  7591. var self=this;
  7592. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  7593. return self;},
  7594. args: [],
  7595. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  7596. messageSends: [unescape("%3D"), "size"],
  7597. referencedClasses: []
  7598. }),
  7599. smalltalk.Stream);
  7600. smalltalk.addMethod(
  7601. unescape('_on_'),
  7602. smalltalk.method({
  7603. selector: unescape('on%3A'),
  7604. category: 'instance creation',
  7605. fn: function (aCollection){
  7606. var self=this;
  7607. return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7608. return self;},
  7609. args: ["aCollection"],
  7610. source: unescape('on%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%20%0A%09%09setCollection%3A%20aCollection%3B%0A%09%09setStreamSize%3A%20aCollection%20size%3B%0A%09%09yourself'),
  7611. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  7612. referencedClasses: []
  7613. }),
  7614. smalltalk.Stream.klass);
  7615. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel');
  7616. smalltalk.addMethod(
  7617. unescape('_next_'),
  7618. smalltalk.method({
  7619. selector: unescape('next%3A'),
  7620. category: 'reading',
  7621. fn: function (anInteger){
  7622. var self=this;
  7623. var tempCollection=nil;
  7624. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7625. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})]));})]);
  7626. return tempCollection;
  7627. return self;},
  7628. args: ["anInteger"],
  7629. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20%3A%3D%20tempCollection%2C%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  7630. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  7631. referencedClasses: []
  7632. }),
  7633. smalltalk.StringStream);
  7634. smalltalk.addMethod(
  7635. unescape('_nextPut_'),
  7636. smalltalk.method({
  7637. selector: unescape('nextPut%3A'),
  7638. category: 'writing',
  7639. fn: function (aString){
  7640. var self=this;
  7641. smalltalk.send(self, "_nextPutAll_", [aString]);
  7642. return self;},
  7643. args: ["aString"],
  7644. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  7645. messageSends: ["nextPutAll:"],
  7646. referencedClasses: []
  7647. }),
  7648. smalltalk.StringStream);
  7649. smalltalk.addMethod(
  7650. unescape('_nextPutAll_'),
  7651. smalltalk.method({
  7652. selector: unescape('nextPutAll%3A'),
  7653. category: 'writing',
  7654. fn: function (aString){
  7655. var self=this;
  7656. smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
  7657. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
  7658. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7659. return self;},
  7660. args: ["aString"],
  7661. source: unescape('nextPutAll%3A%20aString%0A%09self%20setCollection%3A%20%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%201%20to%3A%20self%20position%29%2C%0A%09%20%20%20%20aString%2C%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%20%28self%20position%20+%201%20+%20aString%20size%29%20to%3A%20self%20collection%20size%29.%0A%09self%20position%3A%20self%20position%20+%20aString%20size.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  7662. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  7663. referencedClasses: []
  7664. }),
  7665. smalltalk.StringStream);
  7666. smalltalk.addMethod(
  7667. unescape('_cr'),
  7668. smalltalk.method({
  7669. selector: unescape('cr'),
  7670. category: 'writing',
  7671. fn: function (){
  7672. var self=this;
  7673. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  7674. return self;},
  7675. args: [],
  7676. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  7677. messageSends: ["nextPutAll:", "cr"],
  7678. referencedClasses: [smalltalk.String]
  7679. }),
  7680. smalltalk.StringStream);
  7681. smalltalk.addMethod(
  7682. unescape('_crlf'),
  7683. smalltalk.method({
  7684. selector: unescape('crlf'),
  7685. category: 'writing',
  7686. fn: function (){
  7687. var self=this;
  7688. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  7689. return self;},
  7690. args: [],
  7691. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  7692. messageSends: ["nextPutAll:", "crlf"],
  7693. referencedClasses: [smalltalk.String]
  7694. }),
  7695. smalltalk.StringStream);
  7696. smalltalk.addMethod(
  7697. unescape('_lf'),
  7698. smalltalk.method({
  7699. selector: unescape('lf'),
  7700. category: 'writing',
  7701. fn: function (){
  7702. var self=this;
  7703. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  7704. return self;},
  7705. args: [],
  7706. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  7707. messageSends: ["nextPutAll:", "lf"],
  7708. referencedClasses: [smalltalk.String]
  7709. }),
  7710. smalltalk.StringStream);
  7711. smalltalk.addMethod(
  7712. unescape('_space'),
  7713. smalltalk.method({
  7714. selector: unescape('space'),
  7715. category: 'writing',
  7716. fn: function (){
  7717. var self=this;
  7718. smalltalk.send(self, "_nextPut_", [" "]);
  7719. return self;},
  7720. args: [],
  7721. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  7722. messageSends: ["nextPut:"],
  7723. referencedClasses: []
  7724. }),
  7725. smalltalk.StringStream);
  7726. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel');
  7727. smalltalk.addMethod(
  7728. unescape('_class_'),
  7729. smalltalk.method({
  7730. selector: unescape('class%3A'),
  7731. category: 'accessing',
  7732. fn: function (aClass){
  7733. var self=this;
  7734. self['@class']=aClass;
  7735. return self;},
  7736. args: ["aClass"],
  7737. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  7738. messageSends: [],
  7739. referencedClasses: []
  7740. }),
  7741. smalltalk.ClassCommentReader);
  7742. smalltalk.addMethod(
  7743. unescape('_scanFrom_'),
  7744. smalltalk.method({
  7745. selector: unescape('scanFrom%3A'),
  7746. category: 'fileIn',
  7747. fn: function (aChunkParser){
  7748. var self=this;
  7749. var chunk=nil;
  7750. chunk=smalltalk.send(aChunkParser, "_nextChunk", []);
  7751. ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
  7752. return self;},
  7753. args: ["aChunkParser"],
  7754. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
  7755. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  7756. referencedClasses: []
  7757. }),
  7758. smalltalk.ClassCommentReader);
  7759. smalltalk.addMethod(
  7760. unescape('_initialize'),
  7761. smalltalk.method({
  7762. selector: unescape('initialize'),
  7763. category: 'initialization',
  7764. fn: function (){
  7765. var self=this;
  7766. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7767. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7768. return self;},
  7769. args: [],
  7770. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7771. messageSends: ["initialize", "new"],
  7772. referencedClasses: [smalltalk.ChunkParser]
  7773. }),
  7774. smalltalk.ClassCommentReader);
  7775. smalltalk.addMethod(
  7776. unescape('_setComment_'),
  7777. smalltalk.method({
  7778. selector: unescape('setComment%3A'),
  7779. category: 'private',
  7780. fn: function (aString){
  7781. var self=this;
  7782. smalltalk.send(self['@class'], "_comment_", [aString]);
  7783. return self;},
  7784. args: ["aString"],
  7785. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  7786. messageSends: ["comment:"],
  7787. referencedClasses: []
  7788. }),
  7789. smalltalk.ClassCommentReader);
  7790. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel');
  7791. smalltalk.addMethod(
  7792. unescape('_next'),
  7793. smalltalk.method({
  7794. selector: unescape('next'),
  7795. category: 'accessing',
  7796. fn: function (){
  7797. var self=this;
  7798. return Math.random();
  7799. return self;},
  7800. args: [],
  7801. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  7802. messageSends: [],
  7803. referencedClasses: []
  7804. }),
  7805. smalltalk.Random);
  7806. smalltalk.addMethod(
  7807. unescape('_next_'),
  7808. smalltalk.method({
  7809. selector: unescape('next%3A'),
  7810. category: 'accessing',
  7811. fn: function (anInteger){
  7812. var self=this;
  7813. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  7814. return self;},
  7815. args: ["anInteger"],
  7816. source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E%281%20to%3A%20anInteger%29%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
  7817. messageSends: ["collect:", "to:", "next"],
  7818. referencedClasses: []
  7819. }),
  7820. smalltalk.Random);
  7821. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel');
  7822. smalltalk.addMethod(
  7823. unescape('_x'),
  7824. smalltalk.method({
  7825. selector: unescape('x'),
  7826. category: 'accessing',
  7827. fn: function (){
  7828. var self=this;
  7829. return self['@x'];
  7830. return self;},
  7831. args: [],
  7832. source: unescape('x%0A%09%5Ex'),
  7833. messageSends: [],
  7834. referencedClasses: []
  7835. }),
  7836. smalltalk.Point);
  7837. smalltalk.addMethod(
  7838. unescape('_y'),
  7839. smalltalk.method({
  7840. selector: unescape('y'),
  7841. category: 'accessing',
  7842. fn: function (){
  7843. var self=this;
  7844. return self['@y'];
  7845. return self;},
  7846. args: [],
  7847. source: unescape('y%0A%09%5Ey'),
  7848. messageSends: [],
  7849. referencedClasses: []
  7850. }),
  7851. smalltalk.Point);
  7852. smalltalk.addMethod(
  7853. unescape('_y_'),
  7854. smalltalk.method({
  7855. selector: unescape('y%3A'),
  7856. category: 'accessing',
  7857. fn: function (aNumber){
  7858. var self=this;
  7859. self['@y']=aNumber;
  7860. return self;},
  7861. args: ["aNumber"],
  7862. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  7863. messageSends: [],
  7864. referencedClasses: []
  7865. }),
  7866. smalltalk.Point);
  7867. smalltalk.addMethod(
  7868. unescape('_x_'),
  7869. smalltalk.method({
  7870. selector: unescape('x%3A'),
  7871. category: 'accessing',
  7872. fn: function (aNumber){
  7873. var self=this;
  7874. self['@x']=aNumber;
  7875. return self;},
  7876. args: ["aNumber"],
  7877. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  7878. messageSends: [],
  7879. referencedClasses: []
  7880. }),
  7881. smalltalk.Point);
  7882. smalltalk.addMethod(
  7883. unescape('__star'),
  7884. smalltalk.method({
  7885. selector: unescape('*'),
  7886. category: 'arithmetic',
  7887. fn: function (aPoint){
  7888. var self=this;
  7889. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7890. return self;},
  7891. args: ["aPoint"],
  7892. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  7893. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  7894. referencedClasses: [smalltalk.Point]
  7895. }),
  7896. smalltalk.Point);
  7897. smalltalk.addMethod(
  7898. unescape('__plus'),
  7899. smalltalk.method({
  7900. selector: unescape('+'),
  7901. category: 'arithmetic',
  7902. fn: function (aPoint){
  7903. var self=this;
  7904. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7905. return self;},
  7906. args: ["aPoint"],
  7907. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  7908. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  7909. referencedClasses: [smalltalk.Point]
  7910. }),
  7911. smalltalk.Point);
  7912. smalltalk.addMethod(
  7913. unescape('__minus'),
  7914. smalltalk.method({
  7915. selector: unescape('-'),
  7916. category: 'arithmetic',
  7917. fn: function (aPoint){
  7918. var self=this;
  7919. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7920. return self;},
  7921. args: ["aPoint"],
  7922. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  7923. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  7924. referencedClasses: [smalltalk.Point]
  7925. }),
  7926. smalltalk.Point);
  7927. smalltalk.addMethod(
  7928. unescape('__slash'),
  7929. smalltalk.method({
  7930. selector: unescape('/'),
  7931. category: 'arithmetic',
  7932. fn: function (aPoint){
  7933. var self=this;
  7934. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  7935. return self;},
  7936. args: ["aPoint"],
  7937. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  7938. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  7939. referencedClasses: [smalltalk.Point]
  7940. }),
  7941. smalltalk.Point);
  7942. smalltalk.addMethod(
  7943. unescape('_asPoint'),
  7944. smalltalk.method({
  7945. selector: unescape('asPoint'),
  7946. category: 'converting',
  7947. fn: function (){
  7948. var self=this;
  7949. return self;
  7950. return self;},
  7951. args: [],
  7952. source: unescape('asPoint%0A%09%5Eself'),
  7953. messageSends: [],
  7954. referencedClasses: []
  7955. }),
  7956. smalltalk.Point);
  7957. smalltalk.addMethod(
  7958. unescape('__eq'),
  7959. smalltalk.method({
  7960. selector: unescape('%3D'),
  7961. category: 'arithmetic',
  7962. fn: function (aPoint){
  7963. var self=this;
  7964. return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
  7965. return self;},
  7966. args: ["aPoint"],
  7967. source: unescape('%3D%20aPoint%0A%09%5EaPoint%20class%20%3D%20self%20class%20and%3A%20%5B%0A%09%09%28aPoint%20x%20%3D%20self%20x%29%20%26%20%28aPoint%20y%20%3D%20self%20y%29%5D'),
  7968. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  7969. referencedClasses: []
  7970. }),
  7971. smalltalk.Point);
  7972. smalltalk.addMethod(
  7973. unescape('_x_y_'),
  7974. smalltalk.method({
  7975. selector: unescape('x%3Ay%3A'),
  7976. category: 'instance creation',
  7977. fn: function (aNumber, anotherNumber){
  7978. var self=this;
  7979. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7980. return self;},
  7981. args: ["aNumber", "anotherNumber"],
  7982. source: unescape('x%3A%20aNumber%20y%3A%20anotherNumber%0A%09%5Eself%20new%0A%09%09x%3A%20aNumber%3B%0A%09%09y%3A%20anotherNumber%3B%0A%09%09yourself'),
  7983. messageSends: ["x:", "y:", "yourself", "new"],
  7984. referencedClasses: []
  7985. }),
  7986. smalltalk.Point.klass);
  7987. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel');
  7988. smalltalk.addMethod(
  7989. unescape('_selector'),
  7990. smalltalk.method({
  7991. selector: unescape('selector'),
  7992. category: 'accessing',
  7993. fn: function (){
  7994. var self=this;
  7995. return self['@selector'];
  7996. return self;},
  7997. args: [],
  7998. source: unescape('selector%0A%09%5Eselector'),
  7999. messageSends: [],
  8000. referencedClasses: []
  8001. }),
  8002. smalltalk.Message);
  8003. smalltalk.addMethod(
  8004. unescape('_selector_'),
  8005. smalltalk.method({
  8006. selector: unescape('selector%3A'),
  8007. category: 'accessing',
  8008. fn: function (aString){
  8009. var self=this;
  8010. self['@selector']=aString;
  8011. return self;},
  8012. args: ["aString"],
  8013. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  8014. messageSends: [],
  8015. referencedClasses: []
  8016. }),
  8017. smalltalk.Message);
  8018. smalltalk.addMethod(
  8019. unescape('_arguments_'),
  8020. smalltalk.method({
  8021. selector: unescape('arguments%3A'),
  8022. category: 'accessing',
  8023. fn: function (anArray){
  8024. var self=this;
  8025. self['@arguments']=anArray;
  8026. return self;},
  8027. args: ["anArray"],
  8028. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  8029. messageSends: [],
  8030. referencedClasses: []
  8031. }),
  8032. smalltalk.Message);
  8033. smalltalk.addMethod(
  8034. unescape('_arguments'),
  8035. smalltalk.method({
  8036. selector: unescape('arguments'),
  8037. category: 'accessing',
  8038. fn: function (){
  8039. var self=this;
  8040. return self['@arguments'];
  8041. return self;},
  8042. args: [],
  8043. source: unescape('arguments%0A%09%5Earguments'),
  8044. messageSends: [],
  8045. referencedClasses: []
  8046. }),
  8047. smalltalk.Message);
  8048. smalltalk.addMethod(
  8049. unescape('_selector_arguments_'),
  8050. smalltalk.method({
  8051. selector: unescape('selector%3Aarguments%3A'),
  8052. category: 'instance creation',
  8053. fn: function (aString, anArray){
  8054. var self=this;
  8055. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8056. return self;},
  8057. args: ["aString", "anArray"],
  8058. source: unescape('selector%3A%20aString%20arguments%3A%20anArray%0A%09%5Eself%20new%0A%09%09selector%3A%20aString%3B%0A%09%09arguments%3A%20anArray%3B%0A%09%09yourself'),
  8059. messageSends: ["selector:", "arguments:", "yourself", "new"],
  8060. referencedClasses: []
  8061. }),
  8062. smalltalk.Message.klass);
  8063. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel');
  8064. smalltalk.addMethod(
  8065. unescape('_message'),
  8066. smalltalk.method({
  8067. selector: unescape('message'),
  8068. category: 'accessing',
  8069. fn: function (){
  8070. var self=this;
  8071. return self['@message'];
  8072. return self;},
  8073. args: [],
  8074. source: unescape('message%0A%09%5Emessage'),
  8075. messageSends: [],
  8076. referencedClasses: []
  8077. }),
  8078. smalltalk.MessageNotUnderstood);
  8079. smalltalk.addMethod(
  8080. unescape('_message_'),
  8081. smalltalk.method({
  8082. selector: unescape('message%3A'),
  8083. category: 'accessing',
  8084. fn: function (aMessage){
  8085. var self=this;
  8086. self['@message']=aMessage;
  8087. return self;},
  8088. args: ["aMessage"],
  8089. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  8090. messageSends: [],
  8091. referencedClasses: []
  8092. }),
  8093. smalltalk.MessageNotUnderstood);
  8094. smalltalk.addMethod(
  8095. unescape('_receiver'),
  8096. smalltalk.method({
  8097. selector: unescape('receiver'),
  8098. category: 'accessing',
  8099. fn: function (){
  8100. var self=this;
  8101. return self['@receiver'];
  8102. return self;},
  8103. args: [],
  8104. source: unescape('receiver%0A%09%5Ereceiver'),
  8105. messageSends: [],
  8106. referencedClasses: []
  8107. }),
  8108. smalltalk.MessageNotUnderstood);
  8109. smalltalk.addMethod(
  8110. unescape('_receiver_'),
  8111. smalltalk.method({
  8112. selector: unescape('receiver%3A'),
  8113. category: 'accessing',
  8114. fn: function (anObject){
  8115. var self=this;
  8116. self['@receiver']=anObject;
  8117. return self;},
  8118. args: ["anObject"],
  8119. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  8120. messageSends: [],
  8121. referencedClasses: []
  8122. }),
  8123. smalltalk.MessageNotUnderstood);
  8124. smalltalk.addMethod(
  8125. unescape('_messageText'),
  8126. smalltalk.method({
  8127. selector: unescape('messageText'),
  8128. category: 'accessing',
  8129. fn: function (){
  8130. var self=this;
  8131. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [unescape("%20does%20not%20understand%20%23")]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
  8132. return self;},
  8133. args: [],
  8134. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  8135. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  8136. referencedClasses: []
  8137. }),
  8138. smalltalk.MessageNotUnderstood);
  8139. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel');
  8140. smalltalk.addMethod(
  8141. unescape('_handleError_'),
  8142. smalltalk.method({
  8143. selector: unescape('handleError%3A'),
  8144. category: 'error handling',
  8145. fn: function (anError){
  8146. var self=this;
  8147. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  8148. smalltalk.send(self, "_logError_", [anError]);
  8149. return self;},
  8150. args: ["anError"],
  8151. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  8152. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  8153. referencedClasses: []
  8154. }),
  8155. smalltalk.ErrorHandler);
  8156. smalltalk.addMethod(
  8157. unescape('_logContext_'),
  8158. smalltalk.method({
  8159. selector: unescape('logContext%3A'),
  8160. category: 'private',
  8161. fn: function (aContext){
  8162. var self=this;
  8163. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  8164. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  8165. return self;},
  8166. args: ["aContext"],
  8167. source: unescape('logContext%3A%20aContext%0A%09aContext%20home%20ifNotNil%3A%20%5B%0A%09%09self%20logContext%3A%20aContext%20home%5D.%0A%09self%20log%3A%20aContext%20receiver%20asString%2C%20%27%3E%3E%27%2C%20aContext%20selector'),
  8168. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  8169. referencedClasses: []
  8170. }),
  8171. smalltalk.ErrorHandler);
  8172. smalltalk.addMethod(
  8173. unescape('_logErrorContext_'),
  8174. smalltalk.method({
  8175. selector: unescape('logErrorContext%3A'),
  8176. category: 'private',
  8177. fn: function (aContext){
  8178. var self=this;
  8179. (($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
  8180. return self;},
  8181. args: ["aContext"],
  8182. source: unescape('logErrorContext%3A%20aContext%0A%09aContext%20ifNotNil%3A%20%5B%0A%09%09aContext%20home%20ifNotNil%3A%20%5B%0A%09%09%09self%20logContext%3A%20aContext%20home%5D%5D'),
  8183. messageSends: ["ifNotNil:", "home", "logContext:"],
  8184. referencedClasses: []
  8185. }),
  8186. smalltalk.ErrorHandler);
  8187. smalltalk.addMethod(
  8188. unescape('_logError_'),
  8189. smalltalk.method({
  8190. selector: unescape('logError%3A'),
  8191. category: 'private',
  8192. fn: function (anError){
  8193. var self=this;
  8194. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  8195. return self;},
  8196. args: ["anError"],
  8197. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  8198. messageSends: ["log:", "messageText"],
  8199. referencedClasses: []
  8200. }),
  8201. smalltalk.ErrorHandler);
  8202. smalltalk.addMethod(
  8203. unescape('_log_'),
  8204. smalltalk.method({
  8205. selector: unescape('log%3A'),
  8206. category: 'private',
  8207. fn: function (aString){
  8208. var self=this;
  8209. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  8210. return self;},
  8211. args: ["aString"],
  8212. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  8213. messageSends: ["log:"],
  8214. referencedClasses: []
  8215. }),
  8216. smalltalk.ErrorHandler);
  8217. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  8218. smalltalk.addMethod(
  8219. unescape('_current'),
  8220. smalltalk.method({
  8221. selector: unescape('current'),
  8222. category: 'accessing',
  8223. fn: function (){
  8224. var self=this;
  8225. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", []);})() : $receiver;
  8226. return self;},
  8227. args: [],
  8228. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  8229. messageSends: ["ifNil:", "new"],
  8230. referencedClasses: []
  8231. }),
  8232. smalltalk.ErrorHandler.klass);
  8233. smalltalk.addMethod(
  8234. unescape('_initialize'),
  8235. smalltalk.method({
  8236. selector: unescape('initialize'),
  8237. category: 'initialization',
  8238. fn: function (){
  8239. var self=this;
  8240. smalltalk.send(self, "_register", []);
  8241. return self;},
  8242. args: [],
  8243. source: unescape('initialize%0A%09self%20register'),
  8244. messageSends: ["register"],
  8245. referencedClasses: []
  8246. }),
  8247. smalltalk.ErrorHandler.klass);
  8248. smalltalk.addMethod(
  8249. unescape('_register'),
  8250. smalltalk.method({
  8251. selector: unescape('register'),
  8252. category: 'initialization',
  8253. fn: function (){
  8254. var self=this;
  8255. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  8256. return self;},
  8257. args: [],
  8258. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  8259. messageSends: ["setCurrent:", "new"],
  8260. referencedClasses: [smalltalk.ErrorHandler]
  8261. }),
  8262. smalltalk.ErrorHandler.klass);
  8263. smalltalk.addMethod(
  8264. unescape('_setCurrent_'),
  8265. smalltalk.method({
  8266. selector: unescape('setCurrent%3A'),
  8267. category: 'accessing',
  8268. fn: function (anHandler){
  8269. var self=this;
  8270. self['@current']=anHandler;
  8271. return self;},
  8272. args: ["anHandler"],
  8273. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  8274. messageSends: [],
  8275. referencedClasses: []
  8276. }),
  8277. smalltalk.ErrorHandler.klass);
  8278. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel');
  8279. smalltalk.addMethod(
  8280. unescape('_jsObject_'),
  8281. smalltalk.method({
  8282. selector: unescape('jsObject%3A'),
  8283. category: 'accessing',
  8284. fn: function (aJSObject){
  8285. var self=this;
  8286. self['@jsObject']=aJSObject;
  8287. return self;},
  8288. args: ["aJSObject"],
  8289. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  8290. messageSends: [],
  8291. referencedClasses: []
  8292. }),
  8293. smalltalk.JSObjectProxy);
  8294. smalltalk.addMethod(
  8295. unescape('_jsObject'),
  8296. smalltalk.method({
  8297. selector: unescape('jsObject'),
  8298. category: 'accessing',
  8299. fn: function (){
  8300. var self=this;
  8301. return self['@jsObject'];
  8302. return self;},
  8303. args: [],
  8304. source: unescape('jsObject%0A%09%5EjsObject'),
  8305. messageSends: [],
  8306. referencedClasses: []
  8307. }),
  8308. smalltalk.JSObjectProxy);
  8309. smalltalk.addMethod(
  8310. unescape('_printString'),
  8311. smalltalk.method({
  8312. selector: unescape('printString'),
  8313. category: 'proxy',
  8314. fn: function (){
  8315. var self=this;
  8316. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  8317. return self;},
  8318. args: [],
  8319. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  8320. messageSends: ["toString", "jsObject"],
  8321. referencedClasses: []
  8322. }),
  8323. smalltalk.JSObjectProxy);
  8324. smalltalk.addMethod(
  8325. unescape('_inspectOn_'),
  8326. smalltalk.method({
  8327. selector: unescape('inspectOn%3A'),
  8328. category: 'proxy',
  8329. fn: function (anInspector){
  8330. var self=this;
  8331. var variables=nil;
  8332. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  8333. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  8334. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  8335. for(var i in self['@jsObject']) {
  8336. variables._at_put_(i, self['@jsObject'][i]);
  8337. };
  8338. smalltalk.send(anInspector, "_setVariables_", [variables]);
  8339. return self;},
  8340. args: ["anInspector"],
  8341. source: unescape('inspectOn%3A%20anInspector%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20Dictionary%20new.%0A%09variables%20at%3A%20%27%23self%27%20put%3A%20self%20jsObject.%0A%09anInspector%20setLabel%3A%20self%20printString.%0A%09%3Cfor%28var%20i%20in%20self%5B%27@jsObject%27%5D%29%20%7B%0A%09%09variables._at_put_%28i%2C%20self%5B%27@jsObject%27%5D%5Bi%5D%29%3B%0A%09%7D%3E.%0A%09anInspector%20setVariables%3A%20variables'),
  8342. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  8343. referencedClasses: [smalltalk.Dictionary]
  8344. }),
  8345. smalltalk.JSObjectProxy);
  8346. smalltalk.addMethod(
  8347. unescape('_doesNotUnderstand_'),
  8348. smalltalk.method({
  8349. selector: unescape('doesNotUnderstand%3A'),
  8350. category: 'proxy',
  8351. fn: function (aMessage){
  8352. var self=this;
  8353. var obj=nil;
  8354. var selector=nil;
  8355. var jsSelector=nil;
  8356. var arguments=nil;
  8357. obj=smalltalk.send(self, "_jsObject", []);
  8358. selector=smalltalk.send(aMessage, "_selector", []);
  8359. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  8360. arguments=smalltalk.send(aMessage, "_arguments", []);
  8361. if(obj[jsSelector]) {return smalltalk.send(obj, jsSelector, arguments)};
  8362. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  8363. return self;},
  8364. args: ["aMessage"],
  8365. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09%7C%20obj%20selector%20jsSelector%20arguments%20%7C%0A%09obj%20%3A%3D%20self%20jsObject.%0A%09selector%20%3A%3D%20aMessage%20selector.%0A%09jsSelector%20%3A%3D%20selector%20asJavaScriptSelector.%0A%09arguments%20%3A%3D%20aMessage%20arguments.%0A%09%3Cif%28obj%5BjsSelector%5D%29%20%7Breturn%20smalltalk.send%28obj%2C%20jsSelector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  8366. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  8367. referencedClasses: []
  8368. }),
  8369. smalltalk.JSObjectProxy);
  8370. smalltalk.addMethod(
  8371. unescape('_at_'),
  8372. smalltalk.method({
  8373. selector: unescape('at%3A'),
  8374. category: 'accessing',
  8375. fn: function (aString){
  8376. var self=this;
  8377. return self['@jsObject'][aString];
  8378. return self;},
  8379. args: ["aString"],
  8380. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5BaString%5D%3E'),
  8381. messageSends: [],
  8382. referencedClasses: []
  8383. }),
  8384. smalltalk.JSObjectProxy);
  8385. smalltalk.addMethod(
  8386. unescape('_at_put_'),
  8387. smalltalk.method({
  8388. selector: unescape('at%3Aput%3A'),
  8389. category: 'accessing',
  8390. fn: function (aString, anObject){
  8391. var self=this;
  8392. self['@jsObject'][aString] = anObject;
  8393. return self;},
  8394. args: ["aString", "anObject"],
  8395. source: unescape('at%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@jsObject%27%5D%5BaString%5D%20%3D%20anObject%3E'),
  8396. messageSends: [],
  8397. referencedClasses: []
  8398. }),
  8399. smalltalk.JSObjectProxy);
  8400. smalltalk.addMethod(
  8401. unescape('_on_'),
  8402. smalltalk.method({
  8403. selector: unescape('on%3A'),
  8404. category: 'instance creation',
  8405. fn: function (aJSObject){
  8406. var self=this;
  8407. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8408. return self;},
  8409. args: ["aJSObject"],
  8410. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  8411. messageSends: ["jsObject:", "yourself", "new"],
  8412. referencedClasses: []
  8413. }),
  8414. smalltalk.JSObjectProxy.klass);
  8415. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel');
  8416. smalltalk.addMethod(
  8417. unescape('_add_'),
  8418. smalltalk.method({
  8419. selector: unescape('add%3A'),
  8420. category: 'adding/removing',
  8421. fn: function (anObject){
  8422. var self=this;
  8423. var found;
  8424. for(var i in self['@elements']) {
  8425. if(anObject == self['@elements'][i]) {
  8426. found = true;
  8427. break;
  8428. }
  8429. }
  8430. if(!found) {self['@elements'].push(anObject)}
  8431. ;
  8432. return self;},
  8433. args: ["anObject"],
  8434. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%20in%20self%5B%27@elements%27%5D%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
  8435. messageSends: [],
  8436. referencedClasses: []
  8437. }),
  8438. smalltalk.Set);
  8439. smalltalk.addMethod(
  8440. unescape('_remove_'),
  8441. smalltalk.method({
  8442. selector: unescape('remove%3A'),
  8443. category: 'adding/removing',
  8444. fn: function (anObject){
  8445. var self=this;
  8446. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  8447. return self;},
  8448. args: ["anObject"],
  8449. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  8450. messageSends: ["remove:"],
  8451. referencedClasses: []
  8452. }),
  8453. smalltalk.Set);
  8454. smalltalk.addMethod(
  8455. unescape('_initialize'),
  8456. smalltalk.method({
  8457. selector: unescape('initialize'),
  8458. category: 'initialization',
  8459. fn: function (){
  8460. var self=this;
  8461. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  8462. self['@elements']=[];
  8463. return self;},
  8464. args: [],
  8465. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  8466. messageSends: ["initialize"],
  8467. referencedClasses: []
  8468. }),
  8469. smalltalk.Set);
  8470. smalltalk.addMethod(
  8471. unescape('_size'),
  8472. smalltalk.method({
  8473. selector: unescape('size'),
  8474. category: 'accessing',
  8475. fn: function (){
  8476. var self=this;
  8477. return smalltalk.send(self['@elements'], "_size", []);
  8478. return self;},
  8479. args: [],
  8480. source: unescape('size%0A%09%5Eelements%20size'),
  8481. messageSends: ["size"],
  8482. referencedClasses: []
  8483. }),
  8484. smalltalk.Set);
  8485. smalltalk.addMethod(
  8486. unescape('_asArray'),
  8487. smalltalk.method({
  8488. selector: unescape('asArray'),
  8489. category: 'converting',
  8490. fn: function (){
  8491. var self=this;
  8492. return smalltalk.send(self['@elements'], "_copy", []);
  8493. return self;},
  8494. args: [],
  8495. source: unescape('asArray%0A%09%5Eelements%20copy'),
  8496. messageSends: ["copy"],
  8497. referencedClasses: []
  8498. }),
  8499. smalltalk.Set);
  8500. smalltalk.addMethod(
  8501. unescape('_detect_ifNone_'),
  8502. smalltalk.method({
  8503. selector: unescape('detect%3AifNone%3A'),
  8504. category: 'enumerating',
  8505. fn: function (aBlock, anotherBlock){
  8506. var self=this;
  8507. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  8508. return self;},
  8509. args: ["aBlock", "anotherBlock"],
  8510. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  8511. messageSends: ["detect:ifNone:"],
  8512. referencedClasses: []
  8513. }),
  8514. smalltalk.Set);
  8515. smalltalk.addMethod(
  8516. unescape('_do_'),
  8517. smalltalk.method({
  8518. selector: unescape('do%3A'),
  8519. category: 'enumerating',
  8520. fn: function (aBlock){
  8521. var self=this;
  8522. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  8523. return self;},
  8524. args: ["aBlock"],
  8525. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  8526. messageSends: ["do:"],
  8527. referencedClasses: []
  8528. }),
  8529. smalltalk.Set);
  8530. smalltalk.addMethod(
  8531. unescape('_includes_'),
  8532. smalltalk.method({
  8533. selector: unescape('includes%3A'),
  8534. category: 'testing',
  8535. fn: function (anObject){
  8536. var self=this;
  8537. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  8538. return self;},
  8539. args: ["anObject"],
  8540. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  8541. messageSends: ["includes:"],
  8542. referencedClasses: []
  8543. }),
  8544. smalltalk.Set);
  8545. smalltalk.addMethod(
  8546. unescape('__eq'),
  8547. smalltalk.method({
  8548. selector: unescape('%3D'),
  8549. category: 'comparing',
  8550. fn: function (aCollection){
  8551. var self=this;
  8552. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
  8553. return self;},
  8554. args: ["aCollection"],
  8555. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09elements%20%3D%20aCollection%20asArray%5D'),
  8556. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  8557. referencedClasses: []
  8558. }),
  8559. smalltalk.Set);
  8560. smalltalk.addClass('FileServer', smalltalk.Object, ['path', 'http', 'fs', 'url', 'port', 'basePath', 'sys'], 'FileServer');
  8561. smalltalk.addMethod(
  8562. unescape('_basePath'),
  8563. smalltalk.method({
  8564. selector: unescape('basePath'),
  8565. category: 'accessing',
  8566. fn: function (){
  8567. var self=this;
  8568. return (($receiver = self['@basePath']) == nil || $receiver == undefined) ? (function(){return unescape("./");})() : $receiver;
  8569. return self;},
  8570. args: [],
  8571. source: unescape('basePath%0A%09%5EbasePath%20ifNil%3A%20%5B%27./%27%5D'),
  8572. messageSends: ["ifNil:"],
  8573. referencedClasses: []
  8574. }),
  8575. smalltalk.FileServer);
  8576. smalltalk.addMethod(
  8577. unescape('_basePath_'),
  8578. smalltalk.method({
  8579. selector: unescape('basePath%3A'),
  8580. category: 'accessing',
  8581. fn: function (aString){
  8582. var self=this;
  8583. self['@basePath']=aString;
  8584. return self;},
  8585. args: ["aString"],
  8586. source: unescape('basePath%3A%20aString%0A%09basePath%20%3A%3D%20aString'),
  8587. messageSends: [],
  8588. referencedClasses: []
  8589. }),
  8590. smalltalk.FileServer);
  8591. smalltalk.addMethod(
  8592. unescape('_port'),
  8593. smalltalk.method({
  8594. selector: unescape('port'),
  8595. category: 'accessing',
  8596. fn: function (){
  8597. var self=this;
  8598. return smalltalk.send(smalltalk.send(self, "_class", []), "_port", []);
  8599. return self;},
  8600. args: [],
  8601. source: unescape('port%0A%09%5Eself%20class%20port'),
  8602. messageSends: ["port", "class"],
  8603. referencedClasses: []
  8604. }),
  8605. smalltalk.FileServer);
  8606. smalltalk.addMethod(
  8607. unescape('_initialize'),
  8608. smalltalk.method({
  8609. selector: unescape('initialize'),
  8610. category: 'initialization',
  8611. fn: function (){
  8612. var self=this;
  8613. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  8614. self['@path']=smalltalk.send(self, "_require_", ["path"]);
  8615. self['@http']=smalltalk.send(self, "_require_", ["http"]);
  8616. self['@fs']=smalltalk.send(self, "_require_", ["fs"]);
  8617. self['@sys']=smalltalk.send(self, "_require_", ["sys"]);
  8618. self['@url']=smalltalk.send(self, "_require_", ["url"]);
  8619. return self;},
  8620. args: [],
  8621. source: unescape('initialize%0A%09super%20initialize.%0A%09path%20%3A%3D%20self%20require%3A%20%27path%27.%0A%09http%20%3A%3D%20self%20require%3A%20%27http%27.%0A%09fs%20%3A%3D%20self%20require%3A%20%27fs%27.%0A%09sys%20%3A%3D%20self%20require%3A%20%27sys%27.%0A%09url%20%3A%3D%20self%20require%3A%20%27url%27'),
  8622. messageSends: ["initialize", "require:"],
  8623. referencedClasses: []
  8624. }),
  8625. smalltalk.FileServer);
  8626. smalltalk.addMethod(
  8627. unescape('_require_'),
  8628. smalltalk.method({
  8629. selector: unescape('require%3A'),
  8630. category: 'private',
  8631. fn: function (aModuleString){
  8632. var self=this;
  8633. return smalltalk.send((typeof require == 'undefined' ? nil : require), "_value_", [aModuleString]);
  8634. return self;},
  8635. args: ["aModuleString"],
  8636. source: unescape('require%3A%20aModuleString%0A%09%22call%20to%20the%20require%20function%22%0A%09%5Erequire%20value%3A%20aModuleString'),
  8637. messageSends: ["value:"],
  8638. referencedClasses: []
  8639. }),
  8640. smalltalk.FileServer);
  8641. smalltalk.addMethod(
  8642. unescape('_writeData_toFileNamed_'),
  8643. smalltalk.method({
  8644. selector: unescape('writeData%3AtoFileNamed%3A'),
  8645. category: 'private',
  8646. fn: function (data, aFilename){
  8647. var self=this;
  8648. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aFilename]);
  8649. return self;},
  8650. args: ["data", "aFilename"],
  8651. source: unescape('writeData%3A%20data%20toFileNamed%3A%20aFilename%0A%09console%20log%3A%20aFilename'),
  8652. messageSends: ["log:"],
  8653. referencedClasses: []
  8654. }),
  8655. smalltalk.FileServer);
  8656. smalltalk.addMethod(
  8657. unescape('_respondNotFoundTo_'),
  8658. smalltalk.method({
  8659. selector: unescape('respondNotFoundTo%3A'),
  8660. category: 'request handling',
  8661. fn: function (aResponse){
  8662. var self=this;
  8663. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(404), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["404 Not found"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  8664. return self;},
  8665. args: ["aResponse"],
  8666. source: unescape('respondNotFoundTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20404%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09write%3A%20%27404%20Not%20found%27%3B%0A%09%09end'),
  8667. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  8668. referencedClasses: []
  8669. }),
  8670. smalltalk.FileServer);
  8671. smalltalk.addMethod(
  8672. unescape('_handleRequest_respondTo_'),
  8673. smalltalk.method({
  8674. selector: unescape('handleRequest%3ArespondTo%3A'),
  8675. category: 'request handling',
  8676. fn: function (aRequest, aResponse){
  8677. var self=this;
  8678. ((($receiver = smalltalk.send(smalltalk.send(aRequest, "_method", []), "__eq", ["PUT"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);})() : (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);}), (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})]));
  8679. return self;},
  8680. args: ["aRequest", "aResponse"],
  8681. source: unescape('handleRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09aRequest%20method%20%3D%20%27PUT%27%0A%09%09ifTrue%3A%20%5Bself%20handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D%0A%09%09ifFalse%3A%20%5Bself%20handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D'),
  8682. messageSends: ["ifTrue:ifFalse:", unescape("%3D"), "method", "handlePUTRequest:respondTo:", "handleGETRequest:respondTo:"],
  8683. referencedClasses: []
  8684. }),
  8685. smalltalk.FileServer);
  8686. smalltalk.addMethod(
  8687. unescape('_handleGETRequest_respondTo_'),
  8688. smalltalk.method({
  8689. selector: unescape('handleGETRequest%3ArespondTo%3A'),
  8690. category: 'request handling',
  8691. fn: function (aRequest, aResponse){
  8692. var self=this;
  8693. var uri=nil;
  8694. var filename=nil;
  8695. uri=smalltalk.send(smalltalk.send(self['@url'], "_parse_", [smalltalk.send(aRequest, "_url", [])]), "_pathname", []);
  8696. filename=smalltalk.send(self['@path'], "_join_with_", [smalltalk.send(self, "_basePath", []), uri]);
  8697. smalltalk.send(self['@path'], "_exists_do_", [filename, (function(boolean){return ((($receiver = boolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_respondNotFoundTo_", [aResponse]);})() : (function(){return smalltalk.send(self, "_respondFileNamed_to_", [filename, aResponse]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_respondNotFoundTo_", [aResponse]);}), (function(){return smalltalk.send(self, "_respondFileNamed_to_", [filename, aResponse]);})]));})]);
  8698. return self;},
  8699. args: ["aRequest", "aResponse"],
  8700. source: unescape('handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7C%20uri%20filename%20%7C%0A%09uri%20%3A%3D%20%28url%20parse%3A%20aRequest%20url%29%20pathname.%0A%09filename%20%3A%3D%20path%20join%3A%20self%20basePath%20with%3A%20uri.%0A%09path%20exists%3A%20filename%20do%3A%20%5B%3Aboolean%20%7C%20%0A%09%09boolean%20%0A%09%09%09ifFalse%3A%20%5Bself%20respondNotFoundTo%3A%20aResponse%5D%0A%09%09%09ifTrue%3A%20%5Bself%20respondFileNamed%3A%20filename%20to%3A%20aResponse%5D%5D'),
  8701. messageSends: ["pathname", "parse:", "url", "join:with:", "basePath", "exists:do:", "ifFalse:ifTrue:", "respondNotFoundTo:", "respondFileNamed:to:"],
  8702. referencedClasses: []
  8703. }),
  8704. smalltalk.FileServer);
  8705. smalltalk.addMethod(
  8706. unescape('_handlePUTRequest_respondTo_'),
  8707. smalltalk.method({
  8708. selector: unescape('handlePUTRequest%3ArespondTo%3A'),
  8709. category: 'request handling',
  8710. fn: function (aRequest, aResponse){
  8711. var self=this;
  8712. var stream=nil;
  8713. stream=smalltalk.send(self['@fs'], "_createWriteStream_", [smalltalk.send(".", "__comma", [smalltalk.send(aRequest, "_url", [])])]);
  8714. smalltalk.send(aRequest, "_setEncoding_", ["utf8"]);
  8715. smalltalk.send(aRequest, "_on_do_", ["data", (function(data){return smalltalk.send(stream, "_write_", [data]);})]);
  8716. smalltalk.send(aRequest, "_on_do_", ["end", (function(){smalltalk.send(stream, "_end", []);return smalltalk.send(self, "_respondOKTo_", [aResponse]);})]);
  8717. return self;},
  8718. args: ["aRequest", "aResponse"],
  8719. source: unescape('handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20fs%20createWriteStream%3A%20%27.%27%2C%20aRequest%20url.%0A%0A%09aRequest%20setEncoding%3A%20%27utf8%27.%0A%09aRequest%20on%3A%20%23data%20do%3A%20%5B%3Adata%20%7C%20stream%20write%3A%20data%5D.%0A%0A%09aRequest%20on%3A%20%23end%20do%3A%20%5B%0A%09%09stream%20end.%0A%09%09self%20respondOKTo%3A%20aResponse%5D'),
  8720. messageSends: ["createWriteStream:", unescape("%2C"), "url", "setEncoding:", "on:do:", "write:", "end", "respondOKTo:"],
  8721. referencedClasses: []
  8722. }),
  8723. smalltalk.FileServer);
  8724. smalltalk.addMethod(
  8725. unescape('_respondFileNamed_to_'),
  8726. smalltalk.method({
  8727. selector: unescape('respondFileNamed%3Ato%3A'),
  8728. category: 'request handling',
  8729. fn: function (aFilename, aResponse){
  8730. var self=this;
  8731. var type=nil;
  8732. var filename=nil;
  8733. filename=aFilename;
  8734. ((($receiver = smalltalk.send(smalltalk.send(self['@fs'], "_statSync_", [aFilename]), "_isDirectory", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return filename=smalltalk.send(filename, "__comma", ["index.html"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return filename=smalltalk.send(filename, "__comma", ["index.html"]);})]));
  8735. smalltalk.send(self['@fs'], "_readFile_do_", [filename, (function(ex, file){return ((($receiver = smalltalk.send(ex, "_notNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_respondInternalErrorTo_", [aResponse]);})() : (function(){type=smalltalk.send(smalltalk.send(self, "_class", []), "_mimeTypeFor_", [filename]);return (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_respondInternalErrorTo_", [aResponse]);}), (function(){type=smalltalk.send(smalltalk.send(self, "_class", []), "_mimeTypeFor_", [filename]);return (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})]));})]);
  8736. return self;},
  8737. args: ["aFilename", "aResponse"],
  8738. source: unescape('respondFileNamed%3A%20aFilename%20to%3A%20aResponse%0A%09%7C%20type%20filename%20%7C%0A%0A%09filename%20%3A%3D%20aFilename.%0A%09%28fs%20statSync%3A%20aFilename%29%20isDirectory%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%09filename%20%3A%3D%20filename%2C%20%27index.html%27%5D.%0A%0A%09fs%20readFile%3A%20filename%20do%3A%20%5B%3Aex%20%3Afile%20%7C%0A%09%09ex%20notNil%20%0A%09%09%09ifTrue%3A%20%5Bself%20respondInternalErrorTo%3A%20aResponse%5D%0A%09%09%09ifFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20%09%09%09type%20%3A%3D%20self%20class%20mimeTypeFor%3A%20filename.%0A%09%09%09%09aResponse%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09writeHead%3A%20200%20options%3A%20%20%23%7B%27Content-Type%27%20-%3E%20type%7D%3B%0A%09%09%09%09%09write%3A%20file%20binary%3A%20%27binary%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09end%5D%5D'),
  8739. messageSends: ["ifTrue:", "isDirectory", "statSync:", unescape("%2C"), "readFile:do:", "ifTrue:ifFalse:", "notNil", "respondInternalErrorTo:", "mimeTypeFor:", "class", "writeHead:options:", unescape("-%3E"), "write:binary:", "end"],
  8740. referencedClasses: []
  8741. }),
  8742. smalltalk.FileServer);
  8743. smalltalk.addMethod(
  8744. unescape('_respondInternalErrorTo_'),
  8745. smalltalk.method({
  8746. selector: unescape('respondInternalErrorTo%3A'),
  8747. category: 'request handling',
  8748. fn: function (aResponse){
  8749. var self=this;
  8750. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(500), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["500 Internal server error"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  8751. return self;},
  8752. args: ["aResponse"],
  8753. source: unescape('respondInternalErrorTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20500%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09write%3A%20%27500%20Internal%20server%20error%27%3B%0A%09%09end'),
  8754. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  8755. referencedClasses: []
  8756. }),
  8757. smalltalk.FileServer);
  8758. smalltalk.addMethod(
  8759. unescape('_respondOKTo_'),
  8760. smalltalk.method({
  8761. selector: unescape('respondOKTo%3A'),
  8762. category: 'request handling',
  8763. fn: function (aResponse){
  8764. var self=this;
  8765. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);return smalltalk.send($rec, "_end", []);})(aResponse);
  8766. return self;},
  8767. args: ["aResponse"],
  8768. source: unescape('respondOKTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20200%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09end'),
  8769. messageSends: ["writeHead:options:", unescape("-%3E"), "end"],
  8770. referencedClasses: []
  8771. }),
  8772. smalltalk.FileServer);
  8773. smalltalk.addMethod(
  8774. unescape('_startOn_'),
  8775. smalltalk.method({
  8776. selector: unescape('startOn%3A'),
  8777. category: 'starting',
  8778. fn: function (aPort){
  8779. var self=this;
  8780. self['@port']=aPort;
  8781. smalltalk.send(self, "_start", []);
  8782. return self;},
  8783. args: ["aPort"],
  8784. source: unescape('startOn%3A%20aPort%0A%09port%20%3A%3D%20aPort.%0A%09self%20start'),
  8785. messageSends: ["start"],
  8786. referencedClasses: []
  8787. }),
  8788. smalltalk.FileServer);
  8789. smalltalk.addMethod(
  8790. unescape('_start'),
  8791. smalltalk.method({
  8792. selector: unescape('start'),
  8793. category: 'starting',
  8794. fn: function (){
  8795. var self=this;
  8796. smalltalk.send(smalltalk.send(self['@http'], "_createServer_", [(function(request, response){return smalltalk.send(self, "_handleRequest_respondTo_", [request, response]);})]), "_listen_", [smalltalk.send(self, "_port", [])]);
  8797. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send("Starting file server on port ", "__comma", [smalltalk.send(smalltalk.send(self, "_port", []), "_asString", [])])]);
  8798. return self;},
  8799. args: [],
  8800. source: unescape('start%0A%09%28http%20createServer%3A%20%5B%3Arequest%20%3Aresponse%20%7C%0A%09%20%09self%20handleRequest%3A%20request%20respondTo%3A%20response%5D%29%20listen%3A%20self%20port.%0A%09console%20log%3A%20%27Starting%20file%20server%20on%20port%20%27%2C%20self%20port%20asString'),
  8801. messageSends: ["listen:", "createServer:", "handleRequest:respondTo:", "port", "log:", unescape("%2C"), "asString"],
  8802. referencedClasses: []
  8803. }),
  8804. smalltalk.FileServer);
  8805. smalltalk.FileServer.klass.iVarNames = ['port','mimeTypes'];
  8806. smalltalk.addMethod(
  8807. unescape('_port'),
  8808. smalltalk.method({
  8809. selector: unescape('port'),
  8810. category: 'accessing',
  8811. fn: function (){
  8812. var self=this;
  8813. return (($receiver = self['@port']) == nil || $receiver == undefined) ? (function(){return (4000);})() : $receiver;
  8814. return self;},
  8815. args: [],
  8816. source: unescape('port%0A%09%5Eport%20ifNil%3A%20%5B4000%5D'),
  8817. messageSends: ["ifNil:"],
  8818. referencedClasses: []
  8819. }),
  8820. smalltalk.FileServer.klass);
  8821. smalltalk.addMethod(
  8822. unescape('_port_'),
  8823. smalltalk.method({
  8824. selector: unescape('port%3A'),
  8825. category: 'accessing',
  8826. fn: function (aNumber){
  8827. var self=this;
  8828. self['@port']=aNumber;
  8829. return self;},
  8830. args: ["aNumber"],
  8831. source: unescape('port%3A%20aNumber%0A%09port%20%3A%3D%20aNumber'),
  8832. messageSends: [],
  8833. referencedClasses: []
  8834. }),
  8835. smalltalk.FileServer.klass);
  8836. smalltalk.addMethod(
  8837. unescape('_defaultMimeTypes'),
  8838. smalltalk.method({
  8839. selector: unescape('defaultMimeTypes'),
  8840. category: 'accessing',
  8841. fn: function (){
  8842. var self=this;
  8843. return smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("%25"), "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("323", "__minus_gt", [unescape("text/h323")]),smalltalk.send("abw", "__minus_gt", [unescape("application/x-abiword")]),smalltalk.send("ai", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("aif", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("aifc", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("aiff", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("alc", "__minus_gt", [unescape("chemical/x-alchemy")]),smalltalk.send("art", "__minus_gt", [unescape("image/x-jg")]),smalltalk.send("asc", "__minus_gt", [unescape("text/plain")]),smalltalk.send("asf", "__minus_gt", [unescape("video/x-ms-asf")]),smalltalk.send("asn", "__minus_gt", [unescape("chemical/x-ncbi-asn1-spec")]),smalltalk.send("aso", "__minus_gt", [unescape("chemical/x-ncbi-asn1-binary")]),smalltalk.send("asx", "__minus_gt", [unescape("video/x-ms-asf")]),smalltalk.send("au", "__minus_gt", [unescape("audio/basic")]),smalltalk.send("avi", "__minus_gt", [unescape("video/x-msvideo")]),smalltalk.send("b", "__minus_gt", [unescape("chemical/x-molconn-Z")]),smalltalk.send("bak", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("bat", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("bcpio", "__minus_gt", [unescape("application/x-bcpio")]),smalltalk.send("bib", "__minus_gt", [unescape("text/x-bibtex")]),smalltalk.send("bin", "__minus_gt", [unescape("application/octet-stream")]),smalltalk.send("bmp", "__minus_gt", [unescape("image/x-ms-bmp")]),smalltalk.send("book", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("bsd", "__minus_gt", [unescape("chemical/x-crossfire")]),smalltalk.send("c", "__minus_gt", [unescape("text/x-csrc")]),smalltalk.send(unescape("c++"), "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("c3d", "__minus_gt", [unescape("chemical/x-chem3d")]),smalltalk.send("cac", "__minus_gt", [unescape("chemical/x-cache")]),smalltalk.send("cache", "__minus_gt", [unescape("chemical/x-cache")]),smalltalk.send("cascii", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("cat", "__minus_gt", [unescape("application/vnd.ms-pki.seccat")]),smalltalk.send("cbin", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("cc", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("cdf", "__minus_gt", [unescape("application/x-cdf")]),smalltalk.send("cdr", "__minus_gt", [unescape("image/x-coreldraw")]),smalltalk.send("cdt", "__minus_gt", [unescape("image/x-coreldrawtemplate")]),smalltalk.send("cdx", "__minus_gt", [unescape("chemical/x-cdx")]),smalltalk.send("cdy", "__minus_gt", [unescape("application/vnd.cinderella")]),smalltalk.send("cef", "__minus_gt", [unescape("chemical/x-cxf")]),smalltalk.send("cer", "__minus_gt", [unescape("chemical/x-cerius")]),smalltalk.send("chm", "__minus_gt", [unescape("chemical/x-chemdraw")]),smalltalk.send("chrt", "__minus_gt", [unescape("application/x-kchart")]),smalltalk.send("cif", "__minus_gt", [unescape("chemical/x-cif")]),smalltalk.send("class", "__minus_gt", [unescape("application/java-vm")]),smalltalk.send("cls", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("cmdf", "__minus_gt", [unescape("chemical/x-cmdf")]),smalltalk.send("cml", "__minus_gt", [unescape("chemical/x-cml")]),smalltalk.send("cod", "__minus_gt", [unescape("application/vnd.rim.cod")]),smalltalk.send("com", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("cpa", "__minus_gt", [unescape("chemical/x-compass")]),smalltalk.send("cpio", "__minus_gt", [unescape("application/x-cpio")]),smalltalk.send("cpp", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("cpt", "__minus_gt", [unescape("image/x-corelphotopaint")]),smalltalk.send("crl", "__minus_gt", [unescape("application/x-pkcs7-crl")]),smalltalk.send("crt", "__minus_gt", [unescape("application/x-x509-ca-cert")]),smalltalk.send("csf", "__minus_gt", [unescape("chemical/x-cache-csf")]),smalltalk.send("csh", "__minus_gt", [unescape("text/x-csh")]),smalltalk.send("csm", "__minus_gt", [unescape("chemical/x-csml")]),smalltalk.send("csml", "__minus_gt", [unescape("chemical/x-csml")]),smalltalk.send("css", "__minus_gt", [unescape("text/css")]),smalltalk.send("csv", "__minus_gt", [unescape("text/comma-separated-values")]),smalltalk.send("ctab", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("ctx", "__minus_gt", [unescape("chemical/x-ctx")]),smalltalk.send("cu", "__minus_gt", [unescape("application/cu-seeme")]),smalltalk.send("cub", "__minus_gt", [unescape("chemical/x-gaussian-cube")]),smalltalk.send("cxf", "__minus_gt", [unescape("chemical/x-cxf")]),smalltalk.send("cxx", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("dat", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("dcr", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("deb", "__minus_gt", [unescape("application/x-debian-package")]),smalltalk.send("dif", "__minus_gt", [unescape("video/dv")]),smalltalk.send("diff", "__minus_gt", [unescape("text/plain")]),smalltalk.send("dir", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("djv", "__minus_gt", [unescape("image/vnd.djvu")]),smalltalk.send("djvu", "__minus_gt", [unescape("image/vnd.djvu")]),smalltalk.send("dl", "__minus_gt", [unescape("video/dl")]),smalltalk.send("dll", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("dmg", "__minus_gt", [unescape("application/x-apple-diskimage")]),smalltalk.send("dms", "__minus_gt", [unescape("application/x-dms")]),smalltalk.send("doc", "__minus_gt", [unescape("application/msword")]),smalltalk.send("dot", "__minus_gt", [unescape("application/msword")]),smalltalk.send("dv", "__minus_gt", [unescape("video/dv")]),smalltalk.send("dvi", "__minus_gt", [unescape("application/x-dvi")]),smalltalk.send("dx", "__minus_gt", [unescape("chemical/x-jcamp-dx")]),smalltalk.send("dxr", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("emb", "__minus_gt", [unescape("chemical/x-embl-dl-nucleotide")]),smalltalk.send("embl", "__minus_gt", [unescape("chemical/x-embl-dl-nucleotide")]),smalltalk.send("ent", "__minus_gt", [unescape("chemical/x-pdb")]),smalltalk.send("eps", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("etx", "__minus_gt", [unescape("text/x-setext")]),smalltalk.send("exe", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("ez", "__minus_gt", [unescape("application/andrew-inset")]),smalltalk.send("fb", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("fbdoc", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("fch", "__minus_gt", [unescape("chemical/x-gaussian-checkpoint")]),smalltalk.send("fchk", "__minus_gt", [unescape("chemical/x-gaussian-checkpoint")]),smalltalk.send("fig", "__minus_gt", [unescape("application/x-xfig")]),smalltalk.send("flac", "__minus_gt", [unescape("application/x-flac")]),smalltalk.send("fli", "__minus_gt", [unescape("video/fli")]),smalltalk.send("fm", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("frame", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("frm", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("gal", "__minus_gt", [unescape("chemical/x-gaussian-log")]),smalltalk.send("gam", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("gamin", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("gau", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gcd", "__minus_gt", [unescape("text/x-pcs-gcd")]),smalltalk.send("gcf", "__minus_gt", [unescape("application/x-graphing-calculator")]),smalltalk.send("gcg", "__minus_gt", [unescape("chemical/x-gcg8-sequence")]),smalltalk.send("gen", "__minus_gt", [unescape("chemical/x-genbank")]),smalltalk.send("gf", "__minus_gt", [unescape("application/x-tex-gf")]),smalltalk.send("gif", "__minus_gt", [unescape("image/gif")]),smalltalk.send("gjc", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gjf", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gl", "__minus_gt", [unescape("video/gl")]),smalltalk.send("gnumeric", "__minus_gt", [unescape("application/x-gnumeric")]),smalltalk.send("gpt", "__minus_gt", [unescape("chemical/x-mopac-graph")]),smalltalk.send("gsf", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("gsm", "__minus_gt", [unescape("audio/x-gsm")]),smalltalk.send("gtar", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("h", "__minus_gt", [unescape("text/x-chdr")]),smalltalk.send(unescape("h++"), "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hdf", "__minus_gt", [unescape("application/x-hdf")]),smalltalk.send("hh", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hin", "__minus_gt", [unescape("chemical/x-hin")]),smalltalk.send("hpp", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hqx", "__minus_gt", [unescape("application/mac-binhex40")]),smalltalk.send("hs", "__minus_gt", [unescape("text/x-haskell")]),smalltalk.send("hta", "__minus_gt", [unescape("application/hta")]),smalltalk.send("htc", "__minus_gt", [unescape("text/x-component")]),smalltalk.send("htm", "__minus_gt", [unescape("text/html")]),smalltalk.send("html", "__minus_gt", [unescape("text/html")]),smalltalk.send("hxx", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("ica", "__minus_gt", [unescape("application/x-ica")]),smalltalk.send("ice", "__minus_gt", [unescape("x-conference/x-cooltalk")]),smalltalk.send("ico", "__minus_gt", [unescape("image/x-icon")]),smalltalk.send("ics", "__minus_gt", [unescape("text/calendar")]),smalltalk.send("icz", "__minus_gt", [unescape("text/calendar")]),smalltalk.send("ief", "__minus_gt", [unescape("image/ief")]),smalltalk.send("iges", "__minus_gt", [unescape("model/iges")]),smalltalk.send("igs", "__minus_gt", [unescape("model/iges")]),smalltalk.send("iii", "__minus_gt", [unescape("application/x-iphone")]),smalltalk.send("inp", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("ins", "__minus_gt", [unescape("application/x-internet-signup")]),smalltalk.send("iso", "__minus_gt", [unescape("application/x-iso9660-image")]),smalltalk.send("isp", "__minus_gt", [unescape("application/x-internet-signup")]),smalltalk.send("ist", "__minus_gt", [unescape("chemical/x-isostar")]),smalltalk.send("istr", "__minus_gt", [unescape("chemical/x-isostar")]),smalltalk.send("jad", "__minus_gt", [unescape("text/vnd.sun.j2me.app-descriptor")]),smalltalk.send("jar", "__minus_gt", [unescape("application/java-archive")]),smalltalk.send("java", "__minus_gt", [unescape("text/x-java")]),smalltalk.send("jdx", "__minus_gt", [unescape("chemical/x-jcamp-dx")]),smalltalk.send("jmz", "__minus_gt", [unescape("application/x-jmol")]),smalltalk.send("jng", "__minus_gt", [unescape("image/x-jng")]),smalltalk.send("jnlp", "__minus_gt", [unescape("application/x-java-jnlp-file")]),smalltalk.send("jpe", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("jpeg", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("jpg", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("js", "__minus_gt", [unescape("application/javascript")]),smalltalk.send("kar", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("key", "__minus_gt", [unescape("application/pgp-keys")]),smalltalk.send("kil", "__minus_gt", [unescape("application/x-killustrator")]),smalltalk.send("kin", "__minus_gt", [unescape("chemical/x-kinemage")]),smalltalk.send("kpr", "__minus_gt", [unescape("application/x-kpresenter")]),smalltalk.send("kpt", "__minus_gt", [unescape("application/x-kpresenter")]),smalltalk.send("ksp", "__minus_gt", [unescape("application/x-kspread")]),smalltalk.send("kwd", "__minus_gt", [unescape("application/x-kword")]),smalltalk.send("kwt", "__minus_gt", [unescape("application/x-kword")]),smalltalk.send("latex", "__minus_gt", [unescape("application/x-latex")]),smalltalk.send("lha", "__minus_gt", [unescape("application/x-lha")]),smalltalk.send("lhs", "__minus_gt", [unescape("text/x-literate-haskell")]),smalltalk.send("lsf", "__minus_gt", [unescape("video/x-la-asf")]),smalltalk.send("lsx", "__minus_gt", [unescape("video/x-la-asf")]),smalltalk.send("ltx", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("lzh", "__minus_gt", [unescape("application/x-lzh")]),smalltalk.send("lzx", "__minus_gt", [unescape("application/x-lzx")]),smalltalk.send("m3u", "__minus_gt", [unescape("audio/x-mpegurl")]),smalltalk.send("m4a", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("maker", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("man", "__minus_gt", [unescape("application/x-troff-man")]),smalltalk.send("mcif", "__minus_gt", [unescape("chemical/x-mmcif")]),smalltalk.send("mcm", "__minus_gt", [unescape("chemical/x-macmolecule")]),smalltalk.send("mdb", "__minus_gt", [unescape("application/msaccess")]),smalltalk.send("me", "__minus_gt", [unescape("application/x-troff-me")]),smalltalk.send("mesh", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("mid", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("midi", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("mif", "__minus_gt", [unescape("application/x-mif")]),smalltalk.send("mm", "__minus_gt", [unescape("application/x-freemind")]),smalltalk.send("mmd", "__minus_gt", [unescape("chemical/x-macromodel-input")]),smalltalk.send("mmf", "__minus_gt", [unescape("application/vnd.smaf")]),smalltalk.send("mml", "__minus_gt", [unescape("text/mathml")]),smalltalk.send("mmod", "__minus_gt", [unescape("chemical/x-macromodel-input")]),smalltalk.send("mng", "__minus_gt", [unescape("video/x-mng")]),smalltalk.send("moc", "__minus_gt", [unescape("text/x-moc")]),smalltalk.send("mol", "__minus_gt", [unescape("chemical/x-mdl-molfile")]),smalltalk.send("mol2", "__minus_gt", [unescape("chemical/x-mol2")]),smalltalk.send("moo", "__minus_gt", [unescape("chemical/x-mopac-out")]),smalltalk.send("mop", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mopcrt", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mov", "__minus_gt", [unescape("video/quicktime")]),smalltalk.send("movie", "__minus_gt", [unescape("video/x-sgi-movie")]),smalltalk.send("mp2", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mp3", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mp4", "__minus_gt", [unescape("video/mp4")]),smalltalk.send("mpc", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mpe", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpeg", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpega", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mpg", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpga", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("ms", "__minus_gt", [unescape("application/x-troff-ms")]),smalltalk.send("msh", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("msi", "__minus_gt", [unescape("application/x-msi")]),smalltalk.send("mvb", "__minus_gt", [unescape("chemical/x-mopac-vib")]),smalltalk.send("mxu", "__minus_gt", [unescape("video/vnd.mpegurl")]),smalltalk.send("nb", "__minus_gt", [unescape("application/mathematica")]),smalltalk.send("nc", "__minus_gt", [unescape("application/x-netcdf")]),smalltalk.send("nwc", "__minus_gt", [unescape("application/x-nwc")]),smalltalk.send("o", "__minus_gt", [unescape("application/x-object")]),smalltalk.send("oda", "__minus_gt", [unescape("application/oda")]),smalltalk.send("odb", "__minus_gt", [unescape("application/vnd.oasis.opendocument.database")]),smalltalk.send("odc", "__minus_gt", [unescape("application/vnd.oasis.opendocument.chart")]),smalltalk.send("odf", "__minus_gt", [unescape("application/vnd.oasis.opendocument.formula")]),smalltalk.send("odg", "__minus_gt", [unescape("application/vnd.oasis.opendocument.graphics")]),smalltalk.send("odi", "__minus_gt", [unescape("application/vnd.oasis.opendocument.image")]),smalltalk.send("odm", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text-master")]),smalltalk.send("odp", "__minus_gt", [unescape("application/vnd.oasis.opendocument.presentation")]),smalltalk.send("ods", "__minus_gt", [unescape("application/vnd.oasis.opendocument.spreadsheet")]),smalltalk.send("odt", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text")]),smalltalk.send("ogg", "__minus_gt", [unescape("application/ogg")]),smalltalk.send("old", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("oth", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text-web")]),smalltalk.send("oza", "__minus_gt", [unescape("application/x-oz-application")]),smalltalk.send("p", "__minus_gt", [unescape("text/x-pascal")]),smalltalk.send("p7r", "__minus_gt", [unescape("application/x-pkcs7-certreqresp")]),smalltalk.send("pac", "__minus_gt", [unescape("application/x-ns-proxy-autoconfig")]),smalltalk.send("pas", "__minus_gt", [unescape("text/x-pascal")]),smalltalk.send("pat", "__minus_gt", [unescape("image/x-coreldrawpattern")]),smalltalk.send("pbm", "__minus_gt", [unescape("image/x-portable-bitmap")]),smalltalk.send("pcf", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pcf.Z", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pcx", "__minus_gt", [unescape("image/pcx")]),smalltalk.send("pdb", "__minus_gt", [unescape("chemical/x-pdb")]),smalltalk.send("pdf", "__minus_gt", [unescape("application/pdf")]),smalltalk.send("pfa", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pfb", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pgm", "__minus_gt", [unescape("image/x-portable-graymap")]),smalltalk.send("pgn", "__minus_gt", [unescape("application/x-chess-pgn")]),smalltalk.send("pgp", "__minus_gt", [unescape("application/pgp-signature")]),smalltalk.send("pk", "__minus_gt", [unescape("application/x-tex-pk")]),smalltalk.send("pl", "__minus_gt", [unescape("text/x-perl")]),smalltalk.send("pls", "__minus_gt", [unescape("audio/x-scpls")]),smalltalk.send("pm", "__minus_gt", [unescape("text/x-perl")]),smalltalk.send("png", "__minus_gt", [unescape("image/png")]),smalltalk.send("pnm", "__minus_gt", [unescape("image/x-portable-anymap")]),smalltalk.send("pot", "__minus_gt", [unescape("text/plain")]),smalltalk.send("ppm", "__minus_gt", [unescape("image/x-portable-pixmap")]),smalltalk.send("pps", "__minus_gt", [unescape("application/vnd.ms-powerpoint")]),smalltalk.send("ppt", "__minus_gt", [unescape("application/vnd.ms-powerpoint")]),smalltalk.send("prf", "__minus_gt", [unescape("application/pics-rules")]),smalltalk.send("prt", "__minus_gt", [unescape("chemical/x-ncbi-asn1-ascii")]),smalltalk.send("ps", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("psd", "__minus_gt", [unescape("image/x-photoshop")]),smalltalk.send("psp", "__minus_gt", [unescape("text/x-psp")]),smalltalk.send("py", "__minus_gt", [unescape("text/x-python")]),smalltalk.send("pyc", "__minus_gt", [unescape("application/x-python-code")]),smalltalk.send("pyo", "__minus_gt", [unescape("application/x-python-code")]),smalltalk.send("qt", "__minus_gt", [unescape("video/quicktime")]),smalltalk.send("qtl", "__minus_gt", [unescape("application/x-quicktimeplayer")]),smalltalk.send("ra", "__minus_gt", [unescape("audio/x-realaudio")]),smalltalk.send("ram", "__minus_gt", [unescape("audio/x-pn-realaudio")]),smalltalk.send("rar", "__minus_gt", [unescape("application/rar")]),smalltalk.send("ras", "__minus_gt", [unescape("image/x-cmu-raster")]),smalltalk.send("rd", "__minus_gt", [unescape("chemical/x-mdl-rdfile")]),smalltalk.send("rdf", "__minus_gt", [unescape("application/rdf+xml")]),smalltalk.send("rgb", "__minus_gt", [unescape("image/x-rgb")]),smalltalk.send("rm", "__minus_gt", [unescape("audio/x-pn-realaudio")]),smalltalk.send("roff", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("ros", "__minus_gt", [unescape("chemical/x-rosdal")]),smalltalk.send("rpm", "__minus_gt", [unescape("application/x-redhat-package-manager")]),smalltalk.send("rss", "__minus_gt", [unescape("application/rss+xml")]),smalltalk.send("rtf", "__minus_gt", [unescape("text/rtf")]),smalltalk.send("rtx", "__minus_gt", [unescape("text/richtext")]),smalltalk.send("rxn", "__minus_gt", [unescape("chemical/x-mdl-rxnfile")]),smalltalk.send("sct", "__minus_gt", [unescape("text/scriptlet")]),smalltalk.send("sd", "__minus_gt", [unescape("chemical/x-mdl-sdfile")]),smalltalk.send("sd2", "__minus_gt", [unescape("audio/x-sd2")]),smalltalk.send("sda", "__minus_gt", [unescape("application/vnd.stardivision.draw")]),smalltalk.send("sdc", "__minus_gt", [unescape("application/vnd.stardivision.calc")]),smalltalk.send("sdd", "__minus_gt", [unescape("application/vnd.stardivision.impress")]),smalltalk.send("sdf", "__minus_gt", [unescape("chemical/x-mdl-sdfile")]),smalltalk.send("sdp", "__minus_gt", [unescape("application/vnd.stardivision.impress")]),smalltalk.send("sdw", "__minus_gt", [unescape("application/vnd.stardivision.writer")]),smalltalk.send("ser", "__minus_gt", [unescape("application/java-serialized-object")]),smalltalk.send("sgf", "__minus_gt", [unescape("application/x-go-sgf")]),smalltalk.send("sgl", "__minus_gt", [unescape("application/vnd.stardivision.writer-global")]),smalltalk.send("sh", "__minus_gt", [unescape("text/x-sh")]),smalltalk.send("shar", "__minus_gt", [unescape("application/x-shar")]),smalltalk.send("shtml", "__minus_gt", [unescape("text/html")]),smalltalk.send("sid", "__minus_gt", [unescape("audio/prs.sid")]),smalltalk.send("sik", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("silo", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("sis", "__minus_gt", [unescape("application/vnd.symbian.install")]),smalltalk.send("sit", "__minus_gt", [unescape("application/x-stuffit")]),smalltalk.send("skd", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skm", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skp", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skt", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("smf", "__minus_gt", [unescape("application/vnd.stardivision.math")]),smalltalk.send("smi", "__minus_gt", [unescape("application/smil")]),smalltalk.send("smil", "__minus_gt", [unescape("application/smil")]),smalltalk.send("snd", "__minus_gt", [unescape("audio/basic")]),smalltalk.send("spc", "__minus_gt", [unescape("chemical/x-galactic-spc")]),smalltalk.send("spl", "__minus_gt", [unescape("application/x-futuresplash")]),smalltalk.send("src", "__minus_gt", [unescape("application/x-wais-source")]),smalltalk.send("stc", "__minus_gt", [unescape("application/vnd.sun.xml.calc.template")]),smalltalk.send("std", "__minus_gt", [unescape("application/vnd.sun.xml.draw.template")]),smalltalk.send("sti", "__minus_gt", [unescape("application/vnd.sun.xml.impress.template")]),smalltalk.send("stl", "__minus_gt", [unescape("application/vnd.ms-pki.stl")]),smalltalk.send("stw", "__minus_gt", [unescape("application/vnd.sun.xml.writer.template")]),smalltalk.send("sty", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("sv4cpio", "__minus_gt", [unescape("application/x-sv4cpio")]),smalltalk.send("sv4crc", "__minus_gt", [unescape("application/x-sv4crc")]),smalltalk.send("svg", "__minus_gt", [unescape("image/svg+xml")]),smalltalk.send("svgz", "__minus_gt", [unescape("image/svg+xml")]),smalltalk.send("sw", "__minus_gt", [unescape("chemical/x-swissprot")]),smalltalk.send("swf", "__minus_gt", [unescape("application/x-shockwave-flash")]),smalltalk.send("swfl", "__minus_gt", [unescape("application/x-shockwave-flash")]),smalltalk.send("sxc", "__minus_gt", [unescape("application/vnd.sun.xml.calc")]),smalltalk.send("sxd", "__minus_gt", [unescape("application/vnd.sun.xml.draw")]),smalltalk.send("sxg", "__minus_gt", [unescape("application/vnd.sun.xml.writer.global")]),smalltalk.send("sxi", "__minus_gt", [unescape("application/vnd.sun.xml.impress")]),smalltalk.send("sxm", "__minus_gt", [unescape("application/vnd.sun.xml.math")]),smalltalk.send("sxw", "__minus_gt", [unescape("application/vnd.sun.xml.writer")]),smalltalk.send("t", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("tar", "__minus_gt", [unescape("application/x-tar")]),smalltalk.send("taz", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("tcl", "__minus_gt", [unescape("text/x-tcl")]),smalltalk.send("tex", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("texi", "__minus_gt", [unescape("application/x-texinfo")]),smalltalk.send("texinfo", "__minus_gt", [unescape("application/x-texinfo")]),smalltalk.send("text", "__minus_gt", [unescape("text/plain")]),smalltalk.send("tgf", "__minus_gt", [unescape("chemical/x-mdl-tgf")]),smalltalk.send("tgz", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("tif", "__minus_gt", [unescape("image/tiff")]),smalltalk.send("tiff", "__minus_gt", [unescape("image/tiff")]),smalltalk.send("tk", "__minus_gt", [unescape("text/x-tcl")]),smalltalk.send("tm", "__minus_gt", [unescape("text/texmacs")]),smalltalk.send("torrent", "__minus_gt", [unescape("application/x-bittorrent")]),smalltalk.send("tr", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("ts", "__minus_gt", [unescape("text/texmacs")]),smalltalk.send("tsp", "__minus_gt", [unescape("application/dsptype")]),smalltalk.send("tsv", "__minus_gt", [unescape("text/tab-separated-values")]),smalltalk.send("txt", "__minus_gt", [unescape("text/plain")]),smalltalk.send("udeb", "__minus_gt", [unescape("application/x-debian-package")]),smalltalk.send("uls", "__minus_gt", [unescape("text/iuls")]),smalltalk.send("ustar", "__minus_gt", [unescape("application/x-ustar")]),smalltalk.send("val", "__minus_gt", [unescape("chemical/x-ncbi-asn1-binary")]),smalltalk.send("vcd", "__minus_gt", [unescape("application/x-cdlink")]),smalltalk.send("vcf", "__minus_gt", [unescape("text/x-vcard")]),smalltalk.send("vcs", "__minus_gt", [unescape("text/x-vcalendar")]),smalltalk.send("vmd", "__minus_gt", [unescape("chemical/x-vmd")]),smalltalk.send("vms", "__minus_gt", [unescape("chemical/x-vamas-iso14976")]),smalltalk.send("vor", "__minus_gt", [unescape("application/vnd.stardivision.writer")]),smalltalk.send("vrm", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("vrml", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("vsd", "__minus_gt", [unescape("application/vnd.visio")]),smalltalk.send("wad", "__minus_gt", [unescape("application/x-doom")]),smalltalk.send("wav", "__minus_gt", [unescape("audio/x-wav")]),smalltalk.send("wax", "__minus_gt", [unescape("audio/x-ms-wax")]),smalltalk.send("wbmp", "__minus_gt", [unescape("image/vnd.wap.wbmp")]),smalltalk.send("wbxml", "__minus_gt", [unescape("application/vnd.wap.wbxml")]),smalltalk.send("wk", "__minus_gt", [unescape("application/x-123")]),smalltalk.send("wm", "__minus_gt", [unescape("video/x-ms-wm")]),smalltalk.send("wma", "__minus_gt", [unescape("audio/x-ms-wma")]),smalltalk.send("wmd", "__minus_gt", [unescape("application/x-ms-wmd")]),smalltalk.send("wml", "__minus_gt", [unescape("text/vnd.wap.wml")]),smalltalk.send("wmlc", "__minus_gt", [unescape("application/vnd.wap.wmlc")]),smalltalk.send("wmls", "__minus_gt", [unescape("text/vnd.wap.wmlscript")]),smalltalk.send("wmlsc", "__minus_gt", [unescape("application/vnd.wap.wmlscriptc")]),smalltalk.send("wmv", "__minus_gt", [unescape("video/x-ms-wmv")]),smalltalk.send("wmx", "__minus_gt", [unescape("video/x-ms-wmx")]),smalltalk.send("wmz", "__minus_gt", [unescape("application/x-ms-wmz")]),smalltalk.send("wp5", "__minus_gt", [unescape("application/wordperfect5.1")]),smalltalk.send("wpd", "__minus_gt", [unescape("application/wordperfect")]),smalltalk.send("wrl", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("wsc", "__minus_gt", [unescape("text/scriptlet")]),smalltalk.send("wvx", "__minus_gt", [unescape("video/x-ms-wvx")]),smalltalk.send("wz", "__minus_gt", [unescape("application/x-wingz")]),smalltalk.send("xbm", "__minus_gt", [unescape("image/x-xbitmap")]),smalltalk.send("xcf", "__minus_gt", [unescape("application/x-xcf")]),smalltalk.send("xht", "__minus_gt", [unescape("application/xhtml+xml")]),smalltalk.send("xhtml", "__minus_gt", [unescape("application/xhtml+xml")]),smalltalk.send("xlb", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xls", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xlt", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xml", "__minus_gt", [unescape("application/xml")]),smalltalk.send("xpi", "__minus_gt", [unescape("application/x-xpinstall")]),smalltalk.send("xpm", "__minus_gt", [unescape("image/x-xpixmap")]),smalltalk.send("xsl", "__minus_gt", [unescape("application/xml")]),smalltalk.send("xtel", "__minus_gt", [unescape("chemical/x-xtel")]),smalltalk.send("xul", "__minus_gt", [unescape("application/vnd.mozilla.xul+xml")]),smalltalk.send("xwd", "__minus_gt", [unescape("image/x-xwindowdump")]),smalltalk.send("xyz", "__minus_gt", [unescape("chemical/x-xyz")]),smalltalk.send("zip", "__minus_gt", [unescape("application/zip")]),smalltalk.send("zmt", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send(unescape("%7E"), "__minus_gt", [unescape("application/x-trash")])]);
  8844. return self;},
  8845. args: [],
  8846. source: unescape('defaultMimeTypes%0A%09%5E%20%23%7B%0A%09%09%27%25%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27323%27%20-%3E%20%27text/h323%27.%0A%09%09%27abw%27%20-%3E%20%27application/x-abiword%27.%0A%09%09%27ai%27%20-%3E%20%27application/postscript%27.%0A%09%09%27aif%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27aifc%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27aiff%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27alc%27%20-%3E%20%27chemical/x-alchemy%27.%0A%09%09%27art%27%20-%3E%20%27image/x-jg%27.%0A%09%09%27asc%27%20-%3E%20%27text/plain%27.%0A%09%09%27asf%27%20-%3E%20%27video/x-ms-asf%27.%0A%09%09%27asn%27%20-%3E%20%27chemical/x-ncbi-asn1-spec%27.%0A%09%09%27aso%27%20-%3E%20%27chemical/x-ncbi-asn1-binary%27.%0A%09%09%27asx%27%20-%3E%20%27video/x-ms-asf%27.%0A%09%09%27au%27%20-%3E%20%27audio/basic%27.%0A%09%09%27avi%27%20-%3E%20%27video/x-msvideo%27.%0A%09%09%27b%27%20-%3E%20%27chemical/x-molconn-Z%27.%0A%09%09%27bak%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27bat%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27bcpio%27%20-%3E%20%27application/x-bcpio%27.%0A%09%09%27bib%27%20-%3E%20%27text/x-bibtex%27.%0A%09%09%27bin%27%20-%3E%20%27application/octet-stream%27.%0A%09%09%27bmp%27%20-%3E%20%27image/x-ms-bmp%27.%0A%09%09%27book%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27bsd%27%20-%3E%20%27chemical/x-crossfire%27.%0A%09%09%27c%27%20-%3E%20%27text/x-csrc%27.%0A%09%09%27c++%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27c3d%27%20-%3E%20%27chemical/x-chem3d%27.%0A%09%09%27cac%27%20-%3E%20%27chemical/x-cache%27.%0A%09%09%27cache%27%20-%3E%20%27chemical/x-cache%27.%0A%09%09%27cascii%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27cat%27%20-%3E%20%27application/vnd.ms-pki.seccat%27.%0A%09%09%27cbin%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27cc%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27cdf%27%20-%3E%20%27application/x-cdf%27.%0A%09%09%27cdr%27%20-%3E%20%27image/x-coreldraw%27.%0A%09%09%27cdt%27%20-%3E%20%27image/x-coreldrawtemplate%27.%0A%09%09%27cdx%27%20-%3E%20%27chemical/x-cdx%27.%0A%09%09%27cdy%27%20-%3E%20%27application/vnd.cinderella%27.%0A%09%09%27cef%27%20-%3E%20%27chemical/x-cxf%27.%0A%09%09%27cer%27%20-%3E%20%27chemical/x-cerius%27.%0A%09%09%27chm%27%20-%3E%20%27chemical/x-chemdraw%27.%0A%09%09%27chrt%27%20-%3E%20%27application/x-kchart%27.%0A%09%09%27cif%27%20-%3E%20%27chemical/x-cif%27.%0A%09%09%27class%27%20-%3E%20%27application/java-vm%27.%0A%09%09%27cls%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27cmdf%27%20-%3E%20%27chemical/x-cmdf%27.%0A%09%09%27cml%27%20-%3E%20%27chemical/x-cml%27.%0A%09%09%27cod%27%20-%3E%20%27application/vnd.rim.cod%27.%0A%09%09%27com%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27cpa%27%20-%3E%20%27chemical/x-compass%27.%0A%09%09%27cpio%27%20-%3E%20%27application/x-cpio%27.%0A%09%09%27cpp%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27cpt%27%20-%3E%20%27image/x-corelphotopaint%27.%0A%09%09%27crl%27%20-%3E%20%27application/x-pkcs7-crl%27.%0A%09%09%27crt%27%20-%3E%20%27application/x-x509-ca-cert%27.%0A%09%09%27csf%27%20-%3E%20%27chemical/x-cache-csf%27.%0A%09%09%27csh%27%20-%3E%20%27text/x-csh%27.%0A%09%09%27csm%27%20-%3E%20%27chemical/x-csml%27.%0A%09%09%27csml%27%20-%3E%20%27chemical/x-csml%27.%0A%09%09%27css%27%20-%3E%20%27text/css%27.%0A%09%09%27csv%27%20-%3E%20%27text/comma-separated-values%27.%0A%09%09%27ctab%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27ctx%27%20-%3E%20%27chemical/x-ctx%27.%0A%09%09%27cu%27%20-%3E%20%27application/cu-seeme%27.%0A%09%09%27cub%27%20-%3E%20%27chemical/x-gaussian-cube%27.%0A%09%09%27cxf%27%20-%3E%20%27chemical/x-cxf%27.%0A%09%09%27cxx%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27dat%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27dcr%27%20-%3E%20%27application/x-director%27.%0A%09%09%27deb%27%20-%3E%20%27application/x-debian-package%27.%0A%09%09%27dif%27%20-%3E%20%27video/dv%27.%0A%09%09%27diff%27%20-%3E%20%27text/plain%27.%0A%09%09%27dir%27%20-%3E%20%27application/x-director%27.%0A%09%09%27djv%27%20-%3E%20%27image/vnd.djvu%27.%0A%09%09%27djvu%27%20-%3E%20%27image/vnd.djvu%27.%0A%09%09%27dl%27%20-%3E%20%27video/dl%27.%0A%09%09%27dll%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27dmg%27%20-%3E%20%27application/x-apple-diskimage%27.%0A%09%09%27dms%27%20-%3E%20%27application/x-dms%27.%0A%09%09%27doc%27%20-%3E%20%27application/msword%27.%0A%09%09%27dot%27%20-%3E%20%27application/msword%27.%0A%09%09%27dv%27%20-%3E%20%27video/dv%27.%0A%09%09%27dvi%27%20-%3E%20%27application/x-dvi%27.%0A%09%09%27dx%27%20-%3E%20%27chemical/x-jcamp-dx%27.%0A%09%09%27dxr%27%20-%3E%20%27application/x-director%27.%0A%09%09%27emb%27%20-%3E%20%27chemical/x-embl-dl-nucleotide%27.%0A%09%09%27embl%27%20-%3E%20%27chemical/x-embl-dl-nucleotide%27.%0A%09%09%27ent%27%20-%3E%20%27chemical/x-pdb%27.%0A%09%09%27eps%27%20-%3E%20%27application/postscript%27.%0A%09%09%27etx%27%20-%3E%20%27text/x-setext%27.%0A%09%09%27exe%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27ez%27%20-%3E%20%27application/andrew-inset%27.%0A%09%09%27fb%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27fbdoc%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27fch%27%20-%3E%20%27chemical/x-gaussian-checkpoint%27.%0A%09%09%27fchk%27%20-%3E%20%27chemical/x-gaussian-checkpoint%27.%0A%09%09%27fig%27%20-%3E%20%27application/x-xfig%27.%0A%09%09%27flac%27%20-%3E%20%27application/x-flac%27.%0A%09%09%27fli%27%20-%3E%20%27video/fli%27.%0A%09%09%27fm%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27frame%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27frm%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27gal%27%20-%3E%20%27chemical/x-gaussian-log%27.%0A%09%09%27gam%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27gamin%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27gau%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gcd%27%20-%3E%20%27text/x-pcs-gcd%27.%0A%09%09%27gcf%27%20-%3E%20%27application/x-graphing-calculator%27.%0A%09%09%27gcg%27%20-%3E%20%27chemical/x-gcg8-sequence%27.%0A%09%09%27gen%27%20-%3E%20%27chemical/x-genbank%27.%0A%09%09%27gf%27%20-%3E%20%27application/x-tex-gf%27.%0A%09%09%27gif%27%20-%3E%20%27image/gif%27.%0A%09%09%27gjc%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gjf%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gl%27%20-%3E%20%27video/gl%27.%0A%09%09%27gnumeric%27%20-%3E%20%27application/x-gnumeric%27.%0A%09%09%27gpt%27%20-%3E%20%27chemical/x-mopac-graph%27.%0A%09%09%27gsf%27%20-%3E%20%27application/x-font%27.%0A%09%09%27gsm%27%20-%3E%20%27audio/x-gsm%27.%0A%09%09%27gtar%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27h%27%20-%3E%20%27text/x-chdr%27.%0A%09%09%27h++%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hdf%27%20-%3E%20%27application/x-hdf%27.%0A%09%09%27hh%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hin%27%20-%3E%20%27chemical/x-hin%27.%0A%09%09%27hpp%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hqx%27%20-%3E%20%27application/mac-binhex40%27.%0A%09%09%27hs%27%20-%3E%20%27text/x-haskell%27.%0A%09%09%27hta%27%20-%3E%20%27application/hta%27.%0A%09%09%27htc%27%20-%3E%20%27text/x-component%27.%0A%09%09%27htm%27%20-%3E%20%27text/html%27.%0A%09%09%27html%27%20-%3E%20%27text/html%27.%0A%09%09%27hxx%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27ica%27%20-%3E%20%27application/x-ica%27.%0A%09%09%27ice%27%20-%3E%20%27x-conference/x-cooltalk%27.%0A%09%09%27ico%27%20-%3E%20%27image/x-icon%27.%0A%09%09%27ics%27%20-%3E%20%27text/calendar%27.%0A%09%09%27icz%27%20-%3E%20%27text/calendar%27.%0A%09%09%27ief%27%20-%3E%20%27image/ief%27.%0A%09%09%27iges%27%20-%3E%20%27model/iges%27.%0A%09%09%27igs%27%20-%3E%20%27model/iges%27.%0A%09%09%27iii%27%20-%3E%20%27application/x-iphone%27.%0A%09%09%27inp%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27ins%27%20-%3E%20%27application/x-internet-signup%27.%0A%09%09%27iso%27%20-%3E%20%27application/x-iso9660-image%27.%0A%09%09%27isp%27%20-%3E%20%27application/x-internet-signup%27.%0A%09%09%27ist%27%20-%3E%20%27chemical/x-isostar%27.%0A%09%09%27istr%27%20-%3E%20%27chemical/x-isostar%27.%0A%09%09%27jad%27%20-%3E%20%27text/vnd.sun.j2me.app-descriptor%27.%0A%09%09%27jar%27%20-%3E%20%27application/java-archive%27.%0A%09%09%27java%27%20-%3E%20%27text/x-java%27.%0A%09%09%27jdx%27%20-%3E%20%27chemical/x-jcamp-dx%27.%0A%09%09%27jmz%27%20-%3E%20%27application/x-jmol%27.%0A%09%09%27jng%27%20-%3E%20%27image/x-jng%27.%0A%09%09%27jnlp%27%20-%3E%20%27application/x-java-jnlp-file%27.%0A%09%09%27jpe%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27jpeg%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27jpg%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27js%27%20-%3E%20%27application/javascript%27.%0A%09%09%27kar%27%20-%3E%20%27audio/midi%27.%0A%09%09%27key%27%20-%3E%20%27application/pgp-keys%27.%0A%09%09%27kil%27%20-%3E%20%27application/x-killustrator%27.%0A%09%09%27kin%27%20-%3E%20%27chemical/x-kinemage%27.%0A%09%09%27kpr%27%20-%3E%20%27application/x-kpresenter%27.%0A%09%09%27kpt%27%20-%3E%20%27application/x-kpresenter%27.%0A%09%09%27ksp%27%20-%3E%20%27application/x-kspread%27.%0A%09%09%27kwd%27%20-%3E%20%27application/x-kword%27.%0A%09%09%27kwt%27%20-%3E%20%27application/x-kword%27.%0A%09%09%27latex%27%20-%3E%20%27application/x-latex%27.%0A%09%09%27lha%27%20-%3E%20%27application/x-lha%27.%0A%09%09%27lhs%27%20-%3E%20%27text/x-literate-haskell%27.%0A%09%09%27lsf%27%20-%3E%20%27video/x-la-asf%27.%0A%09%09%27lsx%27%20-%3E%20%27video/x-la-asf%27.%0A%09%09%27ltx%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27lzh%27%20-%3E%20%27application/x-lzh%27.%0A%09%09%27lzx%27%20-%3E%20%27application/x-lzx%27.%0A%09%09%27m3u%27%20-%3E%20%27audio/x-mpegurl%27.%0A%09%09%27m4a%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27maker%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27man%27%20-%3E%20%27application/x-troff-man%27.%0A%09%09%27mcif%27%20-%3E%20%27chemical/x-mmcif%27.%0A%09%09%27mcm%27%20-%3E%20%27chemical/x-macmolecule%27.%0A%09%09%27mdb%27%20-%3E%20%27application/msaccess%27.%0A%09%09%27me%27%20-%3E%20%27application/x-troff-me%27.%0A%09%09%27mesh%27%20-%3E%20%27model/mesh%27.%0A%09%09%27mid%27%20-%3E%20%27audio/midi%27.%0A%09%09%27midi%27%20-%3E%20%27audio/midi%27.%0A%09%09%27mif%27%20-%3E%20%27application/x-mif%27.%0A%09%09%27mm%27%20-%3E%20%27application/x-freemind%27.%0A%09%09%27mmd%27%20-%3E%20%27chemical/x-macromodel-input%27.%0A%09%09%27mmf%27%20-%3E%20%27application/vnd.smaf%27.%0A%09%09%27mml%27%20-%3E%20%27text/mathml%27.%0A%09%09%27mmod%27%20-%3E%20%27chemical/x-macromodel-input%27.%0A%09%09%27mng%27%20-%3E%20%27video/x-mng%27.%0A%09%09%27moc%27%20-%3E%20%27text/x-moc%27.%0A%09%09%27mol%27%20-%3E%20%27chemical/x-mdl-molfile%27.%0A%09%09%27mol2%27%20-%3E%20%27chemical/x-mol2%27.%0A%09%09%27moo%27%20-%3E%20%27chemical/x-mopac-out%27.%0A%09%09%27mop%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mopcrt%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mov%27%20-%3E%20%27video/quicktime%27.%0A%09%09%27movie%27%20-%3E%20%27video/x-sgi-movie%27.%0A%09%09%27mp2%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mp3%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mp4%27%20-%3E%20%27video/mp4%27.%0A%09%09%27mpc%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mpe%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpeg%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpega%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mpg%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpga%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27ms%27%20-%3E%20%27application/x-troff-ms%27.%0A%09%09%27msh%27%20-%3E%20%27model/mesh%27.%0A%09%09%27msi%27%20-%3E%20%27application/x-msi%27.%0A%09%09%27mvb%27%20-%3E%20%27chemical/x-mopac-vib%27.%0A%09%09%27mxu%27%20-%3E%20%27video/vnd.mpegurl%27.%0A%09%09%27nb%27%20-%3E%20%27application/mathematica%27.%0A%09%09%27nc%27%20-%3E%20%27application/x-netcdf%27.%0A%09%09%27nwc%27%20-%3E%20%27application/x-nwc%27.%0A%09%09%27o%27%20-%3E%20%27application/x-object%27.%0A%09%09%27oda%27%20-%3E%20%27application/oda%27.%0A%09%09%27odb%27%20-%3E%20%27application/vnd.oasis.opendocument.database%27.%0A%09%09%27odc%27%20-%3E%20%27application/vnd.oasis.opendocument.chart%27.%0A%09%09%27odf%27%20-%3E%20%27application/vnd.oasis.opendocument.formula%27.%0A%09%09%27odg%27%20-%3E%20%27application/vnd.oasis.opendocument.graphics%27.%0A%09%09%27odi%27%20-%3E%20%27application/vnd.oasis.opendocument.image%27.%0A%09%09%27odm%27%20-%3E%20%27application/vnd.oasis.opendocument.text-master%27.%0A%09%09%27odp%27%20-%3E%20%27application/vnd.oasis.opendocument.presentation%27.%0A%09%09%27ods%27%20-%3E%20%27application/vnd.oasis.opendocument.spreadsheet%27.%0A%09%09%27odt%27%20-%3E%20%27application/vnd.oasis.opendocument.text%27.%0A%09%09%27ogg%27%20-%3E%20%27application/ogg%27.%0A%09%09%27old%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27oth%27%20-%3E%20%27application/vnd.oasis.opendocument.text-web%27.%0A%09%09%27oza%27%20-%3E%20%27application/x-oz-application%27.%0A%09%09%27p%27%20-%3E%20%27text/x-pascal%27.%0A%09%09%27p7r%27%20-%3E%20%27application/x-pkcs7-certreqresp%27.%0A%09%09%27pac%27%20-%3E%20%27application/x-ns-proxy-autoconfig%27.%0A%09%09%27pas%27%20-%3E%20%27text/x-pascal%27.%0A%09%09%27pat%27%20-%3E%20%27image/x-coreldrawpattern%27.%0A%09%09%27pbm%27%20-%3E%20%27image/x-portable-bitmap%27.%0A%09%09%27pcf%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pcf.Z%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pcx%27%20-%3E%20%27image/pcx%27.%0A%09%09%27pdb%27%20-%3E%20%27chemical/x-pdb%27.%0A%09%09%27pdf%27%20-%3E%20%27application/pdf%27.%0A%09%09%27pfa%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pfb%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pgm%27%20-%3E%20%27image/x-portable-graymap%27.%0A%09%09%27pgn%27%20-%3E%20%27application/x-chess-pgn%27.%0A%09%09%27pgp%27%20-%3E%20%27application/pgp-signature%27.%0A%09%09%27pk%27%20-%3E%20%27application/x-tex-pk%27.%0A%09%09%27pl%27%20-%3E%20%27text/x-perl%27.%0A%09%09%27pls%27%20-%3E%20%27audio/x-scpls%27.%0A%09%09%27pm%27%20-%3E%20%27text/x-perl%27.%0A%09%09%27png%27%20-%3E%20%27image/png%27.%0A%09%09%27pnm%27%20-%3E%20%27image/x-portable-anymap%27.%0A%09%09%27pot%27%20-%3E%20%27text/plain%27.%0A%09%09%27ppm%27%20-%3E%20%27image/x-portable-pixmap%27.%0A%09%09%27pps%27%20-%3E%20%27application/vnd.ms-powerpoint%27.%0A%09%09%27ppt%27%20-%3E%20%27application/vnd.ms-powerpoint%27.%0A%09%09%27prf%27%20-%3E%20%27application/pics-rules%27.%0A%09%09%27prt%27%20-%3E%20%27chemical/x-ncbi-asn1-ascii%27.%0A%09%09%27ps%27%20-%3E%20%27application/postscript%27.%0A%09%09%27psd%27%20-%3E%20%27image/x-photoshop%27.%0A%09%09%27psp%27%20-%3E%20%27text/x-psp%27.%0A%09%09%27py%27%20-%3E%20%27text/x-python%27.%0A%09%09%27pyc%27%20-%3E%20%27application/x-python-code%27.%0A%09%09%27pyo%27%20-%3E%20%27application/x-python-code%27.%0A%09%09%27qt%27%20-%3E%20%27video/quicktime%27.%0A%09%09%27qtl%27%20-%3E%20%27application/x-quicktimeplayer%27.%0A%09%09%27ra%27%20-%3E%20%27audio/x-realaudio%27.%0A%09%09%27ram%27%20-%3E%20%27audio/x-pn-realaudio%27.%0A%09%09%27rar%27%20-%3E%20%27application/rar%27.%0A%09%09%27ras%27%20-%3E%20%27image/x-cmu-raster%27.%0A%09%09%27rd%27%20-%3E%20%27chemical/x-mdl-rdfile%27.%0A%09%09%27rdf%27%20-%3E%20%27application/rdf+xml%27.%0A%09%09%27rgb%27%20-%3E%20%27image/x-rgb%27.%0A%09%09%27rm%27%20-%3E%20%27audio/x-pn-realaudio%27.%0A%09%09%27roff%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27ros%27%20-%3E%20%27chemical/x-rosdal%27.%0A%09%09%27rpm%27%20-%3E%20%27application/x-redhat-package-manager%27.%0A%09%09%27rss%27%20-%3E%20%27application/rss+xml%27.%0A%09%09%27rtf%27%20-%3E%20%27text/rtf%27.%0A%09%09%27rtx%27%20-%3E%20%27text/richtext%27.%0A%09%09%27rxn%27%20-%3E%20%27chemical/x-mdl-rxnfile%27.%0A%09%09%27sct%27%20-%3E%20%27text/scriptlet%27.%0A%09%09%27sd%27%20-%3E%20%27chemical/x-mdl-sdfile%27.%0A%09%09%27sd2%27%20-%3E%20%27audio/x-sd2%27.%0A%09%09%27sda%27%20-%3E%20%27application/vnd.stardivision.draw%27.%0A%09%09%27sdc%27%20-%3E%20%27application/vnd.stardivision.calc%27.%0A%09%09%27sdd%27%20-%3E%20%27application/vnd.stardivision.impress%27.%0A%09%09%27sdf%27%20-%3E%20%27chemical/x-mdl-sdfile%27.%0A%09%09%27sdp%27%20-%3E%20%27application/vnd.stardivision.impress%27.%0A%09%09%27sdw%27%20-%3E%20%27application/vnd.stardivision.writer%27.%0A%09%09%27ser%27%20-%3E%20%27application/java-serialized-object%27.%0A%09%09%27sgf%27%20-%3E%20%27application/x-go-sgf%27.%0A%09%09%27sgl%27%20-%3E%20%27application/vnd.stardivision.writer-global%27.%0A%09%09%27sh%27%20-%3E%20%27text/x-sh%27.%0A%09%09%27shar%27%20-%3E%20%27application/x-shar%27.%0A%09%09%27shtml%27%20-%3E%20%27text/html%27.%0A%09%09%27sid%27%20-%3E%20%27audio/prs.sid%27.%0A%09%09%27sik%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27silo%27%20-%3E%20%27model/mesh%27.%0A%09%09%27sis%27%20-%3E%20%27application/vnd.symbian.install%27.%0A%09%09%27sit%27%20-%3E%20%27application/x-stuffit%27.%0A%09%09%27skd%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skm%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skp%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skt%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27smf%27%20-%3E%20%27application/vnd.stardivision.math%27.%0A%09%09%27smi%27%20-%3E%20%27application/smil%27.%0A%09%09%27smil%27%20-%3E%20%27application/smil%27.%0A%09%09%27snd%27%20-%3E%20%27audio/basic%27.%0A%09%09%27spc%27%20-%3E%20%27chemical/x-galactic-spc%27.%0A%09%09%27spl%27%20-%3E%20%27application/x-futuresplash%27.%0A%09%09%27src%27%20-%3E%20%27application/x-wais-source%27.%0A%09%09%27stc%27%20-%3E%20%27application/vnd.sun.xml.calc.template%27.%0A%09%09%27std%27%20-%3E%20%27application/vnd.sun.xml.draw.template%27.%0A%09%09%27sti%27%20-%3E%20%27application/vnd.sun.xml.impress.template%27.%0A%09%09%27stl%27%20-%3E%20%27application/vnd.ms-pki.stl%27.%0A%09%09%27stw%27%20-%3E%20%27application/vnd.sun.xml.writer.template%27.%0A%09%09%27sty%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27sv4cpio%27%20-%3E%20%27application/x-sv4cpio%27.%0A%09%09%27sv4crc%27%20-%3E%20%27application/x-sv4crc%27.%0A%09%09%27svg%27%20-%3E%20%27image/svg+xml%27.%0A%09%09%27svgz%27%20-%3E%20%27image/svg+xml%27.%0A%09%09%27sw%27%20-%3E%20%27chemical/x-swissprot%27.%0A%09%09%27swf%27%20-%3E%20%27application/x-shockwave-flash%27.%0A%09%09%27swfl%27%20-%3E%20%27application/x-shockwave-flash%27.%0A%09%09%27sxc%27%20-%3E%20%27application/vnd.sun.xml.calc%27.%0A%09%09%27sxd%27%20-%3E%20%27application/vnd.sun.xml.draw%27.%0A%09%09%27sxg%27%20-%3E%20%27application/vnd.sun.xml.writer.global%27.%0A%09%09%27sxi%27%20-%3E%20%27application/vnd.sun.xml.impress%27.%0A%09%09%27sxm%27%20-%3E%20%27application/vnd.sun.xml.math%27.%0A%09%09%27sxw%27%20-%3E%20%27application/vnd.sun.xml.writer%27.%0A%09%09%27t%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27tar%27%20-%3E%20%27application/x-tar%27.%0A%09%09%27taz%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27tcl%27%20-%3E%20%27text/x-tcl%27.%0A%09%09%27tex%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27texi%27%20-%3E%20%27application/x-texinfo%27.%0A%09%09%27texinfo%27%20-%3E%20%27application/x-texinfo%27.%0A%09%09%27text%27%20-%3E%20%27text/plain%27.%0A%09%09%27tgf%27%20-%3E%20%27chemical/x-mdl-tgf%27.%0A%09%09%27tgz%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27tif%27%20-%3E%20%27image/tiff%27.%0A%09%09%27tiff%27%20-%3E%20%27image/tiff%27.%0A%09%09%27tk%27%20-%3E%20%27text/x-tcl%27.%0A%09%09%27tm%27%20-%3E%20%27text/texmacs%27.%0A%09%09%27torrent%27%20-%3E%20%27application/x-bittorrent%27.%0A%09%09%27tr%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27ts%27%20-%3E%20%27text/texmacs%27.%0A%09%09%27tsp%27%20-%3E%20%27application/dsptype%27.%0A%09%09%27tsv%27%20-%3E%20%27text/tab-separated-values%27.%0A%09%09%27txt%27%20-%3E%20%27text/plain%27.%0A%09%09%27udeb%27%20-%3E%20%27application/x-debian-package%27.%0A%09%09%27uls%27%20-%3E%20%27text/iuls%27.%0A%09%09%27ustar%27%20-%3E%20%27application/x-ustar%27.%0A%09%09%27val%27%20-%3E%20%27chemical/x-ncbi-asn1-binary%27.%0A%09%09%27vcd%27%20-%3E%20%27application/x-cdlink%27.%0A%09%09%27vcf%27%20-%3E%20%27text/x-vcard%27.%0A%09%09%27vcs%27%20-%3E%20%27text/x-vcalendar%27.%0A%09%09%27vmd%27%20-%3E%20%27chemical/x-vmd%27.%0A%09%09%27vms%27%20-%3E%20%27chemical/x-vamas-iso14976%27.%0A%09%09%27vor%27%20-%3E%20%27application/vnd.stardivision.writer%27.%0A%09%09%27vrm%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27vrml%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27vsd%27%20-%3E%20%27application/vnd.visio%27.%0A%09%09%27wad%27%20-%3E%20%27application/x-doom%27.%0A%09%09%27wav%27%20-%3E%20%27audio/x-wav%27.%0A%09%09%27wax%27%20-%3E%20%27audio/x-ms-wax%27.%0A%09%09%27wbmp%27%20-%3E%20%27image/vnd.wap.wbmp%27.%0A%09%09%27wbxml%27%20-%3E%20%27application/vnd.wap.wbxml%27.%0A%09%09%27wk%27%20-%3E%20%27application/x-123%27.%0A%09%09%27wm%27%20-%3E%20%27video/x-ms-wm%27.%0A%09%09%27wma%27%20-%3E%20%27audio/x-ms-wma%27.%0A%09%09%27wmd%27%20-%3E%20%27application/x-ms-wmd%27.%0A%09%09%27wml%27%20-%3E%20%27text/vnd.wap.wml%27.%0A%09%09%27wmlc%27%20-%3E%20%27application/vnd.wap.wmlc%27.%0A%09%09%27wmls%27%20-%3E%20%27text/vnd.wap.wmlscript%27.%0A%09%09%27wmlsc%27%20-%3E%20%27application/vnd.wap.wmlscriptc%27.%0A%09%09%27wmv%27%20-%3E%20%27video/x-ms-wmv%27.%0A%09%09%27wmx%27%20-%3E%20%27video/x-ms-wmx%27.%0A%09%09%27wmz%27%20-%3E%20%27application/x-ms-wmz%27.%0A%09%09%27wp5%27%20-%3E%20%27application/wordperfect5.1%27.%0A%09%09%27wpd%27%20-%3E%20%27application/wordperfect%27.%0A%09%09%27wrl%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27wsc%27%20-%3E%20%27text/scriptlet%27.%0A%09%09%27wvx%27%20-%3E%20%27video/x-ms-wvx%27.%0A%09%09%27wz%27%20-%3E%20%27application/x-wingz%27.%0A%09%09%27xbm%27%20-%3E%20%27image/x-xbitmap%27.%0A%09%09%27xcf%27%20-%3E%20%27application/x-xcf%27.%0A%09%09%27xht%27%20-%3E%20%27application/xhtml+xml%27.%0A%09%09%27xhtml%27%20-%3E%20%27application/xhtml+xml%27.%0A%09%09%27xlb%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xls%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xlt%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xml%27%20-%3E%20%27application/xml%27.%0A%09%09%27xpi%27%20-%3E%20%27application/x-xpinstall%27.%0A%09%09%27xpm%27%20-%3E%20%27image/x-xpixmap%27.%0A%09%09%27xsl%27%20-%3E%20%27application/xml%27.%0A%09%09%27xtel%27%20-%3E%20%27chemical/x-xtel%27.%0A%09%09%27xul%27%20-%3E%20%27application/vnd.mozilla.xul+xml%27.%0A%09%09%27xwd%27%20-%3E%20%27image/x-xwindowdump%27.%0A%09%09%27xyz%27%20-%3E%20%27chemical/x-xyz%27.%0A%09%09%27zip%27%20-%3E%20%27application/zip%27.%0A%09%09%27zmt%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27%7E%27%20-%3E%20%27application/x-trash%27%0A%09%7D'),
  8847. messageSends: [unescape("-%3E")],
  8848. referencedClasses: []
  8849. }),
  8850. smalltalk.FileServer.klass);
  8851. smalltalk.addMethod(
  8852. unescape('_mimeTypes'),
  8853. smalltalk.method({
  8854. selector: unescape('mimeTypes'),
  8855. category: 'accessing',
  8856. fn: function (){
  8857. var self=this;
  8858. return (($receiver = self['@mimeTypes']) == nil || $receiver == undefined) ? (function(){return self['@mimeTypes']=smalltalk.send(self, "_defaultMimeTypes", []);})() : $receiver;
  8859. return self;},
  8860. args: [],
  8861. source: unescape('mimeTypes%0A%09%5EmimeTypes%20ifNil%3A%20%5BmimeTypes%20%3A%3D%20self%20defaultMimeTypes%5D'),
  8862. messageSends: ["ifNil:", "defaultMimeTypes"],
  8863. referencedClasses: []
  8864. }),
  8865. smalltalk.FileServer.klass);
  8866. smalltalk.addMethod(
  8867. unescape('_mimeTypeFor_'),
  8868. smalltalk.method({
  8869. selector: unescape('mimeTypeFor%3A'),
  8870. category: 'accessing',
  8871. fn: function (aString){
  8872. var self=this;
  8873. return smalltalk.send(smalltalk.send(self, "_mimeTypes", []), "_at_ifAbsent_", [smalltalk.send(aString, "_replace_with_", [unescape(".*%5B%5C.%5D"), ""]), (function(){return unescape("text/plain");})]);
  8874. return self;},
  8875. args: ["aString"],
  8876. source: unescape('mimeTypeFor%3A%20aString%0A%09%5Eself%20mimeTypes%20at%3A%20%28aString%20replace%3A%20%27.*%5B%5C.%5D%27%20with%3A%20%27%27%29%20ifAbsent%3A%20%5B%27text/plain%27%5D'),
  8877. messageSends: ["at:ifAbsent:", "mimeTypes", "replace:with:"],
  8878. referencedClasses: []
  8879. }),
  8880. smalltalk.FileServer.klass);
  8881. smalltalk.addMethod(
  8882. unescape('_main'),
  8883. smalltalk.method({
  8884. selector: unescape('main'),
  8885. category: 'initialization',
  8886. fn: function (){
  8887. var self=this;
  8888. return smalltalk.send(smalltalk.send(self, "_new", []), "_startOn_", [smalltalk.send(self, "_port", [])]);
  8889. return self;},
  8890. args: [],
  8891. source: unescape('main%0A%09%5Eself%20new%20startOn%3A%20self%20port'),
  8892. messageSends: ["startOn:", "new", "port"],
  8893. referencedClasses: []
  8894. }),
  8895. smalltalk.FileServer.klass);
  8896. smalltalk.init(smalltalk.Object);
  8897. smalltalk.classes()._do_(function(each) {each._initialize()});
  8898. /* Similar to jQuery(document).ready() */
  8899. if(this.smalltalkReady) {
  8900. this.smalltalkReady();
  8901. }
  8902. smalltalk.FileServer._main()