background.js 1003 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267
  1. // modules are defined as an array
  2. // [ module function, map of requires ]
  3. //
  4. // map of requires is short require name -> numeric require
  5. //
  6. // anything defined in a previous bundle is accessed via the
  7. // orig method which is the require for previous bundles
  8. parcelRequire = (function (modules, cache, entry, globalName) {
  9. // Save the require from previous bundle to this closure if any
  10. var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
  11. var nodeRequire = typeof require === 'function' && require;
  12. function newRequire(name, jumped) {
  13. if (!cache[name]) {
  14. if (!modules[name]) {
  15. // if we cannot find the module within our internal map or
  16. // cache jump to the current global require ie. the last bundle
  17. // that was added to the page.
  18. var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
  19. if (!jumped && currentRequire) {
  20. return currentRequire(name, true);
  21. }
  22. // If there are other bundles on this page the require from the
  23. // previous one is saved to 'previousRequire'. Repeat this as
  24. // many times as there are bundles until the module is found or
  25. // we exhaust the require chain.
  26. if (previousRequire) {
  27. return previousRequire(name, true);
  28. }
  29. // Try the node require function if it exists.
  30. if (nodeRequire && typeof name === 'string') {
  31. return nodeRequire(name);
  32. }
  33. var err = new Error('Cannot find module \'' + name + '\'');
  34. err.code = 'MODULE_NOT_FOUND';
  35. throw err;
  36. }
  37. localRequire.resolve = resolve;
  38. localRequire.cache = {};
  39. var module = cache[name] = new newRequire.Module(name);
  40. modules[name][0].call(module.exports, localRequire, module, module.exports, this);
  41. }
  42. return cache[name].exports;
  43. function localRequire(x){
  44. return newRequire(localRequire.resolve(x));
  45. }
  46. function resolve(x){
  47. return modules[name][1][x] || x;
  48. }
  49. }
  50. function Module(moduleName) {
  51. this.id = moduleName;
  52. this.bundle = newRequire;
  53. this.exports = {};
  54. }
  55. newRequire.isParcelRequire = true;
  56. newRequire.Module = Module;
  57. newRequire.modules = modules;
  58. newRequire.cache = cache;
  59. newRequire.parent = previousRequire;
  60. newRequire.register = function (id, exports) {
  61. modules[id] = [function (require, module) {
  62. module.exports = exports;
  63. }, {}];
  64. };
  65. var error;
  66. for (var i = 0; i < entry.length; i++) {
  67. try {
  68. newRequire(entry[i]);
  69. } catch (e) {
  70. // Save first error but execute all entries
  71. if (!error) {
  72. error = e;
  73. }
  74. }
  75. }
  76. if (entry.length) {
  77. // Expose entry point to Node, AMD or browser globals
  78. // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
  79. var mainExports = newRequire(entry[entry.length - 1]);
  80. // CommonJS
  81. if (typeof exports === "object" && typeof module !== "undefined") {
  82. module.exports = mainExports;
  83. // RequireJS
  84. } else if (typeof define === "function" && define.amd) {
  85. define(function () {
  86. return mainExports;
  87. });
  88. // <script>
  89. } else if (globalName) {
  90. this[globalName] = mainExports;
  91. }
  92. }
  93. // Override the current require with this new one
  94. parcelRequire = newRequire;
  95. if (error) {
  96. // throw error from earlier, _after updating parcelRequire_
  97. throw error;
  98. }
  99. return newRequire;
  100. })({"../output/Browser.Runtime/foreign.js":[function(require,module,exports) {
  101. "use strict";
  102. exports.connect = function () {
  103. return browser.runtime.connect({
  104. name: name
  105. });
  106. };
  107. exports.postMessage = function (port) {
  108. return function (message) {
  109. return function () {
  110. port.postMessage(message);
  111. };
  112. };
  113. };
  114. exports.onConnectAddListener = function (fn) {
  115. return function () {
  116. return browser.runtime.onConnect.addListener(fn);
  117. };
  118. };
  119. exports.portOnDisconnect = function (port) {
  120. return function (fn) {
  121. return function () {
  122. return port.onDisconnect.addListener(fn);
  123. };
  124. };
  125. };
  126. exports.onMessageAddListener = function (port) {
  127. return function (fn) {
  128. return function () {
  129. return port.onMessage.addListener(fn);
  130. };
  131. };
  132. };
  133. exports.onMessageRemoveListener = function (port) {
  134. return function (fn) {
  135. return function () {
  136. return port.onMessage.removeListener(fn);
  137. };
  138. };
  139. };
  140. exports.portEquality = function (p1) {
  141. return function (p2) {
  142. return p1 === p2;
  143. };
  144. };
  145. },{}],"../output/Browser.Utils/foreign.js":[function(require,module,exports) {
  146. "use stricts";
  147. exports.mkListenerUnit = function (fn) {
  148. return function () {
  149. return function () {
  150. return fn();
  151. };
  152. };
  153. };
  154. exports.mkListenerOne = function (fn) {
  155. return function () {
  156. return function (one) {
  157. return fn(one)();
  158. };
  159. };
  160. };
  161. exports.mkListenerTwo = function (fn) {
  162. return function () {
  163. return function (one, two) {
  164. return fn(one)(two)();
  165. };
  166. };
  167. };
  168. },{}],"../output/Browser.Utils/index.js":[function(require,module,exports) {
  169. // Generated by purs version 0.13.6
  170. "use strict";
  171. var $foreign = require("./foreign.js");
  172. var Listener2 = function Listener2(x) {
  173. return x;
  174. };
  175. var Listener = function Listener(x) {
  176. return x;
  177. };
  178. module.exports = {
  179. mkListenerUnit: $foreign.mkListenerUnit,
  180. mkListenerOne: $foreign.mkListenerOne,
  181. mkListenerTwo: $foreign.mkListenerTwo
  182. };
  183. },{"./foreign.js":"../output/Browser.Utils/foreign.js"}],"../output/Data.Functor/foreign.js":[function(require,module,exports) {
  184. "use strict";
  185. exports.arrayMap = function (f) {
  186. return function (arr) {
  187. var l = arr.length;
  188. var result = new Array(l);
  189. for (var i = 0; i < l; i++) {
  190. result[i] = f(arr[i]);
  191. }
  192. return result;
  193. };
  194. };
  195. },{}],"../output/Control.Semigroupoid/index.js":[function(require,module,exports) {
  196. // Generated by purs version 0.13.6
  197. "use strict";
  198. var Semigroupoid = function Semigroupoid(compose) {
  199. this.compose = compose;
  200. };
  201. var semigroupoidFn = new Semigroupoid(function (f) {
  202. return function (g) {
  203. return function (x) {
  204. return f(g(x));
  205. };
  206. };
  207. });
  208. var compose = function compose(dict) {
  209. return dict.compose;
  210. };
  211. var composeFlipped = function composeFlipped(dictSemigroupoid) {
  212. return function (f) {
  213. return function (g) {
  214. return compose(dictSemigroupoid)(g)(f);
  215. };
  216. };
  217. };
  218. module.exports = {
  219. compose: compose,
  220. Semigroupoid: Semigroupoid,
  221. composeFlipped: composeFlipped,
  222. semigroupoidFn: semigroupoidFn
  223. };
  224. },{}],"../output/Data.Boolean/index.js":[function(require,module,exports) {
  225. // Generated by purs version 0.13.6
  226. "use strict";
  227. var otherwise = true;
  228. module.exports = {
  229. otherwise: otherwise
  230. };
  231. },{}],"../output/Data.Function/index.js":[function(require,module,exports) {
  232. // Generated by purs version 0.13.6
  233. "use strict";
  234. var Data_Boolean = require("../Data.Boolean/index.js");
  235. var on = function on(f) {
  236. return function (g) {
  237. return function (x) {
  238. return function (y) {
  239. return f(g(x))(g(y));
  240. };
  241. };
  242. };
  243. };
  244. var flip = function flip(f) {
  245. return function (b) {
  246. return function (a) {
  247. return f(a)(b);
  248. };
  249. };
  250. };
  251. var $$const = function $$const(a) {
  252. return function (v) {
  253. return a;
  254. };
  255. };
  256. var applyN = function applyN(f) {
  257. var go = function go($copy_n) {
  258. return function ($copy_acc) {
  259. var $tco_var_n = $copy_n;
  260. var $tco_done = false;
  261. var $tco_result;
  262. function $tco_loop(n, acc) {
  263. if (n <= 0) {
  264. $tco_done = true;
  265. return acc;
  266. }
  267. ;
  268. if (Data_Boolean.otherwise) {
  269. $tco_var_n = n - 1 | 0;
  270. $copy_acc = f(acc);
  271. return;
  272. }
  273. ;
  274. throw new Error("Failed pattern match at Data.Function (line 94, column 3 - line 96, column 37): " + [n.constructor.name, acc.constructor.name]);
  275. }
  276. ;
  277. while (!$tco_done) {
  278. $tco_result = $tco_loop($tco_var_n, $copy_acc);
  279. }
  280. ;
  281. return $tco_result;
  282. };
  283. };
  284. return go;
  285. };
  286. var applyFlipped = function applyFlipped(x) {
  287. return function (f) {
  288. return f(x);
  289. };
  290. };
  291. var apply = function apply(f) {
  292. return function (x) {
  293. return f(x);
  294. };
  295. };
  296. module.exports = {
  297. flip: flip,
  298. "const": $$const,
  299. apply: apply,
  300. applyFlipped: applyFlipped,
  301. applyN: applyN,
  302. on: on
  303. };
  304. },{"../Data.Boolean/index.js":"../output/Data.Boolean/index.js"}],"../output/Data.Unit/foreign.js":[function(require,module,exports) {
  305. "use strict";
  306. exports.unit = {};
  307. },{}],"../output/Data.Show/foreign.js":[function(require,module,exports) {
  308. "use strict";
  309. exports.showIntImpl = function (n) {
  310. return n.toString();
  311. };
  312. exports.showNumberImpl = function (n) {
  313. var str = n.toString();
  314. return isNaN(str + ".0") ? str : str + ".0";
  315. };
  316. exports.showCharImpl = function (c) {
  317. var code = c.charCodeAt(0);
  318. if (code < 0x20 || code === 0x7F) {
  319. switch (c) {
  320. case "\x07":
  321. return "'\\a'";
  322. case "\b":
  323. return "'\\b'";
  324. case "\f":
  325. return "'\\f'";
  326. case "\n":
  327. return "'\\n'";
  328. case "\r":
  329. return "'\\r'";
  330. case "\t":
  331. return "'\\t'";
  332. case "\v":
  333. return "'\\v'";
  334. }
  335. return "'\\" + code.toString(10) + "'";
  336. }
  337. return c === "'" || c === "\\" ? "'\\" + c + "'" : "'" + c + "'";
  338. };
  339. exports.showStringImpl = function (s) {
  340. var l = s.length;
  341. return "\"" + s.replace(/[\0-\x1F\x7F"\\]/g, // eslint-disable-line no-control-regex
  342. function (c, i) {
  343. switch (c) {
  344. case "\"":
  345. case "\\":
  346. return "\\" + c;
  347. case "\x07":
  348. return "\\a";
  349. case "\b":
  350. return "\\b";
  351. case "\f":
  352. return "\\f";
  353. case "\n":
  354. return "\\n";
  355. case "\r":
  356. return "\\r";
  357. case "\t":
  358. return "\\t";
  359. case "\v":
  360. return "\\v";
  361. }
  362. var k = i + 1;
  363. var empty = k < l && s[k] >= "0" && s[k] <= "9" ? "\\&" : "";
  364. return "\\" + c.charCodeAt(0).toString(10) + empty;
  365. }) + "\"";
  366. };
  367. exports.showArrayImpl = function (f) {
  368. return function (xs) {
  369. var ss = [];
  370. for (var i = 0, l = xs.length; i < l; i++) {
  371. ss[i] = f(xs[i]);
  372. }
  373. return "[" + ss.join(",") + "]";
  374. };
  375. };
  376. exports.cons = function (head) {
  377. return function (tail) {
  378. return [head].concat(tail);
  379. };
  380. };
  381. exports.join = function (separator) {
  382. return function (xs) {
  383. return xs.join(separator);
  384. };
  385. };
  386. },{}],"../output/Data.Symbol/foreign.js":[function(require,module,exports) {
  387. "use strict"; // module Data.Symbol
  388. exports.unsafeCoerce = function (arg) {
  389. return arg;
  390. };
  391. },{}],"../output/Data.Symbol/index.js":[function(require,module,exports) {
  392. // Generated by purs version 0.13.6
  393. "use strict";
  394. var $foreign = require("./foreign.js");
  395. var SProxy = function () {
  396. function SProxy() {}
  397. ;
  398. SProxy.value = new SProxy();
  399. return SProxy;
  400. }();
  401. var IsSymbol = function IsSymbol(reflectSymbol) {
  402. this.reflectSymbol = reflectSymbol;
  403. };
  404. var reifySymbol = function reifySymbol(s) {
  405. return function (f) {
  406. return $foreign.unsafeCoerce(function (dictIsSymbol) {
  407. return f(dictIsSymbol);
  408. })({
  409. reflectSymbol: function reflectSymbol(v) {
  410. return s;
  411. }
  412. })(SProxy.value);
  413. };
  414. };
  415. var reflectSymbol = function reflectSymbol(dict) {
  416. return dict.reflectSymbol;
  417. };
  418. module.exports = {
  419. IsSymbol: IsSymbol,
  420. reflectSymbol: reflectSymbol,
  421. reifySymbol: reifySymbol,
  422. SProxy: SProxy
  423. };
  424. },{"./foreign.js":"../output/Data.Symbol/foreign.js"}],"../output/Record.Unsafe/foreign.js":[function(require,module,exports) {
  425. "use strict";
  426. exports.unsafeHas = function (label) {
  427. return function (rec) {
  428. return {}.hasOwnProperty.call(rec, label);
  429. };
  430. };
  431. exports.unsafeGet = function (label) {
  432. return function (rec) {
  433. return rec[label];
  434. };
  435. };
  436. exports.unsafeSet = function (label) {
  437. return function (value) {
  438. return function (rec) {
  439. var copy = {};
  440. for (var key in rec) {
  441. if ({}.hasOwnProperty.call(rec, key)) {
  442. copy[key] = rec[key];
  443. }
  444. }
  445. copy[label] = value;
  446. return copy;
  447. };
  448. };
  449. };
  450. exports.unsafeDelete = function (label) {
  451. return function (rec) {
  452. var copy = {};
  453. for (var key in rec) {
  454. if (key !== label && {}.hasOwnProperty.call(rec, key)) {
  455. copy[key] = rec[key];
  456. }
  457. }
  458. return copy;
  459. };
  460. };
  461. },{}],"../output/Record.Unsafe/index.js":[function(require,module,exports) {
  462. // Generated by purs version 0.13.6
  463. "use strict";
  464. var $foreign = require("./foreign.js");
  465. module.exports = {
  466. unsafeHas: $foreign.unsafeHas,
  467. unsafeGet: $foreign.unsafeGet,
  468. unsafeSet: $foreign.unsafeSet,
  469. unsafeDelete: $foreign.unsafeDelete
  470. };
  471. },{"./foreign.js":"../output/Record.Unsafe/foreign.js"}],"../output/Type.Data.RowList/index.js":[function(require,module,exports) {
  472. // Generated by purs version 0.13.6
  473. "use strict";
  474. var RLProxy = function () {
  475. function RLProxy() {}
  476. ;
  477. RLProxy.value = new RLProxy();
  478. return RLProxy;
  479. }();
  480. module.exports = {
  481. RLProxy: RLProxy
  482. };
  483. },{}],"../output/Data.Show/index.js":[function(require,module,exports) {
  484. // Generated by purs version 0.13.6
  485. "use strict";
  486. var $foreign = require("./foreign.js");
  487. var Data_Symbol = require("../Data.Symbol/index.js");
  488. var Record_Unsafe = require("../Record.Unsafe/index.js");
  489. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  490. var ShowRecordFields = function ShowRecordFields(showRecordFields) {
  491. this.showRecordFields = showRecordFields;
  492. };
  493. var Show = function Show(show) {
  494. this.show = show;
  495. };
  496. var showString = new Show($foreign.showStringImpl);
  497. var showRecordFieldsNil = new ShowRecordFields(function (v) {
  498. return function (v1) {
  499. return [];
  500. };
  501. });
  502. var showRecordFields = function showRecordFields(dict) {
  503. return dict.showRecordFields;
  504. };
  505. var showRecord = function showRecord(dictRowToList) {
  506. return function (dictShowRecordFields) {
  507. return new Show(function (record) {
  508. var v = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record);
  509. if (v.length === 0) {
  510. return "{}";
  511. }
  512. ;
  513. return $foreign.join(" ")(["{", $foreign.join(", ")(v), "}"]);
  514. });
  515. };
  516. };
  517. var showNumber = new Show($foreign.showNumberImpl);
  518. var showInt = new Show($foreign.showIntImpl);
  519. var showChar = new Show($foreign.showCharImpl);
  520. var showBoolean = new Show(function (v) {
  521. if (v) {
  522. return "true";
  523. }
  524. ;
  525. if (!v) {
  526. return "false";
  527. }
  528. ;
  529. throw new Error("Failed pattern match at Data.Show (line 20, column 1 - line 22, column 23): " + [v.constructor.name]);
  530. });
  531. var show = function show(dict) {
  532. return dict.show;
  533. };
  534. var showArray = function showArray(dictShow) {
  535. return new Show($foreign.showArrayImpl(show(dictShow)));
  536. };
  537. var showRecordFieldsCons = function showRecordFieldsCons(dictIsSymbol) {
  538. return function (dictShowRecordFields) {
  539. return function (dictShow) {
  540. return new ShowRecordFields(function (v) {
  541. return function (record) {
  542. var tail = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record);
  543. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  544. var focus = Record_Unsafe.unsafeGet(key)(record);
  545. return $foreign.cons($foreign.join(": ")([key, show(dictShow)(focus)]))(tail);
  546. };
  547. });
  548. };
  549. };
  550. };
  551. module.exports = {
  552. Show: Show,
  553. show: show,
  554. ShowRecordFields: ShowRecordFields,
  555. showRecordFields: showRecordFields,
  556. showBoolean: showBoolean,
  557. showInt: showInt,
  558. showNumber: showNumber,
  559. showChar: showChar,
  560. showString: showString,
  561. showArray: showArray,
  562. showRecord: showRecord,
  563. showRecordFieldsNil: showRecordFieldsNil,
  564. showRecordFieldsCons: showRecordFieldsCons
  565. };
  566. },{"./foreign.js":"../output/Data.Show/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Unit/index.js":[function(require,module,exports) {
  567. // Generated by purs version 0.13.6
  568. "use strict";
  569. var $foreign = require("./foreign.js");
  570. var Data_Show = require("../Data.Show/index.js");
  571. var showUnit = new Data_Show.Show(function (v) {
  572. return "unit";
  573. });
  574. module.exports = {
  575. showUnit: showUnit,
  576. unit: $foreign.unit
  577. };
  578. },{"./foreign.js":"../output/Data.Unit/foreign.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Functor/index.js":[function(require,module,exports) {
  579. // Generated by purs version 0.13.6
  580. "use strict";
  581. var $foreign = require("./foreign.js");
  582. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  583. var Data_Function = require("../Data.Function/index.js");
  584. var Data_Unit = require("../Data.Unit/index.js");
  585. var Functor = function Functor(map) {
  586. this.map = map;
  587. };
  588. var map = function map(dict) {
  589. return dict.map;
  590. };
  591. var mapFlipped = function mapFlipped(dictFunctor) {
  592. return function (fa) {
  593. return function (f) {
  594. return map(dictFunctor)(f)(fa);
  595. };
  596. };
  597. };
  598. var $$void = function $$void(dictFunctor) {
  599. return map(dictFunctor)(Data_Function["const"](Data_Unit.unit));
  600. };
  601. var voidLeft = function voidLeft(dictFunctor) {
  602. return function (f) {
  603. return function (x) {
  604. return map(dictFunctor)(Data_Function["const"](x))(f);
  605. };
  606. };
  607. };
  608. var voidRight = function voidRight(dictFunctor) {
  609. return function (x) {
  610. return map(dictFunctor)(Data_Function["const"](x));
  611. };
  612. };
  613. var functorFn = new Functor(Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn));
  614. var functorArray = new Functor($foreign.arrayMap);
  615. var flap = function flap(dictFunctor) {
  616. return function (ff) {
  617. return function (x) {
  618. return map(dictFunctor)(function (f) {
  619. return f(x);
  620. })(ff);
  621. };
  622. };
  623. };
  624. module.exports = {
  625. Functor: Functor,
  626. map: map,
  627. mapFlipped: mapFlipped,
  628. "void": $$void,
  629. voidRight: voidRight,
  630. voidLeft: voidLeft,
  631. flap: flap,
  632. functorFn: functorFn,
  633. functorArray: functorArray
  634. };
  635. },{"./foreign.js":"../output/Data.Functor/foreign.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Semigroup/foreign.js":[function(require,module,exports) {
  636. "use strict";
  637. exports.concatString = function (s1) {
  638. return function (s2) {
  639. return s1 + s2;
  640. };
  641. };
  642. exports.concatArray = function (xs) {
  643. return function (ys) {
  644. if (xs.length === 0) return ys;
  645. if (ys.length === 0) return xs;
  646. return xs.concat(ys);
  647. };
  648. };
  649. },{}],"../output/Data.Void/index.js":[function(require,module,exports) {
  650. // Generated by purs version 0.13.6
  651. "use strict";
  652. var Data_Show = require("../Data.Show/index.js");
  653. var Void = function Void(x) {
  654. return x;
  655. };
  656. var absurd = function absurd(a) {
  657. var spin = function spin($copy_v) {
  658. var $tco_result;
  659. function $tco_loop(v) {
  660. $copy_v = v;
  661. return;
  662. }
  663. ;
  664. while (!false) {
  665. $tco_result = $tco_loop($copy_v);
  666. }
  667. ;
  668. return $tco_result;
  669. };
  670. return spin(a);
  671. };
  672. var showVoid = new Data_Show.Show(absurd);
  673. module.exports = {
  674. absurd: absurd,
  675. showVoid: showVoid
  676. };
  677. },{"../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup/index.js":[function(require,module,exports) {
  678. // Generated by purs version 0.13.6
  679. "use strict";
  680. var $foreign = require("./foreign.js");
  681. var Data_Symbol = require("../Data.Symbol/index.js");
  682. var Data_Unit = require("../Data.Unit/index.js");
  683. var Data_Void = require("../Data.Void/index.js");
  684. var Record_Unsafe = require("../Record.Unsafe/index.js");
  685. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  686. var SemigroupRecord = function SemigroupRecord(appendRecord) {
  687. this.appendRecord = appendRecord;
  688. };
  689. var Semigroup = function Semigroup(append) {
  690. this.append = append;
  691. };
  692. var semigroupVoid = new Semigroup(function (v) {
  693. return Data_Void.absurd;
  694. });
  695. var semigroupUnit = new Semigroup(function (v) {
  696. return function (v1) {
  697. return Data_Unit.unit;
  698. };
  699. });
  700. var semigroupString = new Semigroup($foreign.concatString);
  701. var semigroupRecordNil = new SemigroupRecord(function (v) {
  702. return function (v1) {
  703. return function (v2) {
  704. return {};
  705. };
  706. };
  707. });
  708. var semigroupArray = new Semigroup($foreign.concatArray);
  709. var appendRecord = function appendRecord(dict) {
  710. return dict.appendRecord;
  711. };
  712. var semigroupRecord = function semigroupRecord(dictRowToList) {
  713. return function (dictSemigroupRecord) {
  714. return new Semigroup(appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value));
  715. };
  716. };
  717. var append = function append(dict) {
  718. return dict.append;
  719. };
  720. var semigroupFn = function semigroupFn(dictSemigroup) {
  721. return new Semigroup(function (f) {
  722. return function (g) {
  723. return function (x) {
  724. return append(dictSemigroup)(f(x))(g(x));
  725. };
  726. };
  727. });
  728. };
  729. var semigroupRecordCons = function semigroupRecordCons(dictIsSymbol) {
  730. return function (dictCons) {
  731. return function (dictSemigroupRecord) {
  732. return function (dictSemigroup) {
  733. return new SemigroupRecord(function (v) {
  734. return function (ra) {
  735. return function (rb) {
  736. var tail = appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  737. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  738. var insert = Record_Unsafe.unsafeSet(key);
  739. var get = Record_Unsafe.unsafeGet(key);
  740. return insert(append(dictSemigroup)(get(ra))(get(rb)))(tail);
  741. };
  742. };
  743. });
  744. };
  745. };
  746. };
  747. };
  748. module.exports = {
  749. Semigroup: Semigroup,
  750. append: append,
  751. SemigroupRecord: SemigroupRecord,
  752. appendRecord: appendRecord,
  753. semigroupString: semigroupString,
  754. semigroupUnit: semigroupUnit,
  755. semigroupVoid: semigroupVoid,
  756. semigroupFn: semigroupFn,
  757. semigroupArray: semigroupArray,
  758. semigroupRecord: semigroupRecord,
  759. semigroupRecordNil: semigroupRecordNil,
  760. semigroupRecordCons: semigroupRecordCons
  761. };
  762. },{"./foreign.js":"../output/Data.Semigroup/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Data.Void/index.js":"../output/Data.Void/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Control.Alt/index.js":[function(require,module,exports) {
  763. // Generated by purs version 0.13.6
  764. "use strict";
  765. var Data_Functor = require("../Data.Functor/index.js");
  766. var Data_Semigroup = require("../Data.Semigroup/index.js");
  767. var Alt = function Alt(Functor0, alt) {
  768. this.Functor0 = Functor0;
  769. this.alt = alt;
  770. };
  771. var altArray = new Alt(function () {
  772. return Data_Functor.functorArray;
  773. }, Data_Semigroup.append(Data_Semigroup.semigroupArray));
  774. var alt = function alt(dict) {
  775. return dict.alt;
  776. };
  777. module.exports = {
  778. Alt: Alt,
  779. alt: alt,
  780. altArray: altArray
  781. };
  782. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Control.Apply/foreign.js":[function(require,module,exports) {
  783. "use strict";
  784. exports.arrayApply = function (fs) {
  785. return function (xs) {
  786. var l = fs.length;
  787. var k = xs.length;
  788. var result = new Array(l * k);
  789. var n = 0;
  790. for (var i = 0; i < l; i++) {
  791. var f = fs[i];
  792. for (var j = 0; j < k; j++) {
  793. result[n++] = f(xs[j]);
  794. }
  795. }
  796. return result;
  797. };
  798. };
  799. },{}],"../output/Control.Category/index.js":[function(require,module,exports) {
  800. // Generated by purs version 0.13.6
  801. "use strict";
  802. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  803. var Category = function Category(Semigroupoid0, identity) {
  804. this.Semigroupoid0 = Semigroupoid0;
  805. this.identity = identity;
  806. };
  807. var identity = function identity(dict) {
  808. return dict.identity;
  809. };
  810. var categoryFn = new Category(function () {
  811. return Control_Semigroupoid.semigroupoidFn;
  812. }, function (x) {
  813. return x;
  814. });
  815. module.exports = {
  816. Category: Category,
  817. identity: identity,
  818. categoryFn: categoryFn
  819. };
  820. },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js"}],"../output/Control.Apply/index.js":[function(require,module,exports) {
  821. // Generated by purs version 0.13.6
  822. "use strict";
  823. var $foreign = require("./foreign.js");
  824. var Control_Category = require("../Control.Category/index.js");
  825. var Data_Function = require("../Data.Function/index.js");
  826. var Data_Functor = require("../Data.Functor/index.js");
  827. var Apply = function Apply(Functor0, apply) {
  828. this.Functor0 = Functor0;
  829. this.apply = apply;
  830. };
  831. var applyFn = new Apply(function () {
  832. return Data_Functor.functorFn;
  833. }, function (f) {
  834. return function (g) {
  835. return function (x) {
  836. return f(x)(g(x));
  837. };
  838. };
  839. });
  840. var applyArray = new Apply(function () {
  841. return Data_Functor.functorArray;
  842. }, $foreign.arrayApply);
  843. var apply = function apply(dict) {
  844. return dict.apply;
  845. };
  846. var applyFirst = function applyFirst(dictApply) {
  847. return function (a) {
  848. return function (b) {
  849. return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"])(a))(b);
  850. };
  851. };
  852. };
  853. var applySecond = function applySecond(dictApply) {
  854. return function (a) {
  855. return function (b) {
  856. return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(a))(b);
  857. };
  858. };
  859. };
  860. var lift2 = function lift2(dictApply) {
  861. return function (f) {
  862. return function (a) {
  863. return function (b) {
  864. return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b);
  865. };
  866. };
  867. };
  868. };
  869. var lift3 = function lift3(dictApply) {
  870. return function (f) {
  871. return function (a) {
  872. return function (b) {
  873. return function (c) {
  874. return apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c);
  875. };
  876. };
  877. };
  878. };
  879. };
  880. var lift4 = function lift4(dictApply) {
  881. return function (f) {
  882. return function (a) {
  883. return function (b) {
  884. return function (c) {
  885. return function (d) {
  886. return apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d);
  887. };
  888. };
  889. };
  890. };
  891. };
  892. };
  893. var lift5 = function lift5(dictApply) {
  894. return function (f) {
  895. return function (a) {
  896. return function (b) {
  897. return function (c) {
  898. return function (d) {
  899. return function (e) {
  900. return apply(dictApply)(apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d))(e);
  901. };
  902. };
  903. };
  904. };
  905. };
  906. };
  907. };
  908. module.exports = {
  909. Apply: Apply,
  910. apply: apply,
  911. applyFirst: applyFirst,
  912. applySecond: applySecond,
  913. lift2: lift2,
  914. lift3: lift3,
  915. lift4: lift4,
  916. lift5: lift5,
  917. applyFn: applyFn,
  918. applyArray: applyArray
  919. };
  920. },{"./foreign.js":"../output/Control.Apply/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Control.Applicative/index.js":[function(require,module,exports) {
  921. // Generated by purs version 0.13.6
  922. "use strict";
  923. var Control_Apply = require("../Control.Apply/index.js");
  924. var Data_Unit = require("../Data.Unit/index.js");
  925. var Applicative = function Applicative(Apply0, pure) {
  926. this.Apply0 = Apply0;
  927. this.pure = pure;
  928. };
  929. var pure = function pure(dict) {
  930. return dict.pure;
  931. };
  932. var unless = function unless(dictApplicative) {
  933. return function (v) {
  934. return function (v1) {
  935. if (!v) {
  936. return v1;
  937. }
  938. ;
  939. if (v) {
  940. return pure(dictApplicative)(Data_Unit.unit);
  941. }
  942. ;
  943. throw new Error("Failed pattern match at Control.Applicative (line 62, column 1 - line 62, column 65): " + [v.constructor.name, v1.constructor.name]);
  944. };
  945. };
  946. };
  947. var when = function when(dictApplicative) {
  948. return function (v) {
  949. return function (v1) {
  950. if (v) {
  951. return v1;
  952. }
  953. ;
  954. if (!v) {
  955. return pure(dictApplicative)(Data_Unit.unit);
  956. }
  957. ;
  958. throw new Error("Failed pattern match at Control.Applicative (line 57, column 1 - line 57, column 63): " + [v.constructor.name, v1.constructor.name]);
  959. };
  960. };
  961. };
  962. var liftA1 = function liftA1(dictApplicative) {
  963. return function (f) {
  964. return function (a) {
  965. return Control_Apply.apply(dictApplicative.Apply0())(pure(dictApplicative)(f))(a);
  966. };
  967. };
  968. };
  969. var applicativeFn = new Applicative(function () {
  970. return Control_Apply.applyFn;
  971. }, function (x) {
  972. return function (v) {
  973. return x;
  974. };
  975. });
  976. var applicativeArray = new Applicative(function () {
  977. return Control_Apply.applyArray;
  978. }, function (x) {
  979. return [x];
  980. });
  981. module.exports = {
  982. Applicative: Applicative,
  983. pure: pure,
  984. liftA1: liftA1,
  985. unless: unless,
  986. when: when,
  987. applicativeFn: applicativeFn,
  988. applicativeArray: applicativeArray
  989. };
  990. },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Control.Plus/index.js":[function(require,module,exports) {
  991. // Generated by purs version 0.13.6
  992. "use strict";
  993. var Control_Alt = require("../Control.Alt/index.js");
  994. var Plus = function Plus(Alt0, empty) {
  995. this.Alt0 = Alt0;
  996. this.empty = empty;
  997. };
  998. var plusArray = new Plus(function () {
  999. return Control_Alt.altArray;
  1000. }, []);
  1001. var empty = function empty(dict) {
  1002. return dict.empty;
  1003. };
  1004. module.exports = {
  1005. Plus: Plus,
  1006. empty: empty,
  1007. plusArray: plusArray
  1008. };
  1009. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js"}],"../output/Control.Alternative/index.js":[function(require,module,exports) {
  1010. // Generated by purs version 0.13.6
  1011. "use strict";
  1012. var Control_Applicative = require("../Control.Applicative/index.js");
  1013. var Control_Plus = require("../Control.Plus/index.js");
  1014. var Alternative = function Alternative(Applicative0, Plus1) {
  1015. this.Applicative0 = Applicative0;
  1016. this.Plus1 = Plus1;
  1017. };
  1018. var alternativeArray = new Alternative(function () {
  1019. return Control_Applicative.applicativeArray;
  1020. }, function () {
  1021. return Control_Plus.plusArray;
  1022. });
  1023. module.exports = {
  1024. Alternative: Alternative,
  1025. alternativeArray: alternativeArray
  1026. };
  1027. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js"}],"../output/Control.Bind/foreign.js":[function(require,module,exports) {
  1028. "use strict";
  1029. exports.arrayBind = function (arr) {
  1030. return function (f) {
  1031. var result = [];
  1032. for (var i = 0, l = arr.length; i < l; i++) {
  1033. Array.prototype.push.apply(result, f(arr[i]));
  1034. }
  1035. return result;
  1036. };
  1037. };
  1038. },{}],"../output/Control.Bind/index.js":[function(require,module,exports) {
  1039. // Generated by purs version 0.13.6
  1040. "use strict";
  1041. var $foreign = require("./foreign.js");
  1042. var Control_Apply = require("../Control.Apply/index.js");
  1043. var Control_Category = require("../Control.Category/index.js");
  1044. var Data_Function = require("../Data.Function/index.js");
  1045. var Discard = function Discard(discard) {
  1046. this.discard = discard;
  1047. };
  1048. var Bind = function Bind(Apply0, bind) {
  1049. this.Apply0 = Apply0;
  1050. this.bind = bind;
  1051. };
  1052. var discard = function discard(dict) {
  1053. return dict.discard;
  1054. };
  1055. var bindFn = new Bind(function () {
  1056. return Control_Apply.applyFn;
  1057. }, function (m) {
  1058. return function (f) {
  1059. return function (x) {
  1060. return f(m(x))(x);
  1061. };
  1062. };
  1063. });
  1064. var bindArray = new Bind(function () {
  1065. return Control_Apply.applyArray;
  1066. }, $foreign.arrayBind);
  1067. var bind = function bind(dict) {
  1068. return dict.bind;
  1069. };
  1070. var bindFlipped = function bindFlipped(dictBind) {
  1071. return Data_Function.flip(bind(dictBind));
  1072. };
  1073. var composeKleisliFlipped = function composeKleisliFlipped(dictBind) {
  1074. return function (f) {
  1075. return function (g) {
  1076. return function (a) {
  1077. return bindFlipped(dictBind)(f)(g(a));
  1078. };
  1079. };
  1080. };
  1081. };
  1082. var composeKleisli = function composeKleisli(dictBind) {
  1083. return function (f) {
  1084. return function (g) {
  1085. return function (a) {
  1086. return bind(dictBind)(f(a))(g);
  1087. };
  1088. };
  1089. };
  1090. };
  1091. var discardUnit = new Discard(function (dictBind) {
  1092. return bind(dictBind);
  1093. });
  1094. var ifM = function ifM(dictBind) {
  1095. return function (cond) {
  1096. return function (t) {
  1097. return function (f) {
  1098. return bind(dictBind)(cond)(function (cond$prime) {
  1099. if (cond$prime) {
  1100. return t;
  1101. }
  1102. ;
  1103. return f;
  1104. });
  1105. };
  1106. };
  1107. };
  1108. };
  1109. var join = function join(dictBind) {
  1110. return function (m) {
  1111. return bind(dictBind)(m)(Control_Category.identity(Control_Category.categoryFn));
  1112. };
  1113. };
  1114. module.exports = {
  1115. Bind: Bind,
  1116. bind: bind,
  1117. bindFlipped: bindFlipped,
  1118. Discard: Discard,
  1119. discard: discard,
  1120. join: join,
  1121. composeKleisli: composeKleisli,
  1122. composeKleisliFlipped: composeKleisliFlipped,
  1123. ifM: ifM,
  1124. bindFn: bindFn,
  1125. bindArray: bindArray,
  1126. discardUnit: discardUnit
  1127. };
  1128. },{"./foreign.js":"../output/Control.Bind/foreign.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Function/index.js":"../output/Data.Function/index.js"}],"../output/Control.Monad/index.js":[function(require,module,exports) {
  1129. // Generated by purs version 0.13.6
  1130. "use strict";
  1131. var Control_Applicative = require("../Control.Applicative/index.js");
  1132. var Control_Bind = require("../Control.Bind/index.js");
  1133. var Monad = function Monad(Applicative0, Bind1) {
  1134. this.Applicative0 = Applicative0;
  1135. this.Bind1 = Bind1;
  1136. };
  1137. var whenM = function whenM(dictMonad) {
  1138. return function (mb) {
  1139. return function (m) {
  1140. return Control_Bind.bind(dictMonad.Bind1())(mb)(function (b) {
  1141. return Control_Applicative.when(dictMonad.Applicative0())(b)(m);
  1142. });
  1143. };
  1144. };
  1145. };
  1146. var unlessM = function unlessM(dictMonad) {
  1147. return function (mb) {
  1148. return function (m) {
  1149. return Control_Bind.bind(dictMonad.Bind1())(mb)(function (b) {
  1150. return Control_Applicative.unless(dictMonad.Applicative0())(b)(m);
  1151. });
  1152. };
  1153. };
  1154. };
  1155. var monadFn = new Monad(function () {
  1156. return Control_Applicative.applicativeFn;
  1157. }, function () {
  1158. return Control_Bind.bindFn;
  1159. });
  1160. var monadArray = new Monad(function () {
  1161. return Control_Applicative.applicativeArray;
  1162. }, function () {
  1163. return Control_Bind.bindArray;
  1164. });
  1165. var liftM1 = function liftM1(dictMonad) {
  1166. return function (f) {
  1167. return function (a) {
  1168. return Control_Bind.bind(dictMonad.Bind1())(a)(function (a$prime) {
  1169. return Control_Applicative.pure(dictMonad.Applicative0())(f(a$prime));
  1170. });
  1171. };
  1172. };
  1173. };
  1174. var ap = function ap(dictMonad) {
  1175. return function (f) {
  1176. return function (a) {
  1177. return Control_Bind.bind(dictMonad.Bind1())(f)(function (f$prime) {
  1178. return Control_Bind.bind(dictMonad.Bind1())(a)(function (a$prime) {
  1179. return Control_Applicative.pure(dictMonad.Applicative0())(f$prime(a$prime));
  1180. });
  1181. });
  1182. };
  1183. };
  1184. };
  1185. module.exports = {
  1186. Monad: Monad,
  1187. liftM1: liftM1,
  1188. ap: ap,
  1189. whenM: whenM,
  1190. unlessM: unlessM,
  1191. monadFn: monadFn,
  1192. monadArray: monadArray
  1193. };
  1194. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js"}],"../output/Control.Monad.Cont.Class/index.js":[function(require,module,exports) {
  1195. // Generated by purs version 0.13.6
  1196. "use strict";
  1197. var MonadCont = function MonadCont(Monad0, callCC) {
  1198. this.Monad0 = Monad0;
  1199. this.callCC = callCC;
  1200. };
  1201. var callCC = function callCC(dict) {
  1202. return dict.callCC;
  1203. };
  1204. module.exports = {
  1205. MonadCont: MonadCont,
  1206. callCC: callCC
  1207. };
  1208. },{}],"../output/Control.Extend/foreign.js":[function(require,module,exports) {
  1209. "use strict";
  1210. exports.arrayExtend = function (f) {
  1211. return function (xs) {
  1212. return xs.map(function (_, i, xs) {
  1213. return f(xs.slice(i));
  1214. });
  1215. };
  1216. };
  1217. },{}],"../output/Control.Extend/index.js":[function(require,module,exports) {
  1218. // Generated by purs version 0.13.6
  1219. "use strict";
  1220. var $foreign = require("./foreign.js");
  1221. var Control_Category = require("../Control.Category/index.js");
  1222. var Data_Functor = require("../Data.Functor/index.js");
  1223. var Data_Semigroup = require("../Data.Semigroup/index.js");
  1224. var Extend = function Extend(Functor0, extend) {
  1225. this.Functor0 = Functor0;
  1226. this.extend = extend;
  1227. };
  1228. var extendFn = function extendFn(dictSemigroup) {
  1229. return new Extend(function () {
  1230. return Data_Functor.functorFn;
  1231. }, function (f) {
  1232. return function (g) {
  1233. return function (w) {
  1234. return f(function (w$prime) {
  1235. return g(Data_Semigroup.append(dictSemigroup)(w)(w$prime));
  1236. });
  1237. };
  1238. };
  1239. });
  1240. };
  1241. var extendArray = new Extend(function () {
  1242. return Data_Functor.functorArray;
  1243. }, $foreign.arrayExtend);
  1244. var extend = function extend(dict) {
  1245. return dict.extend;
  1246. };
  1247. var extendFlipped = function extendFlipped(dictExtend) {
  1248. return function (w) {
  1249. return function (f) {
  1250. return extend(dictExtend)(f)(w);
  1251. };
  1252. };
  1253. };
  1254. var duplicate = function duplicate(dictExtend) {
  1255. return extend(dictExtend)(Control_Category.identity(Control_Category.categoryFn));
  1256. };
  1257. var composeCoKleisliFlipped = function composeCoKleisliFlipped(dictExtend) {
  1258. return function (f) {
  1259. return function (g) {
  1260. return function (w) {
  1261. return f(extend(dictExtend)(g)(w));
  1262. };
  1263. };
  1264. };
  1265. };
  1266. var composeCoKleisli = function composeCoKleisli(dictExtend) {
  1267. return function (f) {
  1268. return function (g) {
  1269. return function (w) {
  1270. return g(extend(dictExtend)(f)(w));
  1271. };
  1272. };
  1273. };
  1274. };
  1275. module.exports = {
  1276. Extend: Extend,
  1277. extend: extend,
  1278. extendFlipped: extendFlipped,
  1279. composeCoKleisli: composeCoKleisli,
  1280. composeCoKleisliFlipped: composeCoKleisliFlipped,
  1281. duplicate: duplicate,
  1282. extendFn: extendFn,
  1283. extendArray: extendArray
  1284. };
  1285. },{"./foreign.js":"../output/Control.Extend/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Data.Foldable/foreign.js":[function(require,module,exports) {
  1286. "use strict";
  1287. exports.foldrArray = function (f) {
  1288. return function (init) {
  1289. return function (xs) {
  1290. var acc = init;
  1291. var len = xs.length;
  1292. for (var i = len - 1; i >= 0; i--) {
  1293. acc = f(xs[i])(acc);
  1294. }
  1295. return acc;
  1296. };
  1297. };
  1298. };
  1299. exports.foldlArray = function (f) {
  1300. return function (init) {
  1301. return function (xs) {
  1302. var acc = init;
  1303. var len = xs.length;
  1304. for (var i = 0; i < len; i++) {
  1305. acc = f(acc)(xs[i]);
  1306. }
  1307. return acc;
  1308. };
  1309. };
  1310. };
  1311. },{}],"../output/Data.Eq/foreign.js":[function(require,module,exports) {
  1312. "use strict";
  1313. var refEq = function refEq(r1) {
  1314. return function (r2) {
  1315. return r1 === r2;
  1316. };
  1317. };
  1318. exports.eqBooleanImpl = refEq;
  1319. exports.eqIntImpl = refEq;
  1320. exports.eqNumberImpl = refEq;
  1321. exports.eqCharImpl = refEq;
  1322. exports.eqStringImpl = refEq;
  1323. exports.eqArrayImpl = function (f) {
  1324. return function (xs) {
  1325. return function (ys) {
  1326. if (xs === ys) return true;
  1327. if (xs.length !== ys.length) return false;
  1328. for (var i = 0; i < xs.length; i++) {
  1329. if (!f(xs[i])(ys[i])) return false;
  1330. }
  1331. return true;
  1332. };
  1333. };
  1334. };
  1335. },{}],"../output/Data.Eq/index.js":[function(require,module,exports) {
  1336. // Generated by purs version 0.13.6
  1337. "use strict";
  1338. var $foreign = require("./foreign.js");
  1339. var Data_Symbol = require("../Data.Symbol/index.js");
  1340. var Record_Unsafe = require("../Record.Unsafe/index.js");
  1341. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  1342. var EqRecord = function EqRecord(eqRecord) {
  1343. this.eqRecord = eqRecord;
  1344. };
  1345. var Eq1 = function Eq1(eq1) {
  1346. this.eq1 = eq1;
  1347. };
  1348. var Eq = function Eq(eq) {
  1349. this.eq = eq;
  1350. };
  1351. var eqVoid = new Eq(function (v) {
  1352. return function (v1) {
  1353. return true;
  1354. };
  1355. });
  1356. var eqUnit = new Eq(function (v) {
  1357. return function (v1) {
  1358. return true;
  1359. };
  1360. });
  1361. var eqString = new Eq($foreign.eqStringImpl);
  1362. var eqRowNil = new EqRecord(function (v) {
  1363. return function (v1) {
  1364. return function (v2) {
  1365. return true;
  1366. };
  1367. };
  1368. });
  1369. var eqRecord = function eqRecord(dict) {
  1370. return dict.eqRecord;
  1371. };
  1372. var eqRec = function eqRec(dictRowToList) {
  1373. return function (dictEqRecord) {
  1374. return new Eq(eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value));
  1375. };
  1376. };
  1377. var eqNumber = new Eq($foreign.eqNumberImpl);
  1378. var eqInt = new Eq($foreign.eqIntImpl);
  1379. var eqChar = new Eq($foreign.eqCharImpl);
  1380. var eqBoolean = new Eq($foreign.eqBooleanImpl);
  1381. var eq1 = function eq1(dict) {
  1382. return dict.eq1;
  1383. };
  1384. var eq = function eq(dict) {
  1385. return dict.eq;
  1386. };
  1387. var eqArray = function eqArray(dictEq) {
  1388. return new Eq($foreign.eqArrayImpl(eq(dictEq)));
  1389. };
  1390. var eq1Array = new Eq1(function (dictEq) {
  1391. return eq(eqArray(dictEq));
  1392. });
  1393. var eqRowCons = function eqRowCons(dictEqRecord) {
  1394. return function (dictCons) {
  1395. return function (dictIsSymbol) {
  1396. return function (dictEq) {
  1397. return new EqRecord(function (v) {
  1398. return function (ra) {
  1399. return function (rb) {
  1400. var tail = eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1401. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1402. var get = Record_Unsafe.unsafeGet(key);
  1403. return eq(dictEq)(get(ra))(get(rb)) && tail;
  1404. };
  1405. };
  1406. });
  1407. };
  1408. };
  1409. };
  1410. };
  1411. var notEq = function notEq(dictEq) {
  1412. return function (x) {
  1413. return function (y) {
  1414. return eq(eqBoolean)(eq(dictEq)(x)(y))(false);
  1415. };
  1416. };
  1417. };
  1418. var notEq1 = function notEq1(dictEq1) {
  1419. return function (dictEq) {
  1420. return function (x) {
  1421. return function (y) {
  1422. return eq(eqBoolean)(eq1(dictEq1)(dictEq)(x)(y))(false);
  1423. };
  1424. };
  1425. };
  1426. };
  1427. module.exports = {
  1428. Eq: Eq,
  1429. eq: eq,
  1430. notEq: notEq,
  1431. Eq1: Eq1,
  1432. eq1: eq1,
  1433. notEq1: notEq1,
  1434. EqRecord: EqRecord,
  1435. eqRecord: eqRecord,
  1436. eqBoolean: eqBoolean,
  1437. eqInt: eqInt,
  1438. eqNumber: eqNumber,
  1439. eqChar: eqChar,
  1440. eqString: eqString,
  1441. eqUnit: eqUnit,
  1442. eqVoid: eqVoid,
  1443. eqArray: eqArray,
  1444. eqRec: eqRec,
  1445. eq1Array: eq1Array,
  1446. eqRowNil: eqRowNil,
  1447. eqRowCons: eqRowCons
  1448. };
  1449. },{"./foreign.js":"../output/Data.Eq/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.HeytingAlgebra/foreign.js":[function(require,module,exports) {
  1450. "use strict";
  1451. exports.boolConj = function (b1) {
  1452. return function (b2) {
  1453. return b1 && b2;
  1454. };
  1455. };
  1456. exports.boolDisj = function (b1) {
  1457. return function (b2) {
  1458. return b1 || b2;
  1459. };
  1460. };
  1461. exports.boolNot = function (b) {
  1462. return !b;
  1463. };
  1464. },{}],"../output/Type.Data.Row/index.js":[function(require,module,exports) {
  1465. // Generated by purs version 0.13.6
  1466. "use strict";
  1467. var RProxy = function () {
  1468. function RProxy() {}
  1469. ;
  1470. RProxy.value = new RProxy();
  1471. return RProxy;
  1472. }();
  1473. module.exports = {
  1474. RProxy: RProxy
  1475. };
  1476. },{}],"../output/Data.HeytingAlgebra/index.js":[function(require,module,exports) {
  1477. // Generated by purs version 0.13.6
  1478. "use strict";
  1479. var $foreign = require("./foreign.js");
  1480. var Data_Symbol = require("../Data.Symbol/index.js");
  1481. var Data_Unit = require("../Data.Unit/index.js");
  1482. var Record_Unsafe = require("../Record.Unsafe/index.js");
  1483. var Type_Data_Row = require("../Type.Data.Row/index.js");
  1484. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  1485. var HeytingAlgebraRecord = function HeytingAlgebraRecord(conjRecord, disjRecord, ffRecord, impliesRecord, notRecord, ttRecord) {
  1486. this.conjRecord = conjRecord;
  1487. this.disjRecord = disjRecord;
  1488. this.ffRecord = ffRecord;
  1489. this.impliesRecord = impliesRecord;
  1490. this.notRecord = notRecord;
  1491. this.ttRecord = ttRecord;
  1492. };
  1493. var HeytingAlgebra = function HeytingAlgebra(conj, disj, ff, implies, not, tt) {
  1494. this.conj = conj;
  1495. this.disj = disj;
  1496. this.ff = ff;
  1497. this.implies = implies;
  1498. this.not = not;
  1499. this.tt = tt;
  1500. };
  1501. var ttRecord = function ttRecord(dict) {
  1502. return dict.ttRecord;
  1503. };
  1504. var tt = function tt(dict) {
  1505. return dict.tt;
  1506. };
  1507. var notRecord = function notRecord(dict) {
  1508. return dict.notRecord;
  1509. };
  1510. var not = function not(dict) {
  1511. return dict.not;
  1512. };
  1513. var impliesRecord = function impliesRecord(dict) {
  1514. return dict.impliesRecord;
  1515. };
  1516. var implies = function implies(dict) {
  1517. return dict.implies;
  1518. };
  1519. var heytingAlgebraUnit = new HeytingAlgebra(function (v) {
  1520. return function (v1) {
  1521. return Data_Unit.unit;
  1522. };
  1523. }, function (v) {
  1524. return function (v1) {
  1525. return Data_Unit.unit;
  1526. };
  1527. }, Data_Unit.unit, function (v) {
  1528. return function (v1) {
  1529. return Data_Unit.unit;
  1530. };
  1531. }, function (v) {
  1532. return Data_Unit.unit;
  1533. }, Data_Unit.unit);
  1534. var heytingAlgebraRecordNil = new HeytingAlgebraRecord(function (v) {
  1535. return function (v1) {
  1536. return function (v2) {
  1537. return {};
  1538. };
  1539. };
  1540. }, function (v) {
  1541. return function (v1) {
  1542. return function (v2) {
  1543. return {};
  1544. };
  1545. };
  1546. }, function (v) {
  1547. return function (v1) {
  1548. return {};
  1549. };
  1550. }, function (v) {
  1551. return function (v1) {
  1552. return function (v2) {
  1553. return {};
  1554. };
  1555. };
  1556. }, function (v) {
  1557. return function (v1) {
  1558. return {};
  1559. };
  1560. }, function (v) {
  1561. return function (v1) {
  1562. return {};
  1563. };
  1564. });
  1565. var ffRecord = function ffRecord(dict) {
  1566. return dict.ffRecord;
  1567. };
  1568. var ff = function ff(dict) {
  1569. return dict.ff;
  1570. };
  1571. var disjRecord = function disjRecord(dict) {
  1572. return dict.disjRecord;
  1573. };
  1574. var disj = function disj(dict) {
  1575. return dict.disj;
  1576. };
  1577. var heytingAlgebraBoolean = new HeytingAlgebra($foreign.boolConj, $foreign.boolDisj, false, function (a) {
  1578. return function (b) {
  1579. return disj(heytingAlgebraBoolean)(not(heytingAlgebraBoolean)(a))(b);
  1580. };
  1581. }, $foreign.boolNot, true);
  1582. var conjRecord = function conjRecord(dict) {
  1583. return dict.conjRecord;
  1584. };
  1585. var heytingAlgebraRecord = function heytingAlgebraRecord(dictRowToList) {
  1586. return function (dictHeytingAlgebraRecord) {
  1587. return new HeytingAlgebra(conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value), impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value));
  1588. };
  1589. };
  1590. var conj = function conj(dict) {
  1591. return dict.conj;
  1592. };
  1593. var heytingAlgebraFunction = function heytingAlgebraFunction(dictHeytingAlgebra) {
  1594. return new HeytingAlgebra(function (f) {
  1595. return function (g) {
  1596. return function (a) {
  1597. return conj(dictHeytingAlgebra)(f(a))(g(a));
  1598. };
  1599. };
  1600. }, function (f) {
  1601. return function (g) {
  1602. return function (a) {
  1603. return disj(dictHeytingAlgebra)(f(a))(g(a));
  1604. };
  1605. };
  1606. }, function (v) {
  1607. return ff(dictHeytingAlgebra);
  1608. }, function (f) {
  1609. return function (g) {
  1610. return function (a) {
  1611. return implies(dictHeytingAlgebra)(f(a))(g(a));
  1612. };
  1613. };
  1614. }, function (f) {
  1615. return function (a) {
  1616. return not(dictHeytingAlgebra)(f(a));
  1617. };
  1618. }, function (v) {
  1619. return tt(dictHeytingAlgebra);
  1620. });
  1621. };
  1622. var heytingAlgebraRecordCons = function heytingAlgebraRecordCons(dictIsSymbol) {
  1623. return function (dictCons) {
  1624. return function (dictHeytingAlgebraRecord) {
  1625. return function (dictHeytingAlgebra) {
  1626. return new HeytingAlgebraRecord(function (v) {
  1627. return function (ra) {
  1628. return function (rb) {
  1629. var tail = conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1630. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1631. var insert = Record_Unsafe.unsafeSet(key);
  1632. var get = Record_Unsafe.unsafeGet(key);
  1633. return insert(conj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
  1634. };
  1635. };
  1636. }, function (v) {
  1637. return function (ra) {
  1638. return function (rb) {
  1639. var tail = disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1640. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1641. var insert = Record_Unsafe.unsafeSet(key);
  1642. var get = Record_Unsafe.unsafeGet(key);
  1643. return insert(disj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
  1644. };
  1645. };
  1646. }, function (v) {
  1647. return function (row) {
  1648. var tail = ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
  1649. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1650. var insert = Record_Unsafe.unsafeSet(key);
  1651. return insert(ff(dictHeytingAlgebra))(tail);
  1652. };
  1653. }, function (v) {
  1654. return function (ra) {
  1655. return function (rb) {
  1656. var tail = impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1657. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1658. var insert = Record_Unsafe.unsafeSet(key);
  1659. var get = Record_Unsafe.unsafeGet(key);
  1660. return insert(implies(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
  1661. };
  1662. };
  1663. }, function (v) {
  1664. return function (row) {
  1665. var tail = notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
  1666. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1667. var insert = Record_Unsafe.unsafeSet(key);
  1668. var get = Record_Unsafe.unsafeGet(key);
  1669. return insert(not(dictHeytingAlgebra)(get(row)))(tail);
  1670. };
  1671. }, function (v) {
  1672. return function (row) {
  1673. var tail = ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
  1674. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1675. var insert = Record_Unsafe.unsafeSet(key);
  1676. return insert(tt(dictHeytingAlgebra))(tail);
  1677. };
  1678. });
  1679. };
  1680. };
  1681. };
  1682. };
  1683. module.exports = {
  1684. HeytingAlgebra: HeytingAlgebra,
  1685. tt: tt,
  1686. ff: ff,
  1687. implies: implies,
  1688. conj: conj,
  1689. disj: disj,
  1690. not: not,
  1691. HeytingAlgebraRecord: HeytingAlgebraRecord,
  1692. ffRecord: ffRecord,
  1693. ttRecord: ttRecord,
  1694. impliesRecord: impliesRecord,
  1695. conjRecord: conjRecord,
  1696. disjRecord: disjRecord,
  1697. notRecord: notRecord,
  1698. heytingAlgebraBoolean: heytingAlgebraBoolean,
  1699. heytingAlgebraUnit: heytingAlgebraUnit,
  1700. heytingAlgebraFunction: heytingAlgebraFunction,
  1701. heytingAlgebraRecord: heytingAlgebraRecord,
  1702. heytingAlgebraRecordNil: heytingAlgebraRecordNil,
  1703. heytingAlgebraRecordCons: heytingAlgebraRecordCons
  1704. };
  1705. },{"./foreign.js":"../output/Data.HeytingAlgebra/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.Row/index.js":"../output/Type.Data.Row/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Control.MonadZero/index.js":[function(require,module,exports) {
  1706. // Generated by purs version 0.13.6
  1707. "use strict";
  1708. var Control_Alternative = require("../Control.Alternative/index.js");
  1709. var Control_Applicative = require("../Control.Applicative/index.js");
  1710. var Control_Monad = require("../Control.Monad/index.js");
  1711. var Control_Plus = require("../Control.Plus/index.js");
  1712. var Data_Unit = require("../Data.Unit/index.js");
  1713. var MonadZero = function MonadZero(Alternative1, Monad0) {
  1714. this.Alternative1 = Alternative1;
  1715. this.Monad0 = Monad0;
  1716. };
  1717. var monadZeroArray = new MonadZero(function () {
  1718. return Control_Alternative.alternativeArray;
  1719. }, function () {
  1720. return Control_Monad.monadArray;
  1721. });
  1722. var guard = function guard(dictMonadZero) {
  1723. return function (v) {
  1724. if (v) {
  1725. return Control_Applicative.pure(dictMonadZero.Alternative1().Applicative0())(Data_Unit.unit);
  1726. }
  1727. ;
  1728. if (!v) {
  1729. return Control_Plus.empty(dictMonadZero.Alternative1().Plus1());
  1730. }
  1731. ;
  1732. throw new Error("Failed pattern match at Control.MonadZero (line 54, column 1 - line 54, column 52): " + [v.constructor.name]);
  1733. };
  1734. };
  1735. module.exports = {
  1736. MonadZero: MonadZero,
  1737. guard: guard,
  1738. monadZeroArray: monadZeroArray
  1739. };
  1740. },{"../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Bounded/foreign.js":[function(require,module,exports) {
  1741. "use strict";
  1742. exports.topInt = 2147483647;
  1743. exports.bottomInt = -2147483648;
  1744. exports.topChar = String.fromCharCode(65535);
  1745. exports.bottomChar = String.fromCharCode(0);
  1746. exports.topNumber = Number.POSITIVE_INFINITY;
  1747. exports.bottomNumber = Number.NEGATIVE_INFINITY;
  1748. },{}],"../output/Data.Ord/foreign.js":[function(require,module,exports) {
  1749. "use strict";
  1750. var unsafeCompareImpl = function unsafeCompareImpl(lt) {
  1751. return function (eq) {
  1752. return function (gt) {
  1753. return function (x) {
  1754. return function (y) {
  1755. return x < y ? lt : x === y ? eq : gt;
  1756. };
  1757. };
  1758. };
  1759. };
  1760. };
  1761. exports.ordBooleanImpl = unsafeCompareImpl;
  1762. exports.ordIntImpl = unsafeCompareImpl;
  1763. exports.ordNumberImpl = unsafeCompareImpl;
  1764. exports.ordStringImpl = unsafeCompareImpl;
  1765. exports.ordCharImpl = unsafeCompareImpl;
  1766. exports.ordArrayImpl = function (f) {
  1767. return function (xs) {
  1768. return function (ys) {
  1769. var i = 0;
  1770. var xlen = xs.length;
  1771. var ylen = ys.length;
  1772. while (i < xlen && i < ylen) {
  1773. var x = xs[i];
  1774. var y = ys[i];
  1775. var o = f(x)(y);
  1776. if (o !== 0) {
  1777. return o;
  1778. }
  1779. i++;
  1780. }
  1781. if (xlen === ylen) {
  1782. return 0;
  1783. } else if (xlen > ylen) {
  1784. return -1;
  1785. } else {
  1786. return 1;
  1787. }
  1788. };
  1789. };
  1790. };
  1791. },{}],"../output/Data.Ordering/index.js":[function(require,module,exports) {
  1792. // Generated by purs version 0.13.6
  1793. "use strict";
  1794. var Data_Eq = require("../Data.Eq/index.js");
  1795. var Data_Semigroup = require("../Data.Semigroup/index.js");
  1796. var Data_Show = require("../Data.Show/index.js");
  1797. var LT = function () {
  1798. function LT() {}
  1799. ;
  1800. LT.value = new LT();
  1801. return LT;
  1802. }();
  1803. var GT = function () {
  1804. function GT() {}
  1805. ;
  1806. GT.value = new GT();
  1807. return GT;
  1808. }();
  1809. var EQ = function () {
  1810. function EQ() {}
  1811. ;
  1812. EQ.value = new EQ();
  1813. return EQ;
  1814. }();
  1815. var showOrdering = new Data_Show.Show(function (v) {
  1816. if (v instanceof LT) {
  1817. return "LT";
  1818. }
  1819. ;
  1820. if (v instanceof GT) {
  1821. return "GT";
  1822. }
  1823. ;
  1824. if (v instanceof EQ) {
  1825. return "EQ";
  1826. }
  1827. ;
  1828. throw new Error("Failed pattern match at Data.Ordering (line 26, column 1 - line 29, column 17): " + [v.constructor.name]);
  1829. });
  1830. var semigroupOrdering = new Data_Semigroup.Semigroup(function (v) {
  1831. return function (v1) {
  1832. if (v instanceof LT) {
  1833. return LT.value;
  1834. }
  1835. ;
  1836. if (v instanceof GT) {
  1837. return GT.value;
  1838. }
  1839. ;
  1840. if (v instanceof EQ) {
  1841. return v1;
  1842. }
  1843. ;
  1844. throw new Error("Failed pattern match at Data.Ordering (line 21, column 1 - line 24, column 18): " + [v.constructor.name, v1.constructor.name]);
  1845. };
  1846. });
  1847. var invert = function invert(v) {
  1848. if (v instanceof GT) {
  1849. return LT.value;
  1850. }
  1851. ;
  1852. if (v instanceof EQ) {
  1853. return EQ.value;
  1854. }
  1855. ;
  1856. if (v instanceof LT) {
  1857. return GT.value;
  1858. }
  1859. ;
  1860. throw new Error("Failed pattern match at Data.Ordering (line 33, column 1 - line 33, column 31): " + [v.constructor.name]);
  1861. };
  1862. var eqOrdering = new Data_Eq.Eq(function (v) {
  1863. return function (v1) {
  1864. if (v instanceof LT && v1 instanceof LT) {
  1865. return true;
  1866. }
  1867. ;
  1868. if (v instanceof GT && v1 instanceof GT) {
  1869. return true;
  1870. }
  1871. ;
  1872. if (v instanceof EQ && v1 instanceof EQ) {
  1873. return true;
  1874. }
  1875. ;
  1876. return false;
  1877. };
  1878. });
  1879. module.exports = {
  1880. LT: LT,
  1881. GT: GT,
  1882. EQ: EQ,
  1883. invert: invert,
  1884. eqOrdering: eqOrdering,
  1885. semigroupOrdering: semigroupOrdering,
  1886. showOrdering: showOrdering
  1887. };
  1888. },{"../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Ring/foreign.js":[function(require,module,exports) {
  1889. "use strict";
  1890. exports.intSub = function (x) {
  1891. return function (y) {
  1892. /* jshint bitwise: false */
  1893. return x - y | 0;
  1894. };
  1895. };
  1896. exports.numSub = function (n1) {
  1897. return function (n2) {
  1898. return n1 - n2;
  1899. };
  1900. };
  1901. },{}],"../output/Data.Semiring/foreign.js":[function(require,module,exports) {
  1902. "use strict";
  1903. exports.intAdd = function (x) {
  1904. return function (y) {
  1905. /* jshint bitwise: false */
  1906. return x + y | 0;
  1907. };
  1908. };
  1909. exports.intMul = function (x) {
  1910. return function (y) {
  1911. /* jshint bitwise: false */
  1912. return x * y | 0;
  1913. };
  1914. };
  1915. exports.numAdd = function (n1) {
  1916. return function (n2) {
  1917. return n1 + n2;
  1918. };
  1919. };
  1920. exports.numMul = function (n1) {
  1921. return function (n2) {
  1922. return n1 * n2;
  1923. };
  1924. };
  1925. },{}],"../output/Data.Semiring/index.js":[function(require,module,exports) {
  1926. // Generated by purs version 0.13.6
  1927. "use strict";
  1928. var $foreign = require("./foreign.js");
  1929. var Data_Symbol = require("../Data.Symbol/index.js");
  1930. var Data_Unit = require("../Data.Unit/index.js");
  1931. var Record_Unsafe = require("../Record.Unsafe/index.js");
  1932. var Type_Data_Row = require("../Type.Data.Row/index.js");
  1933. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  1934. var SemiringRecord = function SemiringRecord(addRecord, mulRecord, oneRecord, zeroRecord) {
  1935. this.addRecord = addRecord;
  1936. this.mulRecord = mulRecord;
  1937. this.oneRecord = oneRecord;
  1938. this.zeroRecord = zeroRecord;
  1939. };
  1940. var Semiring = function Semiring(add, mul, one, zero) {
  1941. this.add = add;
  1942. this.mul = mul;
  1943. this.one = one;
  1944. this.zero = zero;
  1945. };
  1946. var zeroRecord = function zeroRecord(dict) {
  1947. return dict.zeroRecord;
  1948. };
  1949. var zero = function zero(dict) {
  1950. return dict.zero;
  1951. };
  1952. var semiringUnit = new Semiring(function (v) {
  1953. return function (v1) {
  1954. return Data_Unit.unit;
  1955. };
  1956. }, function (v) {
  1957. return function (v1) {
  1958. return Data_Unit.unit;
  1959. };
  1960. }, Data_Unit.unit, Data_Unit.unit);
  1961. var semiringRecordNil = new SemiringRecord(function (v) {
  1962. return function (v1) {
  1963. return function (v2) {
  1964. return {};
  1965. };
  1966. };
  1967. }, function (v) {
  1968. return function (v1) {
  1969. return function (v2) {
  1970. return {};
  1971. };
  1972. };
  1973. }, function (v) {
  1974. return function (v1) {
  1975. return {};
  1976. };
  1977. }, function (v) {
  1978. return function (v1) {
  1979. return {};
  1980. };
  1981. });
  1982. var semiringNumber = new Semiring($foreign.numAdd, $foreign.numMul, 1.0, 0.0);
  1983. var semiringInt = new Semiring($foreign.intAdd, $foreign.intMul, 1, 0);
  1984. var oneRecord = function oneRecord(dict) {
  1985. return dict.oneRecord;
  1986. };
  1987. var one = function one(dict) {
  1988. return dict.one;
  1989. };
  1990. var mulRecord = function mulRecord(dict) {
  1991. return dict.mulRecord;
  1992. };
  1993. var mul = function mul(dict) {
  1994. return dict.mul;
  1995. };
  1996. var addRecord = function addRecord(dict) {
  1997. return dict.addRecord;
  1998. };
  1999. var semiringRecord = function semiringRecord(dictRowToList) {
  2000. return function (dictSemiringRecord) {
  2001. return new Semiring(addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value), mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value), oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value), zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value));
  2002. };
  2003. };
  2004. var add = function add(dict) {
  2005. return dict.add;
  2006. };
  2007. var semiringFn = function semiringFn(dictSemiring) {
  2008. return new Semiring(function (f) {
  2009. return function (g) {
  2010. return function (x) {
  2011. return add(dictSemiring)(f(x))(g(x));
  2012. };
  2013. };
  2014. }, function (f) {
  2015. return function (g) {
  2016. return function (x) {
  2017. return mul(dictSemiring)(f(x))(g(x));
  2018. };
  2019. };
  2020. }, function (v) {
  2021. return one(dictSemiring);
  2022. }, function (v) {
  2023. return zero(dictSemiring);
  2024. });
  2025. };
  2026. var semiringRecordCons = function semiringRecordCons(dictIsSymbol) {
  2027. return function (dictCons) {
  2028. return function (dictSemiringRecord) {
  2029. return function (dictSemiring) {
  2030. return new SemiringRecord(function (v) {
  2031. return function (ra) {
  2032. return function (rb) {
  2033. var tail = addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2034. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2035. var insert = Record_Unsafe.unsafeSet(key);
  2036. var get = Record_Unsafe.unsafeGet(key);
  2037. return insert(add(dictSemiring)(get(ra))(get(rb)))(tail);
  2038. };
  2039. };
  2040. }, function (v) {
  2041. return function (ra) {
  2042. return function (rb) {
  2043. var tail = mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2044. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2045. var insert = Record_Unsafe.unsafeSet(key);
  2046. var get = Record_Unsafe.unsafeGet(key);
  2047. return insert(mul(dictSemiring)(get(ra))(get(rb)))(tail);
  2048. };
  2049. };
  2050. }, function (v) {
  2051. return function (v1) {
  2052. var tail = oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value);
  2053. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2054. var insert = Record_Unsafe.unsafeSet(key);
  2055. return insert(one(dictSemiring))(tail);
  2056. };
  2057. }, function (v) {
  2058. return function (v1) {
  2059. var tail = zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value);
  2060. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2061. var insert = Record_Unsafe.unsafeSet(key);
  2062. return insert(zero(dictSemiring))(tail);
  2063. };
  2064. });
  2065. };
  2066. };
  2067. };
  2068. };
  2069. module.exports = {
  2070. Semiring: Semiring,
  2071. add: add,
  2072. zero: zero,
  2073. mul: mul,
  2074. one: one,
  2075. SemiringRecord: SemiringRecord,
  2076. addRecord: addRecord,
  2077. mulRecord: mulRecord,
  2078. oneRecord: oneRecord,
  2079. zeroRecord: zeroRecord,
  2080. semiringInt: semiringInt,
  2081. semiringNumber: semiringNumber,
  2082. semiringFn: semiringFn,
  2083. semiringUnit: semiringUnit,
  2084. semiringRecord: semiringRecord,
  2085. semiringRecordNil: semiringRecordNil,
  2086. semiringRecordCons: semiringRecordCons
  2087. };
  2088. },{"./foreign.js":"../output/Data.Semiring/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.Row/index.js":"../output/Type.Data.Row/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Ring/index.js":[function(require,module,exports) {
  2089. // Generated by purs version 0.13.6
  2090. "use strict";
  2091. var $foreign = require("./foreign.js");
  2092. var Data_Semiring = require("../Data.Semiring/index.js");
  2093. var Data_Symbol = require("../Data.Symbol/index.js");
  2094. var Data_Unit = require("../Data.Unit/index.js");
  2095. var Record_Unsafe = require("../Record.Unsafe/index.js");
  2096. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  2097. var RingRecord = function RingRecord(SemiringRecord0, subRecord) {
  2098. this.SemiringRecord0 = SemiringRecord0;
  2099. this.subRecord = subRecord;
  2100. };
  2101. var Ring = function Ring(Semiring0, sub) {
  2102. this.Semiring0 = Semiring0;
  2103. this.sub = sub;
  2104. };
  2105. var subRecord = function subRecord(dict) {
  2106. return dict.subRecord;
  2107. };
  2108. var sub = function sub(dict) {
  2109. return dict.sub;
  2110. };
  2111. var ringUnit = new Ring(function () {
  2112. return Data_Semiring.semiringUnit;
  2113. }, function (v) {
  2114. return function (v1) {
  2115. return Data_Unit.unit;
  2116. };
  2117. });
  2118. var ringRecordNil = new RingRecord(function () {
  2119. return Data_Semiring.semiringRecordNil;
  2120. }, function (v) {
  2121. return function (v1) {
  2122. return function (v2) {
  2123. return {};
  2124. };
  2125. };
  2126. });
  2127. var ringRecordCons = function ringRecordCons(dictIsSymbol) {
  2128. return function (dictCons) {
  2129. return function (dictRingRecord) {
  2130. return function (dictRing) {
  2131. return new RingRecord(function () {
  2132. return Data_Semiring.semiringRecordCons(dictIsSymbol)()(dictRingRecord.SemiringRecord0())(dictRing.Semiring0());
  2133. }, function (v) {
  2134. return function (ra) {
  2135. return function (rb) {
  2136. var tail = subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2137. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2138. var insert = Record_Unsafe.unsafeSet(key);
  2139. var get = Record_Unsafe.unsafeGet(key);
  2140. return insert(sub(dictRing)(get(ra))(get(rb)))(tail);
  2141. };
  2142. };
  2143. });
  2144. };
  2145. };
  2146. };
  2147. };
  2148. var ringRecord = function ringRecord(dictRowToList) {
  2149. return function (dictRingRecord) {
  2150. return new Ring(function () {
  2151. return Data_Semiring.semiringRecord()(dictRingRecord.SemiringRecord0());
  2152. }, subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value));
  2153. };
  2154. };
  2155. var ringNumber = new Ring(function () {
  2156. return Data_Semiring.semiringNumber;
  2157. }, $foreign.numSub);
  2158. var ringInt = new Ring(function () {
  2159. return Data_Semiring.semiringInt;
  2160. }, $foreign.intSub);
  2161. var ringFn = function ringFn(dictRing) {
  2162. return new Ring(function () {
  2163. return Data_Semiring.semiringFn(dictRing.Semiring0());
  2164. }, function (f) {
  2165. return function (g) {
  2166. return function (x) {
  2167. return sub(dictRing)(f(x))(g(x));
  2168. };
  2169. };
  2170. });
  2171. };
  2172. var negate = function negate(dictRing) {
  2173. return function (a) {
  2174. return sub(dictRing)(Data_Semiring.zero(dictRing.Semiring0()))(a);
  2175. };
  2176. };
  2177. module.exports = {
  2178. Ring: Ring,
  2179. sub: sub,
  2180. negate: negate,
  2181. RingRecord: RingRecord,
  2182. subRecord: subRecord,
  2183. ringInt: ringInt,
  2184. ringNumber: ringNumber,
  2185. ringUnit: ringUnit,
  2186. ringFn: ringFn,
  2187. ringRecord: ringRecord,
  2188. ringRecordNil: ringRecordNil,
  2189. ringRecordCons: ringRecordCons
  2190. };
  2191. },{"./foreign.js":"../output/Data.Ring/foreign.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Ord/index.js":[function(require,module,exports) {
  2192. // Generated by purs version 0.13.6
  2193. "use strict";
  2194. var $foreign = require("./foreign.js");
  2195. var Data_Eq = require("../Data.Eq/index.js");
  2196. var Data_Ordering = require("../Data.Ordering/index.js");
  2197. var Data_Ring = require("../Data.Ring/index.js");
  2198. var Data_Semiring = require("../Data.Semiring/index.js");
  2199. var Data_Symbol = require("../Data.Symbol/index.js");
  2200. var Record_Unsafe = require("../Record.Unsafe/index.js");
  2201. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  2202. var OrdRecord = function OrdRecord(EqRecord0, compareRecord) {
  2203. this.EqRecord0 = EqRecord0;
  2204. this.compareRecord = compareRecord;
  2205. };
  2206. var Ord1 = function Ord1(Eq10, compare1) {
  2207. this.Eq10 = Eq10;
  2208. this.compare1 = compare1;
  2209. };
  2210. var Ord = function Ord(Eq0, compare) {
  2211. this.Eq0 = Eq0;
  2212. this.compare = compare;
  2213. };
  2214. var ordVoid = new Ord(function () {
  2215. return Data_Eq.eqVoid;
  2216. }, function (v) {
  2217. return function (v1) {
  2218. return Data_Ordering.EQ.value;
  2219. };
  2220. });
  2221. var ordUnit = new Ord(function () {
  2222. return Data_Eq.eqUnit;
  2223. }, function (v) {
  2224. return function (v1) {
  2225. return Data_Ordering.EQ.value;
  2226. };
  2227. });
  2228. var ordString = new Ord(function () {
  2229. return Data_Eq.eqString;
  2230. }, $foreign.ordStringImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2231. var ordRecordNil = new OrdRecord(function () {
  2232. return Data_Eq.eqRowNil;
  2233. }, function (v) {
  2234. return function (v1) {
  2235. return function (v2) {
  2236. return Data_Ordering.EQ.value;
  2237. };
  2238. };
  2239. });
  2240. var ordOrdering = new Ord(function () {
  2241. return Data_Ordering.eqOrdering;
  2242. }, function (v) {
  2243. return function (v1) {
  2244. if (v instanceof Data_Ordering.LT && v1 instanceof Data_Ordering.LT) {
  2245. return Data_Ordering.EQ.value;
  2246. }
  2247. ;
  2248. if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.EQ) {
  2249. return Data_Ordering.EQ.value;
  2250. }
  2251. ;
  2252. if (v instanceof Data_Ordering.GT && v1 instanceof Data_Ordering.GT) {
  2253. return Data_Ordering.EQ.value;
  2254. }
  2255. ;
  2256. if (v instanceof Data_Ordering.LT) {
  2257. return Data_Ordering.LT.value;
  2258. }
  2259. ;
  2260. if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.LT) {
  2261. return Data_Ordering.GT.value;
  2262. }
  2263. ;
  2264. if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.GT) {
  2265. return Data_Ordering.LT.value;
  2266. }
  2267. ;
  2268. if (v instanceof Data_Ordering.GT) {
  2269. return Data_Ordering.GT.value;
  2270. }
  2271. ;
  2272. throw new Error("Failed pattern match at Data.Ord (line 112, column 1 - line 119, column 21): " + [v.constructor.name, v1.constructor.name]);
  2273. };
  2274. });
  2275. var ordNumber = new Ord(function () {
  2276. return Data_Eq.eqNumber;
  2277. }, $foreign.ordNumberImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2278. var ordInt = new Ord(function () {
  2279. return Data_Eq.eqInt;
  2280. }, $foreign.ordIntImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2281. var ordChar = new Ord(function () {
  2282. return Data_Eq.eqChar;
  2283. }, $foreign.ordCharImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2284. var ordBoolean = new Ord(function () {
  2285. return Data_Eq.eqBoolean;
  2286. }, $foreign.ordBooleanImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2287. var compareRecord = function compareRecord(dict) {
  2288. return dict.compareRecord;
  2289. };
  2290. var ordRecord = function ordRecord(dictRowToList) {
  2291. return function (dictOrdRecord) {
  2292. return new Ord(function () {
  2293. return Data_Eq.eqRec()(dictOrdRecord.EqRecord0());
  2294. }, compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value));
  2295. };
  2296. };
  2297. var compare1 = function compare1(dict) {
  2298. return dict.compare1;
  2299. };
  2300. var compare = function compare(dict) {
  2301. return dict.compare;
  2302. };
  2303. var comparing = function comparing(dictOrd) {
  2304. return function (f) {
  2305. return function (x) {
  2306. return function (y) {
  2307. return compare(dictOrd)(f(x))(f(y));
  2308. };
  2309. };
  2310. };
  2311. };
  2312. var greaterThan = function greaterThan(dictOrd) {
  2313. return function (a1) {
  2314. return function (a2) {
  2315. var v = compare(dictOrd)(a1)(a2);
  2316. if (v instanceof Data_Ordering.GT) {
  2317. return true;
  2318. }
  2319. ;
  2320. return false;
  2321. };
  2322. };
  2323. };
  2324. var greaterThanOrEq = function greaterThanOrEq(dictOrd) {
  2325. return function (a1) {
  2326. return function (a2) {
  2327. var v = compare(dictOrd)(a1)(a2);
  2328. if (v instanceof Data_Ordering.LT) {
  2329. return false;
  2330. }
  2331. ;
  2332. return true;
  2333. };
  2334. };
  2335. };
  2336. var signum = function signum(dictOrd) {
  2337. return function (dictRing) {
  2338. return function (x) {
  2339. var $43 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0()));
  2340. if ($43) {
  2341. return Data_Semiring.one(dictRing.Semiring0());
  2342. }
  2343. ;
  2344. return Data_Ring.negate(dictRing)(Data_Semiring.one(dictRing.Semiring0()));
  2345. };
  2346. };
  2347. };
  2348. var lessThan = function lessThan(dictOrd) {
  2349. return function (a1) {
  2350. return function (a2) {
  2351. var v = compare(dictOrd)(a1)(a2);
  2352. if (v instanceof Data_Ordering.LT) {
  2353. return true;
  2354. }
  2355. ;
  2356. return false;
  2357. };
  2358. };
  2359. };
  2360. var lessThanOrEq = function lessThanOrEq(dictOrd) {
  2361. return function (a1) {
  2362. return function (a2) {
  2363. var v = compare(dictOrd)(a1)(a2);
  2364. if (v instanceof Data_Ordering.GT) {
  2365. return false;
  2366. }
  2367. ;
  2368. return true;
  2369. };
  2370. };
  2371. };
  2372. var max = function max(dictOrd) {
  2373. return function (x) {
  2374. return function (y) {
  2375. var v = compare(dictOrd)(x)(y);
  2376. if (v instanceof Data_Ordering.LT) {
  2377. return y;
  2378. }
  2379. ;
  2380. if (v instanceof Data_Ordering.EQ) {
  2381. return x;
  2382. }
  2383. ;
  2384. if (v instanceof Data_Ordering.GT) {
  2385. return x;
  2386. }
  2387. ;
  2388. throw new Error("Failed pattern match at Data.Ord (line 167, column 3 - line 170, column 12): " + [v.constructor.name]);
  2389. };
  2390. };
  2391. };
  2392. var min = function min(dictOrd) {
  2393. return function (x) {
  2394. return function (y) {
  2395. var v = compare(dictOrd)(x)(y);
  2396. if (v instanceof Data_Ordering.LT) {
  2397. return x;
  2398. }
  2399. ;
  2400. if (v instanceof Data_Ordering.EQ) {
  2401. return x;
  2402. }
  2403. ;
  2404. if (v instanceof Data_Ordering.GT) {
  2405. return y;
  2406. }
  2407. ;
  2408. throw new Error("Failed pattern match at Data.Ord (line 158, column 3 - line 161, column 12): " + [v.constructor.name]);
  2409. };
  2410. };
  2411. };
  2412. var ordArray = function ordArray(dictOrd) {
  2413. return new Ord(function () {
  2414. return Data_Eq.eqArray(dictOrd.Eq0());
  2415. }, function () {
  2416. var toDelta = function toDelta(x) {
  2417. return function (y) {
  2418. var v = compare(dictOrd)(x)(y);
  2419. if (v instanceof Data_Ordering.EQ) {
  2420. return 0;
  2421. }
  2422. ;
  2423. if (v instanceof Data_Ordering.LT) {
  2424. return 1;
  2425. }
  2426. ;
  2427. if (v instanceof Data_Ordering.GT) {
  2428. return -1 | 0;
  2429. }
  2430. ;
  2431. throw new Error("Failed pattern match at Data.Ord (line 65, column 7 - line 68, column 17): " + [v.constructor.name]);
  2432. };
  2433. };
  2434. return function (xs) {
  2435. return function (ys) {
  2436. return compare(ordInt)(0)($foreign.ordArrayImpl(toDelta)(xs)(ys));
  2437. };
  2438. };
  2439. }());
  2440. };
  2441. var ord1Array = new Ord1(function () {
  2442. return Data_Eq.eq1Array;
  2443. }, function (dictOrd) {
  2444. return compare(ordArray(dictOrd));
  2445. });
  2446. var ordRecordCons = function ordRecordCons(dictOrdRecord) {
  2447. return function (dictCons) {
  2448. return function (dictIsSymbol) {
  2449. return function (dictOrd) {
  2450. return new OrdRecord(function () {
  2451. return Data_Eq.eqRowCons(dictOrdRecord.EqRecord0())()(dictIsSymbol)(dictOrd.Eq0());
  2452. }, function (v) {
  2453. return function (ra) {
  2454. return function (rb) {
  2455. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2456. var left = compare(dictOrd)(Record_Unsafe.unsafeGet(key)(ra))(Record_Unsafe.unsafeGet(key)(rb));
  2457. var $49 = Data_Eq.notEq(Data_Ordering.eqOrdering)(left)(Data_Ordering.EQ.value);
  2458. if ($49) {
  2459. return left;
  2460. }
  2461. ;
  2462. return compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2463. };
  2464. };
  2465. });
  2466. };
  2467. };
  2468. };
  2469. };
  2470. var clamp = function clamp(dictOrd) {
  2471. return function (low) {
  2472. return function (hi) {
  2473. return function (x) {
  2474. return min(dictOrd)(hi)(max(dictOrd)(low)(x));
  2475. };
  2476. };
  2477. };
  2478. };
  2479. var between = function between(dictOrd) {
  2480. return function (low) {
  2481. return function (hi) {
  2482. return function (x) {
  2483. if (lessThan(dictOrd)(x)(low)) {
  2484. return false;
  2485. }
  2486. ;
  2487. if (greaterThan(dictOrd)(x)(hi)) {
  2488. return false;
  2489. }
  2490. ;
  2491. return true;
  2492. };
  2493. };
  2494. };
  2495. };
  2496. var abs = function abs(dictOrd) {
  2497. return function (dictRing) {
  2498. return function (x) {
  2499. var $53 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0()));
  2500. if ($53) {
  2501. return x;
  2502. }
  2503. ;
  2504. return Data_Ring.negate(dictRing)(x);
  2505. };
  2506. };
  2507. };
  2508. module.exports = {
  2509. Ord: Ord,
  2510. compare: compare,
  2511. Ord1: Ord1,
  2512. compare1: compare1,
  2513. lessThan: lessThan,
  2514. lessThanOrEq: lessThanOrEq,
  2515. greaterThan: greaterThan,
  2516. greaterThanOrEq: greaterThanOrEq,
  2517. comparing: comparing,
  2518. min: min,
  2519. max: max,
  2520. clamp: clamp,
  2521. between: between,
  2522. abs: abs,
  2523. signum: signum,
  2524. OrdRecord: OrdRecord,
  2525. compareRecord: compareRecord,
  2526. ordBoolean: ordBoolean,
  2527. ordInt: ordInt,
  2528. ordNumber: ordNumber,
  2529. ordString: ordString,
  2530. ordChar: ordChar,
  2531. ordUnit: ordUnit,
  2532. ordVoid: ordVoid,
  2533. ordArray: ordArray,
  2534. ordOrdering: ordOrdering,
  2535. ord1Array: ord1Array,
  2536. ordRecordNil: ordRecordNil,
  2537. ordRecordCons: ordRecordCons,
  2538. ordRecord: ordRecord
  2539. };
  2540. },{"./foreign.js":"../output/Data.Ord/foreign.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Bounded/index.js":[function(require,module,exports) {
  2541. // Generated by purs version 0.13.6
  2542. "use strict";
  2543. var $foreign = require("./foreign.js");
  2544. var Data_Ord = require("../Data.Ord/index.js");
  2545. var Data_Ordering = require("../Data.Ordering/index.js");
  2546. var Data_Unit = require("../Data.Unit/index.js");
  2547. var Bounded = function Bounded(Ord0, bottom, top) {
  2548. this.Ord0 = Ord0;
  2549. this.bottom = bottom;
  2550. this.top = top;
  2551. };
  2552. var top = function top(dict) {
  2553. return dict.top;
  2554. };
  2555. var boundedUnit = new Bounded(function () {
  2556. return Data_Ord.ordUnit;
  2557. }, Data_Unit.unit, Data_Unit.unit);
  2558. var boundedOrdering = new Bounded(function () {
  2559. return Data_Ord.ordOrdering;
  2560. }, Data_Ordering.LT.value, Data_Ordering.GT.value);
  2561. var boundedNumber = new Bounded(function () {
  2562. return Data_Ord.ordNumber;
  2563. }, $foreign.bottomNumber, $foreign.topNumber);
  2564. var boundedInt = new Bounded(function () {
  2565. return Data_Ord.ordInt;
  2566. }, $foreign.bottomInt, $foreign.topInt);
  2567. var boundedChar = new Bounded(function () {
  2568. return Data_Ord.ordChar;
  2569. }, $foreign.bottomChar, $foreign.topChar);
  2570. var boundedBoolean = new Bounded(function () {
  2571. return Data_Ord.ordBoolean;
  2572. }, false, true);
  2573. var bottom = function bottom(dict) {
  2574. return dict.bottom;
  2575. };
  2576. module.exports = {
  2577. Bounded: Bounded,
  2578. bottom: bottom,
  2579. top: top,
  2580. boundedBoolean: boundedBoolean,
  2581. boundedInt: boundedInt,
  2582. boundedChar: boundedChar,
  2583. boundedOrdering: boundedOrdering,
  2584. boundedUnit: boundedUnit,
  2585. boundedNumber: boundedNumber
  2586. };
  2587. },{"./foreign.js":"../output/Data.Bounded/foreign.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Functor.Invariant/index.js":[function(require,module,exports) {
  2588. // Generated by purs version 0.13.6
  2589. "use strict";
  2590. var Data_Functor = require("../Data.Functor/index.js");
  2591. var Invariant = function Invariant(imap) {
  2592. this.imap = imap;
  2593. };
  2594. var invariantMultiplicative = new Invariant(function (f) {
  2595. return function (v) {
  2596. return function (v1) {
  2597. return f(v1);
  2598. };
  2599. };
  2600. });
  2601. var invariantEndo = new Invariant(function (ab) {
  2602. return function (ba) {
  2603. return function (v) {
  2604. return function ($31) {
  2605. return ab(v(ba($31)));
  2606. };
  2607. };
  2608. };
  2609. });
  2610. var invariantDual = new Invariant(function (f) {
  2611. return function (v) {
  2612. return function (v1) {
  2613. return f(v1);
  2614. };
  2615. };
  2616. });
  2617. var invariantDisj = new Invariant(function (f) {
  2618. return function (v) {
  2619. return function (v1) {
  2620. return f(v1);
  2621. };
  2622. };
  2623. });
  2624. var invariantConj = new Invariant(function (f) {
  2625. return function (v) {
  2626. return function (v1) {
  2627. return f(v1);
  2628. };
  2629. };
  2630. });
  2631. var invariantAdditive = new Invariant(function (f) {
  2632. return function (v) {
  2633. return function (v1) {
  2634. return f(v1);
  2635. };
  2636. };
  2637. });
  2638. var imapF = function imapF(dictFunctor) {
  2639. return function (f) {
  2640. return function (v) {
  2641. return Data_Functor.map(dictFunctor)(f);
  2642. };
  2643. };
  2644. };
  2645. var invariantArray = new Invariant(imapF(Data_Functor.functorArray));
  2646. var invariantFn = new Invariant(imapF(Data_Functor.functorFn));
  2647. var imap = function imap(dict) {
  2648. return dict.imap;
  2649. };
  2650. module.exports = {
  2651. imap: imap,
  2652. Invariant: Invariant,
  2653. imapF: imapF,
  2654. invariantFn: invariantFn,
  2655. invariantArray: invariantArray,
  2656. invariantAdditive: invariantAdditive,
  2657. invariantConj: invariantConj,
  2658. invariantDisj: invariantDisj,
  2659. invariantDual: invariantDual,
  2660. invariantEndo: invariantEndo,
  2661. invariantMultiplicative: invariantMultiplicative
  2662. };
  2663. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Data.EuclideanRing/foreign.js":[function(require,module,exports) {
  2664. "use strict";
  2665. exports.intDegree = function (x) {
  2666. return Math.min(Math.abs(x), 2147483647);
  2667. }; // See the Euclidean definition in
  2668. // https://en.m.wikipedia.org/wiki/Modulo_operation.
  2669. exports.intDiv = function (x) {
  2670. return function (y) {
  2671. if (y === 0) return 0;
  2672. return y > 0 ? Math.floor(x / y) : -Math.floor(x / -y);
  2673. };
  2674. };
  2675. exports.intMod = function (x) {
  2676. return function (y) {
  2677. if (y === 0) return 0;
  2678. var yy = Math.abs(y);
  2679. return (x % yy + yy) % yy;
  2680. };
  2681. };
  2682. exports.numDiv = function (n1) {
  2683. return function (n2) {
  2684. return n1 / n2;
  2685. };
  2686. };
  2687. },{}],"../output/Data.CommutativeRing/index.js":[function(require,module,exports) {
  2688. // Generated by purs version 0.13.6
  2689. "use strict";
  2690. var Data_Ring = require("../Data.Ring/index.js");
  2691. var CommutativeRingRecord = function CommutativeRingRecord(RingRecord0) {
  2692. this.RingRecord0 = RingRecord0;
  2693. };
  2694. var CommutativeRing = function CommutativeRing(Ring0) {
  2695. this.Ring0 = Ring0;
  2696. };
  2697. var commutativeRingUnit = new CommutativeRing(function () {
  2698. return Data_Ring.ringUnit;
  2699. });
  2700. var commutativeRingRecordNil = new CommutativeRingRecord(function () {
  2701. return Data_Ring.ringRecordNil;
  2702. });
  2703. var commutativeRingRecordCons = function commutativeRingRecordCons(dictIsSymbol) {
  2704. return function (dictCons) {
  2705. return function (dictCommutativeRingRecord) {
  2706. return function (dictCommutativeRing) {
  2707. return new CommutativeRingRecord(function () {
  2708. return Data_Ring.ringRecordCons(dictIsSymbol)()(dictCommutativeRingRecord.RingRecord0())(dictCommutativeRing.Ring0());
  2709. });
  2710. };
  2711. };
  2712. };
  2713. };
  2714. var commutativeRingRecord = function commutativeRingRecord(dictRowToList) {
  2715. return function (dictCommutativeRingRecord) {
  2716. return new CommutativeRing(function () {
  2717. return Data_Ring.ringRecord()(dictCommutativeRingRecord.RingRecord0());
  2718. });
  2719. };
  2720. };
  2721. var commutativeRingNumber = new CommutativeRing(function () {
  2722. return Data_Ring.ringNumber;
  2723. });
  2724. var commutativeRingInt = new CommutativeRing(function () {
  2725. return Data_Ring.ringInt;
  2726. });
  2727. var commutativeRingFn = function commutativeRingFn(dictCommutativeRing) {
  2728. return new CommutativeRing(function () {
  2729. return Data_Ring.ringFn(dictCommutativeRing.Ring0());
  2730. });
  2731. };
  2732. module.exports = {
  2733. CommutativeRing: CommutativeRing,
  2734. CommutativeRingRecord: CommutativeRingRecord,
  2735. commutativeRingInt: commutativeRingInt,
  2736. commutativeRingNumber: commutativeRingNumber,
  2737. commutativeRingUnit: commutativeRingUnit,
  2738. commutativeRingFn: commutativeRingFn,
  2739. commutativeRingRecord: commutativeRingRecord,
  2740. commutativeRingRecordNil: commutativeRingRecordNil,
  2741. commutativeRingRecordCons: commutativeRingRecordCons
  2742. };
  2743. },{"../Data.Ring/index.js":"../output/Data.Ring/index.js"}],"../output/Data.EuclideanRing/index.js":[function(require,module,exports) {
  2744. // Generated by purs version 0.13.6
  2745. "use strict";
  2746. var $foreign = require("./foreign.js");
  2747. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  2748. var Data_Eq = require("../Data.Eq/index.js");
  2749. var Data_Semiring = require("../Data.Semiring/index.js");
  2750. var EuclideanRing = function EuclideanRing(CommutativeRing0, degree, div, mod) {
  2751. this.CommutativeRing0 = CommutativeRing0;
  2752. this.degree = degree;
  2753. this.div = div;
  2754. this.mod = mod;
  2755. };
  2756. var mod = function mod(dict) {
  2757. return dict.mod;
  2758. };
  2759. var gcd = function gcd($copy_dictEq) {
  2760. return function ($copy_dictEuclideanRing) {
  2761. return function ($copy_a) {
  2762. return function ($copy_b) {
  2763. var $tco_var_dictEq = $copy_dictEq;
  2764. var $tco_var_dictEuclideanRing = $copy_dictEuclideanRing;
  2765. var $tco_var_a = $copy_a;
  2766. var $tco_done = false;
  2767. var $tco_result;
  2768. function $tco_loop(dictEq, dictEuclideanRing, a, b) {
  2769. var $7 = Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0()));
  2770. if ($7) {
  2771. $tco_done = true;
  2772. return a;
  2773. }
  2774. ;
  2775. $tco_var_dictEq = dictEq;
  2776. $tco_var_dictEuclideanRing = dictEuclideanRing;
  2777. $tco_var_a = b;
  2778. $copy_b = mod(dictEuclideanRing)(a)(b);
  2779. return;
  2780. }
  2781. ;
  2782. while (!$tco_done) {
  2783. $tco_result = $tco_loop($tco_var_dictEq, $tco_var_dictEuclideanRing, $tco_var_a, $copy_b);
  2784. }
  2785. ;
  2786. return $tco_result;
  2787. };
  2788. };
  2789. };
  2790. };
  2791. var euclideanRingNumber = new EuclideanRing(function () {
  2792. return Data_CommutativeRing.commutativeRingNumber;
  2793. }, function (v) {
  2794. return 1;
  2795. }, $foreign.numDiv, function (v) {
  2796. return function (v1) {
  2797. return 0.0;
  2798. };
  2799. });
  2800. var euclideanRingInt = new EuclideanRing(function () {
  2801. return Data_CommutativeRing.commutativeRingInt;
  2802. }, $foreign.intDegree, $foreign.intDiv, $foreign.intMod);
  2803. var div = function div(dict) {
  2804. return dict.div;
  2805. };
  2806. var lcm = function lcm(dictEq) {
  2807. return function (dictEuclideanRing) {
  2808. return function (a) {
  2809. return function (b) {
  2810. var $8 = Data_Eq.eq(dictEq)(a)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())) || Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0()));
  2811. if ($8) {
  2812. return Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0());
  2813. }
  2814. ;
  2815. return div(dictEuclideanRing)(Data_Semiring.mul(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())(a)(b))(gcd(dictEq)(dictEuclideanRing)(a)(b));
  2816. };
  2817. };
  2818. };
  2819. };
  2820. var degree = function degree(dict) {
  2821. return dict.degree;
  2822. };
  2823. module.exports = {
  2824. EuclideanRing: EuclideanRing,
  2825. degree: degree,
  2826. div: div,
  2827. mod: mod,
  2828. gcd: gcd,
  2829. lcm: lcm,
  2830. euclideanRingInt: euclideanRingInt,
  2831. euclideanRingNumber: euclideanRingNumber
  2832. };
  2833. },{"./foreign.js":"../output/Data.EuclideanRing/foreign.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js"}],"../output/Data.Monoid/index.js":[function(require,module,exports) {
  2834. // Generated by purs version 0.13.6
  2835. "use strict";
  2836. var Data_Boolean = require("../Data.Boolean/index.js");
  2837. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  2838. var Data_Ordering = require("../Data.Ordering/index.js");
  2839. var Data_Semigroup = require("../Data.Semigroup/index.js");
  2840. var Data_Symbol = require("../Data.Symbol/index.js");
  2841. var Data_Unit = require("../Data.Unit/index.js");
  2842. var Record_Unsafe = require("../Record.Unsafe/index.js");
  2843. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  2844. var MonoidRecord = function MonoidRecord(SemigroupRecord0, memptyRecord) {
  2845. this.SemigroupRecord0 = SemigroupRecord0;
  2846. this.memptyRecord = memptyRecord;
  2847. };
  2848. var Monoid = function Monoid(Semigroup0, mempty) {
  2849. this.Semigroup0 = Semigroup0;
  2850. this.mempty = mempty;
  2851. };
  2852. var monoidUnit = new Monoid(function () {
  2853. return Data_Semigroup.semigroupUnit;
  2854. }, Data_Unit.unit);
  2855. var monoidString = new Monoid(function () {
  2856. return Data_Semigroup.semigroupString;
  2857. }, "");
  2858. var monoidRecordNil = new MonoidRecord(function () {
  2859. return Data_Semigroup.semigroupRecordNil;
  2860. }, function (v) {
  2861. return {};
  2862. });
  2863. var monoidOrdering = new Monoid(function () {
  2864. return Data_Ordering.semigroupOrdering;
  2865. }, Data_Ordering.EQ.value);
  2866. var monoidArray = new Monoid(function () {
  2867. return Data_Semigroup.semigroupArray;
  2868. }, []);
  2869. var memptyRecord = function memptyRecord(dict) {
  2870. return dict.memptyRecord;
  2871. };
  2872. var monoidRecord = function monoidRecord(dictRowToList) {
  2873. return function (dictMonoidRecord) {
  2874. return new Monoid(function () {
  2875. return Data_Semigroup.semigroupRecord()(dictMonoidRecord.SemigroupRecord0());
  2876. }, memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value));
  2877. };
  2878. };
  2879. var mempty = function mempty(dict) {
  2880. return dict.mempty;
  2881. };
  2882. var monoidFn = function monoidFn(dictMonoid) {
  2883. return new Monoid(function () {
  2884. return Data_Semigroup.semigroupFn(dictMonoid.Semigroup0());
  2885. }, function (v) {
  2886. return mempty(dictMonoid);
  2887. });
  2888. };
  2889. var monoidRecordCons = function monoidRecordCons(dictIsSymbol) {
  2890. return function (dictMonoid) {
  2891. return function (dictCons) {
  2892. return function (dictMonoidRecord) {
  2893. return new MonoidRecord(function () {
  2894. return Data_Semigroup.semigroupRecordCons(dictIsSymbol)()(dictMonoidRecord.SemigroupRecord0())(dictMonoid.Semigroup0());
  2895. }, function (v) {
  2896. var tail = memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value);
  2897. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2898. var insert = Record_Unsafe.unsafeSet(key);
  2899. return insert(mempty(dictMonoid))(tail);
  2900. });
  2901. };
  2902. };
  2903. };
  2904. };
  2905. var power = function power(dictMonoid) {
  2906. return function (x) {
  2907. var go = function go(p) {
  2908. if (p <= 0) {
  2909. return mempty(dictMonoid);
  2910. }
  2911. ;
  2912. if (p === 1) {
  2913. return x;
  2914. }
  2915. ;
  2916. if (Data_EuclideanRing.mod(Data_EuclideanRing.euclideanRingInt)(p)(2) === 0) {
  2917. var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2));
  2918. return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x$prime);
  2919. }
  2920. ;
  2921. if (Data_Boolean.otherwise) {
  2922. var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2));
  2923. return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x));
  2924. }
  2925. ;
  2926. throw new Error("Failed pattern match at Data.Monoid (line 65, column 3 - line 65, column 17): " + [p.constructor.name]);
  2927. };
  2928. return go;
  2929. };
  2930. };
  2931. var guard = function guard(dictMonoid) {
  2932. return function (v) {
  2933. return function (v1) {
  2934. if (v) {
  2935. return v1;
  2936. }
  2937. ;
  2938. if (!v) {
  2939. return mempty(dictMonoid);
  2940. }
  2941. ;
  2942. throw new Error("Failed pattern match at Data.Monoid (line 73, column 1 - line 73, column 49): " + [v.constructor.name, v1.constructor.name]);
  2943. };
  2944. };
  2945. };
  2946. module.exports = {
  2947. Monoid: Monoid,
  2948. mempty: mempty,
  2949. power: power,
  2950. guard: guard,
  2951. MonoidRecord: MonoidRecord,
  2952. memptyRecord: memptyRecord,
  2953. monoidUnit: monoidUnit,
  2954. monoidOrdering: monoidOrdering,
  2955. monoidFn: monoidFn,
  2956. monoidString: monoidString,
  2957. monoidArray: monoidArray,
  2958. monoidRecord: monoidRecord,
  2959. monoidRecordNil: monoidRecordNil,
  2960. monoidRecordCons: monoidRecordCons
  2961. };
  2962. },{"../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Maybe/index.js":[function(require,module,exports) {
  2963. // Generated by purs version 0.13.6
  2964. "use strict";
  2965. var Control_Alt = require("../Control.Alt/index.js");
  2966. var Control_Alternative = require("../Control.Alternative/index.js");
  2967. var Control_Applicative = require("../Control.Applicative/index.js");
  2968. var Control_Apply = require("../Control.Apply/index.js");
  2969. var Control_Bind = require("../Control.Bind/index.js");
  2970. var Control_Category = require("../Control.Category/index.js");
  2971. var Control_Extend = require("../Control.Extend/index.js");
  2972. var Control_Monad = require("../Control.Monad/index.js");
  2973. var Control_MonadZero = require("../Control.MonadZero/index.js");
  2974. var Control_Plus = require("../Control.Plus/index.js");
  2975. var Data_Bounded = require("../Data.Bounded/index.js");
  2976. var Data_Eq = require("../Data.Eq/index.js");
  2977. var Data_Function = require("../Data.Function/index.js");
  2978. var Data_Functor = require("../Data.Functor/index.js");
  2979. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  2980. var Data_Monoid = require("../Data.Monoid/index.js");
  2981. var Data_Ord = require("../Data.Ord/index.js");
  2982. var Data_Ordering = require("../Data.Ordering/index.js");
  2983. var Data_Semigroup = require("../Data.Semigroup/index.js");
  2984. var Data_Show = require("../Data.Show/index.js");
  2985. var Data_Unit = require("../Data.Unit/index.js");
  2986. var Nothing = function () {
  2987. function Nothing() {}
  2988. ;
  2989. Nothing.value = new Nothing();
  2990. return Nothing;
  2991. }();
  2992. var Just = function () {
  2993. function Just(value0) {
  2994. this.value0 = value0;
  2995. }
  2996. ;
  2997. Just.create = function (value0) {
  2998. return new Just(value0);
  2999. };
  3000. return Just;
  3001. }();
  3002. var showMaybe = function showMaybe(dictShow) {
  3003. return new Data_Show.Show(function (v) {
  3004. if (v instanceof Just) {
  3005. return "(Just " + (Data_Show.show(dictShow)(v.value0) + ")");
  3006. }
  3007. ;
  3008. if (v instanceof Nothing) {
  3009. return "Nothing";
  3010. }
  3011. ;
  3012. throw new Error("Failed pattern match at Data.Maybe (line 205, column 1 - line 207, column 28): " + [v.constructor.name]);
  3013. });
  3014. };
  3015. var semigroupMaybe = function semigroupMaybe(dictSemigroup) {
  3016. return new Data_Semigroup.Semigroup(function (v) {
  3017. return function (v1) {
  3018. if (v instanceof Nothing) {
  3019. return v1;
  3020. }
  3021. ;
  3022. if (v1 instanceof Nothing) {
  3023. return v;
  3024. }
  3025. ;
  3026. if (v instanceof Just && v1 instanceof Just) {
  3027. return new Just(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0));
  3028. }
  3029. ;
  3030. throw new Error("Failed pattern match at Data.Maybe (line 174, column 1 - line 177, column 43): " + [v.constructor.name, v1.constructor.name]);
  3031. };
  3032. });
  3033. };
  3034. var optional = function optional(dictAlternative) {
  3035. return function (a) {
  3036. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Just.create)(a))(Control_Applicative.pure(dictAlternative.Applicative0())(Nothing.value));
  3037. };
  3038. };
  3039. var monoidMaybe = function monoidMaybe(dictSemigroup) {
  3040. return new Data_Monoid.Monoid(function () {
  3041. return semigroupMaybe(dictSemigroup);
  3042. }, Nothing.value);
  3043. };
  3044. var maybe$prime = function maybe$prime(v) {
  3045. return function (v1) {
  3046. return function (v2) {
  3047. if (v2 instanceof Nothing) {
  3048. return v(Data_Unit.unit);
  3049. }
  3050. ;
  3051. if (v2 instanceof Just) {
  3052. return v1(v2.value0);
  3053. }
  3054. ;
  3055. throw new Error("Failed pattern match at Data.Maybe (line 230, column 1 - line 230, column 62): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  3056. };
  3057. };
  3058. };
  3059. var maybe = function maybe(v) {
  3060. return function (v1) {
  3061. return function (v2) {
  3062. if (v2 instanceof Nothing) {
  3063. return v;
  3064. }
  3065. ;
  3066. if (v2 instanceof Just) {
  3067. return v1(v2.value0);
  3068. }
  3069. ;
  3070. throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  3071. };
  3072. };
  3073. };
  3074. var isNothing = maybe(true)(Data_Function["const"](false));
  3075. var isJust = maybe(false)(Data_Function["const"](true));
  3076. var functorMaybe = new Data_Functor.Functor(function (v) {
  3077. return function (v1) {
  3078. if (v1 instanceof Just) {
  3079. return new Just(v(v1.value0));
  3080. }
  3081. ;
  3082. return Nothing.value;
  3083. };
  3084. });
  3085. var invariantMaybe = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorMaybe));
  3086. var fromMaybe$prime = function fromMaybe$prime(a) {
  3087. return maybe$prime(a)(Control_Category.identity(Control_Category.categoryFn));
  3088. };
  3089. var fromMaybe = function fromMaybe(a) {
  3090. return maybe(a)(Control_Category.identity(Control_Category.categoryFn));
  3091. };
  3092. var fromJust = function fromJust(dictPartial) {
  3093. return function (v) {
  3094. if (v instanceof Just) {
  3095. return v.value0;
  3096. }
  3097. ;
  3098. throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): " + [v.constructor.name]);
  3099. };
  3100. };
  3101. var extendMaybe = new Control_Extend.Extend(function () {
  3102. return functorMaybe;
  3103. }, function (v) {
  3104. return function (v1) {
  3105. if (v1 instanceof Nothing) {
  3106. return Nothing.value;
  3107. }
  3108. ;
  3109. return new Just(v(v1));
  3110. };
  3111. });
  3112. var eqMaybe = function eqMaybe(dictEq) {
  3113. return new Data_Eq.Eq(function (x) {
  3114. return function (y) {
  3115. if (x instanceof Nothing && y instanceof Nothing) {
  3116. return true;
  3117. }
  3118. ;
  3119. if (x instanceof Just && y instanceof Just) {
  3120. return Data_Eq.eq(dictEq)(x.value0)(y.value0);
  3121. }
  3122. ;
  3123. return false;
  3124. };
  3125. });
  3126. };
  3127. var ordMaybe = function ordMaybe(dictOrd) {
  3128. return new Data_Ord.Ord(function () {
  3129. return eqMaybe(dictOrd.Eq0());
  3130. }, function (x) {
  3131. return function (y) {
  3132. if (x instanceof Nothing && y instanceof Nothing) {
  3133. return Data_Ordering.EQ.value;
  3134. }
  3135. ;
  3136. if (x instanceof Nothing) {
  3137. return Data_Ordering.LT.value;
  3138. }
  3139. ;
  3140. if (y instanceof Nothing) {
  3141. return Data_Ordering.GT.value;
  3142. }
  3143. ;
  3144. if (x instanceof Just && y instanceof Just) {
  3145. return Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  3146. }
  3147. ;
  3148. throw new Error("Failed pattern match at Data.Maybe (line 194, column 1 - line 194, column 51): " + [x.constructor.name, y.constructor.name]);
  3149. };
  3150. });
  3151. };
  3152. var eq1Maybe = new Data_Eq.Eq1(function (dictEq) {
  3153. return Data_Eq.eq(eqMaybe(dictEq));
  3154. });
  3155. var ord1Maybe = new Data_Ord.Ord1(function () {
  3156. return eq1Maybe;
  3157. }, function (dictOrd) {
  3158. return Data_Ord.compare(ordMaybe(dictOrd));
  3159. });
  3160. var boundedMaybe = function boundedMaybe(dictBounded) {
  3161. return new Data_Bounded.Bounded(function () {
  3162. return ordMaybe(dictBounded.Ord0());
  3163. }, Nothing.value, new Just(Data_Bounded.top(dictBounded)));
  3164. };
  3165. var applyMaybe = new Control_Apply.Apply(function () {
  3166. return functorMaybe;
  3167. }, function (v) {
  3168. return function (v1) {
  3169. if (v instanceof Just) {
  3170. return Data_Functor.map(functorMaybe)(v.value0)(v1);
  3171. }
  3172. ;
  3173. if (v instanceof Nothing) {
  3174. return Nothing.value;
  3175. }
  3176. ;
  3177. throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): " + [v.constructor.name, v1.constructor.name]);
  3178. };
  3179. });
  3180. var bindMaybe = new Control_Bind.Bind(function () {
  3181. return applyMaybe;
  3182. }, function (v) {
  3183. return function (v1) {
  3184. if (v instanceof Just) {
  3185. return v1(v.value0);
  3186. }
  3187. ;
  3188. if (v instanceof Nothing) {
  3189. return Nothing.value;
  3190. }
  3191. ;
  3192. throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): " + [v.constructor.name, v1.constructor.name]);
  3193. };
  3194. });
  3195. var applicativeMaybe = new Control_Applicative.Applicative(function () {
  3196. return applyMaybe;
  3197. }, Just.create);
  3198. var monadMaybe = new Control_Monad.Monad(function () {
  3199. return applicativeMaybe;
  3200. }, function () {
  3201. return bindMaybe;
  3202. });
  3203. var altMaybe = new Control_Alt.Alt(function () {
  3204. return functorMaybe;
  3205. }, function (v) {
  3206. return function (v1) {
  3207. if (v instanceof Nothing) {
  3208. return v1;
  3209. }
  3210. ;
  3211. return v;
  3212. };
  3213. });
  3214. var plusMaybe = new Control_Plus.Plus(function () {
  3215. return altMaybe;
  3216. }, Nothing.value);
  3217. var alternativeMaybe = new Control_Alternative.Alternative(function () {
  3218. return applicativeMaybe;
  3219. }, function () {
  3220. return plusMaybe;
  3221. });
  3222. var monadZeroMaybe = new Control_MonadZero.MonadZero(function () {
  3223. return alternativeMaybe;
  3224. }, function () {
  3225. return monadMaybe;
  3226. });
  3227. module.exports = {
  3228. Nothing: Nothing,
  3229. Just: Just,
  3230. maybe: maybe,
  3231. "maybe'": maybe$prime,
  3232. fromMaybe: fromMaybe,
  3233. "fromMaybe'": fromMaybe$prime,
  3234. isJust: isJust,
  3235. isNothing: isNothing,
  3236. fromJust: fromJust,
  3237. optional: optional,
  3238. functorMaybe: functorMaybe,
  3239. applyMaybe: applyMaybe,
  3240. applicativeMaybe: applicativeMaybe,
  3241. altMaybe: altMaybe,
  3242. plusMaybe: plusMaybe,
  3243. alternativeMaybe: alternativeMaybe,
  3244. bindMaybe: bindMaybe,
  3245. monadMaybe: monadMaybe,
  3246. monadZeroMaybe: monadZeroMaybe,
  3247. extendMaybe: extendMaybe,
  3248. invariantMaybe: invariantMaybe,
  3249. semigroupMaybe: semigroupMaybe,
  3250. monoidMaybe: monoidMaybe,
  3251. eqMaybe: eqMaybe,
  3252. eq1Maybe: eq1Maybe,
  3253. ordMaybe: ordMaybe,
  3254. ord1Maybe: ord1Maybe,
  3255. boundedMaybe: boundedMaybe,
  3256. showMaybe: showMaybe
  3257. };
  3258. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Monoid.Conj/index.js":[function(require,module,exports) {
  3259. // Generated by purs version 0.13.6
  3260. "use strict";
  3261. var Control_Applicative = require("../Control.Applicative/index.js");
  3262. var Control_Apply = require("../Control.Apply/index.js");
  3263. var Control_Bind = require("../Control.Bind/index.js");
  3264. var Control_Monad = require("../Control.Monad/index.js");
  3265. var Data_Eq = require("../Data.Eq/index.js");
  3266. var Data_Functor = require("../Data.Functor/index.js");
  3267. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  3268. var Data_Monoid = require("../Data.Monoid/index.js");
  3269. var Data_Ord = require("../Data.Ord/index.js");
  3270. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3271. var Data_Semiring = require("../Data.Semiring/index.js");
  3272. var Data_Show = require("../Data.Show/index.js");
  3273. var Conj = function Conj(x) {
  3274. return x;
  3275. };
  3276. var showConj = function showConj(dictShow) {
  3277. return new Data_Show.Show(function (v) {
  3278. return "(Conj " + (Data_Show.show(dictShow)(v) + ")");
  3279. });
  3280. };
  3281. var semiringConj = function semiringConj(dictHeytingAlgebra) {
  3282. return new Data_Semiring.Semiring(function (v) {
  3283. return function (v1) {
  3284. return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
  3285. };
  3286. }, function (v) {
  3287. return function (v1) {
  3288. return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
  3289. };
  3290. }, Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra));
  3291. };
  3292. var semigroupConj = function semigroupConj(dictHeytingAlgebra) {
  3293. return new Data_Semigroup.Semigroup(function (v) {
  3294. return function (v1) {
  3295. return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
  3296. };
  3297. });
  3298. };
  3299. var ordConj = function ordConj(dictOrd) {
  3300. return dictOrd;
  3301. };
  3302. var monoidConj = function monoidConj(dictHeytingAlgebra) {
  3303. return new Data_Monoid.Monoid(function () {
  3304. return semigroupConj(dictHeytingAlgebra);
  3305. }, Data_HeytingAlgebra.tt(dictHeytingAlgebra));
  3306. };
  3307. var functorConj = new Data_Functor.Functor(function (f) {
  3308. return function (m) {
  3309. return f(m);
  3310. };
  3311. });
  3312. var eqConj = function eqConj(dictEq) {
  3313. return dictEq;
  3314. };
  3315. var eq1Conj = new Data_Eq.Eq1(function (dictEq) {
  3316. return Data_Eq.eq(eqConj(dictEq));
  3317. });
  3318. var ord1Conj = new Data_Ord.Ord1(function () {
  3319. return eq1Conj;
  3320. }, function (dictOrd) {
  3321. return Data_Ord.compare(ordConj(dictOrd));
  3322. });
  3323. var boundedConj = function boundedConj(dictBounded) {
  3324. return dictBounded;
  3325. };
  3326. var applyConj = new Control_Apply.Apply(function () {
  3327. return functorConj;
  3328. }, function (v) {
  3329. return function (v1) {
  3330. return v(v1);
  3331. };
  3332. });
  3333. var bindConj = new Control_Bind.Bind(function () {
  3334. return applyConj;
  3335. }, function (v) {
  3336. return function (f) {
  3337. return f(v);
  3338. };
  3339. });
  3340. var applicativeConj = new Control_Applicative.Applicative(function () {
  3341. return applyConj;
  3342. }, Conj);
  3343. var monadConj = new Control_Monad.Monad(function () {
  3344. return applicativeConj;
  3345. }, function () {
  3346. return bindConj;
  3347. });
  3348. module.exports = {
  3349. Conj: Conj,
  3350. eqConj: eqConj,
  3351. eq1Conj: eq1Conj,
  3352. ordConj: ordConj,
  3353. ord1Conj: ord1Conj,
  3354. boundedConj: boundedConj,
  3355. showConj: showConj,
  3356. functorConj: functorConj,
  3357. applyConj: applyConj,
  3358. applicativeConj: applicativeConj,
  3359. bindConj: bindConj,
  3360. monadConj: monadConj,
  3361. semigroupConj: semigroupConj,
  3362. monoidConj: monoidConj,
  3363. semiringConj: semiringConj
  3364. };
  3365. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Disj/index.js":[function(require,module,exports) {
  3366. // Generated by purs version 0.13.6
  3367. "use strict";
  3368. var Control_Applicative = require("../Control.Applicative/index.js");
  3369. var Control_Apply = require("../Control.Apply/index.js");
  3370. var Control_Bind = require("../Control.Bind/index.js");
  3371. var Control_Monad = require("../Control.Monad/index.js");
  3372. var Data_Eq = require("../Data.Eq/index.js");
  3373. var Data_Functor = require("../Data.Functor/index.js");
  3374. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  3375. var Data_Monoid = require("../Data.Monoid/index.js");
  3376. var Data_Ord = require("../Data.Ord/index.js");
  3377. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3378. var Data_Semiring = require("../Data.Semiring/index.js");
  3379. var Data_Show = require("../Data.Show/index.js");
  3380. var Disj = function Disj(x) {
  3381. return x;
  3382. };
  3383. var showDisj = function showDisj(dictShow) {
  3384. return new Data_Show.Show(function (v) {
  3385. return "(Disj " + (Data_Show.show(dictShow)(v) + ")");
  3386. });
  3387. };
  3388. var semiringDisj = function semiringDisj(dictHeytingAlgebra) {
  3389. return new Data_Semiring.Semiring(function (v) {
  3390. return function (v1) {
  3391. return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
  3392. };
  3393. }, function (v) {
  3394. return function (v1) {
  3395. return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
  3396. };
  3397. }, Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra));
  3398. };
  3399. var semigroupDisj = function semigroupDisj(dictHeytingAlgebra) {
  3400. return new Data_Semigroup.Semigroup(function (v) {
  3401. return function (v1) {
  3402. return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
  3403. };
  3404. });
  3405. };
  3406. var ordDisj = function ordDisj(dictOrd) {
  3407. return dictOrd;
  3408. };
  3409. var monoidDisj = function monoidDisj(dictHeytingAlgebra) {
  3410. return new Data_Monoid.Monoid(function () {
  3411. return semigroupDisj(dictHeytingAlgebra);
  3412. }, Data_HeytingAlgebra.ff(dictHeytingAlgebra));
  3413. };
  3414. var functorDisj = new Data_Functor.Functor(function (f) {
  3415. return function (m) {
  3416. return f(m);
  3417. };
  3418. });
  3419. var eqDisj = function eqDisj(dictEq) {
  3420. return dictEq;
  3421. };
  3422. var eq1Disj = new Data_Eq.Eq1(function (dictEq) {
  3423. return Data_Eq.eq(eqDisj(dictEq));
  3424. });
  3425. var ord1Disj = new Data_Ord.Ord1(function () {
  3426. return eq1Disj;
  3427. }, function (dictOrd) {
  3428. return Data_Ord.compare(ordDisj(dictOrd));
  3429. });
  3430. var boundedDisj = function boundedDisj(dictBounded) {
  3431. return dictBounded;
  3432. };
  3433. var applyDisj = new Control_Apply.Apply(function () {
  3434. return functorDisj;
  3435. }, function (v) {
  3436. return function (v1) {
  3437. return v(v1);
  3438. };
  3439. });
  3440. var bindDisj = new Control_Bind.Bind(function () {
  3441. return applyDisj;
  3442. }, function (v) {
  3443. return function (f) {
  3444. return f(v);
  3445. };
  3446. });
  3447. var applicativeDisj = new Control_Applicative.Applicative(function () {
  3448. return applyDisj;
  3449. }, Disj);
  3450. var monadDisj = new Control_Monad.Monad(function () {
  3451. return applicativeDisj;
  3452. }, function () {
  3453. return bindDisj;
  3454. });
  3455. module.exports = {
  3456. Disj: Disj,
  3457. eqDisj: eqDisj,
  3458. eq1Disj: eq1Disj,
  3459. ordDisj: ordDisj,
  3460. ord1Disj: ord1Disj,
  3461. boundedDisj: boundedDisj,
  3462. showDisj: showDisj,
  3463. functorDisj: functorDisj,
  3464. applyDisj: applyDisj,
  3465. applicativeDisj: applicativeDisj,
  3466. bindDisj: bindDisj,
  3467. monadDisj: monadDisj,
  3468. semigroupDisj: semigroupDisj,
  3469. monoidDisj: monoidDisj,
  3470. semiringDisj: semiringDisj
  3471. };
  3472. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Dual/index.js":[function(require,module,exports) {
  3473. // Generated by purs version 0.13.6
  3474. "use strict";
  3475. var Control_Applicative = require("../Control.Applicative/index.js");
  3476. var Control_Apply = require("../Control.Apply/index.js");
  3477. var Control_Bind = require("../Control.Bind/index.js");
  3478. var Control_Monad = require("../Control.Monad/index.js");
  3479. var Data_Eq = require("../Data.Eq/index.js");
  3480. var Data_Functor = require("../Data.Functor/index.js");
  3481. var Data_Monoid = require("../Data.Monoid/index.js");
  3482. var Data_Ord = require("../Data.Ord/index.js");
  3483. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3484. var Data_Show = require("../Data.Show/index.js");
  3485. var Dual = function Dual(x) {
  3486. return x;
  3487. };
  3488. var showDual = function showDual(dictShow) {
  3489. return new Data_Show.Show(function (v) {
  3490. return "(Dual " + (Data_Show.show(dictShow)(v) + ")");
  3491. });
  3492. };
  3493. var semigroupDual = function semigroupDual(dictSemigroup) {
  3494. return new Data_Semigroup.Semigroup(function (v) {
  3495. return function (v1) {
  3496. return Data_Semigroup.append(dictSemigroup)(v1)(v);
  3497. };
  3498. });
  3499. };
  3500. var ordDual = function ordDual(dictOrd) {
  3501. return dictOrd;
  3502. };
  3503. var monoidDual = function monoidDual(dictMonoid) {
  3504. return new Data_Monoid.Monoid(function () {
  3505. return semigroupDual(dictMonoid.Semigroup0());
  3506. }, Data_Monoid.mempty(dictMonoid));
  3507. };
  3508. var functorDual = new Data_Functor.Functor(function (f) {
  3509. return function (m) {
  3510. return f(m);
  3511. };
  3512. });
  3513. var eqDual = function eqDual(dictEq) {
  3514. return dictEq;
  3515. };
  3516. var eq1Dual = new Data_Eq.Eq1(function (dictEq) {
  3517. return Data_Eq.eq(eqDual(dictEq));
  3518. });
  3519. var ord1Dual = new Data_Ord.Ord1(function () {
  3520. return eq1Dual;
  3521. }, function (dictOrd) {
  3522. return Data_Ord.compare(ordDual(dictOrd));
  3523. });
  3524. var boundedDual = function boundedDual(dictBounded) {
  3525. return dictBounded;
  3526. };
  3527. var applyDual = new Control_Apply.Apply(function () {
  3528. return functorDual;
  3529. }, function (v) {
  3530. return function (v1) {
  3531. return v(v1);
  3532. };
  3533. });
  3534. var bindDual = new Control_Bind.Bind(function () {
  3535. return applyDual;
  3536. }, function (v) {
  3537. return function (f) {
  3538. return f(v);
  3539. };
  3540. });
  3541. var applicativeDual = new Control_Applicative.Applicative(function () {
  3542. return applyDual;
  3543. }, Dual);
  3544. var monadDual = new Control_Monad.Monad(function () {
  3545. return applicativeDual;
  3546. }, function () {
  3547. return bindDual;
  3548. });
  3549. module.exports = {
  3550. Dual: Dual,
  3551. eqDual: eqDual,
  3552. eq1Dual: eq1Dual,
  3553. ordDual: ordDual,
  3554. ord1Dual: ord1Dual,
  3555. boundedDual: boundedDual,
  3556. showDual: showDual,
  3557. functorDual: functorDual,
  3558. applyDual: applyDual,
  3559. applicativeDual: applicativeDual,
  3560. bindDual: bindDual,
  3561. monadDual: monadDual,
  3562. semigroupDual: semigroupDual,
  3563. monoidDual: monoidDual
  3564. };
  3565. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Endo/index.js":[function(require,module,exports) {
  3566. // Generated by purs version 0.13.6
  3567. "use strict";
  3568. var Control_Category = require("../Control.Category/index.js");
  3569. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  3570. var Data_Monoid = require("../Data.Monoid/index.js");
  3571. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3572. var Data_Show = require("../Data.Show/index.js");
  3573. var Endo = function Endo(x) {
  3574. return x;
  3575. };
  3576. var showEndo = function showEndo(dictShow) {
  3577. return new Data_Show.Show(function (v) {
  3578. return "(Endo " + (Data_Show.show(dictShow)(v) + ")");
  3579. });
  3580. };
  3581. var semigroupEndo = function semigroupEndo(dictSemigroupoid) {
  3582. return new Data_Semigroup.Semigroup(function (v) {
  3583. return function (v1) {
  3584. return Control_Semigroupoid.compose(dictSemigroupoid)(v)(v1);
  3585. };
  3586. });
  3587. };
  3588. var ordEndo = function ordEndo(dictOrd) {
  3589. return dictOrd;
  3590. };
  3591. var monoidEndo = function monoidEndo(dictCategory) {
  3592. return new Data_Monoid.Monoid(function () {
  3593. return semigroupEndo(dictCategory.Semigroupoid0());
  3594. }, Control_Category.identity(dictCategory));
  3595. };
  3596. var eqEndo = function eqEndo(dictEq) {
  3597. return dictEq;
  3598. };
  3599. var boundedEndo = function boundedEndo(dictBounded) {
  3600. return dictBounded;
  3601. };
  3602. module.exports = {
  3603. Endo: Endo,
  3604. eqEndo: eqEndo,
  3605. ordEndo: ordEndo,
  3606. boundedEndo: boundedEndo,
  3607. showEndo: showEndo,
  3608. semigroupEndo: semigroupEndo,
  3609. monoidEndo: monoidEndo
  3610. };
  3611. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Additive/index.js":[function(require,module,exports) {
  3612. // Generated by purs version 0.13.6
  3613. "use strict";
  3614. var Control_Applicative = require("../Control.Applicative/index.js");
  3615. var Control_Apply = require("../Control.Apply/index.js");
  3616. var Control_Bind = require("../Control.Bind/index.js");
  3617. var Control_Monad = require("../Control.Monad/index.js");
  3618. var Data_Eq = require("../Data.Eq/index.js");
  3619. var Data_Functor = require("../Data.Functor/index.js");
  3620. var Data_Monoid = require("../Data.Monoid/index.js");
  3621. var Data_Ord = require("../Data.Ord/index.js");
  3622. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3623. var Data_Semiring = require("../Data.Semiring/index.js");
  3624. var Data_Show = require("../Data.Show/index.js");
  3625. var Additive = function Additive(x) {
  3626. return x;
  3627. };
  3628. var showAdditive = function showAdditive(dictShow) {
  3629. return new Data_Show.Show(function (v) {
  3630. return "(Additive " + (Data_Show.show(dictShow)(v) + ")");
  3631. });
  3632. };
  3633. var semigroupAdditive = function semigroupAdditive(dictSemiring) {
  3634. return new Data_Semigroup.Semigroup(function (v) {
  3635. return function (v1) {
  3636. return Data_Semiring.add(dictSemiring)(v)(v1);
  3637. };
  3638. });
  3639. };
  3640. var ordAdditive = function ordAdditive(dictOrd) {
  3641. return dictOrd;
  3642. };
  3643. var monoidAdditive = function monoidAdditive(dictSemiring) {
  3644. return new Data_Monoid.Monoid(function () {
  3645. return semigroupAdditive(dictSemiring);
  3646. }, Data_Semiring.zero(dictSemiring));
  3647. };
  3648. var functorAdditive = new Data_Functor.Functor(function (f) {
  3649. return function (m) {
  3650. return f(m);
  3651. };
  3652. });
  3653. var eqAdditive = function eqAdditive(dictEq) {
  3654. return dictEq;
  3655. };
  3656. var eq1Additive = new Data_Eq.Eq1(function (dictEq) {
  3657. return Data_Eq.eq(eqAdditive(dictEq));
  3658. });
  3659. var ord1Additive = new Data_Ord.Ord1(function () {
  3660. return eq1Additive;
  3661. }, function (dictOrd) {
  3662. return Data_Ord.compare(ordAdditive(dictOrd));
  3663. });
  3664. var boundedAdditive = function boundedAdditive(dictBounded) {
  3665. return dictBounded;
  3666. };
  3667. var applyAdditive = new Control_Apply.Apply(function () {
  3668. return functorAdditive;
  3669. }, function (v) {
  3670. return function (v1) {
  3671. return v(v1);
  3672. };
  3673. });
  3674. var bindAdditive = new Control_Bind.Bind(function () {
  3675. return applyAdditive;
  3676. }, function (v) {
  3677. return function (f) {
  3678. return f(v);
  3679. };
  3680. });
  3681. var applicativeAdditive = new Control_Applicative.Applicative(function () {
  3682. return applyAdditive;
  3683. }, Additive);
  3684. var monadAdditive = new Control_Monad.Monad(function () {
  3685. return applicativeAdditive;
  3686. }, function () {
  3687. return bindAdditive;
  3688. });
  3689. module.exports = {
  3690. Additive: Additive,
  3691. eqAdditive: eqAdditive,
  3692. eq1Additive: eq1Additive,
  3693. ordAdditive: ordAdditive,
  3694. ord1Additive: ord1Additive,
  3695. boundedAdditive: boundedAdditive,
  3696. showAdditive: showAdditive,
  3697. functorAdditive: functorAdditive,
  3698. applyAdditive: applyAdditive,
  3699. applicativeAdditive: applicativeAdditive,
  3700. bindAdditive: bindAdditive,
  3701. monadAdditive: monadAdditive,
  3702. semigroupAdditive: semigroupAdditive,
  3703. monoidAdditive: monoidAdditive
  3704. };
  3705. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Multiplicative/index.js":[function(require,module,exports) {
  3706. // Generated by purs version 0.13.6
  3707. "use strict";
  3708. var Control_Applicative = require("../Control.Applicative/index.js");
  3709. var Control_Apply = require("../Control.Apply/index.js");
  3710. var Control_Bind = require("../Control.Bind/index.js");
  3711. var Control_Monad = require("../Control.Monad/index.js");
  3712. var Data_Eq = require("../Data.Eq/index.js");
  3713. var Data_Functor = require("../Data.Functor/index.js");
  3714. var Data_Monoid = require("../Data.Monoid/index.js");
  3715. var Data_Ord = require("../Data.Ord/index.js");
  3716. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3717. var Data_Semiring = require("../Data.Semiring/index.js");
  3718. var Data_Show = require("../Data.Show/index.js");
  3719. var Multiplicative = function Multiplicative(x) {
  3720. return x;
  3721. };
  3722. var showMultiplicative = function showMultiplicative(dictShow) {
  3723. return new Data_Show.Show(function (v) {
  3724. return "(Multiplicative " + (Data_Show.show(dictShow)(v) + ")");
  3725. });
  3726. };
  3727. var semigroupMultiplicative = function semigroupMultiplicative(dictSemiring) {
  3728. return new Data_Semigroup.Semigroup(function (v) {
  3729. return function (v1) {
  3730. return Data_Semiring.mul(dictSemiring)(v)(v1);
  3731. };
  3732. });
  3733. };
  3734. var ordMultiplicative = function ordMultiplicative(dictOrd) {
  3735. return dictOrd;
  3736. };
  3737. var monoidMultiplicative = function monoidMultiplicative(dictSemiring) {
  3738. return new Data_Monoid.Monoid(function () {
  3739. return semigroupMultiplicative(dictSemiring);
  3740. }, Data_Semiring.one(dictSemiring));
  3741. };
  3742. var functorMultiplicative = new Data_Functor.Functor(function (f) {
  3743. return function (m) {
  3744. return f(m);
  3745. };
  3746. });
  3747. var eqMultiplicative = function eqMultiplicative(dictEq) {
  3748. return dictEq;
  3749. };
  3750. var eq1Multiplicative = new Data_Eq.Eq1(function (dictEq) {
  3751. return Data_Eq.eq(eqMultiplicative(dictEq));
  3752. });
  3753. var ord1Multiplicative = new Data_Ord.Ord1(function () {
  3754. return eq1Multiplicative;
  3755. }, function (dictOrd) {
  3756. return Data_Ord.compare(ordMultiplicative(dictOrd));
  3757. });
  3758. var boundedMultiplicative = function boundedMultiplicative(dictBounded) {
  3759. return dictBounded;
  3760. };
  3761. var applyMultiplicative = new Control_Apply.Apply(function () {
  3762. return functorMultiplicative;
  3763. }, function (v) {
  3764. return function (v1) {
  3765. return v(v1);
  3766. };
  3767. });
  3768. var bindMultiplicative = new Control_Bind.Bind(function () {
  3769. return applyMultiplicative;
  3770. }, function (v) {
  3771. return function (f) {
  3772. return f(v);
  3773. };
  3774. });
  3775. var applicativeMultiplicative = new Control_Applicative.Applicative(function () {
  3776. return applyMultiplicative;
  3777. }, Multiplicative);
  3778. var monadMultiplicative = new Control_Monad.Monad(function () {
  3779. return applicativeMultiplicative;
  3780. }, function () {
  3781. return bindMultiplicative;
  3782. });
  3783. module.exports = {
  3784. Multiplicative: Multiplicative,
  3785. eqMultiplicative: eqMultiplicative,
  3786. eq1Multiplicative: eq1Multiplicative,
  3787. ordMultiplicative: ordMultiplicative,
  3788. ord1Multiplicative: ord1Multiplicative,
  3789. boundedMultiplicative: boundedMultiplicative,
  3790. showMultiplicative: showMultiplicative,
  3791. functorMultiplicative: functorMultiplicative,
  3792. applyMultiplicative: applyMultiplicative,
  3793. applicativeMultiplicative: applicativeMultiplicative,
  3794. bindMultiplicative: bindMultiplicative,
  3795. monadMultiplicative: monadMultiplicative,
  3796. semigroupMultiplicative: semigroupMultiplicative,
  3797. monoidMultiplicative: monoidMultiplicative
  3798. };
  3799. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup.First/index.js":[function(require,module,exports) {
  3800. // Generated by purs version 0.13.6
  3801. "use strict";
  3802. var Control_Applicative = require("../Control.Applicative/index.js");
  3803. var Control_Apply = require("../Control.Apply/index.js");
  3804. var Control_Bind = require("../Control.Bind/index.js");
  3805. var Control_Monad = require("../Control.Monad/index.js");
  3806. var Data_Eq = require("../Data.Eq/index.js");
  3807. var Data_Functor = require("../Data.Functor/index.js");
  3808. var Data_Ord = require("../Data.Ord/index.js");
  3809. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3810. var Data_Show = require("../Data.Show/index.js");
  3811. var First = function First(x) {
  3812. return x;
  3813. };
  3814. var showFirst = function showFirst(dictShow) {
  3815. return new Data_Show.Show(function (v) {
  3816. return "(First " + (Data_Show.show(dictShow)(v) + ")");
  3817. });
  3818. };
  3819. var semigroupFirst = new Data_Semigroup.Semigroup(function (x) {
  3820. return function (v) {
  3821. return x;
  3822. };
  3823. });
  3824. var ordFirst = function ordFirst(dictOrd) {
  3825. return dictOrd;
  3826. };
  3827. var functorFirst = new Data_Functor.Functor(function (f) {
  3828. return function (m) {
  3829. return f(m);
  3830. };
  3831. });
  3832. var eqFirst = function eqFirst(dictEq) {
  3833. return dictEq;
  3834. };
  3835. var eq1First = new Data_Eq.Eq1(function (dictEq) {
  3836. return Data_Eq.eq(eqFirst(dictEq));
  3837. });
  3838. var ord1First = new Data_Ord.Ord1(function () {
  3839. return eq1First;
  3840. }, function (dictOrd) {
  3841. return Data_Ord.compare(ordFirst(dictOrd));
  3842. });
  3843. var boundedFirst = function boundedFirst(dictBounded) {
  3844. return dictBounded;
  3845. };
  3846. var applyFirst = new Control_Apply.Apply(function () {
  3847. return functorFirst;
  3848. }, function (v) {
  3849. return function (v1) {
  3850. return v(v1);
  3851. };
  3852. });
  3853. var bindFirst = new Control_Bind.Bind(function () {
  3854. return applyFirst;
  3855. }, function (v) {
  3856. return function (f) {
  3857. return f(v);
  3858. };
  3859. });
  3860. var applicativeFirst = new Control_Applicative.Applicative(function () {
  3861. return applyFirst;
  3862. }, First);
  3863. var monadFirst = new Control_Monad.Monad(function () {
  3864. return applicativeFirst;
  3865. }, function () {
  3866. return bindFirst;
  3867. });
  3868. module.exports = {
  3869. First: First,
  3870. eqFirst: eqFirst,
  3871. eq1First: eq1First,
  3872. ordFirst: ordFirst,
  3873. ord1First: ord1First,
  3874. boundedFirst: boundedFirst,
  3875. showFirst: showFirst,
  3876. functorFirst: functorFirst,
  3877. applyFirst: applyFirst,
  3878. applicativeFirst: applicativeFirst,
  3879. bindFirst: bindFirst,
  3880. monadFirst: monadFirst,
  3881. semigroupFirst: semigroupFirst
  3882. };
  3883. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup.Last/index.js":[function(require,module,exports) {
  3884. // Generated by purs version 0.13.6
  3885. "use strict";
  3886. var Control_Applicative = require("../Control.Applicative/index.js");
  3887. var Control_Apply = require("../Control.Apply/index.js");
  3888. var Control_Bind = require("../Control.Bind/index.js");
  3889. var Control_Monad = require("../Control.Monad/index.js");
  3890. var Data_Eq = require("../Data.Eq/index.js");
  3891. var Data_Functor = require("../Data.Functor/index.js");
  3892. var Data_Ord = require("../Data.Ord/index.js");
  3893. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3894. var Data_Show = require("../Data.Show/index.js");
  3895. var Last = function Last(x) {
  3896. return x;
  3897. };
  3898. var showLast = function showLast(dictShow) {
  3899. return new Data_Show.Show(function (v) {
  3900. return "(Last " + (Data_Show.show(dictShow)(v) + ")");
  3901. });
  3902. };
  3903. var semigroupLast = new Data_Semigroup.Semigroup(function (v) {
  3904. return function (x) {
  3905. return x;
  3906. };
  3907. });
  3908. var ordLast = function ordLast(dictOrd) {
  3909. return dictOrd;
  3910. };
  3911. var functorLast = new Data_Functor.Functor(function (f) {
  3912. return function (m) {
  3913. return f(m);
  3914. };
  3915. });
  3916. var eqLast = function eqLast(dictEq) {
  3917. return dictEq;
  3918. };
  3919. var eq1Last = new Data_Eq.Eq1(function (dictEq) {
  3920. return Data_Eq.eq(eqLast(dictEq));
  3921. });
  3922. var ord1Last = new Data_Ord.Ord1(function () {
  3923. return eq1Last;
  3924. }, function (dictOrd) {
  3925. return Data_Ord.compare(ordLast(dictOrd));
  3926. });
  3927. var boundedLast = function boundedLast(dictBounded) {
  3928. return dictBounded;
  3929. };
  3930. var applyLast = new Control_Apply.Apply(function () {
  3931. return functorLast;
  3932. }, function (v) {
  3933. return function (v1) {
  3934. return v(v1);
  3935. };
  3936. });
  3937. var bindLast = new Control_Bind.Bind(function () {
  3938. return applyLast;
  3939. }, function (v) {
  3940. return function (f) {
  3941. return f(v);
  3942. };
  3943. });
  3944. var applicativeLast = new Control_Applicative.Applicative(function () {
  3945. return applyLast;
  3946. }, Last);
  3947. var monadLast = new Control_Monad.Monad(function () {
  3948. return applicativeLast;
  3949. }, function () {
  3950. return bindLast;
  3951. });
  3952. module.exports = {
  3953. Last: Last,
  3954. eqLast: eqLast,
  3955. eq1Last: eq1Last,
  3956. ordLast: ordLast,
  3957. ord1Last: ord1Last,
  3958. boundedLast: boundedLast,
  3959. showLast: showLast,
  3960. functorLast: functorLast,
  3961. applyLast: applyLast,
  3962. applicativeLast: applicativeLast,
  3963. bindLast: bindLast,
  3964. monadLast: monadLast,
  3965. semigroupLast: semigroupLast
  3966. };
  3967. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Newtype/index.js":[function(require,module,exports) {
  3968. // Generated by purs version 0.13.6
  3969. "use strict";
  3970. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  3971. var Data_Function = require("../Data.Function/index.js");
  3972. var Data_Functor = require("../Data.Functor/index.js");
  3973. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  3974. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  3975. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  3976. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  3977. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  3978. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  3979. var Data_Semigroup_First = require("../Data.Semigroup.First/index.js");
  3980. var Data_Semigroup_Last = require("../Data.Semigroup.Last/index.js");
  3981. var Newtype = function Newtype(unwrap, wrap) {
  3982. this.unwrap = unwrap;
  3983. this.wrap = wrap;
  3984. };
  3985. var wrap = function wrap(dict) {
  3986. return dict.wrap;
  3987. };
  3988. var unwrap = function unwrap(dict) {
  3989. return dict.unwrap;
  3990. };
  3991. var underF2 = function underF2(dictFunctor) {
  3992. return function (dictFunctor1) {
  3993. return function (dictNewtype) {
  3994. return function (dictNewtype1) {
  3995. return function (v) {
  3996. return function (f) {
  3997. var $66 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1)));
  3998. var $67 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(wrap(dictNewtype)));
  3999. return function ($68) {
  4000. return $66($67($68));
  4001. };
  4002. };
  4003. };
  4004. };
  4005. };
  4006. };
  4007. };
  4008. var underF = function underF(dictFunctor) {
  4009. return function (dictFunctor1) {
  4010. return function (dictNewtype) {
  4011. return function (dictNewtype1) {
  4012. return function (v) {
  4013. return function (f) {
  4014. var $69 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1));
  4015. var $70 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
  4016. return function ($71) {
  4017. return $69(f($70($71)));
  4018. };
  4019. };
  4020. };
  4021. };
  4022. };
  4023. };
  4024. };
  4025. var under2 = function under2(dictNewtype) {
  4026. return function (dictNewtype1) {
  4027. return function (v) {
  4028. return function (f) {
  4029. var $72 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(unwrap(dictNewtype1));
  4030. var $73 = Data_Function.on(f)(wrap(dictNewtype));
  4031. return function ($74) {
  4032. return $72($73($74));
  4033. };
  4034. };
  4035. };
  4036. };
  4037. };
  4038. var under = function under(dictNewtype) {
  4039. return function (dictNewtype1) {
  4040. return function (v) {
  4041. return function (f) {
  4042. var $75 = unwrap(dictNewtype1);
  4043. var $76 = wrap(dictNewtype);
  4044. return function ($77) {
  4045. return $75(f($76($77)));
  4046. };
  4047. };
  4048. };
  4049. };
  4050. };
  4051. var un = function un(dictNewtype) {
  4052. return function (v) {
  4053. return unwrap(dictNewtype);
  4054. };
  4055. };
  4056. var traverse = function traverse(dictFunctor) {
  4057. return function (dictNewtype) {
  4058. return function (v) {
  4059. return function (f) {
  4060. var $78 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
  4061. var $79 = unwrap(dictNewtype);
  4062. return function ($80) {
  4063. return $78(f($79($80)));
  4064. };
  4065. };
  4066. };
  4067. };
  4068. };
  4069. var overF2 = function overF2(dictFunctor) {
  4070. return function (dictFunctor1) {
  4071. return function (dictNewtype) {
  4072. return function (dictNewtype1) {
  4073. return function (v) {
  4074. return function (f) {
  4075. var $81 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(wrap(dictNewtype1)));
  4076. var $82 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(unwrap(dictNewtype)));
  4077. return function ($83) {
  4078. return $81($82($83));
  4079. };
  4080. };
  4081. };
  4082. };
  4083. };
  4084. };
  4085. };
  4086. var overF = function overF(dictFunctor) {
  4087. return function (dictFunctor1) {
  4088. return function (dictNewtype) {
  4089. return function (dictNewtype1) {
  4090. return function (v) {
  4091. return function (f) {
  4092. var $84 = Data_Functor.map(dictFunctor1)(wrap(dictNewtype1));
  4093. var $85 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype));
  4094. return function ($86) {
  4095. return $84(f($85($86)));
  4096. };
  4097. };
  4098. };
  4099. };
  4100. };
  4101. };
  4102. };
  4103. var over2 = function over2(dictNewtype) {
  4104. return function (dictNewtype1) {
  4105. return function (v) {
  4106. return function (f) {
  4107. var $87 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(wrap(dictNewtype1));
  4108. var $88 = Data_Function.on(f)(unwrap(dictNewtype));
  4109. return function ($89) {
  4110. return $87($88($89));
  4111. };
  4112. };
  4113. };
  4114. };
  4115. };
  4116. var over = function over(dictNewtype) {
  4117. return function (dictNewtype1) {
  4118. return function (v) {
  4119. return function (f) {
  4120. var $90 = wrap(dictNewtype1);
  4121. var $91 = unwrap(dictNewtype);
  4122. return function ($92) {
  4123. return $90(f($91($92)));
  4124. };
  4125. };
  4126. };
  4127. };
  4128. };
  4129. var op = function op(dictNewtype) {
  4130. return un(dictNewtype);
  4131. };
  4132. var newtypeMultiplicative = new Newtype(function (v) {
  4133. return v;
  4134. }, Data_Monoid_Multiplicative.Multiplicative);
  4135. var newtypeLast = new Newtype(function (v) {
  4136. return v;
  4137. }, Data_Semigroup_Last.Last);
  4138. var newtypeFirst = new Newtype(function (v) {
  4139. return v;
  4140. }, Data_Semigroup_First.First);
  4141. var newtypeEndo = new Newtype(function (v) {
  4142. return v;
  4143. }, Data_Monoid_Endo.Endo);
  4144. var newtypeDual = new Newtype(function (v) {
  4145. return v;
  4146. }, Data_Monoid_Dual.Dual);
  4147. var newtypeDisj = new Newtype(function (v) {
  4148. return v;
  4149. }, Data_Monoid_Disj.Disj);
  4150. var newtypeConj = new Newtype(function (v) {
  4151. return v;
  4152. }, Data_Monoid_Conj.Conj);
  4153. var newtypeAdditive = new Newtype(function (v) {
  4154. return v;
  4155. }, Data_Monoid_Additive.Additive);
  4156. var collect = function collect(dictFunctor) {
  4157. return function (dictNewtype) {
  4158. return function (v) {
  4159. return function (f) {
  4160. var $93 = wrap(dictNewtype);
  4161. var $94 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype));
  4162. return function ($95) {
  4163. return $93(f($94($95)));
  4164. };
  4165. };
  4166. };
  4167. };
  4168. };
  4169. var alaF = function alaF(dictFunctor) {
  4170. return function (dictFunctor1) {
  4171. return function (dictNewtype) {
  4172. return function (dictNewtype1) {
  4173. return function (v) {
  4174. return function (f) {
  4175. var $96 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1));
  4176. var $97 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
  4177. return function ($98) {
  4178. return $96(f($97($98)));
  4179. };
  4180. };
  4181. };
  4182. };
  4183. };
  4184. };
  4185. };
  4186. var ala = function ala(dictFunctor) {
  4187. return function (dictNewtype) {
  4188. return function (dictNewtype1) {
  4189. return function (v) {
  4190. return function (f) {
  4191. return Data_Functor.map(dictFunctor)(unwrap(dictNewtype))(f(wrap(dictNewtype1)));
  4192. };
  4193. };
  4194. };
  4195. };
  4196. };
  4197. module.exports = {
  4198. unwrap: unwrap,
  4199. wrap: wrap,
  4200. Newtype: Newtype,
  4201. un: un,
  4202. op: op,
  4203. ala: ala,
  4204. alaF: alaF,
  4205. over: over,
  4206. overF: overF,
  4207. under: under,
  4208. underF: underF,
  4209. over2: over2,
  4210. overF2: overF2,
  4211. under2: under2,
  4212. underF2: underF2,
  4213. traverse: traverse,
  4214. collect: collect,
  4215. newtypeAdditive: newtypeAdditive,
  4216. newtypeMultiplicative: newtypeMultiplicative,
  4217. newtypeConj: newtypeConj,
  4218. newtypeDisj: newtypeDisj,
  4219. newtypeDual: newtypeDual,
  4220. newtypeEndo: newtypeEndo,
  4221. newtypeFirst: newtypeFirst,
  4222. newtypeLast: newtypeLast
  4223. };
  4224. },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Semigroup.First/index.js":"../output/Data.Semigroup.First/index.js","../Data.Semigroup.Last/index.js":"../output/Data.Semigroup.Last/index.js"}],"../output/Data.Foldable/index.js":[function(require,module,exports) {
  4225. // Generated by purs version 0.13.6
  4226. "use strict";
  4227. var $foreign = require("./foreign.js");
  4228. var Control_Alt = require("../Control.Alt/index.js");
  4229. var Control_Applicative = require("../Control.Applicative/index.js");
  4230. var Control_Apply = require("../Control.Apply/index.js");
  4231. var Control_Bind = require("../Control.Bind/index.js");
  4232. var Control_Category = require("../Control.Category/index.js");
  4233. var Control_Plus = require("../Control.Plus/index.js");
  4234. var Data_Eq = require("../Data.Eq/index.js");
  4235. var Data_Function = require("../Data.Function/index.js");
  4236. var Data_Functor = require("../Data.Functor/index.js");
  4237. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  4238. var Data_Maybe = require("../Data.Maybe/index.js");
  4239. var Data_Monoid = require("../Data.Monoid/index.js");
  4240. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  4241. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  4242. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  4243. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  4244. var Data_Newtype = require("../Data.Newtype/index.js");
  4245. var Data_Ord = require("../Data.Ord/index.js");
  4246. var Data_Ordering = require("../Data.Ordering/index.js");
  4247. var Data_Semigroup = require("../Data.Semigroup/index.js");
  4248. var Data_Semiring = require("../Data.Semiring/index.js");
  4249. var Data_Unit = require("../Data.Unit/index.js");
  4250. var Foldable = function Foldable(foldMap, foldl, foldr) {
  4251. this.foldMap = foldMap;
  4252. this.foldl = foldl;
  4253. this.foldr = foldr;
  4254. };
  4255. var foldr = function foldr(dict) {
  4256. return dict.foldr;
  4257. };
  4258. var indexr = function indexr(dictFoldable) {
  4259. return function (idx) {
  4260. var go = function go(a) {
  4261. return function (cursor) {
  4262. if (cursor.elem instanceof Data_Maybe.Just) {
  4263. return cursor;
  4264. }
  4265. ;
  4266. var $106 = cursor.pos === idx;
  4267. if ($106) {
  4268. return {
  4269. elem: new Data_Maybe.Just(a),
  4270. pos: cursor.pos
  4271. };
  4272. }
  4273. ;
  4274. return {
  4275. pos: cursor.pos + 1 | 0,
  4276. elem: cursor.elem
  4277. };
  4278. };
  4279. };
  4280. var $193 = foldr(dictFoldable)(go)({
  4281. elem: Data_Maybe.Nothing.value,
  4282. pos: 0
  4283. });
  4284. return function ($194) {
  4285. return function (v) {
  4286. return v.elem;
  4287. }($193($194));
  4288. };
  4289. };
  4290. };
  4291. var $$null = function $$null(dictFoldable) {
  4292. return foldr(dictFoldable)(function (v) {
  4293. return function (v1) {
  4294. return false;
  4295. };
  4296. })(true);
  4297. };
  4298. var oneOf = function oneOf(dictFoldable) {
  4299. return function (dictPlus) {
  4300. return foldr(dictFoldable)(Control_Alt.alt(dictPlus.Alt0()))(Control_Plus.empty(dictPlus));
  4301. };
  4302. };
  4303. var oneOfMap = function oneOfMap(dictFoldable) {
  4304. return function (dictPlus) {
  4305. return function (f) {
  4306. return foldr(dictFoldable)(function () {
  4307. var $195 = Control_Alt.alt(dictPlus.Alt0());
  4308. return function ($196) {
  4309. return $195(f($196));
  4310. };
  4311. }())(Control_Plus.empty(dictPlus));
  4312. };
  4313. };
  4314. };
  4315. var traverse_ = function traverse_(dictApplicative) {
  4316. return function (dictFoldable) {
  4317. return function (f) {
  4318. return foldr(dictFoldable)(function () {
  4319. var $197 = Control_Apply.applySecond(dictApplicative.Apply0());
  4320. return function ($198) {
  4321. return $197(f($198));
  4322. };
  4323. }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  4324. };
  4325. };
  4326. };
  4327. var for_ = function for_(dictApplicative) {
  4328. return function (dictFoldable) {
  4329. return Data_Function.flip(traverse_(dictApplicative)(dictFoldable));
  4330. };
  4331. };
  4332. var sequence_ = function sequence_(dictApplicative) {
  4333. return function (dictFoldable) {
  4334. return traverse_(dictApplicative)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn));
  4335. };
  4336. };
  4337. var foldl = function foldl(dict) {
  4338. return dict.foldl;
  4339. };
  4340. var indexl = function indexl(dictFoldable) {
  4341. return function (idx) {
  4342. var go = function go(cursor) {
  4343. return function (a) {
  4344. if (cursor.elem instanceof Data_Maybe.Just) {
  4345. return cursor;
  4346. }
  4347. ;
  4348. var $109 = cursor.pos === idx;
  4349. if ($109) {
  4350. return {
  4351. elem: new Data_Maybe.Just(a),
  4352. pos: cursor.pos
  4353. };
  4354. }
  4355. ;
  4356. return {
  4357. pos: cursor.pos + 1 | 0,
  4358. elem: cursor.elem
  4359. };
  4360. };
  4361. };
  4362. var $199 = foldl(dictFoldable)(go)({
  4363. elem: Data_Maybe.Nothing.value,
  4364. pos: 0
  4365. });
  4366. return function ($200) {
  4367. return function (v) {
  4368. return v.elem;
  4369. }($199($200));
  4370. };
  4371. };
  4372. };
  4373. var intercalate = function intercalate(dictFoldable) {
  4374. return function (dictMonoid) {
  4375. return function (sep) {
  4376. return function (xs) {
  4377. var go = function go(v) {
  4378. return function (x) {
  4379. if (v.init) {
  4380. return {
  4381. init: false,
  4382. acc: x
  4383. };
  4384. }
  4385. ;
  4386. return {
  4387. init: false,
  4388. acc: Data_Semigroup.append(dictMonoid.Semigroup0())(v.acc)(Data_Semigroup.append(dictMonoid.Semigroup0())(sep)(x))
  4389. };
  4390. };
  4391. };
  4392. return foldl(dictFoldable)(go)({
  4393. init: true,
  4394. acc: Data_Monoid.mempty(dictMonoid)
  4395. })(xs).acc;
  4396. };
  4397. };
  4398. };
  4399. };
  4400. var length = function length(dictFoldable) {
  4401. return function (dictSemiring) {
  4402. return foldl(dictFoldable)(function (c) {
  4403. return function (v) {
  4404. return Data_Semiring.add(dictSemiring)(Data_Semiring.one(dictSemiring))(c);
  4405. };
  4406. })(Data_Semiring.zero(dictSemiring));
  4407. };
  4408. };
  4409. var maximumBy = function maximumBy(dictFoldable) {
  4410. return function (cmp) {
  4411. var max$prime = function max$prime(v) {
  4412. return function (v1) {
  4413. if (v instanceof Data_Maybe.Nothing) {
  4414. return new Data_Maybe.Just(v1);
  4415. }
  4416. ;
  4417. if (v instanceof Data_Maybe.Just) {
  4418. return new Data_Maybe.Just(function () {
  4419. var $116 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.GT.value);
  4420. if ($116) {
  4421. return v.value0;
  4422. }
  4423. ;
  4424. return v1;
  4425. }());
  4426. }
  4427. ;
  4428. throw new Error("Failed pattern match at Data.Foldable (line 389, column 3 - line 389, column 27): " + [v.constructor.name, v1.constructor.name]);
  4429. };
  4430. };
  4431. return foldl(dictFoldable)(max$prime)(Data_Maybe.Nothing.value);
  4432. };
  4433. };
  4434. var maximum = function maximum(dictOrd) {
  4435. return function (dictFoldable) {
  4436. return maximumBy(dictFoldable)(Data_Ord.compare(dictOrd));
  4437. };
  4438. };
  4439. var minimumBy = function minimumBy(dictFoldable) {
  4440. return function (cmp) {
  4441. var min$prime = function min$prime(v) {
  4442. return function (v1) {
  4443. if (v instanceof Data_Maybe.Nothing) {
  4444. return new Data_Maybe.Just(v1);
  4445. }
  4446. ;
  4447. if (v instanceof Data_Maybe.Just) {
  4448. return new Data_Maybe.Just(function () {
  4449. var $120 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.LT.value);
  4450. if ($120) {
  4451. return v.value0;
  4452. }
  4453. ;
  4454. return v1;
  4455. }());
  4456. }
  4457. ;
  4458. throw new Error("Failed pattern match at Data.Foldable (line 402, column 3 - line 402, column 27): " + [v.constructor.name, v1.constructor.name]);
  4459. };
  4460. };
  4461. return foldl(dictFoldable)(min$prime)(Data_Maybe.Nothing.value);
  4462. };
  4463. };
  4464. var minimum = function minimum(dictOrd) {
  4465. return function (dictFoldable) {
  4466. return minimumBy(dictFoldable)(Data_Ord.compare(dictOrd));
  4467. };
  4468. };
  4469. var product = function product(dictFoldable) {
  4470. return function (dictSemiring) {
  4471. return foldl(dictFoldable)(Data_Semiring.mul(dictSemiring))(Data_Semiring.one(dictSemiring));
  4472. };
  4473. };
  4474. var sum = function sum(dictFoldable) {
  4475. return function (dictSemiring) {
  4476. return foldl(dictFoldable)(Data_Semiring.add(dictSemiring))(Data_Semiring.zero(dictSemiring));
  4477. };
  4478. };
  4479. var foldableMultiplicative = new Foldable(function (dictMonoid) {
  4480. return function (f) {
  4481. return function (v) {
  4482. return f(v);
  4483. };
  4484. };
  4485. }, function (f) {
  4486. return function (z) {
  4487. return function (v) {
  4488. return f(z)(v);
  4489. };
  4490. };
  4491. }, function (f) {
  4492. return function (z) {
  4493. return function (v) {
  4494. return f(v)(z);
  4495. };
  4496. };
  4497. });
  4498. var foldableMaybe = new Foldable(function (dictMonoid) {
  4499. return function (f) {
  4500. return function (v) {
  4501. if (v instanceof Data_Maybe.Nothing) {
  4502. return Data_Monoid.mempty(dictMonoid);
  4503. }
  4504. ;
  4505. if (v instanceof Data_Maybe.Just) {
  4506. return f(v.value0);
  4507. }
  4508. ;
  4509. throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [f.constructor.name, v.constructor.name]);
  4510. };
  4511. };
  4512. }, function (v) {
  4513. return function (z) {
  4514. return function (v1) {
  4515. if (v1 instanceof Data_Maybe.Nothing) {
  4516. return z;
  4517. }
  4518. ;
  4519. if (v1 instanceof Data_Maybe.Just) {
  4520. return v(z)(v1.value0);
  4521. }
  4522. ;
  4523. throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
  4524. };
  4525. };
  4526. }, function (v) {
  4527. return function (z) {
  4528. return function (v1) {
  4529. if (v1 instanceof Data_Maybe.Nothing) {
  4530. return z;
  4531. }
  4532. ;
  4533. if (v1 instanceof Data_Maybe.Just) {
  4534. return v(v1.value0)(z);
  4535. }
  4536. ;
  4537. throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
  4538. };
  4539. };
  4540. });
  4541. var foldableDual = new Foldable(function (dictMonoid) {
  4542. return function (f) {
  4543. return function (v) {
  4544. return f(v);
  4545. };
  4546. };
  4547. }, function (f) {
  4548. return function (z) {
  4549. return function (v) {
  4550. return f(z)(v);
  4551. };
  4552. };
  4553. }, function (f) {
  4554. return function (z) {
  4555. return function (v) {
  4556. return f(v)(z);
  4557. };
  4558. };
  4559. });
  4560. var foldableDisj = new Foldable(function (dictMonoid) {
  4561. return function (f) {
  4562. return function (v) {
  4563. return f(v);
  4564. };
  4565. };
  4566. }, function (f) {
  4567. return function (z) {
  4568. return function (v) {
  4569. return f(z)(v);
  4570. };
  4571. };
  4572. }, function (f) {
  4573. return function (z) {
  4574. return function (v) {
  4575. return f(v)(z);
  4576. };
  4577. };
  4578. });
  4579. var foldableConj = new Foldable(function (dictMonoid) {
  4580. return function (f) {
  4581. return function (v) {
  4582. return f(v);
  4583. };
  4584. };
  4585. }, function (f) {
  4586. return function (z) {
  4587. return function (v) {
  4588. return f(z)(v);
  4589. };
  4590. };
  4591. }, function (f) {
  4592. return function (z) {
  4593. return function (v) {
  4594. return f(v)(z);
  4595. };
  4596. };
  4597. });
  4598. var foldableAdditive = new Foldable(function (dictMonoid) {
  4599. return function (f) {
  4600. return function (v) {
  4601. return f(v);
  4602. };
  4603. };
  4604. }, function (f) {
  4605. return function (z) {
  4606. return function (v) {
  4607. return f(z)(v);
  4608. };
  4609. };
  4610. }, function (f) {
  4611. return function (z) {
  4612. return function (v) {
  4613. return f(v)(z);
  4614. };
  4615. };
  4616. });
  4617. var foldMapDefaultR = function foldMapDefaultR(dictFoldable) {
  4618. return function (dictMonoid) {
  4619. return function (f) {
  4620. return foldr(dictFoldable)(function (x) {
  4621. return function (acc) {
  4622. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(x))(acc);
  4623. };
  4624. })(Data_Monoid.mempty(dictMonoid));
  4625. };
  4626. };
  4627. };
  4628. var foldableArray = new Foldable(function (dictMonoid) {
  4629. return foldMapDefaultR(foldableArray)(dictMonoid);
  4630. }, $foreign.foldlArray, $foreign.foldrArray);
  4631. var foldMapDefaultL = function foldMapDefaultL(dictFoldable) {
  4632. return function (dictMonoid) {
  4633. return function (f) {
  4634. return foldl(dictFoldable)(function (acc) {
  4635. return function (x) {
  4636. return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(x));
  4637. };
  4638. })(Data_Monoid.mempty(dictMonoid));
  4639. };
  4640. };
  4641. };
  4642. var foldMap = function foldMap(dict) {
  4643. return dict.foldMap;
  4644. };
  4645. var foldableFirst = new Foldable(function (dictMonoid) {
  4646. return function (f) {
  4647. return function (v) {
  4648. return foldMap(foldableMaybe)(dictMonoid)(f)(v);
  4649. };
  4650. };
  4651. }, function (f) {
  4652. return function (z) {
  4653. return function (v) {
  4654. return foldl(foldableMaybe)(f)(z)(v);
  4655. };
  4656. };
  4657. }, function (f) {
  4658. return function (z) {
  4659. return function (v) {
  4660. return foldr(foldableMaybe)(f)(z)(v);
  4661. };
  4662. };
  4663. });
  4664. var foldableLast = new Foldable(function (dictMonoid) {
  4665. return function (f) {
  4666. return function (v) {
  4667. return foldMap(foldableMaybe)(dictMonoid)(f)(v);
  4668. };
  4669. };
  4670. }, function (f) {
  4671. return function (z) {
  4672. return function (v) {
  4673. return foldl(foldableMaybe)(f)(z)(v);
  4674. };
  4675. };
  4676. }, function (f) {
  4677. return function (z) {
  4678. return function (v) {
  4679. return foldr(foldableMaybe)(f)(z)(v);
  4680. };
  4681. };
  4682. });
  4683. var foldlDefault = function foldlDefault(dictFoldable) {
  4684. return function (c) {
  4685. return function (u) {
  4686. return function (xs) {
  4687. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(foldMap(dictFoldable)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function () {
  4688. var $201 = Data_Function.flip(c);
  4689. return function ($202) {
  4690. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($201($202)));
  4691. };
  4692. }())(xs)))(u);
  4693. };
  4694. };
  4695. };
  4696. };
  4697. var foldrDefault = function foldrDefault(dictFoldable) {
  4698. return function (c) {
  4699. return function (u) {
  4700. return function (xs) {
  4701. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($203) {
  4702. return Data_Monoid_Endo.Endo(c($203));
  4703. })(xs))(u);
  4704. };
  4705. };
  4706. };
  4707. };
  4708. var surroundMap = function surroundMap(dictFoldable) {
  4709. return function (dictSemigroup) {
  4710. return function (d) {
  4711. return function (t) {
  4712. return function (f) {
  4713. var joined = function joined(a) {
  4714. return function (m) {
  4715. return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(a))(m));
  4716. };
  4717. };
  4718. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d);
  4719. };
  4720. };
  4721. };
  4722. };
  4723. };
  4724. var surround = function surround(dictFoldable) {
  4725. return function (dictSemigroup) {
  4726. return function (d) {
  4727. return surroundMap(dictFoldable)(dictSemigroup)(d)(Control_Category.identity(Control_Category.categoryFn));
  4728. };
  4729. };
  4730. };
  4731. var foldM = function foldM(dictFoldable) {
  4732. return function (dictMonad) {
  4733. return function (f) {
  4734. return function (a0) {
  4735. return foldl(dictFoldable)(function (ma) {
  4736. return function (b) {
  4737. return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f)(b));
  4738. };
  4739. })(Control_Applicative.pure(dictMonad.Applicative0())(a0));
  4740. };
  4741. };
  4742. };
  4743. };
  4744. var fold = function fold(dictFoldable) {
  4745. return function (dictMonoid) {
  4746. return foldMap(dictFoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn));
  4747. };
  4748. };
  4749. var findMap = function findMap(dictFoldable) {
  4750. return function (p) {
  4751. var go = function go(v) {
  4752. return function (v1) {
  4753. if (v instanceof Data_Maybe.Nothing) {
  4754. return p(v1);
  4755. }
  4756. ;
  4757. return v;
  4758. };
  4759. };
  4760. return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value);
  4761. };
  4762. };
  4763. var find = function find(dictFoldable) {
  4764. return function (p) {
  4765. var go = function go(v) {
  4766. return function (v1) {
  4767. if (v instanceof Data_Maybe.Nothing && p(v1)) {
  4768. return new Data_Maybe.Just(v1);
  4769. }
  4770. ;
  4771. return v;
  4772. };
  4773. };
  4774. return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value);
  4775. };
  4776. };
  4777. var any = function any(dictFoldable) {
  4778. return function (dictHeytingAlgebra) {
  4779. return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeDisj)(Data_Newtype.newtypeDisj)(Data_Monoid_Disj.Disj)(foldMap(dictFoldable)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra)));
  4780. };
  4781. };
  4782. var elem = function elem(dictFoldable) {
  4783. return function (dictEq) {
  4784. var $204 = any(dictFoldable)(Data_HeytingAlgebra.heytingAlgebraBoolean);
  4785. var $205 = Data_Eq.eq(dictEq);
  4786. return function ($206) {
  4787. return $204($205($206));
  4788. };
  4789. };
  4790. };
  4791. var notElem = function notElem(dictFoldable) {
  4792. return function (dictEq) {
  4793. return function (x) {
  4794. var $207 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean);
  4795. var $208 = elem(dictFoldable)(dictEq)(x);
  4796. return function ($209) {
  4797. return $207($208($209));
  4798. };
  4799. };
  4800. };
  4801. };
  4802. var or = function or(dictFoldable) {
  4803. return function (dictHeytingAlgebra) {
  4804. return any(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn));
  4805. };
  4806. };
  4807. var all = function all(dictFoldable) {
  4808. return function (dictHeytingAlgebra) {
  4809. return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeConj)(Data_Newtype.newtypeConj)(Data_Monoid_Conj.Conj)(foldMap(dictFoldable)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra)));
  4810. };
  4811. };
  4812. var and = function and(dictFoldable) {
  4813. return function (dictHeytingAlgebra) {
  4814. return all(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn));
  4815. };
  4816. };
  4817. module.exports = {
  4818. Foldable: Foldable,
  4819. foldr: foldr,
  4820. foldl: foldl,
  4821. foldMap: foldMap,
  4822. foldrDefault: foldrDefault,
  4823. foldlDefault: foldlDefault,
  4824. foldMapDefaultL: foldMapDefaultL,
  4825. foldMapDefaultR: foldMapDefaultR,
  4826. fold: fold,
  4827. foldM: foldM,
  4828. traverse_: traverse_,
  4829. for_: for_,
  4830. sequence_: sequence_,
  4831. oneOf: oneOf,
  4832. oneOfMap: oneOfMap,
  4833. intercalate: intercalate,
  4834. surroundMap: surroundMap,
  4835. surround: surround,
  4836. and: and,
  4837. or: or,
  4838. all: all,
  4839. any: any,
  4840. sum: sum,
  4841. product: product,
  4842. elem: elem,
  4843. notElem: notElem,
  4844. indexl: indexl,
  4845. indexr: indexr,
  4846. find: find,
  4847. findMap: findMap,
  4848. maximum: maximum,
  4849. maximumBy: maximumBy,
  4850. minimum: minimum,
  4851. minimumBy: minimumBy,
  4852. "null": $$null,
  4853. length: length,
  4854. foldableArray: foldableArray,
  4855. foldableMaybe: foldableMaybe,
  4856. foldableFirst: foldableFirst,
  4857. foldableLast: foldableLast,
  4858. foldableAdditive: foldableAdditive,
  4859. foldableDual: foldableDual,
  4860. foldableDisj: foldableDisj,
  4861. foldableConj: foldableConj,
  4862. foldableMultiplicative: foldableMultiplicative
  4863. };
  4864. },{"./foreign.js":"../output/Data.Foldable/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Bifoldable/index.js":[function(require,module,exports) {
  4865. // Generated by purs version 0.13.6
  4866. "use strict";
  4867. var Control_Applicative = require("../Control.Applicative/index.js");
  4868. var Control_Apply = require("../Control.Apply/index.js");
  4869. var Control_Category = require("../Control.Category/index.js");
  4870. var Data_Foldable = require("../Data.Foldable/index.js");
  4871. var Data_Function = require("../Data.Function/index.js");
  4872. var Data_Monoid = require("../Data.Monoid/index.js");
  4873. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  4874. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  4875. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  4876. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  4877. var Data_Newtype = require("../Data.Newtype/index.js");
  4878. var Data_Semigroup = require("../Data.Semigroup/index.js");
  4879. var Data_Unit = require("../Data.Unit/index.js");
  4880. var Bifoldable = function Bifoldable(bifoldMap, bifoldl, bifoldr) {
  4881. this.bifoldMap = bifoldMap;
  4882. this.bifoldl = bifoldl;
  4883. this.bifoldr = bifoldr;
  4884. };
  4885. var bifoldr = function bifoldr(dict) {
  4886. return dict.bifoldr;
  4887. };
  4888. var bitraverse_ = function bitraverse_(dictBifoldable) {
  4889. return function (dictApplicative) {
  4890. return function (f) {
  4891. return function (g) {
  4892. return bifoldr(dictBifoldable)(function () {
  4893. var $97 = Control_Apply.applySecond(dictApplicative.Apply0());
  4894. return function ($98) {
  4895. return $97(f($98));
  4896. };
  4897. }())(function () {
  4898. var $99 = Control_Apply.applySecond(dictApplicative.Apply0());
  4899. return function ($100) {
  4900. return $99(g($100));
  4901. };
  4902. }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  4903. };
  4904. };
  4905. };
  4906. };
  4907. var bifor_ = function bifor_(dictBifoldable) {
  4908. return function (dictApplicative) {
  4909. return function (t) {
  4910. return function (f) {
  4911. return function (g) {
  4912. return bitraverse_(dictBifoldable)(dictApplicative)(f)(g)(t);
  4913. };
  4914. };
  4915. };
  4916. };
  4917. };
  4918. var bisequence_ = function bisequence_(dictBifoldable) {
  4919. return function (dictApplicative) {
  4920. return bitraverse_(dictBifoldable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
  4921. };
  4922. };
  4923. var bifoldl = function bifoldl(dict) {
  4924. return dict.bifoldl;
  4925. };
  4926. var bifoldableJoker = function bifoldableJoker(dictFoldable) {
  4927. return new Bifoldable(function (dictMonoid) {
  4928. return function (v) {
  4929. return function (r) {
  4930. return function (v1) {
  4931. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(r)(v1);
  4932. };
  4933. };
  4934. };
  4935. }, function (v) {
  4936. return function (r) {
  4937. return function (u) {
  4938. return function (v1) {
  4939. return Data_Foldable.foldl(dictFoldable)(r)(u)(v1);
  4940. };
  4941. };
  4942. };
  4943. }, function (v) {
  4944. return function (r) {
  4945. return function (u) {
  4946. return function (v1) {
  4947. return Data_Foldable.foldr(dictFoldable)(r)(u)(v1);
  4948. };
  4949. };
  4950. };
  4951. });
  4952. };
  4953. var bifoldableClown = function bifoldableClown(dictFoldable) {
  4954. return new Bifoldable(function (dictMonoid) {
  4955. return function (l) {
  4956. return function (v) {
  4957. return function (v1) {
  4958. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(l)(v1);
  4959. };
  4960. };
  4961. };
  4962. }, function (l) {
  4963. return function (v) {
  4964. return function (u) {
  4965. return function (v1) {
  4966. return Data_Foldable.foldl(dictFoldable)(l)(u)(v1);
  4967. };
  4968. };
  4969. };
  4970. }, function (l) {
  4971. return function (v) {
  4972. return function (u) {
  4973. return function (v1) {
  4974. return Data_Foldable.foldr(dictFoldable)(l)(u)(v1);
  4975. };
  4976. };
  4977. };
  4978. });
  4979. };
  4980. var bifoldMapDefaultR = function bifoldMapDefaultR(dictBifoldable) {
  4981. return function (dictMonoid) {
  4982. return function (f) {
  4983. return function (g) {
  4984. return bifoldr(dictBifoldable)(function () {
  4985. var $101 = Data_Semigroup.append(dictMonoid.Semigroup0());
  4986. return function ($102) {
  4987. return $101(f($102));
  4988. };
  4989. }())(function () {
  4990. var $103 = Data_Semigroup.append(dictMonoid.Semigroup0());
  4991. return function ($104) {
  4992. return $103(g($104));
  4993. };
  4994. }())(Data_Monoid.mempty(dictMonoid));
  4995. };
  4996. };
  4997. };
  4998. };
  4999. var bifoldMapDefaultL = function bifoldMapDefaultL(dictBifoldable) {
  5000. return function (dictMonoid) {
  5001. return function (f) {
  5002. return function (g) {
  5003. return bifoldl(dictBifoldable)(function (m) {
  5004. return function (a) {
  5005. return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(f(a));
  5006. };
  5007. })(function (m) {
  5008. return function (b) {
  5009. return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(g(b));
  5010. };
  5011. })(Data_Monoid.mempty(dictMonoid));
  5012. };
  5013. };
  5014. };
  5015. };
  5016. var bifoldMap = function bifoldMap(dict) {
  5017. return dict.bifoldMap;
  5018. };
  5019. var bifoldableFlip = function bifoldableFlip(dictBifoldable) {
  5020. return new Bifoldable(function (dictMonoid) {
  5021. return function (r) {
  5022. return function (l) {
  5023. return function (v) {
  5024. return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v);
  5025. };
  5026. };
  5027. };
  5028. }, function (r) {
  5029. return function (l) {
  5030. return function (u) {
  5031. return function (v) {
  5032. return bifoldl(dictBifoldable)(l)(r)(u)(v);
  5033. };
  5034. };
  5035. };
  5036. }, function (r) {
  5037. return function (l) {
  5038. return function (u) {
  5039. return function (v) {
  5040. return bifoldr(dictBifoldable)(l)(r)(u)(v);
  5041. };
  5042. };
  5043. };
  5044. });
  5045. };
  5046. var bifoldableWrap = function bifoldableWrap(dictBifoldable) {
  5047. return new Bifoldable(function (dictMonoid) {
  5048. return function (l) {
  5049. return function (r) {
  5050. return function (v) {
  5051. return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v);
  5052. };
  5053. };
  5054. };
  5055. }, function (l) {
  5056. return function (r) {
  5057. return function (u) {
  5058. return function (v) {
  5059. return bifoldl(dictBifoldable)(l)(r)(u)(v);
  5060. };
  5061. };
  5062. };
  5063. }, function (l) {
  5064. return function (r) {
  5065. return function (u) {
  5066. return function (v) {
  5067. return bifoldr(dictBifoldable)(l)(r)(u)(v);
  5068. };
  5069. };
  5070. };
  5071. });
  5072. };
  5073. var bifoldlDefault = function bifoldlDefault(dictBifoldable) {
  5074. return function (f) {
  5075. return function (g) {
  5076. return function (z) {
  5077. return function (p) {
  5078. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(bifoldMap(dictBifoldable)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function () {
  5079. var $105 = Data_Function.flip(f);
  5080. return function ($106) {
  5081. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($105($106)));
  5082. };
  5083. }())(function () {
  5084. var $107 = Data_Function.flip(g);
  5085. return function ($108) {
  5086. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($107($108)));
  5087. };
  5088. }())(p)))(z);
  5089. };
  5090. };
  5091. };
  5092. };
  5093. };
  5094. var bifoldrDefault = function bifoldrDefault(dictBifoldable) {
  5095. return function (f) {
  5096. return function (g) {
  5097. return function (z) {
  5098. return function (p) {
  5099. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(bifoldMap(dictBifoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($109) {
  5100. return Data_Monoid_Endo.Endo(f($109));
  5101. })(function ($110) {
  5102. return Data_Monoid_Endo.Endo(g($110));
  5103. })(p))(z);
  5104. };
  5105. };
  5106. };
  5107. };
  5108. };
  5109. var bifoldableProduct = function bifoldableProduct(dictBifoldable) {
  5110. return function (dictBifoldable1) {
  5111. return new Bifoldable(function (dictMonoid) {
  5112. return function (l) {
  5113. return function (r) {
  5114. return function (v) {
  5115. return Data_Semigroup.append(dictMonoid.Semigroup0())(bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v.value0))(bifoldMap(dictBifoldable1)(dictMonoid)(l)(r)(v.value1));
  5116. };
  5117. };
  5118. };
  5119. }, function (l) {
  5120. return function (r) {
  5121. return function (u) {
  5122. return function (m) {
  5123. return bifoldlDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m);
  5124. };
  5125. };
  5126. };
  5127. }, function (l) {
  5128. return function (r) {
  5129. return function (u) {
  5130. return function (m) {
  5131. return bifoldrDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m);
  5132. };
  5133. };
  5134. };
  5135. });
  5136. };
  5137. };
  5138. var bifold = function bifold(dictBifoldable) {
  5139. return function (dictMonoid) {
  5140. return bifoldMap(dictBifoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
  5141. };
  5142. };
  5143. var biany = function biany(dictBifoldable) {
  5144. return function (dictBooleanAlgebra) {
  5145. return function (p) {
  5146. return function (q) {
  5147. var $111 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  5148. var $112 = bifoldMap(dictBifoldable)(Data_Monoid_Disj.monoidDisj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($114) {
  5149. return Data_Monoid_Disj.Disj(p($114));
  5150. })(function ($115) {
  5151. return Data_Monoid_Disj.Disj(q($115));
  5152. });
  5153. return function ($113) {
  5154. return $111($112($113));
  5155. };
  5156. };
  5157. };
  5158. };
  5159. };
  5160. var biall = function biall(dictBifoldable) {
  5161. return function (dictBooleanAlgebra) {
  5162. return function (p) {
  5163. return function (q) {
  5164. var $116 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  5165. var $117 = bifoldMap(dictBifoldable)(Data_Monoid_Conj.monoidConj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($119) {
  5166. return Data_Monoid_Conj.Conj(p($119));
  5167. })(function ($120) {
  5168. return Data_Monoid_Conj.Conj(q($120));
  5169. });
  5170. return function ($118) {
  5171. return $116($117($118));
  5172. };
  5173. };
  5174. };
  5175. };
  5176. };
  5177. module.exports = {
  5178. bifoldMap: bifoldMap,
  5179. bifoldl: bifoldl,
  5180. bifoldr: bifoldr,
  5181. Bifoldable: Bifoldable,
  5182. bifoldrDefault: bifoldrDefault,
  5183. bifoldlDefault: bifoldlDefault,
  5184. bifoldMapDefaultR: bifoldMapDefaultR,
  5185. bifoldMapDefaultL: bifoldMapDefaultL,
  5186. bifold: bifold,
  5187. bitraverse_: bitraverse_,
  5188. bifor_: bifor_,
  5189. bisequence_: bisequence_,
  5190. biany: biany,
  5191. biall: biall,
  5192. bifoldableClown: bifoldableClown,
  5193. bifoldableJoker: bifoldableJoker,
  5194. bifoldableFlip: bifoldableFlip,
  5195. bifoldableProduct: bifoldableProduct,
  5196. bifoldableWrap: bifoldableWrap
  5197. };
  5198. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Bifunctor/index.js":[function(require,module,exports) {
  5199. // Generated by purs version 0.13.6
  5200. "use strict";
  5201. var Control_Category = require("../Control.Category/index.js");
  5202. var Bifunctor = function Bifunctor(bimap) {
  5203. this.bimap = bimap;
  5204. };
  5205. var bimap = function bimap(dict) {
  5206. return dict.bimap;
  5207. };
  5208. var lmap = function lmap(dictBifunctor) {
  5209. return function (f) {
  5210. return bimap(dictBifunctor)(f)(Control_Category.identity(Control_Category.categoryFn));
  5211. };
  5212. };
  5213. var rmap = function rmap(dictBifunctor) {
  5214. return bimap(dictBifunctor)(Control_Category.identity(Control_Category.categoryFn));
  5215. };
  5216. module.exports = {
  5217. bimap: bimap,
  5218. Bifunctor: Bifunctor,
  5219. lmap: lmap,
  5220. rmap: rmap
  5221. };
  5222. },{"../Control.Category/index.js":"../output/Control.Category/index.js"}],"../output/Control.Biapplicative/index.js":[function(require,module,exports) {
  5223. // Generated by purs version 0.13.6
  5224. "use strict";
  5225. var Biapplicative = function Biapplicative(Biapply0, bipure) {
  5226. this.Biapply0 = Biapply0;
  5227. this.bipure = bipure;
  5228. };
  5229. var bipure = function bipure(dict) {
  5230. return dict.bipure;
  5231. };
  5232. module.exports = {
  5233. bipure: bipure,
  5234. Biapplicative: Biapplicative
  5235. };
  5236. },{}],"../output/Control.Biapply/index.js":[function(require,module,exports) {
  5237. // Generated by purs version 0.13.6
  5238. "use strict";
  5239. var Control_Category = require("../Control.Category/index.js");
  5240. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5241. var Data_Function = require("../Data.Function/index.js");
  5242. var Biapply = function Biapply(Bifunctor0, biapply) {
  5243. this.Bifunctor0 = Bifunctor0;
  5244. this.biapply = biapply;
  5245. };
  5246. var biapply = function biapply(dict) {
  5247. return dict.biapply;
  5248. };
  5249. var biapplyFirst = function biapplyFirst(dictBiapply) {
  5250. return function (a) {
  5251. return function (b) {
  5252. return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn))))(a))(b);
  5253. };
  5254. };
  5255. };
  5256. var biapplySecond = function biapplySecond(dictBiapply) {
  5257. return function (a) {
  5258. return function (b) {
  5259. return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"])(Data_Function["const"]))(a))(b);
  5260. };
  5261. };
  5262. };
  5263. var bilift2 = function bilift2(dictBiapply) {
  5264. return function (f) {
  5265. return function (g) {
  5266. return function (a) {
  5267. return function (b) {
  5268. return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b);
  5269. };
  5270. };
  5271. };
  5272. };
  5273. };
  5274. var bilift3 = function bilift3(dictBiapply) {
  5275. return function (f) {
  5276. return function (g) {
  5277. return function (a) {
  5278. return function (b) {
  5279. return function (c) {
  5280. return biapply(dictBiapply)(biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b))(c);
  5281. };
  5282. };
  5283. };
  5284. };
  5285. };
  5286. };
  5287. module.exports = {
  5288. biapply: biapply,
  5289. Biapply: Biapply,
  5290. biapplyFirst: biapplyFirst,
  5291. biapplySecond: biapplySecond,
  5292. bilift2: bilift2,
  5293. bilift3: bilift3
  5294. };
  5295. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Function/index.js":"../output/Data.Function/index.js"}],"../output/Data.Bifunctor.Clown/index.js":[function(require,module,exports) {
  5296. // Generated by purs version 0.13.6
  5297. "use strict";
  5298. var Control_Applicative = require("../Control.Applicative/index.js");
  5299. var Control_Apply = require("../Control.Apply/index.js");
  5300. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5301. var Control_Biapply = require("../Control.Biapply/index.js");
  5302. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5303. var Data_Functor = require("../Data.Functor/index.js");
  5304. var Data_Newtype = require("../Data.Newtype/index.js");
  5305. var Data_Show = require("../Data.Show/index.js");
  5306. var Clown = function Clown(x) {
  5307. return x;
  5308. };
  5309. var showClown = function showClown(dictShow) {
  5310. return new Data_Show.Show(function (v) {
  5311. return "(Clown " + (Data_Show.show(dictShow)(v) + ")");
  5312. });
  5313. };
  5314. var ordClown = function ordClown(dictOrd) {
  5315. return dictOrd;
  5316. };
  5317. var newtypeClown = new Data_Newtype.Newtype(function (n) {
  5318. return n;
  5319. }, Clown);
  5320. var functorClown = new Data_Functor.Functor(function (v) {
  5321. return function (v1) {
  5322. return v1;
  5323. };
  5324. });
  5325. var eqClown = function eqClown(dictEq) {
  5326. return dictEq;
  5327. };
  5328. var bifunctorClown = function bifunctorClown(dictFunctor) {
  5329. return new Data_Bifunctor.Bifunctor(function (f) {
  5330. return function (v) {
  5331. return function (v1) {
  5332. return Data_Functor.map(dictFunctor)(f)(v1);
  5333. };
  5334. };
  5335. });
  5336. };
  5337. var biapplyClown = function biapplyClown(dictApply) {
  5338. return new Control_Biapply.Biapply(function () {
  5339. return bifunctorClown(dictApply.Functor0());
  5340. }, function (v) {
  5341. return function (v1) {
  5342. return Control_Apply.apply(dictApply)(v)(v1);
  5343. };
  5344. });
  5345. };
  5346. var biapplicativeClown = function biapplicativeClown(dictApplicative) {
  5347. return new Control_Biapplicative.Biapplicative(function () {
  5348. return biapplyClown(dictApplicative.Apply0());
  5349. }, function (a) {
  5350. return function (v) {
  5351. return Control_Applicative.pure(dictApplicative)(a);
  5352. };
  5353. });
  5354. };
  5355. module.exports = {
  5356. Clown: Clown,
  5357. newtypeClown: newtypeClown,
  5358. eqClown: eqClown,
  5359. ordClown: ordClown,
  5360. showClown: showClown,
  5361. functorClown: functorClown,
  5362. bifunctorClown: bifunctorClown,
  5363. biapplyClown: biapplyClown,
  5364. biapplicativeClown: biapplicativeClown
  5365. };
  5366. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Flip/index.js":[function(require,module,exports) {
  5367. // Generated by purs version 0.13.6
  5368. "use strict";
  5369. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5370. var Control_Biapply = require("../Control.Biapply/index.js");
  5371. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5372. var Data_Functor = require("../Data.Functor/index.js");
  5373. var Data_Newtype = require("../Data.Newtype/index.js");
  5374. var Data_Show = require("../Data.Show/index.js");
  5375. var Flip = function Flip(x) {
  5376. return x;
  5377. };
  5378. var showFlip = function showFlip(dictShow) {
  5379. return new Data_Show.Show(function (v) {
  5380. return "(Flip " + (Data_Show.show(dictShow)(v) + ")");
  5381. });
  5382. };
  5383. var ordFlip = function ordFlip(dictOrd) {
  5384. return dictOrd;
  5385. };
  5386. var newtypeFlip = new Data_Newtype.Newtype(function (n) {
  5387. return n;
  5388. }, Flip);
  5389. var functorFlip = function functorFlip(dictBifunctor) {
  5390. return new Data_Functor.Functor(function (f) {
  5391. return function (v) {
  5392. return Data_Bifunctor.lmap(dictBifunctor)(f)(v);
  5393. };
  5394. });
  5395. };
  5396. var eqFlip = function eqFlip(dictEq) {
  5397. return dictEq;
  5398. };
  5399. var bifunctorFlip = function bifunctorFlip(dictBifunctor) {
  5400. return new Data_Bifunctor.Bifunctor(function (f) {
  5401. return function (g) {
  5402. return function (v) {
  5403. return Data_Bifunctor.bimap(dictBifunctor)(g)(f)(v);
  5404. };
  5405. };
  5406. });
  5407. };
  5408. var biapplyFlip = function biapplyFlip(dictBiapply) {
  5409. return new Control_Biapply.Biapply(function () {
  5410. return bifunctorFlip(dictBiapply.Bifunctor0());
  5411. }, function (v) {
  5412. return function (v1) {
  5413. return Control_Biapply.biapply(dictBiapply)(v)(v1);
  5414. };
  5415. });
  5416. };
  5417. var biapplicativeFlip = function biapplicativeFlip(dictBiapplicative) {
  5418. return new Control_Biapplicative.Biapplicative(function () {
  5419. return biapplyFlip(dictBiapplicative.Biapply0());
  5420. }, function (a) {
  5421. return function (b) {
  5422. return Control_Biapplicative.bipure(dictBiapplicative)(b)(a);
  5423. };
  5424. });
  5425. };
  5426. module.exports = {
  5427. Flip: Flip,
  5428. newtypeFlip: newtypeFlip,
  5429. eqFlip: eqFlip,
  5430. ordFlip: ordFlip,
  5431. showFlip: showFlip,
  5432. functorFlip: functorFlip,
  5433. bifunctorFlip: bifunctorFlip,
  5434. biapplyFlip: biapplyFlip,
  5435. biapplicativeFlip: biapplicativeFlip
  5436. };
  5437. },{"../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Joker/index.js":[function(require,module,exports) {
  5438. // Generated by purs version 0.13.6
  5439. "use strict";
  5440. var Control_Applicative = require("../Control.Applicative/index.js");
  5441. var Control_Apply = require("../Control.Apply/index.js");
  5442. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5443. var Control_Biapply = require("../Control.Biapply/index.js");
  5444. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5445. var Data_Functor = require("../Data.Functor/index.js");
  5446. var Data_Newtype = require("../Data.Newtype/index.js");
  5447. var Data_Show = require("../Data.Show/index.js");
  5448. var Joker = function Joker(x) {
  5449. return x;
  5450. };
  5451. var showJoker = function showJoker(dictShow) {
  5452. return new Data_Show.Show(function (v) {
  5453. return "(Joker " + (Data_Show.show(dictShow)(v) + ")");
  5454. });
  5455. };
  5456. var ordJoker = function ordJoker(dictOrd) {
  5457. return dictOrd;
  5458. };
  5459. var newtypeJoker = new Data_Newtype.Newtype(function (n) {
  5460. return n;
  5461. }, Joker);
  5462. var functorJoker = function functorJoker(dictFunctor) {
  5463. return new Data_Functor.Functor(function (g) {
  5464. return function (v) {
  5465. return Data_Functor.map(dictFunctor)(g)(v);
  5466. };
  5467. });
  5468. };
  5469. var eqJoker = function eqJoker(dictEq) {
  5470. return dictEq;
  5471. };
  5472. var bifunctorJoker = function bifunctorJoker(dictFunctor) {
  5473. return new Data_Bifunctor.Bifunctor(function (v) {
  5474. return function (g) {
  5475. return function (v1) {
  5476. return Data_Functor.map(dictFunctor)(g)(v1);
  5477. };
  5478. };
  5479. });
  5480. };
  5481. var biapplyJoker = function biapplyJoker(dictApply) {
  5482. return new Control_Biapply.Biapply(function () {
  5483. return bifunctorJoker(dictApply.Functor0());
  5484. }, function (v) {
  5485. return function (v1) {
  5486. return Control_Apply.apply(dictApply)(v)(v1);
  5487. };
  5488. });
  5489. };
  5490. var biapplicativeJoker = function biapplicativeJoker(dictApplicative) {
  5491. return new Control_Biapplicative.Biapplicative(function () {
  5492. return biapplyJoker(dictApplicative.Apply0());
  5493. }, function (v) {
  5494. return function (b) {
  5495. return Control_Applicative.pure(dictApplicative)(b);
  5496. };
  5497. });
  5498. };
  5499. module.exports = {
  5500. Joker: Joker,
  5501. newtypeJoker: newtypeJoker,
  5502. eqJoker: eqJoker,
  5503. ordJoker: ordJoker,
  5504. showJoker: showJoker,
  5505. functorJoker: functorJoker,
  5506. bifunctorJoker: bifunctorJoker,
  5507. biapplyJoker: biapplyJoker,
  5508. biapplicativeJoker: biapplicativeJoker
  5509. };
  5510. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Product/index.js":[function(require,module,exports) {
  5511. // Generated by purs version 0.13.6
  5512. "use strict";
  5513. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5514. var Control_Biapply = require("../Control.Biapply/index.js");
  5515. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5516. var Data_Eq = require("../Data.Eq/index.js");
  5517. var Data_Ord = require("../Data.Ord/index.js");
  5518. var Data_Ordering = require("../Data.Ordering/index.js");
  5519. var Data_Show = require("../Data.Show/index.js");
  5520. var Product = function () {
  5521. function Product(value0, value1) {
  5522. this.value0 = value0;
  5523. this.value1 = value1;
  5524. }
  5525. ;
  5526. Product.create = function (value0) {
  5527. return function (value1) {
  5528. return new Product(value0, value1);
  5529. };
  5530. };
  5531. return Product;
  5532. }();
  5533. var showProduct = function showProduct(dictShow) {
  5534. return function (dictShow1) {
  5535. return new Data_Show.Show(function (v) {
  5536. return "(Product " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
  5537. });
  5538. };
  5539. };
  5540. var eqProduct = function eqProduct(dictEq) {
  5541. return function (dictEq1) {
  5542. return new Data_Eq.Eq(function (x) {
  5543. return function (y) {
  5544. return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1);
  5545. };
  5546. });
  5547. };
  5548. };
  5549. var ordProduct = function ordProduct(dictOrd) {
  5550. return function (dictOrd1) {
  5551. return new Data_Ord.Ord(function () {
  5552. return eqProduct(dictOrd.Eq0())(dictOrd1.Eq0());
  5553. }, function (x) {
  5554. return function (y) {
  5555. var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  5556. if (v instanceof Data_Ordering.LT) {
  5557. return Data_Ordering.LT.value;
  5558. }
  5559. ;
  5560. if (v instanceof Data_Ordering.GT) {
  5561. return Data_Ordering.GT.value;
  5562. }
  5563. ;
  5564. return Data_Ord.compare(dictOrd1)(x.value1)(y.value1);
  5565. };
  5566. });
  5567. };
  5568. };
  5569. var bifunctorProduct = function bifunctorProduct(dictBifunctor) {
  5570. return function (dictBifunctor1) {
  5571. return new Data_Bifunctor.Bifunctor(function (f) {
  5572. return function (g) {
  5573. return function (v) {
  5574. return new Product(Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v.value0), Data_Bifunctor.bimap(dictBifunctor1)(f)(g)(v.value1));
  5575. };
  5576. };
  5577. });
  5578. };
  5579. };
  5580. var biapplyProduct = function biapplyProduct(dictBiapply) {
  5581. return function (dictBiapply1) {
  5582. return new Control_Biapply.Biapply(function () {
  5583. return bifunctorProduct(dictBiapply.Bifunctor0())(dictBiapply1.Bifunctor0());
  5584. }, function (v) {
  5585. return function (v1) {
  5586. return new Product(Control_Biapply.biapply(dictBiapply)(v.value0)(v1.value0), Control_Biapply.biapply(dictBiapply1)(v.value1)(v1.value1));
  5587. };
  5588. });
  5589. };
  5590. };
  5591. var biapplicativeProduct = function biapplicativeProduct(dictBiapplicative) {
  5592. return function (dictBiapplicative1) {
  5593. return new Control_Biapplicative.Biapplicative(function () {
  5594. return biapplyProduct(dictBiapplicative.Biapply0())(dictBiapplicative1.Biapply0());
  5595. }, function (a) {
  5596. return function (b) {
  5597. return new Product(Control_Biapplicative.bipure(dictBiapplicative)(a)(b), Control_Biapplicative.bipure(dictBiapplicative1)(a)(b));
  5598. };
  5599. });
  5600. };
  5601. };
  5602. module.exports = {
  5603. Product: Product,
  5604. eqProduct: eqProduct,
  5605. ordProduct: ordProduct,
  5606. showProduct: showProduct,
  5607. bifunctorProduct: bifunctorProduct,
  5608. biapplyProduct: biapplyProduct,
  5609. biapplicativeProduct: biapplicativeProduct
  5610. };
  5611. },{"../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Wrap/index.js":[function(require,module,exports) {
  5612. // Generated by purs version 0.13.6
  5613. "use strict";
  5614. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5615. var Control_Biapply = require("../Control.Biapply/index.js");
  5616. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5617. var Data_Functor = require("../Data.Functor/index.js");
  5618. var Data_Newtype = require("../Data.Newtype/index.js");
  5619. var Data_Show = require("../Data.Show/index.js");
  5620. var Wrap = function Wrap(x) {
  5621. return x;
  5622. };
  5623. var showWrap = function showWrap(dictShow) {
  5624. return new Data_Show.Show(function (v) {
  5625. return "(Wrap " + (Data_Show.show(dictShow)(v) + ")");
  5626. });
  5627. };
  5628. var ordWrap = function ordWrap(dictOrd) {
  5629. return dictOrd;
  5630. };
  5631. var newtypeWrap = new Data_Newtype.Newtype(function (n) {
  5632. return n;
  5633. }, Wrap);
  5634. var functorWrap = function functorWrap(dictBifunctor) {
  5635. return new Data_Functor.Functor(function (f) {
  5636. return function (v) {
  5637. return Data_Bifunctor.rmap(dictBifunctor)(f)(v);
  5638. };
  5639. });
  5640. };
  5641. var eqWrap = function eqWrap(dictEq) {
  5642. return dictEq;
  5643. };
  5644. var bifunctorWrap = function bifunctorWrap(dictBifunctor) {
  5645. return new Data_Bifunctor.Bifunctor(function (f) {
  5646. return function (g) {
  5647. return function (v) {
  5648. return Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v);
  5649. };
  5650. };
  5651. });
  5652. };
  5653. var biapplyWrap = function biapplyWrap(dictBiapply) {
  5654. return new Control_Biapply.Biapply(function () {
  5655. return bifunctorWrap(dictBiapply.Bifunctor0());
  5656. }, function (v) {
  5657. return function (v1) {
  5658. return Control_Biapply.biapply(dictBiapply)(v)(v1);
  5659. };
  5660. });
  5661. };
  5662. var biapplicativeWrap = function biapplicativeWrap(dictBiapplicative) {
  5663. return new Control_Biapplicative.Biapplicative(function () {
  5664. return biapplyWrap(dictBiapplicative.Biapply0());
  5665. }, function (a) {
  5666. return function (b) {
  5667. return Control_Biapplicative.bipure(dictBiapplicative)(a)(b);
  5668. };
  5669. });
  5670. };
  5671. module.exports = {
  5672. Wrap: Wrap,
  5673. newtypeWrap: newtypeWrap,
  5674. eqWrap: eqWrap,
  5675. ordWrap: ordWrap,
  5676. showWrap: showWrap,
  5677. functorWrap: functorWrap,
  5678. bifunctorWrap: bifunctorWrap,
  5679. biapplyWrap: biapplyWrap,
  5680. biapplicativeWrap: biapplicativeWrap
  5681. };
  5682. },{"../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Traversable/foreign.js":[function(require,module,exports) {
  5683. "use strict"; // jshint maxparams: 3
  5684. exports.traverseArrayImpl = function () {
  5685. function array1(a) {
  5686. return [a];
  5687. }
  5688. function array2(a) {
  5689. return function (b) {
  5690. return [a, b];
  5691. };
  5692. }
  5693. function array3(a) {
  5694. return function (b) {
  5695. return function (c) {
  5696. return [a, b, c];
  5697. };
  5698. };
  5699. }
  5700. function concat2(xs) {
  5701. return function (ys) {
  5702. return xs.concat(ys);
  5703. };
  5704. }
  5705. return function (apply) {
  5706. return function (map) {
  5707. return function (pure) {
  5708. return function (f) {
  5709. return function (array) {
  5710. function go(bot, top) {
  5711. switch (top - bot) {
  5712. case 0:
  5713. return pure([]);
  5714. case 1:
  5715. return map(array1)(f(array[bot]));
  5716. case 2:
  5717. return apply(map(array2)(f(array[bot])))(f(array[bot + 1]));
  5718. case 3:
  5719. return apply(apply(map(array3)(f(array[bot])))(f(array[bot + 1])))(f(array[bot + 2]));
  5720. default:
  5721. // This slightly tricky pivot selection aims to produce two
  5722. // even-length partitions where possible.
  5723. var pivot = bot + Math.floor((top - bot) / 4) * 2;
  5724. return apply(map(concat2)(go(bot, pivot)))(go(pivot, top));
  5725. }
  5726. }
  5727. return go(0, array.length);
  5728. };
  5729. };
  5730. };
  5731. };
  5732. };
  5733. }();
  5734. },{}],"../output/Data.Maybe.First/index.js":[function(require,module,exports) {
  5735. // Generated by purs version 0.13.6
  5736. "use strict";
  5737. var Control_Alt = require("../Control.Alt/index.js");
  5738. var Control_Alternative = require("../Control.Alternative/index.js");
  5739. var Control_MonadZero = require("../Control.MonadZero/index.js");
  5740. var Control_Plus = require("../Control.Plus/index.js");
  5741. var Data_Maybe = require("../Data.Maybe/index.js");
  5742. var Data_Monoid = require("../Data.Monoid/index.js");
  5743. var Data_Newtype = require("../Data.Newtype/index.js");
  5744. var Data_Semigroup = require("../Data.Semigroup/index.js");
  5745. var Data_Show = require("../Data.Show/index.js");
  5746. var First = function First(x) {
  5747. return x;
  5748. };
  5749. var showFirst = function showFirst(dictShow) {
  5750. return new Data_Show.Show(function (v) {
  5751. return "First (" + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
  5752. });
  5753. };
  5754. var semigroupFirst = new Data_Semigroup.Semigroup(function (v) {
  5755. return function (v1) {
  5756. if (v instanceof Data_Maybe.Just) {
  5757. return v;
  5758. }
  5759. ;
  5760. return v1;
  5761. };
  5762. });
  5763. var ordFirst = function ordFirst(dictOrd) {
  5764. return Data_Maybe.ordMaybe(dictOrd);
  5765. };
  5766. var ord1First = Data_Maybe.ord1Maybe;
  5767. var newtypeFirst = new Data_Newtype.Newtype(function (n) {
  5768. return n;
  5769. }, First);
  5770. var monoidFirst = new Data_Monoid.Monoid(function () {
  5771. return semigroupFirst;
  5772. }, Data_Maybe.Nothing.value);
  5773. var monadFirst = Data_Maybe.monadMaybe;
  5774. var invariantFirst = Data_Maybe.invariantMaybe;
  5775. var functorFirst = Data_Maybe.functorMaybe;
  5776. var extendFirst = Data_Maybe.extendMaybe;
  5777. var eqFirst = function eqFirst(dictEq) {
  5778. return Data_Maybe.eqMaybe(dictEq);
  5779. };
  5780. var eq1First = Data_Maybe.eq1Maybe;
  5781. var boundedFirst = function boundedFirst(dictBounded) {
  5782. return Data_Maybe.boundedMaybe(dictBounded);
  5783. };
  5784. var bindFirst = Data_Maybe.bindMaybe;
  5785. var applyFirst = Data_Maybe.applyMaybe;
  5786. var applicativeFirst = Data_Maybe.applicativeMaybe;
  5787. var altFirst = new Control_Alt.Alt(function () {
  5788. return functorFirst;
  5789. }, Data_Semigroup.append(semigroupFirst));
  5790. var plusFirst = new Control_Plus.Plus(function () {
  5791. return altFirst;
  5792. }, Data_Monoid.mempty(monoidFirst));
  5793. var alternativeFirst = new Control_Alternative.Alternative(function () {
  5794. return applicativeFirst;
  5795. }, function () {
  5796. return plusFirst;
  5797. });
  5798. var monadZeroFirst = new Control_MonadZero.MonadZero(function () {
  5799. return alternativeFirst;
  5800. }, function () {
  5801. return monadFirst;
  5802. });
  5803. module.exports = {
  5804. First: First,
  5805. newtypeFirst: newtypeFirst,
  5806. eqFirst: eqFirst,
  5807. eq1First: eq1First,
  5808. ordFirst: ordFirst,
  5809. ord1First: ord1First,
  5810. boundedFirst: boundedFirst,
  5811. functorFirst: functorFirst,
  5812. invariantFirst: invariantFirst,
  5813. applyFirst: applyFirst,
  5814. applicativeFirst: applicativeFirst,
  5815. bindFirst: bindFirst,
  5816. monadFirst: monadFirst,
  5817. extendFirst: extendFirst,
  5818. showFirst: showFirst,
  5819. semigroupFirst: semigroupFirst,
  5820. monoidFirst: monoidFirst,
  5821. altFirst: altFirst,
  5822. plusFirst: plusFirst,
  5823. alternativeFirst: alternativeFirst,
  5824. monadZeroFirst: monadZeroFirst
  5825. };
  5826. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Maybe.Last/index.js":[function(require,module,exports) {
  5827. // Generated by purs version 0.13.6
  5828. "use strict";
  5829. var Control_Alt = require("../Control.Alt/index.js");
  5830. var Control_Alternative = require("../Control.Alternative/index.js");
  5831. var Control_MonadZero = require("../Control.MonadZero/index.js");
  5832. var Control_Plus = require("../Control.Plus/index.js");
  5833. var Data_Maybe = require("../Data.Maybe/index.js");
  5834. var Data_Monoid = require("../Data.Monoid/index.js");
  5835. var Data_Newtype = require("../Data.Newtype/index.js");
  5836. var Data_Semigroup = require("../Data.Semigroup/index.js");
  5837. var Data_Show = require("../Data.Show/index.js");
  5838. var Last = function Last(x) {
  5839. return x;
  5840. };
  5841. var showLast = function showLast(dictShow) {
  5842. return new Data_Show.Show(function (v) {
  5843. return "(Last " + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
  5844. });
  5845. };
  5846. var semigroupLast = new Data_Semigroup.Semigroup(function (v) {
  5847. return function (v1) {
  5848. if (v1 instanceof Data_Maybe.Just) {
  5849. return v1;
  5850. }
  5851. ;
  5852. if (v1 instanceof Data_Maybe.Nothing) {
  5853. return v;
  5854. }
  5855. ;
  5856. throw new Error("Failed pattern match at Data.Maybe.Last (line 52, column 1 - line 54, column 36): " + [v.constructor.name, v1.constructor.name]);
  5857. };
  5858. });
  5859. var ordLast = function ordLast(dictOrd) {
  5860. return Data_Maybe.ordMaybe(dictOrd);
  5861. };
  5862. var ord1Last = Data_Maybe.ord1Maybe;
  5863. var newtypeLast = new Data_Newtype.Newtype(function (n) {
  5864. return n;
  5865. }, Last);
  5866. var monoidLast = new Data_Monoid.Monoid(function () {
  5867. return semigroupLast;
  5868. }, Data_Maybe.Nothing.value);
  5869. var monadLast = Data_Maybe.monadMaybe;
  5870. var invariantLast = Data_Maybe.invariantMaybe;
  5871. var functorLast = Data_Maybe.functorMaybe;
  5872. var extendLast = Data_Maybe.extendMaybe;
  5873. var eqLast = function eqLast(dictEq) {
  5874. return Data_Maybe.eqMaybe(dictEq);
  5875. };
  5876. var eq1Last = Data_Maybe.eq1Maybe;
  5877. var boundedLast = function boundedLast(dictBounded) {
  5878. return Data_Maybe.boundedMaybe(dictBounded);
  5879. };
  5880. var bindLast = Data_Maybe.bindMaybe;
  5881. var applyLast = Data_Maybe.applyMaybe;
  5882. var applicativeLast = Data_Maybe.applicativeMaybe;
  5883. var altLast = new Control_Alt.Alt(function () {
  5884. return functorLast;
  5885. }, Data_Semigroup.append(semigroupLast));
  5886. var plusLast = new Control_Plus.Plus(function () {
  5887. return altLast;
  5888. }, Data_Monoid.mempty(monoidLast));
  5889. var alternativeLast = new Control_Alternative.Alternative(function () {
  5890. return applicativeLast;
  5891. }, function () {
  5892. return plusLast;
  5893. });
  5894. var monadZeroLast = new Control_MonadZero.MonadZero(function () {
  5895. return alternativeLast;
  5896. }, function () {
  5897. return monadLast;
  5898. });
  5899. module.exports = {
  5900. Last: Last,
  5901. newtypeLast: newtypeLast,
  5902. eqLast: eqLast,
  5903. eq1Last: eq1Last,
  5904. ordLast: ordLast,
  5905. ord1Last: ord1Last,
  5906. boundedLast: boundedLast,
  5907. functorLast: functorLast,
  5908. invariantLast: invariantLast,
  5909. applyLast: applyLast,
  5910. applicativeLast: applicativeLast,
  5911. bindLast: bindLast,
  5912. monadLast: monadLast,
  5913. extendLast: extendLast,
  5914. showLast: showLast,
  5915. semigroupLast: semigroupLast,
  5916. monoidLast: monoidLast,
  5917. altLast: altLast,
  5918. plusLast: plusLast,
  5919. alternativeLast: alternativeLast,
  5920. monadZeroLast: monadZeroLast
  5921. };
  5922. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Traversable.Accum.Internal/index.js":[function(require,module,exports) {
  5923. // Generated by purs version 0.13.6
  5924. "use strict";
  5925. var Control_Applicative = require("../Control.Applicative/index.js");
  5926. var Control_Apply = require("../Control.Apply/index.js");
  5927. var Data_Functor = require("../Data.Functor/index.js");
  5928. var StateR = function StateR(x) {
  5929. return x;
  5930. };
  5931. var StateL = function StateL(x) {
  5932. return x;
  5933. };
  5934. var stateR = function stateR(v) {
  5935. return v;
  5936. };
  5937. var stateL = function stateL(v) {
  5938. return v;
  5939. };
  5940. var functorStateR = new Data_Functor.Functor(function (f) {
  5941. return function (k) {
  5942. return function (s) {
  5943. var v = stateR(k)(s);
  5944. return {
  5945. accum: v.accum,
  5946. value: f(v.value)
  5947. };
  5948. };
  5949. };
  5950. });
  5951. var functorStateL = new Data_Functor.Functor(function (f) {
  5952. return function (k) {
  5953. return function (s) {
  5954. var v = stateL(k)(s);
  5955. return {
  5956. accum: v.accum,
  5957. value: f(v.value)
  5958. };
  5959. };
  5960. };
  5961. });
  5962. var applyStateR = new Control_Apply.Apply(function () {
  5963. return functorStateR;
  5964. }, function (f) {
  5965. return function (x) {
  5966. return function (s) {
  5967. var v = stateR(x)(s);
  5968. var v1 = stateR(f)(v.accum);
  5969. return {
  5970. accum: v1.accum,
  5971. value: v1.value(v.value)
  5972. };
  5973. };
  5974. };
  5975. });
  5976. var applyStateL = new Control_Apply.Apply(function () {
  5977. return functorStateL;
  5978. }, function (f) {
  5979. return function (x) {
  5980. return function (s) {
  5981. var v = stateL(f)(s);
  5982. var v1 = stateL(x)(v.accum);
  5983. return {
  5984. accum: v1.accum,
  5985. value: v.value(v1.value)
  5986. };
  5987. };
  5988. };
  5989. });
  5990. var applicativeStateR = new Control_Applicative.Applicative(function () {
  5991. return applyStateR;
  5992. }, function (a) {
  5993. return function (s) {
  5994. return {
  5995. accum: s,
  5996. value: a
  5997. };
  5998. };
  5999. });
  6000. var applicativeStateL = new Control_Applicative.Applicative(function () {
  6001. return applyStateL;
  6002. }, function (a) {
  6003. return function (s) {
  6004. return {
  6005. accum: s,
  6006. value: a
  6007. };
  6008. };
  6009. });
  6010. module.exports = {
  6011. StateL: StateL,
  6012. stateL: stateL,
  6013. StateR: StateR,
  6014. stateR: stateR,
  6015. functorStateL: functorStateL,
  6016. applyStateL: applyStateL,
  6017. applicativeStateL: applicativeStateL,
  6018. functorStateR: functorStateR,
  6019. applyStateR: applyStateR,
  6020. applicativeStateR: applicativeStateR
  6021. };
  6022. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Data.Traversable/index.js":[function(require,module,exports) {
  6023. // Generated by purs version 0.13.6
  6024. "use strict";
  6025. var $foreign = require("./foreign.js");
  6026. var Control_Applicative = require("../Control.Applicative/index.js");
  6027. var Control_Apply = require("../Control.Apply/index.js");
  6028. var Control_Category = require("../Control.Category/index.js");
  6029. var Data_Foldable = require("../Data.Foldable/index.js");
  6030. var Data_Functor = require("../Data.Functor/index.js");
  6031. var Data_Maybe = require("../Data.Maybe/index.js");
  6032. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  6033. var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
  6034. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  6035. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  6036. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  6037. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  6038. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  6039. var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js");
  6040. var Traversable = function Traversable(Foldable1, Functor0, sequence, traverse) {
  6041. this.Foldable1 = Foldable1;
  6042. this.Functor0 = Functor0;
  6043. this.sequence = sequence;
  6044. this.traverse = traverse;
  6045. };
  6046. var traverse = function traverse(dict) {
  6047. return dict.traverse;
  6048. };
  6049. var traversableMultiplicative = new Traversable(function () {
  6050. return Data_Foldable.foldableMultiplicative;
  6051. }, function () {
  6052. return Data_Monoid_Multiplicative.functorMultiplicative;
  6053. }, function (dictApplicative) {
  6054. return function (v) {
  6055. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(v);
  6056. };
  6057. }, function (dictApplicative) {
  6058. return function (f) {
  6059. return function (v) {
  6060. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v));
  6061. };
  6062. };
  6063. });
  6064. var traversableMaybe = new Traversable(function () {
  6065. return Data_Foldable.foldableMaybe;
  6066. }, function () {
  6067. return Data_Maybe.functorMaybe;
  6068. }, function (dictApplicative) {
  6069. return function (v) {
  6070. if (v instanceof Data_Maybe.Nothing) {
  6071. return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value);
  6072. }
  6073. ;
  6074. if (v instanceof Data_Maybe.Just) {
  6075. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v.value0);
  6076. }
  6077. ;
  6078. throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name]);
  6079. };
  6080. }, function (dictApplicative) {
  6081. return function (v) {
  6082. return function (v1) {
  6083. if (v1 instanceof Data_Maybe.Nothing) {
  6084. return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value);
  6085. }
  6086. ;
  6087. if (v1 instanceof Data_Maybe.Just) {
  6088. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v(v1.value0));
  6089. }
  6090. ;
  6091. throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name, v1.constructor.name]);
  6092. };
  6093. };
  6094. });
  6095. var traversableDual = new Traversable(function () {
  6096. return Data_Foldable.foldableDual;
  6097. }, function () {
  6098. return Data_Monoid_Dual.functorDual;
  6099. }, function (dictApplicative) {
  6100. return function (v) {
  6101. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(v);
  6102. };
  6103. }, function (dictApplicative) {
  6104. return function (f) {
  6105. return function (v) {
  6106. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(f(v));
  6107. };
  6108. };
  6109. });
  6110. var traversableDisj = new Traversable(function () {
  6111. return Data_Foldable.foldableDisj;
  6112. }, function () {
  6113. return Data_Monoid_Disj.functorDisj;
  6114. }, function (dictApplicative) {
  6115. return function (v) {
  6116. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(v);
  6117. };
  6118. }, function (dictApplicative) {
  6119. return function (f) {
  6120. return function (v) {
  6121. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(f(v));
  6122. };
  6123. };
  6124. });
  6125. var traversableConj = new Traversable(function () {
  6126. return Data_Foldable.foldableConj;
  6127. }, function () {
  6128. return Data_Monoid_Conj.functorConj;
  6129. }, function (dictApplicative) {
  6130. return function (v) {
  6131. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(v);
  6132. };
  6133. }, function (dictApplicative) {
  6134. return function (f) {
  6135. return function (v) {
  6136. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(f(v));
  6137. };
  6138. };
  6139. });
  6140. var traversableAdditive = new Traversable(function () {
  6141. return Data_Foldable.foldableAdditive;
  6142. }, function () {
  6143. return Data_Monoid_Additive.functorAdditive;
  6144. }, function (dictApplicative) {
  6145. return function (v) {
  6146. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(v);
  6147. };
  6148. }, function (dictApplicative) {
  6149. return function (f) {
  6150. return function (v) {
  6151. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(f(v));
  6152. };
  6153. };
  6154. });
  6155. var sequenceDefault = function sequenceDefault(dictTraversable) {
  6156. return function (dictApplicative) {
  6157. return traverse(dictTraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  6158. };
  6159. };
  6160. var traversableArray = new Traversable(function () {
  6161. return Data_Foldable.foldableArray;
  6162. }, function () {
  6163. return Data_Functor.functorArray;
  6164. }, function (dictApplicative) {
  6165. return sequenceDefault(traversableArray)(dictApplicative);
  6166. }, function (dictApplicative) {
  6167. return $foreign.traverseArrayImpl(Control_Apply.apply(dictApplicative.Apply0()))(Data_Functor.map(dictApplicative.Apply0().Functor0()))(Control_Applicative.pure(dictApplicative));
  6168. });
  6169. var sequence = function sequence(dict) {
  6170. return dict.sequence;
  6171. };
  6172. var traversableFirst = new Traversable(function () {
  6173. return Data_Foldable.foldableFirst;
  6174. }, function () {
  6175. return Data_Maybe_First.functorFirst;
  6176. }, function (dictApplicative) {
  6177. return function (v) {
  6178. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(sequence(traversableMaybe)(dictApplicative)(v));
  6179. };
  6180. }, function (dictApplicative) {
  6181. return function (f) {
  6182. return function (v) {
  6183. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(traverse(traversableMaybe)(dictApplicative)(f)(v));
  6184. };
  6185. };
  6186. });
  6187. var traversableLast = new Traversable(function () {
  6188. return Data_Foldable.foldableLast;
  6189. }, function () {
  6190. return Data_Maybe_Last.functorLast;
  6191. }, function (dictApplicative) {
  6192. return function (v) {
  6193. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(sequence(traversableMaybe)(dictApplicative)(v));
  6194. };
  6195. }, function (dictApplicative) {
  6196. return function (f) {
  6197. return function (v) {
  6198. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(traverse(traversableMaybe)(dictApplicative)(f)(v));
  6199. };
  6200. };
  6201. });
  6202. var traverseDefault = function traverseDefault(dictTraversable) {
  6203. return function (dictApplicative) {
  6204. return function (f) {
  6205. return function (ta) {
  6206. return sequence(dictTraversable)(dictApplicative)(Data_Functor.map(dictTraversable.Functor0())(f)(ta));
  6207. };
  6208. };
  6209. };
  6210. };
  6211. var mapAccumR = function mapAccumR(dictTraversable) {
  6212. return function (f) {
  6213. return function (s0) {
  6214. return function (xs) {
  6215. return Data_Traversable_Accum_Internal.stateR(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateR)(function (a) {
  6216. return function (s) {
  6217. return f(s)(a);
  6218. };
  6219. })(xs))(s0);
  6220. };
  6221. };
  6222. };
  6223. };
  6224. var scanr = function scanr(dictTraversable) {
  6225. return function (f) {
  6226. return function (b0) {
  6227. return function (xs) {
  6228. return mapAccumR(dictTraversable)(function (b) {
  6229. return function (a) {
  6230. var b$prime = f(a)(b);
  6231. return {
  6232. accum: b$prime,
  6233. value: b$prime
  6234. };
  6235. };
  6236. })(b0)(xs).value;
  6237. };
  6238. };
  6239. };
  6240. };
  6241. var mapAccumL = function mapAccumL(dictTraversable) {
  6242. return function (f) {
  6243. return function (s0) {
  6244. return function (xs) {
  6245. return Data_Traversable_Accum_Internal.stateL(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateL)(function (a) {
  6246. return function (s) {
  6247. return f(s)(a);
  6248. };
  6249. })(xs))(s0);
  6250. };
  6251. };
  6252. };
  6253. };
  6254. var scanl = function scanl(dictTraversable) {
  6255. return function (f) {
  6256. return function (b0) {
  6257. return function (xs) {
  6258. return mapAccumL(dictTraversable)(function (b) {
  6259. return function (a) {
  6260. var b$prime = f(b)(a);
  6261. return {
  6262. accum: b$prime,
  6263. value: b$prime
  6264. };
  6265. };
  6266. })(b0)(xs).value;
  6267. };
  6268. };
  6269. };
  6270. };
  6271. var $$for = function $$for(dictApplicative) {
  6272. return function (dictTraversable) {
  6273. return function (x) {
  6274. return function (f) {
  6275. return traverse(dictTraversable)(dictApplicative)(f)(x);
  6276. };
  6277. };
  6278. };
  6279. };
  6280. module.exports = {
  6281. Traversable: Traversable,
  6282. traverse: traverse,
  6283. sequence: sequence,
  6284. traverseDefault: traverseDefault,
  6285. sequenceDefault: sequenceDefault,
  6286. "for": $$for,
  6287. scanl: scanl,
  6288. scanr: scanr,
  6289. mapAccumL: mapAccumL,
  6290. mapAccumR: mapAccumR,
  6291. traversableArray: traversableArray,
  6292. traversableMaybe: traversableMaybe,
  6293. traversableFirst: traversableFirst,
  6294. traversableLast: traversableLast,
  6295. traversableAdditive: traversableAdditive,
  6296. traversableDual: traversableDual,
  6297. traversableConj: traversableConj,
  6298. traversableDisj: traversableDisj,
  6299. traversableMultiplicative: traversableMultiplicative
  6300. };
  6301. },{"./foreign.js":"../output/Data.Traversable/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Maybe.Last/index.js":"../output/Data.Maybe.Last/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Traversable.Accum.Internal/index.js":"../output/Data.Traversable.Accum.Internal/index.js"}],"../output/Data.Bitraversable/index.js":[function(require,module,exports) {
  6302. // Generated by purs version 0.13.6
  6303. "use strict";
  6304. var Control_Applicative = require("../Control.Applicative/index.js");
  6305. var Control_Apply = require("../Control.Apply/index.js");
  6306. var Control_Category = require("../Control.Category/index.js");
  6307. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  6308. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  6309. var Data_Bifunctor_Clown = require("../Data.Bifunctor.Clown/index.js");
  6310. var Data_Bifunctor_Flip = require("../Data.Bifunctor.Flip/index.js");
  6311. var Data_Bifunctor_Joker = require("../Data.Bifunctor.Joker/index.js");
  6312. var Data_Bifunctor_Product = require("../Data.Bifunctor.Product/index.js");
  6313. var Data_Bifunctor_Wrap = require("../Data.Bifunctor.Wrap/index.js");
  6314. var Data_Functor = require("../Data.Functor/index.js");
  6315. var Data_Traversable = require("../Data.Traversable/index.js");
  6316. var Bitraversable = function Bitraversable(Bifoldable1, Bifunctor0, bisequence, bitraverse) {
  6317. this.Bifoldable1 = Bifoldable1;
  6318. this.Bifunctor0 = Bifunctor0;
  6319. this.bisequence = bisequence;
  6320. this.bitraverse = bitraverse;
  6321. };
  6322. var bitraverse = function bitraverse(dict) {
  6323. return dict.bitraverse;
  6324. };
  6325. var lfor = function lfor(dictBitraversable) {
  6326. return function (dictApplicative) {
  6327. return function (t) {
  6328. return function (f) {
  6329. return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative))(t);
  6330. };
  6331. };
  6332. };
  6333. };
  6334. var ltraverse = function ltraverse(dictBitraversable) {
  6335. return function (dictApplicative) {
  6336. return function (f) {
  6337. return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative));
  6338. };
  6339. };
  6340. };
  6341. var rfor = function rfor(dictBitraversable) {
  6342. return function (dictApplicative) {
  6343. return function (t) {
  6344. return function (f) {
  6345. return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative))(f)(t);
  6346. };
  6347. };
  6348. };
  6349. };
  6350. var rtraverse = function rtraverse(dictBitraversable) {
  6351. return function (dictApplicative) {
  6352. return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative));
  6353. };
  6354. };
  6355. var bitraversableJoker = function bitraversableJoker(dictTraversable) {
  6356. return new Bitraversable(function () {
  6357. return Data_Bifoldable.bifoldableJoker(dictTraversable.Foldable1());
  6358. }, function () {
  6359. return Data_Bifunctor_Joker.bifunctorJoker(dictTraversable.Functor0());
  6360. }, function (dictApplicative) {
  6361. return function (v) {
  6362. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v));
  6363. };
  6364. }, function (dictApplicative) {
  6365. return function (v) {
  6366. return function (r) {
  6367. return function (v1) {
  6368. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(r)(v1));
  6369. };
  6370. };
  6371. };
  6372. });
  6373. };
  6374. var bitraversableClown = function bitraversableClown(dictTraversable) {
  6375. return new Bitraversable(function () {
  6376. return Data_Bifoldable.bifoldableClown(dictTraversable.Foldable1());
  6377. }, function () {
  6378. return Data_Bifunctor_Clown.bifunctorClown(dictTraversable.Functor0());
  6379. }, function (dictApplicative) {
  6380. return function (v) {
  6381. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v));
  6382. };
  6383. }, function (dictApplicative) {
  6384. return function (l) {
  6385. return function (v) {
  6386. return function (v1) {
  6387. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(l)(v1));
  6388. };
  6389. };
  6390. };
  6391. });
  6392. };
  6393. var bisequenceDefault = function bisequenceDefault(dictBitraversable) {
  6394. return function (dictApplicative) {
  6395. return bitraverse(dictBitraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
  6396. };
  6397. };
  6398. var bisequence = function bisequence(dict) {
  6399. return dict.bisequence;
  6400. };
  6401. var bitraversableFlip = function bitraversableFlip(dictBitraversable) {
  6402. return new Bitraversable(function () {
  6403. return Data_Bifoldable.bifoldableFlip(dictBitraversable.Bifoldable1());
  6404. }, function () {
  6405. return Data_Bifunctor_Flip.bifunctorFlip(dictBitraversable.Bifunctor0());
  6406. }, function (dictApplicative) {
  6407. return function (v) {
  6408. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bisequence(dictBitraversable)(dictApplicative)(v));
  6409. };
  6410. }, function (dictApplicative) {
  6411. return function (r) {
  6412. return function (l) {
  6413. return function (v) {
  6414. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v));
  6415. };
  6416. };
  6417. };
  6418. });
  6419. };
  6420. var bitraversableProduct = function bitraversableProduct(dictBitraversable) {
  6421. return function (dictBitraversable1) {
  6422. return new Bitraversable(function () {
  6423. return Data_Bifoldable.bifoldableProduct(dictBitraversable.Bifoldable1())(dictBitraversable1.Bifoldable1());
  6424. }, function () {
  6425. return Data_Bifunctor_Product.bifunctorProduct(dictBitraversable.Bifunctor0())(dictBitraversable1.Bifunctor0());
  6426. }, function (dictApplicative) {
  6427. return function (v) {
  6428. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Product.Product.create)(bisequence(dictBitraversable)(dictApplicative)(v.value0)))(bisequence(dictBitraversable1)(dictApplicative)(v.value1));
  6429. };
  6430. }, function (dictApplicative) {
  6431. return function (l) {
  6432. return function (r) {
  6433. return function (v) {
  6434. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Product.Product.create)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v.value0)))(bitraverse(dictBitraversable1)(dictApplicative)(l)(r)(v.value1));
  6435. };
  6436. };
  6437. };
  6438. });
  6439. };
  6440. };
  6441. var bitraversableWrap = function bitraversableWrap(dictBitraversable) {
  6442. return new Bitraversable(function () {
  6443. return Data_Bifoldable.bifoldableWrap(dictBitraversable.Bifoldable1());
  6444. }, function () {
  6445. return Data_Bifunctor_Wrap.bifunctorWrap(dictBitraversable.Bifunctor0());
  6446. }, function (dictApplicative) {
  6447. return function (v) {
  6448. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bisequence(dictBitraversable)(dictApplicative)(v));
  6449. };
  6450. }, function (dictApplicative) {
  6451. return function (l) {
  6452. return function (r) {
  6453. return function (v) {
  6454. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v));
  6455. };
  6456. };
  6457. };
  6458. });
  6459. };
  6460. var bitraverseDefault = function bitraverseDefault(dictBitraversable) {
  6461. return function (dictApplicative) {
  6462. return function (f) {
  6463. return function (g) {
  6464. return function (t) {
  6465. return bisequence(dictBitraversable)(dictApplicative)(Data_Bifunctor.bimap(dictBitraversable.Bifunctor0())(f)(g)(t));
  6466. };
  6467. };
  6468. };
  6469. };
  6470. };
  6471. var bifor = function bifor(dictBitraversable) {
  6472. return function (dictApplicative) {
  6473. return function (t) {
  6474. return function (f) {
  6475. return function (g) {
  6476. return bitraverse(dictBitraversable)(dictApplicative)(f)(g)(t);
  6477. };
  6478. };
  6479. };
  6480. };
  6481. };
  6482. module.exports = {
  6483. Bitraversable: Bitraversable,
  6484. bitraverse: bitraverse,
  6485. bisequence: bisequence,
  6486. bitraverseDefault: bitraverseDefault,
  6487. bisequenceDefault: bisequenceDefault,
  6488. ltraverse: ltraverse,
  6489. rtraverse: rtraverse,
  6490. bifor: bifor,
  6491. lfor: lfor,
  6492. rfor: rfor,
  6493. bitraversableClown: bitraversableClown,
  6494. bitraversableJoker: bitraversableJoker,
  6495. bitraversableFlip: bitraversableFlip,
  6496. bitraversableProduct: bitraversableProduct,
  6497. bitraversableWrap: bitraversableWrap
  6498. };
  6499. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bifunctor.Clown/index.js":"../output/Data.Bifunctor.Clown/index.js","../Data.Bifunctor.Flip/index.js":"../output/Data.Bifunctor.Flip/index.js","../Data.Bifunctor.Joker/index.js":"../output/Data.Bifunctor.Joker/index.js","../Data.Bifunctor.Product/index.js":"../output/Data.Bifunctor.Product/index.js","../Data.Bifunctor.Wrap/index.js":"../output/Data.Bifunctor.Wrap/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Data.FunctorWithIndex/foreign.js":[function(require,module,exports) {
  6500. "use strict";
  6501. exports.mapWithIndexArray = function (f) {
  6502. return function (xs) {
  6503. var l = xs.length;
  6504. var result = Array(l);
  6505. for (var i = 0; i < l; i++) {
  6506. result[i] = f(i)(xs[i]);
  6507. }
  6508. return result;
  6509. };
  6510. };
  6511. },{}],"../output/Data.FunctorWithIndex/index.js":[function(require,module,exports) {
  6512. // Generated by purs version 0.13.6
  6513. "use strict";
  6514. var $foreign = require("./foreign.js");
  6515. var Data_Function = require("../Data.Function/index.js");
  6516. var Data_Functor = require("../Data.Functor/index.js");
  6517. var Data_Maybe = require("../Data.Maybe/index.js");
  6518. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  6519. var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
  6520. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  6521. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  6522. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  6523. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  6524. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  6525. var Data_Unit = require("../Data.Unit/index.js");
  6526. var FunctorWithIndex = function FunctorWithIndex(Functor0, mapWithIndex) {
  6527. this.Functor0 = Functor0;
  6528. this.mapWithIndex = mapWithIndex;
  6529. };
  6530. var mapWithIndex = function mapWithIndex(dict) {
  6531. return dict.mapWithIndex;
  6532. };
  6533. var mapDefault = function mapDefault(dictFunctorWithIndex) {
  6534. return function (f) {
  6535. return mapWithIndex(dictFunctorWithIndex)(Data_Function["const"](f));
  6536. };
  6537. };
  6538. var functorWithIndexMultiplicative = new FunctorWithIndex(function () {
  6539. return Data_Monoid_Multiplicative.functorMultiplicative;
  6540. }, function (f) {
  6541. return Data_Functor.map(Data_Monoid_Multiplicative.functorMultiplicative)(f(Data_Unit.unit));
  6542. });
  6543. var functorWithIndexMaybe = new FunctorWithIndex(function () {
  6544. return Data_Maybe.functorMaybe;
  6545. }, function (f) {
  6546. return Data_Functor.map(Data_Maybe.functorMaybe)(f(Data_Unit.unit));
  6547. });
  6548. var functorWithIndexLast = new FunctorWithIndex(function () {
  6549. return Data_Maybe_Last.functorLast;
  6550. }, function (f) {
  6551. return Data_Functor.map(Data_Maybe_Last.functorLast)(f(Data_Unit.unit));
  6552. });
  6553. var functorWithIndexFirst = new FunctorWithIndex(function () {
  6554. return Data_Maybe_First.functorFirst;
  6555. }, function (f) {
  6556. return Data_Functor.map(Data_Maybe_First.functorFirst)(f(Data_Unit.unit));
  6557. });
  6558. var functorWithIndexDual = new FunctorWithIndex(function () {
  6559. return Data_Monoid_Dual.functorDual;
  6560. }, function (f) {
  6561. return Data_Functor.map(Data_Monoid_Dual.functorDual)(f(Data_Unit.unit));
  6562. });
  6563. var functorWithIndexDisj = new FunctorWithIndex(function () {
  6564. return Data_Monoid_Disj.functorDisj;
  6565. }, function (f) {
  6566. return Data_Functor.map(Data_Monoid_Disj.functorDisj)(f(Data_Unit.unit));
  6567. });
  6568. var functorWithIndexConj = new FunctorWithIndex(function () {
  6569. return Data_Monoid_Conj.functorConj;
  6570. }, function (f) {
  6571. return Data_Functor.map(Data_Monoid_Conj.functorConj)(f(Data_Unit.unit));
  6572. });
  6573. var functorWithIndexArray = new FunctorWithIndex(function () {
  6574. return Data_Functor.functorArray;
  6575. }, $foreign.mapWithIndexArray);
  6576. var functorWithIndexAdditive = new FunctorWithIndex(function () {
  6577. return Data_Monoid_Additive.functorAdditive;
  6578. }, function (f) {
  6579. return Data_Functor.map(Data_Monoid_Additive.functorAdditive)(f(Data_Unit.unit));
  6580. });
  6581. module.exports = {
  6582. FunctorWithIndex: FunctorWithIndex,
  6583. mapWithIndex: mapWithIndex,
  6584. mapDefault: mapDefault,
  6585. functorWithIndexArray: functorWithIndexArray,
  6586. functorWithIndexMaybe: functorWithIndexMaybe,
  6587. functorWithIndexFirst: functorWithIndexFirst,
  6588. functorWithIndexLast: functorWithIndexLast,
  6589. functorWithIndexAdditive: functorWithIndexAdditive,
  6590. functorWithIndexDual: functorWithIndexDual,
  6591. functorWithIndexConj: functorWithIndexConj,
  6592. functorWithIndexDisj: functorWithIndexDisj,
  6593. functorWithIndexMultiplicative: functorWithIndexMultiplicative
  6594. };
  6595. },{"./foreign.js":"../output/Data.FunctorWithIndex/foreign.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Maybe.Last/index.js":"../output/Data.Maybe.Last/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.FoldableWithIndex/index.js":[function(require,module,exports) {
  6596. // Generated by purs version 0.13.6
  6597. "use strict";
  6598. var Control_Applicative = require("../Control.Applicative/index.js");
  6599. var Control_Apply = require("../Control.Apply/index.js");
  6600. var Control_Bind = require("../Control.Bind/index.js");
  6601. var Control_Category = require("../Control.Category/index.js");
  6602. var Data_Foldable = require("../Data.Foldable/index.js");
  6603. var Data_Function = require("../Data.Function/index.js");
  6604. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  6605. var Data_Maybe = require("../Data.Maybe/index.js");
  6606. var Data_Monoid = require("../Data.Monoid/index.js");
  6607. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  6608. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  6609. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  6610. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  6611. var Data_Newtype = require("../Data.Newtype/index.js");
  6612. var Data_Semigroup = require("../Data.Semigroup/index.js");
  6613. var Data_Unit = require("../Data.Unit/index.js");
  6614. var Tuple = function () {
  6615. function Tuple(value0, value1) {
  6616. this.value0 = value0;
  6617. this.value1 = value1;
  6618. }
  6619. ;
  6620. Tuple.create = function (value0) {
  6621. return function (value1) {
  6622. return new Tuple(value0, value1);
  6623. };
  6624. };
  6625. return Tuple;
  6626. }();
  6627. var FoldableWithIndex = function FoldableWithIndex(Foldable0, foldMapWithIndex, foldlWithIndex, foldrWithIndex) {
  6628. this.Foldable0 = Foldable0;
  6629. this.foldMapWithIndex = foldMapWithIndex;
  6630. this.foldlWithIndex = foldlWithIndex;
  6631. this.foldrWithIndex = foldrWithIndex;
  6632. };
  6633. var foldrWithIndex = function foldrWithIndex(dict) {
  6634. return dict.foldrWithIndex;
  6635. };
  6636. var traverseWithIndex_ = function traverseWithIndex_(dictApplicative) {
  6637. return function (dictFoldableWithIndex) {
  6638. return function (f) {
  6639. return foldrWithIndex(dictFoldableWithIndex)(function (i) {
  6640. var $46 = Control_Apply.applySecond(dictApplicative.Apply0());
  6641. var $47 = f(i);
  6642. return function ($48) {
  6643. return $46($47($48));
  6644. };
  6645. })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  6646. };
  6647. };
  6648. };
  6649. var forWithIndex_ = function forWithIndex_(dictApplicative) {
  6650. return function (dictFoldableWithIndex) {
  6651. return Data_Function.flip(traverseWithIndex_(dictApplicative)(dictFoldableWithIndex));
  6652. };
  6653. };
  6654. var foldrDefault = function foldrDefault(dictFoldableWithIndex) {
  6655. return function (f) {
  6656. return foldrWithIndex(dictFoldableWithIndex)(Data_Function["const"](f));
  6657. };
  6658. };
  6659. var foldlWithIndex = function foldlWithIndex(dict) {
  6660. return dict.foldlWithIndex;
  6661. };
  6662. var foldlDefault = function foldlDefault(dictFoldableWithIndex) {
  6663. return function (f) {
  6664. return foldlWithIndex(dictFoldableWithIndex)(Data_Function["const"](f));
  6665. };
  6666. };
  6667. var foldableWithIndexMultiplicative = new FoldableWithIndex(function () {
  6668. return Data_Foldable.foldableMultiplicative;
  6669. }, function (dictMonoid) {
  6670. return function (f) {
  6671. return Data_Foldable.foldMap(Data_Foldable.foldableMultiplicative)(dictMonoid)(f(Data_Unit.unit));
  6672. };
  6673. }, function (f) {
  6674. return Data_Foldable.foldl(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit));
  6675. }, function (f) {
  6676. return Data_Foldable.foldr(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit));
  6677. });
  6678. var foldableWithIndexMaybe = new FoldableWithIndex(function () {
  6679. return Data_Foldable.foldableMaybe;
  6680. }, function (dictMonoid) {
  6681. return function (f) {
  6682. return Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(dictMonoid)(f(Data_Unit.unit));
  6683. };
  6684. }, function (f) {
  6685. return Data_Foldable.foldl(Data_Foldable.foldableMaybe)(f(Data_Unit.unit));
  6686. }, function (f) {
  6687. return Data_Foldable.foldr(Data_Foldable.foldableMaybe)(f(Data_Unit.unit));
  6688. });
  6689. var foldableWithIndexLast = new FoldableWithIndex(function () {
  6690. return Data_Foldable.foldableLast;
  6691. }, function (dictMonoid) {
  6692. return function (f) {
  6693. return Data_Foldable.foldMap(Data_Foldable.foldableLast)(dictMonoid)(f(Data_Unit.unit));
  6694. };
  6695. }, function (f) {
  6696. return Data_Foldable.foldl(Data_Foldable.foldableLast)(f(Data_Unit.unit));
  6697. }, function (f) {
  6698. return Data_Foldable.foldr(Data_Foldable.foldableLast)(f(Data_Unit.unit));
  6699. });
  6700. var foldableWithIndexFirst = new FoldableWithIndex(function () {
  6701. return Data_Foldable.foldableFirst;
  6702. }, function (dictMonoid) {
  6703. return function (f) {
  6704. return Data_Foldable.foldMap(Data_Foldable.foldableFirst)(dictMonoid)(f(Data_Unit.unit));
  6705. };
  6706. }, function (f) {
  6707. return Data_Foldable.foldl(Data_Foldable.foldableFirst)(f(Data_Unit.unit));
  6708. }, function (f) {
  6709. return Data_Foldable.foldr(Data_Foldable.foldableFirst)(f(Data_Unit.unit));
  6710. });
  6711. var foldableWithIndexDual = new FoldableWithIndex(function () {
  6712. return Data_Foldable.foldableDual;
  6713. }, function (dictMonoid) {
  6714. return function (f) {
  6715. return Data_Foldable.foldMap(Data_Foldable.foldableDual)(dictMonoid)(f(Data_Unit.unit));
  6716. };
  6717. }, function (f) {
  6718. return Data_Foldable.foldl(Data_Foldable.foldableDual)(f(Data_Unit.unit));
  6719. }, function (f) {
  6720. return Data_Foldable.foldr(Data_Foldable.foldableDual)(f(Data_Unit.unit));
  6721. });
  6722. var foldableWithIndexDisj = new FoldableWithIndex(function () {
  6723. return Data_Foldable.foldableDisj;
  6724. }, function (dictMonoid) {
  6725. return function (f) {
  6726. return Data_Foldable.foldMap(Data_Foldable.foldableDisj)(dictMonoid)(f(Data_Unit.unit));
  6727. };
  6728. }, function (f) {
  6729. return Data_Foldable.foldl(Data_Foldable.foldableDisj)(f(Data_Unit.unit));
  6730. }, function (f) {
  6731. return Data_Foldable.foldr(Data_Foldable.foldableDisj)(f(Data_Unit.unit));
  6732. });
  6733. var foldableWithIndexConj = new FoldableWithIndex(function () {
  6734. return Data_Foldable.foldableConj;
  6735. }, function (dictMonoid) {
  6736. return function (f) {
  6737. return Data_Foldable.foldMap(Data_Foldable.foldableConj)(dictMonoid)(f(Data_Unit.unit));
  6738. };
  6739. }, function (f) {
  6740. return Data_Foldable.foldl(Data_Foldable.foldableConj)(f(Data_Unit.unit));
  6741. }, function (f) {
  6742. return Data_Foldable.foldr(Data_Foldable.foldableConj)(f(Data_Unit.unit));
  6743. });
  6744. var foldableWithIndexAdditive = new FoldableWithIndex(function () {
  6745. return Data_Foldable.foldableAdditive;
  6746. }, function (dictMonoid) {
  6747. return function (f) {
  6748. return Data_Foldable.foldMap(Data_Foldable.foldableAdditive)(dictMonoid)(f(Data_Unit.unit));
  6749. };
  6750. }, function (f) {
  6751. return Data_Foldable.foldl(Data_Foldable.foldableAdditive)(f(Data_Unit.unit));
  6752. }, function (f) {
  6753. return Data_Foldable.foldr(Data_Foldable.foldableAdditive)(f(Data_Unit.unit));
  6754. });
  6755. var foldWithIndexM = function foldWithIndexM(dictFoldableWithIndex) {
  6756. return function (dictMonad) {
  6757. return function (f) {
  6758. return function (a0) {
  6759. return foldlWithIndex(dictFoldableWithIndex)(function (i) {
  6760. return function (ma) {
  6761. return function (b) {
  6762. return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f(i))(b));
  6763. };
  6764. };
  6765. })(Control_Applicative.pure(dictMonad.Applicative0())(a0));
  6766. };
  6767. };
  6768. };
  6769. };
  6770. var foldMapWithIndexDefaultR = function foldMapWithIndexDefaultR(dictFoldableWithIndex) {
  6771. return function (dictMonoid) {
  6772. return function (f) {
  6773. return foldrWithIndex(dictFoldableWithIndex)(function (i) {
  6774. return function (x) {
  6775. return function (acc) {
  6776. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(i)(x))(acc);
  6777. };
  6778. };
  6779. })(Data_Monoid.mempty(dictMonoid));
  6780. };
  6781. };
  6782. };
  6783. var foldableWithIndexArray = new FoldableWithIndex(function () {
  6784. return Data_Foldable.foldableArray;
  6785. }, function (dictMonoid) {
  6786. return foldMapWithIndexDefaultR(foldableWithIndexArray)(dictMonoid);
  6787. }, function (f) {
  6788. return function (z) {
  6789. var $49 = Data_Foldable.foldl(Data_Foldable.foldableArray)(function (y) {
  6790. return function (v) {
  6791. return f(v.value0)(y)(v.value1);
  6792. };
  6793. })(z);
  6794. var $50 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create);
  6795. return function ($51) {
  6796. return $49($50($51));
  6797. };
  6798. };
  6799. }, function (f) {
  6800. return function (z) {
  6801. var $52 = Data_Foldable.foldr(Data_Foldable.foldableArray)(function (v) {
  6802. return function (y) {
  6803. return f(v.value0)(v.value1)(y);
  6804. };
  6805. })(z);
  6806. var $53 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create);
  6807. return function ($54) {
  6808. return $52($53($54));
  6809. };
  6810. };
  6811. });
  6812. var foldMapWithIndexDefaultL = function foldMapWithIndexDefaultL(dictFoldableWithIndex) {
  6813. return function (dictMonoid) {
  6814. return function (f) {
  6815. return foldlWithIndex(dictFoldableWithIndex)(function (i) {
  6816. return function (acc) {
  6817. return function (x) {
  6818. return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(i)(x));
  6819. };
  6820. };
  6821. })(Data_Monoid.mempty(dictMonoid));
  6822. };
  6823. };
  6824. };
  6825. var foldMapWithIndex = function foldMapWithIndex(dict) {
  6826. return dict.foldMapWithIndex;
  6827. };
  6828. var foldlWithIndexDefault = function foldlWithIndexDefault(dictFoldableWithIndex) {
  6829. return function (c) {
  6830. return function (u) {
  6831. return function (xs) {
  6832. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function (i) {
  6833. var $55 = Data_Function.flip(c(i));
  6834. return function ($56) {
  6835. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($55($56)));
  6836. };
  6837. })(xs)))(u);
  6838. };
  6839. };
  6840. };
  6841. };
  6842. var foldrWithIndexDefault = function foldrWithIndexDefault(dictFoldableWithIndex) {
  6843. return function (c) {
  6844. return function (u) {
  6845. return function (xs) {
  6846. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function (i) {
  6847. var $57 = c(i);
  6848. return function ($58) {
  6849. return Data_Monoid_Endo.Endo($57($58));
  6850. };
  6851. })(xs))(u);
  6852. };
  6853. };
  6854. };
  6855. };
  6856. var surroundMapWithIndex = function surroundMapWithIndex(dictFoldableWithIndex) {
  6857. return function (dictSemigroup) {
  6858. return function (d) {
  6859. return function (t) {
  6860. return function (f) {
  6861. var joined = function joined(i) {
  6862. return function (a) {
  6863. return function (m) {
  6864. return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(i)(a))(m));
  6865. };
  6866. };
  6867. };
  6868. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d);
  6869. };
  6870. };
  6871. };
  6872. };
  6873. };
  6874. var foldMapDefault = function foldMapDefault(dictFoldableWithIndex) {
  6875. return function (dictMonoid) {
  6876. return function (f) {
  6877. return foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(Data_Function["const"](f));
  6878. };
  6879. };
  6880. };
  6881. var findWithIndex = function findWithIndex(dictFoldableWithIndex) {
  6882. return function (p) {
  6883. var go = function go(v) {
  6884. return function (v1) {
  6885. return function (v2) {
  6886. if (v1 instanceof Data_Maybe.Nothing && p(v)(v2)) {
  6887. return new Data_Maybe.Just({
  6888. index: v,
  6889. value: v2
  6890. });
  6891. }
  6892. ;
  6893. return v1;
  6894. };
  6895. };
  6896. };
  6897. return foldlWithIndex(dictFoldableWithIndex)(go)(Data_Maybe.Nothing.value);
  6898. };
  6899. };
  6900. var anyWithIndex = function anyWithIndex(dictFoldableWithIndex) {
  6901. return function (dictHeytingAlgebra) {
  6902. return function (t) {
  6903. var $59 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  6904. var $60 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra))(function (i) {
  6905. var $62 = t(i);
  6906. return function ($63) {
  6907. return Data_Monoid_Disj.Disj($62($63));
  6908. };
  6909. });
  6910. return function ($61) {
  6911. return $59($60($61));
  6912. };
  6913. };
  6914. };
  6915. };
  6916. var allWithIndex = function allWithIndex(dictFoldableWithIndex) {
  6917. return function (dictHeytingAlgebra) {
  6918. return function (t) {
  6919. var $64 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  6920. var $65 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra))(function (i) {
  6921. var $67 = t(i);
  6922. return function ($68) {
  6923. return Data_Monoid_Conj.Conj($67($68));
  6924. };
  6925. });
  6926. return function ($66) {
  6927. return $64($65($66));
  6928. };
  6929. };
  6930. };
  6931. };
  6932. module.exports = {
  6933. FoldableWithIndex: FoldableWithIndex,
  6934. foldrWithIndex: foldrWithIndex,
  6935. foldlWithIndex: foldlWithIndex,
  6936. foldMapWithIndex: foldMapWithIndex,
  6937. foldrWithIndexDefault: foldrWithIndexDefault,
  6938. foldlWithIndexDefault: foldlWithIndexDefault,
  6939. foldMapWithIndexDefaultR: foldMapWithIndexDefaultR,
  6940. foldMapWithIndexDefaultL: foldMapWithIndexDefaultL,
  6941. foldWithIndexM: foldWithIndexM,
  6942. traverseWithIndex_: traverseWithIndex_,
  6943. forWithIndex_: forWithIndex_,
  6944. surroundMapWithIndex: surroundMapWithIndex,
  6945. allWithIndex: allWithIndex,
  6946. anyWithIndex: anyWithIndex,
  6947. findWithIndex: findWithIndex,
  6948. foldrDefault: foldrDefault,
  6949. foldlDefault: foldlDefault,
  6950. foldMapDefault: foldMapDefault,
  6951. foldableWithIndexArray: foldableWithIndexArray,
  6952. foldableWithIndexMaybe: foldableWithIndexMaybe,
  6953. foldableWithIndexFirst: foldableWithIndexFirst,
  6954. foldableWithIndexLast: foldableWithIndexLast,
  6955. foldableWithIndexAdditive: foldableWithIndexAdditive,
  6956. foldableWithIndexDual: foldableWithIndexDual,
  6957. foldableWithIndexDisj: foldableWithIndexDisj,
  6958. foldableWithIndexConj: foldableWithIndexConj,
  6959. foldableWithIndexMultiplicative: foldableWithIndexMultiplicative
  6960. };
  6961. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.TraversableWithIndex/index.js":[function(require,module,exports) {
  6962. // Generated by purs version 0.13.6
  6963. "use strict";
  6964. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  6965. var Data_Function = require("../Data.Function/index.js");
  6966. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  6967. var Data_Traversable = require("../Data.Traversable/index.js");
  6968. var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js");
  6969. var Data_Unit = require("../Data.Unit/index.js");
  6970. var TraversableWithIndex = function TraversableWithIndex(FoldableWithIndex1, FunctorWithIndex0, Traversable2, traverseWithIndex) {
  6971. this.FoldableWithIndex1 = FoldableWithIndex1;
  6972. this.FunctorWithIndex0 = FunctorWithIndex0;
  6973. this.Traversable2 = Traversable2;
  6974. this.traverseWithIndex = traverseWithIndex;
  6975. };
  6976. var traverseWithIndexDefault = function traverseWithIndexDefault(dictTraversableWithIndex) {
  6977. return function (dictApplicative) {
  6978. return function (f) {
  6979. var $19 = Data_Traversable.sequence(dictTraversableWithIndex.Traversable2())(dictApplicative);
  6980. var $20 = Data_FunctorWithIndex.mapWithIndex(dictTraversableWithIndex.FunctorWithIndex0())(f);
  6981. return function ($21) {
  6982. return $19($20($21));
  6983. };
  6984. };
  6985. };
  6986. };
  6987. var traverseWithIndex = function traverseWithIndex(dict) {
  6988. return dict.traverseWithIndex;
  6989. };
  6990. var traverseDefault = function traverseDefault(dictTraversableWithIndex) {
  6991. return function (dictApplicative) {
  6992. return function (f) {
  6993. return traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(Data_Function["const"](f));
  6994. };
  6995. };
  6996. };
  6997. var traversableWithIndexMultiplicative = new TraversableWithIndex(function () {
  6998. return Data_FoldableWithIndex.foldableWithIndexMultiplicative;
  6999. }, function () {
  7000. return Data_FunctorWithIndex.functorWithIndexMultiplicative;
  7001. }, function () {
  7002. return Data_Traversable.traversableMultiplicative;
  7003. }, function (dictApplicative) {
  7004. return function (f) {
  7005. return Data_Traversable.traverse(Data_Traversable.traversableMultiplicative)(dictApplicative)(f(Data_Unit.unit));
  7006. };
  7007. });
  7008. var traversableWithIndexMaybe = new TraversableWithIndex(function () {
  7009. return Data_FoldableWithIndex.foldableWithIndexMaybe;
  7010. }, function () {
  7011. return Data_FunctorWithIndex.functorWithIndexMaybe;
  7012. }, function () {
  7013. return Data_Traversable.traversableMaybe;
  7014. }, function (dictApplicative) {
  7015. return function (f) {
  7016. return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative)(f(Data_Unit.unit));
  7017. };
  7018. });
  7019. var traversableWithIndexLast = new TraversableWithIndex(function () {
  7020. return Data_FoldableWithIndex.foldableWithIndexLast;
  7021. }, function () {
  7022. return Data_FunctorWithIndex.functorWithIndexLast;
  7023. }, function () {
  7024. return Data_Traversable.traversableLast;
  7025. }, function (dictApplicative) {
  7026. return function (f) {
  7027. return Data_Traversable.traverse(Data_Traversable.traversableLast)(dictApplicative)(f(Data_Unit.unit));
  7028. };
  7029. });
  7030. var traversableWithIndexFirst = new TraversableWithIndex(function () {
  7031. return Data_FoldableWithIndex.foldableWithIndexFirst;
  7032. }, function () {
  7033. return Data_FunctorWithIndex.functorWithIndexFirst;
  7034. }, function () {
  7035. return Data_Traversable.traversableFirst;
  7036. }, function (dictApplicative) {
  7037. return function (f) {
  7038. return Data_Traversable.traverse(Data_Traversable.traversableFirst)(dictApplicative)(f(Data_Unit.unit));
  7039. };
  7040. });
  7041. var traversableWithIndexDual = new TraversableWithIndex(function () {
  7042. return Data_FoldableWithIndex.foldableWithIndexDual;
  7043. }, function () {
  7044. return Data_FunctorWithIndex.functorWithIndexDual;
  7045. }, function () {
  7046. return Data_Traversable.traversableDual;
  7047. }, function (dictApplicative) {
  7048. return function (f) {
  7049. return Data_Traversable.traverse(Data_Traversable.traversableDual)(dictApplicative)(f(Data_Unit.unit));
  7050. };
  7051. });
  7052. var traversableWithIndexDisj = new TraversableWithIndex(function () {
  7053. return Data_FoldableWithIndex.foldableWithIndexDisj;
  7054. }, function () {
  7055. return Data_FunctorWithIndex.functorWithIndexDisj;
  7056. }, function () {
  7057. return Data_Traversable.traversableDisj;
  7058. }, function (dictApplicative) {
  7059. return function (f) {
  7060. return Data_Traversable.traverse(Data_Traversable.traversableDisj)(dictApplicative)(f(Data_Unit.unit));
  7061. };
  7062. });
  7063. var traversableWithIndexConj = new TraversableWithIndex(function () {
  7064. return Data_FoldableWithIndex.foldableWithIndexConj;
  7065. }, function () {
  7066. return Data_FunctorWithIndex.functorWithIndexConj;
  7067. }, function () {
  7068. return Data_Traversable.traversableConj;
  7069. }, function (dictApplicative) {
  7070. return function (f) {
  7071. return Data_Traversable.traverse(Data_Traversable.traversableConj)(dictApplicative)(f(Data_Unit.unit));
  7072. };
  7073. });
  7074. var traversableWithIndexArray = new TraversableWithIndex(function () {
  7075. return Data_FoldableWithIndex.foldableWithIndexArray;
  7076. }, function () {
  7077. return Data_FunctorWithIndex.functorWithIndexArray;
  7078. }, function () {
  7079. return Data_Traversable.traversableArray;
  7080. }, function (dictApplicative) {
  7081. return traverseWithIndexDefault(traversableWithIndexArray)(dictApplicative);
  7082. });
  7083. var traversableWithIndexAdditive = new TraversableWithIndex(function () {
  7084. return Data_FoldableWithIndex.foldableWithIndexAdditive;
  7085. }, function () {
  7086. return Data_FunctorWithIndex.functorWithIndexAdditive;
  7087. }, function () {
  7088. return Data_Traversable.traversableAdditive;
  7089. }, function (dictApplicative) {
  7090. return function (f) {
  7091. return Data_Traversable.traverse(Data_Traversable.traversableAdditive)(dictApplicative)(f(Data_Unit.unit));
  7092. };
  7093. });
  7094. var mapAccumRWithIndex = function mapAccumRWithIndex(dictTraversableWithIndex) {
  7095. return function (f) {
  7096. return function (s0) {
  7097. return function (xs) {
  7098. return Data_Traversable_Accum_Internal.stateR(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateR)(function (i) {
  7099. return function (a) {
  7100. return function (s) {
  7101. return f(i)(s)(a);
  7102. };
  7103. };
  7104. })(xs))(s0);
  7105. };
  7106. };
  7107. };
  7108. };
  7109. var scanrWithIndex = function scanrWithIndex(dictTraversableWithIndex) {
  7110. return function (f) {
  7111. return function (b0) {
  7112. return function (xs) {
  7113. return mapAccumRWithIndex(dictTraversableWithIndex)(function (i) {
  7114. return function (b) {
  7115. return function (a) {
  7116. var b$prime = f(i)(a)(b);
  7117. return {
  7118. accum: b$prime,
  7119. value: b$prime
  7120. };
  7121. };
  7122. };
  7123. })(b0)(xs).value;
  7124. };
  7125. };
  7126. };
  7127. };
  7128. var mapAccumLWithIndex = function mapAccumLWithIndex(dictTraversableWithIndex) {
  7129. return function (f) {
  7130. return function (s0) {
  7131. return function (xs) {
  7132. return Data_Traversable_Accum_Internal.stateL(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateL)(function (i) {
  7133. return function (a) {
  7134. return function (s) {
  7135. return f(i)(s)(a);
  7136. };
  7137. };
  7138. })(xs))(s0);
  7139. };
  7140. };
  7141. };
  7142. };
  7143. var scanlWithIndex = function scanlWithIndex(dictTraversableWithIndex) {
  7144. return function (f) {
  7145. return function (b0) {
  7146. return function (xs) {
  7147. return mapAccumLWithIndex(dictTraversableWithIndex)(function (i) {
  7148. return function (b) {
  7149. return function (a) {
  7150. var b$prime = f(i)(b)(a);
  7151. return {
  7152. accum: b$prime,
  7153. value: b$prime
  7154. };
  7155. };
  7156. };
  7157. })(b0)(xs).value;
  7158. };
  7159. };
  7160. };
  7161. };
  7162. var forWithIndex = function forWithIndex(dictApplicative) {
  7163. return function (dictTraversableWithIndex) {
  7164. return Data_Function.flip(traverseWithIndex(dictTraversableWithIndex)(dictApplicative));
  7165. };
  7166. };
  7167. module.exports = {
  7168. TraversableWithIndex: TraversableWithIndex,
  7169. traverseWithIndex: traverseWithIndex,
  7170. traverseWithIndexDefault: traverseWithIndexDefault,
  7171. forWithIndex: forWithIndex,
  7172. scanlWithIndex: scanlWithIndex,
  7173. mapAccumLWithIndex: mapAccumLWithIndex,
  7174. scanrWithIndex: scanrWithIndex,
  7175. mapAccumRWithIndex: mapAccumRWithIndex,
  7176. traverseDefault: traverseDefault,
  7177. traversableWithIndexArray: traversableWithIndexArray,
  7178. traversableWithIndexMaybe: traversableWithIndexMaybe,
  7179. traversableWithIndexFirst: traversableWithIndexFirst,
  7180. traversableWithIndexLast: traversableWithIndexLast,
  7181. traversableWithIndexAdditive: traversableWithIndexAdditive,
  7182. traversableWithIndexDual: traversableWithIndexDual,
  7183. traversableWithIndexConj: traversableWithIndexConj,
  7184. traversableWithIndexDisj: traversableWithIndexDisj,
  7185. traversableWithIndexMultiplicative: traversableWithIndexMultiplicative
  7186. };
  7187. },{"../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Traversable.Accum.Internal/index.js":"../output/Data.Traversable.Accum.Internal/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Either/index.js":[function(require,module,exports) {
  7188. // Generated by purs version 0.13.6
  7189. "use strict";
  7190. var Control_Alt = require("../Control.Alt/index.js");
  7191. var Control_Applicative = require("../Control.Applicative/index.js");
  7192. var Control_Apply = require("../Control.Apply/index.js");
  7193. var Control_Bind = require("../Control.Bind/index.js");
  7194. var Control_Extend = require("../Control.Extend/index.js");
  7195. var Control_Monad = require("../Control.Monad/index.js");
  7196. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  7197. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  7198. var Data_Bitraversable = require("../Data.Bitraversable/index.js");
  7199. var Data_Bounded = require("../Data.Bounded/index.js");
  7200. var Data_Eq = require("../Data.Eq/index.js");
  7201. var Data_Foldable = require("../Data.Foldable/index.js");
  7202. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  7203. var Data_Function = require("../Data.Function/index.js");
  7204. var Data_Functor = require("../Data.Functor/index.js");
  7205. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  7206. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  7207. var Data_Maybe = require("../Data.Maybe/index.js");
  7208. var Data_Monoid = require("../Data.Monoid/index.js");
  7209. var Data_Ord = require("../Data.Ord/index.js");
  7210. var Data_Ordering = require("../Data.Ordering/index.js");
  7211. var Data_Semigroup = require("../Data.Semigroup/index.js");
  7212. var Data_Show = require("../Data.Show/index.js");
  7213. var Data_Traversable = require("../Data.Traversable/index.js");
  7214. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  7215. var Data_Unit = require("../Data.Unit/index.js");
  7216. var Left = function () {
  7217. function Left(value0) {
  7218. this.value0 = value0;
  7219. }
  7220. ;
  7221. Left.create = function (value0) {
  7222. return new Left(value0);
  7223. };
  7224. return Left;
  7225. }();
  7226. var Right = function () {
  7227. function Right(value0) {
  7228. this.value0 = value0;
  7229. }
  7230. ;
  7231. Right.create = function (value0) {
  7232. return new Right(value0);
  7233. };
  7234. return Right;
  7235. }();
  7236. var showEither = function showEither(dictShow) {
  7237. return function (dictShow1) {
  7238. return new Data_Show.Show(function (v) {
  7239. if (v instanceof Left) {
  7240. return "(Left " + (Data_Show.show(dictShow)(v.value0) + ")");
  7241. }
  7242. ;
  7243. if (v instanceof Right) {
  7244. return "(Right " + (Data_Show.show(dictShow1)(v.value0) + ")");
  7245. }
  7246. ;
  7247. throw new Error("Failed pattern match at Data.Either (line 163, column 1 - line 165, column 46): " + [v.constructor.name]);
  7248. });
  7249. };
  7250. };
  7251. var note$prime = function note$prime(f) {
  7252. return Data_Maybe["maybe'"](function ($198) {
  7253. return Left.create(f($198));
  7254. })(Right.create);
  7255. };
  7256. var note = function note(a) {
  7257. return Data_Maybe.maybe(new Left(a))(Right.create);
  7258. };
  7259. var functorEither = new Data_Functor.Functor(function (f) {
  7260. return function (m) {
  7261. if (m instanceof Left) {
  7262. return new Left(m.value0);
  7263. }
  7264. ;
  7265. if (m instanceof Right) {
  7266. return new Right(f(m.value0));
  7267. }
  7268. ;
  7269. throw new Error("Failed pattern match at Data.Either (line 38, column 1 - line 38, column 52): " + [m.constructor.name]);
  7270. };
  7271. });
  7272. var functorWithIndexEither = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  7273. return functorEither;
  7274. }, function (f) {
  7275. return Data_Functor.map(functorEither)(f(Data_Unit.unit));
  7276. });
  7277. var invariantEither = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorEither));
  7278. var fromRight = function fromRight(dictPartial) {
  7279. return function (v) {
  7280. if (v instanceof Right) {
  7281. return v.value0;
  7282. }
  7283. ;
  7284. throw new Error("Failed pattern match at Data.Either (line 261, column 1 - line 261, column 52): " + [v.constructor.name]);
  7285. };
  7286. };
  7287. var fromLeft = function fromLeft(dictPartial) {
  7288. return function (v) {
  7289. if (v instanceof Left) {
  7290. return v.value0;
  7291. }
  7292. ;
  7293. throw new Error("Failed pattern match at Data.Either (line 256, column 1 - line 256, column 51): " + [v.constructor.name]);
  7294. };
  7295. };
  7296. var foldableEither = new Data_Foldable.Foldable(function (dictMonoid) {
  7297. return function (f) {
  7298. return function (v) {
  7299. if (v instanceof Left) {
  7300. return Data_Monoid.mempty(dictMonoid);
  7301. }
  7302. ;
  7303. if (v instanceof Right) {
  7304. return f(v.value0);
  7305. }
  7306. ;
  7307. throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [f.constructor.name, v.constructor.name]);
  7308. };
  7309. };
  7310. }, function (v) {
  7311. return function (z) {
  7312. return function (v1) {
  7313. if (v1 instanceof Left) {
  7314. return z;
  7315. }
  7316. ;
  7317. if (v1 instanceof Right) {
  7318. return v(z)(v1.value0);
  7319. }
  7320. ;
  7321. throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
  7322. };
  7323. };
  7324. }, function (v) {
  7325. return function (z) {
  7326. return function (v1) {
  7327. if (v1 instanceof Left) {
  7328. return z;
  7329. }
  7330. ;
  7331. if (v1 instanceof Right) {
  7332. return v(v1.value0)(z);
  7333. }
  7334. ;
  7335. throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
  7336. };
  7337. };
  7338. });
  7339. var foldableWithIndexEither = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  7340. return foldableEither;
  7341. }, function (dictMonoid) {
  7342. return function (f) {
  7343. return function (v) {
  7344. if (v instanceof Left) {
  7345. return Data_Monoid.mempty(dictMonoid);
  7346. }
  7347. ;
  7348. if (v instanceof Right) {
  7349. return f(Data_Unit.unit)(v.value0);
  7350. }
  7351. ;
  7352. throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [f.constructor.name, v.constructor.name]);
  7353. };
  7354. };
  7355. }, function (v) {
  7356. return function (z) {
  7357. return function (v1) {
  7358. if (v1 instanceof Left) {
  7359. return z;
  7360. }
  7361. ;
  7362. if (v1 instanceof Right) {
  7363. return v(Data_Unit.unit)(z)(v1.value0);
  7364. }
  7365. ;
  7366. throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
  7367. };
  7368. };
  7369. }, function (v) {
  7370. return function (z) {
  7371. return function (v1) {
  7372. if (v1 instanceof Left) {
  7373. return z;
  7374. }
  7375. ;
  7376. if (v1 instanceof Right) {
  7377. return v(Data_Unit.unit)(v1.value0)(z);
  7378. }
  7379. ;
  7380. throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
  7381. };
  7382. };
  7383. });
  7384. var traversableEither = new Data_Traversable.Traversable(function () {
  7385. return foldableEither;
  7386. }, function () {
  7387. return functorEither;
  7388. }, function (dictApplicative) {
  7389. return function (v) {
  7390. if (v instanceof Left) {
  7391. return Control_Applicative.pure(dictApplicative)(new Left(v.value0));
  7392. }
  7393. ;
  7394. if (v instanceof Right) {
  7395. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0);
  7396. }
  7397. ;
  7398. throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name]);
  7399. };
  7400. }, function (dictApplicative) {
  7401. return function (v) {
  7402. return function (v1) {
  7403. if (v1 instanceof Left) {
  7404. return Control_Applicative.pure(dictApplicative)(new Left(v1.value0));
  7405. }
  7406. ;
  7407. if (v1 instanceof Right) {
  7408. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(v1.value0));
  7409. }
  7410. ;
  7411. throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name, v1.constructor.name]);
  7412. };
  7413. };
  7414. });
  7415. var traversableWithIndexEither = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  7416. return foldableWithIndexEither;
  7417. }, function () {
  7418. return functorWithIndexEither;
  7419. }, function () {
  7420. return traversableEither;
  7421. }, function (dictApplicative) {
  7422. return function (v) {
  7423. return function (v1) {
  7424. if (v1 instanceof Left) {
  7425. return Control_Applicative.pure(dictApplicative)(new Left(v1.value0));
  7426. }
  7427. ;
  7428. if (v1 instanceof Right) {
  7429. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(Data_Unit.unit)(v1.value0));
  7430. }
  7431. ;
  7432. throw new Error("Failed pattern match at Data.Either (line 217, column 1 - line 219, column 53): " + [v.constructor.name, v1.constructor.name]);
  7433. };
  7434. };
  7435. });
  7436. var extendEither = new Control_Extend.Extend(function () {
  7437. return functorEither;
  7438. }, function (v) {
  7439. return function (v1) {
  7440. if (v1 instanceof Left) {
  7441. return new Left(v1.value0);
  7442. }
  7443. ;
  7444. return new Right(v(v1));
  7445. };
  7446. });
  7447. var eqEither = function eqEither(dictEq) {
  7448. return function (dictEq1) {
  7449. return new Data_Eq.Eq(function (x) {
  7450. return function (y) {
  7451. if (x instanceof Left && y instanceof Left) {
  7452. return Data_Eq.eq(dictEq)(x.value0)(y.value0);
  7453. }
  7454. ;
  7455. if (x instanceof Right && y instanceof Right) {
  7456. return Data_Eq.eq(dictEq1)(x.value0)(y.value0);
  7457. }
  7458. ;
  7459. return false;
  7460. };
  7461. });
  7462. };
  7463. };
  7464. var ordEither = function ordEither(dictOrd) {
  7465. return function (dictOrd1) {
  7466. return new Data_Ord.Ord(function () {
  7467. return eqEither(dictOrd.Eq0())(dictOrd1.Eq0());
  7468. }, function (x) {
  7469. return function (y) {
  7470. if (x instanceof Left && y instanceof Left) {
  7471. return Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  7472. }
  7473. ;
  7474. if (x instanceof Left) {
  7475. return Data_Ordering.LT.value;
  7476. }
  7477. ;
  7478. if (y instanceof Left) {
  7479. return Data_Ordering.GT.value;
  7480. }
  7481. ;
  7482. if (x instanceof Right && y instanceof Right) {
  7483. return Data_Ord.compare(dictOrd1)(x.value0)(y.value0);
  7484. }
  7485. ;
  7486. throw new Error("Failed pattern match at Data.Either (line 179, column 1 - line 179, column 64): " + [x.constructor.name, y.constructor.name]);
  7487. };
  7488. });
  7489. };
  7490. };
  7491. var eq1Either = function eq1Either(dictEq) {
  7492. return new Data_Eq.Eq1(function (dictEq1) {
  7493. return Data_Eq.eq(eqEither(dictEq)(dictEq1));
  7494. });
  7495. };
  7496. var ord1Either = function ord1Either(dictOrd) {
  7497. return new Data_Ord.Ord1(function () {
  7498. return eq1Either(dictOrd.Eq0());
  7499. }, function (dictOrd1) {
  7500. return Data_Ord.compare(ordEither(dictOrd)(dictOrd1));
  7501. });
  7502. };
  7503. var either = function either(v) {
  7504. return function (v1) {
  7505. return function (v2) {
  7506. if (v2 instanceof Left) {
  7507. return v(v2.value0);
  7508. }
  7509. ;
  7510. if (v2 instanceof Right) {
  7511. return v1(v2.value0);
  7512. }
  7513. ;
  7514. throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  7515. };
  7516. };
  7517. };
  7518. var hush = either(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.Just.create);
  7519. var isLeft = either(Data_Function["const"](true))(Data_Function["const"](false));
  7520. var isRight = either(Data_Function["const"](false))(Data_Function["const"](true));
  7521. var choose = function choose(dictAlt) {
  7522. return function (a) {
  7523. return function (b) {
  7524. return Control_Alt.alt(dictAlt)(Data_Functor.map(dictAlt.Functor0())(Left.create)(a))(Data_Functor.map(dictAlt.Functor0())(Right.create)(b));
  7525. };
  7526. };
  7527. };
  7528. var boundedEither = function boundedEither(dictBounded) {
  7529. return function (dictBounded1) {
  7530. return new Data_Bounded.Bounded(function () {
  7531. return ordEither(dictBounded.Ord0())(dictBounded1.Ord0());
  7532. }, new Left(Data_Bounded.bottom(dictBounded)), new Right(Data_Bounded.top(dictBounded1)));
  7533. };
  7534. };
  7535. var bifunctorEither = new Data_Bifunctor.Bifunctor(function (v) {
  7536. return function (v1) {
  7537. return function (v2) {
  7538. if (v2 instanceof Left) {
  7539. return new Left(v(v2.value0));
  7540. }
  7541. ;
  7542. if (v2 instanceof Right) {
  7543. return new Right(v1(v2.value0));
  7544. }
  7545. ;
  7546. throw new Error("Failed pattern match at Data.Either (line 46, column 1 - line 48, column 36): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  7547. };
  7548. };
  7549. });
  7550. var bifoldableEither = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
  7551. return function (v) {
  7552. return function (v1) {
  7553. return function (v2) {
  7554. if (v2 instanceof Left) {
  7555. return v(v2.value0);
  7556. }
  7557. ;
  7558. if (v2 instanceof Right) {
  7559. return v1(v2.value0);
  7560. }
  7561. ;
  7562. throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  7563. };
  7564. };
  7565. };
  7566. }, function (v) {
  7567. return function (v1) {
  7568. return function (z) {
  7569. return function (v2) {
  7570. if (v2 instanceof Left) {
  7571. return v(z)(v2.value0);
  7572. }
  7573. ;
  7574. if (v2 instanceof Right) {
  7575. return v1(z)(v2.value0);
  7576. }
  7577. ;
  7578. throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, z.constructor.name, v2.constructor.name]);
  7579. };
  7580. };
  7581. };
  7582. }, function (v) {
  7583. return function (v1) {
  7584. return function (z) {
  7585. return function (v2) {
  7586. if (v2 instanceof Left) {
  7587. return v(v2.value0)(z);
  7588. }
  7589. ;
  7590. if (v2 instanceof Right) {
  7591. return v1(v2.value0)(z);
  7592. }
  7593. ;
  7594. throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, z.constructor.name, v2.constructor.name]);
  7595. };
  7596. };
  7597. };
  7598. });
  7599. var bitraversableEither = new Data_Bitraversable.Bitraversable(function () {
  7600. return bifoldableEither;
  7601. }, function () {
  7602. return bifunctorEither;
  7603. }, function (dictApplicative) {
  7604. return function (v) {
  7605. if (v instanceof Left) {
  7606. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v.value0);
  7607. }
  7608. ;
  7609. if (v instanceof Right) {
  7610. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0);
  7611. }
  7612. ;
  7613. throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name]);
  7614. };
  7615. }, function (dictApplicative) {
  7616. return function (v) {
  7617. return function (v1) {
  7618. return function (v2) {
  7619. if (v2 instanceof Left) {
  7620. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v(v2.value0));
  7621. }
  7622. ;
  7623. if (v2 instanceof Right) {
  7624. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v1(v2.value0));
  7625. }
  7626. ;
  7627. throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  7628. };
  7629. };
  7630. };
  7631. });
  7632. var applyEither = new Control_Apply.Apply(function () {
  7633. return functorEither;
  7634. }, function (v) {
  7635. return function (v1) {
  7636. if (v instanceof Left) {
  7637. return new Left(v.value0);
  7638. }
  7639. ;
  7640. if (v instanceof Right) {
  7641. return Data_Functor.map(functorEither)(v.value0)(v1);
  7642. }
  7643. ;
  7644. throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 84, column 30): " + [v.constructor.name, v1.constructor.name]);
  7645. };
  7646. });
  7647. var bindEither = new Control_Bind.Bind(function () {
  7648. return applyEither;
  7649. }, either(function (e) {
  7650. return function (v) {
  7651. return new Left(e);
  7652. };
  7653. })(function (a) {
  7654. return function (f) {
  7655. return f(a);
  7656. };
  7657. }));
  7658. var semigroupEither = function semigroupEither(dictSemigroup) {
  7659. return new Data_Semigroup.Semigroup(function (x) {
  7660. return function (y) {
  7661. return Control_Apply.apply(applyEither)(Data_Functor.map(functorEither)(Data_Semigroup.append(dictSemigroup))(x))(y);
  7662. };
  7663. });
  7664. };
  7665. var applicativeEither = new Control_Applicative.Applicative(function () {
  7666. return applyEither;
  7667. }, Right.create);
  7668. var monadEither = new Control_Monad.Monad(function () {
  7669. return applicativeEither;
  7670. }, function () {
  7671. return bindEither;
  7672. });
  7673. var altEither = new Control_Alt.Alt(function () {
  7674. return functorEither;
  7675. }, function (v) {
  7676. return function (v1) {
  7677. if (v instanceof Left) {
  7678. return v1;
  7679. }
  7680. ;
  7681. return v;
  7682. };
  7683. });
  7684. module.exports = {
  7685. Left: Left,
  7686. Right: Right,
  7687. either: either,
  7688. choose: choose,
  7689. isLeft: isLeft,
  7690. isRight: isRight,
  7691. fromLeft: fromLeft,
  7692. fromRight: fromRight,
  7693. note: note,
  7694. "note'": note$prime,
  7695. hush: hush,
  7696. functorEither: functorEither,
  7697. functorWithIndexEither: functorWithIndexEither,
  7698. invariantEither: invariantEither,
  7699. bifunctorEither: bifunctorEither,
  7700. applyEither: applyEither,
  7701. applicativeEither: applicativeEither,
  7702. altEither: altEither,
  7703. bindEither: bindEither,
  7704. monadEither: monadEither,
  7705. extendEither: extendEither,
  7706. showEither: showEither,
  7707. eqEither: eqEither,
  7708. eq1Either: eq1Either,
  7709. ordEither: ordEither,
  7710. ord1Either: ord1Either,
  7711. boundedEither: boundedEither,
  7712. foldableEither: foldableEither,
  7713. foldableWithIndexEither: foldableWithIndexEither,
  7714. bifoldableEither: bifoldableEither,
  7715. traversableEither: traversableEither,
  7716. traversableWithIndexEither: traversableWithIndexEither,
  7717. bitraversableEither: bitraversableEither,
  7718. semigroupEither: semigroupEither
  7719. };
  7720. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bitraversable/index.js":"../output/Data.Bitraversable/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Effect/foreign.js":[function(require,module,exports) {
  7721. "use strict";
  7722. exports.pureE = function (a) {
  7723. return function () {
  7724. return a;
  7725. };
  7726. };
  7727. exports.bindE = function (a) {
  7728. return function (f) {
  7729. return function () {
  7730. return f(a())();
  7731. };
  7732. };
  7733. };
  7734. exports.untilE = function (f) {
  7735. return function () {
  7736. while (!f()) {
  7737. ;
  7738. }
  7739. return {};
  7740. };
  7741. };
  7742. exports.whileE = function (f) {
  7743. return function (a) {
  7744. return function () {
  7745. while (f()) {
  7746. a();
  7747. }
  7748. return {};
  7749. };
  7750. };
  7751. };
  7752. exports.forE = function (lo) {
  7753. return function (hi) {
  7754. return function (f) {
  7755. return function () {
  7756. for (var i = lo; i < hi; i++) {
  7757. f(i)();
  7758. }
  7759. };
  7760. };
  7761. };
  7762. };
  7763. exports.foreachE = function (as) {
  7764. return function (f) {
  7765. return function () {
  7766. for (var i = 0, l = as.length; i < l; i++) {
  7767. f(as[i])();
  7768. }
  7769. };
  7770. };
  7771. };
  7772. },{}],"../output/Effect/index.js":[function(require,module,exports) {
  7773. // Generated by purs version 0.13.6
  7774. "use strict";
  7775. var $foreign = require("./foreign.js");
  7776. var Control_Applicative = require("../Control.Applicative/index.js");
  7777. var Control_Apply = require("../Control.Apply/index.js");
  7778. var Control_Bind = require("../Control.Bind/index.js");
  7779. var Control_Monad = require("../Control.Monad/index.js");
  7780. var Data_Functor = require("../Data.Functor/index.js");
  7781. var Data_Monoid = require("../Data.Monoid/index.js");
  7782. var Data_Semigroup = require("../Data.Semigroup/index.js");
  7783. var monadEffect = new Control_Monad.Monad(function () {
  7784. return applicativeEffect;
  7785. }, function () {
  7786. return bindEffect;
  7787. });
  7788. var bindEffect = new Control_Bind.Bind(function () {
  7789. return applyEffect;
  7790. }, $foreign.bindE);
  7791. var applyEffect = new Control_Apply.Apply(function () {
  7792. return functorEffect;
  7793. }, Control_Monad.ap(monadEffect));
  7794. var applicativeEffect = new Control_Applicative.Applicative(function () {
  7795. return applyEffect;
  7796. }, $foreign.pureE);
  7797. var functorEffect = new Data_Functor.Functor(Control_Applicative.liftA1(applicativeEffect));
  7798. var semigroupEffect = function semigroupEffect(dictSemigroup) {
  7799. return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyEffect)(Data_Semigroup.append(dictSemigroup)));
  7800. };
  7801. var monoidEffect = function monoidEffect(dictMonoid) {
  7802. return new Data_Monoid.Monoid(function () {
  7803. return semigroupEffect(dictMonoid.Semigroup0());
  7804. }, $foreign.pureE(Data_Monoid.mempty(dictMonoid)));
  7805. };
  7806. module.exports = {
  7807. functorEffect: functorEffect,
  7808. applyEffect: applyEffect,
  7809. applicativeEffect: applicativeEffect,
  7810. bindEffect: bindEffect,
  7811. monadEffect: monadEffect,
  7812. semigroupEffect: semigroupEffect,
  7813. monoidEffect: monoidEffect,
  7814. untilE: $foreign.untilE,
  7815. whileE: $foreign.whileE,
  7816. forE: $foreign.forE,
  7817. foreachE: $foreign.foreachE
  7818. };
  7819. },{"./foreign.js":"../output/Effect/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Effect.Exception/foreign.js":[function(require,module,exports) {
  7820. "use strict";
  7821. exports.showErrorImpl = function (err) {
  7822. return err.stack || err.toString();
  7823. };
  7824. exports.error = function (msg) {
  7825. return new Error(msg);
  7826. };
  7827. exports.message = function (e) {
  7828. return e.message;
  7829. };
  7830. exports.name = function (e) {
  7831. return e.name || "Error";
  7832. };
  7833. exports.stackImpl = function (just) {
  7834. return function (nothing) {
  7835. return function (e) {
  7836. return e.stack ? just(e.stack) : nothing;
  7837. };
  7838. };
  7839. };
  7840. exports.throwException = function (e) {
  7841. return function () {
  7842. throw e;
  7843. };
  7844. };
  7845. exports.catchException = function (c) {
  7846. return function (t) {
  7847. return function () {
  7848. try {
  7849. return t();
  7850. } catch (e) {
  7851. if (e instanceof Error || Object.prototype.toString.call(e) === "[object Error]") {
  7852. return c(e)();
  7853. } else {
  7854. return c(new Error(e.toString()))();
  7855. }
  7856. }
  7857. };
  7858. };
  7859. };
  7860. },{}],"../output/Effect.Exception/index.js":[function(require,module,exports) {
  7861. // Generated by purs version 0.13.6
  7862. "use strict";
  7863. var $foreign = require("./foreign.js");
  7864. var Control_Applicative = require("../Control.Applicative/index.js");
  7865. var Data_Either = require("../Data.Either/index.js");
  7866. var Data_Functor = require("../Data.Functor/index.js");
  7867. var Data_Maybe = require("../Data.Maybe/index.js");
  7868. var Data_Show = require("../Data.Show/index.js");
  7869. var Effect = require("../Effect/index.js");
  7870. var $$try = function $$try(action) {
  7871. return $foreign.catchException(function () {
  7872. var $0 = Control_Applicative.pure(Effect.applicativeEffect);
  7873. return function ($1) {
  7874. return $0(Data_Either.Left.create($1));
  7875. };
  7876. }())(Data_Functor.map(Effect.functorEffect)(Data_Either.Right.create)(action));
  7877. };
  7878. var $$throw = function $$throw($2) {
  7879. return $foreign.throwException($foreign.error($2));
  7880. };
  7881. var stack = $foreign.stackImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  7882. var showError = new Data_Show.Show($foreign.showErrorImpl);
  7883. module.exports = {
  7884. stack: stack,
  7885. "throw": $$throw,
  7886. "try": $$try,
  7887. showError: showError,
  7888. error: $foreign.error,
  7889. message: $foreign.message,
  7890. name: $foreign.name,
  7891. throwException: $foreign.throwException,
  7892. catchException: $foreign.catchException
  7893. };
  7894. },{"./foreign.js":"../output/Effect.Exception/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Effect/index.js":"../output/Effect/index.js"}],"../output/Control.Monad.Error.Class/index.js":[function(require,module,exports) {
  7895. // Generated by purs version 0.13.6
  7896. "use strict";
  7897. var Control_Applicative = require("../Control.Applicative/index.js");
  7898. var Control_Bind = require("../Control.Bind/index.js");
  7899. var Data_Either = require("../Data.Either/index.js");
  7900. var Data_Function = require("../Data.Function/index.js");
  7901. var Data_Functor = require("../Data.Functor/index.js");
  7902. var Data_Maybe = require("../Data.Maybe/index.js");
  7903. var Data_Unit = require("../Data.Unit/index.js");
  7904. var Effect = require("../Effect/index.js");
  7905. var Effect_Exception = require("../Effect.Exception/index.js");
  7906. var MonadThrow = function MonadThrow(Monad0, throwError) {
  7907. this.Monad0 = Monad0;
  7908. this.throwError = throwError;
  7909. };
  7910. var MonadError = function MonadError(MonadThrow0, catchError) {
  7911. this.MonadThrow0 = MonadThrow0;
  7912. this.catchError = catchError;
  7913. };
  7914. var throwError = function throwError(dict) {
  7915. return dict.throwError;
  7916. };
  7917. var monadThrowMaybe = new MonadThrow(function () {
  7918. return Data_Maybe.monadMaybe;
  7919. }, Data_Function["const"](Data_Maybe.Nothing.value));
  7920. var monadThrowEither = new MonadThrow(function () {
  7921. return Data_Either.monadEither;
  7922. }, Data_Either.Left.create);
  7923. var monadThrowEffect = new MonadThrow(function () {
  7924. return Effect.monadEffect;
  7925. }, Effect_Exception.throwException);
  7926. var monadErrorMaybe = new MonadError(function () {
  7927. return monadThrowMaybe;
  7928. }, function (v) {
  7929. return function (v1) {
  7930. if (v instanceof Data_Maybe.Nothing) {
  7931. return v1(Data_Unit.unit);
  7932. }
  7933. ;
  7934. if (v instanceof Data_Maybe.Just) {
  7935. return new Data_Maybe.Just(v.value0);
  7936. }
  7937. ;
  7938. throw new Error("Failed pattern match at Control.Monad.Error.Class (line 79, column 1 - line 81, column 33): " + [v.constructor.name, v1.constructor.name]);
  7939. };
  7940. });
  7941. var monadErrorEither = new MonadError(function () {
  7942. return monadThrowEither;
  7943. }, function (v) {
  7944. return function (v1) {
  7945. if (v instanceof Data_Either.Left) {
  7946. return v1(v.value0);
  7947. }
  7948. ;
  7949. if (v instanceof Data_Either.Right) {
  7950. return new Data_Either.Right(v.value0);
  7951. }
  7952. ;
  7953. throw new Error("Failed pattern match at Control.Monad.Error.Class (line 72, column 1 - line 74, column 35): " + [v.constructor.name, v1.constructor.name]);
  7954. };
  7955. });
  7956. var monadErrorEffect = new MonadError(function () {
  7957. return monadThrowEffect;
  7958. }, Data_Function.flip(Effect_Exception.catchException));
  7959. var catchError = function catchError(dict) {
  7960. return dict.catchError;
  7961. };
  7962. var catchJust = function catchJust(dictMonadError) {
  7963. return function (p) {
  7964. return function (act) {
  7965. return function (handler) {
  7966. var handle = function handle(e) {
  7967. var v = p(e);
  7968. if (v instanceof Data_Maybe.Nothing) {
  7969. return throwError(dictMonadError.MonadThrow0())(e);
  7970. }
  7971. ;
  7972. if (v instanceof Data_Maybe.Just) {
  7973. return handler(v.value0);
  7974. }
  7975. ;
  7976. throw new Error("Failed pattern match at Control.Monad.Error.Class (line 57, column 5 - line 59, column 26): " + [v.constructor.name]);
  7977. };
  7978. return catchError(dictMonadError)(act)(handle);
  7979. };
  7980. };
  7981. };
  7982. };
  7983. var $$try = function $$try(dictMonadError) {
  7984. return function (a) {
  7985. return catchError(dictMonadError)(Data_Functor.map(dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0())(Data_Either.Right.create)(a))(function () {
  7986. var $17 = Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0());
  7987. return function ($18) {
  7988. return $17(Data_Either.Left.create($18));
  7989. };
  7990. }());
  7991. };
  7992. };
  7993. var withResource = function withResource(dictMonadError) {
  7994. return function (acquire) {
  7995. return function (release) {
  7996. return function (kleisli) {
  7997. return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())(acquire)(function (resource) {
  7998. return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())($$try(dictMonadError)(kleisli(resource)))(function (result) {
  7999. return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadError.MonadThrow0().Monad0().Bind1())(release(resource))(function () {
  8000. return Data_Either.either(throwError(dictMonadError.MonadThrow0()))(Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0()))(result);
  8001. });
  8002. });
  8003. });
  8004. };
  8005. };
  8006. };
  8007. };
  8008. module.exports = {
  8009. catchError: catchError,
  8010. throwError: throwError,
  8011. MonadThrow: MonadThrow,
  8012. MonadError: MonadError,
  8013. catchJust: catchJust,
  8014. "try": $$try,
  8015. withResource: withResource,
  8016. monadThrowEither: monadThrowEither,
  8017. monadErrorEither: monadErrorEither,
  8018. monadThrowMaybe: monadThrowMaybe,
  8019. monadErrorMaybe: monadErrorMaybe,
  8020. monadThrowEffect: monadThrowEffect,
  8021. monadErrorEffect: monadErrorEffect
  8022. };
  8023. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js"}],"../output/Control.Monad.Reader.Class/index.js":[function(require,module,exports) {
  8024. // Generated by purs version 0.13.6
  8025. "use strict";
  8026. var Control_Category = require("../Control.Category/index.js");
  8027. var Control_Monad = require("../Control.Monad/index.js");
  8028. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  8029. var Data_Functor = require("../Data.Functor/index.js");
  8030. var MonadAsk = function MonadAsk(Monad0, ask) {
  8031. this.Monad0 = Monad0;
  8032. this.ask = ask;
  8033. };
  8034. var MonadReader = function MonadReader(MonadAsk0, local) {
  8035. this.MonadAsk0 = MonadAsk0;
  8036. this.local = local;
  8037. };
  8038. var monadAskFun = new MonadAsk(function () {
  8039. return Control_Monad.monadFn;
  8040. }, Control_Category.identity(Control_Category.categoryFn));
  8041. var monadReaderFun = new MonadReader(function () {
  8042. return monadAskFun;
  8043. }, Control_Semigroupoid.composeFlipped(Control_Semigroupoid.semigroupoidFn));
  8044. var local = function local(dict) {
  8045. return dict.local;
  8046. };
  8047. var ask = function ask(dict) {
  8048. return dict.ask;
  8049. };
  8050. var asks = function asks(dictMonadAsk) {
  8051. return function (f) {
  8052. return Data_Functor.map(dictMonadAsk.Monad0().Bind1().Apply0().Functor0())(f)(ask(dictMonadAsk));
  8053. };
  8054. };
  8055. module.exports = {
  8056. ask: ask,
  8057. local: local,
  8058. MonadAsk: MonadAsk,
  8059. asks: asks,
  8060. MonadReader: MonadReader,
  8061. monadAskFun: monadAskFun,
  8062. monadReaderFun: monadReaderFun
  8063. };
  8064. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Control.Comonad/index.js":[function(require,module,exports) {
  8065. // Generated by purs version 0.13.6
  8066. "use strict";
  8067. var Comonad = function Comonad(Extend0, extract) {
  8068. this.Extend0 = Extend0;
  8069. this.extract = extract;
  8070. };
  8071. var extract = function extract(dict) {
  8072. return dict.extract;
  8073. };
  8074. module.exports = {
  8075. Comonad: Comonad,
  8076. extract: extract
  8077. };
  8078. },{}],"../output/Data.Ord.Max/index.js":[function(require,module,exports) {
  8079. // Generated by purs version 0.13.6
  8080. "use strict";
  8081. var Data_Bounded = require("../Data.Bounded/index.js");
  8082. var Data_Monoid = require("../Data.Monoid/index.js");
  8083. var Data_Newtype = require("../Data.Newtype/index.js");
  8084. var Data_Ord = require("../Data.Ord/index.js");
  8085. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8086. var Data_Show = require("../Data.Show/index.js");
  8087. var Max = function Max(x) {
  8088. return x;
  8089. };
  8090. var showMax = function showMax(dictShow) {
  8091. return new Data_Show.Show(function (v) {
  8092. return "(Max " + (Data_Show.show(dictShow)(v) + ")");
  8093. });
  8094. };
  8095. var semigroupMax = function semigroupMax(dictOrd) {
  8096. return new Data_Semigroup.Semigroup(function (v) {
  8097. return function (v1) {
  8098. return Data_Ord.max(dictOrd)(v)(v1);
  8099. };
  8100. });
  8101. };
  8102. var newtypeMax = new Data_Newtype.Newtype(function (n) {
  8103. return n;
  8104. }, Max);
  8105. var monoidMax = function monoidMax(dictBounded) {
  8106. return new Data_Monoid.Monoid(function () {
  8107. return semigroupMax(dictBounded.Ord0());
  8108. }, Data_Bounded.bottom(dictBounded));
  8109. };
  8110. var eqMax = function eqMax(dictEq) {
  8111. return dictEq;
  8112. };
  8113. var ordMax = function ordMax(dictOrd) {
  8114. return new Data_Ord.Ord(function () {
  8115. return eqMax(dictOrd.Eq0());
  8116. }, function (v) {
  8117. return function (v1) {
  8118. return Data_Ord.compare(dictOrd)(v)(v1);
  8119. };
  8120. });
  8121. };
  8122. module.exports = {
  8123. Max: Max,
  8124. newtypeMax: newtypeMax,
  8125. eqMax: eqMax,
  8126. ordMax: ordMax,
  8127. semigroupMax: semigroupMax,
  8128. monoidMax: monoidMax,
  8129. showMax: showMax
  8130. };
  8131. },{"../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Ord.Min/index.js":[function(require,module,exports) {
  8132. // Generated by purs version 0.13.6
  8133. "use strict";
  8134. var Data_Bounded = require("../Data.Bounded/index.js");
  8135. var Data_Monoid = require("../Data.Monoid/index.js");
  8136. var Data_Newtype = require("../Data.Newtype/index.js");
  8137. var Data_Ord = require("../Data.Ord/index.js");
  8138. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8139. var Data_Show = require("../Data.Show/index.js");
  8140. var Min = function Min(x) {
  8141. return x;
  8142. };
  8143. var showMin = function showMin(dictShow) {
  8144. return new Data_Show.Show(function (v) {
  8145. return "(Min " + (Data_Show.show(dictShow)(v) + ")");
  8146. });
  8147. };
  8148. var semigroupMin = function semigroupMin(dictOrd) {
  8149. return new Data_Semigroup.Semigroup(function (v) {
  8150. return function (v1) {
  8151. return Data_Ord.min(dictOrd)(v)(v1);
  8152. };
  8153. });
  8154. };
  8155. var newtypeMin = new Data_Newtype.Newtype(function (n) {
  8156. return n;
  8157. }, Min);
  8158. var monoidMin = function monoidMin(dictBounded) {
  8159. return new Data_Monoid.Monoid(function () {
  8160. return semigroupMin(dictBounded.Ord0());
  8161. }, Data_Bounded.top(dictBounded));
  8162. };
  8163. var eqMin = function eqMin(dictEq) {
  8164. return dictEq;
  8165. };
  8166. var ordMin = function ordMin(dictOrd) {
  8167. return new Data_Ord.Ord(function () {
  8168. return eqMin(dictOrd.Eq0());
  8169. }, function (v) {
  8170. return function (v1) {
  8171. return Data_Ord.compare(dictOrd)(v)(v1);
  8172. };
  8173. });
  8174. };
  8175. module.exports = {
  8176. Min: Min,
  8177. newtypeMin: newtypeMin,
  8178. eqMin: eqMin,
  8179. ordMin: ordMin,
  8180. semigroupMin: semigroupMin,
  8181. monoidMin: monoidMin,
  8182. showMin: showMin
  8183. };
  8184. },{"../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup.Foldable/index.js":[function(require,module,exports) {
  8185. // Generated by purs version 0.13.6
  8186. "use strict";
  8187. var Control_Apply = require("../Control.Apply/index.js");
  8188. var Control_Category = require("../Control.Category/index.js");
  8189. var Data_Foldable = require("../Data.Foldable/index.js");
  8190. var Data_Function = require("../Data.Function/index.js");
  8191. var Data_Functor = require("../Data.Functor/index.js");
  8192. var Data_Newtype = require("../Data.Newtype/index.js");
  8193. var Data_Ord_Max = require("../Data.Ord.Max/index.js");
  8194. var Data_Ord_Min = require("../Data.Ord.Min/index.js");
  8195. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8196. var Data_Unit = require("../Data.Unit/index.js");
  8197. var JoinWith = function JoinWith(x) {
  8198. return x;
  8199. };
  8200. var Act = function Act(x) {
  8201. return x;
  8202. };
  8203. var Foldable1 = function Foldable1(Foldable0, fold1, foldMap1) {
  8204. this.Foldable0 = Foldable0;
  8205. this.fold1 = fold1;
  8206. this.foldMap1 = foldMap1;
  8207. };
  8208. var semigroupJoinWith = function semigroupJoinWith(dictSemigroup) {
  8209. return new Data_Semigroup.Semigroup(function (v) {
  8210. return function (v1) {
  8211. return JoinWith(function (j) {
  8212. return Data_Semigroup.append(dictSemigroup)(v(j))(Data_Semigroup.append(dictSemigroup)(j)(v1(j)));
  8213. });
  8214. };
  8215. });
  8216. };
  8217. var semigroupAct = function semigroupAct(dictApply) {
  8218. return new Data_Semigroup.Semigroup(function (v) {
  8219. return function (v1) {
  8220. return Control_Apply.applySecond(dictApply)(v)(v1);
  8221. };
  8222. });
  8223. };
  8224. var joinee = function joinee(v) {
  8225. return v;
  8226. };
  8227. var getAct = function getAct(v) {
  8228. return v;
  8229. };
  8230. var foldMap1 = function foldMap1(dict) {
  8231. return dict.foldMap1;
  8232. };
  8233. var intercalateMap = function intercalateMap(dictFoldable1) {
  8234. return function (dictSemigroup) {
  8235. return function (j) {
  8236. return function (f) {
  8237. return function (foldable) {
  8238. return joinee(foldMap1(dictFoldable1)(semigroupJoinWith(dictSemigroup))(function ($43) {
  8239. return JoinWith(Data_Function["const"](f($43)));
  8240. })(foldable))(j);
  8241. };
  8242. };
  8243. };
  8244. };
  8245. };
  8246. var intercalate = function intercalate(dictFoldable1) {
  8247. return function (dictSemigroup) {
  8248. return Data_Function.flip(intercalateMap(dictFoldable1)(dictSemigroup))(Control_Category.identity(Control_Category.categoryFn));
  8249. };
  8250. };
  8251. var maximum = function maximum(dictOrd) {
  8252. return function (dictFoldable1) {
  8253. return Data_Newtype.ala(Data_Functor.functorFn)(Data_Ord_Max.newtypeMax)(Data_Ord_Max.newtypeMax)(Data_Ord_Max.Max)(foldMap1(dictFoldable1)(Data_Ord_Max.semigroupMax(dictOrd)));
  8254. };
  8255. };
  8256. var minimum = function minimum(dictOrd) {
  8257. return function (dictFoldable1) {
  8258. return Data_Newtype.ala(Data_Functor.functorFn)(Data_Ord_Min.newtypeMin)(Data_Ord_Min.newtypeMin)(Data_Ord_Min.Min)(foldMap1(dictFoldable1)(Data_Ord_Min.semigroupMin(dictOrd)));
  8259. };
  8260. };
  8261. var traverse1_ = function traverse1_(dictFoldable1) {
  8262. return function (dictApply) {
  8263. return function (f) {
  8264. return function (t) {
  8265. return Data_Functor.voidRight(dictApply.Functor0())(Data_Unit.unit)(getAct(foldMap1(dictFoldable1)(semigroupAct(dictApply))(function ($44) {
  8266. return Act(f($44));
  8267. })(t)));
  8268. };
  8269. };
  8270. };
  8271. };
  8272. var for1_ = function for1_(dictFoldable1) {
  8273. return function (dictApply) {
  8274. return Data_Function.flip(traverse1_(dictFoldable1)(dictApply));
  8275. };
  8276. };
  8277. var sequence1_ = function sequence1_(dictFoldable1) {
  8278. return function (dictApply) {
  8279. return traverse1_(dictFoldable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
  8280. };
  8281. };
  8282. var fold1Default = function fold1Default(dictFoldable1) {
  8283. return function (dictSemigroup) {
  8284. return foldMap1(dictFoldable1)(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn));
  8285. };
  8286. };
  8287. var foldableDual = new Foldable1(function () {
  8288. return Data_Foldable.foldableDual;
  8289. }, function (dictSemigroup) {
  8290. return fold1Default(foldableDual)(dictSemigroup);
  8291. }, function (dictSemigroup) {
  8292. return function (f) {
  8293. return function (v) {
  8294. return f(v);
  8295. };
  8296. };
  8297. });
  8298. var foldableMultiplicative = new Foldable1(function () {
  8299. return Data_Foldable.foldableMultiplicative;
  8300. }, function (dictSemigroup) {
  8301. return fold1Default(foldableMultiplicative)(dictSemigroup);
  8302. }, function (dictSemigroup) {
  8303. return function (f) {
  8304. return function (v) {
  8305. return f(v);
  8306. };
  8307. };
  8308. });
  8309. var fold1 = function fold1(dict) {
  8310. return dict.fold1;
  8311. };
  8312. var foldMap1Default = function foldMap1Default(dictFoldable1) {
  8313. return function (dictFunctor) {
  8314. return function (dictSemigroup) {
  8315. return function (f) {
  8316. var $45 = fold1(dictFoldable1)(dictSemigroup);
  8317. var $46 = Data_Functor.map(dictFunctor)(f);
  8318. return function ($47) {
  8319. return $45($46($47));
  8320. };
  8321. };
  8322. };
  8323. };
  8324. };
  8325. module.exports = {
  8326. Foldable1: Foldable1,
  8327. foldMap1: foldMap1,
  8328. fold1: fold1,
  8329. traverse1_: traverse1_,
  8330. for1_: for1_,
  8331. sequence1_: sequence1_,
  8332. foldMap1Default: foldMap1Default,
  8333. fold1Default: fold1Default,
  8334. intercalate: intercalate,
  8335. intercalateMap: intercalateMap,
  8336. maximum: maximum,
  8337. minimum: minimum,
  8338. foldableDual: foldableDual,
  8339. foldableMultiplicative: foldableMultiplicative
  8340. };
  8341. },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord.Max/index.js":"../output/Data.Ord.Max/index.js","../Data.Ord.Min/index.js":"../output/Data.Ord.Min/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Semigroup.Traversable/index.js":[function(require,module,exports) {
  8342. // Generated by purs version 0.13.6
  8343. "use strict";
  8344. var Control_Category = require("../Control.Category/index.js");
  8345. var Data_Functor = require("../Data.Functor/index.js");
  8346. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  8347. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  8348. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  8349. var Data_Traversable = require("../Data.Traversable/index.js");
  8350. var Traversable1 = function Traversable1(Foldable10, _Traversable, sequence1, traverse1) {
  8351. this.Foldable10 = Foldable10;
  8352. this.Traversable1 = _Traversable;
  8353. this.sequence1 = sequence1;
  8354. this.traverse1 = traverse1;
  8355. };
  8356. var traverse1 = function traverse1(dict) {
  8357. return dict.traverse1;
  8358. };
  8359. var sequence1Default = function sequence1Default(dictTraversable1) {
  8360. return function (dictApply) {
  8361. return traverse1(dictTraversable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
  8362. };
  8363. };
  8364. var traversableDual = new Traversable1(function () {
  8365. return Data_Semigroup_Foldable.foldableDual;
  8366. }, function () {
  8367. return Data_Traversable.traversableDual;
  8368. }, function (dictApply) {
  8369. return sequence1Default(traversableDual)(dictApply);
  8370. }, function (dictApply) {
  8371. return function (f) {
  8372. return function (v) {
  8373. return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Dual.Dual)(f(v));
  8374. };
  8375. };
  8376. });
  8377. var traversableMultiplicative = new Traversable1(function () {
  8378. return Data_Semigroup_Foldable.foldableMultiplicative;
  8379. }, function () {
  8380. return Data_Traversable.traversableMultiplicative;
  8381. }, function (dictApply) {
  8382. return sequence1Default(traversableMultiplicative)(dictApply);
  8383. }, function (dictApply) {
  8384. return function (f) {
  8385. return function (v) {
  8386. return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v));
  8387. };
  8388. };
  8389. });
  8390. var sequence1 = function sequence1(dict) {
  8391. return dict.sequence1;
  8392. };
  8393. var traverse1Default = function traverse1Default(dictTraversable1) {
  8394. return function (dictApply) {
  8395. return function (f) {
  8396. return function (ta) {
  8397. return sequence1(dictTraversable1)(dictApply)(Data_Functor.map(dictTraversable1.Traversable1().Functor0())(f)(ta));
  8398. };
  8399. };
  8400. };
  8401. };
  8402. module.exports = {
  8403. sequence1: sequence1,
  8404. traverse1: traverse1,
  8405. Traversable1: Traversable1,
  8406. traverse1Default: traverse1Default,
  8407. sequence1Default: sequence1Default,
  8408. traversableDual: traversableDual,
  8409. traversableMultiplicative: traversableMultiplicative
  8410. };
  8411. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Data.Identity/index.js":[function(require,module,exports) {
  8412. // Generated by purs version 0.13.6
  8413. "use strict";
  8414. var Control_Alt = require("../Control.Alt/index.js");
  8415. var Control_Applicative = require("../Control.Applicative/index.js");
  8416. var Control_Apply = require("../Control.Apply/index.js");
  8417. var Control_Bind = require("../Control.Bind/index.js");
  8418. var Control_Comonad = require("../Control.Comonad/index.js");
  8419. var Control_Extend = require("../Control.Extend/index.js");
  8420. var Control_Monad = require("../Control.Monad/index.js");
  8421. var Data_Eq = require("../Data.Eq/index.js");
  8422. var Data_Foldable = require("../Data.Foldable/index.js");
  8423. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  8424. var Data_Functor = require("../Data.Functor/index.js");
  8425. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  8426. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  8427. var Data_Newtype = require("../Data.Newtype/index.js");
  8428. var Data_Ord = require("../Data.Ord/index.js");
  8429. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  8430. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  8431. var Data_Show = require("../Data.Show/index.js");
  8432. var Data_Traversable = require("../Data.Traversable/index.js");
  8433. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  8434. var Data_Unit = require("../Data.Unit/index.js");
  8435. var Identity = function Identity(x) {
  8436. return x;
  8437. };
  8438. var showIdentity = function showIdentity(dictShow) {
  8439. return new Data_Show.Show(function (v) {
  8440. return "(Identity " + (Data_Show.show(dictShow)(v) + ")");
  8441. });
  8442. };
  8443. var semiringIdentity = function semiringIdentity(dictSemiring) {
  8444. return dictSemiring;
  8445. };
  8446. var semigroupIdenity = function semigroupIdenity(dictSemigroup) {
  8447. return dictSemigroup;
  8448. };
  8449. var ringIdentity = function ringIdentity(dictRing) {
  8450. return dictRing;
  8451. };
  8452. var ordIdentity = function ordIdentity(dictOrd) {
  8453. return dictOrd;
  8454. };
  8455. var newtypeIdentity = new Data_Newtype.Newtype(function (n) {
  8456. return n;
  8457. }, Identity);
  8458. var monoidIdentity = function monoidIdentity(dictMonoid) {
  8459. return dictMonoid;
  8460. };
  8461. var lazyIdentity = function lazyIdentity(dictLazy) {
  8462. return dictLazy;
  8463. };
  8464. var heytingAlgebraIdentity = function heytingAlgebraIdentity(dictHeytingAlgebra) {
  8465. return dictHeytingAlgebra;
  8466. };
  8467. var functorIdentity = new Data_Functor.Functor(function (f) {
  8468. return function (m) {
  8469. return f(m);
  8470. };
  8471. });
  8472. var functorWithIndexIdentity = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  8473. return functorIdentity;
  8474. }, function (f) {
  8475. return function (v) {
  8476. return f(Data_Unit.unit)(v);
  8477. };
  8478. });
  8479. var invariantIdentity = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorIdentity));
  8480. var foldableIdentity = new Data_Foldable.Foldable(function (dictMonoid) {
  8481. return function (f) {
  8482. return function (v) {
  8483. return f(v);
  8484. };
  8485. };
  8486. }, function (f) {
  8487. return function (z) {
  8488. return function (v) {
  8489. return f(z)(v);
  8490. };
  8491. };
  8492. }, function (f) {
  8493. return function (z) {
  8494. return function (v) {
  8495. return f(v)(z);
  8496. };
  8497. };
  8498. });
  8499. var foldableWithIndexIdentity = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  8500. return foldableIdentity;
  8501. }, function (dictMonoid) {
  8502. return function (f) {
  8503. return function (v) {
  8504. return f(Data_Unit.unit)(v);
  8505. };
  8506. };
  8507. }, function (f) {
  8508. return function (z) {
  8509. return function (v) {
  8510. return f(Data_Unit.unit)(z)(v);
  8511. };
  8512. };
  8513. }, function (f) {
  8514. return function (z) {
  8515. return function (v) {
  8516. return f(Data_Unit.unit)(v)(z);
  8517. };
  8518. };
  8519. });
  8520. var traversableIdentity = new Data_Traversable.Traversable(function () {
  8521. return foldableIdentity;
  8522. }, function () {
  8523. return functorIdentity;
  8524. }, function (dictApplicative) {
  8525. return function (v) {
  8526. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(v);
  8527. };
  8528. }, function (dictApplicative) {
  8529. return function (f) {
  8530. return function (v) {
  8531. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(v));
  8532. };
  8533. };
  8534. });
  8535. var traversableWithIndexIdentity = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  8536. return foldableWithIndexIdentity;
  8537. }, function () {
  8538. return functorWithIndexIdentity;
  8539. }, function () {
  8540. return traversableIdentity;
  8541. }, function (dictApplicative) {
  8542. return function (f) {
  8543. return function (v) {
  8544. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(Data_Unit.unit)(v));
  8545. };
  8546. };
  8547. });
  8548. var foldable1Identity = new Data_Semigroup_Foldable.Foldable1(function () {
  8549. return foldableIdentity;
  8550. }, function (dictSemigroup) {
  8551. return function (v) {
  8552. return v;
  8553. };
  8554. }, function (dictSemigroup) {
  8555. return function (f) {
  8556. return function (v) {
  8557. return f(v);
  8558. };
  8559. };
  8560. });
  8561. var traversable1Identity = new Data_Semigroup_Traversable.Traversable1(function () {
  8562. return foldable1Identity;
  8563. }, function () {
  8564. return traversableIdentity;
  8565. }, function (dictApply) {
  8566. return function (v) {
  8567. return Data_Functor.map(dictApply.Functor0())(Identity)(v);
  8568. };
  8569. }, function (dictApply) {
  8570. return function (f) {
  8571. return function (v) {
  8572. return Data_Functor.map(dictApply.Functor0())(Identity)(f(v));
  8573. };
  8574. };
  8575. });
  8576. var extendIdentity = new Control_Extend.Extend(function () {
  8577. return functorIdentity;
  8578. }, function (f) {
  8579. return function (m) {
  8580. return f(m);
  8581. };
  8582. });
  8583. var euclideanRingIdentity = function euclideanRingIdentity(dictEuclideanRing) {
  8584. return dictEuclideanRing;
  8585. };
  8586. var eqIdentity = function eqIdentity(dictEq) {
  8587. return dictEq;
  8588. };
  8589. var eq1Identity = new Data_Eq.Eq1(function (dictEq) {
  8590. return Data_Eq.eq(eqIdentity(dictEq));
  8591. });
  8592. var ord1Identity = new Data_Ord.Ord1(function () {
  8593. return eq1Identity;
  8594. }, function (dictOrd) {
  8595. return Data_Ord.compare(ordIdentity(dictOrd));
  8596. });
  8597. var comonadIdentity = new Control_Comonad.Comonad(function () {
  8598. return extendIdentity;
  8599. }, function (v) {
  8600. return v;
  8601. });
  8602. var commutativeRingIdentity = function commutativeRingIdentity(dictCommutativeRing) {
  8603. return dictCommutativeRing;
  8604. };
  8605. var boundedIdentity = function boundedIdentity(dictBounded) {
  8606. return dictBounded;
  8607. };
  8608. var booleanAlgebraIdentity = function booleanAlgebraIdentity(dictBooleanAlgebra) {
  8609. return dictBooleanAlgebra;
  8610. };
  8611. var applyIdentity = new Control_Apply.Apply(function () {
  8612. return functorIdentity;
  8613. }, function (v) {
  8614. return function (v1) {
  8615. return v(v1);
  8616. };
  8617. });
  8618. var bindIdentity = new Control_Bind.Bind(function () {
  8619. return applyIdentity;
  8620. }, function (v) {
  8621. return function (f) {
  8622. return f(v);
  8623. };
  8624. });
  8625. var applicativeIdentity = new Control_Applicative.Applicative(function () {
  8626. return applyIdentity;
  8627. }, Identity);
  8628. var monadIdentity = new Control_Monad.Monad(function () {
  8629. return applicativeIdentity;
  8630. }, function () {
  8631. return bindIdentity;
  8632. });
  8633. var altIdentity = new Control_Alt.Alt(function () {
  8634. return functorIdentity;
  8635. }, function (x) {
  8636. return function (v) {
  8637. return x;
  8638. };
  8639. });
  8640. module.exports = {
  8641. Identity: Identity,
  8642. newtypeIdentity: newtypeIdentity,
  8643. eqIdentity: eqIdentity,
  8644. ordIdentity: ordIdentity,
  8645. boundedIdentity: boundedIdentity,
  8646. heytingAlgebraIdentity: heytingAlgebraIdentity,
  8647. booleanAlgebraIdentity: booleanAlgebraIdentity,
  8648. semigroupIdenity: semigroupIdenity,
  8649. monoidIdentity: monoidIdentity,
  8650. semiringIdentity: semiringIdentity,
  8651. euclideanRingIdentity: euclideanRingIdentity,
  8652. ringIdentity: ringIdentity,
  8653. commutativeRingIdentity: commutativeRingIdentity,
  8654. lazyIdentity: lazyIdentity,
  8655. showIdentity: showIdentity,
  8656. eq1Identity: eq1Identity,
  8657. ord1Identity: ord1Identity,
  8658. functorIdentity: functorIdentity,
  8659. functorWithIndexIdentity: functorWithIndexIdentity,
  8660. invariantIdentity: invariantIdentity,
  8661. altIdentity: altIdentity,
  8662. applyIdentity: applyIdentity,
  8663. applicativeIdentity: applicativeIdentity,
  8664. bindIdentity: bindIdentity,
  8665. monadIdentity: monadIdentity,
  8666. extendIdentity: extendIdentity,
  8667. comonadIdentity: comonadIdentity,
  8668. foldableIdentity: foldableIdentity,
  8669. foldable1Identity: foldable1Identity,
  8670. foldableWithIndexIdentity: foldableWithIndexIdentity,
  8671. traversableIdentity: traversableIdentity,
  8672. traversable1Identity: traversable1Identity,
  8673. traversableWithIndexIdentity: traversableWithIndexIdentity
  8674. };
  8675. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Effect.Ref/foreign.js":[function(require,module,exports) {
  8676. "use strict";
  8677. exports.new = function (val) {
  8678. return function () {
  8679. return {
  8680. value: val
  8681. };
  8682. };
  8683. };
  8684. exports.read = function (ref) {
  8685. return function () {
  8686. return ref.value;
  8687. };
  8688. };
  8689. exports["modify'"] = function (f) {
  8690. return function (ref) {
  8691. return function () {
  8692. var t = f(ref.value);
  8693. ref.value = t.state;
  8694. return t.value;
  8695. };
  8696. };
  8697. };
  8698. exports.write = function (val) {
  8699. return function (ref) {
  8700. return function () {
  8701. ref.value = val;
  8702. return {};
  8703. };
  8704. };
  8705. };
  8706. },{}],"../output/Effect.Ref/index.js":[function(require,module,exports) {
  8707. // Generated by purs version 0.13.6
  8708. "use strict";
  8709. var $foreign = require("./foreign.js");
  8710. var Data_Functor = require("../Data.Functor/index.js");
  8711. var Effect = require("../Effect/index.js");
  8712. var modify = function modify(f) {
  8713. return $foreign["modify'"](function (s) {
  8714. var s$prime = f(s);
  8715. return {
  8716. state: s$prime,
  8717. value: s$prime
  8718. };
  8719. });
  8720. };
  8721. var modify_ = function modify_(f) {
  8722. return function (s) {
  8723. return Data_Functor["void"](Effect.functorEffect)(modify(f)(s));
  8724. };
  8725. };
  8726. module.exports = {
  8727. modify: modify,
  8728. modify_: modify_,
  8729. "new": $foreign["new"],
  8730. read: $foreign.read,
  8731. "modify'": $foreign["modify'"],
  8732. write: $foreign.write
  8733. };
  8734. },{"./foreign.js":"../output/Effect.Ref/foreign.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Effect/index.js":"../output/Effect/index.js"}],"../output/Control.Monad.Rec.Class/index.js":[function(require,module,exports) {
  8735. // Generated by purs version 0.13.6
  8736. "use strict";
  8737. var Control_Bind = require("../Control.Bind/index.js");
  8738. var Control_Monad = require("../Control.Monad/index.js");
  8739. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  8740. var Data_Either = require("../Data.Either/index.js");
  8741. var Data_Functor = require("../Data.Functor/index.js");
  8742. var Data_Identity = require("../Data.Identity/index.js");
  8743. var Data_Maybe = require("../Data.Maybe/index.js");
  8744. var Data_Monoid = require("../Data.Monoid/index.js");
  8745. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8746. var Data_Unit = require("../Data.Unit/index.js");
  8747. var Effect = require("../Effect/index.js");
  8748. var Effect_Ref = require("../Effect.Ref/index.js");
  8749. var Loop = function () {
  8750. function Loop(value0) {
  8751. this.value0 = value0;
  8752. }
  8753. ;
  8754. Loop.create = function (value0) {
  8755. return new Loop(value0);
  8756. };
  8757. return Loop;
  8758. }();
  8759. var Done = function () {
  8760. function Done(value0) {
  8761. this.value0 = value0;
  8762. }
  8763. ;
  8764. Done.create = function (value0) {
  8765. return new Done(value0);
  8766. };
  8767. return Done;
  8768. }();
  8769. var MonadRec = function MonadRec(Monad0, tailRecM) {
  8770. this.Monad0 = Monad0;
  8771. this.tailRecM = tailRecM;
  8772. };
  8773. var tailRecM = function tailRecM(dict) {
  8774. return dict.tailRecM;
  8775. };
  8776. var tailRecM2 = function tailRecM2(dictMonadRec) {
  8777. return function (f) {
  8778. return function (a) {
  8779. return function (b) {
  8780. return tailRecM(dictMonadRec)(function (o) {
  8781. return f(o.a)(o.b);
  8782. })({
  8783. a: a,
  8784. b: b
  8785. });
  8786. };
  8787. };
  8788. };
  8789. };
  8790. var tailRecM3 = function tailRecM3(dictMonadRec) {
  8791. return function (f) {
  8792. return function (a) {
  8793. return function (b) {
  8794. return function (c) {
  8795. return tailRecM(dictMonadRec)(function (o) {
  8796. return f(o.a)(o.b)(o.c);
  8797. })({
  8798. a: a,
  8799. b: b,
  8800. c: c
  8801. });
  8802. };
  8803. };
  8804. };
  8805. };
  8806. };
  8807. var untilJust = function untilJust(dictMonadRec) {
  8808. return function (m) {
  8809. return tailRecM(dictMonadRec)(function (v) {
  8810. return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(m)(function (v1) {
  8811. if (v1 instanceof Data_Maybe.Nothing) {
  8812. return new Loop(Data_Unit.unit);
  8813. }
  8814. ;
  8815. if (v1 instanceof Data_Maybe.Just) {
  8816. return new Done(v1.value0);
  8817. }
  8818. ;
  8819. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 155, column 43 - line 157, column 19): " + [v1.constructor.name]);
  8820. });
  8821. })(Data_Unit.unit);
  8822. };
  8823. };
  8824. var whileJust = function whileJust(dictMonoid) {
  8825. return function (dictMonadRec) {
  8826. return function (m) {
  8827. return tailRecM(dictMonadRec)(function (v) {
  8828. return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(m)(function (v1) {
  8829. if (v1 instanceof Data_Maybe.Nothing) {
  8830. return new Done(v);
  8831. }
  8832. ;
  8833. if (v1 instanceof Data_Maybe.Just) {
  8834. return Loop.create(Data_Semigroup.append(dictMonoid.Semigroup0())(v)(v1.value0));
  8835. }
  8836. ;
  8837. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 148, column 45 - line 150, column 26): " + [v1.constructor.name]);
  8838. });
  8839. })(Data_Monoid.mempty(dictMonoid));
  8840. };
  8841. };
  8842. };
  8843. var tailRec = function tailRec(f) {
  8844. var go = function go($copy_v) {
  8845. var $tco_done = false;
  8846. var $tco_result;
  8847. function $tco_loop(v) {
  8848. if (v instanceof Loop) {
  8849. $copy_v = f(v.value0);
  8850. return;
  8851. }
  8852. ;
  8853. if (v instanceof Done) {
  8854. $tco_done = true;
  8855. return v.value0;
  8856. }
  8857. ;
  8858. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 93, column 3 - line 93, column 25): " + [v.constructor.name]);
  8859. }
  8860. ;
  8861. while (!$tco_done) {
  8862. $tco_result = $tco_loop($copy_v);
  8863. }
  8864. ;
  8865. return $tco_result;
  8866. };
  8867. return function ($58) {
  8868. return go(f($58));
  8869. };
  8870. };
  8871. var monadRecMaybe = new MonadRec(function () {
  8872. return Data_Maybe.monadMaybe;
  8873. }, function (f) {
  8874. return function (a0) {
  8875. var g = function g(v) {
  8876. if (v instanceof Data_Maybe.Nothing) {
  8877. return new Done(Data_Maybe.Nothing.value);
  8878. }
  8879. ;
  8880. if (v instanceof Data_Maybe.Just && v.value0 instanceof Loop) {
  8881. return new Loop(f(v.value0.value0));
  8882. }
  8883. ;
  8884. if (v instanceof Data_Maybe.Just && v.value0 instanceof Done) {
  8885. return new Done(new Data_Maybe.Just(v.value0.value0));
  8886. }
  8887. ;
  8888. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 129, column 7 - line 129, column 31): " + [v.constructor.name]);
  8889. };
  8890. return tailRec(g)(f(a0));
  8891. };
  8892. });
  8893. var monadRecIdentity = new MonadRec(function () {
  8894. return Data_Identity.monadIdentity;
  8895. }, function (f) {
  8896. var runIdentity = function runIdentity(v) {
  8897. return v;
  8898. };
  8899. var $59 = tailRec(function ($61) {
  8900. return runIdentity(f($61));
  8901. });
  8902. return function ($60) {
  8903. return Data_Identity.Identity($59($60));
  8904. };
  8905. });
  8906. var monadRecFunction = new MonadRec(function () {
  8907. return Control_Monad.monadFn;
  8908. }, function (f) {
  8909. return function (a0) {
  8910. return function (e) {
  8911. return tailRec(function (a) {
  8912. return f(a)(e);
  8913. })(a0);
  8914. };
  8915. };
  8916. });
  8917. var monadRecEither = new MonadRec(function () {
  8918. return Data_Either.monadEither;
  8919. }, function (f) {
  8920. return function (a0) {
  8921. var g = function g(v) {
  8922. if (v instanceof Data_Either.Left) {
  8923. return new Done(new Data_Either.Left(v.value0));
  8924. }
  8925. ;
  8926. if (v instanceof Data_Either.Right && v.value0 instanceof Loop) {
  8927. return new Loop(f(v.value0.value0));
  8928. }
  8929. ;
  8930. if (v instanceof Data_Either.Right && v.value0 instanceof Done) {
  8931. return new Done(new Data_Either.Right(v.value0.value0));
  8932. }
  8933. ;
  8934. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 121, column 7 - line 121, column 33): " + [v.constructor.name]);
  8935. };
  8936. return tailRec(g)(f(a0));
  8937. };
  8938. });
  8939. var monadRecEffect = new MonadRec(function () {
  8940. return Effect.monadEffect;
  8941. }, function (f) {
  8942. return function (a) {
  8943. var fromDone = function fromDone(v) {
  8944. if (v instanceof Done) {
  8945. return v.value0;
  8946. }
  8947. ;
  8948. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 113, column 30 - line 113, column 44): " + [v.constructor.name]);
  8949. };
  8950. return function __do() {
  8951. var r = Control_Bind.bindFlipped(Effect.bindEffect)(Effect_Ref["new"])(f(a))();
  8952. (function () {
  8953. while (!function __do() {
  8954. var v = Effect_Ref.read(r)();
  8955. if (v instanceof Loop) {
  8956. var e = f(v.value0)();
  8957. Effect_Ref.write(e)(r)();
  8958. return false;
  8959. }
  8960. ;
  8961. if (v instanceof Done) {
  8962. return true;
  8963. }
  8964. ;
  8965. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 104, column 22 - line 109, column 28): " + [v.constructor.name]);
  8966. }()) {}
  8967. ;
  8968. return {};
  8969. })();
  8970. return Data_Functor.map(Effect.functorEffect)(fromDone)(Effect_Ref.read(r))();
  8971. };
  8972. };
  8973. });
  8974. var functorStep = new Data_Functor.Functor(function (f) {
  8975. return function (m) {
  8976. if (m instanceof Loop) {
  8977. return new Loop(m.value0);
  8978. }
  8979. ;
  8980. if (m instanceof Done) {
  8981. return new Done(f(m.value0));
  8982. }
  8983. ;
  8984. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 27, column 1 - line 27, column 48): " + [m.constructor.name]);
  8985. };
  8986. });
  8987. var forever = function forever(dictMonadRec) {
  8988. return function (ma) {
  8989. return tailRecM(dictMonadRec)(function (u) {
  8990. return Data_Functor.voidRight(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(new Loop(u))(ma);
  8991. })(Data_Unit.unit);
  8992. };
  8993. };
  8994. var bifunctorStep = new Data_Bifunctor.Bifunctor(function (v) {
  8995. return function (v1) {
  8996. return function (v2) {
  8997. if (v2 instanceof Loop) {
  8998. return new Loop(v(v2.value0));
  8999. }
  9000. ;
  9001. if (v2 instanceof Done) {
  9002. return new Done(v1(v2.value0));
  9003. }
  9004. ;
  9005. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 29, column 1 - line 31, column 34): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  9006. };
  9007. };
  9008. });
  9009. module.exports = {
  9010. Loop: Loop,
  9011. Done: Done,
  9012. MonadRec: MonadRec,
  9013. tailRec: tailRec,
  9014. tailRecM: tailRecM,
  9015. tailRecM2: tailRecM2,
  9016. tailRecM3: tailRecM3,
  9017. forever: forever,
  9018. whileJust: whileJust,
  9019. untilJust: untilJust,
  9020. functorStep: functorStep,
  9021. bifunctorStep: bifunctorStep,
  9022. monadRecIdentity: monadRecIdentity,
  9023. monadRecEffect: monadRecEffect,
  9024. monadRecFunction: monadRecFunction,
  9025. monadRecEither: monadRecEither,
  9026. monadRecMaybe: monadRecMaybe
  9027. };
  9028. },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Ref/index.js":"../output/Effect.Ref/index.js"}],"../output/Control.Lazy/index.js":[function(require,module,exports) {
  9029. // Generated by purs version 0.13.6
  9030. "use strict";
  9031. var Data_Unit = require("../Data.Unit/index.js");
  9032. var Lazy = function Lazy(defer) {
  9033. this.defer = defer;
  9034. };
  9035. var lazyUnit = new Lazy(function (v) {
  9036. return Data_Unit.unit;
  9037. });
  9038. var lazyFn = new Lazy(function (f) {
  9039. return function (x) {
  9040. return f(Data_Unit.unit)(x);
  9041. };
  9042. });
  9043. var defer = function defer(dict) {
  9044. return dict.defer;
  9045. };
  9046. var fix = function fix(dictLazy) {
  9047. return function (f) {
  9048. var go = defer(dictLazy)(function (v) {
  9049. return f(go);
  9050. });
  9051. return go;
  9052. };
  9053. };
  9054. module.exports = {
  9055. defer: defer,
  9056. Lazy: Lazy,
  9057. fix: fix,
  9058. lazyFn: lazyFn,
  9059. lazyUnit: lazyUnit
  9060. };
  9061. },{"../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.BooleanAlgebra/index.js":[function(require,module,exports) {
  9062. // Generated by purs version 0.13.6
  9063. "use strict";
  9064. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  9065. var BooleanAlgebraRecord = function BooleanAlgebraRecord(HeytingAlgebraRecord0) {
  9066. this.HeytingAlgebraRecord0 = HeytingAlgebraRecord0;
  9067. };
  9068. var BooleanAlgebra = function BooleanAlgebra(HeytingAlgebra0) {
  9069. this.HeytingAlgebra0 = HeytingAlgebra0;
  9070. };
  9071. var booleanAlgebraUnit = new BooleanAlgebra(function () {
  9072. return Data_HeytingAlgebra.heytingAlgebraUnit;
  9073. });
  9074. var booleanAlgebraRecordNil = new BooleanAlgebraRecord(function () {
  9075. return Data_HeytingAlgebra.heytingAlgebraRecordNil;
  9076. });
  9077. var booleanAlgebraRecordCons = function booleanAlgebraRecordCons(dictIsSymbol) {
  9078. return function (dictCons) {
  9079. return function (dictBooleanAlgebraRecord) {
  9080. return function (dictBooleanAlgebra) {
  9081. return new BooleanAlgebraRecord(function () {
  9082. return Data_HeytingAlgebra.heytingAlgebraRecordCons(dictIsSymbol)()(dictBooleanAlgebraRecord.HeytingAlgebraRecord0())(dictBooleanAlgebra.HeytingAlgebra0());
  9083. });
  9084. };
  9085. };
  9086. };
  9087. };
  9088. var booleanAlgebraRecord = function booleanAlgebraRecord(dictRowToList) {
  9089. return function (dictBooleanAlgebraRecord) {
  9090. return new BooleanAlgebra(function () {
  9091. return Data_HeytingAlgebra.heytingAlgebraRecord()(dictBooleanAlgebraRecord.HeytingAlgebraRecord0());
  9092. });
  9093. };
  9094. };
  9095. var booleanAlgebraFn = function booleanAlgebraFn(dictBooleanAlgebra) {
  9096. return new BooleanAlgebra(function () {
  9097. return Data_HeytingAlgebra.heytingAlgebraFunction(dictBooleanAlgebra.HeytingAlgebra0());
  9098. });
  9099. };
  9100. var booleanAlgebraBoolean = new BooleanAlgebra(function () {
  9101. return Data_HeytingAlgebra.heytingAlgebraBoolean;
  9102. });
  9103. module.exports = {
  9104. BooleanAlgebra: BooleanAlgebra,
  9105. BooleanAlgebraRecord: BooleanAlgebraRecord,
  9106. booleanAlgebraBoolean: booleanAlgebraBoolean,
  9107. booleanAlgebraUnit: booleanAlgebraUnit,
  9108. booleanAlgebraFn: booleanAlgebraFn,
  9109. booleanAlgebraRecord: booleanAlgebraRecord,
  9110. booleanAlgebraRecordNil: booleanAlgebraRecordNil,
  9111. booleanAlgebraRecordCons: booleanAlgebraRecordCons
  9112. };
  9113. },{"../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js"}],"../output/Data.Distributive/index.js":[function(require,module,exports) {
  9114. // Generated by purs version 0.13.6
  9115. "use strict";
  9116. var Control_Category = require("../Control.Category/index.js");
  9117. var Data_Functor = require("../Data.Functor/index.js");
  9118. var Data_Identity = require("../Data.Identity/index.js");
  9119. var Data_Newtype = require("../Data.Newtype/index.js");
  9120. var Distributive = function Distributive(Functor0, collect, distribute) {
  9121. this.Functor0 = Functor0;
  9122. this.collect = collect;
  9123. this.distribute = distribute;
  9124. };
  9125. var distributiveIdentity = new Distributive(function () {
  9126. return Data_Identity.functorIdentity;
  9127. }, function (dictFunctor) {
  9128. return function (f) {
  9129. var $11 = Data_Functor.map(dictFunctor)(function () {
  9130. var $13 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  9131. return function ($14) {
  9132. return $13(f($14));
  9133. };
  9134. }());
  9135. return function ($12) {
  9136. return Data_Identity.Identity($11($12));
  9137. };
  9138. };
  9139. }, function (dictFunctor) {
  9140. var $15 = Data_Functor.map(dictFunctor)(Data_Newtype.unwrap(Data_Identity.newtypeIdentity));
  9141. return function ($16) {
  9142. return Data_Identity.Identity($15($16));
  9143. };
  9144. });
  9145. var distribute = function distribute(dict) {
  9146. return dict.distribute;
  9147. };
  9148. var distributiveFunction = new Distributive(function () {
  9149. return Data_Functor.functorFn;
  9150. }, function (dictFunctor) {
  9151. return function (f) {
  9152. var $17 = distribute(distributiveFunction)(dictFunctor);
  9153. var $18 = Data_Functor.map(dictFunctor)(f);
  9154. return function ($19) {
  9155. return $17($18($19));
  9156. };
  9157. };
  9158. }, function (dictFunctor) {
  9159. return function (a) {
  9160. return function (e) {
  9161. return Data_Functor.map(dictFunctor)(function (v) {
  9162. return v(e);
  9163. })(a);
  9164. };
  9165. };
  9166. });
  9167. var cotraverse = function cotraverse(dictDistributive) {
  9168. return function (dictFunctor) {
  9169. return function (f) {
  9170. var $20 = Data_Functor.map(dictDistributive.Functor0())(f);
  9171. var $21 = distribute(dictDistributive)(dictFunctor);
  9172. return function ($22) {
  9173. return $20($21($22));
  9174. };
  9175. };
  9176. };
  9177. };
  9178. var collectDefault = function collectDefault(dictDistributive) {
  9179. return function (dictFunctor) {
  9180. return function (f) {
  9181. var $23 = distribute(dictDistributive)(dictFunctor);
  9182. var $24 = Data_Functor.map(dictFunctor)(f);
  9183. return function ($25) {
  9184. return $23($24($25));
  9185. };
  9186. };
  9187. };
  9188. };
  9189. var collect = function collect(dict) {
  9190. return dict.collect;
  9191. };
  9192. var distributeDefault = function distributeDefault(dictDistributive) {
  9193. return function (dictFunctor) {
  9194. return collect(dictDistributive)(dictFunctor)(Control_Category.identity(Control_Category.categoryFn));
  9195. };
  9196. };
  9197. module.exports = {
  9198. collect: collect,
  9199. distribute: distribute,
  9200. Distributive: Distributive,
  9201. distributeDefault: distributeDefault,
  9202. collectDefault: collectDefault,
  9203. cotraverse: cotraverse,
  9204. distributiveIdentity: distributiveIdentity,
  9205. distributiveFunction: distributiveFunction
  9206. };
  9207. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Type.Equality/index.js":[function(require,module,exports) {
  9208. // Generated by purs version 0.13.6
  9209. "use strict";
  9210. var TypeEquals = function TypeEquals(from, to) {
  9211. this.from = from;
  9212. this.to = to;
  9213. };
  9214. var to = function to(dict) {
  9215. return dict.to;
  9216. };
  9217. var refl = new TypeEquals(function (a) {
  9218. return a;
  9219. }, function (a) {
  9220. return a;
  9221. });
  9222. var from = function from(dict) {
  9223. return dict.from;
  9224. };
  9225. module.exports = {
  9226. TypeEquals: TypeEquals,
  9227. to: to,
  9228. from: from,
  9229. refl: refl
  9230. };
  9231. },{}],"../output/Data.Tuple/index.js":[function(require,module,exports) {
  9232. // Generated by purs version 0.13.6
  9233. "use strict";
  9234. var Control_Applicative = require("../Control.Applicative/index.js");
  9235. var Control_Apply = require("../Control.Apply/index.js");
  9236. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  9237. var Control_Biapply = require("../Control.Biapply/index.js");
  9238. var Control_Bind = require("../Control.Bind/index.js");
  9239. var Control_Comonad = require("../Control.Comonad/index.js");
  9240. var Control_Extend = require("../Control.Extend/index.js");
  9241. var Control_Lazy = require("../Control.Lazy/index.js");
  9242. var Control_Monad = require("../Control.Monad/index.js");
  9243. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  9244. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  9245. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  9246. var Data_Bitraversable = require("../Data.Bitraversable/index.js");
  9247. var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
  9248. var Data_Bounded = require("../Data.Bounded/index.js");
  9249. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  9250. var Data_Distributive = require("../Data.Distributive/index.js");
  9251. var Data_Eq = require("../Data.Eq/index.js");
  9252. var Data_Foldable = require("../Data.Foldable/index.js");
  9253. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  9254. var Data_Functor = require("../Data.Functor/index.js");
  9255. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  9256. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  9257. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  9258. var Data_Maybe = require("../Data.Maybe/index.js");
  9259. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  9260. var Data_Monoid = require("../Data.Monoid/index.js");
  9261. var Data_Newtype = require("../Data.Newtype/index.js");
  9262. var Data_Ord = require("../Data.Ord/index.js");
  9263. var Data_Ordering = require("../Data.Ordering/index.js");
  9264. var Data_Ring = require("../Data.Ring/index.js");
  9265. var Data_Semigroup = require("../Data.Semigroup/index.js");
  9266. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  9267. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  9268. var Data_Semiring = require("../Data.Semiring/index.js");
  9269. var Data_Show = require("../Data.Show/index.js");
  9270. var Data_Traversable = require("../Data.Traversable/index.js");
  9271. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  9272. var Data_Unit = require("../Data.Unit/index.js");
  9273. var Type_Equality = require("../Type.Equality/index.js");
  9274. var Tuple = function () {
  9275. function Tuple(value0, value1) {
  9276. this.value0 = value0;
  9277. this.value1 = value1;
  9278. }
  9279. ;
  9280. Tuple.create = function (value0) {
  9281. return function (value1) {
  9282. return new Tuple(value0, value1);
  9283. };
  9284. };
  9285. return Tuple;
  9286. }();
  9287. var uncurry = function uncurry(f) {
  9288. return function (v) {
  9289. return f(v.value0)(v.value1);
  9290. };
  9291. };
  9292. var swap = function swap(v) {
  9293. return new Tuple(v.value1, v.value0);
  9294. };
  9295. var snd = function snd(v) {
  9296. return v.value1;
  9297. };
  9298. var showTuple = function showTuple(dictShow) {
  9299. return function (dictShow1) {
  9300. return new Data_Show.Show(function (v) {
  9301. return "(Tuple " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
  9302. });
  9303. };
  9304. };
  9305. var semiringTuple = function semiringTuple(dictSemiring) {
  9306. return function (dictSemiring1) {
  9307. return new Data_Semiring.Semiring(function (v) {
  9308. return function (v1) {
  9309. return new Tuple(Data_Semiring.add(dictSemiring)(v.value0)(v1.value0), Data_Semiring.add(dictSemiring1)(v.value1)(v1.value1));
  9310. };
  9311. }, function (v) {
  9312. return function (v1) {
  9313. return new Tuple(Data_Semiring.mul(dictSemiring)(v.value0)(v1.value0), Data_Semiring.mul(dictSemiring1)(v.value1)(v1.value1));
  9314. };
  9315. }, new Tuple(Data_Semiring.one(dictSemiring), Data_Semiring.one(dictSemiring1)), new Tuple(Data_Semiring.zero(dictSemiring), Data_Semiring.zero(dictSemiring1)));
  9316. };
  9317. };
  9318. var semigroupoidTuple = new Control_Semigroupoid.Semigroupoid(function (v) {
  9319. return function (v1) {
  9320. return new Tuple(v1.value0, v.value1);
  9321. };
  9322. });
  9323. var semigroupTuple = function semigroupTuple(dictSemigroup) {
  9324. return function (dictSemigroup1) {
  9325. return new Data_Semigroup.Semigroup(function (v) {
  9326. return function (v1) {
  9327. return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), Data_Semigroup.append(dictSemigroup1)(v.value1)(v1.value1));
  9328. };
  9329. });
  9330. };
  9331. };
  9332. var ringTuple = function ringTuple(dictRing) {
  9333. return function (dictRing1) {
  9334. return new Data_Ring.Ring(function () {
  9335. return semiringTuple(dictRing.Semiring0())(dictRing1.Semiring0());
  9336. }, function (v) {
  9337. return function (v1) {
  9338. return new Tuple(Data_Ring.sub(dictRing)(v.value0)(v1.value0), Data_Ring.sub(dictRing1)(v.value1)(v1.value1));
  9339. };
  9340. });
  9341. };
  9342. };
  9343. var monoidTuple = function monoidTuple(dictMonoid) {
  9344. return function (dictMonoid1) {
  9345. return new Data_Monoid.Monoid(function () {
  9346. return semigroupTuple(dictMonoid.Semigroup0())(dictMonoid1.Semigroup0());
  9347. }, new Tuple(Data_Monoid.mempty(dictMonoid), Data_Monoid.mempty(dictMonoid1)));
  9348. };
  9349. };
  9350. var lookup = function lookup(dictFoldable) {
  9351. return function (dictEq) {
  9352. return function (a) {
  9353. var $312 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
  9354. var $313 = Data_Foldable.foldMap(dictFoldable)(Data_Maybe_First.monoidFirst)(function (v) {
  9355. var $163 = Data_Eq.eq(dictEq)(a)(v.value0);
  9356. if ($163) {
  9357. return new Data_Maybe.Just(v.value1);
  9358. }
  9359. ;
  9360. return Data_Maybe.Nothing.value;
  9361. });
  9362. return function ($314) {
  9363. return $312($313($314));
  9364. };
  9365. };
  9366. };
  9367. };
  9368. var heytingAlgebraTuple = function heytingAlgebraTuple(dictHeytingAlgebra) {
  9369. return function (dictHeytingAlgebra1) {
  9370. return new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  9371. return function (v1) {
  9372. return new Tuple(Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.conj(dictHeytingAlgebra1)(v.value1)(v1.value1));
  9373. };
  9374. }, function (v) {
  9375. return function (v1) {
  9376. return new Tuple(Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.disj(dictHeytingAlgebra1)(v.value1)(v1.value1));
  9377. };
  9378. }, new Tuple(Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra1)), function (v) {
  9379. return function (v1) {
  9380. return new Tuple(Data_HeytingAlgebra.implies(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.implies(dictHeytingAlgebra1)(v.value1)(v1.value1));
  9381. };
  9382. }, function (v) {
  9383. return new Tuple(Data_HeytingAlgebra.not(dictHeytingAlgebra)(v.value0), Data_HeytingAlgebra.not(dictHeytingAlgebra1)(v.value1));
  9384. }, new Tuple(Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra1)));
  9385. };
  9386. };
  9387. var functorTuple = new Data_Functor.Functor(function (f) {
  9388. return function (m) {
  9389. return new Tuple(m.value0, f(m.value1));
  9390. };
  9391. });
  9392. var functorWithIndexTuple = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  9393. return functorTuple;
  9394. }, function (f) {
  9395. return Data_Functor.map(functorTuple)(f(Data_Unit.unit));
  9396. });
  9397. var invariantTuple = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorTuple));
  9398. var fst = function fst(v) {
  9399. return v.value0;
  9400. };
  9401. var lazyTuple = function lazyTuple(dictLazy) {
  9402. return function (dictLazy1) {
  9403. return new Control_Lazy.Lazy(function (f) {
  9404. return new Tuple(Control_Lazy.defer(dictLazy)(function (v) {
  9405. return fst(f(Data_Unit.unit));
  9406. }), Control_Lazy.defer(dictLazy1)(function (v) {
  9407. return snd(f(Data_Unit.unit));
  9408. }));
  9409. });
  9410. };
  9411. };
  9412. var foldableTuple = new Data_Foldable.Foldable(function (dictMonoid) {
  9413. return function (f) {
  9414. return function (v) {
  9415. return f(v.value1);
  9416. };
  9417. };
  9418. }, function (f) {
  9419. return function (z) {
  9420. return function (v) {
  9421. return f(z)(v.value1);
  9422. };
  9423. };
  9424. }, function (f) {
  9425. return function (z) {
  9426. return function (v) {
  9427. return f(v.value1)(z);
  9428. };
  9429. };
  9430. });
  9431. var foldableWithIndexTuple = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  9432. return foldableTuple;
  9433. }, function (dictMonoid) {
  9434. return function (f) {
  9435. return function (v) {
  9436. return f(Data_Unit.unit)(v.value1);
  9437. };
  9438. };
  9439. }, function (f) {
  9440. return function (z) {
  9441. return function (v) {
  9442. return f(Data_Unit.unit)(z)(v.value1);
  9443. };
  9444. };
  9445. }, function (f) {
  9446. return function (z) {
  9447. return function (v) {
  9448. return f(Data_Unit.unit)(v.value1)(z);
  9449. };
  9450. };
  9451. });
  9452. var traversableTuple = new Data_Traversable.Traversable(function () {
  9453. return foldableTuple;
  9454. }, function () {
  9455. return functorTuple;
  9456. }, function (dictApplicative) {
  9457. return function (v) {
  9458. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(v.value1);
  9459. };
  9460. }, function (dictApplicative) {
  9461. return function (f) {
  9462. return function (v) {
  9463. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(v.value1));
  9464. };
  9465. };
  9466. });
  9467. var traversableWithIndexTuple = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  9468. return foldableWithIndexTuple;
  9469. }, function () {
  9470. return functorWithIndexTuple;
  9471. }, function () {
  9472. return traversableTuple;
  9473. }, function (dictApplicative) {
  9474. return function (f) {
  9475. return function (v) {
  9476. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(Data_Unit.unit)(v.value1));
  9477. };
  9478. };
  9479. });
  9480. var foldable1Tuple = new Data_Semigroup_Foldable.Foldable1(function () {
  9481. return foldableTuple;
  9482. }, function (dictSemigroup) {
  9483. return function (v) {
  9484. return v.value1;
  9485. };
  9486. }, function (dictSemigroup) {
  9487. return function (f) {
  9488. return function (v) {
  9489. return f(v.value1);
  9490. };
  9491. };
  9492. });
  9493. var traversable1Tuple = new Data_Semigroup_Traversable.Traversable1(function () {
  9494. return foldable1Tuple;
  9495. }, function () {
  9496. return traversableTuple;
  9497. }, function (dictApply) {
  9498. return function (v) {
  9499. return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(v.value1);
  9500. };
  9501. }, function (dictApply) {
  9502. return function (f) {
  9503. return function (v) {
  9504. return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(f(v.value1));
  9505. };
  9506. };
  9507. });
  9508. var extendTuple = new Control_Extend.Extend(function () {
  9509. return functorTuple;
  9510. }, function (f) {
  9511. return function (v) {
  9512. return new Tuple(v.value0, f(v));
  9513. };
  9514. });
  9515. var eqTuple = function eqTuple(dictEq) {
  9516. return function (dictEq1) {
  9517. return new Data_Eq.Eq(function (x) {
  9518. return function (y) {
  9519. return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1);
  9520. };
  9521. });
  9522. };
  9523. };
  9524. var ordTuple = function ordTuple(dictOrd) {
  9525. return function (dictOrd1) {
  9526. return new Data_Ord.Ord(function () {
  9527. return eqTuple(dictOrd.Eq0())(dictOrd1.Eq0());
  9528. }, function (x) {
  9529. return function (y) {
  9530. var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  9531. if (v instanceof Data_Ordering.LT) {
  9532. return Data_Ordering.LT.value;
  9533. }
  9534. ;
  9535. if (v instanceof Data_Ordering.GT) {
  9536. return Data_Ordering.GT.value;
  9537. }
  9538. ;
  9539. return Data_Ord.compare(dictOrd1)(x.value1)(y.value1);
  9540. };
  9541. });
  9542. };
  9543. };
  9544. var eq1Tuple = function eq1Tuple(dictEq) {
  9545. return new Data_Eq.Eq1(function (dictEq1) {
  9546. return Data_Eq.eq(eqTuple(dictEq)(dictEq1));
  9547. });
  9548. };
  9549. var ord1Tuple = function ord1Tuple(dictOrd) {
  9550. return new Data_Ord.Ord1(function () {
  9551. return eq1Tuple(dictOrd.Eq0());
  9552. }, function (dictOrd1) {
  9553. return Data_Ord.compare(ordTuple(dictOrd)(dictOrd1));
  9554. });
  9555. };
  9556. var distributiveTuple = function distributiveTuple(dictTypeEquals) {
  9557. return new Data_Distributive.Distributive(function () {
  9558. return functorTuple;
  9559. }, function (dictFunctor) {
  9560. return Data_Distributive.collectDefault(distributiveTuple(dictTypeEquals))(dictFunctor);
  9561. }, function (dictFunctor) {
  9562. var $315 = Tuple.create(Type_Equality.from(dictTypeEquals)(Data_Unit.unit));
  9563. var $316 = Data_Functor.map(dictFunctor)(snd);
  9564. return function ($317) {
  9565. return $315($316($317));
  9566. };
  9567. });
  9568. };
  9569. var curry = function curry(f) {
  9570. return function (a) {
  9571. return function (b) {
  9572. return f(new Tuple(a, b));
  9573. };
  9574. };
  9575. };
  9576. var comonadTuple = new Control_Comonad.Comonad(function () {
  9577. return extendTuple;
  9578. }, snd);
  9579. var commutativeRingTuple = function commutativeRingTuple(dictCommutativeRing) {
  9580. return function (dictCommutativeRing1) {
  9581. return new Data_CommutativeRing.CommutativeRing(function () {
  9582. return ringTuple(dictCommutativeRing.Ring0())(dictCommutativeRing1.Ring0());
  9583. });
  9584. };
  9585. };
  9586. var boundedTuple = function boundedTuple(dictBounded) {
  9587. return function (dictBounded1) {
  9588. return new Data_Bounded.Bounded(function () {
  9589. return ordTuple(dictBounded.Ord0())(dictBounded1.Ord0());
  9590. }, new Tuple(Data_Bounded.bottom(dictBounded), Data_Bounded.bottom(dictBounded1)), new Tuple(Data_Bounded.top(dictBounded), Data_Bounded.top(dictBounded1)));
  9591. };
  9592. };
  9593. var booleanAlgebraTuple = function booleanAlgebraTuple(dictBooleanAlgebra) {
  9594. return function (dictBooleanAlgebra1) {
  9595. return new Data_BooleanAlgebra.BooleanAlgebra(function () {
  9596. return heytingAlgebraTuple(dictBooleanAlgebra.HeytingAlgebra0())(dictBooleanAlgebra1.HeytingAlgebra0());
  9597. });
  9598. };
  9599. };
  9600. var bifunctorTuple = new Data_Bifunctor.Bifunctor(function (f) {
  9601. return function (g) {
  9602. return function (v) {
  9603. return new Tuple(f(v.value0), g(v.value1));
  9604. };
  9605. };
  9606. });
  9607. var bifoldableTuple = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
  9608. return function (f) {
  9609. return function (g) {
  9610. return function (v) {
  9611. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(g(v.value1));
  9612. };
  9613. };
  9614. };
  9615. }, function (f) {
  9616. return function (g) {
  9617. return function (z) {
  9618. return function (v) {
  9619. return g(f(z)(v.value0))(v.value1);
  9620. };
  9621. };
  9622. };
  9623. }, function (f) {
  9624. return function (g) {
  9625. return function (z) {
  9626. return function (v) {
  9627. return f(v.value0)(g(v.value1)(z));
  9628. };
  9629. };
  9630. };
  9631. });
  9632. var bitraversableTuple = new Data_Bitraversable.Bitraversable(function () {
  9633. return bifoldableTuple;
  9634. }, function () {
  9635. return bifunctorTuple;
  9636. }, function (dictApplicative) {
  9637. return function (v) {
  9638. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(v.value0))(v.value1);
  9639. };
  9640. }, function (dictApplicative) {
  9641. return function (f) {
  9642. return function (g) {
  9643. return function (v) {
  9644. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(f(v.value0)))(g(v.value1));
  9645. };
  9646. };
  9647. };
  9648. });
  9649. var biapplyTuple = new Control_Biapply.Biapply(function () {
  9650. return bifunctorTuple;
  9651. }, function (v) {
  9652. return function (v1) {
  9653. return new Tuple(v.value0(v1.value0), v.value1(v1.value1));
  9654. };
  9655. });
  9656. var biapplicativeTuple = new Control_Biapplicative.Biapplicative(function () {
  9657. return biapplyTuple;
  9658. }, Tuple.create);
  9659. var applyTuple = function applyTuple(dictSemigroup) {
  9660. return new Control_Apply.Apply(function () {
  9661. return functorTuple;
  9662. }, function (v) {
  9663. return function (v1) {
  9664. return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v.value1(v1.value1));
  9665. };
  9666. });
  9667. };
  9668. var bindTuple = function bindTuple(dictSemigroup) {
  9669. return new Control_Bind.Bind(function () {
  9670. return applyTuple(dictSemigroup);
  9671. }, function (v) {
  9672. return function (f) {
  9673. var v1 = f(v.value1);
  9674. return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v1.value1);
  9675. };
  9676. });
  9677. };
  9678. var applicativeTuple = function applicativeTuple(dictMonoid) {
  9679. return new Control_Applicative.Applicative(function () {
  9680. return applyTuple(dictMonoid.Semigroup0());
  9681. }, Tuple.create(Data_Monoid.mempty(dictMonoid)));
  9682. };
  9683. var monadTuple = function monadTuple(dictMonoid) {
  9684. return new Control_Monad.Monad(function () {
  9685. return applicativeTuple(dictMonoid);
  9686. }, function () {
  9687. return bindTuple(dictMonoid.Semigroup0());
  9688. });
  9689. };
  9690. module.exports = {
  9691. Tuple: Tuple,
  9692. fst: fst,
  9693. snd: snd,
  9694. curry: curry,
  9695. uncurry: uncurry,
  9696. swap: swap,
  9697. lookup: lookup,
  9698. showTuple: showTuple,
  9699. eqTuple: eqTuple,
  9700. eq1Tuple: eq1Tuple,
  9701. ordTuple: ordTuple,
  9702. ord1Tuple: ord1Tuple,
  9703. boundedTuple: boundedTuple,
  9704. semigroupoidTuple: semigroupoidTuple,
  9705. semigroupTuple: semigroupTuple,
  9706. monoidTuple: monoidTuple,
  9707. semiringTuple: semiringTuple,
  9708. ringTuple: ringTuple,
  9709. commutativeRingTuple: commutativeRingTuple,
  9710. heytingAlgebraTuple: heytingAlgebraTuple,
  9711. booleanAlgebraTuple: booleanAlgebraTuple,
  9712. functorTuple: functorTuple,
  9713. functorWithIndexTuple: functorWithIndexTuple,
  9714. invariantTuple: invariantTuple,
  9715. bifunctorTuple: bifunctorTuple,
  9716. applyTuple: applyTuple,
  9717. biapplyTuple: biapplyTuple,
  9718. applicativeTuple: applicativeTuple,
  9719. biapplicativeTuple: biapplicativeTuple,
  9720. bindTuple: bindTuple,
  9721. monadTuple: monadTuple,
  9722. extendTuple: extendTuple,
  9723. comonadTuple: comonadTuple,
  9724. lazyTuple: lazyTuple,
  9725. foldableTuple: foldableTuple,
  9726. foldable1Tuple: foldable1Tuple,
  9727. foldableWithIndexTuple: foldableWithIndexTuple,
  9728. bifoldableTuple: bifoldableTuple,
  9729. traversableTuple: traversableTuple,
  9730. traversable1Tuple: traversable1Tuple,
  9731. traversableWithIndexTuple: traversableWithIndexTuple,
  9732. bitraversableTuple: bitraversableTuple,
  9733. distributiveTuple: distributiveTuple
  9734. };
  9735. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bitraversable/index.js":"../output/Data.Bitraversable/index.js","../Data.BooleanAlgebra/index.js":"../output/Data.BooleanAlgebra/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Distributive/index.js":"../output/Data.Distributive/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Type.Equality/index.js":"../output/Type.Equality/index.js"}],"../output/Control.Monad.State.Class/index.js":[function(require,module,exports) {
  9736. // Generated by purs version 0.13.6
  9737. "use strict";
  9738. var Data_Tuple = require("../Data.Tuple/index.js");
  9739. var Data_Unit = require("../Data.Unit/index.js");
  9740. var MonadState = function MonadState(Monad0, state) {
  9741. this.Monad0 = Monad0;
  9742. this.state = state;
  9743. };
  9744. var state = function state(dict) {
  9745. return dict.state;
  9746. };
  9747. var put = function put(dictMonadState) {
  9748. return function (s) {
  9749. return state(dictMonadState)(function (v) {
  9750. return new Data_Tuple.Tuple(Data_Unit.unit, s);
  9751. });
  9752. };
  9753. };
  9754. var modify_ = function modify_(dictMonadState) {
  9755. return function (f) {
  9756. return state(dictMonadState)(function (s) {
  9757. return new Data_Tuple.Tuple(Data_Unit.unit, f(s));
  9758. });
  9759. };
  9760. };
  9761. var modify = function modify(dictMonadState) {
  9762. return function (f) {
  9763. return state(dictMonadState)(function (s) {
  9764. var s$prime = f(s);
  9765. return new Data_Tuple.Tuple(s$prime, s$prime);
  9766. });
  9767. };
  9768. };
  9769. var gets = function gets(dictMonadState) {
  9770. return function (f) {
  9771. return state(dictMonadState)(function (s) {
  9772. return new Data_Tuple.Tuple(f(s), s);
  9773. });
  9774. };
  9775. };
  9776. var get = function get(dictMonadState) {
  9777. return state(dictMonadState)(function (s) {
  9778. return new Data_Tuple.Tuple(s, s);
  9779. });
  9780. };
  9781. module.exports = {
  9782. state: state,
  9783. MonadState: MonadState,
  9784. get: get,
  9785. gets: gets,
  9786. put: put,
  9787. modify: modify,
  9788. modify_: modify_
  9789. };
  9790. },{"../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Control.Monad.Trans.Class/index.js":[function(require,module,exports) {
  9791. // Generated by purs version 0.13.6
  9792. "use strict";
  9793. var MonadTrans = function MonadTrans(lift) {
  9794. this.lift = lift;
  9795. };
  9796. var lift = function lift(dict) {
  9797. return dict.lift;
  9798. };
  9799. module.exports = {
  9800. lift: lift,
  9801. MonadTrans: MonadTrans
  9802. };
  9803. },{}],"../output/Control.Monad.Writer.Class/index.js":[function(require,module,exports) {
  9804. // Generated by purs version 0.13.6
  9805. "use strict";
  9806. var Control_Applicative = require("../Control.Applicative/index.js");
  9807. var Control_Bind = require("../Control.Bind/index.js");
  9808. var Data_Tuple = require("../Data.Tuple/index.js");
  9809. var MonadTell = function MonadTell(Monad0, tell) {
  9810. this.Monad0 = Monad0;
  9811. this.tell = tell;
  9812. };
  9813. var MonadWriter = function MonadWriter(MonadTell0, listen, pass) {
  9814. this.MonadTell0 = MonadTell0;
  9815. this.listen = listen;
  9816. this.pass = pass;
  9817. };
  9818. var tell = function tell(dict) {
  9819. return dict.tell;
  9820. };
  9821. var pass = function pass(dict) {
  9822. return dict.pass;
  9823. };
  9824. var listen = function listen(dict) {
  9825. return dict.listen;
  9826. };
  9827. var listens = function listens(dictMonadWriter) {
  9828. return function (f) {
  9829. return function (m) {
  9830. return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(listen(dictMonadWriter)(m))(function (v) {
  9831. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(v.value0, f(v.value1)));
  9832. });
  9833. };
  9834. };
  9835. };
  9836. var censor = function censor(dictMonadWriter) {
  9837. return function (f) {
  9838. return function (m) {
  9839. return pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
  9840. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(a, f));
  9841. }));
  9842. };
  9843. };
  9844. };
  9845. module.exports = {
  9846. listen: listen,
  9847. pass: pass,
  9848. tell: tell,
  9849. MonadTell: MonadTell,
  9850. MonadWriter: MonadWriter,
  9851. listens: listens,
  9852. censor: censor
  9853. };
  9854. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Control.MonadPlus/index.js":[function(require,module,exports) {
  9855. // Generated by purs version 0.13.6
  9856. "use strict";
  9857. var Control_MonadZero = require("../Control.MonadZero/index.js");
  9858. var MonadPlus = function MonadPlus(MonadZero0) {
  9859. this.MonadZero0 = MonadZero0;
  9860. };
  9861. var monadPlusArray = new MonadPlus(function () {
  9862. return Control_MonadZero.monadZeroArray;
  9863. });
  9864. module.exports = {
  9865. MonadPlus: MonadPlus,
  9866. monadPlusArray: monadPlusArray
  9867. };
  9868. },{"../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js"}],"../output/Effect.Class/index.js":[function(require,module,exports) {
  9869. // Generated by purs version 0.13.6
  9870. "use strict";
  9871. var Control_Category = require("../Control.Category/index.js");
  9872. var Effect = require("../Effect/index.js");
  9873. var MonadEffect = function MonadEffect(Monad0, liftEffect) {
  9874. this.Monad0 = Monad0;
  9875. this.liftEffect = liftEffect;
  9876. };
  9877. var monadEffectEffect = new MonadEffect(function () {
  9878. return Effect.monadEffect;
  9879. }, Control_Category.identity(Control_Category.categoryFn));
  9880. var liftEffect = function liftEffect(dict) {
  9881. return dict.liftEffect;
  9882. };
  9883. module.exports = {
  9884. liftEffect: liftEffect,
  9885. MonadEffect: MonadEffect,
  9886. monadEffectEffect: monadEffectEffect
  9887. };
  9888. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Effect/index.js":"../output/Effect/index.js"}],"../output/Control.Monad.Except.Trans/index.js":[function(require,module,exports) {
  9889. // Generated by purs version 0.13.6
  9890. "use strict";
  9891. var Control_Alt = require("../Control.Alt/index.js");
  9892. var Control_Alternative = require("../Control.Alternative/index.js");
  9893. var Control_Applicative = require("../Control.Applicative/index.js");
  9894. var Control_Apply = require("../Control.Apply/index.js");
  9895. var Control_Bind = require("../Control.Bind/index.js");
  9896. var Control_Category = require("../Control.Category/index.js");
  9897. var Control_Monad = require("../Control.Monad/index.js");
  9898. var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
  9899. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  9900. var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
  9901. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  9902. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  9903. var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
  9904. var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
  9905. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  9906. var Control_MonadZero = require("../Control.MonadZero/index.js");
  9907. var Control_Plus = require("../Control.Plus/index.js");
  9908. var Data_Either = require("../Data.Either/index.js");
  9909. var Data_Functor = require("../Data.Functor/index.js");
  9910. var Data_Monoid = require("../Data.Monoid/index.js");
  9911. var Data_Newtype = require("../Data.Newtype/index.js");
  9912. var Data_Semigroup = require("../Data.Semigroup/index.js");
  9913. var Data_Tuple = require("../Data.Tuple/index.js");
  9914. var Effect_Class = require("../Effect.Class/index.js");
  9915. var ExceptT = function ExceptT(x) {
  9916. return x;
  9917. };
  9918. var withExceptT = function withExceptT(dictFunctor) {
  9919. return function (f) {
  9920. return function (v) {
  9921. var mapLeft = function mapLeft(v1) {
  9922. return function (v2) {
  9923. if (v2 instanceof Data_Either.Right) {
  9924. return new Data_Either.Right(v2.value0);
  9925. }
  9926. ;
  9927. if (v2 instanceof Data_Either.Left) {
  9928. return new Data_Either.Left(v1(v2.value0));
  9929. }
  9930. ;
  9931. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 42, column 3 - line 42, column 32): " + [v1.constructor.name, v2.constructor.name]);
  9932. };
  9933. };
  9934. return ExceptT(Data_Functor.map(dictFunctor)(mapLeft(f))(v));
  9935. };
  9936. };
  9937. };
  9938. var runExceptT = function runExceptT(v) {
  9939. return v;
  9940. };
  9941. var newtypeExceptT = new Data_Newtype.Newtype(function (n) {
  9942. return n;
  9943. }, ExceptT);
  9944. var monadTransExceptT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
  9945. return function (m) {
  9946. return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
  9947. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(a));
  9948. });
  9949. };
  9950. });
  9951. var mapExceptT = function mapExceptT(f) {
  9952. return function (v) {
  9953. return f(v);
  9954. };
  9955. };
  9956. var functorExceptT = function functorExceptT(dictFunctor) {
  9957. return new Data_Functor.Functor(function (f) {
  9958. return mapExceptT(Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Either.functorEither)(f)));
  9959. });
  9960. };
  9961. var except = function except(dictApplicative) {
  9962. var $88 = Control_Applicative.pure(dictApplicative);
  9963. return function ($89) {
  9964. return ExceptT($88($89));
  9965. };
  9966. };
  9967. var monadExceptT = function monadExceptT(dictMonad) {
  9968. return new Control_Monad.Monad(function () {
  9969. return applicativeExceptT(dictMonad);
  9970. }, function () {
  9971. return bindExceptT(dictMonad);
  9972. });
  9973. };
  9974. var bindExceptT = function bindExceptT(dictMonad) {
  9975. return new Control_Bind.Bind(function () {
  9976. return applyExceptT(dictMonad);
  9977. }, function (v) {
  9978. return function (k) {
  9979. return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function () {
  9980. var $90 = Control_Applicative.pure(dictMonad.Applicative0());
  9981. return function ($91) {
  9982. return $90(Data_Either.Left.create($91));
  9983. };
  9984. }())(function (a) {
  9985. var v1 = k(a);
  9986. return v1;
  9987. }));
  9988. };
  9989. });
  9990. };
  9991. var applyExceptT = function applyExceptT(dictMonad) {
  9992. return new Control_Apply.Apply(function () {
  9993. return functorExceptT(dictMonad.Bind1().Apply0().Functor0());
  9994. }, Control_Monad.ap(monadExceptT(dictMonad)));
  9995. };
  9996. var applicativeExceptT = function applicativeExceptT(dictMonad) {
  9997. return new Control_Applicative.Applicative(function () {
  9998. return applyExceptT(dictMonad);
  9999. }, function () {
  10000. var $92 = Control_Applicative.pure(dictMonad.Applicative0());
  10001. return function ($93) {
  10002. return ExceptT($92(Data_Either.Right.create($93)));
  10003. };
  10004. }());
  10005. };
  10006. var monadAskExceptT = function monadAskExceptT(dictMonadAsk) {
  10007. return new Control_Monad_Reader_Class.MonadAsk(function () {
  10008. return monadExceptT(dictMonadAsk.Monad0());
  10009. }, Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
  10010. };
  10011. var monadReaderExceptT = function monadReaderExceptT(dictMonadReader) {
  10012. return new Control_Monad_Reader_Class.MonadReader(function () {
  10013. return monadAskExceptT(dictMonadReader.MonadAsk0());
  10014. }, function (f) {
  10015. return mapExceptT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
  10016. });
  10017. };
  10018. var monadContExceptT = function monadContExceptT(dictMonadCont) {
  10019. return new Control_Monad_Cont_Class.MonadCont(function () {
  10020. return monadExceptT(dictMonadCont.Monad0());
  10021. }, function (f) {
  10022. return ExceptT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
  10023. var v = f(function (a) {
  10024. return ExceptT(c(new Data_Either.Right(a)));
  10025. });
  10026. return v;
  10027. }));
  10028. });
  10029. };
  10030. var monadEffectExceptT = function monadEffectExceptT(dictMonadEffect) {
  10031. return new Effect_Class.MonadEffect(function () {
  10032. return monadExceptT(dictMonadEffect.Monad0());
  10033. }, function () {
  10034. var $94 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadEffect.Monad0());
  10035. var $95 = Effect_Class.liftEffect(dictMonadEffect);
  10036. return function ($96) {
  10037. return $94($95($96));
  10038. };
  10039. }());
  10040. };
  10041. var monadRecExceptT = function monadRecExceptT(dictMonadRec) {
  10042. return new Control_Monad_Rec_Class.MonadRec(function () {
  10043. return monadExceptT(dictMonadRec.Monad0());
  10044. }, function (f) {
  10045. var $97 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) {
  10046. var v = f(a);
  10047. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) {
  10048. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
  10049. if (m$prime instanceof Data_Either.Left) {
  10050. return new Control_Monad_Rec_Class.Done(new Data_Either.Left(m$prime.value0));
  10051. }
  10052. ;
  10053. if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) {
  10054. return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0);
  10055. }
  10056. ;
  10057. if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) {
  10058. return new Control_Monad_Rec_Class.Done(new Data_Either.Right(m$prime.value0.value0));
  10059. }
  10060. ;
  10061. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 74, column 14 - line 77, column 43): " + [m$prime.constructor.name]);
  10062. }());
  10063. });
  10064. });
  10065. return function ($98) {
  10066. return ExceptT($97($98));
  10067. };
  10068. });
  10069. };
  10070. var monadStateExceptT = function monadStateExceptT(dictMonadState) {
  10071. return new Control_Monad_State_Class.MonadState(function () {
  10072. return monadExceptT(dictMonadState.Monad0());
  10073. }, function (f) {
  10074. return Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
  10075. });
  10076. };
  10077. var monadTellExceptT = function monadTellExceptT(dictMonadTell) {
  10078. return new Control_Monad_Writer_Class.MonadTell(function () {
  10079. return monadExceptT(dictMonadTell.Monad0());
  10080. }, function () {
  10081. var $99 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadTell.Monad0());
  10082. var $100 = Control_Monad_Writer_Class.tell(dictMonadTell);
  10083. return function ($101) {
  10084. return $99($100($101));
  10085. };
  10086. }());
  10087. };
  10088. var monadWriterExceptT = function monadWriterExceptT(dictMonadWriter) {
  10089. return new Control_Monad_Writer_Class.MonadWriter(function () {
  10090. return monadTellExceptT(dictMonadWriter.MonadTell0());
  10091. }, mapExceptT(function (m) {
  10092. return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) {
  10093. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Either.functorEither)(function (r) {
  10094. return new Data_Tuple.Tuple(r, v.value1);
  10095. })(v.value0));
  10096. });
  10097. }), mapExceptT(function (m) {
  10098. return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
  10099. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () {
  10100. if (a instanceof Data_Either.Left) {
  10101. return new Data_Tuple.Tuple(new Data_Either.Left(a.value0), Control_Category.identity(Control_Category.categoryFn));
  10102. }
  10103. ;
  10104. if (a instanceof Data_Either.Right) {
  10105. return new Data_Tuple.Tuple(new Data_Either.Right(a.value0.value0), a.value0.value1);
  10106. }
  10107. ;
  10108. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 136, column 10 - line 138, column 45): " + [a.constructor.name]);
  10109. }());
  10110. }));
  10111. }));
  10112. };
  10113. var monadThrowExceptT = function monadThrowExceptT(dictMonad) {
  10114. return new Control_Monad_Error_Class.MonadThrow(function () {
  10115. return monadExceptT(dictMonad);
  10116. }, function () {
  10117. var $102 = Control_Applicative.pure(dictMonad.Applicative0());
  10118. return function ($103) {
  10119. return ExceptT($102(Data_Either.Left.create($103)));
  10120. };
  10121. }());
  10122. };
  10123. var monadErrorExceptT = function monadErrorExceptT(dictMonad) {
  10124. return new Control_Monad_Error_Class.MonadError(function () {
  10125. return monadThrowExceptT(dictMonad);
  10126. }, function (v) {
  10127. return function (k) {
  10128. return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function (a) {
  10129. var v1 = k(a);
  10130. return v1;
  10131. })(function () {
  10132. var $104 = Control_Applicative.pure(dictMonad.Applicative0());
  10133. return function ($105) {
  10134. return $104(Data_Either.Right.create($105));
  10135. };
  10136. }()));
  10137. };
  10138. });
  10139. };
  10140. var altExceptT = function altExceptT(dictSemigroup) {
  10141. return function (dictMonad) {
  10142. return new Control_Alt.Alt(function () {
  10143. return functorExceptT(dictMonad.Bind1().Apply0().Functor0());
  10144. }, function (v) {
  10145. return function (v1) {
  10146. return Control_Bind.bind(dictMonad.Bind1())(v)(function (rm) {
  10147. if (rm instanceof Data_Either.Right) {
  10148. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(rm.value0));
  10149. }
  10150. ;
  10151. if (rm instanceof Data_Either.Left) {
  10152. return Control_Bind.bind(dictMonad.Bind1())(v1)(function (rn) {
  10153. if (rn instanceof Data_Either.Right) {
  10154. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(rn.value0));
  10155. }
  10156. ;
  10157. if (rn instanceof Data_Either.Left) {
  10158. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Left(Data_Semigroup.append(dictSemigroup)(rm.value0)(rn.value0)));
  10159. }
  10160. ;
  10161. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 86, column 9 - line 88, column 49): " + [rn.constructor.name]);
  10162. });
  10163. }
  10164. ;
  10165. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 82, column 5 - line 88, column 49): " + [rm.constructor.name]);
  10166. });
  10167. };
  10168. });
  10169. };
  10170. };
  10171. var plusExceptT = function plusExceptT(dictMonoid) {
  10172. return function (dictMonad) {
  10173. return new Control_Plus.Plus(function () {
  10174. return altExceptT(dictMonoid.Semigroup0())(dictMonad);
  10175. }, Control_Monad_Error_Class.throwError(monadThrowExceptT(dictMonad))(Data_Monoid.mempty(dictMonoid)));
  10176. };
  10177. };
  10178. var alternativeExceptT = function alternativeExceptT(dictMonoid) {
  10179. return function (dictMonad) {
  10180. return new Control_Alternative.Alternative(function () {
  10181. return applicativeExceptT(dictMonad);
  10182. }, function () {
  10183. return plusExceptT(dictMonoid)(dictMonad);
  10184. });
  10185. };
  10186. };
  10187. var monadZeroExceptT = function monadZeroExceptT(dictMonoid) {
  10188. return function (dictMonad) {
  10189. return new Control_MonadZero.MonadZero(function () {
  10190. return alternativeExceptT(dictMonoid)(dictMonad);
  10191. }, function () {
  10192. return monadExceptT(dictMonad);
  10193. });
  10194. };
  10195. };
  10196. var monadPlusExceptT = function monadPlusExceptT(dictMonoid) {
  10197. return function (dictMonad) {
  10198. return new Control_MonadPlus.MonadPlus(function () {
  10199. return monadZeroExceptT(dictMonoid)(dictMonad);
  10200. });
  10201. };
  10202. };
  10203. module.exports = {
  10204. ExceptT: ExceptT,
  10205. runExceptT: runExceptT,
  10206. withExceptT: withExceptT,
  10207. mapExceptT: mapExceptT,
  10208. except: except,
  10209. newtypeExceptT: newtypeExceptT,
  10210. functorExceptT: functorExceptT,
  10211. applyExceptT: applyExceptT,
  10212. applicativeExceptT: applicativeExceptT,
  10213. bindExceptT: bindExceptT,
  10214. monadExceptT: monadExceptT,
  10215. monadRecExceptT: monadRecExceptT,
  10216. altExceptT: altExceptT,
  10217. plusExceptT: plusExceptT,
  10218. alternativeExceptT: alternativeExceptT,
  10219. monadPlusExceptT: monadPlusExceptT,
  10220. monadZeroExceptT: monadZeroExceptT,
  10221. monadTransExceptT: monadTransExceptT,
  10222. monadEffectExceptT: monadEffectExceptT,
  10223. monadContExceptT: monadContExceptT,
  10224. monadThrowExceptT: monadThrowExceptT,
  10225. monadErrorExceptT: monadErrorExceptT,
  10226. monadAskExceptT: monadAskExceptT,
  10227. monadReaderExceptT: monadReaderExceptT,
  10228. monadStateExceptT: monadStateExceptT,
  10229. monadTellExceptT: monadTellExceptT,
  10230. monadWriterExceptT: monadWriterExceptT
  10231. };
  10232. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Control.Monad.Trans.Class/index.js":"../output/Control.Monad.Trans.Class/index.js","../Control.Monad.Writer.Class/index.js":"../output/Control.Monad.Writer.Class/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Except/index.js":[function(require,module,exports) {
  10233. // Generated by purs version 0.13.6
  10234. "use strict";
  10235. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  10236. var Data_Identity = require("../Data.Identity/index.js");
  10237. var Data_Newtype = require("../Data.Newtype/index.js");
  10238. var withExcept = Control_Monad_Except_Trans.withExceptT(Data_Identity.functorIdentity);
  10239. var runExcept = function () {
  10240. var $0 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  10241. return function ($1) {
  10242. return $0(Control_Monad_Except_Trans.runExceptT($1));
  10243. };
  10244. }();
  10245. var mapExcept = function mapExcept(f) {
  10246. return Control_Monad_Except_Trans.mapExceptT(function () {
  10247. var $2 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  10248. return function ($3) {
  10249. return Data_Identity.Identity(f($2($3)));
  10250. };
  10251. }());
  10252. };
  10253. module.exports = {
  10254. runExcept: runExcept,
  10255. mapExcept: mapExcept,
  10256. withExcept: withExcept
  10257. };
  10258. },{"../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Data.Unfoldable/foreign.js":[function(require,module,exports) {
  10259. "use strict";
  10260. exports.unfoldrArrayImpl = function (isNothing) {
  10261. return function (fromJust) {
  10262. return function (fst) {
  10263. return function (snd) {
  10264. return function (f) {
  10265. return function (b) {
  10266. var result = [];
  10267. var value = b;
  10268. while (true) {
  10269. // eslint-disable-line no-constant-condition
  10270. var maybe = f(value);
  10271. if (isNothing(maybe)) return result;
  10272. var tuple = fromJust(maybe);
  10273. result.push(fst(tuple));
  10274. value = snd(tuple);
  10275. }
  10276. };
  10277. };
  10278. };
  10279. };
  10280. };
  10281. };
  10282. },{}],"../output/Data.Unfoldable1/foreign.js":[function(require,module,exports) {
  10283. "use strict";
  10284. exports.unfoldr1ArrayImpl = function (isNothing) {
  10285. return function (fromJust) {
  10286. return function (fst) {
  10287. return function (snd) {
  10288. return function (f) {
  10289. return function (b) {
  10290. var result = [];
  10291. var value = b;
  10292. while (true) {
  10293. // eslint-disable-line no-constant-condition
  10294. var tuple = f(value);
  10295. result.push(fst(tuple));
  10296. var maybe = snd(tuple);
  10297. if (isNothing(maybe)) return result;
  10298. value = fromJust(maybe);
  10299. }
  10300. };
  10301. };
  10302. };
  10303. };
  10304. };
  10305. };
  10306. },{}],"../output/Data.Unfoldable1/index.js":[function(require,module,exports) {
  10307. // Generated by purs version 0.13.6
  10308. "use strict";
  10309. var $foreign = require("./foreign.js");
  10310. var Data_Boolean = require("../Data.Boolean/index.js");
  10311. var Data_Maybe = require("../Data.Maybe/index.js");
  10312. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  10313. var Data_Tuple = require("../Data.Tuple/index.js");
  10314. var Unfoldable1 = function Unfoldable1(unfoldr1) {
  10315. this.unfoldr1 = unfoldr1;
  10316. };
  10317. var unfoldr1 = function unfoldr1(dict) {
  10318. return dict.unfoldr1;
  10319. };
  10320. var unfoldable1Maybe = new Unfoldable1(function (f) {
  10321. return function (b) {
  10322. return new Data_Maybe.Just(Data_Tuple.fst(f(b)));
  10323. };
  10324. });
  10325. var unfoldable1Array = new Unfoldable1($foreign.unfoldr1ArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd));
  10326. var replicate1 = function replicate1(dictUnfoldable1) {
  10327. return function (n) {
  10328. return function (v) {
  10329. var step = function step(i) {
  10330. if (i <= 0) {
  10331. return new Data_Tuple.Tuple(v, Data_Maybe.Nothing.value);
  10332. }
  10333. ;
  10334. if (Data_Boolean.otherwise) {
  10335. return new Data_Tuple.Tuple(v, new Data_Maybe.Just(i - 1 | 0));
  10336. }
  10337. ;
  10338. throw new Error("Failed pattern match at Data.Unfoldable1 (line 67, column 5 - line 67, column 39): " + [i.constructor.name]);
  10339. };
  10340. return unfoldr1(dictUnfoldable1)(step)(n - 1 | 0);
  10341. };
  10342. };
  10343. };
  10344. var replicate1A = function replicate1A(dictApply) {
  10345. return function (dictUnfoldable1) {
  10346. return function (dictTraversable1) {
  10347. return function (n) {
  10348. return function (m) {
  10349. return Data_Semigroup_Traversable.sequence1(dictTraversable1)(dictApply)(replicate1(dictUnfoldable1)(n)(m));
  10350. };
  10351. };
  10352. };
  10353. };
  10354. };
  10355. var singleton = function singleton(dictUnfoldable1) {
  10356. return replicate1(dictUnfoldable1)(1);
  10357. };
  10358. var range = function range(dictUnfoldable1) {
  10359. return function (start) {
  10360. return function (end) {
  10361. var go = function go(delta) {
  10362. return function (i) {
  10363. var i$prime = i + delta | 0;
  10364. return new Data_Tuple.Tuple(i, function () {
  10365. var $8 = i === end;
  10366. if ($8) {
  10367. return Data_Maybe.Nothing.value;
  10368. }
  10369. ;
  10370. return new Data_Maybe.Just(i$prime);
  10371. }());
  10372. };
  10373. };
  10374. var delta = function () {
  10375. var $9 = end >= start;
  10376. if ($9) {
  10377. return 1;
  10378. }
  10379. ;
  10380. return -1 | 0;
  10381. }();
  10382. return unfoldr1(dictUnfoldable1)(go(delta))(start);
  10383. };
  10384. };
  10385. };
  10386. module.exports = {
  10387. Unfoldable1: Unfoldable1,
  10388. unfoldr1: unfoldr1,
  10389. replicate1: replicate1,
  10390. replicate1A: replicate1A,
  10391. singleton: singleton,
  10392. range: range,
  10393. unfoldable1Array: unfoldable1Array,
  10394. unfoldable1Maybe: unfoldable1Maybe
  10395. };
  10396. },{"./foreign.js":"../output/Data.Unfoldable1/foreign.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Unfoldable/index.js":[function(require,module,exports) {
  10397. // Generated by purs version 0.13.6
  10398. "use strict";
  10399. var $foreign = require("./foreign.js");
  10400. var Data_Function = require("../Data.Function/index.js");
  10401. var Data_Functor = require("../Data.Functor/index.js");
  10402. var Data_Maybe = require("../Data.Maybe/index.js");
  10403. var Data_Traversable = require("../Data.Traversable/index.js");
  10404. var Data_Tuple = require("../Data.Tuple/index.js");
  10405. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  10406. var Data_Unit = require("../Data.Unit/index.js");
  10407. var Unfoldable = function Unfoldable(Unfoldable10, unfoldr) {
  10408. this.Unfoldable10 = Unfoldable10;
  10409. this.unfoldr = unfoldr;
  10410. };
  10411. var unfoldr = function unfoldr(dict) {
  10412. return dict.unfoldr;
  10413. };
  10414. var unfoldableMaybe = new Unfoldable(function () {
  10415. return Data_Unfoldable1.unfoldable1Maybe;
  10416. }, function (f) {
  10417. return function (b) {
  10418. return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Tuple.fst)(f(b));
  10419. };
  10420. });
  10421. var unfoldableArray = new Unfoldable(function () {
  10422. return Data_Unfoldable1.unfoldable1Array;
  10423. }, $foreign.unfoldrArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd));
  10424. var replicate = function replicate(dictUnfoldable) {
  10425. return function (n) {
  10426. return function (v) {
  10427. var step = function step(i) {
  10428. var $7 = i <= 0;
  10429. if ($7) {
  10430. return Data_Maybe.Nothing.value;
  10431. }
  10432. ;
  10433. return new Data_Maybe.Just(new Data_Tuple.Tuple(v, i - 1 | 0));
  10434. };
  10435. return unfoldr(dictUnfoldable)(step)(n);
  10436. };
  10437. };
  10438. };
  10439. var replicateA = function replicateA(dictApplicative) {
  10440. return function (dictUnfoldable) {
  10441. return function (dictTraversable) {
  10442. return function (n) {
  10443. return function (m) {
  10444. return Data_Traversable.sequence(dictTraversable)(dictApplicative)(replicate(dictUnfoldable)(n)(m));
  10445. };
  10446. };
  10447. };
  10448. };
  10449. };
  10450. var none = function none(dictUnfoldable) {
  10451. return unfoldr(dictUnfoldable)(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Unit.unit);
  10452. };
  10453. var fromMaybe = function fromMaybe(dictUnfoldable) {
  10454. return unfoldr(dictUnfoldable)(function (b) {
  10455. return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Maybe.Nothing.value))(b);
  10456. });
  10457. };
  10458. module.exports = {
  10459. Unfoldable: Unfoldable,
  10460. unfoldr: unfoldr,
  10461. replicate: replicate,
  10462. replicateA: replicateA,
  10463. none: none,
  10464. fromMaybe: fromMaybe,
  10465. unfoldableArray: unfoldableArray,
  10466. unfoldableMaybe: unfoldableMaybe
  10467. };
  10468. },{"./foreign.js":"../output/Data.Unfoldable/foreign.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.NonEmpty/index.js":[function(require,module,exports) {
  10469. // Generated by purs version 0.13.6
  10470. "use strict";
  10471. var Control_Alt = require("../Control.Alt/index.js");
  10472. var Control_Applicative = require("../Control.Applicative/index.js");
  10473. var Control_Apply = require("../Control.Apply/index.js");
  10474. var Control_Category = require("../Control.Category/index.js");
  10475. var Control_Plus = require("../Control.Plus/index.js");
  10476. var Data_Eq = require("../Data.Eq/index.js");
  10477. var Data_Foldable = require("../Data.Foldable/index.js");
  10478. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  10479. var Data_Functor = require("../Data.Functor/index.js");
  10480. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  10481. var Data_Maybe = require("../Data.Maybe/index.js");
  10482. var Data_Ord = require("../Data.Ord/index.js");
  10483. var Data_Ordering = require("../Data.Ordering/index.js");
  10484. var Data_Semigroup = require("../Data.Semigroup/index.js");
  10485. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  10486. var Data_Show = require("../Data.Show/index.js");
  10487. var Data_Traversable = require("../Data.Traversable/index.js");
  10488. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  10489. var Data_Tuple = require("../Data.Tuple/index.js");
  10490. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  10491. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  10492. var NonEmpty = function () {
  10493. function NonEmpty(value0, value1) {
  10494. this.value0 = value0;
  10495. this.value1 = value1;
  10496. }
  10497. ;
  10498. NonEmpty.create = function (value0) {
  10499. return function (value1) {
  10500. return new NonEmpty(value0, value1);
  10501. };
  10502. };
  10503. return NonEmpty;
  10504. }();
  10505. var unfoldable1NonEmpty = function unfoldable1NonEmpty(dictUnfoldable) {
  10506. return new Data_Unfoldable1.Unfoldable1(function (f) {
  10507. return function (b) {
  10508. return Data_Tuple.uncurry(NonEmpty.create)(Data_Functor.map(Data_Tuple.functorTuple)(Data_Unfoldable.unfoldr(dictUnfoldable)(Data_Functor.map(Data_Maybe.functorMaybe)(f)))(f(b)));
  10509. };
  10510. });
  10511. };
  10512. var tail = function tail(v) {
  10513. return v.value1;
  10514. };
  10515. var singleton = function singleton(dictPlus) {
  10516. return function (a) {
  10517. return new NonEmpty(a, Control_Plus.empty(dictPlus));
  10518. };
  10519. };
  10520. var showNonEmpty = function showNonEmpty(dictShow) {
  10521. return function (dictShow1) {
  10522. return new Data_Show.Show(function (v) {
  10523. return "(NonEmpty " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
  10524. });
  10525. };
  10526. };
  10527. var oneOf = function oneOf(dictAlternative) {
  10528. return function (v) {
  10529. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Control_Applicative.pure(dictAlternative.Applicative0())(v.value0))(v.value1);
  10530. };
  10531. };
  10532. var head = function head(v) {
  10533. return v.value0;
  10534. };
  10535. var functorNonEmpty = function functorNonEmpty(dictFunctor) {
  10536. return new Data_Functor.Functor(function (f) {
  10537. return function (m) {
  10538. return new NonEmpty(f(m.value0), Data_Functor.map(dictFunctor)(f)(m.value1));
  10539. };
  10540. });
  10541. };
  10542. var functorWithIndex = function functorWithIndex(dictFunctorWithIndex) {
  10543. return new Data_FunctorWithIndex.FunctorWithIndex(function () {
  10544. return functorNonEmpty(dictFunctorWithIndex.Functor0());
  10545. }, function (f) {
  10546. return function (v) {
  10547. return new NonEmpty(f(Data_Maybe.Nothing.value)(v.value0), Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function ($146) {
  10548. return f(Data_Maybe.Just.create($146));
  10549. })(v.value1));
  10550. };
  10551. });
  10552. };
  10553. var fromNonEmpty = function fromNonEmpty(f) {
  10554. return function (v) {
  10555. return f(v.value0)(v.value1);
  10556. };
  10557. };
  10558. var foldl1 = function foldl1(dictFoldable) {
  10559. return function (f) {
  10560. return function (v) {
  10561. return Data_Foldable.foldl(dictFoldable)(f)(v.value0)(v.value1);
  10562. };
  10563. };
  10564. };
  10565. var foldableNonEmpty = function foldableNonEmpty(dictFoldable) {
  10566. return new Data_Foldable.Foldable(function (dictMonoid) {
  10567. return function (f) {
  10568. return function (v) {
  10569. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(Data_Foldable.foldMap(dictFoldable)(dictMonoid)(f)(v.value1));
  10570. };
  10571. };
  10572. }, function (f) {
  10573. return function (b) {
  10574. return function (v) {
  10575. return Data_Foldable.foldl(dictFoldable)(f)(f(b)(v.value0))(v.value1);
  10576. };
  10577. };
  10578. }, function (f) {
  10579. return function (b) {
  10580. return function (v) {
  10581. return f(v.value0)(Data_Foldable.foldr(dictFoldable)(f)(b)(v.value1));
  10582. };
  10583. };
  10584. });
  10585. };
  10586. var foldableWithIndexNonEmpty = function foldableWithIndexNonEmpty(dictFoldableWithIndex) {
  10587. return new Data_FoldableWithIndex.FoldableWithIndex(function () {
  10588. return foldableNonEmpty(dictFoldableWithIndex.Foldable0());
  10589. }, function (dictMonoid) {
  10590. return function (f) {
  10591. return function (v) {
  10592. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(Data_Maybe.Nothing.value)(v.value0))(Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function ($147) {
  10593. return f(Data_Maybe.Just.create($147));
  10594. })(v.value1));
  10595. };
  10596. };
  10597. }, function (f) {
  10598. return function (b) {
  10599. return function (v) {
  10600. return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function ($148) {
  10601. return f(Data_Maybe.Just.create($148));
  10602. })(f(Data_Maybe.Nothing.value)(b)(v.value0))(v.value1);
  10603. };
  10604. };
  10605. }, function (f) {
  10606. return function (b) {
  10607. return function (v) {
  10608. return f(Data_Maybe.Nothing.value)(v.value0)(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function ($149) {
  10609. return f(Data_Maybe.Just.create($149));
  10610. })(b)(v.value1));
  10611. };
  10612. };
  10613. });
  10614. };
  10615. var traversableNonEmpty = function traversableNonEmpty(dictTraversable) {
  10616. return new Data_Traversable.Traversable(function () {
  10617. return foldableNonEmpty(dictTraversable.Foldable1());
  10618. }, function () {
  10619. return functorNonEmpty(dictTraversable.Functor0());
  10620. }, function (dictApplicative) {
  10621. return function (v) {
  10622. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(v.value0))(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v.value1));
  10623. };
  10624. }, function (dictApplicative) {
  10625. return function (f) {
  10626. return function (v) {
  10627. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(f(v.value0)))(Data_Traversable.traverse(dictTraversable)(dictApplicative)(f)(v.value1));
  10628. };
  10629. };
  10630. });
  10631. };
  10632. var traversableWithIndexNonEmpty = function traversableWithIndexNonEmpty(dictTraversableWithIndex) {
  10633. return new Data_TraversableWithIndex.TraversableWithIndex(function () {
  10634. return foldableWithIndexNonEmpty(dictTraversableWithIndex.FoldableWithIndex1());
  10635. }, function () {
  10636. return functorWithIndex(dictTraversableWithIndex.FunctorWithIndex0());
  10637. }, function () {
  10638. return traversableNonEmpty(dictTraversableWithIndex.Traversable2());
  10639. }, function (dictApplicative) {
  10640. return function (f) {
  10641. return function (v) {
  10642. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(f(Data_Maybe.Nothing.value)(v.value0)))(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function ($150) {
  10643. return f(Data_Maybe.Just.create($150));
  10644. })(v.value1));
  10645. };
  10646. };
  10647. });
  10648. };
  10649. var foldable1NonEmpty = function foldable1NonEmpty(dictFoldable) {
  10650. return new Data_Semigroup_Foldable.Foldable1(function () {
  10651. return foldableNonEmpty(dictFoldable);
  10652. }, function (dictSemigroup) {
  10653. return Data_Semigroup_Foldable.foldMap1(foldable1NonEmpty(dictFoldable))(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn));
  10654. }, function (dictSemigroup) {
  10655. return function (f) {
  10656. return function (v) {
  10657. return Data_Foldable.foldl(dictFoldable)(function (s) {
  10658. return function (a1) {
  10659. return Data_Semigroup.append(dictSemigroup)(s)(f(a1));
  10660. };
  10661. })(f(v.value0))(v.value1);
  10662. };
  10663. };
  10664. });
  10665. };
  10666. var eqNonEmpty = function eqNonEmpty(dictEq1) {
  10667. return function (dictEq) {
  10668. return new Data_Eq.Eq(function (x) {
  10669. return function (y) {
  10670. return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq1(dictEq1)(dictEq)(x.value1)(y.value1);
  10671. };
  10672. });
  10673. };
  10674. };
  10675. var ordNonEmpty = function ordNonEmpty(dictOrd1) {
  10676. return function (dictOrd) {
  10677. return new Data_Ord.Ord(function () {
  10678. return eqNonEmpty(dictOrd1.Eq10())(dictOrd.Eq0());
  10679. }, function (x) {
  10680. return function (y) {
  10681. var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  10682. if (v instanceof Data_Ordering.LT) {
  10683. return Data_Ordering.LT.value;
  10684. }
  10685. ;
  10686. if (v instanceof Data_Ordering.GT) {
  10687. return Data_Ordering.GT.value;
  10688. }
  10689. ;
  10690. return Data_Ord.compare1(dictOrd1)(dictOrd)(x.value1)(y.value1);
  10691. };
  10692. });
  10693. };
  10694. };
  10695. var eq1NonEmpty = function eq1NonEmpty(dictEq1) {
  10696. return new Data_Eq.Eq1(function (dictEq) {
  10697. return Data_Eq.eq(eqNonEmpty(dictEq1)(dictEq));
  10698. });
  10699. };
  10700. var ord1NonEmpty = function ord1NonEmpty(dictOrd1) {
  10701. return new Data_Ord.Ord1(function () {
  10702. return eq1NonEmpty(dictOrd1.Eq10());
  10703. }, function (dictOrd) {
  10704. return Data_Ord.compare(ordNonEmpty(dictOrd1)(dictOrd));
  10705. });
  10706. };
  10707. module.exports = {
  10708. NonEmpty: NonEmpty,
  10709. singleton: singleton,
  10710. foldl1: foldl1,
  10711. fromNonEmpty: fromNonEmpty,
  10712. oneOf: oneOf,
  10713. head: head,
  10714. tail: tail,
  10715. showNonEmpty: showNonEmpty,
  10716. eqNonEmpty: eqNonEmpty,
  10717. eq1NonEmpty: eq1NonEmpty,
  10718. ordNonEmpty: ordNonEmpty,
  10719. ord1NonEmpty: ord1NonEmpty,
  10720. functorNonEmpty: functorNonEmpty,
  10721. functorWithIndex: functorWithIndex,
  10722. foldableNonEmpty: foldableNonEmpty,
  10723. foldableWithIndexNonEmpty: foldableWithIndexNonEmpty,
  10724. traversableNonEmpty: traversableNonEmpty,
  10725. traversableWithIndexNonEmpty: traversableWithIndexNonEmpty,
  10726. foldable1NonEmpty: foldable1NonEmpty,
  10727. unfoldable1NonEmpty: unfoldable1NonEmpty
  10728. };
  10729. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Data.List.Types/index.js":[function(require,module,exports) {
  10730. // Generated by purs version 0.13.6
  10731. "use strict";
  10732. var Control_Alt = require("../Control.Alt/index.js");
  10733. var Control_Alternative = require("../Control.Alternative/index.js");
  10734. var Control_Applicative = require("../Control.Applicative/index.js");
  10735. var Control_Apply = require("../Control.Apply/index.js");
  10736. var Control_Bind = require("../Control.Bind/index.js");
  10737. var Control_Category = require("../Control.Category/index.js");
  10738. var Control_Comonad = require("../Control.Comonad/index.js");
  10739. var Control_Extend = require("../Control.Extend/index.js");
  10740. var Control_Monad = require("../Control.Monad/index.js");
  10741. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  10742. var Control_MonadZero = require("../Control.MonadZero/index.js");
  10743. var Control_Plus = require("../Control.Plus/index.js");
  10744. var Data_Eq = require("../Data.Eq/index.js");
  10745. var Data_Foldable = require("../Data.Foldable/index.js");
  10746. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  10747. var Data_Function = require("../Data.Function/index.js");
  10748. var Data_Functor = require("../Data.Functor/index.js");
  10749. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  10750. var Data_Maybe = require("../Data.Maybe/index.js");
  10751. var Data_Monoid = require("../Data.Monoid/index.js");
  10752. var Data_Newtype = require("../Data.Newtype/index.js");
  10753. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  10754. var Data_Ord = require("../Data.Ord/index.js");
  10755. var Data_Ordering = require("../Data.Ordering/index.js");
  10756. var Data_Semigroup = require("../Data.Semigroup/index.js");
  10757. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  10758. var Data_Semiring = require("../Data.Semiring/index.js");
  10759. var Data_Show = require("../Data.Show/index.js");
  10760. var Data_Traversable = require("../Data.Traversable/index.js");
  10761. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  10762. var Data_Tuple = require("../Data.Tuple/index.js");
  10763. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  10764. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  10765. var Nil = function () {
  10766. function Nil() {}
  10767. ;
  10768. Nil.value = new Nil();
  10769. return Nil;
  10770. }();
  10771. var Cons = function () {
  10772. function Cons(value0, value1) {
  10773. this.value0 = value0;
  10774. this.value1 = value1;
  10775. }
  10776. ;
  10777. Cons.create = function (value0) {
  10778. return function (value1) {
  10779. return new Cons(value0, value1);
  10780. };
  10781. };
  10782. return Cons;
  10783. }();
  10784. var NonEmptyList = function NonEmptyList(x) {
  10785. return x;
  10786. };
  10787. var toList = function toList(v) {
  10788. return new Cons(v.value0, v.value1);
  10789. };
  10790. var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) {
  10791. return n;
  10792. }, NonEmptyList);
  10793. var nelCons = function nelCons(a) {
  10794. return function (v) {
  10795. return new Data_NonEmpty.NonEmpty(a, new Cons(v.value0, v.value1));
  10796. };
  10797. };
  10798. var listMap = function listMap(f) {
  10799. var chunkedRevMap = function chunkedRevMap($copy_chunksAcc) {
  10800. return function ($copy_v) {
  10801. var $tco_var_chunksAcc = $copy_chunksAcc;
  10802. var $tco_done = false;
  10803. var $tco_result;
  10804. function $tco_loop(chunksAcc, v) {
  10805. if (v instanceof Cons && v.value1 instanceof Cons && v.value1.value1 instanceof Cons) {
  10806. $tco_var_chunksAcc = new Cons(v, chunksAcc);
  10807. $copy_v = v.value1.value1.value1;
  10808. return;
  10809. }
  10810. ;
  10811. var unrolledMap = function unrolledMap(v1) {
  10812. if (v1 instanceof Cons && v1.value1 instanceof Cons && v1.value1.value1 instanceof Nil) {
  10813. return new Cons(f(v1.value0), new Cons(f(v1.value1.value0), Nil.value));
  10814. }
  10815. ;
  10816. if (v1 instanceof Cons && v1.value1 instanceof Nil) {
  10817. return new Cons(f(v1.value0), Nil.value);
  10818. }
  10819. ;
  10820. return Nil.value;
  10821. };
  10822. var reverseUnrolledMap = function reverseUnrolledMap($copy_v1) {
  10823. return function ($copy_acc) {
  10824. var $tco_var_v1 = $copy_v1;
  10825. var $tco_done = false;
  10826. var $tco_result;
  10827. function $tco_loop(v1, acc) {
  10828. if (v1 instanceof Cons && v1.value0 instanceof Cons && v1.value0.value1 instanceof Cons && v1.value0.value1.value1 instanceof Cons) {
  10829. $tco_var_v1 = v1.value1;
  10830. $copy_acc = new Cons(f(v1.value0.value0), new Cons(f(v1.value0.value1.value0), new Cons(f(v1.value0.value1.value1.value0), acc)));
  10831. return;
  10832. }
  10833. ;
  10834. $tco_done = true;
  10835. return acc;
  10836. }
  10837. ;
  10838. while (!$tco_done) {
  10839. $tco_result = $tco_loop($tco_var_v1, $copy_acc);
  10840. }
  10841. ;
  10842. return $tco_result;
  10843. };
  10844. };
  10845. $tco_done = true;
  10846. return reverseUnrolledMap(chunksAcc)(unrolledMap(v));
  10847. }
  10848. ;
  10849. while (!$tco_done) {
  10850. $tco_result = $tco_loop($tco_var_chunksAcc, $copy_v);
  10851. }
  10852. ;
  10853. return $tco_result;
  10854. };
  10855. };
  10856. return chunkedRevMap(Nil.value);
  10857. };
  10858. var functorList = new Data_Functor.Functor(listMap);
  10859. var functorNonEmptyList = Data_NonEmpty.functorNonEmpty(functorList);
  10860. var foldableList = new Data_Foldable.Foldable(function (dictMonoid) {
  10861. return function (f) {
  10862. return Data_Foldable.foldl(foldableList)(function (acc) {
  10863. var $202 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
  10864. return function ($203) {
  10865. return $202(f($203));
  10866. };
  10867. })(Data_Monoid.mempty(dictMonoid));
  10868. };
  10869. }, function (f) {
  10870. var go = function go($copy_b) {
  10871. return function ($copy_v) {
  10872. var $tco_var_b = $copy_b;
  10873. var $tco_done = false;
  10874. var $tco_result;
  10875. function $tco_loop(b, v) {
  10876. if (v instanceof Nil) {
  10877. $tco_done = true;
  10878. return b;
  10879. }
  10880. ;
  10881. if (v instanceof Cons) {
  10882. $tco_var_b = f(b)(v.value0);
  10883. $copy_v = v.value1;
  10884. return;
  10885. }
  10886. ;
  10887. throw new Error("Failed pattern match at Data.List.Types (line 109, column 12 - line 111, column 30): " + [v.constructor.name]);
  10888. }
  10889. ;
  10890. while (!$tco_done) {
  10891. $tco_result = $tco_loop($tco_var_b, $copy_v);
  10892. }
  10893. ;
  10894. return $tco_result;
  10895. };
  10896. };
  10897. return go;
  10898. }, function (f) {
  10899. return function (b) {
  10900. var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value);
  10901. var $204 = Data_Foldable.foldl(foldableList)(Data_Function.flip(f))(b);
  10902. return function ($205) {
  10903. return $204(rev($205));
  10904. };
  10905. };
  10906. });
  10907. var foldableNonEmptyList = Data_NonEmpty.foldableNonEmpty(foldableList);
  10908. var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  10909. return foldableList;
  10910. }, function (dictMonoid) {
  10911. return function (f) {
  10912. return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
  10913. return function (acc) {
  10914. var $206 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
  10915. var $207 = f(i);
  10916. return function ($208) {
  10917. return $206($207($208));
  10918. };
  10919. };
  10920. })(Data_Monoid.mempty(dictMonoid));
  10921. };
  10922. }, function (f) {
  10923. return function (acc) {
  10924. var $209 = Data_Foldable.foldl(foldableList)(function (v) {
  10925. return function (a) {
  10926. return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a));
  10927. };
  10928. })(new Data_Tuple.Tuple(0, acc));
  10929. return function ($210) {
  10930. return Data_Tuple.snd($209($210));
  10931. };
  10932. };
  10933. }, function (f) {
  10934. return function (b) {
  10935. return function (xs) {
  10936. var v = function () {
  10937. var rev = Data_Foldable.foldl(foldableList)(function (v1) {
  10938. return function (a) {
  10939. return new Data_Tuple.Tuple(v1.value0 + 1 | 0, new Cons(a, v1.value1));
  10940. };
  10941. });
  10942. return rev(new Data_Tuple.Tuple(0, Nil.value))(xs);
  10943. }();
  10944. return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) {
  10945. return function (a) {
  10946. return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1));
  10947. };
  10948. })(new Data_Tuple.Tuple(v.value0, b))(v.value1));
  10949. };
  10950. };
  10951. });
  10952. var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  10953. return foldableNonEmptyList;
  10954. }, function (dictMonoid) {
  10955. return function (f) {
  10956. return function (v) {
  10957. return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () {
  10958. var $211 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10959. return function ($212) {
  10960. return f($211($212));
  10961. };
  10962. }())(v);
  10963. };
  10964. };
  10965. }, function (f) {
  10966. return function (b) {
  10967. return function (v) {
  10968. return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  10969. var $213 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10970. return function ($214) {
  10971. return f($213($214));
  10972. };
  10973. }())(b)(v);
  10974. };
  10975. };
  10976. }, function (f) {
  10977. return function (b) {
  10978. return function (v) {
  10979. return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  10980. var $215 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10981. return function ($216) {
  10982. return f($215($216));
  10983. };
  10984. }())(b)(v);
  10985. };
  10986. };
  10987. });
  10988. var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  10989. return functorList;
  10990. }, function (f) {
  10991. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
  10992. return function (x) {
  10993. return function (acc) {
  10994. return new Cons(f(i)(x), acc);
  10995. };
  10996. };
  10997. })(Nil.value);
  10998. });
  10999. var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  11000. return functorNonEmptyList;
  11001. }, function (fn) {
  11002. return function (v) {
  11003. return NonEmptyList(Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () {
  11004. var $217 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  11005. return function ($218) {
  11006. return fn($217($218));
  11007. };
  11008. }())(v));
  11009. };
  11010. });
  11011. var semigroupList = new Data_Semigroup.Semigroup(function (xs) {
  11012. return function (ys) {
  11013. return Data_Foldable.foldr(foldableList)(Cons.create)(ys)(xs);
  11014. };
  11015. });
  11016. var monoidList = new Data_Monoid.Monoid(function () {
  11017. return semigroupList;
  11018. }, Nil.value);
  11019. var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) {
  11020. return function (as$prime) {
  11021. return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(toList(as$prime)));
  11022. };
  11023. });
  11024. var showList = function showList(dictShow) {
  11025. return new Data_Show.Show(function (v) {
  11026. if (v instanceof Nil) {
  11027. return "Nil";
  11028. }
  11029. ;
  11030. return "(" + (Data_Foldable.intercalate(foldableList)(Data_Monoid.monoidString)(" : ")(Data_Functor.map(functorList)(Data_Show.show(dictShow))(v)) + " : Nil)");
  11031. });
  11032. };
  11033. var showNonEmptyList = function showNonEmptyList(dictShow) {
  11034. return new Data_Show.Show(function (v) {
  11035. return "(NonEmptyList " + (Data_Show.show(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow)))(v) + ")");
  11036. });
  11037. };
  11038. var traversableList = new Data_Traversable.Traversable(function () {
  11039. return foldableList;
  11040. }, function () {
  11041. return functorList;
  11042. }, function (dictApplicative) {
  11043. return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  11044. }, function (dictApplicative) {
  11045. return function (f) {
  11046. var $219 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value));
  11047. var $220 = Data_Foldable.foldl(foldableList)(function (acc) {
  11048. var $222 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc);
  11049. return function ($223) {
  11050. return $222(f($223));
  11051. };
  11052. })(Control_Applicative.pure(dictApplicative)(Nil.value));
  11053. return function ($221) {
  11054. return $219($220($221));
  11055. };
  11056. };
  11057. });
  11058. var traversableNonEmptyList = Data_NonEmpty.traversableNonEmpty(traversableList);
  11059. var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  11060. return foldableWithIndexList;
  11061. }, function () {
  11062. return functorWithIndexList;
  11063. }, function () {
  11064. return traversableList;
  11065. }, function (dictApplicative) {
  11066. return function (f) {
  11067. var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value);
  11068. var $224 = Data_Functor.map(dictApplicative.Apply0().Functor0())(rev);
  11069. var $225 = Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
  11070. return function (acc) {
  11071. var $227 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc);
  11072. var $228 = f(i);
  11073. return function ($229) {
  11074. return $227($228($229));
  11075. };
  11076. };
  11077. })(Control_Applicative.pure(dictApplicative)(Nil.value));
  11078. return function ($226) {
  11079. return $224($225($226));
  11080. };
  11081. };
  11082. });
  11083. var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  11084. return foldableWithIndexNonEmptyList;
  11085. }, function () {
  11086. return functorWithIndexNonEmptyList;
  11087. }, function () {
  11088. return traversableNonEmptyList;
  11089. }, function (dictApplicative) {
  11090. return function (f) {
  11091. return function (v) {
  11092. return Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmptyList)(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () {
  11093. var $230 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  11094. return function ($231) {
  11095. return f($230($231));
  11096. };
  11097. }())(v));
  11098. };
  11099. };
  11100. });
  11101. var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function (f) {
  11102. return function (b) {
  11103. var go = function go($copy_source) {
  11104. return function ($copy_memo) {
  11105. var $tco_var_source = $copy_source;
  11106. var $tco_done = false;
  11107. var $tco_result;
  11108. function $tco_loop(source, memo) {
  11109. var v = f(source);
  11110. if (v.value1 instanceof Data_Maybe.Just) {
  11111. $tco_var_source = v.value1.value0;
  11112. $copy_memo = new Cons(v.value0, memo);
  11113. return;
  11114. }
  11115. ;
  11116. if (v.value1 instanceof Data_Maybe.Nothing) {
  11117. $tco_done = true;
  11118. return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(new Cons(v.value0, memo));
  11119. }
  11120. ;
  11121. throw new Error("Failed pattern match at Data.List.Types (line 133, column 22 - line 135, column 61): " + [v.constructor.name]);
  11122. }
  11123. ;
  11124. while (!$tco_done) {
  11125. $tco_result = $tco_loop($tco_var_source, $copy_memo);
  11126. }
  11127. ;
  11128. return $tco_result;
  11129. };
  11130. };
  11131. return go(b)(Nil.value);
  11132. };
  11133. });
  11134. var unfoldableList = new Data_Unfoldable.Unfoldable(function () {
  11135. return unfoldable1List;
  11136. }, function (f) {
  11137. return function (b) {
  11138. var go = function go($copy_source) {
  11139. return function ($copy_memo) {
  11140. var $tco_var_source = $copy_source;
  11141. var $tco_done = false;
  11142. var $tco_result;
  11143. function $tco_loop(source, memo) {
  11144. var v = f(source);
  11145. if (v instanceof Data_Maybe.Nothing) {
  11146. $tco_done = true;
  11147. return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(memo);
  11148. }
  11149. ;
  11150. if (v instanceof Data_Maybe.Just) {
  11151. $tco_var_source = v.value0.value1;
  11152. $copy_memo = new Cons(v.value0.value0, memo);
  11153. return;
  11154. }
  11155. ;
  11156. throw new Error("Failed pattern match at Data.List.Types (line 140, column 22 - line 142, column 52): " + [v.constructor.name]);
  11157. }
  11158. ;
  11159. while (!$tco_done) {
  11160. $tco_result = $tco_loop($tco_var_source, $copy_memo);
  11161. }
  11162. ;
  11163. return $tco_result;
  11164. };
  11165. };
  11166. return go(b)(Nil.value);
  11167. };
  11168. });
  11169. var unfoldable1NonEmptyList = Data_NonEmpty.unfoldable1NonEmpty(unfoldableList);
  11170. var foldable1NonEmptyList = Data_NonEmpty.foldable1NonEmpty(foldableList);
  11171. var extendNonEmptyList = new Control_Extend.Extend(function () {
  11172. return functorNonEmptyList;
  11173. }, function (f) {
  11174. return function (v) {
  11175. var go = function go(a) {
  11176. return function (v1) {
  11177. return {
  11178. val: new Cons(f(new Data_NonEmpty.NonEmpty(a, v1.acc)), v1.val),
  11179. acc: new Cons(a, v1.acc)
  11180. };
  11181. };
  11182. };
  11183. return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({
  11184. val: Nil.value,
  11185. acc: Nil.value
  11186. })(v.value1).val);
  11187. };
  11188. });
  11189. var extendList = new Control_Extend.Extend(function () {
  11190. return functorList;
  11191. }, function (f) {
  11192. return function (v) {
  11193. if (v instanceof Nil) {
  11194. return Nil.value;
  11195. }
  11196. ;
  11197. if (v instanceof Cons) {
  11198. var go = function go(a$prime) {
  11199. return function (v1) {
  11200. var acc$prime = new Cons(a$prime, v1.acc);
  11201. return {
  11202. val: new Cons(f(acc$prime), v1.val),
  11203. acc: acc$prime
  11204. };
  11205. };
  11206. };
  11207. return new Cons(f(v), Data_Foldable.foldr(foldableList)(go)({
  11208. val: Nil.value,
  11209. acc: Nil.value
  11210. })(v.value1).val);
  11211. }
  11212. ;
  11213. throw new Error("Failed pattern match at Data.List.Types (line 180, column 1 - line 187, column 42): " + [f.constructor.name, v.constructor.name]);
  11214. };
  11215. });
  11216. var eq1List = new Data_Eq.Eq1(function (dictEq) {
  11217. return function (xs) {
  11218. return function (ys) {
  11219. var go = function go($copy_v) {
  11220. return function ($copy_v1) {
  11221. return function ($copy_v2) {
  11222. var $tco_var_v = $copy_v;
  11223. var $tco_var_v1 = $copy_v1;
  11224. var $tco_done = false;
  11225. var $tco_result;
  11226. function $tco_loop(v, v1, v2) {
  11227. if (!v2) {
  11228. $tco_done = true;
  11229. return false;
  11230. }
  11231. ;
  11232. if (v instanceof Nil && v1 instanceof Nil) {
  11233. $tco_done = true;
  11234. return v2;
  11235. }
  11236. ;
  11237. if (v instanceof Cons && v1 instanceof Cons) {
  11238. $tco_var_v = v.value1;
  11239. $tco_var_v1 = v1.value1;
  11240. $copy_v2 = v2 && Data_Eq.eq(dictEq)(v1.value0)(v.value0);
  11241. return;
  11242. }
  11243. ;
  11244. $tco_done = true;
  11245. return false;
  11246. }
  11247. ;
  11248. while (!$tco_done) {
  11249. $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_v2);
  11250. }
  11251. ;
  11252. return $tco_result;
  11253. };
  11254. };
  11255. };
  11256. return go(xs)(ys)(true);
  11257. };
  11258. };
  11259. });
  11260. var eqList = function eqList(dictEq) {
  11261. return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq));
  11262. };
  11263. var eqNonEmptyList = function eqNonEmptyList(dictEq) {
  11264. return Data_NonEmpty.eqNonEmpty(eq1List)(dictEq);
  11265. };
  11266. var ord1List = new Data_Ord.Ord1(function () {
  11267. return eq1List;
  11268. }, function (dictOrd) {
  11269. return function (xs) {
  11270. return function (ys) {
  11271. var go = function go($copy_v) {
  11272. return function ($copy_v1) {
  11273. var $tco_var_v = $copy_v;
  11274. var $tco_done = false;
  11275. var $tco_result;
  11276. function $tco_loop(v, v1) {
  11277. if (v instanceof Nil && v1 instanceof Nil) {
  11278. $tco_done = true;
  11279. return Data_Ordering.EQ.value;
  11280. }
  11281. ;
  11282. if (v instanceof Nil) {
  11283. $tco_done = true;
  11284. return Data_Ordering.LT.value;
  11285. }
  11286. ;
  11287. if (v1 instanceof Nil) {
  11288. $tco_done = true;
  11289. return Data_Ordering.GT.value;
  11290. }
  11291. ;
  11292. if (v instanceof Cons && v1 instanceof Cons) {
  11293. var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0);
  11294. if (v2 instanceof Data_Ordering.EQ) {
  11295. $tco_var_v = v.value1;
  11296. $copy_v1 = v1.value1;
  11297. return;
  11298. }
  11299. ;
  11300. $tco_done = true;
  11301. return v2;
  11302. }
  11303. ;
  11304. throw new Error("Failed pattern match at Data.List.Types (line 61, column 5 - line 61, column 20): " + [v.constructor.name, v1.constructor.name]);
  11305. }
  11306. ;
  11307. while (!$tco_done) {
  11308. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  11309. }
  11310. ;
  11311. return $tco_result;
  11312. };
  11313. };
  11314. return go(xs)(ys);
  11315. };
  11316. };
  11317. });
  11318. var ordList = function ordList(dictOrd) {
  11319. return new Data_Ord.Ord(function () {
  11320. return eqList(dictOrd.Eq0());
  11321. }, Data_Ord.compare1(ord1List)(dictOrd));
  11322. };
  11323. var ordNonEmptyList = function ordNonEmptyList(dictOrd) {
  11324. return Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd);
  11325. };
  11326. var comonadNonEmptyList = new Control_Comonad.Comonad(function () {
  11327. return extendNonEmptyList;
  11328. }, function (v) {
  11329. return v.value0;
  11330. });
  11331. var applyList = new Control_Apply.Apply(function () {
  11332. return functorList;
  11333. }, function (v) {
  11334. return function (v1) {
  11335. if (v instanceof Nil) {
  11336. return Nil.value;
  11337. }
  11338. ;
  11339. if (v instanceof Cons) {
  11340. return Data_Semigroup.append(semigroupList)(Data_Functor.map(functorList)(v.value0)(v1))(Control_Apply.apply(applyList)(v.value1)(v1));
  11341. }
  11342. ;
  11343. throw new Error("Failed pattern match at Data.List.Types (line 155, column 1 - line 157, column 48): " + [v.constructor.name, v1.constructor.name]);
  11344. };
  11345. });
  11346. var applyNonEmptyList = new Control_Apply.Apply(function () {
  11347. return functorNonEmptyList;
  11348. }, function (v) {
  11349. return function (v1) {
  11350. return new Data_NonEmpty.NonEmpty(v.value0(v1.value0), Data_Semigroup.append(semigroupList)(Control_Apply.apply(applyList)(v.value1)(new Cons(v1.value0, Nil.value)))(Control_Apply.apply(applyList)(new Cons(v.value0, v.value1))(v1.value1)));
  11351. };
  11352. });
  11353. var bindList = new Control_Bind.Bind(function () {
  11354. return applyList;
  11355. }, function (v) {
  11356. return function (v1) {
  11357. if (v instanceof Nil) {
  11358. return Nil.value;
  11359. }
  11360. ;
  11361. if (v instanceof Cons) {
  11362. return Data_Semigroup.append(semigroupList)(v1(v.value0))(Control_Bind.bind(bindList)(v.value1)(v1));
  11363. }
  11364. ;
  11365. throw new Error("Failed pattern match at Data.List.Types (line 162, column 1 - line 164, column 37): " + [v.constructor.name, v1.constructor.name]);
  11366. };
  11367. });
  11368. var bindNonEmptyList = new Control_Bind.Bind(function () {
  11369. return applyNonEmptyList;
  11370. }, function (v) {
  11371. return function (f) {
  11372. var v1 = f(v.value0);
  11373. return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(Control_Bind.bind(bindList)(v.value1)(function ($232) {
  11374. return toList(f($232));
  11375. })));
  11376. };
  11377. });
  11378. var applicativeList = new Control_Applicative.Applicative(function () {
  11379. return applyList;
  11380. }, function (a) {
  11381. return new Cons(a, Nil.value);
  11382. });
  11383. var monadList = new Control_Monad.Monad(function () {
  11384. return applicativeList;
  11385. }, function () {
  11386. return bindList;
  11387. });
  11388. var altNonEmptyList = new Control_Alt.Alt(function () {
  11389. return functorNonEmptyList;
  11390. }, Data_Semigroup.append(semigroupNonEmptyList));
  11391. var altList = new Control_Alt.Alt(function () {
  11392. return functorList;
  11393. }, Data_Semigroup.append(semigroupList));
  11394. var plusList = new Control_Plus.Plus(function () {
  11395. return altList;
  11396. }, Nil.value);
  11397. var alternativeList = new Control_Alternative.Alternative(function () {
  11398. return applicativeList;
  11399. }, function () {
  11400. return plusList;
  11401. });
  11402. var monadZeroList = new Control_MonadZero.MonadZero(function () {
  11403. return alternativeList;
  11404. }, function () {
  11405. return monadList;
  11406. });
  11407. var monadPlusList = new Control_MonadPlus.MonadPlus(function () {
  11408. return monadZeroList;
  11409. });
  11410. var applicativeNonEmptyList = new Control_Applicative.Applicative(function () {
  11411. return applyNonEmptyList;
  11412. }, function () {
  11413. var $233 = Data_NonEmpty.singleton(plusList);
  11414. return function ($234) {
  11415. return NonEmptyList($233($234));
  11416. };
  11417. }());
  11418. var monadNonEmptyList = new Control_Monad.Monad(function () {
  11419. return applicativeNonEmptyList;
  11420. }, function () {
  11421. return bindNonEmptyList;
  11422. });
  11423. var traversable1NonEmptyList = new Data_Semigroup_Traversable.Traversable1(function () {
  11424. return foldable1NonEmptyList;
  11425. }, function () {
  11426. return traversableNonEmptyList;
  11427. }, function (dictApply) {
  11428. return Data_Semigroup_Traversable.traverse1(traversable1NonEmptyList)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
  11429. }, function (dictApply) {
  11430. return function (f) {
  11431. return function (v) {
  11432. return Data_Functor.mapFlipped(dictApply.Functor0())(Data_Foldable.foldl(foldableList)(function (acc) {
  11433. var $235 = Control_Apply.lift2(dictApply)(Data_Function.flip(nelCons))(acc);
  11434. return function ($236) {
  11435. return $235(f($236));
  11436. };
  11437. })(Data_Functor.map(dictApply.Functor0())(Control_Applicative.pure(applicativeNonEmptyList))(f(v.value0)))(v.value1))(function (v1) {
  11438. return Data_Foldable.foldl(foldableList)(Data_Function.flip(nelCons))(Control_Applicative.pure(applicativeNonEmptyList)(v1.value0))(v1.value1);
  11439. });
  11440. };
  11441. };
  11442. });
  11443. module.exports = {
  11444. Nil: Nil,
  11445. Cons: Cons,
  11446. NonEmptyList: NonEmptyList,
  11447. toList: toList,
  11448. nelCons: nelCons,
  11449. showList: showList,
  11450. eqList: eqList,
  11451. eq1List: eq1List,
  11452. ordList: ordList,
  11453. ord1List: ord1List,
  11454. semigroupList: semigroupList,
  11455. monoidList: monoidList,
  11456. functorList: functorList,
  11457. functorWithIndexList: functorWithIndexList,
  11458. foldableList: foldableList,
  11459. foldableWithIndexList: foldableWithIndexList,
  11460. unfoldable1List: unfoldable1List,
  11461. unfoldableList: unfoldableList,
  11462. traversableList: traversableList,
  11463. traversableWithIndexList: traversableWithIndexList,
  11464. applyList: applyList,
  11465. applicativeList: applicativeList,
  11466. bindList: bindList,
  11467. monadList: monadList,
  11468. altList: altList,
  11469. plusList: plusList,
  11470. alternativeList: alternativeList,
  11471. monadZeroList: monadZeroList,
  11472. monadPlusList: monadPlusList,
  11473. extendList: extendList,
  11474. newtypeNonEmptyList: newtypeNonEmptyList,
  11475. eqNonEmptyList: eqNonEmptyList,
  11476. ordNonEmptyList: ordNonEmptyList,
  11477. showNonEmptyList: showNonEmptyList,
  11478. functorNonEmptyList: functorNonEmptyList,
  11479. applyNonEmptyList: applyNonEmptyList,
  11480. applicativeNonEmptyList: applicativeNonEmptyList,
  11481. bindNonEmptyList: bindNonEmptyList,
  11482. monadNonEmptyList: monadNonEmptyList,
  11483. altNonEmptyList: altNonEmptyList,
  11484. extendNonEmptyList: extendNonEmptyList,
  11485. comonadNonEmptyList: comonadNonEmptyList,
  11486. semigroupNonEmptyList: semigroupNonEmptyList,
  11487. foldableNonEmptyList: foldableNonEmptyList,
  11488. traversableNonEmptyList: traversableNonEmptyList,
  11489. foldable1NonEmptyList: foldable1NonEmptyList,
  11490. unfoldable1NonEmptyList: unfoldable1NonEmptyList,
  11491. functorWithIndexNonEmptyList: functorWithIndexNonEmptyList,
  11492. foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList,
  11493. traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList,
  11494. traversable1NonEmptyList: traversable1NonEmptyList
  11495. };
  11496. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Effect.Console/foreign.js":[function(require,module,exports) {
  11497. "use strict";
  11498. exports.log = function (s) {
  11499. return function () {
  11500. console.log(s);
  11501. return {};
  11502. };
  11503. };
  11504. exports.warn = function (s) {
  11505. return function () {
  11506. console.warn(s);
  11507. return {};
  11508. };
  11509. };
  11510. exports.error = function (s) {
  11511. return function () {
  11512. console.error(s);
  11513. return {};
  11514. };
  11515. };
  11516. exports.info = function (s) {
  11517. return function () {
  11518. console.info(s);
  11519. return {};
  11520. };
  11521. };
  11522. exports.time = function (s) {
  11523. return function () {
  11524. console.time(s);
  11525. return {};
  11526. };
  11527. };
  11528. exports.timeLog = function (s) {
  11529. return function () {
  11530. console.timeLog(s);
  11531. return {};
  11532. };
  11533. };
  11534. exports.timeEnd = function (s) {
  11535. return function () {
  11536. console.timeEnd(s);
  11537. return {};
  11538. };
  11539. };
  11540. exports.clear = function () {
  11541. console.clear();
  11542. return {};
  11543. };
  11544. },{}],"../output/Effect.Console/index.js":[function(require,module,exports) {
  11545. // Generated by purs version 0.13.6
  11546. "use strict";
  11547. var $foreign = require("./foreign.js");
  11548. var Data_Show = require("../Data.Show/index.js");
  11549. var warnShow = function warnShow(dictShow) {
  11550. return function (a) {
  11551. return $foreign.warn(Data_Show.show(dictShow)(a));
  11552. };
  11553. };
  11554. var logShow = function logShow(dictShow) {
  11555. return function (a) {
  11556. return $foreign.log(Data_Show.show(dictShow)(a));
  11557. };
  11558. };
  11559. var infoShow = function infoShow(dictShow) {
  11560. return function (a) {
  11561. return $foreign.info(Data_Show.show(dictShow)(a));
  11562. };
  11563. };
  11564. var errorShow = function errorShow(dictShow) {
  11565. return function (a) {
  11566. return $foreign.error(Data_Show.show(dictShow)(a));
  11567. };
  11568. };
  11569. module.exports = {
  11570. logShow: logShow,
  11571. warnShow: warnShow,
  11572. errorShow: errorShow,
  11573. infoShow: infoShow,
  11574. log: $foreign.log,
  11575. warn: $foreign.warn,
  11576. error: $foreign.error,
  11577. info: $foreign.info,
  11578. time: $foreign.time,
  11579. timeLog: $foreign.timeLog,
  11580. timeEnd: $foreign.timeEnd,
  11581. clear: $foreign.clear
  11582. };
  11583. },{"./foreign.js":"../output/Effect.Console/foreign.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Foreign/foreign.js":[function(require,module,exports) {
  11584. "use strict";
  11585. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  11586. exports.unsafeToForeign = function (value) {
  11587. return value;
  11588. };
  11589. exports.unsafeFromForeign = function (value) {
  11590. return value;
  11591. };
  11592. exports.typeOf = function (value) {
  11593. return _typeof(value);
  11594. };
  11595. exports.tagOf = function (value) {
  11596. return Object.prototype.toString.call(value).slice(8, -1);
  11597. };
  11598. exports.isNull = function (value) {
  11599. return value === null;
  11600. };
  11601. exports.isUndefined = function (value) {
  11602. return value === undefined;
  11603. };
  11604. exports.isArray = Array.isArray || function (value) {
  11605. return Object.prototype.toString.call(value) === "[object Array]";
  11606. };
  11607. },{}],"../output/Data.Int/foreign.js":[function(require,module,exports) {
  11608. "use strict";
  11609. exports.fromNumberImpl = function (just) {
  11610. return function (nothing) {
  11611. return function (n) {
  11612. /* jshint bitwise: false */
  11613. return (n | 0) === n ? just(n) : nothing;
  11614. };
  11615. };
  11616. };
  11617. exports.toNumber = function (n) {
  11618. return n;
  11619. };
  11620. exports.fromStringAsImpl = function (just) {
  11621. return function (nothing) {
  11622. return function (radix) {
  11623. var digits;
  11624. if (radix < 11) {
  11625. digits = "[0-" + (radix - 1).toString() + "]";
  11626. } else if (radix === 11) {
  11627. digits = "[0-9a]";
  11628. } else {
  11629. digits = "[0-9a-" + String.fromCharCode(86 + radix) + "]";
  11630. }
  11631. var pattern = new RegExp("^[\\+\\-]?" + digits + "+$", "i");
  11632. return function (s) {
  11633. /* jshint bitwise: false */
  11634. if (pattern.test(s)) {
  11635. var i = parseInt(s, radix);
  11636. return (i | 0) === i ? just(i) : nothing;
  11637. } else {
  11638. return nothing;
  11639. }
  11640. };
  11641. };
  11642. };
  11643. };
  11644. exports.toStringAs = function (radix) {
  11645. return function (i) {
  11646. return i.toString(radix);
  11647. };
  11648. };
  11649. exports.quot = function (x) {
  11650. return function (y) {
  11651. /* jshint bitwise: false */
  11652. return x / y | 0;
  11653. };
  11654. };
  11655. exports.rem = function (x) {
  11656. return function (y) {
  11657. return x % y;
  11658. };
  11659. };
  11660. exports.pow = function (x) {
  11661. return function (y) {
  11662. /* jshint bitwise: false */
  11663. return Math.pow(x, y) | 0;
  11664. };
  11665. };
  11666. },{}],"../output/Data.DivisionRing/index.js":[function(require,module,exports) {
  11667. // Generated by purs version 0.13.6
  11668. "use strict";
  11669. var Data_Ring = require("../Data.Ring/index.js");
  11670. var Data_Semiring = require("../Data.Semiring/index.js");
  11671. var DivisionRing = function DivisionRing(Ring0, recip) {
  11672. this.Ring0 = Ring0;
  11673. this.recip = recip;
  11674. };
  11675. var recip = function recip(dict) {
  11676. return dict.recip;
  11677. };
  11678. var rightDiv = function rightDiv(dictDivisionRing) {
  11679. return function (a) {
  11680. return function (b) {
  11681. return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(a)(recip(dictDivisionRing)(b));
  11682. };
  11683. };
  11684. };
  11685. var leftDiv = function leftDiv(dictDivisionRing) {
  11686. return function (a) {
  11687. return function (b) {
  11688. return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(recip(dictDivisionRing)(b))(a);
  11689. };
  11690. };
  11691. };
  11692. var divisionringNumber = new DivisionRing(function () {
  11693. return Data_Ring.ringNumber;
  11694. }, function (x) {
  11695. return 1.0 / x;
  11696. });
  11697. module.exports = {
  11698. DivisionRing: DivisionRing,
  11699. recip: recip,
  11700. leftDiv: leftDiv,
  11701. rightDiv: rightDiv,
  11702. divisionringNumber: divisionringNumber
  11703. };
  11704. },{"../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js"}],"../output/Global/foreign.js":[function(require,module,exports) {
  11705. /* globals exports */
  11706. "use strict";
  11707. exports.nan = NaN;
  11708. exports.isNaN = isNaN;
  11709. exports.infinity = Infinity;
  11710. exports.isFinite = isFinite;
  11711. exports.readInt = function (radix) {
  11712. return function (n) {
  11713. return parseInt(n, radix);
  11714. };
  11715. };
  11716. exports.readFloat = parseFloat;
  11717. var formatNumber = function formatNumber(format) {
  11718. return function (fail, succ, digits, n) {
  11719. try {
  11720. return succ(n[format](digits));
  11721. } catch (e) {
  11722. return fail(e.message);
  11723. }
  11724. };
  11725. };
  11726. exports._toFixed = formatNumber("toFixed");
  11727. exports._toExponential = formatNumber("toExponential");
  11728. exports._toPrecision = formatNumber("toPrecision");
  11729. var encdecURI = function encdecURI(encdec) {
  11730. return function (fail, succ, s) {
  11731. try {
  11732. return succ(encdec(s));
  11733. } catch (e) {
  11734. return fail(e.message);
  11735. }
  11736. };
  11737. };
  11738. exports._decodeURI = encdecURI(decodeURI);
  11739. exports._encodeURI = encdecURI(encodeURI);
  11740. exports._decodeURIComponent = encdecURI(decodeURIComponent);
  11741. exports._encodeURIComponent = encdecURI(encodeURIComponent);
  11742. },{}],"../output/Global/index.js":[function(require,module,exports) {
  11743. // Generated by purs version 0.13.6
  11744. "use strict";
  11745. var $foreign = require("./foreign.js");
  11746. var Data_Function = require("../Data.Function/index.js");
  11747. var Data_Maybe = require("../Data.Maybe/index.js");
  11748. var toPrecision = function toPrecision(digits) {
  11749. return function (n) {
  11750. return $foreign["_toPrecision"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
  11751. };
  11752. };
  11753. var toFixed = function toFixed(digits) {
  11754. return function (n) {
  11755. return $foreign["_toFixed"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
  11756. };
  11757. };
  11758. var toExponential = function toExponential(digits) {
  11759. return function (n) {
  11760. return $foreign["_toExponential"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
  11761. };
  11762. };
  11763. var $$encodeURIComponent = function $$encodeURIComponent(s) {
  11764. return $foreign["_encodeURIComponent"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11765. };
  11766. var $$encodeURI = function $$encodeURI(s) {
  11767. return $foreign["_encodeURI"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11768. };
  11769. var $$decodeURIComponent = function $$decodeURIComponent(s) {
  11770. return $foreign["_decodeURIComponent"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11771. };
  11772. var $$decodeURI = function $$decodeURI(s) {
  11773. return $foreign["_decodeURI"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11774. };
  11775. module.exports = {
  11776. toFixed: toFixed,
  11777. toExponential: toExponential,
  11778. toPrecision: toPrecision,
  11779. "decodeURI": $$decodeURI,
  11780. "encodeURI": $$encodeURI,
  11781. "decodeURIComponent": $$decodeURIComponent,
  11782. "encodeURIComponent": $$encodeURIComponent,
  11783. nan: $foreign.nan,
  11784. "isNaN": $foreign["isNaN"],
  11785. infinity: $foreign.infinity,
  11786. "isFinite": $foreign["isFinite"],
  11787. readInt: $foreign.readInt,
  11788. readFloat: $foreign.readFloat
  11789. };
  11790. },{"./foreign.js":"../output/Global/foreign.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Math/foreign.js":[function(require,module,exports) {
  11791. "use strict"; // module Math
  11792. exports.abs = Math.abs;
  11793. exports.acos = Math.acos;
  11794. exports.asin = Math.asin;
  11795. exports.atan = Math.atan;
  11796. exports.atan2 = function (y) {
  11797. return function (x) {
  11798. return Math.atan2(y, x);
  11799. };
  11800. };
  11801. exports.ceil = Math.ceil;
  11802. exports.cos = Math.cos;
  11803. exports.exp = Math.exp;
  11804. exports.floor = Math.floor;
  11805. exports.trunc = Math.trunc || function (n) {
  11806. return n < 0 ? Math.ceil(n) : Math.floor(n);
  11807. };
  11808. exports.log = Math.log;
  11809. exports.max = function (n1) {
  11810. return function (n2) {
  11811. return Math.max(n1, n2);
  11812. };
  11813. };
  11814. exports.min = function (n1) {
  11815. return function (n2) {
  11816. return Math.min(n1, n2);
  11817. };
  11818. };
  11819. exports.pow = function (n) {
  11820. return function (p) {
  11821. return Math.pow(n, p);
  11822. };
  11823. };
  11824. exports.remainder = function (n) {
  11825. return function (m) {
  11826. return n % m;
  11827. };
  11828. };
  11829. exports.round = Math.round;
  11830. exports.sin = Math.sin;
  11831. exports.sqrt = Math.sqrt;
  11832. exports.tan = Math.tan;
  11833. exports.e = Math.E;
  11834. exports.ln2 = Math.LN2;
  11835. exports.ln10 = Math.LN10;
  11836. exports.log2e = Math.LOG2E;
  11837. exports.log10e = Math.LOG10E;
  11838. exports.pi = Math.PI;
  11839. exports.tau = 2 * Math.PI;
  11840. exports.sqrt1_2 = Math.SQRT1_2;
  11841. exports.sqrt2 = Math.SQRT2;
  11842. },{}],"../output/Math/index.js":[function(require,module,exports) {
  11843. // Generated by purs version 0.13.6
  11844. "use strict";
  11845. var $foreign = require("./foreign.js");
  11846. module.exports = {
  11847. abs: $foreign.abs,
  11848. acos: $foreign.acos,
  11849. asin: $foreign.asin,
  11850. atan: $foreign.atan,
  11851. atan2: $foreign.atan2,
  11852. ceil: $foreign.ceil,
  11853. cos: $foreign.cos,
  11854. exp: $foreign.exp,
  11855. floor: $foreign.floor,
  11856. log: $foreign.log,
  11857. max: $foreign.max,
  11858. min: $foreign.min,
  11859. pow: $foreign.pow,
  11860. round: $foreign.round,
  11861. sin: $foreign.sin,
  11862. sqrt: $foreign.sqrt,
  11863. tan: $foreign.tan,
  11864. trunc: $foreign.trunc,
  11865. remainder: $foreign.remainder,
  11866. e: $foreign.e,
  11867. ln2: $foreign.ln2,
  11868. ln10: $foreign.ln10,
  11869. log2e: $foreign.log2e,
  11870. log10e: $foreign.log10e,
  11871. pi: $foreign.pi,
  11872. tau: $foreign.tau,
  11873. sqrt1_2: $foreign.sqrt1_2,
  11874. sqrt2: $foreign.sqrt2
  11875. };
  11876. },{"./foreign.js":"../output/Math/foreign.js"}],"../output/Data.Int/index.js":[function(require,module,exports) {
  11877. // Generated by purs version 0.13.6
  11878. "use strict";
  11879. var $foreign = require("./foreign.js");
  11880. var Control_Category = require("../Control.Category/index.js");
  11881. var Data_Boolean = require("../Data.Boolean/index.js");
  11882. var Data_Bounded = require("../Data.Bounded/index.js");
  11883. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  11884. var Data_DivisionRing = require("../Data.DivisionRing/index.js");
  11885. var Data_Eq = require("../Data.Eq/index.js");
  11886. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  11887. var Data_Maybe = require("../Data.Maybe/index.js");
  11888. var Data_Ord = require("../Data.Ord/index.js");
  11889. var Data_Ordering = require("../Data.Ordering/index.js");
  11890. var Data_Ring = require("../Data.Ring/index.js");
  11891. var Data_Semiring = require("../Data.Semiring/index.js");
  11892. var Data_Show = require("../Data.Show/index.js");
  11893. var Global = require("../Global/index.js");
  11894. var $$Math = require("../Math/index.js");
  11895. var Radix = function Radix(x) {
  11896. return x;
  11897. };
  11898. var Even = function () {
  11899. function Even() {}
  11900. ;
  11901. Even.value = new Even();
  11902. return Even;
  11903. }();
  11904. var Odd = function () {
  11905. function Odd() {}
  11906. ;
  11907. Odd.value = new Odd();
  11908. return Odd;
  11909. }();
  11910. var showParity = new Data_Show.Show(function (v) {
  11911. if (v instanceof Even) {
  11912. return "Even";
  11913. }
  11914. ;
  11915. if (v instanceof Odd) {
  11916. return "Odd";
  11917. }
  11918. ;
  11919. throw new Error("Failed pattern match at Data.Int (line 112, column 1 - line 114, column 19): " + [v.constructor.name]);
  11920. });
  11921. var radix = function radix(n) {
  11922. if (n >= 2 && n <= 36) {
  11923. return new Data_Maybe.Just(n);
  11924. }
  11925. ;
  11926. if (Data_Boolean.otherwise) {
  11927. return Data_Maybe.Nothing.value;
  11928. }
  11929. ;
  11930. throw new Error("Failed pattern match at Data.Int (line 193, column 1 - line 193, column 28): " + [n.constructor.name]);
  11931. };
  11932. var odd = function odd(x) {
  11933. return (x & 1) !== 0;
  11934. };
  11935. var octal = 8;
  11936. var hexadecimal = 16;
  11937. var fromStringAs = $foreign.fromStringAsImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  11938. var fromString = fromStringAs(10);
  11939. var fromNumber = $foreign.fromNumberImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  11940. var unsafeClamp = function unsafeClamp(x) {
  11941. if (x === Global.infinity) {
  11942. return 0;
  11943. }
  11944. ;
  11945. if (x === -Global.infinity) {
  11946. return 0;
  11947. }
  11948. ;
  11949. if (x >= $foreign.toNumber(Data_Bounded.top(Data_Bounded.boundedInt))) {
  11950. return Data_Bounded.top(Data_Bounded.boundedInt);
  11951. }
  11952. ;
  11953. if (x <= $foreign.toNumber(Data_Bounded.bottom(Data_Bounded.boundedInt))) {
  11954. return Data_Bounded.bottom(Data_Bounded.boundedInt);
  11955. }
  11956. ;
  11957. if (Data_Boolean.otherwise) {
  11958. return Data_Maybe.fromMaybe(0)(fromNumber(x));
  11959. }
  11960. ;
  11961. throw new Error("Failed pattern match at Data.Int (line 66, column 1 - line 66, column 29): " + [x.constructor.name]);
  11962. };
  11963. var round = function round($23) {
  11964. return unsafeClamp($$Math.round($23));
  11965. };
  11966. var floor = function floor($24) {
  11967. return unsafeClamp($$Math.floor($24));
  11968. };
  11969. var even = function even(x) {
  11970. return (x & 1) === 0;
  11971. };
  11972. var parity = function parity(n) {
  11973. var $14 = even(n);
  11974. if ($14) {
  11975. return Even.value;
  11976. }
  11977. ;
  11978. return Odd.value;
  11979. };
  11980. var eqParity = new Data_Eq.Eq(function (x) {
  11981. return function (y) {
  11982. if (x instanceof Even && y instanceof Even) {
  11983. return true;
  11984. }
  11985. ;
  11986. if (x instanceof Odd && y instanceof Odd) {
  11987. return true;
  11988. }
  11989. ;
  11990. return false;
  11991. };
  11992. });
  11993. var ordParity = new Data_Ord.Ord(function () {
  11994. return eqParity;
  11995. }, function (x) {
  11996. return function (y) {
  11997. if (x instanceof Even && y instanceof Even) {
  11998. return Data_Ordering.EQ.value;
  11999. }
  12000. ;
  12001. if (x instanceof Even) {
  12002. return Data_Ordering.LT.value;
  12003. }
  12004. ;
  12005. if (y instanceof Even) {
  12006. return Data_Ordering.GT.value;
  12007. }
  12008. ;
  12009. if (x instanceof Odd && y instanceof Odd) {
  12010. return Data_Ordering.EQ.value;
  12011. }
  12012. ;
  12013. throw new Error("Failed pattern match at Data.Int (line 110, column 1 - line 110, column 40): " + [x.constructor.name, y.constructor.name]);
  12014. };
  12015. });
  12016. var semiringParity = new Data_Semiring.Semiring(function (x) {
  12017. return function (y) {
  12018. var $19 = Data_Eq.eq(eqParity)(x)(y);
  12019. if ($19) {
  12020. return Even.value;
  12021. }
  12022. ;
  12023. return Odd.value;
  12024. };
  12025. }, function (v) {
  12026. return function (v1) {
  12027. if (v instanceof Odd && v1 instanceof Odd) {
  12028. return Odd.value;
  12029. }
  12030. ;
  12031. return Even.value;
  12032. };
  12033. }, Odd.value, Even.value);
  12034. var ringParity = new Data_Ring.Ring(function () {
  12035. return semiringParity;
  12036. }, Data_Semiring.add(semiringParity));
  12037. var divisionRingParity = new Data_DivisionRing.DivisionRing(function () {
  12038. return ringParity;
  12039. }, Control_Category.identity(Control_Category.categoryFn));
  12040. var decimal = 10;
  12041. var commutativeRingParity = new Data_CommutativeRing.CommutativeRing(function () {
  12042. return ringParity;
  12043. });
  12044. var euclideanRingParity = new Data_EuclideanRing.EuclideanRing(function () {
  12045. return commutativeRingParity;
  12046. }, function (v) {
  12047. if (v instanceof Even) {
  12048. return 0;
  12049. }
  12050. ;
  12051. if (v instanceof Odd) {
  12052. return 1;
  12053. }
  12054. ;
  12055. throw new Error("Failed pattern match at Data.Int (line 132, column 1 - line 136, column 17): " + [v.constructor.name]);
  12056. }, function (x) {
  12057. return function (v) {
  12058. return x;
  12059. };
  12060. }, function (v) {
  12061. return function (v1) {
  12062. return Even.value;
  12063. };
  12064. });
  12065. var ceil = function ceil($25) {
  12066. return unsafeClamp($$Math.ceil($25));
  12067. };
  12068. var boundedParity = new Data_Bounded.Bounded(function () {
  12069. return ordParity;
  12070. }, Even.value, Odd.value);
  12071. var binary = 2;
  12072. var base36 = 36;
  12073. module.exports = {
  12074. fromNumber: fromNumber,
  12075. ceil: ceil,
  12076. floor: floor,
  12077. round: round,
  12078. fromString: fromString,
  12079. radix: radix,
  12080. binary: binary,
  12081. octal: octal,
  12082. decimal: decimal,
  12083. hexadecimal: hexadecimal,
  12084. base36: base36,
  12085. fromStringAs: fromStringAs,
  12086. Even: Even,
  12087. Odd: Odd,
  12088. parity: parity,
  12089. even: even,
  12090. odd: odd,
  12091. eqParity: eqParity,
  12092. ordParity: ordParity,
  12093. showParity: showParity,
  12094. boundedParity: boundedParity,
  12095. semiringParity: semiringParity,
  12096. ringParity: ringParity,
  12097. commutativeRingParity: commutativeRingParity,
  12098. euclideanRingParity: euclideanRingParity,
  12099. divisionRingParity: divisionRingParity,
  12100. toNumber: $foreign.toNumber,
  12101. toStringAs: $foreign.toStringAs,
  12102. quot: $foreign.quot,
  12103. rem: $foreign.rem,
  12104. pow: $foreign.pow
  12105. };
  12106. },{"./foreign.js":"../output/Data.Int/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.DivisionRing/index.js":"../output/Data.DivisionRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Global/index.js":"../output/Global/index.js","../Math/index.js":"../output/Math/index.js"}],"../output/Data.List/index.js":[function(require,module,exports) {
  12107. // Generated by purs version 0.13.6
  12108. "use strict";
  12109. var Control_Alt = require("../Control.Alt/index.js");
  12110. var Control_Applicative = require("../Control.Applicative/index.js");
  12111. var Control_Apply = require("../Control.Apply/index.js");
  12112. var Control_Bind = require("../Control.Bind/index.js");
  12113. var Control_Category = require("../Control.Category/index.js");
  12114. var Control_Lazy = require("../Control.Lazy/index.js");
  12115. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  12116. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  12117. var Data_Boolean = require("../Data.Boolean/index.js");
  12118. var Data_Eq = require("../Data.Eq/index.js");
  12119. var Data_Foldable = require("../Data.Foldable/index.js");
  12120. var Data_Function = require("../Data.Function/index.js");
  12121. var Data_Functor = require("../Data.Functor/index.js");
  12122. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  12123. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  12124. var Data_List_Types = require("../Data.List.Types/index.js");
  12125. var Data_Maybe = require("../Data.Maybe/index.js");
  12126. var Data_Newtype = require("../Data.Newtype/index.js");
  12127. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  12128. var Data_Ord = require("../Data.Ord/index.js");
  12129. var Data_Ordering = require("../Data.Ordering/index.js");
  12130. var Data_Semigroup = require("../Data.Semigroup/index.js");
  12131. var Data_Show = require("../Data.Show/index.js");
  12132. var Data_Traversable = require("../Data.Traversable/index.js");
  12133. var Data_Tuple = require("../Data.Tuple/index.js");
  12134. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  12135. var Data_Unit = require("../Data.Unit/index.js");
  12136. var Pattern = function Pattern(x) {
  12137. return x;
  12138. };
  12139. var updateAt = function updateAt(v) {
  12140. return function (v1) {
  12141. return function (v2) {
  12142. if (v === 0 && v2 instanceof Data_List_Types.Cons) {
  12143. return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2.value1));
  12144. }
  12145. ;
  12146. if (v2 instanceof Data_List_Types.Cons) {
  12147. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
  12148. return new Data_List_Types.Cons(v2.value0, v3);
  12149. })(updateAt(v - 1 | 0)(v1)(v2.value1));
  12150. }
  12151. ;
  12152. return Data_Maybe.Nothing.value;
  12153. };
  12154. };
  12155. };
  12156. var unzip = Data_Foldable.foldr(Data_List_Types.foldableList)(function (v) {
  12157. return function (v1) {
  12158. return new Data_Tuple.Tuple(new Data_List_Types.Cons(v.value0, v1.value0), new Data_List_Types.Cons(v.value1, v1.value1));
  12159. };
  12160. })(new Data_Tuple.Tuple(Data_List_Types.Nil.value, Data_List_Types.Nil.value));
  12161. var uncons = function uncons(v) {
  12162. if (v instanceof Data_List_Types.Nil) {
  12163. return Data_Maybe.Nothing.value;
  12164. }
  12165. ;
  12166. if (v instanceof Data_List_Types.Cons) {
  12167. return new Data_Maybe.Just({
  12168. head: v.value0,
  12169. tail: v.value1
  12170. });
  12171. }
  12172. ;
  12173. throw new Error("Failed pattern match at Data.List (line 259, column 1 - line 259, column 66): " + [v.constructor.name]);
  12174. };
  12175. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  12176. return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
  12177. return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
  12178. return new Data_Tuple.Tuple(rec.head, rec.tail);
  12179. })(uncons(xs));
  12180. });
  12181. };
  12182. var tail = function tail(v) {
  12183. if (v instanceof Data_List_Types.Nil) {
  12184. return Data_Maybe.Nothing.value;
  12185. }
  12186. ;
  12187. if (v instanceof Data_List_Types.Cons) {
  12188. return new Data_Maybe.Just(v.value1);
  12189. }
  12190. ;
  12191. throw new Error("Failed pattern match at Data.List (line 245, column 1 - line 245, column 43): " + [v.constructor.name]);
  12192. };
  12193. var stripPrefix = function stripPrefix(dictEq) {
  12194. return function (v) {
  12195. return function (s) {
  12196. var go = function go(prefix) {
  12197. return function (input) {
  12198. if (prefix instanceof Data_List_Types.Cons && input instanceof Data_List_Types.Cons && Data_Eq.eq(dictEq)(prefix.value0)(input.value0)) {
  12199. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({
  12200. a: prefix.value1,
  12201. b: input.value1
  12202. }));
  12203. }
  12204. ;
  12205. if (prefix instanceof Data_List_Types.Nil) {
  12206. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input));
  12207. }
  12208. ;
  12209. return Data_Maybe.Nothing.value;
  12210. };
  12211. };
  12212. return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s);
  12213. };
  12214. };
  12215. };
  12216. var span = function span(v) {
  12217. return function (v1) {
  12218. if (v1 instanceof Data_List_Types.Cons && v(v1.value0)) {
  12219. var v2 = span(v)(v1.value1);
  12220. return {
  12221. init: new Data_List_Types.Cons(v1.value0, v2.init),
  12222. rest: v2.rest
  12223. };
  12224. }
  12225. ;
  12226. return {
  12227. init: Data_List_Types.Nil.value,
  12228. rest: v1
  12229. };
  12230. };
  12231. };
  12232. var snoc = function snoc(xs) {
  12233. return function (x) {
  12234. return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_List_Types.Cons.create)(new Data_List_Types.Cons(x, Data_List_Types.Nil.value))(xs);
  12235. };
  12236. };
  12237. var singleton = function singleton(a) {
  12238. return new Data_List_Types.Cons(a, Data_List_Types.Nil.value);
  12239. };
  12240. var sortBy = function sortBy(cmp) {
  12241. var merge = function merge(v) {
  12242. return function (v1) {
  12243. if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
  12244. if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1.value0))(Data_Ordering.GT.value)) {
  12245. return new Data_List_Types.Cons(v1.value0, merge(v)(v1.value1));
  12246. }
  12247. ;
  12248. if (Data_Boolean.otherwise) {
  12249. return new Data_List_Types.Cons(v.value0, merge(v.value1)(v1));
  12250. }
  12251. ;
  12252. }
  12253. ;
  12254. if (v instanceof Data_List_Types.Nil) {
  12255. return v1;
  12256. }
  12257. ;
  12258. if (v1 instanceof Data_List_Types.Nil) {
  12259. return v;
  12260. }
  12261. ;
  12262. throw new Error("Failed pattern match at Data.List (line 473, column 3 - line 473, column 38): " + [v.constructor.name, v1.constructor.name]);
  12263. };
  12264. };
  12265. var mergePairs = function mergePairs(v) {
  12266. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) {
  12267. return new Data_List_Types.Cons(merge(v.value0)(v.value1.value0), mergePairs(v.value1.value1));
  12268. }
  12269. ;
  12270. return v;
  12271. };
  12272. var mergeAll = function mergeAll($copy_v) {
  12273. var $tco_done = false;
  12274. var $tco_result;
  12275. function $tco_loop(v) {
  12276. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
  12277. $tco_done = true;
  12278. return v.value0;
  12279. }
  12280. ;
  12281. $copy_v = mergePairs(v);
  12282. return;
  12283. }
  12284. ;
  12285. while (!$tco_done) {
  12286. $tco_result = $tco_loop($copy_v);
  12287. }
  12288. ;
  12289. return $tco_result;
  12290. };
  12291. var sequences = function sequences(v) {
  12292. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) {
  12293. if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v.value1.value0))(Data_Ordering.GT.value)) {
  12294. return descending(v.value1.value0)(singleton(v.value0))(v.value1.value1);
  12295. }
  12296. ;
  12297. if (Data_Boolean.otherwise) {
  12298. return ascending(v.value1.value0)(function (v1) {
  12299. return new Data_List_Types.Cons(v.value0, v1);
  12300. })(v.value1.value1);
  12301. }
  12302. ;
  12303. }
  12304. ;
  12305. return singleton(v);
  12306. };
  12307. var descending = function descending($copy_a) {
  12308. return function ($copy_as) {
  12309. return function ($copy_v) {
  12310. var $tco_var_a = $copy_a;
  12311. var $tco_var_as = $copy_as;
  12312. var $tco_done = false;
  12313. var $tco_result;
  12314. function $tco_loop(a, as, v) {
  12315. if (v instanceof Data_List_Types.Cons && Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) {
  12316. $tco_var_a = v.value0;
  12317. $tco_var_as = new Data_List_Types.Cons(a, as);
  12318. $copy_v = v.value1;
  12319. return;
  12320. }
  12321. ;
  12322. $tco_done = true;
  12323. return new Data_List_Types.Cons(new Data_List_Types.Cons(a, as), sequences(v));
  12324. }
  12325. ;
  12326. while (!$tco_done) {
  12327. $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v);
  12328. }
  12329. ;
  12330. return $tco_result;
  12331. };
  12332. };
  12333. };
  12334. var ascending = function ascending($copy_a) {
  12335. return function ($copy_as) {
  12336. return function ($copy_v) {
  12337. var $tco_var_a = $copy_a;
  12338. var $tco_var_as = $copy_as;
  12339. var $tco_done = false;
  12340. var $tco_result;
  12341. function $tco_loop(a, as, v) {
  12342. if (v instanceof Data_List_Types.Cons && Data_Eq.notEq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) {
  12343. $tco_var_a = v.value0;
  12344. $tco_var_as = function $tco_var_as(ys) {
  12345. return as(new Data_List_Types.Cons(a, ys));
  12346. };
  12347. $copy_v = v.value1;
  12348. return;
  12349. }
  12350. ;
  12351. $tco_done = true;
  12352. return new Data_List_Types.Cons(as(singleton(a)), sequences(v));
  12353. }
  12354. ;
  12355. while (!$tco_done) {
  12356. $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v);
  12357. }
  12358. ;
  12359. return $tco_result;
  12360. };
  12361. };
  12362. };
  12363. return function ($331) {
  12364. return mergeAll(sequences($331));
  12365. };
  12366. };
  12367. var sort = function sort(dictOrd) {
  12368. return function (xs) {
  12369. return sortBy(Data_Ord.compare(dictOrd))(xs);
  12370. };
  12371. };
  12372. var tails = function tails(v) {
  12373. if (v instanceof Data_List_Types.Nil) {
  12374. return singleton(Data_List_Types.Nil.value);
  12375. }
  12376. ;
  12377. if (v instanceof Data_List_Types.Cons) {
  12378. return new Data_List_Types.Cons(v, tails(v.value1));
  12379. }
  12380. ;
  12381. throw new Error("Failed pattern match at Data.List (line 626, column 1 - line 626, column 43): " + [v.constructor.name]);
  12382. };
  12383. var showPattern = function showPattern(dictShow) {
  12384. return new Data_Show.Show(function (v) {
  12385. return "(Pattern " + (Data_Show.show(Data_List_Types.showList(dictShow))(v) + ")");
  12386. });
  12387. };
  12388. var reverse = function () {
  12389. var go = function go($copy_acc) {
  12390. return function ($copy_v) {
  12391. var $tco_var_acc = $copy_acc;
  12392. var $tco_done = false;
  12393. var $tco_result;
  12394. function $tco_loop(acc, v) {
  12395. if (v instanceof Data_List_Types.Nil) {
  12396. $tco_done = true;
  12397. return acc;
  12398. }
  12399. ;
  12400. if (v instanceof Data_List_Types.Cons) {
  12401. $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
  12402. $copy_v = v.value1;
  12403. return;
  12404. }
  12405. ;
  12406. throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): " + [acc.constructor.name, v.constructor.name]);
  12407. }
  12408. ;
  12409. while (!$tco_done) {
  12410. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12411. }
  12412. ;
  12413. return $tco_result;
  12414. };
  12415. };
  12416. return go(Data_List_Types.Nil.value);
  12417. }();
  12418. var take = function () {
  12419. var go = function go($copy_acc) {
  12420. return function ($copy_v) {
  12421. return function ($copy_v1) {
  12422. var $tco_var_acc = $copy_acc;
  12423. var $tco_var_v = $copy_v;
  12424. var $tco_done = false;
  12425. var $tco_result;
  12426. function $tco_loop(acc, v, v1) {
  12427. if (v < 1) {
  12428. $tco_done = true;
  12429. return reverse(acc);
  12430. }
  12431. ;
  12432. if (v1 instanceof Data_List_Types.Nil) {
  12433. $tco_done = true;
  12434. return reverse(acc);
  12435. }
  12436. ;
  12437. if (v1 instanceof Data_List_Types.Cons) {
  12438. $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc);
  12439. $tco_var_v = v - 1 | 0;
  12440. $copy_v1 = v1.value1;
  12441. return;
  12442. }
  12443. ;
  12444. throw new Error("Failed pattern match at Data.List (line 520, column 3 - line 520, column 35): " + [acc.constructor.name, v.constructor.name, v1.constructor.name]);
  12445. }
  12446. ;
  12447. while (!$tco_done) {
  12448. $tco_result = $tco_loop($tco_var_acc, $tco_var_v, $copy_v1);
  12449. }
  12450. ;
  12451. return $tco_result;
  12452. };
  12453. };
  12454. };
  12455. return go(Data_List_Types.Nil.value);
  12456. }();
  12457. var takeWhile = function takeWhile(p) {
  12458. var go = function go($copy_acc) {
  12459. return function ($copy_v) {
  12460. var $tco_var_acc = $copy_acc;
  12461. var $tco_done = false;
  12462. var $tco_result;
  12463. function $tco_loop(acc, v) {
  12464. if (v instanceof Data_List_Types.Cons && p(v.value0)) {
  12465. $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
  12466. $copy_v = v.value1;
  12467. return;
  12468. }
  12469. ;
  12470. $tco_done = true;
  12471. return reverse(acc);
  12472. }
  12473. ;
  12474. while (!$tco_done) {
  12475. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12476. }
  12477. ;
  12478. return $tco_result;
  12479. };
  12480. };
  12481. return go(Data_List_Types.Nil.value);
  12482. };
  12483. var unsnoc = function unsnoc(lst) {
  12484. var go = function go($copy_v) {
  12485. return function ($copy_acc) {
  12486. var $tco_var_v = $copy_v;
  12487. var $tco_done = false;
  12488. var $tco_result;
  12489. function $tco_loop(v, acc) {
  12490. if (v instanceof Data_List_Types.Nil) {
  12491. $tco_done = true;
  12492. return Data_Maybe.Nothing.value;
  12493. }
  12494. ;
  12495. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
  12496. $tco_done = true;
  12497. return new Data_Maybe.Just({
  12498. revInit: acc,
  12499. last: v.value0
  12500. });
  12501. }
  12502. ;
  12503. if (v instanceof Data_List_Types.Cons) {
  12504. $tco_var_v = v.value1;
  12505. $copy_acc = new Data_List_Types.Cons(v.value0, acc);
  12506. return;
  12507. }
  12508. ;
  12509. throw new Error("Failed pattern match at Data.List (line 270, column 3 - line 270, column 23): " + [v.constructor.name, acc.constructor.name]);
  12510. }
  12511. ;
  12512. while (!$tco_done) {
  12513. $tco_result = $tco_loop($tco_var_v, $copy_acc);
  12514. }
  12515. ;
  12516. return $tco_result;
  12517. };
  12518. };
  12519. return Data_Functor.map(Data_Maybe.functorMaybe)(function (h) {
  12520. return {
  12521. init: reverse(h.revInit),
  12522. last: h.last
  12523. };
  12524. })(go(lst)(Data_List_Types.Nil.value));
  12525. };
  12526. var zipWith = function zipWith(f) {
  12527. return function (xs) {
  12528. return function (ys) {
  12529. var go = function go($copy_v) {
  12530. return function ($copy_v1) {
  12531. return function ($copy_acc) {
  12532. var $tco_var_v = $copy_v;
  12533. var $tco_var_v1 = $copy_v1;
  12534. var $tco_done = false;
  12535. var $tco_result;
  12536. function $tco_loop(v, v1, acc) {
  12537. if (v instanceof Data_List_Types.Nil) {
  12538. $tco_done = true;
  12539. return acc;
  12540. }
  12541. ;
  12542. if (v1 instanceof Data_List_Types.Nil) {
  12543. $tco_done = true;
  12544. return acc;
  12545. }
  12546. ;
  12547. if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
  12548. $tco_var_v = v.value1;
  12549. $tco_var_v1 = v1.value1;
  12550. $copy_acc = new Data_List_Types.Cons(f(v.value0)(v1.value0), acc);
  12551. return;
  12552. }
  12553. ;
  12554. throw new Error("Failed pattern match at Data.List (line 718, column 3 - line 718, column 21): " + [v.constructor.name, v1.constructor.name, acc.constructor.name]);
  12555. }
  12556. ;
  12557. while (!$tco_done) {
  12558. $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_acc);
  12559. }
  12560. ;
  12561. return $tco_result;
  12562. };
  12563. };
  12564. };
  12565. return reverse(go(xs)(ys)(Data_List_Types.Nil.value));
  12566. };
  12567. };
  12568. };
  12569. var zip = zipWith(Data_Tuple.Tuple.create);
  12570. var zipWithA = function zipWithA(dictApplicative) {
  12571. return function (f) {
  12572. return function (xs) {
  12573. return function (ys) {
  12574. return Data_Traversable.sequence(Data_List_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys));
  12575. };
  12576. };
  12577. };
  12578. };
  12579. var range = function range(start) {
  12580. return function (end) {
  12581. if (start === end) {
  12582. return singleton(start);
  12583. }
  12584. ;
  12585. if (Data_Boolean.otherwise) {
  12586. var go = function go($copy_s) {
  12587. return function ($copy_e) {
  12588. return function ($copy_step) {
  12589. return function ($copy_rest) {
  12590. var $tco_var_s = $copy_s;
  12591. var $tco_var_e = $copy_e;
  12592. var $tco_var_step = $copy_step;
  12593. var $tco_done = false;
  12594. var $tco_result;
  12595. function $tco_loop(s, e, step, rest) {
  12596. if (s === e) {
  12597. $tco_done = true;
  12598. return new Data_List_Types.Cons(s, rest);
  12599. }
  12600. ;
  12601. if (Data_Boolean.otherwise) {
  12602. $tco_var_s = s + step | 0;
  12603. $tco_var_e = e;
  12604. $tco_var_step = step;
  12605. $copy_rest = new Data_List_Types.Cons(s, rest);
  12606. return;
  12607. }
  12608. ;
  12609. throw new Error("Failed pattern match at Data.List (line 148, column 3 - line 149, column 65): " + [s.constructor.name, e.constructor.name, step.constructor.name, rest.constructor.name]);
  12610. }
  12611. ;
  12612. while (!$tco_done) {
  12613. $tco_result = $tco_loop($tco_var_s, $tco_var_e, $tco_var_step, $copy_rest);
  12614. }
  12615. ;
  12616. return $tco_result;
  12617. };
  12618. };
  12619. };
  12620. };
  12621. return go(end)(start)(function () {
  12622. var $220 = start > end;
  12623. if ($220) {
  12624. return 1;
  12625. }
  12626. ;
  12627. return -1 | 0;
  12628. }())(Data_List_Types.Nil.value);
  12629. }
  12630. ;
  12631. throw new Error("Failed pattern match at Data.List (line 144, column 1 - line 144, column 32): " + [start.constructor.name, end.constructor.name]);
  12632. };
  12633. };
  12634. var partition = function partition(p) {
  12635. return function (xs) {
  12636. var select = function select(x) {
  12637. return function (v) {
  12638. var $223 = p(x);
  12639. if ($223) {
  12640. return {
  12641. no: v.no,
  12642. yes: new Data_List_Types.Cons(x, v.yes)
  12643. };
  12644. }
  12645. ;
  12646. return {
  12647. no: new Data_List_Types.Cons(x, v.no),
  12648. yes: v.yes
  12649. };
  12650. };
  12651. };
  12652. return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({
  12653. no: Data_List_Types.Nil.value,
  12654. yes: Data_List_Types.Nil.value
  12655. })(xs);
  12656. };
  12657. };
  12658. var $$null = function $$null(v) {
  12659. if (v instanceof Data_List_Types.Nil) {
  12660. return true;
  12661. }
  12662. ;
  12663. return false;
  12664. };
  12665. var newtypePattern = new Data_Newtype.Newtype(function (n) {
  12666. return n;
  12667. }, Pattern);
  12668. var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexList);
  12669. var mapMaybe = function mapMaybe(f) {
  12670. var go = function go($copy_acc) {
  12671. return function ($copy_v) {
  12672. var $tco_var_acc = $copy_acc;
  12673. var $tco_done = false;
  12674. var $tco_result;
  12675. function $tco_loop(acc, v) {
  12676. if (v instanceof Data_List_Types.Nil) {
  12677. $tco_done = true;
  12678. return reverse(acc);
  12679. }
  12680. ;
  12681. if (v instanceof Data_List_Types.Cons) {
  12682. var v1 = f(v.value0);
  12683. if (v1 instanceof Data_Maybe.Nothing) {
  12684. $tco_var_acc = acc;
  12685. $copy_v = v.value1;
  12686. return;
  12687. }
  12688. ;
  12689. if (v1 instanceof Data_Maybe.Just) {
  12690. $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc);
  12691. $copy_v = v.value1;
  12692. return;
  12693. }
  12694. ;
  12695. throw new Error("Failed pattern match at Data.List (line 419, column 5 - line 421, column 32): " + [v1.constructor.name]);
  12696. }
  12697. ;
  12698. throw new Error("Failed pattern match at Data.List (line 417, column 3 - line 417, column 27): " + [acc.constructor.name, v.constructor.name]);
  12699. }
  12700. ;
  12701. while (!$tco_done) {
  12702. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12703. }
  12704. ;
  12705. return $tco_result;
  12706. };
  12707. };
  12708. return go(Data_List_Types.Nil.value);
  12709. };
  12710. var manyRec = function manyRec(dictMonadRec) {
  12711. return function (dictAlternative) {
  12712. return function (p) {
  12713. var go = function go(acc) {
  12714. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Control_Monad_Rec_Class.Loop.create)(p))(Control_Applicative.pure(dictAlternative.Applicative0())(new Control_Monad_Rec_Class.Done(Data_Unit.unit))))(function (aa) {
  12715. return Control_Applicative.pure(dictAlternative.Applicative0())(Data_Bifunctor.bimap(Control_Monad_Rec_Class.bifunctorStep)(function (v) {
  12716. return new Data_List_Types.Cons(v, acc);
  12717. })(function (v) {
  12718. return reverse(acc);
  12719. })(aa));
  12720. });
  12721. };
  12722. return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(go)(Data_List_Types.Nil.value);
  12723. };
  12724. };
  12725. };
  12726. var someRec = function someRec(dictMonadRec) {
  12727. return function (dictAlternative) {
  12728. return function (v) {
  12729. return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(manyRec(dictMonadRec)(dictAlternative)(v));
  12730. };
  12731. };
  12732. };
  12733. var some = function some(dictAlternative) {
  12734. return function (dictLazy) {
  12735. return function (v) {
  12736. return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
  12737. return many(dictAlternative)(dictLazy)(v);
  12738. }));
  12739. };
  12740. };
  12741. };
  12742. var many = function many(dictAlternative) {
  12743. return function (dictLazy) {
  12744. return function (v) {
  12745. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Types.Nil.value));
  12746. };
  12747. };
  12748. };
  12749. var length = Data_Foldable.foldl(Data_List_Types.foldableList)(function (acc) {
  12750. return function (v) {
  12751. return acc + 1 | 0;
  12752. };
  12753. })(0);
  12754. var last = function last($copy_v) {
  12755. var $tco_done = false;
  12756. var $tco_result;
  12757. function $tco_loop(v) {
  12758. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
  12759. $tco_done = true;
  12760. return new Data_Maybe.Just(v.value0);
  12761. }
  12762. ;
  12763. if (v instanceof Data_List_Types.Cons) {
  12764. $copy_v = v.value1;
  12765. return;
  12766. }
  12767. ;
  12768. $tco_done = true;
  12769. return Data_Maybe.Nothing.value;
  12770. }
  12771. ;
  12772. while (!$tco_done) {
  12773. $tco_result = $tco_loop($copy_v);
  12774. }
  12775. ;
  12776. return $tco_result;
  12777. };
  12778. var insertBy = function insertBy(v) {
  12779. return function (x) {
  12780. return function (v1) {
  12781. if (v1 instanceof Data_List_Types.Nil) {
  12782. return singleton(x);
  12783. }
  12784. ;
  12785. if (v1 instanceof Data_List_Types.Cons) {
  12786. var v2 = v(x)(v1.value0);
  12787. if (v2 instanceof Data_Ordering.GT) {
  12788. return new Data_List_Types.Cons(v1.value0, insertBy(v)(x)(v1.value1));
  12789. }
  12790. ;
  12791. return new Data_List_Types.Cons(x, v1);
  12792. }
  12793. ;
  12794. throw new Error("Failed pattern match at Data.List (line 216, column 1 - line 216, column 68): " + [v.constructor.name, x.constructor.name, v1.constructor.name]);
  12795. };
  12796. };
  12797. };
  12798. var insertAt = function insertAt(v) {
  12799. return function (v1) {
  12800. return function (v2) {
  12801. if (v === 0) {
  12802. return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2));
  12803. }
  12804. ;
  12805. if (v2 instanceof Data_List_Types.Cons) {
  12806. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
  12807. return new Data_List_Types.Cons(v2.value0, v3);
  12808. })(insertAt(v - 1 | 0)(v1)(v2.value1));
  12809. }
  12810. ;
  12811. return Data_Maybe.Nothing.value;
  12812. };
  12813. };
  12814. };
  12815. var insert = function insert(dictOrd) {
  12816. return insertBy(Data_Ord.compare(dictOrd));
  12817. };
  12818. var init = function init(lst) {
  12819. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  12820. return v.init;
  12821. })(unsnoc(lst));
  12822. };
  12823. var index = function index($copy_v) {
  12824. return function ($copy_v1) {
  12825. var $tco_var_v = $copy_v;
  12826. var $tco_done = false;
  12827. var $tco_result;
  12828. function $tco_loop(v, v1) {
  12829. if (v instanceof Data_List_Types.Nil) {
  12830. $tco_done = true;
  12831. return Data_Maybe.Nothing.value;
  12832. }
  12833. ;
  12834. if (v instanceof Data_List_Types.Cons && v1 === 0) {
  12835. $tco_done = true;
  12836. return new Data_Maybe.Just(v.value0);
  12837. }
  12838. ;
  12839. if (v instanceof Data_List_Types.Cons) {
  12840. $tco_var_v = v.value1;
  12841. $copy_v1 = v1 - 1 | 0;
  12842. return;
  12843. }
  12844. ;
  12845. throw new Error("Failed pattern match at Data.List (line 281, column 1 - line 281, column 44): " + [v.constructor.name, v1.constructor.name]);
  12846. }
  12847. ;
  12848. while (!$tco_done) {
  12849. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  12850. }
  12851. ;
  12852. return $tco_result;
  12853. };
  12854. };
  12855. var head = function head(v) {
  12856. if (v instanceof Data_List_Types.Nil) {
  12857. return Data_Maybe.Nothing.value;
  12858. }
  12859. ;
  12860. if (v instanceof Data_List_Types.Cons) {
  12861. return new Data_Maybe.Just(v.value0);
  12862. }
  12863. ;
  12864. throw new Error("Failed pattern match at Data.List (line 230, column 1 - line 230, column 22): " + [v.constructor.name]);
  12865. };
  12866. var transpose = function transpose(v) {
  12867. if (v instanceof Data_List_Types.Nil) {
  12868. return Data_List_Types.Nil.value;
  12869. }
  12870. ;
  12871. if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Nil) {
  12872. return transpose(v.value1);
  12873. }
  12874. ;
  12875. if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Cons) {
  12876. return new Data_List_Types.Cons(new Data_List_Types.Cons(v.value0.value0, mapMaybe(head)(v.value1)), transpose(new Data_List_Types.Cons(v.value0.value1, mapMaybe(tail)(v.value1))));
  12877. }
  12878. ;
  12879. throw new Error("Failed pattern match at Data.List (line 752, column 1 - line 752, column 54): " + [v.constructor.name]);
  12880. };
  12881. var groupBy = function groupBy(v) {
  12882. return function (v1) {
  12883. if (v1 instanceof Data_List_Types.Nil) {
  12884. return Data_List_Types.Nil.value;
  12885. }
  12886. ;
  12887. if (v1 instanceof Data_List_Types.Cons) {
  12888. var v2 = span(v(v1.value0))(v1.value1);
  12889. return new Data_List_Types.Cons(new Data_NonEmpty.NonEmpty(v1.value0, v2.init), groupBy(v)(v2.rest));
  12890. }
  12891. ;
  12892. throw new Error("Failed pattern match at Data.List (line 605, column 1 - line 605, column 80): " + [v.constructor.name, v1.constructor.name]);
  12893. };
  12894. };
  12895. var group = function group(dictEq) {
  12896. return groupBy(Data_Eq.eq(dictEq));
  12897. };
  12898. var group$prime = function group$prime(dictOrd) {
  12899. var $332 = group(dictOrd.Eq0());
  12900. var $333 = sort(dictOrd);
  12901. return function ($334) {
  12902. return $332($333($334));
  12903. };
  12904. };
  12905. var fromFoldable = function fromFoldable(dictFoldable) {
  12906. return Data_Foldable.foldr(dictFoldable)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value);
  12907. };
  12908. var foldM = function foldM(dictMonad) {
  12909. return function (v) {
  12910. return function (a) {
  12911. return function (v1) {
  12912. if (v1 instanceof Data_List_Types.Nil) {
  12913. return Control_Applicative.pure(dictMonad.Applicative0())(a);
  12914. }
  12915. ;
  12916. if (v1 instanceof Data_List_Types.Cons) {
  12917. return Control_Bind.bind(dictMonad.Bind1())(v(a)(v1.value0))(function (a$prime) {
  12918. return foldM(dictMonad)(v)(a$prime)(v1.value1);
  12919. });
  12920. }
  12921. ;
  12922. throw new Error("Failed pattern match at Data.List (line 763, column 1 - line 763, column 72): " + [v.constructor.name, a.constructor.name, v1.constructor.name]);
  12923. };
  12924. };
  12925. };
  12926. };
  12927. var findIndex = function findIndex(fn) {
  12928. var go = function go($copy_v) {
  12929. return function ($copy_v1) {
  12930. var $tco_var_v = $copy_v;
  12931. var $tco_done = false;
  12932. var $tco_result;
  12933. function $tco_loop(v, v1) {
  12934. if (v1 instanceof Data_List_Types.Cons) {
  12935. if (fn(v1.value0)) {
  12936. $tco_done = true;
  12937. return new Data_Maybe.Just(v);
  12938. }
  12939. ;
  12940. if (Data_Boolean.otherwise) {
  12941. $tco_var_v = v + 1 | 0;
  12942. $copy_v1 = v1.value1;
  12943. return;
  12944. }
  12945. ;
  12946. }
  12947. ;
  12948. if (v1 instanceof Data_List_Types.Nil) {
  12949. $tco_done = true;
  12950. return Data_Maybe.Nothing.value;
  12951. }
  12952. ;
  12953. throw new Error("Failed pattern match at Data.List (line 301, column 3 - line 301, column 35): " + [v.constructor.name, v1.constructor.name]);
  12954. }
  12955. ;
  12956. while (!$tco_done) {
  12957. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  12958. }
  12959. ;
  12960. return $tco_result;
  12961. };
  12962. };
  12963. return go(0);
  12964. };
  12965. var findLastIndex = function findLastIndex(fn) {
  12966. return function (xs) {
  12967. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  12968. return (length(xs) - 1 | 0) - v | 0;
  12969. })(findIndex(fn)(reverse(xs)));
  12970. };
  12971. };
  12972. var filterM = function filterM(dictMonad) {
  12973. return function (v) {
  12974. return function (v1) {
  12975. if (v1 instanceof Data_List_Types.Nil) {
  12976. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Types.Nil.value);
  12977. }
  12978. ;
  12979. if (v1 instanceof Data_List_Types.Cons) {
  12980. return Control_Bind.bind(dictMonad.Bind1())(v(v1.value0))(function (b) {
  12981. return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(v)(v1.value1))(function (xs$prime) {
  12982. return Control_Applicative.pure(dictMonad.Applicative0())(function () {
  12983. if (b) {
  12984. return new Data_List_Types.Cons(v1.value0, xs$prime);
  12985. }
  12986. ;
  12987. return xs$prime;
  12988. }());
  12989. });
  12990. });
  12991. }
  12992. ;
  12993. throw new Error("Failed pattern match at Data.List (line 403, column 1 - line 403, column 75): " + [v.constructor.name, v1.constructor.name]);
  12994. };
  12995. };
  12996. };
  12997. var filter = function filter(p) {
  12998. var go = function go($copy_acc) {
  12999. return function ($copy_v) {
  13000. var $tco_var_acc = $copy_acc;
  13001. var $tco_done = false;
  13002. var $tco_result;
  13003. function $tco_loop(acc, v) {
  13004. if (v instanceof Data_List_Types.Nil) {
  13005. $tco_done = true;
  13006. return reverse(acc);
  13007. }
  13008. ;
  13009. if (v instanceof Data_List_Types.Cons) {
  13010. if (p(v.value0)) {
  13011. $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
  13012. $copy_v = v.value1;
  13013. return;
  13014. }
  13015. ;
  13016. if (Data_Boolean.otherwise) {
  13017. $tco_var_acc = acc;
  13018. $copy_v = v.value1;
  13019. return;
  13020. }
  13021. ;
  13022. }
  13023. ;
  13024. throw new Error("Failed pattern match at Data.List (line 390, column 3 - line 390, column 27): " + [acc.constructor.name, v.constructor.name]);
  13025. }
  13026. ;
  13027. while (!$tco_done) {
  13028. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  13029. }
  13030. ;
  13031. return $tco_result;
  13032. };
  13033. };
  13034. return go(Data_List_Types.Nil.value);
  13035. };
  13036. var intersectBy = function intersectBy(v) {
  13037. return function (v1) {
  13038. return function (v2) {
  13039. if (v1 instanceof Data_List_Types.Nil) {
  13040. return Data_List_Types.Nil.value;
  13041. }
  13042. ;
  13043. if (v2 instanceof Data_List_Types.Nil) {
  13044. return Data_List_Types.Nil.value;
  13045. }
  13046. ;
  13047. return filter(function (x) {
  13048. return Data_Foldable.any(Data_List_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(v(x))(v2);
  13049. })(v1);
  13050. };
  13051. };
  13052. };
  13053. var intersect = function intersect(dictEq) {
  13054. return intersectBy(Data_Eq.eq(dictEq));
  13055. };
  13056. var nubBy = function nubBy(v) {
  13057. return function (v1) {
  13058. if (v1 instanceof Data_List_Types.Nil) {
  13059. return Data_List_Types.Nil.value;
  13060. }
  13061. ;
  13062. if (v1 instanceof Data_List_Types.Cons) {
  13063. return new Data_List_Types.Cons(v1.value0, nubBy(v)(filter(function (y) {
  13064. return !v(v1.value0)(y);
  13065. })(v1.value1)));
  13066. }
  13067. ;
  13068. throw new Error("Failed pattern match at Data.List (line 644, column 1 - line 644, column 59): " + [v.constructor.name, v1.constructor.name]);
  13069. };
  13070. };
  13071. var nub = function nub(dictEq) {
  13072. return nubBy(Data_Eq.eq(dictEq));
  13073. };
  13074. var eqPattern = function eqPattern(dictEq) {
  13075. return new Data_Eq.Eq(function (x) {
  13076. return function (y) {
  13077. return Data_Eq.eq(Data_List_Types.eqList(dictEq))(x)(y);
  13078. };
  13079. });
  13080. };
  13081. var ordPattern = function ordPattern(dictOrd) {
  13082. return new Data_Ord.Ord(function () {
  13083. return eqPattern(dictOrd.Eq0());
  13084. }, function (x) {
  13085. return function (y) {
  13086. return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(x)(y);
  13087. };
  13088. });
  13089. };
  13090. var elemLastIndex = function elemLastIndex(dictEq) {
  13091. return function (x) {
  13092. return findLastIndex(function (v) {
  13093. return Data_Eq.eq(dictEq)(v)(x);
  13094. });
  13095. };
  13096. };
  13097. var elemIndex = function elemIndex(dictEq) {
  13098. return function (x) {
  13099. return findIndex(function (v) {
  13100. return Data_Eq.eq(dictEq)(v)(x);
  13101. });
  13102. };
  13103. };
  13104. var dropWhile = function dropWhile(p) {
  13105. var go = function go($copy_v) {
  13106. var $tco_done = false;
  13107. var $tco_result;
  13108. function $tco_loop(v) {
  13109. if (v instanceof Data_List_Types.Cons && p(v.value0)) {
  13110. $copy_v = v.value1;
  13111. return;
  13112. }
  13113. ;
  13114. $tco_done = true;
  13115. return v;
  13116. }
  13117. ;
  13118. while (!$tco_done) {
  13119. $tco_result = $tco_loop($copy_v);
  13120. }
  13121. ;
  13122. return $tco_result;
  13123. };
  13124. return go;
  13125. };
  13126. var dropEnd = function dropEnd(n) {
  13127. return function (xs) {
  13128. return take(length(xs) - n | 0)(xs);
  13129. };
  13130. };
  13131. var drop = function drop($copy_v) {
  13132. return function ($copy_v1) {
  13133. var $tco_var_v = $copy_v;
  13134. var $tco_done = false;
  13135. var $tco_result;
  13136. function $tco_loop(v, v1) {
  13137. if (v < 1) {
  13138. $tco_done = true;
  13139. return v1;
  13140. }
  13141. ;
  13142. if (v1 instanceof Data_List_Types.Nil) {
  13143. $tco_done = true;
  13144. return Data_List_Types.Nil.value;
  13145. }
  13146. ;
  13147. if (v1 instanceof Data_List_Types.Cons) {
  13148. $tco_var_v = v - 1 | 0;
  13149. $copy_v1 = v1.value1;
  13150. return;
  13151. }
  13152. ;
  13153. throw new Error("Failed pattern match at Data.List (line 543, column 1 - line 543, column 42): " + [v.constructor.name, v1.constructor.name]);
  13154. }
  13155. ;
  13156. while (!$tco_done) {
  13157. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  13158. }
  13159. ;
  13160. return $tco_result;
  13161. };
  13162. };
  13163. var slice = function slice(start) {
  13164. return function (end) {
  13165. return function (xs) {
  13166. return take(end - start | 0)(drop(start)(xs));
  13167. };
  13168. };
  13169. };
  13170. var takeEnd = function takeEnd(n) {
  13171. return function (xs) {
  13172. return drop(length(xs) - n | 0)(xs);
  13173. };
  13174. };
  13175. var deleteBy = function deleteBy(v) {
  13176. return function (v1) {
  13177. return function (v2) {
  13178. if (v2 instanceof Data_List_Types.Nil) {
  13179. return Data_List_Types.Nil.value;
  13180. }
  13181. ;
  13182. if (v2 instanceof Data_List_Types.Cons && v(v1)(v2.value0)) {
  13183. return v2.value1;
  13184. }
  13185. ;
  13186. if (v2 instanceof Data_List_Types.Cons) {
  13187. return new Data_List_Types.Cons(v2.value0, deleteBy(v)(v1)(v2.value1));
  13188. }
  13189. ;
  13190. throw new Error("Failed pattern match at Data.List (line 671, column 1 - line 671, column 67): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  13191. };
  13192. };
  13193. };
  13194. var unionBy = function unionBy(eq) {
  13195. return function (xs) {
  13196. return function (ys) {
  13197. return Data_Semigroup.append(Data_List_Types.semigroupList)(xs)(Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip(deleteBy(eq)))(nubBy(eq)(ys))(xs));
  13198. };
  13199. };
  13200. };
  13201. var union = function union(dictEq) {
  13202. return unionBy(Data_Eq.eq(dictEq));
  13203. };
  13204. var deleteAt = function deleteAt(v) {
  13205. return function (v1) {
  13206. if (v === 0 && v1 instanceof Data_List_Types.Cons) {
  13207. return new Data_Maybe.Just(v1.value1);
  13208. }
  13209. ;
  13210. if (v1 instanceof Data_List_Types.Cons) {
  13211. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v2) {
  13212. return new Data_List_Types.Cons(v1.value0, v2);
  13213. })(deleteAt(v - 1 | 0)(v1.value1));
  13214. }
  13215. ;
  13216. return Data_Maybe.Nothing.value;
  13217. };
  13218. };
  13219. var $$delete = function $$delete(dictEq) {
  13220. return deleteBy(Data_Eq.eq(dictEq));
  13221. };
  13222. var difference = function difference(dictEq) {
  13223. return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictEq)));
  13224. };
  13225. var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindList));
  13226. var concat = function concat(v) {
  13227. return Control_Bind.bind(Data_List_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn));
  13228. };
  13229. var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
  13230. var alterAt = function alterAt(v) {
  13231. return function (v1) {
  13232. return function (v2) {
  13233. if (v === 0 && v2 instanceof Data_List_Types.Cons) {
  13234. return Data_Maybe.Just.create(function () {
  13235. var v3 = v1(v2.value0);
  13236. if (v3 instanceof Data_Maybe.Nothing) {
  13237. return v2.value1;
  13238. }
  13239. ;
  13240. if (v3 instanceof Data_Maybe.Just) {
  13241. return new Data_List_Types.Cons(v3.value0, v2.value1);
  13242. }
  13243. ;
  13244. throw new Error("Failed pattern match at Data.List (line 352, column 3 - line 354, column 23): " + [v3.constructor.name]);
  13245. }());
  13246. }
  13247. ;
  13248. if (v2 instanceof Data_List_Types.Cons) {
  13249. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
  13250. return new Data_List_Types.Cons(v2.value0, v3);
  13251. })(alterAt(v - 1 | 0)(v1)(v2.value1));
  13252. }
  13253. ;
  13254. return Data_Maybe.Nothing.value;
  13255. };
  13256. };
  13257. };
  13258. var modifyAt = function modifyAt(n) {
  13259. return function (f) {
  13260. return alterAt(n)(function ($335) {
  13261. return Data_Maybe.Just.create(f($335));
  13262. });
  13263. };
  13264. };
  13265. module.exports = {
  13266. toUnfoldable: toUnfoldable,
  13267. fromFoldable: fromFoldable,
  13268. singleton: singleton,
  13269. range: range,
  13270. some: some,
  13271. someRec: someRec,
  13272. many: many,
  13273. manyRec: manyRec,
  13274. "null": $$null,
  13275. length: length,
  13276. snoc: snoc,
  13277. insert: insert,
  13278. insertBy: insertBy,
  13279. head: head,
  13280. last: last,
  13281. tail: tail,
  13282. init: init,
  13283. uncons: uncons,
  13284. unsnoc: unsnoc,
  13285. index: index,
  13286. elemIndex: elemIndex,
  13287. elemLastIndex: elemLastIndex,
  13288. findIndex: findIndex,
  13289. findLastIndex: findLastIndex,
  13290. insertAt: insertAt,
  13291. deleteAt: deleteAt,
  13292. updateAt: updateAt,
  13293. modifyAt: modifyAt,
  13294. alterAt: alterAt,
  13295. reverse: reverse,
  13296. concat: concat,
  13297. concatMap: concatMap,
  13298. filter: filter,
  13299. filterM: filterM,
  13300. mapMaybe: mapMaybe,
  13301. catMaybes: catMaybes,
  13302. mapWithIndex: mapWithIndex,
  13303. sort: sort,
  13304. sortBy: sortBy,
  13305. Pattern: Pattern,
  13306. stripPrefix: stripPrefix,
  13307. slice: slice,
  13308. take: take,
  13309. takeEnd: takeEnd,
  13310. takeWhile: takeWhile,
  13311. drop: drop,
  13312. dropEnd: dropEnd,
  13313. dropWhile: dropWhile,
  13314. span: span,
  13315. group: group,
  13316. "group'": group$prime,
  13317. groupBy: groupBy,
  13318. partition: partition,
  13319. nub: nub,
  13320. nubBy: nubBy,
  13321. union: union,
  13322. unionBy: unionBy,
  13323. "delete": $$delete,
  13324. deleteBy: deleteBy,
  13325. difference: difference,
  13326. intersect: intersect,
  13327. intersectBy: intersectBy,
  13328. zipWith: zipWith,
  13329. zipWithA: zipWithA,
  13330. zip: zip,
  13331. unzip: unzip,
  13332. transpose: transpose,
  13333. foldM: foldM,
  13334. eqPattern: eqPattern,
  13335. ordPattern: ordPattern,
  13336. newtypePattern: newtypePattern,
  13337. showPattern: showPattern
  13338. };
  13339. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Partial.Unsafe/foreign.js":[function(require,module,exports) {
  13340. "use strict"; // module Partial.Unsafe
  13341. exports.unsafePartial = function (f) {
  13342. return f();
  13343. };
  13344. },{}],"../output/Partial/foreign.js":[function(require,module,exports) {
  13345. "use strict"; // module Partial
  13346. exports.crashWith = function () {
  13347. return function (msg) {
  13348. throw new Error(msg);
  13349. };
  13350. };
  13351. },{}],"../output/Partial/index.js":[function(require,module,exports) {
  13352. // Generated by purs version 0.13.6
  13353. "use strict";
  13354. var $foreign = require("./foreign.js");
  13355. var crash = function crash(dictPartial) {
  13356. return $foreign.crashWith()("Partial.crash: partial function");
  13357. };
  13358. module.exports = {
  13359. crash: crash,
  13360. crashWith: $foreign.crashWith
  13361. };
  13362. },{"./foreign.js":"../output/Partial/foreign.js"}],"../output/Partial.Unsafe/index.js":[function(require,module,exports) {
  13363. // Generated by purs version 0.13.6
  13364. "use strict";
  13365. var $foreign = require("./foreign.js");
  13366. var Partial = require("../Partial/index.js");
  13367. var unsafePartialBecause = function unsafePartialBecause(v) {
  13368. return function (x) {
  13369. return $foreign.unsafePartial(function (dictPartial) {
  13370. return x();
  13371. });
  13372. };
  13373. };
  13374. var unsafeCrashWith = function unsafeCrashWith(msg) {
  13375. return $foreign.unsafePartial(function (dictPartial) {
  13376. return Partial.crashWith()(msg);
  13377. });
  13378. };
  13379. module.exports = {
  13380. unsafePartialBecause: unsafePartialBecause,
  13381. unsafeCrashWith: unsafeCrashWith,
  13382. unsafePartial: $foreign.unsafePartial
  13383. };
  13384. },{"./foreign.js":"../output/Partial.Unsafe/foreign.js","../Partial/index.js":"../output/Partial/index.js"}],"../output/Data.List.NonEmpty/index.js":[function(require,module,exports) {
  13385. // Generated by purs version 0.13.6
  13386. "use strict";
  13387. var Control_Bind = require("../Control.Bind/index.js");
  13388. var Control_Category = require("../Control.Category/index.js");
  13389. var Data_Boolean = require("../Data.Boolean/index.js");
  13390. var Data_Eq = require("../Data.Eq/index.js");
  13391. var Data_Function = require("../Data.Function/index.js");
  13392. var Data_Functor = require("../Data.Functor/index.js");
  13393. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  13394. var Data_List = require("../Data.List/index.js");
  13395. var Data_List_Types = require("../Data.List.Types/index.js");
  13396. var Data_Maybe = require("../Data.Maybe/index.js");
  13397. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  13398. var Data_Ord = require("../Data.Ord/index.js");
  13399. var Data_Semigroup = require("../Data.Semigroup/index.js");
  13400. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  13401. var Data_Tuple = require("../Data.Tuple/index.js");
  13402. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  13403. var Partial_Unsafe = require("../Partial.Unsafe/index.js");
  13404. var zipWith = function zipWith(f) {
  13405. return function (v) {
  13406. return function (v1) {
  13407. return new Data_NonEmpty.NonEmpty(f(v.value0)(v1.value0), Data_List.zipWith(f)(v.value1)(v1.value1));
  13408. };
  13409. };
  13410. };
  13411. var zipWithA = function zipWithA(dictApplicative) {
  13412. return function (f) {
  13413. return function (xs) {
  13414. return function (ys) {
  13415. return Data_Semigroup_Traversable.sequence1(Data_List_Types.traversable1NonEmptyList)(dictApplicative.Apply0())(zipWith(f)(xs)(ys));
  13416. };
  13417. };
  13418. };
  13419. };
  13420. var zip = zipWith(Data_Tuple.Tuple.create);
  13421. var wrappedOperation2 = function wrappedOperation2(name) {
  13422. return function (f) {
  13423. return function (v) {
  13424. return function (v1) {
  13425. var v2 = f(new Data_List_Types.Cons(v.value0, v.value1))(new Data_List_Types.Cons(v1.value0, v1.value1));
  13426. if (v2 instanceof Data_List_Types.Cons) {
  13427. return new Data_NonEmpty.NonEmpty(v2.value0, v2.value1);
  13428. }
  13429. ;
  13430. if (v2 instanceof Data_List_Types.Nil) {
  13431. return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name);
  13432. }
  13433. ;
  13434. throw new Error("Failed pattern match at Data.List.NonEmpty (line 104, column 3 - line 106, column 81): " + [v2.constructor.name]);
  13435. };
  13436. };
  13437. };
  13438. };
  13439. var wrappedOperation = function wrappedOperation(name) {
  13440. return function (f) {
  13441. return function (v) {
  13442. var v1 = f(new Data_List_Types.Cons(v.value0, v.value1));
  13443. if (v1 instanceof Data_List_Types.Cons) {
  13444. return new Data_NonEmpty.NonEmpty(v1.value0, v1.value1);
  13445. }
  13446. ;
  13447. if (v1 instanceof Data_List_Types.Nil) {
  13448. return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name);
  13449. }
  13450. ;
  13451. throw new Error("Failed pattern match at Data.List.NonEmpty (line 91, column 3 - line 93, column 81): " + [v1.constructor.name]);
  13452. };
  13453. };
  13454. };
  13455. var updateAt = function updateAt(i) {
  13456. return function (a) {
  13457. return function (v) {
  13458. if (i === 0) {
  13459. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, v.value1));
  13460. }
  13461. ;
  13462. if (Data_Boolean.otherwise) {
  13463. return Data_Functor.map(Data_Maybe.functorMaybe)(function ($161) {
  13464. return Data_List_Types.NonEmptyList(function (v1) {
  13465. return new Data_NonEmpty.NonEmpty(v.value0, v1);
  13466. }($161));
  13467. })(Data_List.updateAt(i - 1 | 0)(a)(v.value1));
  13468. }
  13469. ;
  13470. throw new Error("Failed pattern match at Data.List.NonEmpty (line 197, column 1 - line 197, column 75): " + [i.constructor.name, a.constructor.name, v.constructor.name]);
  13471. };
  13472. };
  13473. };
  13474. var unzip = function unzip(ts) {
  13475. return new Data_Tuple.Tuple(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Data_Tuple.fst)(ts), Data_Functor.map(Data_List_Types.functorNonEmptyList)(Data_Tuple.snd)(ts));
  13476. };
  13477. var unsnoc = function unsnoc(v) {
  13478. var v1 = Data_List.unsnoc(v.value1);
  13479. if (v1 instanceof Data_Maybe.Nothing) {
  13480. return {
  13481. init: Data_List_Types.Nil.value,
  13482. last: v.value0
  13483. };
  13484. }
  13485. ;
  13486. if (v1 instanceof Data_Maybe.Just) {
  13487. return {
  13488. init: new Data_List_Types.Cons(v.value0, v1.value0.init),
  13489. last: v1.value0.last
  13490. };
  13491. }
  13492. ;
  13493. throw new Error("Failed pattern match at Data.List.NonEmpty (line 159, column 35 - line 161, column 50): " + [v1.constructor.name]);
  13494. };
  13495. var unionBy = function () {
  13496. var $162 = wrappedOperation2("unionBy");
  13497. return function ($163) {
  13498. return $162(Data_List.unionBy($163));
  13499. };
  13500. }();
  13501. var union = function union(dictEq) {
  13502. return wrappedOperation2("union")(Data_List.union(dictEq));
  13503. };
  13504. var uncons = function uncons(v) {
  13505. return {
  13506. head: v.value0,
  13507. tail: v.value1
  13508. };
  13509. };
  13510. var toList = function toList(v) {
  13511. return new Data_List_Types.Cons(v.value0, v.value1);
  13512. };
  13513. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  13514. var $164 = Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
  13515. return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
  13516. return new Data_Tuple.Tuple(rec.head, rec.tail);
  13517. })(Data_List.uncons(xs));
  13518. });
  13519. return function ($165) {
  13520. return $164(toList($165));
  13521. };
  13522. };
  13523. var tail = function tail(v) {
  13524. return v.value1;
  13525. };
  13526. var sortBy = function () {
  13527. var $166 = wrappedOperation("sortBy");
  13528. return function ($167) {
  13529. return $166(Data_List.sortBy($167));
  13530. };
  13531. }();
  13532. var sort = function sort(dictOrd) {
  13533. return function (xs) {
  13534. return sortBy(Data_Ord.compare(dictOrd))(xs);
  13535. };
  13536. };
  13537. var snoc = function snoc(v) {
  13538. return function (y) {
  13539. return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y));
  13540. };
  13541. };
  13542. var singleton = function () {
  13543. var $168 = Data_NonEmpty.singleton(Data_List_Types.plusList);
  13544. return function ($169) {
  13545. return Data_List_Types.NonEmptyList($168($169));
  13546. };
  13547. }();
  13548. var snoc$prime = function snoc$prime(v) {
  13549. return function (y) {
  13550. if (v instanceof Data_List_Types.Cons) {
  13551. return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y));
  13552. }
  13553. ;
  13554. if (v instanceof Data_List_Types.Nil) {
  13555. return singleton(y);
  13556. }
  13557. ;
  13558. throw new Error("Failed pattern match at Data.List.NonEmpty (line 139, column 1 - line 139, column 51): " + [v.constructor.name, y.constructor.name]);
  13559. };
  13560. };
  13561. var reverse = wrappedOperation("reverse")(Data_List.reverse);
  13562. var nubBy = function () {
  13563. var $170 = wrappedOperation("nubBy");
  13564. return function ($171) {
  13565. return $170(Data_List.nubBy($171));
  13566. };
  13567. }();
  13568. var nub = function nub(dictEq) {
  13569. return wrappedOperation("nub")(Data_List.nub(dictEq));
  13570. };
  13571. var modifyAt = function modifyAt(i) {
  13572. return function (f) {
  13573. return function (v) {
  13574. if (i === 0) {
  13575. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(f(v.value0), v.value1));
  13576. }
  13577. ;
  13578. if (Data_Boolean.otherwise) {
  13579. return Data_Functor.map(Data_Maybe.functorMaybe)(function ($172) {
  13580. return Data_List_Types.NonEmptyList(function (v1) {
  13581. return new Data_NonEmpty.NonEmpty(v.value0, v1);
  13582. }($172));
  13583. })(Data_List.modifyAt(i - 1 | 0)(f)(v.value1));
  13584. }
  13585. ;
  13586. throw new Error("Failed pattern match at Data.List.NonEmpty (line 202, column 1 - line 202, column 82): " + [i.constructor.name, f.constructor.name, v.constructor.name]);
  13587. };
  13588. };
  13589. };
  13590. var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexNonEmptyList);
  13591. var lift = function lift(f) {
  13592. return function (v) {
  13593. return f(new Data_List_Types.Cons(v.value0, v.value1));
  13594. };
  13595. };
  13596. var mapMaybe = function mapMaybe($173) {
  13597. return lift(Data_List.mapMaybe($173));
  13598. };
  13599. var partition = function partition($174) {
  13600. return lift(Data_List.partition($174));
  13601. };
  13602. var span = function span($175) {
  13603. return lift(Data_List.span($175));
  13604. };
  13605. var take = function take($176) {
  13606. return lift(Data_List.take($176));
  13607. };
  13608. var takeWhile = function takeWhile($177) {
  13609. return lift(Data_List.takeWhile($177));
  13610. };
  13611. var length = function length(v) {
  13612. return 1 + Data_List.length(v.value1) | 0;
  13613. };
  13614. var last = function last(v) {
  13615. return Data_Maybe.fromMaybe(v.value0)(Data_List.last(v.value1));
  13616. };
  13617. var intersectBy = function () {
  13618. var $178 = wrappedOperation2("intersectBy");
  13619. return function ($179) {
  13620. return $178(Data_List.intersectBy($179));
  13621. };
  13622. }();
  13623. var intersect = function intersect(dictEq) {
  13624. return wrappedOperation2("intersect")(Data_List.intersect(dictEq));
  13625. };
  13626. var insertAt = function insertAt(i) {
  13627. return function (a) {
  13628. return function (v) {
  13629. if (i === 0) {
  13630. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, new Data_List_Types.Cons(v.value0, v.value1)));
  13631. }
  13632. ;
  13633. if (Data_Boolean.otherwise) {
  13634. return Data_Functor.map(Data_Maybe.functorMaybe)(function ($180) {
  13635. return Data_List_Types.NonEmptyList(function (v1) {
  13636. return new Data_NonEmpty.NonEmpty(v.value0, v1);
  13637. }($180));
  13638. })(Data_List.insertAt(i - 1 | 0)(a)(v.value1));
  13639. }
  13640. ;
  13641. throw new Error("Failed pattern match at Data.List.NonEmpty (line 192, column 1 - line 192, column 75): " + [i.constructor.name, a.constructor.name, v.constructor.name]);
  13642. };
  13643. };
  13644. };
  13645. var init = function init(v) {
  13646. return Data_Maybe.maybe(Data_List_Types.Nil.value)(function (v1) {
  13647. return new Data_List_Types.Cons(v.value0, v1);
  13648. })(Data_List.init(v.value1));
  13649. };
  13650. var index = function index(v) {
  13651. return function (i) {
  13652. if (i === 0) {
  13653. return new Data_Maybe.Just(v.value0);
  13654. }
  13655. ;
  13656. if (Data_Boolean.otherwise) {
  13657. return Data_List.index(v.value1)(i - 1 | 0);
  13658. }
  13659. ;
  13660. throw new Error("Failed pattern match at Data.List.NonEmpty (line 166, column 1 - line 166, column 52): " + [v.constructor.name, i.constructor.name]);
  13661. };
  13662. };
  13663. var head = function head(v) {
  13664. return v.value0;
  13665. };
  13666. var groupBy = function () {
  13667. var $181 = wrappedOperation("groupBy");
  13668. return function ($182) {
  13669. return $181(Data_List.groupBy($182));
  13670. };
  13671. }();
  13672. var group$prime = function group$prime(dictOrd) {
  13673. return wrappedOperation("group'")(Data_List["group'"](dictOrd));
  13674. };
  13675. var group = function group(dictEq) {
  13676. return wrappedOperation("group")(Data_List.group(dictEq));
  13677. };
  13678. var fromList = function fromList(v) {
  13679. if (v instanceof Data_List_Types.Nil) {
  13680. return Data_Maybe.Nothing.value;
  13681. }
  13682. ;
  13683. if (v instanceof Data_List_Types.Cons) {
  13684. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(v.value0, v.value1));
  13685. }
  13686. ;
  13687. throw new Error("Failed pattern match at Data.List.NonEmpty (line 120, column 1 - line 120, column 57): " + [v.constructor.name]);
  13688. };
  13689. var fromFoldable = function fromFoldable(dictFoldable) {
  13690. var $183 = Data_List.fromFoldable(dictFoldable);
  13691. return function ($184) {
  13692. return fromList($183($184));
  13693. };
  13694. };
  13695. var foldM = function foldM(dictMonad) {
  13696. return function (f) {
  13697. return function (a) {
  13698. return function (v) {
  13699. return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0))(function (a$prime) {
  13700. return Data_List.foldM(dictMonad)(f)(a$prime)(v.value1);
  13701. });
  13702. };
  13703. };
  13704. };
  13705. };
  13706. var findLastIndex = function findLastIndex(f) {
  13707. return function (v) {
  13708. var v1 = Data_List.findLastIndex(f)(v.value1);
  13709. if (v1 instanceof Data_Maybe.Just) {
  13710. return new Data_Maybe.Just(v1.value0 + 1 | 0);
  13711. }
  13712. ;
  13713. if (v1 instanceof Data_Maybe.Nothing) {
  13714. if (f(v.value0)) {
  13715. return new Data_Maybe.Just(0);
  13716. }
  13717. ;
  13718. if (Data_Boolean.otherwise) {
  13719. return Data_Maybe.Nothing.value;
  13720. }
  13721. ;
  13722. }
  13723. ;
  13724. throw new Error("Failed pattern match at Data.List.NonEmpty (line 186, column 3 - line 190, column 29): " + [v1.constructor.name]);
  13725. };
  13726. };
  13727. var findIndex = function findIndex(f) {
  13728. return function (v) {
  13729. if (f(v.value0)) {
  13730. return new Data_Maybe.Just(0);
  13731. }
  13732. ;
  13733. if (Data_Boolean.otherwise) {
  13734. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
  13735. return v1 + 1 | 0;
  13736. })(Data_List.findIndex(f)(v.value1));
  13737. }
  13738. ;
  13739. throw new Error("Failed pattern match at Data.List.NonEmpty (line 179, column 1 - line 179, column 69): " + [f.constructor.name, v.constructor.name]);
  13740. };
  13741. };
  13742. var filterM = function filterM(dictMonad) {
  13743. var $185 = Data_List.filterM(dictMonad);
  13744. return function ($186) {
  13745. return lift($185($186));
  13746. };
  13747. };
  13748. var filter = function filter($187) {
  13749. return lift(Data_List.filter($187));
  13750. };
  13751. var elemLastIndex = function elemLastIndex(dictEq) {
  13752. return function (x) {
  13753. return findLastIndex(function (v) {
  13754. return Data_Eq.eq(dictEq)(v)(x);
  13755. });
  13756. };
  13757. };
  13758. var elemIndex = function elemIndex(dictEq) {
  13759. return function (x) {
  13760. return findIndex(function (v) {
  13761. return Data_Eq.eq(dictEq)(v)(x);
  13762. });
  13763. };
  13764. };
  13765. var dropWhile = function dropWhile($188) {
  13766. return lift(Data_List.dropWhile($188));
  13767. };
  13768. var drop = function drop($189) {
  13769. return lift(Data_List.drop($189));
  13770. };
  13771. var cons$prime = function cons$prime(x) {
  13772. return function (xs) {
  13773. return new Data_NonEmpty.NonEmpty(x, xs);
  13774. };
  13775. };
  13776. var cons = function cons(y) {
  13777. return function (v) {
  13778. return new Data_NonEmpty.NonEmpty(y, new Data_List_Types.Cons(v.value0, v.value1));
  13779. };
  13780. };
  13781. var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindNonEmptyList));
  13782. var concat = function concat(v) {
  13783. return Control_Bind.bind(Data_List_Types.bindNonEmptyList)(v)(Control_Category.identity(Control_Category.categoryFn));
  13784. };
  13785. var catMaybes = lift(Data_List.catMaybes);
  13786. var appendFoldable = function appendFoldable(dictFoldable) {
  13787. return function (v) {
  13788. return function (ys) {
  13789. return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(Data_List_Types.semigroupList)(v.value1)(Data_List.fromFoldable(dictFoldable)(ys)));
  13790. };
  13791. };
  13792. };
  13793. module.exports = {
  13794. toUnfoldable: toUnfoldable,
  13795. fromFoldable: fromFoldable,
  13796. fromList: fromList,
  13797. toList: toList,
  13798. singleton: singleton,
  13799. length: length,
  13800. cons: cons,
  13801. "cons'": cons$prime,
  13802. snoc: snoc,
  13803. "snoc'": snoc$prime,
  13804. head: head,
  13805. last: last,
  13806. tail: tail,
  13807. init: init,
  13808. uncons: uncons,
  13809. unsnoc: unsnoc,
  13810. index: index,
  13811. elemIndex: elemIndex,
  13812. elemLastIndex: elemLastIndex,
  13813. findIndex: findIndex,
  13814. findLastIndex: findLastIndex,
  13815. insertAt: insertAt,
  13816. updateAt: updateAt,
  13817. modifyAt: modifyAt,
  13818. reverse: reverse,
  13819. concat: concat,
  13820. concatMap: concatMap,
  13821. filter: filter,
  13822. filterM: filterM,
  13823. mapMaybe: mapMaybe,
  13824. catMaybes: catMaybes,
  13825. appendFoldable: appendFoldable,
  13826. mapWithIndex: mapWithIndex,
  13827. sort: sort,
  13828. sortBy: sortBy,
  13829. take: take,
  13830. takeWhile: takeWhile,
  13831. drop: drop,
  13832. dropWhile: dropWhile,
  13833. span: span,
  13834. group: group,
  13835. "group'": group$prime,
  13836. groupBy: groupBy,
  13837. partition: partition,
  13838. nub: nub,
  13839. nubBy: nubBy,
  13840. union: union,
  13841. unionBy: unionBy,
  13842. intersect: intersect,
  13843. intersectBy: intersectBy,
  13844. zipWith: zipWith,
  13845. zipWithA: zipWithA,
  13846. zip: zip,
  13847. unzip: unzip,
  13848. foldM: foldM
  13849. };
  13850. },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Partial.Unsafe/index.js":"../output/Partial.Unsafe/index.js"}],"../output/Data.String.CodeUnits/foreign.js":[function(require,module,exports) {
  13851. "use strict";
  13852. exports.fromCharArray = function (a) {
  13853. return a.join("");
  13854. };
  13855. exports.toCharArray = function (s) {
  13856. return s.split("");
  13857. };
  13858. exports.singleton = function (c) {
  13859. return c;
  13860. };
  13861. exports._charAt = function (just) {
  13862. return function (nothing) {
  13863. return function (i) {
  13864. return function (s) {
  13865. return i >= 0 && i < s.length ? just(s.charAt(i)) : nothing;
  13866. };
  13867. };
  13868. };
  13869. };
  13870. exports._toChar = function (just) {
  13871. return function (nothing) {
  13872. return function (s) {
  13873. return s.length === 1 ? just(s) : nothing;
  13874. };
  13875. };
  13876. };
  13877. exports.length = function (s) {
  13878. return s.length;
  13879. };
  13880. exports.countPrefix = function (p) {
  13881. return function (s) {
  13882. var i = 0;
  13883. while (i < s.length && p(s.charAt(i))) {
  13884. i++;
  13885. }
  13886. return i;
  13887. };
  13888. };
  13889. exports._indexOf = function (just) {
  13890. return function (nothing) {
  13891. return function (x) {
  13892. return function (s) {
  13893. var i = s.indexOf(x);
  13894. return i === -1 ? nothing : just(i);
  13895. };
  13896. };
  13897. };
  13898. };
  13899. exports["_indexOf'"] = function (just) {
  13900. return function (nothing) {
  13901. return function (x) {
  13902. return function (startAt) {
  13903. return function (s) {
  13904. if (startAt < 0 || startAt > s.length) return nothing;
  13905. var i = s.indexOf(x, startAt);
  13906. return i === -1 ? nothing : just(i);
  13907. };
  13908. };
  13909. };
  13910. };
  13911. };
  13912. exports._lastIndexOf = function (just) {
  13913. return function (nothing) {
  13914. return function (x) {
  13915. return function (s) {
  13916. var i = s.lastIndexOf(x);
  13917. return i === -1 ? nothing : just(i);
  13918. };
  13919. };
  13920. };
  13921. };
  13922. exports["_lastIndexOf'"] = function (just) {
  13923. return function (nothing) {
  13924. return function (x) {
  13925. return function (startAt) {
  13926. return function (s) {
  13927. if (startAt < 0 || startAt > s.length) return nothing;
  13928. var i = s.lastIndexOf(x, startAt);
  13929. return i === -1 ? nothing : just(i);
  13930. };
  13931. };
  13932. };
  13933. };
  13934. };
  13935. exports.take = function (n) {
  13936. return function (s) {
  13937. return s.substr(0, n);
  13938. };
  13939. };
  13940. exports.drop = function (n) {
  13941. return function (s) {
  13942. return s.substring(n);
  13943. };
  13944. };
  13945. exports._slice = function (b) {
  13946. return function (e) {
  13947. return function (s) {
  13948. return s.slice(b, e);
  13949. };
  13950. };
  13951. };
  13952. exports.splitAt = function (i) {
  13953. return function (s) {
  13954. return {
  13955. before: s.substring(0, i),
  13956. after: s.substring(i)
  13957. };
  13958. };
  13959. };
  13960. },{}],"../output/Data.String.Unsafe/foreign.js":[function(require,module,exports) {
  13961. "use strict";
  13962. exports.charAt = function (i) {
  13963. return function (s) {
  13964. if (i >= 0 && i < s.length) return s.charAt(i);
  13965. throw new Error("Data.String.Unsafe.charAt: Invalid index.");
  13966. };
  13967. };
  13968. exports.char = function (s) {
  13969. if (s.length === 1) return s.charAt(0);
  13970. throw new Error("Data.String.Unsafe.char: Expected string of length 1.");
  13971. };
  13972. },{}],"../output/Data.String.Unsafe/index.js":[function(require,module,exports) {
  13973. // Generated by purs version 0.13.6
  13974. "use strict";
  13975. var $foreign = require("./foreign.js");
  13976. module.exports = {
  13977. "char": $foreign["char"],
  13978. charAt: $foreign.charAt
  13979. };
  13980. },{"./foreign.js":"../output/Data.String.Unsafe/foreign.js"}],"../output/Data.String.CodeUnits/index.js":[function(require,module,exports) {
  13981. // Generated by purs version 0.13.6
  13982. "use strict";
  13983. var $foreign = require("./foreign.js");
  13984. var Data_Boolean = require("../Data.Boolean/index.js");
  13985. var Data_Maybe = require("../Data.Maybe/index.js");
  13986. var Data_String_Unsafe = require("../Data.String.Unsafe/index.js");
  13987. var uncons = function uncons(v) {
  13988. if (v === "") {
  13989. return Data_Maybe.Nothing.value;
  13990. }
  13991. ;
  13992. return new Data_Maybe.Just({
  13993. head: Data_String_Unsafe.charAt(0)(v),
  13994. tail: $foreign.drop(1)(v)
  13995. });
  13996. };
  13997. var toChar = $foreign["_toChar"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13998. var takeWhile = function takeWhile(p) {
  13999. return function (s) {
  14000. return $foreign.take($foreign.countPrefix(p)(s))(s);
  14001. };
  14002. };
  14003. var takeRight = function takeRight(i) {
  14004. return function (s) {
  14005. return $foreign.drop($foreign.length(s) - i | 0)(s);
  14006. };
  14007. };
  14008. var slice = function slice(b) {
  14009. return function (e) {
  14010. return function (s) {
  14011. var l = $foreign.length(s);
  14012. var norm = function norm(x) {
  14013. if (x < 0) {
  14014. return l + x | 0;
  14015. }
  14016. ;
  14017. if (Data_Boolean.otherwise) {
  14018. return x;
  14019. }
  14020. ;
  14021. throw new Error("Failed pattern match at Data.String.CodeUnits (line 314, column 5 - line 315, column 27): " + [x.constructor.name]);
  14022. };
  14023. var e$prime = norm(e);
  14024. var b$prime = norm(b);
  14025. var $7 = b$prime < 0 || b$prime >= l || e$prime < 0 || e$prime > l || b$prime > e$prime;
  14026. if ($7) {
  14027. return Data_Maybe.Nothing.value;
  14028. }
  14029. ;
  14030. return new Data_Maybe.Just($foreign["_slice"](b)(e)(s));
  14031. };
  14032. };
  14033. };
  14034. var lastIndexOf$prime = $foreign["_lastIndexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  14035. var lastIndexOf = $foreign["_lastIndexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  14036. var stripSuffix = function stripSuffix(v) {
  14037. return function (str) {
  14038. var v1 = lastIndexOf(v)(str);
  14039. if (v1 instanceof Data_Maybe.Just && v1.value0 === ($foreign.length(str) - $foreign.length(v) | 0)) {
  14040. return Data_Maybe.Just.create($foreign.take(v1.value0)(str));
  14041. }
  14042. ;
  14043. return Data_Maybe.Nothing.value;
  14044. };
  14045. };
  14046. var indexOf$prime = $foreign["_indexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  14047. var indexOf = $foreign["_indexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  14048. var stripPrefix = function stripPrefix(v) {
  14049. return function (str) {
  14050. var v1 = indexOf(v)(str);
  14051. if (v1 instanceof Data_Maybe.Just && v1.value0 === 0) {
  14052. return Data_Maybe.Just.create($foreign.drop($foreign.length(v))(str));
  14053. }
  14054. ;
  14055. return Data_Maybe.Nothing.value;
  14056. };
  14057. };
  14058. var dropWhile = function dropWhile(p) {
  14059. return function (s) {
  14060. return $foreign.drop($foreign.countPrefix(p)(s))(s);
  14061. };
  14062. };
  14063. var dropRight = function dropRight(i) {
  14064. return function (s) {
  14065. return $foreign.take($foreign.length(s) - i | 0)(s);
  14066. };
  14067. };
  14068. var contains = function contains(pat) {
  14069. var $16 = indexOf(pat);
  14070. return function ($17) {
  14071. return Data_Maybe.isJust($16($17));
  14072. };
  14073. };
  14074. var charAt = $foreign["_charAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  14075. module.exports = {
  14076. stripPrefix: stripPrefix,
  14077. stripSuffix: stripSuffix,
  14078. contains: contains,
  14079. charAt: charAt,
  14080. toChar: toChar,
  14081. uncons: uncons,
  14082. indexOf: indexOf,
  14083. "indexOf'": indexOf$prime,
  14084. lastIndexOf: lastIndexOf,
  14085. "lastIndexOf'": lastIndexOf$prime,
  14086. takeRight: takeRight,
  14087. takeWhile: takeWhile,
  14088. dropRight: dropRight,
  14089. dropWhile: dropWhile,
  14090. slice: slice,
  14091. singleton: $foreign.singleton,
  14092. fromCharArray: $foreign.fromCharArray,
  14093. toCharArray: $foreign.toCharArray,
  14094. length: $foreign.length,
  14095. countPrefix: $foreign.countPrefix,
  14096. take: $foreign.take,
  14097. drop: $foreign.drop,
  14098. splitAt: $foreign.splitAt
  14099. };
  14100. },{"./foreign.js":"../output/Data.String.CodeUnits/foreign.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.String.Unsafe/index.js":"../output/Data.String.Unsafe/index.js"}],"../output/Foreign/index.js":[function(require,module,exports) {
  14101. // Generated by purs version 0.13.6
  14102. "use strict";
  14103. var $foreign = require("./foreign.js");
  14104. var Control_Applicative = require("../Control.Applicative/index.js");
  14105. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  14106. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  14107. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  14108. var Data_Boolean = require("../Data.Boolean/index.js");
  14109. var Data_Either = require("../Data.Either/index.js");
  14110. var Data_Eq = require("../Data.Eq/index.js");
  14111. var Data_Function = require("../Data.Function/index.js");
  14112. var Data_Identity = require("../Data.Identity/index.js");
  14113. var Data_Int = require("../Data.Int/index.js");
  14114. var Data_List_NonEmpty = require("../Data.List.NonEmpty/index.js");
  14115. var Data_Maybe = require("../Data.Maybe/index.js");
  14116. var Data_Ord = require("../Data.Ord/index.js");
  14117. var Data_Ordering = require("../Data.Ordering/index.js");
  14118. var Data_Show = require("../Data.Show/index.js");
  14119. var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js");
  14120. var ForeignError = function () {
  14121. function ForeignError(value0) {
  14122. this.value0 = value0;
  14123. }
  14124. ;
  14125. ForeignError.create = function (value0) {
  14126. return new ForeignError(value0);
  14127. };
  14128. return ForeignError;
  14129. }();
  14130. var TypeMismatch = function () {
  14131. function TypeMismatch(value0, value1) {
  14132. this.value0 = value0;
  14133. this.value1 = value1;
  14134. }
  14135. ;
  14136. TypeMismatch.create = function (value0) {
  14137. return function (value1) {
  14138. return new TypeMismatch(value0, value1);
  14139. };
  14140. };
  14141. return TypeMismatch;
  14142. }();
  14143. var ErrorAtIndex = function () {
  14144. function ErrorAtIndex(value0, value1) {
  14145. this.value0 = value0;
  14146. this.value1 = value1;
  14147. }
  14148. ;
  14149. ErrorAtIndex.create = function (value0) {
  14150. return function (value1) {
  14151. return new ErrorAtIndex(value0, value1);
  14152. };
  14153. };
  14154. return ErrorAtIndex;
  14155. }();
  14156. var ErrorAtProperty = function () {
  14157. function ErrorAtProperty(value0, value1) {
  14158. this.value0 = value0;
  14159. this.value1 = value1;
  14160. }
  14161. ;
  14162. ErrorAtProperty.create = function (value0) {
  14163. return function (value1) {
  14164. return new ErrorAtProperty(value0, value1);
  14165. };
  14166. };
  14167. return ErrorAtProperty;
  14168. }();
  14169. var showForeignError = new Data_Show.Show(function (v) {
  14170. if (v instanceof ForeignError) {
  14171. return "(ForeignError " + (Data_Show.show(Data_Show.showString)(v.value0) + ")");
  14172. }
  14173. ;
  14174. if (v instanceof ErrorAtIndex) {
  14175. return "(ErrorAtIndex " + (Data_Show.show(Data_Show.showInt)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")")));
  14176. }
  14177. ;
  14178. if (v instanceof ErrorAtProperty) {
  14179. return "(ErrorAtProperty " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")")));
  14180. }
  14181. ;
  14182. if (v instanceof TypeMismatch) {
  14183. return "(TypeMismatch " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(Data_Show.showString)(v.value1) + ")")));
  14184. }
  14185. ;
  14186. throw new Error("Failed pattern match at Foreign (line 63, column 1 - line 67, column 89): " + [v.constructor.name]);
  14187. });
  14188. var renderForeignError = function renderForeignError(v) {
  14189. if (v instanceof ForeignError) {
  14190. return v.value0;
  14191. }
  14192. ;
  14193. if (v instanceof ErrorAtIndex) {
  14194. return "Error at array index " + (Data_Show.show(Data_Show.showInt)(v.value0) + (": " + renderForeignError(v.value1)));
  14195. }
  14196. ;
  14197. if (v instanceof ErrorAtProperty) {
  14198. return "Error at property " + (Data_Show.show(Data_Show.showString)(v.value0) + (": " + renderForeignError(v.value1)));
  14199. }
  14200. ;
  14201. if (v instanceof TypeMismatch) {
  14202. return "Type mismatch: expected " + (v.value0 + (", found " + v.value1));
  14203. }
  14204. ;
  14205. throw new Error("Failed pattern match at Foreign (line 72, column 1 - line 72, column 45): " + [v.constructor.name]);
  14206. };
  14207. var readUndefined = function readUndefined(value) {
  14208. if ($foreign.isUndefined(value)) {
  14209. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  14210. }
  14211. ;
  14212. if (Data_Boolean.otherwise) {
  14213. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
  14214. }
  14215. ;
  14216. throw new Error("Failed pattern match at Foreign (line 157, column 1 - line 157, column 46): " + [value.constructor.name]);
  14217. };
  14218. var readNullOrUndefined = function readNullOrUndefined(value) {
  14219. if ($foreign.isNull(value) || $foreign.isUndefined(value)) {
  14220. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  14221. }
  14222. ;
  14223. if (Data_Boolean.otherwise) {
  14224. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
  14225. }
  14226. ;
  14227. throw new Error("Failed pattern match at Foreign (line 162, column 1 - line 162, column 52): " + [value.constructor.name]);
  14228. };
  14229. var readNull = function readNull(value) {
  14230. if ($foreign.isNull(value)) {
  14231. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  14232. }
  14233. ;
  14234. if (Data_Boolean.otherwise) {
  14235. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
  14236. }
  14237. ;
  14238. throw new Error("Failed pattern match at Foreign (line 152, column 1 - line 152, column 41): " + [value.constructor.name]);
  14239. };
  14240. var fail = function () {
  14241. var $107 = Control_Monad_Error_Class.throwError(Control_Monad_Except_Trans.monadThrowExceptT(Data_Identity.monadIdentity));
  14242. return function ($108) {
  14243. return $107(Data_List_NonEmpty.singleton($108));
  14244. };
  14245. }();
  14246. var readArray = function readArray(value) {
  14247. if ($foreign.isArray(value)) {
  14248. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value));
  14249. }
  14250. ;
  14251. if (Data_Boolean.otherwise) {
  14252. return fail(new TypeMismatch("array", $foreign.tagOf(value)));
  14253. }
  14254. ;
  14255. throw new Error("Failed pattern match at Foreign (line 147, column 1 - line 147, column 42): " + [value.constructor.name]);
  14256. };
  14257. var unsafeReadTagged = function unsafeReadTagged(tag) {
  14258. return function (value) {
  14259. if ($foreign.tagOf(value) === tag) {
  14260. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value));
  14261. }
  14262. ;
  14263. if (Data_Boolean.otherwise) {
  14264. return fail(new TypeMismatch(tag, $foreign.tagOf(value)));
  14265. }
  14266. ;
  14267. throw new Error("Failed pattern match at Foreign (line 106, column 1 - line 106, column 55): " + [tag.constructor.name, value.constructor.name]);
  14268. };
  14269. };
  14270. var readBoolean = unsafeReadTagged("Boolean");
  14271. var readNumber = unsafeReadTagged("Number");
  14272. var readInt = function readInt(value) {
  14273. var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Int", $foreign.tagOf(value))));
  14274. var fromNumber = function () {
  14275. var $109 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither));
  14276. return function ($110) {
  14277. return $109(Data_Int.fromNumber($110));
  14278. };
  14279. }();
  14280. return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromNumber))(readNumber(value));
  14281. };
  14282. var readString = unsafeReadTagged("String");
  14283. var readChar = function readChar(value) {
  14284. var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Char", $foreign.tagOf(value))));
  14285. var fromString = function () {
  14286. var $111 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither));
  14287. return function ($112) {
  14288. return $111(Data_String_CodeUnits.toChar($112));
  14289. };
  14290. }();
  14291. return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromString))(readString(value));
  14292. };
  14293. var eqForeignError = new Data_Eq.Eq(function (x) {
  14294. return function (y) {
  14295. if (x instanceof ForeignError && y instanceof ForeignError) {
  14296. return x.value0 === y.value0;
  14297. }
  14298. ;
  14299. if (x instanceof TypeMismatch && y instanceof TypeMismatch) {
  14300. return x.value0 === y.value0 && x.value1 === y.value1;
  14301. }
  14302. ;
  14303. if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) {
  14304. return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1);
  14305. }
  14306. ;
  14307. if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) {
  14308. return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1);
  14309. }
  14310. ;
  14311. return false;
  14312. };
  14313. });
  14314. var ordForeignError = new Data_Ord.Ord(function () {
  14315. return eqForeignError;
  14316. }, function (x) {
  14317. return function (y) {
  14318. if (x instanceof ForeignError && y instanceof ForeignError) {
  14319. return Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
  14320. }
  14321. ;
  14322. if (x instanceof ForeignError) {
  14323. return Data_Ordering.LT.value;
  14324. }
  14325. ;
  14326. if (y instanceof ForeignError) {
  14327. return Data_Ordering.GT.value;
  14328. }
  14329. ;
  14330. if (x instanceof TypeMismatch && y instanceof TypeMismatch) {
  14331. var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
  14332. if (v instanceof Data_Ordering.LT) {
  14333. return Data_Ordering.LT.value;
  14334. }
  14335. ;
  14336. if (v instanceof Data_Ordering.GT) {
  14337. return Data_Ordering.GT.value;
  14338. }
  14339. ;
  14340. return Data_Ord.compare(Data_Ord.ordString)(x.value1)(y.value1);
  14341. }
  14342. ;
  14343. if (x instanceof TypeMismatch) {
  14344. return Data_Ordering.LT.value;
  14345. }
  14346. ;
  14347. if (y instanceof TypeMismatch) {
  14348. return Data_Ordering.GT.value;
  14349. }
  14350. ;
  14351. if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) {
  14352. var v = Data_Ord.compare(Data_Ord.ordInt)(x.value0)(y.value0);
  14353. if (v instanceof Data_Ordering.LT) {
  14354. return Data_Ordering.LT.value;
  14355. }
  14356. ;
  14357. if (v instanceof Data_Ordering.GT) {
  14358. return Data_Ordering.GT.value;
  14359. }
  14360. ;
  14361. return Data_Ord.compare(ordForeignError)(x.value1)(y.value1);
  14362. }
  14363. ;
  14364. if (x instanceof ErrorAtIndex) {
  14365. return Data_Ordering.LT.value;
  14366. }
  14367. ;
  14368. if (y instanceof ErrorAtIndex) {
  14369. return Data_Ordering.GT.value;
  14370. }
  14371. ;
  14372. if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) {
  14373. var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
  14374. if (v instanceof Data_Ordering.LT) {
  14375. return Data_Ordering.LT.value;
  14376. }
  14377. ;
  14378. if (v instanceof Data_Ordering.GT) {
  14379. return Data_Ordering.GT.value;
  14380. }
  14381. ;
  14382. return Data_Ord.compare(ordForeignError)(x.value1)(y.value1);
  14383. }
  14384. ;
  14385. throw new Error("Failed pattern match at Foreign (line 61, column 1 - line 61, column 52): " + [x.constructor.name, y.constructor.name]);
  14386. };
  14387. });
  14388. module.exports = {
  14389. ForeignError: ForeignError,
  14390. TypeMismatch: TypeMismatch,
  14391. ErrorAtIndex: ErrorAtIndex,
  14392. ErrorAtProperty: ErrorAtProperty,
  14393. renderForeignError: renderForeignError,
  14394. unsafeReadTagged: unsafeReadTagged,
  14395. readString: readString,
  14396. readChar: readChar,
  14397. readBoolean: readBoolean,
  14398. readNumber: readNumber,
  14399. readInt: readInt,
  14400. readArray: readArray,
  14401. readNull: readNull,
  14402. readUndefined: readUndefined,
  14403. readNullOrUndefined: readNullOrUndefined,
  14404. fail: fail,
  14405. eqForeignError: eqForeignError,
  14406. ordForeignError: ordForeignError,
  14407. showForeignError: showForeignError,
  14408. unsafeToForeign: $foreign.unsafeToForeign,
  14409. unsafeFromForeign: $foreign.unsafeFromForeign,
  14410. typeOf: $foreign.typeOf,
  14411. tagOf: $foreign.tagOf,
  14412. isNull: $foreign.isNull,
  14413. isUndefined: $foreign.isUndefined,
  14414. isArray: $foreign.isArray
  14415. };
  14416. },{"./foreign.js":"../output/Foreign/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Int/index.js":"../output/Data.Int/index.js","../Data.List.NonEmpty/index.js":"../output/Data.List.NonEmpty/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.String.CodeUnits/index.js":"../output/Data.String.CodeUnits/index.js"}],"../output/Data.Generic.Rep/index.js":[function(require,module,exports) {
  14417. // Generated by purs version 0.13.6
  14418. "use strict";
  14419. var Data_Maybe = require("../Data.Maybe/index.js");
  14420. var Inl = function () {
  14421. function Inl(value0) {
  14422. this.value0 = value0;
  14423. }
  14424. ;
  14425. Inl.create = function (value0) {
  14426. return new Inl(value0);
  14427. };
  14428. return Inl;
  14429. }();
  14430. var Inr = function () {
  14431. function Inr(value0) {
  14432. this.value0 = value0;
  14433. }
  14434. ;
  14435. Inr.create = function (value0) {
  14436. return new Inr(value0);
  14437. };
  14438. return Inr;
  14439. }();
  14440. var Product = function () {
  14441. function Product(value0, value1) {
  14442. this.value0 = value0;
  14443. this.value1 = value1;
  14444. }
  14445. ;
  14446. Product.create = function (value0) {
  14447. return function (value1) {
  14448. return new Product(value0, value1);
  14449. };
  14450. };
  14451. return Product;
  14452. }();
  14453. var NoArguments = function () {
  14454. function NoArguments() {}
  14455. ;
  14456. NoArguments.value = new NoArguments();
  14457. return NoArguments;
  14458. }();
  14459. var Constructor = function Constructor(x) {
  14460. return x;
  14461. };
  14462. var Argument = function Argument(x) {
  14463. return x;
  14464. };
  14465. var Generic = function Generic(from, to) {
  14466. this.from = from;
  14467. this.to = to;
  14468. };
  14469. var to = function to(dict) {
  14470. return dict.to;
  14471. };
  14472. var genericMaybe = new Generic(function (v) {
  14473. if (v instanceof Data_Maybe.Nothing) {
  14474. return new Inl(NoArguments.value);
  14475. }
  14476. ;
  14477. if (v instanceof Data_Maybe.Just) {
  14478. return new Inr(v.value0);
  14479. }
  14480. ;
  14481. throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]);
  14482. }, function (v) {
  14483. if (v instanceof Inl) {
  14484. return Data_Maybe.Nothing.value;
  14485. }
  14486. ;
  14487. if (v instanceof Inr) {
  14488. return new Data_Maybe.Just(v.value0);
  14489. }
  14490. ;
  14491. throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]);
  14492. });
  14493. var from = function from(dict) {
  14494. return dict.from;
  14495. };
  14496. module.exports = {
  14497. Generic: Generic,
  14498. to: to,
  14499. from: from,
  14500. NoArguments: NoArguments,
  14501. Inl: Inl,
  14502. Inr: Inr,
  14503. Product: Product,
  14504. Constructor: Constructor,
  14505. Argument: Argument,
  14506. genericMaybe: genericMaybe
  14507. };
  14508. },{"../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Data.Array/foreign.js":[function(require,module,exports) {
  14509. "use strict"; //------------------------------------------------------------------------------
  14510. // Array creation --------------------------------------------------------------
  14511. //------------------------------------------------------------------------------
  14512. exports.range = function (start) {
  14513. return function (end) {
  14514. var step = start > end ? -1 : 1;
  14515. var result = new Array(step * (end - start) + 1);
  14516. var i = start,
  14517. n = 0;
  14518. while (i !== end) {
  14519. result[n++] = i;
  14520. i += step;
  14521. }
  14522. result[n] = i;
  14523. return result;
  14524. };
  14525. };
  14526. var replicateFill = function replicateFill(count) {
  14527. return function (value) {
  14528. if (count < 1) {
  14529. return [];
  14530. }
  14531. var result = new Array(count);
  14532. return result.fill(value);
  14533. };
  14534. };
  14535. var replicatePolyfill = function replicatePolyfill(count) {
  14536. return function (value) {
  14537. var result = [];
  14538. var n = 0;
  14539. for (var i = 0; i < count; i++) {
  14540. result[n++] = value;
  14541. }
  14542. return result;
  14543. };
  14544. }; // In browsers that have Array.prototype.fill we use it, as it's faster.
  14545. exports.replicate = typeof Array.prototype.fill === "function" ? replicateFill : replicatePolyfill;
  14546. exports.fromFoldableImpl = function () {
  14547. function Cons(head, tail) {
  14548. this.head = head;
  14549. this.tail = tail;
  14550. }
  14551. var emptyList = {};
  14552. function curryCons(head) {
  14553. return function (tail) {
  14554. return new Cons(head, tail);
  14555. };
  14556. }
  14557. function listToArray(list) {
  14558. var result = [];
  14559. var count = 0;
  14560. var xs = list;
  14561. while (xs !== emptyList) {
  14562. result[count++] = xs.head;
  14563. xs = xs.tail;
  14564. }
  14565. return result;
  14566. }
  14567. return function (foldr) {
  14568. return function (xs) {
  14569. return listToArray(foldr(curryCons)(emptyList)(xs));
  14570. };
  14571. };
  14572. }(); //------------------------------------------------------------------------------
  14573. // Array size ------------------------------------------------------------------
  14574. //------------------------------------------------------------------------------
  14575. exports.length = function (xs) {
  14576. return xs.length;
  14577. }; //------------------------------------------------------------------------------
  14578. // Extending arrays ------------------------------------------------------------
  14579. //------------------------------------------------------------------------------
  14580. exports.cons = function (e) {
  14581. return function (l) {
  14582. return [e].concat(l);
  14583. };
  14584. };
  14585. exports.snoc = function (l) {
  14586. return function (e) {
  14587. var l1 = l.slice();
  14588. l1.push(e);
  14589. return l1;
  14590. };
  14591. }; //------------------------------------------------------------------------------
  14592. // Non-indexed reads -----------------------------------------------------------
  14593. //------------------------------------------------------------------------------
  14594. exports["uncons'"] = function (empty) {
  14595. return function (next) {
  14596. return function (xs) {
  14597. return xs.length === 0 ? empty({}) : next(xs[0])(xs.slice(1));
  14598. };
  14599. };
  14600. }; //------------------------------------------------------------------------------
  14601. // Indexed operations ----------------------------------------------------------
  14602. //------------------------------------------------------------------------------
  14603. exports.indexImpl = function (just) {
  14604. return function (nothing) {
  14605. return function (xs) {
  14606. return function (i) {
  14607. return i < 0 || i >= xs.length ? nothing : just(xs[i]);
  14608. };
  14609. };
  14610. };
  14611. };
  14612. exports.findIndexImpl = function (just) {
  14613. return function (nothing) {
  14614. return function (f) {
  14615. return function (xs) {
  14616. for (var i = 0, l = xs.length; i < l; i++) {
  14617. if (f(xs[i])) return just(i);
  14618. }
  14619. return nothing;
  14620. };
  14621. };
  14622. };
  14623. };
  14624. exports.findLastIndexImpl = function (just) {
  14625. return function (nothing) {
  14626. return function (f) {
  14627. return function (xs) {
  14628. for (var i = xs.length - 1; i >= 0; i--) {
  14629. if (f(xs[i])) return just(i);
  14630. }
  14631. return nothing;
  14632. };
  14633. };
  14634. };
  14635. };
  14636. exports._insertAt = function (just) {
  14637. return function (nothing) {
  14638. return function (i) {
  14639. return function (a) {
  14640. return function (l) {
  14641. if (i < 0 || i > l.length) return nothing;
  14642. var l1 = l.slice();
  14643. l1.splice(i, 0, a);
  14644. return just(l1);
  14645. };
  14646. };
  14647. };
  14648. };
  14649. };
  14650. exports._deleteAt = function (just) {
  14651. return function (nothing) {
  14652. return function (i) {
  14653. return function (l) {
  14654. if (i < 0 || i >= l.length) return nothing;
  14655. var l1 = l.slice();
  14656. l1.splice(i, 1);
  14657. return just(l1);
  14658. };
  14659. };
  14660. };
  14661. };
  14662. exports._updateAt = function (just) {
  14663. return function (nothing) {
  14664. return function (i) {
  14665. return function (a) {
  14666. return function (l) {
  14667. if (i < 0 || i >= l.length) return nothing;
  14668. var l1 = l.slice();
  14669. l1[i] = a;
  14670. return just(l1);
  14671. };
  14672. };
  14673. };
  14674. };
  14675. }; //------------------------------------------------------------------------------
  14676. // Transformations -------------------------------------------------------------
  14677. //------------------------------------------------------------------------------
  14678. exports.reverse = function (l) {
  14679. return l.slice().reverse();
  14680. };
  14681. exports.concat = function (xss) {
  14682. if (xss.length <= 10000) {
  14683. // This method is faster, but it crashes on big arrays.
  14684. // So we use it when can and fallback to simple variant otherwise.
  14685. return Array.prototype.concat.apply([], xss);
  14686. }
  14687. var result = [];
  14688. for (var i = 0, l = xss.length; i < l; i++) {
  14689. var xs = xss[i];
  14690. for (var j = 0, m = xs.length; j < m; j++) {
  14691. result.push(xs[j]);
  14692. }
  14693. }
  14694. return result;
  14695. };
  14696. exports.filter = function (f) {
  14697. return function (xs) {
  14698. return xs.filter(f);
  14699. };
  14700. };
  14701. exports.partition = function (f) {
  14702. return function (xs) {
  14703. var yes = [];
  14704. var no = [];
  14705. for (var i = 0; i < xs.length; i++) {
  14706. var x = xs[i];
  14707. if (f(x)) yes.push(x);else no.push(x);
  14708. }
  14709. return {
  14710. yes: yes,
  14711. no: no
  14712. };
  14713. };
  14714. }; //------------------------------------------------------------------------------
  14715. // Sorting ---------------------------------------------------------------------
  14716. //------------------------------------------------------------------------------
  14717. exports.sortImpl = function (f) {
  14718. return function (l) {
  14719. return l.slice().sort(function (x, y) {
  14720. return f(x)(y);
  14721. });
  14722. };
  14723. }; //------------------------------------------------------------------------------
  14724. // Subarrays -------------------------------------------------------------------
  14725. //------------------------------------------------------------------------------
  14726. exports.slice = function (s) {
  14727. return function (e) {
  14728. return function (l) {
  14729. return l.slice(s, e);
  14730. };
  14731. };
  14732. };
  14733. exports.take = function (n) {
  14734. return function (l) {
  14735. return n < 1 ? [] : l.slice(0, n);
  14736. };
  14737. };
  14738. exports.drop = function (n) {
  14739. return function (l) {
  14740. return n < 1 ? l : l.slice(n);
  14741. };
  14742. }; //------------------------------------------------------------------------------
  14743. // Zipping ---------------------------------------------------------------------
  14744. //------------------------------------------------------------------------------
  14745. exports.zipWith = function (f) {
  14746. return function (xs) {
  14747. return function (ys) {
  14748. var l = xs.length < ys.length ? xs.length : ys.length;
  14749. var result = new Array(l);
  14750. for (var i = 0; i < l; i++) {
  14751. result[i] = f(xs[i])(ys[i]);
  14752. }
  14753. return result;
  14754. };
  14755. };
  14756. }; //------------------------------------------------------------------------------
  14757. // Partial ---------------------------------------------------------------------
  14758. //------------------------------------------------------------------------------
  14759. exports.unsafeIndexImpl = function (xs) {
  14760. return function (n) {
  14761. return xs[n];
  14762. };
  14763. };
  14764. },{}],"../output/Control.Monad.ST.Internal/foreign.js":[function(require,module,exports) {
  14765. "use strict";
  14766. exports.map_ = function (f) {
  14767. return function (a) {
  14768. return function () {
  14769. return f(a());
  14770. };
  14771. };
  14772. };
  14773. exports.pure_ = function (a) {
  14774. return function () {
  14775. return a;
  14776. };
  14777. };
  14778. exports.bind_ = function (a) {
  14779. return function (f) {
  14780. return function () {
  14781. return f(a())();
  14782. };
  14783. };
  14784. };
  14785. exports.run = function (f) {
  14786. return f();
  14787. };
  14788. exports["while"] = function (f) {
  14789. return function (a) {
  14790. return function () {
  14791. while (f()) {
  14792. a();
  14793. }
  14794. };
  14795. };
  14796. };
  14797. exports["for"] = function (lo) {
  14798. return function (hi) {
  14799. return function (f) {
  14800. return function () {
  14801. for (var i = lo; i < hi; i++) {
  14802. f(i)();
  14803. }
  14804. };
  14805. };
  14806. };
  14807. };
  14808. exports.foreach = function (as) {
  14809. return function (f) {
  14810. return function () {
  14811. for (var i = 0, l = as.length; i < l; i++) {
  14812. f(as[i])();
  14813. }
  14814. };
  14815. };
  14816. };
  14817. exports.new = function (val) {
  14818. return function () {
  14819. return {
  14820. value: val
  14821. };
  14822. };
  14823. };
  14824. exports.read = function (ref) {
  14825. return function () {
  14826. return ref.value;
  14827. };
  14828. };
  14829. exports["modify'"] = function (f) {
  14830. return function (ref) {
  14831. return function () {
  14832. var t = f(ref.value);
  14833. ref.value = t.state;
  14834. return t.value;
  14835. };
  14836. };
  14837. };
  14838. exports.write = function (a) {
  14839. return function (ref) {
  14840. return function () {
  14841. return ref.value = a; // eslint-disable-line no-return-assign
  14842. };
  14843. };
  14844. };
  14845. },{}],"../output/Control.Monad.ST.Internal/index.js":[function(require,module,exports) {
  14846. // Generated by purs version 0.13.6
  14847. "use strict";
  14848. var $foreign = require("./foreign.js");
  14849. var Control_Applicative = require("../Control.Applicative/index.js");
  14850. var Control_Apply = require("../Control.Apply/index.js");
  14851. var Control_Bind = require("../Control.Bind/index.js");
  14852. var Control_Monad = require("../Control.Monad/index.js");
  14853. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  14854. var Data_Functor = require("../Data.Functor/index.js");
  14855. var Data_Unit = require("../Data.Unit/index.js");
  14856. var modify = function modify(f) {
  14857. return $foreign["modify'"](function (s) {
  14858. var s$prime = f(s);
  14859. return {
  14860. state: s$prime,
  14861. value: s$prime
  14862. };
  14863. });
  14864. };
  14865. var functorST = new Data_Functor.Functor($foreign.map_);
  14866. var monadST = new Control_Monad.Monad(function () {
  14867. return applicativeST;
  14868. }, function () {
  14869. return bindST;
  14870. });
  14871. var bindST = new Control_Bind.Bind(function () {
  14872. return applyST;
  14873. }, $foreign.bind_);
  14874. var applyST = new Control_Apply.Apply(function () {
  14875. return functorST;
  14876. }, Control_Monad.ap(monadST));
  14877. var applicativeST = new Control_Applicative.Applicative(function () {
  14878. return applyST;
  14879. }, $foreign.pure_);
  14880. var monadRecST = new Control_Monad_Rec_Class.MonadRec(function () {
  14881. return monadST;
  14882. }, function (f) {
  14883. return function (a) {
  14884. var isLooping = function isLooping(v) {
  14885. if (v instanceof Control_Monad_Rec_Class.Loop) {
  14886. return true;
  14887. }
  14888. ;
  14889. return false;
  14890. };
  14891. var fromDone = function fromDone(v) {
  14892. if (v instanceof Control_Monad_Rec_Class.Done) {
  14893. return v.value0;
  14894. }
  14895. ;
  14896. throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 54, column 32 - line 54, column 46): " + [v.constructor.name]);
  14897. };
  14898. return Control_Bind.bind(bindST)(Control_Bind.bindFlipped(bindST)($foreign["new"])(f(a)))(function (r) {
  14899. return Control_Bind.discard(Control_Bind.discardUnit)(bindST)($foreign["while"](Data_Functor.map(functorST)(isLooping)($foreign.read(r)))(Control_Bind.bind(bindST)($foreign.read(r))(function (v) {
  14900. if (v instanceof Control_Monad_Rec_Class.Loop) {
  14901. return Control_Bind.bind(bindST)(f(v.value0))(function (e) {
  14902. return Data_Functor["void"](functorST)($foreign.write(e)(r));
  14903. });
  14904. }
  14905. ;
  14906. if (v instanceof Control_Monad_Rec_Class.Done) {
  14907. return Control_Applicative.pure(applicativeST)(Data_Unit.unit);
  14908. }
  14909. ;
  14910. throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 46, column 18 - line 50, column 28): " + [v.constructor.name]);
  14911. })))(function () {
  14912. return Data_Functor.map(functorST)(fromDone)($foreign.read(r));
  14913. });
  14914. });
  14915. };
  14916. });
  14917. module.exports = {
  14918. modify: modify,
  14919. functorST: functorST,
  14920. applyST: applyST,
  14921. applicativeST: applicativeST,
  14922. bindST: bindST,
  14923. monadST: monadST,
  14924. monadRecST: monadRecST,
  14925. map_: $foreign.map_,
  14926. pure_: $foreign.pure_,
  14927. bind_: $foreign.bind_,
  14928. run: $foreign.run,
  14929. "while": $foreign["while"],
  14930. "for": $foreign["for"],
  14931. foreach: $foreign.foreach,
  14932. "new": $foreign["new"],
  14933. read: $foreign.read,
  14934. "modify'": $foreign["modify'"],
  14935. write: $foreign.write
  14936. };
  14937. },{"./foreign.js":"../output/Control.Monad.ST.Internal/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Array.ST/foreign.js":[function(require,module,exports) {
  14938. "use strict";
  14939. exports.empty = function () {
  14940. return [];
  14941. };
  14942. exports.peekImpl = function (just) {
  14943. return function (nothing) {
  14944. return function (i) {
  14945. return function (xs) {
  14946. return function () {
  14947. return i >= 0 && i < xs.length ? just(xs[i]) : nothing;
  14948. };
  14949. };
  14950. };
  14951. };
  14952. };
  14953. exports.poke = function (i) {
  14954. return function (a) {
  14955. return function (xs) {
  14956. return function () {
  14957. var ret = i >= 0 && i < xs.length;
  14958. if (ret) xs[i] = a;
  14959. return ret;
  14960. };
  14961. };
  14962. };
  14963. };
  14964. exports.popImpl = function (just) {
  14965. return function (nothing) {
  14966. return function (xs) {
  14967. return function () {
  14968. return xs.length > 0 ? just(xs.pop()) : nothing;
  14969. };
  14970. };
  14971. };
  14972. };
  14973. exports.pushAll = function (as) {
  14974. return function (xs) {
  14975. return function () {
  14976. return xs.push.apply(xs, as);
  14977. };
  14978. };
  14979. };
  14980. exports.shiftImpl = function (just) {
  14981. return function (nothing) {
  14982. return function (xs) {
  14983. return function () {
  14984. return xs.length > 0 ? just(xs.shift()) : nothing;
  14985. };
  14986. };
  14987. };
  14988. };
  14989. exports.unshiftAll = function (as) {
  14990. return function (xs) {
  14991. return function () {
  14992. return xs.unshift.apply(xs, as);
  14993. };
  14994. };
  14995. };
  14996. exports.splice = function (i) {
  14997. return function (howMany) {
  14998. return function (bs) {
  14999. return function (xs) {
  15000. return function () {
  15001. return xs.splice.apply(xs, [i, howMany].concat(bs));
  15002. };
  15003. };
  15004. };
  15005. };
  15006. };
  15007. exports.unsafeFreeze = function (xs) {
  15008. return function () {
  15009. return xs;
  15010. };
  15011. };
  15012. exports.unsafeThaw = function (xs) {
  15013. return function () {
  15014. return xs;
  15015. };
  15016. };
  15017. function copyImpl(xs) {
  15018. return function () {
  15019. return xs.slice();
  15020. };
  15021. }
  15022. exports.freeze = copyImpl;
  15023. exports.thaw = copyImpl;
  15024. exports.sortByImpl = function (comp) {
  15025. return function (xs) {
  15026. return function () {
  15027. return xs.sort(function (x, y) {
  15028. return comp(x)(y);
  15029. });
  15030. };
  15031. };
  15032. };
  15033. exports.toAssocArray = function (xs) {
  15034. return function () {
  15035. var n = xs.length;
  15036. var as = new Array(n);
  15037. for (var i = 0; i < n; i++) {
  15038. as[i] = {
  15039. value: xs[i],
  15040. index: i
  15041. };
  15042. }
  15043. return as;
  15044. };
  15045. };
  15046. },{}],"../output/Data.Array.ST/index.js":[function(require,module,exports) {
  15047. // Generated by purs version 0.13.6
  15048. "use strict";
  15049. var $foreign = require("./foreign.js");
  15050. var Control_Bind = require("../Control.Bind/index.js");
  15051. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  15052. var Data_Maybe = require("../Data.Maybe/index.js");
  15053. var Data_Ord = require("../Data.Ord/index.js");
  15054. var Data_Ordering = require("../Data.Ordering/index.js");
  15055. var withArray = function withArray(f) {
  15056. return function (xs) {
  15057. return function __do() {
  15058. var result = $foreign.thaw(xs)();
  15059. f(result)();
  15060. return $foreign.unsafeFreeze(result)();
  15061. };
  15062. };
  15063. };
  15064. var unshift = function unshift(a) {
  15065. return $foreign.unshiftAll([a]);
  15066. };
  15067. var sortBy = function sortBy(comp) {
  15068. var comp$prime = function comp$prime(x) {
  15069. return function (y) {
  15070. var v = comp(x)(y);
  15071. if (v instanceof Data_Ordering.GT) {
  15072. return 1;
  15073. }
  15074. ;
  15075. if (v instanceof Data_Ordering.EQ) {
  15076. return 0;
  15077. }
  15078. ;
  15079. if (v instanceof Data_Ordering.LT) {
  15080. return -1 | 0;
  15081. }
  15082. ;
  15083. throw new Error("Failed pattern match at Data.Array.ST (line 105, column 15 - line 108, column 13): " + [v.constructor.name]);
  15084. };
  15085. };
  15086. return $foreign.sortByImpl(comp$prime);
  15087. };
  15088. var sortWith = function sortWith(dictOrd) {
  15089. return function (f) {
  15090. return sortBy(Data_Ord.comparing(dictOrd)(f));
  15091. };
  15092. };
  15093. var sort = function sort(dictOrd) {
  15094. return sortBy(Data_Ord.compare(dictOrd));
  15095. };
  15096. var shift = $foreign.shiftImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15097. var run = function run(st) {
  15098. return Control_Bind.bind(Control_Monad_ST_Internal.bindST)(st)($foreign.unsafeFreeze)();
  15099. };
  15100. var push = function push(a) {
  15101. return $foreign.pushAll([a]);
  15102. };
  15103. var pop = $foreign.popImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15104. var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15105. var modify = function modify(i) {
  15106. return function (f) {
  15107. return function (xs) {
  15108. return function __do() {
  15109. var entry = peek(i)(xs)();
  15110. if (entry instanceof Data_Maybe.Just) {
  15111. return $foreign.poke(i)(f(entry.value0))(xs)();
  15112. }
  15113. ;
  15114. if (entry instanceof Data_Maybe.Nothing) {
  15115. return false;
  15116. }
  15117. ;
  15118. throw new Error("Failed pattern match at Data.Array.ST (line 188, column 3 - line 190, column 26): " + [entry.constructor.name]);
  15119. };
  15120. };
  15121. };
  15122. };
  15123. module.exports = {
  15124. run: run,
  15125. withArray: withArray,
  15126. peek: peek,
  15127. modify: modify,
  15128. pop: pop,
  15129. push: push,
  15130. shift: shift,
  15131. unshift: unshift,
  15132. sort: sort,
  15133. sortBy: sortBy,
  15134. sortWith: sortWith,
  15135. empty: $foreign.empty,
  15136. poke: $foreign.poke,
  15137. pushAll: $foreign.pushAll,
  15138. unshiftAll: $foreign.unshiftAll,
  15139. splice: $foreign.splice,
  15140. freeze: $foreign.freeze,
  15141. thaw: $foreign.thaw,
  15142. unsafeFreeze: $foreign.unsafeFreeze,
  15143. unsafeThaw: $foreign.unsafeThaw,
  15144. toAssocArray: $foreign.toAssocArray
  15145. };
  15146. },{"./foreign.js":"../output/Data.Array.ST/foreign.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js"}],"../output/Data.Array.ST.Iterator/index.js":[function(require,module,exports) {
  15147. // Generated by purs version 0.13.6
  15148. "use strict";
  15149. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  15150. var Data_Array_ST = require("../Data.Array.ST/index.js");
  15151. var Data_Function = require("../Data.Function/index.js");
  15152. var Data_Functor = require("../Data.Functor/index.js");
  15153. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  15154. var Data_Maybe = require("../Data.Maybe/index.js");
  15155. var Iterator = function () {
  15156. function Iterator(value0, value1) {
  15157. this.value0 = value0;
  15158. this.value1 = value1;
  15159. }
  15160. ;
  15161. Iterator.create = function (value0) {
  15162. return function (value1) {
  15163. return new Iterator(value0, value1);
  15164. };
  15165. };
  15166. return Iterator;
  15167. }();
  15168. var peek = function peek(v) {
  15169. return function __do() {
  15170. var i = Control_Monad_ST_Internal.read(v.value1)();
  15171. return v.value0(i);
  15172. };
  15173. };
  15174. var next = function next(v) {
  15175. return function __do() {
  15176. var i = Control_Monad_ST_Internal.read(v.value1)();
  15177. Control_Monad_ST_Internal.modify(function (v1) {
  15178. return v1 + 1 | 0;
  15179. })(v.value1)();
  15180. return v.value0(i);
  15181. };
  15182. };
  15183. var pushWhile = function pushWhile(p) {
  15184. return function (iter) {
  15185. return function (array) {
  15186. return function __do() {
  15187. var $$break = Control_Monad_ST_Internal["new"](false)();
  15188. while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read($$break))()) {
  15189. (function __do() {
  15190. var mx = peek(iter)();
  15191. if (mx instanceof Data_Maybe.Just && p(mx.value0)) {
  15192. Data_Array_ST.push(mx.value0)(array)();
  15193. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(next(iter))();
  15194. }
  15195. ;
  15196. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)($$break))();
  15197. })();
  15198. }
  15199. ;
  15200. return {};
  15201. };
  15202. };
  15203. };
  15204. };
  15205. var pushAll = pushWhile(Data_Function["const"](true));
  15206. var iterator = function iterator(f) {
  15207. return Data_Functor.map(Control_Monad_ST_Internal.functorST)(Iterator.create(f))(Control_Monad_ST_Internal["new"](0));
  15208. };
  15209. var iterate = function iterate(iter) {
  15210. return function (f) {
  15211. return function __do() {
  15212. var $$break = Control_Monad_ST_Internal["new"](false)();
  15213. while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read($$break))()) {
  15214. (function __do() {
  15215. var mx = next(iter)();
  15216. if (mx instanceof Data_Maybe.Just) {
  15217. return f(mx.value0)();
  15218. }
  15219. ;
  15220. if (mx instanceof Data_Maybe.Nothing) {
  15221. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)($$break))();
  15222. }
  15223. ;
  15224. throw new Error("Failed pattern match at Data.Array.ST.Iterator (line 42, column 5 - line 44, column 47): " + [mx.constructor.name]);
  15225. })();
  15226. }
  15227. ;
  15228. return {};
  15229. };
  15230. };
  15231. };
  15232. var exhausted = function () {
  15233. var $13 = Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_Maybe.isNothing);
  15234. return function ($14) {
  15235. return $13(peek($14));
  15236. };
  15237. }();
  15238. module.exports = {
  15239. iterator: iterator,
  15240. iterate: iterate,
  15241. next: next,
  15242. peek: peek,
  15243. exhausted: exhausted,
  15244. pushWhile: pushWhile,
  15245. pushAll: pushAll
  15246. };
  15247. },{"../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array.ST/index.js":"../output/Data.Array.ST/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Data.Array/index.js":[function(require,module,exports) {
  15248. // Generated by purs version 0.13.6
  15249. "use strict";
  15250. var $foreign = require("./foreign.js");
  15251. var Control_Alt = require("../Control.Alt/index.js");
  15252. var Control_Applicative = require("../Control.Applicative/index.js");
  15253. var Control_Apply = require("../Control.Apply/index.js");
  15254. var Control_Bind = require("../Control.Bind/index.js");
  15255. var Control_Category = require("../Control.Category/index.js");
  15256. var Control_Lazy = require("../Control.Lazy/index.js");
  15257. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  15258. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  15259. var Data_Array_ST = require("../Data.Array.ST/index.js");
  15260. var Data_Array_ST_Iterator = require("../Data.Array.ST.Iterator/index.js");
  15261. var Data_Boolean = require("../Data.Boolean/index.js");
  15262. var Data_Eq = require("../Data.Eq/index.js");
  15263. var Data_Foldable = require("../Data.Foldable/index.js");
  15264. var Data_Function = require("../Data.Function/index.js");
  15265. var Data_Functor = require("../Data.Functor/index.js");
  15266. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  15267. var Data_Maybe = require("../Data.Maybe/index.js");
  15268. var Data_Ord = require("../Data.Ord/index.js");
  15269. var Data_Ordering = require("../Data.Ordering/index.js");
  15270. var Data_Semigroup = require("../Data.Semigroup/index.js");
  15271. var Data_Traversable = require("../Data.Traversable/index.js");
  15272. var Data_Tuple = require("../Data.Tuple/index.js");
  15273. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  15274. var zipWithA = function zipWithA(dictApplicative) {
  15275. return function (f) {
  15276. return function (xs) {
  15277. return function (ys) {
  15278. return Data_Traversable.sequence(Data_Traversable.traversableArray)(dictApplicative)($foreign.zipWith(f)(xs)(ys));
  15279. };
  15280. };
  15281. };
  15282. };
  15283. var zip = $foreign.zipWith(Data_Tuple.Tuple.create);
  15284. var updateAtIndices = function updateAtIndices(dictFoldable) {
  15285. return function (us) {
  15286. return function (xs) {
  15287. return Data_Array_ST.withArray(function (res) {
  15288. return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (v) {
  15289. return Data_Array_ST.poke(v.value0)(v.value1)(res);
  15290. })(us);
  15291. })(xs)();
  15292. };
  15293. };
  15294. };
  15295. var updateAt = $foreign["_updateAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15296. var unsafeIndex = function unsafeIndex(dictPartial) {
  15297. return $foreign.unsafeIndexImpl;
  15298. };
  15299. var uncons = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (x) {
  15300. return function (xs) {
  15301. return new Data_Maybe.Just({
  15302. head: x,
  15303. tail: xs
  15304. });
  15305. };
  15306. });
  15307. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  15308. return function (xs) {
  15309. var len = $foreign.length(xs);
  15310. var f = function f(i) {
  15311. if (i < len) {
  15312. return new Data_Maybe.Just(new Data_Tuple.Tuple(unsafeIndex()(xs)(i), i + 1 | 0));
  15313. }
  15314. ;
  15315. if (Data_Boolean.otherwise) {
  15316. return Data_Maybe.Nothing.value;
  15317. }
  15318. ;
  15319. throw new Error("Failed pattern match at Data.Array (line 143, column 3 - line 145, column 26): " + [i.constructor.name]);
  15320. };
  15321. return Data_Unfoldable.unfoldr(dictUnfoldable)(f)(0);
  15322. };
  15323. };
  15324. var takeEnd = function takeEnd(n) {
  15325. return function (xs) {
  15326. return $foreign.drop($foreign.length(xs) - n | 0)(xs);
  15327. };
  15328. };
  15329. var tail = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (v) {
  15330. return function (xs) {
  15331. return new Data_Maybe.Just(xs);
  15332. };
  15333. });
  15334. var sortBy = function sortBy(comp) {
  15335. return function (xs) {
  15336. var comp$prime = function comp$prime(x) {
  15337. return function (y) {
  15338. var v = comp(x)(y);
  15339. if (v instanceof Data_Ordering.GT) {
  15340. return 1;
  15341. }
  15342. ;
  15343. if (v instanceof Data_Ordering.EQ) {
  15344. return 0;
  15345. }
  15346. ;
  15347. if (v instanceof Data_Ordering.LT) {
  15348. return -1 | 0;
  15349. }
  15350. ;
  15351. throw new Error("Failed pattern match at Data.Array (line 702, column 15 - line 705, column 13): " + [v.constructor.name]);
  15352. };
  15353. };
  15354. return $foreign.sortImpl(comp$prime)(xs);
  15355. };
  15356. };
  15357. var sortWith = function sortWith(dictOrd) {
  15358. return function (f) {
  15359. return sortBy(Data_Ord.comparing(dictOrd)(f));
  15360. };
  15361. };
  15362. var sort = function sort(dictOrd) {
  15363. return function (xs) {
  15364. return sortBy(Data_Ord.compare(dictOrd))(xs);
  15365. };
  15366. };
  15367. var singleton = function singleton(a) {
  15368. return [a];
  15369. };
  15370. var $$null = function $$null(xs) {
  15371. return $foreign.length(xs) === 0;
  15372. };
  15373. var nubByEq = function nubByEq(eq) {
  15374. return function (xs) {
  15375. return function __do() {
  15376. var arr = Data_Array_ST.empty();
  15377. Control_Monad_ST_Internal.foreach(xs)(function (x) {
  15378. return function __do() {
  15379. var e = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () {
  15380. var $84 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean);
  15381. var $85 = Data_Foldable.any(Data_Foldable.foldableArray)(Data_HeytingAlgebra.heytingAlgebraBoolean)(function (v) {
  15382. return eq(v)(x);
  15383. });
  15384. return function ($86) {
  15385. return $84($85($86));
  15386. };
  15387. }())(Data_Array_ST.unsafeFreeze(arr))();
  15388. return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(e)(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(x)(arr)))();
  15389. };
  15390. })();
  15391. return Data_Array_ST.unsafeFreeze(arr)();
  15392. }();
  15393. };
  15394. };
  15395. var nubEq = function nubEq(dictEq) {
  15396. return nubByEq(Data_Eq.eq(dictEq));
  15397. };
  15398. var modifyAtIndices = function modifyAtIndices(dictFoldable) {
  15399. return function (is) {
  15400. return function (f) {
  15401. return function (xs) {
  15402. return Data_Array_ST.withArray(function (res) {
  15403. return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (i) {
  15404. return Data_Array_ST.modify(i)(f)(res);
  15405. })(is);
  15406. })(xs)();
  15407. };
  15408. };
  15409. };
  15410. };
  15411. var mapWithIndex = function mapWithIndex(f) {
  15412. return function (xs) {
  15413. return $foreign.zipWith(f)($foreign.range(0)($foreign.length(xs) - 1 | 0))(xs);
  15414. };
  15415. };
  15416. var some = function some(dictAlternative) {
  15417. return function (dictLazy) {
  15418. return function (v) {
  15419. return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())($foreign.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
  15420. return many(dictAlternative)(dictLazy)(v);
  15421. }));
  15422. };
  15423. };
  15424. };
  15425. var many = function many(dictAlternative) {
  15426. return function (dictLazy) {
  15427. return function (v) {
  15428. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())([]));
  15429. };
  15430. };
  15431. };
  15432. var insertAt = $foreign["_insertAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15433. var init = function init(xs) {
  15434. if ($$null(xs)) {
  15435. return Data_Maybe.Nothing.value;
  15436. }
  15437. ;
  15438. if (Data_Boolean.otherwise) {
  15439. return new Data_Maybe.Just($foreign.slice(0)($foreign.length(xs) - 1 | 0)(xs));
  15440. }
  15441. ;
  15442. throw new Error("Failed pattern match at Data.Array (line 323, column 1 - line 323, column 45): " + [xs.constructor.name]);
  15443. };
  15444. var index = $foreign.indexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15445. var last = function last(xs) {
  15446. return index(xs)($foreign.length(xs) - 1 | 0);
  15447. };
  15448. var unsnoc = function unsnoc(xs) {
  15449. return Control_Apply.apply(Data_Maybe.applyMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  15450. return function (v1) {
  15451. return {
  15452. init: v,
  15453. last: v1
  15454. };
  15455. };
  15456. })(init(xs)))(last(xs));
  15457. };
  15458. var modifyAt = function modifyAt(i) {
  15459. return function (f) {
  15460. return function (xs) {
  15461. var go = function go(x) {
  15462. return updateAt(i)(f(x))(xs);
  15463. };
  15464. return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i));
  15465. };
  15466. };
  15467. };
  15468. var span = function span(p) {
  15469. return function (arr) {
  15470. var go = function go($copy_i) {
  15471. var $tco_done = false;
  15472. var $tco_result;
  15473. function $tco_loop(i) {
  15474. var v = index(arr)(i);
  15475. if (v instanceof Data_Maybe.Just) {
  15476. var $60 = p(v.value0);
  15477. if ($60) {
  15478. $copy_i = i + 1 | 0;
  15479. return;
  15480. }
  15481. ;
  15482. $tco_done = true;
  15483. return new Data_Maybe.Just(i);
  15484. }
  15485. ;
  15486. if (v instanceof Data_Maybe.Nothing) {
  15487. $tco_done = true;
  15488. return Data_Maybe.Nothing.value;
  15489. }
  15490. ;
  15491. throw new Error("Failed pattern match at Data.Array (line 834, column 5 - line 836, column 25): " + [v.constructor.name]);
  15492. }
  15493. ;
  15494. while (!$tco_done) {
  15495. $tco_result = $tco_loop($copy_i);
  15496. }
  15497. ;
  15498. return $tco_result;
  15499. };
  15500. var breakIndex = go(0);
  15501. if (breakIndex instanceof Data_Maybe.Just && breakIndex.value0 === 0) {
  15502. return {
  15503. init: [],
  15504. rest: arr
  15505. };
  15506. }
  15507. ;
  15508. if (breakIndex instanceof Data_Maybe.Just) {
  15509. return {
  15510. init: $foreign.slice(0)(breakIndex.value0)(arr),
  15511. rest: $foreign.slice(breakIndex.value0)($foreign.length(arr))(arr)
  15512. };
  15513. }
  15514. ;
  15515. if (breakIndex instanceof Data_Maybe.Nothing) {
  15516. return {
  15517. init: arr,
  15518. rest: []
  15519. };
  15520. }
  15521. ;
  15522. throw new Error("Failed pattern match at Data.Array (line 821, column 3 - line 827, column 30): " + [breakIndex.constructor.name]);
  15523. };
  15524. };
  15525. var takeWhile = function takeWhile(p) {
  15526. return function (xs) {
  15527. return span(p)(xs).init;
  15528. };
  15529. };
  15530. var unzip = function unzip(xs) {
  15531. return function __do() {
  15532. var fsts = Data_Array_ST.empty();
  15533. var snds = Data_Array_ST.empty();
  15534. var iter = Data_Array_ST_Iterator.iterator(function (v) {
  15535. return index(xs)(v);
  15536. })();
  15537. Data_Array_ST_Iterator.iterate(iter)(function (v) {
  15538. return function __do() {
  15539. Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v.value0)(fsts))();
  15540. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v.value1)(snds))();
  15541. };
  15542. })();
  15543. var fsts$prime = Data_Array_ST.unsafeFreeze(fsts)();
  15544. var snds$prime = Data_Array_ST.unsafeFreeze(snds)();
  15545. return new Data_Tuple.Tuple(fsts$prime, snds$prime);
  15546. }();
  15547. };
  15548. var head = function head(xs) {
  15549. return index(xs)(0);
  15550. };
  15551. var nubBy = function nubBy(comp) {
  15552. return function (xs) {
  15553. var indexedAndSorted = sortBy(function (x) {
  15554. return function (y) {
  15555. return comp(Data_Tuple.snd(x))(Data_Tuple.snd(y));
  15556. };
  15557. })(mapWithIndex(Data_Tuple.Tuple.create)(xs));
  15558. var v = head(indexedAndSorted);
  15559. if (v instanceof Data_Maybe.Nothing) {
  15560. return [];
  15561. }
  15562. ;
  15563. if (v instanceof Data_Maybe.Just) {
  15564. return Data_Functor.map(Data_Functor.functorArray)(Data_Tuple.snd)(sortWith(Data_Ord.ordInt)(Data_Tuple.fst)(function __do() {
  15565. var result = Data_Array_ST.unsafeThaw(singleton(v.value0))();
  15566. Control_Monad_ST_Internal.foreach(indexedAndSorted)(function (v1) {
  15567. return function __do() {
  15568. var lst = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () {
  15569. var $87 = function (dictPartial) {
  15570. var $89 = Data_Maybe.fromJust();
  15571. return function ($90) {
  15572. return $89(last($90));
  15573. };
  15574. }();
  15575. return function ($88) {
  15576. return Data_Tuple.snd($87($88));
  15577. };
  15578. }())(Data_Array_ST.unsafeFreeze(result))();
  15579. return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(Data_Eq.notEq(Data_Ordering.eqOrdering)(comp(lst)(v1.value1))(Data_Ordering.EQ.value))(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v1)(result)))();
  15580. };
  15581. })();
  15582. return Data_Array_ST.unsafeFreeze(result)();
  15583. }()));
  15584. }
  15585. ;
  15586. throw new Error("Failed pattern match at Data.Array (line 903, column 17 - line 911, column 29): " + [v.constructor.name]);
  15587. };
  15588. };
  15589. var nub = function nub(dictOrd) {
  15590. return nubBy(Data_Ord.compare(dictOrd));
  15591. };
  15592. var groupBy = function groupBy(op) {
  15593. return function (xs) {
  15594. return function __do() {
  15595. var result = Data_Array_ST.empty();
  15596. var iter = Data_Array_ST_Iterator.iterator(function (v) {
  15597. return index(xs)(v);
  15598. })();
  15599. Data_Array_ST_Iterator.iterate(iter)(function (x) {
  15600. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(function __do() {
  15601. var sub = Data_Array_ST.empty();
  15602. Data_Array_ST.push(x)(sub)();
  15603. Data_Array_ST_Iterator.pushWhile(op(x))(iter)(sub)();
  15604. var grp = Data_Array_ST.unsafeFreeze(sub)();
  15605. return Data_Array_ST.push(grp)(result)();
  15606. });
  15607. })();
  15608. return Data_Array_ST.unsafeFreeze(result)();
  15609. }();
  15610. };
  15611. };
  15612. var group = function group(dictEq) {
  15613. return function (xs) {
  15614. return groupBy(Data_Eq.eq(dictEq))(xs);
  15615. };
  15616. };
  15617. var group$prime = function group$prime(dictOrd) {
  15618. var $91 = group(dictOrd.Eq0());
  15619. var $92 = sort(dictOrd);
  15620. return function ($93) {
  15621. return $91($92($93));
  15622. };
  15623. };
  15624. var fromFoldable = function fromFoldable(dictFoldable) {
  15625. return $foreign.fromFoldableImpl(Data_Foldable.foldr(dictFoldable));
  15626. };
  15627. var foldRecM = function foldRecM(dictMonadRec) {
  15628. return function (f) {
  15629. return function (a) {
  15630. return function (array) {
  15631. var go = function go(res) {
  15632. return function (i) {
  15633. if (i >= $foreign.length(array)) {
  15634. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(res));
  15635. }
  15636. ;
  15637. if (Data_Boolean.otherwise) {
  15638. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(f(res)(unsafeIndex()(array)(i)))(function (res$prime) {
  15639. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop({
  15640. a: res$prime,
  15641. b: i + 1 | 0
  15642. }));
  15643. });
  15644. }
  15645. ;
  15646. throw new Error("Failed pattern match at Data.Array (line 1101, column 3 - line 1105, column 42): " + [res.constructor.name, i.constructor.name]);
  15647. };
  15648. };
  15649. return Control_Monad_Rec_Class.tailRecM2(dictMonadRec)(go)(a)(0);
  15650. };
  15651. };
  15652. };
  15653. };
  15654. var foldM = function foldM(dictMonad) {
  15655. return function (f) {
  15656. return function (a) {
  15657. return $foreign["uncons'"](function (v) {
  15658. return Control_Applicative.pure(dictMonad.Applicative0())(a);
  15659. })(function (b) {
  15660. return function (bs) {
  15661. return Control_Bind.bind(dictMonad.Bind1())(f(a)(b))(function (a$prime) {
  15662. return foldM(dictMonad)(f)(a$prime)(bs);
  15663. });
  15664. };
  15665. });
  15666. };
  15667. };
  15668. };
  15669. var findLastIndex = $foreign.findLastIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15670. var insertBy = function insertBy(cmp) {
  15671. return function (x) {
  15672. return function (ys) {
  15673. var i = Data_Maybe.maybe(0)(function (v) {
  15674. return v + 1 | 0;
  15675. })(findLastIndex(function (y) {
  15676. return Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(x)(y))(Data_Ordering.GT.value);
  15677. })(ys));
  15678. return Data_Maybe.fromJust()(insertAt(i)(x)(ys));
  15679. };
  15680. };
  15681. };
  15682. var insert = function insert(dictOrd) {
  15683. return insertBy(Data_Ord.compare(dictOrd));
  15684. };
  15685. var findIndex = $foreign.findIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15686. var intersectBy = function intersectBy(eq) {
  15687. return function (xs) {
  15688. return function (ys) {
  15689. return $foreign.filter(function (x) {
  15690. return Data_Maybe.isJust(findIndex(eq(x))(ys));
  15691. })(xs);
  15692. };
  15693. };
  15694. };
  15695. var intersect = function intersect(dictEq) {
  15696. return intersectBy(Data_Eq.eq(dictEq));
  15697. };
  15698. var elemLastIndex = function elemLastIndex(dictEq) {
  15699. return function (x) {
  15700. return findLastIndex(function (v) {
  15701. return Data_Eq.eq(dictEq)(v)(x);
  15702. });
  15703. };
  15704. };
  15705. var elemIndex = function elemIndex(dictEq) {
  15706. return function (x) {
  15707. return findIndex(function (v) {
  15708. return Data_Eq.eq(dictEq)(v)(x);
  15709. });
  15710. };
  15711. };
  15712. var dropWhile = function dropWhile(p) {
  15713. return function (xs) {
  15714. return span(p)(xs).rest;
  15715. };
  15716. };
  15717. var dropEnd = function dropEnd(n) {
  15718. return function (xs) {
  15719. return $foreign.take($foreign.length(xs) - n | 0)(xs);
  15720. };
  15721. };
  15722. var deleteAt = $foreign["_deleteAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15723. var deleteBy = function deleteBy(v) {
  15724. return function (v1) {
  15725. return function (v2) {
  15726. if (v2.length === 0) {
  15727. return [];
  15728. }
  15729. ;
  15730. return Data_Maybe.maybe(v2)(function (i) {
  15731. return Data_Maybe.fromJust()(deleteAt(i)(v2));
  15732. })(findIndex(v(v1))(v2));
  15733. };
  15734. };
  15735. };
  15736. var unionBy = function unionBy(eq) {
  15737. return function (xs) {
  15738. return function (ys) {
  15739. return Data_Semigroup.append(Data_Semigroup.semigroupArray)(xs)(Data_Foldable.foldl(Data_Foldable.foldableArray)(Data_Function.flip(deleteBy(eq)))(nubByEq(eq)(ys))(xs));
  15740. };
  15741. };
  15742. };
  15743. var union = function union(dictEq) {
  15744. return unionBy(Data_Eq.eq(dictEq));
  15745. };
  15746. var $$delete = function $$delete(dictEq) {
  15747. return deleteBy(Data_Eq.eq(dictEq));
  15748. };
  15749. var difference = function difference(dictEq) {
  15750. return Data_Foldable.foldr(Data_Foldable.foldableArray)($$delete(dictEq));
  15751. };
  15752. var concatMap = Data_Function.flip(Control_Bind.bind(Control_Bind.bindArray));
  15753. var mapMaybe = function mapMaybe(f) {
  15754. return concatMap(function () {
  15755. var $94 = Data_Maybe.maybe([])(singleton);
  15756. return function ($95) {
  15757. return $94(f($95));
  15758. };
  15759. }());
  15760. };
  15761. var filterA = function filterA(dictApplicative) {
  15762. return function (p) {
  15763. var $96 = Data_Functor.map(dictApplicative.Apply0().Functor0())(mapMaybe(function (v) {
  15764. if (v.value1) {
  15765. return new Data_Maybe.Just(v.value0);
  15766. }
  15767. ;
  15768. return Data_Maybe.Nothing.value;
  15769. }));
  15770. var $97 = Data_Traversable.traverse(Data_Traversable.traversableArray)(dictApplicative)(function (x) {
  15771. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Tuple.Tuple.create(x))(p(x));
  15772. });
  15773. return function ($98) {
  15774. return $96($97($98));
  15775. };
  15776. };
  15777. };
  15778. var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
  15779. var alterAt = function alterAt(i) {
  15780. return function (f) {
  15781. return function (xs) {
  15782. var go = function go(x) {
  15783. var v = f(x);
  15784. if (v instanceof Data_Maybe.Nothing) {
  15785. return deleteAt(i)(xs);
  15786. }
  15787. ;
  15788. if (v instanceof Data_Maybe.Just) {
  15789. return updateAt(i)(v.value0)(xs);
  15790. }
  15791. ;
  15792. throw new Error("Failed pattern match at Data.Array (line 544, column 10 - line 546, column 32): " + [v.constructor.name]);
  15793. };
  15794. return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i));
  15795. };
  15796. };
  15797. };
  15798. module.exports = {
  15799. fromFoldable: fromFoldable,
  15800. toUnfoldable: toUnfoldable,
  15801. singleton: singleton,
  15802. some: some,
  15803. many: many,
  15804. "null": $$null,
  15805. insert: insert,
  15806. insertBy: insertBy,
  15807. head: head,
  15808. last: last,
  15809. tail: tail,
  15810. init: init,
  15811. uncons: uncons,
  15812. unsnoc: unsnoc,
  15813. index: index,
  15814. elemIndex: elemIndex,
  15815. elemLastIndex: elemLastIndex,
  15816. findIndex: findIndex,
  15817. findLastIndex: findLastIndex,
  15818. insertAt: insertAt,
  15819. deleteAt: deleteAt,
  15820. updateAt: updateAt,
  15821. updateAtIndices: updateAtIndices,
  15822. modifyAt: modifyAt,
  15823. modifyAtIndices: modifyAtIndices,
  15824. alterAt: alterAt,
  15825. concatMap: concatMap,
  15826. filterA: filterA,
  15827. mapMaybe: mapMaybe,
  15828. catMaybes: catMaybes,
  15829. mapWithIndex: mapWithIndex,
  15830. sort: sort,
  15831. sortBy: sortBy,
  15832. sortWith: sortWith,
  15833. takeEnd: takeEnd,
  15834. takeWhile: takeWhile,
  15835. dropEnd: dropEnd,
  15836. dropWhile: dropWhile,
  15837. span: span,
  15838. group: group,
  15839. "group'": group$prime,
  15840. groupBy: groupBy,
  15841. nub: nub,
  15842. nubEq: nubEq,
  15843. nubBy: nubBy,
  15844. nubByEq: nubByEq,
  15845. union: union,
  15846. unionBy: unionBy,
  15847. "delete": $$delete,
  15848. deleteBy: deleteBy,
  15849. difference: difference,
  15850. intersect: intersect,
  15851. intersectBy: intersectBy,
  15852. zipWithA: zipWithA,
  15853. zip: zip,
  15854. unzip: unzip,
  15855. foldM: foldM,
  15856. foldRecM: foldRecM,
  15857. unsafeIndex: unsafeIndex,
  15858. range: $foreign.range,
  15859. replicate: $foreign.replicate,
  15860. length: $foreign.length,
  15861. cons: $foreign.cons,
  15862. snoc: $foreign.snoc,
  15863. reverse: $foreign.reverse,
  15864. concat: $foreign.concat,
  15865. filter: $foreign.filter,
  15866. partition: $foreign.partition,
  15867. slice: $foreign.slice,
  15868. take: $foreign.take,
  15869. drop: $foreign.drop,
  15870. zipWith: $foreign.zipWith
  15871. };
  15872. },{"./foreign.js":"../output/Data.Array/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array.ST/index.js":"../output/Data.Array.ST/index.js","../Data.Array.ST.Iterator/index.js":"../output/Data.Array.ST.Iterator/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js"}],"../output/Foreign.Generic.Internal/index.js":[function(require,module,exports) {
  15873. // Generated by purs version 0.13.6
  15874. "use strict";
  15875. var Control_Applicative = require("../Control.Applicative/index.js");
  15876. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  15877. var Data_Boolean = require("../Data.Boolean/index.js");
  15878. var Data_Identity = require("../Data.Identity/index.js");
  15879. var Foreign = require("../Foreign/index.js");
  15880. var isObject = function isObject(v) {
  15881. return Foreign.tagOf(v) === "Object";
  15882. };
  15883. var readObject = function readObject(value) {
  15884. if (isObject(value)) {
  15885. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Foreign.unsafeFromForeign(value));
  15886. }
  15887. ;
  15888. if (Data_Boolean.otherwise) {
  15889. return Foreign.fail(new Foreign.TypeMismatch("Object", Foreign.tagOf(value)));
  15890. }
  15891. ;
  15892. throw new Error("Failed pattern match at Foreign.Generic.Internal (line 13, column 1 - line 13, column 44): " + [value.constructor.name]);
  15893. };
  15894. module.exports = {
  15895. isObject: isObject,
  15896. readObject: readObject
  15897. };
  15898. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Foreign.Index/foreign.js":[function(require,module,exports) {
  15899. "use strict";
  15900. exports.unsafeReadPropImpl = function (f, s, key, value) {
  15901. return value == null ? f : s(value[key]);
  15902. };
  15903. exports.unsafeHasOwnProperty = function (prop, value) {
  15904. return Object.prototype.hasOwnProperty.call(value, prop);
  15905. };
  15906. exports.unsafeHasProperty = function (prop, value) {
  15907. return prop in value;
  15908. };
  15909. },{}],"../output/Foreign.Index/index.js":[function(require,module,exports) {
  15910. // Generated by purs version 0.13.6
  15911. "use strict";
  15912. var $foreign = require("./foreign.js");
  15913. var Control_Applicative = require("../Control.Applicative/index.js");
  15914. var Control_Bind = require("../Control.Bind/index.js");
  15915. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  15916. var Data_Function = require("../Data.Function/index.js");
  15917. var Data_Identity = require("../Data.Identity/index.js");
  15918. var Foreign = require("../Foreign/index.js");
  15919. var Indexable = function Indexable(ix) {
  15920. this.ix = ix;
  15921. };
  15922. var Index = function Index(errorAt, hasOwnProperty, hasProperty, index) {
  15923. this.errorAt = errorAt;
  15924. this.hasOwnProperty = hasOwnProperty;
  15925. this.hasProperty = hasProperty;
  15926. this.index = index;
  15927. };
  15928. var unsafeReadProp = function unsafeReadProp(k) {
  15929. return function (value) {
  15930. return $foreign.unsafeReadPropImpl(Foreign.fail(new Foreign.TypeMismatch("object", Foreign.typeOf(value))), Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)), k, value);
  15931. };
  15932. };
  15933. var readProp = unsafeReadProp;
  15934. var readIndex = unsafeReadProp;
  15935. var ix = function ix(dict) {
  15936. return dict.ix;
  15937. };
  15938. var index = function index(dict) {
  15939. return dict.index;
  15940. };
  15941. var indexableExceptT = new Indexable(function (dictIndex) {
  15942. return function (f) {
  15943. return function (i) {
  15944. return Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Function.flip(index(dictIndex))(i))(f);
  15945. };
  15946. };
  15947. });
  15948. var indexableForeign = new Indexable(function (dictIndex) {
  15949. return index(dictIndex);
  15950. });
  15951. var hasPropertyImpl = function hasPropertyImpl(v) {
  15952. return function (value) {
  15953. if (Foreign.isNull(value)) {
  15954. return false;
  15955. }
  15956. ;
  15957. if (Foreign.isUndefined(value)) {
  15958. return false;
  15959. }
  15960. ;
  15961. if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") {
  15962. return $foreign.unsafeHasProperty(v, value);
  15963. }
  15964. ;
  15965. return false;
  15966. };
  15967. };
  15968. var hasProperty = function hasProperty(dict) {
  15969. return dict.hasProperty;
  15970. };
  15971. var hasOwnPropertyImpl = function hasOwnPropertyImpl(v) {
  15972. return function (value) {
  15973. if (Foreign.isNull(value)) {
  15974. return false;
  15975. }
  15976. ;
  15977. if (Foreign.isUndefined(value)) {
  15978. return false;
  15979. }
  15980. ;
  15981. if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") {
  15982. return $foreign.unsafeHasOwnProperty(v, value);
  15983. }
  15984. ;
  15985. return false;
  15986. };
  15987. };
  15988. var indexInt = new Index(Foreign.ErrorAtIndex.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readIndex));
  15989. var indexString = new Index(Foreign.ErrorAtProperty.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readProp));
  15990. var hasOwnProperty = function hasOwnProperty(dict) {
  15991. return dict.hasOwnProperty;
  15992. };
  15993. var errorAt = function errorAt(dict) {
  15994. return dict.errorAt;
  15995. };
  15996. module.exports = {
  15997. Index: Index,
  15998. Indexable: Indexable,
  15999. readProp: readProp,
  16000. readIndex: readIndex,
  16001. ix: ix,
  16002. index: index,
  16003. hasProperty: hasProperty,
  16004. hasOwnProperty: hasOwnProperty,
  16005. errorAt: errorAt,
  16006. indexString: indexString,
  16007. indexInt: indexInt,
  16008. indexableForeign: indexableForeign,
  16009. indexableExceptT: indexableExceptT
  16010. };
  16011. },{"./foreign.js":"../output/Foreign.Index/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Foreign.NullOrUndefined/foreign.js":[function(require,module,exports) {
  16012. exports['null'] = null;
  16013. exports['undefined'] = undefined;
  16014. },{}],"../output/Foreign.NullOrUndefined/index.js":[function(require,module,exports) {
  16015. // Generated by purs version 0.13.6
  16016. "use strict";
  16017. var $foreign = require("./foreign.js");
  16018. var Control_Applicative = require("../Control.Applicative/index.js");
  16019. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  16020. var Data_Functor = require("../Data.Functor/index.js");
  16021. var Data_Identity = require("../Data.Identity/index.js");
  16022. var Data_Maybe = require("../Data.Maybe/index.js");
  16023. var Foreign = require("../Foreign/index.js");
  16024. var readNullOrUndefined = function readNullOrUndefined(v) {
  16025. return function (value) {
  16026. if (Foreign.isNull(value) || Foreign.isUndefined(value)) {
  16027. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  16028. }
  16029. ;
  16030. return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Maybe.Just.create)(v(value));
  16031. };
  16032. };
  16033. module.exports = {
  16034. readNullOrUndefined: readNullOrUndefined,
  16035. "undefined": $foreign["undefined"],
  16036. "null": $foreign["null"]
  16037. };
  16038. },{"./foreign.js":"../output/Foreign.NullOrUndefined/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Foreign.Object/foreign.js":[function(require,module,exports) {
  16039. "use strict";
  16040. exports._copyST = function (m) {
  16041. return function () {
  16042. var r = {};
  16043. for (var k in m) {
  16044. if (hasOwnProperty.call(m, k)) {
  16045. r[k] = m[k];
  16046. }
  16047. }
  16048. return r;
  16049. };
  16050. };
  16051. exports.empty = {};
  16052. exports.runST = function (f) {
  16053. return f();
  16054. };
  16055. exports._fmapObject = function (m0, f) {
  16056. var m = {};
  16057. for (var k in m0) {
  16058. if (hasOwnProperty.call(m0, k)) {
  16059. m[k] = f(m0[k]);
  16060. }
  16061. }
  16062. return m;
  16063. };
  16064. exports._mapWithKey = function (m0, f) {
  16065. var m = {};
  16066. for (var k in m0) {
  16067. if (hasOwnProperty.call(m0, k)) {
  16068. m[k] = f(k)(m0[k]);
  16069. }
  16070. }
  16071. return m;
  16072. };
  16073. exports._foldM = function (bind) {
  16074. return function (f) {
  16075. return function (mz) {
  16076. return function (m) {
  16077. var acc = mz;
  16078. function g(k) {
  16079. return function (z) {
  16080. return f(z)(k)(m[k]);
  16081. };
  16082. }
  16083. for (var k in m) {
  16084. if (hasOwnProperty.call(m, k)) {
  16085. acc = bind(acc)(g(k));
  16086. }
  16087. }
  16088. return acc;
  16089. };
  16090. };
  16091. };
  16092. };
  16093. exports._foldSCObject = function (m, z, f, fromMaybe) {
  16094. var acc = z;
  16095. for (var k in m) {
  16096. if (hasOwnProperty.call(m, k)) {
  16097. var maybeR = f(acc)(k)(m[k]);
  16098. var r = fromMaybe(null)(maybeR);
  16099. if (r === null) return acc;else acc = r;
  16100. }
  16101. }
  16102. return acc;
  16103. };
  16104. exports.all = function (f) {
  16105. return function (m) {
  16106. for (var k in m) {
  16107. if (hasOwnProperty.call(m, k) && !f(k)(m[k])) return false;
  16108. }
  16109. return true;
  16110. };
  16111. };
  16112. exports.size = function (m) {
  16113. var s = 0;
  16114. for (var k in m) {
  16115. if (hasOwnProperty.call(m, k)) {
  16116. ++s;
  16117. }
  16118. }
  16119. return s;
  16120. };
  16121. exports._lookup = function (no, yes, k, m) {
  16122. return k in m ? yes(m[k]) : no;
  16123. };
  16124. exports._lookupST = function (no, yes, k, m) {
  16125. return function () {
  16126. return k in m ? yes(m[k]) : no;
  16127. };
  16128. };
  16129. function toArrayWithKey(f) {
  16130. return function (m) {
  16131. var r = [];
  16132. for (var k in m) {
  16133. if (hasOwnProperty.call(m, k)) {
  16134. r.push(f(k)(m[k]));
  16135. }
  16136. }
  16137. return r;
  16138. };
  16139. }
  16140. exports.toArrayWithKey = toArrayWithKey;
  16141. exports.keys = Object.keys || toArrayWithKey(function (k) {
  16142. return function () {
  16143. return k;
  16144. };
  16145. });
  16146. },{}],"../output/Data.Function.Uncurried/foreign.js":[function(require,module,exports) {
  16147. "use strict"; // module Data.Function.Uncurried
  16148. exports.mkFn0 = function (fn) {
  16149. return function () {
  16150. return fn({});
  16151. };
  16152. };
  16153. exports.mkFn2 = function (fn) {
  16154. /* jshint maxparams: 2 */
  16155. return function (a, b) {
  16156. return fn(a)(b);
  16157. };
  16158. };
  16159. exports.mkFn3 = function (fn) {
  16160. /* jshint maxparams: 3 */
  16161. return function (a, b, c) {
  16162. return fn(a)(b)(c);
  16163. };
  16164. };
  16165. exports.mkFn4 = function (fn) {
  16166. /* jshint maxparams: 4 */
  16167. return function (a, b, c, d) {
  16168. return fn(a)(b)(c)(d);
  16169. };
  16170. };
  16171. exports.mkFn5 = function (fn) {
  16172. /* jshint maxparams: 5 */
  16173. return function (a, b, c, d, e) {
  16174. return fn(a)(b)(c)(d)(e);
  16175. };
  16176. };
  16177. exports.mkFn6 = function (fn) {
  16178. /* jshint maxparams: 6 */
  16179. return function (a, b, c, d, e, f) {
  16180. return fn(a)(b)(c)(d)(e)(f);
  16181. };
  16182. };
  16183. exports.mkFn7 = function (fn) {
  16184. /* jshint maxparams: 7 */
  16185. return function (a, b, c, d, e, f, g) {
  16186. return fn(a)(b)(c)(d)(e)(f)(g);
  16187. };
  16188. };
  16189. exports.mkFn8 = function (fn) {
  16190. /* jshint maxparams: 8 */
  16191. return function (a, b, c, d, e, f, g, h) {
  16192. return fn(a)(b)(c)(d)(e)(f)(g)(h);
  16193. };
  16194. };
  16195. exports.mkFn9 = function (fn) {
  16196. /* jshint maxparams: 9 */
  16197. return function (a, b, c, d, e, f, g, h, i) {
  16198. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i);
  16199. };
  16200. };
  16201. exports.mkFn10 = function (fn) {
  16202. /* jshint maxparams: 10 */
  16203. return function (a, b, c, d, e, f, g, h, i, j) {
  16204. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j);
  16205. };
  16206. };
  16207. exports.runFn0 = function (fn) {
  16208. return fn();
  16209. };
  16210. exports.runFn2 = function (fn) {
  16211. return function (a) {
  16212. return function (b) {
  16213. return fn(a, b);
  16214. };
  16215. };
  16216. };
  16217. exports.runFn3 = function (fn) {
  16218. return function (a) {
  16219. return function (b) {
  16220. return function (c) {
  16221. return fn(a, b, c);
  16222. };
  16223. };
  16224. };
  16225. };
  16226. exports.runFn4 = function (fn) {
  16227. return function (a) {
  16228. return function (b) {
  16229. return function (c) {
  16230. return function (d) {
  16231. return fn(a, b, c, d);
  16232. };
  16233. };
  16234. };
  16235. };
  16236. };
  16237. exports.runFn5 = function (fn) {
  16238. return function (a) {
  16239. return function (b) {
  16240. return function (c) {
  16241. return function (d) {
  16242. return function (e) {
  16243. return fn(a, b, c, d, e);
  16244. };
  16245. };
  16246. };
  16247. };
  16248. };
  16249. };
  16250. exports.runFn6 = function (fn) {
  16251. return function (a) {
  16252. return function (b) {
  16253. return function (c) {
  16254. return function (d) {
  16255. return function (e) {
  16256. return function (f) {
  16257. return fn(a, b, c, d, e, f);
  16258. };
  16259. };
  16260. };
  16261. };
  16262. };
  16263. };
  16264. };
  16265. exports.runFn7 = function (fn) {
  16266. return function (a) {
  16267. return function (b) {
  16268. return function (c) {
  16269. return function (d) {
  16270. return function (e) {
  16271. return function (f) {
  16272. return function (g) {
  16273. return fn(a, b, c, d, e, f, g);
  16274. };
  16275. };
  16276. };
  16277. };
  16278. };
  16279. };
  16280. };
  16281. };
  16282. exports.runFn8 = function (fn) {
  16283. return function (a) {
  16284. return function (b) {
  16285. return function (c) {
  16286. return function (d) {
  16287. return function (e) {
  16288. return function (f) {
  16289. return function (g) {
  16290. return function (h) {
  16291. return fn(a, b, c, d, e, f, g, h);
  16292. };
  16293. };
  16294. };
  16295. };
  16296. };
  16297. };
  16298. };
  16299. };
  16300. };
  16301. exports.runFn9 = function (fn) {
  16302. return function (a) {
  16303. return function (b) {
  16304. return function (c) {
  16305. return function (d) {
  16306. return function (e) {
  16307. return function (f) {
  16308. return function (g) {
  16309. return function (h) {
  16310. return function (i) {
  16311. return fn(a, b, c, d, e, f, g, h, i);
  16312. };
  16313. };
  16314. };
  16315. };
  16316. };
  16317. };
  16318. };
  16319. };
  16320. };
  16321. };
  16322. exports.runFn10 = function (fn) {
  16323. return function (a) {
  16324. return function (b) {
  16325. return function (c) {
  16326. return function (d) {
  16327. return function (e) {
  16328. return function (f) {
  16329. return function (g) {
  16330. return function (h) {
  16331. return function (i) {
  16332. return function (j) {
  16333. return fn(a, b, c, d, e, f, g, h, i, j);
  16334. };
  16335. };
  16336. };
  16337. };
  16338. };
  16339. };
  16340. };
  16341. };
  16342. };
  16343. };
  16344. };
  16345. },{}],"../output/Data.Function.Uncurried/index.js":[function(require,module,exports) {
  16346. // Generated by purs version 0.13.6
  16347. "use strict";
  16348. var $foreign = require("./foreign.js");
  16349. var runFn1 = function runFn1(f) {
  16350. return f;
  16351. };
  16352. var mkFn1 = function mkFn1(f) {
  16353. return f;
  16354. };
  16355. module.exports = {
  16356. mkFn1: mkFn1,
  16357. runFn1: runFn1,
  16358. mkFn0: $foreign.mkFn0,
  16359. mkFn2: $foreign.mkFn2,
  16360. mkFn3: $foreign.mkFn3,
  16361. mkFn4: $foreign.mkFn4,
  16362. mkFn5: $foreign.mkFn5,
  16363. mkFn6: $foreign.mkFn6,
  16364. mkFn7: $foreign.mkFn7,
  16365. mkFn8: $foreign.mkFn8,
  16366. mkFn9: $foreign.mkFn9,
  16367. mkFn10: $foreign.mkFn10,
  16368. runFn0: $foreign.runFn0,
  16369. runFn2: $foreign.runFn2,
  16370. runFn3: $foreign.runFn3,
  16371. runFn4: $foreign.runFn4,
  16372. runFn5: $foreign.runFn5,
  16373. runFn6: $foreign.runFn6,
  16374. runFn7: $foreign.runFn7,
  16375. runFn8: $foreign.runFn8,
  16376. runFn9: $foreign.runFn9,
  16377. runFn10: $foreign.runFn10
  16378. };
  16379. },{"./foreign.js":"../output/Data.Function.Uncurried/foreign.js"}],"../output/Foreign.Object.ST/foreign.js":[function(require,module,exports) {
  16380. "use strict";
  16381. exports["new"] = function () {
  16382. return {};
  16383. };
  16384. exports.peekImpl = function (just) {
  16385. return function (nothing) {
  16386. return function (k) {
  16387. return function (m) {
  16388. return function () {
  16389. return {}.hasOwnProperty.call(m, k) ? just(m[k]) : nothing;
  16390. };
  16391. };
  16392. };
  16393. };
  16394. };
  16395. exports.poke = function (k) {
  16396. return function (v) {
  16397. return function (m) {
  16398. return function () {
  16399. m[k] = v;
  16400. return m;
  16401. };
  16402. };
  16403. };
  16404. };
  16405. exports["delete"] = function (k) {
  16406. return function (m) {
  16407. return function () {
  16408. delete m[k];
  16409. return m;
  16410. };
  16411. };
  16412. };
  16413. },{}],"../output/Foreign.Object.ST/index.js":[function(require,module,exports) {
  16414. // Generated by purs version 0.13.6
  16415. "use strict";
  16416. var $foreign = require("./foreign.js");
  16417. var Data_Maybe = require("../Data.Maybe/index.js");
  16418. var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  16419. module.exports = {
  16420. peek: peek,
  16421. "new": $foreign["new"],
  16422. poke: $foreign.poke,
  16423. "delete": $foreign["delete"]
  16424. };
  16425. },{"./foreign.js":"../output/Foreign.Object.ST/foreign.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Unsafe.Coerce/foreign.js":[function(require,module,exports) {
  16426. "use strict"; // module Unsafe.Coerce
  16427. exports.unsafeCoerce = function (x) {
  16428. return x;
  16429. };
  16430. },{}],"../output/Unsafe.Coerce/index.js":[function(require,module,exports) {
  16431. // Generated by purs version 0.13.6
  16432. "use strict";
  16433. var $foreign = require("./foreign.js");
  16434. module.exports = {
  16435. unsafeCoerce: $foreign.unsafeCoerce
  16436. };
  16437. },{"./foreign.js":"../output/Unsafe.Coerce/foreign.js"}],"../output/Foreign.Object/index.js":[function(require,module,exports) {
  16438. // Generated by purs version 0.13.6
  16439. "use strict";
  16440. var $foreign = require("./foreign.js");
  16441. var Control_Applicative = require("../Control.Applicative/index.js");
  16442. var Control_Apply = require("../Control.Apply/index.js");
  16443. var Control_Bind = require("../Control.Bind/index.js");
  16444. var Control_Category = require("../Control.Category/index.js");
  16445. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  16446. var Data_Array = require("../Data.Array/index.js");
  16447. var Data_Eq = require("../Data.Eq/index.js");
  16448. var Data_Foldable = require("../Data.Foldable/index.js");
  16449. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  16450. var Data_Function = require("../Data.Function/index.js");
  16451. var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js");
  16452. var Data_Functor = require("../Data.Functor/index.js");
  16453. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  16454. var Data_Maybe = require("../Data.Maybe/index.js");
  16455. var Data_Monoid = require("../Data.Monoid/index.js");
  16456. var Data_Ord = require("../Data.Ord/index.js");
  16457. var Data_Semigroup = require("../Data.Semigroup/index.js");
  16458. var Data_Show = require("../Data.Show/index.js");
  16459. var Data_Traversable = require("../Data.Traversable/index.js");
  16460. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  16461. var Data_Tuple = require("../Data.Tuple/index.js");
  16462. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  16463. var Foreign_Object_ST = require("../Foreign.Object.ST/index.js");
  16464. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  16465. var values = $foreign.toArrayWithKey(function (v) {
  16466. return function (v1) {
  16467. return v1;
  16468. };
  16469. });
  16470. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  16471. var $36 = Data_Array.toUnfoldable(dictUnfoldable);
  16472. var $37 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
  16473. return function ($38) {
  16474. return $36($37($38));
  16475. };
  16476. };
  16477. var toAscUnfoldable = function toAscUnfoldable(dictUnfoldable) {
  16478. var $39 = Data_Array.toUnfoldable(dictUnfoldable);
  16479. var $40 = Data_Array.sortWith(Data_Ord.ordString)(Data_Tuple.fst);
  16480. var $41 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
  16481. return function ($42) {
  16482. return $39($40($41($42)));
  16483. };
  16484. };
  16485. var toAscArray = toAscUnfoldable(Data_Unfoldable.unfoldableArray);
  16486. var toArray = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
  16487. var thawST = $foreign["_copyST"];
  16488. var singleton = function singleton(k) {
  16489. return function (v) {
  16490. return $foreign.runST(Control_Bind.bindFlipped(Control_Monad_ST_Internal.bindST)(Foreign_Object_ST.poke(k)(v))(Foreign_Object_ST["new"]));
  16491. };
  16492. };
  16493. var showObject = function showObject(dictShow) {
  16494. return new Data_Show.Show(function (m) {
  16495. return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(Data_Show.showString)(dictShow)))(toArray(m)) + ")");
  16496. });
  16497. };
  16498. var mutate = function mutate(f) {
  16499. return function (m) {
  16500. return $foreign.runST(function __do() {
  16501. var s = thawST(m)();
  16502. f(s)();
  16503. return s;
  16504. });
  16505. };
  16506. };
  16507. var member = Data_Function_Uncurried.runFn4($foreign["_lookup"])(false)(Data_Function["const"](true));
  16508. var mapWithKey = function mapWithKey(f) {
  16509. return function (m) {
  16510. return $foreign["_mapWithKey"](m, f);
  16511. };
  16512. };
  16513. var lookup = Data_Function_Uncurried.runFn4($foreign["_lookup"])(Data_Maybe.Nothing.value)(Data_Maybe.Just.create);
  16514. var isSubmap = function isSubmap(dictEq) {
  16515. return function (m1) {
  16516. return function (m2) {
  16517. var f = function f(k) {
  16518. return function (v) {
  16519. return $foreign["_lookup"](false, Data_Eq.eq(dictEq)(v), k, m2);
  16520. };
  16521. };
  16522. return $foreign.all(f)(m1);
  16523. };
  16524. };
  16525. };
  16526. var isEmpty = $foreign.all(function (v) {
  16527. return function (v1) {
  16528. return false;
  16529. };
  16530. });
  16531. var insert = function insert(k) {
  16532. return function (v) {
  16533. return mutate(Foreign_Object_ST.poke(k)(v));
  16534. };
  16535. };
  16536. var functorObject = new Data_Functor.Functor(function (f) {
  16537. return function (m) {
  16538. return $foreign["_fmapObject"](m, f);
  16539. };
  16540. });
  16541. var functorWithIndexObject = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  16542. return functorObject;
  16543. }, mapWithKey);
  16544. var fromHomogeneous = function fromHomogeneous(dictHomogeneous) {
  16545. return Unsafe_Coerce.unsafeCoerce;
  16546. };
  16547. var fromFoldableWith = function fromFoldableWith(dictFoldable) {
  16548. return function (f) {
  16549. return function (l) {
  16550. return $foreign.runST(function __do() {
  16551. var s = Foreign_Object_ST["new"]();
  16552. Data_Foldable.for_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(l)(function (v) {
  16553. return function __do() {
  16554. var v$prime = $foreign["_lookupST"](v.value1, f(v.value1), v.value0, s)();
  16555. return Foreign_Object_ST.poke(v.value0)(v$prime)(s)();
  16556. };
  16557. })();
  16558. return s;
  16559. });
  16560. };
  16561. };
  16562. };
  16563. var fromFoldable = function fromFoldable(dictFoldable) {
  16564. return function (l) {
  16565. return $foreign.runST(function __do() {
  16566. var s = Foreign_Object_ST["new"]();
  16567. Control_Monad_ST_Internal.foreach(Data_Array.fromFoldable(dictFoldable)(l))(function (v) {
  16568. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Foreign_Object_ST.poke(v.value0)(v.value1)(s));
  16569. })();
  16570. return s;
  16571. });
  16572. };
  16573. };
  16574. var freezeST = $foreign["_copyST"];
  16575. var foldMaybe = function foldMaybe(f) {
  16576. return function (z) {
  16577. return function (m) {
  16578. return $foreign["_foldSCObject"](m, z, f, Data_Maybe.fromMaybe);
  16579. };
  16580. };
  16581. };
  16582. var foldM = function foldM(dictMonad) {
  16583. return function (f) {
  16584. return function (z) {
  16585. return $foreign["_foldM"](Control_Bind.bind(dictMonad.Bind1()))(f)(Control_Applicative.pure(dictMonad.Applicative0())(z));
  16586. };
  16587. };
  16588. };
  16589. var semigroupObject = function semigroupObject(dictSemigroup) {
  16590. return new Data_Semigroup.Semigroup(function (m1) {
  16591. return function (m2) {
  16592. return mutate(function (s1) {
  16593. return foldM(Control_Monad_ST_Internal.monadST)(function (s2) {
  16594. return function (k) {
  16595. return function (v2) {
  16596. return Foreign_Object_ST.poke(k)($foreign["_lookup"](v2, function (v1) {
  16597. return Data_Semigroup.append(dictSemigroup)(v1)(v2);
  16598. }, k, m2))(s2);
  16599. };
  16600. };
  16601. })(s1)(m1);
  16602. })(m2);
  16603. };
  16604. });
  16605. };
  16606. var monoidObject = function monoidObject(dictSemigroup) {
  16607. return new Data_Monoid.Monoid(function () {
  16608. return semigroupObject(dictSemigroup);
  16609. }, $foreign.empty);
  16610. };
  16611. var union = function union(m) {
  16612. return mutate(function (s) {
  16613. return foldM(Control_Monad_ST_Internal.monadST)(function (s$prime) {
  16614. return function (k) {
  16615. return function (v) {
  16616. return Foreign_Object_ST.poke(k)(v)(s$prime);
  16617. };
  16618. };
  16619. })(s)(m);
  16620. });
  16621. };
  16622. var unions = function unions(dictFoldable) {
  16623. return Data_Foldable.foldl(dictFoldable)(union)($foreign.empty);
  16624. };
  16625. var fold = $foreign["_foldM"](Data_Function.applyFlipped);
  16626. var foldMap = function foldMap(dictMonoid) {
  16627. return function (f) {
  16628. return fold(function (acc) {
  16629. return function (k) {
  16630. return function (v) {
  16631. return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(k)(v));
  16632. };
  16633. };
  16634. })(Data_Monoid.mempty(dictMonoid));
  16635. };
  16636. };
  16637. var foldableObject = new Data_Foldable.Foldable(function (dictMonoid) {
  16638. return function (f) {
  16639. return foldMap(dictMonoid)(Data_Function["const"](f));
  16640. };
  16641. }, function (f) {
  16642. return fold(function (z) {
  16643. return function (v) {
  16644. return f(z);
  16645. };
  16646. });
  16647. }, function (f) {
  16648. return function (z) {
  16649. return function (m) {
  16650. return Data_Foldable.foldr(Data_Foldable.foldableArray)(f)(z)(values(m));
  16651. };
  16652. };
  16653. });
  16654. var foldableWithIndexObject = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  16655. return foldableObject;
  16656. }, function (dictMonoid) {
  16657. return foldMap(dictMonoid);
  16658. }, function (f) {
  16659. return fold(Data_Function.flip(f));
  16660. }, function (f) {
  16661. return function (z) {
  16662. return function (m) {
  16663. return Data_Foldable.foldr(Data_Foldable.foldableArray)(Data_Tuple.uncurry(f))(z)($foreign.toArrayWithKey(Data_Tuple.Tuple.create)(m));
  16664. };
  16665. };
  16666. });
  16667. var traversableWithIndexObject = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  16668. return foldableWithIndexObject;
  16669. }, function () {
  16670. return functorWithIndexObject;
  16671. }, function () {
  16672. return traversableObject;
  16673. }, function (dictApplicative) {
  16674. return function (f) {
  16675. return function (ms) {
  16676. return fold(function (acc) {
  16677. return function (k) {
  16678. return function (v) {
  16679. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Function.flip(insert(k)))(acc))(f(k)(v));
  16680. };
  16681. };
  16682. })(Control_Applicative.pure(dictApplicative)($foreign.empty))(ms);
  16683. };
  16684. };
  16685. });
  16686. var traversableObject = new Data_Traversable.Traversable(function () {
  16687. return foldableObject;
  16688. }, function () {
  16689. return functorObject;
  16690. }, function (dictApplicative) {
  16691. return Data_Traversable.traverse(traversableObject)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  16692. }, function (dictApplicative) {
  16693. var $43 = Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexObject)(dictApplicative);
  16694. return function ($44) {
  16695. return $43(Data_Function["const"]($44));
  16696. };
  16697. });
  16698. var filterWithKey = function filterWithKey(predicate) {
  16699. return function (m) {
  16700. var go = function () {
  16701. var step = function step(acc) {
  16702. return function (k) {
  16703. return function (v) {
  16704. var $33 = predicate(k)(v);
  16705. if ($33) {
  16706. return Foreign_Object_ST.poke(k)(v)(acc);
  16707. }
  16708. ;
  16709. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(acc);
  16710. };
  16711. };
  16712. };
  16713. return function __do() {
  16714. var m$prime = Foreign_Object_ST["new"]();
  16715. return foldM(Control_Monad_ST_Internal.monadST)(step)(m$prime)(m)();
  16716. };
  16717. }();
  16718. return $foreign.runST(go);
  16719. };
  16720. };
  16721. var filterKeys = function filterKeys(predicate) {
  16722. return filterWithKey(function ($45) {
  16723. return Data_Function["const"](predicate($45));
  16724. });
  16725. };
  16726. var filter = function filter(predicate) {
  16727. return filterWithKey(Data_Function["const"](predicate));
  16728. };
  16729. var eqObject = function eqObject(dictEq) {
  16730. return new Data_Eq.Eq(function (m1) {
  16731. return function (m2) {
  16732. return isSubmap(dictEq)(m1)(m2) && isSubmap(dictEq)(m2)(m1);
  16733. };
  16734. });
  16735. };
  16736. var ordObject = function ordObject(dictOrd) {
  16737. return new Data_Ord.Ord(function () {
  16738. return eqObject(dictOrd.Eq0());
  16739. }, function (m1) {
  16740. return function (m2) {
  16741. return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(Data_Ord.ordString)(dictOrd)))(toAscArray(m1))(toAscArray(m2));
  16742. };
  16743. });
  16744. };
  16745. var eq1Object = new Data_Eq.Eq1(function (dictEq) {
  16746. return Data_Eq.eq(eqObject(dictEq));
  16747. });
  16748. var $$delete = function $$delete(k) {
  16749. return mutate(Foreign_Object_ST["delete"](k));
  16750. };
  16751. var pop = function pop(k) {
  16752. return function (m) {
  16753. return Data_Functor.mapFlipped(Data_Maybe.functorMaybe)(lookup(k)(m))(function (a) {
  16754. return new Data_Tuple.Tuple(a, $$delete(k)(m));
  16755. });
  16756. };
  16757. };
  16758. var alter = function alter(f) {
  16759. return function (k) {
  16760. return function (m) {
  16761. var v = f(lookup(k)(m));
  16762. if (v instanceof Data_Maybe.Nothing) {
  16763. return $$delete(k)(m);
  16764. }
  16765. ;
  16766. if (v instanceof Data_Maybe.Just) {
  16767. return insert(k)(v.value0)(m);
  16768. }
  16769. ;
  16770. throw new Error("Failed pattern match at Foreign.Object (line 206, column 15 - line 208, column 25): " + [v.constructor.name]);
  16771. };
  16772. };
  16773. };
  16774. var update = function update(f) {
  16775. return function (k) {
  16776. return function (m) {
  16777. return alter(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m);
  16778. };
  16779. };
  16780. };
  16781. module.exports = {
  16782. isEmpty: isEmpty,
  16783. singleton: singleton,
  16784. insert: insert,
  16785. lookup: lookup,
  16786. toUnfoldable: toUnfoldable,
  16787. toAscUnfoldable: toAscUnfoldable,
  16788. fromFoldable: fromFoldable,
  16789. fromFoldableWith: fromFoldableWith,
  16790. fromHomogeneous: fromHomogeneous,
  16791. "delete": $$delete,
  16792. pop: pop,
  16793. member: member,
  16794. alter: alter,
  16795. update: update,
  16796. mapWithKey: mapWithKey,
  16797. filterWithKey: filterWithKey,
  16798. filterKeys: filterKeys,
  16799. filter: filter,
  16800. values: values,
  16801. union: union,
  16802. unions: unions,
  16803. isSubmap: isSubmap,
  16804. fold: fold,
  16805. foldMap: foldMap,
  16806. foldM: foldM,
  16807. foldMaybe: foldMaybe,
  16808. thawST: thawST,
  16809. freezeST: freezeST,
  16810. functorObject: functorObject,
  16811. functorWithIndexObject: functorWithIndexObject,
  16812. foldableObject: foldableObject,
  16813. foldableWithIndexObject: foldableWithIndexObject,
  16814. traversableObject: traversableObject,
  16815. traversableWithIndexObject: traversableWithIndexObject,
  16816. eqObject: eqObject,
  16817. eq1Object: eq1Object,
  16818. ordObject: ordObject,
  16819. showObject: showObject,
  16820. semigroupObject: semigroupObject,
  16821. monoidObject: monoidObject,
  16822. empty: $foreign.empty,
  16823. size: $foreign.size,
  16824. keys: $foreign.keys,
  16825. all: $foreign.all,
  16826. runST: $foreign.runST,
  16827. toArrayWithKey: $foreign.toArrayWithKey
  16828. };
  16829. },{"./foreign.js":"../output/Foreign.Object/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Function.Uncurried/index.js":"../output/Data.Function.Uncurried/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Foreign.Object.ST/index.js":"../output/Foreign.Object.ST/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Record.Unsafe.Union/foreign.js":[function(require,module,exports) {
  16830. "use strict";
  16831. exports.unsafeUnionFn = function (r1, r2) {
  16832. var copy = {};
  16833. for (var k1 in r2) {
  16834. if ({}.hasOwnProperty.call(r2, k1)) {
  16835. copy[k1] = r2[k1];
  16836. }
  16837. }
  16838. for (var k2 in r1) {
  16839. if ({}.hasOwnProperty.call(r1, k2)) {
  16840. copy[k2] = r1[k2];
  16841. }
  16842. }
  16843. return copy;
  16844. };
  16845. },{}],"../output/Record.Unsafe.Union/index.js":[function(require,module,exports) {
  16846. // Generated by purs version 0.13.6
  16847. "use strict";
  16848. var $foreign = require("./foreign.js");
  16849. var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js");
  16850. var unsafeUnion = Data_Function_Uncurried.runFn2($foreign.unsafeUnionFn);
  16851. module.exports = {
  16852. unsafeUnion: unsafeUnion,
  16853. unsafeUnionFn: $foreign.unsafeUnionFn
  16854. };
  16855. },{"./foreign.js":"../output/Record.Unsafe.Union/foreign.js","../Data.Function.Uncurried/index.js":"../output/Data.Function.Uncurried/index.js"}],"../output/Record/index.js":[function(require,module,exports) {
  16856. // Generated by purs version 0.13.6
  16857. "use strict";
  16858. var Data_Eq = require("../Data.Eq/index.js");
  16859. var Data_Symbol = require("../Data.Symbol/index.js");
  16860. var Record_Unsafe = require("../Record.Unsafe/index.js");
  16861. var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js");
  16862. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  16863. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  16864. var EqualFields = function EqualFields(equalFields) {
  16865. this.equalFields = equalFields;
  16866. };
  16867. var union = function union(dictUnion) {
  16868. return function (l) {
  16869. return function (r) {
  16870. return Record_Unsafe_Union.unsafeUnionFn(l, r);
  16871. };
  16872. };
  16873. };
  16874. var set = function set(dictIsSymbol) {
  16875. return function (dictCons) {
  16876. return function (dictCons1) {
  16877. return function (l) {
  16878. return function (b) {
  16879. return function (r) {
  16880. return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(b)(r);
  16881. };
  16882. };
  16883. };
  16884. };
  16885. };
  16886. };
  16887. var nub = function nub(dictNub) {
  16888. return Unsafe_Coerce.unsafeCoerce;
  16889. };
  16890. var merge = function merge(dictUnion) {
  16891. return function (dictNub) {
  16892. return function (l) {
  16893. return function (r) {
  16894. return Record_Unsafe_Union.unsafeUnionFn(l, r);
  16895. };
  16896. };
  16897. };
  16898. };
  16899. var insert = function insert(dictIsSymbol) {
  16900. return function (dictLacks) {
  16901. return function (dictCons) {
  16902. return function (l) {
  16903. return function (a) {
  16904. return function (r) {
  16905. return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r);
  16906. };
  16907. };
  16908. };
  16909. };
  16910. };
  16911. };
  16912. var get = function get(dictIsSymbol) {
  16913. return function (dictCons) {
  16914. return function (l) {
  16915. return function (r) {
  16916. return Record_Unsafe.unsafeGet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r);
  16917. };
  16918. };
  16919. };
  16920. };
  16921. var modify = function modify(dictIsSymbol) {
  16922. return function (dictCons) {
  16923. return function (dictCons1) {
  16924. return function (l) {
  16925. return function (f) {
  16926. return function (r) {
  16927. return set(dictIsSymbol)()()(l)(f(get(dictIsSymbol)()(l)(r)))(r);
  16928. };
  16929. };
  16930. };
  16931. };
  16932. };
  16933. };
  16934. var equalFieldsNil = new EqualFields(function (v) {
  16935. return function (v1) {
  16936. return function (v2) {
  16937. return true;
  16938. };
  16939. };
  16940. });
  16941. var equalFields = function equalFields(dict) {
  16942. return dict.equalFields;
  16943. };
  16944. var equalFieldsCons = function equalFieldsCons(dictIsSymbol) {
  16945. return function (dictEq) {
  16946. return function (dictCons) {
  16947. return function (dictEqualFields) {
  16948. return new EqualFields(function (v) {
  16949. return function (a) {
  16950. return function (b) {
  16951. var get$prime = get(dictIsSymbol)()(Data_Symbol.SProxy.value);
  16952. var equalRest = equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value);
  16953. return Data_Eq.eq(dictEq)(get$prime(a))(get$prime(b)) && equalRest(a)(b);
  16954. };
  16955. };
  16956. });
  16957. };
  16958. };
  16959. };
  16960. };
  16961. var equal = function equal(dictRowToList) {
  16962. return function (dictEqualFields) {
  16963. return function (a) {
  16964. return function (b) {
  16965. return equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value)(a)(b);
  16966. };
  16967. };
  16968. };
  16969. };
  16970. var disjointUnion = function disjointUnion(dictUnion) {
  16971. return function (dictNub) {
  16972. return function (l) {
  16973. return function (r) {
  16974. return Record_Unsafe_Union.unsafeUnionFn(l, r);
  16975. };
  16976. };
  16977. };
  16978. };
  16979. var $$delete = function $$delete(dictIsSymbol) {
  16980. return function (dictLacks) {
  16981. return function (dictCons) {
  16982. return function (l) {
  16983. return function (r) {
  16984. return Record_Unsafe.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r);
  16985. };
  16986. };
  16987. };
  16988. };
  16989. };
  16990. var rename = function rename(dictIsSymbol) {
  16991. return function (dictIsSymbol1) {
  16992. return function (dictCons) {
  16993. return function (dictLacks) {
  16994. return function (dictCons1) {
  16995. return function (dictLacks1) {
  16996. return function (prev) {
  16997. return function (next) {
  16998. return function (record) {
  16999. return insert(dictIsSymbol1)()()(next)(get(dictIsSymbol)()(prev)(record))($$delete(dictIsSymbol)()()(prev)(record));
  17000. };
  17001. };
  17002. };
  17003. };
  17004. };
  17005. };
  17006. };
  17007. };
  17008. };
  17009. module.exports = {
  17010. get: get,
  17011. set: set,
  17012. modify: modify,
  17013. insert: insert,
  17014. "delete": $$delete,
  17015. rename: rename,
  17016. equal: equal,
  17017. merge: merge,
  17018. union: union,
  17019. disjointUnion: disjointUnion,
  17020. nub: nub,
  17021. EqualFields: EqualFields,
  17022. equalFields: equalFields,
  17023. equalFieldsCons: equalFieldsCons,
  17024. equalFieldsNil: equalFieldsNil
  17025. };
  17026. },{"../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Record.Unsafe.Union/index.js":"../output/Record.Unsafe.Union/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Record.Builder/foreign.js":[function(require,module,exports) {
  17027. "use strict";
  17028. exports.copyRecord = function (rec) {
  17029. var copy = {};
  17030. for (var key in rec) {
  17031. if ({}.hasOwnProperty.call(rec, key)) {
  17032. copy[key] = rec[key];
  17033. }
  17034. }
  17035. return copy;
  17036. };
  17037. exports.unsafeInsert = function (l) {
  17038. return function (a) {
  17039. return function (rec) {
  17040. rec[l] = a;
  17041. return rec;
  17042. };
  17043. };
  17044. };
  17045. exports.unsafeModify = function (l) {
  17046. return function (f) {
  17047. return function (rec) {
  17048. rec[l] = f(rec[l]);
  17049. return rec;
  17050. };
  17051. };
  17052. };
  17053. exports.unsafeDelete = function (l) {
  17054. return function (rec) {
  17055. delete rec[l];
  17056. return rec;
  17057. };
  17058. };
  17059. exports.unsafeRename = function (l1) {
  17060. return function (l2) {
  17061. return function (rec) {
  17062. rec[l2] = rec[l1];
  17063. delete rec[l1];
  17064. return rec;
  17065. };
  17066. };
  17067. };
  17068. },{}],"../output/Record.Builder/index.js":[function(require,module,exports) {
  17069. // Generated by purs version 0.13.6
  17070. "use strict";
  17071. var $foreign = require("./foreign.js");
  17072. var Control_Category = require("../Control.Category/index.js");
  17073. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  17074. var Data_Symbol = require("../Data.Symbol/index.js");
  17075. var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js");
  17076. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  17077. var Builder = function Builder(x) {
  17078. return x;
  17079. };
  17080. var union = function union(dictUnion) {
  17081. return function (r2) {
  17082. return function (r1) {
  17083. return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
  17084. };
  17085. };
  17086. };
  17087. var semigroupoidBuilder = Control_Semigroupoid.semigroupoidFn;
  17088. var rename = function rename(dictIsSymbol) {
  17089. return function (dictIsSymbol1) {
  17090. return function (dictCons) {
  17091. return function (dictLacks) {
  17092. return function (dictCons1) {
  17093. return function (dictLacks1) {
  17094. return function (l1) {
  17095. return function (l2) {
  17096. return function (r1) {
  17097. return $foreign.unsafeRename(Data_Symbol.reflectSymbol(dictIsSymbol)(l1))(Data_Symbol.reflectSymbol(dictIsSymbol1)(l2))(r1);
  17098. };
  17099. };
  17100. };
  17101. };
  17102. };
  17103. };
  17104. };
  17105. };
  17106. };
  17107. var nub = function nub(dictNub) {
  17108. return Unsafe_Coerce.unsafeCoerce;
  17109. };
  17110. var modify = function modify(dictCons) {
  17111. return function (dictCons1) {
  17112. return function (dictIsSymbol) {
  17113. return function (l) {
  17114. return function (f) {
  17115. return function (r1) {
  17116. return $foreign.unsafeModify(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(f)(r1);
  17117. };
  17118. };
  17119. };
  17120. };
  17121. };
  17122. };
  17123. var merge = function merge(dictUnion) {
  17124. return function (dictNub) {
  17125. return function (r2) {
  17126. return function (r1) {
  17127. return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
  17128. };
  17129. };
  17130. };
  17131. };
  17132. var insert = function insert(dictCons) {
  17133. return function (dictLacks) {
  17134. return function (dictIsSymbol) {
  17135. return function (l) {
  17136. return function (a) {
  17137. return function (r1) {
  17138. return $foreign.unsafeInsert(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r1);
  17139. };
  17140. };
  17141. };
  17142. };
  17143. };
  17144. };
  17145. var disjointUnion = function disjointUnion(dictUnion) {
  17146. return function (dictNub) {
  17147. return function (r1) {
  17148. return function (r2) {
  17149. return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
  17150. };
  17151. };
  17152. };
  17153. };
  17154. var $$delete = function $$delete(dictIsSymbol) {
  17155. return function (dictLacks) {
  17156. return function (dictCons) {
  17157. return function (l) {
  17158. return function (r2) {
  17159. return $foreign.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r2);
  17160. };
  17161. };
  17162. };
  17163. };
  17164. };
  17165. var categoryBuilder = Control_Category.categoryFn;
  17166. var build = function build(v) {
  17167. return function (r1) {
  17168. return v($foreign.copyRecord(r1));
  17169. };
  17170. };
  17171. module.exports = {
  17172. build: build,
  17173. insert: insert,
  17174. modify: modify,
  17175. "delete": $$delete,
  17176. rename: rename,
  17177. merge: merge,
  17178. union: union,
  17179. disjointUnion: disjointUnion,
  17180. nub: nub,
  17181. semigroupoidBuilder: semigroupoidBuilder,
  17182. categoryBuilder: categoryBuilder
  17183. };
  17184. },{"./foreign.js":"../output/Record.Builder/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe.Union/index.js":"../output/Record.Unsafe.Union/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Type.Proxy/index.js":[function(require,module,exports) {
  17185. // Generated by purs version 0.13.6
  17186. "use strict";
  17187. var Control_Applicative = require("../Control.Applicative/index.js");
  17188. var Control_Apply = require("../Control.Apply/index.js");
  17189. var Control_Bind = require("../Control.Bind/index.js");
  17190. var Control_Monad = require("../Control.Monad/index.js");
  17191. var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
  17192. var Data_Bounded = require("../Data.Bounded/index.js");
  17193. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  17194. var Data_Eq = require("../Data.Eq/index.js");
  17195. var Data_Functor = require("../Data.Functor/index.js");
  17196. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  17197. var Data_Ord = require("../Data.Ord/index.js");
  17198. var Data_Ordering = require("../Data.Ordering/index.js");
  17199. var Data_Ring = require("../Data.Ring/index.js");
  17200. var Data_Semigroup = require("../Data.Semigroup/index.js");
  17201. var Data_Semiring = require("../Data.Semiring/index.js");
  17202. var Data_Show = require("../Data.Show/index.js");
  17203. var Proxy3 = function () {
  17204. function Proxy3() {}
  17205. ;
  17206. Proxy3.value = new Proxy3();
  17207. return Proxy3;
  17208. }();
  17209. var Proxy2 = function () {
  17210. function Proxy2() {}
  17211. ;
  17212. Proxy2.value = new Proxy2();
  17213. return Proxy2;
  17214. }();
  17215. var $$Proxy = function () {
  17216. function $$Proxy() {}
  17217. ;
  17218. $$Proxy.value = new $$Proxy();
  17219. return $$Proxy;
  17220. }();
  17221. var showProxy3 = new Data_Show.Show(function (v) {
  17222. return "Proxy3";
  17223. });
  17224. var showProxy2 = new Data_Show.Show(function (v) {
  17225. return "Proxy2";
  17226. });
  17227. var showProxy = new Data_Show.Show(function (v) {
  17228. return "Proxy";
  17229. });
  17230. var semiringProxy3 = new Data_Semiring.Semiring(function (v) {
  17231. return function (v1) {
  17232. return Proxy3.value;
  17233. };
  17234. }, function (v) {
  17235. return function (v1) {
  17236. return Proxy3.value;
  17237. };
  17238. }, Proxy3.value, Proxy3.value);
  17239. var semiringProxy2 = new Data_Semiring.Semiring(function (v) {
  17240. return function (v1) {
  17241. return Proxy2.value;
  17242. };
  17243. }, function (v) {
  17244. return function (v1) {
  17245. return Proxy2.value;
  17246. };
  17247. }, Proxy2.value, Proxy2.value);
  17248. var semiringProxy = new Data_Semiring.Semiring(function (v) {
  17249. return function (v1) {
  17250. return $$Proxy.value;
  17251. };
  17252. }, function (v) {
  17253. return function (v1) {
  17254. return $$Proxy.value;
  17255. };
  17256. }, $$Proxy.value, $$Proxy.value);
  17257. var semigroupProxy3 = new Data_Semigroup.Semigroup(function (v) {
  17258. return function (v1) {
  17259. return Proxy3.value;
  17260. };
  17261. });
  17262. var semigroupProxy2 = new Data_Semigroup.Semigroup(function (v) {
  17263. return function (v1) {
  17264. return Proxy2.value;
  17265. };
  17266. });
  17267. var semigroupProxy = new Data_Semigroup.Semigroup(function (v) {
  17268. return function (v1) {
  17269. return $$Proxy.value;
  17270. };
  17271. });
  17272. var ringProxy3 = new Data_Ring.Ring(function () {
  17273. return semiringProxy3;
  17274. }, function (v) {
  17275. return function (v1) {
  17276. return Proxy3.value;
  17277. };
  17278. });
  17279. var ringProxy2 = new Data_Ring.Ring(function () {
  17280. return semiringProxy2;
  17281. }, function (v) {
  17282. return function (v1) {
  17283. return Proxy2.value;
  17284. };
  17285. });
  17286. var ringProxy = new Data_Ring.Ring(function () {
  17287. return semiringProxy;
  17288. }, function (v) {
  17289. return function (v1) {
  17290. return $$Proxy.value;
  17291. };
  17292. });
  17293. var heytingAlgebraProxy3 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  17294. return function (v1) {
  17295. return Proxy3.value;
  17296. };
  17297. }, function (v) {
  17298. return function (v1) {
  17299. return Proxy3.value;
  17300. };
  17301. }, Proxy3.value, function (v) {
  17302. return function (v1) {
  17303. return Proxy3.value;
  17304. };
  17305. }, function (v) {
  17306. return Proxy3.value;
  17307. }, Proxy3.value);
  17308. var heytingAlgebraProxy2 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  17309. return function (v1) {
  17310. return Proxy2.value;
  17311. };
  17312. }, function (v) {
  17313. return function (v1) {
  17314. return Proxy2.value;
  17315. };
  17316. }, Proxy2.value, function (v) {
  17317. return function (v1) {
  17318. return Proxy2.value;
  17319. };
  17320. }, function (v) {
  17321. return Proxy2.value;
  17322. }, Proxy2.value);
  17323. var heytingAlgebraProxy = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  17324. return function (v1) {
  17325. return $$Proxy.value;
  17326. };
  17327. }, function (v) {
  17328. return function (v1) {
  17329. return $$Proxy.value;
  17330. };
  17331. }, $$Proxy.value, function (v) {
  17332. return function (v1) {
  17333. return $$Proxy.value;
  17334. };
  17335. }, function (v) {
  17336. return $$Proxy.value;
  17337. }, $$Proxy.value);
  17338. var functorProxy = new Data_Functor.Functor(function (f) {
  17339. return function (m) {
  17340. return $$Proxy.value;
  17341. };
  17342. });
  17343. var eqProxy3 = new Data_Eq.Eq(function (x) {
  17344. return function (y) {
  17345. return true;
  17346. };
  17347. });
  17348. var ordProxy3 = new Data_Ord.Ord(function () {
  17349. return eqProxy3;
  17350. }, function (x) {
  17351. return function (y) {
  17352. return Data_Ordering.EQ.value;
  17353. };
  17354. });
  17355. var eqProxy2 = new Data_Eq.Eq(function (x) {
  17356. return function (y) {
  17357. return true;
  17358. };
  17359. });
  17360. var ordProxy2 = new Data_Ord.Ord(function () {
  17361. return eqProxy2;
  17362. }, function (x) {
  17363. return function (y) {
  17364. return Data_Ordering.EQ.value;
  17365. };
  17366. });
  17367. var eqProxy = new Data_Eq.Eq(function (x) {
  17368. return function (y) {
  17369. return true;
  17370. };
  17371. });
  17372. var ordProxy = new Data_Ord.Ord(function () {
  17373. return eqProxy;
  17374. }, function (x) {
  17375. return function (y) {
  17376. return Data_Ordering.EQ.value;
  17377. };
  17378. });
  17379. var discardProxy3 = new Control_Bind.Discard(function (dictBind) {
  17380. return Control_Bind.bind(dictBind);
  17381. });
  17382. var discardProxy2 = new Control_Bind.Discard(function (dictBind) {
  17383. return Control_Bind.bind(dictBind);
  17384. });
  17385. var discardProxy = new Control_Bind.Discard(function (dictBind) {
  17386. return Control_Bind.bind(dictBind);
  17387. });
  17388. var commutativeRingProxy3 = new Data_CommutativeRing.CommutativeRing(function () {
  17389. return ringProxy3;
  17390. });
  17391. var commutativeRingProxy2 = new Data_CommutativeRing.CommutativeRing(function () {
  17392. return ringProxy2;
  17393. });
  17394. var commutativeRingProxy = new Data_CommutativeRing.CommutativeRing(function () {
  17395. return ringProxy;
  17396. });
  17397. var boundedProxy3 = new Data_Bounded.Bounded(function () {
  17398. return ordProxy3;
  17399. }, Proxy3.value, Proxy3.value);
  17400. var boundedProxy2 = new Data_Bounded.Bounded(function () {
  17401. return ordProxy2;
  17402. }, Proxy2.value, Proxy2.value);
  17403. var boundedProxy = new Data_Bounded.Bounded(function () {
  17404. return ordProxy;
  17405. }, $$Proxy.value, $$Proxy.value);
  17406. var booleanAlgebraProxy3 = new Data_BooleanAlgebra.BooleanAlgebra(function () {
  17407. return heytingAlgebraProxy3;
  17408. });
  17409. var booleanAlgebraProxy2 = new Data_BooleanAlgebra.BooleanAlgebra(function () {
  17410. return heytingAlgebraProxy2;
  17411. });
  17412. var booleanAlgebraProxy = new Data_BooleanAlgebra.BooleanAlgebra(function () {
  17413. return heytingAlgebraProxy;
  17414. });
  17415. var applyProxy = new Control_Apply.Apply(function () {
  17416. return functorProxy;
  17417. }, function (v) {
  17418. return function (v1) {
  17419. return $$Proxy.value;
  17420. };
  17421. });
  17422. var bindProxy = new Control_Bind.Bind(function () {
  17423. return applyProxy;
  17424. }, function (v) {
  17425. return function (v1) {
  17426. return $$Proxy.value;
  17427. };
  17428. });
  17429. var applicativeProxy = new Control_Applicative.Applicative(function () {
  17430. return applyProxy;
  17431. }, function (v) {
  17432. return $$Proxy.value;
  17433. });
  17434. var monadProxy = new Control_Monad.Monad(function () {
  17435. return applicativeProxy;
  17436. }, function () {
  17437. return bindProxy;
  17438. });
  17439. module.exports = {
  17440. "Proxy": $$Proxy,
  17441. Proxy2: Proxy2,
  17442. Proxy3: Proxy3,
  17443. eqProxy: eqProxy,
  17444. functorProxy: functorProxy,
  17445. ordProxy: ordProxy,
  17446. applicativeProxy: applicativeProxy,
  17447. applyProxy: applyProxy,
  17448. bindProxy: bindProxy,
  17449. booleanAlgebraProxy: booleanAlgebraProxy,
  17450. boundedProxy: boundedProxy,
  17451. commutativeRingProxy: commutativeRingProxy,
  17452. discardProxy: discardProxy,
  17453. heytingAlgebraProxy: heytingAlgebraProxy,
  17454. monadProxy: monadProxy,
  17455. ringProxy: ringProxy,
  17456. semigroupProxy: semigroupProxy,
  17457. semiringProxy: semiringProxy,
  17458. showProxy: showProxy,
  17459. eqProxy2: eqProxy2,
  17460. ordProxy2: ordProxy2,
  17461. booleanAlgebraProxy2: booleanAlgebraProxy2,
  17462. boundedProxy2: boundedProxy2,
  17463. commutativeRingProxy2: commutativeRingProxy2,
  17464. discardProxy2: discardProxy2,
  17465. heytingAlgebraProxy2: heytingAlgebraProxy2,
  17466. ringProxy2: ringProxy2,
  17467. semigroupProxy2: semigroupProxy2,
  17468. semiringProxy2: semiringProxy2,
  17469. showProxy2: showProxy2,
  17470. eqProxy3: eqProxy3,
  17471. ordProxy3: ordProxy3,
  17472. booleanAlgebraProxy3: booleanAlgebraProxy3,
  17473. boundedProxy3: boundedProxy3,
  17474. commutativeRingProxy3: commutativeRingProxy3,
  17475. discardProxy3: discardProxy3,
  17476. heytingAlgebraProxy3: heytingAlgebraProxy3,
  17477. ringProxy3: ringProxy3,
  17478. semigroupProxy3: semigroupProxy3,
  17479. semiringProxy3: semiringProxy3,
  17480. showProxy3: showProxy3
  17481. };
  17482. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.BooleanAlgebra/index.js":"../output/Data.BooleanAlgebra/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Foreign.Generic.Class/index.js":[function(require,module,exports) {
  17483. // Generated by purs version 0.13.6
  17484. "use strict";
  17485. var Control_Alt = require("../Control.Alt/index.js");
  17486. var Control_Applicative = require("../Control.Applicative/index.js");
  17487. var Control_Bind = require("../Control.Bind/index.js");
  17488. var Control_Category = require("../Control.Category/index.js");
  17489. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  17490. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  17491. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  17492. var Data_Array = require("../Data.Array/index.js");
  17493. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  17494. var Data_Either = require("../Data.Either/index.js");
  17495. var Data_Foldable = require("../Data.Foldable/index.js");
  17496. var Data_Function = require("../Data.Function/index.js");
  17497. var Data_Functor = require("../Data.Functor/index.js");
  17498. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  17499. var Data_Identity = require("../Data.Identity/index.js");
  17500. var Data_List = require("../Data.List/index.js");
  17501. var Data_List_Types = require("../Data.List.Types/index.js");
  17502. var Data_Maybe = require("../Data.Maybe/index.js");
  17503. var Data_Monoid = require("../Data.Monoid/index.js");
  17504. var Data_Newtype = require("../Data.Newtype/index.js");
  17505. var Data_Semigroup = require("../Data.Semigroup/index.js");
  17506. var Data_Show = require("../Data.Show/index.js");
  17507. var Data_Symbol = require("../Data.Symbol/index.js");
  17508. var Data_Traversable = require("../Data.Traversable/index.js");
  17509. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  17510. var Data_Unit = require("../Data.Unit/index.js");
  17511. var Data_Void = require("../Data.Void/index.js");
  17512. var Foreign = require("../Foreign/index.js");
  17513. var Foreign_Generic_Internal = require("../Foreign.Generic.Internal/index.js");
  17514. var Foreign_Index = require("../Foreign.Index/index.js");
  17515. var Foreign_NullOrUndefined = require("../Foreign.NullOrUndefined/index.js");
  17516. var Foreign_Object = require("../Foreign.Object/index.js");
  17517. var Record = require("../Record/index.js");
  17518. var Record_Builder = require("../Record.Builder/index.js");
  17519. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  17520. var Type_Proxy = require("../Type.Proxy/index.js");
  17521. var TaggedObject = function () {
  17522. function TaggedObject(value0) {
  17523. this.value0 = value0;
  17524. }
  17525. ;
  17526. TaggedObject.create = function (value0) {
  17527. return new TaggedObject(value0);
  17528. };
  17529. return TaggedObject;
  17530. }();
  17531. var GenericEncodeArgs = function GenericEncodeArgs(encodeArgs) {
  17532. this.encodeArgs = encodeArgs;
  17533. };
  17534. var GenericEncode = function GenericEncode(encodeOpts) {
  17535. this.encodeOpts = encodeOpts;
  17536. };
  17537. var GenericDecodeArgs = function GenericDecodeArgs(decodeArgs) {
  17538. this.decodeArgs = decodeArgs;
  17539. };
  17540. var GenericDecode = function GenericDecode(decodeOpts) {
  17541. this.decodeOpts = decodeOpts;
  17542. };
  17543. var GenericCountArgs = function GenericCountArgs(countArgs) {
  17544. this.countArgs = countArgs;
  17545. };
  17546. var EncodeWithOptions = function EncodeWithOptions(encodeWithOptions) {
  17547. this.encodeWithOptions = encodeWithOptions;
  17548. };
  17549. var EncodeRecord = function EncodeRecord(encodeRecordWithOptions) {
  17550. this.encodeRecordWithOptions = encodeRecordWithOptions;
  17551. };
  17552. var Encode = function Encode(encode) {
  17553. this.encode = encode;
  17554. };
  17555. var DecodeWithOptions = function DecodeWithOptions(decodeWithOptions) {
  17556. this.decodeWithOptions = decodeWithOptions;
  17557. };
  17558. var DecodeRecord = function DecodeRecord(decodeRecordWithOptions) {
  17559. this.decodeRecordWithOptions = decodeRecordWithOptions;
  17560. };
  17561. var Decode = function Decode(decode) {
  17562. this.decode = decode;
  17563. };
  17564. var voidEncode = new Encode(Data_Void.absurd);
  17565. var voidDecode = new Decode(function (v) {
  17566. return Control_Monad_Except_Trans.except(Data_Identity.applicativeIdentity)(new Data_Either.Left(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Decode: void"))));
  17567. });
  17568. var unitEncode = new Encode(function (v) {
  17569. return Foreign.unsafeToForeign({});
  17570. });
  17571. var unitDecode = new Decode(function (v) {
  17572. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Unit.unit);
  17573. });
  17574. var stringEncode = new Encode(Foreign.unsafeToForeign);
  17575. var stringDecode = new Decode(Foreign.readString);
  17576. var numberEncode = new Encode(Foreign.unsafeToForeign);
  17577. var numberDecode = new Decode(Foreign.readNumber);
  17578. var intEncode = new Encode(Foreign.unsafeToForeign);
  17579. var intDecode = new Decode(Foreign.readInt);
  17580. var genericEncodeArgsNoArguments = new GenericEncodeArgs(function (v) {
  17581. return Data_Monoid.mempty(Data_Monoid.monoidFn(Data_List_Types.monoidList));
  17582. });
  17583. var genericDecodeNoConstructors = new GenericDecode(function (opts) {
  17584. return function (v) {
  17585. return Foreign.fail(new Foreign.ForeignError("No constructors"));
  17586. };
  17587. });
  17588. var genericDecodeArgsNoArguments = new GenericDecodeArgs(function (v) {
  17589. return function (v1) {
  17590. return function (v2) {
  17591. if (v2 instanceof Data_List_Types.Nil) {
  17592. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
  17593. result: Data_Generic_Rep.NoArguments.value,
  17594. rest: Data_List_Types.Nil.value,
  17595. next: v1
  17596. });
  17597. }
  17598. ;
  17599. return Foreign.fail(new Foreign.ForeignError("Too many constructor arguments"));
  17600. };
  17601. };
  17602. });
  17603. var genericCountArgsNoArguments = new GenericCountArgs(function (v) {
  17604. return new Data_Either.Left(Data_Generic_Rep.NoArguments.value);
  17605. });
  17606. var genericCountArgsArgument = new GenericCountArgs(function (v) {
  17607. return new Data_Either.Right(1);
  17608. });
  17609. var foreignEncode = new Encode(Control_Category.identity(Control_Category.categoryFn));
  17610. var foreignDecode = new Decode(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)));
  17611. var encodeWithOptions = function encodeWithOptions(dict) {
  17612. return dict.encodeWithOptions;
  17613. };
  17614. var genericEncodeArgsArgument = function genericEncodeArgsArgument(dictEncodeWithOptions) {
  17615. return new GenericEncodeArgs(function (opts) {
  17616. return function (v) {
  17617. return Data_List.singleton(encodeWithOptions(dictEncodeWithOptions)(opts)(v));
  17618. };
  17619. });
  17620. };
  17621. var encodeRecordWithOptions = function encodeRecordWithOptions(dict) {
  17622. return dict.encodeRecordWithOptions;
  17623. };
  17624. var encodeWithOptionsRecord = function encodeWithOptionsRecord(dictRowToList) {
  17625. return function (dictEncodeRecord) {
  17626. return new EncodeWithOptions(function (opts) {
  17627. var $148 = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts);
  17628. return function ($149) {
  17629. return Foreign.unsafeToForeign($148($149));
  17630. };
  17631. });
  17632. };
  17633. };
  17634. var encodeRecordNil = new EncodeRecord(function (v) {
  17635. return function (v1) {
  17636. return function (v2) {
  17637. return Foreign_Object.empty;
  17638. };
  17639. };
  17640. });
  17641. var encodeRecordCons = function encodeRecordCons(dictCons) {
  17642. return function (dictEncodeRecord) {
  17643. return function (dictIsSymbol) {
  17644. return function (dictEncodeWithOptions) {
  17645. return new EncodeRecord(function (v) {
  17646. return function (opts) {
  17647. return function (rec) {
  17648. var obj = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(rec);
  17649. var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17650. return Foreign_Object.insert(opts.fieldTransform(l))(encodeWithOptions(dictEncodeWithOptions)(opts)(Record.get(dictIsSymbol)()(Data_Symbol.SProxy.value)(rec)))(obj);
  17651. };
  17652. };
  17653. });
  17654. };
  17655. };
  17656. };
  17657. };
  17658. var encodeOpts = function encodeOpts(dict) {
  17659. return dict.encodeOpts;
  17660. };
  17661. var genericEncodeNoConstructors = new GenericEncode(function (opts) {
  17662. return function (a) {
  17663. return encodeOpts(genericEncodeNoConstructors)(opts)(a);
  17664. };
  17665. });
  17666. var genericEncodeSum = function genericEncodeSum(dictGenericEncode) {
  17667. return function (dictGenericEncode1) {
  17668. return new GenericEncode(function (opts) {
  17669. return function (v) {
  17670. if (v instanceof Data_Generic_Rep.Inl) {
  17671. return encodeOpts(dictGenericEncode)({
  17672. sumEncoding: opts.sumEncoding,
  17673. unwrapSingleConstructors: false,
  17674. unwrapSingleArguments: opts.unwrapSingleArguments,
  17675. fieldTransform: opts.fieldTransform
  17676. })(v.value0);
  17677. }
  17678. ;
  17679. if (v instanceof Data_Generic_Rep.Inr) {
  17680. return encodeOpts(dictGenericEncode1)({
  17681. sumEncoding: opts.sumEncoding,
  17682. unwrapSingleConstructors: false,
  17683. unwrapSingleArguments: opts.unwrapSingleArguments,
  17684. fieldTransform: opts.fieldTransform
  17685. })(v.value0);
  17686. }
  17687. ;
  17688. throw new Error("Failed pattern match at Foreign.Generic.Class (line 351, column 1 - line 355, column 85): " + [opts.constructor.name, v.constructor.name]);
  17689. };
  17690. });
  17691. };
  17692. };
  17693. var encodeArgs = function encodeArgs(dict) {
  17694. return dict.encodeArgs;
  17695. };
  17696. var genericEncodeArgsProduct = function genericEncodeArgsProduct(dictGenericEncodeArgs) {
  17697. return function (dictGenericEncodeArgs1) {
  17698. return new GenericEncodeArgs(function (opts) {
  17699. return function (v) {
  17700. return Data_Semigroup.append(Data_List_Types.semigroupList)(encodeArgs(dictGenericEncodeArgs)(opts)(v.value0))(encodeArgs(dictGenericEncodeArgs1)(opts)(v.value1));
  17701. };
  17702. });
  17703. };
  17704. };
  17705. var genericEncodeConstructor = function genericEncodeConstructor(dictIsSymbol) {
  17706. return function (dictGenericEncodeArgs) {
  17707. return new GenericEncode(function (opts) {
  17708. return function (v) {
  17709. var unwrapArguments = function unwrapArguments(v1) {
  17710. if (v1.length === 0) {
  17711. return Data_Maybe.Nothing.value;
  17712. }
  17713. ;
  17714. if (v1.length === 1 && opts.unwrapSingleArguments) {
  17715. return new Data_Maybe.Just(v1[0]);
  17716. }
  17717. ;
  17718. return new Data_Maybe.Just(Foreign.unsafeToForeign(v1));
  17719. };
  17720. var encodeArgsArray = function () {
  17721. var $150 = Data_List.toUnfoldable(Data_Unfoldable.unfoldableArray);
  17722. var $151 = encodeArgs(dictGenericEncodeArgs)(opts);
  17723. return function ($152) {
  17724. return unwrapArguments($150($151($152)));
  17725. };
  17726. }();
  17727. var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17728. if (opts.unwrapSingleConstructors) {
  17729. return Data_Maybe.maybe(Foreign.unsafeToForeign({}))(Foreign.unsafeToForeign)(encodeArgsArray(v));
  17730. }
  17731. ;
  17732. return Foreign.unsafeToForeign(Foreign_Object.union(Foreign_Object.singleton(opts.sumEncoding.value0.tagFieldName)(Foreign.unsafeToForeign(opts.sumEncoding.value0.constructorTagTransform(ctorName))))(Data_Maybe.maybe(Foreign_Object.empty)(Foreign_Object.singleton(opts.sumEncoding.value0.contentsFieldName))(encodeArgsArray(v))));
  17733. };
  17734. });
  17735. };
  17736. };
  17737. var encode = function encode(dict) {
  17738. return dict.encode;
  17739. };
  17740. var encodeWithOptionsOther = function encodeWithOptionsOther(dictEncode) {
  17741. return new EncodeWithOptions(function (v) {
  17742. return encode(dictEncode);
  17743. });
  17744. };
  17745. var identityEncode = function identityEncode(dictEncode) {
  17746. return new Encode(function () {
  17747. var $153 = encode(dictEncode);
  17748. var $154 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  17749. return function ($155) {
  17750. return $153($154($155));
  17751. };
  17752. }());
  17753. };
  17754. var maybeEncode = function maybeEncode(dictEncode) {
  17755. return new Encode(Data_Maybe.maybe(Foreign_NullOrUndefined["null"])(encode(dictEncode)));
  17756. };
  17757. var objectEncode = function objectEncode(dictEncode) {
  17758. return new Encode(function () {
  17759. var $156 = Foreign_Object.mapWithKey(function (v) {
  17760. return encode(dictEncode);
  17761. });
  17762. return function ($157) {
  17763. return Foreign.unsafeToForeign($156($157));
  17764. };
  17765. }());
  17766. };
  17767. var defaultOptions = {
  17768. sumEncoding: new TaggedObject({
  17769. tagFieldName: "tag",
  17770. contentsFieldName: "contents",
  17771. constructorTagTransform: Control_Category.identity(Control_Category.categoryFn)
  17772. }),
  17773. unwrapSingleConstructors: false,
  17774. unwrapSingleArguments: true,
  17775. fieldTransform: Control_Category.identity(Control_Category.categoryFn)
  17776. };
  17777. var recordEncode = function recordEncode(dictRowToList) {
  17778. return function (dictEncodeRecord) {
  17779. return new Encode(encodeWithOptions(encodeWithOptionsRecord()(dictEncodeRecord))(defaultOptions));
  17780. };
  17781. };
  17782. var decodeWithOptions = function decodeWithOptions(dict) {
  17783. return dict.decodeWithOptions;
  17784. };
  17785. var genericDecodeArgsArgument = function genericDecodeArgsArgument(dictDecodeWithOptions) {
  17786. return new GenericDecodeArgs(function (v) {
  17787. return function (v1) {
  17788. return function (v2) {
  17789. if (v2 instanceof Data_List_Types.Cons) {
  17790. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(v1))))(decodeWithOptions(dictDecodeWithOptions)(v)(v2.value0)))(function (a) {
  17791. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
  17792. result: a,
  17793. rest: v2.value1,
  17794. next: v1 + 1 | 0
  17795. });
  17796. });
  17797. }
  17798. ;
  17799. return Foreign.fail(new Foreign.ForeignError("Not enough constructor arguments"));
  17800. };
  17801. };
  17802. });
  17803. };
  17804. var decodeRecordWithOptions = function decodeRecordWithOptions(dict) {
  17805. return dict.decodeRecordWithOptions;
  17806. };
  17807. var decodeWithOptionsRecord = function decodeWithOptionsRecord(dictRowToList) {
  17808. return function (dictDecodeRecord) {
  17809. return new DecodeWithOptions(function (opts) {
  17810. return Data_Functor.map(Data_Functor.functorFn)(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Function.flip(Record_Builder.build)({})))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts));
  17811. });
  17812. };
  17813. };
  17814. var recordDecode = function recordDecode(dictRowToList) {
  17815. return function (dictDecodeRecord) {
  17816. return new Decode(decodeWithOptions(decodeWithOptionsRecord()(dictDecodeRecord))(defaultOptions));
  17817. };
  17818. };
  17819. var decodeRecordNil = new DecodeRecord(function (v) {
  17820. return function (v1) {
  17821. return function (v2) {
  17822. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Category.identity(Record_Builder.categoryBuilder));
  17823. };
  17824. };
  17825. });
  17826. var decodeRecordCons = function decodeRecordCons(dictCons) {
  17827. return function (dictDecodeRecord) {
  17828. return function (dictIsSymbol) {
  17829. return function (dictDecodeWithOptions) {
  17830. return function (dictLacks) {
  17831. return new DecodeRecord(function (v) {
  17832. return function (opts) {
  17833. return function (f) {
  17834. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(f))(function (builder) {
  17835. var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17836. var l_transformed = opts.fieldTransform(l);
  17837. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(l_transformed))(function (f_) {
  17838. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(l_transformed))))(decodeWithOptions(dictDecodeWithOptions)(opts)(f_)))(function (a) {
  17839. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Semigroupoid.composeFlipped(Record_Builder.semigroupoidBuilder)(builder)(Record_Builder.insert()()(dictIsSymbol)(Data_Symbol.SProxy.value)(a)));
  17840. });
  17841. });
  17842. });
  17843. };
  17844. };
  17845. });
  17846. };
  17847. };
  17848. };
  17849. };
  17850. };
  17851. var decodeOpts = function decodeOpts(dict) {
  17852. return dict.decodeOpts;
  17853. };
  17854. var genericDecodeSum = function genericDecodeSum(dictGenericDecode) {
  17855. return function (dictGenericDecode1) {
  17856. return new GenericDecode(function (opts) {
  17857. return function (f) {
  17858. var opts$prime = {
  17859. unwrapSingleConstructors: false,
  17860. fieldTransform: opts.fieldTransform,
  17861. sumEncoding: opts.sumEncoding,
  17862. unwrapSingleArguments: opts.unwrapSingleArguments
  17863. };
  17864. return Control_Alt.alt(Control_Monad_Except_Trans.altExceptT(Data_List_Types.semigroupNonEmptyList)(Data_Identity.monadIdentity))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Inl.create)(decodeOpts(dictGenericDecode)(opts$prime)(f)))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Inr.create)(decodeOpts(dictGenericDecode1)(opts$prime)(f)));
  17865. };
  17866. });
  17867. };
  17868. };
  17869. var decodeArgs = function decodeArgs(dict) {
  17870. return dict.decodeArgs;
  17871. };
  17872. var genericDecodeArgsProduct = function genericDecodeArgsProduct(dictGenericDecodeArgs) {
  17873. return function (dictGenericDecodeArgs1) {
  17874. return new GenericDecodeArgs(function (opts) {
  17875. return function (i) {
  17876. return function (xs) {
  17877. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(i)(xs))(function (v) {
  17878. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs1)(opts)(v.next)(v.rest))(function (v1) {
  17879. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
  17880. result: new Data_Generic_Rep.Product(v.result, v1.result),
  17881. rest: v1.rest,
  17882. next: v1.next
  17883. });
  17884. });
  17885. });
  17886. };
  17887. };
  17888. });
  17889. };
  17890. };
  17891. var decode = function decode(dict) {
  17892. return dict.decode;
  17893. };
  17894. var decodeWithOptionsOther = function decodeWithOptionsOther(dictDecode) {
  17895. return new DecodeWithOptions(function (v) {
  17896. return decode(dictDecode);
  17897. });
  17898. };
  17899. var identityDecode = function identityDecode(dictDecode) {
  17900. return new Decode(function () {
  17901. var $158 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Identity.Identity);
  17902. var $159 = decode(dictDecode);
  17903. return function ($160) {
  17904. return $158($159($160));
  17905. };
  17906. }());
  17907. };
  17908. var maybeDecode = function maybeDecode(dictDecode) {
  17909. return new Decode(Foreign_NullOrUndefined.readNullOrUndefined(decode(dictDecode)));
  17910. };
  17911. var objectDecode = function objectDecode(dictDecode) {
  17912. return new Decode(Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () {
  17913. var $161 = Data_Traversable.sequence(Foreign_Object.traversableObject)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity));
  17914. var $162 = Foreign_Object.mapWithKey(function (v) {
  17915. return decode(dictDecode);
  17916. });
  17917. return function ($163) {
  17918. return $161($162($163));
  17919. };
  17920. }())(Foreign_Generic_Internal.readObject));
  17921. };
  17922. var countArgs = function countArgs(dict) {
  17923. return dict.countArgs;
  17924. };
  17925. var genericCountArgsProduct = function genericCountArgsProduct(dictGenericCountArgs) {
  17926. return function (dictGenericCountArgs1) {
  17927. return new GenericCountArgs(function (v) {
  17928. var v1 = countArgs(dictGenericCountArgs1)(Type_Proxy["Proxy"].value);
  17929. var v2 = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value);
  17930. if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Left) {
  17931. return new Data_Either.Left(new Data_Generic_Rep.Product(v2.value0, v1.value0));
  17932. }
  17933. ;
  17934. if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Right) {
  17935. return new Data_Either.Right(v1.value0);
  17936. }
  17937. ;
  17938. if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Left) {
  17939. return new Data_Either.Right(v2.value0);
  17940. }
  17941. ;
  17942. if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Right) {
  17943. return new Data_Either.Right(v2.value0 + v1.value0 | 0);
  17944. }
  17945. ;
  17946. throw new Error("Failed pattern match at Foreign.Generic.Class (line 400, column 5 - line 404, column 40): " + [v2.constructor.name, v1.constructor.name]);
  17947. });
  17948. };
  17949. };
  17950. var genericDecodeConstructor = function genericDecodeConstructor(dictIsSymbol) {
  17951. return function (dictGenericDecodeArgs) {
  17952. return function (dictGenericCountArgs) {
  17953. return new GenericDecode(function (opts) {
  17954. return function (f) {
  17955. var numArgs = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value);
  17956. var readArguments = function readArguments(args) {
  17957. if (numArgs instanceof Data_Either.Left) {
  17958. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(numArgs.value0);
  17959. }
  17960. ;
  17961. if (numArgs instanceof Data_Either.Right && numArgs.value0 === 1 && opts.unwrapSingleArguments) {
  17962. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.singleton(args)))(function (v) {
  17963. return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List["null"](v.rest))(Foreign.fail(new Foreign.ForeignError("Expected a single argument"))))(function () {
  17964. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result);
  17965. });
  17966. });
  17967. }
  17968. ;
  17969. if (numArgs instanceof Data_Either.Right) {
  17970. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray(args))(function (vals) {
  17971. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.fromFoldable(Data_Foldable.foldableArray)(vals)))(function (v) {
  17972. return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List["null"](v.rest))(Foreign.fail(new Foreign.ForeignError("Expected " + (Data_Show.show(Data_Show.showInt)(numArgs.value0) + " constructor arguments")))))(function () {
  17973. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result);
  17974. });
  17975. });
  17976. });
  17977. }
  17978. ;
  17979. throw new Error("Failed pattern match at Foreign.Generic.Class (line 307, column 9 - line 319, column 24): " + [numArgs.constructor.name]);
  17980. };
  17981. var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17982. if (opts.unwrapSingleConstructors) {
  17983. return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Constructor)(readArguments(f));
  17984. }
  17985. ;
  17986. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(opts.sumEncoding.value0.tagFieldName))))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(opts.sumEncoding.value0.tagFieldName))(Foreign.readString))(function (tag) {
  17987. var expected = opts.sumEncoding.value0.constructorTagTransform(ctorName);
  17988. return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(tag === expected)(Foreign.fail(new Foreign.ForeignError("Expected " + (Data_Show.show(Data_Show.showString)(expected) + " tag")))))(function () {
  17989. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(tag);
  17990. });
  17991. })))(function (tag) {
  17992. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(opts.sumEncoding.value0.contentsFieldName))))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(opts.sumEncoding.value0.contentsFieldName))(readArguments)))(function (args) {
  17993. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(args);
  17994. });
  17995. });
  17996. };
  17997. });
  17998. };
  17999. };
  18000. };
  18001. var charEncode = new Encode(Foreign.unsafeToForeign);
  18002. var charDecode = new Decode(Foreign.readChar);
  18003. var booleanEncode = new Encode(Foreign.unsafeToForeign);
  18004. var booleanDecode = new Decode(Foreign.readBoolean);
  18005. var arrayEncode = function arrayEncode(dictEncode) {
  18006. return new Encode(function () {
  18007. var $164 = Data_Functor.map(Data_Functor.functorArray)(encode(dictEncode));
  18008. return function ($165) {
  18009. return Foreign.unsafeToForeign($164($165));
  18010. };
  18011. }());
  18012. };
  18013. var arrayDecode = function arrayDecode(dictDecode) {
  18014. return new Decode(function () {
  18015. var readElement = function readElement(i) {
  18016. return function (value) {
  18017. return Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(i))))(decode(dictDecode)(value));
  18018. };
  18019. };
  18020. var readElements = function readElements(arr) {
  18021. return Data_Traversable.sequence(Data_Traversable.traversableArray)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Array.zipWith(readElement)(Data_Array.range(0)(Data_Array.length(arr)))(arr));
  18022. };
  18023. return Control_Bind.composeKleisli(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray)(readElements);
  18024. }());
  18025. };
  18026. module.exports = {
  18027. countArgs: countArgs,
  18028. decode: decode,
  18029. decodeArgs: decodeArgs,
  18030. decodeOpts: decodeOpts,
  18031. decodeRecordWithOptions: decodeRecordWithOptions,
  18032. decodeWithOptions: decodeWithOptions,
  18033. encode: encode,
  18034. encodeArgs: encodeArgs,
  18035. encodeOpts: encodeOpts,
  18036. encodeRecordWithOptions: encodeRecordWithOptions,
  18037. encodeWithOptions: encodeWithOptions,
  18038. TaggedObject: TaggedObject,
  18039. defaultOptions: defaultOptions,
  18040. Decode: Decode,
  18041. Encode: Encode,
  18042. DecodeWithOptions: DecodeWithOptions,
  18043. EncodeWithOptions: EncodeWithOptions,
  18044. DecodeRecord: DecodeRecord,
  18045. EncodeRecord: EncodeRecord,
  18046. GenericDecode: GenericDecode,
  18047. GenericEncode: GenericEncode,
  18048. GenericDecodeArgs: GenericDecodeArgs,
  18049. GenericEncodeArgs: GenericEncodeArgs,
  18050. GenericCountArgs: GenericCountArgs,
  18051. voidDecode: voidDecode,
  18052. unitDecode: unitDecode,
  18053. foreignDecode: foreignDecode,
  18054. stringDecode: stringDecode,
  18055. charDecode: charDecode,
  18056. booleanDecode: booleanDecode,
  18057. numberDecode: numberDecode,
  18058. intDecode: intDecode,
  18059. identityDecode: identityDecode,
  18060. arrayDecode: arrayDecode,
  18061. maybeDecode: maybeDecode,
  18062. objectDecode: objectDecode,
  18063. recordDecode: recordDecode,
  18064. voidEncode: voidEncode,
  18065. unitEncode: unitEncode,
  18066. foreignEncode: foreignEncode,
  18067. stringEncode: stringEncode,
  18068. charEncode: charEncode,
  18069. booleanEncode: booleanEncode,
  18070. numberEncode: numberEncode,
  18071. intEncode: intEncode,
  18072. identityEncode: identityEncode,
  18073. arrayEncode: arrayEncode,
  18074. maybeEncode: maybeEncode,
  18075. objectEncode: objectEncode,
  18076. recordEncode: recordEncode,
  18077. decodeWithOptionsRecord: decodeWithOptionsRecord,
  18078. decodeWithOptionsOther: decodeWithOptionsOther,
  18079. encodeWithOptionsRecord: encodeWithOptionsRecord,
  18080. encodeWithOptionsOther: encodeWithOptionsOther,
  18081. decodeRecordNil: decodeRecordNil,
  18082. encodeRecordNil: encodeRecordNil,
  18083. decodeRecordCons: decodeRecordCons,
  18084. encodeRecordCons: encodeRecordCons,
  18085. genericDecodeNoConstructors: genericDecodeNoConstructors,
  18086. genericEncodeNoConstructors: genericEncodeNoConstructors,
  18087. genericDecodeConstructor: genericDecodeConstructor,
  18088. genericEncodeConstructor: genericEncodeConstructor,
  18089. genericDecodeSum: genericDecodeSum,
  18090. genericEncodeSum: genericEncodeSum,
  18091. genericDecodeArgsNoArguments: genericDecodeArgsNoArguments,
  18092. genericEncodeArgsNoArguments: genericEncodeArgsNoArguments,
  18093. genericDecodeArgsArgument: genericDecodeArgsArgument,
  18094. genericEncodeArgsArgument: genericEncodeArgsArgument,
  18095. genericDecodeArgsProduct: genericDecodeArgsProduct,
  18096. genericEncodeArgsProduct: genericEncodeArgsProduct,
  18097. genericCountArgsNoArguments: genericCountArgsNoArguments,
  18098. genericCountArgsArgument: genericCountArgsArgument,
  18099. genericCountArgsProduct: genericCountArgsProduct
  18100. };
  18101. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Data.Void/index.js":"../output/Data.Void/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic.Internal/index.js":"../output/Foreign.Generic.Internal/index.js","../Foreign.Index/index.js":"../output/Foreign.Index/index.js","../Foreign.NullOrUndefined/index.js":"../output/Foreign.NullOrUndefined/index.js","../Foreign.Object/index.js":"../output/Foreign.Object/index.js","../Record/index.js":"../output/Record/index.js","../Record.Builder/index.js":"../output/Record.Builder/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js","../Type.Proxy/index.js":"../output/Type.Proxy/index.js"}],"../output/Foreign.JSON/foreign.js":[function(require,module,exports) {
  18102. "use strict";
  18103. exports.parseJSONImpl = function (str) {
  18104. return JSON.parse(str);
  18105. };
  18106. },{}],"../output/Effect.Uncurried/foreign.js":[function(require,module,exports) {
  18107. "use strict";
  18108. exports.mkEffectFn1 = function mkEffectFn1(fn) {
  18109. return function (x) {
  18110. return fn(x)();
  18111. };
  18112. };
  18113. exports.mkEffectFn2 = function mkEffectFn2(fn) {
  18114. return function (a, b) {
  18115. return fn(a)(b)();
  18116. };
  18117. };
  18118. exports.mkEffectFn3 = function mkEffectFn3(fn) {
  18119. return function (a, b, c) {
  18120. return fn(a)(b)(c)();
  18121. };
  18122. };
  18123. exports.mkEffectFn4 = function mkEffectFn4(fn) {
  18124. return function (a, b, c, d) {
  18125. return fn(a)(b)(c)(d)();
  18126. };
  18127. };
  18128. exports.mkEffectFn5 = function mkEffectFn5(fn) {
  18129. return function (a, b, c, d, e) {
  18130. return fn(a)(b)(c)(d)(e)();
  18131. };
  18132. };
  18133. exports.mkEffectFn6 = function mkEffectFn6(fn) {
  18134. return function (a, b, c, d, e, f) {
  18135. return fn(a)(b)(c)(d)(e)(f)();
  18136. };
  18137. };
  18138. exports.mkEffectFn7 = function mkEffectFn7(fn) {
  18139. return function (a, b, c, d, e, f, g) {
  18140. return fn(a)(b)(c)(d)(e)(f)(g)();
  18141. };
  18142. };
  18143. exports.mkEffectFn8 = function mkEffectFn8(fn) {
  18144. return function (a, b, c, d, e, f, g, h) {
  18145. return fn(a)(b)(c)(d)(e)(f)(g)(h)();
  18146. };
  18147. };
  18148. exports.mkEffectFn9 = function mkEffectFn9(fn) {
  18149. return function (a, b, c, d, e, f, g, h, i) {
  18150. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)();
  18151. };
  18152. };
  18153. exports.mkEffectFn10 = function mkEffectFn10(fn) {
  18154. return function (a, b, c, d, e, f, g, h, i, j) {
  18155. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)();
  18156. };
  18157. };
  18158. exports.runEffectFn1 = function runEffectFn1(fn) {
  18159. return function (a) {
  18160. return function () {
  18161. return fn(a);
  18162. };
  18163. };
  18164. };
  18165. exports.runEffectFn2 = function runEffectFn2(fn) {
  18166. return function (a) {
  18167. return function (b) {
  18168. return function () {
  18169. return fn(a, b);
  18170. };
  18171. };
  18172. };
  18173. };
  18174. exports.runEffectFn3 = function runEffectFn3(fn) {
  18175. return function (a) {
  18176. return function (b) {
  18177. return function (c) {
  18178. return function () {
  18179. return fn(a, b, c);
  18180. };
  18181. };
  18182. };
  18183. };
  18184. };
  18185. exports.runEffectFn4 = function runEffectFn4(fn) {
  18186. return function (a) {
  18187. return function (b) {
  18188. return function (c) {
  18189. return function (d) {
  18190. return function () {
  18191. return fn(a, b, c, d);
  18192. };
  18193. };
  18194. };
  18195. };
  18196. };
  18197. };
  18198. exports.runEffectFn5 = function runEffectFn5(fn) {
  18199. return function (a) {
  18200. return function (b) {
  18201. return function (c) {
  18202. return function (d) {
  18203. return function (e) {
  18204. return function () {
  18205. return fn(a, b, c, d, e);
  18206. };
  18207. };
  18208. };
  18209. };
  18210. };
  18211. };
  18212. };
  18213. exports.runEffectFn6 = function runEffectFn6(fn) {
  18214. return function (a) {
  18215. return function (b) {
  18216. return function (c) {
  18217. return function (d) {
  18218. return function (e) {
  18219. return function (f) {
  18220. return function () {
  18221. return fn(a, b, c, d, e, f);
  18222. };
  18223. };
  18224. };
  18225. };
  18226. };
  18227. };
  18228. };
  18229. };
  18230. exports.runEffectFn7 = function runEffectFn7(fn) {
  18231. return function (a) {
  18232. return function (b) {
  18233. return function (c) {
  18234. return function (d) {
  18235. return function (e) {
  18236. return function (f) {
  18237. return function (g) {
  18238. return function () {
  18239. return fn(a, b, c, d, e, f, g);
  18240. };
  18241. };
  18242. };
  18243. };
  18244. };
  18245. };
  18246. };
  18247. };
  18248. };
  18249. exports.runEffectFn8 = function runEffectFn8(fn) {
  18250. return function (a) {
  18251. return function (b) {
  18252. return function (c) {
  18253. return function (d) {
  18254. return function (e) {
  18255. return function (f) {
  18256. return function (g) {
  18257. return function (h) {
  18258. return function () {
  18259. return fn(a, b, c, d, e, f, g, h);
  18260. };
  18261. };
  18262. };
  18263. };
  18264. };
  18265. };
  18266. };
  18267. };
  18268. };
  18269. };
  18270. exports.runEffectFn9 = function runEffectFn9(fn) {
  18271. return function (a) {
  18272. return function (b) {
  18273. return function (c) {
  18274. return function (d) {
  18275. return function (e) {
  18276. return function (f) {
  18277. return function (g) {
  18278. return function (h) {
  18279. return function (i) {
  18280. return function () {
  18281. return fn(a, b, c, d, e, f, g, h, i);
  18282. };
  18283. };
  18284. };
  18285. };
  18286. };
  18287. };
  18288. };
  18289. };
  18290. };
  18291. };
  18292. };
  18293. exports.runEffectFn10 = function runEffectFn10(fn) {
  18294. return function (a) {
  18295. return function (b) {
  18296. return function (c) {
  18297. return function (d) {
  18298. return function (e) {
  18299. return function (f) {
  18300. return function (g) {
  18301. return function (h) {
  18302. return function (i) {
  18303. return function (j) {
  18304. return function () {
  18305. return fn(a, b, c, d, e, f, g, h, i, j);
  18306. };
  18307. };
  18308. };
  18309. };
  18310. };
  18311. };
  18312. };
  18313. };
  18314. };
  18315. };
  18316. };
  18317. };
  18318. },{}],"../output/Effect.Uncurried/index.js":[function(require,module,exports) {
  18319. // Generated by purs version 0.13.6
  18320. "use strict";
  18321. var $foreign = require("./foreign.js");
  18322. module.exports = {
  18323. mkEffectFn1: $foreign.mkEffectFn1,
  18324. mkEffectFn2: $foreign.mkEffectFn2,
  18325. mkEffectFn3: $foreign.mkEffectFn3,
  18326. mkEffectFn4: $foreign.mkEffectFn4,
  18327. mkEffectFn5: $foreign.mkEffectFn5,
  18328. mkEffectFn6: $foreign.mkEffectFn6,
  18329. mkEffectFn7: $foreign.mkEffectFn7,
  18330. mkEffectFn8: $foreign.mkEffectFn8,
  18331. mkEffectFn9: $foreign.mkEffectFn9,
  18332. mkEffectFn10: $foreign.mkEffectFn10,
  18333. runEffectFn1: $foreign.runEffectFn1,
  18334. runEffectFn2: $foreign.runEffectFn2,
  18335. runEffectFn3: $foreign.runEffectFn3,
  18336. runEffectFn4: $foreign.runEffectFn4,
  18337. runEffectFn5: $foreign.runEffectFn5,
  18338. runEffectFn6: $foreign.runEffectFn6,
  18339. runEffectFn7: $foreign.runEffectFn7,
  18340. runEffectFn8: $foreign.runEffectFn8,
  18341. runEffectFn9: $foreign.runEffectFn9,
  18342. runEffectFn10: $foreign.runEffectFn10
  18343. };
  18344. },{"./foreign.js":"../output/Effect.Uncurried/foreign.js"}],"../output/Effect.Unsafe/foreign.js":[function(require,module,exports) {
  18345. "use strict";
  18346. exports.unsafePerformEffect = function (f) {
  18347. return f();
  18348. };
  18349. },{}],"../output/Effect.Unsafe/index.js":[function(require,module,exports) {
  18350. // Generated by purs version 0.13.6
  18351. "use strict";
  18352. var $foreign = require("./foreign.js");
  18353. module.exports = {
  18354. unsafePerformEffect: $foreign.unsafePerformEffect
  18355. };
  18356. },{"./foreign.js":"../output/Effect.Unsafe/foreign.js"}],"../output/Foreign.JSON/index.js":[function(require,module,exports) {
  18357. // Generated by purs version 0.13.6
  18358. "use strict";
  18359. var $foreign = require("./foreign.js");
  18360. var Control_Applicative = require("../Control.Applicative/index.js");
  18361. var Control_Bind = require("../Control.Bind/index.js");
  18362. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  18363. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  18364. var Data_Either = require("../Data.Either/index.js");
  18365. var Data_Identity = require("../Data.Identity/index.js");
  18366. var Data_List_Types = require("../Data.List.Types/index.js");
  18367. var Effect_Exception = require("../Effect.Exception/index.js");
  18368. var Effect_Uncurried = require("../Effect.Uncurried/index.js");
  18369. var Effect_Unsafe = require("../Effect.Unsafe/index.js");
  18370. var Foreign = require("../Foreign/index.js");
  18371. var parseJSON = function () {
  18372. var $0 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(function () {
  18373. var $3 = Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList);
  18374. return function ($4) {
  18375. return $3(Foreign.ForeignError.create(Effect_Exception.message($4)));
  18376. };
  18377. }());
  18378. var $1 = Effect_Uncurried.runEffectFn1($foreign.parseJSONImpl);
  18379. return function ($2) {
  18380. return Control_Monad_Except_Trans.ExceptT(Data_Identity.Identity($0(Effect_Unsafe.unsafePerformEffect(Effect_Exception["try"]($1($2))))));
  18381. };
  18382. }();
  18383. var decodeJSONWith = function decodeJSONWith(f) {
  18384. return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(f)(parseJSON);
  18385. };
  18386. module.exports = {
  18387. parseJSON: parseJSON,
  18388. decodeJSONWith: decodeJSONWith
  18389. };
  18390. },{"./foreign.js":"../output/Foreign.JSON/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Effect.Uncurried/index.js":"../output/Effect.Uncurried/index.js","../Effect.Unsafe/index.js":"../output/Effect.Unsafe/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Global.Unsafe/foreign.js":[function(require,module,exports) {
  18391. /* globals exports, JSON */
  18392. "use strict";
  18393. exports.unsafeStringify = function (x) {
  18394. return JSON.stringify(x);
  18395. };
  18396. exports.unsafeToFixed = function (digits) {
  18397. return function (n) {
  18398. return n.toFixed(digits);
  18399. };
  18400. };
  18401. exports.unsafeToExponential = function (digits) {
  18402. return function (n) {
  18403. return n.toExponential(digits);
  18404. };
  18405. };
  18406. exports.unsafeToPrecision = function (digits) {
  18407. return function (n) {
  18408. return n.toPrecision(digits);
  18409. };
  18410. };
  18411. exports.unsafeDecodeURI = decodeURI;
  18412. exports.unsafeEncodeURI = encodeURI;
  18413. exports.unsafeDecodeURIComponent = decodeURIComponent;
  18414. exports.unsafeEncodeURIComponent = encodeURIComponent;
  18415. },{}],"../output/Global.Unsafe/index.js":[function(require,module,exports) {
  18416. // Generated by purs version 0.13.6
  18417. "use strict";
  18418. var $foreign = require("./foreign.js");
  18419. module.exports = {
  18420. unsafeStringify: $foreign.unsafeStringify,
  18421. unsafeToFixed: $foreign.unsafeToFixed,
  18422. unsafeToExponential: $foreign.unsafeToExponential,
  18423. unsafeToPrecision: $foreign.unsafeToPrecision,
  18424. unsafeDecodeURI: $foreign.unsafeDecodeURI,
  18425. unsafeEncodeURI: $foreign.unsafeEncodeURI,
  18426. unsafeDecodeURIComponent: $foreign.unsafeDecodeURIComponent,
  18427. unsafeEncodeURIComponent: $foreign.unsafeEncodeURIComponent
  18428. };
  18429. },{"./foreign.js":"../output/Global.Unsafe/foreign.js"}],"../output/Foreign.Generic/index.js":[function(require,module,exports) {
  18430. // Generated by purs version 0.13.6
  18431. "use strict";
  18432. var Control_Bind = require("../Control.Bind/index.js");
  18433. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  18434. var Data_Functor = require("../Data.Functor/index.js");
  18435. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  18436. var Data_Identity = require("../Data.Identity/index.js");
  18437. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  18438. var Foreign_JSON = require("../Foreign.JSON/index.js");
  18439. var Global_Unsafe = require("../Global.Unsafe/index.js");
  18440. var genericEncode = function genericEncode(dictGeneric) {
  18441. return function (dictGenericEncode) {
  18442. return function (opts) {
  18443. var $10 = Foreign_Generic_Class.encodeOpts(dictGenericEncode)(opts);
  18444. var $11 = Data_Generic_Rep.from(dictGeneric);
  18445. return function ($12) {
  18446. return $10($11($12));
  18447. };
  18448. };
  18449. };
  18450. };
  18451. var genericEncodeJSON = function genericEncodeJSON(dictGeneric) {
  18452. return function (dictGenericEncode) {
  18453. return function (opts) {
  18454. var $13 = genericEncode(dictGeneric)(dictGenericEncode)(opts);
  18455. return function ($14) {
  18456. return Global_Unsafe.unsafeStringify($13($14));
  18457. };
  18458. };
  18459. };
  18460. };
  18461. var genericDecode = function genericDecode(dictGeneric) {
  18462. return function (dictGenericDecode) {
  18463. return function (opts) {
  18464. var $15 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.to(dictGeneric));
  18465. var $16 = Foreign_Generic_Class.decodeOpts(dictGenericDecode)(opts);
  18466. return function ($17) {
  18467. return $15($16($17));
  18468. };
  18469. };
  18470. };
  18471. };
  18472. var genericDecodeJSON = function genericDecodeJSON(dictGeneric) {
  18473. return function (dictGenericDecode) {
  18474. return function (opts) {
  18475. return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(genericDecode(dictGeneric)(dictGenericDecode)(opts))(Foreign_JSON.parseJSON);
  18476. };
  18477. };
  18478. };
  18479. var encodeJSON = function encodeJSON(dictEncode) {
  18480. var $18 = Foreign_Generic_Class.encode(dictEncode);
  18481. return function ($19) {
  18482. return Global_Unsafe.unsafeStringify($18($19));
  18483. };
  18484. };
  18485. var decodeJSON = function decodeJSON(dictDecode) {
  18486. return Foreign_JSON.decodeJSONWith(Foreign_Generic_Class.decode(dictDecode));
  18487. };
  18488. module.exports = {
  18489. genericDecode: genericDecode,
  18490. genericEncode: genericEncode,
  18491. decodeJSON: decodeJSON,
  18492. encodeJSON: encodeJSON,
  18493. genericDecodeJSON: genericDecodeJSON,
  18494. genericEncodeJSON: genericEncodeJSON
  18495. };
  18496. },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js","../Foreign.JSON/index.js":"../output/Foreign.JSON/index.js","../Global.Unsafe/index.js":"../output/Global.Unsafe/index.js"}],"../output/Browser.Runtime/index.js":[function(require,module,exports) {
  18497. // Generated by purs version 0.13.6
  18498. "use strict";
  18499. var $foreign = require("./foreign.js");
  18500. var Browser_Utils = require("../Browser.Utils/index.js");
  18501. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  18502. var Data_Either = require("../Data.Either/index.js");
  18503. var Data_Eq = require("../Data.Eq/index.js");
  18504. var Data_Foldable = require("../Data.Foldable/index.js");
  18505. var Data_Functor = require("../Data.Functor/index.js");
  18506. var Data_List_Types = require("../Data.List.Types/index.js");
  18507. var Data_Monoid = require("../Data.Monoid/index.js");
  18508. var Effect_Console = require("../Effect.Console/index.js");
  18509. var Foreign = require("../Foreign/index.js");
  18510. var Foreign_Generic = require("../Foreign.Generic/index.js");
  18511. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  18512. var postMessageJson = function postMessageJson(dictGeneric) {
  18513. return function (dictGenericEncode) {
  18514. return function (port) {
  18515. return function (d) {
  18516. return $foreign.postMessage(port)(Foreign_Generic.genericEncodeJSON(dictGeneric)(dictGenericEncode)({
  18517. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18518. unwrapSingleConstructors: true,
  18519. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18520. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18521. })(d));
  18522. };
  18523. };
  18524. };
  18525. };
  18526. var onMessageJsonAddListener = function onMessageJsonAddListener(dictGeneric) {
  18527. return function (dictGenericDecode) {
  18528. return function (port) {
  18529. return function (f) {
  18530. var listener = function listener(msg) {
  18531. var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecodeJSON(dictGeneric)(dictGenericDecode)({
  18532. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18533. unwrapSingleConstructors: true,
  18534. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18535. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18536. })(msg));
  18537. if (v instanceof Data_Either.Left) {
  18538. return function __do() {
  18539. Effect_Console.error("error while trying to parse message: " + Data_Foldable.intercalate(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(", ")(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.renderForeignError)(v.value0)))();
  18540. return Effect_Console.error("message was " + msg)();
  18541. };
  18542. }
  18543. ;
  18544. if (v instanceof Data_Either.Right) {
  18545. return f(v.value0);
  18546. }
  18547. ;
  18548. throw new Error("Failed pattern match at Browser.Runtime (line 46, column 24 - line 50, column 32): " + [v.constructor.name]);
  18549. };
  18550. return function __do() {
  18551. var jsonLst = Browser_Utils.mkListenerOne(listener)();
  18552. $foreign.onMessageAddListener(port)(jsonLst)();
  18553. return jsonLst;
  18554. };
  18555. };
  18556. };
  18557. };
  18558. };
  18559. var eqPort = new Data_Eq.Eq($foreign.portEquality);
  18560. module.exports = {
  18561. postMessageJson: postMessageJson,
  18562. onMessageJsonAddListener: onMessageJsonAddListener,
  18563. eqPort: eqPort,
  18564. connect: $foreign.connect,
  18565. onConnectAddListener: $foreign.onConnectAddListener,
  18566. portOnDisconnect: $foreign.portOnDisconnect,
  18567. postMessage: $foreign.postMessage,
  18568. onMessageAddListener: $foreign.onMessageAddListener,
  18569. onMessageRemoveListener: $foreign.onMessageRemoveListener
  18570. };
  18571. },{"./foreign.js":"../output/Browser.Runtime/foreign.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Effect.Console/index.js":"../output/Effect.Console/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Data.Generic.Rep.Show/index.js":[function(require,module,exports) {
  18572. // Generated by purs version 0.13.6
  18573. "use strict";
  18574. var Data_Foldable = require("../Data.Foldable/index.js");
  18575. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  18576. var Data_Monoid = require("../Data.Monoid/index.js");
  18577. var Data_Semigroup = require("../Data.Semigroup/index.js");
  18578. var Data_Show = require("../Data.Show/index.js");
  18579. var Data_Symbol = require("../Data.Symbol/index.js");
  18580. var GenericShowArgs = function GenericShowArgs(genericShowArgs) {
  18581. this.genericShowArgs = genericShowArgs;
  18582. };
  18583. var GenericShow = function GenericShow(genericShow$prime) {
  18584. this["genericShow'"] = genericShow$prime;
  18585. };
  18586. var genericShowArgsNoArguments = new GenericShowArgs(function (v) {
  18587. return [];
  18588. });
  18589. var genericShowArgsArgument = function genericShowArgsArgument(dictShow) {
  18590. return new GenericShowArgs(function (v) {
  18591. return [Data_Show.show(dictShow)(v)];
  18592. });
  18593. };
  18594. var genericShowArgs = function genericShowArgs(dict) {
  18595. return dict.genericShowArgs;
  18596. };
  18597. var genericShowArgsProduct = function genericShowArgsProduct(dictGenericShowArgs) {
  18598. return function (dictGenericShowArgs1) {
  18599. return new GenericShowArgs(function (v) {
  18600. return Data_Semigroup.append(Data_Semigroup.semigroupArray)(genericShowArgs(dictGenericShowArgs)(v.value0))(genericShowArgs(dictGenericShowArgs1)(v.value1));
  18601. });
  18602. };
  18603. };
  18604. var genericShowConstructor = function genericShowConstructor(dictGenericShowArgs) {
  18605. return function (dictIsSymbol) {
  18606. return new GenericShow(function (v) {
  18607. var ctor = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  18608. var v1 = genericShowArgs(dictGenericShowArgs)(v);
  18609. if (v1.length === 0) {
  18610. return ctor;
  18611. }
  18612. ;
  18613. return "(" + (Data_Foldable.intercalate(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(" ")(Data_Semigroup.append(Data_Semigroup.semigroupArray)([ctor])(v1)) + ")");
  18614. });
  18615. };
  18616. };
  18617. var genericShow$prime = function genericShow$prime(dict) {
  18618. return dict["genericShow'"];
  18619. };
  18620. var genericShowNoConstructors = new GenericShow(function (a) {
  18621. return genericShow$prime(genericShowNoConstructors)(a);
  18622. });
  18623. var genericShowSum = function genericShowSum(dictGenericShow) {
  18624. return function (dictGenericShow1) {
  18625. return new GenericShow(function (v) {
  18626. if (v instanceof Data_Generic_Rep.Inl) {
  18627. return genericShow$prime(dictGenericShow)(v.value0);
  18628. }
  18629. ;
  18630. if (v instanceof Data_Generic_Rep.Inr) {
  18631. return genericShow$prime(dictGenericShow1)(v.value0);
  18632. }
  18633. ;
  18634. throw new Error("Failed pattern match at Data.Generic.Rep.Show (line 26, column 1 - line 28, column 40): " + [v.constructor.name]);
  18635. });
  18636. };
  18637. };
  18638. var genericShow = function genericShow(dictGeneric) {
  18639. return function (dictGenericShow) {
  18640. return function (x) {
  18641. return genericShow$prime(dictGenericShow)(Data_Generic_Rep.from(dictGeneric)(x));
  18642. };
  18643. };
  18644. };
  18645. module.exports = {
  18646. GenericShow: GenericShow,
  18647. "genericShow'": genericShow$prime,
  18648. genericShow: genericShow,
  18649. GenericShowArgs: GenericShowArgs,
  18650. genericShowArgs: genericShowArgs,
  18651. genericShowNoConstructors: genericShowNoConstructors,
  18652. genericShowArgsNoArguments: genericShowArgsNoArguments,
  18653. genericShowSum: genericShowSum,
  18654. genericShowArgsProduct: genericShowArgsProduct,
  18655. genericShowConstructor: genericShowConstructor,
  18656. genericShowArgsArgument: genericShowArgsArgument
  18657. };
  18658. },{"../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js"}],"../output/Data.Number.Format/foreign.js":[function(require,module,exports) {
  18659. function wrap(method) {
  18660. return function (d) {
  18661. return function (num) {
  18662. return method.apply(num, [d]);
  18663. };
  18664. };
  18665. }
  18666. exports.toPrecisionNative = wrap(Number.prototype.toPrecision);
  18667. exports.toFixedNative = wrap(Number.prototype.toFixed);
  18668. exports.toExponentialNative = wrap(Number.prototype.toExponential);
  18669. exports.toString = function (num) {
  18670. return num.toString();
  18671. };
  18672. },{}],"../output/Data.Number.Format/index.js":[function(require,module,exports) {
  18673. // Generated by purs version 0.13.6
  18674. "use strict";
  18675. var $foreign = require("./foreign.js");
  18676. var Data_Ord = require("../Data.Ord/index.js");
  18677. var Precision = function () {
  18678. function Precision(value0) {
  18679. this.value0 = value0;
  18680. }
  18681. ;
  18682. Precision.create = function (value0) {
  18683. return new Precision(value0);
  18684. };
  18685. return Precision;
  18686. }();
  18687. var Fixed = function () {
  18688. function Fixed(value0) {
  18689. this.value0 = value0;
  18690. }
  18691. ;
  18692. Fixed.create = function (value0) {
  18693. return new Fixed(value0);
  18694. };
  18695. return Fixed;
  18696. }();
  18697. var Exponential = function () {
  18698. function Exponential(value0) {
  18699. this.value0 = value0;
  18700. }
  18701. ;
  18702. Exponential.create = function (value0) {
  18703. return new Exponential(value0);
  18704. };
  18705. return Exponential;
  18706. }();
  18707. var toStringWith = function toStringWith(v) {
  18708. if (v instanceof Precision) {
  18709. return $foreign.toPrecisionNative(v.value0);
  18710. }
  18711. ;
  18712. if (v instanceof Fixed) {
  18713. return $foreign.toFixedNative(v.value0);
  18714. }
  18715. ;
  18716. if (v instanceof Exponential) {
  18717. return $foreign.toExponentialNative(v.value0);
  18718. }
  18719. ;
  18720. throw new Error("Failed pattern match at Data.Number.Format (line 59, column 1 - line 59, column 40): " + [v.constructor.name]);
  18721. };
  18722. var precision = function () {
  18723. var $5 = Data_Ord.clamp(Data_Ord.ordInt)(1)(21);
  18724. return function ($6) {
  18725. return Precision.create($5($6));
  18726. };
  18727. }();
  18728. var fixed = function () {
  18729. var $7 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20);
  18730. return function ($8) {
  18731. return Fixed.create($7($8));
  18732. };
  18733. }();
  18734. var exponential = function () {
  18735. var $9 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20);
  18736. return function ($10) {
  18737. return Exponential.create($9($10));
  18738. };
  18739. }();
  18740. module.exports = {
  18741. precision: precision,
  18742. fixed: fixed,
  18743. exponential: exponential,
  18744. toStringWith: toStringWith,
  18745. toString: $foreign.toString
  18746. };
  18747. },{"./foreign.js":"../output/Data.Number.Format/foreign.js","../Data.Ord/index.js":"../output/Data.Ord/index.js"}],"../output/Browser.Tabs/index.js":[function(require,module,exports) {
  18748. // Generated by purs version 0.13.6
  18749. "use strict";
  18750. var Data_Eq = require("../Data.Eq/index.js");
  18751. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  18752. var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js");
  18753. var Data_Maybe = require("../Data.Maybe/index.js");
  18754. var Data_Newtype = require("../Data.Newtype/index.js");
  18755. var Data_Number_Format = require("../Data.Number.Format/index.js");
  18756. var Data_Ord = require("../Data.Ord/index.js");
  18757. var Data_Show = require("../Data.Show/index.js");
  18758. var Data_Symbol = require("../Data.Symbol/index.js");
  18759. var Foreign_Generic = require("../Foreign.Generic/index.js");
  18760. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  18761. var WindowId = function WindowId(x) {
  18762. return x;
  18763. };
  18764. var TabId = function TabId(x) {
  18765. return x;
  18766. };
  18767. var Tab = function Tab(x) {
  18768. return x;
  18769. };
  18770. var showWindowId = new Data_Show.Show(function (v) {
  18771. return Data_Number_Format.toString(v);
  18772. });
  18773. var showTabId = new Data_Show.Show(function (v) {
  18774. return Data_Number_Format.toString(v);
  18775. });
  18776. var newtypeTab = new Data_Newtype.Newtype(function (n) {
  18777. return n;
  18778. }, Tab);
  18779. var genWindowId = new Data_Generic_Rep.Generic(function (x) {
  18780. return x;
  18781. }, function (x) {
  18782. return x;
  18783. });
  18784. var genTabId = new Data_Generic_Rep.Generic(function (x) {
  18785. return x;
  18786. }, function (x) {
  18787. return x;
  18788. });
  18789. var genTab = new Data_Generic_Rep.Generic(function (x) {
  18790. return x;
  18791. }, function (x) {
  18792. return x;
  18793. });
  18794. var showTab = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genTab)(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Data_Show.showRecord()(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18795. return "active";
  18796. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18797. return "attention";
  18798. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18799. return "audible";
  18800. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18801. return "autoDiscardable";
  18802. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18803. return "cookieStoreId";
  18804. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18805. return "discarded";
  18806. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18807. return "favIconUrl";
  18808. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18809. return "height";
  18810. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18811. return "hidden";
  18812. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18813. return "id";
  18814. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18815. return "incognito";
  18816. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18817. return "index";
  18818. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18819. return "isArticle";
  18820. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18821. return "isInReaderMode";
  18822. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18823. return "lastAccessed";
  18824. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18825. return "openerTabId";
  18826. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18827. return "pinned";
  18828. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18829. return "sessionId";
  18830. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18831. return "status";
  18832. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18833. return "title";
  18834. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18835. return "url";
  18836. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18837. return "width";
  18838. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  18839. return "windowId";
  18840. }))(Data_Show.showRecordFieldsNil)(showWindowId))(Data_Maybe.showMaybe(Data_Show.showNumber)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Show.showString))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Show.showBoolean))(Data_Maybe.showMaybe(showTabId)))(Data_Show.showNumber))(Data_Show.showBoolean))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Show.showNumber))(Data_Show.showBoolean))(showTabId))(Data_Show.showBoolean))(Data_Maybe.showMaybe(Data_Show.showNumber)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Show.showBoolean))))(new Data_Symbol.IsSymbol(function () {
  18841. return "Tab";
  18842. }))));
  18843. var eqWindowId = new Data_Eq.Eq(function (x) {
  18844. return function (y) {
  18845. return x === y;
  18846. };
  18847. });
  18848. var ordWindowId = new Data_Ord.Ord(function () {
  18849. return eqWindowId;
  18850. }, function (x) {
  18851. return function (y) {
  18852. return Data_Ord.compare(Data_Ord.ordNumber)(x)(y);
  18853. };
  18854. });
  18855. var eqTabId = new Data_Eq.Eq(function (x) {
  18856. return function (y) {
  18857. return x === y;
  18858. };
  18859. });
  18860. var ordTabId = new Data_Ord.Ord(function () {
  18861. return eqTabId;
  18862. }, function (x) {
  18863. return function (y) {
  18864. return Data_Ord.compare(Data_Ord.ordNumber)(x)(y);
  18865. };
  18866. });
  18867. var encodeWindowId = new Foreign_Generic_Class.Encode(function (x) {
  18868. return Foreign_Generic.genericEncode(genWindowId)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  18869. return "WindowId";
  18870. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode))))({
  18871. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18872. unwrapSingleConstructors: true,
  18873. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18874. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18875. })(x);
  18876. });
  18877. var encodeTabId = new Foreign_Generic_Class.Encode(function (x) {
  18878. return Foreign_Generic.genericEncode(genTabId)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  18879. return "TabId";
  18880. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode))))({
  18881. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18882. unwrapSingleConstructors: true,
  18883. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18884. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18885. })(x);
  18886. });
  18887. var encodeTab = new Foreign_Generic_Class.Encode(function (x) {
  18888. return Foreign_Generic.genericEncode(genTab)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  18889. return "Tab";
  18890. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsRecord()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  18891. return "windowId";
  18892. }))(Foreign_Generic_Class.encodeWithOptionsOther(encodeWindowId)))(new Data_Symbol.IsSymbol(function () {
  18893. return "width";
  18894. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.numberEncode))))(new Data_Symbol.IsSymbol(function () {
  18895. return "url";
  18896. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  18897. return "title";
  18898. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.stringEncode)))(new Data_Symbol.IsSymbol(function () {
  18899. return "status";
  18900. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  18901. return "sessionId";
  18902. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  18903. return "pinned";
  18904. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  18905. return "openerTabId";
  18906. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(encodeTabId))))(new Data_Symbol.IsSymbol(function () {
  18907. return "lastAccessed";
  18908. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode)))(new Data_Symbol.IsSymbol(function () {
  18909. return "isInReaderMode";
  18910. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  18911. return "isArticle";
  18912. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  18913. return "index";
  18914. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode)))(new Data_Symbol.IsSymbol(function () {
  18915. return "incognito";
  18916. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  18917. return "id";
  18918. }))(Foreign_Generic_Class.encodeWithOptionsOther(encodeTabId)))(new Data_Symbol.IsSymbol(function () {
  18919. return "hidden";
  18920. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  18921. return "height";
  18922. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.numberEncode))))(new Data_Symbol.IsSymbol(function () {
  18923. return "favIconUrl";
  18924. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  18925. return "discarded";
  18926. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  18927. return "cookieStoreId";
  18928. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  18929. return "autoDiscardable";
  18930. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  18931. return "audible";
  18932. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  18933. return "attention";
  18934. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  18935. return "active";
  18936. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode))))))({
  18937. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18938. unwrapSingleConstructors: true,
  18939. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18940. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18941. })(x);
  18942. });
  18943. var decodeWindowId = new Foreign_Generic_Class.Decode(function (x) {
  18944. return Foreign_Generic.genericDecode(genWindowId)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  18945. return "WindowId";
  18946. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode)))(Foreign_Generic_Class.genericCountArgsArgument))({
  18947. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18948. unwrapSingleConstructors: true,
  18949. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18950. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18951. })(x);
  18952. });
  18953. var decodeTabId = new Foreign_Generic_Class.Decode(function (x) {
  18954. return Foreign_Generic.genericDecode(genTabId)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  18955. return "TabId";
  18956. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode)))(Foreign_Generic_Class.genericCountArgsArgument))({
  18957. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18958. unwrapSingleConstructors: true,
  18959. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18960. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18961. })(x);
  18962. });
  18963. var decodeTab = new Foreign_Generic_Class.Decode(function (x) {
  18964. return Foreign_Generic.genericDecode(genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  18965. return "Tab";
  18966. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsRecord()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  18967. return "windowId";
  18968. }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
  18969. return "width";
  18970. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  18971. return "url";
  18972. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  18973. return "title";
  18974. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
  18975. return "status";
  18976. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  18977. return "sessionId";
  18978. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  18979. return "pinned";
  18980. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  18981. return "openerTabId";
  18982. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
  18983. return "lastAccessed";
  18984. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  18985. return "isInReaderMode";
  18986. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  18987. return "isArticle";
  18988. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  18989. return "index";
  18990. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  18991. return "incognito";
  18992. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  18993. return "id";
  18994. }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeTabId))())(new Data_Symbol.IsSymbol(function () {
  18995. return "hidden";
  18996. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  18997. return "height";
  18998. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  18999. return "favIconUrl";
  19000. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19001. return "discarded";
  19002. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19003. return "cookieStoreId";
  19004. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19005. return "autoDiscardable";
  19006. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19007. return "audible";
  19008. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19009. return "attention";
  19010. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19011. return "active";
  19012. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument))({
  19013. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  19014. unwrapSingleConstructors: true,
  19015. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  19016. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  19017. })(x);
  19018. });
  19019. module.exports = {
  19020. TabId: TabId,
  19021. Tab: Tab,
  19022. eqWindowId: eqWindowId,
  19023. ordWindowId: ordWindowId,
  19024. showWindowId: showWindowId,
  19025. genWindowId: genWindowId,
  19026. encodeWindowId: encodeWindowId,
  19027. decodeWindowId: decodeWindowId,
  19028. eqTabId: eqTabId,
  19029. ordTabId: ordTabId,
  19030. showTabId: showTabId,
  19031. genTabId: genTabId,
  19032. encodeTabId: encodeTabId,
  19033. decodeTabId: decodeTabId,
  19034. newtypeTab: newtypeTab,
  19035. genTab: genTab,
  19036. showTab: showTab,
  19037. encodeTab: encodeTab,
  19038. decodeTab: decodeTab
  19039. };
  19040. },{"../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Generic.Rep.Show/index.js":"../output/Data.Generic.Rep.Show/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Number.Format/index.js":"../output/Data.Number.Format/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Browser.Tabs.OnCreated/foreign.js":[function(require,module,exports) {
  19041. "use stricts";
  19042. exports.addListenerImpl = function (listener) {
  19043. return function () {
  19044. browser.tabs.onCreated.addListener(listener);
  19045. };
  19046. };
  19047. exports.removeListener = function (listener) {
  19048. return function () {
  19049. return browser.tabs.onCreated.removeListener(listener);
  19050. };
  19051. };
  19052. },{}],"../output/Browser.Tabs.OnCreated/index.js":[function(require,module,exports) {
  19053. // Generated by purs version 0.13.6
  19054. "use strict";
  19055. var $foreign = require("./foreign.js");
  19056. var Browser_Tabs = require("../Browser.Tabs/index.js");
  19057. var Browser_Utils = require("../Browser.Utils/index.js");
  19058. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  19059. var Data_Either = require("../Data.Either/index.js");
  19060. var Data_Foldable = require("../Data.Foldable/index.js");
  19061. var Data_Functor = require("../Data.Functor/index.js");
  19062. var Data_List_Types = require("../Data.List.Types/index.js");
  19063. var Data_Monoid = require("../Data.Monoid/index.js");
  19064. var Data_Symbol = require("../Data.Symbol/index.js");
  19065. var Effect_Exception = require("../Effect.Exception/index.js");
  19066. var Foreign = require("../Foreign/index.js");
  19067. var Foreign_Generic = require("../Foreign.Generic/index.js");
  19068. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  19069. var addListener = function addListener(listener) {
  19070. var foreignListener = function foreignListener(f) {
  19071. var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecode(Browser_Tabs.genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  19072. return "Tab";
  19073. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsRecord()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  19074. return "windowId";
  19075. }))(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
  19076. return "width";
  19077. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  19078. return "url";
  19079. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19080. return "title";
  19081. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
  19082. return "status";
  19083. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19084. return "sessionId";
  19085. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19086. return "pinned";
  19087. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  19088. return "openerTabId";
  19089. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Browser_Tabs.decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
  19090. return "lastAccessed";
  19091. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  19092. return "isInReaderMode";
  19093. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  19094. return "isArticle";
  19095. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19096. return "index";
  19097. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  19098. return "incognito";
  19099. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  19100. return "id";
  19101. }))(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId))())(new Data_Symbol.IsSymbol(function () {
  19102. return "hidden";
  19103. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  19104. return "height";
  19105. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  19106. return "favIconUrl";
  19107. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19108. return "discarded";
  19109. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19110. return "cookieStoreId";
  19111. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  19112. return "autoDiscardable";
  19113. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19114. return "audible";
  19115. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19116. return "attention";
  19117. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  19118. return "active";
  19119. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument))({
  19120. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  19121. unwrapSingleConstructors: true,
  19122. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  19123. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  19124. })(f));
  19125. if (v instanceof Data_Either.Left) {
  19126. return Effect_Exception["throw"](Data_Foldable.intercalate(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(", ")(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.renderForeignError)(v.value0)));
  19127. }
  19128. ;
  19129. if (v instanceof Data_Either.Right) {
  19130. return listener(v.value0);
  19131. }
  19132. ;
  19133. throw new Error("Failed pattern match at Browser.Tabs.OnCreated (line 24, column 23 - line 26, column 30): " + [v.constructor.name]);
  19134. };
  19135. return function __do() {
  19136. var lst = Browser_Utils.mkListenerOne(foreignListener)();
  19137. return $foreign.addListenerImpl(lst)();
  19138. };
  19139. };
  19140. module.exports = {
  19141. addListener: addListener,
  19142. removeListener: $foreign.removeListener
  19143. };
  19144. },{"./foreign.js":"../output/Browser.Tabs.OnCreated/foreign.js","../Browser.Tabs/index.js":"../output/Browser.Tabs/index.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Browser.Tabs.OnRemoved/foreign.js":[function(require,module,exports) {
  19145. "use stricts";
  19146. exports.addListener = function (listener) {
  19147. return function () {
  19148. browser.tabs.onRemoved.addListener(listener);
  19149. };
  19150. };
  19151. exports.removeListener = function (listener) {
  19152. return function () {
  19153. return browser.tabs.onRemoved.removeListener(listener);
  19154. };
  19155. };
  19156. },{}],"../output/Browser.Tabs.OnRemoved/index.js":[function(require,module,exports) {
  19157. // Generated by purs version 0.13.6
  19158. "use strict";
  19159. var $foreign = require("./foreign.js");
  19160. module.exports = {
  19161. addListener: $foreign.addListener,
  19162. removeListener: $foreign.removeListener
  19163. };
  19164. },{"./foreign.js":"../output/Browser.Tabs.OnRemoved/foreign.js"}],"../output/Data.Array.NonEmpty.Internal/foreign.js":[function(require,module,exports) {
  19165. "use strict";
  19166. exports.fold1Impl = function (f) {
  19167. return function (xs) {
  19168. var acc = xs[0];
  19169. var len = xs.length;
  19170. for (var i = 1; i < len; i++) {
  19171. acc = f(acc)(xs[i]);
  19172. }
  19173. return acc;
  19174. };
  19175. };
  19176. exports.traverse1Impl = function () {
  19177. function Cont(fn) {
  19178. this.fn = fn;
  19179. }
  19180. var emptyList = {};
  19181. var ConsCell = function ConsCell(head, tail) {
  19182. this.head = head;
  19183. this.tail = tail;
  19184. };
  19185. function finalCell(head) {
  19186. return new ConsCell(head, emptyList);
  19187. }
  19188. function consList(x) {
  19189. return function (xs) {
  19190. return new ConsCell(x, xs);
  19191. };
  19192. }
  19193. function listToArray(list) {
  19194. var arr = [];
  19195. var xs = list;
  19196. while (xs !== emptyList) {
  19197. arr.push(xs.head);
  19198. xs = xs.tail;
  19199. }
  19200. return arr;
  19201. }
  19202. return function (apply) {
  19203. return function (map) {
  19204. return function (f) {
  19205. var buildFrom = function buildFrom(x, ys) {
  19206. return apply(map(consList)(f(x)))(ys);
  19207. };
  19208. var go = function go(acc, currentLen, xs) {
  19209. if (currentLen === 0) {
  19210. return acc;
  19211. } else {
  19212. var last = xs[currentLen - 1];
  19213. return new Cont(function () {
  19214. var built = go(buildFrom(last, acc), currentLen - 1, xs);
  19215. return built;
  19216. });
  19217. }
  19218. };
  19219. return function (array) {
  19220. var acc = map(finalCell)(f(array[array.length - 1]));
  19221. var result = go(acc, array.length - 1, array);
  19222. while (result instanceof Cont) {
  19223. result = result.fn();
  19224. }
  19225. return map(listToArray)(result);
  19226. };
  19227. };
  19228. };
  19229. };
  19230. }();
  19231. },{}],"../output/Data.Array.NonEmpty.Internal/index.js":[function(require,module,exports) {
  19232. // Generated by purs version 0.13.6
  19233. "use strict";
  19234. var $foreign = require("./foreign.js");
  19235. var Control_Alt = require("../Control.Alt/index.js");
  19236. var Control_Applicative = require("../Control.Applicative/index.js");
  19237. var Control_Apply = require("../Control.Apply/index.js");
  19238. var Control_Bind = require("../Control.Bind/index.js");
  19239. var Control_Monad = require("../Control.Monad/index.js");
  19240. var Data_Eq = require("../Data.Eq/index.js");
  19241. var Data_Foldable = require("../Data.Foldable/index.js");
  19242. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  19243. var Data_Functor = require("../Data.Functor/index.js");
  19244. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  19245. var Data_Ord = require("../Data.Ord/index.js");
  19246. var Data_Semigroup = require("../Data.Semigroup/index.js");
  19247. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  19248. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  19249. var Data_Show = require("../Data.Show/index.js");
  19250. var Data_Traversable = require("../Data.Traversable/index.js");
  19251. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  19252. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  19253. var NonEmptyArray = function NonEmptyArray(x) {
  19254. return x;
  19255. };
  19256. var unfoldable1NonEmptyArray = Data_Unfoldable1.unfoldable1Array;
  19257. var traversableWithIndexNonEmptyArray = Data_TraversableWithIndex.traversableWithIndexArray;
  19258. var traversableNonEmptyArray = Data_Traversable.traversableArray;
  19259. var showNonEmptyArray = function showNonEmptyArray(dictShow) {
  19260. return new Data_Show.Show(function (v) {
  19261. return "(NonEmptyArray " + (Data_Show.show(Data_Show.showArray(dictShow))(v) + ")");
  19262. });
  19263. };
  19264. var semigroupNonEmptyArray = Data_Semigroup.semigroupArray;
  19265. var ordNonEmptyArray = function ordNonEmptyArray(dictOrd) {
  19266. return Data_Ord.ordArray(dictOrd);
  19267. };
  19268. var ord1NonEmptyArray = Data_Ord.ord1Array;
  19269. var monadNonEmptyArray = Control_Monad.monadArray;
  19270. var functorWithIndexNonEmptyArray = Data_FunctorWithIndex.functorWithIndexArray;
  19271. var functorNonEmptyArray = Data_Functor.functorArray;
  19272. var foldableWithIndexNonEmptyArray = Data_FoldableWithIndex.foldableWithIndexArray;
  19273. var foldableNonEmptyArray = Data_Foldable.foldableArray;
  19274. var foldable1NonEmptyArray = new Data_Semigroup_Foldable.Foldable1(function () {
  19275. return foldableNonEmptyArray;
  19276. }, function (dictSemigroup) {
  19277. return $foreign.fold1Impl(Data_Semigroup.append(dictSemigroup));
  19278. }, function (dictSemigroup) {
  19279. return Data_Semigroup_Foldable.foldMap1Default(foldable1NonEmptyArray)(functorNonEmptyArray)(dictSemigroup);
  19280. });
  19281. var traversable1NonEmptyArray = new Data_Semigroup_Traversable.Traversable1(function () {
  19282. return foldable1NonEmptyArray;
  19283. }, function () {
  19284. return traversableNonEmptyArray;
  19285. }, function (dictApply) {
  19286. return Data_Semigroup_Traversable.sequence1Default(traversable1NonEmptyArray)(dictApply);
  19287. }, function (dictApply) {
  19288. return $foreign.traverse1Impl(Control_Apply.apply(dictApply))(Data_Functor.map(dictApply.Functor0()));
  19289. });
  19290. var eqNonEmptyArray = function eqNonEmptyArray(dictEq) {
  19291. return Data_Eq.eqArray(dictEq);
  19292. };
  19293. var eq1NonEmptyArray = Data_Eq.eq1Array;
  19294. var bindNonEmptyArray = Control_Bind.bindArray;
  19295. var applyNonEmptyArray = Control_Apply.applyArray;
  19296. var applicativeNonEmptyArray = Control_Applicative.applicativeArray;
  19297. var altNonEmptyArray = Control_Alt.altArray;
  19298. module.exports = {
  19299. showNonEmptyArray: showNonEmptyArray,
  19300. eqNonEmptyArray: eqNonEmptyArray,
  19301. eq1NonEmptyArray: eq1NonEmptyArray,
  19302. ordNonEmptyArray: ordNonEmptyArray,
  19303. ord1NonEmptyArray: ord1NonEmptyArray,
  19304. semigroupNonEmptyArray: semigroupNonEmptyArray,
  19305. functorNonEmptyArray: functorNonEmptyArray,
  19306. functorWithIndexNonEmptyArray: functorWithIndexNonEmptyArray,
  19307. foldableNonEmptyArray: foldableNonEmptyArray,
  19308. foldableWithIndexNonEmptyArray: foldableWithIndexNonEmptyArray,
  19309. foldable1NonEmptyArray: foldable1NonEmptyArray,
  19310. unfoldable1NonEmptyArray: unfoldable1NonEmptyArray,
  19311. traversableNonEmptyArray: traversableNonEmptyArray,
  19312. traversableWithIndexNonEmptyArray: traversableWithIndexNonEmptyArray,
  19313. traversable1NonEmptyArray: traversable1NonEmptyArray,
  19314. applyNonEmptyArray: applyNonEmptyArray,
  19315. applicativeNonEmptyArray: applicativeNonEmptyArray,
  19316. bindNonEmptyArray: bindNonEmptyArray,
  19317. monadNonEmptyArray: monadNonEmptyArray,
  19318. altNonEmptyArray: altNonEmptyArray
  19319. };
  19320. },{"./foreign.js":"../output/Data.Array.NonEmpty.Internal/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Data.Array.NonEmpty/index.js":[function(require,module,exports) {
  19321. // Generated by purs version 0.13.6
  19322. "use strict";
  19323. var Control_Bind = require("../Control.Bind/index.js");
  19324. var Data_Array = require("../Data.Array/index.js");
  19325. var Data_Array_NonEmpty_Internal = require("../Data.Array.NonEmpty.Internal/index.js");
  19326. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  19327. var Data_Boolean = require("../Data.Boolean/index.js");
  19328. var Data_Eq = require("../Data.Eq/index.js");
  19329. var Data_Function = require("../Data.Function/index.js");
  19330. var Data_Functor = require("../Data.Functor/index.js");
  19331. var Data_Maybe = require("../Data.Maybe/index.js");
  19332. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  19333. var Data_Ord = require("../Data.Ord/index.js");
  19334. var Data_Semigroup = require("../Data.Semigroup/index.js");
  19335. var Data_Tuple = require("../Data.Tuple/index.js");
  19336. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  19337. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  19338. var unsafeFromArrayF = Unsafe_Coerce.unsafeCoerce;
  19339. var unsafeFromArray = Unsafe_Coerce.unsafeCoerce;
  19340. var toArray = Unsafe_Coerce.unsafeCoerce;
  19341. var unionBy$prime = function unionBy$prime(eq) {
  19342. return function (xs) {
  19343. var $39 = Data_Array.unionBy(eq)(toArray(xs));
  19344. return function ($40) {
  19345. return unsafeFromArray($39($40));
  19346. };
  19347. };
  19348. };
  19349. var union$prime = function union$prime(dictEq) {
  19350. return unionBy$prime(Data_Eq.eq(dictEq));
  19351. };
  19352. var unionBy = function unionBy(eq) {
  19353. return function (xs) {
  19354. var $41 = unionBy$prime(eq)(xs);
  19355. return function ($42) {
  19356. return $41(toArray($42));
  19357. };
  19358. };
  19359. };
  19360. var union = function union(dictEq) {
  19361. return unionBy(Data_Eq.eq(dictEq));
  19362. };
  19363. var unzip = function () {
  19364. var $43 = Data_Bifunctor.bimap(Data_Tuple.bifunctorTuple)(unsafeFromArray)(unsafeFromArray);
  19365. return function ($44) {
  19366. return $43(Data_Array.unzip(toArray($44)));
  19367. };
  19368. }();
  19369. var updateAt = function updateAt(i) {
  19370. return function (x) {
  19371. var $45 = Data_Array.updateAt(i)(x);
  19372. return function ($46) {
  19373. return unsafeFromArrayF($45(toArray($46)));
  19374. };
  19375. };
  19376. };
  19377. var zip = function zip(xs) {
  19378. return function (ys) {
  19379. return unsafeFromArray(Data_Array.zip(toArray(xs))(toArray(ys)));
  19380. };
  19381. };
  19382. var zipWith = function zipWith(f) {
  19383. return function (xs) {
  19384. return function (ys) {
  19385. return unsafeFromArray(Data_Array.zipWith(f)(toArray(xs))(toArray(ys)));
  19386. };
  19387. };
  19388. };
  19389. var zipWithA = function zipWithA(dictApplicative) {
  19390. return function (f) {
  19391. return function (xs) {
  19392. return function (ys) {
  19393. return unsafeFromArrayF(Data_Array.zipWithA(dictApplicative)(f)(toArray(xs))(toArray(ys)));
  19394. };
  19395. };
  19396. };
  19397. };
  19398. var some = function some(dictAlternative) {
  19399. return function (dictLazy) {
  19400. var $47 = Data_Array.some(dictAlternative)(dictLazy);
  19401. return function ($48) {
  19402. return unsafeFromArrayF($47($48));
  19403. };
  19404. };
  19405. };
  19406. var snoc$prime = function snoc$prime(xs) {
  19407. return function (x) {
  19408. return unsafeFromArray(Data_Array.snoc(xs)(x));
  19409. };
  19410. };
  19411. var snoc = function snoc(xs) {
  19412. return function (x) {
  19413. return unsafeFromArray(Data_Array.snoc(toArray(xs))(x));
  19414. };
  19415. };
  19416. var singleton = function singleton($49) {
  19417. return unsafeFromArray(Data_Array.singleton($49));
  19418. };
  19419. var replicate = function replicate(i) {
  19420. return function (x) {
  19421. return unsafeFromArray(Data_Array.replicate(Data_Ord.max(Data_Ord.ordInt)(1)(i))(x));
  19422. };
  19423. };
  19424. var range = function range(x) {
  19425. return function (y) {
  19426. return unsafeFromArray(Data_Array.range(x)(y));
  19427. };
  19428. };
  19429. var modifyAt = function modifyAt(i) {
  19430. return function (f) {
  19431. var $50 = Data_Array.modifyAt(i)(f);
  19432. return function ($51) {
  19433. return unsafeFromArrayF($50(toArray($51)));
  19434. };
  19435. };
  19436. };
  19437. var intersectBy$prime = function intersectBy$prime(eq) {
  19438. return function (xs) {
  19439. return Data_Array.intersectBy(eq)(toArray(xs));
  19440. };
  19441. };
  19442. var intersectBy = function intersectBy(eq) {
  19443. return function (xs) {
  19444. var $52 = intersectBy$prime(eq)(xs);
  19445. return function ($53) {
  19446. return $52(toArray($53));
  19447. };
  19448. };
  19449. };
  19450. var intersect$prime = function intersect$prime(dictEq) {
  19451. return intersectBy$prime(Data_Eq.eq(dictEq));
  19452. };
  19453. var intersect = function intersect(dictEq) {
  19454. return intersectBy(Data_Eq.eq(dictEq));
  19455. };
  19456. var insertAt = function insertAt(i) {
  19457. return function (x) {
  19458. var $54 = Data_Array.insertAt(i)(x);
  19459. return function ($55) {
  19460. return unsafeFromArrayF($54(toArray($55)));
  19461. };
  19462. };
  19463. };
  19464. var fromFoldable1 = function fromFoldable1(dictFoldable1) {
  19465. var $56 = Data_Array.fromFoldable(dictFoldable1.Foldable0());
  19466. return function ($57) {
  19467. return unsafeFromArray($56($57));
  19468. };
  19469. };
  19470. var fromArray = function fromArray(xs) {
  19471. if (Data_Array.length(xs) > 0) {
  19472. return new Data_Maybe.Just(unsafeFromArray(xs));
  19473. }
  19474. ;
  19475. if (Data_Boolean.otherwise) {
  19476. return Data_Maybe.Nothing.value;
  19477. }
  19478. ;
  19479. throw new Error("Failed pattern match at Data.Array.NonEmpty (line 134, column 1 - line 134, column 58): " + [xs.constructor.name]);
  19480. };
  19481. var fromFoldable = function fromFoldable(dictFoldable) {
  19482. var $58 = Data_Array.fromFoldable(dictFoldable);
  19483. return function ($59) {
  19484. return fromArray($58($59));
  19485. };
  19486. };
  19487. var difference$prime = function difference$prime(dictEq) {
  19488. return function (xs) {
  19489. return Data_Array.difference(dictEq)(toArray(xs));
  19490. };
  19491. };
  19492. var cons$prime = function cons$prime(x) {
  19493. return function (xs) {
  19494. return unsafeFromArray(Data_Array.cons(x)(xs));
  19495. };
  19496. };
  19497. var fromNonEmpty = function fromNonEmpty(v) {
  19498. return cons$prime(v.value0)(v.value1);
  19499. };
  19500. var concatMap = Data_Function.flip(Control_Bind.bind(Data_Array_NonEmpty_Internal.bindNonEmptyArray));
  19501. var concat = function () {
  19502. var $60 = Data_Functor.map(Data_Array_NonEmpty_Internal.functorNonEmptyArray)(toArray);
  19503. return function ($61) {
  19504. return unsafeFromArray(Data_Array.concat(toArray($60($61))));
  19505. };
  19506. }();
  19507. var appendArray = function appendArray(xs) {
  19508. return function (ys) {
  19509. return unsafeFromArray(Data_Semigroup.append(Data_Semigroup.semigroupArray)(toArray(xs))(ys));
  19510. };
  19511. };
  19512. var alterAt = function alterAt(i) {
  19513. return function (f) {
  19514. var $62 = Data_Array.alterAt(i)(f);
  19515. return function ($63) {
  19516. return $62(toArray($63));
  19517. };
  19518. };
  19519. };
  19520. var adaptMaybe = function adaptMaybe(f) {
  19521. var $64 = Data_Maybe.fromJust();
  19522. return function ($65) {
  19523. return $64(f(toArray($65)));
  19524. };
  19525. };
  19526. var head = adaptMaybe(Data_Array.head);
  19527. var init = adaptMaybe(Data_Array.init);
  19528. var last = adaptMaybe(Data_Array.last);
  19529. var tail = adaptMaybe(Data_Array.tail);
  19530. var uncons = adaptMaybe(Data_Array.uncons);
  19531. var toNonEmpty = function toNonEmpty($66) {
  19532. return function (v) {
  19533. return new Data_NonEmpty.NonEmpty(v.head, v.tail);
  19534. }(uncons($66));
  19535. };
  19536. var unsnoc = adaptMaybe(Data_Array.unsnoc);
  19537. var adaptAny = function adaptAny(f) {
  19538. return function ($67) {
  19539. return f(toArray($67));
  19540. };
  19541. };
  19542. var catMaybes = adaptAny(Data_Array.catMaybes);
  19543. var $$delete = function $$delete(dictEq) {
  19544. return function (x) {
  19545. return adaptAny(Data_Array["delete"](dictEq)(x));
  19546. };
  19547. };
  19548. var deleteAt = function deleteAt(i) {
  19549. return adaptAny(Data_Array.deleteAt(i));
  19550. };
  19551. var deleteBy = function deleteBy(f) {
  19552. return function (x) {
  19553. return adaptAny(Data_Array.deleteBy(f)(x));
  19554. };
  19555. };
  19556. var difference = function difference(dictEq) {
  19557. return function (xs) {
  19558. return adaptAny(difference$prime(dictEq)(xs));
  19559. };
  19560. };
  19561. var drop = function drop(i) {
  19562. return adaptAny(Data_Array.drop(i));
  19563. };
  19564. var dropEnd = function dropEnd(i) {
  19565. return adaptAny(Data_Array.dropEnd(i));
  19566. };
  19567. var dropWhile = function dropWhile(f) {
  19568. return adaptAny(Data_Array.dropWhile(f));
  19569. };
  19570. var elemIndex = function elemIndex(dictEq) {
  19571. return function (x) {
  19572. return adaptAny(Data_Array.elemIndex(dictEq)(x));
  19573. };
  19574. };
  19575. var elemLastIndex = function elemLastIndex(dictEq) {
  19576. return function (x) {
  19577. return adaptAny(Data_Array.elemLastIndex(dictEq)(x));
  19578. };
  19579. };
  19580. var filter = function filter(f) {
  19581. return adaptAny(Data_Array.filter(f));
  19582. };
  19583. var filterA = function filterA(dictApplicative) {
  19584. return function (f) {
  19585. return adaptAny(Data_Array.filterA(dictApplicative)(f));
  19586. };
  19587. };
  19588. var findIndex = function findIndex(x) {
  19589. return adaptAny(Data_Array.findIndex(x));
  19590. };
  19591. var findLastIndex = function findLastIndex(x) {
  19592. return adaptAny(Data_Array.findLastIndex(x));
  19593. };
  19594. var foldM = function foldM(dictMonad) {
  19595. return function (f) {
  19596. return function (acc) {
  19597. return adaptAny(Data_Array.foldM(dictMonad)(f)(acc));
  19598. };
  19599. };
  19600. };
  19601. var foldRecM = function foldRecM(dictMonadRec) {
  19602. return function (f) {
  19603. return function (acc) {
  19604. return adaptAny(Data_Array.foldRecM(dictMonadRec)(f)(acc));
  19605. };
  19606. };
  19607. };
  19608. var index = adaptAny(Data_Array.index);
  19609. var length = adaptAny(Data_Array.length);
  19610. var mapMaybe = function mapMaybe(f) {
  19611. return adaptAny(Data_Array.mapMaybe(f));
  19612. };
  19613. var partition = function partition(f) {
  19614. return adaptAny(Data_Array.partition(f));
  19615. };
  19616. var slice = function slice(start) {
  19617. return function (end) {
  19618. return adaptAny(Data_Array.slice(start)(end));
  19619. };
  19620. };
  19621. var span = function span(f) {
  19622. return adaptAny(Data_Array.span(f));
  19623. };
  19624. var take = function take(i) {
  19625. return adaptAny(Data_Array.take(i));
  19626. };
  19627. var takeEnd = function takeEnd(i) {
  19628. return adaptAny(Data_Array.takeEnd(i));
  19629. };
  19630. var takeWhile = function takeWhile(f) {
  19631. return adaptAny(Data_Array.takeWhile(f));
  19632. };
  19633. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  19634. return adaptAny(Data_Array.toUnfoldable(dictUnfoldable));
  19635. };
  19636. var unsafeAdapt = function unsafeAdapt(f) {
  19637. var $68 = adaptAny(f);
  19638. return function ($69) {
  19639. return unsafeFromArray($68($69));
  19640. };
  19641. };
  19642. var cons = function cons(x) {
  19643. return unsafeAdapt(Data_Array.cons(x));
  19644. };
  19645. var insert = function insert(dictOrd) {
  19646. return function (x) {
  19647. return unsafeAdapt(Data_Array.insert(dictOrd)(x));
  19648. };
  19649. };
  19650. var insertBy = function insertBy(f) {
  19651. return function (x) {
  19652. return unsafeAdapt(Data_Array.insertBy(f)(x));
  19653. };
  19654. };
  19655. var modifyAtIndices = function modifyAtIndices(dictFoldable) {
  19656. return function (is) {
  19657. return function (f) {
  19658. return unsafeAdapt(Data_Array.modifyAtIndices(dictFoldable)(is)(f));
  19659. };
  19660. };
  19661. };
  19662. var nub = function nub(dictOrd) {
  19663. return unsafeAdapt(Data_Array.nub(dictOrd));
  19664. };
  19665. var nubBy = function nubBy(f) {
  19666. return unsafeAdapt(Data_Array.nubBy(f));
  19667. };
  19668. var nubByEq = function nubByEq(f) {
  19669. return unsafeAdapt(Data_Array.nubByEq(f));
  19670. };
  19671. var nubEq = function nubEq(dictEq) {
  19672. return unsafeAdapt(Data_Array.nubEq(dictEq));
  19673. };
  19674. var reverse = unsafeAdapt(Data_Array.reverse);
  19675. var sort = function sort(dictOrd) {
  19676. return unsafeAdapt(Data_Array.sort(dictOrd));
  19677. };
  19678. var sortBy = function sortBy(f) {
  19679. return unsafeAdapt(Data_Array.sortBy(f));
  19680. };
  19681. var sortWith = function sortWith(dictOrd) {
  19682. return function (f) {
  19683. return unsafeAdapt(Data_Array.sortWith(dictOrd)(f));
  19684. };
  19685. };
  19686. var updateAtIndices = function updateAtIndices(dictFoldable) {
  19687. return function (pairs) {
  19688. return unsafeAdapt(Data_Array.updateAtIndices(dictFoldable)(pairs));
  19689. };
  19690. };
  19691. var unsafeIndex = function unsafeIndex(dictPartial) {
  19692. return adaptAny(Data_Array.unsafeIndex());
  19693. };
  19694. var toUnfoldable1 = function toUnfoldable1(dictUnfoldable1) {
  19695. return function (xs) {
  19696. var len = length(xs);
  19697. var f = function f(i) {
  19698. return Data_Tuple.Tuple.create(unsafeIndex()(xs)(i))(function () {
  19699. var $38 = i < (len - 1 | 0);
  19700. if ($38) {
  19701. return new Data_Maybe.Just(i + 1 | 0);
  19702. }
  19703. ;
  19704. return Data_Maybe.Nothing.value;
  19705. }());
  19706. };
  19707. return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(f)(0);
  19708. };
  19709. };
  19710. module.exports = {
  19711. fromArray: fromArray,
  19712. fromNonEmpty: fromNonEmpty,
  19713. toArray: toArray,
  19714. toNonEmpty: toNonEmpty,
  19715. fromFoldable: fromFoldable,
  19716. fromFoldable1: fromFoldable1,
  19717. toUnfoldable: toUnfoldable,
  19718. toUnfoldable1: toUnfoldable1,
  19719. singleton: singleton,
  19720. range: range,
  19721. replicate: replicate,
  19722. some: some,
  19723. length: length,
  19724. cons: cons,
  19725. "cons'": cons$prime,
  19726. snoc: snoc,
  19727. "snoc'": snoc$prime,
  19728. appendArray: appendArray,
  19729. insert: insert,
  19730. insertBy: insertBy,
  19731. head: head,
  19732. last: last,
  19733. tail: tail,
  19734. init: init,
  19735. uncons: uncons,
  19736. unsnoc: unsnoc,
  19737. index: index,
  19738. elemIndex: elemIndex,
  19739. elemLastIndex: elemLastIndex,
  19740. findIndex: findIndex,
  19741. findLastIndex: findLastIndex,
  19742. insertAt: insertAt,
  19743. deleteAt: deleteAt,
  19744. updateAt: updateAt,
  19745. updateAtIndices: updateAtIndices,
  19746. modifyAt: modifyAt,
  19747. modifyAtIndices: modifyAtIndices,
  19748. alterAt: alterAt,
  19749. reverse: reverse,
  19750. concat: concat,
  19751. concatMap: concatMap,
  19752. filter: filter,
  19753. partition: partition,
  19754. filterA: filterA,
  19755. mapMaybe: mapMaybe,
  19756. catMaybes: catMaybes,
  19757. sort: sort,
  19758. sortBy: sortBy,
  19759. sortWith: sortWith,
  19760. slice: slice,
  19761. take: take,
  19762. takeEnd: takeEnd,
  19763. takeWhile: takeWhile,
  19764. drop: drop,
  19765. dropEnd: dropEnd,
  19766. dropWhile: dropWhile,
  19767. span: span,
  19768. nub: nub,
  19769. nubBy: nubBy,
  19770. nubEq: nubEq,
  19771. nubByEq: nubByEq,
  19772. union: union,
  19773. "union'": union$prime,
  19774. unionBy: unionBy,
  19775. "unionBy'": unionBy$prime,
  19776. "delete": $$delete,
  19777. deleteBy: deleteBy,
  19778. difference: difference,
  19779. "difference'": difference$prime,
  19780. intersect: intersect,
  19781. "intersect'": intersect$prime,
  19782. intersectBy: intersectBy,
  19783. "intersectBy'": intersectBy$prime,
  19784. zipWith: zipWith,
  19785. zipWithA: zipWithA,
  19786. zip: zip,
  19787. unzip: unzip,
  19788. foldM: foldM,
  19789. foldRecM: foldRecM,
  19790. unsafeIndex: unsafeIndex
  19791. };
  19792. },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Array.NonEmpty.Internal/index.js":"../output/Data.Array.NonEmpty.Internal/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Data.Profunctor/index.js":[function(require,module,exports) {
  19793. // Generated by purs version 0.13.6
  19794. "use strict";
  19795. var Control_Category = require("../Control.Category/index.js");
  19796. var Data_Newtype = require("../Data.Newtype/index.js");
  19797. var Profunctor = function Profunctor(dimap) {
  19798. this.dimap = dimap;
  19799. };
  19800. var profunctorFn = new Profunctor(function (a2b) {
  19801. return function (c2d) {
  19802. return function (b2c) {
  19803. return function ($9) {
  19804. return c2d(b2c(a2b($9)));
  19805. };
  19806. };
  19807. };
  19808. });
  19809. var dimap = function dimap(dict) {
  19810. return dict.dimap;
  19811. };
  19812. var lcmap = function lcmap(dictProfunctor) {
  19813. return function (a2b) {
  19814. return dimap(dictProfunctor)(a2b)(Control_Category.identity(Control_Category.categoryFn));
  19815. };
  19816. };
  19817. var rmap = function rmap(dictProfunctor) {
  19818. return function (b2c) {
  19819. return dimap(dictProfunctor)(Control_Category.identity(Control_Category.categoryFn))(b2c);
  19820. };
  19821. };
  19822. var unwrapIso = function unwrapIso(dictProfunctor) {
  19823. return function (dictNewtype) {
  19824. return dimap(dictProfunctor)(Data_Newtype.wrap(dictNewtype))(Data_Newtype.unwrap(dictNewtype));
  19825. };
  19826. };
  19827. var wrapIso = function wrapIso(dictProfunctor) {
  19828. return function (dictNewtype) {
  19829. return function (v) {
  19830. return dimap(dictProfunctor)(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype));
  19831. };
  19832. };
  19833. };
  19834. var arr = function arr(dictCategory) {
  19835. return function (dictProfunctor) {
  19836. return function (f) {
  19837. return rmap(dictProfunctor)(f)(Control_Category.identity(dictCategory));
  19838. };
  19839. };
  19840. };
  19841. module.exports = {
  19842. dimap: dimap,
  19843. Profunctor: Profunctor,
  19844. lcmap: lcmap,
  19845. rmap: rmap,
  19846. arr: arr,
  19847. unwrapIso: unwrapIso,
  19848. wrapIso: wrapIso,
  19849. profunctorFn: profunctorFn
  19850. };
  19851. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Data.Profunctor.Choice/index.js":[function(require,module,exports) {
  19852. // Generated by purs version 0.13.6
  19853. "use strict";
  19854. var Control_Category = require("../Control.Category/index.js");
  19855. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  19856. var Data_Either = require("../Data.Either/index.js");
  19857. var Data_Functor = require("../Data.Functor/index.js");
  19858. var Data_Profunctor = require("../Data.Profunctor/index.js");
  19859. var Choice = function Choice(Profunctor0, left, right) {
  19860. this.Profunctor0 = Profunctor0;
  19861. this.left = left;
  19862. this.right = right;
  19863. };
  19864. var right = function right(dict) {
  19865. return dict.right;
  19866. };
  19867. var left = function left(dict) {
  19868. return dict.left;
  19869. };
  19870. var splitChoice = function splitChoice(dictCategory) {
  19871. return function (dictChoice) {
  19872. return function (l) {
  19873. return function (r) {
  19874. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(left(dictChoice)(l))(right(dictChoice)(r));
  19875. };
  19876. };
  19877. };
  19878. };
  19879. var fanin = function fanin(dictCategory) {
  19880. return function (dictChoice) {
  19881. return function (l) {
  19882. return function (r) {
  19883. var join = Data_Profunctor.dimap(dictChoice.Profunctor0())(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)))(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(dictCategory));
  19884. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(splitChoice(dictCategory)(dictChoice)(l)(r))(join);
  19885. };
  19886. };
  19887. };
  19888. };
  19889. var choiceFn = new Choice(function () {
  19890. return Data_Profunctor.profunctorFn;
  19891. }, function (v) {
  19892. return function (v1) {
  19893. if (v1 instanceof Data_Either.Left) {
  19894. return Data_Either.Left.create(v(v1.value0));
  19895. }
  19896. ;
  19897. if (v1 instanceof Data_Either.Right) {
  19898. return new Data_Either.Right(v1.value0);
  19899. }
  19900. ;
  19901. throw new Error("Failed pattern match at Data.Profunctor.Choice (line 32, column 1 - line 35, column 16): " + [v.constructor.name, v1.constructor.name]);
  19902. };
  19903. }, Data_Functor.map(Data_Either.functorEither));
  19904. module.exports = {
  19905. left: left,
  19906. right: right,
  19907. Choice: Choice,
  19908. splitChoice: splitChoice,
  19909. fanin: fanin,
  19910. choiceFn: choiceFn
  19911. };
  19912. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js"}],"../output/Data.Profunctor.Closed/index.js":[function(require,module,exports) {
  19913. // Generated by purs version 0.13.6
  19914. "use strict";
  19915. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  19916. var Data_Profunctor = require("../Data.Profunctor/index.js");
  19917. var Closed = function Closed(Profunctor0, closed) {
  19918. this.Profunctor0 = Profunctor0;
  19919. this.closed = closed;
  19920. };
  19921. var closedFunction = new Closed(function () {
  19922. return Data_Profunctor.profunctorFn;
  19923. }, Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn));
  19924. var closed = function closed(dict) {
  19925. return dict.closed;
  19926. };
  19927. module.exports = {
  19928. closed: closed,
  19929. Closed: Closed,
  19930. closedFunction: closedFunction
  19931. };
  19932. },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js"}],"../output/Data.Profunctor.Strong/index.js":[function(require,module,exports) {
  19933. // Generated by purs version 0.13.6
  19934. "use strict";
  19935. var Control_Category = require("../Control.Category/index.js");
  19936. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  19937. var Data_Functor = require("../Data.Functor/index.js");
  19938. var Data_Profunctor = require("../Data.Profunctor/index.js");
  19939. var Data_Tuple = require("../Data.Tuple/index.js");
  19940. var Strong = function Strong(Profunctor0, first, second) {
  19941. this.Profunctor0 = Profunctor0;
  19942. this.first = first;
  19943. this.second = second;
  19944. };
  19945. var strongFn = new Strong(function () {
  19946. return Data_Profunctor.profunctorFn;
  19947. }, function (a2b) {
  19948. return function (v) {
  19949. return new Data_Tuple.Tuple(a2b(v.value0), v.value1);
  19950. };
  19951. }, Data_Functor.map(Data_Tuple.functorTuple));
  19952. var second = function second(dict) {
  19953. return dict.second;
  19954. };
  19955. var first = function first(dict) {
  19956. return dict.first;
  19957. };
  19958. var splitStrong = function splitStrong(dictCategory) {
  19959. return function (dictStrong) {
  19960. return function (l) {
  19961. return function (r) {
  19962. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(first(dictStrong)(l))(second(dictStrong)(r));
  19963. };
  19964. };
  19965. };
  19966. };
  19967. var fanout = function fanout(dictCategory) {
  19968. return function (dictStrong) {
  19969. return function (l) {
  19970. return function (r) {
  19971. var split = Data_Profunctor.dimap(dictStrong.Profunctor0())(Control_Category.identity(Control_Category.categoryFn))(function (a) {
  19972. return new Data_Tuple.Tuple(a, a);
  19973. })(Control_Category.identity(dictCategory));
  19974. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(split)(splitStrong(dictCategory)(dictStrong)(l)(r));
  19975. };
  19976. };
  19977. };
  19978. };
  19979. module.exports = {
  19980. first: first,
  19981. second: second,
  19982. Strong: Strong,
  19983. splitStrong: splitStrong,
  19984. fanout: fanout,
  19985. strongFn: strongFn
  19986. };
  19987. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Profunctor.Star/index.js":[function(require,module,exports) {
  19988. // Generated by purs version 0.13.6
  19989. "use strict";
  19990. var Control_Alt = require("../Control.Alt/index.js");
  19991. var Control_Alternative = require("../Control.Alternative/index.js");
  19992. var Control_Applicative = require("../Control.Applicative/index.js");
  19993. var Control_Apply = require("../Control.Apply/index.js");
  19994. var Control_Bind = require("../Control.Bind/index.js");
  19995. var Control_Category = require("../Control.Category/index.js");
  19996. var Control_Monad = require("../Control.Monad/index.js");
  19997. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  19998. var Control_MonadZero = require("../Control.MonadZero/index.js");
  19999. var Control_Plus = require("../Control.Plus/index.js");
  20000. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  20001. var Data_Distributive = require("../Data.Distributive/index.js");
  20002. var Data_Either = require("../Data.Either/index.js");
  20003. var Data_Functor = require("../Data.Functor/index.js");
  20004. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  20005. var Data_Newtype = require("../Data.Newtype/index.js");
  20006. var Data_Profunctor = require("../Data.Profunctor/index.js");
  20007. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  20008. var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js");
  20009. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  20010. var Data_Tuple = require("../Data.Tuple/index.js");
  20011. var Star = function Star(x) {
  20012. return x;
  20013. };
  20014. var semigroupoidStar = function semigroupoidStar(dictBind) {
  20015. return new Control_Semigroupoid.Semigroupoid(function (v) {
  20016. return function (v1) {
  20017. return function (x) {
  20018. return Control_Bind.bind(dictBind)(v1(x))(v);
  20019. };
  20020. };
  20021. });
  20022. };
  20023. var profunctorStar = function profunctorStar(dictFunctor) {
  20024. return new Data_Profunctor.Profunctor(function (f) {
  20025. return function (g) {
  20026. return function (v) {
  20027. var $78 = Data_Functor.map(dictFunctor)(g);
  20028. return function ($79) {
  20029. return $78(v(f($79)));
  20030. };
  20031. };
  20032. };
  20033. });
  20034. };
  20035. var strongStar = function strongStar(dictFunctor) {
  20036. return new Data_Profunctor_Strong.Strong(function () {
  20037. return profunctorStar(dictFunctor);
  20038. }, function (v) {
  20039. return function (v1) {
  20040. return Data_Functor.map(dictFunctor)(function (v2) {
  20041. return new Data_Tuple.Tuple(v2, v1.value1);
  20042. })(v(v1.value0));
  20043. };
  20044. }, function (v) {
  20045. return function (v1) {
  20046. return Data_Functor.map(dictFunctor)(Data_Tuple.Tuple.create(v1.value0))(v(v1.value1));
  20047. };
  20048. });
  20049. };
  20050. var newtypeStar = new Data_Newtype.Newtype(function (n) {
  20051. return n;
  20052. }, Star);
  20053. var invariantStar = function invariantStar(dictInvariant) {
  20054. return new Data_Functor_Invariant.Invariant(function (f) {
  20055. return function (g) {
  20056. return function (v) {
  20057. var $80 = Data_Functor_Invariant.imap(dictInvariant)(f)(g);
  20058. return function ($81) {
  20059. return $80(v($81));
  20060. };
  20061. };
  20062. };
  20063. });
  20064. };
  20065. var hoistStar = function hoistStar(f) {
  20066. return function (v) {
  20067. return function ($82) {
  20068. return f(v($82));
  20069. };
  20070. };
  20071. };
  20072. var functorStar = function functorStar(dictFunctor) {
  20073. return new Data_Functor.Functor(function (f) {
  20074. return function (v) {
  20075. var $83 = Data_Functor.map(dictFunctor)(f);
  20076. return function ($84) {
  20077. return $83(v($84));
  20078. };
  20079. };
  20080. });
  20081. };
  20082. var distributiveStar = function distributiveStar(dictDistributive) {
  20083. return new Data_Distributive.Distributive(function () {
  20084. return functorStar(dictDistributive.Functor0());
  20085. }, function (dictFunctor) {
  20086. return function (f) {
  20087. var $85 = Data_Distributive.distribute(distributiveStar(dictDistributive))(dictFunctor);
  20088. var $86 = Data_Functor.map(dictFunctor)(f);
  20089. return function ($87) {
  20090. return $85($86($87));
  20091. };
  20092. };
  20093. }, function (dictFunctor) {
  20094. return function (f) {
  20095. return function (a) {
  20096. return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (v) {
  20097. return v(a);
  20098. })(f);
  20099. };
  20100. };
  20101. });
  20102. };
  20103. var closedStar = function closedStar(dictDistributive) {
  20104. return new Data_Profunctor_Closed.Closed(function () {
  20105. return profunctorStar(dictDistributive.Functor0());
  20106. }, function (v) {
  20107. return function (g) {
  20108. return Data_Distributive.distribute(dictDistributive)(Data_Functor.functorFn)(function ($88) {
  20109. return v(g($88));
  20110. });
  20111. };
  20112. });
  20113. };
  20114. var choiceStar = function choiceStar(dictApplicative) {
  20115. return new Data_Profunctor_Choice.Choice(function () {
  20116. return profunctorStar(dictApplicative.Apply0().Functor0());
  20117. }, function (v) {
  20118. return Star(Data_Either.either(function () {
  20119. var $89 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Left.create);
  20120. return function ($90) {
  20121. return $89(v($90));
  20122. };
  20123. }())(function () {
  20124. var $91 = Control_Applicative.pure(dictApplicative);
  20125. return function ($92) {
  20126. return $91(Data_Either.Right.create($92));
  20127. };
  20128. }()));
  20129. }, function (v) {
  20130. return Star(Data_Either.either(function () {
  20131. var $93 = Control_Applicative.pure(dictApplicative);
  20132. return function ($94) {
  20133. return $93(Data_Either.Left.create($94));
  20134. };
  20135. }())(function () {
  20136. var $95 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Right.create);
  20137. return function ($96) {
  20138. return $95(v($96));
  20139. };
  20140. }()));
  20141. });
  20142. };
  20143. var categoryStar = function categoryStar(dictMonad) {
  20144. return new Control_Category.Category(function () {
  20145. return semigroupoidStar(dictMonad.Bind1());
  20146. }, Control_Applicative.pure(dictMonad.Applicative0()));
  20147. };
  20148. var applyStar = function applyStar(dictApply) {
  20149. return new Control_Apply.Apply(function () {
  20150. return functorStar(dictApply.Functor0());
  20151. }, function (v) {
  20152. return function (v1) {
  20153. return function (a) {
  20154. return Control_Apply.apply(dictApply)(v(a))(v1(a));
  20155. };
  20156. };
  20157. });
  20158. };
  20159. var bindStar = function bindStar(dictBind) {
  20160. return new Control_Bind.Bind(function () {
  20161. return applyStar(dictBind.Apply0());
  20162. }, function (v) {
  20163. return function (f) {
  20164. return function (x) {
  20165. return Control_Bind.bind(dictBind)(v(x))(function (a) {
  20166. var v1 = f(a);
  20167. return v1(x);
  20168. });
  20169. };
  20170. };
  20171. });
  20172. };
  20173. var applicativeStar = function applicativeStar(dictApplicative) {
  20174. return new Control_Applicative.Applicative(function () {
  20175. return applyStar(dictApplicative.Apply0());
  20176. }, function (a) {
  20177. return function (v) {
  20178. return Control_Applicative.pure(dictApplicative)(a);
  20179. };
  20180. });
  20181. };
  20182. var monadStar = function monadStar(dictMonad) {
  20183. return new Control_Monad.Monad(function () {
  20184. return applicativeStar(dictMonad.Applicative0());
  20185. }, function () {
  20186. return bindStar(dictMonad.Bind1());
  20187. });
  20188. };
  20189. var altStar = function altStar(dictAlt) {
  20190. return new Control_Alt.Alt(function () {
  20191. return functorStar(dictAlt.Functor0());
  20192. }, function (v) {
  20193. return function (v1) {
  20194. return function (a) {
  20195. return Control_Alt.alt(dictAlt)(v(a))(v1(a));
  20196. };
  20197. };
  20198. });
  20199. };
  20200. var plusStar = function plusStar(dictPlus) {
  20201. return new Control_Plus.Plus(function () {
  20202. return altStar(dictPlus.Alt0());
  20203. }, function (v) {
  20204. return Control_Plus.empty(dictPlus);
  20205. });
  20206. };
  20207. var alternativeStar = function alternativeStar(dictAlternative) {
  20208. return new Control_Alternative.Alternative(function () {
  20209. return applicativeStar(dictAlternative.Applicative0());
  20210. }, function () {
  20211. return plusStar(dictAlternative.Plus1());
  20212. });
  20213. };
  20214. var monadZeroStar = function monadZeroStar(dictMonadZero) {
  20215. return new Control_MonadZero.MonadZero(function () {
  20216. return alternativeStar(dictMonadZero.Alternative1());
  20217. }, function () {
  20218. return monadStar(dictMonadZero.Monad0());
  20219. });
  20220. };
  20221. var monadPlusStar = function monadPlusStar(dictMonadPlus) {
  20222. return new Control_MonadPlus.MonadPlus(function () {
  20223. return monadZeroStar(dictMonadPlus.MonadZero0());
  20224. });
  20225. };
  20226. module.exports = {
  20227. Star: Star,
  20228. hoistStar: hoistStar,
  20229. newtypeStar: newtypeStar,
  20230. semigroupoidStar: semigroupoidStar,
  20231. categoryStar: categoryStar,
  20232. functorStar: functorStar,
  20233. invariantStar: invariantStar,
  20234. applyStar: applyStar,
  20235. applicativeStar: applicativeStar,
  20236. bindStar: bindStar,
  20237. monadStar: monadStar,
  20238. altStar: altStar,
  20239. plusStar: plusStar,
  20240. alternativeStar: alternativeStar,
  20241. monadZeroStar: monadZeroStar,
  20242. monadPlusStar: monadPlusStar,
  20243. distributiveStar: distributiveStar,
  20244. profunctorStar: profunctorStar,
  20245. strongStar: strongStar,
  20246. choiceStar: choiceStar,
  20247. closedStar: closedStar
  20248. };
  20249. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Distributive/index.js":"../output/Data.Distributive/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Closed/index.js":"../output/Data.Profunctor.Closed/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Internal.Wander/index.js":[function(require,module,exports) {
  20250. // Generated by purs version 0.13.6
  20251. "use strict";
  20252. var Data_Functor = require("../Data.Functor/index.js");
  20253. var Data_Identity = require("../Data.Identity/index.js");
  20254. var Data_Newtype = require("../Data.Newtype/index.js");
  20255. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  20256. var Data_Profunctor_Star = require("../Data.Profunctor.Star/index.js");
  20257. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  20258. var Wander = function Wander(Choice1, Strong0, wander) {
  20259. this.Choice1 = Choice1;
  20260. this.Strong0 = Strong0;
  20261. this.wander = wander;
  20262. };
  20263. var wanderStar = function wanderStar(dictApplicative) {
  20264. return new Wander(function () {
  20265. return Data_Profunctor_Star.choiceStar(dictApplicative);
  20266. }, function () {
  20267. return Data_Profunctor_Star.strongStar(dictApplicative.Apply0().Functor0());
  20268. }, function (t) {
  20269. return function (v) {
  20270. return t(dictApplicative)(v);
  20271. };
  20272. });
  20273. };
  20274. var wanderFunction = new Wander(function () {
  20275. return Data_Profunctor_Choice.choiceFn;
  20276. }, function () {
  20277. return Data_Profunctor_Strong.strongFn;
  20278. }, function (t) {
  20279. return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Identity.newtypeIdentity)(Data_Identity.newtypeIdentity)(Data_Identity.Identity)(t(Data_Identity.applicativeIdentity));
  20280. });
  20281. var wander = function wander(dict) {
  20282. return dict.wander;
  20283. };
  20284. module.exports = {
  20285. wander: wander,
  20286. Wander: Wander,
  20287. wanderFunction: wanderFunction,
  20288. wanderStar: wanderStar
  20289. };
  20290. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Star/index.js":"../output/Data.Profunctor.Star/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js"}],"../output/Data.Lazy/foreign.js":[function(require,module,exports) {
  20291. "use strict";
  20292. exports.defer = function (thunk) {
  20293. var v = null;
  20294. return function () {
  20295. if (thunk === undefined) return v;
  20296. v = thunk();
  20297. thunk = undefined; // eslint-disable-line no-param-reassign
  20298. return v;
  20299. };
  20300. };
  20301. exports.force = function (l) {
  20302. return l();
  20303. };
  20304. },{}],"../output/Data.Lazy/index.js":[function(require,module,exports) {
  20305. // Generated by purs version 0.13.6
  20306. "use strict";
  20307. var $foreign = require("./foreign.js");
  20308. var Control_Applicative = require("../Control.Applicative/index.js");
  20309. var Control_Apply = require("../Control.Apply/index.js");
  20310. var Control_Bind = require("../Control.Bind/index.js");
  20311. var Control_Comonad = require("../Control.Comonad/index.js");
  20312. var Control_Extend = require("../Control.Extend/index.js");
  20313. var Control_Lazy = require("../Control.Lazy/index.js");
  20314. var Control_Monad = require("../Control.Monad/index.js");
  20315. var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
  20316. var Data_Bounded = require("../Data.Bounded/index.js");
  20317. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  20318. var Data_Eq = require("../Data.Eq/index.js");
  20319. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  20320. var Data_Foldable = require("../Data.Foldable/index.js");
  20321. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  20322. var Data_Function = require("../Data.Function/index.js");
  20323. var Data_Functor = require("../Data.Functor/index.js");
  20324. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  20325. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  20326. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  20327. var Data_Monoid = require("../Data.Monoid/index.js");
  20328. var Data_Ord = require("../Data.Ord/index.js");
  20329. var Data_Ring = require("../Data.Ring/index.js");
  20330. var Data_Semigroup = require("../Data.Semigroup/index.js");
  20331. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  20332. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  20333. var Data_Semiring = require("../Data.Semiring/index.js");
  20334. var Data_Show = require("../Data.Show/index.js");
  20335. var Data_Traversable = require("../Data.Traversable/index.js");
  20336. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  20337. var Data_Unit = require("../Data.Unit/index.js");
  20338. var showLazy = function showLazy(dictShow) {
  20339. return new Data_Show.Show(function (x) {
  20340. return "(defer \\_ -> " + (Data_Show.show(dictShow)($foreign.force(x)) + ")");
  20341. });
  20342. };
  20343. var semiringLazy = function semiringLazy(dictSemiring) {
  20344. return new Data_Semiring.Semiring(function (a) {
  20345. return function (b) {
  20346. return $foreign.defer(function (v) {
  20347. return Data_Semiring.add(dictSemiring)($foreign.force(a))($foreign.force(b));
  20348. });
  20349. };
  20350. }, function (a) {
  20351. return function (b) {
  20352. return $foreign.defer(function (v) {
  20353. return Data_Semiring.mul(dictSemiring)($foreign.force(a))($foreign.force(b));
  20354. });
  20355. };
  20356. }, $foreign.defer(function (v) {
  20357. return Data_Semiring.one(dictSemiring);
  20358. }), $foreign.defer(function (v) {
  20359. return Data_Semiring.zero(dictSemiring);
  20360. }));
  20361. };
  20362. var semigroupLazy = function semigroupLazy(dictSemigroup) {
  20363. return new Data_Semigroup.Semigroup(function (a) {
  20364. return function (b) {
  20365. return $foreign.defer(function (v) {
  20366. return Data_Semigroup.append(dictSemigroup)($foreign.force(a))($foreign.force(b));
  20367. });
  20368. };
  20369. });
  20370. };
  20371. var ringLazy = function ringLazy(dictRing) {
  20372. return new Data_Ring.Ring(function () {
  20373. return semiringLazy(dictRing.Semiring0());
  20374. }, function (a) {
  20375. return function (b) {
  20376. return $foreign.defer(function (v) {
  20377. return Data_Ring.sub(dictRing)($foreign.force(a))($foreign.force(b));
  20378. });
  20379. };
  20380. });
  20381. };
  20382. var monoidLazy = function monoidLazy(dictMonoid) {
  20383. return new Data_Monoid.Monoid(function () {
  20384. return semigroupLazy(dictMonoid.Semigroup0());
  20385. }, $foreign.defer(function (v) {
  20386. return Data_Monoid.mempty(dictMonoid);
  20387. }));
  20388. };
  20389. var lazyLazy = new Control_Lazy.Lazy(function (f) {
  20390. return $foreign.defer(function (v) {
  20391. return $foreign.force(f(Data_Unit.unit));
  20392. });
  20393. });
  20394. var functorLazy = new Data_Functor.Functor(function (f) {
  20395. return function (l) {
  20396. return $foreign.defer(function (v) {
  20397. return f($foreign.force(l));
  20398. });
  20399. };
  20400. });
  20401. var functorWithIndexLazy = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  20402. return functorLazy;
  20403. }, function (f) {
  20404. return Data_Functor.map(functorLazy)(f(Data_Unit.unit));
  20405. });
  20406. var invariantLazy = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorLazy));
  20407. var foldableLazy = new Data_Foldable.Foldable(function (dictMonoid) {
  20408. return function (f) {
  20409. return function (l) {
  20410. return f($foreign.force(l));
  20411. };
  20412. };
  20413. }, function (f) {
  20414. return function (z) {
  20415. return function (l) {
  20416. return f(z)($foreign.force(l));
  20417. };
  20418. };
  20419. }, function (f) {
  20420. return function (z) {
  20421. return function (l) {
  20422. return f($foreign.force(l))(z);
  20423. };
  20424. };
  20425. });
  20426. var foldableWithIndexLazy = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  20427. return foldableLazy;
  20428. }, function (dictMonoid) {
  20429. return function (f) {
  20430. return Data_Foldable.foldMap(foldableLazy)(dictMonoid)(f(Data_Unit.unit));
  20431. };
  20432. }, function (f) {
  20433. return Data_Foldable.foldl(foldableLazy)(f(Data_Unit.unit));
  20434. }, function (f) {
  20435. return Data_Foldable.foldr(foldableLazy)(f(Data_Unit.unit));
  20436. });
  20437. var traversableLazy = new Data_Traversable.Traversable(function () {
  20438. return foldableLazy;
  20439. }, function () {
  20440. return functorLazy;
  20441. }, function (dictApplicative) {
  20442. return function (l) {
  20443. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($42) {
  20444. return $foreign.defer(Data_Function["const"]($42));
  20445. })($foreign.force(l));
  20446. };
  20447. }, function (dictApplicative) {
  20448. return function (f) {
  20449. return function (l) {
  20450. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($43) {
  20451. return $foreign.defer(Data_Function["const"]($43));
  20452. })(f($foreign.force(l)));
  20453. };
  20454. };
  20455. });
  20456. var traversableWithIndexLazy = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  20457. return foldableWithIndexLazy;
  20458. }, function () {
  20459. return functorWithIndexLazy;
  20460. }, function () {
  20461. return traversableLazy;
  20462. }, function (dictApplicative) {
  20463. return function (f) {
  20464. return Data_Traversable.traverse(traversableLazy)(dictApplicative)(f(Data_Unit.unit));
  20465. };
  20466. });
  20467. var foldable1Lazy = new Data_Semigroup_Foldable.Foldable1(function () {
  20468. return foldableLazy;
  20469. }, function (dictSemigroup) {
  20470. return Data_Semigroup_Foldable.fold1Default(foldable1Lazy)(dictSemigroup);
  20471. }, function (dictSemigroup) {
  20472. return function (f) {
  20473. return function (l) {
  20474. return f($foreign.force(l));
  20475. };
  20476. };
  20477. });
  20478. var traversable1Lazy = new Data_Semigroup_Traversable.Traversable1(function () {
  20479. return foldable1Lazy;
  20480. }, function () {
  20481. return traversableLazy;
  20482. }, function (dictApply) {
  20483. return function (l) {
  20484. return Data_Functor.map(dictApply.Functor0())(function ($44) {
  20485. return $foreign.defer(Data_Function["const"]($44));
  20486. })($foreign.force(l));
  20487. };
  20488. }, function (dictApply) {
  20489. return function (f) {
  20490. return function (l) {
  20491. return Data_Functor.map(dictApply.Functor0())(function ($45) {
  20492. return $foreign.defer(Data_Function["const"]($45));
  20493. })(f($foreign.force(l)));
  20494. };
  20495. };
  20496. });
  20497. var extendLazy = new Control_Extend.Extend(function () {
  20498. return functorLazy;
  20499. }, function (f) {
  20500. return function (x) {
  20501. return $foreign.defer(function (v) {
  20502. return f(x);
  20503. });
  20504. };
  20505. });
  20506. var eqLazy = function eqLazy(dictEq) {
  20507. return new Data_Eq.Eq(function (x) {
  20508. return function (y) {
  20509. return Data_Eq.eq(dictEq)($foreign.force(x))($foreign.force(y));
  20510. };
  20511. });
  20512. };
  20513. var ordLazy = function ordLazy(dictOrd) {
  20514. return new Data_Ord.Ord(function () {
  20515. return eqLazy(dictOrd.Eq0());
  20516. }, function (x) {
  20517. return function (y) {
  20518. return Data_Ord.compare(dictOrd)($foreign.force(x))($foreign.force(y));
  20519. };
  20520. });
  20521. };
  20522. var eq1Lazy = new Data_Eq.Eq1(function (dictEq) {
  20523. return Data_Eq.eq(eqLazy(dictEq));
  20524. });
  20525. var ord1Lazy = new Data_Ord.Ord1(function () {
  20526. return eq1Lazy;
  20527. }, function (dictOrd) {
  20528. return Data_Ord.compare(ordLazy(dictOrd));
  20529. });
  20530. var comonadLazy = new Control_Comonad.Comonad(function () {
  20531. return extendLazy;
  20532. }, $foreign.force);
  20533. var commutativeRingLazy = function commutativeRingLazy(dictCommutativeRing) {
  20534. return new Data_CommutativeRing.CommutativeRing(function () {
  20535. return ringLazy(dictCommutativeRing.Ring0());
  20536. });
  20537. };
  20538. var euclideanRingLazy = function euclideanRingLazy(dictEuclideanRing) {
  20539. return new Data_EuclideanRing.EuclideanRing(function () {
  20540. return commutativeRingLazy(dictEuclideanRing.CommutativeRing0());
  20541. }, function () {
  20542. var $46 = Data_EuclideanRing.degree(dictEuclideanRing);
  20543. return function ($47) {
  20544. return $46($foreign.force($47));
  20545. };
  20546. }(), function (a) {
  20547. return function (b) {
  20548. return $foreign.defer(function (v) {
  20549. return Data_EuclideanRing.div(dictEuclideanRing)($foreign.force(a))($foreign.force(b));
  20550. });
  20551. };
  20552. }, function (a) {
  20553. return function (b) {
  20554. return $foreign.defer(function (v) {
  20555. return Data_EuclideanRing.mod(dictEuclideanRing)($foreign.force(a))($foreign.force(b));
  20556. });
  20557. };
  20558. });
  20559. };
  20560. var boundedLazy = function boundedLazy(dictBounded) {
  20561. return new Data_Bounded.Bounded(function () {
  20562. return ordLazy(dictBounded.Ord0());
  20563. }, $foreign.defer(function (v) {
  20564. return Data_Bounded.bottom(dictBounded);
  20565. }), $foreign.defer(function (v) {
  20566. return Data_Bounded.top(dictBounded);
  20567. }));
  20568. };
  20569. var applyLazy = new Control_Apply.Apply(function () {
  20570. return functorLazy;
  20571. }, function (f) {
  20572. return function (x) {
  20573. return $foreign.defer(function (v) {
  20574. return $foreign.force(f)($foreign.force(x));
  20575. });
  20576. };
  20577. });
  20578. var bindLazy = new Control_Bind.Bind(function () {
  20579. return applyLazy;
  20580. }, function (l) {
  20581. return function (f) {
  20582. return $foreign.defer(function (v) {
  20583. return $foreign.force(f($foreign.force(l)));
  20584. });
  20585. };
  20586. });
  20587. var heytingAlgebraLazy = function heytingAlgebraLazy(dictHeytingAlgebra) {
  20588. return new Data_HeytingAlgebra.HeytingAlgebra(function (a) {
  20589. return function (b) {
  20590. return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.conj(dictHeytingAlgebra))(a))(b);
  20591. };
  20592. }, function (a) {
  20593. return function (b) {
  20594. return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.disj(dictHeytingAlgebra))(a))(b);
  20595. };
  20596. }, $foreign.defer(function (v) {
  20597. return Data_HeytingAlgebra.ff(dictHeytingAlgebra);
  20598. }), function (a) {
  20599. return function (b) {
  20600. return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.implies(dictHeytingAlgebra))(a))(b);
  20601. };
  20602. }, function (a) {
  20603. return Data_Functor.map(functorLazy)(Data_HeytingAlgebra.not(dictHeytingAlgebra))(a);
  20604. }, $foreign.defer(function (v) {
  20605. return Data_HeytingAlgebra.tt(dictHeytingAlgebra);
  20606. }));
  20607. };
  20608. var booleanAlgebraLazy = function booleanAlgebraLazy(dictBooleanAlgebra) {
  20609. return new Data_BooleanAlgebra.BooleanAlgebra(function () {
  20610. return heytingAlgebraLazy(dictBooleanAlgebra.HeytingAlgebra0());
  20611. });
  20612. };
  20613. var applicativeLazy = new Control_Applicative.Applicative(function () {
  20614. return applyLazy;
  20615. }, function (a) {
  20616. return $foreign.defer(function (v) {
  20617. return a;
  20618. });
  20619. });
  20620. var monadLazy = new Control_Monad.Monad(function () {
  20621. return applicativeLazy;
  20622. }, function () {
  20623. return bindLazy;
  20624. });
  20625. module.exports = {
  20626. semiringLazy: semiringLazy,
  20627. ringLazy: ringLazy,
  20628. commutativeRingLazy: commutativeRingLazy,
  20629. euclideanRingLazy: euclideanRingLazy,
  20630. eqLazy: eqLazy,
  20631. eq1Lazy: eq1Lazy,
  20632. ordLazy: ordLazy,
  20633. ord1Lazy: ord1Lazy,
  20634. boundedLazy: boundedLazy,
  20635. semigroupLazy: semigroupLazy,
  20636. monoidLazy: monoidLazy,
  20637. heytingAlgebraLazy: heytingAlgebraLazy,
  20638. booleanAlgebraLazy: booleanAlgebraLazy,
  20639. functorLazy: functorLazy,
  20640. functorWithIndexLazy: functorWithIndexLazy,
  20641. foldableLazy: foldableLazy,
  20642. foldableWithIndexLazy: foldableWithIndexLazy,
  20643. foldable1Lazy: foldable1Lazy,
  20644. traversableLazy: traversableLazy,
  20645. traversableWithIndexLazy: traversableWithIndexLazy,
  20646. traversable1Lazy: traversable1Lazy,
  20647. invariantLazy: invariantLazy,
  20648. applyLazy: applyLazy,
  20649. applicativeLazy: applicativeLazy,
  20650. bindLazy: bindLazy,
  20651. monadLazy: monadLazy,
  20652. extendLazy: extendLazy,
  20653. comonadLazy: comonadLazy,
  20654. showLazy: showLazy,
  20655. lazyLazy: lazyLazy,
  20656. defer: $foreign.defer,
  20657. force: $foreign.force
  20658. };
  20659. },{"./foreign.js":"../output/Data.Lazy/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.BooleanAlgebra/index.js":"../output/Data.BooleanAlgebra/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.List.Lazy.Types/index.js":[function(require,module,exports) {
  20660. // Generated by purs version 0.13.6
  20661. "use strict";
  20662. var Control_Alt = require("../Control.Alt/index.js");
  20663. var Control_Alternative = require("../Control.Alternative/index.js");
  20664. var Control_Applicative = require("../Control.Applicative/index.js");
  20665. var Control_Apply = require("../Control.Apply/index.js");
  20666. var Control_Bind = require("../Control.Bind/index.js");
  20667. var Control_Category = require("../Control.Category/index.js");
  20668. var Control_Comonad = require("../Control.Comonad/index.js");
  20669. var Control_Extend = require("../Control.Extend/index.js");
  20670. var Control_Lazy = require("../Control.Lazy/index.js");
  20671. var Control_Monad = require("../Control.Monad/index.js");
  20672. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  20673. var Control_MonadZero = require("../Control.MonadZero/index.js");
  20674. var Control_Plus = require("../Control.Plus/index.js");
  20675. var Data_Eq = require("../Data.Eq/index.js");
  20676. var Data_Foldable = require("../Data.Foldable/index.js");
  20677. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  20678. var Data_Function = require("../Data.Function/index.js");
  20679. var Data_Functor = require("../Data.Functor/index.js");
  20680. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  20681. var Data_Lazy = require("../Data.Lazy/index.js");
  20682. var Data_Maybe = require("../Data.Maybe/index.js");
  20683. var Data_Monoid = require("../Data.Monoid/index.js");
  20684. var Data_Newtype = require("../Data.Newtype/index.js");
  20685. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  20686. var Data_Ord = require("../Data.Ord/index.js");
  20687. var Data_Ordering = require("../Data.Ordering/index.js");
  20688. var Data_Semigroup = require("../Data.Semigroup/index.js");
  20689. var Data_Semiring = require("../Data.Semiring/index.js");
  20690. var Data_Show = require("../Data.Show/index.js");
  20691. var Data_Traversable = require("../Data.Traversable/index.js");
  20692. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  20693. var Data_Tuple = require("../Data.Tuple/index.js");
  20694. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  20695. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  20696. var List = function List(x) {
  20697. return x;
  20698. };
  20699. var Nil = function () {
  20700. function Nil() {}
  20701. ;
  20702. Nil.value = new Nil();
  20703. return Nil;
  20704. }();
  20705. var Cons = function () {
  20706. function Cons(value0, value1) {
  20707. this.value0 = value0;
  20708. this.value1 = value1;
  20709. }
  20710. ;
  20711. Cons.create = function (value0) {
  20712. return function (value1) {
  20713. return new Cons(value0, value1);
  20714. };
  20715. };
  20716. return Cons;
  20717. }();
  20718. var NonEmptyList = function NonEmptyList(x) {
  20719. return x;
  20720. };
  20721. var nil = List(Data_Lazy.defer(function (v) {
  20722. return Nil.value;
  20723. }));
  20724. var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) {
  20725. return n;
  20726. }, NonEmptyList);
  20727. var newtypeList = new Data_Newtype.Newtype(function (n) {
  20728. return n;
  20729. }, List);
  20730. var step = function () {
  20731. var $215 = Data_Newtype.unwrap(newtypeList);
  20732. return function ($216) {
  20733. return Data_Lazy.force($215($216));
  20734. };
  20735. }();
  20736. var semigroupList = new Data_Semigroup.Semigroup(function (xs) {
  20737. return function (ys) {
  20738. var go = function go(v) {
  20739. if (v instanceof Nil) {
  20740. return step(ys);
  20741. }
  20742. ;
  20743. if (v instanceof Cons) {
  20744. return new Cons(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(ys));
  20745. }
  20746. ;
  20747. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 98, column 5 - line 98, column 21): " + [v.constructor.name]);
  20748. };
  20749. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
  20750. };
  20751. });
  20752. var showList = function showList(dictShow) {
  20753. return new Data_Show.Show(function (xs) {
  20754. var go = function go(v) {
  20755. if (v instanceof Nil) {
  20756. return "Nil";
  20757. }
  20758. ;
  20759. if (v instanceof Cons) {
  20760. return "(Cons " + (Data_Show.show(dictShow)(v.value0) + (" " + (go(step(v.value1)) + ")")));
  20761. }
  20762. ;
  20763. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 64, column 5 - line 64, column 19): " + [v.constructor.name]);
  20764. };
  20765. return "fromStrict (" + (go(step(xs)) + ")");
  20766. });
  20767. };
  20768. var showNonEmptyList = function showNonEmptyList(dictShow) {
  20769. return new Data_Show.Show(function (v) {
  20770. return "(NonEmptyList " + (Data_Show.show(Data_Lazy.showLazy(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow))))(v) + ")");
  20771. });
  20772. };
  20773. var monoidList = new Data_Monoid.Monoid(function () {
  20774. return semigroupList;
  20775. }, nil);
  20776. var lazyList = new Control_Lazy.Lazy(function (f) {
  20777. return List(Data_Lazy.defer(function ($217) {
  20778. return step(f($217));
  20779. }));
  20780. });
  20781. var functorList = new Data_Functor.Functor(function (f) {
  20782. return function (xs) {
  20783. var go = function go(v) {
  20784. if (v instanceof Nil) {
  20785. return Nil.value;
  20786. }
  20787. ;
  20788. if (v instanceof Cons) {
  20789. return new Cons(f(v.value0), Data_Functor.map(functorList)(f)(v.value1));
  20790. }
  20791. ;
  20792. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 107, column 5 - line 107, column 17): " + [v.constructor.name]);
  20793. };
  20794. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
  20795. };
  20796. });
  20797. var functorNonEmptyList = new Data_Functor.Functor(function (f) {
  20798. return function (v) {
  20799. return Data_Functor.map(Data_Lazy.functorLazy)(Data_Functor.map(Data_NonEmpty.functorNonEmpty(functorList))(f))(v);
  20800. };
  20801. });
  20802. var eq1List = new Data_Eq.Eq1(function (dictEq) {
  20803. return function (xs) {
  20804. return function (ys) {
  20805. var go = function go($copy_v) {
  20806. return function ($copy_v1) {
  20807. var $tco_var_v = $copy_v;
  20808. var $tco_done = false;
  20809. var $tco_result;
  20810. function $tco_loop(v, v1) {
  20811. if (v instanceof Nil && v1 instanceof Nil) {
  20812. $tco_done = true;
  20813. return true;
  20814. }
  20815. ;
  20816. if (v instanceof Cons && v1 instanceof Cons && Data_Eq.eq(dictEq)(v.value0)(v1.value0)) {
  20817. $tco_var_v = step(v.value1);
  20818. $copy_v1 = step(v1.value1);
  20819. return;
  20820. }
  20821. ;
  20822. $tco_done = true;
  20823. return false;
  20824. }
  20825. ;
  20826. while (!$tco_done) {
  20827. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  20828. }
  20829. ;
  20830. return $tco_result;
  20831. };
  20832. };
  20833. return go(step(xs))(step(ys));
  20834. };
  20835. };
  20836. });
  20837. var eqList = function eqList(dictEq) {
  20838. return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq));
  20839. };
  20840. var eqNonEmptyList = function eqNonEmptyList(dictEq) {
  20841. return Data_Lazy.eqLazy(Data_NonEmpty.eqNonEmpty(eq1List)(dictEq));
  20842. };
  20843. var ord1List = new Data_Ord.Ord1(function () {
  20844. return eq1List;
  20845. }, function (dictOrd) {
  20846. return function (xs) {
  20847. return function (ys) {
  20848. var go = function go($copy_v) {
  20849. return function ($copy_v1) {
  20850. var $tco_var_v = $copy_v;
  20851. var $tco_done = false;
  20852. var $tco_result;
  20853. function $tco_loop(v, v1) {
  20854. if (v instanceof Nil && v1 instanceof Nil) {
  20855. $tco_done = true;
  20856. return Data_Ordering.EQ.value;
  20857. }
  20858. ;
  20859. if (v instanceof Nil) {
  20860. $tco_done = true;
  20861. return Data_Ordering.LT.value;
  20862. }
  20863. ;
  20864. if (v1 instanceof Nil) {
  20865. $tco_done = true;
  20866. return Data_Ordering.GT.value;
  20867. }
  20868. ;
  20869. if (v instanceof Cons && v1 instanceof Cons) {
  20870. var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0);
  20871. if (v2 instanceof Data_Ordering.EQ) {
  20872. $tco_var_v = step(v.value1);
  20873. $copy_v1 = step(v1.value1);
  20874. return;
  20875. }
  20876. ;
  20877. $tco_done = true;
  20878. return v2;
  20879. }
  20880. ;
  20881. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 84, column 5 - line 84, column 20): " + [v.constructor.name, v1.constructor.name]);
  20882. }
  20883. ;
  20884. while (!$tco_done) {
  20885. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  20886. }
  20887. ;
  20888. return $tco_result;
  20889. };
  20890. };
  20891. return go(step(xs))(step(ys));
  20892. };
  20893. };
  20894. });
  20895. var ordList = function ordList(dictOrd) {
  20896. return new Data_Ord.Ord(function () {
  20897. return eqList(dictOrd.Eq0());
  20898. }, Data_Ord.compare1(ord1List)(dictOrd));
  20899. };
  20900. var ordNonEmptyList = function ordNonEmptyList(dictOrd) {
  20901. return Data_Lazy.ordLazy(Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd));
  20902. };
  20903. var cons = function cons(x) {
  20904. return function (xs) {
  20905. return List(Data_Lazy.defer(function (v) {
  20906. return new Cons(x, xs);
  20907. }));
  20908. };
  20909. };
  20910. var foldableList = new Data_Foldable.Foldable(function (dictMonoid) {
  20911. return function (f) {
  20912. return Data_Foldable.foldl(foldableList)(function (b) {
  20913. return function (a) {
  20914. return Data_Semigroup.append(dictMonoid.Semigroup0())(b)(f(a));
  20915. };
  20916. })(Data_Monoid.mempty(dictMonoid));
  20917. };
  20918. }, function (op) {
  20919. var go = function go($copy_b) {
  20920. return function ($copy_xs) {
  20921. var $tco_var_b = $copy_b;
  20922. var $tco_done = false;
  20923. var $tco_result;
  20924. function $tco_loop(b, xs) {
  20925. var v = step(xs);
  20926. if (v instanceof Nil) {
  20927. $tco_done = true;
  20928. return b;
  20929. }
  20930. ;
  20931. if (v instanceof Cons) {
  20932. $tco_var_b = op(b)(v.value0);
  20933. $copy_xs = v.value1;
  20934. return;
  20935. }
  20936. ;
  20937. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 122, column 7 - line 124, column 40): " + [v.constructor.name]);
  20938. }
  20939. ;
  20940. while (!$tco_done) {
  20941. $tco_result = $tco_loop($tco_var_b, $copy_xs);
  20942. }
  20943. ;
  20944. return $tco_result;
  20945. };
  20946. };
  20947. return go;
  20948. }, function (op) {
  20949. return function (z) {
  20950. return function (xs) {
  20951. var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(cons))(nil);
  20952. return Data_Foldable.foldl(foldableList)(Data_Function.flip(op))(z)(rev(xs));
  20953. };
  20954. };
  20955. });
  20956. var extendList = new Control_Extend.Extend(function () {
  20957. return functorList;
  20958. }, function (f) {
  20959. return function (l) {
  20960. var go = function go(a) {
  20961. return function (v) {
  20962. var acc$prime = cons(a)(v.acc);
  20963. return {
  20964. val: cons(f(acc$prime))(v.val),
  20965. acc: acc$prime
  20966. };
  20967. };
  20968. };
  20969. var v = step(l);
  20970. if (v instanceof Nil) {
  20971. return nil;
  20972. }
  20973. ;
  20974. if (v instanceof Cons) {
  20975. return cons(f(l))(Data_Foldable.foldr(foldableList)(go)({
  20976. val: nil,
  20977. acc: nil
  20978. })(v.value1).val);
  20979. }
  20980. ;
  20981. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 194, column 5 - line 197, column 55): " + [v.constructor.name]);
  20982. };
  20983. });
  20984. var extendNonEmptyList = new Control_Extend.Extend(function () {
  20985. return functorNonEmptyList;
  20986. }, function (f) {
  20987. return function (v) {
  20988. var go = function go(a) {
  20989. return function (v1) {
  20990. return {
  20991. val: cons(f(Data_Lazy.defer(function (v2) {
  20992. return new Data_NonEmpty.NonEmpty(a, v1.acc);
  20993. })))(v1.val),
  20994. acc: cons(a)(v1.acc)
  20995. };
  20996. };
  20997. };
  20998. var v1 = Data_Lazy.force(v);
  20999. return NonEmptyList(Data_Lazy.defer(function (v2) {
  21000. return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({
  21001. val: nil,
  21002. acc: nil
  21003. })(v1.value1).val);
  21004. }));
  21005. };
  21006. });
  21007. var foldableNonEmptyList = new Data_Foldable.Foldable(function (dictMonoid) {
  21008. return function (f) {
  21009. return function (v) {
  21010. return Data_Foldable.foldMap(Data_NonEmpty.foldableNonEmpty(foldableList))(dictMonoid)(f)(Data_Lazy.force(v));
  21011. };
  21012. };
  21013. }, function (f) {
  21014. return function (b) {
  21015. return function (v) {
  21016. return Data_Foldable.foldl(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v));
  21017. };
  21018. };
  21019. }, function (f) {
  21020. return function (b) {
  21021. return function (v) {
  21022. return Data_Foldable.foldr(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v));
  21023. };
  21024. };
  21025. });
  21026. var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  21027. return foldableList;
  21028. }, function (dictMonoid) {
  21029. return function (f) {
  21030. return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
  21031. return function (acc) {
  21032. var $218 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
  21033. var $219 = f(i);
  21034. return function ($220) {
  21035. return $218($219($220));
  21036. };
  21037. };
  21038. })(Data_Monoid.mempty(dictMonoid));
  21039. };
  21040. }, function (f) {
  21041. return function (acc) {
  21042. var $221 = Data_Foldable.foldl(foldableList)(function (v) {
  21043. return function (a) {
  21044. return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a));
  21045. };
  21046. })(new Data_Tuple.Tuple(0, acc));
  21047. return function ($222) {
  21048. return Data_Tuple.snd($221($222));
  21049. };
  21050. };
  21051. }, function (f) {
  21052. return function (b) {
  21053. return function (xs) {
  21054. var v = function () {
  21055. var rev = Data_Foldable.foldl(foldableList)(function (v1) {
  21056. return function (a) {
  21057. return new Data_Tuple.Tuple(v1.value0 + 1 | 0, cons(a)(v1.value1));
  21058. };
  21059. });
  21060. return rev(new Data_Tuple.Tuple(0, nil))(xs);
  21061. }();
  21062. return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) {
  21063. return function (a) {
  21064. return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1));
  21065. };
  21066. })(new Data_Tuple.Tuple(v.value0, b))(v.value1));
  21067. };
  21068. };
  21069. });
  21070. var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  21071. return foldableNonEmptyList;
  21072. }, function (dictMonoid) {
  21073. return function (f) {
  21074. return function (v) {
  21075. return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () {
  21076. var $223 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  21077. return function ($224) {
  21078. return f($223($224));
  21079. };
  21080. }())(Data_Lazy.force(v));
  21081. };
  21082. };
  21083. }, function (f) {
  21084. return function (b) {
  21085. return function (v) {
  21086. return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  21087. var $225 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  21088. return function ($226) {
  21089. return f($225($226));
  21090. };
  21091. }())(b)(Data_Lazy.force(v));
  21092. };
  21093. };
  21094. }, function (f) {
  21095. return function (b) {
  21096. return function (v) {
  21097. return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  21098. var $227 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  21099. return function ($228) {
  21100. return f($227($228));
  21101. };
  21102. }())(b)(Data_Lazy.force(v));
  21103. };
  21104. };
  21105. });
  21106. var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  21107. return functorList;
  21108. }, function (f) {
  21109. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
  21110. return function (x) {
  21111. return function (acc) {
  21112. return cons(f(i)(x))(acc);
  21113. };
  21114. };
  21115. })(nil);
  21116. });
  21117. var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  21118. return functorNonEmptyList;
  21119. }, function (f) {
  21120. return function (v) {
  21121. return NonEmptyList(Data_Lazy.defer(function (v1) {
  21122. return Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () {
  21123. var $229 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  21124. return function ($230) {
  21125. return f($229($230));
  21126. };
  21127. }())(Data_Lazy.force(v));
  21128. }));
  21129. };
  21130. });
  21131. var toList = function toList(v) {
  21132. return Control_Lazy.defer(lazyList)(function (v1) {
  21133. var v2 = Data_Lazy.force(v);
  21134. return cons(v2.value0)(v2.value1);
  21135. });
  21136. };
  21137. var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) {
  21138. return function (as$prime) {
  21139. var v1 = Data_Lazy.force(v);
  21140. return Data_Lazy.defer(function (v2) {
  21141. return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(toList(as$prime)));
  21142. });
  21143. };
  21144. });
  21145. var traversableList = new Data_Traversable.Traversable(function () {
  21146. return foldableList;
  21147. }, function () {
  21148. return functorList;
  21149. }, function (dictApplicative) {
  21150. return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  21151. }, function (dictApplicative) {
  21152. return function (f) {
  21153. return Data_Foldable.foldr(foldableList)(function (a) {
  21154. return function (b) {
  21155. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(a)))(b);
  21156. };
  21157. })(Control_Applicative.pure(dictApplicative)(nil));
  21158. };
  21159. });
  21160. var traversableNonEmptyList = new Data_Traversable.Traversable(function () {
  21161. return foldableNonEmptyList;
  21162. }, function () {
  21163. return functorNonEmptyList;
  21164. }, function (dictApplicative) {
  21165. return function (v) {
  21166. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
  21167. return NonEmptyList(Data_Lazy.defer(function (v1) {
  21168. return xxs;
  21169. }));
  21170. })(Data_Traversable.sequence(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(Data_Lazy.force(v)));
  21171. };
  21172. }, function (dictApplicative) {
  21173. return function (f) {
  21174. return function (v) {
  21175. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
  21176. return NonEmptyList(Data_Lazy.defer(function (v1) {
  21177. return xxs;
  21178. }));
  21179. })(Data_Traversable.traverse(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(f)(Data_Lazy.force(v)));
  21180. };
  21181. };
  21182. });
  21183. var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  21184. return foldableWithIndexList;
  21185. }, function () {
  21186. return functorWithIndexList;
  21187. }, function () {
  21188. return traversableList;
  21189. }, function (dictApplicative) {
  21190. return function (f) {
  21191. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
  21192. return function (a) {
  21193. return function (b) {
  21194. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(i)(a)))(b);
  21195. };
  21196. };
  21197. })(Control_Applicative.pure(dictApplicative)(nil));
  21198. };
  21199. });
  21200. var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  21201. return foldableWithIndexNonEmptyList;
  21202. }, function () {
  21203. return functorWithIndexNonEmptyList;
  21204. }, function () {
  21205. return traversableNonEmptyList;
  21206. }, function (dictApplicative) {
  21207. return function (f) {
  21208. return function (v) {
  21209. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
  21210. return NonEmptyList(Data_Lazy.defer(function (v1) {
  21211. return xxs;
  21212. }));
  21213. })(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () {
  21214. var $231 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  21215. return function ($232) {
  21216. return f($231($232));
  21217. };
  21218. }())(Data_Lazy.force(v)));
  21219. };
  21220. };
  21221. });
  21222. var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function () {
  21223. var go = function go(f) {
  21224. return function (b) {
  21225. return Control_Lazy.defer(lazyList)(function (v) {
  21226. var v1 = f(b);
  21227. if (v1.value1 instanceof Data_Maybe.Just) {
  21228. return cons(v1.value0)(go(f)(v1.value1.value0));
  21229. }
  21230. ;
  21231. if (v1.value1 instanceof Data_Maybe.Nothing) {
  21232. return cons(v1.value0)(nil);
  21233. }
  21234. ;
  21235. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 146, column 28 - line 148, column 33): " + [v1.constructor.name]);
  21236. });
  21237. };
  21238. };
  21239. return go;
  21240. }());
  21241. var unfoldableList = new Data_Unfoldable.Unfoldable(function () {
  21242. return unfoldable1List;
  21243. }, function () {
  21244. var go = function go(f) {
  21245. return function (b) {
  21246. return Control_Lazy.defer(lazyList)(function (v) {
  21247. var v1 = f(b);
  21248. if (v1 instanceof Data_Maybe.Nothing) {
  21249. return nil;
  21250. }
  21251. ;
  21252. if (v1 instanceof Data_Maybe.Just) {
  21253. return cons(v1.value0.value0)(go(f)(v1.value0.value1));
  21254. }
  21255. ;
  21256. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 152, column 28 - line 154, column 39): " + [v1.constructor.name]);
  21257. });
  21258. };
  21259. };
  21260. return go;
  21261. }());
  21262. var unfoldable1NonEmptyList = new Data_Unfoldable1.Unfoldable1(function (f) {
  21263. return function (b) {
  21264. return NonEmptyList(Data_Lazy.defer(function (v) {
  21265. return Data_Unfoldable1.unfoldr1(Data_NonEmpty.unfoldable1NonEmpty(unfoldableList))(f)(b);
  21266. }));
  21267. };
  21268. });
  21269. var comonadNonEmptyList = new Control_Comonad.Comonad(function () {
  21270. return extendNonEmptyList;
  21271. }, function (v) {
  21272. return Data_NonEmpty.head(Data_Lazy.force(v));
  21273. });
  21274. var monadList = new Control_Monad.Monad(function () {
  21275. return applicativeList;
  21276. }, function () {
  21277. return bindList;
  21278. });
  21279. var bindList = new Control_Bind.Bind(function () {
  21280. return applyList;
  21281. }, function (xs) {
  21282. return function (f) {
  21283. var go = function go(v) {
  21284. if (v instanceof Nil) {
  21285. return Nil.value;
  21286. }
  21287. ;
  21288. if (v instanceof Cons) {
  21289. return step(Data_Semigroup.append(semigroupList)(f(v.value0))(Control_Bind.bind(bindList)(v.value1)(f)));
  21290. }
  21291. ;
  21292. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 175, column 5 - line 175, column 17): " + [v.constructor.name]);
  21293. };
  21294. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
  21295. };
  21296. });
  21297. var applyList = new Control_Apply.Apply(function () {
  21298. return functorList;
  21299. }, Control_Monad.ap(monadList));
  21300. var applicativeList = new Control_Applicative.Applicative(function () {
  21301. return applyList;
  21302. }, function (a) {
  21303. return cons(a)(nil);
  21304. });
  21305. var applyNonEmptyList = new Control_Apply.Apply(function () {
  21306. return functorNonEmptyList;
  21307. }, function (v) {
  21308. return function (v1) {
  21309. var v2 = Data_Lazy.force(v1);
  21310. var v3 = Data_Lazy.force(v);
  21311. return Data_Lazy.defer(function (v4) {
  21312. return new Data_NonEmpty.NonEmpty(v3.value0(v2.value0), Data_Semigroup.append(semigroupList)(Control_Apply.apply(applyList)(v3.value1)(cons(v2.value0)(nil)))(Control_Apply.apply(applyList)(cons(v3.value0)(v3.value1))(v2.value1)));
  21313. });
  21314. };
  21315. });
  21316. var bindNonEmptyList = new Control_Bind.Bind(function () {
  21317. return applyNonEmptyList;
  21318. }, function (v) {
  21319. return function (f) {
  21320. var v1 = Data_Lazy.force(v);
  21321. var v2 = Data_Lazy.force(Data_Newtype.unwrap(newtypeNonEmptyList)(f(v1.value0)));
  21322. return Data_Lazy.defer(function (v3) {
  21323. return new Data_NonEmpty.NonEmpty(v2.value0, Data_Semigroup.append(semigroupList)(v2.value1)(Control_Bind.bind(bindList)(v1.value1)(function ($233) {
  21324. return toList(f($233));
  21325. })));
  21326. });
  21327. };
  21328. });
  21329. var altNonEmptyList = new Control_Alt.Alt(function () {
  21330. return functorNonEmptyList;
  21331. }, Data_Semigroup.append(semigroupNonEmptyList));
  21332. var altList = new Control_Alt.Alt(function () {
  21333. return functorList;
  21334. }, Data_Semigroup.append(semigroupList));
  21335. var plusList = new Control_Plus.Plus(function () {
  21336. return altList;
  21337. }, nil);
  21338. var alternativeList = new Control_Alternative.Alternative(function () {
  21339. return applicativeList;
  21340. }, function () {
  21341. return plusList;
  21342. });
  21343. var monadZeroList = new Control_MonadZero.MonadZero(function () {
  21344. return alternativeList;
  21345. }, function () {
  21346. return monadList;
  21347. });
  21348. var monadPlusList = new Control_MonadPlus.MonadPlus(function () {
  21349. return monadZeroList;
  21350. });
  21351. var applicativeNonEmptyList = new Control_Applicative.Applicative(function () {
  21352. return applyNonEmptyList;
  21353. }, function (a) {
  21354. return Data_Lazy.defer(function (v) {
  21355. return Data_NonEmpty.singleton(plusList)(a);
  21356. });
  21357. });
  21358. var monadNonEmptyList = new Control_Monad.Monad(function () {
  21359. return applicativeNonEmptyList;
  21360. }, function () {
  21361. return bindNonEmptyList;
  21362. });
  21363. module.exports = {
  21364. List: List,
  21365. Nil: Nil,
  21366. Cons: Cons,
  21367. step: step,
  21368. nil: nil,
  21369. cons: cons,
  21370. NonEmptyList: NonEmptyList,
  21371. toList: toList,
  21372. newtypeList: newtypeList,
  21373. showList: showList,
  21374. eqList: eqList,
  21375. eq1List: eq1List,
  21376. ordList: ordList,
  21377. ord1List: ord1List,
  21378. lazyList: lazyList,
  21379. semigroupList: semigroupList,
  21380. monoidList: monoidList,
  21381. functorList: functorList,
  21382. functorWithIndexList: functorWithIndexList,
  21383. foldableList: foldableList,
  21384. foldableWithIndexList: foldableWithIndexList,
  21385. unfoldable1List: unfoldable1List,
  21386. unfoldableList: unfoldableList,
  21387. traversableList: traversableList,
  21388. traversableWithIndexList: traversableWithIndexList,
  21389. applyList: applyList,
  21390. applicativeList: applicativeList,
  21391. bindList: bindList,
  21392. monadList: monadList,
  21393. altList: altList,
  21394. plusList: plusList,
  21395. alternativeList: alternativeList,
  21396. monadZeroList: monadZeroList,
  21397. monadPlusList: monadPlusList,
  21398. extendList: extendList,
  21399. newtypeNonEmptyList: newtypeNonEmptyList,
  21400. eqNonEmptyList: eqNonEmptyList,
  21401. ordNonEmptyList: ordNonEmptyList,
  21402. showNonEmptyList: showNonEmptyList,
  21403. functorNonEmptyList: functorNonEmptyList,
  21404. applyNonEmptyList: applyNonEmptyList,
  21405. applicativeNonEmptyList: applicativeNonEmptyList,
  21406. bindNonEmptyList: bindNonEmptyList,
  21407. monadNonEmptyList: monadNonEmptyList,
  21408. altNonEmptyList: altNonEmptyList,
  21409. extendNonEmptyList: extendNonEmptyList,
  21410. comonadNonEmptyList: comonadNonEmptyList,
  21411. semigroupNonEmptyList: semigroupNonEmptyList,
  21412. foldableNonEmptyList: foldableNonEmptyList,
  21413. traversableNonEmptyList: traversableNonEmptyList,
  21414. unfoldable1NonEmptyList: unfoldable1NonEmptyList,
  21415. functorWithIndexNonEmptyList: functorWithIndexNonEmptyList,
  21416. foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList,
  21417. traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList
  21418. };
  21419. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Lazy/index.js":"../output/Data.Lazy/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Data.List.Lazy/index.js":[function(require,module,exports) {
  21420. // Generated by purs version 0.13.6
  21421. "use strict";
  21422. var Control_Alt = require("../Control.Alt/index.js");
  21423. var Control_Applicative = require("../Control.Applicative/index.js");
  21424. var Control_Apply = require("../Control.Apply/index.js");
  21425. var Control_Bind = require("../Control.Bind/index.js");
  21426. var Control_Category = require("../Control.Category/index.js");
  21427. var Control_Lazy = require("../Control.Lazy/index.js");
  21428. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  21429. var Data_Boolean = require("../Data.Boolean/index.js");
  21430. var Data_Eq = require("../Data.Eq/index.js");
  21431. var Data_Foldable = require("../Data.Foldable/index.js");
  21432. var Data_Function = require("../Data.Function/index.js");
  21433. var Data_Functor = require("../Data.Functor/index.js");
  21434. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  21435. var Data_Lazy = require("../Data.Lazy/index.js");
  21436. var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js");
  21437. var Data_Maybe = require("../Data.Maybe/index.js");
  21438. var Data_Newtype = require("../Data.Newtype/index.js");
  21439. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  21440. var Data_Ord = require("../Data.Ord/index.js");
  21441. var Data_Ordering = require("../Data.Ordering/index.js");
  21442. var Data_Semigroup = require("../Data.Semigroup/index.js");
  21443. var Data_Show = require("../Data.Show/index.js");
  21444. var Data_Traversable = require("../Data.Traversable/index.js");
  21445. var Data_Tuple = require("../Data.Tuple/index.js");
  21446. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  21447. var Pattern = function Pattern(x) {
  21448. return x;
  21449. };
  21450. var zipWith = function zipWith(f) {
  21451. return function (xs) {
  21452. return function (ys) {
  21453. var go = function go(v) {
  21454. return function (v1) {
  21455. if (v instanceof Data_List_Lazy_Types.Nil) {
  21456. return Data_List_Lazy_Types.Nil.value;
  21457. }
  21458. ;
  21459. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  21460. return Data_List_Lazy_Types.Nil.value;
  21461. }
  21462. ;
  21463. if (v instanceof Data_List_Lazy_Types.Cons && v1 instanceof Data_List_Lazy_Types.Cons) {
  21464. return new Data_List_Lazy_Types.Cons(f(v.value0)(v1.value0), zipWith(f)(v.value1)(v1.value1));
  21465. }
  21466. ;
  21467. throw new Error("Failed pattern match at Data.List.Lazy (line 693, column 3 - line 693, column 35): " + [v.constructor.name, v1.constructor.name]);
  21468. };
  21469. };
  21470. return Control_Apply.apply(Data_Lazy.applyLazy)(Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(ys));
  21471. };
  21472. };
  21473. };
  21474. var zipWithA = function zipWithA(dictApplicative) {
  21475. return function (f) {
  21476. return function (xs) {
  21477. return function (ys) {
  21478. return Data_Traversable.sequence(Data_List_Lazy_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys));
  21479. };
  21480. };
  21481. };
  21482. };
  21483. var zip = zipWith(Data_Tuple.Tuple.create);
  21484. var updateAt = function updateAt(n) {
  21485. return function (x) {
  21486. return function (xs) {
  21487. var go = function go(v) {
  21488. return function (v1) {
  21489. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  21490. return Data_List_Lazy_Types.Nil.value;
  21491. }
  21492. ;
  21493. if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
  21494. return new Data_List_Lazy_Types.Cons(x, v1.value1);
  21495. }
  21496. ;
  21497. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  21498. return new Data_List_Lazy_Types.Cons(v1.value0, updateAt(v - 1 | 0)(x)(v1.value1));
  21499. }
  21500. ;
  21501. throw new Error("Failed pattern match at Data.List.Lazy (line 367, column 3 - line 367, column 17): " + [v.constructor.name, v1.constructor.name]);
  21502. };
  21503. };
  21504. return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  21505. };
  21506. };
  21507. };
  21508. var unzip = Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(function (v) {
  21509. return function (v1) {
  21510. return new Data_Tuple.Tuple(Data_List_Lazy_Types.cons(v.value0)(v1.value0), Data_List_Lazy_Types.cons(v.value1)(v1.value1));
  21511. };
  21512. })(new Data_Tuple.Tuple(Data_List_Lazy_Types.nil, Data_List_Lazy_Types.nil));
  21513. var uncons = function uncons(xs) {
  21514. var v = Data_List_Lazy_Types.step(xs);
  21515. if (v instanceof Data_List_Lazy_Types.Nil) {
  21516. return Data_Maybe.Nothing.value;
  21517. }
  21518. ;
  21519. if (v instanceof Data_List_Lazy_Types.Cons) {
  21520. return new Data_Maybe.Just({
  21521. head: v.value0,
  21522. tail: v.value1
  21523. });
  21524. }
  21525. ;
  21526. throw new Error("Failed pattern match at Data.List.Lazy (line 285, column 13 - line 287, column 44): " + [v.constructor.name]);
  21527. };
  21528. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  21529. return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
  21530. return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
  21531. return new Data_Tuple.Tuple(rec.head, rec.tail);
  21532. })(uncons(xs));
  21533. });
  21534. };
  21535. var takeWhile = function takeWhile(p) {
  21536. var go = function go(v) {
  21537. if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) {
  21538. return new Data_List_Lazy_Types.Cons(v.value0, takeWhile(p)(v.value1));
  21539. }
  21540. ;
  21541. return Data_List_Lazy_Types.Nil.value;
  21542. };
  21543. var $239 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  21544. var $240 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  21545. return function ($241) {
  21546. return Data_List_Lazy_Types.List($239($240($241)));
  21547. };
  21548. };
  21549. var take = function take(n) {
  21550. var go = function go(v) {
  21551. return function (v1) {
  21552. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  21553. return Data_List_Lazy_Types.Nil.value;
  21554. }
  21555. ;
  21556. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  21557. return new Data_List_Lazy_Types.Cons(v1.value0, take(v - 1 | 0)(v1.value1));
  21558. }
  21559. ;
  21560. throw new Error("Failed pattern match at Data.List.Lazy (line 517, column 3 - line 517, column 32): " + [v.constructor.name, v1.constructor.name]);
  21561. };
  21562. };
  21563. var $119 = n <= 0;
  21564. if ($119) {
  21565. return Data_Function["const"](Data_List_Lazy_Types.nil);
  21566. }
  21567. ;
  21568. var $242 = Data_Functor.map(Data_Lazy.functorLazy)(go(n));
  21569. var $243 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  21570. return function ($244) {
  21571. return Data_List_Lazy_Types.List($242($243($244)));
  21572. };
  21573. };
  21574. var tail = function tail(xs) {
  21575. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  21576. return v.tail;
  21577. })(uncons(xs));
  21578. };
  21579. var stripPrefix = function stripPrefix(dictEq) {
  21580. return function (v) {
  21581. return function (s) {
  21582. var go = function go(prefix) {
  21583. return function (input) {
  21584. var v1 = Data_List_Lazy_Types.step(prefix);
  21585. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  21586. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input));
  21587. }
  21588. ;
  21589. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  21590. var v2 = Data_List_Lazy_Types.step(input);
  21591. if (v2 instanceof Data_List_Lazy_Types.Cons && Data_Eq.eq(dictEq)(v1.value0)(v2.value0)) {
  21592. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({
  21593. a: v1.value1,
  21594. b: v2.value1
  21595. }));
  21596. }
  21597. ;
  21598. return Data_Maybe.Nothing.value;
  21599. }
  21600. ;
  21601. throw new Error("Failed pattern match at Data.List.Lazy (line 499, column 21 - line 503, column 19): " + [v1.constructor.name]);
  21602. };
  21603. };
  21604. return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s);
  21605. };
  21606. };
  21607. };
  21608. var span = function span(p) {
  21609. return function (xs) {
  21610. var v = uncons(xs);
  21611. if (v instanceof Data_Maybe.Just && p(v.value0.head)) {
  21612. var v1 = span(p)(v.value0.tail);
  21613. return {
  21614. init: Data_List_Lazy_Types.cons(v.value0.head)(v1.init),
  21615. rest: v1.rest
  21616. };
  21617. }
  21618. ;
  21619. return {
  21620. init: Data_List_Lazy_Types.nil,
  21621. rest: xs
  21622. };
  21623. };
  21624. };
  21625. var snoc = function snoc(xs) {
  21626. return function (x) {
  21627. return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.cons(x)(Data_List_Lazy_Types.nil))(xs);
  21628. };
  21629. };
  21630. var singleton = function singleton(a) {
  21631. return Data_List_Lazy_Types.cons(a)(Data_List_Lazy_Types.nil);
  21632. };
  21633. var showPattern = function showPattern(dictShow) {
  21634. return new Data_Show.Show(function (v) {
  21635. return "(Pattern " + (Data_Show.show(Data_List_Lazy_Types.showList(dictShow))(v) + ")");
  21636. });
  21637. };
  21638. var scanrLazy = function scanrLazy(f) {
  21639. return function (acc) {
  21640. return function (xs) {
  21641. var go = function go(v) {
  21642. if (v instanceof Data_List_Lazy_Types.Nil) {
  21643. return Data_List_Lazy_Types.Nil.value;
  21644. }
  21645. ;
  21646. if (v instanceof Data_List_Lazy_Types.Cons) {
  21647. var acc$prime = f(v.value0)(acc);
  21648. return Data_List_Lazy_Types.Cons.create(acc$prime)(scanrLazy(f)(acc$prime)(v.value1));
  21649. }
  21650. ;
  21651. throw new Error("Failed pattern match at Data.List.Lazy (line 764, column 5 - line 764, column 27): " + [v.constructor.name]);
  21652. };
  21653. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  21654. };
  21655. };
  21656. };
  21657. var reverse = function reverse(xs) {
  21658. return Control_Lazy.defer(Data_List_Lazy_Types.lazyList)(function (v) {
  21659. return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(Data_List_Lazy_Types.cons))(Data_List_Lazy_Types.nil)(xs);
  21660. });
  21661. };
  21662. var replicateM = function replicateM(dictMonad) {
  21663. return function (n) {
  21664. return function (m) {
  21665. if (n < 1) {
  21666. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil);
  21667. }
  21668. ;
  21669. if (Data_Boolean.otherwise) {
  21670. return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
  21671. return Control_Bind.bind(dictMonad.Bind1())(replicateM(dictMonad)(n - 1 | 0)(m))(function (as) {
  21672. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.cons(a)(as));
  21673. });
  21674. });
  21675. }
  21676. ;
  21677. throw new Error("Failed pattern match at Data.List.Lazy (line 161, column 1 - line 161, column 62): " + [n.constructor.name, m.constructor.name]);
  21678. };
  21679. };
  21680. };
  21681. var repeat = function repeat(x) {
  21682. return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) {
  21683. return Data_List_Lazy_Types.cons(x)(xs);
  21684. });
  21685. };
  21686. var replicate = function replicate(i) {
  21687. return function (xs) {
  21688. return take(i)(repeat(xs));
  21689. };
  21690. };
  21691. var range = function range(start) {
  21692. return function (end) {
  21693. if (start > end) {
  21694. var g = function g(x) {
  21695. if (x >= end) {
  21696. return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x - 1 | 0));
  21697. }
  21698. ;
  21699. if (Data_Boolean.otherwise) {
  21700. return Data_Maybe.Nothing.value;
  21701. }
  21702. ;
  21703. throw new Error("Failed pattern match at Data.List.Lazy (line 148, column 13 - line 149, column 38): " + [x.constructor.name]);
  21704. };
  21705. return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(g)(start);
  21706. }
  21707. ;
  21708. if (Data_Boolean.otherwise) {
  21709. var f = function f(x) {
  21710. if (x <= end) {
  21711. return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x + 1 | 0));
  21712. }
  21713. ;
  21714. if (Data_Boolean.otherwise) {
  21715. return Data_Maybe.Nothing.value;
  21716. }
  21717. ;
  21718. throw new Error("Failed pattern match at Data.List.Lazy (line 153, column 5 - line 154, column 30): " + [x.constructor.name]);
  21719. };
  21720. return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(f)(start);
  21721. }
  21722. ;
  21723. throw new Error("Failed pattern match at Data.List.Lazy (line 145, column 1 - line 145, column 32): " + [start.constructor.name, end.constructor.name]);
  21724. };
  21725. };
  21726. var partition = function partition(f) {
  21727. var go = function go(x) {
  21728. return function (v) {
  21729. var $147 = f(x);
  21730. if ($147) {
  21731. return {
  21732. yes: Data_List_Lazy_Types.cons(x)(v.yes),
  21733. no: v.no
  21734. };
  21735. }
  21736. ;
  21737. return {
  21738. yes: v.yes,
  21739. no: Data_List_Lazy_Types.cons(x)(v.no)
  21740. };
  21741. };
  21742. };
  21743. return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(go)({
  21744. yes: Data_List_Lazy_Types.nil,
  21745. no: Data_List_Lazy_Types.nil
  21746. });
  21747. };
  21748. var $$null = function $$null($245) {
  21749. return Data_Maybe.isNothing(uncons($245));
  21750. };
  21751. var newtypePattern = new Data_Newtype.Newtype(function (n) {
  21752. return n;
  21753. }, Pattern);
  21754. var mapMaybe = function mapMaybe(f) {
  21755. var go = function go($copy_v) {
  21756. var $tco_done = false;
  21757. var $tco_result;
  21758. function $tco_loop(v) {
  21759. if (v instanceof Data_List_Lazy_Types.Nil) {
  21760. $tco_done = true;
  21761. return Data_List_Lazy_Types.Nil.value;
  21762. }
  21763. ;
  21764. if (v instanceof Data_List_Lazy_Types.Cons) {
  21765. var v1 = f(v.value0);
  21766. if (v1 instanceof Data_Maybe.Nothing) {
  21767. $copy_v = Data_List_Lazy_Types.step(v.value1);
  21768. return;
  21769. }
  21770. ;
  21771. if (v1 instanceof Data_Maybe.Just) {
  21772. $tco_done = true;
  21773. return new Data_List_Lazy_Types.Cons(v1.value0, mapMaybe(f)(v.value1));
  21774. }
  21775. ;
  21776. throw new Error("Failed pattern match at Data.List.Lazy (line 460, column 5 - line 462, column 39): " + [v1.constructor.name]);
  21777. }
  21778. ;
  21779. throw new Error("Failed pattern match at Data.List.Lazy (line 458, column 3 - line 458, column 15): " + [v.constructor.name]);
  21780. }
  21781. ;
  21782. while (!$tco_done) {
  21783. $tco_result = $tco_loop($copy_v);
  21784. }
  21785. ;
  21786. return $tco_result;
  21787. };
  21788. var $246 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  21789. var $247 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  21790. return function ($248) {
  21791. return Data_List_Lazy_Types.List($246($247($248)));
  21792. };
  21793. };
  21794. var some = function some(dictAlternative) {
  21795. return function (dictLazy) {
  21796. return function (v) {
  21797. return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Lazy_Types.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
  21798. return many(dictAlternative)(dictLazy)(v);
  21799. }));
  21800. };
  21801. };
  21802. };
  21803. var many = function many(dictAlternative) {
  21804. return function (dictLazy) {
  21805. return function (v) {
  21806. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Lazy_Types.nil));
  21807. };
  21808. };
  21809. };
  21810. var length = Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(function (l) {
  21811. return function (v) {
  21812. return l + 1 | 0;
  21813. };
  21814. })(0);
  21815. var last = function () {
  21816. var go = function go($copy_v) {
  21817. var $tco_done = false;
  21818. var $tco_result;
  21819. function $tco_loop(v) {
  21820. if (v instanceof Data_List_Lazy_Types.Cons) {
  21821. if ($$null(v.value1)) {
  21822. $tco_done = true;
  21823. return new Data_Maybe.Just(v.value0);
  21824. }
  21825. ;
  21826. if (Data_Boolean.otherwise) {
  21827. $copy_v = Data_List_Lazy_Types.step(v.value1);
  21828. return;
  21829. }
  21830. ;
  21831. }
  21832. ;
  21833. $tco_done = true;
  21834. return Data_Maybe.Nothing.value;
  21835. }
  21836. ;
  21837. while (!$tco_done) {
  21838. $tco_result = $tco_loop($copy_v);
  21839. }
  21840. ;
  21841. return $tco_result;
  21842. };
  21843. return function ($249) {
  21844. return go(Data_List_Lazy_Types.step($249));
  21845. };
  21846. }();
  21847. var iterate = function iterate(f) {
  21848. return function (x) {
  21849. return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) {
  21850. return Data_List_Lazy_Types.cons(x)(Data_Functor.map(Data_List_Lazy_Types.functorList)(f)(xs));
  21851. });
  21852. };
  21853. };
  21854. var insertAt = function insertAt(v) {
  21855. return function (x) {
  21856. return function (xs) {
  21857. if (v === 0) {
  21858. return Data_List_Lazy_Types.cons(x)(xs);
  21859. }
  21860. ;
  21861. var go = function go(v1) {
  21862. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  21863. return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil);
  21864. }
  21865. ;
  21866. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  21867. return new Data_List_Lazy_Types.Cons(v1.value0, insertAt(v - 1 | 0)(x)(v1.value1));
  21868. }
  21869. ;
  21870. throw new Error("Failed pattern match at Data.List.Lazy (line 340, column 3 - line 340, column 22): " + [v1.constructor.name]);
  21871. };
  21872. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  21873. };
  21874. };
  21875. };
  21876. var init = function () {
  21877. var go = function go(v) {
  21878. if (v instanceof Data_List_Lazy_Types.Cons) {
  21879. if ($$null(v.value1)) {
  21880. return new Data_Maybe.Just(Data_List_Lazy_Types.nil);
  21881. }
  21882. ;
  21883. if (Data_Boolean.otherwise) {
  21884. return Data_Functor.map(Data_Maybe.functorMaybe)(Data_List_Lazy_Types.cons(v.value0))(go(Data_List_Lazy_Types.step(v.value1)));
  21885. }
  21886. ;
  21887. }
  21888. ;
  21889. return Data_Maybe.Nothing.value;
  21890. };
  21891. return function ($250) {
  21892. return go(Data_List_Lazy_Types.step($250));
  21893. };
  21894. }();
  21895. var index = function index(xs) {
  21896. var go = function go($copy_v) {
  21897. return function ($copy_v1) {
  21898. var $tco_var_v = $copy_v;
  21899. var $tco_done = false;
  21900. var $tco_result;
  21901. function $tco_loop(v, v1) {
  21902. if (v instanceof Data_List_Lazy_Types.Nil) {
  21903. $tco_done = true;
  21904. return Data_Maybe.Nothing.value;
  21905. }
  21906. ;
  21907. if (v instanceof Data_List_Lazy_Types.Cons && v1 === 0) {
  21908. $tco_done = true;
  21909. return new Data_Maybe.Just(v.value0);
  21910. }
  21911. ;
  21912. if (v instanceof Data_List_Lazy_Types.Cons) {
  21913. $tco_var_v = Data_List_Lazy_Types.step(v.value1);
  21914. $copy_v1 = v1 - 1 | 0;
  21915. return;
  21916. }
  21917. ;
  21918. throw new Error("Failed pattern match at Data.List.Lazy (line 299, column 3 - line 299, column 21): " + [v.constructor.name, v1.constructor.name]);
  21919. }
  21920. ;
  21921. while (!$tco_done) {
  21922. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  21923. }
  21924. ;
  21925. return $tco_result;
  21926. };
  21927. };
  21928. return go(Data_List_Lazy_Types.step(xs));
  21929. };
  21930. var head = function head(xs) {
  21931. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  21932. return v.head;
  21933. })(uncons(xs));
  21934. };
  21935. var transpose = function transpose(xs) {
  21936. var v = uncons(xs);
  21937. if (v instanceof Data_Maybe.Nothing) {
  21938. return xs;
  21939. }
  21940. ;
  21941. if (v instanceof Data_Maybe.Just) {
  21942. var v1 = uncons(v.value0.head);
  21943. if (v1 instanceof Data_Maybe.Nothing) {
  21944. return transpose(v.value0.tail);
  21945. }
  21946. ;
  21947. if (v1 instanceof Data_Maybe.Just) {
  21948. return Data_List_Lazy_Types.cons(Data_List_Lazy_Types.cons(v1.value0.head)(mapMaybe(head)(v.value0.tail)))(transpose(Data_List_Lazy_Types.cons(v1.value0.tail)(mapMaybe(tail)(v.value0.tail))));
  21949. }
  21950. ;
  21951. throw new Error("Failed pattern match at Data.List.Lazy (line 734, column 7 - line 738, column 72): " + [v1.constructor.name]);
  21952. }
  21953. ;
  21954. throw new Error("Failed pattern match at Data.List.Lazy (line 730, column 3 - line 738, column 72): " + [v.constructor.name]);
  21955. };
  21956. var groupBy = function groupBy(eq) {
  21957. var go = function go(v) {
  21958. if (v instanceof Data_List_Lazy_Types.Nil) {
  21959. return Data_List_Lazy_Types.Nil.value;
  21960. }
  21961. ;
  21962. if (v instanceof Data_List_Lazy_Types.Cons) {
  21963. var v1 = span(eq(v.value0))(v.value1);
  21964. return new Data_List_Lazy_Types.Cons(Data_Lazy.defer(function (v2) {
  21965. return new Data_NonEmpty.NonEmpty(v.value0, v1.init);
  21966. }), groupBy(eq)(v1.rest));
  21967. }
  21968. ;
  21969. throw new Error("Failed pattern match at Data.List.Lazy (line 588, column 3 - line 588, column 15): " + [v.constructor.name]);
  21970. };
  21971. var $251 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  21972. var $252 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  21973. return function ($253) {
  21974. return Data_List_Lazy_Types.List($251($252($253)));
  21975. };
  21976. };
  21977. var group = function group(dictEq) {
  21978. return groupBy(Data_Eq.eq(dictEq));
  21979. };
  21980. var fromStep = function () {
  21981. var $254 = Control_Applicative.pure(Data_Lazy.applicativeLazy);
  21982. return function ($255) {
  21983. return Data_List_Lazy_Types.List($254($255));
  21984. };
  21985. }();
  21986. var insertBy = function insertBy(cmp) {
  21987. return function (x) {
  21988. return function (xs) {
  21989. var go = function go(v) {
  21990. if (v instanceof Data_List_Lazy_Types.Nil) {
  21991. return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil);
  21992. }
  21993. ;
  21994. if (v instanceof Data_List_Lazy_Types.Cons) {
  21995. var v1 = cmp(x)(v.value0);
  21996. if (v1 instanceof Data_Ordering.GT) {
  21997. return new Data_List_Lazy_Types.Cons(v.value0, insertBy(cmp)(x)(v.value1));
  21998. }
  21999. ;
  22000. return new Data_List_Lazy_Types.Cons(x, fromStep(v));
  22001. }
  22002. ;
  22003. throw new Error("Failed pattern match at Data.List.Lazy (line 235, column 3 - line 235, column 22): " + [v.constructor.name]);
  22004. };
  22005. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  22006. };
  22007. };
  22008. };
  22009. var insert = function insert(dictOrd) {
  22010. return insertBy(Data_Ord.compare(dictOrd));
  22011. };
  22012. var fromFoldable = function fromFoldable(dictFoldable) {
  22013. return Data_Foldable.foldr(dictFoldable)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.nil);
  22014. };
  22015. var foldrLazy = function foldrLazy(dictLazy) {
  22016. return function (op) {
  22017. return function (z) {
  22018. var go = function go(xs) {
  22019. var v = Data_List_Lazy_Types.step(xs);
  22020. if (v instanceof Data_List_Lazy_Types.Cons) {
  22021. return Control_Lazy.defer(dictLazy)(function (v1) {
  22022. return op(v.value0)(go(v.value1));
  22023. });
  22024. }
  22025. ;
  22026. if (v instanceof Data_List_Lazy_Types.Nil) {
  22027. return z;
  22028. }
  22029. ;
  22030. throw new Error("Failed pattern match at Data.List.Lazy (line 756, column 13 - line 758, column 15): " + [v.constructor.name]);
  22031. };
  22032. return go;
  22033. };
  22034. };
  22035. };
  22036. var foldM = function foldM(dictMonad) {
  22037. return function (f) {
  22038. return function (a) {
  22039. return function (xs) {
  22040. var v = uncons(xs);
  22041. if (v instanceof Data_Maybe.Nothing) {
  22042. return Control_Applicative.pure(dictMonad.Applicative0())(a);
  22043. }
  22044. ;
  22045. if (v instanceof Data_Maybe.Just) {
  22046. return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0.head))(function (a$prime) {
  22047. return foldM(dictMonad)(f)(a$prime)(v.value0.tail);
  22048. });
  22049. }
  22050. ;
  22051. throw new Error("Failed pattern match at Data.List.Lazy (line 747, column 5 - line 750, column 54): " + [v.constructor.name]);
  22052. };
  22053. };
  22054. };
  22055. };
  22056. var findIndex = function findIndex(fn) {
  22057. var go = function go(n) {
  22058. return function (list) {
  22059. return Control_Bind.bind(Data_Maybe.bindMaybe)(uncons(list))(function (o) {
  22060. var $199 = fn(o.head);
  22061. if ($199) {
  22062. return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(n);
  22063. }
  22064. ;
  22065. return go(n + 1 | 0)(o.tail);
  22066. });
  22067. };
  22068. };
  22069. return go(0);
  22070. };
  22071. var findLastIndex = function findLastIndex(fn) {
  22072. return function (xs) {
  22073. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  22074. return (length(xs) - 1 | 0) - v | 0;
  22075. })(findIndex(fn)(reverse(xs)));
  22076. };
  22077. };
  22078. var filterM = function filterM(dictMonad) {
  22079. return function (p) {
  22080. return function (list) {
  22081. var v = uncons(list);
  22082. if (v instanceof Data_Maybe.Nothing) {
  22083. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil);
  22084. }
  22085. ;
  22086. if (v instanceof Data_Maybe.Just) {
  22087. return Control_Bind.bind(dictMonad.Bind1())(p(v.value0.head))(function (b) {
  22088. return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(p)(v.value0.tail))(function (xs$prime) {
  22089. return Control_Applicative.pure(dictMonad.Applicative0())(function () {
  22090. if (b) {
  22091. return Data_List_Lazy_Types.cons(v.value0.head)(xs$prime);
  22092. }
  22093. ;
  22094. return xs$prime;
  22095. }());
  22096. });
  22097. });
  22098. }
  22099. ;
  22100. throw new Error("Failed pattern match at Data.List.Lazy (line 443, column 5 - line 448, column 48): " + [v.constructor.name]);
  22101. };
  22102. };
  22103. };
  22104. var filter = function filter(p) {
  22105. var go = function go($copy_v) {
  22106. var $tco_done = false;
  22107. var $tco_result;
  22108. function $tco_loop(v) {
  22109. if (v instanceof Data_List_Lazy_Types.Nil) {
  22110. $tco_done = true;
  22111. return Data_List_Lazy_Types.Nil.value;
  22112. }
  22113. ;
  22114. if (v instanceof Data_List_Lazy_Types.Cons) {
  22115. if (p(v.value0)) {
  22116. $tco_done = true;
  22117. return new Data_List_Lazy_Types.Cons(v.value0, filter(p)(v.value1));
  22118. }
  22119. ;
  22120. if (Data_Boolean.otherwise) {
  22121. $copy_v = Data_List_Lazy_Types.step(v.value1);
  22122. return;
  22123. }
  22124. ;
  22125. }
  22126. ;
  22127. throw new Error("Failed pattern match at Data.List.Lazy (line 428, column 3 - line 428, column 15): " + [v.constructor.name]);
  22128. }
  22129. ;
  22130. while (!$tco_done) {
  22131. $tco_result = $tco_loop($copy_v);
  22132. }
  22133. ;
  22134. return $tco_result;
  22135. };
  22136. var $256 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  22137. var $257 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  22138. return function ($258) {
  22139. return Data_List_Lazy_Types.List($256($257($258)));
  22140. };
  22141. };
  22142. var intersectBy = function intersectBy(eq) {
  22143. return function (xs) {
  22144. return function (ys) {
  22145. return filter(function (x) {
  22146. return Data_Foldable.any(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(eq(x))(ys);
  22147. })(xs);
  22148. };
  22149. };
  22150. };
  22151. var intersect = function intersect(dictEq) {
  22152. return intersectBy(Data_Eq.eq(dictEq));
  22153. };
  22154. var nubBy = function nubBy(eq) {
  22155. var go = function go(v) {
  22156. if (v instanceof Data_List_Lazy_Types.Nil) {
  22157. return Data_List_Lazy_Types.Nil.value;
  22158. }
  22159. ;
  22160. if (v instanceof Data_List_Lazy_Types.Cons) {
  22161. return new Data_List_Lazy_Types.Cons(v.value0, nubBy(eq)(filter(function (y) {
  22162. return !eq(v.value0)(y);
  22163. })(v.value1)));
  22164. }
  22165. ;
  22166. throw new Error("Failed pattern match at Data.List.Lazy (line 621, column 3 - line 621, column 15): " + [v.constructor.name]);
  22167. };
  22168. var $259 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  22169. var $260 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  22170. return function ($261) {
  22171. return Data_List_Lazy_Types.List($259($260($261)));
  22172. };
  22173. };
  22174. var nub = function nub(dictEq) {
  22175. return nubBy(Data_Eq.eq(dictEq));
  22176. };
  22177. var eqPattern = function eqPattern(dictEq) {
  22178. return new Data_Eq.Eq(function (x) {
  22179. return function (y) {
  22180. return Data_Eq.eq(Data_List_Lazy_Types.eqList(dictEq))(x)(y);
  22181. };
  22182. });
  22183. };
  22184. var ordPattern = function ordPattern(dictOrd) {
  22185. return new Data_Ord.Ord(function () {
  22186. return eqPattern(dictOrd.Eq0());
  22187. }, function (x) {
  22188. return function (y) {
  22189. return Data_Ord.compare(Data_List_Lazy_Types.ordList(dictOrd))(x)(y);
  22190. };
  22191. });
  22192. };
  22193. var elemLastIndex = function elemLastIndex(dictEq) {
  22194. return function (x) {
  22195. return findLastIndex(function (v) {
  22196. return Data_Eq.eq(dictEq)(v)(x);
  22197. });
  22198. };
  22199. };
  22200. var elemIndex = function elemIndex(dictEq) {
  22201. return function (x) {
  22202. return findIndex(function (v) {
  22203. return Data_Eq.eq(dictEq)(v)(x);
  22204. });
  22205. };
  22206. };
  22207. var dropWhile = function dropWhile(p) {
  22208. var go = function go($copy_v) {
  22209. var $tco_done = false;
  22210. var $tco_result;
  22211. function $tco_loop(v) {
  22212. if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) {
  22213. $copy_v = Data_List_Lazy_Types.step(v.value1);
  22214. return;
  22215. }
  22216. ;
  22217. $tco_done = true;
  22218. return fromStep(v);
  22219. }
  22220. ;
  22221. while (!$tco_done) {
  22222. $tco_result = $tco_loop($copy_v);
  22223. }
  22224. ;
  22225. return $tco_result;
  22226. };
  22227. return function ($262) {
  22228. return go(Data_List_Lazy_Types.step($262));
  22229. };
  22230. };
  22231. var drop = function drop(n) {
  22232. var go = function go($copy_v) {
  22233. return function ($copy_v1) {
  22234. var $tco_var_v = $copy_v;
  22235. var $tco_done = false;
  22236. var $tco_result;
  22237. function $tco_loop(v, v1) {
  22238. if (v === 0) {
  22239. $tco_done = true;
  22240. return v1;
  22241. }
  22242. ;
  22243. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  22244. $tco_done = true;
  22245. return Data_List_Lazy_Types.Nil.value;
  22246. }
  22247. ;
  22248. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  22249. $tco_var_v = v - 1 | 0;
  22250. $copy_v1 = Data_List_Lazy_Types.step(v1.value1);
  22251. return;
  22252. }
  22253. ;
  22254. throw new Error("Failed pattern match at Data.List.Lazy (line 536, column 3 - line 536, column 15): " + [v.constructor.name, v1.constructor.name]);
  22255. }
  22256. ;
  22257. while (!$tco_done) {
  22258. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  22259. }
  22260. ;
  22261. return $tco_result;
  22262. };
  22263. };
  22264. var $263 = Data_Functor.map(Data_Lazy.functorLazy)(go(n));
  22265. var $264 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  22266. return function ($265) {
  22267. return Data_List_Lazy_Types.List($263($264($265)));
  22268. };
  22269. };
  22270. var slice = function slice(start) {
  22271. return function (end) {
  22272. return function (xs) {
  22273. return take(end - start | 0)(drop(start)(xs));
  22274. };
  22275. };
  22276. };
  22277. var deleteBy = function deleteBy(eq) {
  22278. return function (x) {
  22279. return function (xs) {
  22280. var go = function go(v) {
  22281. if (v instanceof Data_List_Lazy_Types.Nil) {
  22282. return Data_List_Lazy_Types.Nil.value;
  22283. }
  22284. ;
  22285. if (v instanceof Data_List_Lazy_Types.Cons) {
  22286. if (eq(x)(v.value0)) {
  22287. return Data_List_Lazy_Types.step(v.value1);
  22288. }
  22289. ;
  22290. if (Data_Boolean.otherwise) {
  22291. return new Data_List_Lazy_Types.Cons(v.value0, deleteBy(eq)(x)(v.value1));
  22292. }
  22293. ;
  22294. }
  22295. ;
  22296. throw new Error("Failed pattern match at Data.List.Lazy (line 650, column 3 - line 650, column 15): " + [v.constructor.name]);
  22297. };
  22298. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  22299. };
  22300. };
  22301. };
  22302. var unionBy = function unionBy(eq) {
  22303. return function (xs) {
  22304. return function (ys) {
  22305. return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(deleteBy(eq)))(nubBy(eq)(ys))(xs));
  22306. };
  22307. };
  22308. };
  22309. var union = function union(dictEq) {
  22310. return unionBy(Data_Eq.eq(dictEq));
  22311. };
  22312. var deleteAt = function deleteAt(n) {
  22313. return function (xs) {
  22314. var go = function go(v) {
  22315. return function (v1) {
  22316. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  22317. return Data_List_Lazy_Types.Nil.value;
  22318. }
  22319. ;
  22320. if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
  22321. return Data_List_Lazy_Types.step(v1.value1);
  22322. }
  22323. ;
  22324. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  22325. return new Data_List_Lazy_Types.Cons(v1.value0, deleteAt(v - 1 | 0)(v1.value1));
  22326. }
  22327. ;
  22328. throw new Error("Failed pattern match at Data.List.Lazy (line 353, column 3 - line 353, column 17): " + [v.constructor.name, v1.constructor.name]);
  22329. };
  22330. };
  22331. return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  22332. };
  22333. };
  22334. var $$delete = function $$delete(dictEq) {
  22335. return deleteBy(Data_Eq.eq(dictEq));
  22336. };
  22337. var difference = function difference(dictEq) {
  22338. return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip($$delete(dictEq)));
  22339. };
  22340. var cycle = function cycle(xs) {
  22341. return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (ys) {
  22342. return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(ys);
  22343. });
  22344. };
  22345. var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Lazy_Types.bindList));
  22346. var concat = function concat(v) {
  22347. return Control_Bind.bind(Data_List_Lazy_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn));
  22348. };
  22349. var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
  22350. var alterAt = function alterAt(n) {
  22351. return function (f) {
  22352. return function (xs) {
  22353. var go = function go(v) {
  22354. return function (v1) {
  22355. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  22356. return Data_List_Lazy_Types.Nil.value;
  22357. }
  22358. ;
  22359. if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
  22360. var v2 = f(v1.value0);
  22361. if (v2 instanceof Data_Maybe.Nothing) {
  22362. return Data_List_Lazy_Types.step(v1.value1);
  22363. }
  22364. ;
  22365. if (v2 instanceof Data_Maybe.Just) {
  22366. return new Data_List_Lazy_Types.Cons(v2.value0, v1.value1);
  22367. }
  22368. ;
  22369. throw new Error("Failed pattern match at Data.List.Lazy (line 394, column 22 - line 396, column 26): " + [v2.constructor.name]);
  22370. }
  22371. ;
  22372. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  22373. return new Data_List_Lazy_Types.Cons(v1.value0, alterAt(v - 1 | 0)(f)(v1.value1));
  22374. }
  22375. ;
  22376. throw new Error("Failed pattern match at Data.List.Lazy (line 393, column 3 - line 393, column 17): " + [v.constructor.name, v1.constructor.name]);
  22377. };
  22378. };
  22379. return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  22380. };
  22381. };
  22382. };
  22383. var modifyAt = function modifyAt(n) {
  22384. return function (f) {
  22385. return alterAt(n)(function ($266) {
  22386. return Data_Maybe.Just.create(f($266));
  22387. });
  22388. };
  22389. };
  22390. module.exports = {
  22391. toUnfoldable: toUnfoldable,
  22392. fromFoldable: fromFoldable,
  22393. singleton: singleton,
  22394. range: range,
  22395. replicate: replicate,
  22396. replicateM: replicateM,
  22397. some: some,
  22398. many: many,
  22399. repeat: repeat,
  22400. iterate: iterate,
  22401. cycle: cycle,
  22402. "null": $$null,
  22403. length: length,
  22404. snoc: snoc,
  22405. insert: insert,
  22406. insertBy: insertBy,
  22407. head: head,
  22408. last: last,
  22409. tail: tail,
  22410. init: init,
  22411. uncons: uncons,
  22412. index: index,
  22413. elemIndex: elemIndex,
  22414. elemLastIndex: elemLastIndex,
  22415. findIndex: findIndex,
  22416. findLastIndex: findLastIndex,
  22417. insertAt: insertAt,
  22418. deleteAt: deleteAt,
  22419. updateAt: updateAt,
  22420. modifyAt: modifyAt,
  22421. alterAt: alterAt,
  22422. reverse: reverse,
  22423. concat: concat,
  22424. concatMap: concatMap,
  22425. filter: filter,
  22426. filterM: filterM,
  22427. mapMaybe: mapMaybe,
  22428. catMaybes: catMaybes,
  22429. Pattern: Pattern,
  22430. stripPrefix: stripPrefix,
  22431. slice: slice,
  22432. take: take,
  22433. takeWhile: takeWhile,
  22434. drop: drop,
  22435. dropWhile: dropWhile,
  22436. span: span,
  22437. group: group,
  22438. groupBy: groupBy,
  22439. partition: partition,
  22440. nub: nub,
  22441. nubBy: nubBy,
  22442. union: union,
  22443. unionBy: unionBy,
  22444. "delete": $$delete,
  22445. deleteBy: deleteBy,
  22446. difference: difference,
  22447. intersect: intersect,
  22448. intersectBy: intersectBy,
  22449. zipWith: zipWith,
  22450. zipWithA: zipWithA,
  22451. zip: zip,
  22452. unzip: unzip,
  22453. transpose: transpose,
  22454. foldM: foldM,
  22455. foldrLazy: foldrLazy,
  22456. scanrLazy: scanrLazy,
  22457. eqPattern: eqPattern,
  22458. ordPattern: ordPattern,
  22459. newtypePattern: newtypePattern,
  22460. showPattern: showPattern
  22461. };
  22462. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lazy/index.js":"../output/Data.Lazy/index.js","../Data.List.Lazy.Types/index.js":"../output/Data.List.Lazy.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js"}],"../output/Data.Map.Internal/index.js":[function(require,module,exports) {
  22463. // Generated by purs version 0.13.6
  22464. "use strict";
  22465. var Control_Applicative = require("../Control.Applicative/index.js");
  22466. var Control_Apply = require("../Control.Apply/index.js");
  22467. var Control_Category = require("../Control.Category/index.js");
  22468. var Data_Eq = require("../Data.Eq/index.js");
  22469. var Data_Foldable = require("../Data.Foldable/index.js");
  22470. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  22471. var Data_Function = require("../Data.Function/index.js");
  22472. var Data_Functor = require("../Data.Functor/index.js");
  22473. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  22474. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  22475. var Data_List = require("../Data.List/index.js");
  22476. var Data_List_Lazy = require("../Data.List.Lazy/index.js");
  22477. var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js");
  22478. var Data_List_Types = require("../Data.List.Types/index.js");
  22479. var Data_Maybe = require("../Data.Maybe/index.js");
  22480. var Data_Monoid = require("../Data.Monoid/index.js");
  22481. var Data_Ord = require("../Data.Ord/index.js");
  22482. var Data_Ordering = require("../Data.Ordering/index.js");
  22483. var Data_Semigroup = require("../Data.Semigroup/index.js");
  22484. var Data_Show = require("../Data.Show/index.js");
  22485. var Data_Traversable = require("../Data.Traversable/index.js");
  22486. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  22487. var Data_Tuple = require("../Data.Tuple/index.js");
  22488. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  22489. var Leaf = function () {
  22490. function Leaf() {}
  22491. ;
  22492. Leaf.value = new Leaf();
  22493. return Leaf;
  22494. }();
  22495. var Two = function () {
  22496. function Two(value0, value1, value2, value3) {
  22497. this.value0 = value0;
  22498. this.value1 = value1;
  22499. this.value2 = value2;
  22500. this.value3 = value3;
  22501. }
  22502. ;
  22503. Two.create = function (value0) {
  22504. return function (value1) {
  22505. return function (value2) {
  22506. return function (value3) {
  22507. return new Two(value0, value1, value2, value3);
  22508. };
  22509. };
  22510. };
  22511. };
  22512. return Two;
  22513. }();
  22514. var Three = function () {
  22515. function Three(value0, value1, value2, value3, value4, value5, value6) {
  22516. this.value0 = value0;
  22517. this.value1 = value1;
  22518. this.value2 = value2;
  22519. this.value3 = value3;
  22520. this.value4 = value4;
  22521. this.value5 = value5;
  22522. this.value6 = value6;
  22523. }
  22524. ;
  22525. Three.create = function (value0) {
  22526. return function (value1) {
  22527. return function (value2) {
  22528. return function (value3) {
  22529. return function (value4) {
  22530. return function (value5) {
  22531. return function (value6) {
  22532. return new Three(value0, value1, value2, value3, value4, value5, value6);
  22533. };
  22534. };
  22535. };
  22536. };
  22537. };
  22538. };
  22539. };
  22540. return Three;
  22541. }();
  22542. var TwoLeft = function () {
  22543. function TwoLeft(value0, value1, value2) {
  22544. this.value0 = value0;
  22545. this.value1 = value1;
  22546. this.value2 = value2;
  22547. }
  22548. ;
  22549. TwoLeft.create = function (value0) {
  22550. return function (value1) {
  22551. return function (value2) {
  22552. return new TwoLeft(value0, value1, value2);
  22553. };
  22554. };
  22555. };
  22556. return TwoLeft;
  22557. }();
  22558. var TwoRight = function () {
  22559. function TwoRight(value0, value1, value2) {
  22560. this.value0 = value0;
  22561. this.value1 = value1;
  22562. this.value2 = value2;
  22563. }
  22564. ;
  22565. TwoRight.create = function (value0) {
  22566. return function (value1) {
  22567. return function (value2) {
  22568. return new TwoRight(value0, value1, value2);
  22569. };
  22570. };
  22571. };
  22572. return TwoRight;
  22573. }();
  22574. var ThreeLeft = function () {
  22575. function ThreeLeft(value0, value1, value2, value3, value4, value5) {
  22576. this.value0 = value0;
  22577. this.value1 = value1;
  22578. this.value2 = value2;
  22579. this.value3 = value3;
  22580. this.value4 = value4;
  22581. this.value5 = value5;
  22582. }
  22583. ;
  22584. ThreeLeft.create = function (value0) {
  22585. return function (value1) {
  22586. return function (value2) {
  22587. return function (value3) {
  22588. return function (value4) {
  22589. return function (value5) {
  22590. return new ThreeLeft(value0, value1, value2, value3, value4, value5);
  22591. };
  22592. };
  22593. };
  22594. };
  22595. };
  22596. };
  22597. return ThreeLeft;
  22598. }();
  22599. var ThreeMiddle = function () {
  22600. function ThreeMiddle(value0, value1, value2, value3, value4, value5) {
  22601. this.value0 = value0;
  22602. this.value1 = value1;
  22603. this.value2 = value2;
  22604. this.value3 = value3;
  22605. this.value4 = value4;
  22606. this.value5 = value5;
  22607. }
  22608. ;
  22609. ThreeMiddle.create = function (value0) {
  22610. return function (value1) {
  22611. return function (value2) {
  22612. return function (value3) {
  22613. return function (value4) {
  22614. return function (value5) {
  22615. return new ThreeMiddle(value0, value1, value2, value3, value4, value5);
  22616. };
  22617. };
  22618. };
  22619. };
  22620. };
  22621. };
  22622. return ThreeMiddle;
  22623. }();
  22624. var ThreeRight = function () {
  22625. function ThreeRight(value0, value1, value2, value3, value4, value5) {
  22626. this.value0 = value0;
  22627. this.value1 = value1;
  22628. this.value2 = value2;
  22629. this.value3 = value3;
  22630. this.value4 = value4;
  22631. this.value5 = value5;
  22632. }
  22633. ;
  22634. ThreeRight.create = function (value0) {
  22635. return function (value1) {
  22636. return function (value2) {
  22637. return function (value3) {
  22638. return function (value4) {
  22639. return function (value5) {
  22640. return new ThreeRight(value0, value1, value2, value3, value4, value5);
  22641. };
  22642. };
  22643. };
  22644. };
  22645. };
  22646. };
  22647. return ThreeRight;
  22648. }();
  22649. var KickUp = function () {
  22650. function KickUp(value0, value1, value2, value3) {
  22651. this.value0 = value0;
  22652. this.value1 = value1;
  22653. this.value2 = value2;
  22654. this.value3 = value3;
  22655. }
  22656. ;
  22657. KickUp.create = function (value0) {
  22658. return function (value1) {
  22659. return function (value2) {
  22660. return function (value3) {
  22661. return new KickUp(value0, value1, value2, value3);
  22662. };
  22663. };
  22664. };
  22665. };
  22666. return KickUp;
  22667. }();
  22668. var values = function values(v) {
  22669. if (v instanceof Leaf) {
  22670. return Data_List_Types.Nil.value;
  22671. }
  22672. ;
  22673. if (v instanceof Two) {
  22674. return Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value2))(values(v.value3)));
  22675. }
  22676. ;
  22677. if (v instanceof Three) {
  22678. return Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value2))(Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value3))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value5))(values(v.value6)))));
  22679. }
  22680. ;
  22681. throw new Error("Failed pattern match at Data.Map.Internal (line 612, column 1 - line 612, column 40): " + [v.constructor.name]);
  22682. };
  22683. var size = function size(v) {
  22684. if (v instanceof Leaf) {
  22685. return 0;
  22686. }
  22687. ;
  22688. if (v instanceof Two) {
  22689. return (1 + size(v.value0) | 0) + size(v.value3) | 0;
  22690. }
  22691. ;
  22692. if (v instanceof Three) {
  22693. return ((2 + size(v.value0) | 0) + size(v.value3) | 0) + size(v.value6) | 0;
  22694. }
  22695. ;
  22696. throw new Error("Failed pattern match at Data.Map.Internal (line 662, column 1 - line 662, column 35): " + [v.constructor.name]);
  22697. };
  22698. var singleton = function singleton(k) {
  22699. return function (v) {
  22700. return new Two(Leaf.value, k, v, Leaf.value);
  22701. };
  22702. };
  22703. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  22704. return function (m) {
  22705. var go = function go($copy_v) {
  22706. var $tco_done = false;
  22707. var $tco_result;
  22708. function $tco_loop(v) {
  22709. if (v instanceof Data_List_Types.Nil) {
  22710. $tco_done = true;
  22711. return Data_Maybe.Nothing.value;
  22712. }
  22713. ;
  22714. if (v instanceof Data_List_Types.Cons) {
  22715. if (v.value0 instanceof Leaf) {
  22716. $copy_v = v.value1;
  22717. return;
  22718. }
  22719. ;
  22720. if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf && v.value0.value3 instanceof Leaf) {
  22721. $tco_done = true;
  22722. return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), v.value1));
  22723. }
  22724. ;
  22725. if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf) {
  22726. $tco_done = true;
  22727. return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(v.value0.value3, v.value1)));
  22728. }
  22729. ;
  22730. if (v.value0 instanceof Two) {
  22731. $copy_v = new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(singleton(v.value0.value1)(v.value0.value2), new Data_List_Types.Cons(v.value0.value3, v.value1)));
  22732. return;
  22733. }
  22734. ;
  22735. if (v.value0 instanceof Three) {
  22736. $copy_v = new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(singleton(v.value0.value1)(v.value0.value2), new Data_List_Types.Cons(v.value0.value3, new Data_List_Types.Cons(singleton(v.value0.value4)(v.value0.value5), new Data_List_Types.Cons(v.value0.value6, v.value1)))));
  22737. return;
  22738. }
  22739. ;
  22740. throw new Error("Failed pattern match at Data.Map.Internal (line 577, column 18 - line 586, column 71): " + [v.value0.constructor.name]);
  22741. }
  22742. ;
  22743. throw new Error("Failed pattern match at Data.Map.Internal (line 576, column 3 - line 576, column 19): " + [v.constructor.name]);
  22744. }
  22745. ;
  22746. while (!$tco_done) {
  22747. $tco_result = $tco_loop($copy_v);
  22748. }
  22749. ;
  22750. return $tco_result;
  22751. };
  22752. return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value));
  22753. };
  22754. };
  22755. var toAscArray = toUnfoldable(Data_Unfoldable.unfoldableArray);
  22756. var toUnfoldableUnordered = function toUnfoldableUnordered(dictUnfoldable) {
  22757. return function (m) {
  22758. var go = function go($copy_v) {
  22759. var $tco_done = false;
  22760. var $tco_result;
  22761. function $tco_loop(v) {
  22762. if (v instanceof Data_List_Types.Nil) {
  22763. $tco_done = true;
  22764. return Data_Maybe.Nothing.value;
  22765. }
  22766. ;
  22767. if (v instanceof Data_List_Types.Cons) {
  22768. if (v.value0 instanceof Leaf) {
  22769. $copy_v = v.value1;
  22770. return;
  22771. }
  22772. ;
  22773. if (v.value0 instanceof Two) {
  22774. $tco_done = true;
  22775. return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(v.value0.value3, v.value1))));
  22776. }
  22777. ;
  22778. if (v.value0 instanceof Three) {
  22779. $tco_done = true;
  22780. return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(singleton(v.value0.value4)(v.value0.value5), new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(v.value0.value3, new Data_List_Types.Cons(v.value0.value6, v.value1))))));
  22781. }
  22782. ;
  22783. throw new Error("Failed pattern match at Data.Map.Internal (line 598, column 18 - line 603, column 77): " + [v.value0.constructor.name]);
  22784. }
  22785. ;
  22786. throw new Error("Failed pattern match at Data.Map.Internal (line 597, column 3 - line 597, column 19): " + [v.constructor.name]);
  22787. }
  22788. ;
  22789. while (!$tco_done) {
  22790. $tco_result = $tco_loop($copy_v);
  22791. }
  22792. ;
  22793. return $tco_result;
  22794. };
  22795. return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value));
  22796. };
  22797. };
  22798. var showTree = function showTree(dictShow) {
  22799. return function (dictShow1) {
  22800. return function (v) {
  22801. if (v instanceof Leaf) {
  22802. return "Leaf";
  22803. }
  22804. ;
  22805. if (v instanceof Two) {
  22806. return "Two (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + ")")))))));
  22807. }
  22808. ;
  22809. if (v instanceof Three) {
  22810. return "Three (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + (") (" + (Data_Show.show(dictShow)(v.value4) + (") (" + (Data_Show.show(dictShow1)(v.value5) + (") (" + (showTree(dictShow)(dictShow1)(v.value6) + ")")))))))))))));
  22811. }
  22812. ;
  22813. throw new Error("Failed pattern match at Data.Map.Internal (line 153, column 1 - line 153, column 62): " + [v.constructor.name]);
  22814. };
  22815. };
  22816. };
  22817. var showMap = function showMap(dictShow) {
  22818. return function (dictShow1) {
  22819. return new Data_Show.Show(function (m) {
  22820. return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(dictShow)(dictShow1)))(toAscArray(m)) + ")");
  22821. });
  22822. };
  22823. };
  22824. var lookupLE = function lookupLE(dictOrd) {
  22825. return function (k) {
  22826. var comp = Data_Ord.compare(dictOrd);
  22827. var go = function go(v) {
  22828. if (v instanceof Leaf) {
  22829. return Data_Maybe.Nothing.value;
  22830. }
  22831. ;
  22832. if (v instanceof Two) {
  22833. var v2 = comp(k)(v.value1);
  22834. if (v2 instanceof Data_Ordering.EQ) {
  22835. return new Data_Maybe.Just({
  22836. key: v.value1,
  22837. value: v.value2
  22838. });
  22839. }
  22840. ;
  22841. if (v2 instanceof Data_Ordering.GT) {
  22842. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  22843. key: v.value1,
  22844. value: v.value2
  22845. })(go(v.value3)));
  22846. }
  22847. ;
  22848. if (v2 instanceof Data_Ordering.LT) {
  22849. return go(v.value0);
  22850. }
  22851. ;
  22852. throw new Error("Failed pattern match at Data.Map.Internal (line 225, column 33 - line 228, column 20): " + [v2.constructor.name]);
  22853. }
  22854. ;
  22855. if (v instanceof Three) {
  22856. var v3 = comp(k)(v.value4);
  22857. if (v3 instanceof Data_Ordering.EQ) {
  22858. return new Data_Maybe.Just({
  22859. key: v.value4,
  22860. value: v.value5
  22861. });
  22862. }
  22863. ;
  22864. if (v3 instanceof Data_Ordering.GT) {
  22865. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  22866. key: v.value4,
  22867. value: v.value5
  22868. })(go(v.value6)));
  22869. }
  22870. ;
  22871. if (v3 instanceof Data_Ordering.LT) {
  22872. return go(new Two(v.value0, v.value1, v.value2, v.value3));
  22873. }
  22874. ;
  22875. throw new Error("Failed pattern match at Data.Map.Internal (line 229, column 45 - line 232, column 36): " + [v3.constructor.name]);
  22876. }
  22877. ;
  22878. throw new Error("Failed pattern match at Data.Map.Internal (line 224, column 5 - line 224, column 22): " + [v.constructor.name]);
  22879. };
  22880. return go;
  22881. };
  22882. };
  22883. var lookupGE = function lookupGE(dictOrd) {
  22884. return function (k) {
  22885. var comp = Data_Ord.compare(dictOrd);
  22886. var go = function go(v) {
  22887. if (v instanceof Leaf) {
  22888. return Data_Maybe.Nothing.value;
  22889. }
  22890. ;
  22891. if (v instanceof Two) {
  22892. var v2 = comp(k)(v.value1);
  22893. if (v2 instanceof Data_Ordering.EQ) {
  22894. return new Data_Maybe.Just({
  22895. key: v.value1,
  22896. value: v.value2
  22897. });
  22898. }
  22899. ;
  22900. if (v2 instanceof Data_Ordering.LT) {
  22901. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  22902. key: v.value1,
  22903. value: v.value2
  22904. })(go(v.value0)));
  22905. }
  22906. ;
  22907. if (v2 instanceof Data_Ordering.GT) {
  22908. return go(v.value3);
  22909. }
  22910. ;
  22911. throw new Error("Failed pattern match at Data.Map.Internal (line 259, column 33 - line 262, column 21): " + [v2.constructor.name]);
  22912. }
  22913. ;
  22914. if (v instanceof Three) {
  22915. var v3 = comp(k)(v.value1);
  22916. if (v3 instanceof Data_Ordering.EQ) {
  22917. return new Data_Maybe.Just({
  22918. key: v.value1,
  22919. value: v.value2
  22920. });
  22921. }
  22922. ;
  22923. if (v3 instanceof Data_Ordering.LT) {
  22924. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  22925. key: v.value1,
  22926. value: v.value2
  22927. })(go(v.value0)));
  22928. }
  22929. ;
  22930. if (v3 instanceof Data_Ordering.GT) {
  22931. return go(new Two(v.value3, v.value4, v.value5, v.value6));
  22932. }
  22933. ;
  22934. throw new Error("Failed pattern match at Data.Map.Internal (line 263, column 45 - line 266, column 37): " + [v3.constructor.name]);
  22935. }
  22936. ;
  22937. throw new Error("Failed pattern match at Data.Map.Internal (line 258, column 5 - line 258, column 22): " + [v.constructor.name]);
  22938. };
  22939. return go;
  22940. };
  22941. };
  22942. var lookup = function lookup(dictOrd) {
  22943. return function (k) {
  22944. var comp = Data_Ord.compare(dictOrd);
  22945. var go = function go($copy_v) {
  22946. var $tco_done = false;
  22947. var $tco_result;
  22948. function $tco_loop(v) {
  22949. if (v instanceof Leaf) {
  22950. $tco_done = true;
  22951. return Data_Maybe.Nothing.value;
  22952. }
  22953. ;
  22954. if (v instanceof Two) {
  22955. var v2 = comp(k)(v.value1);
  22956. if (v2 instanceof Data_Ordering.EQ) {
  22957. $tco_done = true;
  22958. return new Data_Maybe.Just(v.value2);
  22959. }
  22960. ;
  22961. if (v2 instanceof Data_Ordering.LT) {
  22962. $copy_v = v.value0;
  22963. return;
  22964. }
  22965. ;
  22966. $copy_v = v.value3;
  22967. return;
  22968. }
  22969. ;
  22970. if (v instanceof Three) {
  22971. var v3 = comp(k)(v.value1);
  22972. if (v3 instanceof Data_Ordering.EQ) {
  22973. $tco_done = true;
  22974. return new Data_Maybe.Just(v.value2);
  22975. }
  22976. ;
  22977. var v4 = comp(k)(v.value4);
  22978. if (v4 instanceof Data_Ordering.EQ) {
  22979. $tco_done = true;
  22980. return new Data_Maybe.Just(v.value5);
  22981. }
  22982. ;
  22983. if (v3 instanceof Data_Ordering.LT) {
  22984. $copy_v = v.value0;
  22985. return;
  22986. }
  22987. ;
  22988. if (v4 instanceof Data_Ordering.GT) {
  22989. $copy_v = v.value6;
  22990. return;
  22991. }
  22992. ;
  22993. $copy_v = v.value3;
  22994. return;
  22995. }
  22996. ;
  22997. throw new Error("Failed pattern match at Data.Map.Internal (line 200, column 5 - line 200, column 22): " + [v.constructor.name]);
  22998. }
  22999. ;
  23000. while (!$tco_done) {
  23001. $tco_result = $tco_loop($copy_v);
  23002. }
  23003. ;
  23004. return $tco_result;
  23005. };
  23006. return go;
  23007. };
  23008. };
  23009. var member = function member(dictOrd) {
  23010. return function (k) {
  23011. return function (m) {
  23012. return Data_Maybe.isJust(lookup(dictOrd)(k)(m));
  23013. };
  23014. };
  23015. };
  23016. var keys = function keys(v) {
  23017. if (v instanceof Leaf) {
  23018. return Data_List_Types.Nil.value;
  23019. }
  23020. ;
  23021. if (v instanceof Two) {
  23022. return Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value1))(keys(v.value3)));
  23023. }
  23024. ;
  23025. if (v instanceof Three) {
  23026. return Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value1))(Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value3))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value4))(keys(v.value6)))));
  23027. }
  23028. ;
  23029. throw new Error("Failed pattern match at Data.Map.Internal (line 606, column 1 - line 606, column 38): " + [v.constructor.name]);
  23030. };
  23031. var isSubmap = function isSubmap(dictOrd) {
  23032. return function (dictEq) {
  23033. return function (m1) {
  23034. return function (m2) {
  23035. var f = function f(v) {
  23036. return Data_Eq.eq(Data_Maybe.eqMaybe(dictEq))(lookup(dictOrd)(v.value0)(m2))(new Data_Maybe.Just(v.value1));
  23037. };
  23038. return Data_Foldable.all(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(f)(toUnfoldable(Data_List_Lazy_Types.unfoldableList)(m1));
  23039. };
  23040. };
  23041. };
  23042. };
  23043. var isEmpty = function isEmpty(v) {
  23044. if (v instanceof Leaf) {
  23045. return true;
  23046. }
  23047. ;
  23048. return false;
  23049. };
  23050. var functorMap = new Data_Functor.Functor(function (v) {
  23051. return function (v1) {
  23052. if (v1 instanceof Leaf) {
  23053. return Leaf.value;
  23054. }
  23055. ;
  23056. if (v1 instanceof Two) {
  23057. return new Two(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3));
  23058. }
  23059. ;
  23060. if (v1 instanceof Three) {
  23061. return new Three(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3), v1.value4, v(v1.value5), Data_Functor.map(functorMap)(v)(v1.value6));
  23062. }
  23063. ;
  23064. throw new Error("Failed pattern match at Data.Map.Internal (line 96, column 1 - line 99, column 110): " + [v.constructor.name, v1.constructor.name]);
  23065. };
  23066. });
  23067. var functorWithIndexMap = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  23068. return functorMap;
  23069. }, function (v) {
  23070. return function (v1) {
  23071. if (v1 instanceof Leaf) {
  23072. return Leaf.value;
  23073. }
  23074. ;
  23075. if (v1 instanceof Two) {
  23076. return new Two(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3));
  23077. }
  23078. ;
  23079. if (v1 instanceof Three) {
  23080. return new Three(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3), v1.value4, v(v1.value4)(v1.value5), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value6));
  23081. }
  23082. ;
  23083. throw new Error("Failed pattern match at Data.Map.Internal (line 101, column 1 - line 104, column 152): " + [v.constructor.name, v1.constructor.name]);
  23084. };
  23085. });
  23086. var fromZipper = function fromZipper($copy_dictOrd) {
  23087. return function ($copy_v) {
  23088. return function ($copy_tree) {
  23089. var $tco_var_dictOrd = $copy_dictOrd;
  23090. var $tco_var_v = $copy_v;
  23091. var $tco_done = false;
  23092. var $tco_result;
  23093. function $tco_loop(dictOrd, v, tree) {
  23094. if (v instanceof Data_List_Types.Nil) {
  23095. $tco_done = true;
  23096. return tree;
  23097. }
  23098. ;
  23099. if (v instanceof Data_List_Types.Cons) {
  23100. if (v.value0 instanceof TwoLeft) {
  23101. $tco_var_dictOrd = dictOrd;
  23102. $tco_var_v = v.value1;
  23103. $copy_tree = new Two(tree, v.value0.value0, v.value0.value1, v.value0.value2);
  23104. return;
  23105. }
  23106. ;
  23107. if (v.value0 instanceof TwoRight) {
  23108. $tco_var_dictOrd = dictOrd;
  23109. $tco_var_v = v.value1;
  23110. $copy_tree = new Two(v.value0.value0, v.value0.value1, v.value0.value2, tree);
  23111. return;
  23112. }
  23113. ;
  23114. if (v.value0 instanceof ThreeLeft) {
  23115. $tco_var_dictOrd = dictOrd;
  23116. $tco_var_v = v.value1;
  23117. $copy_tree = new Three(tree, v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5);
  23118. return;
  23119. }
  23120. ;
  23121. if (v.value0 instanceof ThreeMiddle) {
  23122. $tco_var_dictOrd = dictOrd;
  23123. $tco_var_v = v.value1;
  23124. $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, tree, v.value0.value3, v.value0.value4, v.value0.value5);
  23125. return;
  23126. }
  23127. ;
  23128. if (v.value0 instanceof ThreeRight) {
  23129. $tco_var_dictOrd = dictOrd;
  23130. $tco_var_v = v.value1;
  23131. $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5, tree);
  23132. return;
  23133. }
  23134. ;
  23135. throw new Error("Failed pattern match at Data.Map.Internal (line 418, column 3 - line 423, column 88): " + [v.value0.constructor.name]);
  23136. }
  23137. ;
  23138. throw new Error("Failed pattern match at Data.Map.Internal (line 415, column 1 - line 415, column 80): " + [v.constructor.name, tree.constructor.name]);
  23139. }
  23140. ;
  23141. while (!$tco_done) {
  23142. $tco_result = $tco_loop($tco_var_dictOrd, $tco_var_v, $copy_tree);
  23143. }
  23144. ;
  23145. return $tco_result;
  23146. };
  23147. };
  23148. };
  23149. var insert = function insert(dictOrd) {
  23150. return function (k) {
  23151. return function (v) {
  23152. var up = function up($copy_v1) {
  23153. return function ($copy_v2) {
  23154. var $tco_var_v1 = $copy_v1;
  23155. var $tco_done = false;
  23156. var $tco_result;
  23157. function $tco_loop(v1, v2) {
  23158. if (v1 instanceof Data_List_Types.Nil) {
  23159. $tco_done = true;
  23160. return new Two(v2.value0, v2.value1, v2.value2, v2.value3);
  23161. }
  23162. ;
  23163. if (v1 instanceof Data_List_Types.Cons) {
  23164. if (v1.value0 instanceof TwoLeft) {
  23165. $tco_done = true;
  23166. return fromZipper(dictOrd)(v1.value1)(new Three(v2.value0, v2.value1, v2.value2, v2.value3, v1.value0.value0, v1.value0.value1, v1.value0.value2));
  23167. }
  23168. ;
  23169. if (v1.value0 instanceof TwoRight) {
  23170. $tco_done = true;
  23171. return fromZipper(dictOrd)(v1.value1)(new Three(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0, v2.value1, v2.value2, v2.value3));
  23172. }
  23173. ;
  23174. if (v1.value0 instanceof ThreeLeft) {
  23175. $tco_var_v1 = v1.value1;
  23176. $copy_v2 = new KickUp(new Two(v2.value0, v2.value1, v2.value2, v2.value3), v1.value0.value0, v1.value0.value1, new Two(v1.value0.value2, v1.value0.value3, v1.value0.value4, v1.value0.value5));
  23177. return;
  23178. }
  23179. ;
  23180. if (v1.value0 instanceof ThreeMiddle) {
  23181. $tco_var_v1 = v1.value1;
  23182. $copy_v2 = new KickUp(new Two(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0), v2.value1, v2.value2, new Two(v2.value3, v1.value0.value3, v1.value0.value4, v1.value0.value5));
  23183. return;
  23184. }
  23185. ;
  23186. if (v1.value0 instanceof ThreeRight) {
  23187. $tco_var_v1 = v1.value1;
  23188. $copy_v2 = new KickUp(new Two(v1.value0.value0, v1.value0.value1, v1.value0.value2, v1.value0.value3), v1.value0.value4, v1.value0.value5, new Two(v2.value0, v2.value1, v2.value2, v2.value3));
  23189. return;
  23190. }
  23191. ;
  23192. throw new Error("Failed pattern match at Data.Map.Internal (line 454, column 5 - line 459, column 108): " + [v1.value0.constructor.name, v2.constructor.name]);
  23193. }
  23194. ;
  23195. throw new Error("Failed pattern match at Data.Map.Internal (line 451, column 3 - line 451, column 56): " + [v1.constructor.name, v2.constructor.name]);
  23196. }
  23197. ;
  23198. while (!$tco_done) {
  23199. $tco_result = $tco_loop($tco_var_v1, $copy_v2);
  23200. }
  23201. ;
  23202. return $tco_result;
  23203. };
  23204. };
  23205. var comp = Data_Ord.compare(dictOrd);
  23206. var down = function down($copy_ctx) {
  23207. return function ($copy_v1) {
  23208. var $tco_var_ctx = $copy_ctx;
  23209. var $tco_done = false;
  23210. var $tco_result;
  23211. function $tco_loop(ctx, v1) {
  23212. if (v1 instanceof Leaf) {
  23213. $tco_done = true;
  23214. return up(ctx)(new KickUp(Leaf.value, k, v, Leaf.value));
  23215. }
  23216. ;
  23217. if (v1 instanceof Two) {
  23218. var v2 = comp(k)(v1.value1);
  23219. if (v2 instanceof Data_Ordering.EQ) {
  23220. $tco_done = true;
  23221. return fromZipper(dictOrd)(ctx)(new Two(v1.value0, k, v, v1.value3));
  23222. }
  23223. ;
  23224. if (v2 instanceof Data_Ordering.LT) {
  23225. $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(v1.value1, v1.value2, v1.value3), ctx);
  23226. $copy_v1 = v1.value0;
  23227. return;
  23228. }
  23229. ;
  23230. $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(v1.value0, v1.value1, v1.value2), ctx);
  23231. $copy_v1 = v1.value3;
  23232. return;
  23233. }
  23234. ;
  23235. if (v1 instanceof Three) {
  23236. var v3 = comp(k)(v1.value1);
  23237. if (v3 instanceof Data_Ordering.EQ) {
  23238. $tco_done = true;
  23239. return fromZipper(dictOrd)(ctx)(new Three(v1.value0, k, v, v1.value3, v1.value4, v1.value5, v1.value6));
  23240. }
  23241. ;
  23242. var v4 = comp(k)(v1.value4);
  23243. if (v4 instanceof Data_Ordering.EQ) {
  23244. $tco_done = true;
  23245. return fromZipper(dictOrd)(ctx)(new Three(v1.value0, v1.value1, v1.value2, v1.value3, k, v, v1.value6));
  23246. }
  23247. ;
  23248. if (v3 instanceof Data_Ordering.LT) {
  23249. $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(v1.value1, v1.value2, v1.value3, v1.value4, v1.value5, v1.value6), ctx);
  23250. $copy_v1 = v1.value0;
  23251. return;
  23252. }
  23253. ;
  23254. if (v3 instanceof Data_Ordering.GT && v4 instanceof Data_Ordering.LT) {
  23255. $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(v1.value0, v1.value1, v1.value2, v1.value4, v1.value5, v1.value6), ctx);
  23256. $copy_v1 = v1.value3;
  23257. return;
  23258. }
  23259. ;
  23260. $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(v1.value0, v1.value1, v1.value2, v1.value3, v1.value4, v1.value5), ctx);
  23261. $copy_v1 = v1.value6;
  23262. return;
  23263. }
  23264. ;
  23265. throw new Error("Failed pattern match at Data.Map.Internal (line 434, column 3 - line 434, column 55): " + [ctx.constructor.name, v1.constructor.name]);
  23266. }
  23267. ;
  23268. while (!$tco_done) {
  23269. $tco_result = $tco_loop($tco_var_ctx, $copy_v1);
  23270. }
  23271. ;
  23272. return $tco_result;
  23273. };
  23274. };
  23275. return down(Data_List_Types.Nil.value);
  23276. };
  23277. };
  23278. };
  23279. var pop = function pop(dictOrd) {
  23280. return function (k) {
  23281. var up = function up($copy_ctxs) {
  23282. return function ($copy_tree) {
  23283. var $tco_var_ctxs = $copy_ctxs;
  23284. var $tco_done = false;
  23285. var $tco_result;
  23286. function $tco_loop(ctxs, tree) {
  23287. if (ctxs instanceof Data_List_Types.Nil) {
  23288. $tco_done = true;
  23289. return tree;
  23290. }
  23291. ;
  23292. if (ctxs instanceof Data_List_Types.Cons) {
  23293. if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Leaf && tree instanceof Leaf) {
  23294. $tco_done = true;
  23295. return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value));
  23296. }
  23297. ;
  23298. if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Leaf && tree instanceof Leaf) {
  23299. $tco_done = true;
  23300. return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value));
  23301. }
  23302. ;
  23303. if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Two) {
  23304. $tco_var_ctxs = ctxs.value1;
  23305. $copy_tree = new Three(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0, ctxs.value0.value2.value1, ctxs.value0.value2.value2, ctxs.value0.value2.value3);
  23306. return;
  23307. }
  23308. ;
  23309. if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Two) {
  23310. $tco_var_ctxs = ctxs.value1;
  23311. $copy_tree = new Three(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3, ctxs.value0.value1, ctxs.value0.value2, tree);
  23312. return;
  23313. }
  23314. ;
  23315. if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Three) {
  23316. $tco_done = true;
  23317. return fromZipper(dictOrd)(ctxs.value1)(new Two(new Two(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0), ctxs.value0.value2.value1, ctxs.value0.value2.value2, new Two(ctxs.value0.value2.value3, ctxs.value0.value2.value4, ctxs.value0.value2.value5, ctxs.value0.value2.value6)));
  23318. }
  23319. ;
  23320. if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Three) {
  23321. $tco_done = true;
  23322. return fromZipper(dictOrd)(ctxs.value1)(new Two(new Two(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3), ctxs.value0.value0.value4, ctxs.value0.value0.value5, new Two(ctxs.value0.value0.value6, ctxs.value0.value1, ctxs.value0.value2, tree)));
  23323. }
  23324. ;
  23325. if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) {
  23326. $tco_done = true;
  23327. return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value, ctxs.value0.value3, ctxs.value0.value4, Leaf.value));
  23328. }
  23329. ;
  23330. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) {
  23331. $tco_done = true;
  23332. return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value, ctxs.value0.value3, ctxs.value0.value4, Leaf.value));
  23333. }
  23334. ;
  23335. if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value3 instanceof Leaf && tree instanceof Leaf) {
  23336. $tco_done = true;
  23337. return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value, ctxs.value0.value4, ctxs.value0.value5, Leaf.value));
  23338. }
  23339. ;
  23340. if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Two) {
  23341. $tco_done = true;
  23342. return fromZipper(dictOrd)(ctxs.value1)(new Two(new Three(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0, ctxs.value0.value2.value1, ctxs.value0.value2.value2, ctxs.value0.value2.value3), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
  23343. }
  23344. ;
  23345. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Two) {
  23346. $tco_done = true;
  23347. return fromZipper(dictOrd)(ctxs.value1)(new Two(new Three(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3, ctxs.value0.value1, ctxs.value0.value2, tree), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
  23348. }
  23349. ;
  23350. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Two) {
  23351. $tco_done = true;
  23352. return fromZipper(dictOrd)(ctxs.value1)(new Two(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Three(tree, ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5.value0, ctxs.value0.value5.value1, ctxs.value0.value5.value2, ctxs.value0.value5.value3)));
  23353. }
  23354. ;
  23355. if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Two) {
  23356. $tco_done = true;
  23357. return fromZipper(dictOrd)(ctxs.value1)(new Two(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Three(ctxs.value0.value3.value0, ctxs.value0.value3.value1, ctxs.value0.value3.value2, ctxs.value0.value3.value3, ctxs.value0.value4, ctxs.value0.value5, tree)));
  23358. }
  23359. ;
  23360. if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Three) {
  23361. $tco_done = true;
  23362. return fromZipper(dictOrd)(ctxs.value1)(new Three(new Two(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0), ctxs.value0.value2.value1, ctxs.value0.value2.value2, new Two(ctxs.value0.value2.value3, ctxs.value0.value2.value4, ctxs.value0.value2.value5, ctxs.value0.value2.value6), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
  23363. }
  23364. ;
  23365. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Three) {
  23366. $tco_done = true;
  23367. return fromZipper(dictOrd)(ctxs.value1)(new Three(new Two(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3), ctxs.value0.value0.value4, ctxs.value0.value0.value5, new Two(ctxs.value0.value0.value6, ctxs.value0.value1, ctxs.value0.value2, tree), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
  23368. }
  23369. ;
  23370. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Three) {
  23371. $tco_done = true;
  23372. return fromZipper(dictOrd)(ctxs.value1)(new Three(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Two(tree, ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5.value0), ctxs.value0.value5.value1, ctxs.value0.value5.value2, new Two(ctxs.value0.value5.value3, ctxs.value0.value5.value4, ctxs.value0.value5.value5, ctxs.value0.value5.value6)));
  23373. }
  23374. ;
  23375. if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Three) {
  23376. $tco_done = true;
  23377. return fromZipper(dictOrd)(ctxs.value1)(new Three(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Two(ctxs.value0.value3.value0, ctxs.value0.value3.value1, ctxs.value0.value3.value2, ctxs.value0.value3.value3), ctxs.value0.value3.value4, ctxs.value0.value3.value5, new Two(ctxs.value0.value3.value6, ctxs.value0.value4, ctxs.value0.value5, tree)));
  23378. }
  23379. ;
  23380. throw new Error("Failed pattern match at Data.Map.Internal (line 511, column 9 - line 528, column 136): " + [ctxs.value0.constructor.name, tree.constructor.name]);
  23381. }
  23382. ;
  23383. throw new Error("Failed pattern match at Data.Map.Internal (line 508, column 5 - line 528, column 136): " + [ctxs.constructor.name]);
  23384. }
  23385. ;
  23386. while (!$tco_done) {
  23387. $tco_result = $tco_loop($tco_var_ctxs, $copy_tree);
  23388. }
  23389. ;
  23390. return $tco_result;
  23391. };
  23392. };
  23393. var removeMaxNode = function removeMaxNode($copy_ctx) {
  23394. return function ($copy_m) {
  23395. var $tco_var_ctx = $copy_ctx;
  23396. var $tco_done = false;
  23397. var $tco_result;
  23398. function $tco_loop(ctx, m) {
  23399. if (m instanceof Two && m.value0 instanceof Leaf && m.value3 instanceof Leaf) {
  23400. $tco_done = true;
  23401. return up(ctx)(Leaf.value);
  23402. }
  23403. ;
  23404. if (m instanceof Two) {
  23405. $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx);
  23406. $copy_m = m.value3;
  23407. return;
  23408. }
  23409. ;
  23410. if (m instanceof Three && m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) {
  23411. $tco_done = true;
  23412. return up(new Data_List_Types.Cons(new TwoRight(Leaf.value, m.value1, m.value2), ctx))(Leaf.value);
  23413. }
  23414. ;
  23415. if (m instanceof Three) {
  23416. $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx);
  23417. $copy_m = m.value6;
  23418. return;
  23419. }
  23420. ;
  23421. throw new Error("Failed pattern match at Data.Map.Internal (line 540, column 5 - line 544, column 107): " + [m.constructor.name]);
  23422. }
  23423. ;
  23424. while (!$tco_done) {
  23425. $tco_result = $tco_loop($tco_var_ctx, $copy_m);
  23426. }
  23427. ;
  23428. return $tco_result;
  23429. };
  23430. };
  23431. var maxNode = function maxNode($copy_m) {
  23432. var $tco_done = false;
  23433. var $tco_result;
  23434. function $tco_loop(m) {
  23435. if (m instanceof Two && m.value3 instanceof Leaf) {
  23436. $tco_done = true;
  23437. return {
  23438. key: m.value1,
  23439. value: m.value2
  23440. };
  23441. }
  23442. ;
  23443. if (m instanceof Two) {
  23444. $copy_m = m.value3;
  23445. return;
  23446. }
  23447. ;
  23448. if (m instanceof Three && m.value6 instanceof Leaf) {
  23449. $tco_done = true;
  23450. return {
  23451. key: m.value4,
  23452. value: m.value5
  23453. };
  23454. }
  23455. ;
  23456. if (m instanceof Three) {
  23457. $copy_m = m.value6;
  23458. return;
  23459. }
  23460. ;
  23461. throw new Error("Failed pattern match at Data.Map.Internal (line 531, column 33 - line 535, column 45): " + [m.constructor.name]);
  23462. }
  23463. ;
  23464. while (!$tco_done) {
  23465. $tco_result = $tco_loop($copy_m);
  23466. }
  23467. ;
  23468. return $tco_result;
  23469. };
  23470. var comp = Data_Ord.compare(dictOrd);
  23471. var down = function down($copy_ctx) {
  23472. return function ($copy_m) {
  23473. var $tco_var_ctx = $copy_ctx;
  23474. var $tco_done = false;
  23475. var $tco_result;
  23476. function $tco_loop(ctx, m) {
  23477. if (m instanceof Leaf) {
  23478. $tco_done = true;
  23479. return Data_Maybe.Nothing.value;
  23480. }
  23481. ;
  23482. if (m instanceof Two) {
  23483. var v = comp(k)(m.value1);
  23484. if (m.value3 instanceof Leaf && v instanceof Data_Ordering.EQ) {
  23485. $tco_done = true;
  23486. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, up(ctx)(Leaf.value)));
  23487. }
  23488. ;
  23489. if (v instanceof Data_Ordering.EQ) {
  23490. var max = maxNode(m.value0);
  23491. $tco_done = true;
  23492. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, removeMaxNode(new Data_List_Types.Cons(new TwoLeft(max.key, max.value, m.value3), ctx))(m.value0)));
  23493. }
  23494. ;
  23495. if (v instanceof Data_Ordering.LT) {
  23496. $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(m.value1, m.value2, m.value3), ctx);
  23497. $copy_m = m.value0;
  23498. return;
  23499. }
  23500. ;
  23501. $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx);
  23502. $copy_m = m.value3;
  23503. return;
  23504. }
  23505. ;
  23506. if (m instanceof Three) {
  23507. var leaves = function () {
  23508. if (m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) {
  23509. return true;
  23510. }
  23511. ;
  23512. return false;
  23513. }();
  23514. var v = comp(k)(m.value4);
  23515. var v3 = comp(k)(m.value1);
  23516. if (leaves && v3 instanceof Data_Ordering.EQ) {
  23517. $tco_done = true;
  23518. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value4, m.value5, Leaf.value))));
  23519. }
  23520. ;
  23521. if (leaves && v instanceof Data_Ordering.EQ) {
  23522. $tco_done = true;
  23523. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value1, m.value2, Leaf.value))));
  23524. }
  23525. ;
  23526. if (v3 instanceof Data_Ordering.EQ) {
  23527. var max = maxNode(m.value0);
  23528. $tco_done = true;
  23529. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, removeMaxNode(new Data_List_Types.Cons(new ThreeLeft(max.key, max.value, m.value3, m.value4, m.value5, m.value6), ctx))(m.value0)));
  23530. }
  23531. ;
  23532. if (v instanceof Data_Ordering.EQ) {
  23533. var max = maxNode(m.value3);
  23534. $tco_done = true;
  23535. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, removeMaxNode(new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, max.key, max.value, m.value6), ctx))(m.value3)));
  23536. }
  23537. ;
  23538. if (v3 instanceof Data_Ordering.LT) {
  23539. $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(m.value1, m.value2, m.value3, m.value4, m.value5, m.value6), ctx);
  23540. $copy_m = m.value0;
  23541. return;
  23542. }
  23543. ;
  23544. if (v3 instanceof Data_Ordering.GT && v instanceof Data_Ordering.LT) {
  23545. $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, m.value4, m.value5, m.value6), ctx);
  23546. $copy_m = m.value3;
  23547. return;
  23548. }
  23549. ;
  23550. $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx);
  23551. $copy_m = m.value6;
  23552. return;
  23553. }
  23554. ;
  23555. throw new Error("Failed pattern match at Data.Map.Internal (line 481, column 34 - line 504, column 80): " + [m.constructor.name]);
  23556. }
  23557. ;
  23558. while (!$tco_done) {
  23559. $tco_result = $tco_loop($tco_var_ctx, $copy_m);
  23560. }
  23561. ;
  23562. return $tco_result;
  23563. };
  23564. };
  23565. return down(Data_List_Types.Nil.value);
  23566. };
  23567. };
  23568. var foldableMap = new Data_Foldable.Foldable(function (dictMonoid) {
  23569. return function (f) {
  23570. return function (m) {
  23571. return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f)(values(m));
  23572. };
  23573. };
  23574. }, function (f) {
  23575. return function (z) {
  23576. return function (m) {
  23577. return Data_Foldable.foldl(Data_List_Types.foldableList)(f)(z)(values(m));
  23578. };
  23579. };
  23580. }, function (f) {
  23581. return function (z) {
  23582. return function (m) {
  23583. return Data_Foldable.foldr(Data_List_Types.foldableList)(f)(z)(values(m));
  23584. };
  23585. };
  23586. });
  23587. var traversableMap = new Data_Traversable.Traversable(function () {
  23588. return foldableMap;
  23589. }, function () {
  23590. return functorMap;
  23591. }, function (dictApplicative) {
  23592. return Data_Traversable.traverse(traversableMap)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  23593. }, function (dictApplicative) {
  23594. return function (f) {
  23595. return function (v) {
  23596. if (v instanceof Leaf) {
  23597. return Control_Applicative.pure(dictApplicative)(Leaf.value);
  23598. }
  23599. ;
  23600. if (v instanceof Two) {
  23601. return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Two.create)(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value2)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value3));
  23602. }
  23603. ;
  23604. if (v instanceof Three) {
  23605. return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Three.create)(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value2)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value3)))(Control_Applicative.pure(dictApplicative)(v.value4)))(f(v.value5)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value6));
  23606. }
  23607. ;
  23608. throw new Error("Failed pattern match at Data.Map.Internal (line 119, column 1 - line 134, column 31): " + [f.constructor.name, v.constructor.name]);
  23609. };
  23610. };
  23611. });
  23612. var foldSubmap = function foldSubmap(dictOrd) {
  23613. return function (dictMonoid) {
  23614. return function (kmin) {
  23615. return function (kmax) {
  23616. return function (f) {
  23617. var tooSmall = function () {
  23618. if (kmin instanceof Data_Maybe.Just) {
  23619. return function (k) {
  23620. return Data_Ord.lessThan(dictOrd)(k)(kmin.value0);
  23621. };
  23622. }
  23623. ;
  23624. if (kmin instanceof Data_Maybe.Nothing) {
  23625. return Data_Function["const"](false);
  23626. }
  23627. ;
  23628. throw new Error("Failed pattern match at Data.Map.Internal (line 319, column 7 - line 323, column 22): " + [kmin.constructor.name]);
  23629. }();
  23630. var tooLarge = function () {
  23631. if (kmax instanceof Data_Maybe.Just) {
  23632. return function (k) {
  23633. return Data_Ord.greaterThan(dictOrd)(k)(kmax.value0);
  23634. };
  23635. }
  23636. ;
  23637. if (kmax instanceof Data_Maybe.Nothing) {
  23638. return Data_Function["const"](false);
  23639. }
  23640. ;
  23641. throw new Error("Failed pattern match at Data.Map.Internal (line 326, column 7 - line 330, column 22): " + [kmax.constructor.name]);
  23642. }();
  23643. var inBounds = function () {
  23644. if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Just) {
  23645. return function (k) {
  23646. return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k) && Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0);
  23647. };
  23648. }
  23649. ;
  23650. if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Nothing) {
  23651. return function (k) {
  23652. return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k);
  23653. };
  23654. }
  23655. ;
  23656. if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Just) {
  23657. return function (k) {
  23658. return Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0);
  23659. };
  23660. }
  23661. ;
  23662. if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Nothing) {
  23663. return Data_Function["const"](true);
  23664. }
  23665. ;
  23666. throw new Error("Failed pattern match at Data.Map.Internal (line 333, column 7 - line 341, column 21): " + [kmin.constructor.name, kmax.constructor.name]);
  23667. }();
  23668. var go = function go(v) {
  23669. if (v instanceof Leaf) {
  23670. return Data_Monoid.mempty(dictMonoid);
  23671. }
  23672. ;
  23673. if (v instanceof Two) {
  23674. return Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  23675. var $633 = tooSmall(v.value1);
  23676. if ($633) {
  23677. return Data_Monoid.mempty(dictMonoid);
  23678. }
  23679. ;
  23680. return go(v.value0);
  23681. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  23682. var $634 = inBounds(v.value1);
  23683. if ($634) {
  23684. return f(v.value1)(v.value2);
  23685. }
  23686. ;
  23687. return Data_Monoid.mempty(dictMonoid);
  23688. }())(function () {
  23689. var $635 = tooLarge(v.value1);
  23690. if ($635) {
  23691. return Data_Monoid.mempty(dictMonoid);
  23692. }
  23693. ;
  23694. return go(v.value3);
  23695. }()));
  23696. }
  23697. ;
  23698. if (v instanceof Three) {
  23699. return Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  23700. var $640 = tooSmall(v.value1);
  23701. if ($640) {
  23702. return Data_Monoid.mempty(dictMonoid);
  23703. }
  23704. ;
  23705. return go(v.value0);
  23706. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  23707. var $641 = inBounds(v.value1);
  23708. if ($641) {
  23709. return f(v.value1)(v.value2);
  23710. }
  23711. ;
  23712. return Data_Monoid.mempty(dictMonoid);
  23713. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  23714. var $642 = tooSmall(v.value4) || tooLarge(v.value1);
  23715. if ($642) {
  23716. return Data_Monoid.mempty(dictMonoid);
  23717. }
  23718. ;
  23719. return go(v.value3);
  23720. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  23721. var $643 = inBounds(v.value4);
  23722. if ($643) {
  23723. return f(v.value4)(v.value5);
  23724. }
  23725. ;
  23726. return Data_Monoid.mempty(dictMonoid);
  23727. }())(function () {
  23728. var $644 = tooLarge(v.value4);
  23729. if ($644) {
  23730. return Data_Monoid.mempty(dictMonoid);
  23731. }
  23732. ;
  23733. return go(v.value6);
  23734. }()))));
  23735. }
  23736. ;
  23737. throw new Error("Failed pattern match at Data.Map.Internal (line 359, column 10 - line 371, column 54): " + [v.constructor.name]);
  23738. };
  23739. return go;
  23740. };
  23741. };
  23742. };
  23743. };
  23744. };
  23745. var findMin = function () {
  23746. var go = function go($copy_v) {
  23747. return function ($copy_v1) {
  23748. var $tco_var_v = $copy_v;
  23749. var $tco_done = false;
  23750. var $tco_result;
  23751. function $tco_loop(v, v1) {
  23752. if (v1 instanceof Leaf) {
  23753. $tco_done = true;
  23754. return v;
  23755. }
  23756. ;
  23757. if (v1 instanceof Two) {
  23758. $tco_var_v = new Data_Maybe.Just({
  23759. key: v1.value1,
  23760. value: v1.value2
  23761. });
  23762. $copy_v1 = v1.value0;
  23763. return;
  23764. }
  23765. ;
  23766. if (v1 instanceof Three) {
  23767. $tco_var_v = new Data_Maybe.Just({
  23768. key: v1.value1,
  23769. value: v1.value2
  23770. });
  23771. $copy_v1 = v1.value0;
  23772. return;
  23773. }
  23774. ;
  23775. throw new Error("Failed pattern match at Data.Map.Internal (line 297, column 5 - line 297, column 22): " + [v.constructor.name, v1.constructor.name]);
  23776. }
  23777. ;
  23778. while (!$tco_done) {
  23779. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  23780. }
  23781. ;
  23782. return $tco_result;
  23783. };
  23784. };
  23785. return go(Data_Maybe.Nothing.value);
  23786. }();
  23787. var lookupGT = function lookupGT(dictOrd) {
  23788. return function (k) {
  23789. var comp = Data_Ord.compare(dictOrd);
  23790. var go = function go(v) {
  23791. if (v instanceof Leaf) {
  23792. return Data_Maybe.Nothing.value;
  23793. }
  23794. ;
  23795. if (v instanceof Two) {
  23796. var v2 = comp(k)(v.value1);
  23797. if (v2 instanceof Data_Ordering.EQ) {
  23798. return findMin(v.value3);
  23799. }
  23800. ;
  23801. if (v2 instanceof Data_Ordering.LT) {
  23802. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  23803. key: v.value1,
  23804. value: v.value2
  23805. })(go(v.value0)));
  23806. }
  23807. ;
  23808. if (v2 instanceof Data_Ordering.GT) {
  23809. return go(v.value3);
  23810. }
  23811. ;
  23812. throw new Error("Failed pattern match at Data.Map.Internal (line 276, column 33 - line 279, column 21): " + [v2.constructor.name]);
  23813. }
  23814. ;
  23815. if (v instanceof Three) {
  23816. var v3 = comp(k)(v.value1);
  23817. if (v3 instanceof Data_Ordering.EQ) {
  23818. return findMin(new Two(v.value3, v.value4, v.value5, v.value6));
  23819. }
  23820. ;
  23821. if (v3 instanceof Data_Ordering.LT) {
  23822. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  23823. key: v.value1,
  23824. value: v.value2
  23825. })(go(v.value0)));
  23826. }
  23827. ;
  23828. if (v3 instanceof Data_Ordering.GT) {
  23829. return go(new Two(v.value3, v.value4, v.value5, v.value6));
  23830. }
  23831. ;
  23832. throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 45 - line 283, column 37): " + [v3.constructor.name]);
  23833. }
  23834. ;
  23835. throw new Error("Failed pattern match at Data.Map.Internal (line 275, column 5 - line 275, column 22): " + [v.constructor.name]);
  23836. };
  23837. return go;
  23838. };
  23839. };
  23840. var findMax = function () {
  23841. var go = function go($copy_v) {
  23842. return function ($copy_v1) {
  23843. var $tco_var_v = $copy_v;
  23844. var $tco_done = false;
  23845. var $tco_result;
  23846. function $tco_loop(v, v1) {
  23847. if (v1 instanceof Leaf) {
  23848. $tco_done = true;
  23849. return v;
  23850. }
  23851. ;
  23852. if (v1 instanceof Two) {
  23853. $tco_var_v = new Data_Maybe.Just({
  23854. key: v1.value1,
  23855. value: v1.value2
  23856. });
  23857. $copy_v1 = v1.value3;
  23858. return;
  23859. }
  23860. ;
  23861. if (v1 instanceof Three) {
  23862. $tco_var_v = new Data_Maybe.Just({
  23863. key: v1.value4,
  23864. value: v1.value5
  23865. });
  23866. $copy_v1 = v1.value6;
  23867. return;
  23868. }
  23869. ;
  23870. throw new Error("Failed pattern match at Data.Map.Internal (line 289, column 5 - line 289, column 22): " + [v.constructor.name, v1.constructor.name]);
  23871. }
  23872. ;
  23873. while (!$tco_done) {
  23874. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  23875. }
  23876. ;
  23877. return $tco_result;
  23878. };
  23879. };
  23880. return go(Data_Maybe.Nothing.value);
  23881. }();
  23882. var lookupLT = function lookupLT(dictOrd) {
  23883. return function (k) {
  23884. var comp = Data_Ord.compare(dictOrd);
  23885. var go = function go(v) {
  23886. if (v instanceof Leaf) {
  23887. return Data_Maybe.Nothing.value;
  23888. }
  23889. ;
  23890. if (v instanceof Two) {
  23891. var v2 = comp(k)(v.value1);
  23892. if (v2 instanceof Data_Ordering.EQ) {
  23893. return findMax(v.value0);
  23894. }
  23895. ;
  23896. if (v2 instanceof Data_Ordering.GT) {
  23897. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  23898. key: v.value1,
  23899. value: v.value2
  23900. })(go(v.value3)));
  23901. }
  23902. ;
  23903. if (v2 instanceof Data_Ordering.LT) {
  23904. return go(v.value0);
  23905. }
  23906. ;
  23907. throw new Error("Failed pattern match at Data.Map.Internal (line 242, column 33 - line 245, column 20): " + [v2.constructor.name]);
  23908. }
  23909. ;
  23910. if (v instanceof Three) {
  23911. var v3 = comp(k)(v.value4);
  23912. if (v3 instanceof Data_Ordering.EQ) {
  23913. return findMax(new Two(v.value0, v.value1, v.value2, v.value3));
  23914. }
  23915. ;
  23916. if (v3 instanceof Data_Ordering.GT) {
  23917. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  23918. key: v.value4,
  23919. value: v.value5
  23920. })(go(v.value6)));
  23921. }
  23922. ;
  23923. if (v3 instanceof Data_Ordering.LT) {
  23924. return go(new Two(v.value0, v.value1, v.value2, v.value3));
  23925. }
  23926. ;
  23927. throw new Error("Failed pattern match at Data.Map.Internal (line 246, column 45 - line 249, column 36): " + [v3.constructor.name]);
  23928. }
  23929. ;
  23930. throw new Error("Failed pattern match at Data.Map.Internal (line 241, column 5 - line 241, column 22): " + [v.constructor.name]);
  23931. };
  23932. return go;
  23933. };
  23934. };
  23935. var eqMap = function eqMap(dictEq) {
  23936. return function (dictEq1) {
  23937. return new Data_Eq.Eq(function (m1) {
  23938. return function (m2) {
  23939. return Data_Eq.eq(Data_Eq.eqArray(Data_Tuple.eqTuple(dictEq)(dictEq1)))(toAscArray(m1))(toAscArray(m2));
  23940. };
  23941. });
  23942. };
  23943. };
  23944. var ordMap = function ordMap(dictOrd) {
  23945. return function (dictOrd1) {
  23946. return new Data_Ord.Ord(function () {
  23947. return eqMap(dictOrd.Eq0())(dictOrd1.Eq0());
  23948. }, function (m1) {
  23949. return function (m2) {
  23950. return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(dictOrd)(dictOrd1)))(toAscArray(m1))(toAscArray(m2));
  23951. };
  23952. });
  23953. };
  23954. };
  23955. var eq1Map = function eq1Map(dictEq) {
  23956. return new Data_Eq.Eq1(function (dictEq1) {
  23957. return Data_Eq.eq(eqMap(dictEq)(dictEq1));
  23958. });
  23959. };
  23960. var ord1Map = function ord1Map(dictOrd) {
  23961. return new Data_Ord.Ord1(function () {
  23962. return eq1Map(dictOrd.Eq0());
  23963. }, function (dictOrd1) {
  23964. return Data_Ord.compare(ordMap(dictOrd)(dictOrd1));
  23965. });
  23966. };
  23967. var empty = Leaf.value;
  23968. var fromFoldable = function fromFoldable(dictOrd) {
  23969. return function (dictFoldable) {
  23970. return Data_Foldable.foldl(dictFoldable)(function (m) {
  23971. return function (v) {
  23972. return insert(dictOrd)(v.value0)(v.value1)(m);
  23973. };
  23974. })(empty);
  23975. };
  23976. };
  23977. var filterWithKey = function filterWithKey(dictOrd) {
  23978. return function (predicate) {
  23979. var $758 = fromFoldable(dictOrd)(Data_List_Lazy_Types.foldableList);
  23980. var $759 = Data_List_Lazy.filter(Data_Tuple.uncurry(predicate));
  23981. var $760 = toUnfoldable(Data_List_Lazy_Types.unfoldableList);
  23982. return function ($761) {
  23983. return $758($759($760($761)));
  23984. };
  23985. };
  23986. };
  23987. var filter = function filter(dictOrd) {
  23988. return function (predicate) {
  23989. return filterWithKey(dictOrd)(Data_Function["const"](predicate));
  23990. };
  23991. };
  23992. var filterKeys = function filterKeys(dictOrd) {
  23993. return function (predicate) {
  23994. return filterWithKey(dictOrd)(function ($762) {
  23995. return Data_Function["const"](predicate($762));
  23996. });
  23997. };
  23998. };
  23999. var fromFoldableWithIndex = function fromFoldableWithIndex(dictOrd) {
  24000. return function (dictFoldableWithIndex) {
  24001. return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function (k) {
  24002. return function (m) {
  24003. return function (v) {
  24004. return insert(dictOrd)(k)(v)(m);
  24005. };
  24006. };
  24007. })(empty);
  24008. };
  24009. };
  24010. var intersectionWith = function intersectionWith(dictOrd) {
  24011. return function (f) {
  24012. return function (m1) {
  24013. return function (m2) {
  24014. var go = function go($copy_v) {
  24015. return function ($copy_v1) {
  24016. return function ($copy_m) {
  24017. var $tco_var_v = $copy_v;
  24018. var $tco_var_v1 = $copy_v1;
  24019. var $tco_done = false;
  24020. var $tco_result;
  24021. function $tco_loop(v, v1, m) {
  24022. if (v instanceof Data_List_Types.Nil) {
  24023. $tco_done = true;
  24024. return m;
  24025. }
  24026. ;
  24027. if (v1 instanceof Data_List_Types.Nil) {
  24028. $tco_done = true;
  24029. return m;
  24030. }
  24031. ;
  24032. if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
  24033. var v2 = Data_Ord.compare(dictOrd)(v.value0.value0)(v1.value0.value0);
  24034. if (v2 instanceof Data_Ordering.LT) {
  24035. $tco_var_v = v.value1;
  24036. $tco_var_v1 = v1;
  24037. $copy_m = m;
  24038. return;
  24039. }
  24040. ;
  24041. if (v2 instanceof Data_Ordering.EQ) {
  24042. $tco_var_v = v.value1;
  24043. $tco_var_v1 = v1.value1;
  24044. $copy_m = insert(dictOrd)(v.value0.value0)(f(v.value0.value1)(v1.value0.value1))(m);
  24045. return;
  24046. }
  24047. ;
  24048. if (v2 instanceof Data_Ordering.GT) {
  24049. $tco_var_v = v;
  24050. $tco_var_v1 = v1.value1;
  24051. $copy_m = m;
  24052. return;
  24053. }
  24054. ;
  24055. throw new Error("Failed pattern match at Data.Map.Internal (line 641, column 5 - line 644, column 27): " + [v2.constructor.name]);
  24056. }
  24057. ;
  24058. throw new Error("Failed pattern match at Data.Map.Internal (line 638, column 3 - line 638, column 17): " + [v.constructor.name, v1.constructor.name, m.constructor.name]);
  24059. }
  24060. ;
  24061. while (!$tco_done) {
  24062. $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_m);
  24063. }
  24064. ;
  24065. return $tco_result;
  24066. };
  24067. };
  24068. };
  24069. return go(toUnfoldable(Data_List_Types.unfoldableList)(m1))(toUnfoldable(Data_List_Types.unfoldableList)(m2))(empty);
  24070. };
  24071. };
  24072. };
  24073. };
  24074. var intersection = function intersection(dictOrd) {
  24075. return intersectionWith(dictOrd)(Data_Function["const"]);
  24076. };
  24077. var $$delete = function $$delete(dictOrd) {
  24078. return function (k) {
  24079. return function (m) {
  24080. return Data_Maybe.maybe(m)(Data_Tuple.snd)(pop(dictOrd)(k)(m));
  24081. };
  24082. };
  24083. };
  24084. var difference = function difference(dictOrd) {
  24085. return function (m1) {
  24086. return function (m2) {
  24087. return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(m1)(keys(m2));
  24088. };
  24089. };
  24090. };
  24091. var checkValid = function checkValid(tree) {
  24092. var allHeights = function allHeights(v) {
  24093. if (v instanceof Leaf) {
  24094. return Control_Applicative.pure(Data_List_Types.applicativeList)(0);
  24095. }
  24096. ;
  24097. if (v instanceof Two) {
  24098. return Data_Functor.map(Data_List_Types.functorList)(function (n) {
  24099. return n + 1 | 0;
  24100. })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(allHeights(v.value3)));
  24101. }
  24102. ;
  24103. if (v instanceof Three) {
  24104. return Data_Functor.map(Data_List_Types.functorList)(function (n) {
  24105. return n + 1 | 0;
  24106. })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value3))(allHeights(v.value6))));
  24107. }
  24108. ;
  24109. throw new Error("Failed pattern match at Data.Map.Internal (line 188, column 3 - line 188, column 36): " + [v.constructor.name]);
  24110. };
  24111. return Data_List.length(Data_List.nub(Data_Eq.eqInt)(allHeights(tree))) === 1;
  24112. };
  24113. var asList = Control_Category.identity(Control_Category.categoryFn);
  24114. var foldableWithIndexMap = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  24115. return foldableMap;
  24116. }, function (dictMonoid) {
  24117. return function (f) {
  24118. return function (m) {
  24119. return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(Data_Tuple.uncurry(f))(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
  24120. };
  24121. };
  24122. }, function (f) {
  24123. return function (z) {
  24124. return function (m) {
  24125. return Data_Foldable.foldl(Data_List_Types.foldableList)(function () {
  24126. var $763 = Data_Function.flip(f);
  24127. return function ($764) {
  24128. return Data_Tuple.uncurry($763($764));
  24129. };
  24130. }())(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
  24131. };
  24132. };
  24133. }, function (f) {
  24134. return function (z) {
  24135. return function (m) {
  24136. return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_Tuple.uncurry(f))(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
  24137. };
  24138. };
  24139. });
  24140. var mapMaybeWithKey = function mapMaybeWithKey(dictOrd) {
  24141. return function (f) {
  24142. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexMap)(function (k) {
  24143. return function (a) {
  24144. return function (acc) {
  24145. return Data_Maybe.maybe(acc)(function (b) {
  24146. return insert(dictOrd)(k)(b)(acc);
  24147. })(f(k)(a));
  24148. };
  24149. };
  24150. })(empty);
  24151. };
  24152. };
  24153. var mapMaybe = function mapMaybe(dictOrd) {
  24154. var $765 = mapMaybeWithKey(dictOrd);
  24155. return function ($766) {
  24156. return $765(Data_Function["const"]($766));
  24157. };
  24158. };
  24159. var traversableWithIndexMap = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  24160. return foldableWithIndexMap;
  24161. }, function () {
  24162. return functorWithIndexMap;
  24163. }, function () {
  24164. return traversableMap;
  24165. }, function (dictApplicative) {
  24166. return function (f) {
  24167. return function (v) {
  24168. if (v instanceof Leaf) {
  24169. return Control_Applicative.pure(dictApplicative)(Leaf.value);
  24170. }
  24171. ;
  24172. if (v instanceof Two) {
  24173. return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Two.create)(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value1)(v.value2)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value3));
  24174. }
  24175. ;
  24176. if (v instanceof Three) {
  24177. return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Three.create)(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value1)(v.value2)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value3)))(Control_Applicative.pure(dictApplicative)(v.value4)))(f(v.value4)(v.value5)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value6));
  24178. }
  24179. ;
  24180. throw new Error("Failed pattern match at Data.Map.Internal (line 136, column 1 - line 150, column 40): " + [f.constructor.name, v.constructor.name]);
  24181. };
  24182. };
  24183. });
  24184. var alter = function alter(dictOrd) {
  24185. return function (f) {
  24186. return function (k) {
  24187. return function (m) {
  24188. var v = f(lookup(dictOrd)(k)(m));
  24189. if (v instanceof Data_Maybe.Nothing) {
  24190. return $$delete(dictOrd)(k)(m);
  24191. }
  24192. ;
  24193. if (v instanceof Data_Maybe.Just) {
  24194. return insert(dictOrd)(k)(v.value0)(m);
  24195. }
  24196. ;
  24197. throw new Error("Failed pattern match at Data.Map.Internal (line 549, column 15 - line 551, column 25): " + [v.constructor.name]);
  24198. };
  24199. };
  24200. };
  24201. };
  24202. var fromFoldableWith = function fromFoldableWith(dictOrd) {
  24203. return function (dictFoldable) {
  24204. return function (f) {
  24205. var combine = function combine(v) {
  24206. return function (v1) {
  24207. if (v1 instanceof Data_Maybe.Just) {
  24208. return Data_Maybe.Just.create(f(v)(v1.value0));
  24209. }
  24210. ;
  24211. if (v1 instanceof Data_Maybe.Nothing) {
  24212. return new Data_Maybe.Just(v);
  24213. }
  24214. ;
  24215. throw new Error("Failed pattern match at Data.Map.Internal (line 566, column 3 - line 566, column 38): " + [v.constructor.name, v1.constructor.name]);
  24216. };
  24217. };
  24218. return Data_Foldable.foldl(dictFoldable)(function (m) {
  24219. return function (v) {
  24220. return alter(dictOrd)(combine(v.value1))(v.value0)(m);
  24221. };
  24222. })(empty);
  24223. };
  24224. };
  24225. };
  24226. var insertWith = function insertWith(dictOrd) {
  24227. return function (f) {
  24228. return function (k) {
  24229. return function (v) {
  24230. return alter(dictOrd)(function () {
  24231. var $767 = Data_Maybe.maybe(v)(Data_Function.flip(f)(v));
  24232. return function ($768) {
  24233. return Data_Maybe.Just.create($767($768));
  24234. };
  24235. }())(k);
  24236. };
  24237. };
  24238. };
  24239. };
  24240. var unionWith = function unionWith(dictOrd) {
  24241. return function (f) {
  24242. return function (m1) {
  24243. return function (m2) {
  24244. var go = function go(m) {
  24245. return function (v) {
  24246. return alter(dictOrd)(function () {
  24247. var $769 = Data_Maybe.maybe(v.value1)(f(v.value1));
  24248. return function ($770) {
  24249. return Data_Maybe.Just.create($769($770));
  24250. };
  24251. }())(v.value0)(m);
  24252. };
  24253. };
  24254. return Data_Foldable.foldl(Data_List_Types.foldableList)(go)(m2)(toUnfoldable(Data_List_Types.unfoldableList)(m1));
  24255. };
  24256. };
  24257. };
  24258. };
  24259. var union = function union(dictOrd) {
  24260. return unionWith(dictOrd)(Data_Function["const"]);
  24261. };
  24262. var semigroupMap = function semigroupMap(dictOrd) {
  24263. return new Data_Semigroup.Semigroup(union(dictOrd));
  24264. };
  24265. var monoidMap = function monoidMap(dictOrd) {
  24266. return new Data_Monoid.Monoid(function () {
  24267. return semigroupMap(dictOrd);
  24268. }, empty);
  24269. };
  24270. var submap = function submap(dictOrd) {
  24271. return function (kmin) {
  24272. return function (kmax) {
  24273. return foldSubmap(dictOrd)(monoidMap(dictOrd))(kmin)(kmax)(singleton);
  24274. };
  24275. };
  24276. };
  24277. var unions = function unions(dictOrd) {
  24278. return function (dictFoldable) {
  24279. return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty);
  24280. };
  24281. };
  24282. var update = function update(dictOrd) {
  24283. return function (f) {
  24284. return function (k) {
  24285. return function (m) {
  24286. return alter(dictOrd)(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m);
  24287. };
  24288. };
  24289. };
  24290. };
  24291. module.exports = {
  24292. showTree: showTree,
  24293. empty: empty,
  24294. isEmpty: isEmpty,
  24295. singleton: singleton,
  24296. checkValid: checkValid,
  24297. insert: insert,
  24298. insertWith: insertWith,
  24299. lookup: lookup,
  24300. lookupLE: lookupLE,
  24301. lookupLT: lookupLT,
  24302. lookupGE: lookupGE,
  24303. lookupGT: lookupGT,
  24304. findMin: findMin,
  24305. findMax: findMax,
  24306. foldSubmap: foldSubmap,
  24307. submap: submap,
  24308. fromFoldable: fromFoldable,
  24309. fromFoldableWith: fromFoldableWith,
  24310. fromFoldableWithIndex: fromFoldableWithIndex,
  24311. toUnfoldable: toUnfoldable,
  24312. toUnfoldableUnordered: toUnfoldableUnordered,
  24313. "delete": $$delete,
  24314. pop: pop,
  24315. member: member,
  24316. alter: alter,
  24317. update: update,
  24318. keys: keys,
  24319. values: values,
  24320. union: union,
  24321. unionWith: unionWith,
  24322. unions: unions,
  24323. intersection: intersection,
  24324. intersectionWith: intersectionWith,
  24325. difference: difference,
  24326. isSubmap: isSubmap,
  24327. size: size,
  24328. filterWithKey: filterWithKey,
  24329. filterKeys: filterKeys,
  24330. filter: filter,
  24331. mapMaybeWithKey: mapMaybeWithKey,
  24332. mapMaybe: mapMaybe,
  24333. eq1Map: eq1Map,
  24334. eqMap: eqMap,
  24335. ord1Map: ord1Map,
  24336. ordMap: ordMap,
  24337. showMap: showMap,
  24338. semigroupMap: semigroupMap,
  24339. monoidMap: monoidMap,
  24340. functorMap: functorMap,
  24341. functorWithIndexMap: functorWithIndexMap,
  24342. foldableMap: foldableMap,
  24343. foldableWithIndexMap: foldableWithIndexMap,
  24344. traversableMap: traversableMap,
  24345. traversableWithIndexMap: traversableWithIndexMap
  24346. };
  24347. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Lazy/index.js":"../output/Data.List.Lazy/index.js","../Data.List.Lazy.Types/index.js":"../output/Data.List.Lazy.Types/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js"}],"../output/Data.Set/index.js":[function(require,module,exports) {
  24348. // Generated by purs version 0.13.6
  24349. "use strict";
  24350. var Control_Applicative = require("../Control.Applicative/index.js");
  24351. var Control_Bind = require("../Control.Bind/index.js");
  24352. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  24353. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  24354. var Data_Array = require("../Data.Array/index.js");
  24355. var Data_Array_ST = require("../Data.Array.ST/index.js");
  24356. var Data_Eq = require("../Data.Eq/index.js");
  24357. var Data_Foldable = require("../Data.Foldable/index.js");
  24358. var Data_Function = require("../Data.Function/index.js");
  24359. var Data_Functor = require("../Data.Functor/index.js");
  24360. var Data_List = require("../Data.List/index.js");
  24361. var Data_List_Types = require("../Data.List.Types/index.js");
  24362. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  24363. var Data_Maybe = require("../Data.Maybe/index.js");
  24364. var Data_Monoid = require("../Data.Monoid/index.js");
  24365. var Data_Ord = require("../Data.Ord/index.js");
  24366. var Data_Ordering = require("../Data.Ordering/index.js");
  24367. var Data_Semigroup = require("../Data.Semigroup/index.js");
  24368. var Data_Show = require("../Data.Show/index.js");
  24369. var Data_Unit = require("../Data.Unit/index.js");
  24370. var $$Set = function $$Set(x) {
  24371. return x;
  24372. };
  24373. var union = function union(dictOrd) {
  24374. return function (v) {
  24375. return function (v1) {
  24376. return Data_Map_Internal.union(dictOrd)(v)(v1);
  24377. };
  24378. };
  24379. };
  24380. var toList = function toList(v) {
  24381. return Data_Map_Internal.keys(v);
  24382. };
  24383. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  24384. var $63 = Data_List.toUnfoldable(dictUnfoldable);
  24385. return function ($64) {
  24386. return $63(toList($64));
  24387. };
  24388. };
  24389. var size = function size(v) {
  24390. return Data_Map_Internal.size(v);
  24391. };
  24392. var singleton = function singleton(a) {
  24393. return Data_Map_Internal.singleton(a)(Data_Unit.unit);
  24394. };
  24395. var showSet = function showSet(dictShow) {
  24396. return new Data_Show.Show(function (s) {
  24397. return "(fromFoldable " + (Data_Show.show(Data_List_Types.showList(dictShow))(toList(s)) + ")");
  24398. });
  24399. };
  24400. var semigroupSet = function semigroupSet(dictOrd) {
  24401. return new Data_Semigroup.Semigroup(union(dictOrd));
  24402. };
  24403. var member = function member(dictOrd) {
  24404. return function (a) {
  24405. return function (v) {
  24406. return Data_Map_Internal.member(dictOrd)(a)(v);
  24407. };
  24408. };
  24409. };
  24410. var isEmpty = function isEmpty(v) {
  24411. return Data_Map_Internal.isEmpty(v);
  24412. };
  24413. var insert = function insert(dictOrd) {
  24414. return function (a) {
  24415. return function (v) {
  24416. return Data_Map_Internal.insert(dictOrd)(a)(Data_Unit.unit)(v);
  24417. };
  24418. };
  24419. };
  24420. var foldableSet = new Data_Foldable.Foldable(function (dictMonoid) {
  24421. return function (f) {
  24422. var $65 = Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f);
  24423. return function ($66) {
  24424. return $65(toList($66));
  24425. };
  24426. };
  24427. }, function (f) {
  24428. return function (x) {
  24429. var $67 = Data_Foldable.foldl(Data_List_Types.foldableList)(f)(x);
  24430. return function ($68) {
  24431. return $67(toList($68));
  24432. };
  24433. };
  24434. }, function (f) {
  24435. return function (x) {
  24436. var $69 = Data_Foldable.foldr(Data_List_Types.foldableList)(f)(x);
  24437. return function ($70) {
  24438. return $69(toList($70));
  24439. };
  24440. };
  24441. });
  24442. var findMin = function findMin(v) {
  24443. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
  24444. return v1.key;
  24445. })(Data_Map_Internal.findMin(v));
  24446. };
  24447. var findMax = function findMax(v) {
  24448. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
  24449. return v1.key;
  24450. })(Data_Map_Internal.findMax(v));
  24451. };
  24452. var filter = function filter(dictOrd) {
  24453. return function (f) {
  24454. return function (v) {
  24455. return Data_Map_Internal.filterWithKey(dictOrd)(function (k) {
  24456. return function (v1) {
  24457. return f(k);
  24458. };
  24459. })(v);
  24460. };
  24461. };
  24462. };
  24463. var eqSet = function eqSet(dictEq) {
  24464. return new Data_Eq.Eq(function (v) {
  24465. return function (v1) {
  24466. return Data_Eq.eq(Data_Map_Internal.eqMap(dictEq)(Data_Eq.eqUnit))(v)(v1);
  24467. };
  24468. });
  24469. };
  24470. var ordSet = function ordSet(dictOrd) {
  24471. return new Data_Ord.Ord(function () {
  24472. return eqSet(dictOrd.Eq0());
  24473. }, function (s1) {
  24474. return function (s2) {
  24475. return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(toList(s1))(toList(s2));
  24476. };
  24477. });
  24478. };
  24479. var eq1Set = new Data_Eq.Eq1(function (dictEq) {
  24480. return Data_Eq.eq(eqSet(dictEq));
  24481. });
  24482. var ord1Set = new Data_Ord.Ord1(function () {
  24483. return eq1Set;
  24484. }, function (dictOrd) {
  24485. return Data_Ord.compare(ordSet(dictOrd));
  24486. });
  24487. var empty = Data_Map_Internal.empty;
  24488. var fromFoldable = function fromFoldable(dictFoldable) {
  24489. return function (dictOrd) {
  24490. return Data_Foldable.foldl(dictFoldable)(function (m) {
  24491. return function (a) {
  24492. return insert(dictOrd)(a)(m);
  24493. };
  24494. })(empty);
  24495. };
  24496. };
  24497. var intersection = function intersection(dictOrd) {
  24498. return function (s1) {
  24499. return function (s2) {
  24500. var toArray = function () {
  24501. var $71 = Data_Array.fromFoldable(Data_List_Types.foldableList);
  24502. return function ($72) {
  24503. return $71(toList($72));
  24504. };
  24505. }();
  24506. var rs = toArray(s2);
  24507. var rl = Data_Array.length(rs);
  24508. var ls = toArray(s1);
  24509. var ll = Data_Array.length(ls);
  24510. var intersect = function intersect(acc) {
  24511. var go = function go(l) {
  24512. return function (r) {
  24513. var $58 = l < ll && r < rl;
  24514. if ($58) {
  24515. var v = Data_Ord.compare(dictOrd)(ls[l])(rs[r]);
  24516. if (v instanceof Data_Ordering.EQ) {
  24517. return function __do() {
  24518. Data_Array_ST.push(ls[l])(acc)();
  24519. return new Control_Monad_Rec_Class.Loop({
  24520. a: l + 1 | 0,
  24521. b: r + 1 | 0
  24522. });
  24523. };
  24524. }
  24525. ;
  24526. if (v instanceof Data_Ordering.LT) {
  24527. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({
  24528. a: l + 1 | 0,
  24529. b: r
  24530. }));
  24531. }
  24532. ;
  24533. if (v instanceof Data_Ordering.GT) {
  24534. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({
  24535. a: l,
  24536. b: r + 1 | 0
  24537. }));
  24538. }
  24539. ;
  24540. throw new Error("Failed pattern match at Data.Set (line 176, column 12 - line 181, column 43): " + [v.constructor.name]);
  24541. }
  24542. ;
  24543. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Done(acc));
  24544. };
  24545. };
  24546. return Control_Monad_Rec_Class.tailRecM2(Control_Monad_ST_Internal.monadRecST)(go)(0)(0);
  24547. };
  24548. return fromFoldable(Data_Foldable.foldableArray)(dictOrd)(Control_Bind.bind(Control_Monad_ST_Internal.bindST)(Control_Bind.bind(Control_Monad_ST_Internal.bindST)(Data_Array_ST.empty)(intersect))(Data_Array_ST.unsafeFreeze)());
  24549. };
  24550. };
  24551. };
  24552. var map = function map(dictOrd) {
  24553. return function (f) {
  24554. return Data_Foldable.foldl(foldableSet)(function (m) {
  24555. return function (a) {
  24556. return insert(dictOrd)(f(a))(m);
  24557. };
  24558. })(empty);
  24559. };
  24560. };
  24561. var mapMaybe = function mapMaybe(dictOrd) {
  24562. return function (f) {
  24563. return Data_Foldable.foldr(foldableSet)(function (a) {
  24564. return function (acc) {
  24565. return Data_Maybe.maybe(acc)(function (b) {
  24566. return insert(dictOrd)(b)(acc);
  24567. })(f(a));
  24568. };
  24569. })(empty);
  24570. };
  24571. };
  24572. var monoidSet = function monoidSet(dictOrd) {
  24573. return new Data_Monoid.Monoid(function () {
  24574. return semigroupSet(dictOrd);
  24575. }, empty);
  24576. };
  24577. var unions = function unions(dictFoldable) {
  24578. return function (dictOrd) {
  24579. return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty);
  24580. };
  24581. };
  24582. var $$delete = function $$delete(dictOrd) {
  24583. return function (a) {
  24584. return function (v) {
  24585. return Data_Map_Internal["delete"](dictOrd)(a)(v);
  24586. };
  24587. };
  24588. };
  24589. var difference = function difference(dictOrd) {
  24590. return function (s1) {
  24591. return function (s2) {
  24592. return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(s1)(toList(s2));
  24593. };
  24594. };
  24595. };
  24596. var subset = function subset(dictOrd) {
  24597. return function (s1) {
  24598. return function (s2) {
  24599. return isEmpty(difference(dictOrd)(s1)(s2));
  24600. };
  24601. };
  24602. };
  24603. var properSubset = function properSubset(dictOrd) {
  24604. return function (s1) {
  24605. return function (s2) {
  24606. return subset(dictOrd)(s1)(s2) && Data_Eq.notEq(eqSet(dictOrd.Eq0()))(s1)(s2);
  24607. };
  24608. };
  24609. };
  24610. var checkValid = function checkValid(v) {
  24611. return Data_Map_Internal.checkValid(v);
  24612. };
  24613. module.exports = {
  24614. fromFoldable: fromFoldable,
  24615. toUnfoldable: toUnfoldable,
  24616. empty: empty,
  24617. isEmpty: isEmpty,
  24618. singleton: singleton,
  24619. map: map,
  24620. checkValid: checkValid,
  24621. insert: insert,
  24622. member: member,
  24623. "delete": $$delete,
  24624. size: size,
  24625. findMin: findMin,
  24626. findMax: findMax,
  24627. union: union,
  24628. unions: unions,
  24629. difference: difference,
  24630. subset: subset,
  24631. properSubset: properSubset,
  24632. intersection: intersection,
  24633. filter: filter,
  24634. mapMaybe: mapMaybe,
  24635. eqSet: eqSet,
  24636. eq1Set: eq1Set,
  24637. showSet: showSet,
  24638. ordSet: ordSet,
  24639. ord1Set: ord1Set,
  24640. monoidSet: monoidSet,
  24641. semigroupSet: semigroupSet,
  24642. foldableSet: foldableSet
  24643. };
  24644. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Array.ST/index.js":"../output/Data.Array.ST/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Lens.Index/index.js":[function(require,module,exports) {
  24645. // Generated by purs version 0.13.6
  24646. "use strict";
  24647. var Control_Applicative = require("../Control.Applicative/index.js");
  24648. var Data_Array = require("../Data.Array/index.js");
  24649. var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js");
  24650. var Data_Boolean = require("../Data.Boolean/index.js");
  24651. var Data_Eq = require("../Data.Eq/index.js");
  24652. var Data_Functor = require("../Data.Functor/index.js");
  24653. var Data_Identity = require("../Data.Identity/index.js");
  24654. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  24655. var Data_List_Types = require("../Data.List.Types/index.js");
  24656. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  24657. var Data_Maybe = require("../Data.Maybe/index.js");
  24658. var Data_Set = require("../Data.Set/index.js");
  24659. var Data_Traversable = require("../Data.Traversable/index.js");
  24660. var Foreign_Object = require("../Foreign.Object/index.js");
  24661. var Index = function Index(ix) {
  24662. this.ix = ix;
  24663. };
  24664. var ix = function ix(dict) {
  24665. return dict.ix;
  24666. };
  24667. var indexSet = function indexSet(dictOrd) {
  24668. return new Index(function (x) {
  24669. return function (dictWander) {
  24670. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24671. return function (coalg) {
  24672. var $40 = Control_Applicative.pure(dictApplicative);
  24673. var $41 = Data_Set.insert(dictOrd)(x);
  24674. return function ($42) {
  24675. return $40($41($42));
  24676. };
  24677. };
  24678. });
  24679. };
  24680. });
  24681. };
  24682. var indexNonEmptyArray = new Index(function (n) {
  24683. return function (dictWander) {
  24684. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24685. return function (coalg) {
  24686. return function (xs) {
  24687. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () {
  24688. var $43 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) {
  24689. return Data_Maybe.fromMaybe(xs)(Data_Array_NonEmpty.updateAt(n)(x)(xs));
  24690. });
  24691. return function ($44) {
  24692. return $43(coalg($44));
  24693. };
  24694. }())(Data_Array_NonEmpty.index(xs)(n));
  24695. };
  24696. };
  24697. });
  24698. };
  24699. });
  24700. var indexMaybe = new Index(function (v) {
  24701. return function (dictWander) {
  24702. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24703. return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative);
  24704. });
  24705. };
  24706. });
  24707. var indexMap = function indexMap(dictOrd) {
  24708. return new Index(function (k) {
  24709. return function (dictWander) {
  24710. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24711. return function (coalg) {
  24712. return function (m) {
  24713. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () {
  24714. var $45 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) {
  24715. return Data_Map_Internal.insert(dictOrd)(k)(v)(m);
  24716. });
  24717. return function ($46) {
  24718. return $45(coalg($46));
  24719. };
  24720. }())(Data_Map_Internal.lookup(dictOrd)(k)(m));
  24721. };
  24722. };
  24723. });
  24724. };
  24725. });
  24726. };
  24727. var indexList = new Index(function (n) {
  24728. return function (dictWander) {
  24729. if (n < 0) {
  24730. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24731. return function (v) {
  24732. return function (xs) {
  24733. return Control_Applicative.pure(dictApplicative)(xs);
  24734. };
  24735. };
  24736. });
  24737. }
  24738. ;
  24739. if (Data_Boolean.otherwise) {
  24740. var go = function go(dictApplicative) {
  24741. return function (v) {
  24742. return function (v1) {
  24743. return function (v2) {
  24744. if (v instanceof Data_List_Types.Nil) {
  24745. return Control_Applicative.pure(dictApplicative)(Data_List_Types.Nil.value);
  24746. }
  24747. ;
  24748. if (v instanceof Data_List_Types.Cons && v1 === 0) {
  24749. return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(v2(v.value0))(function (v3) {
  24750. return new Data_List_Types.Cons(v3, v.value1);
  24751. });
  24752. }
  24753. ;
  24754. if (v instanceof Data_List_Types.Cons) {
  24755. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v3) {
  24756. return new Data_List_Types.Cons(v.value0, v3);
  24757. })(go(dictApplicative)(v.value1)(v1 - 1 | 0)(v2));
  24758. }
  24759. ;
  24760. throw new Error("Failed pattern match at Data.Lens.Index (line 83, column 5 - line 83, column 79): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  24761. };
  24762. };
  24763. };
  24764. };
  24765. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24766. return function (coalg) {
  24767. return function (xs) {
  24768. return go(dictApplicative)(xs)(n)(coalg);
  24769. };
  24770. };
  24771. });
  24772. }
  24773. ;
  24774. throw new Error("Failed pattern match at Data.Lens.Index (line 80, column 1 - line 86, column 56): " + [n.constructor.name]);
  24775. };
  24776. });
  24777. var indexIdentity = new Index(function (v) {
  24778. return function (dictWander) {
  24779. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24780. return Data_Traversable.traverse(Data_Identity.traversableIdentity)(dictApplicative);
  24781. });
  24782. };
  24783. });
  24784. var indexForeignObject = new Index(function (k) {
  24785. return function (dictWander) {
  24786. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24787. return function (coalg) {
  24788. return function (m) {
  24789. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () {
  24790. var $47 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) {
  24791. return Foreign_Object.insert(k)(v)(m);
  24792. });
  24793. return function ($48) {
  24794. return $47(coalg($48));
  24795. };
  24796. }())(Foreign_Object.lookup(k)(m));
  24797. };
  24798. };
  24799. });
  24800. };
  24801. });
  24802. var indexArray = new Index(function (n) {
  24803. return function (dictWander) {
  24804. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24805. return function (coalg) {
  24806. return function (xs) {
  24807. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () {
  24808. var $49 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) {
  24809. return Data_Maybe.fromMaybe(xs)(Data_Array.updateAt(n)(x)(xs));
  24810. });
  24811. return function ($50) {
  24812. return $49(coalg($50));
  24813. };
  24814. }())(Data_Array.index(xs)(n));
  24815. };
  24816. };
  24817. });
  24818. };
  24819. });
  24820. var indexArr = function indexArr(dictEq) {
  24821. return new Index(function (i) {
  24822. return function (dictWander) {
  24823. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24824. return function (coalg) {
  24825. return function (f) {
  24826. return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(coalg(f(i)))(function (a) {
  24827. return function (j) {
  24828. var $39 = Data_Eq.eq(dictEq)(i)(j);
  24829. if ($39) {
  24830. return a;
  24831. }
  24832. ;
  24833. return f(j);
  24834. };
  24835. });
  24836. };
  24837. };
  24838. });
  24839. };
  24840. });
  24841. };
  24842. module.exports = {
  24843. Index: Index,
  24844. ix: ix,
  24845. indexArr: indexArr,
  24846. indexMaybe: indexMaybe,
  24847. indexIdentity: indexIdentity,
  24848. indexArray: indexArray,
  24849. indexNonEmptyArray: indexNonEmptyArray,
  24850. indexList: indexList,
  24851. indexSet: indexSet,
  24852. indexMap: indexMap,
  24853. indexForeignObject: indexForeignObject
  24854. };
  24855. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Array.NonEmpty/index.js":"../output/Data.Array.NonEmpty/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Set/index.js":"../output/Data.Set/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Foreign.Object/index.js":"../output/Foreign.Object/index.js"}],"../output/Data.Lens.Internal.Indexed/index.js":[function(require,module,exports) {
  24856. // Generated by purs version 0.13.6
  24857. "use strict";
  24858. var Data_Either = require("../Data.Either/index.js");
  24859. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  24860. var Data_Newtype = require("../Data.Newtype/index.js");
  24861. var Data_Profunctor = require("../Data.Profunctor/index.js");
  24862. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  24863. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  24864. var Data_Tuple = require("../Data.Tuple/index.js");
  24865. var Indexed = function Indexed(x) {
  24866. return x;
  24867. };
  24868. var profunctorIndexed = function profunctorIndexed(dictProfunctor) {
  24869. return new Data_Profunctor.Profunctor(function (f) {
  24870. return function (g) {
  24871. return function (v) {
  24872. return Data_Profunctor.dimap(dictProfunctor)(Data_Profunctor_Strong.second(Data_Profunctor_Strong.strongFn)(f))(g)(v);
  24873. };
  24874. };
  24875. });
  24876. };
  24877. var strongIndexed = function strongIndexed(dictStrong) {
  24878. return new Data_Profunctor_Strong.Strong(function () {
  24879. return profunctorIndexed(dictStrong.Profunctor0());
  24880. }, function (v) {
  24881. return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) {
  24882. return new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1.value0), v1.value1.value1);
  24883. })(Data_Profunctor_Strong.first(dictStrong)(v)));
  24884. }, function (v) {
  24885. return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) {
  24886. return new Data_Tuple.Tuple(v1.value1.value0, new Data_Tuple.Tuple(v1.value0, v1.value1.value1));
  24887. })(Data_Profunctor_Strong.second(dictStrong)(v)));
  24888. });
  24889. };
  24890. var newtypeIndexed = new Data_Newtype.Newtype(function (n) {
  24891. return n;
  24892. }, Indexed);
  24893. var choiceIndexed = function choiceIndexed(dictChoice) {
  24894. return new Data_Profunctor_Choice.Choice(function () {
  24895. return profunctorIndexed(dictChoice.Profunctor0());
  24896. }, function (v) {
  24897. return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) {
  24898. return Data_Either.either(function () {
  24899. var $47 = Data_Tuple.Tuple.create(v1.value0);
  24900. return function ($48) {
  24901. return Data_Either.Left.create($47($48));
  24902. };
  24903. }())(Data_Either.Right.create)(v1.value1);
  24904. })(Data_Profunctor_Choice.left(dictChoice)(v)));
  24905. }, function (v) {
  24906. return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) {
  24907. return Data_Either.either(Data_Either.Left.create)(function () {
  24908. var $49 = Data_Tuple.Tuple.create(v1.value0);
  24909. return function ($50) {
  24910. return Data_Either.Right.create($49($50));
  24911. };
  24912. }())(v1.value1);
  24913. })(Data_Profunctor_Choice.right(dictChoice)(v)));
  24914. });
  24915. };
  24916. var wanderIndexed = function wanderIndexed(dictWander) {
  24917. return new Data_Lens_Internal_Wander.Wander(function () {
  24918. return choiceIndexed(dictWander.Choice1());
  24919. }, function () {
  24920. return strongIndexed(dictWander.Strong0());
  24921. }, function (trav) {
  24922. return function (v) {
  24923. return Indexed(Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  24924. return function (ia2fb) {
  24925. return function (v1) {
  24926. return trav(dictApplicative)(function () {
  24927. var $51 = Data_Tuple.Tuple.create(v1.value0);
  24928. return function ($52) {
  24929. return ia2fb($51($52));
  24930. };
  24931. }())(v1.value1);
  24932. };
  24933. };
  24934. })(v));
  24935. };
  24936. });
  24937. };
  24938. module.exports = {
  24939. Indexed: Indexed,
  24940. newtypeIndexed: newtypeIndexed,
  24941. profunctorIndexed: profunctorIndexed,
  24942. strongIndexed: strongIndexed,
  24943. choiceIndexed: choiceIndexed,
  24944. wanderIndexed: wanderIndexed
  24945. };
  24946. },{"../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Internal.Shop/index.js":[function(require,module,exports) {
  24947. // Generated by purs version 0.13.6
  24948. "use strict";
  24949. var Data_Profunctor = require("../Data.Profunctor/index.js");
  24950. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  24951. var Data_Tuple = require("../Data.Tuple/index.js");
  24952. var Shop = function () {
  24953. function Shop(value0, value1) {
  24954. this.value0 = value0;
  24955. this.value1 = value1;
  24956. }
  24957. ;
  24958. Shop.create = function (value0) {
  24959. return function (value1) {
  24960. return new Shop(value0, value1);
  24961. };
  24962. };
  24963. return Shop;
  24964. }();
  24965. var profunctorShop = new Data_Profunctor.Profunctor(function (f) {
  24966. return function (g) {
  24967. return function (v) {
  24968. return new Shop(function ($30) {
  24969. return v.value0(f($30));
  24970. }, function (s) {
  24971. var $31 = v.value1(f(s));
  24972. return function ($32) {
  24973. return g($31($32));
  24974. };
  24975. });
  24976. };
  24977. };
  24978. });
  24979. var strongShop = new Data_Profunctor_Strong.Strong(function () {
  24980. return profunctorShop;
  24981. }, function (v) {
  24982. return new Shop(function (v1) {
  24983. return v.value0(v1.value0);
  24984. }, function (v1) {
  24985. return function (b) {
  24986. return new Data_Tuple.Tuple(v.value1(v1.value0)(b), v1.value1);
  24987. };
  24988. });
  24989. }, function (v) {
  24990. return new Shop(function (v1) {
  24991. return v.value0(v1.value1);
  24992. }, function (v1) {
  24993. return function (b) {
  24994. return new Data_Tuple.Tuple(v1.value0, v.value1(v1.value1)(b));
  24995. };
  24996. });
  24997. });
  24998. module.exports = {
  24999. Shop: Shop,
  25000. profunctorShop: profunctorShop,
  25001. strongShop: strongShop
  25002. };
  25003. },{"../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Lens/index.js":[function(require,module,exports) {
  25004. // Generated by purs version 0.13.6
  25005. "use strict";
  25006. var Control_Apply = require("../Control.Apply/index.js");
  25007. var Control_Category = require("../Control.Category/index.js");
  25008. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  25009. var Data_Lens_Internal_Shop = require("../Data.Lens.Internal.Shop/index.js");
  25010. var Data_Newtype = require("../Data.Newtype/index.js");
  25011. var Data_Profunctor = require("../Data.Profunctor/index.js");
  25012. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  25013. var Data_Tuple = require("../Data.Tuple/index.js");
  25014. var withLens = function withLens(l) {
  25015. return function (f) {
  25016. var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) {
  25017. return function (b) {
  25018. return b;
  25019. };
  25020. }));
  25021. return f(v.value0)(v.value1);
  25022. };
  25023. };
  25024. var withIndexedLens = function withIndexedLens(l) {
  25025. return function (f) {
  25026. var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) {
  25027. return function (b) {
  25028. return b;
  25029. };
  25030. }));
  25031. return f(v.value0)(v.value1);
  25032. };
  25033. };
  25034. var lensStore = function lensStore(l) {
  25035. return withLens(l)(Control_Apply.lift2(Control_Apply.applyFn)(Data_Tuple.Tuple.create));
  25036. };
  25037. var lens$prime = function lens$prime(to) {
  25038. return function (dictStrong) {
  25039. return function (pab) {
  25040. return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) {
  25041. return v.value1(v.value0);
  25042. })(Data_Profunctor_Strong.first(dictStrong)(pab));
  25043. };
  25044. };
  25045. };
  25046. var lens = function lens(get) {
  25047. return function (set) {
  25048. return function (dictStrong) {
  25049. return lens$prime(function (s) {
  25050. return new Data_Tuple.Tuple(get(s), function (b) {
  25051. return set(s)(b);
  25052. });
  25053. })(dictStrong);
  25054. };
  25055. };
  25056. };
  25057. var ilens$prime = function ilens$prime(to) {
  25058. return function (dictStrong) {
  25059. return function (pab) {
  25060. return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) {
  25061. return v.value1(v.value0);
  25062. })(Data_Profunctor_Strong.first(dictStrong)(Data_Newtype.un(Data_Lens_Internal_Indexed.newtypeIndexed)(Data_Lens_Internal_Indexed.Indexed)(pab)));
  25063. };
  25064. };
  25065. };
  25066. var ilens = function ilens(get) {
  25067. return function (set) {
  25068. return function (dictStrong) {
  25069. return ilens$prime(function (s) {
  25070. return new Data_Tuple.Tuple(get(s), function (b) {
  25071. return set(s)(b);
  25072. });
  25073. })(dictStrong);
  25074. };
  25075. };
  25076. };
  25077. var cloneLens = function cloneLens(l) {
  25078. return function (dictStrong) {
  25079. return withLens(l)(function (x) {
  25080. return function (y) {
  25081. return function (p) {
  25082. return lens(x)(y)(dictStrong)(p);
  25083. };
  25084. };
  25085. });
  25086. };
  25087. };
  25088. var cloneIndexedLens = function cloneIndexedLens(l) {
  25089. return function (dictStrong) {
  25090. return withIndexedLens(l)(function (x) {
  25091. return function (y) {
  25092. return function (p) {
  25093. return ilens(x)(y)(dictStrong)(p);
  25094. };
  25095. };
  25096. });
  25097. };
  25098. };
  25099. module.exports = {
  25100. lens: lens,
  25101. "lens'": lens$prime,
  25102. withLens: withLens,
  25103. cloneLens: cloneLens,
  25104. ilens: ilens,
  25105. "ilens'": ilens$prime,
  25106. withIndexedLens: withIndexedLens,
  25107. cloneIndexedLens: cloneIndexedLens,
  25108. lensStore: lensStore
  25109. };
  25110. },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.Lens.Internal.Shop/index.js":"../output/Data.Lens.Internal.Shop/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.At/index.js":[function(require,module,exports) {
  25111. // Generated by purs version 0.13.6
  25112. "use strict";
  25113. var Control_Category = require("../Control.Category/index.js");
  25114. var Data_Function = require("../Data.Function/index.js");
  25115. var Data_Identity = require("../Data.Identity/index.js");
  25116. var Data_Lens_Index = require("../Data.Lens.Index/index.js");
  25117. var Data_Lens_Lens = require("../Data.Lens.Lens/index.js");
  25118. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  25119. var Data_Maybe = require("../Data.Maybe/index.js");
  25120. var Data_Newtype = require("../Data.Newtype/index.js");
  25121. var Data_Set = require("../Data.Set/index.js");
  25122. var Data_Unit = require("../Data.Unit/index.js");
  25123. var Foreign_Object = require("../Foreign.Object/index.js");
  25124. var At = function At(Index0, at) {
  25125. this.Index0 = Index0;
  25126. this.at = at;
  25127. };
  25128. var atSet = function atSet(dictOrd) {
  25129. return new At(function () {
  25130. return Data_Lens_Index.indexSet(dictOrd);
  25131. }, function (x) {
  25132. return function (dictStrong) {
  25133. var update = function update(v) {
  25134. if (v instanceof Data_Maybe.Nothing) {
  25135. return Data_Set["delete"](dictOrd)(x);
  25136. }
  25137. ;
  25138. if (v instanceof Data_Maybe.Just) {
  25139. return Data_Set.insert(dictOrd)(x);
  25140. }
  25141. ;
  25142. throw new Error("Failed pattern match at Data.Lens.At (line 51, column 7 - line 51, column 34): " + [v.constructor.name]);
  25143. };
  25144. var get = function get(xs) {
  25145. var $13 = Data_Set.member(dictOrd)(x)(xs);
  25146. if ($13) {
  25147. return new Data_Maybe.Just(Data_Unit.unit);
  25148. }
  25149. ;
  25150. return Data_Maybe.Nothing.value;
  25151. };
  25152. return Data_Lens_Lens.lens(get)(Data_Function.flip(update))(dictStrong);
  25153. };
  25154. });
  25155. };
  25156. var atMaybe = new At(function () {
  25157. return Data_Lens_Index.indexMaybe;
  25158. }, function (v) {
  25159. return function (dictStrong) {
  25160. return Data_Lens_Lens.lens(Control_Category.identity(Control_Category.categoryFn))(function (v1) {
  25161. return Control_Category.identity(Control_Category.categoryFn);
  25162. })(dictStrong);
  25163. };
  25164. });
  25165. var atMap = function atMap(dictOrd) {
  25166. return new At(function () {
  25167. return Data_Lens_Index.indexMap(dictOrd);
  25168. }, function (k) {
  25169. return function (dictStrong) {
  25170. return Data_Lens_Lens.lens(Data_Map_Internal.lookup(dictOrd)(k))(function (m) {
  25171. return Data_Maybe.maybe(Data_Map_Internal["delete"](dictOrd)(k)(m))(function (v) {
  25172. return Data_Map_Internal.insert(dictOrd)(k)(v)(m);
  25173. });
  25174. })(dictStrong);
  25175. };
  25176. });
  25177. };
  25178. var atIdentity = new At(function () {
  25179. return Data_Lens_Index.indexIdentity;
  25180. }, function (v) {
  25181. return function (dictStrong) {
  25182. return Data_Lens_Lens.lens(function () {
  25183. var $14 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  25184. return function ($15) {
  25185. return Data_Maybe.Just.create($14($15));
  25186. };
  25187. }())(Data_Function.flip(Data_Maybe.maybe)(Data_Identity.Identity))(dictStrong);
  25188. };
  25189. });
  25190. var atForeignObject = new At(function () {
  25191. return Data_Lens_Index.indexForeignObject;
  25192. }, function (k) {
  25193. return function (dictStrong) {
  25194. return Data_Lens_Lens.lens(Foreign_Object.lookup(k))(function (m) {
  25195. return Data_Maybe.maybe(Foreign_Object["delete"](k)(m))(function (v) {
  25196. return Foreign_Object.insert(k)(v)(m);
  25197. });
  25198. })(dictStrong);
  25199. };
  25200. });
  25201. var at = function at(dict) {
  25202. return dict.at;
  25203. };
  25204. module.exports = {
  25205. At: At,
  25206. at: at,
  25207. atIdentity: atIdentity,
  25208. atMaybe: atMaybe,
  25209. atSet: atSet,
  25210. atMap: atMap,
  25211. atForeignObject: atForeignObject
  25212. };
  25213. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Lens.Index/index.js":"../output/Data.Lens.Index/index.js","../Data.Lens.Lens/index.js":"../output/Data.Lens.Lens/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Set/index.js":"../output/Data.Set/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Foreign.Object/index.js":"../output/Foreign.Object/index.js"}],"../output/Data.Functor.Contravariant/index.js":[function(require,module,exports) {
  25214. // Generated by purs version 0.13.6
  25215. "use strict";
  25216. var Data_Functor = require("../Data.Functor/index.js");
  25217. var Data_Void = require("../Data.Void/index.js");
  25218. var Contravariant = function Contravariant(cmap) {
  25219. this.cmap = cmap;
  25220. };
  25221. var cmap = function cmap(dict) {
  25222. return dict.cmap;
  25223. };
  25224. var cmapFlipped = function cmapFlipped(dictContravariant) {
  25225. return function (x) {
  25226. return function (f) {
  25227. return cmap(dictContravariant)(f)(x);
  25228. };
  25229. };
  25230. };
  25231. var coerce = function coerce(dictContravariant) {
  25232. return function (dictFunctor) {
  25233. return function (a) {
  25234. return Data_Functor.map(dictFunctor)(Data_Void.absurd)(cmap(dictContravariant)(Data_Void.absurd)(a));
  25235. };
  25236. };
  25237. };
  25238. var imapC = function imapC(dictContravariant) {
  25239. return function (v) {
  25240. return function (f) {
  25241. return cmap(dictContravariant)(f);
  25242. };
  25243. };
  25244. };
  25245. module.exports = {
  25246. cmap: cmap,
  25247. Contravariant: Contravariant,
  25248. cmapFlipped: cmapFlipped,
  25249. coerce: coerce,
  25250. imapC: imapC
  25251. };
  25252. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Void/index.js":"../output/Data.Void/index.js"}],"../output/Data.Const/index.js":[function(require,module,exports) {
  25253. // Generated by purs version 0.13.6
  25254. "use strict";
  25255. var Control_Applicative = require("../Control.Applicative/index.js");
  25256. var Control_Apply = require("../Control.Apply/index.js");
  25257. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  25258. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  25259. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  25260. var Data_Bitraversable = require("../Data.Bitraversable/index.js");
  25261. var Data_Eq = require("../Data.Eq/index.js");
  25262. var Data_Foldable = require("../Data.Foldable/index.js");
  25263. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  25264. var Data_Functor = require("../Data.Functor/index.js");
  25265. var Data_Functor_Contravariant = require("../Data.Functor.Contravariant/index.js");
  25266. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  25267. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  25268. var Data_Monoid = require("../Data.Monoid/index.js");
  25269. var Data_Newtype = require("../Data.Newtype/index.js");
  25270. var Data_Ord = require("../Data.Ord/index.js");
  25271. var Data_Semigroup = require("../Data.Semigroup/index.js");
  25272. var Data_Show = require("../Data.Show/index.js");
  25273. var Data_Traversable = require("../Data.Traversable/index.js");
  25274. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  25275. var Const = function Const(x) {
  25276. return x;
  25277. };
  25278. var showConst = function showConst(dictShow) {
  25279. return new Data_Show.Show(function (v) {
  25280. return "(Const " + (Data_Show.show(dictShow)(v) + ")");
  25281. });
  25282. };
  25283. var semiringConst = function semiringConst(dictSemiring) {
  25284. return dictSemiring;
  25285. };
  25286. var semigroupoidConst = new Control_Semigroupoid.Semigroupoid(function (v) {
  25287. return function (v1) {
  25288. return v1;
  25289. };
  25290. });
  25291. var semigroupConst = function semigroupConst(dictSemigroup) {
  25292. return dictSemigroup;
  25293. };
  25294. var ringConst = function ringConst(dictRing) {
  25295. return dictRing;
  25296. };
  25297. var ordConst = function ordConst(dictOrd) {
  25298. return dictOrd;
  25299. };
  25300. var newtypeConst = new Data_Newtype.Newtype(function (n) {
  25301. return n;
  25302. }, Const);
  25303. var monoidConst = function monoidConst(dictMonoid) {
  25304. return dictMonoid;
  25305. };
  25306. var heytingAlgebraConst = function heytingAlgebraConst(dictHeytingAlgebra) {
  25307. return dictHeytingAlgebra;
  25308. };
  25309. var functorConst = new Data_Functor.Functor(function (f) {
  25310. return function (m) {
  25311. return m;
  25312. };
  25313. });
  25314. var functorWithIndexConst = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  25315. return functorConst;
  25316. }, function (v) {
  25317. return function (v1) {
  25318. return v1;
  25319. };
  25320. });
  25321. var invariantConst = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorConst));
  25322. var foldableConst = new Data_Foldable.Foldable(function (dictMonoid) {
  25323. return function (v) {
  25324. return function (v1) {
  25325. return Data_Monoid.mempty(dictMonoid);
  25326. };
  25327. };
  25328. }, function (v) {
  25329. return function (z) {
  25330. return function (v1) {
  25331. return z;
  25332. };
  25333. };
  25334. }, function (v) {
  25335. return function (z) {
  25336. return function (v1) {
  25337. return z;
  25338. };
  25339. };
  25340. });
  25341. var foldableWithIndexConst = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  25342. return foldableConst;
  25343. }, function (dictMonoid) {
  25344. return function (v) {
  25345. return function (v1) {
  25346. return Data_Monoid.mempty(dictMonoid);
  25347. };
  25348. };
  25349. }, function (v) {
  25350. return function (z) {
  25351. return function (v1) {
  25352. return z;
  25353. };
  25354. };
  25355. }, function (v) {
  25356. return function (z) {
  25357. return function (v1) {
  25358. return z;
  25359. };
  25360. };
  25361. });
  25362. var traversableConst = new Data_Traversable.Traversable(function () {
  25363. return foldableConst;
  25364. }, function () {
  25365. return functorConst;
  25366. }, function (dictApplicative) {
  25367. return function (v) {
  25368. return Control_Applicative.pure(dictApplicative)(v);
  25369. };
  25370. }, function (dictApplicative) {
  25371. return function (v) {
  25372. return function (v1) {
  25373. return Control_Applicative.pure(dictApplicative)(v1);
  25374. };
  25375. };
  25376. });
  25377. var traversableWithIndexConst = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  25378. return foldableWithIndexConst;
  25379. }, function () {
  25380. return functorWithIndexConst;
  25381. }, function () {
  25382. return traversableConst;
  25383. }, function (dictApplicative) {
  25384. return function (v) {
  25385. return function (v1) {
  25386. return Control_Applicative.pure(dictApplicative)(v1);
  25387. };
  25388. };
  25389. });
  25390. var euclideanRingConst = function euclideanRingConst(dictEuclideanRing) {
  25391. return dictEuclideanRing;
  25392. };
  25393. var eqConst = function eqConst(dictEq) {
  25394. return dictEq;
  25395. };
  25396. var eq1Const = function eq1Const(dictEq) {
  25397. return new Data_Eq.Eq1(function (dictEq1) {
  25398. return Data_Eq.eq(eqConst(dictEq));
  25399. });
  25400. };
  25401. var ord1Const = function ord1Const(dictOrd) {
  25402. return new Data_Ord.Ord1(function () {
  25403. return eq1Const(dictOrd.Eq0());
  25404. }, function (dictOrd1) {
  25405. return Data_Ord.compare(ordConst(dictOrd));
  25406. });
  25407. };
  25408. var contravariantConst = new Data_Functor_Contravariant.Contravariant(function (v) {
  25409. return function (v1) {
  25410. return v1;
  25411. };
  25412. });
  25413. var commutativeRingConst = function commutativeRingConst(dictCommutativeRing) {
  25414. return dictCommutativeRing;
  25415. };
  25416. var boundedConst = function boundedConst(dictBounded) {
  25417. return dictBounded;
  25418. };
  25419. var booleanAlgebraConst = function booleanAlgebraConst(dictBooleanAlgebra) {
  25420. return dictBooleanAlgebra;
  25421. };
  25422. var bifunctorConst = new Data_Bifunctor.Bifunctor(function (f) {
  25423. return function (v) {
  25424. return function (v1) {
  25425. return f(v1);
  25426. };
  25427. };
  25428. });
  25429. var bifoldableConst = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
  25430. return function (f) {
  25431. return function (v) {
  25432. return function (v1) {
  25433. return f(v1);
  25434. };
  25435. };
  25436. };
  25437. }, function (f) {
  25438. return function (v) {
  25439. return function (z) {
  25440. return function (v1) {
  25441. return f(z)(v1);
  25442. };
  25443. };
  25444. };
  25445. }, function (f) {
  25446. return function (v) {
  25447. return function (z) {
  25448. return function (v1) {
  25449. return f(v1)(z);
  25450. };
  25451. };
  25452. };
  25453. });
  25454. var bitraversableConst = new Data_Bitraversable.Bitraversable(function () {
  25455. return bifoldableConst;
  25456. }, function () {
  25457. return bifunctorConst;
  25458. }, function (dictApplicative) {
  25459. return function (v) {
  25460. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(v);
  25461. };
  25462. }, function (dictApplicative) {
  25463. return function (f) {
  25464. return function (v) {
  25465. return function (v1) {
  25466. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(f(v1));
  25467. };
  25468. };
  25469. };
  25470. });
  25471. var applyConst = function applyConst(dictSemigroup) {
  25472. return new Control_Apply.Apply(function () {
  25473. return functorConst;
  25474. }, function (v) {
  25475. return function (v1) {
  25476. return Data_Semigroup.append(dictSemigroup)(v)(v1);
  25477. };
  25478. });
  25479. };
  25480. var applicativeConst = function applicativeConst(dictMonoid) {
  25481. return new Control_Applicative.Applicative(function () {
  25482. return applyConst(dictMonoid.Semigroup0());
  25483. }, function (v) {
  25484. return Data_Monoid.mempty(dictMonoid);
  25485. });
  25486. };
  25487. module.exports = {
  25488. Const: Const,
  25489. newtypeConst: newtypeConst,
  25490. eqConst: eqConst,
  25491. eq1Const: eq1Const,
  25492. ordConst: ordConst,
  25493. ord1Const: ord1Const,
  25494. boundedConst: boundedConst,
  25495. showConst: showConst,
  25496. semigroupoidConst: semigroupoidConst,
  25497. semigroupConst: semigroupConst,
  25498. monoidConst: monoidConst,
  25499. semiringConst: semiringConst,
  25500. ringConst: ringConst,
  25501. euclideanRingConst: euclideanRingConst,
  25502. commutativeRingConst: commutativeRingConst,
  25503. heytingAlgebraConst: heytingAlgebraConst,
  25504. booleanAlgebraConst: booleanAlgebraConst,
  25505. functorConst: functorConst,
  25506. bifunctorConst: bifunctorConst,
  25507. functorWithIndexConst: functorWithIndexConst,
  25508. invariantConst: invariantConst,
  25509. contravariantConst: contravariantConst,
  25510. applyConst: applyConst,
  25511. applicativeConst: applicativeConst,
  25512. foldableConst: foldableConst,
  25513. foldableWithIndexConst: foldableWithIndexConst,
  25514. bifoldableConst: bifoldableConst,
  25515. traversableConst: traversableConst,
  25516. traversableWithIndexConst: traversableWithIndexConst,
  25517. bitraversableConst: bitraversableConst
  25518. };
  25519. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bitraversable/index.js":"../output/Data.Bitraversable/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Contravariant/index.js":"../output/Data.Functor.Contravariant/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js"}],"../output/Data.Profunctor.Cochoice/index.js":[function(require,module,exports) {
  25520. // Generated by purs version 0.13.6
  25521. "use strict";
  25522. var Cochoice = function Cochoice(Profunctor0, unleft, unright) {
  25523. this.Profunctor0 = Profunctor0;
  25524. this.unleft = unleft;
  25525. this.unright = unright;
  25526. };
  25527. var unright = function unright(dict) {
  25528. return dict.unright;
  25529. };
  25530. var unleft = function unleft(dict) {
  25531. return dict.unleft;
  25532. };
  25533. module.exports = {
  25534. unleft: unleft,
  25535. unright: unright,
  25536. Cochoice: Cochoice
  25537. };
  25538. },{}],"../output/Data.Lens.Internal.Forget/index.js":[function(require,module,exports) {
  25539. // Generated by purs version 0.13.6
  25540. "use strict";
  25541. var Data_Const = require("../Data.Const/index.js");
  25542. var Data_Either = require("../Data.Either/index.js");
  25543. var Data_Functor = require("../Data.Functor/index.js");
  25544. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  25545. var Data_Monoid = require("../Data.Monoid/index.js");
  25546. var Data_Newtype = require("../Data.Newtype/index.js");
  25547. var Data_Profunctor = require("../Data.Profunctor/index.js");
  25548. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  25549. var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js");
  25550. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  25551. var Data_Semigroup = require("../Data.Semigroup/index.js");
  25552. var Data_Tuple = require("../Data.Tuple/index.js");
  25553. var Forget = function Forget(x) {
  25554. return x;
  25555. };
  25556. var semigroupForget = function semigroupForget(dictSemigroup) {
  25557. return Data_Semigroup.semigroupFn(dictSemigroup);
  25558. };
  25559. var profunctorForget = new Data_Profunctor.Profunctor(function (f) {
  25560. return function (v) {
  25561. return function (v1) {
  25562. return function ($27) {
  25563. return v1(f($27));
  25564. };
  25565. };
  25566. };
  25567. });
  25568. var strongForget = new Data_Profunctor_Strong.Strong(function () {
  25569. return profunctorForget;
  25570. }, function (v) {
  25571. return function ($28) {
  25572. return v(Data_Tuple.fst($28));
  25573. };
  25574. }, function (v) {
  25575. return function ($29) {
  25576. return v(Data_Tuple.snd($29));
  25577. };
  25578. });
  25579. var newtypeForget = new Data_Newtype.Newtype(function (n) {
  25580. return n;
  25581. }, Forget);
  25582. var monoidForget = function monoidForget(dictMonoid) {
  25583. return Data_Monoid.monoidFn(dictMonoid);
  25584. };
  25585. var cochoiceForget = new Data_Profunctor_Cochoice.Cochoice(function () {
  25586. return profunctorForget;
  25587. }, function (v) {
  25588. return function ($30) {
  25589. return v(Data_Either.Left.create($30));
  25590. };
  25591. }, function (v) {
  25592. return function ($31) {
  25593. return v(Data_Either.Right.create($31));
  25594. };
  25595. });
  25596. var choiceForget = function choiceForget(dictMonoid) {
  25597. return new Data_Profunctor_Choice.Choice(function () {
  25598. return profunctorForget;
  25599. }, function (v) {
  25600. return Data_Either.either(v)(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)));
  25601. }, function (v) {
  25602. return Data_Either.either(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)))(v);
  25603. });
  25604. };
  25605. var wanderForget = function wanderForget(dictMonoid) {
  25606. return new Data_Lens_Internal_Wander.Wander(function () {
  25607. return choiceForget(dictMonoid);
  25608. }, function () {
  25609. return strongForget;
  25610. }, function (f) {
  25611. return function (v) {
  25612. return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Const.newtypeConst)(Data_Const.newtypeConst)(Data_Const.Const)(f(Data_Const.applicativeConst(dictMonoid)))(v);
  25613. };
  25614. });
  25615. };
  25616. module.exports = {
  25617. Forget: Forget,
  25618. newtypeForget: newtypeForget,
  25619. semigroupForget: semigroupForget,
  25620. monoidForget: monoidForget,
  25621. profunctorForget: profunctorForget,
  25622. choiceForget: choiceForget,
  25623. strongForget: strongForget,
  25624. cochoiceForget: cochoiceForget,
  25625. wanderForget: wanderForget
  25626. };
  25627. },{"../Data.Const/index.js":"../output/Data.Const/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Cochoice/index.js":"../output/Data.Profunctor.Cochoice/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Fold/index.js":[function(require,module,exports) {
  25628. // Generated by purs version 0.13.6
  25629. "use strict";
  25630. var Control_Applicative = require("../Control.Applicative/index.js");
  25631. var Control_Apply = require("../Control.Apply/index.js");
  25632. var Control_Category = require("../Control.Category/index.js");
  25633. var Data_Array = require("../Data.Array/index.js");
  25634. var Data_Either = require("../Data.Either/index.js");
  25635. var Data_Eq = require("../Data.Eq/index.js");
  25636. var Data_Foldable = require("../Data.Foldable/index.js");
  25637. var Data_Function = require("../Data.Function/index.js");
  25638. var Data_Functor = require("../Data.Functor/index.js");
  25639. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  25640. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  25641. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  25642. var Data_List_Types = require("../Data.List.Types/index.js");
  25643. var Data_Maybe = require("../Data.Maybe/index.js");
  25644. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  25645. var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
  25646. var Data_Monoid = require("../Data.Monoid/index.js");
  25647. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  25648. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  25649. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  25650. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  25651. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  25652. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  25653. var Data_Newtype = require("../Data.Newtype/index.js");
  25654. var Data_Ord = require("../Data.Ord/index.js");
  25655. var Data_Profunctor = require("../Data.Profunctor/index.js");
  25656. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  25657. var Data_Semigroup = require("../Data.Semigroup/index.js");
  25658. var Data_Tuple = require("../Data.Tuple/index.js");
  25659. var Data_Unit = require("../Data.Unit/index.js");
  25660. var unfolded = function unfolded(dictMonoid) {
  25661. return function (f) {
  25662. return function (p) {
  25663. var go = function () {
  25664. var $43 = Data_Maybe.maybe(Data_Monoid.mempty(dictMonoid))(function (v) {
  25665. return Data_Semigroup.append(dictMonoid.Semigroup0())(Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p)(v.value0))(go(v.value1));
  25666. });
  25667. return function ($44) {
  25668. return $43(f($44));
  25669. };
  25670. }();
  25671. return go;
  25672. };
  25673. };
  25674. };
  25675. var replicated = function replicated(dictMonoid) {
  25676. return function (i) {
  25677. return function (v) {
  25678. var go = function go(v1) {
  25679. return function (x) {
  25680. if (v1 === 0) {
  25681. return Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid));
  25682. }
  25683. ;
  25684. return Data_Semigroup.append(Data_Semigroup.semigroupFn(dictMonoid.Semigroup0()))(x)(go(v1 - 1 | 0)(x));
  25685. };
  25686. };
  25687. return go(i)(v);
  25688. };
  25689. };
  25690. };
  25691. var ifoldMapOf = function ifoldMapOf(p) {
  25692. return function (f) {
  25693. return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f))));
  25694. };
  25695. };
  25696. var ifoldlOf = function ifoldlOf(p) {
  25697. return function (f) {
  25698. return function (r) {
  25699. var $45 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  25700. var $46 = Data_Newtype.unwrap(Data_Newtype.newtypeDual);
  25701. var $47 = ifoldMapOf(p)(function (i) {
  25702. var $49 = Data_Function.flip(f(i));
  25703. return function ($50) {
  25704. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($49($50)));
  25705. };
  25706. });
  25707. return function ($48) {
  25708. return $45($46($47($48)));
  25709. };
  25710. };
  25711. };
  25712. };
  25713. var ifoldrOf = function ifoldrOf(p) {
  25714. return function (f) {
  25715. return function (r) {
  25716. var $51 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  25717. var $52 = ifoldMapOf(p)(function (i) {
  25718. var $54 = f(i);
  25719. return function ($55) {
  25720. return Data_Monoid_Endo.Endo($54($55));
  25721. };
  25722. });
  25723. return function ($53) {
  25724. return $51($52($53));
  25725. };
  25726. };
  25727. };
  25728. };
  25729. var itoListOf = function itoListOf(p) {
  25730. return ifoldrOf(p)(function (i) {
  25731. return function (x) {
  25732. return function (xs) {
  25733. return new Data_List_Types.Cons(new Data_Tuple.Tuple(i, x), xs);
  25734. };
  25735. };
  25736. })(Data_List_Types.Nil.value);
  25737. };
  25738. var itraverseOf_ = function itraverseOf_(dictApplicative) {
  25739. return function (p) {
  25740. return function (f) {
  25741. return ifoldrOf(p)(function (i) {
  25742. return function (a) {
  25743. return function (fu) {
  25744. return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(i)(a)))(fu);
  25745. };
  25746. };
  25747. })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  25748. };
  25749. };
  25750. };
  25751. var iforOf_ = function iforOf_(dictApplicative) {
  25752. var $56 = itraverseOf_(dictApplicative);
  25753. return function ($57) {
  25754. return Data_Function.flip($56($57));
  25755. };
  25756. };
  25757. var ifindOf = function ifindOf(p) {
  25758. return function (f) {
  25759. return ifoldrOf(p)(function (i) {
  25760. return function (a) {
  25761. return Data_Maybe.maybe(function () {
  25762. var $37 = f(i)(a);
  25763. if ($37) {
  25764. return new Data_Maybe.Just(a);
  25765. }
  25766. ;
  25767. return Data_Maybe.Nothing.value;
  25768. }())(Data_Maybe.Just.create);
  25769. };
  25770. })(Data_Maybe.Nothing.value);
  25771. };
  25772. };
  25773. var ianyOf = function ianyOf(dictHeytingAlgebra) {
  25774. return function (p) {
  25775. return function (f) {
  25776. var $58 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  25777. var $59 = ifoldMapOf(p)(function (i) {
  25778. var $61 = f(i);
  25779. return function ($62) {
  25780. return Data_Monoid_Disj.Disj($61($62));
  25781. };
  25782. });
  25783. return function ($60) {
  25784. return $58($59($60));
  25785. };
  25786. };
  25787. };
  25788. };
  25789. var iallOf = function iallOf(dictHeytingAlgebra) {
  25790. return function (p) {
  25791. return function (f) {
  25792. var $63 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  25793. var $64 = ifoldMapOf(p)(function (i) {
  25794. var $66 = f(i);
  25795. return function ($67) {
  25796. return Data_Monoid_Conj.Conj($66($67));
  25797. };
  25798. });
  25799. return function ($65) {
  25800. return $63($64($65));
  25801. };
  25802. };
  25803. };
  25804. };
  25805. var folded = function folded(dictMonoid) {
  25806. return function (dictFoldable) {
  25807. return function (v) {
  25808. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(v);
  25809. };
  25810. };
  25811. };
  25812. var foldMapOf = Data_Newtype.under(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.Forget);
  25813. var foldOf = function foldOf(p) {
  25814. return foldMapOf(p)(Control_Category.identity(Control_Category.categoryFn));
  25815. };
  25816. var foldlOf = function foldlOf(p) {
  25817. return function (f) {
  25818. return function (r) {
  25819. var $68 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  25820. var $69 = Data_Newtype.unwrap(Data_Newtype.newtypeDual);
  25821. var $70 = foldMapOf(p)(function () {
  25822. var $72 = Data_Function.flip(f);
  25823. return function ($73) {
  25824. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($72($73)));
  25825. };
  25826. }());
  25827. return function ($71) {
  25828. return $68($69($70($71)));
  25829. };
  25830. };
  25831. };
  25832. };
  25833. var foldrOf = function foldrOf(p) {
  25834. return function (f) {
  25835. return function (r) {
  25836. var $74 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  25837. var $75 = foldMapOf(p)(function ($77) {
  25838. return Data_Monoid_Endo.Endo(f($77));
  25839. });
  25840. return function ($76) {
  25841. return $74($75($76));
  25842. };
  25843. };
  25844. };
  25845. };
  25846. var maximumOf = function maximumOf(dictOrd) {
  25847. return function (p) {
  25848. var max = function max(a) {
  25849. return function (b) {
  25850. var $39 = Data_Ord.greaterThan(dictOrd)(a)(b);
  25851. if ($39) {
  25852. return a;
  25853. }
  25854. ;
  25855. return b;
  25856. };
  25857. };
  25858. return foldrOf(p)(function (a) {
  25859. var $78 = Data_Maybe.maybe(a)(max(a));
  25860. return function ($79) {
  25861. return Data_Maybe.Just.create($78($79));
  25862. };
  25863. })(Data_Maybe.Nothing.value);
  25864. };
  25865. };
  25866. var minimumOf = function minimumOf(dictOrd) {
  25867. return function (p) {
  25868. var min = function min(a) {
  25869. return function (b) {
  25870. var $40 = Data_Ord.lessThan(dictOrd)(a)(b);
  25871. if ($40) {
  25872. return a;
  25873. }
  25874. ;
  25875. return b;
  25876. };
  25877. };
  25878. return foldrOf(p)(function (a) {
  25879. var $80 = Data_Maybe.maybe(a)(min(a));
  25880. return function ($81) {
  25881. return Data_Maybe.Just.create($80($81));
  25882. };
  25883. })(Data_Maybe.Nothing.value);
  25884. };
  25885. };
  25886. var toListOf = function toListOf(p) {
  25887. return foldrOf(p)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value);
  25888. };
  25889. var toArrayOf = function toArrayOf(p) {
  25890. var $82 = Data_Array.fromFoldable(Data_List_Types.foldableList);
  25891. var $83 = toListOf(p);
  25892. return function ($84) {
  25893. return $82($83($84));
  25894. };
  25895. };
  25896. var toArrayOfOn = function toArrayOfOn(s) {
  25897. return function (p) {
  25898. return toArrayOf(p)(s);
  25899. };
  25900. };
  25901. var toListOfOn = function toListOfOn(s) {
  25902. return function (p) {
  25903. return toListOf(p)(s);
  25904. };
  25905. };
  25906. var traverseOf_ = function traverseOf_(dictApplicative) {
  25907. return function (p) {
  25908. return function (f) {
  25909. return foldrOf(p)(function (a) {
  25910. return function (fu) {
  25911. return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(a)))(fu);
  25912. };
  25913. })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  25914. };
  25915. };
  25916. };
  25917. var has = function has(dictHeytingAlgebra) {
  25918. return function (p) {
  25919. var $85 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  25920. var $86 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra)));
  25921. return function ($87) {
  25922. return $85($86($87));
  25923. };
  25924. };
  25925. };
  25926. var hasn$primet = function hasn$primet(dictHeytingAlgebra) {
  25927. return function (p) {
  25928. var $88 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  25929. var $89 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)));
  25930. return function ($90) {
  25931. return $88($89($90));
  25932. };
  25933. };
  25934. };
  25935. var lastOf = function lastOf(p) {
  25936. var $91 = Data_Newtype.unwrap(Data_Maybe_Last.newtypeLast);
  25937. var $92 = foldMapOf(p)(function ($94) {
  25938. return Data_Maybe_Last.Last(Data_Maybe.Just.create($94));
  25939. });
  25940. return function ($93) {
  25941. return $91($92($93));
  25942. };
  25943. };
  25944. var lengthOf = function lengthOf(p) {
  25945. var $95 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive);
  25946. var $96 = foldMapOf(p)(Data_Function["const"](1));
  25947. return function ($97) {
  25948. return $95($96($97));
  25949. };
  25950. };
  25951. var preview = function preview(p) {
  25952. var $98 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
  25953. var $99 = foldMapOf(p)(function ($101) {
  25954. return Data_Maybe_First.First(Data_Maybe.Just.create($101));
  25955. });
  25956. return function ($100) {
  25957. return $98($99($100));
  25958. };
  25959. };
  25960. var previewOn = function previewOn(s) {
  25961. return function (p) {
  25962. return preview(p)(s);
  25963. };
  25964. };
  25965. var productOf = function productOf(dictSemiring) {
  25966. return function (p) {
  25967. var $102 = Data_Newtype.unwrap(Data_Newtype.newtypeMultiplicative);
  25968. var $103 = foldMapOf(p)(Data_Monoid_Multiplicative.Multiplicative);
  25969. return function ($104) {
  25970. return $102($103($104));
  25971. };
  25972. };
  25973. };
  25974. var sequenceOf_ = function sequenceOf_(dictApplicative) {
  25975. return function (p) {
  25976. var $105 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  25977. var $106 = foldMapOf(p)(function (f) {
  25978. return function (v) {
  25979. return Control_Apply.applySecond(dictApplicative.Apply0())(f)(v);
  25980. };
  25981. });
  25982. return function ($107) {
  25983. return $105($106($107));
  25984. };
  25985. };
  25986. };
  25987. var sumOf = function sumOf(dictSemiring) {
  25988. return function (p) {
  25989. var $108 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive);
  25990. var $109 = foldMapOf(p)(Data_Monoid_Additive.Additive);
  25991. return function ($110) {
  25992. return $108($109($110));
  25993. };
  25994. };
  25995. };
  25996. var firstOf = function firstOf(p) {
  25997. var $111 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
  25998. var $112 = foldMapOf(p)(function ($114) {
  25999. return Data_Maybe_First.First(Data_Maybe.Just.create($114));
  26000. });
  26001. return function ($113) {
  26002. return $111($112($113));
  26003. };
  26004. };
  26005. var findOf = function findOf(p) {
  26006. return function (f) {
  26007. return foldrOf(p)(function (a) {
  26008. return Data_Maybe.maybe(function () {
  26009. var $41 = f(a);
  26010. if ($41) {
  26011. return new Data_Maybe.Just(a);
  26012. }
  26013. ;
  26014. return Data_Maybe.Nothing.value;
  26015. }())(Data_Maybe.Just.create);
  26016. })(Data_Maybe.Nothing.value);
  26017. };
  26018. };
  26019. var filtered = function filtered(dictChoice) {
  26020. return function (f) {
  26021. var $115 = Data_Profunctor.dimap(dictChoice.Profunctor0())(function (x) {
  26022. var $42 = f(x);
  26023. if ($42) {
  26024. return new Data_Either.Right(x);
  26025. }
  26026. ;
  26027. return new Data_Either.Left(x);
  26028. })(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)));
  26029. var $116 = Data_Profunctor_Choice.right(dictChoice);
  26030. return function ($117) {
  26031. return $115($116($117));
  26032. };
  26033. };
  26034. };
  26035. var anyOf = function anyOf(dictHeytingAlgebra) {
  26036. return function (p) {
  26037. return function (f) {
  26038. var $118 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  26039. var $119 = foldMapOf(p)(function ($121) {
  26040. return Data_Monoid_Disj.Disj(f($121));
  26041. });
  26042. return function ($120) {
  26043. return $118($119($120));
  26044. };
  26045. };
  26046. };
  26047. };
  26048. var elemOf = function elemOf(dictEq) {
  26049. return function (p) {
  26050. return function (a) {
  26051. return anyOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) {
  26052. return Data_Eq.eq(dictEq)(v)(a);
  26053. });
  26054. };
  26055. };
  26056. };
  26057. var orOf = function orOf(dictHeytingAlgebra) {
  26058. return function (p) {
  26059. return anyOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn));
  26060. };
  26061. };
  26062. var allOf = function allOf(dictHeytingAlgebra) {
  26063. return function (p) {
  26064. return function (f) {
  26065. var $122 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  26066. var $123 = foldMapOf(p)(function ($125) {
  26067. return Data_Monoid_Conj.Conj(f($125));
  26068. });
  26069. return function ($124) {
  26070. return $122($123($124));
  26071. };
  26072. };
  26073. };
  26074. };
  26075. var andOf = function andOf(dictHeytingAlgebra) {
  26076. return function (p) {
  26077. return allOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn));
  26078. };
  26079. };
  26080. var notElemOf = function notElemOf(dictEq) {
  26081. return function (p) {
  26082. return function (a) {
  26083. return allOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) {
  26084. return Data_Eq.notEq(dictEq)(v)(a);
  26085. });
  26086. };
  26087. };
  26088. };
  26089. module.exports = {
  26090. previewOn: previewOn,
  26091. toListOfOn: toListOfOn,
  26092. preview: preview,
  26093. foldOf: foldOf,
  26094. foldMapOf: foldMapOf,
  26095. foldrOf: foldrOf,
  26096. foldlOf: foldlOf,
  26097. toListOf: toListOf,
  26098. firstOf: firstOf,
  26099. lastOf: lastOf,
  26100. maximumOf: maximumOf,
  26101. minimumOf: minimumOf,
  26102. allOf: allOf,
  26103. anyOf: anyOf,
  26104. andOf: andOf,
  26105. orOf: orOf,
  26106. elemOf: elemOf,
  26107. notElemOf: notElemOf,
  26108. sumOf: sumOf,
  26109. productOf: productOf,
  26110. lengthOf: lengthOf,
  26111. findOf: findOf,
  26112. sequenceOf_: sequenceOf_,
  26113. traverseOf_: traverseOf_,
  26114. has: has,
  26115. "hasn't": hasn$primet,
  26116. replicated: replicated,
  26117. filtered: filtered,
  26118. folded: folded,
  26119. unfolded: unfolded,
  26120. toArrayOf: toArrayOf,
  26121. toArrayOfOn: toArrayOfOn,
  26122. ifoldMapOf: ifoldMapOf,
  26123. ifoldrOf: ifoldrOf,
  26124. ifoldlOf: ifoldlOf,
  26125. iallOf: iallOf,
  26126. ianyOf: ianyOf,
  26127. itoListOf: itoListOf,
  26128. itraverseOf_: itraverseOf_
  26129. };
  26130. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Maybe.Last/index.js":"../output/Data.Maybe.Last/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Lens.Internal.Market/index.js":[function(require,module,exports) {
  26131. // Generated by purs version 0.13.6
  26132. "use strict";
  26133. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  26134. var Data_Either = require("../Data.Either/index.js");
  26135. var Data_Functor = require("../Data.Functor/index.js");
  26136. var Data_Profunctor = require("../Data.Profunctor/index.js");
  26137. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  26138. var Market = function () {
  26139. function Market(value0, value1) {
  26140. this.value0 = value0;
  26141. this.value1 = value1;
  26142. }
  26143. ;
  26144. Market.create = function (value0) {
  26145. return function (value1) {
  26146. return new Market(value0, value1);
  26147. };
  26148. };
  26149. return Market;
  26150. }();
  26151. var profunctorMarket = new Data_Profunctor.Profunctor(function (f) {
  26152. return function (g) {
  26153. return function (v) {
  26154. return new Market(function ($19) {
  26155. return g(v.value0($19));
  26156. }, function () {
  26157. var $20 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(g);
  26158. return function ($21) {
  26159. return $20(v.value1(f($21)));
  26160. };
  26161. }());
  26162. };
  26163. };
  26164. });
  26165. var functorMarket = new Data_Functor.Functor(function (f) {
  26166. return function (v) {
  26167. return new Market(function ($22) {
  26168. return f(v.value0($22));
  26169. }, function () {
  26170. var $23 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(f);
  26171. return function ($24) {
  26172. return $23(v.value1($24));
  26173. };
  26174. }());
  26175. };
  26176. });
  26177. var choiceMarket = new Data_Profunctor_Choice.Choice(function () {
  26178. return profunctorMarket;
  26179. }, function (v) {
  26180. return new Market(function ($25) {
  26181. return Data_Either.Left.create(v.value0($25));
  26182. }, Data_Either.either(function () {
  26183. var $26 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Left.create);
  26184. return function ($27) {
  26185. return $26(v.value1($27));
  26186. };
  26187. }())(function ($28) {
  26188. return Data_Either.Left.create(Data_Either.Right.create($28));
  26189. }));
  26190. }, function (v) {
  26191. return new Market(function ($29) {
  26192. return Data_Either.Right.create(v.value0($29));
  26193. }, Data_Either.either(function ($30) {
  26194. return Data_Either.Left.create(Data_Either.Left.create($30));
  26195. })(function () {
  26196. var $31 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Right.create);
  26197. return function ($32) {
  26198. return $31(v.value1($32));
  26199. };
  26200. }()));
  26201. });
  26202. module.exports = {
  26203. Market: Market,
  26204. functorMarket: functorMarket,
  26205. profunctorMarket: profunctorMarket,
  26206. choiceMarket: choiceMarket
  26207. };
  26208. },{"../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js"}],"../output/Data.Profunctor.Costrong/index.js":[function(require,module,exports) {
  26209. // Generated by purs version 0.13.6
  26210. "use strict";
  26211. var Costrong = function Costrong(Profunctor0, unfirst, unsecond) {
  26212. this.Profunctor0 = Profunctor0;
  26213. this.unfirst = unfirst;
  26214. this.unsecond = unsecond;
  26215. };
  26216. var unsecond = function unsecond(dict) {
  26217. return dict.unsecond;
  26218. };
  26219. var unfirst = function unfirst(dict) {
  26220. return dict.unfirst;
  26221. };
  26222. module.exports = {
  26223. unfirst: unfirst,
  26224. unsecond: unsecond,
  26225. Costrong: Costrong
  26226. };
  26227. },{}],"../output/Data.Lens.Internal.Tagged/index.js":[function(require,module,exports) {
  26228. // Generated by purs version 0.13.6
  26229. "use strict";
  26230. var Data_Either = require("../Data.Either/index.js");
  26231. var Data_Eq = require("../Data.Eq/index.js");
  26232. var Data_Foldable = require("../Data.Foldable/index.js");
  26233. var Data_Function = require("../Data.Function/index.js");
  26234. var Data_Functor = require("../Data.Functor/index.js");
  26235. var Data_Newtype = require("../Data.Newtype/index.js");
  26236. var Data_Ord = require("../Data.Ord/index.js");
  26237. var Data_Profunctor = require("../Data.Profunctor/index.js");
  26238. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  26239. var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js");
  26240. var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js");
  26241. var Data_Traversable = require("../Data.Traversable/index.js");
  26242. var Tagged = function Tagged(x) {
  26243. return x;
  26244. };
  26245. var taggedProfunctor = new Data_Profunctor.Profunctor(function (v) {
  26246. return function (g) {
  26247. return function (v1) {
  26248. return g(v1);
  26249. };
  26250. };
  26251. });
  26252. var taggedCostrong = new Data_Profunctor_Costrong.Costrong(function () {
  26253. return taggedProfunctor;
  26254. }, function (v) {
  26255. return v.value0;
  26256. }, function (v) {
  26257. return v.value1;
  26258. });
  26259. var taggedClosed = new Data_Profunctor_Closed.Closed(function () {
  26260. return taggedProfunctor;
  26261. }, function (v) {
  26262. return Data_Function["const"](v);
  26263. });
  26264. var taggedChoice = new Data_Profunctor_Choice.Choice(function () {
  26265. return taggedProfunctor;
  26266. }, function (v) {
  26267. return new Data_Either.Left(v);
  26268. }, function (v) {
  26269. return new Data_Either.Right(v);
  26270. });
  26271. var newtypeTagged = new Data_Newtype.Newtype(function (n) {
  26272. return n;
  26273. }, Tagged);
  26274. var functorTagged = new Data_Functor.Functor(function (f) {
  26275. return function (m) {
  26276. return f(m);
  26277. };
  26278. });
  26279. var foldableTagged = new Data_Foldable.Foldable(function (dictMonoid) {
  26280. return function (f) {
  26281. return function (v) {
  26282. return f(v);
  26283. };
  26284. };
  26285. }, function (f) {
  26286. return function (b) {
  26287. return function (v) {
  26288. return f(b)(v);
  26289. };
  26290. };
  26291. }, function (f) {
  26292. return function (b) {
  26293. return function (v) {
  26294. return f(v)(b);
  26295. };
  26296. };
  26297. });
  26298. var traversableTagged = new Data_Traversable.Traversable(function () {
  26299. return foldableTagged;
  26300. }, function () {
  26301. return functorTagged;
  26302. }, function (dictApplicative) {
  26303. return function (v) {
  26304. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(v);
  26305. };
  26306. }, function (dictApplicative) {
  26307. return function (f) {
  26308. return function (v) {
  26309. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(f(v));
  26310. };
  26311. };
  26312. });
  26313. var eqTagged = function eqTagged(dictEq) {
  26314. return new Data_Eq.Eq(function (x) {
  26315. return function (y) {
  26316. return Data_Eq.eq(dictEq)(x)(y);
  26317. };
  26318. });
  26319. };
  26320. var ordTagged = function ordTagged(dictOrd) {
  26321. return new Data_Ord.Ord(function () {
  26322. return eqTagged(dictOrd.Eq0());
  26323. }, function (x) {
  26324. return function (y) {
  26325. return Data_Ord.compare(dictOrd)(x)(y);
  26326. };
  26327. });
  26328. };
  26329. var eq1Tagged = new Data_Eq.Eq1(function (dictEq) {
  26330. return Data_Eq.eq(eqTagged(dictEq));
  26331. });
  26332. var ord1Tagged = new Data_Ord.Ord1(function () {
  26333. return eq1Tagged;
  26334. }, function (dictOrd) {
  26335. return Data_Ord.compare(ordTagged(dictOrd));
  26336. });
  26337. module.exports = {
  26338. Tagged: Tagged,
  26339. newtypeTagged: newtypeTagged,
  26340. eqTagged: eqTagged,
  26341. eq1Tagged: eq1Tagged,
  26342. ordTagged: ordTagged,
  26343. ord1Tagged: ord1Tagged,
  26344. functorTagged: functorTagged,
  26345. taggedProfunctor: taggedProfunctor,
  26346. taggedChoice: taggedChoice,
  26347. taggedCostrong: taggedCostrong,
  26348. taggedClosed: taggedClosed,
  26349. foldableTagged: foldableTagged,
  26350. traversableTagged: traversableTagged
  26351. };
  26352. },{"../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Closed/index.js":"../output/Data.Profunctor.Closed/index.js","../Data.Profunctor.Costrong/index.js":"../output/Data.Profunctor.Costrong/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Data.Lens.Prism/index.js":[function(require,module,exports) {
  26353. // Generated by purs version 0.13.6
  26354. "use strict";
  26355. var Control_Category = require("../Control.Category/index.js");
  26356. var Control_MonadZero = require("../Control.MonadZero/index.js");
  26357. var Data_Either = require("../Data.Either/index.js");
  26358. var Data_Eq = require("../Data.Eq/index.js");
  26359. var Data_Function = require("../Data.Function/index.js");
  26360. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  26361. var Data_Lens_Internal_Market = require("../Data.Lens.Internal.Market/index.js");
  26362. var Data_Lens_Internal_Tagged = require("../Data.Lens.Internal.Tagged/index.js");
  26363. var Data_Maybe = require("../Data.Maybe/index.js");
  26364. var Data_Newtype = require("../Data.Newtype/index.js");
  26365. var Data_Profunctor = require("../Data.Profunctor/index.js");
  26366. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  26367. var withPrism = function withPrism(l) {
  26368. return function (f) {
  26369. var v = l(new Data_Lens_Internal_Market.Market(Control_Category.identity(Control_Category.categoryFn), Data_Either.Right.create));
  26370. return f(v.value0)(v.value1);
  26371. };
  26372. };
  26373. var review = Data_Newtype.under(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.Tagged);
  26374. var prism = function prism(to) {
  26375. return function (fro) {
  26376. return function (dictChoice) {
  26377. return function (pab) {
  26378. return Data_Profunctor.dimap(dictChoice.Profunctor0())(fro)(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)))(Data_Profunctor_Choice.right(dictChoice)(Data_Profunctor.rmap(dictChoice.Profunctor0())(to)(pab)));
  26379. };
  26380. };
  26381. };
  26382. };
  26383. var prism$prime = function prism$prime(to) {
  26384. return function (fro) {
  26385. return function (dictChoice) {
  26386. return prism(to)(function (s) {
  26387. return Data_Maybe.maybe(new Data_Either.Left(s))(Data_Either.Right.create)(fro(s));
  26388. })(dictChoice);
  26389. };
  26390. };
  26391. };
  26392. var nearly = function nearly(x) {
  26393. return function (f) {
  26394. return function (dictChoice) {
  26395. return prism$prime(Data_Function["const"](x))(function () {
  26396. var $14 = Control_MonadZero.guard(Data_Maybe.monadZeroMaybe);
  26397. return function ($15) {
  26398. return $14(f($15));
  26399. };
  26400. }())(dictChoice);
  26401. };
  26402. };
  26403. };
  26404. var only = function only(dictEq) {
  26405. return function (x) {
  26406. return function (dictChoice) {
  26407. return nearly(x)(function (v) {
  26408. return Data_Eq.eq(dictEq)(v)(x);
  26409. })(dictChoice);
  26410. };
  26411. };
  26412. };
  26413. var matching = function matching(l) {
  26414. return withPrism(l)(function (v) {
  26415. return function (f) {
  26416. return f;
  26417. };
  26418. });
  26419. };
  26420. var is = function is(dictHeytingAlgebra) {
  26421. return function (l) {
  26422. var $16 = Data_Either.either(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)))(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra)));
  26423. var $17 = matching(l);
  26424. return function ($18) {
  26425. return $16($17($18));
  26426. };
  26427. };
  26428. };
  26429. var isn$primet = function isn$primet(dictHeytingAlgebra) {
  26430. return function (l) {
  26431. var $19 = Data_HeytingAlgebra.not(dictHeytingAlgebra);
  26432. var $20 = is(dictHeytingAlgebra)(l);
  26433. return function ($21) {
  26434. return $19($20($21));
  26435. };
  26436. };
  26437. };
  26438. var clonePrism = function clonePrism(l) {
  26439. return function (dictChoice) {
  26440. return withPrism(l)(function (x) {
  26441. return function (y) {
  26442. return function (p) {
  26443. return prism(x)(y)(dictChoice)(p);
  26444. };
  26445. };
  26446. });
  26447. };
  26448. };
  26449. module.exports = {
  26450. "prism'": prism$prime,
  26451. prism: prism,
  26452. only: only,
  26453. nearly: nearly,
  26454. review: review,
  26455. is: is,
  26456. "isn't": isn$primet,
  26457. matching: matching,
  26458. clonePrism: clonePrism,
  26459. withPrism: withPrism
  26460. };
  26461. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lens.Internal.Market/index.js":"../output/Data.Lens.Internal.Market/index.js","../Data.Lens.Internal.Tagged/index.js":"../output/Data.Lens.Internal.Tagged/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js"}],"../output/Data.Lens.Prism.Maybe/index.js":[function(require,module,exports) {
  26462. // Generated by purs version 0.13.6
  26463. "use strict";
  26464. var Data_Either = require("../Data.Either/index.js");
  26465. var Data_Function = require("../Data.Function/index.js");
  26466. var Data_Lens_Prism = require("../Data.Lens.Prism/index.js");
  26467. var Data_Maybe = require("../Data.Maybe/index.js");
  26468. var Data_Unit = require("../Data.Unit/index.js");
  26469. var _Nothing = function _Nothing(dictChoice) {
  26470. return Data_Lens_Prism.prism(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.maybe(new Data_Either.Right(Data_Unit.unit))(Data_Function["const"](new Data_Either.Left(Data_Maybe.Nothing.value))))(dictChoice);
  26471. };
  26472. var _Just = function _Just(dictChoice) {
  26473. return Data_Lens_Prism.prism(Data_Maybe.Just.create)(Data_Maybe.maybe(new Data_Either.Left(Data_Maybe.Nothing.value))(Data_Either.Right.create))(dictChoice);
  26474. };
  26475. module.exports = {
  26476. "_Nothing": _Nothing,
  26477. "_Just": _Just
  26478. };
  26479. },{"../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Lens.Prism/index.js":"../output/Data.Lens.Prism/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Lens.Setter/index.js":[function(require,module,exports) {
  26480. // Generated by purs version 0.13.6
  26481. "use strict";
  26482. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  26483. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  26484. var Data_Function = require("../Data.Function/index.js");
  26485. var Data_Functor = require("../Data.Functor/index.js");
  26486. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  26487. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  26488. var Data_Maybe = require("../Data.Maybe/index.js");
  26489. var Data_Ring = require("../Data.Ring/index.js");
  26490. var Data_Semigroup = require("../Data.Semigroup/index.js");
  26491. var Data_Semiring = require("../Data.Semiring/index.js");
  26492. var Data_Tuple = require("../Data.Tuple/index.js");
  26493. var over = function over(l) {
  26494. return l;
  26495. };
  26496. var set = function set(l) {
  26497. return function (b) {
  26498. return over(l)(Data_Function["const"](b));
  26499. };
  26500. };
  26501. var setJust = function setJust(p) {
  26502. var $24 = set(p);
  26503. return function ($25) {
  26504. return $24(Data_Maybe.Just.create($25));
  26505. };
  26506. };
  26507. var subOver = function subOver(dictRing) {
  26508. return function (p) {
  26509. var $26 = over(p);
  26510. var $27 = Data_Function.flip(Data_Ring.sub(dictRing));
  26511. return function ($28) {
  26512. return $26($27($28));
  26513. };
  26514. };
  26515. };
  26516. var mulOver = function mulOver(dictSemiring) {
  26517. return function (p) {
  26518. var $29 = over(p);
  26519. var $30 = Data_Function.flip(Data_Semiring.mul(dictSemiring));
  26520. return function ($31) {
  26521. return $29($30($31));
  26522. };
  26523. };
  26524. };
  26525. var modifying = function modifying(dictMonadState) {
  26526. return function (p) {
  26527. return function (f) {
  26528. return Data_Functor["void"](dictMonadState.Monad0().Bind1().Apply0().Functor0())(Control_Monad_State_Class.modify(dictMonadState)(over(p)(f)));
  26529. };
  26530. };
  26531. };
  26532. var mulModifying = function mulModifying(dictMonadState) {
  26533. return function (dictSemiring) {
  26534. return function (p) {
  26535. var $32 = modifying(dictMonadState)(p);
  26536. var $33 = Data_Function.flip(Data_Semiring.mul(dictSemiring));
  26537. return function ($34) {
  26538. return $32($33($34));
  26539. };
  26540. };
  26541. };
  26542. };
  26543. var subModifying = function subModifying(dictMonadState) {
  26544. return function (dictRing) {
  26545. return function (p) {
  26546. var $35 = modifying(dictMonadState)(p);
  26547. var $36 = Data_Function.flip(Data_Ring.sub(dictRing));
  26548. return function ($37) {
  26549. return $35($36($37));
  26550. };
  26551. };
  26552. };
  26553. };
  26554. var iover = function iover(l) {
  26555. return function (f) {
  26556. return l(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f)));
  26557. };
  26558. };
  26559. var divOver = function divOver(dictEuclideanRing) {
  26560. return function (p) {
  26561. var $38 = over(p);
  26562. var $39 = Data_Function.flip(Data_EuclideanRing.div(dictEuclideanRing));
  26563. return function ($40) {
  26564. return $38($39($40));
  26565. };
  26566. };
  26567. };
  26568. var divModifying = function divModifying(dictMonadState) {
  26569. return function (dictEuclideanRing) {
  26570. return function (p) {
  26571. var $41 = modifying(dictMonadState)(p);
  26572. var $42 = Data_Function.flip(Data_EuclideanRing.div(dictEuclideanRing));
  26573. return function ($43) {
  26574. return $41($42($43));
  26575. };
  26576. };
  26577. };
  26578. };
  26579. var disjOver = function disjOver(dictHeytingAlgebra) {
  26580. return function (p) {
  26581. var $44 = over(p);
  26582. var $45 = Data_Function.flip(Data_HeytingAlgebra.disj(dictHeytingAlgebra));
  26583. return function ($46) {
  26584. return $44($45($46));
  26585. };
  26586. };
  26587. };
  26588. var disjModifying = function disjModifying(dictMonadState) {
  26589. return function (dictHeytingAlgebra) {
  26590. return function (p) {
  26591. var $47 = modifying(dictMonadState)(p);
  26592. var $48 = Data_Function.flip(Data_HeytingAlgebra.disj(dictHeytingAlgebra));
  26593. return function ($49) {
  26594. return $47($48($49));
  26595. };
  26596. };
  26597. };
  26598. };
  26599. var conjOver = function conjOver(dictHeytingAlgebra) {
  26600. return function (p) {
  26601. var $50 = over(p);
  26602. var $51 = Data_Function.flip(Data_HeytingAlgebra.conj(dictHeytingAlgebra));
  26603. return function ($52) {
  26604. return $50($51($52));
  26605. };
  26606. };
  26607. };
  26608. var conjModifying = function conjModifying(dictMonadState) {
  26609. return function (dictHeytingAlgebra) {
  26610. return function (p) {
  26611. var $53 = modifying(dictMonadState)(p);
  26612. var $54 = Data_Function.flip(Data_HeytingAlgebra.conj(dictHeytingAlgebra));
  26613. return function ($55) {
  26614. return $53($54($55));
  26615. };
  26616. };
  26617. };
  26618. };
  26619. var assign = function assign(dictMonadState) {
  26620. return function (p) {
  26621. return function (b) {
  26622. return Data_Functor["void"](dictMonadState.Monad0().Bind1().Apply0().Functor0())(Control_Monad_State_Class.modify(dictMonadState)(set(p)(b)));
  26623. };
  26624. };
  26625. };
  26626. var assignJust = function assignJust(dictMonadState) {
  26627. return function (p) {
  26628. var $56 = assign(dictMonadState)(p);
  26629. return function ($57) {
  26630. return $56(Data_Maybe.Just.create($57));
  26631. };
  26632. };
  26633. };
  26634. var appendOver = function appendOver(dictSemigroup) {
  26635. return function (p) {
  26636. var $58 = over(p);
  26637. var $59 = Data_Function.flip(Data_Semigroup.append(dictSemigroup));
  26638. return function ($60) {
  26639. return $58($59($60));
  26640. };
  26641. };
  26642. };
  26643. var appendModifying = function appendModifying(dictMonadState) {
  26644. return function (dictSemigroup) {
  26645. return function (p) {
  26646. var $61 = modifying(dictMonadState)(p);
  26647. var $62 = Data_Function.flip(Data_Semigroup.append(dictSemigroup));
  26648. return function ($63) {
  26649. return $61($62($63));
  26650. };
  26651. };
  26652. };
  26653. };
  26654. var addOver = function addOver(dictSemiring) {
  26655. return function (p) {
  26656. var $64 = over(p);
  26657. var $65 = Data_Semiring.add(dictSemiring);
  26658. return function ($66) {
  26659. return $64($65($66));
  26660. };
  26661. };
  26662. };
  26663. var addModifying = function addModifying(dictMonadState) {
  26664. return function (dictSemiring) {
  26665. return function (p) {
  26666. var $67 = modifying(dictMonadState)(p);
  26667. var $68 = Data_Semiring.add(dictSemiring);
  26668. return function ($69) {
  26669. return $67($68($69));
  26670. };
  26671. };
  26672. };
  26673. };
  26674. module.exports = {
  26675. over: over,
  26676. iover: iover,
  26677. set: set,
  26678. addOver: addOver,
  26679. subOver: subOver,
  26680. mulOver: mulOver,
  26681. divOver: divOver,
  26682. disjOver: disjOver,
  26683. conjOver: conjOver,
  26684. appendOver: appendOver,
  26685. setJust: setJust,
  26686. assign: assign,
  26687. modifying: modifying,
  26688. addModifying: addModifying,
  26689. mulModifying: mulModifying,
  26690. subModifying: subModifying,
  26691. divModifying: divModifying,
  26692. disjModifying: disjModifying,
  26693. conjModifying: conjModifying,
  26694. appendModifying: appendModifying,
  26695. assignJust: assignJust
  26696. };
  26697. },{"../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Getter/index.js":[function(require,module,exports) {
  26698. // Generated by purs version 0.13.6
  26699. "use strict";
  26700. var Control_Category = require("../Control.Category/index.js");
  26701. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  26702. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  26703. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  26704. var Data_Newtype = require("../Data.Newtype/index.js");
  26705. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  26706. var view = function view(l) {
  26707. return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Control_Category.identity(Control_Category.categoryFn)));
  26708. };
  26709. var viewOn = function viewOn(s) {
  26710. return function (l) {
  26711. return view(l)(s);
  26712. };
  26713. };
  26714. var use = function use(dictMonadState) {
  26715. return function (p) {
  26716. return Control_Monad_State_Class.gets(dictMonadState)(function (v) {
  26717. return viewOn(v)(p);
  26718. });
  26719. };
  26720. };
  26721. var to = function to(f) {
  26722. return function (p) {
  26723. var $3 = Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p);
  26724. return function ($4) {
  26725. return $3(f($4));
  26726. };
  26727. };
  26728. };
  26729. var takeBoth = function takeBoth(l) {
  26730. return function (r) {
  26731. return to(Data_Profunctor_Strong.fanout(Control_Category.categoryFn)(Data_Profunctor_Strong.strongFn)(view(l))(view(r)));
  26732. };
  26733. };
  26734. var iview = function iview(l) {
  26735. return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Data_Lens_Internal_Indexed.Indexed(Control_Category.identity(Control_Category.categoryFn))));
  26736. };
  26737. var iuse = function iuse(dictMonadState) {
  26738. return function (p) {
  26739. return Control_Monad_State_Class.gets(dictMonadState)(iview(p));
  26740. };
  26741. };
  26742. var cloneGetter = function cloneGetter(g) {
  26743. return to(view(g));
  26744. };
  26745. module.exports = {
  26746. viewOn: viewOn,
  26747. view: view,
  26748. to: to,
  26749. takeBoth: takeBoth,
  26750. use: use,
  26751. iview: iview,
  26752. iuse: iuse,
  26753. cloneGetter: cloneGetter
  26754. };
  26755. },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js"}],"../output/Data.Lens.Record/index.js":[function(require,module,exports) {
  26756. // Generated by purs version 0.13.6
  26757. "use strict";
  26758. var Data_Function = require("../Data.Function/index.js");
  26759. var Data_Lens_Lens = require("../Data.Lens.Lens/index.js");
  26760. var Record = require("../Record/index.js");
  26761. var prop = function prop(dictIsSymbol) {
  26762. return function (dictCons) {
  26763. return function (dictCons1) {
  26764. return function (l) {
  26765. return function (dictStrong) {
  26766. return Data_Lens_Lens.lens(Record.get(dictIsSymbol)()(l))(Data_Function.flip(Record.set(dictIsSymbol)()()(l)))(dictStrong);
  26767. };
  26768. };
  26769. };
  26770. };
  26771. };
  26772. module.exports = {
  26773. prop: prop
  26774. };
  26775. },{"../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Lens.Lens/index.js":"../output/Data.Lens.Lens/index.js","../Record/index.js":"../output/Record/index.js"}],"../output/PureTabs.Model/index.js":[function(require,module,exports) {
  26776. // Generated by purs version 0.13.6
  26777. "use strict";
  26778. var Browser_Tabs = require("../Browser.Tabs/index.js");
  26779. var Data_Functor = require("../Data.Functor/index.js");
  26780. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  26781. var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js");
  26782. var Data_Lens_At = require("../Data.Lens.At/index.js");
  26783. var Data_Lens_Getter = require("../Data.Lens.Getter/index.js");
  26784. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  26785. var Data_Lens_Prism_Maybe = require("../Data.Lens.Prism.Maybe/index.js");
  26786. var Data_Lens_Record = require("../Data.Lens.Record/index.js");
  26787. var Data_List = require("../Data.List/index.js");
  26788. var Data_List_Types = require("../Data.List.Types/index.js");
  26789. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  26790. var Data_Newtype = require("../Data.Newtype/index.js");
  26791. var Data_Show = require("../Data.Show/index.js");
  26792. var Data_Symbol = require("../Data.Symbol/index.js");
  26793. var SbTabDeleted = function () {
  26794. function SbTabDeleted(value0) {
  26795. this.value0 = value0;
  26796. }
  26797. ;
  26798. SbTabDeleted.create = function (value0) {
  26799. return new SbTabDeleted(value0);
  26800. };
  26801. return SbTabDeleted;
  26802. }();
  26803. var SbTabCreated = function () {
  26804. function SbTabCreated() {}
  26805. ;
  26806. SbTabCreated.value = new SbTabCreated();
  26807. return SbTabCreated;
  26808. }();
  26809. var SbTabMoved = function () {
  26810. function SbTabMoved() {}
  26811. ;
  26812. SbTabMoved.value = new SbTabMoved();
  26813. return SbTabMoved;
  26814. }();
  26815. var SbTabDetached = function () {
  26816. function SbTabDetached() {}
  26817. ;
  26818. SbTabDetached.value = new SbTabDetached();
  26819. return SbTabDetached;
  26820. }();
  26821. var SbGroupCreated = function () {
  26822. function SbGroupCreated() {}
  26823. ;
  26824. SbGroupCreated.value = new SbGroupCreated();
  26825. return SbGroupCreated;
  26826. }();
  26827. var SbGroupDeleted = function () {
  26828. function SbGroupDeleted() {}
  26829. ;
  26830. SbGroupDeleted.value = new SbGroupDeleted();
  26831. return SbGroupDeleted;
  26832. }();
  26833. var SbGroupRenamed = function () {
  26834. function SbGroupRenamed() {}
  26835. ;
  26836. SbGroupRenamed.value = new SbGroupRenamed();
  26837. return SbGroupRenamed;
  26838. }();
  26839. var SbHasWindowId = function () {
  26840. function SbHasWindowId(value0) {
  26841. this.value0 = value0;
  26842. }
  26843. ;
  26844. SbHasWindowId.create = function (value0) {
  26845. return new SbHasWindowId(value0);
  26846. };
  26847. return SbHasWindowId;
  26848. }();
  26849. var BgTabCreated = function () {
  26850. function BgTabCreated(value0) {
  26851. this.value0 = value0;
  26852. }
  26853. ;
  26854. BgTabCreated.create = function (value0) {
  26855. return new BgTabCreated(value0);
  26856. };
  26857. return BgTabCreated;
  26858. }();
  26859. var BgTabDeleted = function () {
  26860. function BgTabDeleted(value0) {
  26861. this.value0 = value0;
  26862. }
  26863. ;
  26864. BgTabDeleted.create = function (value0) {
  26865. return new BgTabDeleted(value0);
  26866. };
  26867. return BgTabDeleted;
  26868. }();
  26869. var BgTabMoved = function () {
  26870. function BgTabMoved() {}
  26871. ;
  26872. BgTabMoved.value = new BgTabMoved();
  26873. return BgTabMoved;
  26874. }();
  26875. var BgTabActived = function () {
  26876. function BgTabActived(value0) {
  26877. this.value0 = value0;
  26878. }
  26879. ;
  26880. BgTabActived.create = function (value0) {
  26881. return new BgTabActived(value0);
  26882. };
  26883. return BgTabActived;
  26884. }();
  26885. var BgTabAttached = function () {
  26886. function BgTabAttached(value0) {
  26887. this.value0 = value0;
  26888. }
  26889. ;
  26890. BgTabAttached.create = function (value0) {
  26891. return new BgTabAttached(value0);
  26892. };
  26893. return BgTabAttached;
  26894. }();
  26895. var BgTabDetached = function () {
  26896. function BgTabDetached(value0) {
  26897. this.value0 = value0;
  26898. }
  26899. ;
  26900. BgTabDetached.create = function (value0) {
  26901. return new BgTabDetached(value0);
  26902. };
  26903. return BgTabDetached;
  26904. }();
  26905. var BgTabHighlighted = function () {
  26906. function BgTabHighlighted() {}
  26907. ;
  26908. BgTabHighlighted.value = new BgTabHighlighted();
  26909. return BgTabHighlighted;
  26910. }();
  26911. var BgTabReplaced = function () {
  26912. function BgTabReplaced() {}
  26913. ;
  26914. BgTabReplaced.value = new BgTabReplaced();
  26915. return BgTabReplaced;
  26916. }();
  26917. var BgTabZoomChanged = function () {
  26918. function BgTabZoomChanged() {}
  26919. ;
  26920. BgTabZoomChanged.value = new BgTabZoomChanged();
  26921. return BgTabZoomChanged;
  26922. }();
  26923. var initialGlobalState = {
  26924. windows: Data_Map_Internal.empty
  26925. };
  26926. var genSidebarEvent = new Data_Generic_Rep.Generic(function (x) {
  26927. if (x instanceof SbTabDeleted) {
  26928. return new Data_Generic_Rep.Inl(x.value0);
  26929. }
  26930. ;
  26931. if (x instanceof SbTabCreated) {
  26932. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value));
  26933. }
  26934. ;
  26935. if (x instanceof SbTabMoved) {
  26936. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)));
  26937. }
  26938. ;
  26939. if (x instanceof SbTabDetached) {
  26940. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))));
  26941. }
  26942. ;
  26943. if (x instanceof SbGroupCreated) {
  26944. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))));
  26945. }
  26946. ;
  26947. if (x instanceof SbGroupDeleted) {
  26948. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))))));
  26949. }
  26950. ;
  26951. if (x instanceof SbGroupRenamed) {
  26952. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))))));
  26953. }
  26954. ;
  26955. if (x instanceof SbHasWindowId) {
  26956. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(x.value0)))))));
  26957. }
  26958. ;
  26959. throw new Error("Failed pattern match at PureTabs.Model (line 104, column 1 - line 104, column 58): " + [x.constructor.name]);
  26960. }, function (x) {
  26961. if (x instanceof Data_Generic_Rep.Inl) {
  26962. return new SbTabDeleted(x.value0);
  26963. }
  26964. ;
  26965. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
  26966. return SbTabCreated.value;
  26967. }
  26968. ;
  26969. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) {
  26970. return SbTabMoved.value;
  26971. }
  26972. ;
  26973. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  26974. return SbTabDetached.value;
  26975. }
  26976. ;
  26977. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  26978. return SbGroupCreated.value;
  26979. }
  26980. ;
  26981. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  26982. return SbGroupDeleted.value;
  26983. }
  26984. ;
  26985. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  26986. return SbGroupRenamed.value;
  26987. }
  26988. ;
  26989. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr) {
  26990. return new SbHasWindowId(x.value0.value0.value0.value0.value0.value0.value0);
  26991. }
  26992. ;
  26993. throw new Error("Failed pattern match at PureTabs.Model (line 104, column 1 - line 104, column 58): " + [x.constructor.name]);
  26994. });
  26995. var showSidebarEvent = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genSidebarEvent)(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  26996. return "SbTabDeleted";
  26997. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  26998. return "SbTabCreated";
  26999. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27000. return "SbTabMoved";
  27001. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27002. return "SbTabDetached";
  27003. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27004. return "SbGroupCreated";
  27005. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27006. return "SbGroupDeleted";
  27007. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27008. return "SbGroupRenamed";
  27009. })))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showWindowId))(new Data_Symbol.IsSymbol(function () {
  27010. return "SbHasWindowId";
  27011. })))))))))));
  27012. var genBackgroundEvent = new Data_Generic_Rep.Generic(function (x) {
  27013. if (x instanceof BgTabCreated) {
  27014. return new Data_Generic_Rep.Inl(x.value0);
  27015. }
  27016. ;
  27017. if (x instanceof BgTabDeleted) {
  27018. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0));
  27019. }
  27020. ;
  27021. if (x instanceof BgTabMoved) {
  27022. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)));
  27023. }
  27024. ;
  27025. if (x instanceof BgTabActived) {
  27026. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0))));
  27027. }
  27028. ;
  27029. if (x instanceof BgTabAttached) {
  27030. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)))));
  27031. }
  27032. ;
  27033. if (x instanceof BgTabDetached) {
  27034. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0))))));
  27035. }
  27036. ;
  27037. if (x instanceof BgTabHighlighted) {
  27038. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))))));
  27039. }
  27040. ;
  27041. if (x instanceof BgTabReplaced) {
  27042. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))))))));
  27043. }
  27044. ;
  27045. if (x instanceof BgTabZoomChanged) {
  27046. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(Data_Generic_Rep.NoArguments.value))))))));
  27047. }
  27048. ;
  27049. throw new Error("Failed pattern match at PureTabs.Model (line 89, column 1 - line 89, column 64): " + [x.constructor.name]);
  27050. }, function (x) {
  27051. if (x instanceof Data_Generic_Rep.Inl) {
  27052. return new BgTabCreated(x.value0);
  27053. }
  27054. ;
  27055. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
  27056. return new BgTabDeleted(x.value0.value0);
  27057. }
  27058. ;
  27059. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) {
  27060. return BgTabMoved.value;
  27061. }
  27062. ;
  27063. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  27064. return new BgTabActived(x.value0.value0.value0.value0);
  27065. }
  27066. ;
  27067. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  27068. return new BgTabAttached(x.value0.value0.value0.value0.value0);
  27069. }
  27070. ;
  27071. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  27072. return new BgTabDetached(x.value0.value0.value0.value0.value0.value0);
  27073. }
  27074. ;
  27075. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  27076. return BgTabHighlighted.value;
  27077. }
  27078. ;
  27079. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  27080. return BgTabReplaced.value;
  27081. }
  27082. ;
  27083. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr) {
  27084. return BgTabZoomChanged.value;
  27085. }
  27086. ;
  27087. throw new Error("Failed pattern match at PureTabs.Model (line 89, column 1 - line 89, column 64): " + [x.constructor.name]);
  27088. });
  27089. var showBackgroundEvent = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genBackgroundEvent)(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTab))(new Data_Symbol.IsSymbol(function () {
  27090. return "BgTabCreated";
  27091. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  27092. return "BgTabDeleted";
  27093. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27094. return "BgTabMoved";
  27095. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  27096. return "BgTabActived";
  27097. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTab))(new Data_Symbol.IsSymbol(function () {
  27098. return "BgTabAttached";
  27099. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  27100. return "BgTabDetached";
  27101. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27102. return "BgTabHighlighted";
  27103. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27104. return "BgTabReplaced";
  27105. })))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  27106. return "BgTabZoomChanged";
  27107. }))))))))))));
  27108. var _windows = function _windows(dictStrong) {
  27109. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  27110. return "windows";
  27111. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  27112. };
  27113. var _tabs = function _tabs(dictStrong) {
  27114. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  27115. return "tabs";
  27116. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  27117. };
  27118. var _tabFromWindow = function _tabFromWindow(tab$prime) {
  27119. return function (dictWander) {
  27120. var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
  27121. var $104 = _windows(dictWander.Strong0());
  27122. var $105 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
  27123. var $106 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
  27124. var $107 = _tabs(dictWander.Strong0());
  27125. var $108 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordTabId))(tab.id)(dictWander.Strong0());
  27126. return function ($109) {
  27127. return $104($105($106($107($108($109)))));
  27128. };
  27129. };
  27130. };
  27131. var _tabFromTabIdAndWindow = function _tabFromTabIdAndWindow(s) {
  27132. return function (tabId) {
  27133. var allWindows = Data_Map_Internal.values(s.windows);
  27134. var allTabs = Data_Functor.map(Data_List_Types.functorList)(Data_Lens_Getter.view(_tabs(Data_Lens_Internal_Forget.strongForget)))(allWindows);
  27135. var matchingTabId = Data_Functor.map(Data_List_Types.functorList)(Data_Map_Internal.lookup(Browser_Tabs.ordTabId)(tabId))(allTabs);
  27136. return Data_List.catMaybes(matchingTabId);
  27137. };
  27138. };
  27139. var _port = function _port(dictStrong) {
  27140. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  27141. return "port";
  27142. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  27143. };
  27144. var _portFromWindow = function _portFromWindow(tab$prime) {
  27145. return function (dictWander) {
  27146. var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
  27147. var $110 = _windows(dictWander.Strong0());
  27148. var $111 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
  27149. var $112 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
  27150. var $113 = _port(dictWander.Strong0());
  27151. var $114 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
  27152. return function ($115) {
  27153. return $110($111($112($113($114($115)))));
  27154. };
  27155. };
  27156. };
  27157. module.exports = {
  27158. "_tabs": _tabs,
  27159. "_port": _port,
  27160. "_windows": _windows,
  27161. "_portFromWindow": _portFromWindow,
  27162. "_tabFromWindow": _tabFromWindow,
  27163. "_tabFromTabIdAndWindow": _tabFromTabIdAndWindow,
  27164. initialGlobalState: initialGlobalState,
  27165. BgTabCreated: BgTabCreated,
  27166. BgTabDeleted: BgTabDeleted,
  27167. BgTabMoved: BgTabMoved,
  27168. BgTabActived: BgTabActived,
  27169. BgTabAttached: BgTabAttached,
  27170. BgTabDetached: BgTabDetached,
  27171. BgTabHighlighted: BgTabHighlighted,
  27172. BgTabReplaced: BgTabReplaced,
  27173. BgTabZoomChanged: BgTabZoomChanged,
  27174. SbTabDeleted: SbTabDeleted,
  27175. SbTabCreated: SbTabCreated,
  27176. SbTabMoved: SbTabMoved,
  27177. SbTabDetached: SbTabDetached,
  27178. SbGroupCreated: SbGroupCreated,
  27179. SbGroupDeleted: SbGroupDeleted,
  27180. SbGroupRenamed: SbGroupRenamed,
  27181. SbHasWindowId: SbHasWindowId,
  27182. genBackgroundEvent: genBackgroundEvent,
  27183. showBackgroundEvent: showBackgroundEvent,
  27184. genSidebarEvent: genSidebarEvent,
  27185. showSidebarEvent: showSidebarEvent
  27186. };
  27187. },{"../Browser.Tabs/index.js":"../output/Browser.Tabs/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Generic.Rep.Show/index.js":"../output/Data.Generic.Rep.Show/index.js","../Data.Lens.At/index.js":"../output/Data.Lens.At/index.js","../Data.Lens.Getter/index.js":"../output/Data.Lens.Getter/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Prism.Maybe/index.js":"../output/Data.Lens.Prism.Maybe/index.js","../Data.Lens.Record/index.js":"../output/Data.Lens.Record/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js"}],"../output/PureTabs.Background/index.js":[function(require,module,exports) {
  27188. "use strict";
  27189. var Browser_Runtime = require("../Browser.Runtime/index.js");
  27190. var Browser_Tabs = require("../Browser.Tabs/index.js");
  27191. var Browser_Tabs_OnCreated = require("../Browser.Tabs.OnCreated/index.js");
  27192. var Browser_Tabs_OnRemoved = require("../Browser.Tabs.OnRemoved/index.js");
  27193. var Browser_Utils = require("../Browser.Utils/index.js");
  27194. var Control_Applicative = require("../Control.Applicative/index.js");
  27195. var Control_Apply = require("../Control.Apply/index.js");
  27196. var Data_Foldable = require("../Data.Foldable/index.js");
  27197. var Data_Function = require("../Data.Function/index.js");
  27198. var Data_Lens_At = require("../Data.Lens.At/index.js");
  27199. var Data_Lens_Fold = require("../Data.Lens.Fold/index.js");
  27200. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  27201. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  27202. var Data_Lens_Prism_Maybe = require("../Data.Lens.Prism.Maybe/index.js");
  27203. var Data_Lens_Setter = require("../Data.Lens.Setter/index.js");
  27204. var Data_List_Types = require("../Data.List.Types/index.js");
  27205. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  27206. var Data_Maybe = require("../Data.Maybe/index.js");
  27207. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  27208. var Data_Monoid = require("../Data.Monoid/index.js");
  27209. var Data_Newtype = require("../Data.Newtype/index.js");
  27210. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  27211. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  27212. var Data_Show = require("../Data.Show/index.js");
  27213. var Data_Symbol = require("../Data.Symbol/index.js");
  27214. var Data_Unit = require("../Data.Unit/index.js");
  27215. var Effect = require("../Effect/index.js");
  27216. var Effect_Console = require("../Effect.Console/index.js");
  27217. var Effect_Ref = require("../Effect.Ref/index.js");
  27218. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  27219. var PureTabs_Model = require("../PureTabs.Model/index.js");
  27220. var onTabDeleted = function onTabDeleted(stateRef) {
  27221. return function (tabId) {
  27222. return function (info) {
  27223. return function __do() {
  27224. var state = Effect_Ref.read(stateRef)();
  27225. var allTabs = PureTabs_Model["_tabFromTabIdAndWindow"](state)(tabId);
  27226. var newState = Data_Foldable.foldr(Data_List_Types.foldableList)(function (t) {
  27227. return Data_Lens_Setter.set(PureTabs_Model["_tabFromWindow"](t)(Data_Lens_Internal_Wander.wanderFunction))(Data_Maybe.Nothing.value);
  27228. })(state)(allTabs);
  27229. Effect_Ref.write(newState)(stateRef)();
  27230. return Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(allTabs)(function (t) {
  27231. var port = Data_Lens_Fold.preview(PureTabs_Model["_portFromWindow"](t)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)))(state);
  27232. return Data_Maybe.maybe(Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit))(Data_Function.flip(Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27233. return "BgTabCreated";
  27234. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27235. return "BgTabDeleted";
  27236. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27237. return "BgTabMoved";
  27238. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27239. return "BgTabActived";
  27240. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27241. return "BgTabAttached";
  27242. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27243. return "BgTabDetached";
  27244. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27245. return "BgTabHighlighted";
  27246. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27247. return "BgTabReplaced";
  27248. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27249. return "BgTabZoomChanged";
  27250. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments)))))))))))(new PureTabs_Model.BgTabDeleted(tabId)))(port);
  27251. })();
  27252. };
  27253. };
  27254. };
  27255. }; // port on connect
  27256. // created tab
  27257. var onTabCreated = function onTabCreated(stateRef) {
  27258. return function (tab$prime) {
  27259. var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
  27260. return function __do() {
  27261. var state = Effect_Ref.modify(Data_Lens_Setter.set(PureTabs_Model["_tabFromWindow"](tab$prime)(Data_Lens_Internal_Wander.wanderFunction))(new Data_Maybe.Just(tab$prime)))(stateRef)();
  27262. Effect_Console.log("tabId: " + (Data_Show.show(Browser_Tabs.showTabId)(tab.id) + (" windowId " + Data_Show.show(Browser_Tabs.showWindowId)(tab.windowId))))();
  27263. var v = Data_Lens_Fold.preview(PureTabs_Model["_portFromWindow"](tab$prime)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)))(state);
  27264. if (v instanceof Data_Maybe.Nothing) {
  27265. return Data_Unit.unit;
  27266. }
  27267. ;
  27268. if (v instanceof Data_Maybe.Just) {
  27269. Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27270. return "BgTabCreated";
  27271. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27272. return "BgTabDeleted";
  27273. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27274. return "BgTabMoved";
  27275. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27276. return "BgTabActived";
  27277. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27278. return "BgTabAttached";
  27279. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27280. return "BgTabDetached";
  27281. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27282. return "BgTabHighlighted";
  27283. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27284. return "BgTabReplaced";
  27285. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  27286. return "BgTabZoomChanged";
  27287. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))))))))))(v.value0)(new PureTabs_Model.BgTabCreated(tab$prime))();
  27288. return Effect_Console.log("tab " + (Data_Show.show(Browser_Tabs.showTabId)(tab.id) + (" created: " + tab.title)))();
  27289. }
  27290. ;
  27291. throw new Error("Failed pattern match at PureTabs.Background (line 57, column 3 - line 61, column 65): " + [v.constructor.name]);
  27292. };
  27293. };
  27294. };
  27295. var onDisconnect = function onDisconnect(stateRef) {
  27296. return function (winId) {
  27297. return function (listener) {
  27298. return Effect_Ref.modify_(Data_Lens_Setter.set(function () {
  27299. var $8 = PureTabs_Model["_windows"](Data_Profunctor_Strong.strongFn);
  27300. var $9 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(winId)(Data_Profunctor_Strong.strongFn);
  27301. var $10 = Data_Lens_Prism_Maybe["_Just"](Data_Profunctor_Choice.choiceFn);
  27302. var $11 = PureTabs_Model["_port"](Data_Profunctor_Strong.strongFn);
  27303. return function ($12) {
  27304. return $8($9($10($11($12))));
  27305. };
  27306. }())(Data_Maybe.Nothing.value))(stateRef);
  27307. };
  27308. };
  27309. }; // TODO don't pass the full ref, but only a set of function to manipulate/access
  27310. // the data required
  27311. var manageSidebar = function manageSidebar(stateRef) {
  27312. return function (port) {
  27313. return function (msg) {
  27314. return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
  27315. };
  27316. };
  27317. };
  27318. var onConnect = function onConnect(stateRef) {
  27319. return function (port) {
  27320. var windowListener = function windowListener(callback) {
  27321. return function (msg) {
  27322. if (msg instanceof PureTabs_Model.SbHasWindowId) {
  27323. return Control_Apply.applySecond(Effect.applyEffect)(Effect_Console.log("bg: created winId " + Data_Show.show(Browser_Tabs.showWindowId)(msg.value0)))(callback(msg.value0));
  27324. }
  27325. ;
  27326. return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
  27327. };
  27328. };
  27329. var onNewWindowId = function onNewWindowId(listenerRef) {
  27330. return function (winId) {
  27331. var winLens = function () {
  27332. var $13 = PureTabs_Model["_windows"](Data_Profunctor_Strong.strongFn);
  27333. var $14 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(winId)(Data_Profunctor_Strong.strongFn);
  27334. return function ($15) {
  27335. return $13($14($15));
  27336. };
  27337. }();
  27338. return function __do() {
  27339. Data_Function.flip(Effect_Ref.modify_)(stateRef)(Data_Lens_Setter.over(winLens)(function (v) {
  27340. if (v instanceof Data_Maybe.Nothing) {
  27341. return Data_Maybe.Just.create({
  27342. tabs: Data_Map_Internal.empty,
  27343. port: new Data_Maybe.Just(port)
  27344. });
  27345. }
  27346. ;
  27347. if (v instanceof Data_Maybe.Just) {
  27348. return Data_Maybe.Just.create(Data_Lens_Setter.set(PureTabs_Model["_port"](Data_Profunctor_Strong.strongFn))(new Data_Maybe.Just(port))(v.value0));
  27349. }
  27350. ;
  27351. throw new Error("Failed pattern match at PureTabs.Background (line 100, column 17 - line 102, column 63): " + [v.constructor.name]);
  27352. }))();
  27353. var r = Effect_Ref.read(stateRef)();
  27354. var ogListener = Effect_Ref.read(listenerRef)();
  27355. Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(Effect.monoidEffect(Data_Monoid.monoidUnit))(function (l) {
  27356. return Browser_Runtime.onMessageRemoveListener(port)(l);
  27357. })(ogListener)();
  27358. Effect_Ref.write(Data_Maybe.Nothing.value)(listenerRef)();
  27359. var sidebarListener = Browser_Runtime.onMessageJsonAddListener(PureTabs_Model.genSidebarEvent)(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27360. return "SbTabDeleted";
  27361. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId)))(Foreign_Generic_Class.genericCountArgsArgument))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27362. return "SbTabCreated";
  27363. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27364. return "SbTabMoved";
  27365. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27366. return "SbTabDetached";
  27367. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27368. return "SbGroupCreated";
  27369. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27370. return "SbGroupDeleted";
  27371. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27372. return "SbGroupRenamed";
  27373. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27374. return "SbHasWindowId";
  27375. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId)))(Foreign_Generic_Class.genericCountArgsArgument)))))))))(port)(manageSidebar(stateRef)(port))();
  27376. var onDisconnectListener = Browser_Utils.mkListenerUnit(onDisconnect(stateRef)(winId)(sidebarListener))();
  27377. return Browser_Runtime.portOnDisconnect(port)(onDisconnectListener)();
  27378. };
  27379. };
  27380. };
  27381. return function __do() {
  27382. var listenerRef = Effect_Ref["new"](Data_Maybe.Nothing.value)();
  27383. var initialListener = Browser_Runtime.onMessageJsonAddListener(PureTabs_Model.genSidebarEvent)(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27384. return "SbTabDeleted";
  27385. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId)))(Foreign_Generic_Class.genericCountArgsArgument))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27386. return "SbTabCreated";
  27387. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27388. return "SbTabMoved";
  27389. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27390. return "SbTabDetached";
  27391. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27392. return "SbGroupCreated";
  27393. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27394. return "SbGroupDeleted";
  27395. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27396. return "SbGroupRenamed";
  27397. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  27398. return "SbHasWindowId";
  27399. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId)))(Foreign_Generic_Class.genericCountArgsArgument)))))))))(port)(windowListener(onNewWindowId(listenerRef)))();
  27400. return Effect_Ref.write(new Data_Maybe.Just(initialListener))(listenerRef)();
  27401. };
  27402. };
  27403. };
  27404. var initializeBackground = function initializeBackground(ref) {
  27405. return function __do() {
  27406. Browser_Tabs_OnCreated.addListener(onTabCreated(ref))();
  27407. var tabDeletedListener = Browser_Utils.mkListenerTwo(onTabDeleted(ref))();
  27408. Browser_Tabs_OnRemoved.addListener(tabDeletedListener)();
  27409. var onConnectedListener = Browser_Utils.mkListenerOne(onConnect(ref))();
  27410. Browser_Runtime.onConnectAddListener(onConnectedListener)();
  27411. return Data_Unit.unit;
  27412. };
  27413. };
  27414. var main = function __do() {
  27415. Effect_Console.log("starting background")();
  27416. var state = Effect_Ref["new"](PureTabs_Model.initialGlobalState)();
  27417. initializeBackground(state)();
  27418. return Effect_Console.log("all listener initialized")();
  27419. };
  27420. module.exports = {
  27421. main: main,
  27422. initializeBackground: initializeBackground,
  27423. onTabCreated: onTabCreated,
  27424. onTabDeleted: onTabDeleted,
  27425. onConnect: onConnect,
  27426. manageSidebar: manageSidebar,
  27427. onDisconnect: onDisconnect
  27428. };
  27429. },{"../Browser.Runtime/index.js":"../output/Browser.Runtime/index.js","../Browser.Tabs/index.js":"../output/Browser.Tabs/index.js","../Browser.Tabs.OnCreated/index.js":"../output/Browser.Tabs.OnCreated/index.js","../Browser.Tabs.OnRemoved/index.js":"../output/Browser.Tabs.OnRemoved/index.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Lens.At/index.js":"../output/Data.Lens.At/index.js","../Data.Lens.Fold/index.js":"../output/Data.Lens.Fold/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.Lens.Prism.Maybe/index.js":"../output/Data.Lens.Prism.Maybe/index.js","../Data.Lens.Setter/index.js":"../output/Data.Lens.Setter/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Console/index.js":"../output/Effect.Console/index.js","../Effect.Ref/index.js":"../output/Effect.Ref/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js","../PureTabs.Model/index.js":"../output/PureTabs.Model/index.js"}],"background.js":[function(require,module,exports) {
  27430. var Background = require("../output/PureTabs.Background");
  27431. function main() {
  27432. Background.main();
  27433. }
  27434. main();
  27435. },{"../output/PureTabs.Background":"../output/PureTabs.Background/index.js"}],"../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
  27436. var global = arguments[3];
  27437. var OVERLAY_ID = '__parcel__error__overlay__';
  27438. var OldModule = module.bundle.Module;
  27439. function Module(moduleName) {
  27440. OldModule.call(this, moduleName);
  27441. this.hot = {
  27442. data: module.bundle.hotData,
  27443. _acceptCallbacks: [],
  27444. _disposeCallbacks: [],
  27445. accept: function (fn) {
  27446. this._acceptCallbacks.push(fn || function () {});
  27447. },
  27448. dispose: function (fn) {
  27449. this._disposeCallbacks.push(fn);
  27450. }
  27451. };
  27452. module.bundle.hotData = null;
  27453. }
  27454. module.bundle.Module = Module;
  27455. var checkedAssets, assetsToAccept;
  27456. var parent = module.bundle.parent;
  27457. if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
  27458. var hostname = "" || location.hostname;
  27459. var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
  27460. var ws = new WebSocket(protocol + '://' + hostname + ':' + "40959" + '/');
  27461. ws.onmessage = function (event) {
  27462. checkedAssets = {};
  27463. assetsToAccept = [];
  27464. var data = JSON.parse(event.data);
  27465. if (data.type === 'update') {
  27466. var handled = false;
  27467. data.assets.forEach(function (asset) {
  27468. if (!asset.isNew) {
  27469. var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
  27470. if (didAccept) {
  27471. handled = true;
  27472. }
  27473. }
  27474. }); // Enable HMR for CSS by default.
  27475. handled = handled || data.assets.every(function (asset) {
  27476. return asset.type === 'css' && asset.generated.js;
  27477. });
  27478. if (handled) {
  27479. console.clear();
  27480. data.assets.forEach(function (asset) {
  27481. hmrApply(global.parcelRequire, asset);
  27482. });
  27483. assetsToAccept.forEach(function (v) {
  27484. hmrAcceptRun(v[0], v[1]);
  27485. });
  27486. } else if (location.reload) {
  27487. // `location` global exists in a web worker context but lacks `.reload()` function.
  27488. location.reload();
  27489. }
  27490. }
  27491. if (data.type === 'reload') {
  27492. ws.close();
  27493. ws.onclose = function () {
  27494. location.reload();
  27495. };
  27496. }
  27497. if (data.type === 'error-resolved') {
  27498. console.log('[parcel] ✨ Error resolved');
  27499. removeErrorOverlay();
  27500. }
  27501. if (data.type === 'error') {
  27502. console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
  27503. removeErrorOverlay();
  27504. var overlay = createErrorOverlay(data);
  27505. document.body.appendChild(overlay);
  27506. }
  27507. };
  27508. }
  27509. function removeErrorOverlay() {
  27510. var overlay = document.getElementById(OVERLAY_ID);
  27511. if (overlay) {
  27512. overlay.remove();
  27513. }
  27514. }
  27515. function createErrorOverlay(data) {
  27516. var overlay = document.createElement('div');
  27517. overlay.id = OVERLAY_ID; // html encode message and stack trace
  27518. var message = document.createElement('div');
  27519. var stackTrace = document.createElement('pre');
  27520. message.innerText = data.error.message;
  27521. stackTrace.innerText = data.error.stack;
  27522. overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
  27523. return overlay;
  27524. }
  27525. function getParents(bundle, id) {
  27526. var modules = bundle.modules;
  27527. if (!modules) {
  27528. return [];
  27529. }
  27530. var parents = [];
  27531. var k, d, dep;
  27532. for (k in modules) {
  27533. for (d in modules[k][1]) {
  27534. dep = modules[k][1][d];
  27535. if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
  27536. parents.push(k);
  27537. }
  27538. }
  27539. }
  27540. if (bundle.parent) {
  27541. parents = parents.concat(getParents(bundle.parent, id));
  27542. }
  27543. return parents;
  27544. }
  27545. function hmrApply(bundle, asset) {
  27546. var modules = bundle.modules;
  27547. if (!modules) {
  27548. return;
  27549. }
  27550. if (modules[asset.id] || !bundle.parent) {
  27551. var fn = new Function('require', 'module', 'exports', asset.generated.js);
  27552. asset.isNew = !modules[asset.id];
  27553. modules[asset.id] = [fn, asset.deps];
  27554. } else if (bundle.parent) {
  27555. hmrApply(bundle.parent, asset);
  27556. }
  27557. }
  27558. function hmrAcceptCheck(bundle, id) {
  27559. var modules = bundle.modules;
  27560. if (!modules) {
  27561. return;
  27562. }
  27563. if (!modules[id] && bundle.parent) {
  27564. return hmrAcceptCheck(bundle.parent, id);
  27565. }
  27566. if (checkedAssets[id]) {
  27567. return;
  27568. }
  27569. checkedAssets[id] = true;
  27570. var cached = bundle.cache[id];
  27571. assetsToAccept.push([bundle, id]);
  27572. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  27573. return true;
  27574. }
  27575. return getParents(global.parcelRequire, id).some(function (id) {
  27576. return hmrAcceptCheck(global.parcelRequire, id);
  27577. });
  27578. }
  27579. function hmrAcceptRun(bundle, id) {
  27580. var cached = bundle.cache[id];
  27581. bundle.hotData = {};
  27582. if (cached) {
  27583. cached.hot.data = bundle.hotData;
  27584. }
  27585. if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
  27586. cached.hot._disposeCallbacks.forEach(function (cb) {
  27587. cb(bundle.hotData);
  27588. });
  27589. }
  27590. delete bundle.cache[id];
  27591. bundle(id);
  27592. cached = bundle.cache[id];
  27593. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  27594. cached.hot._acceptCallbacks.forEach(function (cb) {
  27595. cb();
  27596. });
  27597. return true;
  27598. }
  27599. }
  27600. },{}]},{},["../node_modules/parcel/src/builtins/hmr-runtime.js","background.js"], null)
  27601. //# sourceMappingURL=/background.js.map