server.js 496 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049
  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 SmalltalkSymbol(string){
  55. this.value = string;
  56. };
  57. function Smalltalk(){
  58. var st = this;
  59. /* This is the current call context object. While it is publicly available,
  60. Use smalltalk.getThisContext() instead which will answer a safe copy of
  61. the current context */
  62. st.thisContext = undefined;
  63. /* List of all reserved words in JavaScript. They may not be used as variables
  64. in Smalltalk. */
  65. st.reservedWords = ['break', 'case', 'catch', 'char', 'class', 'continue', 'debugger',
  66. 'default', 'delete', 'do', 'else', 'finally', 'for', 'function',
  67. 'if', 'in', 'instanceof', 'new', 'private', 'protected',
  68. 'public', 'return', 'static', 'switch', 'this', 'throw',
  69. 'try', 'typeof', 'var', 'void', 'while', 'with', 'yield'];
  70. /* The symbol table ensures symbol unicity */
  71. symbolTable = {};
  72. st.symbolFor = function(string) {
  73. if(symbolTable[string] === undefined) {
  74. symbolTable[string] = new SmalltalkSymbol(string);
  75. };
  76. return symbolTable[string];
  77. };
  78. /* Unique ID number generator */
  79. oid = 0;
  80. st.nextId = function() {
  81. oid += 1;
  82. return oid;
  83. };
  84. /* We hold all Packages in a separate Object */
  85. st.packages = {};
  86. /* Smalltalk package creation. To add a Package, use smalltalk.addPackage() */
  87. function pkg(spec) {
  88. var that = new SmalltalkPackage();
  89. that.pkgName = spec.pkgName;
  90. that.properties = spec.properties || {};
  91. return that;
  92. };
  93. /* Smalltalk class creation. A class is an instance of an automatically
  94. created metaclass object. Newly created classes (not their metaclass)
  95. should be added to the smalltalk object, see smalltalk.addClass().
  96. Superclass linking is *not* handled here, see smalltalk.init() */
  97. function klass(spec) {
  98. var spec = spec || {};
  99. var that;
  100. if(spec.meta) {
  101. that = new SmalltalkMetaclass();
  102. } else {
  103. that = new (klass({meta: true})).fn;
  104. that.klass.instanceClass = that;
  105. that.className = spec.className;
  106. that.klass.className = that.className + ' class';
  107. }
  108. that.fn = spec.fn || function(){};
  109. that.superclass = spec.superclass;
  110. that.iVarNames = spec.iVarNames || [];
  111. that.toString = function() {return 'Smalltalk ' + that.className};
  112. if(that.superclass) {
  113. that.klass.superclass = that.superclass.klass;
  114. }
  115. that.pkg = spec.pkg;
  116. that.fn.prototype.methods = {};
  117. that.fn.prototype.inheritedMethods = {};
  118. that.fn.prototype.klass = that;
  119. return that;
  120. };
  121. /* Smalltalk method object. To add a method to a class,
  122. use smalltalk.addMethod() */
  123. st.method = function(spec) {
  124. var that = new SmalltalkMethod();
  125. that.selector = spec.selector;
  126. that.jsSelector = spec.jsSelector;
  127. that.args = spec.args || {};
  128. that.category = spec.category;
  129. that.source = spec.source;
  130. that.messageSends = spec.messageSends || [];
  131. that.referencedClasses = spec.referencedClasses || [];
  132. that.fn = spec.fn;
  133. return that
  134. };
  135. /* Initialize a class in its class hierarchy. Handle both class and
  136. metaclasses. */
  137. st.init = function(klass) {
  138. var subclasses = st.subclasses(klass);
  139. var methods;
  140. if(klass.superclass && klass.superclass !== nil) {
  141. methods = st.methods(klass.superclass);
  142. //Methods linking
  143. for(var i in methods) {
  144. if(!klass.fn.prototype.methods[i]) {
  145. klass.fn.prototype.inheritedMethods[i] = methods[i];
  146. klass.fn.prototype[methods[i].jsSelector] = methods[i].fn;
  147. }
  148. }
  149. }
  150. for(var i=0;i<subclasses.length;i++) {
  151. st.init(subclasses[i]);
  152. }
  153. if(klass.klass && !klass.meta) {
  154. st.init(klass.klass);
  155. }
  156. };
  157. /* Answer all registered Packages as Array */
  158. st.packages.all = function() {
  159. var packages = [];
  160. for(var i in st.packages) {
  161. if (!st.packages.hasOwnProperty(i) || typeof(st.packages[i]) === "function") continue;
  162. packages.push(st.packages[i]);
  163. }
  164. return packages
  165. };
  166. /* Answer all registered Smalltalk classes */
  167. st.classes = function() {
  168. var classes = [];
  169. for(var i in st) {
  170. if(i.search(/^[A-Z]/g) != -1) {
  171. classes.push(st[i]);
  172. }
  173. }
  174. return classes
  175. };
  176. /* Answer all methods (included inherited ones) of klass. */
  177. st.methods = function(klass) {
  178. var methods = {};
  179. for(var i in klass.fn.prototype.methods) {
  180. methods[i] = klass.fn.prototype.methods[i]
  181. }
  182. for(var i in klass.fn.prototype.inheritedMethods) {
  183. methods[i] = klass.fn.prototype.inheritedMethods[i]
  184. }
  185. return methods;
  186. }
  187. /* Answer the direct subclasses of klass. */
  188. st.subclasses = function(klass) {
  189. var subclasses = [];
  190. var classes = st.classes();
  191. for(var i in classes) {
  192. if(classes[i].fn) {
  193. //Metaclasses
  194. if(classes[i].klass && classes[i].klass.superclass === klass) {
  195. subclasses.push(classes[i].klass);
  196. }
  197. //Classes
  198. if(classes[i].superclass === klass) {
  199. subclasses.push(classes[i]);
  200. }
  201. }
  202. }
  203. return subclasses;
  204. };
  205. /* Create a new class wrapping a JavaScript constructor, and add it to the
  206. global smalltalk object. Package is lazily created if it does not exist with given name. */
  207. st.wrapClassName = function(className, pkgName, fn, superclass) {
  208. var pkg = st.addPackage(pkgName);
  209. st[className] = klass({
  210. className: className,
  211. superclass: superclass,
  212. pkg: pkg,
  213. fn: fn
  214. });
  215. };
  216. /* Create an alias for an existing class */
  217. st.alias = function(klass, alias) {
  218. st[alias] = klass;
  219. }
  220. /* Add a package to the smalltalk.packages object, creating a new one if needed.
  221. If pkgName is null or empty we return nil, which is an allowed package for a class.
  222. If package already exists we still update the properties of it. */
  223. st.addPackage = function(pkgName, properties) {
  224. if(!pkgName) {return nil;}
  225. if(!(st.packages[pkgName])) {
  226. st.packages[pkgName] = pkg({
  227. pkgName: pkgName,
  228. properties: properties
  229. });
  230. } else {
  231. if(properties) {
  232. st.packages[pkgName].properties = properties;
  233. }
  234. }
  235. return st.packages[pkgName];
  236. };
  237. /* Add a class to the smalltalk object, creating a new one if needed.
  238. Package is lazily created if it does not exist with given name.*/
  239. st.addClass = function(className, superclass, iVarNames, pkgName) {
  240. var pkg = st.addPackage(pkgName);
  241. if(st[className]) {
  242. st[className].superclass = superclass;
  243. st[className].iVarNames = iVarNames;
  244. st[className].pkg = pkg || st[className].pkg;
  245. } else {
  246. st[className] = klass({
  247. className: className,
  248. superclass: superclass,
  249. pkg: pkg,
  250. iVarNames: iVarNames
  251. });
  252. }
  253. };
  254. /* Add a method to a class */
  255. st.addMethod = function(jsSelector, method, klass) {
  256. klass.fn.prototype[jsSelector] = method.fn;
  257. klass.fn.prototype.methods[method.selector] = method;
  258. method.methodClass = klass;
  259. method.jsSelector = jsSelector;
  260. };
  261. /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
  262. If the receiver does not understand the selector, call its #doesNotUnderstand: method */
  263. sendWithoutContext = function(receiver, selector, args, klass) {
  264. if(receiver === undefined || receiver === null) {
  265. receiver = nil;
  266. }
  267. if(!klass && receiver.klass && receiver[selector]) {
  268. return receiver[selector].apply(receiver, args);
  269. } else if(klass && klass.fn.prototype[selector]) {
  270. return klass.fn.prototype[selector].apply(receiver, args)
  271. }
  272. return messageNotUnderstood(receiver, selector, args);
  273. };
  274. /* Handles unhandled errors during message sends */
  275. sendWithContext = function(receiver, selector, args, klass) {
  276. if(st.thisContext) {
  277. return withContextSend(receiver, selector, args, klass);
  278. } else {
  279. try {return withContextSend(receiver, selector, args, klass)}
  280. catch(error) {
  281. // Reset the context stack in any case
  282. st.thisContext = undefined;
  283. if(error.smalltalkError) {
  284. handleError(error);
  285. } else {
  286. throw(error);
  287. }
  288. }
  289. }
  290. };
  291. /* Same as sendWithoutContext but creates a methodContext. */
  292. withContextSend = function(receiver, selector, args, klass) {
  293. var call, context;
  294. if(receiver === undefined || receiver === null) {
  295. receiver = nil;
  296. }
  297. if(!klass && receiver.klass && receiver[selector]) {
  298. context = pushContext(receiver, selector, args);
  299. call = receiver[selector].apply(receiver, args);
  300. popContext(context);
  301. return call;
  302. } else if(klass && klass.fn.prototype[selector]) {
  303. context = pushContext(receiver, selector, args);
  304. call = klass.fn.prototype[selector].apply(receiver, args);
  305. popContext(context);
  306. return call;
  307. }
  308. return messageNotUnderstood(receiver, selector, args);
  309. };
  310. /* Handles Smalltalk errors. Triggers the registered ErrorHandler
  311. (See the Smalltalk class ErrorHandler and its subclasses */
  312. function handleError(error) {
  313. st.thisContext = undefined;
  314. smalltalk.ErrorHandler._current()._handleError_(error);
  315. }
  316. /* Handles #dnu: *and* JavaScript method calls.
  317. if the receiver has no klass, we consider it a JS object (outside of the
  318. Amber system). Else assume that the receiver understands #doesNotUnderstand: */
  319. function messageNotUnderstood(receiver, selector, args) {
  320. /* Handles JS method calls. */
  321. if(receiver.klass === undefined || receiver.allowJavaScriptCalls) {
  322. return callJavaScriptMethod(receiver, selector, args);
  323. }
  324. /* Handles not understood messages. Also see the Amber counter-part
  325. Object>>doesNotUnderstand: */
  326. return receiver._doesNotUnderstand_(
  327. st.Message._new()
  328. ._selector_(st.convertSelector(selector))
  329. ._arguments_(args)
  330. );
  331. };
  332. /* Call a method of a JS object, or answer a property if it exists.
  333. Else try wrapping a JSObjectProxy around the receiver.
  334. If the object property is a function, then call it, except if it starts with
  335. an uppercase character (we probably want to answer the function itself in this
  336. case and send it #new from Amber).
  337. Converts keyword-based selectors by using the first
  338. keyword only, but keeping all message arguments.
  339. Example:
  340. "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
  341. function callJavaScriptMethod(receiver, selector, args) {
  342. var jsSelector = selector._asJavaScriptSelector();
  343. var jsProperty = receiver[jsSelector];
  344. if(typeof jsProperty === "function" && !/^[A-Z]/.test(jsSelector)) {
  345. return jsProperty.apply(receiver, args);
  346. } else if(jsProperty !== undefined) {
  347. if(args[0]) {
  348. receiver[jsSelector] = args[0];
  349. return nil;
  350. } else {
  351. return jsProperty;
  352. }
  353. }
  354. return st.send(st.JSObjectProxy._on_(receiver), selector, args);
  355. };
  356. /* Reuse old contexts stored in oldContexts */
  357. st.oldContexts = [];
  358. /* Handle thisContext pseudo variable */
  359. st.getThisContext = function() {
  360. if(st.thisContext) {
  361. return st.thisContext.copy();
  362. } else {
  363. return undefined;
  364. }
  365. }
  366. pushContext = function(receiver, selector, temps) {
  367. if(st.thisContext) {
  368. return st.thisContext = st.thisContext.newContext(receiver, selector, temps);
  369. } else {
  370. return st.thisContext = new SmalltalkMethodContext(receiver, selector, temps);
  371. }
  372. };
  373. popContext = function(context) {
  374. if(context) {
  375. context.removeYourself();
  376. }
  377. };
  378. /* Convert a string to a valid smalltalk selector.
  379. if you modify the following functions, also change String>>asSelector
  380. accordingly */
  381. st.convertSelector = function(selector) {
  382. if(selector.match(/__/)) {
  383. return convertBinarySelector(selector);
  384. } else {
  385. return convertKeywordSelector(selector);
  386. }
  387. };
  388. function convertKeywordSelector(selector) {
  389. return selector.replace(/^_/, '').replace(/_/g, ':');
  390. };
  391. function convertBinarySelector(selector) {
  392. return selector
  393. .replace(/^_/, '')
  394. .replace(/_plus/, '+')
  395. .replace(/_minus/, '-')
  396. .replace(/_star/, '*')
  397. .replace(/_slash/, '/')
  398. .replace(/_gt/, '>')
  399. .replace(/_lt/, '<')
  400. .replace(/_eq/, '=')
  401. .replace(/_comma/, ',')
  402. .replace(/_at/, '@')
  403. };
  404. /* Converts a JavaScript object to valid Smalltalk Object */
  405. st.readJSObject = function(js) {
  406. var object = js;
  407. var readObject = (js.constructor === Object);
  408. var readArray = (js.constructor === Array);
  409. if(readObject) {
  410. object = smalltalk.Dictionary._new();
  411. }
  412. for(var i in js) {
  413. if(readObject) {
  414. object._at_put_(i, st.readJSObject(js[i]));
  415. }
  416. if(readArray) {
  417. object[i] = st.readJSObject(js[i]);
  418. }
  419. }
  420. return object;
  421. };
  422. /* Toggle deployment mode (no context will be handled during message send */
  423. st.setDeploymentMode = function() {
  424. st.send = sendWithoutContext;
  425. };
  426. st.setDevelopmentMode = function() {
  427. st.send = sendWithContext;
  428. }
  429. /* Set development mode by default */
  430. st.setDevelopmentMode();
  431. }
  432. function SmalltalkMethodContext(receiver, selector, temps, home) {
  433. var that = this;
  434. that.receiver = receiver;
  435. that.selector = selector;
  436. that.temps = temps || {};
  437. that.homeContext = home;
  438. that.copy = function() {
  439. var home = that.homeContext;
  440. if(home) {home = home.copy()}
  441. return new SmalltalkMethodContext(
  442. that.receiver,
  443. that.selector,
  444. that.temps,
  445. home
  446. );
  447. }
  448. that.newContext = function(receiver, selector, temps) {
  449. var c = smalltalk.oldContexts.pop();
  450. if(c) {
  451. c.homeContext = that;
  452. c.receiver = receiver;
  453. c.selector = selector;
  454. c.temps = temps || {};
  455. } else {
  456. c = new SmalltalkMethodContext(receiver, selector, temps, that);
  457. }
  458. return c;
  459. }
  460. that.removeYourself = function() {
  461. smalltalk.thisContext = that.homeContext;
  462. that.homeContext = undefined;
  463. smalltalk.oldContexts.push(that);
  464. }
  465. }
  466. /* Global Smalltalk objects. */
  467. var nil = new SmalltalkNil();
  468. var smalltalk = new Smalltalk();
  469. if(this.jQuery) {
  470. this.jQuery.allowJavaScriptCalls = true;
  471. }
  472. /****************************************************************************************/
  473. /* Base classes wrapping. If you edit this part, do not forget to set the superclass of the
  474. object metaclass to Class after the definition of Object */
  475. smalltalk.wrapClassName("Object", "Kernel", SmalltalkObject);
  476. smalltalk.wrapClassName("Smalltalk", "Kernel", Smalltalk, smalltalk.Object);
  477. smalltalk.wrapClassName("Package", "Kernel", SmalltalkPackage, smalltalk.Object);
  478. smalltalk.wrapClassName("Behavior", "Kernel", SmalltalkBehavior, smalltalk.Object);
  479. smalltalk.wrapClassName("Class", "Kernel", SmalltalkClass, smalltalk.Behavior);
  480. smalltalk.wrapClassName("Metaclass", "Kernel", SmalltalkMetaclass, smalltalk.Behavior);
  481. smalltalk.wrapClassName("CompiledMethod", "Kernel", SmalltalkMethod, smalltalk.Object);
  482. smalltalk.Object.klass.superclass = smalltalk.Class;
  483. smalltalk.wrapClassName("Number", "Kernel", Number, smalltalk.Object);
  484. smalltalk.wrapClassName("BlockClosure", "Kernel", Function, smalltalk.Object);
  485. smalltalk.wrapClassName("Boolean", "Kernel", Boolean, smalltalk.Object);
  486. smalltalk.wrapClassName("Date", "Kernel", Date, smalltalk.Object);
  487. smalltalk.wrapClassName("UndefinedObject", "Kernel", SmalltalkNil, smalltalk.Object);
  488. smalltalk.wrapClassName("Collection", "Kernel", null, smalltalk.Object);
  489. smalltalk.wrapClassName("SequenceableCollection", "Kernel", null, smalltalk.Collection);
  490. smalltalk.wrapClassName("CharacterArray", "Kernel", null, smalltalk.SequenceableCollection);
  491. smalltalk.wrapClassName("String", "Kernel", String, smalltalk.CharacterArray);
  492. smalltalk.wrapClassName("Symbol", "Kernel", SmalltalkSymbol, smalltalk.CharacterArray);
  493. smalltalk.wrapClassName("Array", "Kernel", Array, smalltalk.SequenceableCollection);
  494. smalltalk.wrapClassName("RegularExpression", "Kernel", RegExp, smalltalk.String);
  495. smalltalk.wrapClassName("Error", "Kernel", Error, smalltalk.Object);
  496. smalltalk.wrapClassName("MethodContext", "Kernel", SmalltalkMethodContext, smalltalk.Object);
  497. /* Alias definitions */
  498. smalltalk.alias(smalltalk.Array, "OrderedCollection");
  499. smalltalk.alias(smalltalk.Date, "Time");
  500. smalltalk.addPackage('Kernel-Objects', {});
  501. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  502. smalltalk.Object.comment=unescape('*Object%20is%20the%20root%20of%20the%20Smalltalk%20class%20system*.%20All%20classes%20in%20the%20system%20are%20subclasses%20of%20Object.%0A%0AObject%20provides%20default%20behavior%20common%20to%20all%20normal%20objects%2C%20such%20as%3A%20%0A%0A-%20access%0A-%20copying%0A-%20comparison%0A-%20error%20handling%0A-%20message%20sending%0A-%20reflection%0A%0AAlso%20utility%20messages%20that%20all%20objects%20should%20respond%20to%20are%20defined%20here.%0A%0AObject%20has%20no%20instance%20variable.%0A%0A%23%23Access%0A%0AInstance%20variables%20can%20be%20accessed%20with%20%60%23instVarAt%3A%60%20and%20%60%23instVarAt%3Aput%3A%60.%20%60Object%20%3E%3E%20instanceVariableNames%60%20answers%20a%20collection%20of%20all%20instance%20variable%20names.%0AAccessing%20JavaScript%20properties%20of%20an%20object%20is%20done%20through%20%60%23basicAt%3A%60%2C%20%60%23basicAt%3Aput%3A%60%20and%20%60basicDelete%3A%60.%0A%0A%23%23Copying%0A%0ACopying%20an%20object%20is%20handled%20by%20%60%23copy%60%20and%20%60%23deepCopy%60.%20The%20first%20one%20performs%20a%20shallow%20copy%20of%20the%20receiver%2C%20while%20the%20second%20one%20performs%20a%20deep%20copy.%0AThe%20hook%20method%20%60%23postCopy%60%20can%20be%20overriden%20in%20subclasses%20to%20copy%20fields%20as%20necessary%20to%20complete%20the%20full%20copy.%20It%20will%20be%20sent%20by%20the%20copy%20of%20the%20receiver.%0A%0A%23%23Comparison%0A%0AObjects%20understand%20equality%20%20%60%23%3D%60%20and%20identity%20%60%23%3D%3D%60%20comparison.%0A%0A%23%23Error%20handling%0A%0A-%20%60%23halt%60%20is%20the%20typical%20message%20to%20use%20for%20inserting%20breakpoints%20during%20debugging.%0A-%20%60%23error%3A%60%20throws%20a%20generic%20error%20exception%0A-%20%60%23doesNotUnderstand%3A%60%20handles%20the%20fact%20that%20there%20was%20an%20attempt%20to%20send%20the%20given%20message%20to%20the%20receiver%20but%20the%20receiver%20does%20not%20understand%20this%20message.%0A%20%20Overriding%20this%20message%20can%20be%20useful%20to%20implement%20proxies%20for%20example.')
  503. smalltalk.addMethod(
  504. unescape('__minus_gt'),
  505. smalltalk.method({
  506. selector: unescape('-%3E'),
  507. category: 'converting',
  508. fn: function (anObject) {
  509. var self = this;
  510. return smalltalk.send(smalltalk.Association || Association, "_key_value_", [self, anObject]);
  511. return self;
  512. },
  513. args: ["anObject"],
  514. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  515. messageSends: ["key:value:"],
  516. referencedClasses: ["Association"]
  517. }),
  518. smalltalk.Object);
  519. smalltalk.addMethod(
  520. unescape('__eq'),
  521. smalltalk.method({
  522. selector: unescape('%3D'),
  523. category: 'comparing',
  524. fn: function (anObject) {
  525. var self = this;
  526. return smalltalk.send(self, "__eq_eq", [anObject]);
  527. return self;
  528. },
  529. args: ["anObject"],
  530. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  531. messageSends: [unescape("%3D%3D")],
  532. referencedClasses: []
  533. }),
  534. smalltalk.Object);
  535. smalltalk.addMethod(
  536. unescape('__eq_eq'),
  537. smalltalk.method({
  538. selector: unescape('%3D%3D'),
  539. category: 'comparing',
  540. fn: function (anObject) {
  541. var self = this;
  542. return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
  543. return self;
  544. },
  545. args: ["anObject"],
  546. source: unescape('%3D%3D%20anObject%0A%09%5Eself%20identityHash%20%3D%20anObject%20identityHash'),
  547. messageSends: [unescape("%3D"), "identityHash"],
  548. referencedClasses: []
  549. }),
  550. smalltalk.Object);
  551. smalltalk.addMethod(
  552. unescape('_asJSON'),
  553. smalltalk.method({
  554. selector: unescape('asJSON'),
  555. category: 'converting',
  556. fn: function (){
  557. var self=this;
  558. var variables=nil;
  559. (variables=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  560. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSON", [])]);})]);
  561. return variables;
  562. return self;},
  563. args: [],
  564. source: unescape('asJSON%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20HashedCollection%20new.%0A%09self%20class%20allInstanceVariableNames%20do%3A%20%5B%3Aeach%20%7C%0A%09%09variables%20at%3A%20each%20put%3A%20%28self%20instVarAt%3A%20each%29%20asJSON%5D.%0A%09%5Evariables'),
  565. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "at:put:", "asJSON", "instVarAt:"],
  566. referencedClasses: ["HashedCollection"]
  567. }),
  568. smalltalk.Object);
  569. smalltalk.addMethod(
  570. unescape('_asJSONString'),
  571. smalltalk.method({
  572. selector: unescape('asJSONString'),
  573. category: 'converting',
  574. fn: function (){
  575. var self=this;
  576. return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [smalltalk.send(self, "_asJSON", [])]);
  577. return self;},
  578. args: [],
  579. source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20self%20asJSON'),
  580. messageSends: ["stringify:", "asJSON"],
  581. referencedClasses: ["JSON"]
  582. }),
  583. smalltalk.Object);
  584. smalltalk.addMethod(
  585. unescape('_asJavascript'),
  586. smalltalk.method({
  587. selector: unescape('asJavascript'),
  588. category: 'converting',
  589. fn: function () {
  590. var self = this;
  591. return smalltalk.send(self, "_asString", []);
  592. return self;
  593. },
  594. args: [],
  595. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  596. messageSends: ["asString"],
  597. referencedClasses: []
  598. }),
  599. smalltalk.Object);
  600. smalltalk.addMethod(
  601. unescape('_asString'),
  602. smalltalk.method({
  603. selector: unescape('asString'),
  604. category: 'converting',
  605. fn: function () {
  606. var self = this;
  607. return smalltalk.send(self, "_printString", []);
  608. return self;
  609. },
  610. args: [],
  611. source: unescape('asString%0A%09%5Eself%20printString'),
  612. messageSends: ["printString"],
  613. referencedClasses: []
  614. }),
  615. smalltalk.Object);
  616. smalltalk.addMethod(
  617. unescape('_basicAt_'),
  618. smalltalk.method({
  619. selector: unescape('basicAt%3A'),
  620. category: 'accessing',
  621. fn: function (aString) {
  622. var self = this;
  623. return self[aString];
  624. return self;
  625. },
  626. args: ["aString"],
  627. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  628. messageSends: [],
  629. referencedClasses: []
  630. }),
  631. smalltalk.Object);
  632. smalltalk.addMethod(
  633. unescape('_basicAt_put_'),
  634. smalltalk.method({
  635. selector: unescape('basicAt%3Aput%3A'),
  636. category: 'accessing',
  637. fn: function (aString, anObject) {
  638. var self = this;
  639. return self[aString] = anObject;
  640. return self;
  641. },
  642. args: ["aString", "anObject"],
  643. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  644. messageSends: [],
  645. referencedClasses: []
  646. }),
  647. smalltalk.Object);
  648. smalltalk.addMethod(
  649. unescape('_basicDelete_'),
  650. smalltalk.method({
  651. selector: unescape('basicDelete%3A'),
  652. category: 'accessing',
  653. fn: function (aString) {
  654. var self = this;
  655. delete self[aString];
  656. return aString;
  657. return self;
  658. },
  659. args: ["aString"],
  660. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3B%20return%20aString%3E'),
  661. messageSends: [],
  662. referencedClasses: []
  663. }),
  664. smalltalk.Object);
  665. smalltalk.addMethod(
  666. unescape('_basicPerform_'),
  667. smalltalk.method({
  668. selector: unescape('basicPerform%3A'),
  669. category: 'message handling',
  670. fn: function (aSymbol) {
  671. var self = this;
  672. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  673. return self;
  674. },
  675. args: ["aSymbol"],
  676. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  677. messageSends: ["basicPerform:withArguments:"],
  678. referencedClasses: []
  679. }),
  680. smalltalk.Object);
  681. smalltalk.addMethod(
  682. unescape('_basicPerform_withArguments_'),
  683. smalltalk.method({
  684. selector: unescape('basicPerform%3AwithArguments%3A'),
  685. category: 'message handling',
  686. fn: function (aSymbol, aCollection) {
  687. var self = this;
  688. return self[aSymbol].apply(self, aCollection);
  689. return self;
  690. },
  691. args: ["aSymbol", "aCollection"],
  692. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  693. messageSends: [],
  694. referencedClasses: []
  695. }),
  696. smalltalk.Object);
  697. smalltalk.addMethod(
  698. unescape('_class'),
  699. smalltalk.method({
  700. selector: unescape('class'),
  701. category: 'accessing',
  702. fn: function () {
  703. var self = this;
  704. return self.klass;
  705. return self;
  706. },
  707. args: [],
  708. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  709. messageSends: [],
  710. referencedClasses: []
  711. }),
  712. smalltalk.Object);
  713. smalltalk.addMethod(
  714. unescape('_copy'),
  715. smalltalk.method({
  716. selector: unescape('copy'),
  717. category: 'copying',
  718. fn: function () {
  719. var self = this;
  720. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  721. return self;
  722. },
  723. args: [],
  724. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  725. messageSends: ["postCopy", "shallowCopy"],
  726. referencedClasses: []
  727. }),
  728. smalltalk.Object);
  729. smalltalk.addMethod(
  730. unescape('_deepCopy'),
  731. smalltalk.method({
  732. selector: unescape('deepCopy'),
  733. category: 'copying',
  734. fn: function () {
  735. var self = this;
  736. var copy = self.klass._new();
  737. for (var i in self) {
  738. if (/^@.+/.test(i)) {
  739. copy[i] = self[i]._deepCopy();
  740. }
  741. }
  742. return copy;
  743. return self;
  744. },
  745. args: [],
  746. 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'),
  747. messageSends: [],
  748. referencedClasses: []
  749. }),
  750. smalltalk.Object);
  751. smalltalk.addMethod(
  752. unescape('_deprecatedAPI'),
  753. smalltalk.method({
  754. selector: unescape('deprecatedAPI'),
  755. category: 'error handling',
  756. fn: function () {
  757. var self = this;
  758. smalltalk.send(typeof console == "undefined" ? nil : console, "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.getThisContext(), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21%20%28in%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.getThisContext(), "_home", []), "_home", []), "_asString", [])]), "__comma", [unescape("%29")])]);
  759. return self;
  760. },
  761. args: [],
  762. 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%20%28in%20%27%2C%20thisContext%20home%20home%20asString%2C%20%27%29%27'),
  763. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  764. referencedClasses: []
  765. }),
  766. smalltalk.Object);
  767. smalltalk.addMethod(
  768. unescape('_doesNotUnderstand_'),
  769. smalltalk.method({
  770. selector: unescape('doesNotUnderstand%3A'),
  771. category: 'error handling',
  772. fn: function (aMessage) {
  773. var self = this;
  774. (function ($rec) {smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);}(smalltalk.send(smalltalk.MessageNotUnderstood || MessageNotUnderstood, "_new", [])));
  775. return self;
  776. },
  777. args: ["aMessage"],
  778. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  779. messageSends: ["receiver:", "message:", "signal", "new"],
  780. referencedClasses: ["MessageNotUnderstood"]
  781. }),
  782. smalltalk.Object);
  783. smalltalk.addMethod(
  784. unescape('_error_'),
  785. smalltalk.method({
  786. selector: unescape('error%3A'),
  787. category: 'error handling',
  788. fn: function (aString) {
  789. var self = this;
  790. smalltalk.send(smalltalk.Error || Error, "_signal_", [aString]);
  791. return self;
  792. },
  793. args: ["aString"],
  794. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  795. messageSends: ["signal:"],
  796. referencedClasses: ["Error"]
  797. }),
  798. smalltalk.Object);
  799. smalltalk.addMethod(
  800. unescape('_halt'),
  801. smalltalk.method({
  802. selector: unescape('halt'),
  803. category: 'error handling',
  804. fn: function () {
  805. var self = this;
  806. smalltalk.send(self, "_error_", ["Halt encountered"]);
  807. return self;
  808. },
  809. args: [],
  810. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  811. messageSends: ["error:"],
  812. referencedClasses: []
  813. }),
  814. smalltalk.Object);
  815. smalltalk.addMethod(
  816. unescape('_identityHash'),
  817. smalltalk.method({
  818. selector: unescape('identityHash'),
  819. category: 'accessing',
  820. fn: function () {
  821. var self = this;
  822. return self.identityHash || (self.identityHash = smalltalk.nextId());
  823. return self;
  824. },
  825. args: [],
  826. source: unescape('identityHash%0A%09%3Creturn%20self.identityHash%20%7C%7C%20%28self.identityHash%20%3D%20smalltalk.nextId%28%29%29%3B%3E'),
  827. messageSends: [],
  828. referencedClasses: []
  829. }),
  830. smalltalk.Object);
  831. smalltalk.addMethod(
  832. unescape('_ifNil_'),
  833. smalltalk.method({
  834. selector: unescape('ifNil%3A'),
  835. category: 'testing',
  836. fn: function (aBlock) {
  837. var self = this;
  838. return self;
  839. return self;
  840. },
  841. args: ["aBlock"],
  842. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  843. messageSends: [],
  844. referencedClasses: []
  845. }),
  846. smalltalk.Object);
  847. smalltalk.addMethod(
  848. unescape('_ifNil_ifNotNil_'),
  849. smalltalk.method({
  850. selector: unescape('ifNil%3AifNotNil%3A'),
  851. category: 'testing',
  852. fn: function (aBlock, anotherBlock) {
  853. var self = this;
  854. return smalltalk.send(anotherBlock, "_value", []);
  855. return self;
  856. },
  857. args: ["aBlock", "anotherBlock"],
  858. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  859. messageSends: ["value"],
  860. referencedClasses: []
  861. }),
  862. smalltalk.Object);
  863. smalltalk.addMethod(
  864. unescape('_ifNotNil_'),
  865. smalltalk.method({
  866. selector: unescape('ifNotNil%3A'),
  867. category: 'testing',
  868. fn: function (aBlock) {
  869. var self = this;
  870. return smalltalk.send(aBlock, "_value", []);
  871. return self;
  872. },
  873. args: ["aBlock"],
  874. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  875. messageSends: ["value"],
  876. referencedClasses: []
  877. }),
  878. smalltalk.Object);
  879. smalltalk.addMethod(
  880. unescape('_ifNotNil_ifNil_'),
  881. smalltalk.method({
  882. selector: unescape('ifNotNil%3AifNil%3A'),
  883. category: 'testing',
  884. fn: function (aBlock, anotherBlock) {
  885. var self = this;
  886. return smalltalk.send(aBlock, "_value", []);
  887. return self;
  888. },
  889. args: ["aBlock", "anotherBlock"],
  890. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  891. messageSends: ["value"],
  892. referencedClasses: []
  893. }),
  894. smalltalk.Object);
  895. smalltalk.addMethod(
  896. unescape('_initialize'),
  897. smalltalk.method({
  898. selector: unescape('initialize'),
  899. category: 'initialization',
  900. fn: function () {
  901. var self = this;
  902. return self;
  903. },
  904. args: [],
  905. source: unescape('initialize'),
  906. messageSends: [],
  907. referencedClasses: []
  908. }),
  909. smalltalk.Object);
  910. smalltalk.addMethod(
  911. unescape('_instVarAt_'),
  912. smalltalk.method({
  913. selector: unescape('instVarAt%3A'),
  914. category: 'accessing',
  915. fn: function (aSymbol) {
  916. var self = this;
  917. var varname = nil;
  918. varname = smalltalk.send(aSymbol, "_asString", []);
  919. return self["@" + varname];
  920. return self;
  921. },
  922. args: ["aSymbol"],
  923. source: unescape('instVarAt%3A%20aSymbol%0A%09%7C%20varname%20%7C%0A%09varname%20%3A%3D%20aSymbol%20asString.%0A%09%3Creturn%20self%5B%27@%27+varname%5D%3E'),
  924. messageSends: ["asString"],
  925. referencedClasses: []
  926. }),
  927. smalltalk.Object);
  928. smalltalk.addMethod(
  929. unescape('_instVarAt_put_'),
  930. smalltalk.method({
  931. selector: unescape('instVarAt%3Aput%3A'),
  932. category: 'accessing',
  933. fn: function (aSymbol, anObject) {
  934. var self = this;
  935. var varname = nil;
  936. varname = smalltalk.send(aSymbol, "_asString", []);
  937. self["@" + varname] = anObject;
  938. return self;
  939. },
  940. args: ["aSymbol", "anObject"],
  941. source: unescape('instVarAt%3A%20aSymbol%20put%3A%20anObject%0A%09%7C%20varname%20%7C%0A%09varname%20%3A%3D%20aSymbol%20asString.%0A%09%3Cself%5B%27@%27%20+%20varname%5D%20%3D%20anObject%3E'),
  942. messageSends: ["asString"],
  943. referencedClasses: []
  944. }),
  945. smalltalk.Object);
  946. smalltalk.addMethod(
  947. unescape('_isClass'),
  948. smalltalk.method({
  949. selector: unescape('isClass'),
  950. category: 'testing',
  951. fn: function () {
  952. var self = this;
  953. return false;
  954. return self;
  955. },
  956. args: [],
  957. source: unescape('isClass%0A%09%5Efalse'),
  958. messageSends: [],
  959. referencedClasses: []
  960. }),
  961. smalltalk.Object);
  962. smalltalk.addMethod(
  963. unescape('_isKindOf_'),
  964. smalltalk.method({
  965. selector: unescape('isKindOf%3A'),
  966. category: 'testing',
  967. fn: function (aClass) {
  968. var self = this;
  969. 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]);}]);
  970. return self;
  971. },
  972. args: ["aClass"],
  973. 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'),
  974. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  975. referencedClasses: []
  976. }),
  977. smalltalk.Object);
  978. smalltalk.addMethod(
  979. unescape('_isMemberOf_'),
  980. smalltalk.method({
  981. selector: unescape('isMemberOf%3A'),
  982. category: 'testing',
  983. fn: function (aClass) {
  984. var self = this;
  985. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  986. return self;
  987. },
  988. args: ["aClass"],
  989. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  990. messageSends: [unescape("%3D"), "class"],
  991. referencedClasses: []
  992. }),
  993. smalltalk.Object);
  994. smalltalk.addMethod(
  995. unescape('_isMetaclass'),
  996. smalltalk.method({
  997. selector: unescape('isMetaclass'),
  998. category: 'testing',
  999. fn: function () {
  1000. var self = this;
  1001. return false;
  1002. return self;
  1003. },
  1004. args: [],
  1005. source: unescape('isMetaclass%0A%09%5Efalse'),
  1006. messageSends: [],
  1007. referencedClasses: []
  1008. }),
  1009. smalltalk.Object);
  1010. smalltalk.addMethod(
  1011. unescape('_isNil'),
  1012. smalltalk.method({
  1013. selector: unescape('isNil'),
  1014. category: 'testing',
  1015. fn: function () {
  1016. var self = this;
  1017. return false;
  1018. return self;
  1019. },
  1020. args: [],
  1021. source: unescape('isNil%0A%09%5Efalse'),
  1022. messageSends: [],
  1023. referencedClasses: []
  1024. }),
  1025. smalltalk.Object);
  1026. smalltalk.addMethod(
  1027. unescape('_isNumber'),
  1028. smalltalk.method({
  1029. selector: unescape('isNumber'),
  1030. category: 'testing',
  1031. fn: function () {
  1032. var self = this;
  1033. return false;
  1034. return self;
  1035. },
  1036. args: [],
  1037. source: unescape('isNumber%0A%09%5Efalse'),
  1038. messageSends: [],
  1039. referencedClasses: []
  1040. }),
  1041. smalltalk.Object);
  1042. smalltalk.addMethod(
  1043. unescape('_isParseFailure'),
  1044. smalltalk.method({
  1045. selector: unescape('isParseFailure'),
  1046. category: 'testing',
  1047. fn: function () {
  1048. var self = this;
  1049. return false;
  1050. return self;
  1051. },
  1052. args: [],
  1053. source: unescape('isParseFailure%0A%09%5Efalse'),
  1054. messageSends: [],
  1055. referencedClasses: []
  1056. }),
  1057. smalltalk.Object);
  1058. smalltalk.addMethod(
  1059. unescape('_isString'),
  1060. smalltalk.method({
  1061. selector: unescape('isString'),
  1062. category: 'testing',
  1063. fn: function () {
  1064. var self = this;
  1065. return false;
  1066. return self;
  1067. },
  1068. args: [],
  1069. source: unescape('isString%0A%09%5Efalse'),
  1070. messageSends: [],
  1071. referencedClasses: []
  1072. }),
  1073. smalltalk.Object);
  1074. smalltalk.addMethod(
  1075. unescape('_isSymbol'),
  1076. smalltalk.method({
  1077. selector: unescape('isSymbol'),
  1078. category: 'testing',
  1079. fn: function () {
  1080. var self = this;
  1081. return false;
  1082. return self;
  1083. },
  1084. args: [],
  1085. source: unescape('isSymbol%0A%09%5Efalse'),
  1086. messageSends: [],
  1087. referencedClasses: []
  1088. }),
  1089. smalltalk.Object);
  1090. smalltalk.addMethod(
  1091. unescape('_log_block_'),
  1092. smalltalk.method({
  1093. selector: unescape('log%3Ablock%3A'),
  1094. category: 'printing',
  1095. fn: function (aString, aBlock) {
  1096. var self = this;
  1097. var result = nil;
  1098. 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", [])])]);
  1099. return result;
  1100. return self;
  1101. },
  1102. args: ["aString", "aBlock"],
  1103. 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'),
  1104. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  1105. referencedClasses: ["Date"]
  1106. }),
  1107. smalltalk.Object);
  1108. smalltalk.addMethod(
  1109. unescape('_notNil'),
  1110. smalltalk.method({
  1111. selector: unescape('notNil'),
  1112. category: 'testing',
  1113. fn: function () {
  1114. var self = this;
  1115. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  1116. return self;
  1117. },
  1118. args: [],
  1119. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  1120. messageSends: ["not", "isNil"],
  1121. referencedClasses: []
  1122. }),
  1123. smalltalk.Object);
  1124. smalltalk.addMethod(
  1125. unescape('_perform_'),
  1126. smalltalk.method({
  1127. selector: unescape('perform%3A'),
  1128. category: 'message handling',
  1129. fn: function (aSymbol) {
  1130. var self = this;
  1131. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  1132. return self;
  1133. },
  1134. args: ["aSymbol"],
  1135. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  1136. messageSends: ["perform:withArguments:"],
  1137. referencedClasses: []
  1138. }),
  1139. smalltalk.Object);
  1140. smalltalk.addMethod(
  1141. unescape('_perform_withArguments_'),
  1142. smalltalk.method({
  1143. selector: unescape('perform%3AwithArguments%3A'),
  1144. category: 'message handling',
  1145. fn: function (aSymbol, aCollection) {
  1146. var self = this;
  1147. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  1148. return self;
  1149. },
  1150. args: ["aSymbol", "aCollection"],
  1151. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  1152. messageSends: ["basicPerform:withArguments:", "asSelector"],
  1153. referencedClasses: []
  1154. }),
  1155. smalltalk.Object);
  1156. smalltalk.addMethod(
  1157. unescape('_postCopy'),
  1158. smalltalk.method({
  1159. selector: unescape('postCopy'),
  1160. category: 'copying',
  1161. fn: function () {
  1162. var self = this;
  1163. return self;
  1164. },
  1165. args: [],
  1166. source: unescape('postCopy'),
  1167. messageSends: [],
  1168. referencedClasses: []
  1169. }),
  1170. smalltalk.Object);
  1171. smalltalk.addMethod(
  1172. unescape('_printNl'),
  1173. smalltalk.method({
  1174. selector: unescape('printNl'),
  1175. category: 'printing',
  1176. fn: function () {
  1177. var self = this;
  1178. console.log(self);
  1179. return self;
  1180. },
  1181. args: [],
  1182. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  1183. messageSends: [],
  1184. referencedClasses: []
  1185. }),
  1186. smalltalk.Object);
  1187. smalltalk.addMethod(
  1188. unescape('_printString'),
  1189. smalltalk.method({
  1190. selector: unescape('printString'),
  1191. category: 'printing',
  1192. fn: function () {
  1193. var self = this;
  1194. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  1195. return self;
  1196. },
  1197. args: [],
  1198. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  1199. messageSends: [unescape("%2C"), "name", "class"],
  1200. referencedClasses: []
  1201. }),
  1202. smalltalk.Object);
  1203. smalltalk.addMethod(
  1204. unescape('_shallowCopy'),
  1205. smalltalk.method({
  1206. selector: unescape('shallowCopy'),
  1207. category: 'copying',
  1208. fn: function () {
  1209. var self = this;
  1210. var copy = self.klass._new();
  1211. for (var i in self) {
  1212. if (/^@.+/.test(i)) {
  1213. copy[i] = self[i];
  1214. }
  1215. }
  1216. return copy;
  1217. return self;
  1218. },
  1219. args: [],
  1220. 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'),
  1221. messageSends: [],
  1222. referencedClasses: []
  1223. }),
  1224. smalltalk.Object);
  1225. smalltalk.addMethod(
  1226. unescape('_shouldNotImplement'),
  1227. smalltalk.method({
  1228. selector: unescape('shouldNotImplement'),
  1229. category: 'error handling',
  1230. fn: function () {
  1231. var self = this;
  1232. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  1233. return self;
  1234. },
  1235. args: [],
  1236. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  1237. messageSends: ["error:", unescape("%2C"), "name", "class"],
  1238. referencedClasses: []
  1239. }),
  1240. smalltalk.Object);
  1241. smalltalk.addMethod(
  1242. unescape('_size'),
  1243. smalltalk.method({
  1244. selector: unescape('size'),
  1245. category: 'accessing',
  1246. fn: function () {
  1247. var self = this;
  1248. smalltalk.send(self, "_error_", ["Object not indexable"]);
  1249. return self;
  1250. },
  1251. args: [],
  1252. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  1253. messageSends: ["error:"],
  1254. referencedClasses: []
  1255. }),
  1256. smalltalk.Object);
  1257. smalltalk.addMethod(
  1258. unescape('_storeOn_'),
  1259. smalltalk.method({
  1260. selector: unescape('storeOn%3A'),
  1261. category: 'printing',
  1262. fn: function (aStream) {
  1263. var self = this;
  1264. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  1265. return self;
  1266. },
  1267. args: ["aStream"],
  1268. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20self%20printString'),
  1269. messageSends: ["nextPutAll:", "printString"],
  1270. referencedClasses: []
  1271. }),
  1272. smalltalk.Object);
  1273. smalltalk.addMethod(
  1274. unescape('_storeString'),
  1275. smalltalk.method({
  1276. selector: unescape('storeString'),
  1277. category: 'printing',
  1278. fn: function () {
  1279. var self = this;
  1280. return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (s) {return smalltalk.send(self, "_storeOn_", [s]);}]);
  1281. return self;
  1282. },
  1283. args: [],
  1284. source: unescape('storeString%0A%09%22Answer%20a%20String%20representation%20of%20the%20receiver%20from%20which%20the%20receiver%20%0A%09can%20be%20reconstructed.%22%0A%0A%09%5E%20String%20streamContents%3A%20%5B%3As%20%7C%20self%20storeOn%3A%20s%5D'),
  1285. messageSends: ["streamContents:", "storeOn:"],
  1286. referencedClasses: ["String"]
  1287. }),
  1288. smalltalk.Object);
  1289. smalltalk.addMethod(
  1290. unescape('_subclassResponsibility'),
  1291. smalltalk.method({
  1292. selector: unescape('subclassResponsibility'),
  1293. category: 'error handling',
  1294. fn: function () {
  1295. var self = this;
  1296. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  1297. return self;
  1298. },
  1299. args: [],
  1300. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  1301. messageSends: ["error:"],
  1302. referencedClasses: []
  1303. }),
  1304. smalltalk.Object);
  1305. smalltalk.addMethod(
  1306. unescape('_try_catch_'),
  1307. smalltalk.method({
  1308. selector: unescape('try%3Acatch%3A'),
  1309. category: 'error handling',
  1310. fn: function (aBlock, anotherBlock) {
  1311. var self = this;
  1312. try {
  1313. result = aBlock();
  1314. } catch (e) {
  1315. result = anotherBlock(e);
  1316. }
  1317. return result;
  1318. return self;
  1319. },
  1320. args: ["aBlock", "anotherBlock"],
  1321. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7Bresult%20%3D%20aBlock%28%29%7D%20catch%28e%29%20%7Bresult%20%3D%20anotherBlock%28e%29%7D%3B%0A%09return%20result%3B%3E'),
  1322. messageSends: [],
  1323. referencedClasses: []
  1324. }),
  1325. smalltalk.Object);
  1326. smalltalk.addMethod(
  1327. unescape('_yourself'),
  1328. smalltalk.method({
  1329. selector: unescape('yourself'),
  1330. category: 'accessing',
  1331. fn: function () {
  1332. var self = this;
  1333. return self;
  1334. return self;
  1335. },
  1336. args: [],
  1337. source: unescape('yourself%0A%09%5Eself'),
  1338. messageSends: [],
  1339. referencedClasses: []
  1340. }),
  1341. smalltalk.Object);
  1342. smalltalk.addMethod(
  1343. unescape('_%7E_eq'),
  1344. smalltalk.method({
  1345. selector: unescape('%7E%3D'),
  1346. category: 'comparing',
  1347. fn: function (anObject) {
  1348. var self = this;
  1349. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  1350. return self;
  1351. },
  1352. args: ["anObject"],
  1353. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  1354. messageSends: [unescape("%3D")],
  1355. referencedClasses: []
  1356. }),
  1357. smalltalk.Object);
  1358. smalltalk.addMethod(
  1359. unescape('_%7E%7E'),
  1360. smalltalk.method({
  1361. selector: unescape('%7E%7E'),
  1362. category: 'comparing',
  1363. fn: function (anObject) {
  1364. var self = this;
  1365. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  1366. return self;
  1367. },
  1368. args: ["anObject"],
  1369. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  1370. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  1371. referencedClasses: []
  1372. }),
  1373. smalltalk.Object);
  1374. smalltalk.addMethod(
  1375. unescape('_initialize'),
  1376. smalltalk.method({
  1377. selector: unescape('initialize'),
  1378. category: 'initialization',
  1379. fn: function () {
  1380. var self = this;
  1381. return self;
  1382. },
  1383. args: [],
  1384. source: unescape('initialize%0A%09%22no%20op%22'),
  1385. messageSends: [],
  1386. referencedClasses: []
  1387. }),
  1388. smalltalk.Object.klass);
  1389. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  1390. smalltalk.Boolean.comment=unescape('Boolean%20wraps%20the%20JavaScript%20%60Boolean%28%29%60%20constructor.%20The%20%60true%60%20and%20%60false%60%20objects%20are%20the%20JavaScript%20boolean%20objects.%0A%0ABoolean%20defines%20the%20protocol%20for%20logic%20testing%20operations%20and%20conditional%20control%20structures%20for%20the%20logical%20values.%0ABoolean%20instances%20are%20weither%20%60true%60%20or%20%60false%60.')
  1391. smalltalk.addMethod(
  1392. unescape('_%26'),
  1393. smalltalk.method({
  1394. selector: unescape('%26'),
  1395. category: 'controlling',
  1396. fn: function (aBoolean) {
  1397. var self = this;
  1398. if (self == true) {
  1399. return aBoolean;
  1400. } else {
  1401. return false;
  1402. }
  1403. return self;
  1404. },
  1405. args: ["aBoolean"],
  1406. 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'),
  1407. messageSends: [],
  1408. referencedClasses: []
  1409. }),
  1410. smalltalk.Boolean);
  1411. smalltalk.addMethod(
  1412. unescape('__eq'),
  1413. smalltalk.method({
  1414. selector: unescape('%3D'),
  1415. category: 'comparing',
  1416. fn: function (aBoolean) {
  1417. var self = this;
  1418. try {
  1419. ($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;}};}();}]);
  1420. return Boolean(self == true) == aBoolean;
  1421. return self;
  1422. } catch (e) {
  1423. if (e.name === "stReturn" && e.selector === "__eq") {
  1424. return e.fn();
  1425. }
  1426. throw e;
  1427. }
  1428. },
  1429. args: ["aBoolean"],
  1430. 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'),
  1431. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  1432. referencedClasses: []
  1433. }),
  1434. smalltalk.Boolean);
  1435. smalltalk.addMethod(
  1436. unescape('_and_'),
  1437. smalltalk.method({
  1438. selector: unescape('and%3A'),
  1439. category: 'controlling',
  1440. fn: function (aBlock) {
  1441. var self = this;
  1442. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, function () {return false;}]);
  1443. return self;
  1444. },
  1445. args: ["aBlock"],
  1446. 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'),
  1447. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  1448. referencedClasses: []
  1449. }),
  1450. smalltalk.Boolean);
  1451. smalltalk.addMethod(
  1452. unescape('_asJSON'),
  1453. smalltalk.method({
  1454. selector: unescape('asJSON'),
  1455. category: 'converting',
  1456. fn: function (){
  1457. var self=this;
  1458. return self;
  1459. return self;},
  1460. args: [],
  1461. source: unescape('asJSON%0A%09%5Eself'),
  1462. messageSends: [],
  1463. referencedClasses: []
  1464. }),
  1465. smalltalk.Boolean);
  1466. smalltalk.addMethod(
  1467. unescape('_deepCopy'),
  1468. smalltalk.method({
  1469. selector: unescape('deepCopy'),
  1470. category: 'copying',
  1471. fn: function () {
  1472. var self = this;
  1473. return self;
  1474. return self;
  1475. },
  1476. args: [],
  1477. source: unescape('deepCopy%0A%09%5Eself'),
  1478. messageSends: [],
  1479. referencedClasses: []
  1480. }),
  1481. smalltalk.Boolean);
  1482. smalltalk.addMethod(
  1483. unescape('_ifFalse_'),
  1484. smalltalk.method({
  1485. selector: unescape('ifFalse%3A'),
  1486. category: 'controlling',
  1487. fn: function (aBlock) {
  1488. var self = this;
  1489. return smalltalk.send(self, "_ifTrue_ifFalse_", [function () {return nil;}, aBlock]);
  1490. return self;
  1491. },
  1492. args: ["aBlock"],
  1493. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  1494. messageSends: ["ifTrue:ifFalse:"],
  1495. referencedClasses: []
  1496. }),
  1497. smalltalk.Boolean);
  1498. smalltalk.addMethod(
  1499. unescape('_ifFalse_ifTrue_'),
  1500. smalltalk.method({
  1501. selector: unescape('ifFalse%3AifTrue%3A'),
  1502. category: 'controlling',
  1503. fn: function (aBlock, anotherBlock) {
  1504. var self = this;
  1505. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  1506. return self;
  1507. },
  1508. args: ["aBlock", "anotherBlock"],
  1509. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  1510. messageSends: ["ifTrue:ifFalse:"],
  1511. referencedClasses: []
  1512. }),
  1513. smalltalk.Boolean);
  1514. smalltalk.addMethod(
  1515. unescape('_ifTrue_'),
  1516. smalltalk.method({
  1517. selector: unescape('ifTrue%3A'),
  1518. category: 'controlling',
  1519. fn: function (aBlock) {
  1520. var self = this;
  1521. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, function () {return nil;}]);
  1522. return self;
  1523. },
  1524. args: ["aBlock"],
  1525. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  1526. messageSends: ["ifTrue:ifFalse:"],
  1527. referencedClasses: []
  1528. }),
  1529. smalltalk.Boolean);
  1530. smalltalk.addMethod(
  1531. unescape('_ifTrue_ifFalse_'),
  1532. smalltalk.method({
  1533. selector: unescape('ifTrue%3AifFalse%3A'),
  1534. category: 'controlling',
  1535. fn: function (aBlock, anotherBlock) {
  1536. var self = this;
  1537. if (self == true) {
  1538. return aBlock();
  1539. } else {
  1540. return anotherBlock();
  1541. }
  1542. return self;
  1543. },
  1544. args: ["aBlock", "anotherBlock"],
  1545. 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'),
  1546. messageSends: [],
  1547. referencedClasses: []
  1548. }),
  1549. smalltalk.Boolean);
  1550. smalltalk.addMethod(
  1551. unescape('_not'),
  1552. smalltalk.method({
  1553. selector: unescape('not'),
  1554. category: 'controlling',
  1555. fn: function () {
  1556. var self = this;
  1557. return smalltalk.send(self, "__eq", [false]);
  1558. return self;
  1559. },
  1560. args: [],
  1561. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  1562. messageSends: [unescape("%3D")],
  1563. referencedClasses: []
  1564. }),
  1565. smalltalk.Boolean);
  1566. smalltalk.addMethod(
  1567. unescape('_or_'),
  1568. smalltalk.method({
  1569. selector: unescape('or%3A'),
  1570. category: 'controlling',
  1571. fn: function (aBlock) {
  1572. var self = this;
  1573. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [function () {return true;}, aBlock]);
  1574. return self;
  1575. },
  1576. args: ["aBlock"],
  1577. 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'),
  1578. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  1579. referencedClasses: []
  1580. }),
  1581. smalltalk.Boolean);
  1582. smalltalk.addMethod(
  1583. unescape('_printString'),
  1584. smalltalk.method({
  1585. selector: unescape('printString'),
  1586. category: 'printing',
  1587. fn: function () {
  1588. var self = this;
  1589. return self.toString();
  1590. return self;
  1591. },
  1592. args: [],
  1593. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  1594. messageSends: [],
  1595. referencedClasses: []
  1596. }),
  1597. smalltalk.Boolean);
  1598. smalltalk.addMethod(
  1599. unescape('_shallowCopy'),
  1600. smalltalk.method({
  1601. selector: unescape('shallowCopy'),
  1602. category: 'copying',
  1603. fn: function () {
  1604. var self = this;
  1605. return self;
  1606. return self;
  1607. },
  1608. args: [],
  1609. source: unescape('shallowCopy%0A%09%5Eself'),
  1610. messageSends: [],
  1611. referencedClasses: []
  1612. }),
  1613. smalltalk.Boolean);
  1614. smalltalk.addMethod(
  1615. unescape('_%7C'),
  1616. smalltalk.method({
  1617. selector: unescape('%7C'),
  1618. category: 'controlling',
  1619. fn: function (aBoolean) {
  1620. var self = this;
  1621. if (self == true) {
  1622. return true;
  1623. } else {
  1624. return aBoolean;
  1625. }
  1626. return self;
  1627. },
  1628. args: ["aBoolean"],
  1629. 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'),
  1630. messageSends: [],
  1631. referencedClasses: []
  1632. }),
  1633. smalltalk.Boolean);
  1634. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  1635. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.%20Therefore%20%60Date%20today%60%20and%20%60Date%20now%60%20are%20both%20valid%20in%0AAmber%20and%20answer%20the%20same%20date%20object.%0A%0ADate%20wraps%20the%20%60Date%28%29%60%20JavaScript%20constructor%2C%20and%20Smalltalk%20date%20objects%20are%20JavaScript%20date%20objects.')
  1636. smalltalk.addMethod(
  1637. unescape('__plus'),
  1638. smalltalk.method({
  1639. selector: unescape('+'),
  1640. category: 'arithmetic',
  1641. fn: function (aDate) {
  1642. var self = this;
  1643. return self + aDate;
  1644. return self;
  1645. },
  1646. args: ["aDate"],
  1647. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  1648. messageSends: [],
  1649. referencedClasses: []
  1650. }),
  1651. smalltalk.Date);
  1652. smalltalk.addMethod(
  1653. unescape('__minus'),
  1654. smalltalk.method({
  1655. selector: unescape('-'),
  1656. category: 'arithmetic',
  1657. fn: function (aDate) {
  1658. var self = this;
  1659. return self - aDate;
  1660. return self;
  1661. },
  1662. args: ["aDate"],
  1663. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  1664. messageSends: [],
  1665. referencedClasses: []
  1666. }),
  1667. smalltalk.Date);
  1668. smalltalk.addMethod(
  1669. unescape('__lt'),
  1670. smalltalk.method({
  1671. selector: unescape('%3C'),
  1672. category: 'comparing',
  1673. fn: function (aDate) {
  1674. var self = this;
  1675. return self < aDate;
  1676. return self;
  1677. },
  1678. args: ["aDate"],
  1679. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  1680. messageSends: [],
  1681. referencedClasses: []
  1682. }),
  1683. smalltalk.Date);
  1684. smalltalk.addMethod(
  1685. unescape('__lt_eq'),
  1686. smalltalk.method({
  1687. selector: unescape('%3C%3D'),
  1688. category: 'comparing',
  1689. fn: function (aDate) {
  1690. var self = this;
  1691. return self <= aDate;
  1692. return self;
  1693. },
  1694. args: ["aDate"],
  1695. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  1696. messageSends: [],
  1697. referencedClasses: []
  1698. }),
  1699. smalltalk.Date);
  1700. smalltalk.addMethod(
  1701. unescape('__gt'),
  1702. smalltalk.method({
  1703. selector: unescape('%3E'),
  1704. category: 'comparing',
  1705. fn: function (aDate) {
  1706. var self = this;
  1707. return self > aDate;
  1708. return self;
  1709. },
  1710. args: ["aDate"],
  1711. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  1712. messageSends: [],
  1713. referencedClasses: []
  1714. }),
  1715. smalltalk.Date);
  1716. smalltalk.addMethod(
  1717. unescape('__gt_eq'),
  1718. smalltalk.method({
  1719. selector: unescape('%3E%3D'),
  1720. category: 'comparing',
  1721. fn: function (aDate) {
  1722. var self = this;
  1723. return self >= aDate;
  1724. return self;
  1725. },
  1726. args: ["aDate"],
  1727. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  1728. messageSends: [],
  1729. referencedClasses: []
  1730. }),
  1731. smalltalk.Date);
  1732. smalltalk.addMethod(
  1733. unescape('_asDateString'),
  1734. smalltalk.method({
  1735. selector: unescape('asDateString'),
  1736. category: 'converting',
  1737. fn: function () {
  1738. var self = this;
  1739. return self.toDateString();
  1740. return self;
  1741. },
  1742. args: [],
  1743. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  1744. messageSends: [],
  1745. referencedClasses: []
  1746. }),
  1747. smalltalk.Date);
  1748. smalltalk.addMethod(
  1749. unescape('_asLocaleString'),
  1750. smalltalk.method({
  1751. selector: unescape('asLocaleString'),
  1752. category: 'converting',
  1753. fn: function () {
  1754. var self = this;
  1755. return self.toLocaleString();
  1756. return self;
  1757. },
  1758. args: [],
  1759. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  1760. messageSends: [],
  1761. referencedClasses: []
  1762. }),
  1763. smalltalk.Date);
  1764. smalltalk.addMethod(
  1765. unescape('_asMilliseconds'),
  1766. smalltalk.method({
  1767. selector: unescape('asMilliseconds'),
  1768. category: 'converting',
  1769. fn: function () {
  1770. var self = this;
  1771. return smalltalk.send(self, "_time", []);
  1772. return self;
  1773. },
  1774. args: [],
  1775. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  1776. messageSends: ["time"],
  1777. referencedClasses: []
  1778. }),
  1779. smalltalk.Date);
  1780. smalltalk.addMethod(
  1781. unescape('_asNumber'),
  1782. smalltalk.method({
  1783. selector: unescape('asNumber'),
  1784. category: 'converting',
  1785. fn: function () {
  1786. var self = this;
  1787. return smalltalk.send(self, "_asMilliseconds", []);
  1788. return self;
  1789. },
  1790. args: [],
  1791. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  1792. messageSends: ["asMilliseconds"],
  1793. referencedClasses: []
  1794. }),
  1795. smalltalk.Date);
  1796. smalltalk.addMethod(
  1797. unescape('_asString'),
  1798. smalltalk.method({
  1799. selector: unescape('asString'),
  1800. category: 'converting',
  1801. fn: function () {
  1802. var self = this;
  1803. return self.toString();
  1804. return self;
  1805. },
  1806. args: [],
  1807. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  1808. messageSends: [],
  1809. referencedClasses: []
  1810. }),
  1811. smalltalk.Date);
  1812. smalltalk.addMethod(
  1813. unescape('_asTimeString'),
  1814. smalltalk.method({
  1815. selector: unescape('asTimeString'),
  1816. category: 'converting',
  1817. fn: function () {
  1818. var self = this;
  1819. return self.toTimeString();
  1820. return self;
  1821. },
  1822. args: [],
  1823. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  1824. messageSends: [],
  1825. referencedClasses: []
  1826. }),
  1827. smalltalk.Date);
  1828. smalltalk.addMethod(
  1829. unescape('_day'),
  1830. smalltalk.method({
  1831. selector: unescape('day'),
  1832. category: 'accessing',
  1833. fn: function () {
  1834. var self = this;
  1835. return smalltalk.send(self, "_dayOfWeek", []);
  1836. return self;
  1837. },
  1838. args: [],
  1839. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  1840. messageSends: ["dayOfWeek"],
  1841. referencedClasses: []
  1842. }),
  1843. smalltalk.Date);
  1844. smalltalk.addMethod(
  1845. unescape('_day_'),
  1846. smalltalk.method({
  1847. selector: unescape('day%3A'),
  1848. category: 'accessing',
  1849. fn: function (aNumber) {
  1850. var self = this;
  1851. smalltalk.send(self, "_day_", [aNumber]);
  1852. return self;
  1853. },
  1854. args: ["aNumber"],
  1855. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  1856. messageSends: ["day:"],
  1857. referencedClasses: []
  1858. }),
  1859. smalltalk.Date);
  1860. smalltalk.addMethod(
  1861. unescape('_dayOfMonth'),
  1862. smalltalk.method({
  1863. selector: unescape('dayOfMonth'),
  1864. category: 'accessing',
  1865. fn: function () {
  1866. var self = this;
  1867. return self.getDate();
  1868. return self;
  1869. },
  1870. args: [],
  1871. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  1872. messageSends: [],
  1873. referencedClasses: []
  1874. }),
  1875. smalltalk.Date);
  1876. smalltalk.addMethod(
  1877. unescape('_dayOfMonth_'),
  1878. smalltalk.method({
  1879. selector: unescape('dayOfMonth%3A'),
  1880. category: 'accessing',
  1881. fn: function (aNumber) {
  1882. var self = this;
  1883. self.setDate(aNumber);
  1884. return self;
  1885. },
  1886. args: ["aNumber"],
  1887. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  1888. messageSends: [],
  1889. referencedClasses: []
  1890. }),
  1891. smalltalk.Date);
  1892. smalltalk.addMethod(
  1893. unescape('_dayOfWeek'),
  1894. smalltalk.method({
  1895. selector: unescape('dayOfWeek'),
  1896. category: 'accessing',
  1897. fn: function () {
  1898. var self = this;
  1899. return self.getDay() + 1;
  1900. return self;
  1901. },
  1902. args: [],
  1903. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  1904. messageSends: [],
  1905. referencedClasses: []
  1906. }),
  1907. smalltalk.Date);
  1908. smalltalk.addMethod(
  1909. unescape('_dayOfWeek_'),
  1910. smalltalk.method({
  1911. selector: unescape('dayOfWeek%3A'),
  1912. category: 'accessing',
  1913. fn: function (aNumber) {
  1914. var self = this;
  1915. return self.setDay(aNumber - 1);
  1916. return self;
  1917. },
  1918. args: ["aNumber"],
  1919. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  1920. messageSends: [],
  1921. referencedClasses: []
  1922. }),
  1923. smalltalk.Date);
  1924. smalltalk.addMethod(
  1925. unescape('_hours'),
  1926. smalltalk.method({
  1927. selector: unescape('hours'),
  1928. category: 'accessing',
  1929. fn: function () {
  1930. var self = this;
  1931. return self.getHours();
  1932. return self;
  1933. },
  1934. args: [],
  1935. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  1936. messageSends: [],
  1937. referencedClasses: []
  1938. }),
  1939. smalltalk.Date);
  1940. smalltalk.addMethod(
  1941. unescape('_hours_'),
  1942. smalltalk.method({
  1943. selector: unescape('hours%3A'),
  1944. category: 'accessing',
  1945. fn: function (aNumber) {
  1946. var self = this;
  1947. self.setHours(aNumber);
  1948. return self;
  1949. },
  1950. args: ["aNumber"],
  1951. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  1952. messageSends: [],
  1953. referencedClasses: []
  1954. }),
  1955. smalltalk.Date);
  1956. smalltalk.addMethod(
  1957. unescape('_milliseconds'),
  1958. smalltalk.method({
  1959. selector: unescape('milliseconds'),
  1960. category: 'accessing',
  1961. fn: function () {
  1962. var self = this;
  1963. return self.getMilliseconds();
  1964. return self;
  1965. },
  1966. args: [],
  1967. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  1968. messageSends: [],
  1969. referencedClasses: []
  1970. }),
  1971. smalltalk.Date);
  1972. smalltalk.addMethod(
  1973. unescape('_milliseconds_'),
  1974. smalltalk.method({
  1975. selector: unescape('milliseconds%3A'),
  1976. category: 'accessing',
  1977. fn: function (aNumber) {
  1978. var self = this;
  1979. self.setMilliseconds(aNumber);
  1980. return self;
  1981. },
  1982. args: ["aNumber"],
  1983. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  1984. messageSends: [],
  1985. referencedClasses: []
  1986. }),
  1987. smalltalk.Date);
  1988. smalltalk.addMethod(
  1989. unescape('_minutes'),
  1990. smalltalk.method({
  1991. selector: unescape('minutes'),
  1992. category: 'accessing',
  1993. fn: function () {
  1994. var self = this;
  1995. return self.getMinutes();
  1996. return self;
  1997. },
  1998. args: [],
  1999. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  2000. messageSends: [],
  2001. referencedClasses: []
  2002. }),
  2003. smalltalk.Date);
  2004. smalltalk.addMethod(
  2005. unescape('_minutes_'),
  2006. smalltalk.method({
  2007. selector: unescape('minutes%3A'),
  2008. category: 'accessing',
  2009. fn: function (aNumber) {
  2010. var self = this;
  2011. self.setMinutes(aNumber);
  2012. return self;
  2013. },
  2014. args: ["aNumber"],
  2015. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  2016. messageSends: [],
  2017. referencedClasses: []
  2018. }),
  2019. smalltalk.Date);
  2020. smalltalk.addMethod(
  2021. unescape('_month'),
  2022. smalltalk.method({
  2023. selector: unescape('month'),
  2024. category: 'accessing',
  2025. fn: function () {
  2026. var self = this;
  2027. return self.getMonth() + 1;
  2028. return self;
  2029. },
  2030. args: [],
  2031. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  2032. messageSends: [],
  2033. referencedClasses: []
  2034. }),
  2035. smalltalk.Date);
  2036. smalltalk.addMethod(
  2037. unescape('_month_'),
  2038. smalltalk.method({
  2039. selector: unescape('month%3A'),
  2040. category: 'accessing',
  2041. fn: function (aNumber) {
  2042. var self = this;
  2043. self.setMonth(aNumber - 1);
  2044. return self;
  2045. },
  2046. args: ["aNumber"],
  2047. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  2048. messageSends: [],
  2049. referencedClasses: []
  2050. }),
  2051. smalltalk.Date);
  2052. smalltalk.addMethod(
  2053. unescape('_printString'),
  2054. smalltalk.method({
  2055. selector: unescape('printString'),
  2056. category: 'printing',
  2057. fn: function () {
  2058. var self = this;
  2059. return smalltalk.send(self, "_asString", []);
  2060. return self;
  2061. },
  2062. args: [],
  2063. source: unescape('printString%0A%09%5Eself%20asString'),
  2064. messageSends: ["asString"],
  2065. referencedClasses: []
  2066. }),
  2067. smalltalk.Date);
  2068. smalltalk.addMethod(
  2069. unescape('_seconds'),
  2070. smalltalk.method({
  2071. selector: unescape('seconds'),
  2072. category: 'accessing',
  2073. fn: function () {
  2074. var self = this;
  2075. return self.getSeconds();
  2076. return self;
  2077. },
  2078. args: [],
  2079. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  2080. messageSends: [],
  2081. referencedClasses: []
  2082. }),
  2083. smalltalk.Date);
  2084. smalltalk.addMethod(
  2085. unescape('_seconds_'),
  2086. smalltalk.method({
  2087. selector: unescape('seconds%3A'),
  2088. category: 'accessing',
  2089. fn: function (aNumber) {
  2090. var self = this;
  2091. self.setSeconds(aNumber);
  2092. return self;
  2093. },
  2094. args: ["aNumber"],
  2095. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  2096. messageSends: [],
  2097. referencedClasses: []
  2098. }),
  2099. smalltalk.Date);
  2100. smalltalk.addMethod(
  2101. unescape('_time'),
  2102. smalltalk.method({
  2103. selector: unescape('time'),
  2104. category: 'accessing',
  2105. fn: function () {
  2106. var self = this;
  2107. return self.getTime();
  2108. return self;
  2109. },
  2110. args: [],
  2111. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  2112. messageSends: [],
  2113. referencedClasses: []
  2114. }),
  2115. smalltalk.Date);
  2116. smalltalk.addMethod(
  2117. unescape('_time_'),
  2118. smalltalk.method({
  2119. selector: unescape('time%3A'),
  2120. category: 'accessing',
  2121. fn: function (aNumber) {
  2122. var self = this;
  2123. self.setTime(aNumber);
  2124. return self;
  2125. },
  2126. args: ["aNumber"],
  2127. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  2128. messageSends: [],
  2129. referencedClasses: []
  2130. }),
  2131. smalltalk.Date);
  2132. smalltalk.addMethod(
  2133. unescape('_year'),
  2134. smalltalk.method({
  2135. selector: unescape('year'),
  2136. category: 'accessing',
  2137. fn: function () {
  2138. var self = this;
  2139. return self.getFullYear();
  2140. return self;
  2141. },
  2142. args: [],
  2143. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  2144. messageSends: [],
  2145. referencedClasses: []
  2146. }),
  2147. smalltalk.Date);
  2148. smalltalk.addMethod(
  2149. unescape('_year_'),
  2150. smalltalk.method({
  2151. selector: unescape('year%3A'),
  2152. category: 'accessing',
  2153. fn: function (aNumber) {
  2154. var self = this;
  2155. self.setFullYear(aNumber);
  2156. return self;
  2157. },
  2158. args: ["aNumber"],
  2159. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  2160. messageSends: [],
  2161. referencedClasses: []
  2162. }),
  2163. smalltalk.Date);
  2164. smalltalk.addMethod(
  2165. unescape('_fromMilliseconds_'),
  2166. smalltalk.method({
  2167. selector: unescape('fromMilliseconds%3A'),
  2168. category: 'instance creation',
  2169. fn: function (aNumber) {
  2170. var self = this;
  2171. return smalltalk.send(self, "_new_", [aNumber]);
  2172. return self;
  2173. },
  2174. args: ["aNumber"],
  2175. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  2176. messageSends: ["new:"],
  2177. referencedClasses: []
  2178. }),
  2179. smalltalk.Date.klass);
  2180. smalltalk.addMethod(
  2181. unescape('_fromSeconds_'),
  2182. smalltalk.method({
  2183. selector: unescape('fromSeconds%3A'),
  2184. category: 'instance creation',
  2185. fn: function (aNumber) {
  2186. var self = this;
  2187. return smalltalk.send(self, "_fromMilliseconds_", [($receiver = aNumber).klass === smalltalk.Number ? $receiver * 1000 : smalltalk.send($receiver, "__star", [1000])]);
  2188. return self;
  2189. },
  2190. args: ["aNumber"],
  2191. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  2192. messageSends: ["fromMilliseconds:", unescape("*")],
  2193. referencedClasses: []
  2194. }),
  2195. smalltalk.Date.klass);
  2196. smalltalk.addMethod(
  2197. unescape('_fromString_'),
  2198. smalltalk.method({
  2199. selector: unescape('fromString%3A'),
  2200. category: 'instance creation',
  2201. fn: function (aString) {
  2202. var self = this;
  2203. return smalltalk.send(self, "_new_", [aString]);
  2204. return self;
  2205. },
  2206. args: ["aString"],
  2207. 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'),
  2208. messageSends: ["new:"],
  2209. referencedClasses: []
  2210. }),
  2211. smalltalk.Date.klass);
  2212. smalltalk.addMethod(
  2213. unescape('_millisecondsToRun_'),
  2214. smalltalk.method({
  2215. selector: unescape('millisecondsToRun%3A'),
  2216. category: 'instance creation',
  2217. fn: function (aBlock) {
  2218. var self = this;
  2219. var t = nil;
  2220. t = smalltalk.send(smalltalk.Date || Date, "_now", []);
  2221. smalltalk.send(aBlock, "_value", []);
  2222. return ($receiver = smalltalk.send(smalltalk.Date || Date, "_now", [])).klass === smalltalk.Number ? $receiver - t : smalltalk.send($receiver, "__minus", [t]);
  2223. return self;
  2224. },
  2225. args: ["aBlock"],
  2226. 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'),
  2227. messageSends: ["now", "value", unescape("-")],
  2228. referencedClasses: ["Date"]
  2229. }),
  2230. smalltalk.Date.klass);
  2231. smalltalk.addMethod(
  2232. unescape('_new_'),
  2233. smalltalk.method({
  2234. selector: unescape('new%3A'),
  2235. category: 'instance creation',
  2236. fn: function (anObject) {
  2237. var self = this;
  2238. return new Date(anObject);
  2239. return self;
  2240. },
  2241. args: ["anObject"],
  2242. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  2243. messageSends: [],
  2244. referencedClasses: []
  2245. }),
  2246. smalltalk.Date.klass);
  2247. smalltalk.addMethod(
  2248. unescape('_now'),
  2249. smalltalk.method({
  2250. selector: unescape('now'),
  2251. category: 'instance creation',
  2252. fn: function () {
  2253. var self = this;
  2254. return smalltalk.send(self, "_today", []);
  2255. return self;
  2256. },
  2257. args: [],
  2258. source: unescape('now%0A%09%5Eself%20today'),
  2259. messageSends: ["today"],
  2260. referencedClasses: []
  2261. }),
  2262. smalltalk.Date.klass);
  2263. smalltalk.addMethod(
  2264. unescape('_today'),
  2265. smalltalk.method({
  2266. selector: unescape('today'),
  2267. category: 'instance creation',
  2268. fn: function () {
  2269. var self = this;
  2270. return smalltalk.send(self, "_new", []);
  2271. return self;
  2272. },
  2273. args: [],
  2274. source: unescape('today%0A%09%5Eself%20new'),
  2275. messageSends: ["new"],
  2276. referencedClasses: []
  2277. }),
  2278. smalltalk.Date.klass);
  2279. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  2280. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.%20Therefore%20%60Date%20today%60%20and%20%60Date%20now%60%20are%20both%20valid%20in%0AAmber%20and%20answer%20the%20same%20date%20object.%0A%0ADate%20wraps%20the%20%60Date%28%29%60%20JavaScript%20constructor%2C%20and%20Smalltalk%20date%20objects%20are%20JavaScript%20date%20objects.')
  2281. smalltalk.addMethod(
  2282. unescape('__plus'),
  2283. smalltalk.method({
  2284. selector: unescape('+'),
  2285. category: 'arithmetic',
  2286. fn: function (aDate) {
  2287. var self = this;
  2288. return self + aDate;
  2289. return self;
  2290. },
  2291. args: ["aDate"],
  2292. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  2293. messageSends: [],
  2294. referencedClasses: []
  2295. }),
  2296. smalltalk.Date);
  2297. smalltalk.addMethod(
  2298. unescape('__minus'),
  2299. smalltalk.method({
  2300. selector: unescape('-'),
  2301. category: 'arithmetic',
  2302. fn: function (aDate) {
  2303. var self = this;
  2304. return self - aDate;
  2305. return self;
  2306. },
  2307. args: ["aDate"],
  2308. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  2309. messageSends: [],
  2310. referencedClasses: []
  2311. }),
  2312. smalltalk.Date);
  2313. smalltalk.addMethod(
  2314. unescape('__lt'),
  2315. smalltalk.method({
  2316. selector: unescape('%3C'),
  2317. category: 'comparing',
  2318. fn: function (aDate) {
  2319. var self = this;
  2320. return self < aDate;
  2321. return self;
  2322. },
  2323. args: ["aDate"],
  2324. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  2325. messageSends: [],
  2326. referencedClasses: []
  2327. }),
  2328. smalltalk.Date);
  2329. smalltalk.addMethod(
  2330. unescape('__lt_eq'),
  2331. smalltalk.method({
  2332. selector: unescape('%3C%3D'),
  2333. category: 'comparing',
  2334. fn: function (aDate) {
  2335. var self = this;
  2336. return self <= aDate;
  2337. return self;
  2338. },
  2339. args: ["aDate"],
  2340. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  2341. messageSends: [],
  2342. referencedClasses: []
  2343. }),
  2344. smalltalk.Date);
  2345. smalltalk.addMethod(
  2346. unescape('__gt'),
  2347. smalltalk.method({
  2348. selector: unescape('%3E'),
  2349. category: 'comparing',
  2350. fn: function (aDate) {
  2351. var self = this;
  2352. return self > aDate;
  2353. return self;
  2354. },
  2355. args: ["aDate"],
  2356. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  2357. messageSends: [],
  2358. referencedClasses: []
  2359. }),
  2360. smalltalk.Date);
  2361. smalltalk.addMethod(
  2362. unescape('__gt_eq'),
  2363. smalltalk.method({
  2364. selector: unescape('%3E%3D'),
  2365. category: 'comparing',
  2366. fn: function (aDate) {
  2367. var self = this;
  2368. return self >= aDate;
  2369. return self;
  2370. },
  2371. args: ["aDate"],
  2372. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  2373. messageSends: [],
  2374. referencedClasses: []
  2375. }),
  2376. smalltalk.Date);
  2377. smalltalk.addMethod(
  2378. unescape('_asDateString'),
  2379. smalltalk.method({
  2380. selector: unescape('asDateString'),
  2381. category: 'converting',
  2382. fn: function () {
  2383. var self = this;
  2384. return self.toDateString();
  2385. return self;
  2386. },
  2387. args: [],
  2388. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  2389. messageSends: [],
  2390. referencedClasses: []
  2391. }),
  2392. smalltalk.Date);
  2393. smalltalk.addMethod(
  2394. unescape('_asLocaleString'),
  2395. smalltalk.method({
  2396. selector: unescape('asLocaleString'),
  2397. category: 'converting',
  2398. fn: function () {
  2399. var self = this;
  2400. return self.toLocaleString();
  2401. return self;
  2402. },
  2403. args: [],
  2404. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  2405. messageSends: [],
  2406. referencedClasses: []
  2407. }),
  2408. smalltalk.Date);
  2409. smalltalk.addMethod(
  2410. unescape('_asMilliseconds'),
  2411. smalltalk.method({
  2412. selector: unescape('asMilliseconds'),
  2413. category: 'converting',
  2414. fn: function () {
  2415. var self = this;
  2416. return smalltalk.send(self, "_time", []);
  2417. return self;
  2418. },
  2419. args: [],
  2420. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  2421. messageSends: ["time"],
  2422. referencedClasses: []
  2423. }),
  2424. smalltalk.Date);
  2425. smalltalk.addMethod(
  2426. unescape('_asNumber'),
  2427. smalltalk.method({
  2428. selector: unescape('asNumber'),
  2429. category: 'converting',
  2430. fn: function () {
  2431. var self = this;
  2432. return smalltalk.send(self, "_asMilliseconds", []);
  2433. return self;
  2434. },
  2435. args: [],
  2436. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  2437. messageSends: ["asMilliseconds"],
  2438. referencedClasses: []
  2439. }),
  2440. smalltalk.Date);
  2441. smalltalk.addMethod(
  2442. unescape('_asString'),
  2443. smalltalk.method({
  2444. selector: unescape('asString'),
  2445. category: 'converting',
  2446. fn: function () {
  2447. var self = this;
  2448. return self.toString();
  2449. return self;
  2450. },
  2451. args: [],
  2452. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  2453. messageSends: [],
  2454. referencedClasses: []
  2455. }),
  2456. smalltalk.Date);
  2457. smalltalk.addMethod(
  2458. unescape('_asTimeString'),
  2459. smalltalk.method({
  2460. selector: unescape('asTimeString'),
  2461. category: 'converting',
  2462. fn: function () {
  2463. var self = this;
  2464. return self.toTimeString();
  2465. return self;
  2466. },
  2467. args: [],
  2468. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  2469. messageSends: [],
  2470. referencedClasses: []
  2471. }),
  2472. smalltalk.Date);
  2473. smalltalk.addMethod(
  2474. unescape('_day'),
  2475. smalltalk.method({
  2476. selector: unescape('day'),
  2477. category: 'accessing',
  2478. fn: function () {
  2479. var self = this;
  2480. return smalltalk.send(self, "_dayOfWeek", []);
  2481. return self;
  2482. },
  2483. args: [],
  2484. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  2485. messageSends: ["dayOfWeek"],
  2486. referencedClasses: []
  2487. }),
  2488. smalltalk.Date);
  2489. smalltalk.addMethod(
  2490. unescape('_day_'),
  2491. smalltalk.method({
  2492. selector: unescape('day%3A'),
  2493. category: 'accessing',
  2494. fn: function (aNumber) {
  2495. var self = this;
  2496. smalltalk.send(self, "_day_", [aNumber]);
  2497. return self;
  2498. },
  2499. args: ["aNumber"],
  2500. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  2501. messageSends: ["day:"],
  2502. referencedClasses: []
  2503. }),
  2504. smalltalk.Date);
  2505. smalltalk.addMethod(
  2506. unescape('_dayOfMonth'),
  2507. smalltalk.method({
  2508. selector: unescape('dayOfMonth'),
  2509. category: 'accessing',
  2510. fn: function () {
  2511. var self = this;
  2512. return self.getDate();
  2513. return self;
  2514. },
  2515. args: [],
  2516. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  2517. messageSends: [],
  2518. referencedClasses: []
  2519. }),
  2520. smalltalk.Date);
  2521. smalltalk.addMethod(
  2522. unescape('_dayOfMonth_'),
  2523. smalltalk.method({
  2524. selector: unescape('dayOfMonth%3A'),
  2525. category: 'accessing',
  2526. fn: function (aNumber) {
  2527. var self = this;
  2528. self.setDate(aNumber);
  2529. return self;
  2530. },
  2531. args: ["aNumber"],
  2532. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  2533. messageSends: [],
  2534. referencedClasses: []
  2535. }),
  2536. smalltalk.Date);
  2537. smalltalk.addMethod(
  2538. unescape('_dayOfWeek'),
  2539. smalltalk.method({
  2540. selector: unescape('dayOfWeek'),
  2541. category: 'accessing',
  2542. fn: function () {
  2543. var self = this;
  2544. return self.getDay() + 1;
  2545. return self;
  2546. },
  2547. args: [],
  2548. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  2549. messageSends: [],
  2550. referencedClasses: []
  2551. }),
  2552. smalltalk.Date);
  2553. smalltalk.addMethod(
  2554. unescape('_dayOfWeek_'),
  2555. smalltalk.method({
  2556. selector: unescape('dayOfWeek%3A'),
  2557. category: 'accessing',
  2558. fn: function (aNumber) {
  2559. var self = this;
  2560. return self.setDay(aNumber - 1);
  2561. return self;
  2562. },
  2563. args: ["aNumber"],
  2564. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  2565. messageSends: [],
  2566. referencedClasses: []
  2567. }),
  2568. smalltalk.Date);
  2569. smalltalk.addMethod(
  2570. unescape('_hours'),
  2571. smalltalk.method({
  2572. selector: unescape('hours'),
  2573. category: 'accessing',
  2574. fn: function () {
  2575. var self = this;
  2576. return self.getHours();
  2577. return self;
  2578. },
  2579. args: [],
  2580. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  2581. messageSends: [],
  2582. referencedClasses: []
  2583. }),
  2584. smalltalk.Date);
  2585. smalltalk.addMethod(
  2586. unescape('_hours_'),
  2587. smalltalk.method({
  2588. selector: unescape('hours%3A'),
  2589. category: 'accessing',
  2590. fn: function (aNumber) {
  2591. var self = this;
  2592. self.setHours(aNumber);
  2593. return self;
  2594. },
  2595. args: ["aNumber"],
  2596. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  2597. messageSends: [],
  2598. referencedClasses: []
  2599. }),
  2600. smalltalk.Date);
  2601. smalltalk.addMethod(
  2602. unescape('_milliseconds'),
  2603. smalltalk.method({
  2604. selector: unescape('milliseconds'),
  2605. category: 'accessing',
  2606. fn: function () {
  2607. var self = this;
  2608. return self.getMilliseconds();
  2609. return self;
  2610. },
  2611. args: [],
  2612. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  2613. messageSends: [],
  2614. referencedClasses: []
  2615. }),
  2616. smalltalk.Date);
  2617. smalltalk.addMethod(
  2618. unescape('_milliseconds_'),
  2619. smalltalk.method({
  2620. selector: unescape('milliseconds%3A'),
  2621. category: 'accessing',
  2622. fn: function (aNumber) {
  2623. var self = this;
  2624. self.setMilliseconds(aNumber);
  2625. return self;
  2626. },
  2627. args: ["aNumber"],
  2628. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  2629. messageSends: [],
  2630. referencedClasses: []
  2631. }),
  2632. smalltalk.Date);
  2633. smalltalk.addMethod(
  2634. unescape('_minutes'),
  2635. smalltalk.method({
  2636. selector: unescape('minutes'),
  2637. category: 'accessing',
  2638. fn: function () {
  2639. var self = this;
  2640. return self.getMinutes();
  2641. return self;
  2642. },
  2643. args: [],
  2644. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  2645. messageSends: [],
  2646. referencedClasses: []
  2647. }),
  2648. smalltalk.Date);
  2649. smalltalk.addMethod(
  2650. unescape('_minutes_'),
  2651. smalltalk.method({
  2652. selector: unescape('minutes%3A'),
  2653. category: 'accessing',
  2654. fn: function (aNumber) {
  2655. var self = this;
  2656. self.setMinutes(aNumber);
  2657. return self;
  2658. },
  2659. args: ["aNumber"],
  2660. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  2661. messageSends: [],
  2662. referencedClasses: []
  2663. }),
  2664. smalltalk.Date);
  2665. smalltalk.addMethod(
  2666. unescape('_month'),
  2667. smalltalk.method({
  2668. selector: unescape('month'),
  2669. category: 'accessing',
  2670. fn: function () {
  2671. var self = this;
  2672. return self.getMonth() + 1;
  2673. return self;
  2674. },
  2675. args: [],
  2676. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  2677. messageSends: [],
  2678. referencedClasses: []
  2679. }),
  2680. smalltalk.Date);
  2681. smalltalk.addMethod(
  2682. unescape('_month_'),
  2683. smalltalk.method({
  2684. selector: unescape('month%3A'),
  2685. category: 'accessing',
  2686. fn: function (aNumber) {
  2687. var self = this;
  2688. self.setMonth(aNumber - 1);
  2689. return self;
  2690. },
  2691. args: ["aNumber"],
  2692. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  2693. messageSends: [],
  2694. referencedClasses: []
  2695. }),
  2696. smalltalk.Date);
  2697. smalltalk.addMethod(
  2698. unescape('_printString'),
  2699. smalltalk.method({
  2700. selector: unescape('printString'),
  2701. category: 'printing',
  2702. fn: function () {
  2703. var self = this;
  2704. return smalltalk.send(self, "_asString", []);
  2705. return self;
  2706. },
  2707. args: [],
  2708. source: unescape('printString%0A%09%5Eself%20asString'),
  2709. messageSends: ["asString"],
  2710. referencedClasses: []
  2711. }),
  2712. smalltalk.Date);
  2713. smalltalk.addMethod(
  2714. unescape('_seconds'),
  2715. smalltalk.method({
  2716. selector: unescape('seconds'),
  2717. category: 'accessing',
  2718. fn: function () {
  2719. var self = this;
  2720. return self.getSeconds();
  2721. return self;
  2722. },
  2723. args: [],
  2724. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  2725. messageSends: [],
  2726. referencedClasses: []
  2727. }),
  2728. smalltalk.Date);
  2729. smalltalk.addMethod(
  2730. unescape('_seconds_'),
  2731. smalltalk.method({
  2732. selector: unescape('seconds%3A'),
  2733. category: 'accessing',
  2734. fn: function (aNumber) {
  2735. var self = this;
  2736. self.setSeconds(aNumber);
  2737. return self;
  2738. },
  2739. args: ["aNumber"],
  2740. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  2741. messageSends: [],
  2742. referencedClasses: []
  2743. }),
  2744. smalltalk.Date);
  2745. smalltalk.addMethod(
  2746. unescape('_time'),
  2747. smalltalk.method({
  2748. selector: unescape('time'),
  2749. category: 'accessing',
  2750. fn: function () {
  2751. var self = this;
  2752. return self.getTime();
  2753. return self;
  2754. },
  2755. args: [],
  2756. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  2757. messageSends: [],
  2758. referencedClasses: []
  2759. }),
  2760. smalltalk.Date);
  2761. smalltalk.addMethod(
  2762. unescape('_time_'),
  2763. smalltalk.method({
  2764. selector: unescape('time%3A'),
  2765. category: 'accessing',
  2766. fn: function (aNumber) {
  2767. var self = this;
  2768. self.setTime(aNumber);
  2769. return self;
  2770. },
  2771. args: ["aNumber"],
  2772. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  2773. messageSends: [],
  2774. referencedClasses: []
  2775. }),
  2776. smalltalk.Date);
  2777. smalltalk.addMethod(
  2778. unescape('_year'),
  2779. smalltalk.method({
  2780. selector: unescape('year'),
  2781. category: 'accessing',
  2782. fn: function () {
  2783. var self = this;
  2784. return self.getFullYear();
  2785. return self;
  2786. },
  2787. args: [],
  2788. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  2789. messageSends: [],
  2790. referencedClasses: []
  2791. }),
  2792. smalltalk.Date);
  2793. smalltalk.addMethod(
  2794. unescape('_year_'),
  2795. smalltalk.method({
  2796. selector: unescape('year%3A'),
  2797. category: 'accessing',
  2798. fn: function (aNumber) {
  2799. var self = this;
  2800. self.setFullYear(aNumber);
  2801. return self;
  2802. },
  2803. args: ["aNumber"],
  2804. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  2805. messageSends: [],
  2806. referencedClasses: []
  2807. }),
  2808. smalltalk.Date);
  2809. smalltalk.addMethod(
  2810. unescape('_fromMilliseconds_'),
  2811. smalltalk.method({
  2812. selector: unescape('fromMilliseconds%3A'),
  2813. category: 'instance creation',
  2814. fn: function (aNumber) {
  2815. var self = this;
  2816. return smalltalk.send(self, "_new_", [aNumber]);
  2817. return self;
  2818. },
  2819. args: ["aNumber"],
  2820. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  2821. messageSends: ["new:"],
  2822. referencedClasses: []
  2823. }),
  2824. smalltalk.Date.klass);
  2825. smalltalk.addMethod(
  2826. unescape('_fromSeconds_'),
  2827. smalltalk.method({
  2828. selector: unescape('fromSeconds%3A'),
  2829. category: 'instance creation',
  2830. fn: function (aNumber) {
  2831. var self = this;
  2832. return smalltalk.send(self, "_fromMilliseconds_", [($receiver = aNumber).klass === smalltalk.Number ? $receiver * 1000 : smalltalk.send($receiver, "__star", [1000])]);
  2833. return self;
  2834. },
  2835. args: ["aNumber"],
  2836. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  2837. messageSends: ["fromMilliseconds:", unescape("*")],
  2838. referencedClasses: []
  2839. }),
  2840. smalltalk.Date.klass);
  2841. smalltalk.addMethod(
  2842. unescape('_fromString_'),
  2843. smalltalk.method({
  2844. selector: unescape('fromString%3A'),
  2845. category: 'instance creation',
  2846. fn: function (aString) {
  2847. var self = this;
  2848. return smalltalk.send(self, "_new_", [aString]);
  2849. return self;
  2850. },
  2851. args: ["aString"],
  2852. 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'),
  2853. messageSends: ["new:"],
  2854. referencedClasses: []
  2855. }),
  2856. smalltalk.Date.klass);
  2857. smalltalk.addMethod(
  2858. unescape('_millisecondsToRun_'),
  2859. smalltalk.method({
  2860. selector: unescape('millisecondsToRun%3A'),
  2861. category: 'instance creation',
  2862. fn: function (aBlock) {
  2863. var self = this;
  2864. var t = nil;
  2865. t = smalltalk.send(smalltalk.Date || Date, "_now", []);
  2866. smalltalk.send(aBlock, "_value", []);
  2867. return ($receiver = smalltalk.send(smalltalk.Date || Date, "_now", [])).klass === smalltalk.Number ? $receiver - t : smalltalk.send($receiver, "__minus", [t]);
  2868. return self;
  2869. },
  2870. args: ["aBlock"],
  2871. 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'),
  2872. messageSends: ["now", "value", unescape("-")],
  2873. referencedClasses: ["Date"]
  2874. }),
  2875. smalltalk.Date.klass);
  2876. smalltalk.addMethod(
  2877. unescape('_new_'),
  2878. smalltalk.method({
  2879. selector: unescape('new%3A'),
  2880. category: 'instance creation',
  2881. fn: function (anObject) {
  2882. var self = this;
  2883. return new Date(anObject);
  2884. return self;
  2885. },
  2886. args: ["anObject"],
  2887. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  2888. messageSends: [],
  2889. referencedClasses: []
  2890. }),
  2891. smalltalk.Date.klass);
  2892. smalltalk.addMethod(
  2893. unescape('_now'),
  2894. smalltalk.method({
  2895. selector: unescape('now'),
  2896. category: 'instance creation',
  2897. fn: function () {
  2898. var self = this;
  2899. return smalltalk.send(self, "_today", []);
  2900. return self;
  2901. },
  2902. args: [],
  2903. source: unescape('now%0A%09%5Eself%20today'),
  2904. messageSends: ["today"],
  2905. referencedClasses: []
  2906. }),
  2907. smalltalk.Date.klass);
  2908. smalltalk.addMethod(
  2909. unescape('_today'),
  2910. smalltalk.method({
  2911. selector: unescape('today'),
  2912. category: 'instance creation',
  2913. fn: function () {
  2914. var self = this;
  2915. return smalltalk.send(self, "_new", []);
  2916. return self;
  2917. },
  2918. args: [],
  2919. source: unescape('today%0A%09%5Eself%20new'),
  2920. messageSends: ["new"],
  2921. referencedClasses: []
  2922. }),
  2923. smalltalk.Date.klass);
  2924. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  2925. smalltalk.JSObjectProxy.comment=unescape('JSObjectProxy%20handles%20sending%20messages%20to%20JavaScript%20object%2C%20therefore%20accessing%20JavaScript%20objects%20from%20Amber%20is%20transparent.%0AJSOjbectProxy%20makes%20intensive%20use%20of%20%60%23doesNotUnderstand%3A%60.%0A%0A%23%23%20Examples%0A%0AJSObjectProxy%20objects%20are%20instanciated%20by%20Amber%20when%20a%20Smalltalk%20message%20is%20sent%20to%20a%20JavaScript%20object.%0A%0A%20%20%20%20window%20alert%3A%20%27hello%20world%27.%0A%20%20%20%20window%20inspect.%0A%20%20%20%20%28window%20jQuery%3A%20%27body%27%29%20append%3A%20%27hello%20world%27%0A%0ASmalltalk%20messages%20sends%20are%20converted%20to%20JavaScript%20function%20calls%20or%20object%20property%20access%20_%28in%20this%20order%29_.%20If%20n%20one%20of%20them%20match%2C%20a%20%60MessageNotUnderstood%60%20error%20will%20be%20thrown.%20%0A%0A%23%23%20Message%20conversion%20rules%0A%0A-%20%60someUser%20name%60%20becomes%20%20%60someUser.name%60%0A-%20%60someUser%20name%3A%20%27John%27%60%20becomes%20%60someUser%20name%20%3D%20%22John%22%60%0A-%20%60console%20log%3A%20%27hello%20world%27%60%20becomes%20%60console.log%28%27hello%20world%27%29%60%0A-%20%60%28window%20jQuery%3A%20%27foo%27%29%20css%3A%20%27background%27%20color%3A%20%27red%27%60%20becomes%20%60window.jQuery%28%27foo%27%29.css%28%27background%27%2C%20%27red%27%29%60%0A%0A__Note%3A__%20For%20keyword-based%20messages%2C%20only%20the%20first%20keyword%20is%20kept%3A%20%60window%20foo%3A%201%20bar%3A%202%60%20is%20equivalent%20to%20%60window%20foo%3A%201%20baz%3A%202%60.')
  2926. smalltalk.addMethod(
  2927. unescape('_at_'),
  2928. smalltalk.method({
  2929. selector: unescape('at%3A'),
  2930. category: 'accessing',
  2931. fn: function (aSymbol) {
  2932. var self = this;
  2933. var attr = nil;
  2934. attr = smalltalk.send(aSymbol, "_asString", []);
  2935. return self['@jsObject'][attr];
  2936. return self;
  2937. },
  2938. args: ["aSymbol"],
  2939. source: unescape('at%3A%20aSymbol%0A%09%7C%20attr%20%7C%0A%09attr%20%3A%3D%20aSymbol%20asString.%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5Battr%5D%3E'),
  2940. messageSends: ["asString"],
  2941. referencedClasses: []
  2942. }),
  2943. smalltalk.JSObjectProxy);
  2944. smalltalk.addMethod(
  2945. unescape('_at_put_'),
  2946. smalltalk.method({
  2947. selector: unescape('at%3Aput%3A'),
  2948. category: 'accessing',
  2949. fn: function (aSymbol, anObject) {
  2950. var self = this;
  2951. var attr = nil;
  2952. attr = smalltalk.send(aSymbol, "_asString", []);
  2953. self['@jsObject'][attr] = anObject;
  2954. return self;
  2955. },
  2956. args: ["aSymbol", "anObject"],
  2957. source: unescape('at%3A%20aSymbol%20put%3A%20anObject%0A%09%7C%20attr%20%7C%0A%09attr%20%3A%3D%20aSymbol%20asString.%0A%09%3Cself%5B%27@jsObject%27%5D%5Battr%5D%20%3D%20anObject%3E'),
  2958. messageSends: ["asString"],
  2959. referencedClasses: []
  2960. }),
  2961. smalltalk.JSObjectProxy);
  2962. smalltalk.addMethod(
  2963. unescape('_doesNotUnderstand_'),
  2964. smalltalk.method({
  2965. selector: unescape('doesNotUnderstand%3A'),
  2966. category: 'proxy',
  2967. fn: function (aMessage) {
  2968. var self = this;
  2969. var obj = nil;
  2970. var selector = nil;
  2971. var jsSelector = nil;
  2972. var arguments = nil;
  2973. obj = smalltalk.send(self, "_jsObject", []);
  2974. selector = smalltalk.send(aMessage, "_selector", []);
  2975. jsSelector = smalltalk.send(selector, "_asJavaScriptSelector", []);
  2976. arguments = smalltalk.send(aMessage, "_arguments", []);
  2977. if (obj[jsSelector] != undefined) {
  2978. return smalltalk.send(obj, jsSelector, arguments);
  2979. }
  2980. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  2981. return self;
  2982. },
  2983. args: ["aMessage"],
  2984. 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%20%21%3D%20undefined%29%20%7Breturn%20smalltalk.send%28obj%2C%20jsSelector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  2985. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  2986. referencedClasses: []
  2987. }),
  2988. smalltalk.JSObjectProxy);
  2989. smalltalk.addMethod(
  2990. unescape('_inspectOn_'),
  2991. smalltalk.method({
  2992. selector: unescape('inspectOn%3A'),
  2993. category: 'proxy',
  2994. fn: function (anInspector) {
  2995. var self = this;
  2996. var variables = nil;
  2997. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  2998. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  2999. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  3000. for (var i in self['@jsObject']) {
  3001. variables._at_put_(i, self['@jsObject'][i]);
  3002. }
  3003. smalltalk.send(anInspector, "_setVariables_", [variables]);
  3004. return self;
  3005. },
  3006. args: ["anInspector"],
  3007. 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'),
  3008. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  3009. referencedClasses: ["Dictionary"]
  3010. }),
  3011. smalltalk.JSObjectProxy);
  3012. smalltalk.addMethod(
  3013. unescape('_jsObject'),
  3014. smalltalk.method({
  3015. selector: unescape('jsObject'),
  3016. category: 'accessing',
  3017. fn: function () {
  3018. var self = this;
  3019. return self['@jsObject'];
  3020. return self;
  3021. },
  3022. args: [],
  3023. source: unescape('jsObject%0A%09%5EjsObject'),
  3024. messageSends: [],
  3025. referencedClasses: []
  3026. }),
  3027. smalltalk.JSObjectProxy);
  3028. smalltalk.addMethod(
  3029. unescape('_jsObject_'),
  3030. smalltalk.method({
  3031. selector: unescape('jsObject%3A'),
  3032. category: 'accessing',
  3033. fn: function (aJSObject) {
  3034. var self = this;
  3035. self['@jsObject'] = aJSObject;
  3036. return self;
  3037. },
  3038. args: ["aJSObject"],
  3039. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  3040. messageSends: [],
  3041. referencedClasses: []
  3042. }),
  3043. smalltalk.JSObjectProxy);
  3044. smalltalk.addMethod(
  3045. unescape('_printString'),
  3046. smalltalk.method({
  3047. selector: unescape('printString'),
  3048. category: 'proxy',
  3049. fn: function () {
  3050. var self = this;
  3051. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  3052. return self;
  3053. },
  3054. args: [],
  3055. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  3056. messageSends: ["toString", "jsObject"],
  3057. referencedClasses: []
  3058. }),
  3059. smalltalk.JSObjectProxy);
  3060. smalltalk.addMethod(
  3061. unescape('_on_'),
  3062. smalltalk.method({
  3063. selector: unescape('on%3A'),
  3064. category: 'instance creation',
  3065. fn: function (aJSObject) {
  3066. var self = this;
  3067. return function ($rec) {smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
  3068. return self;
  3069. },
  3070. args: ["aJSObject"],
  3071. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  3072. messageSends: ["jsObject:", "yourself", "new"],
  3073. referencedClasses: []
  3074. }),
  3075. smalltalk.JSObjectProxy.klass);
  3076. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  3077. smalltalk.Number.comment=unescape('Number%20holds%20the%20most%20general%20methods%20for%20dealing%20with%20numbers.%20%20%0ANumber%20is%20directly%20mapped%20to%20JavaScript%20Number.%0A%0AMost%20arithmetic%20methods%20like%20%60%23+%60%20%60%23/%60%20%60%23-%60%20%60%23max%3A%60%20are%20directly%20inlined%20into%20javascript.%20%0A%0A%23%23Enumerating%0AA%20Number%20can%20be%20used%20to%20evaluate%20a%20Block%20a%20fixed%20number%20of%20times%3A%0A%0A%095%20timesRepeat%3A%20%5BTranscript%20show%3A%20%27This%20will%20be%20printed%205%20times%27%3B%20cr%5D.%0A%09%0A%091%20to%3A%205%20do%3A%20%5B%3AaNumber%7C%20Transcript%20show%3A%20aNumber%20asString%3B%20cr%5D.%0A%09%0A%091%20to%3A%2010%20by%3A%202%20do%3A%20%5B%3AaNumber%7C%20Transcript%20show%3A%20aNumber%20asString%3B%20cr%5D.')
  3078. smalltalk.addMethod(
  3079. unescape('__star'),
  3080. smalltalk.method({
  3081. selector: unescape('*'),
  3082. category: 'arithmetic',
  3083. fn: function (aNumber) {
  3084. var self = this;
  3085. return self * aNumber;
  3086. return self;
  3087. },
  3088. args: ["aNumber"],
  3089. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  3090. messageSends: [],
  3091. referencedClasses: []
  3092. }),
  3093. smalltalk.Number);
  3094. smalltalk.addMethod(
  3095. unescape('__plus'),
  3096. smalltalk.method({
  3097. selector: unescape('+'),
  3098. category: 'arithmetic',
  3099. fn: function (aNumber) {
  3100. var self = this;
  3101. return self + aNumber;
  3102. return self;
  3103. },
  3104. args: ["aNumber"],
  3105. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  3106. messageSends: [],
  3107. referencedClasses: []
  3108. }),
  3109. smalltalk.Number);
  3110. smalltalk.addMethod(
  3111. unescape('__minus'),
  3112. smalltalk.method({
  3113. selector: unescape('-'),
  3114. category: 'arithmetic',
  3115. fn: function (aNumber) {
  3116. var self = this;
  3117. return self - aNumber;
  3118. return self;
  3119. },
  3120. args: ["aNumber"],
  3121. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  3122. messageSends: [],
  3123. referencedClasses: []
  3124. }),
  3125. smalltalk.Number);
  3126. smalltalk.addMethod(
  3127. unescape('__slash'),
  3128. smalltalk.method({
  3129. selector: unescape('/'),
  3130. category: 'arithmetic',
  3131. fn: function (aNumber) {
  3132. var self = this;
  3133. return self / aNumber;
  3134. return self;
  3135. },
  3136. args: ["aNumber"],
  3137. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  3138. messageSends: [],
  3139. referencedClasses: []
  3140. }),
  3141. smalltalk.Number);
  3142. smalltalk.addMethod(
  3143. unescape('__lt'),
  3144. smalltalk.method({
  3145. selector: unescape('%3C'),
  3146. category: 'comparing',
  3147. fn: function (aNumber) {
  3148. var self = this;
  3149. return self < aNumber;
  3150. return self;
  3151. },
  3152. args: ["aNumber"],
  3153. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  3154. messageSends: [],
  3155. referencedClasses: []
  3156. }),
  3157. smalltalk.Number);
  3158. smalltalk.addMethod(
  3159. unescape('__lt_eq'),
  3160. smalltalk.method({
  3161. selector: unescape('%3C%3D'),
  3162. category: 'comparing',
  3163. fn: function (aNumber) {
  3164. var self = this;
  3165. return self <= aNumber;
  3166. return self;
  3167. },
  3168. args: ["aNumber"],
  3169. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  3170. messageSends: [],
  3171. referencedClasses: []
  3172. }),
  3173. smalltalk.Number);
  3174. smalltalk.addMethod(
  3175. unescape('__eq'),
  3176. smalltalk.method({
  3177. selector: unescape('%3D'),
  3178. category: 'comparing',
  3179. fn: function (aNumber) {
  3180. var self = this;
  3181. try {
  3182. ($receiver = smalltalk.send(aNumber, "_isNumber", [])).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;}};}();}]);
  3183. return Number(self) == aNumber;
  3184. return self;
  3185. } catch (e) {
  3186. if (e.name === "stReturn" && e.selector === "__eq") {
  3187. return e.fn();
  3188. }
  3189. throw e;
  3190. }
  3191. },
  3192. args: ["aNumber"],
  3193. source: unescape('%3D%20aNumber%0A%09aNumber%20isNumber%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  3194. messageSends: ["ifFalse:", "isNumber"],
  3195. referencedClasses: []
  3196. }),
  3197. smalltalk.Number);
  3198. smalltalk.addMethod(
  3199. unescape('__gt'),
  3200. smalltalk.method({
  3201. selector: unescape('%3E'),
  3202. category: 'comparing',
  3203. fn: function (aNumber) {
  3204. var self = this;
  3205. return self > aNumber;
  3206. return self;
  3207. },
  3208. args: ["aNumber"],
  3209. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  3210. messageSends: [],
  3211. referencedClasses: []
  3212. }),
  3213. smalltalk.Number);
  3214. smalltalk.addMethod(
  3215. unescape('__gt_eq'),
  3216. smalltalk.method({
  3217. selector: unescape('%3E%3D'),
  3218. category: 'comparing',
  3219. fn: function (aNumber) {
  3220. var self = this;
  3221. return self >= aNumber;
  3222. return self;
  3223. },
  3224. args: ["aNumber"],
  3225. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  3226. messageSends: [],
  3227. referencedClasses: []
  3228. }),
  3229. smalltalk.Number);
  3230. smalltalk.addMethod(
  3231. unescape('__at'),
  3232. smalltalk.method({
  3233. selector: unescape('@'),
  3234. category: 'converting',
  3235. fn: function (aNumber) {
  3236. var self = this;
  3237. return smalltalk.send(smalltalk.Point || Point, "_x_y_", [self, aNumber]);
  3238. return self;
  3239. },
  3240. args: ["aNumber"],
  3241. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  3242. messageSends: ["x:y:"],
  3243. referencedClasses: ["Point"]
  3244. }),
  3245. smalltalk.Number);
  3246. smalltalk.addMethod(
  3247. unescape('_%5C%5C'),
  3248. smalltalk.method({
  3249. selector: unescape('%5C%5C'),
  3250. category: 'arithmetic',
  3251. fn: function (aNumber) {
  3252. var self = this;
  3253. return self % aNumber;
  3254. return self;
  3255. },
  3256. args: ["aNumber"],
  3257. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  3258. messageSends: [],
  3259. referencedClasses: []
  3260. }),
  3261. smalltalk.Number);
  3262. smalltalk.addMethod(
  3263. unescape('_asJSON'),
  3264. smalltalk.method({
  3265. selector: unescape('asJSON'),
  3266. category: 'converting',
  3267. fn: function (){
  3268. var self=this;
  3269. return self;
  3270. return self;},
  3271. args: [],
  3272. source: unescape('asJSON%0A%09%5Eself'),
  3273. messageSends: [],
  3274. referencedClasses: []
  3275. }),
  3276. smalltalk.Number);
  3277. smalltalk.addMethod(
  3278. unescape('_asJavascript'),
  3279. smalltalk.method({
  3280. selector: unescape('asJavascript'),
  3281. category: 'converting',
  3282. fn: function () {
  3283. var self = this;
  3284. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  3285. return self;
  3286. },
  3287. args: [],
  3288. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  3289. messageSends: [unescape("%2C"), "printString"],
  3290. referencedClasses: []
  3291. }),
  3292. smalltalk.Number);
  3293. smalltalk.addMethod(
  3294. unescape('_asPoint'),
  3295. smalltalk.method({
  3296. selector: unescape('asPoint'),
  3297. category: 'converting',
  3298. fn: function () {
  3299. var self = this;
  3300. return smalltalk.send(smalltalk.Point || Point, "_x_y_", [self, self]);
  3301. return self;
  3302. },
  3303. args: [],
  3304. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  3305. messageSends: ["x:y:"],
  3306. referencedClasses: ["Point"]
  3307. }),
  3308. smalltalk.Number);
  3309. smalltalk.addMethod(
  3310. unescape('_asString'),
  3311. smalltalk.method({
  3312. selector: unescape('asString'),
  3313. category: 'converting',
  3314. fn: function () {
  3315. var self = this;
  3316. return smalltalk.send(self, "_printString", []);
  3317. return self;
  3318. },
  3319. args: [],
  3320. source: unescape('asString%0A%09%5Eself%20printString'),
  3321. messageSends: ["printString"],
  3322. referencedClasses: []
  3323. }),
  3324. smalltalk.Number);
  3325. smalltalk.addMethod(
  3326. unescape('_atRandom'),
  3327. smalltalk.method({
  3328. selector: unescape('atRandom'),
  3329. category: 'converting',
  3330. fn: function () {
  3331. var self = this;
  3332. 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]);
  3333. return self;
  3334. },
  3335. args: [],
  3336. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  3337. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  3338. referencedClasses: ["Random"]
  3339. }),
  3340. smalltalk.Number);
  3341. smalltalk.addMethod(
  3342. unescape('_clearInterval'),
  3343. smalltalk.method({
  3344. selector: unescape('clearInterval'),
  3345. category: 'timeouts/intervals',
  3346. fn: function () {
  3347. var self = this;
  3348. clearInterval(Number(self));
  3349. return self;
  3350. },
  3351. args: [],
  3352. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  3353. messageSends: [],
  3354. referencedClasses: []
  3355. }),
  3356. smalltalk.Number);
  3357. smalltalk.addMethod(
  3358. unescape('_clearTimeout'),
  3359. smalltalk.method({
  3360. selector: unescape('clearTimeout'),
  3361. category: 'timeouts/intervals',
  3362. fn: function () {
  3363. var self = this;
  3364. clearTimeout(Number(self));
  3365. return self;
  3366. },
  3367. args: [],
  3368. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  3369. messageSends: [],
  3370. referencedClasses: []
  3371. }),
  3372. smalltalk.Number);
  3373. smalltalk.addMethod(
  3374. unescape('_copy'),
  3375. smalltalk.method({
  3376. selector: unescape('copy'),
  3377. category: 'copying',
  3378. fn: function () {
  3379. var self = this;
  3380. return self;
  3381. return self;
  3382. },
  3383. args: [],
  3384. source: unescape('copy%0A%09%5Eself'),
  3385. messageSends: [],
  3386. referencedClasses: []
  3387. }),
  3388. smalltalk.Number);
  3389. smalltalk.addMethod(
  3390. unescape('_deepCopy'),
  3391. smalltalk.method({
  3392. selector: unescape('deepCopy'),
  3393. category: 'copying',
  3394. fn: function () {
  3395. var self = this;
  3396. return smalltalk.send(self, "_copy", []);
  3397. return self;
  3398. },
  3399. args: [],
  3400. source: unescape('deepCopy%0A%09%5Eself%20copy'),
  3401. messageSends: ["copy"],
  3402. referencedClasses: []
  3403. }),
  3404. smalltalk.Number);
  3405. smalltalk.addMethod(
  3406. unescape('_even'),
  3407. smalltalk.method({
  3408. selector: unescape('even'),
  3409. category: 'testing',
  3410. fn: function () {
  3411. var self = this;
  3412. return smalltalk.send(0, "__eq", [smalltalk.send(self, "_\\\\", [2])]);
  3413. return self;
  3414. },
  3415. args: [],
  3416. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  3417. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  3418. referencedClasses: []
  3419. }),
  3420. smalltalk.Number);
  3421. smalltalk.addMethod(
  3422. unescape('_identityHash'),
  3423. smalltalk.method({
  3424. selector: unescape('identityHash'),
  3425. category: 'accessing',
  3426. fn: function () {
  3427. var self = this;
  3428. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
  3429. return self;
  3430. },
  3431. args: [],
  3432. source: unescape('identityHash%0A%09%5Eself%20asString%2C%20%27n%27'),
  3433. messageSends: [unescape("%2C"), "asString"],
  3434. referencedClasses: []
  3435. }),
  3436. smalltalk.Number);
  3437. smalltalk.addMethod(
  3438. unescape('_isNumber'),
  3439. smalltalk.method({
  3440. selector: unescape('isNumber'),
  3441. category: 'testing',
  3442. fn: function () {
  3443. var self = this;
  3444. return true;
  3445. return self;
  3446. },
  3447. args: [],
  3448. source: unescape('isNumber%0A%09%5Etrue'),
  3449. messageSends: [],
  3450. referencedClasses: []
  3451. }),
  3452. smalltalk.Number);
  3453. smalltalk.addMethod(
  3454. unescape('_isZero'),
  3455. smalltalk.method({
  3456. selector: unescape('isZero'),
  3457. category: 'testing',
  3458. fn: function () {
  3459. var self = this;
  3460. return smalltalk.send(self, "__eq", [0]);
  3461. return self;
  3462. },
  3463. args: [],
  3464. source: unescape('isZero%0A%09%5Eself%20%3D%200'),
  3465. messageSends: [unescape("%3D")],
  3466. referencedClasses: []
  3467. }),
  3468. smalltalk.Number);
  3469. smalltalk.addMethod(
  3470. unescape('_max_'),
  3471. smalltalk.method({
  3472. selector: unescape('max%3A'),
  3473. category: 'arithmetic',
  3474. fn: function (aNumber) {
  3475. var self = this;
  3476. return Math.max(self, aNumber);
  3477. return self;
  3478. },
  3479. args: ["aNumber"],
  3480. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  3481. messageSends: [],
  3482. referencedClasses: []
  3483. }),
  3484. smalltalk.Number);
  3485. smalltalk.addMethod(
  3486. unescape('_min_'),
  3487. smalltalk.method({
  3488. selector: unescape('min%3A'),
  3489. category: 'arithmetic',
  3490. fn: function (aNumber) {
  3491. var self = this;
  3492. return Math.min(self, aNumber);
  3493. return self;
  3494. },
  3495. args: ["aNumber"],
  3496. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  3497. messageSends: [],
  3498. referencedClasses: []
  3499. }),
  3500. smalltalk.Number);
  3501. smalltalk.addMethod(
  3502. unescape('_negated'),
  3503. smalltalk.method({
  3504. selector: unescape('negated'),
  3505. category: 'arithmetic',
  3506. fn: function () {
  3507. var self = this;
  3508. return 0 - self;
  3509. return self;
  3510. },
  3511. args: [],
  3512. source: unescape('negated%0A%09%5E0%20-%20self'),
  3513. messageSends: [unescape("-")],
  3514. referencedClasses: []
  3515. }),
  3516. smalltalk.Number);
  3517. smalltalk.addMethod(
  3518. unescape('_negative'),
  3519. smalltalk.method({
  3520. selector: unescape('negative'),
  3521. category: 'testing',
  3522. fn: function () {
  3523. var self = this;
  3524. return self < 0;
  3525. return self;
  3526. },
  3527. args: [],
  3528. source: unescape('negative%0A%09%22Answer%20whether%20the%20receiver%20is%20mathematically%20negative.%22%0A%0A%09%5E%20self%20%3C%200'),
  3529. messageSends: [unescape("%3C")],
  3530. referencedClasses: []
  3531. }),
  3532. smalltalk.Number);
  3533. smalltalk.addMethod(
  3534. unescape('_odd'),
  3535. smalltalk.method({
  3536. selector: unescape('odd'),
  3537. category: 'testing',
  3538. fn: function () {
  3539. var self = this;
  3540. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  3541. return self;
  3542. },
  3543. args: [],
  3544. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  3545. messageSends: ["not", "even"],
  3546. referencedClasses: []
  3547. }),
  3548. smalltalk.Number);
  3549. smalltalk.addMethod(
  3550. unescape('_positive'),
  3551. smalltalk.method({
  3552. selector: unescape('positive'),
  3553. category: 'testing',
  3554. fn: function () {
  3555. var self = this;
  3556. return self >= 0;
  3557. return self;
  3558. },
  3559. args: [],
  3560. source: unescape('positive%0A%09%22Answer%20whether%20the%20receiver%20is%20positive%20or%20equal%20to%200.%20%28ST-80%20protocol%29.%22%0A%0A%09%5E%20self%20%3E%3D%200'),
  3561. messageSends: [unescape("%3E%3D")],
  3562. referencedClasses: []
  3563. }),
  3564. smalltalk.Number);
  3565. smalltalk.addMethod(
  3566. unescape('_printShowingDecimalPlaces_'),
  3567. smalltalk.method({
  3568. selector: unescape('printShowingDecimalPlaces%3A'),
  3569. category: 'printing',
  3570. fn: function (placesDesired) {
  3571. var self = this;
  3572. return self.toFixed(placesDesired);
  3573. return self;
  3574. },
  3575. args: ["placesDesired"],
  3576. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  3577. messageSends: [],
  3578. referencedClasses: []
  3579. }),
  3580. smalltalk.Number);
  3581. smalltalk.addMethod(
  3582. unescape('_printString'),
  3583. smalltalk.method({
  3584. selector: unescape('printString'),
  3585. category: 'printing',
  3586. fn: function () {
  3587. var self = this;
  3588. return String(self);
  3589. return self;
  3590. },
  3591. args: [],
  3592. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  3593. messageSends: [],
  3594. referencedClasses: []
  3595. }),
  3596. smalltalk.Number);
  3597. smalltalk.addMethod(
  3598. unescape('_rounded'),
  3599. smalltalk.method({
  3600. selector: unescape('rounded'),
  3601. category: 'converting',
  3602. fn: function () {
  3603. var self = this;
  3604. return Math.round(self);
  3605. return self;
  3606. },
  3607. args: [],
  3608. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  3609. messageSends: [],
  3610. referencedClasses: []
  3611. }),
  3612. smalltalk.Number);
  3613. smalltalk.addMethod(
  3614. unescape('_sqrt'),
  3615. smalltalk.method({
  3616. selector: unescape('sqrt'),
  3617. category: 'arithmetic',
  3618. fn: function () {
  3619. var self = this;
  3620. return Math.sqrt(self);
  3621. return self;
  3622. },
  3623. args: [],
  3624. source: unescape('sqrt%0A%09%3Creturn%20Math.sqrt%28self%29%3E'),
  3625. messageSends: [],
  3626. referencedClasses: []
  3627. }),
  3628. smalltalk.Number);
  3629. smalltalk.addMethod(
  3630. unescape('_squared'),
  3631. smalltalk.method({
  3632. selector: unescape('squared'),
  3633. category: 'arithmetic',
  3634. fn: function () {
  3635. var self = this;
  3636. return self * self;
  3637. return self;
  3638. },
  3639. args: [],
  3640. source: unescape('squared%0A%09%5Eself%20*%20self'),
  3641. messageSends: [unescape("*")],
  3642. referencedClasses: []
  3643. }),
  3644. smalltalk.Number);
  3645. smalltalk.addMethod(
  3646. unescape('_timesRepeat_'),
  3647. smalltalk.method({
  3648. selector: unescape('timesRepeat%3A'),
  3649. category: 'enumerating',
  3650. fn: function (aBlock) {
  3651. var self = this;
  3652. var integer = nil;
  3653. var count = nil;
  3654. integer = smalltalk.send(self, "_truncated", []);
  3655. count = 1;
  3656. (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]);}());}}());
  3657. return self;
  3658. },
  3659. args: ["aBlock"],
  3660. 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'),
  3661. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  3662. referencedClasses: []
  3663. }),
  3664. smalltalk.Number);
  3665. smalltalk.addMethod(
  3666. unescape('_to_'),
  3667. smalltalk.method({
  3668. selector: unescape('to%3A'),
  3669. category: 'converting',
  3670. fn: function (aNumber) {
  3671. var self = this;
  3672. var array = nil;
  3673. var first = nil;
  3674. var last = nil;
  3675. var count = nil;
  3676. first = smalltalk.send(self, "_truncated", []);
  3677. last = ($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);
  3678. count = 1;
  3679. array = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3680. 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]);}]);
  3681. return array;
  3682. return self;
  3683. },
  3684. args: ["aNumber"],
  3685. 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%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'),
  3686. messageSends: ["truncated", unescape("+"), "new", "timesRepeat:", unescape("-"), "at:put:"],
  3687. referencedClasses: ["Array"]
  3688. }),
  3689. smalltalk.Number);
  3690. smalltalk.addMethod(
  3691. unescape('_to_by_'),
  3692. smalltalk.method({
  3693. selector: unescape('to%3Aby%3A'),
  3694. category: 'converting',
  3695. fn: function (stop, step) {
  3696. var self = this;
  3697. var array = nil;
  3698. var value = nil;
  3699. var pos = nil;
  3700. value = self;
  3701. array = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3702. pos = 1;
  3703. ($receiver = smalltalk.send(step, "__eq", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}]);
  3704. ($receiver = ($receiver = step).klass === smalltalk.Number ? $receiver < 0 : smalltalk.send($receiver, "__lt", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}, function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(array, "_at_put_", [pos, value]);pos = ($receiver = pos).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}]);
  3705. return array;
  3706. return self;
  3707. },
  3708. args: ["stop", "step"],
  3709. source: unescape('to%3A%20stop%20by%3A%20step%0A%09%7C%20array%20value%20pos%20%7C%0A%09value%20%3A%3D%20self.%0A%09array%20%3A%3D%20Array%20new.%0A%09pos%20%3A%3D%201.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D.%0A%09%5Earray'),
  3710. messageSends: ["new", "ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "at:put:", unescape("+"), unescape("%3C%3D")],
  3711. referencedClasses: ["Array"]
  3712. }),
  3713. smalltalk.Number);
  3714. smalltalk.addMethod(
  3715. unescape('_to_by_do_'),
  3716. smalltalk.method({
  3717. selector: unescape('to%3Aby%3Ado%3A'),
  3718. category: 'enumerating',
  3719. fn: function (stop, step, aBlock) {
  3720. var self = this;
  3721. var value = nil;
  3722. value = self;
  3723. ($receiver = smalltalk.send(step, "__eq", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);}]);
  3724. ($receiver = ($receiver = step).klass === smalltalk.Number ? $receiver < 0 : smalltalk.send($receiver, "__lt", [0])).klass === smalltalk.Boolean ? $receiver ? function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver >= stop : smalltalk.send($receiver, "__gt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}, function () {return function () {while (function () {return ($receiver = value).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [value]);return value = ($receiver = value).klass === smalltalk.Number ? $receiver + step : smalltalk.send($receiver, "__plus", [step]);}());}}();}]);
  3725. return self;
  3726. },
  3727. args: ["stop", "step", "aBlock"],
  3728. source: unescape('to%3A%20stop%20by%3A%20step%20do%3A%20aBlock%0A%09%7C%20value%20%7C%0A%09value%20%3A%3D%20self.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D'),
  3729. messageSends: ["ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "value:", unescape("+"), unescape("%3C%3D")],
  3730. referencedClasses: []
  3731. }),
  3732. smalltalk.Number);
  3733. smalltalk.addMethod(
  3734. unescape('_to_do_'),
  3735. smalltalk.method({
  3736. selector: unescape('to%3Ado%3A'),
  3737. category: 'enumerating',
  3738. fn: function (stop, aBlock) {
  3739. var self = this;
  3740. var nextValue = nil;
  3741. nextValue = self;
  3742. (function () {while (function () {return ($receiver = nextValue).klass === smalltalk.Number ? $receiver <= stop : smalltalk.send($receiver, "__lt_eq", [stop]);}()) {(function () {smalltalk.send(aBlock, "_value_", [nextValue]);return nextValue = ($receiver = nextValue).klass === smalltalk.Number ? $receiver + 1 : smalltalk.send($receiver, "__plus", [1]);}());}}());
  3743. return self;
  3744. },
  3745. args: ["stop", "aBlock"],
  3746. source: unescape('to%3A%20stop%20do%3A%20aBlock%0A%09%22Evaluate%20aBlock%20for%20each%20number%20from%20self%20to%20aNumber.%22%0A%09%7C%20nextValue%20%7C%0A%09nextValue%20%3A%3D%20self.%0A%09%5BnextValue%20%3C%3D%20stop%5D%0A%09%09whileTrue%3A%20%0A%09%09%09%5BaBlock%20value%3A%20nextValue.%0A%09%09%09nextValue%20%3A%3D%20nextValue%20+%201%5D'),
  3747. messageSends: ["whileTrue:", unescape("%3C%3D"), "value:", unescape("+")],
  3748. referencedClasses: []
  3749. }),
  3750. smalltalk.Number);
  3751. smalltalk.addMethod(
  3752. unescape('_truncated'),
  3753. smalltalk.method({
  3754. selector: unescape('truncated'),
  3755. category: 'converting',
  3756. fn: function () {
  3757. var self = this;
  3758. var result = nil;
  3759. ($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;}]);
  3760. return result;
  3761. return self;
  3762. },
  3763. args: [],
  3764. 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'),
  3765. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  3766. referencedClasses: []
  3767. }),
  3768. smalltalk.Number);
  3769. smalltalk.addMethod(
  3770. unescape('_pi'),
  3771. smalltalk.method({
  3772. selector: unescape('pi'),
  3773. category: 'instance creation',
  3774. fn: function () {
  3775. var self = this;
  3776. return Math.PI;
  3777. return self;
  3778. },
  3779. args: [],
  3780. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  3781. messageSends: [],
  3782. referencedClasses: []
  3783. }),
  3784. smalltalk.Number.klass);
  3785. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  3786. 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.%0A%0AYou%20can%20fetch%20a%20package%20from%20the%20server%3A%0A%0A%09Package%20fetch%3A%20%27Additional-Examples%27')
  3787. smalltalk.addMethod(
  3788. unescape('_classes'),
  3789. smalltalk.method({
  3790. selector: unescape('classes'),
  3791. category: 'classes',
  3792. fn: function () {
  3793. var self = this;
  3794. 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]);}]);
  3795. return self;
  3796. },
  3797. args: [],
  3798. 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'),
  3799. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  3800. referencedClasses: ["Smalltalk"]
  3801. }),
  3802. smalltalk.Package);
  3803. smalltalk.addMethod(
  3804. unescape('_commitPathJs'),
  3805. smalltalk.method({
  3806. selector: unescape('commitPathJs'),
  3807. category: 'accessing',
  3808. fn: function () {
  3809. var self = this;
  3810. return ($receiver = self['@commitPathJs']) == nil ||
  3811. $receiver == undefined ? function () {return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);}() : $receiver;
  3812. return self;
  3813. },
  3814. args: [],
  3815. source: unescape('commitPathJs%0A%09%5E%20commitPathJs%20ifNil%3A%20%5Bself%20class%20defaultCommitPathJs%5D'),
  3816. messageSends: ["ifNil:", "defaultCommitPathJs", "class"],
  3817. referencedClasses: []
  3818. }),
  3819. smalltalk.Package);
  3820. smalltalk.addMethod(
  3821. unescape('_commitPathJs_'),
  3822. smalltalk.method({
  3823. selector: unescape('commitPathJs%3A'),
  3824. category: 'accessing',
  3825. fn: function (aString) {
  3826. var self = this;
  3827. self['@commitPathJs'] = aString;
  3828. return self;
  3829. },
  3830. args: ["aString"],
  3831. source: unescape('commitPathJs%3A%20aString%0A%09commitPathJs%A0%3A%3D%20aString'),
  3832. messageSends: [],
  3833. referencedClasses: []
  3834. }),
  3835. smalltalk.Package);
  3836. smalltalk.addMethod(
  3837. unescape('_commitPathSt'),
  3838. smalltalk.method({
  3839. selector: unescape('commitPathSt'),
  3840. category: 'accessing',
  3841. fn: function () {
  3842. var self = this;
  3843. return ($receiver = self['@commitPathSt']) == nil ||
  3844. $receiver == undefined ? function () {return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);}() : $receiver;
  3845. return self;
  3846. },
  3847. args: [],
  3848. source: unescape('commitPathSt%0A%09%5E%20commitPathSt%20ifNil%3A%20%5Bself%20class%20defaultCommitPathSt%5D'),
  3849. messageSends: ["ifNil:", "defaultCommitPathSt", "class"],
  3850. referencedClasses: []
  3851. }),
  3852. smalltalk.Package);
  3853. smalltalk.addMethod(
  3854. unescape('_commitPathSt_'),
  3855. smalltalk.method({
  3856. selector: unescape('commitPathSt%3A'),
  3857. category: 'accessing',
  3858. fn: function (aString) {
  3859. var self = this;
  3860. self['@commitPathSt'] = aString;
  3861. return self;
  3862. },
  3863. args: ["aString"],
  3864. source: unescape('commitPathSt%3A%20aString%0A%09commitPathSt%A0%3A%3D%20aString'),
  3865. messageSends: [],
  3866. referencedClasses: []
  3867. }),
  3868. smalltalk.Package);
  3869. smalltalk.addMethod(
  3870. unescape('_dependencies'),
  3871. smalltalk.method({
  3872. selector: unescape('dependencies'),
  3873. category: 'accessing',
  3874. fn: function () {
  3875. var self = this;
  3876. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", function () {return [];}]);
  3877. return self;
  3878. },
  3879. args: [],
  3880. source: unescape('dependencies%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20ifAbsent%3A%20%5B%23%28%29%5D'),
  3881. messageSends: ["propertyAt:ifAbsent:"],
  3882. referencedClasses: []
  3883. }),
  3884. smalltalk.Package);
  3885. smalltalk.addMethod(
  3886. unescape('_dependencies_'),
  3887. smalltalk.method({
  3888. selector: unescape('dependencies%3A'),
  3889. category: 'accessing',
  3890. fn: function (anArray) {
  3891. var self = this;
  3892. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  3893. return self;
  3894. },
  3895. args: ["anArray"],
  3896. source: unescape('dependencies%3A%20anArray%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20put%3A%20anArray'),
  3897. messageSends: ["propertyAt:put:"],
  3898. referencedClasses: []
  3899. }),
  3900. smalltalk.Package);
  3901. smalltalk.addMethod(
  3902. unescape('_jsProperties'),
  3903. smalltalk.method({
  3904. selector: unescape('jsProperties'),
  3905. category: 'private',
  3906. fn: function () {
  3907. var self = this;
  3908. return self.properties;
  3909. return self;
  3910. },
  3911. args: [],
  3912. source: unescape('jsProperties%0A%09%3Creturn%20self.properties%3E'),
  3913. messageSends: [],
  3914. referencedClasses: []
  3915. }),
  3916. smalltalk.Package);
  3917. smalltalk.addMethod(
  3918. unescape('_jsProperties_'),
  3919. smalltalk.method({
  3920. selector: unescape('jsProperties%3A'),
  3921. category: 'private',
  3922. fn: function (aJSObject) {
  3923. var self = this;
  3924. return self.properties = aJSObject;
  3925. return self;
  3926. },
  3927. args: ["aJSObject"],
  3928. source: unescape('jsProperties%3A%20aJSObject%0A%09%3Creturn%20self.properties%20%3D%20aJSObject%3E'),
  3929. messageSends: [],
  3930. referencedClasses: []
  3931. }),
  3932. smalltalk.Package);
  3933. smalltalk.addMethod(
  3934. unescape('_name'),
  3935. smalltalk.method({
  3936. selector: unescape('name'),
  3937. category: 'accessing',
  3938. fn: function () {
  3939. var self = this;
  3940. return self.pkgName;
  3941. return self;
  3942. },
  3943. args: [],
  3944. source: unescape('name%0A%09%3Creturn%20self.pkgName%3E'),
  3945. messageSends: [],
  3946. referencedClasses: []
  3947. }),
  3948. smalltalk.Package);
  3949. smalltalk.addMethod(
  3950. unescape('_name_'),
  3951. smalltalk.method({
  3952. selector: unescape('name%3A'),
  3953. category: 'accessing',
  3954. fn: function (aString) {
  3955. var self = this;
  3956. self.pkgName = aString;
  3957. return self;
  3958. },
  3959. args: ["aString"],
  3960. source: unescape('name%3A%20aString%0A%09%3Cself.pkgName%20%3D%20aString%3E'),
  3961. messageSends: [],
  3962. referencedClasses: []
  3963. }),
  3964. smalltalk.Package);
  3965. smalltalk.addMethod(
  3966. unescape('_printString'),
  3967. smalltalk.method({
  3968. selector: unescape('printString'),
  3969. category: 'printing',
  3970. fn: function () {
  3971. var self = this;
  3972. return smalltalk.send(self, "_name", []);
  3973. return self;
  3974. },
  3975. args: [],
  3976. source: unescape('printString%0A%09%5Eself%20name'),
  3977. messageSends: ["name"],
  3978. referencedClasses: []
  3979. }),
  3980. smalltalk.Package);
  3981. smalltalk.addMethod(
  3982. unescape('_properties'),
  3983. smalltalk.method({
  3984. selector: unescape('properties'),
  3985. category: 'accessing',
  3986. fn: function () {
  3987. var self = this;
  3988. return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
  3989. return self;
  3990. },
  3991. args: [],
  3992. source: unescape('properties%0A%09%5ESmalltalk%20current%20readJSObject%3A%20%28self%20basicAt%3A%20%27properties%27%29'),
  3993. messageSends: ["readJSObject:", "current", "basicAt:"],
  3994. referencedClasses: ["Smalltalk"]
  3995. }),
  3996. smalltalk.Package);
  3997. smalltalk.addMethod(
  3998. unescape('_properties_'),
  3999. smalltalk.method({
  4000. selector: unescape('properties%3A'),
  4001. category: 'accessing',
  4002. fn: function (aDict) {
  4003. var self = this;
  4004. var object = nil;
  4005. object = {};
  4006. smalltalk.send(aDict, "_keysAndValuesDo_", [function (key, value) {return object[key] = value;}]);
  4007. return self.properties = object;
  4008. return self;
  4009. },
  4010. args: ["aDict"],
  4011. source: unescape('properties%3A%20aDict%0A%09%22We%20store%20it%20as%20a%20javascript%20object.%22%0A%09%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%09%3Creturn%20self.properties%20%3D%20object%3E'),
  4012. messageSends: ["keysAndValuesDo:"],
  4013. referencedClasses: []
  4014. }),
  4015. smalltalk.Package);
  4016. smalltalk.addMethod(
  4017. unescape('_propertiesAsJSON'),
  4018. smalltalk.method({
  4019. selector: unescape('propertiesAsJSON'),
  4020. category: 'private',
  4021. fn: function () {
  4022. var self = this;
  4023. return JSON.stringify(self.properties);
  4024. return self;
  4025. },
  4026. args: [],
  4027. source: unescape('propertiesAsJSON%0A%09%3Creturn%20JSON.stringify%28self.properties%29%3E'),
  4028. messageSends: [],
  4029. referencedClasses: []
  4030. }),
  4031. smalltalk.Package);
  4032. smalltalk.addMethod(
  4033. unescape('_propertyAt_'),
  4034. smalltalk.method({
  4035. selector: unescape('propertyAt%3A'),
  4036. category: 'properties',
  4037. fn: function (key) {
  4038. var self = this;
  4039. return self.properties[key];
  4040. return self;
  4041. },
  4042. args: ["key"],
  4043. source: unescape('propertyAt%3A%20key%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%3E'),
  4044. messageSends: [],
  4045. referencedClasses: []
  4046. }),
  4047. smalltalk.Package);
  4048. smalltalk.addMethod(
  4049. unescape('_propertyAt_ifAbsent_'),
  4050. smalltalk.method({
  4051. selector: unescape('propertyAt%3AifAbsent%3A'),
  4052. category: 'properties',
  4053. fn: function (key, block) {
  4054. var self = this;
  4055. return ($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil ||
  4056. $receiver == undefined ? function () {return smalltalk.send(block, "_value", []);}() : $receiver;
  4057. return self;
  4058. },
  4059. args: ["key", "block"],
  4060. source: unescape('propertyAt%3A%20key%20ifAbsent%3A%20block%0A%0A%09%5E%28self%20propertyAt%3A%20key%29%20ifNil%3A%20%5Bblock%20value%5D'),
  4061. messageSends: ["ifNil:", "propertyAt:", "value"],
  4062. referencedClasses: []
  4063. }),
  4064. smalltalk.Package);
  4065. smalltalk.addMethod(
  4066. unescape('_propertyAt_put_'),
  4067. smalltalk.method({
  4068. selector: unescape('propertyAt%3Aput%3A'),
  4069. category: 'properties',
  4070. fn: function (key, value) {
  4071. var self = this;
  4072. return self.properties[key] = value;
  4073. return self;
  4074. },
  4075. args: ["key", "value"],
  4076. source: unescape('propertyAt%3A%20key%20put%3A%20value%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%20%3D%20value%3E'),
  4077. messageSends: [],
  4078. referencedClasses: []
  4079. }),
  4080. smalltalk.Package);
  4081. smalltalk.addMethod(
  4082. unescape('_sortedClasses'),
  4083. smalltalk.method({
  4084. selector: unescape('sortedClasses'),
  4085. category: 'classes',
  4086. fn: function (){
  4087. var self=this;
  4088. return smalltalk.send(smalltalk.send(self, "_class", []), "_sortedClasses_", [smalltalk.send(self, "_classes", [])]);
  4089. return self;},
  4090. args: [],
  4091. source: unescape('sortedClasses%0A%09%22Answer%20all%20classes%20in%20the%20receiver%2C%20sorted%20by%20superclass/subclasses%20and%20by%20class%20name%20for%20common%20subclasses%20%28Issue%20%23143%29%22%0A%0A%09%5Eself%20class%20sortedClasses%3A%20self%20classes'),
  4092. messageSends: ["sortedClasses:", "class", "classes"],
  4093. referencedClasses: []
  4094. }),
  4095. smalltalk.Package);
  4096. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  4097. smalltalk.addMethod(
  4098. unescape('_commitToLocalStorage_'),
  4099. smalltalk.method({
  4100. selector: unescape('commitToLocalStorage%3A'),
  4101. category: 'loading-storing',
  4102. fn: function (aPackageName) {
  4103. var self = this;
  4104. var key = nil;
  4105. var sourceCode = nil;
  4106. key = smalltalk.send("smalltalk.packages.", "__comma", [aPackageName]);
  4107. sourceCode = smalltalk.send(smalltalk.send(smalltalk.Exporter || Exporter, "_new", []), "_exportPackage_", [aPackageName]);
  4108. localStorage[key] = escape(sourceCode);
  4109. return self;
  4110. },
  4111. args: ["aPackageName"],
  4112. source: unescape('commitToLocalStorage%3A%20aPackageName%0A%09%7C%20key%20sourceCode%20%7C%0A%09key%20%3A%3D%20%27smalltalk.packages.%27%20%2C%20aPackageName.%0A%09sourceCode%20%3A%3D%20Exporter%20new%20exportPackage%3A%20aPackageName.%0A%09%3ClocalStorage%5Bkey%5D%20%3D%20escape%28sourceCode%29%3E'),
  4113. messageSends: [unescape("%2C"), "exportPackage:", "new"],
  4114. referencedClasses: ["Exporter"]
  4115. }),
  4116. smalltalk.Package.klass);
  4117. smalltalk.addMethod(
  4118. unescape('_defaultCommitPathJs'),
  4119. smalltalk.method({
  4120. selector: unescape('defaultCommitPathJs'),
  4121. category: 'commit paths',
  4122. fn: function () {
  4123. var self = this;
  4124. return ($receiver = self['@defaultCommitPathJs']) == nil ||
  4125. $receiver == undefined ? function () {return self['@defaultCommitPathJs'] = "js";}() : $receiver;
  4126. return self;
  4127. },
  4128. args: [],
  4129. source: unescape('defaultCommitPathJs%0A%09%5E%20defaultCommitPathJs%20ifNil%3A%20%5B%20defaultCommitPathJs%20%3A%3D%20%27js%27%5D'),
  4130. messageSends: ["ifNil:"],
  4131. referencedClasses: []
  4132. }),
  4133. smalltalk.Package.klass);
  4134. smalltalk.addMethod(
  4135. unescape('_defaultCommitPathJs_'),
  4136. smalltalk.method({
  4137. selector: unescape('defaultCommitPathJs%3A'),
  4138. category: 'commit paths',
  4139. fn: function (aString) {
  4140. var self = this;
  4141. self['@defaultCommitPathJs'] = aString;
  4142. return self;
  4143. },
  4144. args: ["aString"],
  4145. source: unescape('defaultCommitPathJs%3A%20aString%0A%09defaultCommitPathJs%20%3A%3D%20aString'),
  4146. messageSends: [],
  4147. referencedClasses: []
  4148. }),
  4149. smalltalk.Package.klass);
  4150. smalltalk.addMethod(
  4151. unescape('_defaultCommitPathSt'),
  4152. smalltalk.method({
  4153. selector: unescape('defaultCommitPathSt'),
  4154. category: 'commit paths',
  4155. fn: function () {
  4156. var self = this;
  4157. return ($receiver = self['@defaultCommitPathSt']) == nil ||
  4158. $receiver == undefined ? function () {return self['@defaultCommitPathSt'] = "st";}() : $receiver;
  4159. return self;
  4160. },
  4161. args: [],
  4162. source: unescape('defaultCommitPathSt%0A%09%5E%20defaultCommitPathSt%20ifNil%3A%20%5B%20defaultCommitPathSt%20%3A%3D%20%27st%27%5D'),
  4163. messageSends: ["ifNil:"],
  4164. referencedClasses: []
  4165. }),
  4166. smalltalk.Package.klass);
  4167. smalltalk.addMethod(
  4168. unescape('_defaultCommitPathSt_'),
  4169. smalltalk.method({
  4170. selector: unescape('defaultCommitPathSt%3A'),
  4171. category: 'commit paths',
  4172. fn: function (aString) {
  4173. var self = this;
  4174. self['@defaultCommitPathSt'] = aString;
  4175. return self;
  4176. },
  4177. args: ["aString"],
  4178. source: unescape('defaultCommitPathSt%3A%20aString%0A%09defaultCommitPathSt%20%3A%3D%20aString'),
  4179. messageSends: [],
  4180. referencedClasses: []
  4181. }),
  4182. smalltalk.Package.klass);
  4183. smalltalk.addMethod(
  4184. unescape('_fetch_'),
  4185. smalltalk.method({
  4186. selector: unescape('fetch%3A'),
  4187. category: 'loading-storing',
  4188. fn: function (aPackageName) {
  4189. var self = this;
  4190. smalltalk.send(self, "_fetch_prefix_", [aPackageName, smalltalk.send(smalltalk.send(self, "_defaultCommitPathJs", []), "__comma", [unescape("/")])]);
  4191. return self;
  4192. },
  4193. args: ["aPackageName"],
  4194. source: unescape('fetch%3A%20aPackageName%0A%09self%20fetch%3A%20aPackageName%20prefix%3A%20self%20defaultCommitPathJs%2C%20%27/%27'),
  4195. messageSends: ["fetch:prefix:", unescape("%2C"), "defaultCommitPathJs"],
  4196. referencedClasses: []
  4197. }),
  4198. smalltalk.Package.klass);
  4199. smalltalk.addMethod(
  4200. unescape('_fetch_prefix_'),
  4201. smalltalk.method({
  4202. selector: unescape('fetch%3Aprefix%3A'),
  4203. category: 'loading-storing',
  4204. fn: function (aPackageName, aPrefix) {
  4205. var self = this;
  4206. smalltalk.send(typeof jQuery == "undefined" ? nil : jQuery, "_getScript_onSuccess_", [smalltalk.send(smalltalk.send(aPrefix, "__comma", [aPackageName]), "__comma", [".js"]), function () {return smalltalk.send(smalltalk.Package || Package, "_init_", [aPackageName]);}]);
  4207. return self;
  4208. },
  4209. args: ["aPackageName", "aPrefix"],
  4210. source: unescape('fetch%3A%20aPackageName%20prefix%3A%20aPrefix%0A%09jQuery%20getScript%3A%20%28aPrefix%20%2C%20aPackageName%20%2C%20%27.js%27%29%20onSuccess%3A%20%5B%20Package%20init%3A%20aPackageName%20%5D'),
  4211. messageSends: ["getScript:onSuccess:", unescape("%2C"), "init:"],
  4212. referencedClasses: ["Package"]
  4213. }),
  4214. smalltalk.Package.klass);
  4215. smalltalk.addMethod(
  4216. unescape('_init_'),
  4217. smalltalk.method({
  4218. selector: unescape('init%3A'),
  4219. category: 'loading-storing',
  4220. fn: function (aPackageName) {
  4221. var self = this;
  4222. (function ($rec) {smalltalk.send($rec, "_do_", [function (each) {return smalltalk.init(each);}]);return smalltalk.send($rec, "_do_", [function (each) {return smalltalk.send(each, "_initialize", []);}]);}(smalltalk.send(smalltalk.send(typeof smalltalk == "undefined" ? nil : smalltalk, "_classes", []), "_select_", [function (each) {return each.pkg.pkgName == aPackageName;}])));
  4223. return self;
  4224. },
  4225. args: ["aPackageName"],
  4226. source: unescape('init%3A%20aPackageName%0A%09%28smalltalk%20classes%20select%3A%20%5B%20%3Aeach%20%7C%20%3Ceach.pkg.pkgName%20%3D%3D%20aPackageName%3E%20%5D%29%0A%09%09do%3A%20%5B%20%3Aeach%20%7C%20%3Csmalltalk.init%28each%29%3E%20%5D%3B%0A%09%09do%3A%20%5B%20%3Aeach%20%7C%20each%20initialize%20%5D'),
  4227. messageSends: ["do:", "initialize", "select:", "classes"],
  4228. referencedClasses: []
  4229. }),
  4230. smalltalk.Package.klass);
  4231. smalltalk.addMethod(
  4232. unescape('_named_'),
  4233. smalltalk.method({
  4234. selector: unescape('named%3A'),
  4235. category: 'not yet classified',
  4236. fn: function (aPackageName) {
  4237. var self = this;
  4238. return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packageAt_", [aPackageName]);
  4239. return self;
  4240. },
  4241. args: ["aPackageName"],
  4242. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  4243. messageSends: ["packageAt:", "current"],
  4244. referencedClasses: ["Smalltalk"]
  4245. }),
  4246. smalltalk.Package.klass);
  4247. smalltalk.addMethod(
  4248. unescape('_named_ifAbsent_'),
  4249. smalltalk.method({
  4250. selector: unescape('named%3AifAbsent%3A'),
  4251. category: 'not yet classified',
  4252. fn: function (aPackageName, aBlock) {
  4253. var self = this;
  4254. return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  4255. return self;
  4256. },
  4257. args: ["aPackageName", "aBlock"],
  4258. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  4259. messageSends: ["packageAt:ifAbsent:", "current"],
  4260. referencedClasses: ["Smalltalk"]
  4261. }),
  4262. smalltalk.Package.klass);
  4263. smalltalk.addMethod(
  4264. unescape('_resetCommitPaths'),
  4265. smalltalk.method({
  4266. selector: unescape('resetCommitPaths'),
  4267. category: 'commit paths',
  4268. fn: function () {
  4269. var self = this;
  4270. self['@defaultCommitPathJs'] = nil;
  4271. self['@defaultCommitPathSt'] = nil;
  4272. return self;
  4273. },
  4274. args: [],
  4275. source: unescape('resetCommitPaths%0A%20%20%20%20%20%20%20%20defaultCommitPathJs%20%3A%3D%20nil.%0A%20%20%20%20%20%20%20%20defaultCommitPathSt%20%3A%3D%20nil.'),
  4276. messageSends: [],
  4277. referencedClasses: []
  4278. }),
  4279. smalltalk.Package.klass);
  4280. smalltalk.addMethod(
  4281. unescape('_sortedClasses_'),
  4282. smalltalk.method({
  4283. selector: unescape('sortedClasses%3A'),
  4284. category: 'sorting',
  4285. fn: function (classes){
  4286. var self=this;
  4287. var children=nil;
  4288. var others=nil;
  4289. var nodes=nil;
  4290. var expandedClasses=nil;
  4291. (children=[]);
  4292. (others=[]);
  4293. smalltalk.send(classes, "_do_", [(function(each){return ((($receiver = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
  4294. (nodes=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassSorterNode || ClassSorterNode), "_on_classes_level_", [each, others, (0)]);})]));
  4295. (nodes=smalltalk.send(nodes, "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(smalltalk.send(a, "_theClass", []), "_name", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", [])]));})]));
  4296. (expandedClasses=smalltalk.send((smalltalk.Array || Array), "_new", []));
  4297. smalltalk.send(nodes, "_do_", [(function(aNode){return smalltalk.send(aNode, "_traverseClassesWith_", [expandedClasses]);})]);
  4298. return expandedClasses;
  4299. return self;},
  4300. args: ["classes"],
  4301. source: unescape('sortedClasses%3A%20classes%0A%09%22Answer%20classes%2C%20sorted%20by%20superclass/subclasses%20and%20by%20class%20name%20for%20common%20subclasses%20%28Issue%20%23143%29%22%0A%0A%09%7C%20children%20others%20nodes%20expandedClasses%20%7C%0A%09children%20%3A%3D%20%23%28%29.%0A%09others%20%3A%3D%20%23%28%29.%0A%09classes%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28classes%20includes%3A%20each%20superclass%29%0A%09%09%09ifFalse%3A%20%5Bchildren%20add%3A%20each%5D%0A%09%09%09ifTrue%3A%20%5Bothers%20add%3A%20each%5D%5D.%0A%09nodes%20%3A%3D%20children%20collect%3A%20%5B%3Aeach%20%7C%0A%09%09ClassSorterNode%20on%3A%20each%20classes%3A%20others%20level%3A%200%5D.%0A%09nodes%20%3A%3D%20nodes%20sorted%3A%20%5B%3Aa%20%3Ab%20%7C%20a%20theClass%20name%20%3C%3D%20b%20theClass%20name%20%5D.%0A%09expandedClasses%20%3A%3D%20Array%20new.%0A%09nodes%20do%3A%20%5B%3AaNode%20%7C%0A%09%09aNode%20traverseClassesWith%3A%20expandedClasses%5D.%0A%09%5EexpandedClasses'),
  4302. messageSends: ["do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:classes:level:", "sorted:", unescape("%3C%3D"), "name", "theClass", "new", "traverseClassesWith:"],
  4303. referencedClasses: ["ClassSorterNode", "Array"]
  4304. }),
  4305. smalltalk.Package.klass);
  4306. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  4307. smalltalk.Point.comment=unescape('A%20%60Point%60%20represents%20an%20x-y%20pair%20of%20numbers%20usually%20designating%20a%20geometric%20coordinate.%0APoints%20are%20traditionally%20created%20using%20the%20binary%20%60%23@%60%20message%20to%20a%20number%3A%0A%0A%09100@120%0A%0APoints%20can%20then%20be%20arithmetically%20manipulated%3A%0A%0A%09100@100%20+%20%2810@10%29%0A%0A...or%20for%20example%3A%0A%0A%09%28100@100%29%20*%202%0A%0A**NOTE%3A**%20Creating%20a%20Point%20with%20a%20negative%20y-value%20will%20need%20a%20space%20after%20%60@%60%20in%20order%20to%20avoid%20a%20parsing%20error%3A%0A%0A%09100@%20-100%20%22but%20100@-100%20would%20not%20parse%22%0A%0AAmber%20does%20not%20have%20much%20behavior%20in%20this%20class%20out-of-the-box.')
  4308. smalltalk.addMethod(
  4309. unescape('__star'),
  4310. smalltalk.method({
  4311. selector: unescape('*'),
  4312. category: 'arithmetic',
  4313. fn: function (aPoint) {
  4314. var self = this;
  4315. 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", [])])]);
  4316. return self;
  4317. },
  4318. args: ["aPoint"],
  4319. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  4320. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  4321. referencedClasses: ["Point"]
  4322. }),
  4323. smalltalk.Point);
  4324. smalltalk.addMethod(
  4325. unescape('__plus'),
  4326. smalltalk.method({
  4327. selector: unescape('+'),
  4328. category: 'arithmetic',
  4329. fn: function (aPoint) {
  4330. var self = this;
  4331. 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", [])])]);
  4332. return self;
  4333. },
  4334. args: ["aPoint"],
  4335. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  4336. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  4337. referencedClasses: ["Point"]
  4338. }),
  4339. smalltalk.Point);
  4340. smalltalk.addMethod(
  4341. unescape('__minus'),
  4342. smalltalk.method({
  4343. selector: unescape('-'),
  4344. category: 'arithmetic',
  4345. fn: function (aPoint) {
  4346. var self = this;
  4347. 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", [])])]);
  4348. return self;
  4349. },
  4350. args: ["aPoint"],
  4351. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  4352. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  4353. referencedClasses: ["Point"]
  4354. }),
  4355. smalltalk.Point);
  4356. smalltalk.addMethod(
  4357. unescape('__slash'),
  4358. smalltalk.method({
  4359. selector: unescape('/'),
  4360. category: 'arithmetic',
  4361. fn: function (aPoint) {
  4362. var self = this;
  4363. 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", [])])]);
  4364. return self;
  4365. },
  4366. args: ["aPoint"],
  4367. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  4368. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  4369. referencedClasses: ["Point"]
  4370. }),
  4371. smalltalk.Point);
  4372. smalltalk.addMethod(
  4373. unescape('__eq'),
  4374. smalltalk.method({
  4375. selector: unescape('%3D'),
  4376. category: 'arithmetic',
  4377. fn: function (aPoint) {
  4378. var self = this;
  4379. 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", [])])]);}]);
  4380. return self;
  4381. },
  4382. args: ["aPoint"],
  4383. 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'),
  4384. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  4385. referencedClasses: []
  4386. }),
  4387. smalltalk.Point);
  4388. smalltalk.addMethod(
  4389. unescape('_asPoint'),
  4390. smalltalk.method({
  4391. selector: unescape('asPoint'),
  4392. category: 'converting',
  4393. fn: function () {
  4394. var self = this;
  4395. return self;
  4396. return self;
  4397. },
  4398. args: [],
  4399. source: unescape('asPoint%0A%09%5Eself'),
  4400. messageSends: [],
  4401. referencedClasses: []
  4402. }),
  4403. smalltalk.Point);
  4404. smalltalk.addMethod(
  4405. unescape('_printString'),
  4406. smalltalk.method({
  4407. selector: unescape('printString'),
  4408. category: 'printing',
  4409. fn: function () {
  4410. var self = this;
  4411. return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (stream) {smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@x'], "_printString", []), "__comma", [unescape("@")])]);($receiver = smalltalk.send(smalltalk.send(self['@y'], "_notNil", []), "_and_", [function () {return smalltalk.send(self['@y'], "_negative", []);}])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(stream, "_space", []);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(stream, "_space", []);}]);return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@y'], "_printString", [])]);}]);
  4412. return self;
  4413. },
  4414. args: [],
  4415. source: unescape('printString%0A%09%22Print%20receiver%20in%20classic%20x@y%20notation.%22%0A%0A%09%5EString%20streamContents%3A%20%5B%3Astream%20%7C%0A%09%09stream%20nextPutAll%3A%20x%20printString%2C%20%27@%27.%0A%09%09%28y%20notNil%20and%3A%20%5By%20negative%5D%29%0A%09%09%09ifTrue%3A%20%5B%0A%09%09%09%09%22Avoid%20ambiguous%20@-%20construct%22%0A%09%09%09%09stream%20space%5D.%0A%09%09stream%20nextPutAll%3A%20y%20printString%5D'),
  4416. messageSends: ["streamContents:", "nextPutAll:", unescape("%2C"), "printString", "ifTrue:", "and:", "notNil", "negative", "space"],
  4417. referencedClasses: ["String"]
  4418. }),
  4419. smalltalk.Point);
  4420. smalltalk.addMethod(
  4421. unescape('_translateBy_'),
  4422. smalltalk.method({
  4423. selector: unescape('translateBy%3A'),
  4424. category: 'transforming',
  4425. fn: function (delta){
  4426. var self=this;
  4427. return smalltalk.send(((($receiver = smalltalk.send(delta, "_x", [])).klass === smalltalk.Number) ? $receiver +self['@x'] : smalltalk.send($receiver, "__plus", [self['@x']])), "__at", [((($receiver = smalltalk.send(delta, "_y", [])).klass === smalltalk.Number) ? $receiver +self['@y'] : smalltalk.send($receiver, "__plus", [self['@y']]))]);
  4428. return self;},
  4429. args: ["delta"],
  4430. source: unescape('translateBy%3A%20delta%20%0A%09%22Answer%20a%20Point%20translated%20by%20delta%20%28an%20instance%20of%20Point%29.%22%0A%09%5E%28delta%20x%20+%20x%29%20@%20%28delta%20y%20+%20y%29'),
  4431. messageSends: [unescape("@"), unescape("+"), "x", "y"],
  4432. referencedClasses: []
  4433. }),
  4434. smalltalk.Point);
  4435. smalltalk.addMethod(
  4436. unescape('_x'),
  4437. smalltalk.method({
  4438. selector: unescape('x'),
  4439. category: 'accessing',
  4440. fn: function () {
  4441. var self = this;
  4442. return self['@x'];
  4443. return self;
  4444. },
  4445. args: [],
  4446. source: unescape('x%0A%09%5Ex'),
  4447. messageSends: [],
  4448. referencedClasses: []
  4449. }),
  4450. smalltalk.Point);
  4451. smalltalk.addMethod(
  4452. unescape('_x_'),
  4453. smalltalk.method({
  4454. selector: unescape('x%3A'),
  4455. category: 'accessing',
  4456. fn: function (aNumber) {
  4457. var self = this;
  4458. self['@x'] = aNumber;
  4459. return self;
  4460. },
  4461. args: ["aNumber"],
  4462. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  4463. messageSends: [],
  4464. referencedClasses: []
  4465. }),
  4466. smalltalk.Point);
  4467. smalltalk.addMethod(
  4468. unescape('_y'),
  4469. smalltalk.method({
  4470. selector: unescape('y'),
  4471. category: 'accessing',
  4472. fn: function () {
  4473. var self = this;
  4474. return self['@y'];
  4475. return self;
  4476. },
  4477. args: [],
  4478. source: unescape('y%0A%09%5Ey'),
  4479. messageSends: [],
  4480. referencedClasses: []
  4481. }),
  4482. smalltalk.Point);
  4483. smalltalk.addMethod(
  4484. unescape('_y_'),
  4485. smalltalk.method({
  4486. selector: unescape('y%3A'),
  4487. category: 'accessing',
  4488. fn: function (aNumber) {
  4489. var self = this;
  4490. self['@y'] = aNumber;
  4491. return self;
  4492. },
  4493. args: ["aNumber"],
  4494. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  4495. messageSends: [],
  4496. referencedClasses: []
  4497. }),
  4498. smalltalk.Point);
  4499. smalltalk.addMethod(
  4500. unescape('_x_y_'),
  4501. smalltalk.method({
  4502. selector: unescape('x%3Ay%3A'),
  4503. category: 'instance creation',
  4504. fn: function (aNumber, anotherNumber) {
  4505. var self = this;
  4506. return function ($rec) {smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
  4507. return self;
  4508. },
  4509. args: ["aNumber", "anotherNumber"],
  4510. 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'),
  4511. messageSends: ["x:", "y:", "yourself", "new"],
  4512. referencedClasses: []
  4513. }),
  4514. smalltalk.Point.klass);
  4515. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  4516. smalltalk.Random.comment=unescape('%60Random%60%20is%20a%20random%20number%20generator%20and%20is%20implemented%20as%20a%20trivial%20wrapper%20around%20javascript%20%60Math.random%28%29%60%20and%20is%20used%20like%20this%3A%0A%0A%09Random%20new%20next%0A%0AThis%20will%20return%20a%20float%20x%20where%20x%20%3C%201%20and%20x%20%3E%200.%20If%20you%20want%20a%20random%20integer%20from%201%20to%2010%20you%20can%20use%20%60%23atRandom%60%0A%0A%0910%20atRandom%0A%0A...and%20if%20you%20want%20a%20random%20number%20in%20a%20specific%20interval%20this%20also%20works%3A%0A%0A%09%283%20to%3A%207%29%20atRandom%0A%0A...but%20be%20aware%20that%20%60%23to%3A%60%20does%20not%20create%20an%20Interval%20as%20in%20other%20Smalltalk%20implementations%20but%20in%20fact%20an%20%60Array%60%20of%20numbers%2C%20so%20it%27s%20better%20to%20use%3A%0A%0A%095%20atRandom%20+%202%0A%0ASince%20%60%23atRandom%60%20is%20implemented%20in%20%60SequencableCollection%60%20you%20can%20easy%20pick%20an%20element%20at%20random%3A%0A%0A%09%23%28%27a%27%20%27b%27%20%27c%27%29%20atRandom%0A%0A...or%20perhaps%20a%20letter%20from%20a%20%60String%60%3A%0A%0A%09%27abc%27%20atRandom%0A%0ASince%20Amber%20does%20not%20have%20Characters%20this%20will%20return%20a%20%60String%60%20of%20length%201%20like%20for%20example%20%60%27b%27%60.')
  4517. smalltalk.addMethod(
  4518. unescape('_next'),
  4519. smalltalk.method({
  4520. selector: unescape('next'),
  4521. category: 'accessing',
  4522. fn: function () {
  4523. var self = this;
  4524. return Math.random();
  4525. return self;
  4526. },
  4527. args: [],
  4528. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  4529. messageSends: [],
  4530. referencedClasses: []
  4531. }),
  4532. smalltalk.Random);
  4533. smalltalk.addMethod(
  4534. unescape('_next_'),
  4535. smalltalk.method({
  4536. selector: unescape('next%3A'),
  4537. category: 'accessing',
  4538. fn: function (anInteger) {
  4539. var self = this;
  4540. return smalltalk.send(smalltalk.send(1, "_to_", [anInteger]), "_collect_", [function (each) {return smalltalk.send(self, "_next", []);}]);
  4541. return self;
  4542. },
  4543. args: ["anInteger"],
  4544. 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'),
  4545. messageSends: ["collect:", "to:", "next"],
  4546. referencedClasses: []
  4547. }),
  4548. smalltalk.Random);
  4549. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  4550. smalltalk.Smalltalk.comment=unescape('Smalltalk%20has%20only%20one%20instance%2C%20accessed%20with%20%60Smalltalk%20current%60.%20%0AIt%20represents%20the%20global%20JavaScript%20variable%20%60smalltalk%60%20declared%20in%20%60js/boot.js%60.%0A%0AThe%20%60smalltalk%60%20object%20holds%20all%20class%20and%20packages%20defined%20in%20the%20system.%0A%0A%23%23%20Classes%0A%0AClasses%20can%20be%20accessed%20using%20the%20following%20methods%3A%0A%0A-%20%60%23classes%60%20answers%20the%20full%20list%20of%20Smalltalk%20classes%20in%20the%20system%0A-%20%60%23at%3A%60%20answers%20a%20specific%20class%20of%20%60nil%60%0A%0A%23%23%20Packages%0A%0APackages%20can%20be%20accessed%20using%20the%20following%20methods%3A%0A%0A-%20%60%23packages%60%20answers%20the%20full%20list%20of%20packages%0A-%20%60%23packageAt%3A%60%20answers%20a%20specific%20class%20of%20%60nil%60%0A%0A__note%3A__%20classes%20and%20packages%20are%20accessed%20using%20strings%2C%20not%20symbols%0A%0A%23%23%20Parsing%0A%0AThe%20%60%23parse%3A%60%20method%20is%20used%20to%20parse%20Smalltalk%20source%20code.%20%0AIt%20requires%20the%20%60Compiler%60%20package%20and%20the%20%60js/parser.js%60%20parser%20file%20in%20order%20to%20work')
  4551. smalltalk.addMethod(
  4552. unescape('_at_'),
  4553. smalltalk.method({
  4554. selector: unescape('at%3A'),
  4555. category: 'accessing',
  4556. fn: function (aString) {
  4557. var self = this;
  4558. return self[aString];
  4559. return self;
  4560. },
  4561. args: ["aString"],
  4562. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  4563. messageSends: [],
  4564. referencedClasses: []
  4565. }),
  4566. smalltalk.Smalltalk);
  4567. smalltalk.addMethod(
  4568. unescape('_basicParse_'),
  4569. smalltalk.method({
  4570. selector: unescape('basicParse%3A'),
  4571. category: 'accessing',
  4572. fn: function (aString) {
  4573. var self = this;
  4574. return smalltalk.parser.parse(aString);
  4575. return self;
  4576. },
  4577. args: ["aString"],
  4578. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  4579. messageSends: [],
  4580. referencedClasses: []
  4581. }),
  4582. smalltalk.Smalltalk);
  4583. smalltalk.addMethod(
  4584. unescape('_classes'),
  4585. smalltalk.method({
  4586. selector: unescape('classes'),
  4587. category: 'accessing',
  4588. fn: function () {
  4589. var self = this;
  4590. return self.classes();
  4591. return self;
  4592. },
  4593. args: [],
  4594. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  4595. messageSends: [],
  4596. referencedClasses: []
  4597. }),
  4598. smalltalk.Smalltalk);
  4599. smalltalk.addMethod(
  4600. unescape('_createPackage_'),
  4601. smalltalk.method({
  4602. selector: unescape('createPackage%3A'),
  4603. category: 'private',
  4604. fn: function (packageName) {
  4605. var self = this;
  4606. return smalltalk.addPackage(packageName, nil);
  4607. return self;
  4608. },
  4609. args: ["packageName"],
  4610. 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%3Creturn%20smalltalk.addPackage%28packageName%2C%20nil%29%3E'),
  4611. messageSends: [],
  4612. referencedClasses: []
  4613. }),
  4614. smalltalk.Smalltalk);
  4615. smalltalk.addMethod(
  4616. unescape('_createPackage_properties_'),
  4617. smalltalk.method({
  4618. selector: unescape('createPackage%3Aproperties%3A'),
  4619. category: 'private',
  4620. fn: function (packageName, aDict) {
  4621. var self = this;
  4622. var object = nil;
  4623. object = {};
  4624. smalltalk.send(aDict, "_keysAndValuesDo_", [function (key, value) {return object[key] = value;}]);
  4625. return smalltalk.addPackage(packageName, object);
  4626. return self;
  4627. },
  4628. args: ["packageName", "aDict"],
  4629. source: unescape('createPackage%3A%20packageName%20properties%3A%20aDict%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%20%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20object%29%3E'),
  4630. messageSends: ["keysAndValuesDo:"],
  4631. referencedClasses: []
  4632. }),
  4633. smalltalk.Smalltalk);
  4634. smalltalk.addMethod(
  4635. unescape('_deletePackage_'),
  4636. smalltalk.method({
  4637. selector: unescape('deletePackage%3A'),
  4638. category: 'private',
  4639. fn: function (packageName) {
  4640. var self = this;
  4641. delete smalltalk.packages[packageName];
  4642. return self;
  4643. },
  4644. args: ["packageName"],
  4645. 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'),
  4646. messageSends: [],
  4647. referencedClasses: []
  4648. }),
  4649. smalltalk.Smalltalk);
  4650. smalltalk.addMethod(
  4651. unescape('_packageAt_'),
  4652. smalltalk.method({
  4653. selector: unescape('packageAt%3A'),
  4654. category: 'packages',
  4655. fn: function (packageName) {
  4656. var self = this;
  4657. return self.packages[packageName];
  4658. return self;
  4659. },
  4660. args: ["packageName"],
  4661. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  4662. messageSends: [],
  4663. referencedClasses: []
  4664. }),
  4665. smalltalk.Smalltalk);
  4666. smalltalk.addMethod(
  4667. unescape('_packageAt_ifAbsent_'),
  4668. smalltalk.method({
  4669. selector: unescape('packageAt%3AifAbsent%3A'),
  4670. category: 'packages',
  4671. fn: function (packageName, aBlock) {
  4672. var self = this;
  4673. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  4674. return self;
  4675. },
  4676. args: ["packageName", "aBlock"],
  4677. 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'),
  4678. messageSends: ["ifNil:", "packageAt:"],
  4679. referencedClasses: []
  4680. }),
  4681. smalltalk.Smalltalk);
  4682. smalltalk.addMethod(
  4683. unescape('_packages'),
  4684. smalltalk.method({
  4685. selector: unescape('packages'),
  4686. category: 'packages',
  4687. fn: function () {
  4688. var self = this;
  4689. return self.packages.all();
  4690. return self;
  4691. },
  4692. args: [],
  4693. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  4694. messageSends: [],
  4695. referencedClasses: []
  4696. }),
  4697. smalltalk.Smalltalk);
  4698. smalltalk.addMethod(
  4699. unescape('_parse_'),
  4700. smalltalk.method({
  4701. selector: unescape('parse%3A'),
  4702. category: 'accessing',
  4703. fn: function (aString) {
  4704. var self = this;
  4705. var result = nil;
  4706. 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", []);}]);
  4707. return result;
  4708. return self;
  4709. },
  4710. args: ["aString"],
  4711. 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'),
  4712. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  4713. referencedClasses: []
  4714. }),
  4715. smalltalk.Smalltalk);
  4716. smalltalk.addMethod(
  4717. unescape('_parseError_parsing_'),
  4718. smalltalk.method({
  4719. selector: unescape('parseError%3Aparsing%3A'),
  4720. category: 'accessing',
  4721. fn: function (anException, aString) {
  4722. var self = this;
  4723. var row = nil;
  4724. var col = nil;
  4725. var message = nil;
  4726. var lines = nil;
  4727. var badLine = nil;
  4728. var code = nil;
  4729. row = anException.line;
  4730. col = anException.column;
  4731. message = anException.message;
  4732. lines = smalltalk.send(aString, "_lines", []);
  4733. badLine = smalltalk.send(lines, "_at_", [row]);
  4734. 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", [])])]);
  4735. smalltalk.send(lines, "_at_put_", [row, badLine]);
  4736. 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", [])])]);}]);}]);
  4737. 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])]);
  4738. return self;
  4739. },
  4740. args: ["anException", "aString"],
  4741. 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'),
  4742. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  4743. referencedClasses: ["String", "Error"]
  4744. }),
  4745. smalltalk.Smalltalk);
  4746. smalltalk.addMethod(
  4747. unescape('_readJSObject_'),
  4748. smalltalk.method({
  4749. selector: unescape('readJSObject%3A'),
  4750. category: 'accessing',
  4751. fn: function (anObject) {
  4752. var self = this;
  4753. return self.readJSObject(anObject);
  4754. return self;
  4755. },
  4756. args: ["anObject"],
  4757. source: unescape('readJSObject%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  4758. messageSends: [],
  4759. referencedClasses: []
  4760. }),
  4761. smalltalk.Smalltalk);
  4762. smalltalk.addMethod(
  4763. unescape('_removeClass_'),
  4764. smalltalk.method({
  4765. selector: unescape('removeClass%3A'),
  4766. category: 'classes',
  4767. fn: function (aClass) {
  4768. var self = this;
  4769. ($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")])]);}]);
  4770. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [function (each) {return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);}]);
  4771. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);}]);
  4772. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  4773. return self;
  4774. },
  4775. args: ["aClass"],
  4776. 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'),
  4777. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  4778. referencedClasses: []
  4779. }),
  4780. smalltalk.Smalltalk);
  4781. smalltalk.addMethod(
  4782. unescape('_removePackage_'),
  4783. smalltalk.method({
  4784. selector: unescape('removePackage%3A'),
  4785. category: 'packages',
  4786. fn: function (packageName) {
  4787. var self = this;
  4788. var pkg = nil;
  4789. pkg = smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, function () {return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);}]);
  4790. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [function (each) {return smalltalk.send(self, "_removeClass_", [each]);}]);
  4791. smalltalk.send(self, "_deletePackage_", [packageName]);
  4792. return self;
  4793. },
  4794. args: ["packageName"],
  4795. 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'),
  4796. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  4797. referencedClasses: []
  4798. }),
  4799. smalltalk.Smalltalk);
  4800. smalltalk.addMethod(
  4801. unescape('_renamePackage_to_'),
  4802. smalltalk.method({
  4803. selector: unescape('renamePackage%3Ato%3A'),
  4804. category: 'packages',
  4805. fn: function (packageName, newName) {
  4806. var self = this;
  4807. var pkg = nil;
  4808. pkg = smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, function () {return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);}]);
  4809. ($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil &&
  4810. $receiver != undefined ? function () {return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);}() : nil;
  4811. smalltalk.packages[newName] = smalltalk.packages[packageName];
  4812. smalltalk.send(pkg, "_name_", [newName]);
  4813. smalltalk.send(self, "_deletePackage_", [packageName]);
  4814. return self;
  4815. },
  4816. args: ["packageName", "newName"],
  4817. 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.'),
  4818. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  4819. referencedClasses: []
  4820. }),
  4821. smalltalk.Smalltalk);
  4822. smalltalk.addMethod(
  4823. unescape('_reservedWords'),
  4824. smalltalk.method({
  4825. selector: unescape('reservedWords'),
  4826. category: 'accessing',
  4827. fn: function () {
  4828. var self = this;
  4829. return self.reservedWords;
  4830. return self;
  4831. },
  4832. args: [],
  4833. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  4834. messageSends: [],
  4835. referencedClasses: []
  4836. }),
  4837. smalltalk.Smalltalk);
  4838. smalltalk.addMethod(
  4839. unescape('_send_to_arguments_'),
  4840. smalltalk.method({
  4841. selector: unescape('send%3Ato%3Aarguments%3A'),
  4842. category: 'accessing',
  4843. fn: function (aSelector, anObject, aCollection) {
  4844. var self = this;
  4845. var selector = nil;
  4846. selector = smalltalk.send(smalltalk.send(aSelector, "_asString", []), "_asSelector", []);
  4847. self.send(anObject, selector, aCollection);
  4848. return self;
  4849. },
  4850. args: ["aSelector", "anObject", "aCollection"],
  4851. source: unescape('send%3A%20aSelector%20to%3A%20anObject%20arguments%3A%20aCollection%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20aSelector%20asString%20asSelector.%0A%09%3Cself.send%28anObject%2C%20selector%2C%20aCollection%29%3E'),
  4852. messageSends: ["asSelector", "asString"],
  4853. referencedClasses: []
  4854. }),
  4855. smalltalk.Smalltalk);
  4856. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  4857. smalltalk.addMethod(
  4858. unescape('_current'),
  4859. smalltalk.method({
  4860. selector: unescape('current'),
  4861. category: 'accessing',
  4862. fn: function () {
  4863. var self = this;
  4864. return smalltalk;
  4865. return self;
  4866. },
  4867. args: [],
  4868. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  4869. messageSends: [],
  4870. referencedClasses: []
  4871. }),
  4872. smalltalk.Smalltalk.klass);
  4873. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  4874. smalltalk.UndefinedObject.comment=unescape('UndefinedObject%20describes%20the%20behavior%20of%20its%20sole%20instance%2C%20%60nil%60.%20%60nil%60%20represents%20a%20prior%20value%20for%20variables%20that%20have%20not%20been%20initialized%2C%20or%20for%20results%20which%20are%20meaningless.%0A%0A%60nil%60%20is%20the%20Smalltalk%20representation%20of%20the%20%60undefined%60%20JavaScript%20object.')
  4875. smalltalk.addMethod(
  4876. unescape('_asJSON'),
  4877. smalltalk.method({
  4878. selector: unescape('asJSON'),
  4879. category: 'converting',
  4880. fn: function (){
  4881. var self=this;
  4882. return (typeof null == 'undefined' ? nil : null);
  4883. return self;},
  4884. args: [],
  4885. source: unescape('asJSON%0A%09%5Enull'),
  4886. messageSends: [],
  4887. referencedClasses: []
  4888. }),
  4889. smalltalk.UndefinedObject);
  4890. smalltalk.addMethod(
  4891. unescape('_deepCopy'),
  4892. smalltalk.method({
  4893. selector: unescape('deepCopy'),
  4894. category: 'copying',
  4895. fn: function () {
  4896. var self = this;
  4897. return self;
  4898. return self;
  4899. },
  4900. args: [],
  4901. source: unescape('deepCopy%0A%09%5Eself'),
  4902. messageSends: [],
  4903. referencedClasses: []
  4904. }),
  4905. smalltalk.UndefinedObject);
  4906. smalltalk.addMethod(
  4907. unescape('_ifNil_'),
  4908. smalltalk.method({
  4909. selector: unescape('ifNil%3A'),
  4910. category: 'testing',
  4911. fn: function (aBlock) {
  4912. var self = this;
  4913. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, function () {return nil;}]);
  4914. return self;
  4915. },
  4916. args: ["aBlock"],
  4917. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  4918. messageSends: ["ifNil:ifNotNil:"],
  4919. referencedClasses: []
  4920. }),
  4921. smalltalk.UndefinedObject);
  4922. smalltalk.addMethod(
  4923. unescape('_ifNil_ifNotNil_'),
  4924. smalltalk.method({
  4925. selector: unescape('ifNil%3AifNotNil%3A'),
  4926. category: 'testing',
  4927. fn: function (aBlock, anotherBlock) {
  4928. var self = this;
  4929. return smalltalk.send(aBlock, "_value", []);
  4930. return self;
  4931. },
  4932. args: ["aBlock", "anotherBlock"],
  4933. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  4934. messageSends: ["value"],
  4935. referencedClasses: []
  4936. }),
  4937. smalltalk.UndefinedObject);
  4938. smalltalk.addMethod(
  4939. unescape('_ifNotNil_'),
  4940. smalltalk.method({
  4941. selector: unescape('ifNotNil%3A'),
  4942. category: 'testing',
  4943. fn: function (aBlock) {
  4944. var self = this;
  4945. return self;
  4946. return self;
  4947. },
  4948. args: ["aBlock"],
  4949. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  4950. messageSends: [],
  4951. referencedClasses: []
  4952. }),
  4953. smalltalk.UndefinedObject);
  4954. smalltalk.addMethod(
  4955. unescape('_ifNotNil_ifNil_'),
  4956. smalltalk.method({
  4957. selector: unescape('ifNotNil%3AifNil%3A'),
  4958. category: 'testing',
  4959. fn: function (aBlock, anotherBlock) {
  4960. var self = this;
  4961. return smalltalk.send(anotherBlock, "_value", []);
  4962. return self;
  4963. },
  4964. args: ["aBlock", "anotherBlock"],
  4965. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  4966. messageSends: ["value"],
  4967. referencedClasses: []
  4968. }),
  4969. smalltalk.UndefinedObject);
  4970. smalltalk.addMethod(
  4971. unescape('_isNil'),
  4972. smalltalk.method({
  4973. selector: unescape('isNil'),
  4974. category: 'testing',
  4975. fn: function () {
  4976. var self = this;
  4977. return true;
  4978. return self;
  4979. },
  4980. args: [],
  4981. source: unescape('isNil%0A%09%5Etrue'),
  4982. messageSends: [],
  4983. referencedClasses: []
  4984. }),
  4985. smalltalk.UndefinedObject);
  4986. smalltalk.addMethod(
  4987. unescape('_notNil'),
  4988. smalltalk.method({
  4989. selector: unescape('notNil'),
  4990. category: 'testing',
  4991. fn: function () {
  4992. var self = this;
  4993. return false;
  4994. return self;
  4995. },
  4996. args: [],
  4997. source: unescape('notNil%0A%09%5Efalse'),
  4998. messageSends: [],
  4999. referencedClasses: []
  5000. }),
  5001. smalltalk.UndefinedObject);
  5002. smalltalk.addMethod(
  5003. unescape('_printString'),
  5004. smalltalk.method({
  5005. selector: unescape('printString'),
  5006. category: 'printing',
  5007. fn: function () {
  5008. var self = this;
  5009. return "nil";
  5010. return self;
  5011. },
  5012. args: [],
  5013. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  5014. messageSends: [],
  5015. referencedClasses: []
  5016. }),
  5017. smalltalk.UndefinedObject);
  5018. smalltalk.addMethod(
  5019. unescape('_shallowCopy'),
  5020. smalltalk.method({
  5021. selector: unescape('shallowCopy'),
  5022. category: 'copying',
  5023. fn: function () {
  5024. var self = this;
  5025. return self;
  5026. return self;
  5027. },
  5028. args: [],
  5029. source: unescape('shallowCopy%0A%09%5Eself'),
  5030. messageSends: [],
  5031. referencedClasses: []
  5032. }),
  5033. smalltalk.UndefinedObject);
  5034. smalltalk.addMethod(
  5035. unescape('_subclass_instanceVariableNames_'),
  5036. smalltalk.method({
  5037. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  5038. category: 'class creation',
  5039. fn: function (aString, anotherString) {
  5040. var self = this;
  5041. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  5042. return self;
  5043. },
  5044. args: ["aString", "anotherString"],
  5045. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  5046. messageSends: ["subclass:instanceVariableNames:package:"],
  5047. referencedClasses: []
  5048. }),
  5049. smalltalk.UndefinedObject);
  5050. smalltalk.addMethod(
  5051. unescape('_subclass_instanceVariableNames_category_'),
  5052. smalltalk.method({
  5053. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  5054. category: 'class creation',
  5055. fn: function (aString, aString2, aString3) {
  5056. var self = this;
  5057. smalltalk.send(self, "_deprecatedAPI", []);
  5058. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  5059. return self;
  5060. },
  5061. args: ["aString", "aString2", "aString3"],
  5062. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  5063. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  5064. referencedClasses: []
  5065. }),
  5066. smalltalk.UndefinedObject);
  5067. smalltalk.addMethod(
  5068. unescape('_subclass_instanceVariableNames_package_'),
  5069. smalltalk.method({
  5070. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  5071. category: 'class creation',
  5072. fn: function (aString, aString2, aString3) {
  5073. var self = this;
  5074. return smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  5075. return self;
  5076. },
  5077. args: ["aString", "aString2", "aString3"],
  5078. 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'),
  5079. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  5080. referencedClasses: ["ClassBuilder"]
  5081. }),
  5082. smalltalk.UndefinedObject);
  5083. smalltalk.addMethod(
  5084. unescape('_new'),
  5085. smalltalk.method({
  5086. selector: unescape('new'),
  5087. category: 'instance creation',
  5088. fn: function () {
  5089. var self = this;
  5090. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  5091. return self;
  5092. },
  5093. args: [],
  5094. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  5095. messageSends: ["error:"],
  5096. referencedClasses: []
  5097. }),
  5098. smalltalk.UndefinedObject.klass);
  5099. smalltalk.addPackage('Kernel-Classes', {});
  5100. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
  5101. smalltalk.Behavior.comment=unescape('Behavior%20is%20the%20superclass%20of%20all%20class%20objects.%20%0A%0AIt%20defines%20the%20protocol%20for%20creating%20instances%20of%20a%20class%20with%20%60%23basicNew%60%20and%20%60%23new%60%20%28see%20%60boot.js%60%20for%20class%20constructors%20details%29.%0AInstances%20know%20about%20the%20subclass/superclass%20relationships%20between%20classes%2C%20contain%20the%20description%20that%20instances%20are%20created%20from%2C%20%0Aand%20hold%20the%20method%20dictionary%20that%27s%20associated%20with%20each%20class.%0A%0ABehavior%20also%20%20provides%20methods%20for%20compiling%20methods%2C%20examining%20the%20method%20dictionary%2C%20and%20iterating%20over%20the%20class%20hierarchy.')
  5102. smalltalk.addMethod(
  5103. unescape('_addCompiledMethod_'),
  5104. smalltalk.method({
  5105. selector: unescape('addCompiledMethod%3A'),
  5106. category: 'compiling',
  5107. fn: function (aMethod){
  5108. var self=this;
  5109. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  5110. return self;},
  5111. args: ["aMethod"],
  5112. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  5113. messageSends: [],
  5114. referencedClasses: []
  5115. }),
  5116. smalltalk.Behavior);
  5117. smalltalk.addMethod(
  5118. unescape('_allInstanceVariableNames'),
  5119. smalltalk.method({
  5120. selector: unescape('allInstanceVariableNames'),
  5121. category: 'accessing',
  5122. fn: function (){
  5123. var self=this;
  5124. var result=nil;
  5125. (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
  5126. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  5127. return result;
  5128. return self;},
  5129. args: [],
  5130. 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'),
  5131. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  5132. referencedClasses: []
  5133. }),
  5134. smalltalk.Behavior);
  5135. smalltalk.addMethod(
  5136. unescape('_allSubclasses'),
  5137. smalltalk.method({
  5138. selector: unescape('allSubclasses'),
  5139. category: 'accessing',
  5140. fn: function (){
  5141. var self=this;
  5142. var result=nil;
  5143. (result=smalltalk.send(self, "_subclasses", []));
  5144. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  5145. return result;
  5146. return self;},
  5147. args: [],
  5148. 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'),
  5149. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  5150. referencedClasses: []
  5151. }),
  5152. smalltalk.Behavior);
  5153. smalltalk.addMethod(
  5154. unescape('_basicNew'),
  5155. smalltalk.method({
  5156. selector: unescape('basicNew'),
  5157. category: 'instance creation',
  5158. fn: function (){
  5159. var self=this;
  5160. return new self.fn();
  5161. return self;},
  5162. args: [],
  5163. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  5164. messageSends: [],
  5165. referencedClasses: []
  5166. }),
  5167. smalltalk.Behavior);
  5168. smalltalk.addMethod(
  5169. unescape('_comment'),
  5170. smalltalk.method({
  5171. selector: unescape('comment'),
  5172. category: 'accessing',
  5173. fn: function (){
  5174. var self=this;
  5175. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  5176. return self;},
  5177. args: [],
  5178. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  5179. messageSends: ["ifNil:", "basicAt:"],
  5180. referencedClasses: []
  5181. }),
  5182. smalltalk.Behavior);
  5183. smalltalk.addMethod(
  5184. unescape('_comment_'),
  5185. smalltalk.method({
  5186. selector: unescape('comment%3A'),
  5187. category: 'accessing',
  5188. fn: function (aString){
  5189. var self=this;
  5190. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  5191. return self;},
  5192. args: ["aString"],
  5193. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  5194. messageSends: ["basicAt:put:"],
  5195. referencedClasses: []
  5196. }),
  5197. smalltalk.Behavior);
  5198. smalltalk.addMethod(
  5199. unescape('_commentStamp'),
  5200. smalltalk.method({
  5201. selector: unescape('commentStamp'),
  5202. category: 'accessing',
  5203. fn: function (){
  5204. var self=this;
  5205. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  5206. return self;},
  5207. args: [],
  5208. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  5209. messageSends: ["class:", "yourself", "new"],
  5210. referencedClasses: ["ClassCommentReader"]
  5211. }),
  5212. smalltalk.Behavior);
  5213. smalltalk.addMethod(
  5214. unescape('_commentStamp_prior_'),
  5215. smalltalk.method({
  5216. selector: unescape('commentStamp%3Aprior%3A'),
  5217. category: 'accessing',
  5218. fn: function (aStamp, prior){
  5219. var self=this;
  5220. return smalltalk.send(self, "_commentStamp", []);
  5221. return self;},
  5222. args: ["aStamp", "prior"],
  5223. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  5224. messageSends: ["commentStamp"],
  5225. referencedClasses: []
  5226. }),
  5227. smalltalk.Behavior);
  5228. smalltalk.addMethod(
  5229. unescape('_compile_'),
  5230. smalltalk.method({
  5231. selector: unescape('compile%3A'),
  5232. category: 'compiling',
  5233. fn: function (aString){
  5234. var self=this;
  5235. smalltalk.send(self, "_compile_category_", [aString, ""]);
  5236. return self;},
  5237. args: ["aString"],
  5238. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  5239. messageSends: ["compile:category:"],
  5240. referencedClasses: []
  5241. }),
  5242. smalltalk.Behavior);
  5243. smalltalk.addMethod(
  5244. unescape('_compile_category_'),
  5245. smalltalk.method({
  5246. selector: unescape('compile%3Acategory%3A'),
  5247. category: 'compiling',
  5248. fn: function (aString, anotherString){
  5249. var self=this;
  5250. var method=nil;
  5251. (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
  5252. smalltalk.send(method, "_category_", [anotherString]);
  5253. smalltalk.send(self, "_addCompiledMethod_", [method]);
  5254. return self;},
  5255. args: ["aString", "anotherString"],
  5256. 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'),
  5257. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  5258. referencedClasses: ["Compiler"]
  5259. }),
  5260. smalltalk.Behavior);
  5261. smalltalk.addMethod(
  5262. unescape('_inheritsFrom_'),
  5263. smalltalk.method({
  5264. selector: unescape('inheritsFrom%3A'),
  5265. category: 'testing',
  5266. fn: function (aClass){
  5267. var self=this;
  5268. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  5269. return self;},
  5270. args: ["aClass"],
  5271. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  5272. messageSends: ["includes:", "allSubclasses"],
  5273. referencedClasses: []
  5274. }),
  5275. smalltalk.Behavior);
  5276. smalltalk.addMethod(
  5277. unescape('_instanceVariableNames'),
  5278. smalltalk.method({
  5279. selector: unescape('instanceVariableNames'),
  5280. category: 'accessing',
  5281. fn: function (){
  5282. var self=this;
  5283. return self.iVarNames;
  5284. return self;},
  5285. args: [],
  5286. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  5287. messageSends: [],
  5288. referencedClasses: []
  5289. }),
  5290. smalltalk.Behavior);
  5291. smalltalk.addMethod(
  5292. unescape('_methodAt_'),
  5293. smalltalk.method({
  5294. selector: unescape('methodAt%3A'),
  5295. category: 'accessing',
  5296. fn: function (aString){
  5297. var self=this;
  5298. return smalltalk.methods(self)[aString];
  5299. return self;},
  5300. args: ["aString"],
  5301. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  5302. messageSends: [],
  5303. referencedClasses: []
  5304. }),
  5305. smalltalk.Behavior);
  5306. smalltalk.addMethod(
  5307. unescape('_methodDictionary'),
  5308. smalltalk.method({
  5309. selector: unescape('methodDictionary'),
  5310. category: 'accessing',
  5311. fn: function (){
  5312. var self=this;
  5313. var dict = smalltalk.HashedCollection._new();
  5314. var methods = self.fn.prototype.methods;
  5315. for(var i in methods) {
  5316. if(methods[i].selector) {
  5317. dict._at_put_(methods[i].selector, methods[i]);
  5318. }
  5319. };
  5320. return dict;
  5321. return self;},
  5322. args: [],
  5323. source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.HashedCollection._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'),
  5324. messageSends: [],
  5325. referencedClasses: []
  5326. }),
  5327. smalltalk.Behavior);
  5328. smalltalk.addMethod(
  5329. unescape('_methodsFor_'),
  5330. smalltalk.method({
  5331. selector: unescape('methodsFor%3A'),
  5332. category: 'accessing',
  5333. fn: function (aString){
  5334. var self=this;
  5335. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  5336. return self;},
  5337. args: ["aString"],
  5338. 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'),
  5339. messageSends: ["class:category:", "yourself", "new"],
  5340. referencedClasses: ["ClassCategoryReader"]
  5341. }),
  5342. smalltalk.Behavior);
  5343. smalltalk.addMethod(
  5344. unescape('_methodsFor_stamp_'),
  5345. smalltalk.method({
  5346. selector: unescape('methodsFor%3Astamp%3A'),
  5347. category: 'accessing',
  5348. fn: function (aString, aStamp){
  5349. var self=this;
  5350. return smalltalk.send(self, "_methodsFor_", [aString]);
  5351. return self;},
  5352. args: ["aString", "aStamp"],
  5353. 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'),
  5354. messageSends: ["methodsFor:"],
  5355. referencedClasses: []
  5356. }),
  5357. smalltalk.Behavior);
  5358. smalltalk.addMethod(
  5359. unescape('_name'),
  5360. smalltalk.method({
  5361. selector: unescape('name'),
  5362. category: 'accessing',
  5363. fn: function (){
  5364. var self=this;
  5365. return self.className || nil;
  5366. return self;},
  5367. args: [],
  5368. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  5369. messageSends: [],
  5370. referencedClasses: []
  5371. }),
  5372. smalltalk.Behavior);
  5373. smalltalk.addMethod(
  5374. unescape('_new'),
  5375. smalltalk.method({
  5376. selector: unescape('new'),
  5377. category: 'instance creation',
  5378. fn: function (){
  5379. var self=this;
  5380. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  5381. return self;},
  5382. args: [],
  5383. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  5384. messageSends: ["initialize", "basicNew"],
  5385. referencedClasses: []
  5386. }),
  5387. smalltalk.Behavior);
  5388. smalltalk.addMethod(
  5389. unescape('_protocols'),
  5390. smalltalk.method({
  5391. selector: unescape('protocols'),
  5392. category: 'accessing',
  5393. fn: function (){
  5394. var self=this;
  5395. var protocols=nil;
  5396. (protocols=smalltalk.send((smalltalk.Array || Array), "_new", []));
  5397. 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", [])]);})]));})]);
  5398. return smalltalk.send(protocols, "_sort", []);
  5399. return self;},
  5400. args: [],
  5401. 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'),
  5402. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  5403. referencedClasses: ["Array"]
  5404. }),
  5405. smalltalk.Behavior);
  5406. smalltalk.addMethod(
  5407. unescape('_protocolsDo_'),
  5408. smalltalk.method({
  5409. selector: unescape('protocolsDo%3A'),
  5410. category: 'accessing',
  5411. fn: function (aBlock){
  5412. var self=this;
  5413. var methodsByCategory=nil;
  5414. (methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  5415. 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]);})]);
  5416. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  5417. return self;},
  5418. args: ["aBlock"],
  5419. 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%20HashedCollection%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'),
  5420. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  5421. referencedClasses: ["HashedCollection", "Array"]
  5422. }),
  5423. smalltalk.Behavior);
  5424. smalltalk.addMethod(
  5425. unescape('_prototype'),
  5426. smalltalk.method({
  5427. selector: unescape('prototype'),
  5428. category: 'accessing',
  5429. fn: function (){
  5430. var self=this;
  5431. return self.fn.prototype;
  5432. return self;},
  5433. args: [],
  5434. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  5435. messageSends: [],
  5436. referencedClasses: []
  5437. }),
  5438. smalltalk.Behavior);
  5439. smalltalk.addMethod(
  5440. unescape('_removeCompiledMethod_'),
  5441. smalltalk.method({
  5442. selector: unescape('removeCompiledMethod%3A'),
  5443. category: 'compiling',
  5444. fn: function (aMethod){
  5445. var self=this;
  5446. delete self.fn.prototype[aMethod.selector._asSelector()];
  5447. delete self.fn.prototype.methods[aMethod.selector];
  5448. smalltalk.init(self);;
  5449. return self;},
  5450. args: ["aMethod"],
  5451. 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'),
  5452. messageSends: [],
  5453. referencedClasses: []
  5454. }),
  5455. smalltalk.Behavior);
  5456. smalltalk.addMethod(
  5457. unescape('_subclasses'),
  5458. smalltalk.method({
  5459. selector: unescape('subclasses'),
  5460. category: 'accessing',
  5461. fn: function (){
  5462. var self=this;
  5463. return smalltalk.subclasses(self);
  5464. return self;},
  5465. args: [],
  5466. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  5467. messageSends: [],
  5468. referencedClasses: []
  5469. }),
  5470. smalltalk.Behavior);
  5471. smalltalk.addMethod(
  5472. unescape('_superclass'),
  5473. smalltalk.method({
  5474. selector: unescape('superclass'),
  5475. category: 'accessing',
  5476. fn: function (){
  5477. var self=this;
  5478. return self.superclass || nil;
  5479. return self;},
  5480. args: [],
  5481. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  5482. messageSends: [],
  5483. referencedClasses: []
  5484. }),
  5485. smalltalk.Behavior);
  5486. smalltalk.addMethod(
  5487. unescape('_withAllSubclasses'),
  5488. smalltalk.method({
  5489. selector: unescape('withAllSubclasses'),
  5490. category: 'accessing',
  5491. fn: function (){
  5492. var self=this;
  5493. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  5494. return self;},
  5495. args: [],
  5496. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  5497. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  5498. referencedClasses: ["Array"]
  5499. }),
  5500. smalltalk.Behavior);
  5501. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
  5502. smalltalk.Class.comment=unescape('Class%20is%20__the__%20class%20object.%20%0A%0AInstances%20are%20the%20classes%20of%20the%20system.%0AClass%20creation%20is%20done%20throught%20a%20%60ClassBuilder%60')
  5503. smalltalk.addMethod(
  5504. unescape('_category'),
  5505. smalltalk.method({
  5506. selector: unescape('category'),
  5507. category: 'accessing',
  5508. fn: function (){
  5509. var self=this;
  5510. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  5511. return self;},
  5512. args: [],
  5513. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  5514. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  5515. referencedClasses: []
  5516. }),
  5517. smalltalk.Class);
  5518. smalltalk.addMethod(
  5519. unescape('_isClass'),
  5520. smalltalk.method({
  5521. selector: unescape('isClass'),
  5522. category: 'testing',
  5523. fn: function (){
  5524. var self=this;
  5525. return true;
  5526. return self;},
  5527. args: [],
  5528. source: unescape('isClass%0A%09%5Etrue'),
  5529. messageSends: [],
  5530. referencedClasses: []
  5531. }),
  5532. smalltalk.Class);
  5533. smalltalk.addMethod(
  5534. unescape('_package'),
  5535. smalltalk.method({
  5536. selector: unescape('package'),
  5537. category: 'accessing',
  5538. fn: function (){
  5539. var self=this;
  5540. return self.pkg;
  5541. return self;},
  5542. args: [],
  5543. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  5544. messageSends: [],
  5545. referencedClasses: []
  5546. }),
  5547. smalltalk.Class);
  5548. smalltalk.addMethod(
  5549. unescape('_package_'),
  5550. smalltalk.method({
  5551. selector: unescape('package%3A'),
  5552. category: 'accessing',
  5553. fn: function (aPackage){
  5554. var self=this;
  5555. self.pkg = aPackage;
  5556. return self;},
  5557. args: ["aPackage"],
  5558. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  5559. messageSends: [],
  5560. referencedClasses: []
  5561. }),
  5562. smalltalk.Class);
  5563. smalltalk.addMethod(
  5564. unescape('_printString'),
  5565. smalltalk.method({
  5566. selector: unescape('printString'),
  5567. category: 'printing',
  5568. fn: function (){
  5569. var self=this;
  5570. return smalltalk.send(self, "_name", []);
  5571. return self;},
  5572. args: [],
  5573. source: unescape('printString%0A%09%5Eself%20name'),
  5574. messageSends: ["name"],
  5575. referencedClasses: []
  5576. }),
  5577. smalltalk.Class);
  5578. smalltalk.addMethod(
  5579. unescape('_rename_'),
  5580. smalltalk.method({
  5581. selector: unescape('rename%3A'),
  5582. category: 'accessing',
  5583. fn: function (aString){
  5584. var self=this;
  5585. smalltalk[aString] = self;
  5586. delete smalltalk[self.className];
  5587. self.className = aString;
  5588. ;
  5589. return self;},
  5590. args: ["aString"],
  5591. 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'),
  5592. messageSends: [],
  5593. referencedClasses: []
  5594. }),
  5595. smalltalk.Class);
  5596. smalltalk.addMethod(
  5597. unescape('_subclass_instanceVariableNames_'),
  5598. smalltalk.method({
  5599. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  5600. category: 'class creation',
  5601. fn: function (aString, anotherString){
  5602. var self=this;
  5603. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  5604. return self;},
  5605. args: ["aString", "anotherString"],
  5606. 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'),
  5607. messageSends: ["subclass:instanceVariableNames:package:"],
  5608. referencedClasses: []
  5609. }),
  5610. smalltalk.Class);
  5611. smalltalk.addMethod(
  5612. unescape('_subclass_instanceVariableNames_category_'),
  5613. smalltalk.method({
  5614. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  5615. category: 'class creation',
  5616. fn: function (aString, aString2, aString3){
  5617. var self=this;
  5618. smalltalk.send(self, "_deprecatedAPI", []);
  5619. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  5620. return self;},
  5621. args: ["aString", "aString2", "aString3"],
  5622. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  5623. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  5624. referencedClasses: []
  5625. }),
  5626. smalltalk.Class);
  5627. smalltalk.addMethod(
  5628. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  5629. smalltalk.method({
  5630. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  5631. category: 'class creation',
  5632. fn: function (aString, aString2, classVars, pools, aString3){
  5633. var self=this;
  5634. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  5635. return self;},
  5636. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  5637. 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'),
  5638. messageSends: ["subclass:instanceVariableNames:package:"],
  5639. referencedClasses: []
  5640. }),
  5641. smalltalk.Class);
  5642. smalltalk.addMethod(
  5643. unescape('_subclass_instanceVariableNames_package_'),
  5644. smalltalk.method({
  5645. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  5646. category: 'class creation',
  5647. fn: function (aString, aString2, aString3){
  5648. var self=this;
  5649. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
  5650. return self;},
  5651. args: ["aString", "aString2", "aString3"],
  5652. 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%20asString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  5653. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"],
  5654. referencedClasses: ["ClassBuilder"]
  5655. }),
  5656. smalltalk.Class);
  5657. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  5658. smalltalk.Metaclass.comment=unescape('Metaclass%20is%20the%20root%20of%20the%20class%20hierarchy.%0A%0AMetaclass%20instances%20are%20metaclasses%2C%20one%20for%20each%20real%20class.%20%0AMetaclass%20instances%20have%20a%20single%20instance%2C%20which%20they%20hold%20onto%2C%20which%20is%20the%20class%20that%20they%20are%20the%20metaclass%20of.')
  5659. smalltalk.addMethod(
  5660. unescape('_instanceClass'),
  5661. smalltalk.method({
  5662. selector: unescape('instanceClass'),
  5663. category: 'accessing',
  5664. fn: function (){
  5665. var self=this;
  5666. return self.instanceClass;
  5667. return self;},
  5668. args: [],
  5669. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  5670. messageSends: [],
  5671. referencedClasses: []
  5672. }),
  5673. smalltalk.Metaclass);
  5674. smalltalk.addMethod(
  5675. unescape('_instanceVariableNames_'),
  5676. smalltalk.method({
  5677. selector: unescape('instanceVariableNames%3A'),
  5678. category: 'accessing',
  5679. fn: function (aCollection){
  5680. var self=this;
  5681. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  5682. return self;},
  5683. args: ["aCollection"],
  5684. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  5685. messageSends: ["class:instanceVariableNames:", "new"],
  5686. referencedClasses: ["ClassBuilder"]
  5687. }),
  5688. smalltalk.Metaclass);
  5689. smalltalk.addMethod(
  5690. unescape('_isMetaclass'),
  5691. smalltalk.method({
  5692. selector: unescape('isMetaclass'),
  5693. category: 'testing',
  5694. fn: function (){
  5695. var self=this;
  5696. return true;
  5697. return self;},
  5698. args: [],
  5699. source: unescape('isMetaclass%0A%09%5Etrue'),
  5700. messageSends: [],
  5701. referencedClasses: []
  5702. }),
  5703. smalltalk.Metaclass);
  5704. smalltalk.addMethod(
  5705. unescape('_printString'),
  5706. smalltalk.method({
  5707. selector: unescape('printString'),
  5708. category: 'printing',
  5709. fn: function (){
  5710. var self=this;
  5711. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  5712. return self;},
  5713. args: [],
  5714. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  5715. messageSends: [unescape("%2C"), "name", "instanceClass"],
  5716. referencedClasses: []
  5717. }),
  5718. smalltalk.Metaclass);
  5719. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  5720. smalltalk.ClassBuilder.comment=unescape('ClassBuilder%20is%20responsible%20for%20compiling%20new%20classes%20or%20modifying%20existing%20classes%20in%20the%20system.%0A%0ARather%20than%20using%20ClassBuilder%20directly%20to%20compile%20a%20class%2C%20use%20%60Class%20%3E%3E%20subclass%3AinstanceVariableNames%3Apackage%3A%60.')
  5721. smalltalk.addMethod(
  5722. unescape('_addSubclassOf_named_instanceVariableNames_'),
  5723. smalltalk.method({
  5724. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  5725. category: 'private',
  5726. fn: function (aClass, aString, aCollection){
  5727. var self=this;
  5728. smalltalk.addClass(aString, aClass, aCollection);
  5729. return smalltalk[aString];
  5730. return self;},
  5731. args: ["aClass", "aString", "aCollection"],
  5732. 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'),
  5733. messageSends: [],
  5734. referencedClasses: []
  5735. }),
  5736. smalltalk.ClassBuilder);
  5737. smalltalk.addMethod(
  5738. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  5739. smalltalk.method({
  5740. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  5741. category: 'private',
  5742. fn: function (aClass, aString, aCollection, packageName){
  5743. var self=this;
  5744. smalltalk.addClass(aString, aClass, aCollection, packageName);
  5745. return smalltalk[aString];
  5746. return self;},
  5747. args: ["aClass", "aString", "aCollection", "packageName"],
  5748. 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'),
  5749. messageSends: [],
  5750. referencedClasses: []
  5751. }),
  5752. smalltalk.ClassBuilder);
  5753. smalltalk.addMethod(
  5754. unescape('_class_instanceVariableNames_'),
  5755. smalltalk.method({
  5756. selector: unescape('class%3AinstanceVariableNames%3A'),
  5757. category: 'class creation',
  5758. fn: function (aClass, aString){
  5759. var self=this;
  5760. ((($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"])]);})]));
  5761. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  5762. smalltalk.send(self, "_setupClass_", [aClass]);
  5763. return self;},
  5764. args: ["aClass", "aString"],
  5765. 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'),
  5766. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  5767. referencedClasses: []
  5768. }),
  5769. smalltalk.ClassBuilder);
  5770. smalltalk.addMethod(
  5771. unescape('_copyClass_named_'),
  5772. smalltalk.method({
  5773. selector: unescape('copyClass%3Anamed%3A'),
  5774. category: 'private',
  5775. fn: function (aClass, aString){
  5776. var self=this;
  5777. var newClass=nil;
  5778. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
  5779. smalltalk.send(self, "_setupClass_", [newClass]);
  5780. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  5781. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  5782. smalltalk.send(self, "_setupClass_", [newClass]);
  5783. return newClass;
  5784. return self;},
  5785. args: ["aClass", "aString"],
  5786. source: unescape('copyClass%3A%20aClass%20named%3A%20aString%0A%09%7C%20newClass%20%7C%0A%0A%09newClass%20%3A%3D%20self%20%0A%09%09addSubclassOf%3A%20aClass%20superclass%0A%09%09named%3A%20aString%20%0A%09%09instanceVariableNames%3A%20aClass%20instanceVariableNames%20%0A%09%09package%3A%20aClass%20package%20name.%0A%0A%09self%20setupClass%3A%20newClass.%0A%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%29.%0A%09%09%28newClass%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20class%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%20class%29.%0A%09%09%28newClass%20class%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  5787. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
  5788. referencedClasses: ["Compiler"]
  5789. }),
  5790. smalltalk.ClassBuilder);
  5791. smalltalk.addMethod(
  5792. unescape('_instanceVariableNamesFor_'),
  5793. smalltalk.method({
  5794. selector: unescape('instanceVariableNamesFor%3A'),
  5795. category: 'private',
  5796. fn: function (aString){
  5797. var self=this;
  5798. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  5799. return self;},
  5800. args: ["aString"],
  5801. 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'),
  5802. messageSends: ["reject:", "tokenize:", "isEmpty"],
  5803. referencedClasses: []
  5804. }),
  5805. smalltalk.ClassBuilder);
  5806. smalltalk.addMethod(
  5807. unescape('_setupClass_'),
  5808. smalltalk.method({
  5809. selector: unescape('setupClass%3A'),
  5810. category: 'private',
  5811. fn: function (aClass){
  5812. var self=this;
  5813. smalltalk.init(aClass);;
  5814. return self;},
  5815. args: ["aClass"],
  5816. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  5817. messageSends: [],
  5818. referencedClasses: []
  5819. }),
  5820. smalltalk.ClassBuilder);
  5821. smalltalk.addMethod(
  5822. unescape('_superclass_subclass_'),
  5823. smalltalk.method({
  5824. selector: unescape('superclass%3Asubclass%3A'),
  5825. category: 'class creation',
  5826. fn: function (aClass, aString){
  5827. var self=this;
  5828. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  5829. return self;},
  5830. args: ["aClass", "aString"],
  5831. 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'),
  5832. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  5833. referencedClasses: []
  5834. }),
  5835. smalltalk.ClassBuilder);
  5836. smalltalk.addMethod(
  5837. unescape('_superclass_subclass_instanceVariableNames_package_'),
  5838. smalltalk.method({
  5839. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  5840. category: 'class creation',
  5841. fn: function (aClass, aString, aString2, aString3){
  5842. var self=this;
  5843. var newClass=nil;
  5844. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
  5845. smalltalk.send(self, "_setupClass_", [newClass]);
  5846. return newClass;
  5847. return self;},
  5848. args: ["aClass", "aString", "aString2", "aString3"],
  5849. 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.%0A%09%5EnewClass'),
  5850. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  5851. referencedClasses: []
  5852. }),
  5853. smalltalk.ClassBuilder);
  5854. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
  5855. smalltalk.ClassCategoryReader.comment=unescape('ClassCategoryReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.')
  5856. smalltalk.addMethod(
  5857. unescape('_class_category_'),
  5858. smalltalk.method({
  5859. selector: unescape('class%3Acategory%3A'),
  5860. category: 'accessing',
  5861. fn: function (aClass, aString){
  5862. var self=this;
  5863. (self['@class']=aClass);
  5864. (self['@category']=aString);
  5865. return self;},
  5866. args: ["aClass", "aString"],
  5867. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  5868. messageSends: [],
  5869. referencedClasses: []
  5870. }),
  5871. smalltalk.ClassCategoryReader);
  5872. smalltalk.addMethod(
  5873. unescape('_compileMethod_'),
  5874. smalltalk.method({
  5875. selector: unescape('compileMethod%3A'),
  5876. category: 'private',
  5877. fn: function (aString){
  5878. var self=this;
  5879. var method=nil;
  5880. var compiler=nil;
  5881. (method=smalltalk.send((compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])), "_load_forClass_", [aString, self['@class']]));
  5882. smalltalk.send(method, "_category_", [self['@category']]);
  5883. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  5884. smalltalk.send(compiler, "_setupClass_", [self['@class']]);
  5885. return self;},
  5886. args: ["aString"],
  5887. source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20compiler%20%7C%0A%09method%20%3A%3D%20%28compiler%20%3A%3D%20Compiler%20new%29%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method.%0A%09compiler%20setupClass%3A%20class.'),
  5888. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:", "setupClass:"],
  5889. referencedClasses: ["Compiler"]
  5890. }),
  5891. smalltalk.ClassCategoryReader);
  5892. smalltalk.addMethod(
  5893. unescape('_initialize'),
  5894. smalltalk.method({
  5895. selector: unescape('initialize'),
  5896. category: 'initialization',
  5897. fn: function (){
  5898. var self=this;
  5899. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  5900. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  5901. return self;},
  5902. args: [],
  5903. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  5904. messageSends: ["initialize", "new"],
  5905. referencedClasses: ["ChunkParser"]
  5906. }),
  5907. smalltalk.ClassCategoryReader);
  5908. smalltalk.addMethod(
  5909. unescape('_scanFrom_'),
  5910. smalltalk.method({
  5911. selector: unescape('scanFrom%3A'),
  5912. category: 'fileIn',
  5913. fn: function (aChunkParser){
  5914. var self=this;
  5915. var chunk=nil;
  5916. (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  5917. return self;},
  5918. args: ["aChunkParser"],
  5919. 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'),
  5920. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  5921. referencedClasses: []
  5922. }),
  5923. smalltalk.ClassCategoryReader);
  5924. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
  5925. smalltalk.ClassCommentReader.comment=unescape('ClassCommentReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.%0ASee%20%60ClassCategoryReader%60%20too.')
  5926. smalltalk.addMethod(
  5927. unescape('_class_'),
  5928. smalltalk.method({
  5929. selector: unescape('class%3A'),
  5930. category: 'accessing',
  5931. fn: function (aClass){
  5932. var self=this;
  5933. (self['@class']=aClass);
  5934. return self;},
  5935. args: ["aClass"],
  5936. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  5937. messageSends: [],
  5938. referencedClasses: []
  5939. }),
  5940. smalltalk.ClassCommentReader);
  5941. smalltalk.addMethod(
  5942. unescape('_initialize'),
  5943. smalltalk.method({
  5944. selector: unescape('initialize'),
  5945. category: 'initialization',
  5946. fn: function (){
  5947. var self=this;
  5948. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  5949. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  5950. return self;},
  5951. args: [],
  5952. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  5953. messageSends: ["initialize", "new"],
  5954. referencedClasses: ["ChunkParser"]
  5955. }),
  5956. smalltalk.ClassCommentReader);
  5957. smalltalk.addMethod(
  5958. unescape('_scanFrom_'),
  5959. smalltalk.method({
  5960. selector: unescape('scanFrom%3A'),
  5961. category: 'fileIn',
  5962. fn: function (aChunkParser){
  5963. var self=this;
  5964. var chunk=nil;
  5965. (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
  5966. ((($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]);})]));
  5967. return self;},
  5968. args: ["aChunkParser"],
  5969. 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.'),
  5970. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  5971. referencedClasses: []
  5972. }),
  5973. smalltalk.ClassCommentReader);
  5974. smalltalk.addMethod(
  5975. unescape('_setComment_'),
  5976. smalltalk.method({
  5977. selector: unescape('setComment%3A'),
  5978. category: 'private',
  5979. fn: function (aString){
  5980. var self=this;
  5981. smalltalk.send(self['@class'], "_comment_", [aString]);
  5982. return self;},
  5983. args: ["aString"],
  5984. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  5985. messageSends: ["comment:"],
  5986. referencedClasses: []
  5987. }),
  5988. smalltalk.ClassCommentReader);
  5989. smalltalk.addClass('ClassSorterNode', smalltalk.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
  5990. smalltalk.addMethod(
  5991. unescape('_getNodesFrom_'),
  5992. smalltalk.method({
  5993. selector: unescape('getNodesFrom%3A'),
  5994. category: 'accessing',
  5995. fn: function (aCollection){
  5996. var self=this;
  5997. var children=nil;
  5998. var others=nil;
  5999. (children=[]);
  6000. (others=[]);
  6001. smalltalk.send(aCollection, "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
  6002. (self['@nodes']=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassSorterNode || ClassSorterNode), "_on_classes_level_", [each, others, ((($receiver = smalltalk.send(self, "_level", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
  6003. return self;},
  6004. args: ["aCollection"],
  6005. source: unescape('getNodesFrom%3A%20aCollection%0A%09%7C%20children%20others%20%7C%0A%09children%20%3A%3D%20%23%28%29.%0A%09others%20%3A%3D%20%23%28%29.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28each%20superclass%20%3D%20self%20theClass%29%0A%09%09%09ifTrue%3A%20%5Bchildren%20add%3A%20each%5D%0A%09%09%09ifFalse%3A%20%5Bothers%20add%3A%20each%5D%5D.%0A%09nodes%3A%3D%20children%20collect%3A%20%5B%3Aeach%20%7C%0A%09%09ClassSorterNode%20on%3A%20each%20classes%3A%20others%20level%3A%20self%20level%20+%201%5D'),
  6006. messageSends: ["do:", "ifTrue:ifFalse:", unescape("%3D"), "superclass", "theClass", "add:", "collect:", "on:classes:level:", unescape("+"), "level"],
  6007. referencedClasses: ["ClassSorterNode"]
  6008. }),
  6009. smalltalk.ClassSorterNode);
  6010. smalltalk.addMethod(
  6011. unescape('_level'),
  6012. smalltalk.method({
  6013. selector: unescape('level'),
  6014. category: 'accessing',
  6015. fn: function (){
  6016. var self=this;
  6017. return self['@level'];
  6018. return self;},
  6019. args: [],
  6020. source: unescape('level%0A%09%5Elevel'),
  6021. messageSends: [],
  6022. referencedClasses: []
  6023. }),
  6024. smalltalk.ClassSorterNode);
  6025. smalltalk.addMethod(
  6026. unescape('_level_'),
  6027. smalltalk.method({
  6028. selector: unescape('level%3A'),
  6029. category: 'accessing',
  6030. fn: function (anInteger){
  6031. var self=this;
  6032. (self['@level']=anInteger);
  6033. return self;},
  6034. args: ["anInteger"],
  6035. source: unescape('level%3A%20anInteger%0A%09level%20%3A%3D%20anInteger'),
  6036. messageSends: [],
  6037. referencedClasses: []
  6038. }),
  6039. smalltalk.ClassSorterNode);
  6040. smalltalk.addMethod(
  6041. unescape('_nodes'),
  6042. smalltalk.method({
  6043. selector: unescape('nodes'),
  6044. category: 'accessing',
  6045. fn: function (){
  6046. var self=this;
  6047. return self['@nodes'];
  6048. return self;},
  6049. args: [],
  6050. source: unescape('nodes%0A%09%5Enodes'),
  6051. messageSends: [],
  6052. referencedClasses: []
  6053. }),
  6054. smalltalk.ClassSorterNode);
  6055. smalltalk.addMethod(
  6056. unescape('_theClass'),
  6057. smalltalk.method({
  6058. selector: unescape('theClass'),
  6059. category: 'accessing',
  6060. fn: function (){
  6061. var self=this;
  6062. return self['@theClass'];
  6063. return self;},
  6064. args: [],
  6065. source: unescape('theClass%0A%09%5EtheClass'),
  6066. messageSends: [],
  6067. referencedClasses: []
  6068. }),
  6069. smalltalk.ClassSorterNode);
  6070. smalltalk.addMethod(
  6071. unescape('_theClass_'),
  6072. smalltalk.method({
  6073. selector: unescape('theClass%3A'),
  6074. category: 'accessing',
  6075. fn: function (aClass){
  6076. var self=this;
  6077. (self['@theClass']=aClass);
  6078. return self;},
  6079. args: ["aClass"],
  6080. source: unescape('theClass%3A%20aClass%0A%09theClass%20%3A%3D%20aClass'),
  6081. messageSends: [],
  6082. referencedClasses: []
  6083. }),
  6084. smalltalk.ClassSorterNode);
  6085. smalltalk.addMethod(
  6086. unescape('_traverseClassesWith_'),
  6087. smalltalk.method({
  6088. selector: unescape('traverseClassesWith%3A'),
  6089. category: 'visiting',
  6090. fn: function (aCollection){
  6091. var self=this;
  6092. smalltalk.send(aCollection, "_add_", [smalltalk.send(self, "_theClass", [])]);
  6093. smalltalk.send(smalltalk.send(smalltalk.send(self, "_nodes", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(smalltalk.send(a, "_theClass", []), "_name", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", [])]));})]), "_do_", [(function(aNode){return smalltalk.send(aNode, "_traverseClassesWith_", [aCollection]);})]);
  6094. return self;},
  6095. args: ["aCollection"],
  6096. source: unescape('traverseClassesWith%3A%20aCollection%0A%09%22sort%20classes%20alphabetically%20Issue%20%23143%22%0A%0A%09aCollection%20add%3A%20self%20theClass.%0A%09%28self%20nodes%20sorted%3A%20%5B%3Aa%20%3Ab%20%7C%20a%20theClass%20name%20%3C%3D%20b%20theClass%20name%20%5D%29%20do%3A%20%5B%3AaNode%20%7C%0A%09%09aNode%20traverseClassesWith%3A%20aCollection%20%5D.'),
  6097. messageSends: ["add:", "theClass", "do:", "sorted:", "nodes", unescape("%3C%3D"), "name", "traverseClassesWith:"],
  6098. referencedClasses: []
  6099. }),
  6100. smalltalk.ClassSorterNode);
  6101. smalltalk.addMethod(
  6102. unescape('_on_classes_level_'),
  6103. smalltalk.method({
  6104. selector: unescape('on%3Aclasses%3Alevel%3A'),
  6105. category: 'instance creation',
  6106. fn: function (aClass, aCollection, anInteger){
  6107. var self=this;
  6108. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);smalltalk.send($rec, "_level_", [anInteger]);smalltalk.send($rec, "_getNodesFrom_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6109. return self;},
  6110. args: ["aClass", "aCollection", "anInteger"],
  6111. source: unescape('on%3A%20aClass%20classes%3A%20aCollection%20level%3A%20anInteger%0A%09%5Eself%20new%0A%09%09theClass%3A%20aClass%3B%0A%09%09level%3A%20anInteger%3B%0A%09%09getNodesFrom%3A%20aCollection%3B%0A%09%09yourself'),
  6112. messageSends: ["theClass:", "level:", "getNodesFrom:", "yourself", "new"],
  6113. referencedClasses: []
  6114. }),
  6115. smalltalk.ClassSorterNode.klass);
  6116. smalltalk.addPackage('Kernel-Methods', {});
  6117. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
  6118. smalltalk.BlockClosure.comment=unescape('A%20BlockClosure%20is%20a%20lexical%20closure.%0AThe%20JavaScript%20representation%20is%20a%20function.%0A%0AA%20BlockClosure%20is%20evaluated%20with%20the%20%60%23value*%60%20methods%20in%20the%20%27evaluating%27%20protocol.')
  6119. smalltalk.addMethod(
  6120. unescape('_applyTo_arguments_'),
  6121. smalltalk.method({
  6122. selector: unescape('applyTo%3Aarguments%3A'),
  6123. category: 'evaluating',
  6124. fn: function (anObject, aCollection) {
  6125. var self = this;
  6126. return self.apply(anObject, aCollection);
  6127. return self;
  6128. },
  6129. args: ["anObject", "aCollection"],
  6130. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  6131. messageSends: [],
  6132. referencedClasses: []
  6133. }),
  6134. smalltalk.BlockClosure);
  6135. smalltalk.addMethod(
  6136. unescape('_compiledSource'),
  6137. smalltalk.method({
  6138. selector: unescape('compiledSource'),
  6139. category: 'accessing',
  6140. fn: function () {
  6141. var self = this;
  6142. return self.toString();
  6143. return self;
  6144. },
  6145. args: [],
  6146. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  6147. messageSends: [],
  6148. referencedClasses: []
  6149. }),
  6150. smalltalk.BlockClosure);
  6151. smalltalk.addMethod(
  6152. unescape('_ensure_'),
  6153. smalltalk.method({
  6154. selector: unescape('ensure%3A'),
  6155. category: 'evaluating',
  6156. fn: function (aBlock) {
  6157. var self = this;
  6158. var success = nil;
  6159. success = false;
  6160. return smalltalk.send(function () {smalltalk.send(self, "_value", []);success = true;return smalltalk.send(aBlock, "_value", []);}, "_on_do_", [smalltalk.Error || Error, function (ex) {($receiver = success).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(aBlock, "_value", []);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(aBlock, "_value", []);}]);return smalltalk.send(ex, "_signal", []);}]);
  6161. return self;
  6162. },
  6163. args: ["aBlock"],
  6164. source: unescape('ensure%3A%20aBlock%0A%09%7C%20success%20%7C%0A%09success%20%3A%3D%20false.%0A%09%5E%5Bself%20value.%20success%20%3A%3D%20true.%20aBlock%20value%5D%0A%09%09on%3A%20Error%0A%09%09do%3A%20%5B%3Aex%20%7C%0A%09%09%09success%20ifFalse%3A%20%5BaBlock%20value%5D.%0A%09%09%09ex%20signal%5D'),
  6165. messageSends: ["on:do:", "value", "ifFalse:", "signal"],
  6166. referencedClasses: ["Error"]
  6167. }),
  6168. smalltalk.BlockClosure);
  6169. smalltalk.addMethod(
  6170. unescape('_new'),
  6171. smalltalk.method({
  6172. selector: unescape('new'),
  6173. category: 'evaluating',
  6174. fn: function () {
  6175. var self = this;
  6176. return new self;
  6177. return self;
  6178. },
  6179. args: [],
  6180. 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'),
  6181. messageSends: [],
  6182. referencedClasses: []
  6183. }),
  6184. smalltalk.BlockClosure);
  6185. smalltalk.addMethod(
  6186. unescape('_newValue_'),
  6187. smalltalk.method({
  6188. selector: unescape('newValue%3A'),
  6189. category: 'evaluating',
  6190. fn: function (anObject) {
  6191. var self = this;
  6192. return new self(anObject);
  6193. return self;
  6194. },
  6195. args: ["anObject"],
  6196. source: unescape('newValue%3A%20anObject%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%28anObject%29%3E'),
  6197. messageSends: [],
  6198. referencedClasses: []
  6199. }),
  6200. smalltalk.BlockClosure);
  6201. smalltalk.addMethod(
  6202. unescape('_newValue_value_'),
  6203. smalltalk.method({
  6204. selector: unescape('newValue%3Avalue%3A'),
  6205. category: 'evaluating',
  6206. fn: function (anObject, anObject2) {
  6207. var self = this;
  6208. return new self(anObject, anObject2);
  6209. return self;
  6210. },
  6211. args: ["anObject", "anObject2"],
  6212. source: unescape('newValue%3A%20%20anObject%20value%3A%20anObject2%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%28anObject%2C%20anObject2%29%3E'),
  6213. messageSends: [],
  6214. referencedClasses: []
  6215. }),
  6216. smalltalk.BlockClosure);
  6217. smalltalk.addMethod(
  6218. unescape('_newValue_value_value_'),
  6219. smalltalk.method({
  6220. selector: unescape('newValue%3Avalue%3Avalue%3A'),
  6221. category: 'evaluating',
  6222. fn: function (anObject, anObject2, anObject3) {
  6223. var self = this;
  6224. return new self(anObject, anObject2);
  6225. return self;
  6226. },
  6227. args: ["anObject", "anObject2", "anObject3"],
  6228. source: unescape('newValue%3A%20%20anObject%20value%3A%20anObject2%20value%3A%20anObject3%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%28anObject%2C%20anObject2%29%3E'),
  6229. messageSends: [],
  6230. referencedClasses: []
  6231. }),
  6232. smalltalk.BlockClosure);
  6233. smalltalk.addMethod(
  6234. unescape('_numArgs'),
  6235. smalltalk.method({
  6236. selector: unescape('numArgs'),
  6237. category: 'accessing',
  6238. fn: function () {
  6239. var self = this;
  6240. return self.length;
  6241. return self;
  6242. },
  6243. args: [],
  6244. source: unescape('numArgs%0A%09%3Creturn%20self.length%3E'),
  6245. messageSends: [],
  6246. referencedClasses: []
  6247. }),
  6248. smalltalk.BlockClosure);
  6249. smalltalk.addMethod(
  6250. unescape('_on_do_'),
  6251. smalltalk.method({
  6252. selector: unescape('on%3Ado%3A'),
  6253. category: 'error handling',
  6254. fn: function (anErrorClass, aBlock) {
  6255. var self = this;
  6256. return 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", []);}]);}]);
  6257. return self;
  6258. },
  6259. args: ["anErrorClass", "aBlock"],
  6260. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09%5Eself%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'),
  6261. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  6262. referencedClasses: []
  6263. }),
  6264. smalltalk.BlockClosure);
  6265. smalltalk.addMethod(
  6266. unescape('_timeToRun'),
  6267. smalltalk.method({
  6268. selector: unescape('timeToRun'),
  6269. category: 'evaluating',
  6270. fn: function () {
  6271. var self = this;
  6272. return smalltalk.send(smalltalk.Date || Date, "_millisecondsToRun_", [self]);
  6273. return self;
  6274. },
  6275. args: [],
  6276. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  6277. messageSends: ["millisecondsToRun:"],
  6278. referencedClasses: ["Date"]
  6279. }),
  6280. smalltalk.BlockClosure);
  6281. smalltalk.addMethod(
  6282. unescape('_value'),
  6283. smalltalk.method({
  6284. selector: unescape('value'),
  6285. category: 'evaluating',
  6286. fn: function () {
  6287. var self = this;
  6288. return self();
  6289. return self;
  6290. },
  6291. args: [],
  6292. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  6293. messageSends: [],
  6294. referencedClasses: []
  6295. }),
  6296. smalltalk.BlockClosure);
  6297. smalltalk.addMethod(
  6298. unescape('_value_'),
  6299. smalltalk.method({
  6300. selector: unescape('value%3A'),
  6301. category: 'evaluating',
  6302. fn: function (anArg) {
  6303. var self = this;
  6304. return self(anArg);
  6305. return self;
  6306. },
  6307. args: ["anArg"],
  6308. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  6309. messageSends: [],
  6310. referencedClasses: []
  6311. }),
  6312. smalltalk.BlockClosure);
  6313. smalltalk.addMethod(
  6314. unescape('_value_value_'),
  6315. smalltalk.method({
  6316. selector: unescape('value%3Avalue%3A'),
  6317. category: 'evaluating',
  6318. fn: function (firstArg, secondArg) {
  6319. var self = this;
  6320. return self(firstArg, secondArg);
  6321. return self;
  6322. },
  6323. args: ["firstArg", "secondArg"],
  6324. 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'),
  6325. messageSends: [],
  6326. referencedClasses: []
  6327. }),
  6328. smalltalk.BlockClosure);
  6329. smalltalk.addMethod(
  6330. unescape('_value_value_value_'),
  6331. smalltalk.method({
  6332. selector: unescape('value%3Avalue%3Avalue%3A'),
  6333. category: 'evaluating',
  6334. fn: function (firstArg, secondArg, thirdArg) {
  6335. var self = this;
  6336. return self(firstArg, secondArg, thirdArg);
  6337. return self;
  6338. },
  6339. args: ["firstArg", "secondArg", "thirdArg"],
  6340. 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'),
  6341. messageSends: [],
  6342. referencedClasses: []
  6343. }),
  6344. smalltalk.BlockClosure);
  6345. smalltalk.addMethod(
  6346. unescape('_valueWithInterval_'),
  6347. smalltalk.method({
  6348. selector: unescape('valueWithInterval%3A'),
  6349. category: 'timeout/interval',
  6350. fn: function (aNumber) {
  6351. var self = this;
  6352. return setInterval(self, aNumber);
  6353. return self;
  6354. },
  6355. args: ["aNumber"],
  6356. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  6357. messageSends: [],
  6358. referencedClasses: []
  6359. }),
  6360. smalltalk.BlockClosure);
  6361. smalltalk.addMethod(
  6362. unescape('_valueWithPossibleArguments_'),
  6363. smalltalk.method({
  6364. selector: unescape('valueWithPossibleArguments%3A'),
  6365. category: 'evaluating',
  6366. fn: function (aCollection) {
  6367. var self = this;
  6368. return self.apply(null, aCollection);
  6369. return self;
  6370. },
  6371. args: ["aCollection"],
  6372. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  6373. messageSends: [],
  6374. referencedClasses: []
  6375. }),
  6376. smalltalk.BlockClosure);
  6377. smalltalk.addMethod(
  6378. unescape('_valueWithTimeout_'),
  6379. smalltalk.method({
  6380. selector: unescape('valueWithTimeout%3A'),
  6381. category: 'timeout/interval',
  6382. fn: function (aNumber) {
  6383. var self = this;
  6384. return setTimeout(self, aNumber);
  6385. return self;
  6386. },
  6387. args: ["aNumber"],
  6388. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  6389. messageSends: [],
  6390. referencedClasses: []
  6391. }),
  6392. smalltalk.BlockClosure);
  6393. smalltalk.addMethod(
  6394. unescape('_whileFalse'),
  6395. smalltalk.method({
  6396. selector: unescape('whileFalse'),
  6397. category: 'controlling',
  6398. fn: function () {
  6399. var self = this;
  6400. smalltalk.send(self, "_whileFalse_", [function () {return nil;}]);
  6401. return self;
  6402. },
  6403. args: [],
  6404. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  6405. messageSends: ["whileFalse:"],
  6406. referencedClasses: []
  6407. }),
  6408. smalltalk.BlockClosure);
  6409. smalltalk.addMethod(
  6410. unescape('_whileFalse_'),
  6411. smalltalk.method({
  6412. selector: unescape('whileFalse%3A'),
  6413. category: 'controlling',
  6414. fn: function (aBlock) {
  6415. var self = this;
  6416. while (!self()) {
  6417. aBlock();
  6418. }
  6419. return self;
  6420. },
  6421. args: ["aBlock"],
  6422. 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'),
  6423. messageSends: [],
  6424. referencedClasses: []
  6425. }),
  6426. smalltalk.BlockClosure);
  6427. smalltalk.addMethod(
  6428. unescape('_whileTrue'),
  6429. smalltalk.method({
  6430. selector: unescape('whileTrue'),
  6431. category: 'controlling',
  6432. fn: function () {
  6433. var self = this;
  6434. smalltalk.send(self, "_whileTrue_", [function () {return nil;}]);
  6435. return self;
  6436. },
  6437. args: [],
  6438. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  6439. messageSends: ["whileTrue:"],
  6440. referencedClasses: []
  6441. }),
  6442. smalltalk.BlockClosure);
  6443. smalltalk.addMethod(
  6444. unescape('_whileTrue_'),
  6445. smalltalk.method({
  6446. selector: unescape('whileTrue%3A'),
  6447. category: 'controlling',
  6448. fn: function (aBlock) {
  6449. var self = this;
  6450. while (self()) {
  6451. aBlock();
  6452. }
  6453. return self;
  6454. },
  6455. args: ["aBlock"],
  6456. 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'),
  6457. messageSends: [],
  6458. referencedClasses: []
  6459. }),
  6460. smalltalk.BlockClosure);
  6461. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
  6462. smalltalk.CompiledMethod.comment=unescape('CompiledMethod%20hold%20the%20source%20and%20compiled%20code%20of%20a%20class%20method.%0A%0AYou%20can%20get%20a%20CompiledMethod%20using%20%60Behavior%3E%3EmethodAt%3A%60%0A%0A%09String%20methodAt%3A%20%27lines%27%0A%0Aand%20read%20the%20source%20code%0A%0A%09%28String%20methodAt%3A%20%27lines%27%29%20source%0A%0ASee%20referenced%20classes%3A%0A%0A%09%28String%20methodAt%3A%20%27lines%27%29%20referencedClasses%0A%0Aor%20messages%20sent%20from%20this%20method%3A%0A%09%0A%09%28String%20methodAt%3A%20%27lines%27%29%20%20messageSends')
  6463. smalltalk.addMethod(
  6464. unescape('_arguments'),
  6465. smalltalk.method({
  6466. selector: unescape('arguments'),
  6467. category: 'accessing',
  6468. fn: function () {
  6469. var self = this;
  6470. return self.args || [];
  6471. return self;
  6472. },
  6473. args: [],
  6474. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  6475. messageSends: [],
  6476. referencedClasses: []
  6477. }),
  6478. smalltalk.CompiledMethod);
  6479. smalltalk.addMethod(
  6480. unescape('_category'),
  6481. smalltalk.method({
  6482. selector: unescape('category'),
  6483. category: 'accessing',
  6484. fn: function () {
  6485. var self = this;
  6486. return ($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil ||
  6487. $receiver == undefined ? function () {return "";}() : $receiver;
  6488. return self;
  6489. },
  6490. args: [],
  6491. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  6492. messageSends: ["ifNil:", "basicAt:"],
  6493. referencedClasses: []
  6494. }),
  6495. smalltalk.CompiledMethod);
  6496. smalltalk.addMethod(
  6497. unescape('_category_'),
  6498. smalltalk.method({
  6499. selector: unescape('category%3A'),
  6500. category: 'accessing',
  6501. fn: function (aString) {
  6502. var self = this;
  6503. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  6504. return self;
  6505. },
  6506. args: ["aString"],
  6507. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  6508. messageSends: ["basicAt:put:"],
  6509. referencedClasses: []
  6510. }),
  6511. smalltalk.CompiledMethod);
  6512. smalltalk.addMethod(
  6513. unescape('_fn'),
  6514. smalltalk.method({
  6515. selector: unescape('fn'),
  6516. category: 'accessing',
  6517. fn: function () {
  6518. var self = this;
  6519. return smalltalk.send(self, "_basicAt_", ["fn"]);
  6520. return self;
  6521. },
  6522. args: [],
  6523. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  6524. messageSends: ["basicAt:"],
  6525. referencedClasses: []
  6526. }),
  6527. smalltalk.CompiledMethod);
  6528. smalltalk.addMethod(
  6529. unescape('_fn_'),
  6530. smalltalk.method({
  6531. selector: unescape('fn%3A'),
  6532. category: 'accessing',
  6533. fn: function (aBlock) {
  6534. var self = this;
  6535. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  6536. return self;
  6537. },
  6538. args: ["aBlock"],
  6539. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  6540. messageSends: ["basicAt:put:"],
  6541. referencedClasses: []
  6542. }),
  6543. smalltalk.CompiledMethod);
  6544. smalltalk.addMethod(
  6545. unescape('_messageSends'),
  6546. smalltalk.method({
  6547. selector: unescape('messageSends'),
  6548. category: 'accessing',
  6549. fn: function () {
  6550. var self = this;
  6551. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  6552. return self;
  6553. },
  6554. args: [],
  6555. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  6556. messageSends: ["basicAt:"],
  6557. referencedClasses: []
  6558. }),
  6559. smalltalk.CompiledMethod);
  6560. smalltalk.addMethod(
  6561. unescape('_methodClass'),
  6562. smalltalk.method({
  6563. selector: unescape('methodClass'),
  6564. category: 'accessing',
  6565. fn: function () {
  6566. var self = this;
  6567. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  6568. return self;
  6569. },
  6570. args: [],
  6571. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  6572. messageSends: ["basicAt:"],
  6573. referencedClasses: []
  6574. }),
  6575. smalltalk.CompiledMethod);
  6576. smalltalk.addMethod(
  6577. unescape('_referencedClasses'),
  6578. smalltalk.method({
  6579. selector: unescape('referencedClasses'),
  6580. category: 'accessing',
  6581. fn: function () {
  6582. var self = this;
  6583. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  6584. return self;
  6585. },
  6586. args: [],
  6587. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  6588. messageSends: ["basicAt:"],
  6589. referencedClasses: []
  6590. }),
  6591. smalltalk.CompiledMethod);
  6592. smalltalk.addMethod(
  6593. unescape('_selector'),
  6594. smalltalk.method({
  6595. selector: unescape('selector'),
  6596. category: 'accessing',
  6597. fn: function () {
  6598. var self = this;
  6599. return smalltalk.send(self, "_basicAt_", ["selector"]);
  6600. return self;
  6601. },
  6602. args: [],
  6603. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  6604. messageSends: ["basicAt:"],
  6605. referencedClasses: []
  6606. }),
  6607. smalltalk.CompiledMethod);
  6608. smalltalk.addMethod(
  6609. unescape('_selector_'),
  6610. smalltalk.method({
  6611. selector: unescape('selector%3A'),
  6612. category: 'accessing',
  6613. fn: function (aString) {
  6614. var self = this;
  6615. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  6616. return self;
  6617. },
  6618. args: ["aString"],
  6619. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  6620. messageSends: ["basicAt:put:"],
  6621. referencedClasses: []
  6622. }),
  6623. smalltalk.CompiledMethod);
  6624. smalltalk.addMethod(
  6625. unescape('_source'),
  6626. smalltalk.method({
  6627. selector: unescape('source'),
  6628. category: 'accessing',
  6629. fn: function () {
  6630. var self = this;
  6631. return ($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil ||
  6632. $receiver == undefined ? function () {return "";}() : $receiver;
  6633. return self;
  6634. },
  6635. args: [],
  6636. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  6637. messageSends: ["ifNil:", "basicAt:"],
  6638. referencedClasses: []
  6639. }),
  6640. smalltalk.CompiledMethod);
  6641. smalltalk.addMethod(
  6642. unescape('_source_'),
  6643. smalltalk.method({
  6644. selector: unescape('source%3A'),
  6645. category: 'accessing',
  6646. fn: function (aString) {
  6647. var self = this;
  6648. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  6649. return self;
  6650. },
  6651. args: ["aString"],
  6652. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  6653. messageSends: ["basicAt:put:"],
  6654. referencedClasses: []
  6655. }),
  6656. smalltalk.CompiledMethod);
  6657. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  6658. smalltalk.Message.comment=unescape('Generally%2C%20the%20system%20does%20not%20use%20instances%20of%20Message%20for%20efficiency%20reasons.%0AHowever%2C%20when%20a%20message%20is%20not%20understood%20by%20its%20receiver%2C%20the%20interpreter%20will%20make%20up%20an%20instance%20of%20it%20in%20order%20to%20capture%20the%20information%20involved%20in%20an%20actual%20message%20transmission.%20%0AThis%20instance%20is%20sent%20it%20as%20an%20argument%20with%20the%20message%20%60doesNotUnderstand%3A%60%20to%20the%20receiver.%0A%0ASee%20boot.js%2C%20%60messageNotUnderstood%60%20%20and%20its%20counterpart%20%60Object%3E%3EdoesNotUnderstand%3A%60')
  6659. smalltalk.addMethod(
  6660. unescape('_arguments'),
  6661. smalltalk.method({
  6662. selector: unescape('arguments'),
  6663. category: 'accessing',
  6664. fn: function () {
  6665. var self = this;
  6666. return self['@arguments'];
  6667. return self;
  6668. },
  6669. args: [],
  6670. source: unescape('arguments%0A%09%5Earguments'),
  6671. messageSends: [],
  6672. referencedClasses: []
  6673. }),
  6674. smalltalk.Message);
  6675. smalltalk.addMethod(
  6676. unescape('_arguments_'),
  6677. smalltalk.method({
  6678. selector: unescape('arguments%3A'),
  6679. category: 'accessing',
  6680. fn: function (anArray) {
  6681. var self = this;
  6682. self['@arguments'] = anArray;
  6683. return self;
  6684. },
  6685. args: ["anArray"],
  6686. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  6687. messageSends: [],
  6688. referencedClasses: []
  6689. }),
  6690. smalltalk.Message);
  6691. smalltalk.addMethod(
  6692. unescape('_printString'),
  6693. smalltalk.method({
  6694. selector: unescape('printString'),
  6695. category: 'printing',
  6696. fn: function () {
  6697. var self = this;
  6698. return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (aStream) {return function ($rec) {smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Object)]);smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29")]);}(aStream);}]);
  6699. return self;
  6700. },
  6701. args: [],
  6702. 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%09%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%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%09%09%09nextPutAll%3A%20%27%28%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%09%09%09%09%09nextPutAll%3A%20selector%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%09%09%09nextPutAll%3A%20%27%29%27%20%09%09%09%09%5D'),
  6703. messageSends: ["streamContents:", "nextPutAll:", "printString"],
  6704. referencedClasses: ["String"]
  6705. }),
  6706. smalltalk.Message);
  6707. smalltalk.addMethod(
  6708. unescape('_selector'),
  6709. smalltalk.method({
  6710. selector: unescape('selector'),
  6711. category: 'accessing',
  6712. fn: function () {
  6713. var self = this;
  6714. return self['@selector'];
  6715. return self;
  6716. },
  6717. args: [],
  6718. source: unescape('selector%0A%09%5Eselector'),
  6719. messageSends: [],
  6720. referencedClasses: []
  6721. }),
  6722. smalltalk.Message);
  6723. smalltalk.addMethod(
  6724. unescape('_selector_'),
  6725. smalltalk.method({
  6726. selector: unescape('selector%3A'),
  6727. category: 'accessing',
  6728. fn: function (aString) {
  6729. var self = this;
  6730. self['@selector'] = aString;
  6731. return self;
  6732. },
  6733. args: ["aString"],
  6734. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  6735. messageSends: [],
  6736. referencedClasses: []
  6737. }),
  6738. smalltalk.Message);
  6739. smalltalk.addMethod(
  6740. unescape('_sendTo_'),
  6741. smalltalk.method({
  6742. selector: unescape('sendTo%3A'),
  6743. category: 'printing',
  6744. fn: function (anObject) {
  6745. var self = this;
  6746. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_send_to_arguments_", [smalltalk.send(self, "_selector", []), anObject, smalltalk.send(self, "_arguments", [])]);
  6747. return self;
  6748. },
  6749. args: ["anObject"],
  6750. source: unescape('sendTo%3A%20anObject%0A%09Smalltalk%20current%20send%3A%20self%20selector%20to%3A%20anObject%20arguments%3A%20self%20arguments'),
  6751. messageSends: ["send:to:arguments:", "current", "selector", "arguments"],
  6752. referencedClasses: ["Smalltalk"]
  6753. }),
  6754. smalltalk.Message);
  6755. smalltalk.addMethod(
  6756. unescape('_selector_arguments_'),
  6757. smalltalk.method({
  6758. selector: unescape('selector%3Aarguments%3A'),
  6759. category: 'instance creation',
  6760. fn: function (aString, anArray) {
  6761. var self = this;
  6762. return function ($rec) {smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
  6763. return self;
  6764. },
  6765. args: ["aString", "anArray"],
  6766. 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'),
  6767. messageSends: ["selector:", "arguments:", "yourself", "new"],
  6768. referencedClasses: []
  6769. }),
  6770. smalltalk.Message.klass);
  6771. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  6772. smalltalk.MethodContext.comment=unescape('MethodContext%20holds%20all%20the%20dynamic%20state%20associated%20with%20the%20execution%20of%20either%20a%20method%20activation%20resulting%20from%20a%20message%20send.%20That%20is%20used%20to%20build%20the%20call%20stack%20while%20debugging.%0A%20%20%0AMethodContext%20instances%20are%20JavaScript%20%60SmalltalkMethodContext%60%20objects%20defined%20in%20boot.js%20%0A%0ACurrent%20limitation%3A%20MethodContext%20instances%20are%20not%20created%20on%20Block%20evaluation.%20That%20means%20it%27s%20actually%20impossible%20to%20debug%20inside%20a%20Block.')
  6773. smalltalk.addMethod(
  6774. unescape('_asString'),
  6775. smalltalk.method({
  6776. selector: unescape('asString'),
  6777. category: 'accessing',
  6778. fn: function () {
  6779. var self = this;
  6780. 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", [])]);
  6781. return self;
  6782. },
  6783. args: [],
  6784. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  6785. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  6786. referencedClasses: []
  6787. }),
  6788. smalltalk.MethodContext);
  6789. smalltalk.addMethod(
  6790. unescape('_home'),
  6791. smalltalk.method({
  6792. selector: unescape('home'),
  6793. category: 'accessing',
  6794. fn: function () {
  6795. var self = this;
  6796. return self.homeContext;
  6797. return self;
  6798. },
  6799. args: [],
  6800. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  6801. messageSends: [],
  6802. referencedClasses: []
  6803. }),
  6804. smalltalk.MethodContext);
  6805. smalltalk.addMethod(
  6806. unescape('_printString'),
  6807. smalltalk.method({
  6808. selector: unescape('printString'),
  6809. category: 'accessing',
  6810. fn: function () {
  6811. var self = this;
  6812. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  6813. return self;
  6814. },
  6815. args: [],
  6816. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  6817. messageSends: [unescape("%2C"), "printString", "asString"],
  6818. referencedClasses: []
  6819. }),
  6820. smalltalk.MethodContext);
  6821. smalltalk.addMethod(
  6822. unescape('_receiver'),
  6823. smalltalk.method({
  6824. selector: unescape('receiver'),
  6825. category: 'accessing',
  6826. fn: function () {
  6827. var self = this;
  6828. return self.receiver;
  6829. return self;
  6830. },
  6831. args: [],
  6832. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  6833. messageSends: [],
  6834. referencedClasses: []
  6835. }),
  6836. smalltalk.MethodContext);
  6837. smalltalk.addMethod(
  6838. unescape('_selector'),
  6839. smalltalk.method({
  6840. selector: unescape('selector'),
  6841. category: 'accessing',
  6842. fn: function () {
  6843. var self = this;
  6844. return smalltalk.convertSelector(self.selector);
  6845. return self;
  6846. },
  6847. args: [],
  6848. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  6849. messageSends: [],
  6850. referencedClasses: []
  6851. }),
  6852. smalltalk.MethodContext);
  6853. smalltalk.addMethod(
  6854. unescape('_temps'),
  6855. smalltalk.method({
  6856. selector: unescape('temps'),
  6857. category: 'accessing',
  6858. fn: function () {
  6859. var self = this;
  6860. return self.temps;
  6861. return self;
  6862. },
  6863. args: [],
  6864. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  6865. messageSends: [],
  6866. referencedClasses: []
  6867. }),
  6868. smalltalk.MethodContext);
  6869. smalltalk.addPackage('Kernel-Collections', {});
  6870. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
  6871. smalltalk.addMethod(
  6872. unescape('__eq'),
  6873. smalltalk.method({
  6874. selector: unescape('%3D'),
  6875. category: 'comparing',
  6876. fn: function (anAssociation) {
  6877. var self=this;
  6878. 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", [])]);})]);})]);
  6879. return self;},
  6880. args: ["anAssociation"],
  6881. 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'),
  6882. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  6883. referencedClasses: []
  6884. }),
  6885. smalltalk.Association);
  6886. smalltalk.addMethod(
  6887. unescape('_key'),
  6888. smalltalk.method({
  6889. selector: unescape('key'),
  6890. category: 'accessing',
  6891. fn: function () {
  6892. var self=this;
  6893. return self['@key'];
  6894. return self;},
  6895. args: [],
  6896. source: unescape('key%0A%09%5Ekey'),
  6897. messageSends: [],
  6898. referencedClasses: []
  6899. }),
  6900. smalltalk.Association);
  6901. smalltalk.addMethod(
  6902. unescape('_key_'),
  6903. smalltalk.method({
  6904. selector: unescape('key%3A'),
  6905. category: 'accessing',
  6906. fn: function (aKey) {
  6907. var self=this;
  6908. (self['@key']=aKey);
  6909. return self;},
  6910. args: ["aKey"],
  6911. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  6912. messageSends: [],
  6913. referencedClasses: []
  6914. }),
  6915. smalltalk.Association);
  6916. smalltalk.addMethod(
  6917. unescape('_storeOn_'),
  6918. smalltalk.method({
  6919. selector: unescape('storeOn%3A'),
  6920. category: 'comparing',
  6921. fn: function (aStream) {
  6922. var self=this;
  6923. smalltalk.send(self['@key'], "_storeOn_", [aStream]);
  6924. smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
  6925. smalltalk.send(self['@value'], "_storeOn_", [aStream]);
  6926. return self;},
  6927. args: ["aStream"],
  6928. source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
  6929. messageSends: ["storeOn:", "nextPutAll:"],
  6930. referencedClasses: []
  6931. }),
  6932. smalltalk.Association);
  6933. smalltalk.addMethod(
  6934. unescape('_value'),
  6935. smalltalk.method({
  6936. selector: unescape('value'),
  6937. category: 'accessing',
  6938. fn: function () {
  6939. var self=this;
  6940. return self['@value'];
  6941. return self;},
  6942. args: [],
  6943. source: unescape('value%0A%09%5Evalue'),
  6944. messageSends: [],
  6945. referencedClasses: []
  6946. }),
  6947. smalltalk.Association);
  6948. smalltalk.addMethod(
  6949. unescape('_value_'),
  6950. smalltalk.method({
  6951. selector: unescape('value%3A'),
  6952. category: 'accessing',
  6953. fn: function (aValue) {
  6954. var self=this;
  6955. (self['@value']=aValue);
  6956. return self;},
  6957. args: ["aValue"],
  6958. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  6959. messageSends: [],
  6960. referencedClasses: []
  6961. }),
  6962. smalltalk.Association);
  6963. smalltalk.addMethod(
  6964. unescape('_key_value_'),
  6965. smalltalk.method({
  6966. selector: unescape('key%3Avalue%3A'),
  6967. category: 'instance creation',
  6968. fn: function (aKey, aValue) {
  6969. var self=this;
  6970. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6971. return self;},
  6972. args: ["aKey", "aValue"],
  6973. 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'),
  6974. messageSends: ["key:", "value:", "yourself", "new"],
  6975. referencedClasses: []
  6976. }),
  6977. smalltalk.Association.klass);
  6978. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel-Collections');
  6979. smalltalk.addMethod(
  6980. unescape('__comma'),
  6981. smalltalk.method({
  6982. selector: unescape('%2C'),
  6983. category: 'copying',
  6984. fn: function (aCollection) {
  6985. var self=this;
  6986. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  6987. return self;},
  6988. args: ["aCollection"],
  6989. 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'),
  6990. messageSends: ["addAll:", "yourself", "copy"],
  6991. referencedClasses: []
  6992. }),
  6993. smalltalk.Collection);
  6994. smalltalk.addMethod(
  6995. unescape('_add_'),
  6996. smalltalk.method({
  6997. selector: unescape('add%3A'),
  6998. category: 'adding/removing',
  6999. fn: function (anObject) {
  7000. var self=this;
  7001. smalltalk.send(self, "_subclassResponsibility", []);
  7002. return self;},
  7003. args: ["anObject"],
  7004. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  7005. messageSends: ["subclassResponsibility"],
  7006. referencedClasses: []
  7007. }),
  7008. smalltalk.Collection);
  7009. smalltalk.addMethod(
  7010. unescape('_addAll_'),
  7011. smalltalk.method({
  7012. selector: unescape('addAll%3A'),
  7013. category: 'adding/removing',
  7014. fn: function (aCollection) {
  7015. var self=this;
  7016. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  7017. return aCollection;
  7018. return self;},
  7019. args: ["aCollection"],
  7020. 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'),
  7021. messageSends: ["do:", "add:"],
  7022. referencedClasses: []
  7023. }),
  7024. smalltalk.Collection);
  7025. smalltalk.addMethod(
  7026. unescape('_asArray'),
  7027. smalltalk.method({
  7028. selector: unescape('asArray'),
  7029. category: 'converting',
  7030. fn: function () {
  7031. var self=this;
  7032. return smalltalk.send((smalltalk.Array || Array), "_withAll_", [self]);
  7033. return self;},
  7034. args: [],
  7035. source: unescape('asArray%0A%09%5EArray%20withAll%3A%20self'),
  7036. messageSends: ["withAll:"],
  7037. referencedClasses: ["Array"]
  7038. }),
  7039. smalltalk.Collection);
  7040. smalltalk.addMethod(
  7041. unescape('_asJSON'),
  7042. smalltalk.method({
  7043. selector: unescape('asJSON'),
  7044. category: 'converting',
  7045. fn: function (){
  7046. var self=this;
  7047. return smalltalk.send(smalltalk.send(self, "_asArray", []), "_collect_", [(function(each){return smalltalk.send(each, "_asJSON", []);})]);
  7048. return self;},
  7049. args: [],
  7050. source: unescape('asJSON%0A%09%5Eself%20asArray%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSON%5D'),
  7051. messageSends: ["collect:", "asArray", "asJSON"],
  7052. referencedClasses: []
  7053. }),
  7054. smalltalk.Collection);
  7055. smalltalk.addMethod(
  7056. unescape('_asOrderedCollection'),
  7057. smalltalk.method({
  7058. selector: unescape('asOrderedCollection'),
  7059. category: 'converting',
  7060. fn: function () {
  7061. var self=this;
  7062. return smalltalk.send(self, "_asArray", []);
  7063. return self;},
  7064. args: [],
  7065. source: unescape('asOrderedCollection%0A%09%5Eself%20asArray'),
  7066. messageSends: ["asArray"],
  7067. referencedClasses: []
  7068. }),
  7069. smalltalk.Collection);
  7070. smalltalk.addMethod(
  7071. unescape('_asSet'),
  7072. smalltalk.method({
  7073. selector: unescape('asSet'),
  7074. category: 'converting',
  7075. fn: function () {
  7076. var self=this;
  7077. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  7078. return self;},
  7079. args: [],
  7080. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  7081. messageSends: ["withAll:"],
  7082. referencedClasses: ["Set"]
  7083. }),
  7084. smalltalk.Collection);
  7085. smalltalk.addMethod(
  7086. unescape('_collect_'),
  7087. smalltalk.method({
  7088. selector: unescape('collect%3A'),
  7089. category: 'enumerating',
  7090. fn: function (aBlock) {
  7091. var self=this;
  7092. var newCollection=nil;
  7093. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  7094. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  7095. return newCollection;
  7096. return self;},
  7097. args: ["aBlock"],
  7098. 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'),
  7099. messageSends: ["new", "class", "do:", "add:", "value:"],
  7100. referencedClasses: []
  7101. }),
  7102. smalltalk.Collection);
  7103. smalltalk.addMethod(
  7104. unescape('_copyWith_'),
  7105. smalltalk.method({
  7106. selector: unescape('copyWith%3A'),
  7107. category: 'copying',
  7108. fn: function (anObject) {
  7109. var self=this;
  7110. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  7111. return self;},
  7112. args: ["anObject"],
  7113. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  7114. messageSends: ["add:", "yourself", "copy"],
  7115. referencedClasses: []
  7116. }),
  7117. smalltalk.Collection);
  7118. smalltalk.addMethod(
  7119. unescape('_copyWithAll_'),
  7120. smalltalk.method({
  7121. selector: unescape('copyWithAll%3A'),
  7122. category: 'copying',
  7123. fn: function (aCollection) {
  7124. var self=this;
  7125. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  7126. return self;},
  7127. args: ["aCollection"],
  7128. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  7129. messageSends: ["addAll:", "yourself", "copy"],
  7130. referencedClasses: []
  7131. }),
  7132. smalltalk.Collection);
  7133. smalltalk.addMethod(
  7134. unescape('_copyWithoutAll_'),
  7135. smalltalk.method({
  7136. selector: unescape('copyWithoutAll%3A'),
  7137. category: 'copying',
  7138. fn: function (aCollection) {
  7139. var self=this;
  7140. return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
  7141. return self;},
  7142. args: ["aCollection"],
  7143. source: unescape('copyWithoutAll%3A%20aCollection%0A%09%22Answer%20a%20copy%20of%20the%20receiver%20that%20does%20not%20contain%20any%20elements%20%0A%09equal%20to%20those%20in%20aCollection.%22%0A%0A%09%5E%20self%20reject%3A%20%5B%3Aeach%20%7C%20aCollection%20includes%3A%20each%5D'),
  7144. messageSends: ["reject:", "includes:"],
  7145. referencedClasses: []
  7146. }),
  7147. smalltalk.Collection);
  7148. smalltalk.addMethod(
  7149. unescape('_detect_'),
  7150. smalltalk.method({
  7151. selector: unescape('detect%3A'),
  7152. category: 'enumerating',
  7153. fn: function (aBlock) {
  7154. var self=this;
  7155. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  7156. return self;},
  7157. args: ["aBlock"],
  7158. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  7159. messageSends: ["detect:ifNone:", "errorNotFound"],
  7160. referencedClasses: []
  7161. }),
  7162. smalltalk.Collection);
  7163. smalltalk.addMethod(
  7164. unescape('_detect_ifNone_'),
  7165. smalltalk.method({
  7166. selector: unescape('detect%3AifNone%3A'),
  7167. category: 'enumerating',
  7168. fn: function (aBlock, anotherBlock) {
  7169. var self=this;
  7170. for(var i = 0; i < self.length; i++)
  7171. if(aBlock(self[i]))
  7172. return self[i];
  7173. return anotherBlock();
  7174. ;
  7175. return self;},
  7176. args: ["aBlock", "anotherBlock"],
  7177. 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'),
  7178. messageSends: [],
  7179. referencedClasses: []
  7180. }),
  7181. smalltalk.Collection);
  7182. smalltalk.addMethod(
  7183. unescape('_do_'),
  7184. smalltalk.method({
  7185. selector: unescape('do%3A'),
  7186. category: 'enumerating',
  7187. fn: function (aBlock) {
  7188. var self=this;
  7189. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  7190. return self;},
  7191. args: ["aBlock"],
  7192. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  7193. messageSends: [],
  7194. referencedClasses: []
  7195. }),
  7196. smalltalk.Collection);
  7197. smalltalk.addMethod(
  7198. unescape('_do_separatedBy_'),
  7199. smalltalk.method({
  7200. selector: unescape('do%3AseparatedBy%3A'),
  7201. category: 'enumerating',
  7202. fn: function (aBlock, anotherBlock) {
  7203. var self=this;
  7204. var first=nil;
  7205. (first=true);
  7206. 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]);})]);
  7207. return self;},
  7208. args: ["aBlock", "anotherBlock"],
  7209. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%09%7C%20first%20%7C%0A%09first%20%3A%3D%20true.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20first%0A%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  7210. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  7211. referencedClasses: []
  7212. }),
  7213. smalltalk.Collection);
  7214. smalltalk.addMethod(
  7215. unescape('_errorNotFound'),
  7216. smalltalk.method({
  7217. selector: unescape('errorNotFound'),
  7218. category: 'error handling',
  7219. fn: function () {
  7220. var self=this;
  7221. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  7222. return self;},
  7223. args: [],
  7224. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  7225. messageSends: ["error:"],
  7226. referencedClasses: []
  7227. }),
  7228. smalltalk.Collection);
  7229. smalltalk.addMethod(
  7230. unescape('_ifEmpty_'),
  7231. smalltalk.method({
  7232. selector: unescape('ifEmpty%3A'),
  7233. category: 'testing',
  7234. fn: function (aBlock){
  7235. var self=this;
  7236. return ((($receiver = smalltalk.send(self, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return self;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return self;})]));
  7237. return self;},
  7238. args: ["aBlock"],
  7239. source: unescape('ifEmpty%3A%20aBlock%0A%09%22Evaluate%20the%20given%20block%20with%20the%20receiver%20as%20argument%2C%20answering%20its%20value%20if%20the%20receiver%20is%20empty%2C%20otherwise%20answer%20the%20receiver.%20Note%20that%20the%20fact%20that%20this%20method%20returns%20its%20argument%20in%20case%20the%20receiver%20is%20not%20empty%20allows%20one%20to%20write%20expressions%20like%20the%20following%20ones%3A%20self%20classifyMethodAs%3A%20%0A%09%09%28myProtocol%20ifEmpty%3A%20%5B%27As%20yet%20unclassified%27%5D%29%22%0A%09%5E%20self%20isEmpty%20%0A%09%09ifTrue%3A%20%5B%20aBlock%20value%20%5D%0A%09%09ifFalse%3A%20%5B%20self%20%5D'),
  7240. messageSends: ["ifTrue:ifFalse:", "isEmpty", "value"],
  7241. referencedClasses: []
  7242. }),
  7243. smalltalk.Collection);
  7244. smalltalk.addMethod(
  7245. unescape('_ifNotEmpty_'),
  7246. smalltalk.method({
  7247. selector: unescape('ifNotEmpty%3A'),
  7248. category: 'testing',
  7249. fn: function (aBlock) {
  7250. var self=this;
  7251. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  7252. return self;},
  7253. args: ["aBlock"],
  7254. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  7255. messageSends: ["ifTrue:", "notEmpty"],
  7256. referencedClasses: []
  7257. }),
  7258. smalltalk.Collection);
  7259. smalltalk.addMethod(
  7260. unescape('_includes_'),
  7261. smalltalk.method({
  7262. selector: unescape('includes%3A'),
  7263. category: 'testing',
  7264. fn: function (anObject) {
  7265. var self=this;
  7266. var i = self.length;
  7267. while (i--) {
  7268. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  7269. }
  7270. return false
  7271. ;
  7272. return self;},
  7273. args: ["anObject"],
  7274. 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'),
  7275. messageSends: [],
  7276. referencedClasses: []
  7277. }),
  7278. smalltalk.Collection);
  7279. smalltalk.addMethod(
  7280. unescape('_inject_into_'),
  7281. smalltalk.method({
  7282. selector: unescape('inject%3Ainto%3A'),
  7283. category: 'enumerating',
  7284. fn: function (anObject, aBlock) {
  7285. var self=this;
  7286. var result=nil;
  7287. (result=anObject);
  7288. smalltalk.send(self, "_do_", [(function(each){return (result=smalltalk.send(aBlock, "_value_value_", [result, each]));})]);
  7289. return result;
  7290. return self;},
  7291. args: ["anObject", "aBlock"],
  7292. 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'),
  7293. messageSends: ["do:", "value:value:"],
  7294. referencedClasses: []
  7295. }),
  7296. smalltalk.Collection);
  7297. smalltalk.addMethod(
  7298. unescape('_isEmpty'),
  7299. smalltalk.method({
  7300. selector: unescape('isEmpty'),
  7301. category: 'testing',
  7302. fn: function () {
  7303. var self=this;
  7304. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  7305. return self;},
  7306. args: [],
  7307. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  7308. messageSends: [unescape("%3D"), "size"],
  7309. referencedClasses: []
  7310. }),
  7311. smalltalk.Collection);
  7312. smalltalk.addMethod(
  7313. unescape('_notEmpty'),
  7314. smalltalk.method({
  7315. selector: unescape('notEmpty'),
  7316. category: 'testing',
  7317. fn: function () {
  7318. var self=this;
  7319. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  7320. return self;},
  7321. args: [],
  7322. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  7323. messageSends: ["not", "isEmpty"],
  7324. referencedClasses: []
  7325. }),
  7326. smalltalk.Collection);
  7327. smalltalk.addMethod(
  7328. unescape('_readStream'),
  7329. smalltalk.method({
  7330. selector: unescape('readStream'),
  7331. category: 'accessing',
  7332. fn: function () {
  7333. var self=this;
  7334. return smalltalk.send(self, "_stream", []);
  7335. return self;},
  7336. args: [],
  7337. source: unescape('readStream%0A%09%5Eself%20stream'),
  7338. messageSends: ["stream"],
  7339. referencedClasses: []
  7340. }),
  7341. smalltalk.Collection);
  7342. smalltalk.addMethod(
  7343. unescape('_reject_'),
  7344. smalltalk.method({
  7345. selector: unescape('reject%3A'),
  7346. category: 'enumerating',
  7347. fn: function (aBlock) {
  7348. var self=this;
  7349. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  7350. return self;},
  7351. args: ["aBlock"],
  7352. 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'),
  7353. messageSends: ["select:", unescape("%3D"), "value:"],
  7354. referencedClasses: []
  7355. }),
  7356. smalltalk.Collection);
  7357. smalltalk.addMethod(
  7358. unescape('_remove_'),
  7359. smalltalk.method({
  7360. selector: unescape('remove%3A'),
  7361. category: 'adding/removing',
  7362. fn: function (anObject) {
  7363. var self=this;
  7364. return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  7365. return self;},
  7366. args: ["anObject"],
  7367. source: unescape('remove%3A%20anObject%0A%20%20%20%20%5Eself%20remove%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  7368. messageSends: ["remove:ifAbsent:", "errorNotFound"],
  7369. referencedClasses: []
  7370. }),
  7371. smalltalk.Collection);
  7372. smalltalk.addMethod(
  7373. unescape('_remove_ifAbsent_'),
  7374. smalltalk.method({
  7375. selector: unescape('remove%3AifAbsent%3A'),
  7376. category: 'adding/removing',
  7377. fn: function (anObject, aBlock) {
  7378. var self=this;
  7379. smalltalk.send(self, "_subclassResponsibility", []);
  7380. return self;},
  7381. args: ["anObject", "aBlock"],
  7382. source: unescape('remove%3A%20anObject%20ifAbsent%3A%20aBlock%0A%20%20%20%20self%20subclassResponsibility'),
  7383. messageSends: ["subclassResponsibility"],
  7384. referencedClasses: []
  7385. }),
  7386. smalltalk.Collection);
  7387. smalltalk.addMethod(
  7388. unescape('_select_'),
  7389. smalltalk.method({
  7390. selector: unescape('select%3A'),
  7391. category: 'enumerating',
  7392. fn: function (aBlock) {
  7393. var self=this;
  7394. var stream=nil;
  7395. (stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []));
  7396. 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]);})]));})]);
  7397. return smalltalk.send(stream, "_contents", []);
  7398. return self;},
  7399. args: ["aBlock"],
  7400. 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'),
  7401. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  7402. referencedClasses: []
  7403. }),
  7404. smalltalk.Collection);
  7405. smalltalk.addMethod(
  7406. unescape('_size'),
  7407. smalltalk.method({
  7408. selector: unescape('size'),
  7409. category: 'accessing',
  7410. fn: function () {
  7411. var self=this;
  7412. smalltalk.send(self, "_subclassResponsibility", []);
  7413. return self;},
  7414. args: [],
  7415. source: unescape('size%0A%09self%20subclassResponsibility'),
  7416. messageSends: ["subclassResponsibility"],
  7417. referencedClasses: []
  7418. }),
  7419. smalltalk.Collection);
  7420. smalltalk.addMethod(
  7421. unescape('_stream'),
  7422. smalltalk.method({
  7423. selector: unescape('stream'),
  7424. category: 'accessing',
  7425. fn: function () {
  7426. var self=this;
  7427. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  7428. return self;},
  7429. args: [],
  7430. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  7431. messageSends: ["on:", "streamClass"],
  7432. referencedClasses: []
  7433. }),
  7434. smalltalk.Collection);
  7435. smalltalk.addMethod(
  7436. unescape('_streamClass'),
  7437. smalltalk.method({
  7438. selector: unescape('streamClass'),
  7439. category: 'accessing',
  7440. fn: function () {
  7441. var self=this;
  7442. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  7443. return self;},
  7444. args: [],
  7445. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  7446. messageSends: ["streamClass", "class"],
  7447. referencedClasses: []
  7448. }),
  7449. smalltalk.Collection);
  7450. smalltalk.addMethod(
  7451. unescape('_writeStream'),
  7452. smalltalk.method({
  7453. selector: unescape('writeStream'),
  7454. category: 'accessing',
  7455. fn: function () {
  7456. var self=this;
  7457. return smalltalk.send(self, "_stream", []);
  7458. return self;},
  7459. args: [],
  7460. source: unescape('writeStream%0A%09%5Eself%20stream'),
  7461. messageSends: ["stream"],
  7462. referencedClasses: []
  7463. }),
  7464. smalltalk.Collection);
  7465. smalltalk.addMethod(
  7466. unescape('_new_'),
  7467. smalltalk.method({
  7468. selector: unescape('new%3A'),
  7469. category: 'instance creation',
  7470. fn: function (anInteger) {
  7471. var self=this;
  7472. return smalltalk.send(self, "_new", []);
  7473. return self;},
  7474. args: ["anInteger"],
  7475. source: unescape('new%3A%20anInteger%0A%09%5Eself%20new'),
  7476. messageSends: ["new"],
  7477. referencedClasses: []
  7478. }),
  7479. smalltalk.Collection.klass);
  7480. smalltalk.addMethod(
  7481. unescape('_streamClass'),
  7482. smalltalk.method({
  7483. selector: unescape('streamClass'),
  7484. category: 'accessing',
  7485. fn: function () {
  7486. var self=this;
  7487. return (smalltalk.Stream || Stream);
  7488. return self;},
  7489. args: [],
  7490. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  7491. messageSends: [],
  7492. referencedClasses: ["Stream"]
  7493. }),
  7494. smalltalk.Collection.klass);
  7495. smalltalk.addMethod(
  7496. unescape('_with_'),
  7497. smalltalk.method({
  7498. selector: unescape('with%3A'),
  7499. category: 'instance creation',
  7500. fn: function (anObject) {
  7501. var self=this;
  7502. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7503. return self;},
  7504. args: ["anObject"],
  7505. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  7506. messageSends: ["add:", "yourself", "new"],
  7507. referencedClasses: []
  7508. }),
  7509. smalltalk.Collection.klass);
  7510. smalltalk.addMethod(
  7511. unescape('_with_with_'),
  7512. smalltalk.method({
  7513. selector: unescape('with%3Awith%3A'),
  7514. category: 'instance creation',
  7515. fn: function (anObject, anotherObject) {
  7516. var self=this;
  7517. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7518. return self;},
  7519. args: ["anObject", "anotherObject"],
  7520. 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'),
  7521. messageSends: ["add:", "yourself", "new"],
  7522. referencedClasses: []
  7523. }),
  7524. smalltalk.Collection.klass);
  7525. smalltalk.addMethod(
  7526. unescape('_with_with_with_'),
  7527. smalltalk.method({
  7528. selector: unescape('with%3Awith%3Awith%3A'),
  7529. category: 'instance creation',
  7530. fn: function (firstObject, secondObject, thirdObject) {
  7531. var self=this;
  7532. 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", []));
  7533. return self;},
  7534. args: ["firstObject", "secondObject", "thirdObject"],
  7535. 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'),
  7536. messageSends: ["add:", "yourself", "new"],
  7537. referencedClasses: []
  7538. }),
  7539. smalltalk.Collection.klass);
  7540. smalltalk.addMethod(
  7541. unescape('_withAll_'),
  7542. smalltalk.method({
  7543. selector: unescape('withAll%3A'),
  7544. category: 'instance creation',
  7545. fn: function (aCollection) {
  7546. var self=this;
  7547. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7548. return self;},
  7549. args: ["aCollection"],
  7550. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  7551. messageSends: ["addAll:", "yourself", "new"],
  7552. referencedClasses: []
  7553. }),
  7554. smalltalk.Collection.klass);
  7555. smalltalk.addClass('HashedCollection', smalltalk.Collection, [], 'Kernel-Collections');
  7556. smalltalk.HashedCollection.comment=unescape('A%20HashedCollection%20is%20a%20traditional%20JavaScript%20object%2C%20or%20a%20Smalltalk%20Dictionary.%0A%0AUnlike%20a%20Dictionary%2C%20it%20can%20only%20have%20strings%20as%20keys.')
  7557. smalltalk.addMethod(
  7558. unescape('__comma'),
  7559. smalltalk.method({
  7560. selector: unescape('%2C'),
  7561. category: 'copying',
  7562. fn: function (aCollection) {
  7563. var self=this;
  7564. smalltalk.send(self, "_shouldNotImplement", []);
  7565. return self;},
  7566. args: ["aCollection"],
  7567. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  7568. messageSends: ["shouldNotImplement"],
  7569. referencedClasses: []
  7570. }),
  7571. smalltalk.HashedCollection);
  7572. smalltalk.addMethod(
  7573. unescape('__eq'),
  7574. smalltalk.method({
  7575. selector: unescape('%3D'),
  7576. category: 'comparing',
  7577. fn: function (aHashedCollection) {
  7578. var self=this;
  7579. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aHashedCollection, "_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}})})();})]));
  7580. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aHashedCollection, "_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}})})();})]));
  7581. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aHashedCollection, "_associations", [])])}})})();
  7582. return self;
  7583. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  7584. args: ["aHashedCollection"],
  7585. source: unescape('%3D%20aHashedCollection%0A%09self%20class%20%3D%20aHashedCollection%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aHashedCollection%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aHashedCollection%20associations'),
  7586. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  7587. referencedClasses: []
  7588. }),
  7589. smalltalk.HashedCollection);
  7590. smalltalk.addMethod(
  7591. unescape('_add_'),
  7592. smalltalk.method({
  7593. selector: unescape('add%3A'),
  7594. category: 'adding/removing',
  7595. fn: function (anAssociation) {
  7596. var self=this;
  7597. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  7598. return self;},
  7599. args: ["anAssociation"],
  7600. source: unescape('add%3A%20anAssociation%0A%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  7601. messageSends: ["at:put:", "key", "value"],
  7602. referencedClasses: []
  7603. }),
  7604. smalltalk.HashedCollection);
  7605. smalltalk.addMethod(
  7606. unescape('_addAll_'),
  7607. smalltalk.method({
  7608. selector: unescape('addAll%3A'),
  7609. category: 'adding/removing',
  7610. fn: function (aHashedCollection) {
  7611. var self=this;
  7612. smalltalk.send(self, "_addAll_", [smalltalk.send(aHashedCollection, "_associations", [])], smalltalk.Collection);
  7613. return aHashedCollection;
  7614. return self;},
  7615. args: ["aHashedCollection"],
  7616. source: unescape('addAll%3A%20aHashedCollection%0A%09super%20addAll%3A%20aHashedCollection%20associations.%0A%09%5EaHashedCollection'),
  7617. messageSends: ["addAll:", "associations"],
  7618. referencedClasses: []
  7619. }),
  7620. smalltalk.HashedCollection);
  7621. smalltalk.addMethod(
  7622. unescape('_asDictionary'),
  7623. smalltalk.method({
  7624. selector: unescape('asDictionary'),
  7625. category: 'converting',
  7626. fn: function () {
  7627. var self=this;
  7628. return smalltalk.send((smalltalk.Dictionary || Dictionary), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
  7629. return self;},
  7630. args: [],
  7631. source: unescape('asDictionary%0A%09%5EDictionary%20fromPairs%3A%20self%20associations'),
  7632. messageSends: ["fromPairs:", "associations"],
  7633. referencedClasses: ["Dictionary"]
  7634. }),
  7635. smalltalk.HashedCollection);
  7636. smalltalk.addMethod(
  7637. unescape('_asJSON'),
  7638. smalltalk.method({
  7639. selector: unescape('asJSON'),
  7640. category: 'converting',
  7641. fn: function (){
  7642. var self=this;
  7643. var c=nil;
  7644. (c=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  7645. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(c, "_at_put_", [key, smalltalk.send(value, "_asJSON", [])]);})]);
  7646. return c;
  7647. return self;},
  7648. args: [],
  7649. source: unescape('asJSON%0A%09%7C%20c%20%7C%0A%09c%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09c%20at%3A%20key%20put%3A%20value%20asJSON%5D.%0A%09%5Ec'),
  7650. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "asJSON"],
  7651. referencedClasses: []
  7652. }),
  7653. smalltalk.HashedCollection);
  7654. smalltalk.addMethod(
  7655. unescape('_associations'),
  7656. smalltalk.method({
  7657. selector: unescape('associations'),
  7658. category: 'accessing',
  7659. fn: function () {
  7660. var self=this;
  7661. var associations=nil;
  7662. (associations=[]);
  7663. smalltalk.send(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])])]);})]);
  7664. return associations;
  7665. return self;},
  7666. args: [],
  7667. source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09self%20keys%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'),
  7668. messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
  7669. referencedClasses: ["Association"]
  7670. }),
  7671. smalltalk.HashedCollection);
  7672. smalltalk.addMethod(
  7673. unescape('_associationsDo_'),
  7674. smalltalk.method({
  7675. selector: unescape('associationsDo%3A'),
  7676. category: 'enumerating',
  7677. fn: function (aBlock) {
  7678. var self=this;
  7679. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  7680. return self;},
  7681. args: ["aBlock"],
  7682. source: unescape('associationsDo%3A%20aBlock%0A%09self%20associations%20do%3A%20aBlock'),
  7683. messageSends: ["do:", "associations"],
  7684. referencedClasses: []
  7685. }),
  7686. smalltalk.HashedCollection);
  7687. smalltalk.addMethod(
  7688. unescape('_at_'),
  7689. smalltalk.method({
  7690. selector: unescape('at%3A'),
  7691. category: 'accessing',
  7692. fn: function (aKey) {
  7693. var self=this;
  7694. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  7695. return self;},
  7696. args: ["aKey"],
  7697. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  7698. messageSends: ["at:ifAbsent:", "errorNotFound"],
  7699. referencedClasses: []
  7700. }),
  7701. smalltalk.HashedCollection);
  7702. smalltalk.addMethod(
  7703. unescape('_at_ifAbsent_'),
  7704. smalltalk.method({
  7705. selector: unescape('at%3AifAbsent%3A'),
  7706. category: 'accessing',
  7707. fn: function (aKey, aBlock) {
  7708. var self=this;
  7709. return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  7710. return self;},
  7711. args: ["aKey", "aBlock"],
  7712. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
  7713. messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
  7714. referencedClasses: []
  7715. }),
  7716. smalltalk.HashedCollection);
  7717. smalltalk.addMethod(
  7718. unescape('_at_ifAbsentPut_'),
  7719. smalltalk.method({
  7720. selector: unescape('at%3AifAbsentPut%3A'),
  7721. category: 'accessing',
  7722. fn: function (aKey, aBlock) {
  7723. var self=this;
  7724. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  7725. return self;},
  7726. args: ["aKey", "aBlock"],
  7727. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  7728. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  7729. referencedClasses: []
  7730. }),
  7731. smalltalk.HashedCollection);
  7732. smalltalk.addMethod(
  7733. unescape('_at_ifPresent_'),
  7734. smalltalk.method({
  7735. selector: unescape('at%3AifPresent%3A'),
  7736. category: 'accessing',
  7737. fn: function (aKey, aBlock) {
  7738. var self=this;
  7739. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  7740. return self;},
  7741. args: ["aKey", "aBlock"],
  7742. 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'),
  7743. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  7744. referencedClasses: []
  7745. }),
  7746. smalltalk.HashedCollection);
  7747. smalltalk.addMethod(
  7748. unescape('_at_ifPresent_ifAbsent_'),
  7749. smalltalk.method({
  7750. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  7751. category: 'accessing',
  7752. fn: function (aKey, aBlock, anotherBlock) {
  7753. var self=this;
  7754. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  7755. return self;},
  7756. args: ["aKey", "aBlock", "anotherBlock"],
  7757. 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'),
  7758. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  7759. referencedClasses: []
  7760. }),
  7761. smalltalk.HashedCollection);
  7762. smalltalk.addMethod(
  7763. unescape('_at_put_'),
  7764. smalltalk.method({
  7765. selector: unescape('at%3Aput%3A'),
  7766. category: 'accessing',
  7767. fn: function (aKey, aValue) {
  7768. var self=this;
  7769. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  7770. return self;},
  7771. args: ["aKey", "aValue"],
  7772. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  7773. messageSends: ["basicAt:put:"],
  7774. referencedClasses: []
  7775. }),
  7776. smalltalk.HashedCollection);
  7777. smalltalk.addMethod(
  7778. unescape('_collect_'),
  7779. smalltalk.method({
  7780. selector: unescape('collect%3A'),
  7781. category: 'enumerating',
  7782. fn: function (aBlock) {
  7783. var self=this;
  7784. var newDict=nil;
  7785. (newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  7786. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  7787. return newDict;
  7788. return self;},
  7789. args: ["aBlock"],
  7790. source: unescape('collect%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%09%5EnewDict'),
  7791. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  7792. referencedClasses: []
  7793. }),
  7794. smalltalk.HashedCollection);
  7795. smalltalk.addMethod(
  7796. unescape('_copyFrom_to_'),
  7797. smalltalk.method({
  7798. selector: unescape('copyFrom%3Ato%3A'),
  7799. category: 'copying',
  7800. fn: function (anIndex, anotherIndex) {
  7801. var self=this;
  7802. smalltalk.send(self, "_shouldNotImplement", []);
  7803. return self;},
  7804. args: ["anIndex", "anotherIndex"],
  7805. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  7806. messageSends: ["shouldNotImplement"],
  7807. referencedClasses: []
  7808. }),
  7809. smalltalk.HashedCollection);
  7810. smalltalk.addMethod(
  7811. unescape('_deepCopy'),
  7812. smalltalk.method({
  7813. selector: unescape('deepCopy'),
  7814. category: 'copying',
  7815. fn: function () {
  7816. var self=this;
  7817. var copy=nil;
  7818. (copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  7819. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(smalltalk.send(each, "_value", []), "_deepCopy", [])]);})]);
  7820. return copy;
  7821. return self;},
  7822. args: [],
  7823. source: unescape('deepCopy%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%20deepCopy%5D.%0A%09%5Ecopy'),
  7824. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "deepCopy", "value"],
  7825. referencedClasses: []
  7826. }),
  7827. smalltalk.HashedCollection);
  7828. smalltalk.addMethod(
  7829. unescape('_detect_ifNone_'),
  7830. smalltalk.method({
  7831. selector: unescape('detect%3AifNone%3A'),
  7832. category: 'enumerating',
  7833. fn: function (aBlock, anotherBlock) {
  7834. var self=this;
  7835. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  7836. return self;},
  7837. args: ["aBlock", "anotherBlock"],
  7838. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  7839. messageSends: ["detect:ifNone:", "values"],
  7840. referencedClasses: []
  7841. }),
  7842. smalltalk.HashedCollection);
  7843. smalltalk.addMethod(
  7844. unescape('_do_'),
  7845. smalltalk.method({
  7846. selector: unescape('do%3A'),
  7847. category: 'enumerating',
  7848. fn: function (aBlock) {
  7849. var self=this;
  7850. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  7851. return self;},
  7852. args: ["aBlock"],
  7853. source: unescape('do%3A%20aBlock%0A%09self%20values%20do%3A%20aBlock'),
  7854. messageSends: ["do:", "values"],
  7855. referencedClasses: []
  7856. }),
  7857. smalltalk.HashedCollection);
  7858. smalltalk.addMethod(
  7859. unescape('_includes_'),
  7860. smalltalk.method({
  7861. selector: unescape('includes%3A'),
  7862. category: 'enumerating',
  7863. fn: function (anObject) {
  7864. var self=this;
  7865. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  7866. return self;},
  7867. args: ["anObject"],
  7868. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  7869. messageSends: ["includes:", "values"],
  7870. referencedClasses: []
  7871. }),
  7872. smalltalk.HashedCollection);
  7873. smalltalk.addMethod(
  7874. unescape('_includesKey_'),
  7875. smalltalk.method({
  7876. selector: unescape('includesKey%3A'),
  7877. category: 'testing',
  7878. fn: function (aKey) {
  7879. var self=this;
  7880. return self.hasOwnProperty(aKey);
  7881. return self;},
  7882. args: ["aKey"],
  7883. source: unescape('includesKey%3A%20aKey%0A%09%3Creturn%20self.hasOwnProperty%28aKey%29%3E'),
  7884. messageSends: [],
  7885. referencedClasses: []
  7886. }),
  7887. smalltalk.HashedCollection);
  7888. smalltalk.addMethod(
  7889. unescape('_keys'),
  7890. smalltalk.method({
  7891. selector: unescape('keys'),
  7892. category: 'accessing',
  7893. fn: function () {
  7894. var self=this;
  7895. var keys = [];
  7896. for(var i in self) {
  7897. if(self.hasOwnProperty(i)) {
  7898. keys.push(i);
  7899. }
  7900. };
  7901. return keys;
  7902. ;
  7903. return self;},
  7904. args: [],
  7905. source: unescape('keys%0A%09%3C%0A%09%09var%20keys%20%3D%20%5B%5D%3B%0A%09%09for%28var%20i%20in%20self%29%20%7B%0A%09%09%09if%28self.hasOwnProperty%28i%29%29%20%7B%0A%09%09%09%09keys.push%28i%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09return%20keys%3B%0A%09%3E'),
  7906. messageSends: [],
  7907. referencedClasses: []
  7908. }),
  7909. smalltalk.HashedCollection);
  7910. smalltalk.addMethod(
  7911. unescape('_keysAndValuesDo_'),
  7912. smalltalk.method({
  7913. selector: unescape('keysAndValuesDo%3A'),
  7914. category: 'enumerating',
  7915. fn: function (aBlock) {
  7916. var self=this;
  7917. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  7918. return self;},
  7919. args: ["aBlock"],
  7920. source: unescape('keysAndValuesDo%3A%20aBlock%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  7921. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  7922. referencedClasses: []
  7923. }),
  7924. smalltalk.HashedCollection);
  7925. smalltalk.addMethod(
  7926. unescape('_printString'),
  7927. smalltalk.method({
  7928. selector: unescape('printString'),
  7929. category: 'printing',
  7930. fn: function () {
  7931. var self=this;
  7932. 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")]);})]);
  7933. return self;},
  7934. args: [],
  7935. source: unescape('printString%0A%09%5EString%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%09%09aStream%20%0A%09%09%09nextPutAll%3A%20super%20printString%3B%0A%09%09%09nextPutAll%3A%20%27%28%27.%0A%09%09%09%09self%20associations%20%0A%09%09%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%09%09%09%09%09%09aStream%20%0A%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%09%09%09%09%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%09%09%09%09%09%09aStream%20nextPutAll%3A%20%27%29%27%5D'),
  7936. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  7937. referencedClasses: ["String"]
  7938. }),
  7939. smalltalk.HashedCollection);
  7940. smalltalk.addMethod(
  7941. unescape('_remove_ifAbsent_'),
  7942. smalltalk.method({
  7943. selector: unescape('remove%3AifAbsent%3A'),
  7944. category: 'adding/removing',
  7945. fn: function (aKey, aBlock) {
  7946. var self=this;
  7947. return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
  7948. return self;},
  7949. args: ["aKey", "aBlock"],
  7950. source: unescape('remove%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%5Eself%20removeKey%3A%20aKey%20ifAbsent%3A%20aBlock'),
  7951. messageSends: ["removeKey:ifAbsent:"],
  7952. referencedClasses: []
  7953. }),
  7954. smalltalk.HashedCollection);
  7955. smalltalk.addMethod(
  7956. unescape('_removeKey_'),
  7957. smalltalk.method({
  7958. selector: unescape('removeKey%3A'),
  7959. category: 'adding/removing',
  7960. fn: function (aKey){
  7961. var self=this;
  7962. return smalltalk.send(self, "_remove_", [aKey]);
  7963. return self;},
  7964. args: ["aKey"],
  7965. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20%5Eself%20remove%3A%20aKey'),
  7966. messageSends: ["remove:"],
  7967. referencedClasses: []
  7968. }),
  7969. smalltalk.HashedCollection);
  7970. smalltalk.addMethod(
  7971. unescape('_removeKey_ifAbsent_'),
  7972. smalltalk.method({
  7973. selector: unescape('removeKey%3AifAbsent%3A'),
  7974. category: 'adding/removing',
  7975. fn: function (aKey, aBlock) {
  7976. var self=this;
  7977. return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
  7978. return self;},
  7979. args: ["aKey", "aBlock"],
  7980. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%20%0A%09%09ifFalse%3A%20%5BaBlock%20value%5D%0A%09%09ifTrue%3A%20%5Bself%20basicDelete%3A%20aKey%5D'),
  7981. messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
  7982. referencedClasses: []
  7983. }),
  7984. smalltalk.HashedCollection);
  7985. smalltalk.addMethod(
  7986. unescape('_select_'),
  7987. smalltalk.method({
  7988. selector: unescape('select%3A'),
  7989. category: 'enumerating',
  7990. fn: function (aBlock) {
  7991. var self=this;
  7992. var newDict=nil;
  7993. (newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  7994. 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]);})]));})]);
  7995. return newDict;
  7996. return self;},
  7997. args: ["aBlock"],
  7998. source: unescape('select%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%09%5EnewDict'),
  7999. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  8000. referencedClasses: []
  8001. }),
  8002. smalltalk.HashedCollection);
  8003. smalltalk.addMethod(
  8004. unescape('_shallowCopy'),
  8005. smalltalk.method({
  8006. selector: unescape('shallowCopy'),
  8007. category: 'copying',
  8008. fn: function () {
  8009. var self=this;
  8010. var copy=nil;
  8011. (copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  8012. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  8013. return copy;
  8014. return self;},
  8015. args: [],
  8016. 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'),
  8017. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  8018. referencedClasses: []
  8019. }),
  8020. smalltalk.HashedCollection);
  8021. smalltalk.addMethod(
  8022. unescape('_size'),
  8023. smalltalk.method({
  8024. selector: unescape('size'),
  8025. category: 'accessing',
  8026. fn: function () {
  8027. var self=this;
  8028. return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
  8029. return self;},
  8030. args: [],
  8031. source: unescape('size%0A%09%5Eself%20keys%20size'),
  8032. messageSends: ["size", "keys"],
  8033. referencedClasses: []
  8034. }),
  8035. smalltalk.HashedCollection);
  8036. smalltalk.addMethod(
  8037. unescape('_storeOn_'),
  8038. smalltalk.method({
  8039. selector: unescape('storeOn%3A'),
  8040. category: 'printing',
  8041. fn: function (aStream) {
  8042. var self=this;
  8043. smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
  8044. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
  8045. smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
  8046. return self;},
  8047. args: ["aStream"],
  8048. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20%27%23%7B%27.%0A%09self%20associations%0A%09%09do%3A%20%5B%3Aeach%20%7C%20each%20storeOn%3A%20aStream%5D%0A%09%09separatedBy%3A%20%5B%20aStream%20nextPutAll%3A%20%27.%20%27%5D.%0A%09aStream%20nextPutAll%3A%20%27%7D%27'),
  8049. messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
  8050. referencedClasses: []
  8051. }),
  8052. smalltalk.HashedCollection);
  8053. smalltalk.addMethod(
  8054. unescape('_values'),
  8055. smalltalk.method({
  8056. selector: unescape('values'),
  8057. category: 'accessing',
  8058. fn: function () {
  8059. var self=this;
  8060. return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  8061. return self;},
  8062. args: [],
  8063. source: unescape('values%0A%09%5Eself%20keys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  8064. messageSends: ["collect:", "keys", "at:"],
  8065. referencedClasses: []
  8066. }),
  8067. smalltalk.HashedCollection);
  8068. smalltalk.addMethod(
  8069. unescape('_fromPairs_'),
  8070. smalltalk.method({
  8071. selector: unescape('fromPairs%3A'),
  8072. category: 'instance creation',
  8073. fn: function (aCollection) {
  8074. var self=this;
  8075. var dict=nil;
  8076. (dict=smalltalk.send(self, "_new", []));
  8077. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  8078. return dict;
  8079. return self;},
  8080. args: ["aCollection"],
  8081. 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'),
  8082. messageSends: ["new", "do:", "add:"],
  8083. referencedClasses: []
  8084. }),
  8085. smalltalk.HashedCollection.klass);
  8086. smalltalk.addClass('Dictionary', smalltalk.HashedCollection, ['keys', 'values'], 'Kernel-Collections');
  8087. smalltalk.addMethod(
  8088. unescape('_asHashedCollection'),
  8089. smalltalk.method({
  8090. selector: unescape('asHashedCollection'),
  8091. category: 'converting',
  8092. fn: function () {
  8093. var self=this;
  8094. return smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
  8095. return self;},
  8096. args: [],
  8097. source: unescape('asHashedCollection%0A%09%5EHashedCollection%20fromPairs%3A%20self%20associations'),
  8098. messageSends: ["fromPairs:", "associations"],
  8099. referencedClasses: ["HashedCollection"]
  8100. }),
  8101. smalltalk.Dictionary);
  8102. smalltalk.addMethod(
  8103. unescape('_asJSON'),
  8104. smalltalk.method({
  8105. selector: unescape('asJSON'),
  8106. category: 'converting',
  8107. fn: function (){
  8108. var self=this;
  8109. return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "_asJSON", []);
  8110. return self;},
  8111. args: [],
  8112. source: unescape('asJSON%0A%09%5Eself%20asHashedCollection%20asJSON'),
  8113. messageSends: ["asJSON", "asHashedCollection"],
  8114. referencedClasses: []
  8115. }),
  8116. smalltalk.Dictionary);
  8117. smalltalk.addMethod(
  8118. unescape('_at_ifAbsent_'),
  8119. smalltalk.method({
  8120. selector: unescape('at%3AifAbsent%3A'),
  8121. category: 'accessing',
  8122. fn: function (aKey, aBlock) {
  8123. var self=this;
  8124. var index;
  8125. for(var i=0;i<self['@keys'].length;i++){
  8126. if(self['@keys'][i].__eq(aKey)) {index = i;}
  8127. };
  8128. if(typeof index === 'undefined') {
  8129. return aBlock();
  8130. } else {
  8131. return self['@values'][index];
  8132. }
  8133. ;
  8134. return self;},
  8135. args: ["aKey", "aBlock"],
  8136. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09var%20index%3B%0A%09%09for%28var%20i%3D0%3Bi%3Cself%5B%27@keys%27%5D.length%3Bi++%29%7B%0A%09%09%09if%28self%5B%27@keys%27%5D%5Bi%5D.__eq%28aKey%29%29%20%7Bindex%20%3D%20i%3B%7D%0A%09%09%7D%3B%0A%09%09if%28typeof%20index%20%3D%3D%3D%20%27undefined%27%29%20%7B%0A%09%09%09return%20aBlock%28%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09return%20self%5B%27@values%27%5D%5Bindex%5D%3B%0A%09%09%7D%0A%09%3E'),
  8137. messageSends: [],
  8138. referencedClasses: []
  8139. }),
  8140. smalltalk.Dictionary);
  8141. smalltalk.addMethod(
  8142. unescape('_at_put_'),
  8143. smalltalk.method({
  8144. selector: unescape('at%3Aput%3A'),
  8145. category: 'accessing',
  8146. fn: function (aKey, aValue) {
  8147. var self=this;
  8148. var index = self['@keys'].indexOf(aKey);
  8149. if(index === -1) {
  8150. self['@values'].push(aValue);
  8151. self['@keys'].push(aKey);
  8152. } else {
  8153. self['@values'][index] = aValue;
  8154. };
  8155. return aValue;
  8156. ;
  8157. return self;},
  8158. args: ["aKey", "aValue"],
  8159. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%3C%0A%09%09var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%09%09if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%09%09%09self%5B%27@values%27%5D.push%28aValue%29%3B%0A%09%09%09self%5B%27@keys%27%5D.push%28aKey%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09self%5B%27@values%27%5D%5Bindex%5D%20%3D%20aValue%3B%0A%09%09%7D%3B%0A%0A%09%09return%20aValue%3B%0A%09%3E'),
  8160. messageSends: [],
  8161. referencedClasses: []
  8162. }),
  8163. smalltalk.Dictionary);
  8164. smalltalk.addMethod(
  8165. unescape('_includesKey_'),
  8166. smalltalk.method({
  8167. selector: unescape('includesKey%3A'),
  8168. category: 'testing',
  8169. fn: function (aKey) {
  8170. var self=this;
  8171. return smalltalk.send(self['@keys'], "_includes_", [aKey]);
  8172. return self;},
  8173. args: ["aKey"],
  8174. source: unescape('includesKey%3A%20aKey%0A%09%5Ekeys%20includes%3A%20aKey'),
  8175. messageSends: ["includes:"],
  8176. referencedClasses: []
  8177. }),
  8178. smalltalk.Dictionary);
  8179. smalltalk.addMethod(
  8180. unescape('_initialize'),
  8181. smalltalk.method({
  8182. selector: unescape('initialize'),
  8183. category: 'initialization',
  8184. fn: function () {
  8185. var self=this;
  8186. smalltalk.send(self, "_initialize", [], smalltalk.HashedCollection);
  8187. (self['@keys']=[]);
  8188. (self['@values']=[]);
  8189. return self;},
  8190. args: [],
  8191. source: unescape('initialize%0A%09super%20initialize.%0A%09keys%20%3A%3D%20%23%28%29.%0A%09values%20%3A%3D%20%23%28%29'),
  8192. messageSends: ["initialize"],
  8193. referencedClasses: []
  8194. }),
  8195. smalltalk.Dictionary);
  8196. smalltalk.addMethod(
  8197. unescape('_keys'),
  8198. smalltalk.method({
  8199. selector: unescape('keys'),
  8200. category: 'accessing',
  8201. fn: function () {
  8202. var self=this;
  8203. return smalltalk.send(self['@keys'], "_copy", []);
  8204. return self;},
  8205. args: [],
  8206. source: unescape('keys%0A%09%5Ekeys%20copy'),
  8207. messageSends: ["copy"],
  8208. referencedClasses: []
  8209. }),
  8210. smalltalk.Dictionary);
  8211. smalltalk.addMethod(
  8212. unescape('_removeKey_ifAbsent_'),
  8213. smalltalk.method({
  8214. selector: unescape('removeKey%3AifAbsent%3A'),
  8215. category: 'adding/removing',
  8216. fn: function (aKey, aBlock){
  8217. var self=this;
  8218. var index = self['@keys'].indexOf(aKey);
  8219. if(index === -1) {
  8220. return aBlock()
  8221. } else {
  8222. var value;
  8223. self['@keys'].splice(index, 1);
  8224. value = self['@values'].splice(index, 1);
  8225. return value[0];
  8226. };
  8227. ;
  8228. return self;},
  8229. args: ["aKey", "aBlock"],
  8230. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%3C%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20aBlock%28%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20value%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%5B%27@keys%27%5D.splice%28index%2C%201%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20value%20%3D%20self%5B%27@values%27%5D.splice%28index%2C%201%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20value%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%3E'),
  8231. messageSends: [],
  8232. referencedClasses: []
  8233. }),
  8234. smalltalk.Dictionary);
  8235. smalltalk.addMethod(
  8236. unescape('_values'),
  8237. smalltalk.method({
  8238. selector: unescape('values'),
  8239. category: 'accessing',
  8240. fn: function () {
  8241. var self=this;
  8242. return smalltalk.send(self['@values'], "_copy", []);
  8243. return self;},
  8244. args: [],
  8245. source: unescape('values%0A%09%5Evalues%20copy'),
  8246. messageSends: ["copy"],
  8247. referencedClasses: []
  8248. }),
  8249. smalltalk.Dictionary);
  8250. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel-Collections');
  8251. smalltalk.addMethod(
  8252. unescape('__eq'),
  8253. smalltalk.method({
  8254. selector: unescape('%3D'),
  8255. category: 'comparing',
  8256. fn: function (aCollection) {
  8257. var self=this;
  8258. 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}})})();})]));
  8259. 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}})})();})]));})]);
  8260. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  8261. return self;
  8262. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  8263. args: ["aCollection"],
  8264. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%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'),
  8265. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  8266. referencedClasses: []
  8267. }),
  8268. smalltalk.SequenceableCollection);
  8269. smalltalk.addMethod(
  8270. unescape('_addLast_'),
  8271. smalltalk.method({
  8272. selector: unescape('addLast%3A'),
  8273. category: 'adding',
  8274. fn: function (anObject) {
  8275. var self=this;
  8276. smalltalk.send(self, "_add_", [anObject]);
  8277. return self;},
  8278. args: ["anObject"],
  8279. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  8280. messageSends: ["add:"],
  8281. referencedClasses: []
  8282. }),
  8283. smalltalk.SequenceableCollection);
  8284. smalltalk.addMethod(
  8285. unescape('_allButFirst'),
  8286. smalltalk.method({
  8287. selector: unescape('allButFirst'),
  8288. category: 'accessing',
  8289. fn: function () {
  8290. var self=this;
  8291. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  8292. return self;},
  8293. args: [],
  8294. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  8295. messageSends: ["copyFrom:to:", "size"],
  8296. referencedClasses: []
  8297. }),
  8298. smalltalk.SequenceableCollection);
  8299. smalltalk.addMethod(
  8300. unescape('_allButLast'),
  8301. smalltalk.method({
  8302. selector: unescape('allButLast'),
  8303. category: 'accessing',
  8304. fn: function () {
  8305. var self=this;
  8306. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  8307. return self;},
  8308. args: [],
  8309. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  8310. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  8311. referencedClasses: []
  8312. }),
  8313. smalltalk.SequenceableCollection);
  8314. smalltalk.addMethod(
  8315. unescape('_at_'),
  8316. smalltalk.method({
  8317. selector: unescape('at%3A'),
  8318. category: 'accessing',
  8319. fn: function (anIndex) {
  8320. var self=this;
  8321. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  8322. return self;},
  8323. args: ["anIndex"],
  8324. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  8325. messageSends: ["at:ifAbsent:", "errorNotFound"],
  8326. referencedClasses: []
  8327. }),
  8328. smalltalk.SequenceableCollection);
  8329. smalltalk.addMethod(
  8330. unescape('_at_ifAbsent_'),
  8331. smalltalk.method({
  8332. selector: unescape('at%3AifAbsent%3A'),
  8333. category: 'accessing',
  8334. fn: function (anIndex, aBlock) {
  8335. var self=this;
  8336. smalltalk.send(self, "_subclassResponsibility", []);
  8337. return self;},
  8338. args: ["anIndex", "aBlock"],
  8339. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  8340. messageSends: ["subclassResponsibility"],
  8341. referencedClasses: []
  8342. }),
  8343. smalltalk.SequenceableCollection);
  8344. smalltalk.addMethod(
  8345. unescape('_at_put_'),
  8346. smalltalk.method({
  8347. selector: unescape('at%3Aput%3A'),
  8348. category: 'accessing',
  8349. fn: function (anIndex, anObject) {
  8350. var self=this;
  8351. smalltalk.send(self, "_subclassResponsibility", []);
  8352. return self;},
  8353. args: ["anIndex", "anObject"],
  8354. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  8355. messageSends: ["subclassResponsibility"],
  8356. referencedClasses: []
  8357. }),
  8358. smalltalk.SequenceableCollection);
  8359. smalltalk.addMethod(
  8360. unescape('_atRandom'),
  8361. smalltalk.method({
  8362. selector: unescape('atRandom'),
  8363. category: 'accessing',
  8364. fn: function () {
  8365. var self=this;
  8366. return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
  8367. return self;},
  8368. args: [],
  8369. source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
  8370. messageSends: ["at:", "atRandom", "size"],
  8371. referencedClasses: []
  8372. }),
  8373. smalltalk.SequenceableCollection);
  8374. smalltalk.addMethod(
  8375. unescape('_copyFrom_to_'),
  8376. smalltalk.method({
  8377. selector: unescape('copyFrom%3Ato%3A'),
  8378. category: 'copying',
  8379. fn: function (anIndex, anotherIndex) {
  8380. var self=this;
  8381. var range=nil;
  8382. var newCollection=nil;
  8383. (range=smalltalk.send(anIndex, "_to_", [anotherIndex]));
  8384. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(range, "_size", [])]));
  8385. smalltalk.send(range, "_withIndexDo_", [(function(each, i){return smalltalk.send(newCollection, "_at_put_", [i, smalltalk.send(self, "_at_", [each])]);})]);
  8386. return newCollection;
  8387. return self;},
  8388. args: ["anIndex", "anotherIndex"],
  8389. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20range%20newCollection%20%7C%0A%09range%20%3A%3D%20anIndex%20to%3A%20anotherIndex.%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20range%20size.%0A%09range%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%09%20%20%20%20newCollection%20at%3A%20i%20put%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5EnewCollection'),
  8390. messageSends: ["to:", "new:", "class", "size", "withIndexDo:", "at:put:", "at:"],
  8391. referencedClasses: []
  8392. }),
  8393. smalltalk.SequenceableCollection);
  8394. smalltalk.addMethod(
  8395. unescape('_deepCopy'),
  8396. smalltalk.method({
  8397. selector: unescape('deepCopy'),
  8398. category: 'copying',
  8399. fn: function () {
  8400. var self=this;
  8401. var newCollection=nil;
  8402. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
  8403. smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, smalltalk.send(each, "_deepCopy", [])]);})]);
  8404. return newCollection;
  8405. return self;},
  8406. args: [],
  8407. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  8408. messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"],
  8409. referencedClasses: []
  8410. }),
  8411. smalltalk.SequenceableCollection);
  8412. smalltalk.addMethod(
  8413. unescape('_first'),
  8414. smalltalk.method({
  8415. selector: unescape('first'),
  8416. category: 'accessing',
  8417. fn: function () {
  8418. var self=this;
  8419. return smalltalk.send(self, "_at_", [(1)]);
  8420. return self;},
  8421. args: [],
  8422. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  8423. messageSends: ["at:"],
  8424. referencedClasses: []
  8425. }),
  8426. smalltalk.SequenceableCollection);
  8427. smalltalk.addMethod(
  8428. unescape('_first_'),
  8429. smalltalk.method({
  8430. selector: unescape('first%3A'),
  8431. category: 'accessing',
  8432. fn: function (n){
  8433. var self=this;
  8434. return smalltalk.send(self, "_copyFrom_to_", [(1), n]);
  8435. return self;},
  8436. args: ["n"],
  8437. source: unescape('first%3A%20n%0A%09%22Answer%20the%20first%20n%20elements%20of%20the%20receiver.%0A%09Raise%20an%20error%20if%20there%20are%20not%20enough%20elements.%22%0A%0A%09%5E%20self%20copyFrom%3A%201%20to%3A%20n'),
  8438. messageSends: ["copyFrom:to:"],
  8439. referencedClasses: []
  8440. }),
  8441. smalltalk.SequenceableCollection);
  8442. smalltalk.addMethod(
  8443. unescape('_fourth'),
  8444. smalltalk.method({
  8445. selector: unescape('fourth'),
  8446. category: 'accessing',
  8447. fn: function () {
  8448. var self=this;
  8449. return smalltalk.send(self, "_at_", [(4)]);
  8450. return self;},
  8451. args: [],
  8452. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  8453. messageSends: ["at:"],
  8454. referencedClasses: []
  8455. }),
  8456. smalltalk.SequenceableCollection);
  8457. smalltalk.addMethod(
  8458. unescape('_indexOf_'),
  8459. smalltalk.method({
  8460. selector: unescape('indexOf%3A'),
  8461. category: 'accessing',
  8462. fn: function (anObject) {
  8463. var self=this;
  8464. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  8465. return self;},
  8466. args: ["anObject"],
  8467. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  8468. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  8469. referencedClasses: []
  8470. }),
  8471. smalltalk.SequenceableCollection);
  8472. smalltalk.addMethod(
  8473. unescape('_indexOf_ifAbsent_'),
  8474. smalltalk.method({
  8475. selector: unescape('indexOf%3AifAbsent%3A'),
  8476. category: 'accessing',
  8477. fn: function (anObject, aBlock) {
  8478. var self=this;
  8479. for(var i=0;i<self.length;i++){
  8480. if(self[i].__eq(anObject)) {return i+1}
  8481. }
  8482. return aBlock();
  8483. ;
  8484. return self;},
  8485. args: ["anObject", "aBlock"],
  8486. 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'),
  8487. messageSends: [],
  8488. referencedClasses: []
  8489. }),
  8490. smalltalk.SequenceableCollection);
  8491. smalltalk.addMethod(
  8492. unescape('_indexOf_startingAt_'),
  8493. smalltalk.method({
  8494. selector: unescape('indexOf%3AstartingAt%3A'),
  8495. category: 'accessing',
  8496. fn: function (anObject, start) {
  8497. var self=this;
  8498. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  8499. return self;},
  8500. args: ["anObject", "start"],
  8501. 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'),
  8502. messageSends: ["indexOf:startingAt:ifAbsent:"],
  8503. referencedClasses: []
  8504. }),
  8505. smalltalk.SequenceableCollection);
  8506. smalltalk.addMethod(
  8507. unescape('_indexOf_startingAt_ifAbsent_'),
  8508. smalltalk.method({
  8509. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  8510. category: 'accessing',
  8511. fn: function (anObject, start, aBlock) {
  8512. var self=this;
  8513. for(var i=start-1;i<self.length;i++){
  8514. if(self[i].__eq(anObject)) {return i+1}
  8515. }
  8516. return aBlock();
  8517. ;
  8518. return self;},
  8519. args: ["anObject", "start", "aBlock"],
  8520. 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'),
  8521. messageSends: [],
  8522. referencedClasses: []
  8523. }),
  8524. smalltalk.SequenceableCollection);
  8525. smalltalk.addMethod(
  8526. unescape('_last'),
  8527. smalltalk.method({
  8528. selector: unescape('last'),
  8529. category: 'accessing',
  8530. fn: function () {
  8531. var self=this;
  8532. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  8533. return self;},
  8534. args: [],
  8535. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  8536. messageSends: ["at:", "size"],
  8537. referencedClasses: []
  8538. }),
  8539. smalltalk.SequenceableCollection);
  8540. smalltalk.addMethod(
  8541. unescape('_printString'),
  8542. smalltalk.method({
  8543. selector: unescape('printString'),
  8544. category: 'printing',
  8545. fn: function () {
  8546. var self=this;
  8547. var str=nil;
  8548. (str=smalltalk.send("", "_writeStream", []));
  8549. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Collection), "__comma", [unescape("%20%28")])]);
  8550. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  8551. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  8552. return smalltalk.send(str, "_contents", []);
  8553. return self;},
  8554. args: [],
  8555. 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'),
  8556. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  8557. referencedClasses: []
  8558. }),
  8559. smalltalk.SequenceableCollection);
  8560. smalltalk.addMethod(
  8561. unescape('_removeLast'),
  8562. smalltalk.method({
  8563. selector: unescape('removeLast'),
  8564. category: 'adding',
  8565. fn: function () {
  8566. var self=this;
  8567. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  8568. return self;},
  8569. args: [],
  8570. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  8571. messageSends: ["remove:", "last"],
  8572. referencedClasses: []
  8573. }),
  8574. smalltalk.SequenceableCollection);
  8575. smalltalk.addMethod(
  8576. unescape('_reversed'),
  8577. smalltalk.method({
  8578. selector: unescape('reversed'),
  8579. category: 'converting',
  8580. fn: function () {
  8581. var self=this;
  8582. smalltalk.send(self, "_subclassResponsibility", []);
  8583. return self;},
  8584. args: [],
  8585. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  8586. messageSends: ["subclassResponsibility"],
  8587. referencedClasses: []
  8588. }),
  8589. smalltalk.SequenceableCollection);
  8590. smalltalk.addMethod(
  8591. unescape('_second'),
  8592. smalltalk.method({
  8593. selector: unescape('second'),
  8594. category: 'accessing',
  8595. fn: function () {
  8596. var self=this;
  8597. return smalltalk.send(self, "_at_", [(2)]);
  8598. return self;},
  8599. args: [],
  8600. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  8601. messageSends: ["at:"],
  8602. referencedClasses: []
  8603. }),
  8604. smalltalk.SequenceableCollection);
  8605. smalltalk.addMethod(
  8606. unescape('_shallowCopy'),
  8607. smalltalk.method({
  8608. selector: unescape('shallowCopy'),
  8609. category: 'copying',
  8610. fn: function () {
  8611. var self=this;
  8612. var newCollection=nil;
  8613. (newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]));
  8614. smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, each]);})]);
  8615. return newCollection;
  8616. return self;},
  8617. args: [],
  8618. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%20%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%5D.%0A%09%5EnewCollection'),
  8619. messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"],
  8620. referencedClasses: []
  8621. }),
  8622. smalltalk.SequenceableCollection);
  8623. smalltalk.addMethod(
  8624. unescape('_third'),
  8625. smalltalk.method({
  8626. selector: unescape('third'),
  8627. category: 'accessing',
  8628. fn: function () {
  8629. var self=this;
  8630. return smalltalk.send(self, "_at_", [(3)]);
  8631. return self;},
  8632. args: [],
  8633. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  8634. messageSends: ["at:"],
  8635. referencedClasses: []
  8636. }),
  8637. smalltalk.SequenceableCollection);
  8638. smalltalk.addMethod(
  8639. unescape('_withIndexDo_'),
  8640. smalltalk.method({
  8641. selector: unescape('withIndexDo%3A'),
  8642. category: 'enumerating',
  8643. fn: function (aBlock) {
  8644. var self=this;
  8645. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  8646. return self;},
  8647. args: ["aBlock"],
  8648. 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'),
  8649. messageSends: [],
  8650. referencedClasses: []
  8651. }),
  8652. smalltalk.SequenceableCollection);
  8653. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  8654. smalltalk.addMethod(
  8655. unescape('_add_'),
  8656. smalltalk.method({
  8657. selector: unescape('add%3A'),
  8658. category: 'adding/removing',
  8659. fn: function (anObject) {
  8660. var self=this;
  8661. self.push(anObject); return anObject;;
  8662. return self;},
  8663. args: ["anObject"],
  8664. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  8665. messageSends: [],
  8666. referencedClasses: []
  8667. }),
  8668. smalltalk.Array);
  8669. smalltalk.addMethod(
  8670. unescape('_asJavascript'),
  8671. smalltalk.method({
  8672. selector: unescape('asJavascript'),
  8673. category: 'converting',
  8674. fn: function () {
  8675. var self=this;
  8676. 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")]);
  8677. return self;},
  8678. args: [],
  8679. 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'),
  8680. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  8681. referencedClasses: []
  8682. }),
  8683. smalltalk.Array);
  8684. smalltalk.addMethod(
  8685. unescape('_at_ifAbsent_'),
  8686. smalltalk.method({
  8687. selector: unescape('at%3AifAbsent%3A'),
  8688. category: 'accessing',
  8689. fn: function (anIndex, aBlock) {
  8690. var self=this;
  8691. var value = self[anIndex - 1];
  8692. if(value === undefined) {
  8693. return aBlock();
  8694. } else {
  8695. return value;
  8696. }
  8697. ;
  8698. return self;},
  8699. args: ["anIndex", "aBlock"],
  8700. 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'),
  8701. messageSends: [],
  8702. referencedClasses: []
  8703. }),
  8704. smalltalk.Array);
  8705. smalltalk.addMethod(
  8706. unescape('_at_put_'),
  8707. smalltalk.method({
  8708. selector: unescape('at%3Aput%3A'),
  8709. category: 'accessing',
  8710. fn: function (anIndex, anObject) {
  8711. var self=this;
  8712. return self[anIndex - 1] = anObject;
  8713. return self;},
  8714. args: ["anIndex", "anObject"],
  8715. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  8716. messageSends: [],
  8717. referencedClasses: []
  8718. }),
  8719. smalltalk.Array);
  8720. smalltalk.addMethod(
  8721. unescape('_join_'),
  8722. smalltalk.method({
  8723. selector: unescape('join%3A'),
  8724. category: 'enumerating',
  8725. fn: function (aString) {
  8726. var self=this;
  8727. return self.join(aString);
  8728. return self;},
  8729. args: ["aString"],
  8730. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  8731. messageSends: [],
  8732. referencedClasses: []
  8733. }),
  8734. smalltalk.Array);
  8735. smalltalk.addMethod(
  8736. unescape('_remove_'),
  8737. smalltalk.method({
  8738. selector: unescape('remove%3A'),
  8739. category: 'adding/removing',
  8740. fn: function (anObject) {
  8741. var self=this;
  8742. for(var i=0;i<self.length;i++) {
  8743. if(self[i] == anObject) {
  8744. self.splice(i,1);
  8745. break;
  8746. }
  8747. }
  8748. ;
  8749. return self;},
  8750. args: ["anObject"],
  8751. 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'),
  8752. messageSends: [],
  8753. referencedClasses: []
  8754. }),
  8755. smalltalk.Array);
  8756. smalltalk.addMethod(
  8757. unescape('_removeFrom_to_'),
  8758. smalltalk.method({
  8759. selector: unescape('removeFrom%3Ato%3A'),
  8760. category: 'adding/removing',
  8761. fn: function (aNumber, anotherNumber) {
  8762. var self=this;
  8763. self.splice(aNumber - 1,anotherNumber - 1);
  8764. return self;},
  8765. args: ["aNumber", "anotherNumber"],
  8766. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  8767. messageSends: [],
  8768. referencedClasses: []
  8769. }),
  8770. smalltalk.Array);
  8771. smalltalk.addMethod(
  8772. unescape('_reversed'),
  8773. smalltalk.method({
  8774. selector: unescape('reversed'),
  8775. category: 'converting',
  8776. fn: function () {
  8777. var self=this;
  8778. return self._copy().reverse();
  8779. return self;},
  8780. args: [],
  8781. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  8782. messageSends: [],
  8783. referencedClasses: []
  8784. }),
  8785. smalltalk.Array);
  8786. smalltalk.addMethod(
  8787. unescape('_size'),
  8788. smalltalk.method({
  8789. selector: unescape('size'),
  8790. category: 'accessing',
  8791. fn: function () {
  8792. var self=this;
  8793. return self.length;
  8794. return self;},
  8795. args: [],
  8796. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  8797. messageSends: [],
  8798. referencedClasses: []
  8799. }),
  8800. smalltalk.Array);
  8801. smalltalk.addMethod(
  8802. unescape('_sort'),
  8803. smalltalk.method({
  8804. selector: unescape('sort'),
  8805. category: 'enumerating',
  8806. fn: function () {
  8807. var self=this;
  8808. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  8809. return self;},
  8810. args: [],
  8811. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  8812. messageSends: ["basicPerform:"],
  8813. referencedClasses: []
  8814. }),
  8815. smalltalk.Array);
  8816. smalltalk.addMethod(
  8817. unescape('_sort_'),
  8818. smalltalk.method({
  8819. selector: unescape('sort%3A'),
  8820. category: 'enumerating',
  8821. fn: function (aBlock) {
  8822. var self=this;
  8823. return self.sort(function(a, b) {
  8824. if(aBlock(a,b)) {return -1} else {return 1}
  8825. })
  8826. ;
  8827. return self;},
  8828. args: ["aBlock"],
  8829. 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'),
  8830. messageSends: [],
  8831. referencedClasses: []
  8832. }),
  8833. smalltalk.Array);
  8834. smalltalk.addMethod(
  8835. unescape('_sorted'),
  8836. smalltalk.method({
  8837. selector: unescape('sorted'),
  8838. category: 'enumerating',
  8839. fn: function () {
  8840. var self=this;
  8841. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  8842. return self;},
  8843. args: [],
  8844. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  8845. messageSends: ["sort", "copy"],
  8846. referencedClasses: []
  8847. }),
  8848. smalltalk.Array);
  8849. smalltalk.addMethod(
  8850. unescape('_sorted_'),
  8851. smalltalk.method({
  8852. selector: unescape('sorted%3A'),
  8853. category: 'enumerating',
  8854. fn: function (aBlock) {
  8855. var self=this;
  8856. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  8857. return self;},
  8858. args: ["aBlock"],
  8859. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  8860. messageSends: ["sort:", "copy"],
  8861. referencedClasses: []
  8862. }),
  8863. smalltalk.Array);
  8864. smalltalk.addMethod(
  8865. unescape('_new_'),
  8866. smalltalk.method({
  8867. selector: unescape('new%3A'),
  8868. category: 'instance creation',
  8869. fn: function (anInteger) {
  8870. var self=this;
  8871. return new Array(anInteger);
  8872. return self;},
  8873. args: ["anInteger"],
  8874. source: unescape('new%3A%20anInteger%0A%09%3Creturn%20new%20Array%28anInteger%29%3E'),
  8875. messageSends: [],
  8876. referencedClasses: []
  8877. }),
  8878. smalltalk.Array.klass);
  8879. smalltalk.addMethod(
  8880. unescape('_with_'),
  8881. smalltalk.method({
  8882. selector: unescape('with%3A'),
  8883. category: 'instance creation',
  8884. fn: function (anObject) {
  8885. var self=this;
  8886. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
  8887. return self;},
  8888. args: ["anObject"],
  8889. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5E%28self%20new%3A%201%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09yourself'),
  8890. messageSends: ["at:put:", "yourself", "new:"],
  8891. referencedClasses: []
  8892. }),
  8893. smalltalk.Array.klass);
  8894. smalltalk.addMethod(
  8895. unescape('_with_with_'),
  8896. smalltalk.method({
  8897. selector: unescape('with%3Awith%3A'),
  8898. category: 'instance creation',
  8899. fn: function (anObject, anObject2) {
  8900. var self=this;
  8901. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
  8902. return self;},
  8903. args: ["anObject", "anObject2"],
  8904. source: unescape('with%3A%20anObject%20with%3A%20anObject2%0A%09%20%20%20%20%5E%28self%20new%3A%202%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09yourself'),
  8905. messageSends: ["at:put:", "yourself", "new:"],
  8906. referencedClasses: []
  8907. }),
  8908. smalltalk.Array.klass);
  8909. smalltalk.addMethod(
  8910. unescape('_with_with_with_'),
  8911. smalltalk.method({
  8912. selector: unescape('with%3Awith%3Awith%3A'),
  8913. category: 'instance creation',
  8914. fn: function (anObject, anObject2, anObject3) {
  8915. var self=this;
  8916. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
  8917. return self;},
  8918. args: ["anObject", "anObject2", "anObject3"],
  8919. source: unescape('with%3A%20anObject%20with%3A%20anObject2%20with%3A%20anObject3%0A%09%20%20%20%20%5E%28self%20new%3A%203%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09at%3A%203%20put%3A%20anObject3%3B%0A%09%09yourself'),
  8920. messageSends: ["at:put:", "yourself", "new:"],
  8921. referencedClasses: []
  8922. }),
  8923. smalltalk.Array.klass);
  8924. smalltalk.addMethod(
  8925. unescape('_withAll_'),
  8926. smalltalk.method({
  8927. selector: unescape('withAll%3A'),
  8928. category: 'instance creation',
  8929. fn: function (aCollection) {
  8930. var self=this;
  8931. var instance=nil;
  8932. (instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
  8933. smalltalk.send(aCollection, "_withIndexDo_", [(function(each, index){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
  8934. return instance;
  8935. return self;},
  8936. args: ["aCollection"],
  8937. source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
  8938. messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
  8939. referencedClasses: []
  8940. }),
  8941. smalltalk.Array.klass);
  8942. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  8943. smalltalk.addMethod(
  8944. unescape('_add_'),
  8945. smalltalk.method({
  8946. selector: unescape('add%3A'),
  8947. category: 'adding/removing',
  8948. fn: function (anObject) {
  8949. var self=this;
  8950. self.push(anObject); return anObject;;
  8951. return self;},
  8952. args: ["anObject"],
  8953. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  8954. messageSends: [],
  8955. referencedClasses: []
  8956. }),
  8957. smalltalk.Array);
  8958. smalltalk.addMethod(
  8959. unescape('_asJavascript'),
  8960. smalltalk.method({
  8961. selector: unescape('asJavascript'),
  8962. category: 'converting',
  8963. fn: function () {
  8964. var self=this;
  8965. 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")]);
  8966. return self;},
  8967. args: [],
  8968. 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'),
  8969. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  8970. referencedClasses: []
  8971. }),
  8972. smalltalk.Array);
  8973. smalltalk.addMethod(
  8974. unescape('_at_ifAbsent_'),
  8975. smalltalk.method({
  8976. selector: unescape('at%3AifAbsent%3A'),
  8977. category: 'accessing',
  8978. fn: function (anIndex, aBlock) {
  8979. var self=this;
  8980. var value = self[anIndex - 1];
  8981. if(value === undefined) {
  8982. return aBlock();
  8983. } else {
  8984. return value;
  8985. }
  8986. ;
  8987. return self;},
  8988. args: ["anIndex", "aBlock"],
  8989. 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'),
  8990. messageSends: [],
  8991. referencedClasses: []
  8992. }),
  8993. smalltalk.Array);
  8994. smalltalk.addMethod(
  8995. unescape('_at_put_'),
  8996. smalltalk.method({
  8997. selector: unescape('at%3Aput%3A'),
  8998. category: 'accessing',
  8999. fn: function (anIndex, anObject) {
  9000. var self=this;
  9001. return self[anIndex - 1] = anObject;
  9002. return self;},
  9003. args: ["anIndex", "anObject"],
  9004. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  9005. messageSends: [],
  9006. referencedClasses: []
  9007. }),
  9008. smalltalk.Array);
  9009. smalltalk.addMethod(
  9010. unescape('_join_'),
  9011. smalltalk.method({
  9012. selector: unescape('join%3A'),
  9013. category: 'enumerating',
  9014. fn: function (aString) {
  9015. var self=this;
  9016. return self.join(aString);
  9017. return self;},
  9018. args: ["aString"],
  9019. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  9020. messageSends: [],
  9021. referencedClasses: []
  9022. }),
  9023. smalltalk.Array);
  9024. smalltalk.addMethod(
  9025. unescape('_remove_'),
  9026. smalltalk.method({
  9027. selector: unescape('remove%3A'),
  9028. category: 'adding/removing',
  9029. fn: function (anObject) {
  9030. var self=this;
  9031. for(var i=0;i<self.length;i++) {
  9032. if(self[i] == anObject) {
  9033. self.splice(i,1);
  9034. break;
  9035. }
  9036. }
  9037. ;
  9038. return self;},
  9039. args: ["anObject"],
  9040. 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'),
  9041. messageSends: [],
  9042. referencedClasses: []
  9043. }),
  9044. smalltalk.Array);
  9045. smalltalk.addMethod(
  9046. unescape('_removeFrom_to_'),
  9047. smalltalk.method({
  9048. selector: unescape('removeFrom%3Ato%3A'),
  9049. category: 'adding/removing',
  9050. fn: function (aNumber, anotherNumber) {
  9051. var self=this;
  9052. self.splice(aNumber - 1,anotherNumber - 1);
  9053. return self;},
  9054. args: ["aNumber", "anotherNumber"],
  9055. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  9056. messageSends: [],
  9057. referencedClasses: []
  9058. }),
  9059. smalltalk.Array);
  9060. smalltalk.addMethod(
  9061. unescape('_reversed'),
  9062. smalltalk.method({
  9063. selector: unescape('reversed'),
  9064. category: 'converting',
  9065. fn: function () {
  9066. var self=this;
  9067. return self._copy().reverse();
  9068. return self;},
  9069. args: [],
  9070. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  9071. messageSends: [],
  9072. referencedClasses: []
  9073. }),
  9074. smalltalk.Array);
  9075. smalltalk.addMethod(
  9076. unescape('_size'),
  9077. smalltalk.method({
  9078. selector: unescape('size'),
  9079. category: 'accessing',
  9080. fn: function () {
  9081. var self=this;
  9082. return self.length;
  9083. return self;},
  9084. args: [],
  9085. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  9086. messageSends: [],
  9087. referencedClasses: []
  9088. }),
  9089. smalltalk.Array);
  9090. smalltalk.addMethod(
  9091. unescape('_sort'),
  9092. smalltalk.method({
  9093. selector: unescape('sort'),
  9094. category: 'enumerating',
  9095. fn: function () {
  9096. var self=this;
  9097. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  9098. return self;},
  9099. args: [],
  9100. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  9101. messageSends: ["basicPerform:"],
  9102. referencedClasses: []
  9103. }),
  9104. smalltalk.Array);
  9105. smalltalk.addMethod(
  9106. unescape('_sort_'),
  9107. smalltalk.method({
  9108. selector: unescape('sort%3A'),
  9109. category: 'enumerating',
  9110. fn: function (aBlock) {
  9111. var self=this;
  9112. return self.sort(function(a, b) {
  9113. if(aBlock(a,b)) {return -1} else {return 1}
  9114. })
  9115. ;
  9116. return self;},
  9117. args: ["aBlock"],
  9118. 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'),
  9119. messageSends: [],
  9120. referencedClasses: []
  9121. }),
  9122. smalltalk.Array);
  9123. smalltalk.addMethod(
  9124. unescape('_sorted'),
  9125. smalltalk.method({
  9126. selector: unescape('sorted'),
  9127. category: 'enumerating',
  9128. fn: function () {
  9129. var self=this;
  9130. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  9131. return self;},
  9132. args: [],
  9133. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  9134. messageSends: ["sort", "copy"],
  9135. referencedClasses: []
  9136. }),
  9137. smalltalk.Array);
  9138. smalltalk.addMethod(
  9139. unescape('_sorted_'),
  9140. smalltalk.method({
  9141. selector: unescape('sorted%3A'),
  9142. category: 'enumerating',
  9143. fn: function (aBlock) {
  9144. var self=this;
  9145. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  9146. return self;},
  9147. args: ["aBlock"],
  9148. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  9149. messageSends: ["sort:", "copy"],
  9150. referencedClasses: []
  9151. }),
  9152. smalltalk.Array);
  9153. smalltalk.addMethod(
  9154. unescape('_new_'),
  9155. smalltalk.method({
  9156. selector: unescape('new%3A'),
  9157. category: 'instance creation',
  9158. fn: function (anInteger) {
  9159. var self=this;
  9160. return new Array(anInteger);
  9161. return self;},
  9162. args: ["anInteger"],
  9163. source: unescape('new%3A%20anInteger%0A%09%3Creturn%20new%20Array%28anInteger%29%3E'),
  9164. messageSends: [],
  9165. referencedClasses: []
  9166. }),
  9167. smalltalk.Array.klass);
  9168. smalltalk.addMethod(
  9169. unescape('_with_'),
  9170. smalltalk.method({
  9171. selector: unescape('with%3A'),
  9172. category: 'instance creation',
  9173. fn: function (anObject) {
  9174. var self=this;
  9175. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
  9176. return self;},
  9177. args: ["anObject"],
  9178. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5E%28self%20new%3A%201%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09yourself'),
  9179. messageSends: ["at:put:", "yourself", "new:"],
  9180. referencedClasses: []
  9181. }),
  9182. smalltalk.Array.klass);
  9183. smalltalk.addMethod(
  9184. unescape('_with_with_'),
  9185. smalltalk.method({
  9186. selector: unescape('with%3Awith%3A'),
  9187. category: 'instance creation',
  9188. fn: function (anObject, anObject2) {
  9189. var self=this;
  9190. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
  9191. return self;},
  9192. args: ["anObject", "anObject2"],
  9193. source: unescape('with%3A%20anObject%20with%3A%20anObject2%0A%09%20%20%20%20%5E%28self%20new%3A%202%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09yourself'),
  9194. messageSends: ["at:put:", "yourself", "new:"],
  9195. referencedClasses: []
  9196. }),
  9197. smalltalk.Array.klass);
  9198. smalltalk.addMethod(
  9199. unescape('_with_with_with_'),
  9200. smalltalk.method({
  9201. selector: unescape('with%3Awith%3Awith%3A'),
  9202. category: 'instance creation',
  9203. fn: function (anObject, anObject2, anObject3) {
  9204. var self=this;
  9205. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
  9206. return self;},
  9207. args: ["anObject", "anObject2", "anObject3"],
  9208. source: unescape('with%3A%20anObject%20with%3A%20anObject2%20with%3A%20anObject3%0A%09%20%20%20%20%5E%28self%20new%3A%203%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09at%3A%203%20put%3A%20anObject3%3B%0A%09%09yourself'),
  9209. messageSends: ["at:put:", "yourself", "new:"],
  9210. referencedClasses: []
  9211. }),
  9212. smalltalk.Array.klass);
  9213. smalltalk.addMethod(
  9214. unescape('_withAll_'),
  9215. smalltalk.method({
  9216. selector: unescape('withAll%3A'),
  9217. category: 'instance creation',
  9218. fn: function (aCollection) {
  9219. var self=this;
  9220. var instance=nil;
  9221. (instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]));
  9222. smalltalk.send(aCollection, "_withIndexDo_", [(function(each, index){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
  9223. return instance;
  9224. return self;},
  9225. args: ["aCollection"],
  9226. source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
  9227. messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
  9228. referencedClasses: []
  9229. }),
  9230. smalltalk.Array.klass);
  9231. smalltalk.addClass('CharacterArray', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  9232. smalltalk.addMethod(
  9233. unescape('__comma'),
  9234. smalltalk.method({
  9235. selector: unescape('%2C'),
  9236. category: 'copying',
  9237. fn: function (aString) {
  9238. var self=this;
  9239. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", [smalltalk.send(aString, "_asString", [])]);
  9240. return self;},
  9241. args: ["aString"],
  9242. source: unescape('%2C%20aString%0A%09%5Eself%20asString%2C%20aString%20asString'),
  9243. messageSends: [unescape("%2C"), "asString"],
  9244. referencedClasses: []
  9245. }),
  9246. smalltalk.CharacterArray);
  9247. smalltalk.addMethod(
  9248. unescape('_add_'),
  9249. smalltalk.method({
  9250. selector: unescape('add%3A'),
  9251. category: 'adding',
  9252. fn: function (anObject) {
  9253. var self=this;
  9254. smalltalk.send(self, "_errorReadOnly", []);
  9255. return self;},
  9256. args: ["anObject"],
  9257. source: unescape('add%3A%20anObject%0A%09self%20errorReadOnly'),
  9258. messageSends: ["errorReadOnly"],
  9259. referencedClasses: []
  9260. }),
  9261. smalltalk.CharacterArray);
  9262. smalltalk.addMethod(
  9263. unescape('_asLowercase'),
  9264. smalltalk.method({
  9265. selector: unescape('asLowercase'),
  9266. category: 'converting',
  9267. fn: function () {
  9268. var self=this;
  9269. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asLowercase", [])]);
  9270. return self;},
  9271. args: [],
  9272. source: unescape('asLowercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asLowercase'),
  9273. messageSends: ["fromString:", "class", "asLowercase", "asString"],
  9274. referencedClasses: []
  9275. }),
  9276. smalltalk.CharacterArray);
  9277. smalltalk.addMethod(
  9278. unescape('_asNumber'),
  9279. smalltalk.method({
  9280. selector: unescape('asNumber'),
  9281. category: 'converting',
  9282. fn: function () {
  9283. var self=this;
  9284. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asNumber", []);
  9285. return self;},
  9286. args: [],
  9287. source: unescape('asNumber%0A%09%5Eself%20asString%20asNumber'),
  9288. messageSends: ["asNumber", "asString"],
  9289. referencedClasses: []
  9290. }),
  9291. smalltalk.CharacterArray);
  9292. smalltalk.addMethod(
  9293. unescape('_asString'),
  9294. smalltalk.method({
  9295. selector: unescape('asString'),
  9296. category: 'converting',
  9297. fn: function () {
  9298. var self=this;
  9299. return smalltalk.send(self, "_subclassResponsibility", []);
  9300. return self;},
  9301. args: [],
  9302. source: unescape('asString%0A%09%5Eself%20subclassResponsibility'),
  9303. messageSends: ["subclassResponsibility"],
  9304. referencedClasses: []
  9305. }),
  9306. smalltalk.CharacterArray);
  9307. smalltalk.addMethod(
  9308. unescape('_asSymbol'),
  9309. smalltalk.method({
  9310. selector: unescape('asSymbol'),
  9311. category: 'converting',
  9312. fn: function () {
  9313. var self=this;
  9314. return smalltalk.send(self, "_subclassResponsibility", []);
  9315. return self;},
  9316. args: [],
  9317. source: unescape('asSymbol%0A%09%5Eself%20subclassResponsibility'),
  9318. messageSends: ["subclassResponsibility"],
  9319. referencedClasses: []
  9320. }),
  9321. smalltalk.CharacterArray);
  9322. smalltalk.addMethod(
  9323. unescape('_asUppercase'),
  9324. smalltalk.method({
  9325. selector: unescape('asUppercase'),
  9326. category: 'converting',
  9327. fn: function () {
  9328. var self=this;
  9329. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asUppercase", [])]);
  9330. return self;},
  9331. args: [],
  9332. source: unescape('asUppercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asUppercase'),
  9333. messageSends: ["fromString:", "class", "asUppercase", "asString"],
  9334. referencedClasses: []
  9335. }),
  9336. smalltalk.CharacterArray);
  9337. smalltalk.addMethod(
  9338. unescape('_at_put_'),
  9339. smalltalk.method({
  9340. selector: unescape('at%3Aput%3A'),
  9341. category: 'accessing',
  9342. fn: function (anIndex, anObject) {
  9343. var self=this;
  9344. smalltalk.send(self, "_errorReadOnly", []);
  9345. return self;},
  9346. args: ["anIndex", "anObject"],
  9347. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20errorReadOnly'),
  9348. messageSends: ["errorReadOnly"],
  9349. referencedClasses: []
  9350. }),
  9351. smalltalk.CharacterArray);
  9352. smalltalk.addMethod(
  9353. unescape('_errorReadOnly'),
  9354. smalltalk.method({
  9355. selector: unescape('errorReadOnly'),
  9356. category: 'error handling',
  9357. fn: function () {
  9358. var self=this;
  9359. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  9360. return self;},
  9361. args: [],
  9362. source: unescape('errorReadOnly%0A%09self%20error%3A%20%27Object%20is%20read-only%27'),
  9363. messageSends: ["error:"],
  9364. referencedClasses: []
  9365. }),
  9366. smalltalk.CharacterArray);
  9367. smalltalk.addMethod(
  9368. unescape('_printString'),
  9369. smalltalk.method({
  9370. selector: unescape('printString'),
  9371. category: 'printing',
  9372. fn: function () {
  9373. var self=this;
  9374. return smalltalk.send(smalltalk.send(self, "_asString", []), "_printString", []);
  9375. return self;},
  9376. args: [],
  9377. source: unescape('printString%0A%09%5Eself%20asString%20printString'),
  9378. messageSends: ["printString", "asString"],
  9379. referencedClasses: []
  9380. }),
  9381. smalltalk.CharacterArray);
  9382. smalltalk.addMethod(
  9383. unescape('_remove_'),
  9384. smalltalk.method({
  9385. selector: unescape('remove%3A'),
  9386. category: 'adding',
  9387. fn: function (anObject) {
  9388. var self=this;
  9389. smalltalk.send(self, "_errorReadOnly", []);
  9390. return self;},
  9391. args: ["anObject"],
  9392. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  9393. messageSends: ["errorReadOnly"],
  9394. referencedClasses: []
  9395. }),
  9396. smalltalk.CharacterArray);
  9397. smalltalk.addMethod(
  9398. unescape('_fromString_'),
  9399. smalltalk.method({
  9400. selector: unescape('fromString%3A'),
  9401. category: 'instance creation',
  9402. fn: function (aString) {
  9403. var self=this;
  9404. smalltalk.send(self, "_subclassResponsibility", []);
  9405. return self;},
  9406. args: ["aString"],
  9407. source: unescape('fromString%3A%20aString%0A%09self%20subclassResponsibility'),
  9408. messageSends: ["subclassResponsibility"],
  9409. referencedClasses: []
  9410. }),
  9411. smalltalk.CharacterArray.klass);
  9412. smalltalk.addClass('String', smalltalk.CharacterArray, [], 'Kernel-Collections');
  9413. smalltalk.addMethod(
  9414. unescape('__comma'),
  9415. smalltalk.method({
  9416. selector: unescape('%2C'),
  9417. category: 'copying',
  9418. fn: function (aString) {
  9419. var self=this;
  9420. return self + aString;
  9421. return self;},
  9422. args: ["aString"],
  9423. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  9424. messageSends: [],
  9425. referencedClasses: []
  9426. }),
  9427. smalltalk.String);
  9428. smalltalk.addMethod(
  9429. unescape('__lt'),
  9430. smalltalk.method({
  9431. selector: unescape('%3C'),
  9432. category: 'comparing',
  9433. fn: function (aString) {
  9434. var self=this;
  9435. return String(self) < aString._asString();
  9436. return self;},
  9437. args: ["aString"],
  9438. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString._asString%28%29%3E'),
  9439. messageSends: [],
  9440. referencedClasses: []
  9441. }),
  9442. smalltalk.String);
  9443. smalltalk.addMethod(
  9444. unescape('__lt_eq'),
  9445. smalltalk.method({
  9446. selector: unescape('%3C%3D'),
  9447. category: 'comparing',
  9448. fn: function (aString) {
  9449. var self=this;
  9450. return String(self) <= aString._asString();
  9451. return self;},
  9452. args: ["aString"],
  9453. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString._asString%28%29%3E'),
  9454. messageSends: [],
  9455. referencedClasses: []
  9456. }),
  9457. smalltalk.String);
  9458. smalltalk.addMethod(
  9459. unescape('__eq'),
  9460. smalltalk.method({
  9461. selector: unescape('%3D'),
  9462. category: 'comparing',
  9463. fn: function (aString) {
  9464. var self=this;
  9465. 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}})})();})]));
  9466. return String(self) === String(aString);
  9467. return self;
  9468. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  9469. args: ["aString"],
  9470. 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%3D%20String%28aString%29%3E'),
  9471. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  9472. referencedClasses: []
  9473. }),
  9474. smalltalk.String);
  9475. smalltalk.addMethod(
  9476. unescape('__gt'),
  9477. smalltalk.method({
  9478. selector: unescape('%3E'),
  9479. category: 'comparing',
  9480. fn: function (aString) {
  9481. var self=this;
  9482. return String(self) > aString._asString();
  9483. return self;},
  9484. args: ["aString"],
  9485. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString._asString%28%29%3E'),
  9486. messageSends: [],
  9487. referencedClasses: []
  9488. }),
  9489. smalltalk.String);
  9490. smalltalk.addMethod(
  9491. unescape('__gt_eq'),
  9492. smalltalk.method({
  9493. selector: unescape('%3E%3D'),
  9494. category: 'comparing',
  9495. fn: function (aString) {
  9496. var self=this;
  9497. return String(self) >= aString._asString();
  9498. return self;},
  9499. args: ["aString"],
  9500. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString._asString%28%29%3E'),
  9501. messageSends: [],
  9502. referencedClasses: []
  9503. }),
  9504. smalltalk.String);
  9505. smalltalk.addMethod(
  9506. unescape('_asJSON'),
  9507. smalltalk.method({
  9508. selector: unescape('asJSON'),
  9509. category: 'converting',
  9510. fn: function (){
  9511. var self=this;
  9512. return self;
  9513. return self;},
  9514. args: [],
  9515. source: unescape('asJSON%0A%09%5Eself'),
  9516. messageSends: [],
  9517. referencedClasses: []
  9518. }),
  9519. smalltalk.String);
  9520. smalltalk.addMethod(
  9521. unescape('_asJavaScriptSelector'),
  9522. smalltalk.method({
  9523. selector: unescape('asJavaScriptSelector'),
  9524. category: 'converting',
  9525. fn: function () {
  9526. var self=this;
  9527. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
  9528. return self;},
  9529. args: [],
  9530. source: unescape('asJavaScriptSelector%0A%09%5E%28self%20asSelector%20replace%3A%20%27%5E_%27%20with%3A%20%27%27%29%20replace%3A%20%27_.*%27%20with%3A%20%27%27.'),
  9531. messageSends: ["replace:with:", "asSelector"],
  9532. referencedClasses: []
  9533. }),
  9534. smalltalk.String);
  9535. smalltalk.addMethod(
  9536. unescape('_asJavascript'),
  9537. smalltalk.method({
  9538. selector: unescape('asJavascript'),
  9539. category: 'converting',
  9540. fn: function () {
  9541. var self=this;
  9542. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  9543. return "unescape(\"" + escape(self) + "\")";
  9544. else
  9545. return "\"" + self + "\"";
  9546. ;
  9547. return self;},
  9548. args: [],
  9549. 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'),
  9550. messageSends: [],
  9551. referencedClasses: []
  9552. }),
  9553. smalltalk.String);
  9554. smalltalk.addMethod(
  9555. unescape('_asLowercase'),
  9556. smalltalk.method({
  9557. selector: unescape('asLowercase'),
  9558. category: 'converting',
  9559. fn: function () {
  9560. var self=this;
  9561. return self.toLowerCase();
  9562. return self;},
  9563. args: [],
  9564. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  9565. messageSends: [],
  9566. referencedClasses: []
  9567. }),
  9568. smalltalk.String);
  9569. smalltalk.addMethod(
  9570. unescape('_asNumber'),
  9571. smalltalk.method({
  9572. selector: unescape('asNumber'),
  9573. category: 'converting',
  9574. fn: function () {
  9575. var self=this;
  9576. return Number(self);
  9577. return self;},
  9578. args: [],
  9579. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  9580. messageSends: [],
  9581. referencedClasses: []
  9582. }),
  9583. smalltalk.String);
  9584. smalltalk.addMethod(
  9585. unescape('_asSelector'),
  9586. smalltalk.method({
  9587. selector: unescape('asSelector'),
  9588. category: 'converting',
  9589. fn: function () {
  9590. var self=this;
  9591. var selector=nil;
  9592. (selector=smalltalk.send("_", "__comma", [self]));
  9593. (selector=smalltalk.send(selector, "_replace_with_", [":", "_"]));
  9594. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]));
  9595. (selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]));
  9596. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]));
  9597. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]));
  9598. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]));
  9599. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]));
  9600. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]));
  9601. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]));
  9602. (selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]));
  9603. return selector;
  9604. return self;},
  9605. args: [],
  9606. 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%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  9607. messageSends: [unescape("%2C"), "replace:with:"],
  9608. referencedClasses: []
  9609. }),
  9610. smalltalk.String);
  9611. smalltalk.addMethod(
  9612. unescape('_asString'),
  9613. smalltalk.method({
  9614. selector: unescape('asString'),
  9615. category: 'converting',
  9616. fn: function () {
  9617. var self=this;
  9618. return self;
  9619. return self;},
  9620. args: [],
  9621. source: unescape('asString%0A%09%5Eself'),
  9622. messageSends: [],
  9623. referencedClasses: []
  9624. }),
  9625. smalltalk.String);
  9626. smalltalk.addMethod(
  9627. unescape('_asSymbol'),
  9628. smalltalk.method({
  9629. selector: unescape('asSymbol'),
  9630. category: 'converting',
  9631. fn: function () {
  9632. var self=this;
  9633. return smalltalk.send((smalltalk.Symbol || Symbol), "_lookup_", [self]);
  9634. return self;},
  9635. args: [],
  9636. source: unescape('asSymbol%0A%09%5ESymbol%20lookup%3A%20self'),
  9637. messageSends: ["lookup:"],
  9638. referencedClasses: ["Symbol"]
  9639. }),
  9640. smalltalk.String);
  9641. smalltalk.addMethod(
  9642. unescape('_asUppercase'),
  9643. smalltalk.method({
  9644. selector: unescape('asUppercase'),
  9645. category: 'converting',
  9646. fn: function () {
  9647. var self=this;
  9648. return self.toUpperCase();
  9649. return self;},
  9650. args: [],
  9651. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  9652. messageSends: [],
  9653. referencedClasses: []
  9654. }),
  9655. smalltalk.String);
  9656. smalltalk.addMethod(
  9657. unescape('_asciiValue'),
  9658. smalltalk.method({
  9659. selector: unescape('asciiValue'),
  9660. category: 'accessing',
  9661. fn: function () {
  9662. var self=this;
  9663. return self.charCodeAt(0);;
  9664. return self;},
  9665. args: [],
  9666. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  9667. messageSends: [],
  9668. referencedClasses: []
  9669. }),
  9670. smalltalk.String);
  9671. smalltalk.addMethod(
  9672. unescape('_at_ifAbsent_'),
  9673. smalltalk.method({
  9674. selector: unescape('at%3AifAbsent%3A'),
  9675. category: 'accessing',
  9676. fn: function (anIndex, aBlock) {
  9677. var self=this;
  9678. return self[anIndex - 1] || aBlock();
  9679. return self;},
  9680. args: ["anIndex", "aBlock"],
  9681. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%7C%7C%20aBlock%28%29%3E'),
  9682. messageSends: [],
  9683. referencedClasses: []
  9684. }),
  9685. smalltalk.String);
  9686. smalltalk.addMethod(
  9687. unescape('_copyFrom_to_'),
  9688. smalltalk.method({
  9689. selector: unescape('copyFrom%3Ato%3A'),
  9690. category: 'copying',
  9691. fn: function (anIndex, anotherIndex) {
  9692. var self=this;
  9693. return self.substring(anIndex - 1, anotherIndex);
  9694. return self;},
  9695. args: ["anIndex", "anotherIndex"],
  9696. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  9697. messageSends: [],
  9698. referencedClasses: []
  9699. }),
  9700. smalltalk.String);
  9701. smalltalk.addMethod(
  9702. unescape('_deepCopy'),
  9703. smalltalk.method({
  9704. selector: unescape('deepCopy'),
  9705. category: 'copying',
  9706. fn: function () {
  9707. var self=this;
  9708. return smalltalk.send(self, "_shallowCopy", []);
  9709. return self;},
  9710. args: [],
  9711. source: unescape('deepCopy%0A%09%5Eself%20shallowCopy'),
  9712. messageSends: ["shallowCopy"],
  9713. referencedClasses: []
  9714. }),
  9715. smalltalk.String);
  9716. smalltalk.addMethod(
  9717. unescape('_escaped'),
  9718. smalltalk.method({
  9719. selector: unescape('escaped'),
  9720. category: 'accessing',
  9721. fn: function () {
  9722. var self=this;
  9723. return escape(self);
  9724. return self;},
  9725. args: [],
  9726. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  9727. messageSends: [],
  9728. referencedClasses: []
  9729. }),
  9730. smalltalk.String);
  9731. smalltalk.addMethod(
  9732. unescape('_includesSubString_'),
  9733. smalltalk.method({
  9734. selector: unescape('includesSubString%3A'),
  9735. category: 'testing',
  9736. fn: function (subString) {
  9737. var self=this;
  9738. return self.indexOf(subString) != -1 ;
  9739. return self;},
  9740. args: ["subString"],
  9741. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  9742. messageSends: [],
  9743. referencedClasses: []
  9744. }),
  9745. smalltalk.String);
  9746. smalltalk.addMethod(
  9747. unescape('_isString'),
  9748. smalltalk.method({
  9749. selector: unescape('isString'),
  9750. category: 'testing',
  9751. fn: function () {
  9752. var self=this;
  9753. return true;
  9754. return self;},
  9755. args: [],
  9756. source: unescape('isString%0A%09%5Etrue'),
  9757. messageSends: [],
  9758. referencedClasses: []
  9759. }),
  9760. smalltalk.String);
  9761. smalltalk.addMethod(
  9762. unescape('_join_'),
  9763. smalltalk.method({
  9764. selector: unescape('join%3A'),
  9765. category: 'split join',
  9766. fn: function (aCollection) {
  9767. var self=this;
  9768. 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]);})]);})]);
  9769. return self;},
  9770. args: ["aCollection"],
  9771. 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'),
  9772. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  9773. referencedClasses: ["String"]
  9774. }),
  9775. smalltalk.String);
  9776. smalltalk.addMethod(
  9777. unescape('_lineIndicesDo_'),
  9778. smalltalk.method({
  9779. selector: unescape('lineIndicesDo%3A'),
  9780. category: 'split join',
  9781. fn: function (aBlock) {
  9782. var self=this;
  9783. try{var cr=nil;
  9784. var lf=nil;
  9785. var start=nil;
  9786. var sz=nil;
  9787. var nextLF=nil;
  9788. var nextCR=nil;
  9789. (start=(1));
  9790. (sz=smalltalk.send(self, "_size", []));
  9791. (cr=smalltalk.send((smalltalk.String || String), "_cr", []));
  9792. (nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]));
  9793. (lf=smalltalk.send((smalltalk.String || String), "_lf", []));
  9794. (nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]));
  9795. (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]));})]));})]));})()}})();
  9796. return self;
  9797. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  9798. args: ["aBlock"],
  9799. 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'),
  9800. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  9801. referencedClasses: ["String"]
  9802. }),
  9803. smalltalk.String);
  9804. smalltalk.addMethod(
  9805. unescape('_lineNumber_'),
  9806. smalltalk.method({
  9807. selector: unescape('lineNumber%3A'),
  9808. category: 'split join',
  9809. fn: function (anIndex) {
  9810. var self=this;
  9811. try{var lineCount=nil;
  9812. (lineCount=(0));
  9813. 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])}})})();})]));})]);
  9814. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  9815. return self;
  9816. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  9817. args: ["anIndex"],
  9818. 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'),
  9819. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  9820. referencedClasses: []
  9821. }),
  9822. smalltalk.String);
  9823. smalltalk.addMethod(
  9824. unescape('_lines'),
  9825. smalltalk.method({
  9826. selector: unescape('lines'),
  9827. category: 'split join',
  9828. fn: function () {
  9829. var self=this;
  9830. var lines=nil;
  9831. (lines=smalltalk.send((smalltalk.Array || Array), "_new", []));
  9832. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  9833. return lines;
  9834. return self;},
  9835. args: [],
  9836. 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'),
  9837. messageSends: ["new", "linesDo:", "add:"],
  9838. referencedClasses: ["Array"]
  9839. }),
  9840. smalltalk.String);
  9841. smalltalk.addMethod(
  9842. unescape('_linesDo_'),
  9843. smalltalk.method({
  9844. selector: unescape('linesDo%3A'),
  9845. category: 'split join',
  9846. fn: function (aBlock) {
  9847. var self=this;
  9848. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  9849. return self;},
  9850. args: ["aBlock"],
  9851. 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'),
  9852. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  9853. referencedClasses: []
  9854. }),
  9855. smalltalk.String);
  9856. smalltalk.addMethod(
  9857. unescape('_match_'),
  9858. smalltalk.method({
  9859. selector: unescape('match%3A'),
  9860. category: 'regular expressions',
  9861. fn: function (aRegexp) {
  9862. var self=this;
  9863. return self.search(aRegexp) != -1;
  9864. return self;},
  9865. args: ["aRegexp"],
  9866. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  9867. messageSends: [],
  9868. referencedClasses: []
  9869. }),
  9870. smalltalk.String);
  9871. smalltalk.addMethod(
  9872. unescape('_printNl'),
  9873. smalltalk.method({
  9874. selector: unescape('printNl'),
  9875. category: 'printing',
  9876. fn: function () {
  9877. var self=this;
  9878. console.log(self);
  9879. return self;},
  9880. args: [],
  9881. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  9882. messageSends: [],
  9883. referencedClasses: []
  9884. }),
  9885. smalltalk.String);
  9886. smalltalk.addMethod(
  9887. unescape('_printString'),
  9888. smalltalk.method({
  9889. selector: unescape('printString'),
  9890. category: 'printing',
  9891. fn: function () {
  9892. var self=this;
  9893. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  9894. return self;},
  9895. args: [],
  9896. source: unescape('printString%0A%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  9897. messageSends: [unescape("%2C")],
  9898. referencedClasses: []
  9899. }),
  9900. smalltalk.String);
  9901. smalltalk.addMethod(
  9902. unescape('_replace_with_'),
  9903. smalltalk.method({
  9904. selector: unescape('replace%3Awith%3A'),
  9905. category: 'regular expressions',
  9906. fn: function (aString, anotherString) {
  9907. var self=this;
  9908. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  9909. return self;},
  9910. args: ["aString", "anotherString"],
  9911. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  9912. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  9913. referencedClasses: ["RegularExpression"]
  9914. }),
  9915. smalltalk.String);
  9916. smalltalk.addMethod(
  9917. unescape('_replaceRegexp_with_'),
  9918. smalltalk.method({
  9919. selector: unescape('replaceRegexp%3Awith%3A'),
  9920. category: 'regular expressions',
  9921. fn: function (aRegexp, aString) {
  9922. var self=this;
  9923. return self.replace(aRegexp, aString);
  9924. return self;},
  9925. args: ["aRegexp", "aString"],
  9926. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  9927. messageSends: [],
  9928. referencedClasses: []
  9929. }),
  9930. smalltalk.String);
  9931. smalltalk.addMethod(
  9932. unescape('_reversed'),
  9933. smalltalk.method({
  9934. selector: unescape('reversed'),
  9935. category: 'converting',
  9936. fn: function () {
  9937. var self=this;
  9938. return self.split("").reverse().join("");
  9939. return self;},
  9940. args: [],
  9941. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  9942. messageSends: [],
  9943. referencedClasses: []
  9944. }),
  9945. smalltalk.String);
  9946. smalltalk.addMethod(
  9947. unescape('_shallowCopy'),
  9948. smalltalk.method({
  9949. selector: unescape('shallowCopy'),
  9950. category: 'copying',
  9951. fn: function () {
  9952. var self=this;
  9953. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  9954. return self;},
  9955. args: [],
  9956. source: unescape('shallowCopy%0A%09%5Eself%20class%20fromString%3A%20self'),
  9957. messageSends: ["fromString:", "class"],
  9958. referencedClasses: []
  9959. }),
  9960. smalltalk.String);
  9961. smalltalk.addMethod(
  9962. unescape('_size'),
  9963. smalltalk.method({
  9964. selector: unescape('size'),
  9965. category: 'accessing',
  9966. fn: function () {
  9967. var self=this;
  9968. return self.length;
  9969. return self;},
  9970. args: [],
  9971. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  9972. messageSends: [],
  9973. referencedClasses: []
  9974. }),
  9975. smalltalk.String);
  9976. smalltalk.addMethod(
  9977. unescape('_tokenize_'),
  9978. smalltalk.method({
  9979. selector: unescape('tokenize%3A'),
  9980. category: 'converting',
  9981. fn: function (aString) {
  9982. var self=this;
  9983. return self.split(aString);
  9984. return self;},
  9985. args: ["aString"],
  9986. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  9987. messageSends: [],
  9988. referencedClasses: []
  9989. }),
  9990. smalltalk.String);
  9991. smalltalk.addMethod(
  9992. unescape('_trimBoth'),
  9993. smalltalk.method({
  9994. selector: unescape('trimBoth'),
  9995. category: 'regular expressions',
  9996. fn: function () {
  9997. var self=this;
  9998. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  9999. return self;},
  10000. args: [],
  10001. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  10002. messageSends: ["trimBoth:"],
  10003. referencedClasses: []
  10004. }),
  10005. smalltalk.String);
  10006. smalltalk.addMethod(
  10007. unescape('_trimBoth_'),
  10008. smalltalk.method({
  10009. selector: unescape('trimBoth%3A'),
  10010. category: 'regular expressions',
  10011. fn: function (separators) {
  10012. var self=this;
  10013. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  10014. return self;},
  10015. args: ["separators"],
  10016. source: unescape('trimBoth%3A%20separators%0A%0A%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  10017. messageSends: ["trimRight:", "trimLeft:"],
  10018. referencedClasses: []
  10019. }),
  10020. smalltalk.String);
  10021. smalltalk.addMethod(
  10022. unescape('_trimLeft'),
  10023. smalltalk.method({
  10024. selector: unescape('trimLeft'),
  10025. category: 'regular expressions',
  10026. fn: function () {
  10027. var self=this;
  10028. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  10029. return self;},
  10030. args: [],
  10031. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  10032. messageSends: ["trimLeft:"],
  10033. referencedClasses: []
  10034. }),
  10035. smalltalk.String);
  10036. smalltalk.addMethod(
  10037. unescape('_trimLeft_'),
  10038. smalltalk.method({
  10039. selector: unescape('trimLeft%3A'),
  10040. category: 'regular expressions',
  10041. fn: function (separators) {
  10042. var self=this;
  10043. 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"]), ""]);
  10044. return self;},
  10045. args: ["separators"],
  10046. source: unescape('trimLeft%3A%20separators%0A%0A%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'),
  10047. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  10048. referencedClasses: ["RegularExpression"]
  10049. }),
  10050. smalltalk.String);
  10051. smalltalk.addMethod(
  10052. unescape('_trimRight'),
  10053. smalltalk.method({
  10054. selector: unescape('trimRight'),
  10055. category: 'regular expressions',
  10056. fn: function () {
  10057. var self=this;
  10058. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  10059. return self;},
  10060. args: [],
  10061. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  10062. messageSends: ["trimRight:"],
  10063. referencedClasses: []
  10064. }),
  10065. smalltalk.String);
  10066. smalltalk.addMethod(
  10067. unescape('_trimRight_'),
  10068. smalltalk.method({
  10069. selector: unescape('trimRight%3A'),
  10070. category: 'regular expressions',
  10071. fn: function (separators) {
  10072. var self=this;
  10073. 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"]), ""]);
  10074. return self;},
  10075. args: ["separators"],
  10076. source: unescape('trimRight%3A%20separators%0A%0A%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'),
  10077. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  10078. referencedClasses: ["RegularExpression"]
  10079. }),
  10080. smalltalk.String);
  10081. smalltalk.addMethod(
  10082. unescape('_unescaped'),
  10083. smalltalk.method({
  10084. selector: unescape('unescaped'),
  10085. category: 'accessing',
  10086. fn: function () {
  10087. var self=this;
  10088. return unescape(self);
  10089. return self;},
  10090. args: [],
  10091. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  10092. messageSends: [],
  10093. referencedClasses: []
  10094. }),
  10095. smalltalk.String);
  10096. smalltalk.addMethod(
  10097. unescape('_cr'),
  10098. smalltalk.method({
  10099. selector: unescape('cr'),
  10100. category: 'accessing',
  10101. fn: function () {
  10102. var self=this;
  10103. return '\r';
  10104. return self;},
  10105. args: [],
  10106. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  10107. messageSends: [],
  10108. referencedClasses: []
  10109. }),
  10110. smalltalk.String.klass);
  10111. smalltalk.addMethod(
  10112. unescape('_crlf'),
  10113. smalltalk.method({
  10114. selector: unescape('crlf'),
  10115. category: 'accessing',
  10116. fn: function () {
  10117. var self=this;
  10118. return '\r\n';
  10119. return self;},
  10120. args: [],
  10121. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  10122. messageSends: [],
  10123. referencedClasses: []
  10124. }),
  10125. smalltalk.String.klass);
  10126. smalltalk.addMethod(
  10127. unescape('_fromString_'),
  10128. smalltalk.method({
  10129. selector: unescape('fromString%3A'),
  10130. category: 'instance creation',
  10131. fn: function (aString) {
  10132. var self=this;
  10133. return new self.fn(aString);
  10134. return self;},
  10135. args: ["aString"],
  10136. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  10137. messageSends: [],
  10138. referencedClasses: []
  10139. }),
  10140. smalltalk.String.klass);
  10141. smalltalk.addMethod(
  10142. unescape('_lf'),
  10143. smalltalk.method({
  10144. selector: unescape('lf'),
  10145. category: 'accessing',
  10146. fn: function () {
  10147. var self=this;
  10148. return '\n';
  10149. return self;},
  10150. args: [],
  10151. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  10152. messageSends: [],
  10153. referencedClasses: []
  10154. }),
  10155. smalltalk.String.klass);
  10156. smalltalk.addMethod(
  10157. unescape('_space'),
  10158. smalltalk.method({
  10159. selector: unescape('space'),
  10160. category: 'accessing',
  10161. fn: function () {
  10162. var self=this;
  10163. return ' ';
  10164. return self;},
  10165. args: [],
  10166. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  10167. messageSends: [],
  10168. referencedClasses: []
  10169. }),
  10170. smalltalk.String.klass);
  10171. smalltalk.addMethod(
  10172. unescape('_streamClass'),
  10173. smalltalk.method({
  10174. selector: unescape('streamClass'),
  10175. category: 'accessing',
  10176. fn: function () {
  10177. var self=this;
  10178. return (smalltalk.StringStream || StringStream);
  10179. return self;},
  10180. args: [],
  10181. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  10182. messageSends: [],
  10183. referencedClasses: ["StringStream"]
  10184. }),
  10185. smalltalk.String.klass);
  10186. smalltalk.addMethod(
  10187. unescape('_streamContents_'),
  10188. smalltalk.method({
  10189. selector: unescape('streamContents%3A'),
  10190. category: 'instance creation',
  10191. fn: function (blockWithArg) {
  10192. var self=this;
  10193. var stream=nil;
  10194. (stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]));
  10195. smalltalk.send(blockWithArg, "_value_", [stream]);
  10196. return smalltalk.send(stream, "_contents", []);
  10197. return self;},
  10198. args: ["blockWithArg"],
  10199. 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'),
  10200. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  10201. referencedClasses: ["String"]
  10202. }),
  10203. smalltalk.String.klass);
  10204. smalltalk.addMethod(
  10205. unescape('_tab'),
  10206. smalltalk.method({
  10207. selector: unescape('tab'),
  10208. category: 'accessing',
  10209. fn: function () {
  10210. var self=this;
  10211. return '\t';
  10212. return self;},
  10213. args: [],
  10214. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  10215. messageSends: [],
  10216. referencedClasses: []
  10217. }),
  10218. smalltalk.String.klass);
  10219. smalltalk.addMethod(
  10220. unescape('_value_'),
  10221. smalltalk.method({
  10222. selector: unescape('value%3A'),
  10223. category: 'instance creation',
  10224. fn: function (aUTFCharCode) {
  10225. var self=this;
  10226. return String.fromCharCode(aUTFCharCode);;
  10227. return self;},
  10228. args: ["aUTFCharCode"],
  10229. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  10230. messageSends: [],
  10231. referencedClasses: []
  10232. }),
  10233. smalltalk.String.klass);
  10234. smalltalk.addClass('Symbol', smalltalk.CharacterArray, [], 'Kernel-Collections');
  10235. smalltalk.addMethod(
  10236. unescape('__lt'),
  10237. smalltalk.method({
  10238. selector: unescape('%3C'),
  10239. category: 'comparing',
  10240. fn: function (aSymbol) {
  10241. var self=this;
  10242. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(aSymbol, "_asString", [])]));
  10243. return self;},
  10244. args: ["aSymbol"],
  10245. source: unescape('%3C%20aSymbol%0A%09%5Eself%20asString%20%3C%20aSymbol%20asString'),
  10246. messageSends: [unescape("%3C"), "asString"],
  10247. referencedClasses: []
  10248. }),
  10249. smalltalk.Symbol);
  10250. smalltalk.addMethod(
  10251. unescape('__lt_eq'),
  10252. smalltalk.method({
  10253. selector: unescape('%3C%3D'),
  10254. category: 'comparing',
  10255. fn: function (aSymbol) {
  10256. var self=this;
  10257. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
  10258. return self;},
  10259. args: ["aSymbol"],
  10260. source: unescape('%3C%3D%20aSymbol%0A%09%5Eself%20asString%20%3C%3D%20aSymbol%20asString'),
  10261. messageSends: [unescape("%3C%3D"), "asString"],
  10262. referencedClasses: []
  10263. }),
  10264. smalltalk.Symbol);
  10265. smalltalk.addMethod(
  10266. unescape('__eq'),
  10267. smalltalk.method({
  10268. selector: unescape('%3D'),
  10269. category: 'comparing',
  10270. fn: function (aSymbol) {
  10271. var self=this;
  10272. try{((($receiver = smalltalk.send(smalltalk.send(aSymbol, "_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}})})();})]));
  10273. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_asString", []), "__eq", [smalltalk.send(aSymbol, "_asString", [])])}})})();
  10274. return self;
  10275. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  10276. args: ["aSymbol"],
  10277. source: unescape('%3D%20aSymbol%0A%09aSymbol%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20asString%20%3D%20aSymbol%20asString'),
  10278. messageSends: ["ifFalse:", unescape("%3D"), "class", "asString"],
  10279. referencedClasses: []
  10280. }),
  10281. smalltalk.Symbol);
  10282. smalltalk.addMethod(
  10283. unescape('__gt'),
  10284. smalltalk.method({
  10285. selector: unescape('%3E'),
  10286. category: 'comparing',
  10287. fn: function (aSymbol) {
  10288. var self=this;
  10289. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(aSymbol, "_asString", [])]));
  10290. return self;},
  10291. args: ["aSymbol"],
  10292. source: unescape('%3E%20aSymbol%0A%09%5Eself%20asString%20%3E%20aSymbol%20asString'),
  10293. messageSends: [unescape("%3E"), "asString"],
  10294. referencedClasses: []
  10295. }),
  10296. smalltalk.Symbol);
  10297. smalltalk.addMethod(
  10298. unescape('__gt_eq'),
  10299. smalltalk.method({
  10300. selector: unescape('%3E%3D'),
  10301. category: 'comparing',
  10302. fn: function (aSymbol) {
  10303. var self=this;
  10304. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
  10305. return self;},
  10306. args: ["aSymbol"],
  10307. source: unescape('%3E%3D%20aSymbol%0A%09%5Eself%20asString%20%3E%3D%20aSymbol%20asString'),
  10308. messageSends: [unescape("%3E%3D"), "asString"],
  10309. referencedClasses: []
  10310. }),
  10311. smalltalk.Symbol);
  10312. smalltalk.addMethod(
  10313. unescape('_asJSON'),
  10314. smalltalk.method({
  10315. selector: unescape('asJSON'),
  10316. category: 'converting',
  10317. fn: function (){
  10318. var self=this;
  10319. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asJSON", []);
  10320. return self;},
  10321. args: [],
  10322. source: unescape('asJSON%0A%09%5Eself%20asString%20asJSON'),
  10323. messageSends: ["asJSON", "asString"],
  10324. referencedClasses: []
  10325. }),
  10326. smalltalk.Symbol);
  10327. smalltalk.addMethod(
  10328. unescape('_asJavascript'),
  10329. smalltalk.method({
  10330. selector: unescape('asJavascript'),
  10331. category: 'converting',
  10332. fn: function () {
  10333. var self=this;
  10334. return smalltalk.send(smalltalk.send(unescape("smalltalk.symbolFor%28%22"), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%22%29")]);
  10335. return self;},
  10336. args: [],
  10337. source: unescape('asJavascript%0A%09%5E%27smalltalk.symbolFor%28%22%27%2C%20self%20asString%2C%20%27%22%29%27'),
  10338. messageSends: [unescape("%2C"), "asString"],
  10339. referencedClasses: []
  10340. }),
  10341. smalltalk.Symbol);
  10342. smalltalk.addMethod(
  10343. unescape('_asSelector'),
  10344. smalltalk.method({
  10345. selector: unescape('asSelector'),
  10346. category: 'converting',
  10347. fn: function () {
  10348. var self=this;
  10349. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asSelector", []);
  10350. return self;},
  10351. args: [],
  10352. source: unescape('asSelector%0A%09%5Eself%20asString%20asSelector'),
  10353. messageSends: ["asSelector", "asString"],
  10354. referencedClasses: []
  10355. }),
  10356. smalltalk.Symbol);
  10357. smalltalk.addMethod(
  10358. unescape('_asString'),
  10359. smalltalk.method({
  10360. selector: unescape('asString'),
  10361. category: 'converting',
  10362. fn: function () {
  10363. var self=this;
  10364. return self.value;
  10365. return self;},
  10366. args: [],
  10367. source: unescape('asString%0A%09%3Creturn%20self.value%3E'),
  10368. messageSends: [],
  10369. referencedClasses: []
  10370. }),
  10371. smalltalk.Symbol);
  10372. smalltalk.addMethod(
  10373. unescape('_asSymbol'),
  10374. smalltalk.method({
  10375. selector: unescape('asSymbol'),
  10376. category: 'converting',
  10377. fn: function () {
  10378. var self=this;
  10379. return self;
  10380. return self;},
  10381. args: [],
  10382. source: unescape('asSymbol%0A%09%5Eself'),
  10383. messageSends: [],
  10384. referencedClasses: []
  10385. }),
  10386. smalltalk.Symbol);
  10387. smalltalk.addMethod(
  10388. unescape('_at_ifAbsent_'),
  10389. smalltalk.method({
  10390. selector: unescape('at%3AifAbsent%3A'),
  10391. category: 'accessing',
  10392. fn: function (anIndex, aBlock) {
  10393. var self=this;
  10394. return smalltalk.send(smalltalk.send(self, "_asString", []), "_at_ifAbsent_", [anIndex, aBlock]);
  10395. return self;},
  10396. args: ["anIndex", "aBlock"],
  10397. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%5Eself%20asString%20at%3A%20anIndex%20ifAbsent%3A%20aBlock'),
  10398. messageSends: ["at:ifAbsent:", "asString"],
  10399. referencedClasses: []
  10400. }),
  10401. smalltalk.Symbol);
  10402. smalltalk.addMethod(
  10403. unescape('_copyFrom_to_'),
  10404. smalltalk.method({
  10405. selector: unescape('copyFrom%3Ato%3A'),
  10406. category: 'copying',
  10407. fn: function (anIndex, anotherIndex) {
  10408. var self=this;
  10409. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_copyFrom_to_", [anIndex, anotherIndex])]);
  10410. return self;},
  10411. args: ["anIndex", "anotherIndex"],
  10412. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%5Eself%20class%20fromString%3A%20%28self%20asString%20copyFrom%3A%20anIndex%20to%3A%20anotherIndex%29'),
  10413. messageSends: ["fromString:", "class", "copyFrom:to:", "asString"],
  10414. referencedClasses: []
  10415. }),
  10416. smalltalk.Symbol);
  10417. smalltalk.addMethod(
  10418. unescape('_deepCopy'),
  10419. smalltalk.method({
  10420. selector: unescape('deepCopy'),
  10421. category: 'copying',
  10422. fn: function () {
  10423. var self=this;
  10424. return self;
  10425. return self;},
  10426. args: [],
  10427. source: unescape('deepCopy%0A%09%5Eself'),
  10428. messageSends: [],
  10429. referencedClasses: []
  10430. }),
  10431. smalltalk.Symbol);
  10432. smalltalk.addMethod(
  10433. unescape('_isSymbol'),
  10434. smalltalk.method({
  10435. selector: unescape('isSymbol'),
  10436. category: 'printing',
  10437. fn: function () {
  10438. var self=this;
  10439. return true;
  10440. return self;},
  10441. args: [],
  10442. source: unescape('isSymbol%0A%09%5Etrue'),
  10443. messageSends: [],
  10444. referencedClasses: []
  10445. }),
  10446. smalltalk.Symbol);
  10447. smalltalk.addMethod(
  10448. unescape('_printString'),
  10449. smalltalk.method({
  10450. selector: unescape('printString'),
  10451. category: 'printing',
  10452. fn: function () {
  10453. var self=this;
  10454. return smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(self, "_asString", [])]);
  10455. return self;},
  10456. args: [],
  10457. source: unescape('printString%0A%09%5E%27%23%27%2C%20self%20asString'),
  10458. messageSends: [unescape("%2C"), "asString"],
  10459. referencedClasses: []
  10460. }),
  10461. smalltalk.Symbol);
  10462. smalltalk.addMethod(
  10463. unescape('_shallowCopy'),
  10464. smalltalk.method({
  10465. selector: unescape('shallowCopy'),
  10466. category: 'copying',
  10467. fn: function () {
  10468. var self=this;
  10469. return self;
  10470. return self;},
  10471. args: [],
  10472. source: unescape('shallowCopy%0A%09%5Eself'),
  10473. messageSends: [],
  10474. referencedClasses: []
  10475. }),
  10476. smalltalk.Symbol);
  10477. smalltalk.addMethod(
  10478. unescape('_size'),
  10479. smalltalk.method({
  10480. selector: unescape('size'),
  10481. category: 'accessing',
  10482. fn: function () {
  10483. var self=this;
  10484. return smalltalk.send(smalltalk.send(self, "_asString", []), "_size", []);
  10485. return self;},
  10486. args: [],
  10487. source: unescape('size%0A%09%5Eself%20asString%20size'),
  10488. messageSends: ["size", "asString"],
  10489. referencedClasses: []
  10490. }),
  10491. smalltalk.Symbol);
  10492. smalltalk.addMethod(
  10493. unescape('_basicNew'),
  10494. smalltalk.method({
  10495. selector: unescape('basicNew'),
  10496. category: 'instance creation',
  10497. fn: function () {
  10498. var self=this;
  10499. smalltalk.send(self, "_shouldNotImplement", []);
  10500. return self;},
  10501. args: [],
  10502. source: unescape('basicNew%0A%09self%20shouldNotImplement'),
  10503. messageSends: ["shouldNotImplement"],
  10504. referencedClasses: []
  10505. }),
  10506. smalltalk.Symbol.klass);
  10507. smalltalk.addMethod(
  10508. unescape('_fromString_'),
  10509. smalltalk.method({
  10510. selector: unescape('fromString%3A'),
  10511. category: 'instance creation',
  10512. fn: function (aString) {
  10513. var self=this;
  10514. return smalltalk.send(self, "_lookup_", [aString]);
  10515. return self;},
  10516. args: ["aString"],
  10517. source: unescape('fromString%3A%20aString%0A%09%5Eself%20lookup%3A%20aString'),
  10518. messageSends: ["lookup:"],
  10519. referencedClasses: []
  10520. }),
  10521. smalltalk.Symbol.klass);
  10522. smalltalk.addMethod(
  10523. unescape('_lookup_'),
  10524. smalltalk.method({
  10525. selector: unescape('lookup%3A'),
  10526. category: 'instance creation',
  10527. fn: function (aString) {
  10528. var self=this;
  10529. return smalltalk.symbolFor(aString);;
  10530. return self;},
  10531. args: ["aString"],
  10532. source: unescape('lookup%3A%20aString%0A%09%3Creturn%20smalltalk.symbolFor%28aString%29%3B%3E'),
  10533. messageSends: [],
  10534. referencedClasses: []
  10535. }),
  10536. smalltalk.Symbol.klass);
  10537. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel-Collections');
  10538. smalltalk.addMethod(
  10539. unescape('__eq'),
  10540. smalltalk.method({
  10541. selector: unescape('%3D'),
  10542. category: 'comparing',
  10543. fn: function (aCollection) {
  10544. var self=this;
  10545. 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", [])]);})]);
  10546. return self;},
  10547. args: ["aCollection"],
  10548. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09elements%20%3D%20aCollection%20asArray%5D'),
  10549. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  10550. referencedClasses: []
  10551. }),
  10552. smalltalk.Set);
  10553. smalltalk.addMethod(
  10554. unescape('_add_'),
  10555. smalltalk.method({
  10556. selector: unescape('add%3A'),
  10557. category: 'adding/removing',
  10558. fn: function (anObject) {
  10559. var self=this;
  10560. var found;
  10561. for(var i=0; i < self['@elements'].length; i++) {
  10562. if(anObject == self['@elements'][i]) {
  10563. found = true;
  10564. break;
  10565. }
  10566. }
  10567. if(!found) {self['@elements'].push(anObject)}
  10568. ;
  10569. return self;},
  10570. args: ["anObject"],
  10571. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%3D0%3B%20i%20%3C%20self%5B%27@elements%27%5D.length%3B%20i++%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'),
  10572. messageSends: [],
  10573. referencedClasses: []
  10574. }),
  10575. smalltalk.Set);
  10576. smalltalk.addMethod(
  10577. unescape('_asArray'),
  10578. smalltalk.method({
  10579. selector: unescape('asArray'),
  10580. category: 'converting',
  10581. fn: function () {
  10582. var self=this;
  10583. return smalltalk.send(self['@elements'], "_copy", []);
  10584. return self;},
  10585. args: [],
  10586. source: unescape('asArray%0A%09%5Eelements%20copy'),
  10587. messageSends: ["copy"],
  10588. referencedClasses: []
  10589. }),
  10590. smalltalk.Set);
  10591. smalltalk.addMethod(
  10592. unescape('_detect_ifNone_'),
  10593. smalltalk.method({
  10594. selector: unescape('detect%3AifNone%3A'),
  10595. category: 'enumerating',
  10596. fn: function (aBlock, anotherBlock) {
  10597. var self=this;
  10598. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  10599. return self;},
  10600. args: ["aBlock", "anotherBlock"],
  10601. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  10602. messageSends: ["detect:ifNone:"],
  10603. referencedClasses: []
  10604. }),
  10605. smalltalk.Set);
  10606. smalltalk.addMethod(
  10607. unescape('_do_'),
  10608. smalltalk.method({
  10609. selector: unescape('do%3A'),
  10610. category: 'enumerating',
  10611. fn: function (aBlock) {
  10612. var self=this;
  10613. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  10614. return self;},
  10615. args: ["aBlock"],
  10616. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  10617. messageSends: ["do:"],
  10618. referencedClasses: []
  10619. }),
  10620. smalltalk.Set);
  10621. smalltalk.addMethod(
  10622. unescape('_includes_'),
  10623. smalltalk.method({
  10624. selector: unescape('includes%3A'),
  10625. category: 'testing',
  10626. fn: function (anObject) {
  10627. var self=this;
  10628. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  10629. return self;},
  10630. args: ["anObject"],
  10631. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  10632. messageSends: ["includes:"],
  10633. referencedClasses: []
  10634. }),
  10635. smalltalk.Set);
  10636. smalltalk.addMethod(
  10637. unescape('_initialize'),
  10638. smalltalk.method({
  10639. selector: unescape('initialize'),
  10640. category: 'initialization',
  10641. fn: function () {
  10642. var self=this;
  10643. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  10644. (self['@elements']=[]);
  10645. return self;},
  10646. args: [],
  10647. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  10648. messageSends: ["initialize"],
  10649. referencedClasses: []
  10650. }),
  10651. smalltalk.Set);
  10652. smalltalk.addMethod(
  10653. unescape('_remove_'),
  10654. smalltalk.method({
  10655. selector: unescape('remove%3A'),
  10656. category: 'adding/removing',
  10657. fn: function (anObject) {
  10658. var self=this;
  10659. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  10660. return self;},
  10661. args: ["anObject"],
  10662. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  10663. messageSends: ["remove:"],
  10664. referencedClasses: []
  10665. }),
  10666. smalltalk.Set);
  10667. smalltalk.addMethod(
  10668. unescape('_select_'),
  10669. smalltalk.method({
  10670. selector: unescape('select%3A'),
  10671. category: 'enumerating',
  10672. fn: function (aBlock) {
  10673. var self=this;
  10674. var collection=nil;
  10675. (collection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []));
  10676. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(collection, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(collection, "_add_", [each]);})]));})]);
  10677. return collection;
  10678. return self;},
  10679. args: ["aBlock"],
  10680. source: unescape('select%3A%20aBlock%0A%09%7C%20collection%20%7C%0A%09collection%20%3A%3D%20self%20class%20new.%20%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09%09collection%20add%3A%20each%5D%5D.%0A%09%5Ecollection'),
  10681. messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"],
  10682. referencedClasses: []
  10683. }),
  10684. smalltalk.Set);
  10685. smalltalk.addMethod(
  10686. unescape('_size'),
  10687. smalltalk.method({
  10688. selector: unescape('size'),
  10689. category: 'accessing',
  10690. fn: function () {
  10691. var self=this;
  10692. return smalltalk.send(self['@elements'], "_size", []);
  10693. return self;},
  10694. args: [],
  10695. source: unescape('size%0A%09%5Eelements%20size'),
  10696. messageSends: ["size"],
  10697. referencedClasses: []
  10698. }),
  10699. smalltalk.Set);
  10700. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel-Collections');
  10701. smalltalk.addMethod(
  10702. unescape('_compile_'),
  10703. smalltalk.method({
  10704. selector: unescape('compile%3A'),
  10705. category: 'evaluating',
  10706. fn: function (aString) {
  10707. var self=this;
  10708. return self.compile(aString);
  10709. return self;},
  10710. args: ["aString"],
  10711. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  10712. messageSends: [],
  10713. referencedClasses: []
  10714. }),
  10715. smalltalk.RegularExpression);
  10716. smalltalk.addMethod(
  10717. unescape('_exec_'),
  10718. smalltalk.method({
  10719. selector: unescape('exec%3A'),
  10720. category: 'evaluating',
  10721. fn: function (aString) {
  10722. var self=this;
  10723. return self.exec(aString) || nil;
  10724. return self;},
  10725. args: ["aString"],
  10726. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  10727. messageSends: [],
  10728. referencedClasses: []
  10729. }),
  10730. smalltalk.RegularExpression);
  10731. smalltalk.addMethod(
  10732. unescape('_test_'),
  10733. smalltalk.method({
  10734. selector: unescape('test%3A'),
  10735. category: 'evaluating',
  10736. fn: function (aString) {
  10737. var self=this;
  10738. return self.test(aString);
  10739. return self;},
  10740. args: ["aString"],
  10741. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  10742. messageSends: [],
  10743. referencedClasses: []
  10744. }),
  10745. smalltalk.RegularExpression);
  10746. smalltalk.addMethod(
  10747. unescape('_fromString_'),
  10748. smalltalk.method({
  10749. selector: unescape('fromString%3A'),
  10750. category: 'instance creation',
  10751. fn: function (aString) {
  10752. var self=this;
  10753. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  10754. return self;},
  10755. args: ["aString"],
  10756. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  10757. messageSends: ["fromString:flag:"],
  10758. referencedClasses: []
  10759. }),
  10760. smalltalk.RegularExpression.klass);
  10761. smalltalk.addMethod(
  10762. unescape('_fromString_flag_'),
  10763. smalltalk.method({
  10764. selector: unescape('fromString%3Aflag%3A'),
  10765. category: 'instance creation',
  10766. fn: function (aString, anotherString) {
  10767. var self=this;
  10768. return new RegExp(aString, anotherString);
  10769. return self;},
  10770. args: ["aString", "anotherString"],
  10771. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  10772. messageSends: [],
  10773. referencedClasses: []
  10774. }),
  10775. smalltalk.RegularExpression.klass);
  10776. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
  10777. smalltalk.addMethod(
  10778. unescape('_atEnd'),
  10779. smalltalk.method({
  10780. selector: unescape('atEnd'),
  10781. category: 'testing',
  10782. fn: function () {
  10783. var self=this;
  10784. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  10785. return self;},
  10786. args: [],
  10787. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  10788. messageSends: [unescape("%3D"), "position", "size"],
  10789. referencedClasses: []
  10790. }),
  10791. smalltalk.Stream);
  10792. smalltalk.addMethod(
  10793. unescape('_atStart'),
  10794. smalltalk.method({
  10795. selector: unescape('atStart'),
  10796. category: 'testing',
  10797. fn: function () {
  10798. var self=this;
  10799. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  10800. return self;},
  10801. args: [],
  10802. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  10803. messageSends: [unescape("%3D"), "position"],
  10804. referencedClasses: []
  10805. }),
  10806. smalltalk.Stream);
  10807. smalltalk.addMethod(
  10808. unescape('_close'),
  10809. smalltalk.method({
  10810. selector: unescape('close'),
  10811. category: 'actions',
  10812. fn: function () {
  10813. var self=this;
  10814. return self;},
  10815. args: [],
  10816. source: unescape('close'),
  10817. messageSends: [],
  10818. referencedClasses: []
  10819. }),
  10820. smalltalk.Stream);
  10821. smalltalk.addMethod(
  10822. unescape('_collection'),
  10823. smalltalk.method({
  10824. selector: unescape('collection'),
  10825. category: 'accessing',
  10826. fn: function () {
  10827. var self=this;
  10828. return self['@collection'];
  10829. return self;},
  10830. args: [],
  10831. source: unescape('collection%0A%09%5Ecollection'),
  10832. messageSends: [],
  10833. referencedClasses: []
  10834. }),
  10835. smalltalk.Stream);
  10836. smalltalk.addMethod(
  10837. unescape('_contents'),
  10838. smalltalk.method({
  10839. selector: unescape('contents'),
  10840. category: 'accessing',
  10841. fn: function () {
  10842. var self=this;
  10843. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  10844. return self;},
  10845. args: [],
  10846. 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'),
  10847. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  10848. referencedClasses: []
  10849. }),
  10850. smalltalk.Stream);
  10851. smalltalk.addMethod(
  10852. unescape('_do_'),
  10853. smalltalk.method({
  10854. selector: unescape('do%3A'),
  10855. category: 'enumerating',
  10856. fn: function (aBlock) {
  10857. var self=this;
  10858. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  10859. return self;},
  10860. args: ["aBlock"],
  10861. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  10862. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  10863. referencedClasses: []
  10864. }),
  10865. smalltalk.Stream);
  10866. smalltalk.addMethod(
  10867. unescape('_flush'),
  10868. smalltalk.method({
  10869. selector: unescape('flush'),
  10870. category: 'actions',
  10871. fn: function () {
  10872. var self=this;
  10873. return self;},
  10874. args: [],
  10875. source: unescape('flush'),
  10876. messageSends: [],
  10877. referencedClasses: []
  10878. }),
  10879. smalltalk.Stream);
  10880. smalltalk.addMethod(
  10881. unescape('_isEmpty'),
  10882. smalltalk.method({
  10883. selector: unescape('isEmpty'),
  10884. category: 'testing',
  10885. fn: function () {
  10886. var self=this;
  10887. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  10888. return self;},
  10889. args: [],
  10890. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  10891. messageSends: [unescape("%3D"), "size"],
  10892. referencedClasses: []
  10893. }),
  10894. smalltalk.Stream);
  10895. smalltalk.addMethod(
  10896. unescape('_next'),
  10897. smalltalk.method({
  10898. selector: unescape('next'),
  10899. category: 'reading',
  10900. fn: function () {
  10901. var self=this;
  10902. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return nil;})() : (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return nil;}), (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})]));
  10903. return self;},
  10904. args: [],
  10905. source: unescape('next%0A%09%5Eself%20atEnd%20%0A%09%09ifTrue%3A%20%5Bnil%5D%0A%09%09ifFalse%3A%20%5B%0A%09%09%09self%20position%3A%20self%20position%20+%201.%20%0A%09%09%09collection%20at%3A%20self%20position%5D'),
  10906. messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", unescape("+"), "position", "at:"],
  10907. referencedClasses: []
  10908. }),
  10909. smalltalk.Stream);
  10910. smalltalk.addMethod(
  10911. unescape('_next_'),
  10912. smalltalk.method({
  10913. selector: unescape('next%3A'),
  10914. category: 'reading',
  10915. fn: function (anInteger) {
  10916. var self=this;
  10917. var tempCollection=nil;
  10918. (tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
  10919. 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", [])]);})]));})]);
  10920. return tempCollection;
  10921. return self;},
  10922. args: ["anInteger"],
  10923. 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'),
  10924. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  10925. referencedClasses: []
  10926. }),
  10927. smalltalk.Stream);
  10928. smalltalk.addMethod(
  10929. unescape('_nextPut_'),
  10930. smalltalk.method({
  10931. selector: unescape('nextPut%3A'),
  10932. category: 'writing',
  10933. fn: function (anObject) {
  10934. var self=this;
  10935. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  10936. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  10937. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  10938. return self;},
  10939. args: ["anObject"],
  10940. 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'),
  10941. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  10942. referencedClasses: []
  10943. }),
  10944. smalltalk.Stream);
  10945. smalltalk.addMethod(
  10946. unescape('_nextPutAll_'),
  10947. smalltalk.method({
  10948. selector: unescape('nextPutAll%3A'),
  10949. category: 'writing',
  10950. fn: function (aCollection) {
  10951. var self=this;
  10952. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  10953. return self;},
  10954. args: ["aCollection"],
  10955. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  10956. messageSends: ["do:", "nextPut:"],
  10957. referencedClasses: []
  10958. }),
  10959. smalltalk.Stream);
  10960. smalltalk.addMethod(
  10961. unescape('_peek'),
  10962. smalltalk.method({
  10963. selector: unescape('peek'),
  10964. category: 'reading',
  10965. fn: function () {
  10966. var self=this;
  10967. 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)]))]);})]));
  10968. return self;},
  10969. args: [],
  10970. 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'),
  10971. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  10972. referencedClasses: []
  10973. }),
  10974. smalltalk.Stream);
  10975. smalltalk.addMethod(
  10976. unescape('_position'),
  10977. smalltalk.method({
  10978. selector: unescape('position'),
  10979. category: 'accessing',
  10980. fn: function () {
  10981. var self=this;
  10982. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return (self['@position']=(0));})() : $receiver;
  10983. return self;},
  10984. args: [],
  10985. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  10986. messageSends: ["ifNil:"],
  10987. referencedClasses: []
  10988. }),
  10989. smalltalk.Stream);
  10990. smalltalk.addMethod(
  10991. unescape('_position_'),
  10992. smalltalk.method({
  10993. selector: unescape('position%3A'),
  10994. category: 'accessing',
  10995. fn: function (anInteger) {
  10996. var self=this;
  10997. (self['@position']=anInteger);
  10998. return self;},
  10999. args: ["anInteger"],
  11000. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  11001. messageSends: [],
  11002. referencedClasses: []
  11003. }),
  11004. smalltalk.Stream);
  11005. smalltalk.addMethod(
  11006. unescape('_reset'),
  11007. smalltalk.method({
  11008. selector: unescape('reset'),
  11009. category: 'actions',
  11010. fn: function () {
  11011. var self=this;
  11012. smalltalk.send(self, "_position_", [(0)]);
  11013. return self;},
  11014. args: [],
  11015. source: unescape('reset%0A%09self%20position%3A%200'),
  11016. messageSends: ["position:"],
  11017. referencedClasses: []
  11018. }),
  11019. smalltalk.Stream);
  11020. smalltalk.addMethod(
  11021. unescape('_resetContents'),
  11022. smalltalk.method({
  11023. selector: unescape('resetContents'),
  11024. category: 'actions',
  11025. fn: function () {
  11026. var self=this;
  11027. smalltalk.send(self, "_reset", []);
  11028. smalltalk.send(self, "_setStreamSize_", [(0)]);
  11029. return self;},
  11030. args: [],
  11031. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  11032. messageSends: ["reset", "setStreamSize:"],
  11033. referencedClasses: []
  11034. }),
  11035. smalltalk.Stream);
  11036. smalltalk.addMethod(
  11037. unescape('_setCollection_'),
  11038. smalltalk.method({
  11039. selector: unescape('setCollection%3A'),
  11040. category: 'accessing',
  11041. fn: function (aCollection) {
  11042. var self=this;
  11043. (self['@collection']=aCollection);
  11044. return self;},
  11045. args: ["aCollection"],
  11046. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  11047. messageSends: [],
  11048. referencedClasses: []
  11049. }),
  11050. smalltalk.Stream);
  11051. smalltalk.addMethod(
  11052. unescape('_setStreamSize_'),
  11053. smalltalk.method({
  11054. selector: unescape('setStreamSize%3A'),
  11055. category: 'accessing',
  11056. fn: function (anInteger) {
  11057. var self=this;
  11058. (self['@streamSize']=anInteger);
  11059. return self;},
  11060. args: ["anInteger"],
  11061. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  11062. messageSends: [],
  11063. referencedClasses: []
  11064. }),
  11065. smalltalk.Stream);
  11066. smalltalk.addMethod(
  11067. unescape('_setToEnd'),
  11068. smalltalk.method({
  11069. selector: unescape('setToEnd'),
  11070. category: 'positioning',
  11071. fn: function () {
  11072. var self=this;
  11073. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  11074. return self;},
  11075. args: [],
  11076. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  11077. messageSends: ["position:", "size"],
  11078. referencedClasses: []
  11079. }),
  11080. smalltalk.Stream);
  11081. smalltalk.addMethod(
  11082. unescape('_size'),
  11083. smalltalk.method({
  11084. selector: unescape('size'),
  11085. category: 'accessing',
  11086. fn: function () {
  11087. var self=this;
  11088. return smalltalk.send(self, "_streamSize", []);
  11089. return self;},
  11090. args: [],
  11091. source: unescape('size%0A%09%5Eself%20streamSize'),
  11092. messageSends: ["streamSize"],
  11093. referencedClasses: []
  11094. }),
  11095. smalltalk.Stream);
  11096. smalltalk.addMethod(
  11097. unescape('_skip_'),
  11098. smalltalk.method({
  11099. selector: unescape('skip%3A'),
  11100. category: 'positioning',
  11101. fn: function (anInteger) {
  11102. var self=this;
  11103. 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)])]);
  11104. return self;},
  11105. args: ["anInteger"],
  11106. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  11107. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  11108. referencedClasses: []
  11109. }),
  11110. smalltalk.Stream);
  11111. smalltalk.addMethod(
  11112. unescape('_streamSize'),
  11113. smalltalk.method({
  11114. selector: unescape('streamSize'),
  11115. category: 'accessing',
  11116. fn: function () {
  11117. var self=this;
  11118. return self['@streamSize'];
  11119. return self;},
  11120. args: [],
  11121. source: unescape('streamSize%0A%09%5EstreamSize'),
  11122. messageSends: [],
  11123. referencedClasses: []
  11124. }),
  11125. smalltalk.Stream);
  11126. smalltalk.addMethod(
  11127. unescape('_on_'),
  11128. smalltalk.method({
  11129. selector: unescape('on%3A'),
  11130. category: 'instance creation',
  11131. fn: function (aCollection) {
  11132. var self=this;
  11133. 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", []));
  11134. return self;},
  11135. args: ["aCollection"],
  11136. 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'),
  11137. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  11138. referencedClasses: []
  11139. }),
  11140. smalltalk.Stream.klass);
  11141. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel-Collections');
  11142. smalltalk.addMethod(
  11143. unescape('_cr'),
  11144. smalltalk.method({
  11145. selector: unescape('cr'),
  11146. category: 'writing',
  11147. fn: function () {
  11148. var self=this;
  11149. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  11150. return self;},
  11151. args: [],
  11152. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  11153. messageSends: ["nextPutAll:", "cr"],
  11154. referencedClasses: ["String"]
  11155. }),
  11156. smalltalk.StringStream);
  11157. smalltalk.addMethod(
  11158. unescape('_crlf'),
  11159. smalltalk.method({
  11160. selector: unescape('crlf'),
  11161. category: 'writing',
  11162. fn: function () {
  11163. var self=this;
  11164. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  11165. return self;},
  11166. args: [],
  11167. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  11168. messageSends: ["nextPutAll:", "crlf"],
  11169. referencedClasses: ["String"]
  11170. }),
  11171. smalltalk.StringStream);
  11172. smalltalk.addMethod(
  11173. unescape('_lf'),
  11174. smalltalk.method({
  11175. selector: unescape('lf'),
  11176. category: 'writing',
  11177. fn: function () {
  11178. var self=this;
  11179. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  11180. return self;},
  11181. args: [],
  11182. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  11183. messageSends: ["nextPutAll:", "lf"],
  11184. referencedClasses: ["String"]
  11185. }),
  11186. smalltalk.StringStream);
  11187. smalltalk.addMethod(
  11188. unescape('_next_'),
  11189. smalltalk.method({
  11190. selector: unescape('next%3A'),
  11191. category: 'reading',
  11192. fn: function (anInteger) {
  11193. var self=this;
  11194. var tempCollection=nil;
  11195. (tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []));
  11196. 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", [])]));})]));})]);
  11197. return tempCollection;
  11198. return self;},
  11199. args: ["anInteger"],
  11200. 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'),
  11201. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  11202. referencedClasses: []
  11203. }),
  11204. smalltalk.StringStream);
  11205. smalltalk.addMethod(
  11206. unescape('_nextPut_'),
  11207. smalltalk.method({
  11208. selector: unescape('nextPut%3A'),
  11209. category: 'writing',
  11210. fn: function (aString) {
  11211. var self=this;
  11212. smalltalk.send(self, "_nextPutAll_", [aString]);
  11213. return self;},
  11214. args: ["aString"],
  11215. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  11216. messageSends: ["nextPutAll:"],
  11217. referencedClasses: []
  11218. }),
  11219. smalltalk.StringStream);
  11220. smalltalk.addMethod(
  11221. unescape('_nextPutAll_'),
  11222. smalltalk.method({
  11223. selector: unescape('nextPutAll%3A'),
  11224. category: 'writing',
  11225. fn: function (aString) {
  11226. var self=this;
  11227. 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", [])])])]);
  11228. 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", [])]))]);
  11229. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  11230. return self;},
  11231. args: ["aString"],
  11232. 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'),
  11233. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  11234. referencedClasses: []
  11235. }),
  11236. smalltalk.StringStream);
  11237. smalltalk.addMethod(
  11238. unescape('_space'),
  11239. smalltalk.method({
  11240. selector: unescape('space'),
  11241. category: 'writing',
  11242. fn: function () {
  11243. var self=this;
  11244. smalltalk.send(self, "_nextPut_", [" "]);
  11245. return self;},
  11246. args: [],
  11247. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  11248. messageSends: ["nextPut:"],
  11249. referencedClasses: []
  11250. }),
  11251. smalltalk.StringStream);
  11252. smalltalk.addPackage('Kernel-Exceptions', {});
  11253. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel-Exceptions');
  11254. smalltalk.addMethod(
  11255. unescape('_context'),
  11256. smalltalk.method({
  11257. selector: unescape('context'),
  11258. category: 'accessing',
  11259. fn: function (){
  11260. var self=this;
  11261. return self.context;
  11262. return self;},
  11263. args: [],
  11264. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  11265. messageSends: [],
  11266. referencedClasses: []
  11267. }),
  11268. smalltalk.Error);
  11269. smalltalk.addMethod(
  11270. unescape('_isSmalltalkError'),
  11271. smalltalk.method({
  11272. selector: unescape('isSmalltalkError'),
  11273. category: 'testing',
  11274. fn: function (){
  11275. var self=this;
  11276. return self.smalltalkError === true;
  11277. return self;},
  11278. args: [],
  11279. source: unescape('isSmalltalkError%0A%09%3Creturn%20self.smalltalkError%20%3D%3D%3D%20true%3E'),
  11280. messageSends: [],
  11281. referencedClasses: []
  11282. }),
  11283. smalltalk.Error);
  11284. smalltalk.addMethod(
  11285. unescape('_jsStack'),
  11286. smalltalk.method({
  11287. selector: unescape('jsStack'),
  11288. category: 'accessing',
  11289. fn: function (){
  11290. var self=this;
  11291. return self.stack;
  11292. return self;},
  11293. args: [],
  11294. source: unescape('jsStack%0A%09%3Creturn%20self.stack%3E'),
  11295. messageSends: [],
  11296. referencedClasses: []
  11297. }),
  11298. smalltalk.Error);
  11299. smalltalk.addMethod(
  11300. unescape('_messageText'),
  11301. smalltalk.method({
  11302. selector: unescape('messageText'),
  11303. category: 'accessing',
  11304. fn: function (){
  11305. var self=this;
  11306. return self['@messageText'];
  11307. return self;},
  11308. args: [],
  11309. source: unescape('messageText%0A%09%5EmessageText'),
  11310. messageSends: [],
  11311. referencedClasses: []
  11312. }),
  11313. smalltalk.Error);
  11314. smalltalk.addMethod(
  11315. unescape('_messageText_'),
  11316. smalltalk.method({
  11317. selector: unescape('messageText%3A'),
  11318. category: 'accessing',
  11319. fn: function (aString){
  11320. var self=this;
  11321. (self['@messageText']=aString);
  11322. return self;},
  11323. args: ["aString"],
  11324. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  11325. messageSends: [],
  11326. referencedClasses: []
  11327. }),
  11328. smalltalk.Error);
  11329. smalltalk.addMethod(
  11330. unescape('_signal'),
  11331. smalltalk.method({
  11332. selector: unescape('signal'),
  11333. category: 'signaling',
  11334. fn: function (){
  11335. var self=this;
  11336. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  11337. return self;},
  11338. args: [],
  11339. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  11340. messageSends: [],
  11341. referencedClasses: []
  11342. }),
  11343. smalltalk.Error);
  11344. smalltalk.addMethod(
  11345. unescape('_signal_'),
  11346. smalltalk.method({
  11347. selector: unescape('signal%3A'),
  11348. category: 'instance creation',
  11349. fn: function (aString){
  11350. var self=this;
  11351. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  11352. return self;},
  11353. args: ["aString"],
  11354. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  11355. messageSends: ["messageText:", "signal", "new"],
  11356. referencedClasses: []
  11357. }),
  11358. smalltalk.Error.klass);
  11359. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel-Exceptions');
  11360. smalltalk.addMethod(
  11361. unescape('_message'),
  11362. smalltalk.method({
  11363. selector: unescape('message'),
  11364. category: 'accessing',
  11365. fn: function (){
  11366. var self=this;
  11367. return self['@message'];
  11368. return self;},
  11369. args: [],
  11370. source: unescape('message%0A%09%5Emessage'),
  11371. messageSends: [],
  11372. referencedClasses: []
  11373. }),
  11374. smalltalk.MessageNotUnderstood);
  11375. smalltalk.addMethod(
  11376. unescape('_message_'),
  11377. smalltalk.method({
  11378. selector: unescape('message%3A'),
  11379. category: 'accessing',
  11380. fn: function (aMessage){
  11381. var self=this;
  11382. (self['@message']=aMessage);
  11383. return self;},
  11384. args: ["aMessage"],
  11385. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  11386. messageSends: [],
  11387. referencedClasses: []
  11388. }),
  11389. smalltalk.MessageNotUnderstood);
  11390. smalltalk.addMethod(
  11391. unescape('_messageText'),
  11392. smalltalk.method({
  11393. selector: unescape('messageText'),
  11394. category: 'accessing',
  11395. fn: function (){
  11396. var self=this;
  11397. 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", [])]);
  11398. return self;},
  11399. args: [],
  11400. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  11401. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  11402. referencedClasses: []
  11403. }),
  11404. smalltalk.MessageNotUnderstood);
  11405. smalltalk.addMethod(
  11406. unescape('_receiver'),
  11407. smalltalk.method({
  11408. selector: unescape('receiver'),
  11409. category: 'accessing',
  11410. fn: function (){
  11411. var self=this;
  11412. return self['@receiver'];
  11413. return self;},
  11414. args: [],
  11415. source: unescape('receiver%0A%09%5Ereceiver'),
  11416. messageSends: [],
  11417. referencedClasses: []
  11418. }),
  11419. smalltalk.MessageNotUnderstood);
  11420. smalltalk.addMethod(
  11421. unescape('_receiver_'),
  11422. smalltalk.method({
  11423. selector: unescape('receiver%3A'),
  11424. category: 'accessing',
  11425. fn: function (anObject){
  11426. var self=this;
  11427. (self['@receiver']=anObject);
  11428. return self;},
  11429. args: ["anObject"],
  11430. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  11431. messageSends: [],
  11432. referencedClasses: []
  11433. }),
  11434. smalltalk.MessageNotUnderstood);
  11435. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel-Exceptions');
  11436. smalltalk.addMethod(
  11437. unescape('_handleError_'),
  11438. smalltalk.method({
  11439. selector: unescape('handleError%3A'),
  11440. category: 'error handling',
  11441. fn: function (anError){
  11442. var self=this;
  11443. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  11444. smalltalk.send(self, "_logError_", [anError]);
  11445. return self;},
  11446. args: ["anError"],
  11447. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  11448. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  11449. referencedClasses: []
  11450. }),
  11451. smalltalk.ErrorHandler);
  11452. smalltalk.addMethod(
  11453. unescape('_log_'),
  11454. smalltalk.method({
  11455. selector: unescape('log%3A'),
  11456. category: 'private',
  11457. fn: function (aString){
  11458. var self=this;
  11459. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  11460. return self;},
  11461. args: ["aString"],
  11462. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  11463. messageSends: ["log:"],
  11464. referencedClasses: []
  11465. }),
  11466. smalltalk.ErrorHandler);
  11467. smalltalk.addMethod(
  11468. unescape('_logContext_'),
  11469. smalltalk.method({
  11470. selector: unescape('logContext%3A'),
  11471. category: 'private',
  11472. fn: function (aContext){
  11473. var self=this;
  11474. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  11475. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  11476. return self;},
  11477. args: ["aContext"],
  11478. 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'),
  11479. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  11480. referencedClasses: []
  11481. }),
  11482. smalltalk.ErrorHandler);
  11483. smalltalk.addMethod(
  11484. unescape('_logError_'),
  11485. smalltalk.method({
  11486. selector: unescape('logError%3A'),
  11487. category: 'private',
  11488. fn: function (anError){
  11489. var self=this;
  11490. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  11491. return self;},
  11492. args: ["anError"],
  11493. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  11494. messageSends: ["log:", "messageText"],
  11495. referencedClasses: []
  11496. }),
  11497. smalltalk.ErrorHandler);
  11498. smalltalk.addMethod(
  11499. unescape('_logErrorContext_'),
  11500. smalltalk.method({
  11501. selector: unescape('logErrorContext%3A'),
  11502. category: 'private',
  11503. fn: function (aContext){
  11504. var self=this;
  11505. (($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;
  11506. return self;},
  11507. args: ["aContext"],
  11508. 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'),
  11509. messageSends: ["ifNotNil:", "home", "logContext:"],
  11510. referencedClasses: []
  11511. }),
  11512. smalltalk.ErrorHandler);
  11513. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  11514. smalltalk.addMethod(
  11515. unescape('_current'),
  11516. smalltalk.method({
  11517. selector: unescape('current'),
  11518. category: 'accessing',
  11519. fn: function (){
  11520. var self=this;
  11521. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
  11522. return self;},
  11523. args: [],
  11524. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  11525. messageSends: ["ifNil:", "new"],
  11526. referencedClasses: []
  11527. }),
  11528. smalltalk.ErrorHandler.klass);
  11529. smalltalk.addMethod(
  11530. unescape('_initialize'),
  11531. smalltalk.method({
  11532. selector: unescape('initialize'),
  11533. category: 'initialization',
  11534. fn: function (){
  11535. var self=this;
  11536. smalltalk.send(self, "_register", []);
  11537. return self;},
  11538. args: [],
  11539. source: unescape('initialize%0A%09self%20register'),
  11540. messageSends: ["register"],
  11541. referencedClasses: []
  11542. }),
  11543. smalltalk.ErrorHandler.klass);
  11544. smalltalk.addMethod(
  11545. unescape('_register'),
  11546. smalltalk.method({
  11547. selector: unescape('register'),
  11548. category: 'initialization',
  11549. fn: function (){
  11550. var self=this;
  11551. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  11552. return self;},
  11553. args: [],
  11554. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  11555. messageSends: ["setCurrent:", "new"],
  11556. referencedClasses: ["ErrorHandler"]
  11557. }),
  11558. smalltalk.ErrorHandler.klass);
  11559. smalltalk.addMethod(
  11560. unescape('_setCurrent_'),
  11561. smalltalk.method({
  11562. selector: unescape('setCurrent%3A'),
  11563. category: 'accessing',
  11564. fn: function (anHandler){
  11565. var self=this;
  11566. (self['@current']=anHandler);
  11567. return self;},
  11568. args: ["anHandler"],
  11569. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  11570. messageSends: [],
  11571. referencedClasses: []
  11572. }),
  11573. smalltalk.ErrorHandler.klass);
  11574. smalltalk.addPackage('Kernel-Transcript', {});
  11575. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  11576. smalltalk.addMethod(
  11577. unescape('_clear'),
  11578. smalltalk.method({
  11579. selector: unescape('clear'),
  11580. category: 'printing',
  11581. fn: function (){
  11582. var self=this;
  11583. return self;},
  11584. args: [],
  11585. source: unescape('clear%0A%09%22no%20op%22'),
  11586. messageSends: [],
  11587. referencedClasses: []
  11588. }),
  11589. smalltalk.ConsoleTranscript);
  11590. smalltalk.addMethod(
  11591. unescape('_cr'),
  11592. smalltalk.method({
  11593. selector: unescape('cr'),
  11594. category: 'printing',
  11595. fn: function (){
  11596. var self=this;
  11597. return self;},
  11598. args: [],
  11599. source: unescape('cr%0A%09%22no%20op%22'),
  11600. messageSends: [],
  11601. referencedClasses: []
  11602. }),
  11603. smalltalk.ConsoleTranscript);
  11604. smalltalk.addMethod(
  11605. unescape('_open'),
  11606. smalltalk.method({
  11607. selector: unescape('open'),
  11608. category: 'actions',
  11609. fn: function (){
  11610. var self=this;
  11611. return self;},
  11612. args: [],
  11613. source: unescape('open'),
  11614. messageSends: [],
  11615. referencedClasses: []
  11616. }),
  11617. smalltalk.ConsoleTranscript);
  11618. smalltalk.addMethod(
  11619. unescape('_show_'),
  11620. smalltalk.method({
  11621. selector: unescape('show%3A'),
  11622. category: 'printing',
  11623. fn: function (anObject){
  11624. var self=this;
  11625. var string=nil;
  11626. (string=smalltalk.send(anObject, "_asString", []));
  11627. console.log(String(string));
  11628. return self;},
  11629. args: ["anObject"],
  11630. source: unescape('show%3A%20anObject%0A%09%7C%20string%20%7C%0A%09string%20%3A%3D%20anObject%20asString.%0A%09%3Cconsole.log%28String%28string%29%29%3E'),
  11631. messageSends: ["asString"],
  11632. referencedClasses: []
  11633. }),
  11634. smalltalk.ConsoleTranscript);
  11635. smalltalk.addMethod(
  11636. unescape('_initialize'),
  11637. smalltalk.method({
  11638. selector: unescape('initialize'),
  11639. category: 'initialization',
  11640. fn: function (){
  11641. var self=this;
  11642. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
  11643. return self;},
  11644. args: [],
  11645. source: unescape('initialize%0A%09Transcript%20register%3A%20self%20new'),
  11646. messageSends: ["register:", "new"],
  11647. referencedClasses: ["Transcript"]
  11648. }),
  11649. smalltalk.ConsoleTranscript.klass);
  11650. smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  11651. smalltalk.Transcript.klass.iVarNames = ['current'];
  11652. smalltalk.addMethod(
  11653. unescape('_clear'),
  11654. smalltalk.method({
  11655. selector: unescape('clear'),
  11656. category: 'printing',
  11657. fn: function (){
  11658. var self=this;
  11659. smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
  11660. return self;},
  11661. args: [],
  11662. source: unescape('clear%0A%20%20%20%20self%20current%20clear'),
  11663. messageSends: ["clear", "current"],
  11664. referencedClasses: []
  11665. }),
  11666. smalltalk.Transcript.klass);
  11667. smalltalk.addMethod(
  11668. unescape('_cr'),
  11669. smalltalk.method({
  11670. selector: unescape('cr'),
  11671. category: 'printing',
  11672. fn: function (){
  11673. var self=this;
  11674. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  11675. return self;},
  11676. args: [],
  11677. source: unescape('cr%0A%20%20%20%20self%20current%20show%3A%20String%20cr'),
  11678. messageSends: ["show:", "current", "cr"],
  11679. referencedClasses: ["String"]
  11680. }),
  11681. smalltalk.Transcript.klass);
  11682. smalltalk.addMethod(
  11683. unescape('_current'),
  11684. smalltalk.method({
  11685. selector: unescape('current'),
  11686. category: 'instance creation',
  11687. fn: function (){
  11688. var self=this;
  11689. return self['@current'];
  11690. return self;},
  11691. args: [],
  11692. source: unescape('current%0A%20%20%20%20%5Ecurrent'),
  11693. messageSends: [],
  11694. referencedClasses: []
  11695. }),
  11696. smalltalk.Transcript.klass);
  11697. smalltalk.addMethod(
  11698. unescape('_new'),
  11699. smalltalk.method({
  11700. selector: unescape('new'),
  11701. category: 'instance creation',
  11702. fn: function (){
  11703. var self=this;
  11704. smalltalk.send(self, "_shouldNotImplement", []);
  11705. return self;},
  11706. args: [],
  11707. source: unescape('new%0A%20%20%20%20self%20shouldNotImplement'),
  11708. messageSends: ["shouldNotImplement"],
  11709. referencedClasses: []
  11710. }),
  11711. smalltalk.Transcript.klass);
  11712. smalltalk.addMethod(
  11713. unescape('_open'),
  11714. smalltalk.method({
  11715. selector: unescape('open'),
  11716. category: 'instance creation',
  11717. fn: function (){
  11718. var self=this;
  11719. smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
  11720. return self;},
  11721. args: [],
  11722. source: unescape('open%0A%20%20%20%20self%20current%20open'),
  11723. messageSends: ["open", "current"],
  11724. referencedClasses: []
  11725. }),
  11726. smalltalk.Transcript.klass);
  11727. smalltalk.addMethod(
  11728. unescape('_register_'),
  11729. smalltalk.method({
  11730. selector: unescape('register%3A'),
  11731. category: 'instance creation',
  11732. fn: function (aTranscript){
  11733. var self=this;
  11734. (self['@current']=aTranscript);
  11735. return self;},
  11736. args: ["aTranscript"],
  11737. source: unescape('register%3A%20aTranscript%0A%09current%20%3A%3D%20aTranscript'),
  11738. messageSends: [],
  11739. referencedClasses: []
  11740. }),
  11741. smalltalk.Transcript.klass);
  11742. smalltalk.addMethod(
  11743. unescape('_show_'),
  11744. smalltalk.method({
  11745. selector: unescape('show%3A'),
  11746. category: 'printing',
  11747. fn: function (anObject){
  11748. var self=this;
  11749. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
  11750. return self;},
  11751. args: ["anObject"],
  11752. source: unescape('show%3A%20anObject%0A%20%20%20%20self%20current%20show%3A%20anObject'),
  11753. messageSends: ["show:", "current"],
  11754. referencedClasses: []
  11755. }),
  11756. smalltalk.Transcript.klass);
  11757. smalltalk.addPackage('FileServer', {});
  11758. smalltalk.addClass('FileServer', smalltalk.Object, ['path', 'http', 'fs', 'url', 'port', 'basePath', 'util'], 'FileServer');
  11759. smalltalk.addMethod(
  11760. unescape('_basePath'),
  11761. smalltalk.method({
  11762. selector: unescape('basePath'),
  11763. category: 'accessing',
  11764. fn: function (){
  11765. var self=this;
  11766. return (($receiver = self['@basePath']) == nil || $receiver == undefined) ? (function(){return unescape("./");})() : $receiver;
  11767. return self;},
  11768. args: [],
  11769. source: unescape('basePath%0A%09%5EbasePath%20ifNil%3A%20%5B%27./%27%5D'),
  11770. messageSends: ["ifNil:"],
  11771. referencedClasses: []
  11772. }),
  11773. smalltalk.FileServer);
  11774. smalltalk.addMethod(
  11775. unescape('_basePath_'),
  11776. smalltalk.method({
  11777. selector: unescape('basePath%3A'),
  11778. category: 'accessing',
  11779. fn: function (aString){
  11780. var self=this;
  11781. (self['@basePath']=aString);
  11782. return self;},
  11783. args: ["aString"],
  11784. source: unescape('basePath%3A%20aString%0A%09basePath%20%3A%3D%20aString'),
  11785. messageSends: [],
  11786. referencedClasses: []
  11787. }),
  11788. smalltalk.FileServer);
  11789. smalltalk.addMethod(
  11790. unescape('_handleGETRequest_respondTo_'),
  11791. smalltalk.method({
  11792. selector: unescape('handleGETRequest%3ArespondTo%3A'),
  11793. category: 'request handling',
  11794. fn: function (aRequest, aResponse){
  11795. var self=this;
  11796. var uri=nil;
  11797. var filename=nil;
  11798. (uri=smalltalk.send(smalltalk.send(self['@url'], "_parse_", [smalltalk.send(aRequest, "_url", [])]), "_pathname", []));
  11799. (filename=smalltalk.send(self['@path'], "_join_with_", [smalltalk.send(self, "_basePath", []), uri]));
  11800. 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]);})]));})]);
  11801. return self;},
  11802. args: ["aRequest", "aResponse"],
  11803. 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'),
  11804. messageSends: ["pathname", "parse:", "url", "join:with:", "basePath", "exists:do:", "ifFalse:ifTrue:", "respondNotFoundTo:", "respondFileNamed:to:"],
  11805. referencedClasses: []
  11806. }),
  11807. smalltalk.FileServer);
  11808. smalltalk.addMethod(
  11809. unescape('_handleOPTIONSRequest_respondTo_'),
  11810. smalltalk.method({
  11811. selector: unescape('handleOPTIONSRequest%3ArespondTo%3A'),
  11812. category: 'request handling',
  11813. fn: function (aRequest, aResponse){
  11814. var self=this;
  11815. smalltalk.send(aResponse, "_writeHead_options_", [(200), smalltalk.HashedCollection._fromPairs_([smalltalk.send(unescape("Access-Control-Allow-Origin"), "__minus_gt", [unescape("*")]),smalltalk.send(unescape("Access-Control-Allow-Methods"), "__minus_gt", [unescape("GET%2C%20PUT%2C%20POST%2C%20DELETE%2C%20OPTIONS")]),smalltalk.send(unescape("Access-Control-Allow-Headers"), "__minus_gt", [unescape("Content-Type%2C%20Accept")]),smalltalk.send(unescape("Content-Length"), "__minus_gt", [(0)]),smalltalk.send(unescape("Access-Control-Max-Age"), "__minus_gt", [(10)])])]);
  11816. smalltalk.send(aResponse, "_end", []);
  11817. return self;},
  11818. args: ["aRequest", "aResponse"],
  11819. source: unescape('handleOPTIONSRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09aResponse%20writeHead%3A%20200%20options%3A%20%23%7B%27Access-Control-Allow-Origin%27%20-%3E%20%27*%27.%0A%09%09%09%09%09%27Access-Control-Allow-Methods%27%20-%3E%20%27GET%2C%20PUT%2C%20POST%2C%20DELETE%2C%20OPTIONS%27.%0A%09%09%09%09%09%27Access-Control-Allow-Headers%27%20-%3E%20%27Content-Type%2C%20Accept%27.%0A%09%09%09%09%09%27Content-Length%27%20-%3E%200.%0A%09%09%09%09%09%27Access-Control-Max-Age%27%20-%3E%2010%7D.%0A%09aResponse%20end'),
  11820. messageSends: ["writeHead:options:", unescape("-%3E"), "end"],
  11821. referencedClasses: []
  11822. }),
  11823. smalltalk.FileServer);
  11824. smalltalk.addMethod(
  11825. unescape('_handlePUTRequest_respondTo_'),
  11826. smalltalk.method({
  11827. selector: unescape('handlePUTRequest%3ArespondTo%3A'),
  11828. category: 'request handling',
  11829. fn: function (aRequest, aResponse){
  11830. var self=this;
  11831. var stream=nil;
  11832. (stream=smalltalk.send(self['@fs'], "_createWriteStream_", [smalltalk.send(".", "__comma", [smalltalk.send(aRequest, "_url", [])])]));
  11833. smalltalk.send(aRequest, "_setEncoding_", ["utf8"]);
  11834. smalltalk.send(aRequest, "_on_do_", ["data", (function(data){return smalltalk.send(stream, "_write_", [data]);})]);
  11835. smalltalk.send(aRequest, "_on_do_", ["end", (function(){smalltalk.send(stream, "_end", []);return smalltalk.send(self, "_respondOKTo_", [aResponse]);})]);
  11836. return self;},
  11837. args: ["aRequest", "aResponse"],
  11838. source: unescape('handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7Cstream%20%7C%0A%09stream%20%3A%3D%20fs%20createWriteStream%3A%20%27.%27%20%2C%20aRequest%20url.%0A%20%20%20%20%20%20%20%20aRequest%20setEncoding%3A%20%27utf8%27.%0A%20%20%20%20%20%20%20%20aRequest%20on%3A%20%27data%27%20do%3A%20%5B%3Adata%20%7C%20stream%20write%3A%20data%5D.%0A%0A%20%20%20%20%20%20%20%20aRequest%20on%3A%20%27end%27%20do%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20stream%20end.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20respondOKTo%3A%20aResponse%5D'),
  11839. messageSends: ["createWriteStream:", unescape("%2C"), "url", "setEncoding:", "on:do:", "write:", "end", "respondOKTo:"],
  11840. referencedClasses: []
  11841. }),
  11842. smalltalk.FileServer);
  11843. smalltalk.addMethod(
  11844. unescape('_handleRequest_respondTo_'),
  11845. smalltalk.method({
  11846. selector: unescape('handleRequest%3ArespondTo%3A'),
  11847. category: 'request handling',
  11848. fn: function (aRequest, aResponse){
  11849. var self=this;
  11850. ((($receiver = smalltalk.send(smalltalk.send(aRequest, "_method", []), "__eq", ["PUT"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);})]));
  11851. ((($receiver = smalltalk.send(smalltalk.send(aRequest, "_method", []), "__eq", ["GET"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})]));
  11852. ((($receiver = smalltalk.send(smalltalk.send(aRequest, "_method", []), "__eq", ["OPTIONS"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_handleOPTIONSRequest_respondTo_", [aRequest, aResponse]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_handleOPTIONSRequest_respondTo_", [aRequest, aResponse]);})]));
  11853. return self;},
  11854. args: ["aRequest", "aResponse"],
  11855. source: unescape('handleRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%0A%09aRequest%20method%20%3D%20%27PUT%27%0A%09%09ifTrue%3A%20%5Bself%20handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D.%0A%09aRequest%20method%20%3D%20%27GET%27%0A%09%09ifTrue%3A%5Bself%20handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D.%0A%09aRequest%20method%20%3D%20%27OPTIONS%27%0A%09%09ifTrue%3A%5Bself%20handleOPTIONSRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D'),
  11856. messageSends: ["ifTrue:", unescape("%3D"), "method", "handlePUTRequest:respondTo:", "handleGETRequest:respondTo:", "handleOPTIONSRequest:respondTo:"],
  11857. referencedClasses: []
  11858. }),
  11859. smalltalk.FileServer);
  11860. smalltalk.addMethod(
  11861. unescape('_initialize'),
  11862. smalltalk.method({
  11863. selector: unescape('initialize'),
  11864. category: 'initialization',
  11865. fn: function (){
  11866. var self=this;
  11867. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  11868. (self['@path']=smalltalk.send(self, "_require_", ["path"]));
  11869. (self['@http']=smalltalk.send(self, "_require_", ["http"]));
  11870. (self['@fs']=smalltalk.send(self, "_require_", ["fs"]));
  11871. (self['@util']=smalltalk.send(self, "_require_", ["util"]));
  11872. (self['@url']=smalltalk.send(self, "_require_", ["url"]));
  11873. return self;},
  11874. args: [],
  11875. 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%09util%20%3A%3D%20self%20require%3A%20%27util%27.%0A%09url%20%3A%3D%20self%20require%3A%20%27url%27'),
  11876. messageSends: ["initialize", "require:"],
  11877. referencedClasses: []
  11878. }),
  11879. smalltalk.FileServer);
  11880. smalltalk.addMethod(
  11881. unescape('_port'),
  11882. smalltalk.method({
  11883. selector: unescape('port'),
  11884. category: 'accessing',
  11885. fn: function (){
  11886. var self=this;
  11887. return smalltalk.send(smalltalk.send(self, "_class", []), "_port", []);
  11888. return self;},
  11889. args: [],
  11890. source: unescape('port%0A%09%5Eself%20class%20port'),
  11891. messageSends: ["port", "class"],
  11892. referencedClasses: []
  11893. }),
  11894. smalltalk.FileServer);
  11895. smalltalk.addMethod(
  11896. unescape('_require_'),
  11897. smalltalk.method({
  11898. selector: unescape('require%3A'),
  11899. category: 'private',
  11900. fn: function (aModuleString){
  11901. var self=this;
  11902. return smalltalk.send((typeof require == 'undefined' ? nil : require), "_value_", [aModuleString]);
  11903. return self;},
  11904. args: ["aModuleString"],
  11905. source: unescape('require%3A%20aModuleString%0A%09%22call%20to%20the%20require%20function%22%0A%09%5Erequire%20value%3A%20aModuleString'),
  11906. messageSends: ["value:"],
  11907. referencedClasses: []
  11908. }),
  11909. smalltalk.FileServer);
  11910. smalltalk.addMethod(
  11911. unescape('_respondFileNamed_to_'),
  11912. smalltalk.method({
  11913. selector: unescape('respondFileNamed%3Ato%3A'),
  11914. category: 'request handling',
  11915. fn: function (aFilename, aResponse){
  11916. var self=this;
  11917. var type=nil;
  11918. var filename=nil;
  11919. (filename=aFilename);
  11920. ((($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"]));})]));
  11921. 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.HashedCollection._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.HashedCollection._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})]));})]);
  11922. return self;},
  11923. args: ["aFilename", "aResponse"],
  11924. 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'),
  11925. messageSends: ["ifTrue:", "isDirectory", "statSync:", unescape("%2C"), "readFile:do:", "ifTrue:ifFalse:", "notNil", "respondInternalErrorTo:", "mimeTypeFor:", "class", "writeHead:options:", unescape("-%3E"), "write:binary:", "end"],
  11926. referencedClasses: []
  11927. }),
  11928. smalltalk.FileServer);
  11929. smalltalk.addMethod(
  11930. unescape('_respondInternalErrorTo_'),
  11931. smalltalk.method({
  11932. selector: unescape('respondInternalErrorTo%3A'),
  11933. category: 'request handling',
  11934. fn: function (aResponse){
  11935. var self=this;
  11936. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(500), smalltalk.HashedCollection._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);
  11937. return self;},
  11938. args: ["aResponse"],
  11939. 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'),
  11940. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  11941. referencedClasses: []
  11942. }),
  11943. smalltalk.FileServer);
  11944. smalltalk.addMethod(
  11945. unescape('_respondNotFoundTo_'),
  11946. smalltalk.method({
  11947. selector: unescape('respondNotFoundTo%3A'),
  11948. category: 'request handling',
  11949. fn: function (aResponse){
  11950. var self=this;
  11951. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(404), smalltalk.HashedCollection._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["404 Not found"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  11952. return self;},
  11953. args: ["aResponse"],
  11954. 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'),
  11955. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  11956. referencedClasses: []
  11957. }),
  11958. smalltalk.FileServer);
  11959. smalltalk.addMethod(
  11960. unescape('_respondOKTo_'),
  11961. smalltalk.method({
  11962. selector: unescape('respondOKTo%3A'),
  11963. category: 'request handling',
  11964. fn: function (aResponse){
  11965. var self=this;
  11966. smalltalk.send(aResponse, "_writeHead_options_", [(200), smalltalk.HashedCollection._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")]),smalltalk.send(unescape("Access-Control-Allow-Origin"), "__minus_gt", [unescape("*")])])]);
  11967. smalltalk.send(aResponse, "_end", []);
  11968. return self;},
  11969. args: ["aResponse"],
  11970. 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.%20%27Access-Control-Allow-Origin%27%20-%3E%20%27*%27%7D.%0A%09aResponse%20end.'),
  11971. messageSends: ["writeHead:options:", unescape("-%3E"), "end"],
  11972. referencedClasses: []
  11973. }),
  11974. smalltalk.FileServer);
  11975. smalltalk.addMethod(
  11976. unescape('_start'),
  11977. smalltalk.method({
  11978. selector: unescape('start'),
  11979. category: 'starting',
  11980. fn: function (){
  11981. var self=this;
  11982. smalltalk.send(smalltalk.send(self['@http'], "_createServer_", [(function(request, response){return smalltalk.send(self, "_handleRequest_respondTo_", [request, response]);})]), "_listen_", [smalltalk.send(self, "_port", [])]);
  11983. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send("Starting file server on port ", "__comma", [smalltalk.send(smalltalk.send(self, "_port", []), "_asString", [])])]);
  11984. return self;},
  11985. args: [],
  11986. 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'),
  11987. messageSends: ["listen:", "createServer:", "handleRequest:respondTo:", "port", "log:", unescape("%2C"), "asString"],
  11988. referencedClasses: []
  11989. }),
  11990. smalltalk.FileServer);
  11991. smalltalk.addMethod(
  11992. unescape('_startOn_'),
  11993. smalltalk.method({
  11994. selector: unescape('startOn%3A'),
  11995. category: 'starting',
  11996. fn: function (aPort){
  11997. var self=this;
  11998. (self['@port']=aPort);
  11999. smalltalk.send(self, "_start", []);
  12000. return self;},
  12001. args: ["aPort"],
  12002. source: unescape('startOn%3A%20aPort%0A%09port%20%3A%3D%20aPort.%0A%09self%20start'),
  12003. messageSends: ["start"],
  12004. referencedClasses: []
  12005. }),
  12006. smalltalk.FileServer);
  12007. smalltalk.addMethod(
  12008. unescape('_writeData_toFileNamed_'),
  12009. smalltalk.method({
  12010. selector: unescape('writeData%3AtoFileNamed%3A'),
  12011. category: 'private',
  12012. fn: function (data, aFilename){
  12013. var self=this;
  12014. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aFilename]);
  12015. return self;},
  12016. args: ["data", "aFilename"],
  12017. source: unescape('writeData%3A%20data%20toFileNamed%3A%20aFilename%0A%09console%20log%3A%20aFilename'),
  12018. messageSends: ["log:"],
  12019. referencedClasses: []
  12020. }),
  12021. smalltalk.FileServer);
  12022. smalltalk.FileServer.klass.iVarNames = ['port','mimeTypes'];
  12023. smalltalk.addMethod(
  12024. unescape('_defaultMimeTypes'),
  12025. smalltalk.method({
  12026. selector: unescape('defaultMimeTypes'),
  12027. category: 'accessing',
  12028. fn: function (){
  12029. var self=this;
  12030. return smalltalk.HashedCollection._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")])]);
  12031. return self;},
  12032. args: [],
  12033. 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'),
  12034. messageSends: [unescape("-%3E")],
  12035. referencedClasses: []
  12036. }),
  12037. smalltalk.FileServer.klass);
  12038. smalltalk.addMethod(
  12039. unescape('_main'),
  12040. smalltalk.method({
  12041. selector: unescape('main'),
  12042. category: 'initialization',
  12043. fn: function (){
  12044. var self=this;
  12045. return smalltalk.send(smalltalk.send(self, "_new", []), "_startOn_", [smalltalk.send(self, "_port", [])]);
  12046. return self;},
  12047. args: [],
  12048. source: unescape('main%0A%09%5Eself%20new%20startOn%3A%20self%20port'),
  12049. messageSends: ["startOn:", "new", "port"],
  12050. referencedClasses: []
  12051. }),
  12052. smalltalk.FileServer.klass);
  12053. smalltalk.addMethod(
  12054. unescape('_mimeTypeFor_'),
  12055. smalltalk.method({
  12056. selector: unescape('mimeTypeFor%3A'),
  12057. category: 'accessing',
  12058. fn: function (aString){
  12059. var self=this;
  12060. return smalltalk.send(smalltalk.send(self, "_mimeTypes", []), "_at_ifAbsent_", [smalltalk.send(aString, "_replace_with_", [unescape(".*%5B%5C.%5D"), ""]), (function(){return unescape("text/plain");})]);
  12061. return self;},
  12062. args: ["aString"],
  12063. 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'),
  12064. messageSends: ["at:ifAbsent:", "mimeTypes", "replace:with:"],
  12065. referencedClasses: []
  12066. }),
  12067. smalltalk.FileServer.klass);
  12068. smalltalk.addMethod(
  12069. unescape('_mimeTypes'),
  12070. smalltalk.method({
  12071. selector: unescape('mimeTypes'),
  12072. category: 'accessing',
  12073. fn: function (){
  12074. var self=this;
  12075. return (($receiver = self['@mimeTypes']) == nil || $receiver == undefined) ? (function(){return (self['@mimeTypes']=smalltalk.send(self, "_defaultMimeTypes", []));})() : $receiver;
  12076. return self;},
  12077. args: [],
  12078. source: unescape('mimeTypes%0A%09%5EmimeTypes%20ifNil%3A%20%5BmimeTypes%20%3A%3D%20self%20defaultMimeTypes%5D'),
  12079. messageSends: ["ifNil:", "defaultMimeTypes"],
  12080. referencedClasses: []
  12081. }),
  12082. smalltalk.FileServer.klass);
  12083. smalltalk.addMethod(
  12084. unescape('_port'),
  12085. smalltalk.method({
  12086. selector: unescape('port'),
  12087. category: 'accessing',
  12088. fn: function (){
  12089. var self=this;
  12090. return (($receiver = self['@port']) == nil || $receiver == undefined) ? (function(){return (4000);})() : $receiver;
  12091. return self;},
  12092. args: [],
  12093. source: unescape('port%0A%09%5Eport%20ifNil%3A%20%5B4000%5D'),
  12094. messageSends: ["ifNil:"],
  12095. referencedClasses: []
  12096. }),
  12097. smalltalk.FileServer.klass);
  12098. smalltalk.addMethod(
  12099. unescape('_port_'),
  12100. smalltalk.method({
  12101. selector: unescape('port%3A'),
  12102. category: 'accessing',
  12103. fn: function (aNumber){
  12104. var self=this;
  12105. (self['@port']=aNumber);
  12106. return self;},
  12107. args: ["aNumber"],
  12108. source: unescape('port%3A%20aNumber%0A%09port%20%3A%3D%20aNumber'),
  12109. messageSends: [],
  12110. referencedClasses: []
  12111. }),
  12112. smalltalk.FileServer.klass);
  12113. smalltalk.init(smalltalk.Object);
  12114. smalltalk.classes()._do_(function(each) {
  12115. each._initialize()});
  12116. /* Similar to jQuery(document).ready() */
  12117. if(this.smalltalkReady) {
  12118. this.smalltalkReady();
  12119. }
  12120. smalltalk.FileServer._main()